PageSourceSearch

https://eduweb.ai/assets/index-BwbEm-RG.js

js eduweb.ai collected 2026-10-05 13:42:49 UTC 3,895,516 bytes, 3,401 lines download raw bytes

vendor: 4,672 bytes, lines 1-9
1var Uje=Object.defineProperty;var i9=e=>{throw TypeError(e)};var $je=(e,r,n)=>r in e?Uje(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var tr=(e,r,n)=>$je(e,typeof r!="symbol"?r+"":r,n),gP=(e,r,n)=>r.has(e)||i9("Cannot "+n);var Ne=(e,r,n)=>(gP(e,r,"read from private field"),n?n.call(e):r.get(e)),hr=(e,r,n)=>r.has(e)?i9("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,n),kt=(e,r,n,i)=>(gP(e,r,"write to private field"),i?i.call(e,n):r.set(e,n),n),Wr=(e,r,n)=>(gP(e,r,"access private method"),n);var UC=(e,r,n,i)=>({set _(a){kt(e,r,a,n)},get _(){return Ne(e,r,i)}});function Qje(e,r){for(var n=0;n<r.length;n++){const i=r[n];if(typeof i!="string"&&!Array.isArray(i)){for(const a in i)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(i,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>i[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();var Cm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xie={exports:{}},RB={},Yie={exports:{}},nn={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var u_=Symbol.for("react.element"),Hje=Symbol.for("react.portal"),Vje=Symbol.for("react.fragment"),Wje=Symbol.for("react.strict_mode"),qje=Symbol.for("react.profiler"),Kje=Symbol.for("react.provider"),Gje=Symbol.for("react.context"),Xje=Symbol.for("react.forward_ref"),Yje=Symbol.for("react.suspense"),Jje=Symbol.for("react.memo"),Zje=Symbol.for("react.lazy"),a9=Symbol.iterator;function e_e(e){return e===null||typeof e!="object"?null:(e=a9&&e[a9]||e["@@iterator"],typeof e=="function"?e:null)}var Jie={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Zie=Object.assign,eae={};function B0(e,r,n){this.props=e,this.context=r,this.refs=eae,this.updater=n||Jie}B0.prototype.isReactComponent={};B0.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,r,"setState")};B0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function tae(){}tae.prototype=B0.prototype;function F6(e,r,n){this.props=e,this.context=r,this.refs=eae,this.updater=n||Jie}var O6=F6.prototype=new tae;O6.constructor=F6;Zie(O6,B0.prototype);O6.isPureReactComponent=!0;var s9=Array.isArray,rae=Object.prototype.hasOwnProperty,L6={current:null},nae={key:!0,ref:!0,__self:!0,__source:!0};function iae(e,r,n){var i,a={},o=null,l=null;if(r!=null)for(i in r.ref!==void 0&&(l=r.ref),r.key!==void 0&&(o=""+r.key),r)rae.call(r,i)&&!nae.hasOwnProperty(i)&&(a[i]=r[i]);var c=arguments.length-2;if(c===1)a.children=n;else if(1<c){for(var u=Array(c),d=0;d<c;d++)u[d]=arguments[d+2];a.children=u}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:u_,type:e,key:o,ref:l,props:a,_owner:L6.current}}function t_e(e,r){return{$$typeof:u_,type:e.type,key:r,ref:e.ref,props:e.props,_owner:e._owner}}function R6(e){return typeof e=="object"&&e!==null&&e.$$typeof===u_}function r_e(e){var r={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return r[n]})}var o9=/\/+/g;function xP(e,r){return typeof e=="object"&&e!==null&&e.key!=null?r_e(""+e.key):r.toString(36)}function $S(e,r,n,i,a){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case u_:case Hje:l=!0}}
vendor: 1,346 bytes, line 9
9if(l)return l=e,a=a(l),e=i===""?"."+xP(l,0):i,s9(a)?(n="",e!=null&&(n=e.replace(o9,"$&/")+"/"),$S(a,r,n,"",function(d){return d})):a!=null&&(R6(a)&&(a=t_e(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(o9,"$&/")+"/")+e)),r.push(a)),1;if(l=0,i=i===""?".":i+":",s9(e))for(var c=0;c<e.length;c++){o=e[c];var u=i+xP(o,c);l+=$S(o,r,n,u,a)}else if(u=e_e(e),typeof u=="function")for(e=u.call(e),c=0;!(o=e.next()).done;)o=o.value,u=i+xP(o,c++),l+=$S(o,r,n,u,a);else if(o==="object")throw r=String(e),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return l}function $C(e,r,n){if(e==null)return e;var i=[],a=0;return $S(e,i,"","",function(o){return r.call(n,o,a++)}),i}function n_e(e){if(e._status===-1){var r=e._result;r=r(),r.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=r)}if(e._status===1)return e._result.default;throw e._result}var Io={current:null},QS={transition:null},i_e={ReactCurrentDispatcher:Io,ReactCurrentBatchConfig:QS,ReactCurrentOwner:L6};function aae(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 4,089 bytes, lines 9-25
9nn.Children={map:$C,forEach:function(e,r,n){$C(e,function(){r.apply(this,arguments)},n)},count:function(e){var r=0;return $C(e,function(){r++}),r},toArray:function(e){return $C(e,function(r){return r})||[]},only:function(e){if(!R6(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};nn.Component=B0;nn.Fragment=Vje;nn.Profiler=qje;nn.PureComponent=F6;nn.StrictMode=Wje;nn.Suspense=Yje;nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=i_e;nn.act=aae;nn.cloneElement=function(e,r,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=Zie({},e.props),a=e.key,o=e.ref,l=e._owner;if(r!=null){if(r.ref!==void 0&&(o=r.ref,l=L6.current),r.key!==void 0&&(a=""+r.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in r)rae.call(r,u)&&!nae.hasOwnProperty(u)&&(i[u]=r[u]===void 0&&c!==void 0?c[u]:r[u])}var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];i.children=c}return{$$typeof:u_,type:e.type,key:a,ref:o,props:i,_owner:l}};nn.createContext=function(e){return e={$$typeof:Gje,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Kje,_context:e},e.Consumer=e};nn.createElement=iae;nn.createFactory=function(e){var r=iae.bind(null,e);return r.type=e,r};nn.createRef=function(){return{current:null}};nn.forwardRef=function(e){return{$$typeof:Xje,render:e}};nn.isValidElement=R6;nn.lazy=function(e){return{$$typeof:Zje,_payload:{_status:-1,_result:e},_init:n_e}};nn.memo=function(e,r){return{$$typeof:Jje,type:e,compare:r===void 0?null:r}};nn.startTransition=function(e){var r=QS.transition;QS.transition={};try{e()}finally{QS.transition=r}};nn.unstable_act=aae;nn.useCallback=function(e,r){return Io.current.useCallback(e,r)};nn.useContext=function(e){return Io.current.useContext(e)};nn.useDebugValue=function(){};nn.useDeferredValue=function(e){return Io.current.useDeferredValue(e)};nn.useEffect=function(e,r){return Io.current.useEffect(e,r)};nn.useId=function(){return Io.current.useId()};nn.useImperativeHandle=function(e,r,n){return Io.current.useImperativeHandle(e,r,n)};nn.useInsertionEffect=function(e,r){return Io.current.useInsertionEffect(e,r)};nn.useLayoutEffect=function(e,r){return Io.current.useLayoutEffect(e,r)};nn.useMemo=function(e,r){return Io.current.useMemo(e,r)};nn.useReducer=function(e,r,n){return Io.current.useReducer(e,r,n)};nn.useRef=function(e){return Io.current.useRef(e)};nn.useState=function(e){return Io.current.useState(e)};nn.useSyncExternalStore=function(e,r,n){return Io.current.useSyncExternalStore(e,r,n)};nn.useTransition=function(){return Io.current.useTransition()};nn.version="18.3.1";Yie.exports=nn;var w=Yie.exports;const ee=bn(w),D6=Qje({__proto__:null,default:ee},[w]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var a_e=w,s_e=Symbol.for("react.element"),o_e=Symbol.for("react.fragment"),l_e=Object.prototype.hasOwnProperty,c_e=a_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u_e={key:!0,ref:!0,__self:!0,__source:!0};function sae(e,r,n){var i,a={},o=null,l=null;n!==void 0&&(o=""+n),r.key!==void 0&&(o=""+r.key),r.ref!==void 0&&(l=r.ref);for(i in r)l_e.call(r,i)&&!u_e.hasOwnProperty(i)&&(a[i]=r[i]);if(e&&e.defaultProps)for(i in r=e.defaultProps,r)a[i]===void 0&&(a[i]=r[i]);return{$$typeof:s_e,type:e,key:o,ref:l,props:a,_owner:c_e.current}}RB.Fragment=o_e;RB.jsx=sae;RB.jsxs=sae;Xie.exports=RB;var s=Xie.exports,oae={exports:{}},Yl={},lae={exports:{}},cae={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function r(U,Q){var $=U.length;
vendor: 10,608 bytes, lines 25-34
25U.push(Q);e:for(;0<$;){var q=$-1>>>1,M=U[q];if(0<a(M,Q))U[q]=Q,U[$]=M,$=q;else break e}}function n(U){return U.length===0?null:U[0]}function i(U){if(U.length===0)return null;var Q=U[0],$=U.pop();if($!==Q){U[0]=$;e:for(var q=0,M=U.length,z=M>>>1;q<z;){var K=2*(q+1)-1,ne=U[K],ie=K+1,X=U[ie];if(0>a(ne,$))ie<M&&0>a(X,ne)?(U[q]=X,U[ie]=$,q=ie):(U[q]=ne,U[K]=$,q=K);else if(ie<M&&0>a(X,$))U[q]=X,U[ie]=$,q=ie;else break e}}return Q}function a(U,Q){var $=U.sortIndex-Q.sortIndex;return $!==0?$:U.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var u=[],d=[],h=1,f=null,p=3,m=!1,A=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(U){for(var Q=n(d);Q!==null;){if(Q.callback===null)i(d);else if(Q.startTime<=U)i(d),Q.sortIndex=Q.expirationTime,r(u,Q);else break;Q=n(d)}}function j(U){if(g=!1,v(U),!A)if(n(u)!==null)A=!0,L(_);else{var Q=n(d);Q!==null&&V(j,Q.startTime-U)}}function _(U,Q){A=!1,g&&(g=!1,x(S),S=-1),m=!0;var $=p;try{for(v(Q),f=n(u);f!==null&&(!(f.expirationTime>Q)||U&&!B());){var q=f.callback;if(typeof q=="function"){f.callback=null,p=f.priorityLevel;var M=q(f.expirationTime<=Q);Q=e.unstable_now(),typeof M=="function"?f.callback=M:f===n(u)&&i(u),v(Q)}else i(u);f=n(u)}if(f!==null)var z=!0;else{var K=n(d);K!==null&&V(j,K.startTime-Q),z=!1}return z}finally{f=null,p=$,m=!1}}var C=!1,N=null,S=-1,E=5,O=-1;function B(){return!(e.unstable_now()-O<E)}function T(){if(N!==null){var U=e.unstable_now();O=U;var Q=!0;try{Q=N(!0,U)}finally{Q?F():(C=!1,N=null)}}else C=!1}var F;if(typeof b=="function")F=function(){b(T)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,D=I.port2;I.port1.onmessage=T,F=function(){D.postMessage(null)}}else F=function(){y(T,0)};function L(U){N=U,C||(C=!0,F())}function V(U,Q){S=y(function(){U(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_continueExecution=function(){A||m||(A=!0,L(_))},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(U){switch(p){case 1:case 2:case 3:var Q=3;break;default:Q=p}var $=p;p=Q;try{return U()}finally{p=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,Q){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var $=p;p=U;try{return Q()}finally{p=$}},e.unstable_scheduleCallback=function(U,Q,$){var q=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?q+$:q):$=q,U){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=$+M,U={id:h++,callback:Q,priorityLevel:U,startTime:$,expirationTime:M,sortIndex:-1},$>q?(U.sortIndex=$,r(d,U),n(u)===null&&U===n(d)&&(g?(x(S),S=-1):g=!0,V(j,$-q))):(U.sortIndex=M,r(u,U),A||m||(A=!0,L(_))),U},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(U){var Q=p;return function(){var $=p;p=Q;try{return U.apply(this,arguments)}finally{p=$}}}})(cae);lae.exports=cae;var d_e=lae.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var h_e=w,Hl=d_e;function mt(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)r+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var uae=new Set,d2={};function Rg(e,r){Tv(e,r),Tv(e+"Capture",r)}function Tv(e,r){for(d2[e]=r,e=0;e<r.length;e++)uae.add(r[e])}var Hh=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),XO=Object.prototype.hasOwnProperty,f_e=/^[: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]*$/,l9={},c9={};function m_e(e){return XO.call(c9,e)?!0:XO.call(l9,e)?!1:f_e.test(e)?c9[e]=!0:(l9[e]=!0,!1)}function p_e(e,r,n,i){if(n!==null&&n.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function A_e(e,r,n,i){if(r===null||typeof r>"u"||p_e(e,r,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function Fo(e,r,n,i,a,o,l){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=r,this.sanitizeURL=o,this.removeEmptyString=l}var Fs={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Fs[e]=new Fo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var r=e[0];Fs[r]=new Fo(r,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Fs[e]=new Fo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Fs[e]=new Fo(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Fs[e]=new Fo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Fs[e]=new Fo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Fs[e]=new Fo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Fs[e]=new Fo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Fs[e]=new Fo(e,5,!1,e.toLowerCase(),null,!1,!1)});var M6=/[\-:]([a-z])/g;function z6(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var r=e.replace(M6,z6);Fs[r]=new Fo(r,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var r=e.replace(M6,z6);Fs[r]=new Fo(r,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var r=e.replace(M6,z6);Fs[r]=new Fo(r,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Fs[e]=new Fo(e,1,!1,e.toLowerCase(),null,!1,!1)});Fs.xlinkHref=new Fo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Fs[e]=new Fo(e,1,!1,e.toLowerCase(),null,!0,!0)});function U6(e,r,n,i){var a=Fs.hasOwnProperty(r)?Fs[r]:null;(a!==null?a.type!==0:i||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(A_e(r,n,a,i)&&(n=null),i||a===null?m_e(r)&&(n===null?e.removeAttribute(r):e.setAttribute(r,""+n)):a.mustUseProperty?e[a.propertyName]=n===null?a.type===3?!1:"":n:(r=a.attributeName,i=a.attributeNamespace,n===null?e.removeAttribute(r):(a=a.type,n=a===3||a===4&&n===!0?"":""+n,i?e.setAttributeNS(i,r,n):e.setAttribute(r,n))))}var hf=h_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,QC=Symbol.for("react.element"),dy=Symbol.for("react.portal"),hy=Symbol.for("react.fragment"),$6=Symbol.for("react.strict_mode"),YO=Symbol.for("react.profiler"),dae=Symbol.for("react.provider"),hae=Symbol.for("react.context"),Q6=Symbol.for("react.forward_ref"),JO=Symbol.for("react.suspense"),ZO=Symbol.for("react.suspense_list"),H6=Symbol.for("react.memo"),rm=Symbol.for("react.lazy"),fae=Symbol.for("react.offscreen"),u9=Symbol.iterator;function e1(e){return e===null||typeof e!="object"?null:(e=u9&&e[u9]||e["@@iterator"],typeof e=="function"?e:null)}var Ki=Object.assign,yP;function J1(e){if(yP===void 0)try{throw Error()}catch(n){var r=n.stack.trim().match(/\n( *(at )?)/);yP=r&&r[1]||""}return`
34`+yP+e}var vP=!1;function bP(e,r){if(!e||vP)return"";vP=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(d){var i=d}Reflect.construct(e,[],r)}else{try{r.call()}catch(d){i=d}e.call(r.prototype)}else{try{throw Error()}catch(d){i=d}e()}}
vendor: 5,850 bytes, lines 34-37
34catch(d){if(d&&i&&typeof d.stack=="string"){for(var a=d.stack.split(`
35`),o=i.stack.split(`
36`),l=a.length-1,c=o.length-1;1<=l&&0<=c&&a[l]!==o[c];)c--;for(;1<=l&&0<=c;l--,c--)if(a[l]!==o[c]){if(l!==1||c!==1)do if(l--,c--,0>c||a[l]!==o[c]){var u=`
37`+a[l].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=l&&0<=c);break}}}finally{vP=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?J1(e):""}function g_e(e){switch(e.tag){case 5:return J1(e.type);case 16:return J1("Lazy");case 13:return J1("Suspense");case 19:return J1("SuspenseList");case 0:case 2:case 15:return e=bP(e.type,!1),e;case 11:return e=bP(e.type.render,!1),e;case 1:return e=bP(e.type,!0),e;default:return""}}function eL(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case hy:return"Fragment";case dy:return"Portal";case YO:return"Profiler";case $6:return"StrictMode";case JO:return"Suspense";case ZO:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case hae:return(e.displayName||"Context")+".Consumer";case dae:return(e._context.displayName||"Context")+".Provider";case Q6:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H6:return r=e.displayName||null,r!==null?r:eL(e.type)||"Memo";case rm:r=e._payload,e=e._init;try{return eL(e(r))}catch{}}return null}function x_e(e){var r=e.type;switch(e.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=r.render,e=e.displayName||e.name||"",r.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return eL(r);case 8:return r===$6?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function ap(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mae(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function y_e(e){var r=mae(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),i=""+e[r];if(!e.hasOwnProperty(r)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,o=n.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return a.call(this)},set:function(l){i=""+l,o.call(this,l)}}),Object.defineProperty(e,r,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(l){i=""+l},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function HC(e){e._valueTracker||(e._valueTracker=y_e(e))}function pae(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var n=r.getValue(),i="";return e&&(i=mae(e)?e.checked?"true":"false":e.value),e=i,e!==n?(r.setValue(e),!0):!1}function Mk(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function tL(e,r){var n=r.checked;return Ki({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function d9(e,r){var n=r.defaultValue==null?"":r.defaultValue,i=r.checked!=null?r.checked:r.defaultChecked;n=ap(r.value!=null?r.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function Aae(e,r){r=r.checked,r!=null&&U6(e,"checked",r,!1)}function rL(e,r){Aae(e,r);var n=ap(r.value),i=r.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}r.hasOwnProperty("value")?nL(e,r.type,n):r.hasOwnProperty("defaultValue")&&nL(e,r.type,ap(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(e.defaultChecked=!!r.defaultChecked)}function h9(e,r,n){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var i=r.type;if(!(i!=="submit"&&i!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+e._wrapperState.initialValue,n||r===e.value||(e.value=r),e.defaultValue=r}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function nL(e,r,n){(r!=="number"||Mk(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Z1=Array.isArray;function My(e,r,n,i){if(e=e.options,r){r={};for(var a=0;a<n.length;a++)r["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=r.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&i&&(e[n].defaultSelected=!0)}else{for(n=""+ap(n),r=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}r!==null||e[a].disabled||(r=e[a])}r!==null&&(r.selected=!0)}}function iL(e,r){if(r.dangerouslySetInnerHTML!=null)throw Error(mt(91));return Ki({},r,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function f9(e,r){var n=r.value;if(n==null){if(n=r.children,r=r.defaultValue,n!=null){if(r!=null)throw Error(mt(92));if(Z1(n)){if(1<n.length)throw Error(mt(93));n=n[0]}r=n}r==null&&(r=""),n=r}e._wrapperState={initialValue:ap(n)}}function gae(e,r){var n=ap(r.value),i=ap(r.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),r.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),i!=null&&(e.defaultValue=""+i)}function m9(e){var r=e.textContent;
vendor: 12,427 bytes, line 37
37r===e._wrapperState.initialValue&&r!==""&&r!==null&&(e.value=r)}function xae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function aL(e,r){return e==null||e==="http://www.w3.org/1999/xhtml"?xae(r):e==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var VC,yae=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,n,i,a){MSApp.execUnsafeLocalFunction(function(){return e(r,n,i,a)})}:e}(function(e,r){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=r;else{for(VC=VC||document.createElement("div"),VC.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=VC.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild)}});function h2(e,r){if(r){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=r;return}}e.textContent=r}var jw={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},v_e=["Webkit","ms","Moz","O"];Object.keys(jw).forEach(function(e){v_e.forEach(function(r){r=r+e.charAt(0).toUpperCase()+e.substring(1),jw[r]=jw[e]})});function vae(e,r,n){return r==null||typeof r=="boolean"||r===""?"":n||typeof r!="number"||r===0||jw.hasOwnProperty(e)&&jw[e]?(""+r).trim():r+"px"}function bae(e,r){e=e.style;for(var n in r)if(r.hasOwnProperty(n)){var i=n.indexOf("--")===0,a=vae(n,r[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,a):e[n]=a}}var b_e=Ki({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 sL(e,r){if(r){if(b_e[e]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(mt(137,e));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(mt(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(mt(61))}if(r.style!=null&&typeof r.style!="object")throw Error(mt(62))}}function oL(e,r){if(e.indexOf("-")===-1)return typeof r.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lL=null;function V6(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cL=null,zy=null,Uy=null;function p9(e){if(e=f_(e)){if(typeof cL!="function")throw Error(mt(280));var r=e.stateNode;r&&(r=$B(r),cL(e.stateNode,e.type,r))}}function wae(e){zy?Uy?Uy.push(e):Uy=[e]:zy=e}function jae(){if(zy){var e=zy,r=Uy;if(Uy=zy=null,p9(e),r)for(e=0;e<r.length;e++)p9(r[e])}}function _ae(e,r){return e(r)}function Cae(){}var wP=!1;function Nae(e,r,n){if(wP)return e(r,n);wP=!0;try{return _ae(e,r,n)}finally{wP=!1,(zy!==null||Uy!==null)&&(Cae(),jae())}}function f2(e,r){var n=e.stateNode;if(n===null)return null;var i=$B(n);if(i===null)return null;n=i[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(mt(231,r,typeof n));return n}var uL=!1;if(Hh)try{var t1={};Object.defineProperty(t1,"passive",{get:function(){uL=!0}}),window.addEventListener("test",t1,t1),window.removeEventListener("test",t1,t1)}catch{uL=!1}function w_e(e,r,n,i,a,o,l,c,u){var d=Array.prototype.slice.call(arguments,3);try{r.apply(n,d)}catch(h){this.onError(h)}}var _w=!1,zk=null,Uk=!1,dL=null,j_e={onError:function(e){_w=!0,zk=e}};function __e(e,r,n,i,a,o,l,c,u){_w=!1,zk=null,w_e.apply(j_e,arguments)}function C_e(e,r,n,i,a,o,l,c,u){if(__e.apply(this,arguments),_w){if(_w){var d=zk;_w=!1,zk=null}else throw Error(mt(198));Uk||(Uk=!0,dL=d)}}function Dg(e){var r=e,n=e;if(e.alternate)for(;r.return;)r=r.return;else{e=r;do r=e,r.flags&4098&&(n=r.return),e=r.return;while(e)}return r.tag===3?n:null}function Sae(e){if(e.tag===13){var r=e.memoizedState;if(r===null&&(e=e.alternate,e!==null&&(r=e.memoizedState)),r!==null)return r.dehydrated}return null}function A9(e){if(Dg(e)!==e)throw Error(mt(188))}function N_e(e){var r=e.alternate;if(!r){if(r=Dg(e),r===null)throw Error(mt(188));return r!==e?null:e}for(var n=e,i=r;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return A9(a),e;if(o===i)return A9(a),r;o=o.sibling}throw Error(mt(188))}if(n.return!==i.return)n=a,i=o;else{for(var l=!1,c=a.child;c;){if(c===n){l=!0,n=a,i=o;break}if(c===i){l=!0,i=a,n=o;break}c=c.sibling}if(!l){for(c=o.child;c;){if(c===n){l=!0,n=o,i=a;break}if(c===i){l=!0,i=o,n=a;break}c=c.sibling}if(!l)throw Error(mt(189))}}if(n.alternate!==i)throw Error(mt(190))}if(n.tag!==3)throw Error(mt(188));return n.stateNode.current===n?e:r}function kae(e){return e=N_e(e),e!==null?Eae(e):null}function Eae(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var r=Eae(e);if(r!==null)return r;e=e.sibling}return null}var Bae=Hl.unstable_scheduleCallback,g9=Hl.unstable_cancelCallback,S_e=Hl.unstable_shouldYield,k_e=Hl.unstable_requestPaint,fa=Hl.unstable_now,E_e=Hl.unstable_getCurrentPriorityLevel,W6=Hl.unstable_ImmediatePriority,Tae=Hl.unstable_UserBlockingPriority,$k=Hl.unstable_NormalPriority,B_e=Hl.unstable_LowPriority,Pae=Hl.unstable_IdlePriority,DB=null,Cd=null;function T_e(e){if(Cd&&typeof Cd.onCommitFiberRoot=="function")try{Cd.onCommitFiberRoot(DB,e,void 0,(e.current.flags&128)===128)}catch{}}var _u=Math.clz32?Math.clz32:F_e,P_e=Math.log,I_e=Math.LN2;function F_e(e){return e>>>=0,e===0?32:31-(P_e(e)/I_e|0)|0}var WC=64,qC=4194304;function ew(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Qk(e,r){var n=e.pendingLanes;if(n===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var c=l&~a;c!==0?i=ew(c):(o&=l,o!==0&&(i=ew(o)))}else l=n&~a,l!==0?i=ew(l):o!==0&&(i=ew(o));if(i===0)return 0;if(r!==0&&r!==i&&!(r&a)&&(a=i&-i,o=r&-r,a>=o||a===16&&(o&4194240)!==0))return r;if(i&4&&(i|=n&16),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=i;0<r;)n=31-_u(r),a=1<<n,i|=e[n],r&=~a;return i}function O_e(e,r){switch(e){case 1:case 2:case 4:return r+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 r+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 L_e(e,r){for(var n=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,o=e.pendingLanes;0<o;){var l=31-_u(o),c=1<<l,u=a[l];u===-1?(!(c&n)||c&i)&&(a[l]=O_e(c,r)):u<=r&&(e.expiredLanes|=c),o&=~c}}function hL(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Iae(){var e=WC;return WC<<=1,!(WC&4194240)&&(WC=64),e}function jP(e){for(var r=[],n=0;31>n;n++)r.push(e);return r}function d_(e,r,n){e.pendingLanes|=r,r!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,r=31-_u(r),e[r]=n}function R_e(e,r){var n=e.pendingLanes&~r;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=r,e.mutableReadLanes&=r,e.entangledLanes&=r,r=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var a=31-_u(n),o=1<<a;r[a]=0,i[a]=-1,e[a]=-1,n&=~o}}function q6(e,r){var n=e.entangledLanes|=r;for(e=e.entanglements;n;){var i=31-_u(n),a=1<<i;a&r|e[i]&r&&(e[i]|=r),n&=~a}}var Vn=0;function Fae(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Oae,K6,Lae,Rae,Dae,fL=!1,KC=[],zm=null,Um=null,$m=null,m2=new Map,p2=new Map,cm=[],D_e="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 x9(e,r){switch(e){case"focusin":case"focusout":zm=null;break;case"dragenter":case"dragleave":Um=null;break;case"mouseover":case"mouseout":$m=null;break;case"pointerover":case"pointerout":m2.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":p2.delete(r.pointerId)}}function r1(e,r,n,i,a,o){return e===null||e.nativeEvent!==o?(e={blockedOn:r,domEventName:n,eventSystemFlags:i,nativeEvent:o,targetContainers:[a]},r!==null&&(r=f_(r),r!==null&&K6(r)),e):(e.eventSystemFlags|=i,r=e.targetContainers,a!==null&&r.indexOf(a)===-1&&r.push(a),e)}function M_e(e,r,n,i,a){switch(r){case"focusin":return zm=r1(zm,e,r,n,i,a),!0;case"dragenter":return Um=r1(Um,e,r,n,i,a),!0;case"mouseover":return $m=r1($m,e,r,n,i,a),!0;case"pointerover":var o=a.pointerId;return m2.set(o,r1(m2.get(o)||null,e,r,n,i,a)),!0;case"gotpointercapture":return o=a.pointerId,p2.set(o,r1(p2.get(o)||null,e,r,n,i,a)),!0}return!1}function Mae(e){var r=jA(e.target);if(r!==null){var n=Dg(r);if(n!==null){if(r=n.tag,r===13){if(r=Sae(n),r!==null){e.blockedOn=r,Dae(e.priority,function(){Lae(n)});return}}else if(r===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function HS(e){if(e.blockedOn!==null)return!1;for(var r=e.targetContainers;0<r.length;){var n=mL(e.domEventName,e.eventSystemFlags,r[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);lL=i,n.target.dispatchEvent(i),lL=null}else return r=f_(n),r!==null&&K6(r),e.blockedOn=n,!1;r.shift()}return!0}function y9(e,r,n){HS(e)&&n.delete(r)}function z_e(){fL=!1,zm!==null&&HS(zm)&&(zm=null),Um!==null&&HS(Um)&&(Um=null),$m!==null&&HS($m)&&($m=null),m2.forEach(y9),p2.forEach(y9)}function n1(e,r){e.blockedOn===r&&(e.blockedOn=null,fL||(fL=!0,Hl.unstable_scheduleCallback(Hl.unstable_NormalPriority,z_e)))}function A2(e){function r(a){return n1(a,e)}if(0<KC.length){n1(KC[0],e);for(var n=1;n<KC.length;n++){var i=KC[n];i.blockedOn===e&&(i.blockedOn=null)}}for(zm!==null&&n1(zm,e),Um!==null&&n1(Um,e),$m!==null&&n1($m,e),m2.forEach(r),p2.forEach(r),n=0;n<cm.length;n++)i=cm[n],i.blockedOn===e&&(i.blockedOn=null);for(;0<cm.length&&(n=cm[0],n.blockedOn===null);)Mae(n),n.blockedOn===null&&cm.shift()}var $y=hf.ReactCurrentBatchConfig,Hk=!0;function U_e(e,r,n,i){var a=Vn,o=$y.transition;$y.transition=null;try{Vn=1,G6(e,r,n,i)}finally{Vn=a,$y.transition=o}}function $_e(e,r,n,i){var a=Vn,o=$y.transition;$y.transition=null;try{Vn=4,G6(e,r,n,i)}finally{Vn=a,$y.transition=o}}function G6(e,r,n,i){if(Hk){var a=mL(e,r,n,i);if(a===null)IP(e,r,i,Vk,n),x9(e,i);else if(M_e(a,e,r,n,i))i.stopPropagation();else if(x9(e,i),r&4&&-1<D_e.indexOf(e)){for(;a!==null;){var o=f_(a);if(o!==null&&Oae(o),o=mL(e,r,n,i),o===null&&IP(e,r,i,Vk,n),o===a)break;a=o}a!==null&&i.stopPropagation()}else IP(e,r,i,null,n)}}var Vk=null;function mL(e,r,n,i){if(Vk=null,e=V6(i),e=jA(e),e!==null)if(r=Dg(e),r===null)e=null;else if(n=r.tag,n===13){if(e=Sae(r),e!==null)return e;e=null}else if(n===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;e=null}else r!==e&&(e=null);return Vk=e,null}
vendor: 10,484 bytes, line 37
37function zae(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(E_e()){case W6:return 1;case Tae:return 4;case $k:case B_e:return 16;case Pae:return 536870912;default:return 16}default:return 16}}var Nm=null,X6=null,VS=null;function Uae(){if(VS)return VS;var e,r=X6,n=r.length,i,a="value"in Nm?Nm.value:Nm.textContent,o=a.length;for(e=0;e<n&&r[e]===a[e];e++);var l=n-e;for(i=1;i<=l&&r[n-i]===a[o-i];i++);return VS=a.slice(e,1<i?1-i:void 0)}function WS(e){var r=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&r===13&&(e=13)):e=r,e===10&&(e=13),32<=e||e===13?e:0}function GC(){return!0}function v9(){return!1}function Jl(e){function r(n,i,a,o,l){this._reactName=n,this._targetInst=a,this.type=i,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(n=e[c],this[c]=n?n(o):o[c]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?GC:v9,this.isPropagationStopped=v9,this}return Ki(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=GC)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=GC)},persist:function(){},isPersistent:GC}),r}var T0={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Y6=Jl(T0),h_=Ki({},T0,{view:0,detail:0}),Q_e=Jl(h_),_P,CP,i1,MB=Ki({},h_,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:J6,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==i1&&(i1&&e.type==="mousemove"?(_P=e.screenX-i1.screenX,CP=e.screenY-i1.screenY):CP=_P=0,i1=e),_P)},movementY:function(e){return"movementY"in e?e.movementY:CP}}),b9=Jl(MB),H_e=Ki({},MB,{dataTransfer:0}),V_e=Jl(H_e),W_e=Ki({},h_,{relatedTarget:0}),NP=Jl(W_e),q_e=Ki({},T0,{animationName:0,elapsedTime:0,pseudoElement:0}),K_e=Jl(q_e),G_e=Ki({},T0,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),X_e=Jl(G_e),Y_e=Ki({},T0,{data:0}),w9=Jl(Y_e),J_e={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z_e={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"},eCe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tCe(e){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(e):(e=eCe[e])?!!r[e]:!1}function J6(){return tCe}var rCe=Ki({},h_,{key:function(e){if(e.key){var r=J_e[e.key]||e.key;if(r!=="Unidentified")return r}return e.type==="keypress"?(e=WS(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Z_e[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:J6,charCode:function(e){return e.type==="keypress"?WS(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?WS(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nCe=Jl(rCe),iCe=Ki({},MB,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j9=Jl(iCe),aCe=Ki({},h_,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:J6}),sCe=Jl(aCe),oCe=Ki({},T0,{propertyName:0,elapsedTime:0,pseudoElement:0}),lCe=Jl(oCe),cCe=Ki({},MB,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),uCe=Jl(cCe),dCe=[9,13,27,32],Z6=Hh&&"CompositionEvent"in window,Cw=null;Hh&&"documentMode"in document&&(Cw=document.documentMode);var hCe=Hh&&"TextEvent"in window&&!Cw,$ae=Hh&&(!Z6||Cw&&8<Cw&&11>=Cw),_9=" ",C9=!1;function Qae(e,r){switch(e){case"keyup":return dCe.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hae(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fy=!1;function fCe(e,r){switch(e){case"compositionend":return Hae(r);case"keypress":return r.which!==32?null:(C9=!0,_9);case"textInput":return e=r.data,e===_9&&C9?null:e;default:return null}}function mCe(e,r){if(fy)return e==="compositionend"||!Z6&&Qae(e,r)?(e=Uae(),VS=X6=Nm=null,fy=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return $ae&&r.locale!=="ko"?null:r.data;default:return null}}var pCe={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 N9(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r==="input"?!!pCe[e.type]:r==="textarea"}function Vae(e,r,n,i){wae(i),r=Wk(r,"onChange"),0<r.length&&(n=new Y6("onChange","change",null,n,i),e.push({event:n,listeners:r}))}var Nw=null,g2=null;function ACe(e){rse(e,0)}function zB(e){var r=Ay(e);if(pae(r))return e}function gCe(e,r){if(e==="change")return r}var Wae=!1;if(Hh){var SP;if(Hh){var kP="oninput"in document;if(!kP){var S9=document.createElement("div");S9.setAttribute("oninput","return;"),kP=typeof S9.oninput=="function"}SP=kP}else SP=!1;Wae=SP&&(!document.documentMode||9<document.documentMode)}function k9(){Nw&&(Nw.detachEvent("onpropertychange",qae),g2=Nw=null)}function qae(e){if(e.propertyName==="value"&&zB(g2)){var r=[];Vae(r,g2,e,V6(e)),Nae(ACe,r)}}function xCe(e,r,n){e==="focusin"?(k9(),Nw=r,g2=n,Nw.attachEvent("onpropertychange",qae)):e==="focusout"&&k9()}function yCe(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zB(g2)}function vCe(e,r){if(e==="click")return zB(r)}function bCe(e,r){if(e==="input"||e==="change")return zB(r)}function wCe(e,r){return e===r&&(e!==0||1/e===1/r)||e!==e&&r!==r}var ku=typeof Object.is=="function"?Object.is:wCe;function x2(e,r){if(ku(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var n=Object.keys(e),i=Object.keys(r);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var a=n[i];if(!XO.call(r,a)||!ku(e[a],r[a]))return!1}return!0}function E9(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function B9(e,r){var n=E9(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=r&&i>=r)return{node:n,offset:r-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=E9(n)}}function Kae(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?Kae(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function Gae(){for(var e=window,r=Mk();r instanceof e.HTMLIFrameElement;){try{var n=typeof r.contentWindow.location.href=="string"}catch{n=!1}if(n)e=r.contentWindow;else break;r=Mk(e.document)}return r}function eU(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}function jCe(e){var r=Gae(),n=e.focusedElem,i=e.selectionRange;if(r!==n&&n&&n.ownerDocument&&Kae(n.ownerDocument.documentElement,n)){if(i!==null&&eU(n)){if(r=i.start,e=i.end,e===void 0&&(e=r),"selectionStart"in n)n.selectionStart=r,n.selectionEnd=Math.min(e,n.value.length);else if(e=(r=n.ownerDocument||document)&&r.defaultView||window,e.getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(i.start,a);i=i.end===void 0?o:Math.min(i.end,a),!e.extend&&o>i&&(a=i,i=o,o=a),a=B9(n,o);var l=B9(n,i);a&&l&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(r=r.createRange(),r.setStart(a.node,a.offset),e.removeAllRanges(),o>i?(e.addRange(r),e.extend(l.node,l.offset)):(r.setEnd(l.node,l.offset),e.addRange(r)))}}for(r=[],e=n;e=e.parentNode;)e.nodeType===1&&r.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<r.length;n++)e=r[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var _Ce=Hh&&"documentMode"in document&&11>=document.documentMode,my=null,pL=null,Sw=null,AL=!1;function T9(e,r,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;AL||my==null||my!==Mk(i)||(i=my,"selectionStart"in i&&eU(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focu
vendor: 4,411 bytes, line 37
37sNode:i.focusNode,focusOffset:i.focusOffset}),Sw&&x2(Sw,i)||(Sw=i,i=Wk(pL,"onSelect"),0<i.length&&(r=new Y6("onSelect","select",null,r,n),e.push({event:r,listeners:i}),r.target=my)))}function XC(e,r){var n={};return n[e.toLowerCase()]=r.toLowerCase(),n["Webkit"+e]="webkit"+r,n["Moz"+e]="moz"+r,n}var py={animationend:XC("Animation","AnimationEnd"),animationiteration:XC("Animation","AnimationIteration"),animationstart:XC("Animation","AnimationStart"),transitionend:XC("Transition","TransitionEnd")},EP={},Xae={};Hh&&(Xae=document.createElement("div").style,"AnimationEvent"in window||(delete py.animationend.animation,delete py.animationiteration.animation,delete py.animationstart.animation),"TransitionEvent"in window||delete py.transitionend.transition);function UB(e){if(EP[e])return EP[e];if(!py[e])return e;var r=py[e],n;for(n in r)if(r.hasOwnProperty(n)&&n in Xae)return EP[e]=r[n];return e}var Yae=UB("animationend"),Jae=UB("animationiteration"),Zae=UB("animationstart"),ese=UB("transitionend"),tse=new Map,P9="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 yp(e,r){tse.set(e,r),Rg(r,[e])}for(var BP=0;BP<P9.length;BP++){var TP=P9[BP],CCe=TP.toLowerCase(),NCe=TP[0].toUpperCase()+TP.slice(1);yp(CCe,"on"+NCe)}yp(Yae,"onAnimationEnd");yp(Jae,"onAnimationIteration");yp(Zae,"onAnimationStart");yp("dblclick","onDoubleClick");yp("focusin","onFocus");yp("focusout","onBlur");yp(ese,"onTransitionEnd");Tv("onMouseEnter",["mouseout","mouseover"]);Tv("onMouseLeave",["mouseout","mouseover"]);Tv("onPointerEnter",["pointerout","pointerover"]);Tv("onPointerLeave",["pointerout","pointerover"]);Rg("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Rg("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Rg("onBeforeInput",["compositionend","keypress","textInput","paste"]);Rg("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Rg("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Rg("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var tw="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(" "),SCe=new Set("cancel close invalid load scroll toggle".split(" ").concat(tw));function I9(e,r,n){var i=e.type||"unknown-event";e.currentTarget=n,C_e(i,r,void 0,e),e.currentTarget=null}function rse(e,r){r=(r&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],a=i.event;i=i.listeners;e:{var o=void 0;if(r)for(var l=i.length-1;0<=l;l--){var c=i[l],u=c.instance,d=c.currentTarget;if(c=c.listener,u!==o&&a.isPropagationStopped())break e;I9(a,c,d),o=u}else for(l=0;l<i.length;l++){if(c=i[l],u=c.instance,d=c.currentTarget,c=c.listener,u!==o&&a.isPropagationStopped())break e;I9(a,c,d),o=u}}}if(Uk)throw e=dL,Uk=!1,dL=null,e}function wi(e,r){var n=r[bL];n===void 0&&(n=r[bL]=new Set);var i=e+"__bubble";n.has(i)||(nse(r,e,2,!1),n.add(i))}function PP(e,r,n){var i=0;r&&(i|=4),nse(n,e,i,r)}var YC="_reactListening"+Math.random().toString(36).slice(2);function y2(e){if(!e[YC]){e[YC]=!0,uae.forEach(function(n){n!=="selectionchange"&&(SCe.has(n)||PP(n,!1,e),PP(n,!0,e))});var r=e.nodeType===9?e:e.ownerDocument;r===null||r[YC]||(r[YC]=!0,PP("selectionchange",!1,r))}}function nse(e,r,n,i){switch(zae(r)){case 1:var a=U_e;break;case 4:a=$_e;break;default:a=G6}n=a.bind(null,r,n,e),a=void 0,!uL||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(r,n,{capture:!0,passive:a}):e.addEventListener(r,n,!0):a!==void 0?e.addEventListener(r,n,{passive:a}):e.addEventListener(r,n,!1)}function IP(e,r,n,i,a){var o=i;
vendor: 2,659 bytes, line 37
37if(!(r&1)&&!(r&2)&&i!==null)e:for(;;){if(i===null)return;var l=i.tag;if(l===3||l===4){var c=i.stateNode.containerInfo;if(c===a||c.nodeType===8&&c.parentNode===a)break;if(l===4)for(l=i.return;l!==null;){var u=l.tag;if((u===3||u===4)&&(u=l.stateNode.containerInfo,u===a||u.nodeType===8&&u.parentNode===a))return;l=l.return}for(;c!==null;){if(l=jA(c),l===null)return;if(u=l.tag,u===5||u===6){i=o=l;continue e}c=c.parentNode}}i=i.return}Nae(function(){var d=o,h=V6(n),f=[];e:{var p=tse.get(e);if(p!==void 0){var m=Y6,A=e;switch(e){case"keypress":if(WS(n)===0)break e;case"keydown":case"keyup":m=nCe;break;case"focusin":A="focus",m=NP;break;case"focusout":A="blur",m=NP;break;case"beforeblur":case"afterblur":m=NP;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":m=b9;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=V_e;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=sCe;break;case Yae:case Jae:case Zae:m=K_e;break;case ese:m=lCe;break;case"scroll":m=Q_e;break;case"wheel":m=uCe;break;case"copy":case"cut":case"paste":m=X_e;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=j9}var g=(r&4)!==0,y=!g&&e==="scroll",x=g?p!==null?p+"Capture":null:p;g=[];for(var b=d,v;b!==null;){v=b;var j=v.stateNode;if(v.tag===5&&j!==null&&(v=j,x!==null&&(j=f2(b,x),j!=null&&g.push(v2(b,j,v)))),y)break;b=b.return}0<g.length&&(p=new m(p,A,null,n,h),f.push({event:p,listeners:g}))}}if(!(r&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==lL&&(A=n.relatedTarget||n.fromElement)&&(jA(A)||A[Vh]))break e;if((m||p)&&(p=h.window===h?h:(p=h.ownerDocument)?p.defaultView||p.parentWindow:window,m?(A=n.relatedTarget||n.toElement,m=d,A=A?jA(A):null,A!==null&&(y=Dg(A),A!==y||A.tag!==5&&A.tag!==6)&&(A=null)):(m=null,A=d),m!==A)){if(g=b9,j="onMouseLeave",x="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(g=j9,j="onPointerLeave",x="onPointerEnter",b="pointer"),y=m==null?p:Ay(m),v=A==null?p:Ay(A),p=new g(j,b+"leave",m,n,h),p.target=y,p.relatedTarget=v,j=null,jA(h)===d&&(g=new g(x,b+"enter",A,n,h),g.target=v,g.relatedTarget=y,j=g),y=j,m&&A)t:{for(g=m,x=A,b=0,v=g;v;v=_x(v))b++;for(v=0,j=x;j;j=_x(j))v++;for(;0<b-v;)g=_x(g),b--;for(;0<v-b;)x=_x(x),v--;for(;b--;){if(g===x||x!==null&&g===x.alternate)break t;g=_x(g),x=_x(x)}g=null}else g=null;m!==null&&F9(f,p,m,g,!1),A!==null&&y!==null&&F9(f,y,A,g,!0)}}
vendor: 4,602 bytes, lines 37-38
37e:{if(p=d?Ay(d):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var _=gCe;else if(N9(p))if(Wae)_=bCe;else{_=yCe;var C=xCe}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=vCe);if(_&&(_=_(e,d))){Vae(f,_,n,h);break e}C&&C(e,p,d),e==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&nL(p,"number",p.value)}switch(C=d?Ay(d):window,e){case"focusin":(N9(C)||C.contentEditable==="true")&&(my=C,pL=d,Sw=null);break;case"focusout":Sw=pL=my=null;break;case"mousedown":AL=!0;break;case"contextmenu":case"mouseup":case"dragend":AL=!1,T9(f,n,h);break;case"selectionchange":if(_Ce)break;case"keydown":case"keyup":T9(f,n,h)}var N;if(Z6)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else fy?Qae(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&($ae&&n.locale!=="ko"&&(fy||S!=="onCompositionStart"?S==="onCompositionEnd"&&fy&&(N=Uae()):(Nm=h,X6="value"in Nm?Nm.value:Nm.textContent,fy=!0)),C=Wk(d,S),0<C.length&&(S=new w9(S,e,null,n,h),f.push({event:S,listeners:C}),N?S.data=N:(N=Hae(n),N!==null&&(S.data=N)))),(N=hCe?fCe(e,n):mCe(e,n))&&(d=Wk(d,"onBeforeInput"),0<d.length&&(h=new w9("onBeforeInput","beforeinput",null,n,h),f.push({event:h,listeners:d}),h.data=N))}rse(f,r)})}function v2(e,r,n){return{instance:e,listener:r,currentTarget:n}}function Wk(e,r){for(var n=r+"Capture",i=[];e!==null;){var a=e,o=a.stateNode;a.tag===5&&o!==null&&(a=o,o=f2(e,n),o!=null&&i.unshift(v2(e,o,a)),o=f2(e,r),o!=null&&i.push(v2(e,o,a))),e=e.return}return i}function _x(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function F9(e,r,n,i,a){for(var o=r._reactName,l=[];n!==null&&n!==i;){var c=n,u=c.alternate,d=c.stateNode;if(u!==null&&u===i)break;c.tag===5&&d!==null&&(c=d,a?(u=f2(n,o),u!=null&&l.unshift(v2(n,u,c))):a||(u=f2(n,o),u!=null&&l.push(v2(n,u,c)))),n=n.return}l.length!==0&&e.push({event:r,listeners:l})}var kCe=/\r\n?/g,ECe=/\u0000|\uFFFD/g;function O9(e){return(typeof e=="string"?e:""+e).replace(kCe,`
38`).replace(ECe,"")}function JC(e,r,n){if(r=O9(r),O9(e)!==r&&n)throw Error(mt(425))}function qk(){}var gL=null,xL=null;function yL(e,r){return e==="textarea"||e==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var vL=typeof setTimeout=="function"?setTimeout:void 0,BCe=typeof clearTimeout=="function"?clearTimeout:void 0,L9=typeof Promise=="function"?Promise:void 0,TCe=typeof queueMicrotask=="function"?queueMicrotask:typeof L9<"u"?function(e){return L9.resolve(null).then(e).catch(PCe)}:vL;function PCe(e){setTimeout(function(){throw e})}function FP(e,r){var n=r,i=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(i===0){e.removeChild(a),A2(r);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=a}while(n);A2(r)}function Qm(e){for(;e!=null;e=e.nextSibling){var r=e.nodeType;if(r===1||r===3)break;if(r===8){if(r=e.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return e}function R9(e){e=e.previousSibling;for(var r=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(r===0)return e;r--}else n==="/$"&&r++}e=e.previousSibling}return null}var P0=Math.random().toString(36).slice(2),dd="__reactFiber$"+P0,b2="__reactProps$"+P0,Vh="__reactContainer$"+P0,bL="__reactEvents$"+P0,ICe="__reactListeners$"+P0,FCe="__reactHandles$"+P0;function jA(e){var r=e[dd];if(r)return r;for(var n=e.parentNode;n;){if(r=n[Vh]||n[dd]){if(n=r.alternate,r.child!==null||n!==null&&n.child!==null)for(e=R9(e);e!==null;){if(n=e[dd])return n;e=R9(e)}return r}e=n,n=e.parentNode}return null}function f_(e){return e=e[dd]||e[Vh],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ay(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(mt(33))}function $B(e){return e[b2]||null}var wL=[],gy=-1;function vp(e){return{current:e}}function Si(e){0>gy||(e.current=wL[gy],wL[gy]=null,gy--)}function hi(e,r){gy++,wL[gy]=e.current,e.current=r}var sp={},so=vp(sp),Zo=vp(!1),lg=sp;function Pv(e,r){var n=e.type.contextTypes;if(!n)return sp;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===r)return i.__reactInternalMemoizedMaskedChildContext;var a={},o;for(o in n)a[o]=r[o];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=a
vendor: 4,078 bytes, line 38
38),a}function el(e){return e=e.childContextTypes,e!=null}function Kk(){Si(Zo),Si(so)}function D9(e,r,n){if(so.current!==sp)throw Error(mt(168));hi(so,r),hi(Zo,n)}function ise(e,r,n){var i=e.stateNode;if(r=r.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var a in i)if(!(a in r))throw Error(mt(108,x_e(e)||"Unknown",a));return Ki({},n,i)}function Gk(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sp,lg=so.current,hi(so,e),hi(Zo,Zo.current),!0}function M9(e,r,n){var i=e.stateNode;if(!i)throw Error(mt(169));n?(e=ise(e,r,lg),i.__reactInternalMemoizedMergedChildContext=e,Si(Zo),Si(so),hi(so,e)):Si(Zo),hi(Zo,n)}var bh=null,QB=!1,OP=!1;function ase(e){bh===null?bh=[e]:bh.push(e)}function OCe(e){QB=!0,ase(e)}function bp(){if(!OP&&bh!==null){OP=!0;var e=0,r=Vn;try{var n=bh;for(Vn=1;e<n.length;e++){var i=n[e];do i=i(!0);while(i!==null)}bh=null,QB=!1}catch(a){throw bh!==null&&(bh=bh.slice(e+1)),Bae(W6,bp),a}finally{Vn=r,OP=!1}}return null}var xy=[],yy=0,Xk=null,Yk=0,pc=[],Ac=0,cg=null,Sh=1,kh="";function lA(e,r){xy[yy++]=Yk,xy[yy++]=Xk,Xk=e,Yk=r}function sse(e,r,n){pc[Ac++]=Sh,pc[Ac++]=kh,pc[Ac++]=cg,cg=e;var i=Sh;e=kh;var a=32-_u(i)-1;i&=~(1<<a),n+=1;var o=32-_u(r)+a;if(30<o){var l=a-a%5;o=(i&(1<<l)-1).toString(32),i>>=l,a-=l,Sh=1<<32-_u(r)+a|n<<a|i,kh=o+e}else Sh=1<<o|n<<a|i,kh=e}function tU(e){e.return!==null&&(lA(e,1),sse(e,1,0))}function rU(e){for(;e===Xk;)Xk=xy[--yy],xy[yy]=null,Yk=xy[--yy],xy[yy]=null;for(;e===cg;)cg=pc[--Ac],pc[Ac]=null,kh=pc[--Ac],pc[Ac]=null,Sh=pc[--Ac],pc[Ac]=null}var zl=null,Ll=null,Pi=!1,pu=null;function ose(e,r){var n=jc(5,null,null,0);n.elementType="DELETED",n.stateNode=r,n.return=e,r=e.deletions,r===null?(e.deletions=[n],e.flags|=16):r.push(n)}function z9(e,r){switch(e.tag){case 5:var n=e.type;return r=r.nodeType!==1||n.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(e.stateNode=r,zl=e,Ll=Qm(r.firstChild),!0):!1;case 6:return r=e.pendingProps===""||r.nodeType!==3?null:r,r!==null?(e.stateNode=r,zl=e,Ll=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(n=cg!==null?{id:Sh,overflow:kh}:null,e.memoizedState={dehydrated:r,treeContext:n,retryLane:1073741824},n=jc(18,null,null,0),n.stateNode=r,n.return=e,e.child=n,zl=e,Ll=null,!0):!1;default:return!1}}function jL(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _L(e){if(Pi){var r=Ll;if(r){var n=r;if(!z9(e,r)){if(jL(e))throw Error(mt(418));r=Qm(n.nextSibling);var i=zl;r&&z9(e,r)?ose(i,n):(e.flags=e.flags&-4097|2,Pi=!1,zl=e)}}else{if(jL(e))throw Error(mt(418));e.flags=e.flags&-4097|2,Pi=!1,zl=e}}}function U9(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;zl=e}function ZC(e){if(e!==zl)return!1;if(!Pi)return U9(e),Pi=!0,!1;var r;if((r=e.tag!==3)&&!(r=e.tag!==5)&&(r=e.type,r=r!=="head"&&r!=="body"&&!yL(e.type,e.memoizedProps)),r&&(r=Ll)){if(jL(e))throw lse(),Error(mt(418));for(;r;)ose(e,r),r=Qm(r.nextSibling)}if(U9(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(mt(317));e:{for(e=e.nextSibling,r=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(r===0){Ll=Qm(e.nextSibling);break e}r--}else n!=="$"&&n!=="$!"&&n!=="$?"||r++}e=e.nextSibling}Ll=null}}else Ll=zl?Qm(e.stateNode.nextSibling):null;return!0}function lse(){for(var e=Ll;e;)e=Qm(e.nextSibling)}function Iv(){Ll=zl=null,Pi=!1}function nU(e){pu===null?pu=[e]:pu.push(e)}var LCe=hf.ReactCurrentBatchConfig;function a1(e,r,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(mt(309));var i=n.stateNode}if(!i)throw Error(mt(147,e));var a=i,o=""+e;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===o?r.ref:(r=function(l){var c=a.refs;l===null?delete c[o]:c[o]=l},r._stringRef=o,r)}if(typeof e!="string")throw Error(mt(284));if(!n._owner)throw Error(mt(290,e))}return e}function eN(e,r){throw e=Object.prototype.toString.call(r),Error(mt(31,e==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":e))}function $9(e){var r=e._init;return r(e._payload)}
vendor: 4,519 bytes, line 38
38function cse(e){function r(x,b){if(e){var v=x.deletions;v===null?(x.deletions=[b],x.flags|=16):v.push(b)}}function n(x,b){if(!e)return null;for(;b!==null;)r(x,b),b=b.sibling;return null}function i(x,b){for(x=new Map;b!==null;)b.key!==null?x.set(b.key,b):x.set(b.index,b),b=b.sibling;return x}function a(x,b){return x=qm(x,b),x.index=0,x.sibling=null,x}function o(x,b,v){return x.index=v,e?(v=x.alternate,v!==null?(v=v.index,v<b?(x.flags|=2,b):v):(x.flags|=2,b)):(x.flags|=1048576,b)}function l(x){return e&&x.alternate===null&&(x.flags|=2),x}function c(x,b,v,j){return b===null||b.tag!==6?(b=$P(v,x.mode,j),b.return=x,b):(b=a(b,v),b.return=x,b)}function u(x,b,v,j){var _=v.type;return _===hy?h(x,b,v.props.children,j,v.key):b!==null&&(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===rm&&$9(_)===b.type)?(j=a(b,v.props),j.ref=a1(x,b,v),j.return=x,j):(j=ZS(v.type,v.key,v.props,null,x.mode,j),j.ref=a1(x,b,v),j.return=x,j)}function d(x,b,v,j){return b===null||b.tag!==4||b.stateNode.containerInfo!==v.containerInfo||b.stateNode.implementation!==v.implementation?(b=QP(v,x.mode,j),b.return=x,b):(b=a(b,v.children||[]),b.return=x,b)}function h(x,b,v,j,_){return b===null||b.tag!==7?(b=YA(v,x.mode,j,_),b.return=x,b):(b=a(b,v),b.return=x,b)}function f(x,b,v){if(typeof b=="string"&&b!==""||typeof b=="number")return b=$P(""+b,x.mode,v),b.return=x,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case QC:return v=ZS(b.type,b.key,b.props,null,x.mode,v),v.ref=a1(x,null,b),v.return=x,v;case dy:return b=QP(b,x.mode,v),b.return=x,b;case rm:var j=b._init;return f(x,j(b._payload),v)}if(Z1(b)||e1(b))return b=YA(b,x.mode,v,null),b.return=x,b;eN(x,b)}return null}function p(x,b,v,j){var _=b!==null?b.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return _!==null?null:c(x,b,""+v,j);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case QC:return v.key===_?u(x,b,v,j):null;case dy:return v.key===_?d(x,b,v,j):null;case rm:return _=v._init,p(x,b,_(v._payload),j)}if(Z1(v)||e1(v))return _!==null?null:h(x,b,v,j,null);eN(x,v)}return null}function m(x,b,v,j,_){if(typeof j=="string"&&j!==""||typeof j=="number")return x=x.get(v)||null,c(b,x,""+j,_);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case QC:return x=x.get(j.key===null?v:j.key)||null,u(b,x,j,_);case dy:return x=x.get(j.key===null?v:j.key)||null,d(b,x,j,_);case rm:var C=j._init;return m(x,b,v,C(j._payload),_)}if(Z1(j)||e1(j))return x=x.get(v)||null,h(b,x,j,_,null);eN(b,j)}return null}function A(x,b,v,j){for(var _=null,C=null,N=b,S=b=0,E=null;N!==null&&S<v.length;S++){N.index>S?(E=N,N=null):E=N.sibling;var O=p(x,N,v[S],j);if(O===null){N===null&&(N=E);break}e&&N&&O.alternate===null&&r(x,N),b=o(O,b,S),C===null?_=O:C.sibling=O,C=O,N=E}if(S===v.length)return n(x,N),Pi&&lA(x,S),_;if(N===null){for(;S<v.length;S++)N=f(x,v[S],j),N!==null&&(b=o(N,b,S),C===null?_=N:C.sibling=N,C=N);return Pi&&lA(x,S),_}for(N=i(x,N);S<v.length;S++)E=m(N,x,S,v[S],j),E!==null&&(e&&E.alternate!==null&&N.delete(E.key===null?S:E.key),b=o(E,b,S),C===null?_=E:C.sibling=E,C=E);return e&&N.forEach(function(B){return r(x,B)}),Pi&&lA(x,S),_}function g(x,b,v,j){var _=e1(v);if(typeof _!="function")throw Error(mt(150));if(v=_.call(v),v==null)throw Error(mt(151));for(var C=_=null,N=b,S=b=0,E=null,O=v.next();N!==null&&!O.done;S++,O=v.next()){N.index>S?(E=N,N=null):E=N.sibling;var B=p(x,N,O.value,j);if(B===null){N===null&&(N=E);break}e&&N&&B.alternate===null&&r(x,N),b=o(B,b,S),C===null?_=B:C.sibling=B,C=B,N=E}if(O.done)return n(x,N),Pi&&lA(x,S),_;if(N===null){for(;!O.done;S++,O=v.next())O=f(x,O.value,j),O!==null&&(b=o(O,b,S),C===null?_=O:C.sibling=O,C=O);return Pi&&lA(x,S),_}for(N=i(x,N);!O.done;S++,O=v.next())O=m(N,x,S,O.value,j),O!==null&&(e&&O.alternate!==null&&N.delete(O.key===null?S:O.key),b=o(O,b,S),C===null?_=O:C.sibling=O,C=O);return e&&N.forEach(function(T){return r(x,T)}),Pi&&lA(x,S),_}function y(x,b,v,j){if(typeof v=="object"&&v!==null&&v.type===hy&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case QC:e:{for(var _=v.key,C=b;C!==null;){if(C.key===_){if(_=v.type,_===hy){if(C.tag===7){n(x,C.sibling),b=a(C,v.props.children),b.return=x,x=b;break e}}else if(C.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===rm&&$9(_)===C.type){n(x,C.sibling),b=a(C,v.props),b.ref=a1(x,C,v),b.return=x,x=b;break e}n(x,C);break}else r(x,C);C=C.sibling}v.type===hy?(b=YA(v.props.children,x.mode,j,v.key),b.return=x,x=b):(j=ZS(v.type,v.key,v.props,null,x.mode,j),j.ref=a1(x,b,v),j.return=x,x=j)}return l(x);
vendor: 6,058 bytes, line 38
38case dy:e:{for(C=v.key;b!==null;){if(b.key===C)if(b.tag===4&&b.stateNode.containerInfo===v.containerInfo&&b.stateNode.implementation===v.implementation){n(x,b.sibling),b=a(b,v.children||[]),b.return=x,x=b;break e}else{n(x,b);break}else r(x,b);b=b.sibling}b=QP(v,x.mode,j),b.return=x,x=b}return l(x);case rm:return C=v._init,y(x,b,C(v._payload),j)}if(Z1(v))return A(x,b,v,j);if(e1(v))return g(x,b,v,j);eN(x,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,b!==null&&b.tag===6?(n(x,b.sibling),b=a(b,v),b.return=x,x=b):(n(x,b),b=$P(v,x.mode,j),b.return=x,x=b),l(x)):n(x,b)}return y}var Fv=cse(!0),use=cse(!1),Jk=vp(null),Zk=null,vy=null,iU=null;function aU(){iU=vy=Zk=null}function sU(e){var r=Jk.current;Si(Jk),e._currentValue=r}function CL(e,r,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,i!==null&&(i.childLanes|=r)):i!==null&&(i.childLanes&r)!==r&&(i.childLanes|=r),e===n)break;e=e.return}}function Qy(e,r){Zk=e,iU=vy=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&r&&(Xo=!0),e.firstContext=null)}function Lc(e){var r=e._currentValue;if(iU!==e)if(e={context:e,memoizedValue:r,next:null},vy===null){if(Zk===null)throw Error(mt(308));vy=e,Zk.dependencies={lanes:0,firstContext:e}}else vy=vy.next=e;return r}var _A=null;function oU(e){_A===null?_A=[e]:_A.push(e)}function dse(e,r,n,i){var a=r.interleaved;return a===null?(n.next=n,oU(r)):(n.next=a.next,a.next=n),r.interleaved=n,Wh(e,i)}function Wh(e,r){e.lanes|=r;var n=e.alternate;for(n!==null&&(n.lanes|=r),n=e,e=e.return;e!==null;)e.childLanes|=r,n=e.alternate,n!==null&&(n.childLanes|=r),n=e,e=e.return;return n.tag===3?n.stateNode:null}var nm=!1;function lU(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hse(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Fh(e,r){return{eventTime:e,lane:r,tag:0,payload:null,callback:null,next:null}}function Hm(e,r,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,xn&2){var a=i.pending;return a===null?r.next=r:(r.next=a.next,a.next=r),i.pending=r,Wh(e,n)}return a=i.interleaved,a===null?(r.next=r,oU(i)):(r.next=a.next,a.next=r),i.interleaved=r,Wh(e,n)}function qS(e,r,n){if(r=r.updateQueue,r!==null&&(r=r.shared,(n&4194240)!==0)){var i=r.lanes;i&=e.pendingLanes,n|=i,r.lanes=n,q6(e,n)}}function Q9(e,r){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var a=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?a=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?a=o=r:o=o.next=r}else a=o=r;n={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:i.shared,effects:i.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=r:e.next=r,n.lastBaseUpdate=r}function eE(e,r,n,i){var a=e.updateQueue;nm=!1;var o=a.firstBaseUpdate,l=a.lastBaseUpdate,c=a.shared.pending;if(c!==null){a.shared.pending=null;var u=c,d=u.next;u.next=null,l===null?o=d:l.next=d,l=u;var h=e.alternate;h!==null&&(h=h.updateQueue,c=h.lastBaseUpdate,c!==l&&(c===null?h.firstBaseUpdate=d:c.next=d,h.lastBaseUpdate=u))}if(o!==null){var f=a.baseState;l=0,h=d=u=null,c=o;do{var p=c.lane,m=c.eventTime;if((i&p)===p){h!==null&&(h=h.next={eventTime:m,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var A=e,g=c;switch(p=r,m=n,g.tag){case 1:if(A=g.payload,typeof A=="function"){f=A.call(m,f,p);break e}f=A;break e;case 3:A.flags=A.flags&-65537|128;case 0:if(A=g.payload,p=typeof A=="function"?A.call(m,f,p):A,p==null)break e;f=Ki({},f,p);break e;case 2:nm=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[c]:p.push(c))}else m={eventTime:m,lane:p,tag:c.tag,payload:c.payload,callback:c.callback,next:null},h===null?(d=h=m,u=f):h=h.next=m,l|=p;if(c=c.next,c===null){if(c=a.shared.pending,c===null)break;p=c,c=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(h===null&&(u=f),a.baseState=u,a.firstBaseUpdate=d,a.lastBaseUpdate=h,r=a.shared.interleaved,r!==null){a=r;do l|=a.lane,a=a.next;while(a!==r)}else o===null&&(a.shared.lanes=0);dg|=l,e.lanes=l,e.memoizedState=f}}function H9(e,r,n){if(e=r.effects,r.effects=null,e!==null)for(r=0;r<e.length;r++){var i=e[r],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!="function")throw Error(mt(191,a));a.call(i)}}}var m_={},Nd=vp(m_),w2=vp(m_),j2=vp(m_);function CA(e){if(e===m_)throw Error(mt(174));return e}function cU(e,r){switch(hi(j2,r),hi(w2,e),hi(Nd,m_),e=r.nodeType,e){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:aL(null,"");break;default:e=e===8?r.parentNode:r,r=e.namespaceURI||null,e=e.tagName,r=aL(r,e)}Si(Nd),hi(Nd,r)}function Ov(){Si(Nd),Si(w2),Si(j2)}function fse(e){CA(j2.current);var r=CA(Nd.current),n=aL(r,e.type);r!==n&&(hi(w2,e),hi(Nd,n))}function uU(e){w2.current===e&&(Si(Nd),Si(w2))}var $i=vp(0);function tE(e){for(var r=e;r!==null;){if(r.tag===13){var n=r.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if(r.flags&128)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var LP=[];function dU(){for(var e=0;e<LP.length;e++)LP[e]._workInProgressVersionPrimary=null;LP.length=0}var KS=hf.ReactCurrentDispatcher,RP=hf.ReactCurrentBatchConfig,ug=0,Vi=null,qa=null,ls=null,rE=!1,kw=!1,_2=0,RCe=0;function Qs(){throw Error(mt(321))}function hU(e,r){if(r===null)return!1;for(var n=0;n<r.length&&n<e.length;n++)if(!ku(e[n],r[n]))return!1;return!0}function fU(e,r,n,i,a,o){if(ug=o,Vi=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,KS.current=e===null||e.memoizedState===null?UCe:$Ce,e=n(i,a),kw){o=0;
vendor: 5,171 bytes, line 38
38do{if(kw=!1,_2=0,25<=o)throw Error(mt(301));o+=1,ls=qa=null,r.updateQueue=null,KS.current=QCe,e=n(i,a)}while(kw)}if(KS.current=nE,r=qa!==null&&qa.next!==null,ug=0,ls=qa=Vi=null,rE=!1,r)throw Error(mt(300));return e}function mU(){var e=_2!==0;return _2=0,e}function td(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ls===null?Vi.memoizedState=ls=e:ls=ls.next=e,ls}function Rc(){if(qa===null){var e=Vi.alternate;e=e!==null?e.memoizedState:null}else e=qa.next;var r=ls===null?Vi.memoizedState:ls.next;if(r!==null)ls=r,qa=e;else{if(e===null)throw Error(mt(310));qa=e,e={memoizedState:qa.memoizedState,baseState:qa.baseState,baseQueue:qa.baseQueue,queue:qa.queue,next:null},ls===null?Vi.memoizedState=ls=e:ls=ls.next=e}return ls}function C2(e,r){return typeof r=="function"?r(e):r}function DP(e){var r=Rc(),n=r.queue;if(n===null)throw Error(mt(311));n.lastRenderedReducer=e;var i=qa,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var l=a.next;a.next=o.next,o.next=l}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=l=null,u=null,d=o;do{var h=d.lane;if((ug&h)===h)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),i=d.hasEagerState?d.eagerState:e(i,d.action);else{var f={lane:h,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(c=u=f,l=i):u=u.next=f,Vi.lanes|=h,dg|=h}d=d.next}while(d!==null&&d!==o);u===null?l=i:u.next=c,ku(i,r.memoizedState)||(Xo=!0),r.memoizedState=i,r.baseState=l,r.baseQueue=u,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,Vi.lanes|=o,dg|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[r.memoizedState,n.dispatch]}function MP(e){var r=Rc(),n=r.queue;if(n===null)throw Error(mt(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=r.memoizedState;if(a!==null){n.pending=null;var l=a=a.next;do o=e(o,l.action),l=l.next;while(l!==a);ku(o,r.memoizedState)||(Xo=!0),r.memoizedState=o,r.baseQueue===null&&(r.baseState=o),n.lastRenderedState=o}return[o,i]}function mse(){}function pse(e,r){var n=Vi,i=Rc(),a=r(),o=!ku(i.memoizedState,a);if(o&&(i.memoizedState=a,Xo=!0),i=i.queue,pU(xse.bind(null,n,i,e),[e]),i.getSnapshot!==r||o||ls!==null&&ls.memoizedState.tag&1){if(n.flags|=2048,N2(9,gse.bind(null,n,i,a,r),void 0,null),ds===null)throw Error(mt(349));ug&30||Ase(n,r,a)}return a}function Ase(e,r,n){e.flags|=16384,e={getSnapshot:r,value:n},r=Vi.updateQueue,r===null?(r={lastEffect:null,stores:null},Vi.updateQueue=r,r.stores=[e]):(n=r.stores,n===null?r.stores=[e]:n.push(e))}function gse(e,r,n,i){r.value=n,r.getSnapshot=i,yse(r)&&vse(e)}function xse(e,r,n){return n(function(){yse(r)&&vse(e)})}function yse(e){var r=e.getSnapshot;e=e.value;try{var n=r();return!ku(e,n)}catch{return!0}}function vse(e){var r=Wh(e,1);r!==null&&Cu(r,e,1,-1)}function V9(e){var r=td();return typeof e=="function"&&(e=e()),r.memoizedState=r.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:C2,lastRenderedState:e},r.queue=e,e=e.dispatch=zCe.bind(null,Vi,e),[r.memoizedState,e]}function N2(e,r,n,i){return e={tag:e,create:r,destroy:n,deps:i,next:null},r=Vi.updateQueue,r===null?(r={lastEffect:null,stores:null},Vi.updateQueue=r,r.lastEffect=e.next=e):(n=r.lastEffect,n===null?r.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,r.lastEffect=e)),e}function bse(){return Rc().memoizedState}function GS(e,r,n,i){var a=td();Vi.flags|=e,a.memoizedState=N2(1|r,n,void 0,i===void 0?null:i)}function HB(e,r,n,i){var a=Rc();i=i===void 0?null:i;var o=void 0;if(qa!==null){var l=qa.memoizedState;if(o=l.destroy,i!==null&&hU(i,l.deps)){a.memoizedState=N2(r,n,o,i);return}}Vi.flags|=e,a.memoizedState=N2(1|r,n,o,i)}function W9(e,r){return GS(8390656,8,e,r)}function pU(e,r){return HB(2048,8,e,r)}function wse(e,r){return HB(4,2,e,r)}function jse(e,r){return HB(4,4,e,r)}function _se(e,r){if(typeof r=="function")return e=e(),r(e),function(){r(null)};if(r!=null)return e=e(),r.current=e,function(){r.current=null}}function Cse(e,r,n){return n=n!=null?n.concat([e]):null,HB(4,4,_se.bind(null,r,e),n)}function AU(){}function Nse(e,r){var n=Rc();r=r===void 0?null:r;var i=n.memoizedState;return i!==null&&r!==null&&hU(r,i[1])?i[0]:(n.memoizedState=[e,r],e)}function Sse(e,r){var n=Rc();r=r===void 0?null:r;var i=n.memoizedState;return i!==null&&r!==null&&hU(r,i[1])?i[0]:(e=e(),n.memoizedState=[e,r],e)}function kse(e,r,n){return ug&21?(ku(n,r)||(n=Iae(),Vi.lanes|=n,dg|=n,e.baseState=!0),r):(e.baseState&&(e.baseState=!1,Xo=!0),e.memoizedState=n)}function DCe(e,r){var n=Vn;Vn=n!==0&&4>n?n:4,e(!0);var i=RP.transition;RP.transition={};try{e(!1),r()}finally{Vn=n,RP.transition=i}}function Ese(){return Rc().memoizedState}function MCe(e,r,n){var i=Wm(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Bse(e))Tse(r,n);else if(n=dse(e,r,n,i),n!==null){var a=ko();Cu(n,e,i,a),Pse(n,r,i)}}function zCe(e,r,n){var i=Wm(e),a={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bse(e))Tse(r,a);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=r.lastRenderedReducer,o!==null))try{var l=r.lastRenderedState,c=o(l,n
vendor: 8,944 bytes, lines 38-40
38);if(a.hasEagerState=!0,a.eagerState=c,ku(c,l)){var u=r.interleaved;u===null?(a.next=a,oU(r)):(a.next=u.next,u.next=a),r.interleaved=a;return}}catch{}finally{}n=dse(e,r,a,i),n!==null&&(a=ko(),Cu(n,e,i,a),Pse(n,r,i))}}function Bse(e){var r=e.alternate;return e===Vi||r!==null&&r===Vi}function Tse(e,r){kw=rE=!0;var n=e.pending;n===null?r.next=r:(r.next=n.next,n.next=r),e.pending=r}function Pse(e,r,n){if(n&4194240){var i=r.lanes;i&=e.pendingLanes,n|=i,r.lanes=n,q6(e,n)}}var nE={readContext:Lc,useCallback:Qs,useContext:Qs,useEffect:Qs,useImperativeHandle:Qs,useInsertionEffect:Qs,useLayoutEffect:Qs,useMemo:Qs,useReducer:Qs,useRef:Qs,useState:Qs,useDebugValue:Qs,useDeferredValue:Qs,useTransition:Qs,useMutableSource:Qs,useSyncExternalStore:Qs,useId:Qs,unstable_isNewReconciler:!1},UCe={readContext:Lc,useCallback:function(e,r){return td().memoizedState=[e,r===void 0?null:r],e},useContext:Lc,useEffect:W9,useImperativeHandle:function(e,r,n){return n=n!=null?n.concat([e]):null,GS(4194308,4,_se.bind(null,r,e),n)},useLayoutEffect:function(e,r){return GS(4194308,4,e,r)},useInsertionEffect:function(e,r){return GS(4,2,e,r)},useMemo:function(e,r){var n=td();return r=r===void 0?null:r,e=e(),n.memoizedState=[e,r],e},useReducer:function(e,r,n){var i=td();return r=n!==void 0?n(r):r,i.memoizedState=i.baseState=r,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=MCe.bind(null,Vi,e),[i.memoizedState,e]},useRef:function(e){var r=td();return e={current:e},r.memoizedState=e},useState:V9,useDebugValue:AU,useDeferredValue:function(e){return td().memoizedState=e},useTransition:function(){var e=V9(!1),r=e[0];return e=DCe.bind(null,e[1]),td().memoizedState=e,[r,e]},useMutableSource:function(){},useSyncExternalStore:function(e,r,n){var i=Vi,a=td();if(Pi){if(n===void 0)throw Error(mt(407));n=n()}else{if(n=r(),ds===null)throw Error(mt(349));ug&30||Ase(i,r,n)}a.memoizedState=n;var o={value:n,getSnapshot:r};return a.queue=o,W9(xse.bind(null,i,o,e),[e]),i.flags|=2048,N2(9,gse.bind(null,i,o,n,r),void 0,null),n},useId:function(){var e=td(),r=ds.identifierPrefix;if(Pi){var n=kh,i=Sh;n=(i&~(1<<32-_u(i)-1)).toString(32)+n,r=":"+r+"R"+n,n=_2++,0<n&&(r+="H"+n.toString(32)),r+=":"}else n=RCe++,r=":"+r+"r"+n.toString(32)+":";return e.memoizedState=r},unstable_isNewReconciler:!1},$Ce={readContext:Lc,useCallback:Nse,useContext:Lc,useEffect:pU,useImperativeHandle:Cse,useInsertionEffect:wse,useLayoutEffect:jse,useMemo:Sse,useReducer:DP,useRef:bse,useState:function(){return DP(C2)},useDebugValue:AU,useDeferredValue:function(e){var r=Rc();return kse(r,qa.memoizedState,e)},useTransition:function(){var e=DP(C2)[0],r=Rc().memoizedState;return[e,r]},useMutableSource:mse,useSyncExternalStore:pse,useId:Ese,unstable_isNewReconciler:!1},QCe={readContext:Lc,useCallback:Nse,useContext:Lc,useEffect:pU,useImperativeHandle:Cse,useInsertionEffect:wse,useLayoutEffect:jse,useMemo:Sse,useReducer:MP,useRef:bse,useState:function(){return MP(C2)},useDebugValue:AU,useDeferredValue:function(e){var r=Rc();return qa===null?r.memoizedState=e:kse(r,qa.memoizedState,e)},useTransition:function(){var e=MP(C2)[0],r=Rc().memoizedState;return[e,r]},useMutableSource:mse,useSyncExternalStore:pse,useId:Ese,unstable_isNewReconciler:!1};function lu(e,r){if(e&&e.defaultProps){r=Ki({},r),e=e.defaultProps;for(var n in e)r[n]===void 0&&(r[n]=e[n]);return r}return r}function NL(e,r,n,i){r=e.memoizedState,n=n(i,r),n=n==null?r:Ki({},r,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var VB={isMounted:function(e){return(e=e._reactInternals)?Dg(e)===e:!1},enqueueSetState:function(e,r,n){e=e._reactInternals;var i=ko(),a=Wm(e),o=Fh(i,a);o.payload=r,n!=null&&(o.callback=n),r=Hm(e,o,a),r!==null&&(Cu(r,e,a,i),qS(r,e,a))},enqueueReplaceState:function(e,r,n){e=e._reactInternals;var i=ko(),a=Wm(e),o=Fh(i,a);o.tag=1,o.payload=r,n!=null&&(o.callback=n),r=Hm(e,o,a),r!==null&&(Cu(r,e,a,i),qS(r,e,a))},enqueueForceUpdate:function(e,r){e=e._reactInternals;var n=ko(),i=Wm(e),a=Fh(n,i);a.tag=2,r!=null&&(a.callback=r),r=Hm(e,a,i),r!==null&&(Cu(r,e,i,n),qS(r,e,i))}};function q9(e,r,n,i,a,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,o,l):r.prototype&&r.prototype.isPureReactComponent?!x2(n,i)||!x2(a,o):!0}function Ise(e,r,n){var i=!1,a=sp,o=r.contextType;return typeof o=="object"&&o!==null?o=Lc(o):(a=el(r)?lg:so.current,i=r.contextTypes,o=(i=i!=null)?Pv(e,a):sp),r=new r(n,o),e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=VB,e.stateNode=r,r._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),r}function K9(e,r,n,i){e=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(n,i),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(n,i),r.state!==e&&VB.enqueueReplaceState(r,r.state,null)}function SL(e,r,n,i){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},lU(e);var o=r.contextType;typeof o=="object"&&o!==null?a.context=Lc(o):(o=el(r)?lg:so.current,a.context=Pv(e,o)),a.state=e.memoizedState,o=r.getDerivedStateFromProps,typeof o=="function"&&(NL(e,r,o,n),a.state=e.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(r=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),r!==a.state&&VB.enqueueReplaceState(a,a.state,null),eE(e,n,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Lv(e,r){try{var n="",i=r;do n+=g_e(i),i=i.return;while(i);var a=n}catch(o){a=`
39Error generating stack: `+o.message+`
40`+o.stack}return{value:e,source:r,stack:a,digest:null}}function zP(e,r,n){return{value:e,source:null,stack:n??null,digest:r??null}}function kL(e,r){try{console.error(r.value)}catch(n){setTimeout(function(){throw n})}}var HCe=typeof WeakMap=="function"?WeakMap:Map;function Fse(e,r,n){n=Fh(-1,n),n.tag=3,n.payload={element:null};var i=r.value;return n.callback=function(){aE||(aE=!0,DL=i),kL(e,r)},n}function Ose(e,r,n){n=Fh(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var a=r.value;n.payload=function(){return i(a)},n.callback=function(){kL(e,r)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){kL(e,r),typeof i!="function"&&(Vm===null?Vm=new Set([this]):Vm.add(this));var l=r.stack;this.componentDidCatch(r.value,{componentStack:l!==null?l:""})}),n}function G9(e,r,n){var i=e.pingCache;if(i===null){i=e.pingCache=new HCe;var a=new Set;i.set(r,a)}else a=i.get(r),a===void 0&&(a=new Set,i.set(r,a));a.has(n)||(a.add(n),e=iNe.bind(null,e,r,n),r.then(e,e))}function X9(e){do{var r;if((r=e.tag===13)&&(r=e.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return e;e=e.return}while(e!==null);return null}function Y9(e,r,n,i,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===r?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(r=Fh(-1,1),r.tag=2,Hm(n,r,1))),n.lanes|=1),e)}var VCe=hf.ReactCurrentOwner,Xo=!1;function yo(e,r,n,i){r.child=e===null?use(r,null,n,i):Fv(r,e.child,n,i)}function J9(e,r,n,i,a){n=n.render;var o=r.ref;return Qy(r,a),i=fU(e,r,n,i,o,a),n=mU(),e!==null&&!Xo?(r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~a,qh(e,r,a)):(Pi&&n&&tU(r),r.flags|=1,yo(e,r,i,a),r.child)}function Z9(e,r,n,i,a){if(e===null){var o=n.type;return typeof o=="function"&&!_U(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(r.tag=15,r.type=o,Lse(e,r,o,i,a)):(e=ZS(n.type,null,i,r,r.mode,a),e.ref=r.ref,e.return=r,r.child=e)}if(o=e.child,!(e.lanes&a)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:x2,n(l,i)&&e.ref===r.ref)return qh(e,r,a)}return r.flags|=1,e=qm(o,i),e.ref=r.ref,e.return=r,r.child=e}function Lse(e,r,n,i,a){if(e!==null){var o=e.memoizedProps;if(x2(o,i)&&e.ref===r.ref)if(Xo=!1,r.pendingProps=i=o,(e.lanes&a)!==0)e.flags&131072&&(Xo=!0);else return r.lanes=e.lanes,qh(e,r,a)}return EL(e,r,n,i,a)}function Rse(e,r,n){var i=r.pendingProps,a=i.children,o=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(r.mode&1))r.memoizedState={baseLanes:0,cachePool:null,transitions:null},hi(wy,Tl),Tl|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:e,cachePool:null,transitions:null},r.updateQueue=null,hi(wy,Tl),Tl|=e,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=o!==null?o.baseLanes:n,hi(wy,Tl),Tl|=i}else o!==null?(i=o.baseLanes|n,r.memoizedState=null):i=n,hi(wy,Tl),Tl|=i;return yo(e,r,a,n),r.child}function Dse(e,r){var n=r.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(r.flags|=512,r.flags|=2097152)}
vendor: 4,730 bytes, line 40
40function EL(e,r,n,i,a){var o=el(n)?lg:so.current;return o=Pv(r,o),Qy(r,a),n=fU(e,r,n,i,o,a),i=mU(),e!==null&&!Xo?(r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~a,qh(e,r,a)):(Pi&&i&&tU(r),r.flags|=1,yo(e,r,n,a),r.child)}function eV(e,r,n,i,a){if(el(n)){var o=!0;Gk(r)}else o=!1;if(Qy(r,a),r.stateNode===null)XS(e,r),Ise(r,n,i),SL(r,n,i,a),i=!0;else if(e===null){var l=r.stateNode,c=r.memoizedProps;l.props=c;var u=l.context,d=n.contextType;typeof d=="object"&&d!==null?d=Lc(d):(d=el(n)?lg:so.current,d=Pv(r,d));var h=n.getDerivedStateFromProps,f=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function";f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(c!==i||u!==d)&&K9(r,l,i,d),nm=!1;var p=r.memoizedState;l.state=p,eE(r,i,l,a),u=r.memoizedState,c!==i||p!==u||Zo.current||nm?(typeof h=="function"&&(NL(r,n,h,i),u=r.memoizedState),(c=nm||q9(r,n,c,i,p,u,d))?(f||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(r.flags|=4194308)):(typeof l.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=i,r.memoizedState=u),l.props=i,l.state=u,l.context=d,i=c):(typeof l.componentDidMount=="function"&&(r.flags|=4194308),i=!1)}else{l=r.stateNode,hse(e,r),c=r.memoizedProps,d=r.type===r.elementType?c:lu(r.type,c),l.props=d,f=r.pendingProps,p=l.context,u=n.contextType,typeof u=="object"&&u!==null?u=Lc(u):(u=el(n)?lg:so.current,u=Pv(r,u));var m=n.getDerivedStateFromProps;(h=typeof m=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(c!==f||p!==u)&&K9(r,l,i,u),nm=!1,p=r.memoizedState,l.state=p,eE(r,i,l,a);var A=r.memoizedState;c!==f||p!==A||Zo.current||nm?(typeof m=="function"&&(NL(r,n,m,i),A=r.memoizedState),(d=nm||q9(r,n,d,i,p,A,u)||!1)?(h||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(i,A,u),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(i,A,u)),typeof l.componentDidUpdate=="function"&&(r.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof l.componentDidUpdate!="function"||c===e.memoizedProps&&p===e.memoizedState||(r.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&p===e.memoizedState||(r.flags|=1024),r.memoizedProps=i,r.memoizedState=A),l.props=i,l.state=A,l.context=u,i=d):(typeof l.componentDidUpdate!="function"||c===e.memoizedProps&&p===e.memoizedState||(r.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&p===e.memoizedState||(r.flags|=1024),i=!1)}return BL(e,r,n,i,o,a)}function BL(e,r,n,i,a,o){Dse(e,r);var l=(r.flags&128)!==0;if(!i&&!l)return a&&M9(r,n,!1),qh(e,r,o);i=r.stateNode,VCe.current=r;var c=l&&typeof n.getDerivedStateFromError!="function"?null:i.render();return r.flags|=1,e!==null&&l?(r.child=Fv(r,e.child,null,o),r.child=Fv(r,null,c,o)):yo(e,r,c,o),r.memoizedState=i.state,a&&M9(r,n,!0),r.child}function Mse(e){var r=e.stateNode;r.pendingContext?D9(e,r.pendingContext,r.pendingContext!==r.context):r.context&&D9(e,r.context,!1),cU(e,r.containerInfo)}function tV(e,r,n,i,a){return Iv(),nU(a),r.flags|=256,yo(e,r,n,i),r.child}var TL={dehydrated:null,treeContext:null,retryLane:0};function PL(e){return{baseLanes:e,cachePool:null,transitions:null}}function zse(e,r,n){var i=r.pendingProps,a=$i.current,o=!1,l=(r.flags&128)!==0,c;if((c=l)||(c=e!==null&&e.memoizedState===null?!1:(a&2)!==0),c?(o=!0,r.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),hi($i,a&1),e===null)return _L(r),e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(r.mode&1?e.data==="$!"?r.lanes=8:r.lanes=1073741824:r.lanes=1,null):(l=i.children,e=i.fallback,o?(i=r.mode,o=r.child,l={mode:"hidden",children:l},!(i&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=KB(l,i,0,null),e=YA(e,i,n,null),o.return=r,e.return=r,o.sibling=e,r.child=o,r.child.memoizedState=PL(n),r.memoizedState=TL,e):gU(r,l));if(a=e.memoizedState,a!==null&&(c=a.dehydrated,c!==null))return WCe(e,r,l,i,c,a,n);if(o){o=i.fallback,l=r.mode,a=e.child,c=a.sibling;var u={mode:"hidden",children:i.children};return!(l&1)&&r.child!==a?(i=r.child,i.childLanes=0,i.pendingProps=u,r.deletions=null):(i=qm(a,u),i.subtreeFlags=a.subtreeFlags&14680064),c!==null?o=qm(c,o):(o=YA(o,l,n,null),o.flags|=2),o.return=r,i.return=r,i.sibling=o,r.child=i,i=o,o=r.child,l=e.child.memoizedState,l=l===null?PL(n):{baseLanes:l.base
vendor: 5,691 bytes, line 40
40Lanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,r.memoizedState=TL,i}return o=e.child,e=o.sibling,i=qm(o,{mode:"visible",children:i.children}),!(r.mode&1)&&(i.lanes=n),i.return=r,i.sibling=null,e!==null&&(n=r.deletions,n===null?(r.deletions=[e],r.flags|=16):n.push(e)),r.child=i,r.memoizedState=null,i}function gU(e,r){return r=KB({mode:"visible",children:r},e.mode,0,null),r.return=e,e.child=r}function tN(e,r,n,i){return i!==null&&nU(i),Fv(r,e.child,null,n),e=gU(r,r.pendingProps.children),e.flags|=2,r.memoizedState=null,e}function WCe(e,r,n,i,a,o,l){if(n)return r.flags&256?(r.flags&=-257,i=zP(Error(mt(422))),tN(e,r,l,i)):r.memoizedState!==null?(r.child=e.child,r.flags|=128,null):(o=i.fallback,a=r.mode,i=KB({mode:"visible",children:i.children},a,0,null),o=YA(o,a,l,null),o.flags|=2,i.return=r,o.return=r,i.sibling=o,r.child=i,r.mode&1&&Fv(r,e.child,null,l),r.child.memoizedState=PL(l),r.memoizedState=TL,o);if(!(r.mode&1))return tN(e,r,l,null);if(a.data==="$!"){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(mt(419)),i=zP(o,i,void 0),tN(e,r,l,i)}if(c=(l&e.childLanes)!==0,Xo||c){if(i=ds,i!==null){switch(l&-l){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(i.suspendedLanes|l)?0:a,a!==0&&a!==o.retryLane&&(o.retryLane=a,Wh(e,a),Cu(i,e,a,-1))}return jU(),i=zP(Error(mt(421))),tN(e,r,l,i)}return a.data==="$?"?(r.flags|=128,r.child=e.child,r=aNe.bind(null,e),a._reactRetry=r,null):(e=o.treeContext,Ll=Qm(a.nextSibling),zl=r,Pi=!0,pu=null,e!==null&&(pc[Ac++]=Sh,pc[Ac++]=kh,pc[Ac++]=cg,Sh=e.id,kh=e.overflow,cg=r),r=gU(r,i.children),r.flags|=4096,r)}function rV(e,r,n){e.lanes|=r;var i=e.alternate;i!==null&&(i.lanes|=r),CL(e.return,r,n)}function UP(e,r,n,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:a}:(o.isBackwards=r,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=n,o.tailMode=a)}function Use(e,r,n){var i=r.pendingProps,a=i.revealOrder,o=i.tail;if(yo(e,r,i.children,n),i=$i.current,i&2)i=i&1|2,r.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=r.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rV(e,n,r);else if(e.tag===19)rV(e,n,r);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===r)break e;for(;e.sibling===null;){if(e.return===null||e.return===r)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(hi($i,i),!(r.mode&1))r.memoizedState=null;else switch(a){case"forwards":for(n=r.child,a=null;n!==null;)e=n.alternate,e!==null&&tE(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=r.child,r.child=null):(a=n.sibling,n.sibling=null),UP(r,!1,a,n,o);break;case"backwards":for(n=null,a=r.child,r.child=null;a!==null;){if(e=a.alternate,e!==null&&tE(e)===null){r.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}UP(r,!0,n,null,o);break;case"together":UP(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function XS(e,r){!(r.mode&1)&&e!==null&&(e.alternate=null,r.alternate=null,r.flags|=2)}function qh(e,r,n){if(e!==null&&(r.dependencies=e.dependencies),dg|=r.lanes,!(n&r.childLanes))return null;if(e!==null&&r.child!==e.child)throw Error(mt(153));if(r.child!==null){for(e=r.child,n=qm(e,e.pendingProps),r.child=n,n.return=r;e.sibling!==null;)e=e.sibling,n=n.sibling=qm(e,e.pendingProps),n.return=r;n.sibling=null}return r.child}function qCe(e,r,n){switch(r.tag){case 3:Mse(r),Iv();break;case 5:fse(r);break;case 1:el(r.type)&&Gk(r);break;case 4:cU(r,r.stateNode.containerInfo);break;case 10:var i=r.type._context,a=r.memoizedProps.value;hi(Jk,i._currentValue),i._currentValue=a;break;case 13:if(i=r.memoizedState,i!==null)return i.dehydrated!==null?(hi($i,$i.current&1),r.flags|=128,null):n&r.child.childLanes?zse(e,r,n):(hi($i,$i.current&1),e=qh(e,r,n),e!==null?e.sibling:null);hi($i,$i.current&1);break;case 19:if(i=(n&r.childLanes)!==0,e.flags&128){if(i)return Use(e,r,n);r.flags|=128}if(a=r.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),hi($i,$i.current),i)break;return null;case 22:case 23:return r.lanes=0,Rse(e,r,n)}return qh(e,r,n)}var $se,IL,Qse,Hse;$se=function(e,r){for(var n=r.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break;for(;n.sibling===null;){if(n.return===null||n.return===r)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};IL=function(){};Qse=function(e,r,n,i){var a=e.memoizedProps;if(a!==i){e=r.stateNode,CA(Nd.current);var o=null;switch(n){case"input":a=tL(e,a),i=tL(e,i),o=[];break;case"select":a=Ki({},a,{value:void 0}),i=Ki({},i,{value:void 0}),o=[];break;case"textarea":a=iL(e,a),i=iL(e,i),o=[];break;default:typeof a.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=qk)}sL(n,i);var l;n=null;for(d in a)if(!i.hasOwnProperty(d)&&a.hasOwnProperty(d)&&a[d]!=null)if(d==="style"){var c=a[d];for(l in c)c.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(d2.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in i){var u=i[d];if(c=a!=null?a[d]:void 0,i.hasOwnProperty(d)&&u!==c&&(u!=null||c!=null))if(d==="style")if(c){for(l in c)!c.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in u)u.hasOwnProperty(l)&&c[l]!==u[l]&&(n||(n={}),n[l]=u[l])}
vendor: 2,775 bytes, line 40
40else n||(o||(o=[]),o.push(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,c=c?c.__html:void 0,u!=null&&c!==u&&(o=o||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(d2.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&wi("scroll",e),o||c===u||(o=[])):(o=o||[]).push(d,u))}n&&(o=o||[]).push("style",n);var d=o;(r.updateQueue=d)&&(r.flags|=4)}};Hse=function(e,r,n,i){n!==i&&(r.flags|=4)};function s1(e,r){if(!Pi)switch(e.tailMode){case"hidden":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?r||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Hs(e){var r=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(r)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags&14680064,i|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=n,r}function KCe(e,r,n){var i=r.pendingProps;switch(rU(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hs(r),null;case 1:return el(r.type)&&Kk(),Hs(r),null;case 3:return i=r.stateNode,Ov(),Si(Zo),Si(so),dU(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(ZC(r)?r.flags|=4:e===null||e.memoizedState.isDehydrated&&!(r.flags&256)||(r.flags|=1024,pu!==null&&(UL(pu),pu=null))),IL(e,r),Hs(r),null;case 5:uU(r);var a=CA(j2.current);if(n=r.type,e!==null&&r.stateNode!=null)Qse(e,r,n,i,a),e.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!i){if(r.stateNode===null)throw Error(mt(166));return Hs(r),null}if(e=CA(Nd.current),ZC(r)){i=r.stateNode,n=r.type;var o=r.memoizedProps;switch(i[dd]=r,i[b2]=o,e=(r.mode&1)!==0,n){case"dialog":wi("cancel",i),wi("close",i);break;case"iframe":case"object":case"embed":wi("load",i);break;case"video":case"audio":for(a=0;a<tw.length;a++)wi(tw[a],i);break;case"source":wi("error",i);break;case"img":case"image":case"link":wi("error",i),wi("load",i);break;case"details":wi("toggle",i);break;case"input":d9(i,o),wi("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!o.multiple},wi("invalid",i);break;case"textarea":f9(i,o),wi("invalid",i)}sL(n,o),a=null;for(var l in o)if(o.hasOwnProperty(l)){var c=o[l];l==="children"?typeof c=="string"?i.textContent!==c&&(o.suppressHydrationWarning!==!0&&JC(i.textContent,c,e),a=["children",c]):typeof c=="number"&&i.textContent!==""+c&&(o.suppressHydrationWarning!==!0&&JC(i.textContent,c,e),a=["children",""+c
vendor: 30,415 bytes, line 40
40]):d2.hasOwnProperty(l)&&c!=null&&l==="onScroll"&&wi("scroll",i)}switch(n){case"input":HC(i),h9(i,o,!0);break;case"textarea":HC(i),m9(i);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(i.onclick=qk)}i=a,r.updateQueue=i,i!==null&&(r.flags|=4)}else{l=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=xae(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=l.createElement(n,{is:i.is}):(e=l.createElement(n),n==="select"&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,n),e[dd]=r,e[b2]=i,$se(e,r,!1,!1),r.stateNode=e;e:{switch(l=oL(n,i),n){case"dialog":wi("cancel",e),wi("close",e),a=i;break;case"iframe":case"object":case"embed":wi("load",e),a=i;break;case"video":case"audio":for(a=0;a<tw.length;a++)wi(tw[a],e);a=i;break;case"source":wi("error",e),a=i;break;case"img":case"image":case"link":wi("error",e),wi("load",e),a=i;break;case"details":wi("toggle",e),a=i;break;case"input":d9(e,i),a=tL(e,i),wi("invalid",e);break;case"option":a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=Ki({},i,{value:void 0}),wi("invalid",e);break;case"textarea":f9(e,i),a=iL(e,i),wi("invalid",e);break;default:a=i}sL(n,a),c=a;for(o in c)if(c.hasOwnProperty(o)){var u=c[o];o==="style"?bae(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&yae(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&h2(e,u):typeof u=="number"&&h2(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(d2.hasOwnProperty(o)?u!=null&&o==="onScroll"&&wi("scroll",e):u!=null&&U6(e,o,u,l))}switch(n){case"input":HC(e),h9(e,i,!1);break;case"textarea":HC(e),m9(e);break;case"option":i.value!=null&&e.setAttribute("value",""+ap(i.value));break;case"select":e.multiple=!!i.multiple,o=i.value,o!=null?My(e,!!i.multiple,o,!1):i.defaultValue!=null&&My(e,!!i.multiple,i.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=qk)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return Hs(r),null;case 6:if(e&&r.stateNode!=null)Hse(e,r,e.memoizedProps,i);else{if(typeof i!="string"&&r.stateNode===null)throw Error(mt(166));if(n=CA(j2.current),CA(Nd.current),ZC(r)){if(i=r.stateNode,n=r.memoizedProps,i[dd]=r,(o=i.nodeValue!==n)&&(e=zl,e!==null))switch(e.tag){case 3:JC(i.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&JC(i.nodeValue,n,(e.mode&1)!==0)}o&&(r.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[dd]=r,r.stateNode=i}return Hs(r),null;case 13:if(Si($i),i=r.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pi&&Ll!==null&&r.mode&1&&!(r.flags&128))lse(),Iv(),r.flags|=98560,o=!1;else if(o=ZC(r),i!==null&&i.dehydrated!==null){if(e===null){if(!o)throw Error(mt(318));if(o=r.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(mt(317));o[dd]=r}else Iv(),!(r.flags&128)&&(r.memoizedState=null),r.flags|=4;Hs(r),o=!1}else pu!==null&&(UL(pu),pu=null),o=!0;if(!o)return r.flags&65536?r:null}return r.flags&128?(r.lanes=n,r):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(r.child.flags|=8192,r.mode&1&&(e===null||$i.current&1?Xa===0&&(Xa=3):jU())),r.updateQueue!==null&&(r.flags|=4),Hs(r),null);case 4:return Ov(),IL(e,r),e===null&&y2(r.stateNode.containerInfo),Hs(r),null;case 10:return sU(r.type._context),Hs(r),null;case 17:return el(r.type)&&Kk(),Hs(r),null;case 19:if(Si($i),o=r.memoizedState,o===null)return Hs(r),null;if(i=(r.flags&128)!==0,l=o.rendering,l===null)if(i)s1(o,!1);else{if(Xa!==0||e!==null&&e.flags&128)for(e=r.child;e!==null;){if(l=tE(e),l!==null){for(r.flags|=128,s1(o,!1),i=l.updateQueue,i!==null&&(r.updateQueue=i,r.flags|=4),r.subtreeFlags=0,i=n,n=r.child;n!==null;)o=n,e=i,o.flags&=14680066,l=o.alternate,l===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return hi($i,$i.current&1|2),r.child}e=e.sibling}o.tail!==null&&fa()>Rv&&(r.flags|=128,i=!0,s1(o,!1),r.lanes=4194304)}else{if(!i)if(e=tE(l),e!==null){if(r.flags|=128,i=!0,n=e.updateQueue,n!==null&&(r.updateQueue=n,r.flags|=4),s1(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Pi)return Hs(r),null}else 2*fa()-o.renderingStartTime>Rv&&n!==1073741824&&(r.flags|=128,i=!0,s1(o,!1),r.lanes=4194304);o.isBackwards?(l.sibling=r.child,r.child=l):(n=o.last,n!==null?n.sibling=l:r.child=l,o.last=l)}return o.tail!==null?(r=o.tail,o.rendering=r,o.tail=r.sibling,o.renderingStartTime=fa(),r.sibling=null,n=$i.current,hi($i,i?n&1|2:n&1),r):(Hs(r),null);case 22:case 23:return wU(),i=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(r.flags|=8192),i&&r.mode&1?Tl&1073741824&&(Hs(r),r.subtreeFlags&6&&(r.flags|=8192)):Hs(r),null;case 24:return null;case 25:return null}throw Error(mt(156,r.tag))}function GCe(e,r){switch(rU(r),r.tag){case 1:return el(r.type)&&Kk(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return Ov(),Si(Zo),Si(so),dU(),e=r.flags,e&65536&&!(e&128)?(r.flags=e&-65537|128,r):null;case 5:return uU(r),null;case 13:if(Si($i),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(mt(340));Iv()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return Si($i),null;case 4:return Ov(),null;case 10:return sU(r.type._context),null;case 22:case 23:return wU(),null;case 24:return null;default:return null}}var rN=!1,eo=!1,XCe=typeof WeakSet=="function"?WeakSet:Set,It=null;function by(e,r){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){aa(e,r,i)}else n.current=null}function FL(e,r,n){try{n()}catch(i){aa(e,r,i)}}var nV=!1;function YCe(e,r){if(gL=Hk,e=Gae(),eU(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,c=-1,u=-1,d=0,h=0,f=e,p=null;t:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=l+a),f!==o||i!==0&&f.nodeType!==3||(u=l+i),f.nodeType===3&&(l+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break t;if(p===n&&++d===a&&(c=l),p===o&&++h===i&&(u=l),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||u===-1?null:{start:c,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(xL={focusedElem:e,selectionRange:n},Hk=!1,It=r;It!==null;)if(r=It,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,It=e;else for(;It!==null;){r=It;try{var A=r.alternate;if(r.flags&1024)switch(r.tag){case 0:case 11:case 15:break;case 1:if(A!==null){var g=A.memoizedProps,y=A.memoizedState,x=r.stateNode,b=x.getSnapshotBeforeUpdate(r.elementType===r.type?g:lu(r.type,g),y);x.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var v=r.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(mt(163))}}catch(j){aa(r,r.return,j)}if(e=r.sibling,e!==null){e.return=r.return,It=e;break}It=r.return}return A=nV,nV=!1,A}function Ew(e,r,n){var i=r.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,o!==void 0&&FL(r,n,o)}a=a.next}while(a!==i)}}function WB(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==r)}}function OL(e){var r=e.ref;if(r!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof r=="function"?r(e):r.current=e}}function Vse(e){var r=e.alternate;r!==null&&(e.alternate=null,Vse(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[dd],delete r[b2],delete r[bL],delete r[ICe],delete r[FCe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Wse(e){return e.tag===5||e.tag===3||e.tag===4}function iV(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wse(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function LL(e,r,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,r?n.nodeType===8?n.parentNode.insertBefore(e,r):n.insertBefore(e,r):(n.nodeType===8?(r=n.parentNode,r.insertBefore(e,n)):(r=n,r.appendChild(e)),n=n._reactRootContainer,n!=null||r.onclick!==null||(r.onclick=qk));else if(i!==4&&(e=e.child,e!==null))for(LL(e,r,n),e=e.sibling;e!==null;)LL(e,r,n),e=e.sibling}function RL(e,r,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,r?n.insertBefore(e,r):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(RL(e,r,n),e=e.sibling;e!==null;)RL(e,r,n),e=e.sibling}var Ns=null,hu=!1;function Lf(e,r,n){for(n=n.child;n!==null;)qse(e,r,n),n=n.sibling}function qse(e,r,n){if(Cd&&typeof Cd.onCommitFiberUnmount=="function")try{Cd.onCommitFiberUnmount(DB,n)}catch{}switch(n.tag){case 5:eo||by(n,r);case 6:var i=Ns,a=hu;Ns=null,Lf(e,r,n),Ns=i,hu=a,Ns!==null&&(hu?(e=Ns,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ns.removeChild(n.stateNode));break;case 18:Ns!==null&&(hu?(e=Ns,n=n.stateNode,e.nodeType===8?FP(e.parentNode,n):e.nodeType===1&&FP(e,n),A2(e)):FP(Ns,n.stateNode));break;case 4:i=Ns,a=hu,Ns=n.stateNode.containerInfo,hu=!0,Lf(e,r,n),Ns=i,hu=a;break;case 0:case 11:case 14:case 15:if(!eo&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var o=a,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&FL(n,r,l),a=a.next}while(a!==i)}Lf(e,r,n);break;case 1:if(!eo&&(by(n,r),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(c){aa(n,r,c)}Lf(e,r,n);break;case 21:Lf(e,r,n);break;case 22:n.mode&1?(eo=(i=eo)||n.memoizedState!==null,Lf(e,r,n),eo=i):Lf(e,r,n);break;default:Lf(e,r,n)}}function aV(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new XCe),r.forEach(function(i){var a=sNe.bind(null,e,i);n.has(i)||(n.add(i),i.then(a,a))})}}function Yc(e,r){var n=r.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,l=r,c=l;e:for(;c!==null;){switch(c.tag){case 5:Ns=c.stateNode,hu=!1;break e;case 3:Ns=c.stateNode.containerInfo,hu=!0;break e;case 4:Ns=c.stateNode.containerInfo,hu=!0;break e}c=c.return}if(Ns===null)throw Error(mt(160));qse(o,l,a),Ns=null,hu=!1;var u=a.alternate;u!==null&&(u.return=null),a.return=null}catch(d){aa(a,r,d)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)Kse(r,e),r=r.sibling}function Kse(e,r){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Yc(r,e),Xu(e),i&4){try{Ew(3,e,e.return),WB(3,e)}catch(g){aa(e,e.return,g)}try{Ew(5,e,e.return)}catch(g){aa(e,e.return,g)}}break;case 1:Yc(r,e),Xu(e),i&512&&n!==null&&by(n,n.return);break;case 5:if(Yc(r,e),Xu(e),i&512&&n!==null&&by(n,n.return),e.flags&32){var a=e.stateNode;try{h2(a,"")}catch(g){aa(e,e.return,g)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,l=n!==null?n.memoizedProps:o,c=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{c==="input"&&o.type==="radio"&&o.name!=null&&Aae(a,o),oL(c,l);var d=oL(c,o);for(l=0;l<u.length;l+=2){var h=u[l],f=u[l+1];h==="style"?bae(a,f):h==="dangerouslySetInnerHTML"?yae(a,f):h==="children"?h2(a,f):U6(a,h,f,d)}switch(c){case"input":rL(a,o);break;case"textarea":gae(a,o);break;case"select":var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?My(a,!!o.multiple,m,!1):p!==!!o.multiple&&(o.defaultValue!=null?My(a,!!o.multiple,o.defaultValue,!0):My(a,!!o.multiple,o.multiple?[]:"",!1))}a[b2]=o}catch(g){aa(e,e.return,g)}}break;case 6:if(Yc(r,e),Xu(e),i&4){if(e.stateNode===null)throw Error(mt(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(g){aa(e,e.return,g)}}break;case 3:if(Yc(r,e),Xu(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{A2(r.containerInfo)}catch(g){aa(e,e.return,g)}break;case 4:Yc(r,e),Xu(e);break;case 13:Yc(r,e),Xu(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(vU=fa())),i&4&&aV(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(eo=(d=eo)||h,Yc(r,e),eo=d):Yc(r,e),Xu(e),i&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!h&&e.mode&1)for(It=e,h=e.child;h!==null;){for(f=It=h;It!==null;){switch(p=It,m=p.child,p.tag){case 0:case 11:case 14:case 15:Ew(4,p,p.return);break;case 1:by(p,p.return);var A=p.stateNode;if(typeof A.componentWillUnmount=="function"){i=p,n=p.return;try{r=i,A.props=r.memoizedProps,A.state=r.memoizedState,A.componentWillUnmount()}catch(g){aa(i,n,g)}}break;case 5:by(p,p.return);break;case 22:if(p.memoizedState!==null){oV(f);continue}}m!==null?(m.return=p,It=m):oV(f)}h=h.sibling}e:for(h=null,f=e;;){if(f.tag===5){if(h===null){h=f;try{a=f.stateNode,d?(o=a.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(c=f.stateNode,u=f.memoizedProps.style,l=u!=null&&u.hasOwnProperty("display")?u.display:null,c.style.display=vae("display",l))}catch(g){aa(e,e.return,g)}}}else if(f.tag===6){if(h===null)try{f.stateNode.nodeValue=d?"":f.memoizedProps}catch(g){aa(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Yc(r,e),Xu(e),i&4&&aV(e);break;case 21:break;default:Yc(r,e),Xu(e)}}function Xu(e){var r=e.flags;if(r&2){try{e:{for(var n=e.return;n!==null;){if(Wse(n)){var i=n;break e}n=n.return}throw Error(mt(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(h2(a,""),i.flags&=-33);var o=iV(e);RL(e,o,a);break;case 3:case 4:var l=i.stateNode.containerInfo,c=iV(e);LL(e,c,l);break;default:throw Error(mt(161))}}catch(u){aa(e,e.return,u)}e.flags&=-3}r&4096&&(e.flags&=-4097)}function JCe(e,r,n){It=e,Gse(e)}function Gse(e,r,n){for(var i=(e.mode&1)!==0;It!==null;){var a=It,o=a.child;if(a.tag===22&&i){var l=a.memoizedState!==null||rN;if(!l){var c=a.alternate,u=c!==null&&c.memoizedState!==null||eo;c=rN;var d=eo;if(rN=l,(eo=u)&&!d)for(It=a;It!==null;)l=It,u=l.child,l.tag===22&&l.memoizedState!==null?lV(a):u!==null?(u.return=l,It=u):lV(a);for(;o!==null;)It=o,Gse(o),o=o.sibling;It=a,rN=c,eo=d}sV(e)}else a.subtreeFlags&8772&&o!==null?(o.return=a,It=o):sV(e)}}function sV(e){for(;It!==null;){var r=It;if(r.flags&8772){var n=r.alternate;try{if(r.flags&8772)switch(r.tag){case 0:case 11:case 15:eo||WB(5,r);break;case 1:var i=r.stateNode;if(r.flags&4&&!eo)if(n===null)i.componentDidMount();else{var a=r.elementType===r.type?n.memoizedProps:lu(r.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=r.updateQueue;o!==null&&H9(r,o,i);break;case 3:var l=r.updateQueue;if(l!==null){if(n=null,r.child!==null)switch(r.child.tag){case 5:n=r.child.stateNode;break;case 1:n=r.child.stateNode}H9(r,l,n)}break;case 5:var c=r.stateNode;if(n===null&&r.flags&4){n=c;var u=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var d=r.alternate;if(d!==null){var h=d.memoizedState;if(h!==null){var f=h.dehydrated;f!==null&&A2(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(mt(163))}eo||r.flags&512&&OL(r)}catch(p){aa(r,r.return,p)}}if(r===e){It=null;break}if(n=r.sibling,n!==null){n.return=r.return,It=n;break}It=r.return}}function oV(e){for(;It!==null;){var r=It;if(r===e){It=null;break}var n=r.sibling;if(n!==null){n.return=r.return,It=n;break}It=r.return}}function lV(e){for(;It!==null;){var r=It;try{switch(r.tag){case 0:case 11:case 15:var n=r.return;try{WB(4,r)}catch(u){aa(r,n,u)}break;case 1:var i=r.stateNode;if(typeof i.componentDidMount=="function"){var a=r.return;try{i.componentDidMount()}catch(u){aa(r,a,u)}}var o=r.return;try{OL(r)}catch(u){aa(r,o,u)}break;case 5:var l=r.return;try{OL(r)}catch(u){aa(r,l,u)}}}catch(u){aa(r,r.return,u)}if(r===e){It=null;break}var c=r.sibling;if(c!==null){c.return=r.return,It=c;break}It=r.return}}var ZCe=Math.ceil,iE=hf.ReactCurrentDispatcher,xU=hf.ReactCurrentOwner,kc=hf.ReactCurrentBatchConfig,xn=0,ds=null,Ta=null,Ps=0,Tl=0,wy=vp(0),Xa=0,S2=null,dg=0,qB=0,yU=0,Bw=null,qo=null,vU=0,Rv=1/0,yh=null,aE=!1,DL=null,Vm=null,nN=!1,Sm=null,sE=0,Tw=0,ML=null,YS=-1,JS=0;function ko(){return xn&6?fa():YS!==-1?YS:YS=fa()}function Wm(e){return e.mode&1?xn&2&&Ps!==0?Ps&-Ps:LCe.transition!==null?(JS===0&&(JS=Iae()),JS):(e=Vn,e!==0||(e=window.event,e=e===void 0?16:zae(e.type)),e):1}function Cu(e,r,n,i){if(50<Tw)throw Tw=0,ML=null,Error(mt(185));d_(e,n,i),(!(xn&2)||e!==ds)&&(e===ds&&(!(xn&2)&&(qB|=n),Xa===4&&um(e,Ps)),tl(e,i),n===1&&xn===0&&!(r.mode&1)&&(Rv=fa()+500,QB&&bp()))}function tl(e,r){var n=e.callbackNode;L_e(e,r);var i=Qk(e,e===ds?Ps:0);if(i===0)n!==null&&g9(n),e.callbackNode=null,e.callbackPriority=0;else if(r=i&-i,e.callbackPriority!==r){if(n!=null&&g9(n),r===1)e.tag===0?OCe(cV.bind(null,e)):ase(cV.bind(null,e)),TCe(function(){!(xn&6)&&bp()}),n=null;else{switch(Fae(i)){case 1:n=W6;break;case 4:n=Tae;break;case 16:n=$k;break;case 536870912:n=Pae;break;default:n=$k}n=noe(n,Xse.bind(null,e))}e.callbackPriority=r,e.callbackNode=n}}function Xse(e,r){if(YS=-1,JS=0,xn&6)throw Error(mt(327));var n=e.callbackNode;if(Hy()&&e.callbackNode!==n)return null;var i=Qk(e,e===ds?Ps:0);if(i===0)return null;if(i&30||i&e.expiredLanes||r)r=oE(e,i);else{r=i;var a=xn;xn|=2;var o=Jse();(ds!==e||Ps!==r)&&(yh=null,Rv=fa()+500,XA(e,r));do try{rNe();break}catch(c){Yse(e,c)}while(!0);aU(),iE.current=o,xn=a,Ta!==null?r=0:(ds=null,Ps=0,r=Xa)}if(r!==0){if(r===2&&(a=hL(e),a!==0&&(i=a,r=zL(e,a))),r===1)throw n=S2,XA(e,0),um(e,i),tl(e,fa()),n;if(r===6)um(e,i);else{if(a=e.current.alternate,!(i&30)&&!eNe(a)&&(r=oE(e,i),r===2&&(o=hL(e),o!==0&&(i=o,r=zL(e,o))),r===1))throw n=S2,XA(e,0),um(e,i),tl(e,fa()),n;switch(e.finishedWork=a,e.finishedLanes=i,r){case 0:case 1:throw Error(mt(345));case 2:cA(e,qo,yh);break;case 3:if(um(e,i),(i&130023424)===i&&(r=vU+500-fa(),10<r)){if(Qk(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){ko(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=vL(cA.bind(null,e,qo,yh),r);break}cA(e,qo,yh);break;case 4:if(um(e,i),(i&4194240)===i)break;for(r=e.eventTimes,a=-1;0<i;){var l=31-_u(i);o=1<<l,l=r[l],l>a&&(a=l),i&=~o}if(i=a,i=fa()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*ZCe(i/1960))-i,10<i){e.timeoutHandle=vL(cA.bind(null,e,qo,yh),i);break}cA(e,qo,yh);break;case 5:cA(e,qo,yh);break;default:throw Error(mt(329))}}}return tl(e,fa()),e.callbackNode===n?Xse.bind(null,e):null}function zL(e,r){var n=Bw;return e.current.memoizedState.isDehydrated&&(XA(e,r).flags|=256),e=oE(e,r),e!==2&&(r=qo,qo=n,r!==null&&UL(r)),e}function UL(e){qo===null?qo=e:qo.push.apply(qo,e)}function eNe(e){for(var r=e;;){if(r.flags&16384){var n=r.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var a=n[i],o=a.getSnapshot;a=a.value;try{if(!ku(o(),a))return!1}catch{return!1}}}if(n=r.child,r.subtreeFlags&16384&&n!==null)n.return=r,r=n;else{if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function um(e,r){for(r&=~yU,r&=~qB,e.suspendedLanes|=r,e.pingedLanes&=~r,e=e.expirationTimes;0<r;){var n=31-_u(r),i=1<<n;e[n]=-1,r&=~i}}function cV(e){if(xn&6)throw Error(mt(327));Hy();var r=Qk(e,0);if(!(r&1))return tl(e,fa()),null;var n=oE(e,r);if(e.tag!==0&&n===2){var i=hL(e);i!==0&&(r=i,n=zL(e,i))}if(n===1)throw n=S2,XA(e,0),um(e,r),tl(e,fa()),n;if(n===6)throw Error(mt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=r,cA(e,qo,yh),tl(e,fa()),null}function bU(e,r){var n=xn;xn|=1;try{return e(r)}finally{xn=n,xn===0&&(Rv=fa()+500,QB&&bp())}}function hg(e){Sm!==null&&Sm.tag===0&&!(xn&6)&&Hy();var r=xn;xn|=1;var n=kc.transition,i=Vn;try{if(kc.transition=null,Vn=1,e)return e()}finally{Vn=i,kc.transition=n,xn=r,!(xn&6)&&bp()}}function wU(){Tl=wy.current,Si(wy)}function XA(e,r){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,BCe(n)),Ta!==null)for(n=Ta.return;n!==null;){var i=n;switch(rU(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Kk();break;case 3:Ov(),Si(Zo),Si(so),dU();break;case 5:uU(i);break;case 4:Ov();break;case 13:Si($i);break;case 19:Si($i);break;case 10:sU(i.type._context);break;case 22:case 23:wU()}n=n.return}if(ds=e,Ta=e=qm(e.current,null),Ps=Tl=r,Xa=0,S2=null,yU=qB=dg=0,qo=Bw=null,_A!==null){for(r=0;r<_A.length;r++)if(n=_A[r],i=n.interleaved,i!==null){n.interleaved=null;var a=i.next,o=n.pending;if(o!==null){var l=o.next;o.next=a,i.next=l}n.pending=i}_A=null}return e}function Yse(e,r){do{var n=Ta;try{if(aU(),KS.current=nE,rE){for(var i=Vi.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}rE=!1}if(ug=0,ls=qa=Vi=null,kw=!1,_2=0,xU.current=null,n===null||n.return===null){Xa=1,S2=r,Ta=null;break}e:{var o=e,l=n.return,c=n,u=r;if(r=Ps,c.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,h=c,f=h.tag;if(!(h.mode&1)&&(f===0||f===11||f===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var m=X9(l);if(m!==null){m.flags&=-257,Y9(m,l,c,o,r),m.mode&1&&G9(o,d,r),r=m,u=d;var A=r.updateQueue;if(A===null){var g=new Set;g.add(u),r.updateQueue=g}else A.add(u);break e}else{if(!(r&1)){G9(o,d,r),jU();break e}u=Error(mt(426))}}else if(Pi&&c.mode&1){var y=X9(l);if(y!==null){!(y.flags&65536)&&(y.flags|=256),Y9(y,l,c,o,r),nU(Lv(u,c));break e}}o=u=Lv(u,c),Xa!==4&&(Xa=2),Bw===null?Bw=[o]:Bw.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,r&=-r,o.lanes|=r;var x=Fse(o,u,r);Q9(o,x);break e;case 1:c=u;var b=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof b.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Vm===null||!Vm.has(v)))){o.flags|=65536,r&=-r,o.lanes|=r;var j=Ose(o,c,r);Q9(o,j);break e}}o=o.return}while(o!==null)}eoe(n)}catch(_){r=_,Ta===n&&n!==null&&(Ta=n=n.return);continue}break}while(!0)}function Jse(){var e=iE.current;return iE.current=nE,e===null?nE:e}function jU(){(Xa===0||Xa===3||Xa===2)&&(Xa=4),ds===null||!(dg&268435455)&&!(qB&268435455)||um(ds,Ps)}function oE(e,r){var n=xn;xn|=2;var i=Jse();(ds!==e||Ps!==r)&&(yh=null,XA(e,r));do try{tNe();break}catch(a){Yse(e,a)}while(!0);if(aU(),xn=n,iE.current=i,Ta!==null)throw Error(mt(261));return ds=null,Ps=0,Xa}function tNe(){for(;Ta!==null;)Zse(Ta)}function rNe(){for(;Ta!==null&&!S_e();)Zse(Ta)}function Zse(e){var r=roe(e.alternate,e,Tl);e.memoizedProps=e.pendingProps,r===null?eoe(e):Ta=r,xU.current=null}function eoe(e){var r=e;do{var n=r.alternate;if(e=r.return,r.flags&32768){if(n=GCe(n,r),n!==null){n.flags&=32767,Ta=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xa=6,Ta=null;return}}else if(n=KCe(n,r,Tl),n!==null){Ta=n;return}if(r=r.sibling,r!==null){Ta=r;return}Ta=r=e}while(r!==null);Xa===0&&(Xa=5)}function cA(e,r,n){var i=Vn,a=kc.transition;try{kc.transition=null,Vn=1,nNe(e,r,n,i)}finally{kc.transition=a,Vn=i}return null}function nNe(e,r,n,i){do Hy();while(Sm!==null);if(xn&6)throw Error(mt(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(mt(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(R_e(e,o),e===ds&&(Ta=ds=null,Ps=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||nN||(nN=!0,noe($k,function(){return Hy(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=kc.transition,kc.transition=null;var l=Vn;Vn=1;var c=xn;xn|=4,xU.current=null,YCe(e,n),Kse(n,e),jCe(xL),Hk=!!gL,xL=gL=null,e.current=n,JCe(n),k_e(),xn=c,Vn=l,kc.transition=o}else e.current=n;if(nN&&(nN=!1,Sm=e,sE=a),o=e.pendingLanes,o===0&&(Vm=null),T_e(n.stateNode),tl(e,fa()),r!==null)for(i=e.onRecoverableError,n=0;n<r.length;n++)a=r[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(aE)throw aE=!1,e=DL,DL=null,e;return sE&1&&e.tag!==0&&Hy(),o=e.pendingLanes,o&1?e===ML?Tw++:(Tw=0,ML=e):Tw=0,bp(),null}function Hy(){if(Sm!==null){var e=Fae(sE),r=kc.transition,n=Vn;try{if(kc.transition=null,Vn=16>e?16:e,Sm===null)var i=!1;else{if(e=Sm,Sm=null,sE=0,xn&6)throw Error(mt(331));var a=xn;for(xn|=4,It=e.current;It!==null;){var o=It,l=o.child;if(It.flags&16){var c=o.deletions;if(c!==null){for(var u=0;u<c.length;u++){var d=c[u];for(It=d;It!==null;){var h=It;switch(h.tag){case 0:case 11:case 15:Ew(8,h,o)}var f=h.child;if(f!==null)f.return=h,It=f;else for(;It!==null;){h=It;var p=h.sibling,m=h.return;if(Vse(h),h===d){It=null;break}if(p!==null){p.return=m,It=p;break}It=m}}}var A=o.alternate;if(A!==null){var g=A.child;if(g!==null){A.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}It=o}}if(o.subtreeFlags&2064&&l!==null)l.return=o,It=l;else e:for(;It!==null;){if(o=It,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ew(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,It=x;break e}It=o.return}}var b=e.current;for(It=b;It!==null;){l=It;var v=l.child;if(l.subtreeFlags&2064&&v!==null)v.return=l,It=v;else e:for(l=b;It!==null;){if(c=It,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:WB(9,c)}}catch(_){aa(c,c.return,_)}if(c===l){It=null;break e}var j=c.sibling;if(j!==null){j.return=c.return,It=j;break e}It=c.return}}if(xn=a,bp(),Cd&&typeof Cd.onPostCommitFiberRoot=="function")try{Cd.onPostCommitFiberRoot(DB,e)}catch{}i=!0}return i}finally{Vn=n,kc.transition=r}}return!1}function uV(e,r,n){r=Lv(n,r),r=Fse(e,r,1),e=Hm(e,r,1),r=ko(),e!==null&&(d_(e,1,r),tl(e,r))}function aa(e,r,n){if(e.tag===3)uV(e,e,n);else for(;r!==null;){if(r.tag===3){uV(r,e,n);break}else if(r.tag===1){var i=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Vm===null||!Vm.has(i))){e=Lv(n,e),e=Ose(r,e,1),r=Hm(r,e,1),e=ko(),r!==null&&(d_(r,1,e),tl(r,e));break}}r=r.return}}function iNe(e,r,n){var i=e.pingCache;i!==null&&i.delete(r),r=ko(),e.pingedLanes|=e.suspendedLanes&n,ds===e&&(Ps&n)===n&&(Xa===4||Xa===3&&(Ps&130023424)===Ps&&500>fa()-vU?XA(e,0):yU|=n),tl(e,r)}function toe(e,r){r===0&&(e.mode&1?(r=qC,qC<<=1,!(qC&130023424)&&(qC=4194304)):r=1);var n=ko();e=Wh(e,r),e!==null&&(d_(e,r,n),tl(e,n))}function aNe(e){var r=e.memoizedState,n=0;r!==null&&(n=r.retryLane),toe(e,n)}function sNe(e,r){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(mt(314))}i!==null&&i.delete(r),toe(e,n)}var roe;roe=function(e,r,n){if(e!==null)if(e.memoizedProps!==r.pendingProps||Zo.current)Xo=!0;else{if(!(e.lanes&n)&&!(r.flags&128))return Xo=!1,qCe(e,r,n);Xo=!!(e.flags&131072)}else Xo=!1,Pi&&r.flags&1048576&&sse(r,Yk,r.index);switch(r.lanes=0,r.tag){case 2:var i=r.type;XS(e,r),e=r.pendingProps;var a=Pv(r,so.current);Qy(r,n),a=fU(null,r,i,e,a,n);var o=mU();return r.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,el(i)?(o=!0,Gk(r)):o=!1,r.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,lU(r),a.updater=VB,r.stateNode=a,a._reactInternals=r,SL(r,i,e,n),r=BL(null,r,i,!0,o,n)):(r.tag=0,Pi&&o&&tU(r),yo(null,r,a,n),r=r.child),r;case 16:i=r.elementType;e:{switch(XS(e,r),e=r.pendingProps,a=i._init,i=a(i._payload),r.type=i,a=r.tag=lNe(i),e=lu(i,e),a){case 0:r=EL(null,r,i,e,n);break e;case 1:r=eV(null,r,i,e,n);break e;case 11:r=J9(null,r,i,e,n);break e;case 14:r=Z9(null,r,i,lu(i.type,e),n);break e}throw Error(mt(306,i,""))}return r;case 0:return i=r.type,a=r.pendingProps,a=r.elementType===i?a:lu(i,a),EL(e,r,i,a,n);case 1:return i=r.type,a=r.pendingProps,a=r.elementType===i?a:lu(i,a),eV(e,r,i,a,n);case 3:e:{if(Mse(r),e===null)throw Error(mt(387));i=r.pendingProps,o=r.memoizedState,a=o.element,hse(e,r),eE(r,i,null,n);var l=r.memoizedState;if(i=l.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},r.updateQueue.baseState=o,r.memoizedState=o,r.flags&256){a=Lv(Error(mt(423)),r),r=tV(e,r,i,n,a);break e}else if(i!==a){a=Lv(Error(mt(424)),r),r=tV(e,r,i,n,a);break e}else for(Ll=Qm(r.stateNode.containerInfo.firstChild),zl=r,Pi=!0,pu=null,n=use(r,null,i,n),r.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Iv(),i===a){r=qh(e,r,n);break e}yo(e,r,i,n)}r=r.child}return r;case 5:return fse(r),e===null&&_L(r),i=r.type,a=r.pendingProps,o=e!==null?e.memoizedProps:null,l=a.children,yL(i,a)?l=null:o!==null&&yL(i,o)&&(r.flags|=32),Dse(e,r),yo(e,r,l,n),r.child;case 6:return e===null&&_L(r),null;case 13:return zse(e,r,n);case 4:return cU(r,r.stateNode.containerInfo),i=r.pendingProps,e===null?r.child=Fv(r,null,i,n):yo(e,r,i,n),r.child;case 11:return i=r.type,a=r.pendingProps,a=r.elementType===i?a:lu(i,a),J9(e,r,i,a,n);case 7:return yo(e,r,r.pendingProps,n),r.child;case 8:return yo(e,r,r.pendingProps.children,n),r.child;case 12:return yo(e,r,r.pendingProps.children,n),r.child;case 10:e:{if(i=r.type._context,a=r.pendingProps,o=r.memoizedProps,l=a.value,hi(Jk,i._currentValue),i._currentValue=l,o!==null)if(ku(o.value,l)){if(o.children===a.children&&!Zo.current){r=qh(e,r,n);break e}}else for(o=r.child,o!==null&&(o.return=r);o!==null;){var c=o.dependencies;if(c!==null){l=o.child;for(var u=c.firstContext;u!==null;
vendor: 10,939 bytes, line 40
40){if(u.context===i){if(o.tag===1){u=Fh(-1,n&-n),u.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?u.next=u:(u.next=h.next,h.next=u),d.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),CL(o.return,n,r),c.lanes|=n;break}u=u.next}}else if(o.tag===10)l=o.type===r.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(mt(341));l.lanes|=n,c=l.alternate,c!==null&&(c.lanes|=n),CL(l,n,r),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===r){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}yo(e,r,a.children,n),r=r.child}return r;case 9:return a=r.type,i=r.pendingProps.children,Qy(r,n),a=Lc(a),i=i(a),r.flags|=1,yo(e,r,i,n),r.child;case 14:return i=r.type,a=lu(i,r.pendingProps),a=lu(i.type,a),Z9(e,r,i,a,n);case 15:return Lse(e,r,r.type,r.pendingProps,n);case 17:return i=r.type,a=r.pendingProps,a=r.elementType===i?a:lu(i,a),XS(e,r),r.tag=1,el(i)?(e=!0,Gk(r)):e=!1,Qy(r,n),Ise(r,i,a),SL(r,i,a,n),BL(null,r,i,!0,e,n);case 19:return Use(e,r,n);case 22:return Rse(e,r,n)}throw Error(mt(156,r.tag))};function noe(e,r){return Bae(e,r)}function oNe(e,r,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jc(e,r,n,i){return new oNe(e,r,n,i)}function _U(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lNe(e){if(typeof e=="function")return _U(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Q6)return 11;if(e===H6)return 14}return 2}function qm(e,r){var n=e.alternate;return n===null?(n=jc(e.tag,r,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=r,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,r=e.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ZS(e,r,n,i,a,o){var l=2;if(i=e,typeof e=="function")_U(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case hy:return YA(n.children,a,o,r);case $6:l=8,a|=8;break;case YO:return e=jc(12,n,r,a|2),e.elementType=YO,e.lanes=o,e;case JO:return e=jc(13,n,r,a),e.elementType=JO,e.lanes=o,e;case ZO:return e=jc(19,n,r,a),e.elementType=ZO,e.lanes=o,e;case fae:return KB(n,a,o,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dae:l=10;break e;case hae:l=9;break e;case Q6:l=11;break e;case H6:l=14;break e;case rm:l=16,i=null;break e}throw Error(mt(130,e==null?e:typeof e,""))}return r=jc(l,n,r,a),r.elementType=e,r.type=i,r.lanes=o,r}function YA(e,r,n,i){return e=jc(7,e,i,r),e.lanes=n,e}function KB(e,r,n,i){return e=jc(22,e,i,r),e.elementType=fae,e.lanes=n,e.stateNode={isHidden:!1},e}function $P(e,r,n){return e=jc(6,e,null,r),e.lanes=n,e}function QP(e,r,n){return r=jc(4,e.children!==null?e.children:[],e.key,r),r.lanes=n,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function cNe(e,r,n,i,a){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jP(0),this.expirationTimes=jP(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jP(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function CU(e,r,n,i,a,o,l,c,u){return e=new cNe(e,r,n,c,u),r===1?(r=1,o===!0&&(r|=8)):r=0,o=jc(3,null,null,r),e.current=o,o.stateNode=e,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lU(o),e}function uNe(e,r,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:dy,key:i==null?null:""+i,children:e,containerInfo:r,implementation:n}}function ioe(e){if(!e)return sp;e=e._reactInternals;e:{if(Dg(e)!==e||e.tag!==1)throw Error(mt(170));var r=e;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(el(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(mt(171))}if(e.tag===1){var n=e.type;if(el(n))return ise(e,n,r)}return r}function aoe(e,r,n,i,a,o,l,c,u){return e=CU(n,i,!0,e,a,o,l,c,u),e.context=ioe(null),n=e.current,i=ko(),a=Wm(n),o=Fh(i,a),o.callback=r??null,Hm(n,o,a),e.current.lanes=a,d_(e,a,i),tl(e,i),e}function GB(e,r,n,i){var a=r.current,o=ko(),l=Wm(a);return n=ioe(n),r.context===null?r.context=n:r.pendingContext=n,r=Fh(o,l),r.payload={element:e},i=i===void 0?null:i,i!==null&&(r.callback=i),e=Hm(a,r,l),e!==null&&(Cu(e,a,l,o),qS(e,a,l)),l}function lE(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function dV(e,r){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<r?n:r}}function NU(e,r){dV(e,r),(e=e.alternate)&&dV(e,r)}function dNe(){return null}var soe=typeof reportError=="function"?reportError:function(e){console.error(e)};function SU(e){this._internalRoot=e}XB.prototype.render=SU.prototype.render=function(e){var r=this._internalRoot;if(r===null)throw Error(mt(409));GB(e,r,null,null)};XB.prototype.unmount=SU.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var r=e.containerInfo;hg(function(){GB(null,e,null,null)}),r[Vh]=null}};function XB(e){this._internalRoot=e}XB.prototype.unstable_scheduleHydration=function(e){if(e){var r=Rae();e={blockedOn:null,target:e,priority:r};for(var n=0;n<cm.length&&r!==0&&r<cm[n].priority;n++);cm.splice(n,0,e),n===0&&Mae(e)}};function kU(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function YB(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hV(){}function hNe(e,r,n,i,a){if(a){if(typeof i=="function"){var o=i;i=function(){var d=lE(l);o.call(d)}}var l=aoe(r,i,e,0,null,!1,!1,"",hV);return e._reactRootContainer=l,e[Vh]=l.current,y2(e.nodeType===8?e.parentNode:e),hg(),l}for(;a=e.lastChild;)e.removeChild(a);if(typeof i=="function"){var c=i;i=function(){var d=lE(u);c.call(d)}}var u=CU(e,0,!1,null,null,!1,!1,"",hV);return e._reactRootContainer=u,e[Vh]=u.current,y2(e.nodeType===8?e.parentNode:e),hg(function(){GB(r,u,n,i)}),u}function JB(e,r,n,i,a){var o=n._reactRootContainer;if(o){var l=o;if(typeof a=="function"){var c=a;a=function(){var u=lE(l);c.call(u)}}GB(r,l,e,a)}else l=hNe(n,r,e,a,i);return lE(l)}Oae=function(e){switch(e.tag){case 3:var r=e.stateNode;if(r.current.memoizedState.isDehydrated){var n=ew(r.pendingLanes);n!==0&&(q6(r,n|1),tl(r,fa()),!(xn&6)&&(Rv=fa()+500,bp()))}break;case 13:hg(function(){var i=Wh(e,1);if(i!==null){var a=ko();Cu(i,e,1,a)}}),NU(e,1)}};K6=function(e){if(e.tag===13){var r=Wh(e,134217728);if(r!==null){var n=ko();Cu(r,e,134217728,n)}NU(e,134217728)}};Lae=function(e){if(e.tag===13){var r=Wm(e),n=Wh(e,r);if(n!==null){var i=ko();Cu(n,e,r,i)}NU(e,r)}};Rae=function(){return Vn};Dae=function(e,r){var n=Vn;try{return Vn=e,r()}finally{Vn=n}};cL=function(e,r,n){switch(r){case"input":if(rL(e,n),r=n.name,n.type==="radio"&&r!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<n.length;r++){var i=n[r];if(i!==e&&i.form===e.form){var a=$B(i);if(!a)throw Error(mt(90));pae(i),rL(i,a)}}}break;case"textarea":gae(e,n);break;case"select":r=n.value,r!=null&&My(e,!!n.multiple,r,!1)}};_ae=bU;Cae=hg;var fNe={usingClientEntryPoint:!1,Events:[f_,Ay,$B,wae,jae,bU]},o1={findFiberByHostInstance:jA,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mNe={bundleType:o1.bundleType,version:o1.version,rendererPackageName:o1.rendererPackageName,rendererConfig:o1.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:hf.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=kae(e),e===null?null:e.stateNode},findFiberByHostInstance:o1.findFiberByHostInstance||dNe,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var iN=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iN.isDisabled&&iN.supportsFiber)try{DB=iN.inject(mNe),Cd=iN}catch{}}Yl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fNe;Yl.createPortal=function(e,r){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kU(r))throw Error(mt(200));return uNe(e,r,null,n)};Yl.createRoot=function(e,r){if(!kU(e))throw Error(mt(299));var n=!1,i="",a=soe;return r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),r=CU(e,1,!1,null,null,n,!1,i,a),e[Vh]=r.current,y2(e.nodeType===8?e.parentNode:e),new SU(r)};Yl.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var r=e._reactInternals;if(r===void 0)throw typeof e.render=="function"?Error(mt(188)):(e=Object.keys(e).join(","),Error(mt(268,e)));return e=kae(r),e=e===null?null:e.stateNode,e};Yl.flushSync=function(e){return hg(e)};Yl.hydrate=function(e,r,n){if(!YB(r))throw Error(mt(200));return JB(null,e,r,!0,n)};Yl.hydrateRoot=function(e,r,n){if(!kU(e))throw Error(mt(405));var i=n!=null&&n.hydratedSources||null,a=!1,o="",l=soe;if(n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),r=aoe(r,null,e,1,n??null,a,!1,o,l),e[Vh]=r.current,y2(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[n,a]:r.mutableSourceEagerHydrationData.push(n,a);return new XB(r)};Yl.render=function(e,r,n){if(!YB(r))throw Error(mt(200));return JB(null,e,r,!1,n)};Yl.unmountComponentAtNode=function(e){if(!YB(e))throw Error(mt(40));return e._reactRootContainer?(hg(function(){JB(null,null,e,!1,function(){e._reactRootContainer=null,e[Vh]=null})}),!0):!1};Yl.unstable_batchedUpdates=bU;Yl.unstable_renderSubtreeIntoContainer=function(e,r,n,i){if(!YB(n))throw Error(mt(200));if(e==null||e._reactInternals===void 0)throw Error(mt(38));return JB(e,r,n,!1,i)};
40Yl.version="18.3.1-next-f1338f8080-20240426";function ooe(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ooe)}catch(e){console.error(e)}}ooe(),oae.exports=Yl;var Kh=oae.exports;const loe=bn(Kh);var coe,fV=Kh;coe=fV.createRoot,fV.hydrateRoot;var pNe=typeof Element<"u",ANe=typeof Map=="function",gNe=typeof Set=="function",xNe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ek(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!ek(e[i],r[i]))return!1;return!0}var o;if(ANe&&e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(o=e.entries();!(i=o.next()).done;)if(!r.has(i.value[0]))return!1;for(o=e.entries();!(i=o.next()).done;)if(!ek(i.value[1],r.get(i.value[0])))return!1;return!0}if(gNe&&e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(o=e.entries();!(i=o.next()).done;)if(!r.has(i.value[0]))return!1;return!0}if(xNe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(e[i]!==r[i])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof r.valueOf=="function")return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof r.toString=="function")return e.toString()===r.toString();if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;if(pNe&&e instanceof Element)return!1;for(i=n;i--!==0;)if(!((a[i]==="_owner"||a[i]==="__v"||a[i]==="__o")&&e.$$typeof)&&!ek(e[a[i]],r[a[i]]))return!1;return!0}return e!==e&&r!==r}var yNe=function(r,n){try{return ek(r,n)}catch(i){if((i.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw i}};const vNe=bn(yNe);var bNe=function(e,r,n,i,a,o,l,c){if(!e){var u;if(r===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[n,i,a,o,l,c],h=0;u=new Error(r.replace(/%s/g,function(){return d[h++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},wNe=bNe;const mV=bn(wNe);var jNe=function(r,n,i,a){var o=i?i.call(a,r,n):void 0;if(o!==void 0)return!!o;if(r===n)return!0;if(typeof r!="object"||!r||typeof n!="object"||!n)return!1;var l=Object.keys(r),c=Object.keys(n);if(l.length!==c.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(n),d=0;d<l.length;d++){var h=l[d];if(!u(h))return!1;var f=r[h],p=n[h];if(o=i?i.call(a,f,p,h):void 0,o===!1||o===void 0&&f!==p)return!1}return!0};const _Ne=bn(jNe);var uoe=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(uoe||{}),HP={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},pV=Object.values(uoe),ZB={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},doe=Object.entries(ZB).reduce((e,[r,n])=>(e[n]=r,e),{}),vu="data-rh",Vy={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Wy=(e,r)=>{for(let n=e.length-1;n>=0;n-=1){const i=e[n];if(Object.prototype.hasOwnProperty.call(i,r))return i[r]}return null},CNe=e=>{let r=Wy(e,"title");const n=Wy(e,Vy.TITLE_TEMPLATE);if(Array.isArray(r)&&(r=r.join("")),n&&r)return n.replace(/%s/g,()=>r);const i=Wy(e,Vy.DEFAULT_TITLE);return r||i||void 0},NNe=e=>Wy(e,Vy.ON_CHANGE_CLIENT_STATE)||(()=>{}),VP=(e,r)=>r.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,i)=>({...n,...i}),{}),SNe=(e,r)=>r.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,i)=>{if(!n.length){const a=Object.keys(i);for(let o=0;o<a.length;o+=1){const c=a[o].toLowerCase();if(e.indexOf(c)!==-1&&i[c])return n.concat(i)}}return n},[]),kNe=e=>console&&typeof console.warn=="function"&&console.warn(e),l1=(e,r,n)=>{const i={};return n.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&kNe(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,o)=>{const l={};o.filter(u=>{let d;const h=Object.keys(u);for(let p=0;p<h.length;p+=1){const m=h[p],A=m.toLowerCase();r.indexOf(A)!==-1&&!(d==="rel"&&u[d].toLowerCase()==="canonical")&&!(A==="rel"&&u[A].toLowerCase()==="stylesheet")&&(d=A),r.indexOf(m)!==-1&&(m==="innerHTML"||m==="cssText"||m==="itemprop")&&(d=m)}if(!d||!u[d])return!1;const f=u[d].toLowerCase();return i[d]||(i[d]={}),l[d]||(l[d]={}),i[d][f]?!1:(l[d][f]=!0,!0)}
40).reverse().forEach(u=>a.push(u));const c=Object.keys(l);for(let u=0;u<c.length;u+=1){const d=c[u],h={...i[d],...l[d]};i[d]=h}return a},[]).reverse()},ENe=(e,r)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][r])return!0}return!1},BNe=e=>({baseTag:SNe(["href"],e),bodyAttributes:VP("bodyAttributes",e),defer:Wy(e,Vy.DEFER),encode:Wy(e,Vy.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:VP("htmlAttributes",e),linkTags:l1("link",["rel","href"],e),metaTags:l1("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:l1("noscript",["innerHTML"],e),onChangeClientState:NNe(e),scriptTags:l1("script",["src","innerHTML"],e),styleTags:l1("style",["cssText"],e),title:CNe(e),titleAttributes:VP("titleAttributes",e),prioritizeSeoTags:ENe(e,Vy.PRIORITIZE_SEO_TAGS)}),hoe=e=>Array.isArray(e)?e.join(""):e,TNe=(e,r)=>{const n=Object.keys(e);for(let i=0;i<n.length;i+=1)if(r[n[i]]&&r[n[i]].includes(e[n[i]]))return!0;return!1},WP=(e,r)=>Array.isArray(e)?e.reduce((n,i)=>(TNe(i,r)?n.priority.push(i):n.default.push(i),n),{priority:[],default:[]}):{default:e,priority:[]},AV=(e,r)=>({...e,[r]:void 0}),PNe=["noscript","script","style"],$L=(e,r=!0)=>r===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),foe=e=>Object.keys(e).reduce((r,n)=>{const i=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return r?`${r} ${i}`:i},""),INe=(e,r,n,i)=>{const a=foe(n),o=hoe(r);return a?`<${e} ${vu}="true" ${a}>${$L(o,i)}</${e}>`:`<${e} ${vu}="true">${$L(o,i)}</${e}>`},FNe=(e,r,n=!0)=>r.reduce((i,a)=>{const o=a,l=Object.keys(o).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,h)=>{const f=typeof o[h]>"u"?h:`${h}="${$L(o[h],n)}"`;return d?`${d} ${f}`:f},""),c=o.innerHTML||o.cssText||"",u=PNe.indexOf(e)===-1;return`${i}<${e} ${vu}="true" ${l}${u?"/>":`>${c}</${e}>`}`},""),moe=(e,r={})=>Object.keys(e).reduce((n,i)=>{const a=ZB[i];return n[a||i]=e[i],n},r),ONe=(e,r,n)=>{const i={key:r,[vu]:!0},a=moe(n,i);return[ee.createElement("title",a,r)]},tk=(e,r)=>r.map((n,i)=>{const a={key:i,[vu]:!0};return Object.keys(n).forEach(o=>{const c=ZB[o]||o;if(c==="innerHTML"||c==="cssText"){const u=n.innerHTML||n.cssText;a.dangerouslySetInnerHTML={__html:u}}else a[c]=n[o]}),ee.createElement(e,a)}),dc=(e,r,n=!0)=>{switch(e){case"title":return{toComponent:()=>ONe(e,r.title,r.titleAttributes),toString:()=>INe(e,r.title,r.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>moe(r),toString:()=>foe(r)};default:return{toComponent:()=>tk(e,r),toString:()=>FNe(e,r,n)}}},LNe=({metaTags:e,linkTags:r,scriptTags:n,encode:i})=>{const a=WP(e,HP.meta),o=WP(r,HP.link),l=WP(n,HP.script);return{priorityMethods:{toComponent:()=>[...tk("meta",a.priority),...tk("link",o.priority),...tk("script",l.priority)],toString:()=>`${dc("meta",a.priority,i)} ${dc("link",o.priority,i)} ${dc("script",l.priority,i)}`},metaTags:a.default,linkTags:o.default,scriptTags:l.default}},RNe=e=>{const{baseTag:r,bodyAttributes:n,encode:i=!0,htmlAttributes:a,noscriptTags:o,styleTags:l,title:c="",titleAttributes:u,prioritizeSeoTags:d}=e;let{linkTags:h,metaTags:f,scriptTags:p}=e,m={toComponent:()=>[],toString:()=>""};return d&&({priorityMethods:m,linkTags:h,metaTags:f,scriptTags:p}=LNe(e)),{priority:m,base:dc("base",r,i),bodyAttributes:dc("bodyAttributes",n,i),htmlAttributes:dc("htmlAttributes",a,i),link:dc("link",h,i),meta:dc("meta",f,i),noscript:dc("noscript",o,i),script:dc("script",p,i),style:dc("style",l,i),title:dc("title",{title:c,titleAttributes:u},i)}},QL=RNe,aN=[],EU=!!(typeof window<"u"&&window.document&&window.document.createElement),HL=class{constructor(e,r){tr(this,"instances",[]);tr(this,"canUseDOM",EU);tr(this,"context");tr(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?aN:this.instances,add:e=>{(this.canUseDOM?aN:this.instances).push(e)},remove:e=>{const r=(this.canUseDOM?aN:this.instances).indexOf(e);(this.canUseDOM?aN:this.instances).splice(r,1)}}});this.context=e,this.canUseDOM=r||!1,r||(e.helmet=QL({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},DNe=parseInt(ee.version.split(".")[0],10),VL=DNe>=19,MNe={},poe=ee.createContext(MNe),zA,Aoe=(zA=class extends w.Component{constructor(n){super(n);tr(this,"helmetData");VL?this.helmetData=null:this.helmetData=new HL(this.props.context||{},zA.canUseDOM)}render(){return VL?ee.createElement(ee.Fragment,null,this.props.children):ee.createElement(poe.Provider,{value:this.helmetData.value},this.props.children)}},tr(zA,"canUseDOM",EU),zA),Cx=(e,r)=>{const n=document.head||document.querySelector("head"),i=n.querySelectorAll(`${e}[${vu}]`),a=[].slice.call(i),o=[];let l;return r&&r.length&&r.forEach(c=>{const u=document.createElement(e);for(const d in c)if(Object.prototype.hasOwnProperty.call(c,d))if(d==="innerHTML")u.innerHTML=c.innerHTML;else if(d==="cssText"){const h=c.cssText;u.appendChild(document.createTextNode(h))}else{const h=d,f=typeof c[h]>"u"?"":c[h];u.setAttribute(d,f)}u.setAttribute(vu,"true"),a.some((d,h)=>
40(l=h,u.isEqualNode(d)))?a.splice(l,1):o.push(u)}),a.forEach(c=>{var u;return(u=c.parentNode)==null?void 0:u.removeChild(c)}),o.forEach(c=>n.appendChild(c)),{oldTags:a,newTags:o}},WL=(e,r)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const i=n.getAttribute(vu),a=i?i.split(","):[],o=[...a],l=Object.keys(r);for(const c of l){const u=r[c]||"";n.getAttribute(c)!==u&&n.setAttribute(c,u),a.indexOf(c)===-1&&a.push(c);const d=o.indexOf(c);d!==-1&&o.splice(d,1)}for(let c=o.length-1;c>=0;c-=1)n.removeAttribute(o[c]);a.length===o.length?n.removeAttribute(vu):n.getAttribute(vu)!==l.join(",")&&n.setAttribute(vu,l.join(","))},zNe=(e,r)=>{typeof e<"u"&&document.title!==e&&(document.title=hoe(e)),WL("title",r)},gV=(e,r)=>{const{baseTag:n,bodyAttributes:i,htmlAttributes:a,linkTags:o,metaTags:l,noscriptTags:c,onChangeClientState:u,scriptTags:d,styleTags:h,title:f,titleAttributes:p}=e;WL("body",i),WL("html",a),zNe(f,p);const m={baseTag:Cx("base",n),linkTags:Cx("link",o),metaTags:Cx("meta",l),noscriptTags:Cx("noscript",c),scriptTags:Cx("script",d),styleTags:Cx("style",h)},A={},g={};Object.keys(m).forEach(y=>{const{newTags:x,oldTags:b}=m[y];x.length&&(A[y]=x),b.length&&(g[y]=m[y].oldTags)}),r&&r(),u(e,A,g)},c1=null,UNe=e=>{c1&&cancelAnimationFrame(c1),e.defer?c1=requestAnimationFrame(()=>{gV(e,()=>{c1=null})}):(gV(e),c1=null)},$Ne=UNe,xV=class extends w.Component{constructor(){super(...arguments);tr(this,"rendered",!1)}shouldComponentUpdate(r){return!_Ne(r,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:r}=this.props.context;r.remove(this),this.emitChange()}emitChange(){const{helmetInstances:r,setHelmet:n}=this.props.context;let i=null;const a=BNe(r.get().map(o=>{const{context:l,...c}=o.props;return c}));Aoe.canUseDOM?$Ne(a):QL&&(i=QL(a)),n(i)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:r}=this.props.context;r.add(this),this.emitChange()}render(){return this.init(),null}},rk=[],yV=e=>{const r={};for(const n of Object.keys(e))r[doe[n]||n]=e[n];return r},Zp=e=>{const r={};for(const n of Object.keys(e)){const i=ZB[n];r[i||n]=e[n]}return r},vV=(e,r)=>{if(!EU)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const i="data-rh-managed",a=n.getAttribute(i),o=a?a.split(","):[],l=Object.keys(r);for(const c of o)l.includes(c)||n.removeAttribute(c);for(const c of l){const u=r[c];u==null||u===!1?n.removeAttribute(c):u===!0?n.setAttribute(c,""):n.setAttribute(c,String(u))}l.length>0?n.setAttribute(i,l.join(",")):n.removeAttribute(i)},qP=()=>{const e={},r={};for(const n of rk){const{htmlAttributes:i,bodyAttributes:a}=n.props;i&&Object.assign(e,yV(i)),a&&Object.assign(r,yV(a))}vV("html",e),vV("body",r)},QNe=class extends w.Component{componentDidMount(){rk.push(this),qP()}componentDidUpdate(){qP()}componentWillUnmount(){const e=rk.indexOf(this);e!==-1&&rk.splice(e,1),qP()}resolveTitle(){const{title:e,titleTemplate:r,defaultTitle:n}=this.props;return e&&r?r.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const r=this.props.titleAttributes||{};return ee.createElement("title",Zp(r),e)}renderBase(){const{base:e}=this.props;return e?ee.createElement("base",Zp(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((r,n)=>ee.createElement("meta",{key:n,...Zp(r)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((r,n)=>ee.createElement("link",{key:n,...Zp(r)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((r,n)=>{const{innerHTML:i,...a}=r,o=Zp(a);return i&&(o.dangerouslySetInnerHTML={__html:i}),ee.createElement("script",{key:n,...o})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((r,n)=>{const{cssText:i,...a}=r,o=Zp(a);return i&&(o.dangerouslySetInnerHTML={__html:i}),ee.createElement("style",{key:n,...o})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((r,n)=>{const{innerHTML:i,...a}=r,o=Zp(a);return i&&(o.dangerouslySetInnerHTML={__html:i}),ee.createElement("noscript",{key:n,...o})})}render(){return ee.createElement(ee.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},GO,goe=(GO=class extends w.Component{shouldComponentUpdate(e){return!vNe(AV(this.props,"helmetData"),AV(e,"helmetData"))}mapNestedChildrenToProps(e,r){if(!r)return null;switch(e.type){case"script":case"noscript":return{innerHTML:r};case"style":return{cssText:r};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,r,n,i){return{...r,[e.type]:[...r[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,i)}]}}mapObjectTypeChildren(e,r,n,i){switch(e.type){case"title":return{...r,[e.type]:i,titleAttributes:{...n}};case"body":return{...r,bodyAttributes:{...n}};case"html":return{...r,htmlAttributes:{...n}};default:return{...r,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,r){let n={...r};return Object.keys(e).forEach(i=>
40{n={...n,[i]:e[i]}}),n}warnOnInvalidChildren(e,r){return mV(pV.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${pV.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),mV(!r||typeof r=="string"||Array.isArray(r)&&!r.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,r){let n={};return ee.Children.forEach(e,i=>{if(!i||!i.props)return;const{children:a,...o}=i.props,l=Object.keys(o).reduce((u,d)=>(u[doe[d]||d]=o[d],u),{});let{type:c}=i;switch(typeof c=="symbol"?c=c.toString():this.warnOnInvalidChildren(i,a),c){case"Symbol(react.fragment)":r=this.mapChildrenToProps(a,r);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(i,n,l,a);break;default:r=this.mapObjectTypeChildren(i,r,l,a);break}}),this.mapArrayTypeChildrenToProps(n,r)}render(){const{children:e,...r}=this.props;let n={...r},{helmetData:i}=r;if(e&&(n=this.mapChildrenToProps(e,n)),i&&!(i instanceof HL)){const a=i;i=new HL(a.context,!0),delete n.helmetData}return VL?ee.createElement(QNe,{...n}):i?ee.createElement(xV,{...n,context:i.value}):ee.createElement(poe.Consumer,null,a=>ee.createElement(xV,{...n,context:a}))}},tr(GO,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),GO);const HNe=1,VNe=1e6;let KP=0;function WNe(){return KP=(KP+1)%Number.MAX_SAFE_INTEGER,KP.toString()}const GP=new Map,bV=e=>{if(GP.has(e))return;const r=setTimeout(()=>{GP.delete(e),Pw({type:"REMOVE_TOAST",toastId:e})},VNe);GP.set(e,r)},qNe=(e,r)=>{switch(r.type){case"ADD_TOAST":return{...e,toasts:[r.toast,...e.toasts].slice(0,HNe)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===r.toast.id?{...n,...r.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=r;return n?bV(n):e.toasts.forEach(i=>{bV(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===n||n===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return r.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==r.toastId)}}},nk=[];let ik={toasts:[]};function Pw(e){ik=qNe(ik,e),nk.forEach(r=>{r(ik)})}function Ho({...e}){const r=WNe(),n=a=>Pw({type:"UPDATE_TOAST",toast:{...a,id:r}}),i=()=>Pw({type:"DISMISS_TOAST",toastId:r});return Pw({type:"ADD_TOAST",toast:{...e,id:r,open:!0,onOpenChange:a=>{a||i()}}}),{id:r,dismiss:i,update:n}}function wn(){const[e,r]=w.useState(ik);return w.useEffect(()=>(nk.push(r),()=>{const n=nk.indexOf(r);n>-1&&nk.splice(n,1)}),[e]),{...e,toast:Ho,dismiss:n=>Pw({type:"DISMISS_TOAST",toastId:n})}}function bt(e,r,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return r==null?void 0:r(a)}}function wV(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function e4(...e){return r=>{let n=!1;const i=e.map(a=>{const o=wV(a,r);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<i.length;a++){const o=i[a];typeof o=="function"?o():wV(e[a],null)}}}}function Mr(...e){return w.useCallback(e4(...e),e)}function KNe(e,r){const n=w.createContext(r),i=o=>{const{children:l,...c}=o,u=w.useMemo(()=>c,Object.values(c));return s.jsx(n.Provider,{value:u,children:l})};i.displayName=e+"Provider";function a(o){const l=w.useContext(n);if(l)return l;if(r!==void 0)return r;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[i,a]}function rs(e,r=[]){let n=[];function i(o,l){const c=w.createContext(l),u=n.length;n=[...n,l];const d=f=>{var x;const{scope:p,children:m,...A}=f,g=((x=p==null?void 0:p[e])==null?void 0:x[u])||c,y=w.useMemo(()=>A,Object.values(A));return s.jsx(g.Provider,{value:y,children:m})};d.displayName=o+"Provider";function h(f,p){var g;const m=((g=p==null?void 0:p[e])==null?void 0:g[u])||c,A=w.useContext(m);if(A)return A;if(l!==void 0)return l;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[d,h]}const a=()=>{const o=n.map(l=>w.createContext(l));return function(c){const u=(c==null?void 0:c[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return a.scopeName=e,[i,GNe(a,...r)]}function GNe(...e){const r=e[0];if(e.length===1)return r;const n=()=>{const i=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const l=i.reduce((c,{useScope:u,scopeName:d})=>{const f=u(o)[`__scope${d}`];return{...c,...f}},{});return w.useMemo(()=>({[`__scope${r.scopeName}`]:l}),[l])}};return n.scopeName=r.scopeName,n}function fg(e){const r=XNe(e),n=w.forwardRef((i,a)=>{const{children:o,...l}=i,c=w.Children.toArray(o),u=c.find(YNe);
vendor: 11,226 bytes, line 40
40if(u){const d=u.props.children,h=c.map(f=>f===u?w.Children.count(d)>1?w.Children.only(null):w.isValidElement(d)?d.props.children:null:f);return s.jsx(r,{...l,ref:a,children:w.isValidElement(d)?w.cloneElement(d,void 0,h):null})}return s.jsx(r,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var I0=fg("Slot");function XNe(e){const r=w.forwardRef((n,i)=>{const{children:a,...o}=n;if(w.isValidElement(a)){const l=ZNe(a),c=JNe(o,a.props);return a.type!==w.Fragment&&(c.ref=i?e4(i,l):l),w.cloneElement(a,c)}return w.Children.count(a)>1?w.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var xoe=Symbol("radix.slottable");function yoe(e){const r=({children:n})=>s.jsx(s.Fragment,{children:n});return r.displayName=`${e}.Slottable`,r.__radixId=xoe,r}function YNe(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xoe}function JNe(e,r){const n={...r};for(const i in r){const a=e[i],o=r[i];/^on[A-Z]/.test(i)?a&&o?n[i]=(...c)=>{const u=o(...c);return a(...c),u}:a&&(n[i]=a):i==="style"?n[i]={...a,...o}:i==="className"&&(n[i]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function ZNe(e){var i,a;let r=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=r&&"isReactWarning"in r&&r.isReactWarning;return n?e.ref:(r=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=r&&"isReactWarning"in r&&r.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function p_(e){const r=e+"CollectionProvider",[n,i]=rs(r),[a,o]=n(r,{collectionRef:{current:null},itemMap:new Map}),l=g=>{const{scope:y,children:x}=g,b=ee.useRef(null),v=ee.useRef(new Map).current;return s.jsx(a,{scope:y,itemMap:v,collectionRef:b,children:x})};l.displayName=r;const c=e+"CollectionSlot",u=fg(c),d=ee.forwardRef((g,y)=>{const{scope:x,children:b}=g,v=o(c,x),j=Mr(y,v.collectionRef);return s.jsx(u,{ref:j,children:b})});d.displayName=c;const h=e+"CollectionItemSlot",f="data-radix-collection-item",p=fg(h),m=ee.forwardRef((g,y)=>{const{scope:x,children:b,...v}=g,j=ee.useRef(null),_=Mr(y,j),C=o(h,x);return ee.useEffect(()=>(C.itemMap.set(j,{ref:j,...v}),()=>void C.itemMap.delete(j))),s.jsx(p,{[f]:"",ref:_,children:b})});m.displayName=h;function A(g){const y=o(e+"CollectionConsumer",g);return ee.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const v=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((C,N)=>v.indexOf(C.ref.current)-v.indexOf(N.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:l,Slot:d,ItemSlot:m},A,i]}var eSe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rt=eSe.reduce((e,r)=>{const n=fg(`Primitive.${r}`),i=w.forwardRef((a,o)=>{const{asChild:l,...c}=a,u=l?n:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(u,{...c,ref:o})});return i.displayName=`Primitive.${r}`,{...e,[r]:i}},{});function BU(e,r){e&&Kh.flushSync(()=>e.dispatchEvent(r))}function To(e){const r=w.useRef(e);return w.useEffect(()=>{r.current=e}),w.useMemo(()=>(...n)=>{var i;return(i=r.current)==null?void 0:i.call(r,...n)},[])}function tSe(e,r=globalThis==null?void 0:globalThis.document){const n=To(e);w.useEffect(()=>{const i=a=>{a.key==="Escape"&&n(a)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[n,r])}var rSe="DismissableLayer",qL="dismissableLayer.update",nSe="dismissableLayer.pointerDownOutside",iSe="dismissableLayer.focusOutside",jV,voe=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),F0=w.forwardRef((e,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...u}=e,d=w.useContext(voe),[h,f]=w.useState(null),p=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=w.useState({}),A=Mr(r,N=>f(N)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),b=h?g.indexOf(h):-1,v=d.layersWithOutsidePointerEventsDisabled.size>0,j=b>=x,_=sSe(N=>{const S=N.target,E=[...d.branches].some(O=>O.contains(S));!j||E||(a==null||a(N),l==null||l(N),N.defaultPrevented||c==null||c())},p),C=oSe(N=>{const S=N.target;[...d.branches].some(O=>O.contains(S))||(o==null||o(N),l==null||l(N),N.defaultPrevented||c==null||c())},p);return tSe(N=>{b===d.layers.size-1&&(i==null||i(N),!N.defaultPrevented&&c&&(N.preventDefault(),c()))},p),w.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(jV=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),_V(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=jV)}},[h,p,n,d]),w.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),_V())},[h,d]),w.useEffect(()=>{const N=()=>m({});return document.addEventListener(qL,N),()=>document.removeEventListener(qL,N)},[]),s.jsx(Rt.div,{...u,ref:A,style:{pointerEvents:v?j?"auto":"none":void 0,...e.style},onFocusCapture:bt(e.onFocusCapture,C.onFocusCapture),onBlurCapture:bt(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:bt(e.onPointerDownCapture,_.onPointerDownCapture)})});F0.displayName=rSe;var aSe="DismissableLayerBranch",boe=w.forwardRef((e,r)=>{const n=w.useContext(voe),i=w.useRef(null),a=Mr(r,i);return w.useEffect(()=>{const o=i.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),s.jsx(Rt.div,{...e,ref:a})});boe.displayName=aSe;function sSe(e,r=globalThis==null?void 0:globalThis.document){const n=To(e),i=w.useRef(!1),a=w.useRef(()=>{});return w.useEffect(()=>{const o=c=>{if(c.target&&!i.current){let u=function(){woe(nSe,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(r.removeEventListener("click",a.current),a.current=u,r.addEventListener("click",a.current,{once:!0})):u()}else r.removeEventListener("click",a.current);i.current=!1},l=window.setTimeout(()=>{r.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),r.removeEventListener("pointerdown",o),r.removeEventListener("click",a.current)}},[r,n]),{onPointerDownCapture:()=>i.current=!0}}function oSe(e,r=globalThis==null?void 0:globalThis.document){const n=To(e),i=w.useRef(!1);return w.useEffect(()=>{const a=o=>{o.target&&!i.current&&woe(iSe,n,{originalEvent:o},{discrete:!1})};return r.addEventListener("focusin",a),()=>r.removeEventListener("focusin",a)},[r,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function _V(){const e=new CustomEvent(qL);document.dispatchEvent(e)}function woe(e,r,n,{discrete:i}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});r&&a.addEventListener(e,r,{once:!0}),i?BU(a,o):a.dispatchEvent(o)}var lSe=F0,cSe=boe,xa=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},uSe="Portal",A_=w.forwardRef((e,r)=>{var c;const{container:n,...i}=e,[a,o]=w.useState(!1);xa(()=>o(!0),[]);const l=n||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?loe.createPortal(s.jsx(Rt.div,{...i,ref:r}),l):null});A_.displayName=uSe;function dSe(e,r){return w.useReducer((n,i)=>r[n][i]??n,e)}var cl=e=>{const{present:r,children:n}=e,i=hSe(r),a=typeof n=="function"?n({present:i.isPresent}):w.Children.only(n),o=Mr(i.ref,fSe(a));return typeof n=="function"||i.isPresent?w.cloneElement(a,{ref:o}):null};cl.displayName="Presence";function hSe(e){const[r,n]=w.useState(),i=w.useRef(null),a=w.useRef(e),o=w.useRef("none"),l=e?"mounted":"unmounted",[c,u]=dSe(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const d=sN(i.current);o.current=c==="mounted"?d:"none"},[c]),xa(()=>{const d=i.current,h=a.current;if(h!==e){const p=o.current,m=sN(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(h&&p!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),xa(()=>{if(r){let d;const h=r.ownerDocument.defaultView??window,f=m=>{const g=sN(i.current).includes(m.animationName);if(m.target===r&&g&&(u("ANIMATION_END"),!a.current)){const y=r.style.animationFillMode;r.style.animationFillMode="forwards",d=h.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=y)})}},p=m=>{m.target===r&&(o.current=sN(i.current))};return r.addEventListener("animationstart",p),r.addEventListener("animationcancel",f),r.addEventListener("animationend",f),()=>{h.clearTimeout(d),r.removeEventListener("animationstart",p),r.removeEventListener("animationcancel",f),r.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[r,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:w.useCallback(d=>{i.current=d?getComputedStyle(d):null,n(d)},[])}}function sN(e){return(e==null?void 0:e.animationName)||"none"}function fSe(e){var i,a;let r=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=r&&"isReactWarning"in r&&r.isReactWarning;return n?e.ref:(r=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=r&&"isReactWarning"in r&&r.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mSe=D6[" useInsertionEffect ".trim().toString()]||xa;function nl({prop:e,defaultProp:r,onChange:n=()=>{},caller:i}){const[a,o,l]=pSe({defaultProp:r,onChange:n}),c=e!==void 0,u=c?e:a;{const h=w.useRef(e!==void 0);w.useEffect(()=>{const f=h.current;f!==c&&console.warn(`${i} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=c},[c,i])}const d=w.useCallback(h=>{var f;if(c){const p=ASe(h)?h(e):h;p!==e&&((f=l.current)==null||f.call(l,p))}else o(h)},[c,e,o,l]);return[u,d]}function pSe({defaultProp:e,onChange:r}){const[n,i]=w.useState(e),a=w.useRef(n),o=w.useRef(r);return mSe(()=>{o.current=r},[r]),w.useEffect(()=>{var l;a.current!==n&&((l=o.current)==null||l.call(o,n),a.current=n)},[n,a]),[n,i,o]}function ASe(e){return typeof e=="function"}var joe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),gSe="VisuallyHidden",t4=w.forwardRef((e,r)=>s.jsx(Rt.span,{...e,ref:r,style:{...joe,...e.style}}));t4.displayName=gSe;var xSe=t4,TU="ToastProvider",[PU,ySe,vSe]=p_("Toast"),[_oe,wUt]=rs("Toast",[vSe]),[bSe,r4]=_oe(TU),Coe=e=>{const{__scopeToast:r,label:n="Notification",duration:i=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:l}=e,[c,u]=w.useState(null),[d,h]=w.useState(0),f=w.useRef(!1),p=w.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${TU}\`. Expected non-empty \`string\`.`),s.jsx(PU.Provider,{scope:r,children:s.jsx(bSe,{scope:r,label:n,duration:i,swipeDirection:a,swipeThreshold:o,toastCount:d,viewport:c,onViewportChange:u,onToastAdd:w.useCallback(()=>h(m=>m+1),[]),onToastRemove:w.useCallback(()=>h(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:l})})};
40Coe.displayName=TU;var Noe="ToastViewport",wSe=["F8"],KL="toast.viewportPause",GL="toast.viewportResume",Soe=w.forwardRef((e,r)=>{const{__scopeToast:n,hotkey:i=wSe,label:a="Notifications ({hotkey})",...o}=e,l=r4(Noe,n),c=ySe(n),u=w.useRef(null),d=w.useRef(null),h=w.useRef(null),f=w.useRef(null),p=Mr(r,f,l.onViewportChange),m=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=l.toastCount>0;w.useEffect(()=>{const y=x=>{var v;i.length!==0&&i.every(j=>x[j]||x.code===j)&&((v=f.current)==null||v.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[i]),w.useEffect(()=>{const y=u.current,x=f.current;if(A&&y&&x){const b=()=>{if(!l.isClosePausedRef.current){const C=new CustomEvent(KL);x.dispatchEvent(C),l.isClosePausedRef.current=!0}},v=()=>{if(l.isClosePausedRef.current){const C=new CustomEvent(GL);x.dispatchEvent(C),l.isClosePausedRef.current=!1}},j=C=>{!y.contains(C.relatedTarget)&&v()},_=()=>{y.contains(document.activeElement)||v()};return y.addEventListener("focusin",b),y.addEventListener("focusout",j),y.addEventListener("pointermove",b),y.addEventListener("pointerleave",_),window.addEventListener("blur",b),window.addEventListener("focus",v),()=>{y.removeEventListener("focusin",b),y.removeEventListener("focusout",j),y.removeEventListener("pointermove",b),y.removeEventListener("pointerleave",_),window.removeEventListener("blur",b),window.removeEventListener("focus",v)}}},[A,l.isClosePausedRef]);const g=w.useCallback(({tabbingDirection:y})=>{const b=c().map(v=>{const j=v.ref.current,_=[j,...OSe(j)];return y==="forwards"?_:_.reverse()});return(y==="forwards"?b.reverse():b).flat()},[c]);return w.useEffect(()=>{const y=f.current;if(y){const x=b=>{var _,C,N;const v=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!v){const S=document.activeElement,E=b.shiftKey;if(b.target===y&&E){(_=d.current)==null||_.focus();return}const T=g({tabbingDirection:E?"backwards":"forwards"}),F=T.findIndex(I=>I===S);XP(T.slice(F+1))?b.preventDefault():E?(C=d.current)==null||C.focus():(N=h.current)==null||N.focus()}};return y.addEventListener("keydown",x),()=>y.removeEventListener("keydown",x)}},[c,g]),s.jsxs(cSe,{ref:u,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:A?void 0:"none"},children:[A&&s.jsx(XL,{ref:d,onFocusFromOutsideViewport:()=>{const y=g({tabbingDirection:"forwards"});XP(y)}}),s.jsx(PU.Slot,{scope:n,children:s.jsx(Rt.ol,{tabIndex:-1,...o,ref:p})}),A&&s.jsx(XL,{ref:h,onFocusFromOutsideViewport:()=>{const y=g({tabbingDirection:"backwards"});XP(y)}})]})});Soe.displayName=Noe;var koe="ToastFocusProxy",XL=w.forwardRef((e,r)=>{const{__scopeToast:n,onFocusFromOutsideViewport:i,...a}=e,o=r4(koe,n);return s.jsx(t4,{"aria-hidden":!0,tabIndex:0,...a,ref:r,style:{position:"fixed"},onFocus:l=>{var d;const c=l.relatedTarget;!((d=o.viewport)!=null&&d.contains(c))&&i()}})});XL.displayName=koe;var g_="Toast",jSe="toast.swipeStart",_Se="toast.swipeMove",CSe="toast.swipeCancel",NSe="toast.swipeEnd",Eoe=w.forwardRef((e,r)=>{const{forceMount:n,open:i,defaultOpen:a,onOpenChange:o,...l}=e,[c,u]=nl({prop:i,defaultProp:a??!0,onChange:o,caller:g_});return s.jsx(cl,{present:n||c,children:s.jsx(ESe,{open:c,...l,ref:r,onClose:()=>u(!1),onPause:To(e.onPause),onResume:To(e.onResume),onSwipeStart:bt(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:bt(e.onSwipeMove,d=>{const{x:h,y:f}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${h}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:bt(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:bt(e.onSwipeEnd,d=>{const{x:h,y:f}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${h}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),u(!1)})})})});Eoe.displayName=g_;var[SSe,kSe]=_oe(g_,{onClose(){}}),ESe=w.forwardRef((e,r)=>{const{__scopeToast:n,type:i="foreground",duration:a,open:o,onClose:l,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:h,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:m,...A}=e,g=r4(g_,n),[y,x]=w.useState(null),b=Mr(r,I=>x(I)),v=w.useRef(null),j=w.useRef(null),_=a||g.duration,C=w.useRef(0),N=w.useRef(_),S=w.useRef(0),{onToastAdd:E,onToastRemove:O}=g,B=To(()=>{var D;(y==null?void 0:y.contains(document.activeElement))&&((D=g.viewport)==null||D.focus()),l()}),T=w.useCallback(I=>
vendor: 4,555 bytes, line 40
40{!I||I===1/0||(window.clearTimeout(S.current),C.current=new Date().getTime(),S.current=window.setTimeout(B,I))},[B]);w.useEffect(()=>{const I=g.viewport;if(I){const D=()=>{T(N.current),d==null||d()},L=()=>{const V=new Date().getTime()-C.current;N.current=N.current-V,window.clearTimeout(S.current),u==null||u()};return I.addEventListener(KL,L),I.addEventListener(GL,D),()=>{I.removeEventListener(KL,L),I.removeEventListener(GL,D)}}},[g.viewport,_,u,d,T]),w.useEffect(()=>{o&&!g.isClosePausedRef.current&&T(_)},[o,_,g.isClosePausedRef,T]),w.useEffect(()=>(E(),()=>O()),[E,O]);const F=w.useMemo(()=>y?Loe(y):null,[y]);return g.viewport?s.jsxs(s.Fragment,{children:[F&&s.jsx(BSe,{__scopeToast:n,role:"status","aria-live":i==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),s.jsx(SSe,{scope:n,onClose:B,children:Kh.createPortal(s.jsx(PU.ItemSlot,{scope:n,children:s.jsx(lSe,{asChild:!0,onEscapeKeyDown:bt(c,()=>{g.isFocusedToastEscapeKeyDownRef.current||B(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(Rt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...A,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:bt(e.onKeyDown,I=>{I.key==="Escape"&&(c==null||c(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:bt(e.onPointerDown,I=>{I.button===0&&(v.current={x:I.clientX,y:I.clientY})}),onPointerMove:bt(e.onPointerMove,I=>{if(!v.current)return;const D=I.clientX-v.current.x,L=I.clientY-v.current.y,V=!!j.current,U=["left","right"].includes(g.swipeDirection),Q=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,$=U?Q(0,D):0,q=U?0:Q(0,L),M=I.pointerType==="touch"?10:2,z={x:$,y:q},K={originalEvent:I,delta:z};V?(j.current=z,oN(_Se,f,K,{discrete:!1})):CV(z,g.swipeDirection,M)?(j.current=z,oN(jSe,h,K,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(D)>M||Math.abs(L)>M)&&(v.current=null)}),onPointerUp:bt(e.onPointerUp,I=>{const D=j.current,L=I.target;if(L.hasPointerCapture(I.pointerId)&&L.releasePointerCapture(I.pointerId),j.current=null,v.current=null,D){const V=I.currentTarget,U={originalEvent:I,delta:D};CV(D,g.swipeDirection,g.swipeThreshold)?oN(NSe,m,U,{discrete:!0}):oN(CSe,p,U,{discrete:!0}),V.addEventListener("click",Q=>Q.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),BSe=e=>{const{__scopeToast:r,children:n,...i}=e,a=r4(g_,r),[o,l]=w.useState(!1),[c,u]=w.useState(!1);return ISe(()=>l(!0)),w.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:s.jsx(A_,{asChild:!0,children:s.jsx(t4,{...i,children:o&&s.jsxs(s.Fragment,{children:[a.label," ",n]})})})},TSe="ToastTitle",Boe=w.forwardRef((e,r)=>{const{__scopeToast:n,...i}=e;return s.jsx(Rt.div,{...i,ref:r})});Boe.displayName=TSe;var PSe="ToastDescription",Toe=w.forwardRef((e,r)=>{const{__scopeToast:n,...i}=e;return s.jsx(Rt.div,{...i,ref:r})});Toe.displayName=PSe;var Poe="ToastAction",Ioe=w.forwardRef((e,r)=>{const{altText:n,...i}=e;return n.trim()?s.jsx(Ooe,{altText:n,asChild:!0,children:s.jsx(IU,{...i,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${Poe}\`. Expected non-empty \`string\`.`),null)});Ioe.displayName=Poe;var Foe="ToastClose",IU=w.forwardRef((e,r)=>{const{__scopeToast:n,...i}=e,a=kSe(Foe,n);return s.jsx(Ooe,{asChild:!0,children:s.jsx(Rt.button,{type:"button",...i,ref:r,onClick:bt(e.onClick,a.onClose)})})});IU.displayName=Foe;var Ooe=w.forwardRef((e,r)=>{const{__scopeToast:n,altText:i,...a}=e;return s.jsx(Rt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...a,ref:r})});function Loe(e){const r=[];return Array.from(e.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&r.push(i.textContent),FSe(i)){const a=i.ariaHidden||i.hidden||i.style.display==="none",o=i.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const l=i.dataset.radixToastAnnounceAlt;l&&r.push(l)}else r.push(...Loe(i))}}),r}function oN(e,r,n,{discrete:i}){const a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});r&&a.addEventListener(e,r,{once:!0}),i?BU(a,o):a.dispatchEvent(o)}var CV=(e,r,n=0)=>{const i=Math.abs(e.x),a=Math.abs(e.y),o=i>a;return r==="left"||r==="right"?o&&i>n:!o&&a>n};function ISe(e=()=>{}){const r=To(e);xa(()=>{let n=0,i=0;return n=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(i)}},[r])}
vendor: 4,271 bytes, lines 40-79
40function FSe(e){return e.nodeType===e.ELEMENT_NODE}function OSe(e){const r=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const a=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||a?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)r.push(n.currentNode);return r}function XP(e){const r=document.activeElement;return e.some(n=>n===r?!0:(n.focus(),document.activeElement!==r))}var LSe=Coe,Roe=Soe,Doe=Eoe,Moe=Boe,zoe=Toe,Uoe=Ioe,$oe=IU;function Qoe(e){var r,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(n=Qoe(e[r]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function fn(){for(var e,r,n=0,i="",a=arguments.length;n<a;n++)(e=arguments[n])&&(r=Qoe(e))&&(i&&(i+=" "),i+=r);return i}const NV=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,SV=fn,O0=(e,r)=>n=>{var i;if((r==null?void 0:r.variants)==null)return SV(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=r,l=Object.keys(a).map(d=>{const h=n==null?void 0:n[d],f=o==null?void 0:o[d];if(h===null)return null;const p=NV(h)||NV(f);return a[d][p]}),c=n&&Object.entries(n).reduce((d,h)=>{let[f,p]=h;return p===void 0||(d[f]=p),d},{}),u=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((d,h)=>{let{class:f,className:p,...m}=h;return Object.entries(m).every(A=>{let[g,y]=A;return Array.isArray(y)?y.includes({...o,...c}[g]):{...o,...c}[g]===y})?[...d,f,p]:d},[]);return SV(e,l,u,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const RSe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Hoe=(...e)=>e.filter((r,n,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===n).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var DSe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const MSe=w.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:a="",children:o,iconNode:l,...c},u)=>w.createElement("svg",{ref:u,...DSe,width:r,height:r,stroke:e,strokeWidth:i?Number(n)*24/Number(r):n,className:Hoe("lucide",a),...c},[...l.map(([d,h])=>w.createElement(d,h)),...Array.isArray(o)?o:[o]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const Re=(e,r)=>{const n=w.forwardRef(({className:i,...a},o)=>w.createElement(MSe,{ref:o,iconNode:r,className:Hoe(`lucide-${RSe(e)}`,i),...a}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const Voe=Re("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const zSe=Re("ArrowDownLeft",[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const USe=Re("ArrowDownRight",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const Dv=Re("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const Gh=Re("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const rn=Re("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const Gt=Re("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const Woe=Re("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const qoe=Re("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const n4=Re("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const oo=Re("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const Koe=Re("Bitcoin",[["path",{d:"M11.767 19.089c4.924.868 6.14-6.025 1.216-6.894m-1.216 6.894L5.86 18.047m5.908 1.042-.347 1.97m1.563-8.864c4.924.869 6.14-6.025 1.215-6.893m-1.215 6.893-3.94-.694m5.155-6.2L8.29 4.26m5.908 1.042.348-1.97M7.48 20.364l3.126-17.727",key:"yr8idg"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const es=Re("Blocks",[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const yr=Re("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const Ec=Re("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const ff=Re("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const $Se=Re("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const L0=Re("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
150],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const mg=Re("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const Ja=Re("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const QSe=Re("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const Eo=Re("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const HSe=Re("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const Bc=Re("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const Vl=Re("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const pg=Re("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const hs=Re("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const i4=Re("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const k2=Re("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const Xh=Re("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const hn=Re("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
216 * @license lucide-react v0.462.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const VSe=Re("CircleDollarSign",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]);/**
221 * @license lucide-react v0.462.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const ms=Re("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
226 * @license lucide-react v0.462.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const kV=Re("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
231 * @license lucide-react v0.462.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const YL=Re("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
236 * @license lucide-react v0.462.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const Yh=Re("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
241 * @license lucide-react v0.462.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const Goe=Re("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
246 * @license lucide-react v0.462.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const ki=Re("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
251 * @license lucide-react v0.462.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const WSe=Re("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
256 * @license lucide-react v0.462.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const qy=Re("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
261 * @license lucide-react v0.462.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const qSe=Re("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
266 * @license lucide-react v0.462.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const Wi=Re("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/**
271 * @license lucide-react v0.462.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const KSe=Re("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);/**
276 * @license lucide-react v0.462.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const Jh=Re("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
281 * @license lucide-react v0.462.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const Mv=Re("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
286 * @license lucide-react v0.462.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const JL=Re("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
291 * @license lucide-react v0.462.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const Ko=Re("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
296 * @license lucide-react v0.462.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const E2=Re("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
301 * @license lucide-react v0.462.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const GSe=Re("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
306 * @license lucide-react v0.462.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const Wl=Re("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
311 * @license lucide-react v0.462.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const XSe=Re("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
316 * @license lucide-react v0.462.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const Xoe=Re("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
321 * @license lucide-react v0.462.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const Yr=Re("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
326 * @license lucide-react v0.462.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const x_=Re("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
331 * @license lucide-react v0.462.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const Oi=Re("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
336 * @license lucide-react v0.462.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const Yoe=Re("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
341 * @license lucide-react v0.462.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const YSe=Re("FileCheck2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m3 15 2 2 4-4",key:"1lhrkk"}]]);/**
346 * @license lucide-react v0.462.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const JSe=Re("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
351 * @license lucide-react v0.462.0 - ISC
352 *
353 * This source code is licensed under the ISC license.
354 * See the LICENSE file in the root directory of this source tree.
355 */const Joe=Re("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/**
356 * @license lucide-react v0.462.0 - ISC
357 *
358 * This source code is licensed under the ISC license.
359 * See the LICENSE file in the root directory of this source tree.
360 */const us=Re("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
361 * @license lucide-react v0.462.0 - ISC
362 *
363 * This source code is licensed under the ISC license.
364 * See the LICENSE file in the root directory of this source tree.
365 */const ZSe=Re("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
366 * @license lucide-react v0.462.0 - ISC
367 *
368 * This source code is licensed under the ISC license.
369 * See the LICENSE file in the root directory of this source tree.
370 */const ZL=Re("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
371 * @license lucide-react v0.462.0 - ISC
372 *
373 * This source code is licensed under the ISC license.
374 * See the LICENSE file in the root directory of this source tree.
375 */const y_=Re("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
376 * @license lucide-react v0.462.0 - ISC
377 *
378 * This source code is licensed under the ISC license.
379 * See the LICENSE file in the root directory of this source tree.
380 */const cE=Re("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
381 * @license lucide-react v0.462.0 - ISC
382 *
383 * This source code is licensed under the ISC license.
384 * See the LICENSE file in the root directory of this source tree.
385 */const eke=Re("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
386 * @license lucide-react v0.462.0 - ISC
387 *
388 * This source code is licensed under the ISC license.
389 * See the LICENSE file in the root directory of this source tree.
390 */const Eu=Re("Gamepad2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]);/**
391 * @license lucide-react v0.462.0 - ISC
392 *
393 * This source code is licensed under the ISC license.
394 * See the LICENSE file in the root directory of this source tree.
395 */const tke=Re("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
396 * @license lucide-react v0.462.0 - ISC
397 *
398 * This source code is licensed under the ISC license.
399 * See the LICENSE file in the root directory of this source tree.
400 */const Dr=Re("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
401 * @license lucide-react v0.462.0 - ISC
402 *
403 * This source code is licensed under the ISC license.
404 * See the LICENSE file in the root directory of this source tree.
405 */const Rr=Re("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
406 * @license lucide-react v0.462.0 - ISC
407 *
408 * This source code is licensed under the ISC license.
409 * See the LICENSE file in the root directory of this source tree.
410 */const FU=Re("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
411 * @license lucide-react v0.462.0 - ISC
412 *
413 * This source code is licensed under the ISC license.
414 * See the LICENSE file in the root directory of this source tree.
415 */const Zoe=Re("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]);/**
416 * @license lucide-react v0.462.0 - ISC
417 *
418 * This source code is licensed under the ISC license.
419 * See the LICENSE file in the root directory of this source tree.
420 */const rke=Re("HardDriveDownload",[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m16 6-4 4-4-4",key:"6wukr"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",key:"w68u3i"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M10 18h.01",key:"h775k"}]]);/**
421 * @license lucide-react v0.462.0 - ISC
422 *
423 * This source code is licensed under the ISC license.
424 * See the LICENSE file in the root directory of this source tree.
425 */const EV=Re("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}
425]]);/**
426 * @license lucide-react v0.462.0 - ISC
427 *
428 * This source code is licensed under the ISC license.
429 * See the LICENSE file in the root directory of this source tree.
430 */const zv=Re("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
431 * @license lucide-react v0.462.0 - ISC
432 *
433 * This source code is licensed under the ISC license.
434 * See the LICENSE file in the root directory of this source tree.
435 */const OU=Re("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
436 * @license lucide-react v0.462.0 - ISC
437 *
438 * This source code is licensed under the ISC license.
439 * See the LICENSE file in the root directory of this source tree.
440 */const nke=Re("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
441 * @license lucide-react v0.462.0 - ISC
442 *
443 * This source code is licensed under the ISC license.
444 * See the LICENSE file in the root directory of this source tree.
445 */const il=Re("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
446 * @license lucide-react v0.462.0 - ISC
447 *
448 * This source code is licensed under the ISC license.
449 * See the LICENSE file in the root directory of this source tree.
450 */const ele=Re("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
451 * @license lucide-react v0.462.0 - ISC
452 *
453 * This source code is licensed under the ISC license.
454 * See the LICENSE file in the root directory of this source tree.
455 */const BV=Re("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
456 * @license lucide-react v0.462.0 - ISC
457 *
458 * This source code is licensed under the ISC license.
459 * See the LICENSE file in the root directory of this source tree.
460 */const Zh=Re("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);/**
461 * @license lucide-react v0.462.0 - ISC
462 *
463 * This source code is licensed under the ISC license.
464 * See the LICENSE file in the root directory of this source tree.
465 */const op=Re("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
466 * @license lucide-react v0.462.0 - ISC
467 *
468 * This source code is licensed under the ISC license.
469 * See the LICENSE file in the root directory of this source tree.
470 */const ike=Re("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
471 * @license lucide-react v0.462.0 - ISC
472 *
473 * This source code is licensed under the ISC license.
474 * See the LICENSE file in the root directory of this source tree.
475 */const tle=Re("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/**
476 * @license lucide-react v0.462.0 - ISC
477 *
478 * This source code is licensed under the ISC license.
479 * See the LICENSE file in the root directory of this source tree.
480 */const Ag=Re("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
481 * @license lucide-react v0.462.0 - ISC
482 *
483 * This source code is licensed under the ISC license.
484 * See the LICENSE file in the root directory of this source tree.
485 */const ake=Re("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",ke
485y:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
486 * @license lucide-react v0.462.0 - ISC
487 *
488 * This source code is licensed under the ISC license.
489 * See the LICENSE file in the root directory of this source tree.
490 */const rle=Re("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
491 * @license lucide-react v0.462.0 - ISC
492 *
493 * This source code is licensed under the ISC license.
494 * See the LICENSE file in the root directory of this source tree.
495 */const LU=Re("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
496 * @license lucide-react v0.462.0 - ISC
497 *
498 * This source code is licensed under the ISC license.
499 * See the LICENSE file in the root directory of this source tree.
500 */const ske=Re("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
501 * @license lucide-react v0.462.0 - ISC
502 *
503 * This source code is licensed under the ISC license.
504 * See the LICENSE file in the root directory of this source tree.
505 */const rt=Re("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
506 * @license lucide-react v0.462.0 - ISC
507 *
508 * This source code is licensed under the ISC license.
509 * See the LICENSE file in the root directory of this source tree.
510 */const JA=Re("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
511 * @license lucide-react v0.462.0 - ISC
512 *
513 * This source code is licensed under the ISC license.
514 * See the LICENSE file in the root directory of this source tree.
515 */const a4=Re("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
516 * @license lucide-react v0.462.0 - ISC
517 *
518 * This source code is licensed under the ISC license.
519 * See the LICENSE file in the root directory of this source tree.
520 */const s4=Re("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
521 * @license lucide-react v0.462.0 - ISC
522 *
523 * This source code is licensed under the ISC license.
524 * See the LICENSE file in the root directory of this source tree.
525 */const oke=Re("MailX",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h9",key:"1j9vog"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m17 17 4 4",key:"1b3523"}],["path",{d:"m21 17-4 4",key:"uinynz"}]]);/**
526 * @license lucide-react v0.462.0 - ISC
527 *
528 * This source code is licensed under the ISC license.
529 * See the LICENSE file in the root directory of this source tree.
530 */const Za=Re("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
531 * @license lucide-react v0.462.0 - ISC
532 *
533 * This source code is licensed under the ISC license.
534 * See the LICENSE file in the root directory of this source tree.
535 */const Mg=Re("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
536 * @license lucide-react v0.462.0 - ISC
537 *
538 * This source code is licensed under the ISC license.
539 * See the LICENSE file in the root directory of this source tree.
540 */const lke=Re("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
541 * @license lucide-react v0.462.0 - ISC
542 *
543 * This source code is licensed under the ISC license.
544 * See the LICENSE file in the root directory of this source tree.
545 */const RU=Re("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/**
546 * @license lucide-react v0.462.0 - ISC
547 *
548 * This source code is licensed under the ISC license.
549 * See the LICENSE file in the root directory of this source tree.
550 */const DU=Re("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
551 * @license lucide-react v0.462.0 - ISC
552 *
553 * This source code is licensed under the ISC license.
554 * See the LICENSE file in the root directory of this source tree.
555 */const cke=Re("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
556 * @license lucide-react v0.462.0 - ISC
557 *
558 * This source code is licensed under the ISC license.
559 * See the LICENSE file in the root directory of this source tree.
560 */const o4=Re("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
561 * @license lucide-react v0.462.0 - ISC
562 *
563 * This source code is licensed under the ISC license.
564 * See the LICENSE file in the root directory of this source tree.
565 */const nle=Re("MessageSquareCode",[["path",{d:"M10 7.5 8 10l2 2.5",key:"xb17xw"}],["path",{d:"m14 7.5 2 2.5-2 2.5",key:"5rap1v"}],["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
566 * @license lucide-react v0.462.0 - ISC
567 *
568 * This source code is licensed under the ISC license.
569 * See the LICENSE file in the root directory of this source tree.
570 */const ile=Re("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
571 * @license lucide-react v0.462.0 - ISC
572 *
573 * This source code is licensed under the ISC license.
574 * See the LICENSE file in the root directory of this source tree.
575 */const eR=Re("MicVocal",[["path",{d:"m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12",key:"80a601"}],["path",{d:"M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5",key:"j0ngtp"}],["circle",{cx:"16",cy:"7",r:"5",key:"d08jfb"}]]);/**
576 * @license lucide-react v0.462.0 - ISC
577 *
578 * This source code is licensed under the ISC license.
579 * See the LICENSE file in the root directory of this source tree.
580 */const uke=Re("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
581 * @license lucide-react v0.462.0 - ISC
582 *
583 * This source code is licensed under the ISC license.
584 * See the LICENSE file in the root directory of this source tree.
585 */const MU=Re("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]);/**
586 * @license lucide-react v0.462.0 - ISC
587 *
588 * This source code is licensed under the ISC license.
589 * See the LICENSE file in the root directory of this source tree.
590 */const dke=Re("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
591 * @license lucide-react v0.462.0 - ISC
592 *
593 * This source code is licensed under the ISC license.
594 * See the LICENSE file in the root directory of this source tree.
595 */const ale=Re("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
596 * @license lucide-react v0.462.0 - ISC
597 *
598 * This source code is licensed under the ISC license.
599 * See the LICENSE file in the root directory of this source tree.
600 */const sle=Re("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
601 * @license lucide-react v0.462.0 - ISC
602 *
603 * This source code is licensed under the ISC license.
604 * See the LICENSE file in the root directory of this source tree.
605 */const l4=Re("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
606 * @license lucide-react v0.462.0 - ISC
607 *
608 * This source code is licensed under the ISC license.
609 * See the LICENSE file in the root directory of this source tree.
610 */const ZA=Re("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/**
611 * @license lucide-react v0.462.0 - ISC
612 *
613 * This source code is licensed under the ISC license.
614 * See the LICENSE file in the root directory of this source tree.
615 */const hke=Re("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
616 * @license lucide-react v0.462.0 - ISC
617 *
618 * This source code is licensed under the ISC license.
619 * See the LICENSE file in the root directory of this source tree.
620 */const Fd=Re("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
621 * @license lucide-react v0.462.0 - ISC
622 *
623 * This source code is licensed under the ISC license.
624 * See the LICENSE file in the root directory of this source tree.
625 */const wp=Re("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
626 * @license lucide-react v0.462.0 - ISC
627 *
628 * This source code is licensed under the ISC license.
629 * See the LICENSE file in the root directory of this source tree.
630 */const ole=Re("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
631 * @license lucide-react v0.462.0 - ISC
632 *
633 * This source code is licensed under the ISC license.
634 * See the LICENSE file in the root directory of this source tree.
635 */const lle=Re("Pickaxe",[["path",{d:"M14.531 12.469 6.619 20.38a1 1 0 1 1-3-3l7.912-7.912",key:"we99rg"}],["path",{d:"M15.686 4.314A12.5 12.5 0 0 0 5.461 2.958 1 1 0 0 0 5.58 4.71a22 22 0 0 1 6.318 3.393",key:"1w6hck"}],["path",{d:"M17.7 3.7a1 1 0 0 0-1.4 0l-4.6 4.6a1 1 0 0 0 0 1.4l2.6 2.6a1 1 0 0 0 1.4 0l4.6-4.6a1 1 0 0 0 0-1.4z",key:"15hgfx"}],["path",{d:"M19.686 8.314a12.501 12.501 0 0 1 1.356 10.225 1 1 0 0 1-1.751-.119 22 22 0 0 0-3.393-6.319",key:"452b4h"}]]);/**
636 * @license lucide-react v0.462.0 - ISC
637 *
638 * This source code is licensed under the ISC license.
639 * See the LICENSE file in the root directory of this source tree.
640 */const fke=Re("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);/**
641 * @license lucide-react v0.462.0 - ISC
642 *
643 * This source code is licensed under the ISC license.
644 * See the LICENSE file in the root directory of this source tree.
645 */const cle=Re("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7
645a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
646 * @license lucide-react v0.462.0 - ISC
647 *
648 * This source code is licensed under the ISC license.
649 * See the LICENSE file in the root directory of this source tree.
650 */const ya=Re("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
651 * @license lucide-react v0.462.0 - ISC
652 *
653 * This source code is licensed under the ISC license.
654 * See the LICENSE file in the root directory of this source tree.
655 */const Qn=Re("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
656 * @license lucide-react v0.462.0 - ISC
657 *
658 * This source code is licensed under the ISC license.
659 * See the LICENSE file in the root directory of this source tree.
660 */const tR=Re("Presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]);/**
661 * @license lucide-react v0.462.0 - ISC
662 *
663 * This source code is licensed under the ISC license.
664 * See the LICENSE file in the root directory of this source tree.
665 */const c4=Re("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
666 * @license lucide-react v0.462.0 - ISC
667 *
668 * This source code is licensed under the ISC license.
669 * See the LICENSE file in the root directory of this source tree.
670 */const ef=Re("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
671 * @license lucide-react v0.462.0 - ISC
672 *
673 * This source code is licensed under the ISC license.
674 * See the LICENSE file in the root directory of this source tree.
675 */const uE=Re("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
676 * @license lucide-react v0.462.0 - ISC
677 *
678 * This source code is licensed under the ISC license.
679 * See the LICENSE file in the root directory of this source tree.
680 */const mke=Re("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
681 * @license lucide-react v0.462.0 - ISC
682 *
683 * This source code is licensed under the ISC license.
684 * See the LICENSE file in the root directory of this source tree.
685 */const pke=Re("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/**
686 * @license lucide-react v0.462.0 - ISC
687 *
688 * This source code is licensed under the ISC license.
689 * See the LICENSE file in the root directory of this source tree.
690 */const dE=Re("Rss",[["path",{d:"M4 11a9 9 0 0 1 9 9",key:"pv89mb"}],["path",{d:"M4 4a16 16 0 0 1 16 16",key:"k0647b"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]]);/**
691 * @license lucide-react v0.462.0 - ISC
692 *
693 * This source code is licensed under the ISC license.
694 * See the LICENSE file in the root directory of this source tree.
695 */const Bu=Re("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
696 * @license lucide-react v0.462.0 - ISC
697 *
698 * This source code is licensed under the ISC license.
699 * See the LICENSE file in the root directory of this source tree.
700 */const Ake=Re("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}
700],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
701 * @license lucide-react v0.462.0 - ISC
702 *
703 * This source code is licensed under the ISC license.
704 * See the LICENSE file in the root directory of this source tree.
705 */const ul=Re("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
706 * @license lucide-react v0.462.0 - ISC
707 *
708 * This source code is licensed under the ISC license.
709 * See the LICENSE file in the root directory of this source tree.
710 */const Dc=Re("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
711 * @license lucide-react v0.462.0 - ISC
712 *
713 * This source code is licensed under the ISC license.
714 * See the LICENSE file in the root directory of this source tree.
715 */const ule=Re("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
716 * @license lucide-react v0.462.0 - ISC
717 *
718 * This source code is licensed under the ISC license.
719 * See the LICENSE file in the root directory of this source tree.
720 */const lp=Re("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
721 * @license lucide-react v0.462.0 - ISC
722 *
723 * This source code is licensed under the ISC license.
724 * See the LICENSE file in the root directory of this source tree.
725 */const zU=Re("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
726 * @license lucide-react v0.462.0 - ISC
727 *
728 * This source code is licensed under the ISC license.
729 * See the LICENSE file in the root directory of this source tree.
730 */const TV=Re("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
731 * @license lucide-react v0.462.0 - ISC
732 *
733 * This source code is licensed under the ISC license.
734 * See the LICENSE file in the root directory of this source tree.
735 */const gke=Re("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
736 * @license lucide-react v0.462.0 - ISC
737 *
738 * This source code is licensed under the ISC license.
739 * See the LICENSE file in the root directory of this source tree.
740 */const u4=Re("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
741 * @license lucide-react v0.462.0 - ISC
742 *
743 * This source code is licensed under the ISC license.
744 * See the LICENSE file in the root directory of this source tree.
745 */const pi=Re("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
746 * @license lucide-react v0.462.0 - ISC
747 *
748 * This source code is licensed under the ISC license.
749 * See the LICENSE file in the root directory of this source tree.
750 */const xke=Re("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}
750],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
751 * @license lucide-react v0.462.0 - ISC
752 *
753 * This source code is licensed under the ISC license.
754 * See the LICENSE file in the root directory of this source tree.
755 */const dle=Re("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);/**
756 * @license lucide-react v0.462.0 - ISC
757 *
758 * This source code is licensed under the ISC license.
759 * See the LICENSE file in the root directory of this source tree.
760 */const hle=Re("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/**
761 * @license lucide-react v0.462.0 - ISC
762 *
763 * This source code is licensed under the ISC license.
764 * See the LICENSE file in the root directory of this source tree.
765 */const d4=Re("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
766 * @license lucide-react v0.462.0 - ISC
767 *
768 * This source code is licensed under the ISC license.
769 * See the LICENSE file in the root directory of this source tree.
770 */const Li=Re("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
771 * @license lucide-react v0.462.0 - ISC
772 *
773 * This source code is licensed under the ISC license.
774 * See the LICENSE file in the root directory of this source tree.
775 */const yke=Re("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
776 * @license lucide-react v0.462.0 - ISC
777 *
778 * This source code is licensed under the ISC license.
779 * See the LICENSE file in the root directory of this source tree.
780 */const cp=Re("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
781 * @license lucide-react v0.462.0 - ISC
782 *
783 * This source code is licensed under the ISC license.
784 * See the LICENSE file in the root directory of this source tree.
785 */const fle=Re("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
786 * @license lucide-react v0.462.0 - ISC
787 *
788 * This source code is licensed under the ISC license.
789 * See the LICENSE file in the root directory of this source tree.
790 */const vke=Re("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
791 * @license lucide-react v0.462.0 - ISC
792 *
793 * This source code is licensed under the ISC license.
794 * See the LICENSE file in the root directory of this source tree.
795 */const Uv=Re("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
796 * @license lucide-react v0.462.0 - ISC
797 *
798 * This source code is licensed under the ISC license.
799 * See the LICENSE file in the root directory of this source tree.
800 */const bke=Re("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/**
801 * @license lucide-react v0.462.0 - ISC
802 *
803 * This source code is licensed under the ISC license.
804 * See the LICENSE file in the root directory of this source tree.
805 */const UU=Re("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/**
806 * @license lucide-react v0.462.0 - ISC
807 *
808 * This source code is licensed under the ISC license.
809 * See the LICENSE file in the root directory of this source tree.
810 */const $U=Re("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]]);/**
811 * @license lucide-react v0.462.0 - ISC
812 *
813 * This source code is licensed under the ISC license.
814 * See the LICENSE file in the root directory of this source tree.
815 */const Xr=Re("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
815],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
816 * @license lucide-react v0.462.0 - ISC
817 *
818 * This source code is licensed under the ISC license.
819 * See the LICENSE file in the root directory of this source tree.
820 */const B2=Re("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
821 * @license lucide-react v0.462.0 - ISC
822 *
823 * This source code is licensed under the ISC license.
824 * See the LICENSE file in the root directory of this source tree.
825 */const oa=Re("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
826 * @license lucide-react v0.462.0 - ISC
827 *
828 * This source code is licensed under the ISC license.
829 * See the LICENSE file in the root directory of this source tree.
830 */const Tu=Re("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
831 * @license lucide-react v0.462.0 - ISC
832 *
833 * This source code is licensed under the ISC license.
834 * See the LICENSE file in the root directory of this source tree.
835 */const Ky=Re("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
836 * @license lucide-react v0.462.0 - ISC
837 *
838 * This source code is licensed under the ISC license.
839 * See the LICENSE file in the root directory of this source tree.
840 */const mle=Re("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
841 * @license lucide-react v0.462.0 - ISC
842 *
843 * This source code is licensed under the ISC license.
844 * See the LICENSE file in the root directory of this source tree.
845 */const wke=Re("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
846 * @license lucide-react v0.462.0 - ISC
847 *
848 * This source code is licensed under the ISC license.
849 * See the LICENSE file in the root directory of this source tree.
850 */const h4=Re("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
851 * @license lucide-react v0.462.0 - ISC
852 *
853 * This source code is licensed under the ISC license.
854 * See the LICENSE file in the root directory of this source tree.
855 */const ple=Re("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
856 * @license lucide-react v0.462.0 - ISC
857 *
858 * This source code is licensed under the ISC license.
859 * See the LICENSE file in the root directory of this source tree.
860 */const jy=Re("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
861 * @license lucide-react v0.462.0 - ISC
862 *
863 * This source code is licensed under the ISC license.
864 * See the LICENSE file in the root directory of this source tree.
865 */const Rn=Re("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
866 * @license lucide-react v0.462.0 - ISC
867 *
868 * This source code is licensed under the ISC license.
869 * See the LICENSE file in the root directory of this source tree.
870 */const Pa=Re("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
871 * @license lucide-react v0.462.0 - ISC
872 *
873 * This source code is licensed under the ISC license.
874 * See the LICENSE file in the root directory of this source tree.
875 */const wo=Re("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
876 * @license lucide-react v0.462.0 - ISC
877 *
878 * This source code is licensed under the ISC license.
879 * See the LICENSE file in the root directory of this source tree.
880 */const zg=Re("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
881 * @license lucide-react v0.462.0 - ISC
882 *
883 * This source code is licensed under the ISC license.
884 * See the LICENSE file in the root directory of this source tree.
885 */const Ale=Re("Vote",[["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}],["path",{d:"M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z",key:"1ezoue"}],["path",{d:"M22 19H2",key:"nuriw5"}]]);/**
886 * @license lucide-react v0.462.0 - ISC
887 *
888 * This source code is licensed under the ISC license.
889 * See the LICENSE file in the root directory of this source tree.
890 */const QU=Re("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/**
891 * @license lucide-react v0.462.0 - ISC
892 *
893 * This source code is licensed under the ISC license.
894 * See the LICENSE file in the root directory of this source tree.
895 */const T2=Re("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
896 * @license lucide-react v0.462.0 - ISC
897 *
898 * This source code is licensed under the ISC license.
899 * See the LICENSE file in the root directory of this source tree.
900 */const gle=Re("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
901 * @license lucide-react v0.462.0 - ISC
902 *
903 * This source code is licensed under the ISC license.
904 * See the LICENSE file in the root directory of this source tree.
905 */const xle=Re("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
906 * @license lucide-react v0.462.0 - ISC
907 *
908 * This source code is licensed under the ISC license.
909 * See the LICENSE file in the root directory of this source tree.
910 */const Uc=Re("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
911 * @license lucide-react v0.462.0 - ISC
912 *
913 * This source code is licensed under the ISC license.
914 * See the LICENSE file in the root directory of this source tree.
915 */const ts=Re("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);/**
916 * @license lucide-react v0.462.0 - ISC
917 *
918 * This source code is licensed under the ISC license.
919 * See the LICENSE file in the root directory of this source tree.
920 */const jke=Re("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/**
921 * @license lucide-react v0.462.0 - ISC
922 *
923 * This source code is licensed under the ISC license.
924 * See the LICENSE file in the root directory of this source tree.
925 */const _ke=Re("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),HU="-",Cke=e=>{const r=Ske(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{const c=l.split(HU);return c[0]===""&&c.length!==1&&c.shift(),yle(c,r)||Nke(l)},getConflictingClassGroupIds:(l,c)=>{const u=n[l]||[];return c&&i[l]?[...u,...i[l]]:u}}},yle=(e,r)=>{var l;if(e.length===0)return r.classGroupId;const n=e[0],i=r.nextPart.get(n),a=i?yle(e.slice(1),i):void 0;if(a)return a;if(r.validators.length===0)return;const o=e.join(HU);return(l=r.validators.find(({validator:c}
vendor: 5,427 bytes, line 925
925)=>c(o)))==null?void 0:l.classGroupId},PV=/^\[(.+)\]$/,Nke=e=>{if(PV.test(e)){const r=PV.exec(e)[1],n=r==null?void 0:r.substring(0,r.indexOf(":"));if(n)return"arbitrary.."+n}},Ske=e=>{const{theme:r,prefix:n}=e,i={nextPart:new Map,validators:[]};return Eke(Object.entries(e.classGroups),n).forEach(([o,l])=>{rR(l,i,o,r)}),i},rR=(e,r,n,i)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?r:IV(r,a);o.classGroupId=n;return}if(typeof a=="function"){if(kke(a)){rR(a(i),r,n,i);return}r.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,l])=>{rR(l,IV(r,o),n,i)})})},IV=(e,r)=>{let n=e;return r.split(HU).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},kke=e=>e.isThemeGetter,Eke=(e,r)=>r?e.map(([n,i])=>{const a=i.map(o=>typeof o=="string"?r+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([l,c])=>[r+l,c])):o);return[n,a]}):e,Bke=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,n=new Map,i=new Map;const a=(o,l)=>{n.set(o,l),r++,r>e&&(r=0,i=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=i.get(o))!==void 0)return a(o,l),l},set(o,l){n.has(o)?n.set(o,l):a(o,l)}}},vle="!",Tke=e=>{const{separator:r,experimentalParseClassName:n}=e,i=r.length===1,a=r[0],o=r.length,l=c=>{const u=[];let d=0,h=0,f;for(let y=0;y<c.length;y++){let x=c[y];if(d===0){if(x===a&&(i||c.slice(y,y+o)===r)){u.push(c.slice(h,y)),h=y+o;continue}if(x==="/"){f=y;continue}}x==="["?d++:x==="]"&&d--}const p=u.length===0?c:c.substring(h),m=p.startsWith(vle),A=m?p.substring(1):p,g=f&&f>h?f-h:void 0;return{modifiers:u,hasImportantModifier:m,baseClassName:A,maybePostfixModifierPosition:g}};return n?c=>n({className:c,parseClassName:l}):l},Pke=e=>{if(e.length<=1)return e;const r=[];let n=[];return e.forEach(i=>{i[0]==="["?(r.push(...n.sort(),i),n=[]):n.push(i)}),r.push(...n.sort()),r},Ike=e=>({cache:Bke(e.cacheSize),parseClassName:Tke(e),...Cke(e)}),Fke=/\s+/,Oke=(e,r)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:a}=r,o=[],l=e.trim().split(Fke);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{modifiers:h,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(d);let A=!!m,g=i(A?p.substring(0,m):p);if(!g){if(!A){c=d+(c.length>0?" "+c:c);continue}if(g=i(p),!g){c=d+(c.length>0?" "+c:c);continue}A=!1}const y=Pke(h).join(":"),x=f?y+vle:y,b=x+g;if(o.includes(b))continue;o.push(b);const v=a(g,A);for(let j=0;j<v.length;++j){const _=v[j];o.push(x+_)}c=d+(c.length>0?" "+c:c)}return c};function Lke(){let e=0,r,n,i="";for(;e<arguments.length;)(r=arguments[e++])&&(n=ble(r))&&(i&&(i+=" "),i+=n);return i}const ble=e=>{if(typeof e=="string")return e;let r,n="";for(let i=0;i<e.length;i++)e[i]&&(r=ble(e[i]))&&(n&&(n+=" "),n+=r);return n};function Rke(e,...r){let n,i,a,o=l;function l(u){const d=r.reduce((h,f)=>f(h),e());return n=Ike(d),i=n.cache.get,a=n.cache.set,o=c,c(u)}function c(u){const d=i(u);if(d)return d;const h=Oke(u,n);return a(u,h),h}return function(){return o(Lke.apply(null,arguments))}}const bi=e=>{const r=n=>n[e]||[];return r.isThemeGetter=!0,r},wle=/^\[(?:([a-z-]+):)?(.+)\]$/i,Dke=/^\d+\/\d+$/,Mke=new Set(["px","full","screen"]),zke=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Uke=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$ke=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qke=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hke=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sh=e=>Gy(e)||Mke.has(e)||Dke.test(e),Rf=e=>R0(e,"length",Jke),Gy=e=>!!e&&!Number.isNaN(Number(e)),YP=e=>R0(e,"number",Gy),u1=e=>!!e&&Number.isInteger(Number(e)),Vke=e=>e.endsWith("%")&&Gy(e.slice(0,-1)),$r=e=>wle.test(e),Df=e=>zke.test(e),Wke=new Set(["length","size","percentage"]),qke=e=>R0(e,Wke,jle),Kke=e=>R0(e,"position",jle),Gke=new Set(["image","url"]),Xke=e=>R0(e,Gke,eEe),Yke=e=>R0(e,"",Zke),d1=()=>!0,R0=(e,r,n)=>{const i=wle.exec(e);return i?i[1]?typeof r=="string"?i[1]===r:r.has(i[1]):n(i[2]):!1},Jke=e=>Uke.test(e)&&!$ke.test(e),jle=()=>!1,Zke=e=>Qke.test(e),eEe=e=>Hke.test(e),tEe=()=>{const e=bi("colors"),r=bi("spacing"),n=bi("blur"),i=bi("brightness"),a=bi("borderColor"),o=bi("borderRadius"),l=bi("borderSpacing"),c=bi("borderWidth"),u=bi("contrast"),d=bi("grayscale"),h=bi("hueRotate"),f=bi("invert"),p=bi("gap"),m=bi("gradientColorStops"),A=bi("gradientColorStopPositions"),g=bi("inset"),y=bi("margin"),x=bi("opacity"),b=bi("padding"),v=bi("saturate"),j=bi("scale"),_=bi("sepia"),C=bi("skew"),N=bi("space"),S=bi("translate"),E=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",$r,r],T=()=>[$r,r],F=()=>["",sh,Rf],I=()=>["auto",Gy,$r],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",$r],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[Gy,$r];return{cacheSize:500,separator:":",theme:{colors:[d1],spacing:[sh,Rf],blur:["none","",Df,$r],brightness:q(),borderColor:[e],borderRadius:["n
925one","","full",Df,$r],borderSpacing:T(),borderWidth:F(),contrast:q(),grayscale:Q(),hueRotate:q(),invert:Q(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[Vke,Rf],inset:B(),margin:B(),opacity:q(),padding:T(),saturate:q(),scale:q(),sepia:Q(),skew:q(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",$r]}],container:["container"],columns:[{columns:[Df]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),$r]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",u1,$r]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$r]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",u1,$r]}],"grid-cols":[{"grid-cols":[d1]}],"col-start-end":[{col:["auto",{span:["full",u1,$r]},$r]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[d1]}],"row-start-end":[{row:["auto",{span:[u1,$r]},$r]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$r]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$r]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$r,r]}],"min-w":[{"min-w":[$r,r,"min","max","fit"]}],"max-w":[{"max-w":[$r,r,"none","full","min","max","fit","prose",{screen:[Df]},Df]}],h:[{h:[$r,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$r,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$r,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$r,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Df,Rf]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",YP]}],"font-family":[{font:[d1]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$r]}],"line-clamp":[{"line-clamp":["none",Gy,YP]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sh,$r]}],"list-image":[{"list-image":["none",$r]}],"list-style-type":[{list:["none","disc","decimal",$r]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sh,Rf]}],"underline-offset":[{"underline-offset":["auto",sh,$r]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$r]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$r]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),Kke]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qke]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Xke]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}
vendor: 5,181 bytes, line 925
925],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:L()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[sh,$r]}],"outline-w":[{outline:[sh,Rf]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[sh,Rf]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Df,Yke]}],"shadow-color":[{shadow:[d1]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Df,$r]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[f]}],saturate:[{saturate:[v]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$r]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",$r]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",$r]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[u1,$r]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$r]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$r]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,669 bytes, line 925
925],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$r]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[sh,Rf,YP]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},rEe=Rke(tEe);function it(...e){return rEe(fn(e))}const nEe=LSe,_le=w.forwardRef(({className:e,...r},n)=>s.jsx(Roe,{ref:n,className:it("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...r}));_le.displayName=Roe.displayName;const iEe=O0("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Cle=w.forwardRef(({className:e,variant:r,...n},i)=>s.jsx(Doe,{ref:i,className:it(iEe({variant:r}),e),...n}));Cle.displayName=Doe.displayName;const aEe=w.forwardRef(({className:e,...r},n)=>s.jsx(Uoe,{ref:n,className:it("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...r}));aEe.displayName=Uoe.displayName;const Nle=w.forwardRef(({className:e,...r},n)=>s.jsx($oe,{ref:n,className:it("absolute right-2 top-2 rounded-md p-1 text-foreground
925/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...r,children:s.jsx(Uc,{className:"h-4 w-4"})}));Nle.displayName=$oe.displayName;const Sle=w.forwardRef(({className:e,...r},n)=>s.jsx(Moe,{ref:n,className:it("text-sm font-semibold",e),...r}));Sle.displayName=Moe.displayName;const kle=w.forwardRef(({className:e,...r},n)=>s.jsx(zoe,{ref:n,className:it("text-sm opacity-90",e),...r}));kle.displayName=zoe.displayName;function sEe(){const{toasts:e}=wn();return s.jsxs(nEe,{children:[e.map(function({id:r,title:n,description:i,action:a,...o}){return s.jsxs(Cle,{...o,children:[s.jsxs("div",{className:"grid gap-1",children:[n&&s.jsx(Sle,{children:n}),i&&s.jsx(kle,{children:i})]}),a,s.jsx(Nle,{})]},r)}),s.jsx(_le,{})]})}var FV=["light","dark"],oEe="(prefers-color-scheme: dark)",lEe=w.createContext(void 0),cEe={setTheme:e=>{},themes:[]},uEe=()=>{var e;return(e=w.useContext(lEe))!=null?e:cEe};w.memo(({forcedTheme:e,storageKey:r,attribute:n,enableSystem:i,enableColorScheme:a,defaultTheme:o,value:l,attrs:c,nonce:u})=>{let d=o==="system",h=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${c.map(A=>`'${A}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=a?FV.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(A,g=!1,y=!0)=>{let x=l?l[A]:A,b=g?A+"|| ''":`'${x}'`,v="";return a&&y&&!g&&FV.includes(A)&&(v+=`d.style.colorScheme = '${A}';`),n==="class"?g||x?v+=`c.add(${b})`:v+="null":x&&(v+=`d[s](n,${b})`),v},m=e?`!function(){${h}${p(e)}}()`:i?`!function(){try{${h}var e=localStorage.getItem('${r}');if('system'===e||(!e&&${d})){var t='${oEe}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${l?`var x=${JSON.stringify(l)};`:""}${p(l?"x[e]":"e",!0)}}${d?"":"else{"+p(o,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${r}');if(e){${l?`var x=${JSON.stringify(l)};`:""}${p(l?"x[e]":"e",!0)}}else{${p(o,!1,!1)};}${f}}catch(t){}}();`;return w.createElement("script",{nonce:u,dangerouslySetInnerHTML:{__html:m}})});var dEe=e=>{switch(e){case"success":return mEe;case"info":return AEe;case"warning":return pEe;case"error":return gEe;default:return null}},hEe=Array(12).fill(0),fEe=({visible:e,className:r})=>ee.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},hEe.map((n,i)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),mEe=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pEe=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),AEe=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gEe=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),xEe=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yEe=()=>{let[e,r]=ee.useState(document.hidden);return ee.useEffect(()=>{let n=()=>{r(document.hidden)};
925return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},nR=1,vEe=class{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{let n=this.subscribers.indexOf(r);this.subscribers.splice(n,1)}),this.publish=r=>{this.subscribers.forEach(n=>n(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var n;let{message:i,...a}=r,o=typeof(r==null?void 0:r.id)=="number"||((n=r.id)==null?void 0:n.length)>0?r.id:nR++,l=this.toasts.find(u=>u.id===o),c=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...r,id:o,title:i}),{...u,...r,id:o,dismissible:c,title:i}):u):this.addToast({title:i,...a,dismissible:c,id:o}),o},this.dismiss=r=>(this.dismissedToasts.add(r),r||this.toasts.forEach(n=>{this.subscribers.forEach(i=>i({id:n.id,dismiss:!0}))}),this.subscribers.forEach(n=>n({id:r,dismiss:!0})),r),this.message=(r,n)=>this.create({...n,message:r}),this.error=(r,n)=>this.create({...n,message:r,type:"error"}),this.success=(r,n)=>this.create({...n,type:"success",message:r}),this.info=(r,n)=>this.create({...n,type:"info",message:r}),this.warning=(r,n)=>this.create({...n,type:"warning",message:r}),this.loading=(r,n)=>this.create({...n,type:"loading",message:r}),this.promise=(r,n)=>{if(!n)return;let i;n.loading!==void 0&&(i=this.create({...n,promise:r,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));let a=r instanceof Promise?r:r(),o=i!==void 0,l,c=a.then(async d=>{if(l=["resolve",d],ee.isValidElement(d))o=!1,this.create({id:i,type:"default",message:d});else if(wEe(d)&&!d.ok){o=!1;let h=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description;this.create({id:i,type:"error",message:h,description:f})}else if(n.success!==void 0){o=!1;let h=typeof n.success=="function"?await n.success(d):n.success,f=typeof n.description=="function"?await n.description(d):n.description;this.create({id:i,type:"success",message:h,description:f})}}).catch(async d=>{if(l=["reject",d],n.error!==void 0){o=!1;let h=typeof n.error=="function"?await n.error(d):n.error,f=typeof n.description=="function"?await n.description(d):n.description;this.create({id:i,type:"error",message:h,description:f})}}).finally(()=>{var d;o&&(this.dismiss(i),i=void 0),(d=n.finally)==null||d.call(n)}),u=()=>new Promise((d,h)=>c.then(()=>l[0]==="reject"?h(l[1]):d(l[1])).catch(h));return typeof i!="string"&&typeof i!="number"?{unwrap:u}:Object.assign(i,{unwrap:u})},this.custom=(r,n)=>{let i=(n==null?void 0:n.id)||nR++;return this.create({jsx:r(i),id:i,...n}),i},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Vo=new vEe,bEe=(e,r)=>{let n=(r==null?void 0:r.id)||nR++;return Vo.addToast({title:e,...r,id:n}),n},wEe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",jEe=bEe,_Ee=()=>Vo.toasts,CEe=()=>Vo.getActiveToasts(),ft=Object.assign(jEe,{success:Vo.success,info:Vo.info,warning:Vo.warning,error:Vo.error,custom:Vo.custom,message:Vo.message,promise:Vo.promise,dismiss:Vo.dismiss,loading:Vo.loading},{getHistory:_Ee,getToasts:CEe});function NEe(e,{insertAt:r}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}NEe(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
925left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
925:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
925--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
926`);function lN(e){return e.label!==void 0}var SEe=3,kEe="32px",EEe="16px",OV=4e3,BEe=356,TEe=14,PEe=20,IEe=200;function Jc(...e){return e.filter(Boolean).join(" ")}function FEe(e){let[r,n]=e.split("-"),i=[];return r&&i.push(r),n&&i.push(n),i}var OEe=e=>{var r,n,i,a,o,l,c,u,d,h,f;let{invert:p,toast:m,unstyled:A,interacting:g,setHeights:y,visibleToasts:x,heights:b,index:v,toasts:j,expanded:_,removeToast:C,defaultRichColors:N,closeButton:S,style:E,cancelButtonStyle:O,actionButtonStyle:B,className:T="",descriptionClassName:F="",duration:I,position:D,gap:L,loadingIcon:V,expandByDefault:U,classNames:Q,icons:$,closeButtonAriaLabel:q="Close toast",pauseWhenPageIsHidden:M}=e,[z,K]=ee.useState(null),[ne,ie]=ee.useState(null),[X,de]=ee.useState(!1),[oe,ce]=ee.useState(!1),[ye,ge]=ee.useState(!1),[Be,Ve]=ee.useState(!1),[te,xe]=ee.useState(!1),[We,ze]=ee.useState(0),[we,J]=ee.useState(0),he=ee.useRef(m.duration||I||OV),je=ee.useRef(null),ve=ee.useRef(null),Pe=v===0,Ie=v+1<=x,ue=m.type,Se=m.dismissible!==!1,He=m.className||"",Qe=m.descriptionClassName||"",ct=ee.useMemo(()=>b.findIndex(nr=>nr.toastId===m.id)||0,[b,m.id]),dt=ee.useMemo(()=>{var nr;return(nr=m.closeButton)!=null?nr:S},[m.closeButton,S]),Fr=ee.useMemo(()=>m.duration||I||OV,[m.duration,I]),Xt=ee.useRef(0),Vt=ee.useRef(0),lr=ee.useRef(0),cr=ee.useRef(null),[Bt,kr]=D.split("-"),ar=ee.useMemo(()=>b.reduce((nr,pr,Gr)=>Gr>=ct?nr:nr+pr.height,0),[b,ct]),ur=yEe(),kn=m.invert||p,Sr=ue==="loading";Vt.current=ee.useMemo(()=>ct*L+ar,[ct,ar]),ee.useEffect(()=>{he.current=Fr},[Fr]),ee.useEffect(()=>{de(!0)},[]),ee.useEffect(()=>{let nr=ve.current;if(nr){let pr=nr.getBoundingClientRect().height;return J(pr),y(Gr=>[{toastId:m.id,height:pr,position:m.position},...Gr]),()=>y(Gr=>Gr.filter(ii=>ii.toastId!==m.id))}},[y,m.id]),ee.useLayoutEffect(()=>{if(!X)return;let nr=ve.current,pr=nr.style.height;nr.style.height="auto";let Gr=nr.getBoundingClientRect().height;nr.style.height=pr,J(Gr),y(ii=>ii.find(pt=>pt.toastId===m.id)?ii.map(pt=>pt.toastId===m.id?{...pt,height:Gr}:pt):[{toastId:m.id,height:Gr,position:m.position},...ii])},[X,m.title,m.description,y,m.id]);let zt=ee.useCallback(()=>{ce(!0),ze(Vt.current),y(nr=>nr.filter(pr=>pr.toastId!==m.id)),setTimeout(()=>{C(m)},IEe)},[m,C,y,Vt]);ee.useEffect(()=>{if(m.promise&&ue==="loading"||m.duration===1/0||m.type==="loading")return;let nr;return _||g||M&&ur?(()=>{if(lr.current<Xt.current){let pr=new Date().getTime()-Xt.current;he.current=he.current-pr}
926lr.current=new Date().getTime()})():he.current!==1/0&&(Xt.current=new Date().getTime(),nr=setTimeout(()=>{var pr;(pr=m.onAutoClose)==null||pr.call(m,m),zt()},he.current)),()=>clearTimeout(nr)},[_,g,m,ue,M,ur,zt]),ee.useEffect(()=>{m.delete&&zt()},[zt,m.delete]);function an(){var nr,pr,Gr;return $!=null&&$.loading?ee.createElement("div",{className:Jc(Q==null?void 0:Q.loader,(nr=m==null?void 0:m.classNames)==null?void 0:nr.loader,"sonner-loader"),"data-visible":ue==="loading"},$.loading):V?ee.createElement("div",{className:Jc(Q==null?void 0:Q.loader,(pr=m==null?void 0:m.classNames)==null?void 0:pr.loader,"sonner-loader"),"data-visible":ue==="loading"},V):ee.createElement(fEe,{className:Jc(Q==null?void 0:Q.loader,(Gr=m==null?void 0:m.classNames)==null?void 0:Gr.loader),visible:ue==="loading"})}return ee.createElement("li",{tabIndex:0,ref:ve,className:Jc(T,He,Q==null?void 0:Q.toast,(r=m==null?void 0:m.classNames)==null?void 0:r.toast,Q==null?void 0:Q.default,Q==null?void 0:Q[ue],(n=m==null?void 0:m.classNames)==null?void 0:n[ue]),"data-sonner-toast":"","data-rich-colors":(i=m.richColors)!=null?i:N,"data-styled":!(m.jsx||m.unstyled||A),"data-mounted":X,"data-promise":!!m.promise,"data-swiped":te,"data-removed":oe,"data-visible":Ie,"data-y-position":Bt,"data-x-position":kr,"data-index":v,"data-front":Pe,"data-swiping":ye,"data-dismissible":Se,"data-type":ue,"data-invert":kn,"data-swipe-out":Be,"data-swipe-direction":ne,"data-expanded":!!(_||U&&X),style:{"--index":v,"--toasts-before":v,"--z-index":j.length-v,"--offset":`${oe?We:Vt.current}px`,"--initial-height":U?"auto":`${we}px`,...E,...m.style},onDragEnd:()=>{ge(!1),K(null),cr.current=null},onPointerDown:nr=>{Sr||!Se||(je.current=new Date,ze(Vt.current),nr.target.setPointerCapture(nr.pointerId),nr.target.tagName!=="BUTTON"&&(ge(!0),cr.current={x:nr.clientX,y:nr.clientY}))},onPointerUp:()=>{var nr,pr,Gr,ii;if(Be||!Se)return;cr.current=null;let pt=Number(((nr=ve.current)==null?void 0:nr.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Di=Number(((pr=ve.current)==null?void 0:pr.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ln=new Date().getTime()-((Gr=je.current)==null?void 0:Gr.getTime()),Yn=z==="x"?pt:Di,Ai=Math.abs(Yn)/ln;if(Math.abs(Yn)>=PEe||Ai>.11){ze(Vt.current),(ii=m.onDismiss)==null||ii.call(m,m),ie(z==="x"?pt>0?"right":"left":Di>0?"down":"up"),zt(),Ve(!0),xe(!1);return}ge(!1),K(null)},onPointerMove:nr=>{var pr,Gr,ii,pt;if(!cr.current||!Se||((pr=window.getSelection())==null?void 0:pr.toString().length)>0)return;let Di=nr.clientY-cr.current.y,ln=nr.clientX-cr.current.x,Yn=(Gr=e.swipeDirections)!=null?Gr:FEe(D);!z&&(Math.abs(ln)>1||Math.abs(Di)>1)&&K(Math.abs(ln)>Math.abs(Di)?"x":"y");let Ai={x:0,y:0};z==="y"?(Yn.includes("top")||Yn.includes("bottom"))&&(Yn.includes("top")&&Di<0||Yn.includes("bottom")&&Di>0)&&(Ai.y=Di):z==="x"&&(Yn.includes("left")||Yn.includes("right"))&&(Yn.includes("left")&&ln<0||Yn.includes("right")&&ln>0)&&(Ai.x=ln),(Math.abs(Ai.x)>0||Math.abs(Ai.y)>0)&&xe(!0),(ii=ve.current)==null||ii.style.setProperty("--swipe-amount-x",`${Ai.x}px`),(pt=ve.current)==null||pt.style.setProperty("--swipe-amount-y",`${Ai.y}px`)}},dt&&!m.jsx?ee.createElement("button",{"aria-label":q,"data-disabled":Sr,"data-close-button":!0,onClick:Sr||!Se?()=>{}:()=>{var nr;zt(),(nr=m.onDismiss)==null||nr.call(m,m)},className:Jc(Q==null?void 0:Q.closeButton,(a=m==null?void 0:m.classNames)==null?void 0:a.closeButton)},(o=$==null?void 0:$.close)!=null?o:xEe):null,m.jsx||w.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:ee.createElement(ee.Fragment,null,ue||m.icon||m.promise?ee.createElement("div",{"data-icon":"",className:Jc(Q==null?void 0:Q.icon,(l=m==null?void 0:m.classNames)==null?void 0:l.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||an():null,m.type!=="loading"?m.
926icon||($==null?void 0:$[ue])||dEe(ue):null):null,ee.createElement("div",{"data-content":"",className:Jc(Q==null?void 0:Q.content,(c=m==null?void 0:m.classNames)==null?void 0:c.content)},ee.createElement("div",{"data-title":"",className:Jc(Q==null?void 0:Q.title,(u=m==null?void 0:m.classNames)==null?void 0:u.title)},typeof m.title=="function"?m.title():m.title),m.description?ee.createElement("div",{"data-description":"",className:Jc(F,Qe,Q==null?void 0:Q.description,(d=m==null?void 0:m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),w.isValidElement(m.cancel)?m.cancel:m.cancel&&lN(m.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||O,onClick:nr=>{var pr,Gr;lN(m.cancel)&&Se&&((Gr=(pr=m.cancel).onClick)==null||Gr.call(pr,nr),zt())},className:Jc(Q==null?void 0:Q.cancelButton,(h=m==null?void 0:m.classNames)==null?void 0:h.cancelButton)},m.cancel.label):null,w.isValidElement(m.action)?m.action:m.action&&lN(m.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||B,onClick:nr=>{var pr,Gr;lN(m.action)&&((Gr=(pr=m.action).onClick)==null||Gr.call(pr,nr),!nr.defaultPrevented&&zt())},className:Jc(Q==null?void 0:Q.actionButton,(f=m==null?void 0:m.classNames)==null?void 0:f.actionButton)},m.action.label):null))};function LV(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function LEe(e,r){let n={};return[e,r].forEach((i,a)=>{let o=a===1,l=o?"--mobile-offset":"--offset",c=o?EEe:kEe;function u(d){["top","right","bottom","left"].forEach(h=>{n[`${l}-${h}`]=typeof d=="number"?`${d}px`:d})}typeof i=="number"||typeof i=="string"?u(i):typeof i=="object"?["top","right","bottom","left"].forEach(d=>{i[d]===void 0?n[`${l}-${d}`]=c:n[`${l}-${d}`]=typeof i[d]=="number"?`${i[d]}px`:i[d]}):u(c)}),n}var REe=w.forwardRef(function(e,r){let{invert:n,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:l,className:c,offset:u,mobileOffset:d,theme:h="light",richColors:f,duration:p,style:m,visibleToasts:A=SEe,toastOptions:g,dir:y=LV(),gap:x=TEe,loadingIcon:b,icons:v,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:_}=e,[C,N]=ee.useState([]),S=ee.useMemo(()=>Array.from(new Set([i].concat(C.filter(M=>M.position).map(M=>M.position)))),[C,i]),[E,O]=ee.useState([]),[B,T]=ee.useState(!1),[F,I]=ee.useState(!1),[D,L]=ee.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=ee.useRef(null),U=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=ee.useRef(null),$=ee.useRef(!1),q=ee.useCallback(M=>{N(z=>{var K;return(K=z.find(ne=>ne.id===M.id))!=null&&K.delete||Vo.dismiss(M.id),z.filter(({id:ne})=>ne!==M.id)})},[]);return ee.useEffect(()=>Vo.subscribe(M=>{if(M.dismiss){N(z=>z.map(K=>K.id===M.id?{...K,delete:!0}:K));return}setTimeout(()=>{loe.flushSync(()=>{N(z=>{let K=z.findIndex(ne=>ne.id===M.id);return K!==-1?[...z.slice(0,K),{...z[K],...M},...z.slice(K+1)]:[M,...z]})})})}),[]),ee.useEffect(()=>{if(h!=="system"){L(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;let M=window.matchMedia("(prefers-color-scheme: dark)");try{M.addEventListener("change",({matches:z})=>{L(z?"dark":"light")})}catch{M.addListener(({matches:K})=>{try{L(K?"dark":"light")}catch(ne){console.error(ne)}})}},[h]),ee.useEffect(()=>{C.length<=1&&T(!1)},[C]),ee.useEffect(()=>{let M=z=>{var K,ne;a.every(ie=>z[ie]||z.code===ie)&&(T(!0),(K=V.current)==null||K.focus()),z.code==="Escape"&&(document.activeElement===V.current||(ne=V.current)!=null&&ne.contains(document.activeElement))&&T(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[a]),ee.useEffect(()=>{if(V.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,$.current=!1)}},[V.current]),ee.createElement("section",{ref:r,"aria-label":`${j} ${U}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((M,z)=>{var K;let[ne,ie]=M.split("-");return C.length?ee.createElement("ol",{key:M,dir:y==="auto"?LV():y,tabIndex:-1,ref:V,className:c,"data-sonner-toaster":!0,"data-theme":D,"data-y-position":ne,"data-lifted":B&&C.length>1&&!o,"data-x-position":ie,style:{"--front-toast-height":`${((K=E[0])==null?void 0:K.height)||0}px`,"--width":`${BEe}px`,"--gap":`${x}px`,...m,...LEe(u,d)},onBlur:X=>{$.current&&!X.currentTarget.contains(X.relatedTarget)&&($.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||$.current||($.current=!0,Q.current=X.relatedTarget)},onMouseEnter:()=>T(!0),onMouseMove:()=>T(!0),onMouseLeave:()=>{F||T(!1)},onDragEnd:()=>T(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},C.filter(X=>!X.position&&z===0||X.position===M).map((X,de)=>{var oe,ce;return ee.createElement(OEe,{key:X.id,icons:v,index:de,toast:X,defaultRichColors:f,duration:(oe=g==null?void 0:g.duration)!=null?oe:p,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:A,closeButton:(ce=g==null?void 0:g.closeButton)!=null?ce:l,interacting:F,position:M,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:q,toasts:C.filter(ye=>ye.position==X.position),heights:E.filter(ye=>ye.position==X.position),setHeights:O,expandByDefault:o,gap:x,loadingIcon:b,expanded:B,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});const DEe=({...e})=>{const{theme:r="system"}=uEe();return s.jsx(REe,{theme:r,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var MEe=D6[" useId ".trim().toString()]||(()=>{}),zEe=0;function Ul(e){const[r,n]=w.useState(MEe());return xa(()=>{n(i=>i??String(zEe++))},[e]),r?`radix-${r}`:""}const UEe=["top","right","bottom","left"],up=Math.min,Il=Math.max,hE=Math.round,cN=Math.floor,Sd=e=>({x:e,y:e}
vendor: 11,423 bytes, line 926
926),$Ee={left:"right",right:"left",bottom:"top",top:"bottom"},QEe={start:"end",end:"start"};function iR(e,r,n){return Il(e,up(r,n))}function tf(e,r){return typeof e=="function"?e(r):e}function rf(e){return e.split("-")[0]}function D0(e){return e.split("-")[1]}function VU(e){return e==="x"?"y":"x"}function WU(e){return e==="y"?"height":"width"}const HEe=new Set(["top","bottom"]);function gd(e){return HEe.has(rf(e))?"y":"x"}function qU(e){return VU(gd(e))}function VEe(e,r,n){n===void 0&&(n=!1);const i=D0(e),a=qU(e),o=WU(a);let l=a==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[o]>r.floating[o]&&(l=fE(l)),[l,fE(l)]}function WEe(e){const r=fE(e);return[aR(e),r,aR(r)]}function aR(e){return e.replace(/start|end/g,r=>QEe[r])}const RV=["left","right"],DV=["right","left"],qEe=["top","bottom"],KEe=["bottom","top"];function GEe(e,r,n){switch(e){case"top":case"bottom":return n?r?DV:RV:r?RV:DV;case"left":case"right":return r?qEe:KEe;default:return[]}}function XEe(e,r,n,i){const a=D0(e);let o=GEe(rf(e),n==="start",i);return a&&(o=o.map(l=>l+"-"+a),r&&(o=o.concat(o.map(aR)))),o}function fE(e){return e.replace(/left|right|bottom|top/g,r=>$Ee[r])}function YEe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ele(e){return typeof e!="number"?YEe(e):{top:e,right:e,bottom:e,left:e}}function mE(e){const{x:r,y:n,width:i,height:a}=e;return{width:i,height:a,top:n,left:r,right:r+i,bottom:n+a,x:r,y:n}}function MV(e,r,n){let{reference:i,floating:a}=e;const o=gd(r),l=qU(r),c=WU(l),u=rf(r),d=o==="y",h=i.x+i.width/2-a.width/2,f=i.y+i.height/2-a.height/2,p=i[c]/2-a[c]/2;let m;switch(u){case"top":m={x:h,y:i.y-a.height};break;case"bottom":m={x:h,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:f};break;case"left":m={x:i.x-a.width,y:f};break;default:m={x:i.x,y:i.y}}switch(D0(r)){case"start":m[l]-=p*(n&&d?-1:1);break;case"end":m[l]+=p*(n&&d?-1:1);break}return m}const JEe=async(e,r,n)=>{const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(r));let d=await l.getElementRects({reference:e,floating:r,strategy:a}),{x:h,y:f}=MV(d,i,u),p=i,m={},A=0;for(let g=0;g<c.length;g++){const{name:y,fn:x}=c[g],{x:b,y:v,data:j,reset:_}=await x({x:h,y:f,initialPlacement:i,placement:p,strategy:a,middlewareData:m,rects:d,platform:l,elements:{reference:e,floating:r}});h=b??h,f=v??f,m={...m,[y]:{...m[y],...j}},_&&A<=50&&(A++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(d=_.rects===!0?await l.getElementRects({reference:e,floating:r,strategy:a}):_.rects),{x:h,y:f}=MV(d,p,u)),g=-1)}return{x:h,y:f,placement:p,strategy:a,middlewareData:m}};async function P2(e,r){var n;r===void 0&&(r={});const{x:i,y:a,platform:o,rects:l,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=tf(r,e),A=Ele(m),y=c[p?f==="floating"?"reference":"floating":f],x=mE(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:u})),b=f==="floating"?{x:i,y:a,width:l.floating.width,height:l.floating.height}:l.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),j=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},_=mE(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:v,strategy:u}):b);return{top:(x.top-_.top+A.top)/j.y,bottom:(_.bottom-x.bottom+A.bottom)/j.y,left:(x.left-_.left+A.left)/j.x,right:(_.right-x.right+A.right)/j.x}}const ZEe=e=>({name:"arrow",options:e,async fn(r){const{x:n,y:i,placement:a,rects:o,platform:l,elements:c,middlewareData:u}=r,{element:d,padding:h=0}=tf(e,r)||{};if(d==null)return{};const f=Ele(h),p={x:n,y:i},m=qU(a),A=WU(m),g=await l.getDimensions(d),y=m==="y",x=y?"top":"left",b=y?"bottom":"right",v=y?"clientHeight":"clientWidth",j=o.reference[A]+o.reference[m]-p[m]-o.floating[A],_=p[m]-o.reference[m],C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let N=C?C[v]:0;(!N||!await(l.isElement==null?void 0:l.isElement(C)))&&(N=c.floating[v]||o.floating[A]);const S=j/2-_/2,E=N/2-g[A]/2-1,O=up(f[x],E),B=up(f[b],E),T=O,F=N-g[A]-B,I=N/2-g[A]/2+S,D=iR(T,I,F),L=!u.arrow&&D0(a)!=null&&I!==D&&o.reference[A]/2-(I<T?O:B)-g[A]/2<0,V=L?I<T?I-T:I-F:0;return{[m]:p[m]+V,data:{[m]:D,centerOffset:I-D-V,...L&&{alignmentOffset:V}},reset:L}}}),e5e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var n,i;const{placement:a,middlewareData:o,rects:l,initialPlacement:c,platform:u,elements:d}=r,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:g=!0,...y}=tf(e,r);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=rf(a),b=gd(c),v=rf(c)===c,j=await(u.isRTL==null?void 0:u.isRTL(d.floating)),_=p||(v||!g?[fE(c)]:WEe(c)),C=A!=="none";!p&&C&&_.push(...XEe(c,g,A,j));const N=[c,..._],S=await P2(r,y),E=[];let O=((i=o.flip)==null?void 0:i.overflows)||[];if(h&&E.push(S[x]),f){const I=VEe(a,l,j);E.push(S[I[0]],S[I[1]])}if(O=[...O,{placement:a,overflows:E}],!E.every(I=>I<=0)){var B,T;const I=(((B=o.flip)==null?void 0:B.index)||0)+1,D=N[I];if(D&&(!(f==="alignment"?b!==gd(D):!1)||O.every(U=>U.overflows[0]>0&&gd(U.placement)===b)))return{data:{index:I,overflows:O},reset:{placement:D}};let L=(T=O.filter(V=>V.overflows[0]<=0).sort((V,U)=>V.overflows[1]-U.overflows[1])[0])==null?void 0:T.placement;if(!L)switch(m){case"bestFit":{var F;const V=(F=O.filter(U=>{if(C){const Q=gd(U.placement);return Q===b||Q==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Q=>Q>0).reduce((Q,$)=>Q+$,0)]).sort((U,Q)=>U[1]-Q[1])[0])==null?void 0:F[0];V&&(L=V);break}case"initialPlacement":L=c;break}if(a!==L)return{reset:{placement:L}}}return{}}}};function zV(e,r){return{top:e.top-r.height,right:e.right-r.width,bottom:e.bottom-r.height,left:e.left-r.width}}function UV(e){return UEe.some(r=>e[r]>=0)}const t5e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(r){const{rects:n}=r,{strategy:i="referenceHidden",...a}=tf(e,r);switch(i){case"referenceHidden":{const o=await P2(r,{...a,elementContext:"reference"}),l=zV(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:UV(l)}}}case"escaped":{const o=await P2(r,{...a,altBoundary:!0}),l=zV(o,n.floating);return{data:{escapedOffsets:l,escaped:UV(l)}}}default:return{}}}}},Ble=new Set(["left","top"]);async function r5e(e,r){const{placement:n,platform:i,elements:a}=e,o=await(i.isRTL==null?void 0:i.isRTL(a.floating)),l=rf(n),c=D0(n),u=gd(n)==="y",d=Ble.has(l)?-1:1,h=o&&u?-1:1,f=tf(r,e);let{mainAxis:p,crossAxis:m,alignmentAxis:A}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof A=="number"&&(m=c==="end"?A*-1:A),u?{x:m*h,y:p*d}:{x:p*d,y:m*h}}const n5e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var n,i;const{x:a,y:o,placement:l,middlewareData:c}=r,u=await r5e(r,e);return l===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:a+u.x,y:o+u.y,data:{...u,placement:l}}}}},i5e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:n,y:i,placement:a}=r,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:y=>{let{x,y:b}=y;return{x,y:b}}},...u}=tf(e,r),d={x:n,y:i},h=await P2(r,u),f=gd(rf(a)),p=VU(f);let m=d[p],A=d[f];if(o){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",b=m+h[y],v=m-h[x];m=iR(b,m,v)}if(l){const y=f==="y"?"top":"left",x=f==="y"?"bottom":"right",b=A+h[y],v=A-h[x];A=iR(b,A,v)}const g=c.fn({...r,[p]:m,[f]:A});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[p]:o,[f]:l}}}}}},a5e=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:n,y:i,placement:a,rects:o,middlewareData:l}=r,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=tf(e,r),h={x:n,y:i},f=gd(a),p=VU(f);let m=h[p],A=h[f];const g=tf(c,r),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const v=p==="y"?"height":"width",j=o.reference[p]-o.floating[v]+y.mainAxis,_=o.reference[p]+o.reference[v]-y.mainAxis;m<j?m=j:m>_&&(m=_)}if(d){var x,b;const v=p==="y"?"width":"height",j=Ble.has(rf(a)),_=o.reference[f]-o.floating[v]+(j&&((x=l.offset)==null?void 0:x[f])||0)+(j?0:y.crossAxis),C=o.reference[f]+o.reference[v]+(j?0:((b=l.offset)==null?void 0:b[f])||0)-(j?y.crossAxis:0);A<_?A=_:A>C&&(A=C)}return{[p]:m,[f]:A}}}},s5e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var n,i;const{placement:a,rects:o,platform:l,elements:c}=r,{apply:u=()=>{},...d}=tf(e,r),h=await P2(r,d),f=rf(a),p=D0(a),m=gd(a)==="y",{width:A,height:g}=o.floating;let y,x;f==="top"||f==="bottom"?(y=f,x=p===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,y=p==="end"?"top":"bottom");const b=g-h.top-h.bottom,v=A-h.left-h.right,j=up(g-h[y],b),_=up(A-h[x],v),C=!r.middlewareData.shift;let N=j,S=_;if((n=r.middlewareData.shift)!=null&&n.enabled.x&&(S=v),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(N=b),C&&!p){const O=Il(h.left,0),B=Il(h.right,0),T=Il(h.top,0),F=Il(h.bottom,0);m?S=A-2*(O!==0||B!==0?O+B:Il(h.left,h.right)):N=g-2*(T!==0||F!==0?T+F:Il(h.top,h.bottom))}await u({...r,availableWidth:S,availableHeight:N});const E=await l.getDimensions(c.floating);return A!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}};function f4(){return typeof window<"u"}function M0(e){return Tle(e)?(e.nodeName||"").toLowerCase():"#document"}function $l(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function $d(e){var r;return(r=(Tle(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function Tle(e){return f4()?e instanceof Node||e instanceof $l(e).Node:!1}function Pu(e){return f4()?e instanceof Element||e instanceof $l(e).Element:!1}function Od(e){return f4()?e instanceof HTMLElement||e instanceof $l(e).HTMLElement:!1}function $V(e){return!f4()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $l(e).ShadowRoot}const o5e=new Set(["inline","contents"]);function v_(e){const{overflow:r,overflowX:n,overflowY:i,display:a}=Iu(e);return/auto|scroll|overlay|hidden|clip/.test(r+i+n)&&!o5e.has(a)}const l5e=new Set(["table","td","th"]);function c5e(e){return l5e.has(M0(e))}const u5e=[":popover-open",":modal"];function m4(e){return u5e.some(r=>{try{return e.matches(r)}catch{return!1}})}const d5e=["transform","translate","scale","rotate","perspective"],h5e=["transform","translate","scale","rotate","perspective","filter"],f5e=["paint","layout","strict","content"];function KU(e){const r=GU(),n=Pu(e)?Iu(e):e;return d5e.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!r&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!r&&(n.filter?n.filter!=="none":!1)||h5e.some(i=>(n.willChange||"").includes(i))||f5e.some(i=>(n.contain||"").includes(i))}function m5e(e){let r=dp(e);for(;Od(r)&&!$v(r);){if(KU(r))return r;if(m4(r))return null;r=dp(r)}return null}function GU(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const p5e=new Set(["html","body","#document"]);function $v(e){return p5e.has(M0(e))}
vendor: 4,252 bytes, line 926
926function Iu(e){return $l(e).getComputedStyle(e)}function p4(e){return Pu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dp(e){if(M0(e)==="html")return e;const r=e.assignedSlot||e.parentNode||$V(e)&&e.host||$d(e);return $V(r)?r.host:r}function Ple(e){const r=dp(e);return $v(r)?e.ownerDocument?e.ownerDocument.body:e.body:Od(r)&&v_(r)?r:Ple(r)}function I2(e,r,n){var i;r===void 0&&(r=[]),n===void 0&&(n=!0);const a=Ple(e),o=a===((i=e.ownerDocument)==null?void 0:i.body),l=$l(a);if(o){const c=sR(l);return r.concat(l,l.visualViewport||[],v_(a)?a:[],c&&n?I2(c):[])}return r.concat(a,I2(a,[],n))}function sR(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ile(e){const r=Iu(e);let n=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const a=Od(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:i,c=hE(n)!==o||hE(i)!==l;return c&&(n=o,i=l),{width:n,height:i,$:c}}function XU(e){return Pu(e)?e:e.contextElement}function Xy(e){const r=XU(e);if(!Od(r))return Sd(1);const n=r.getBoundingClientRect(),{width:i,height:a,$:o}=Ile(r);let l=(o?hE(n.width):n.width)/i,c=(o?hE(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const A5e=Sd(0);function Fle(e){const r=$l(e);return!GU()||!r.visualViewport?A5e:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function g5e(e,r,n){return r===void 0&&(r=!1),!n||r&&n!==$l(e)?!1:r}function gg(e,r,n,i){r===void 0&&(r=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=XU(e);let l=Sd(1);r&&(i?Pu(i)&&(l=Xy(i)):l=Xy(e));const c=g5e(o,n,i)?Fle(o):Sd(0);let u=(a.left+c.x)/l.x,d=(a.top+c.y)/l.y,h=a.width/l.x,f=a.height/l.y;if(o){const p=$l(o),m=i&&Pu(i)?$l(i):i;let A=p,g=sR(A);for(;g&&i&&m!==A;){const y=Xy(g),x=g.getBoundingClientRect(),b=Iu(g),v=x.left+(g.clientLeft+parseFloat(b.paddingLeft))*y.x,j=x.top+(g.clientTop+parseFloat(b.paddingTop))*y.y;u*=y.x,d*=y.y,h*=y.x,f*=y.y,u+=v,d+=j,A=$l(g),g=sR(A)}}return mE({width:h,height:f,x:u,y:d})}function YU(e,r){const n=p4(e).scrollLeft;return r?r.left+n:gg($d(e)).left+n}function Ole(e,r,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=i.left+r.scrollLeft-(n?0:YU(e,i)),o=i.top+r.scrollTop;return{x:a,y:o}}function x5e(e){let{elements:r,rect:n,offsetParent:i,strategy:a}=e;const o=a==="fixed",l=$d(i),c=r?m4(r.floating):!1;if(i===l||c&&o)return n;let u={scrollLeft:0,scrollTop:0},d=Sd(1);const h=Sd(0),f=Od(i);if((f||!f&&!o)&&((M0(i)!=="body"||v_(l))&&(u=p4(i)),Od(i))){const m=gg(i);d=Xy(i),h.x=m.x+i.clientLeft,h.y=m.y+i.clientTop}const p=l&&!f&&!o?Ole(l,u,!0):Sd(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+h.x+p.x,y:n.y*d.y-u.scrollTop*d.y+h.y+p.y}}function y5e(e){return Array.from(e.getClientRects())}function v5e(e){const r=$d(e),n=p4(e),i=e.ownerDocument.body,a=Il(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),o=Il(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let l=-n.scrollLeft+YU(e);const c=-n.scrollTop;return Iu(i).direction==="rtl"&&(l+=Il(r.clientWidth,i.clientWidth)-a),{width:a,height:o,x:l,y:c}}function b5e(e,r){const n=$l(e),i=$d(e),a=n.visualViewport;let o=i.clientWidth,l=i.clientHeight,c=0,u=0;if(a){o=a.width,l=a.height;const d=GU();(!d||d&&r==="fixed")&&(c=a.offsetLeft,u=a.offsetTop)}return{width:o,height:l,x:c,y:u}}const w5e=new Set(["absolute","fixed"]);function j5e(e,r){const n=gg(e,!0,r==="fixed"),i=n.top+e.clientTop,a=n.left+e.clientLeft,o=Od(e)?Xy(e):Sd(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,u=a*o.x,d=i*o.y;return{width:l,height:c,x:u,y:d}}function QV(e,r,n){let i;if(r==="viewport")i=b5e(e,n);else if(r==="document")i=v5e($d(e));else if(Pu(r))i=j5e(r,n);else{const a=Fle(e);i={x:r.x-a.x,y:r.y-a.y,width:r.width,height:r.height}}return mE(i)}function Lle(e,r){const n=dp(e);return n===r||!Pu(n)||$v(n)?!1:Iu(n).position==="fixed"||Lle(n,r)}function _5e(e,r){const n=r.get(e);if(n)return n;let i=I2(e,[],!1).filter(c=>Pu(c)&&M0(c)!=="body"),a=null;const o=Iu(e).position==="fixed";let l=o?dp(e):e;for(;Pu(l)&&!$v(l);){const c=Iu(l),u=KU(l);!u&&c.position==="fixed"&&(a=null),(o?!u&&!a:!u&&c.position==="static"&&!!a&&w5e.has(a.position)||v_(l)&&!u&&Lle(e,l))?i=i.filter(h=>h!==l):a=c,l=dp(l)}return r.set(e,i),i}
vendor: 8,474 bytes, line 926
926function C5e(e){let{element:r,boundary:n,rootBoundary:i,strategy:a}=e;const l=[...n==="clippingAncestors"?m4(r)?[]:_5e(r,this._c):[].concat(n),i],c=l[0],u=l.reduce((d,h)=>{const f=QV(r,h,a);return d.top=Il(f.top,d.top),d.right=up(f.right,d.right),d.bottom=up(f.bottom,d.bottom),d.left=Il(f.left,d.left),d},QV(r,c,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function N5e(e){const{width:r,height:n}=Ile(e);return{width:r,height:n}}function S5e(e,r,n){const i=Od(r),a=$d(r),o=n==="fixed",l=gg(e,!0,o,r);let c={scrollLeft:0,scrollTop:0};const u=Sd(0);function d(){u.x=YU(a)}if(i||!i&&!o)if((M0(r)!=="body"||v_(a))&&(c=p4(r)),i){const m=gg(r,!0,o,r);u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}else a&&d();o&&!i&&a&&d();const h=a&&!i&&!o?Ole(a,c):Sd(0),f=l.left+c.scrollLeft-u.x-h.x,p=l.top+c.scrollTop-u.y-h.y;return{x:f,y:p,width:l.width,height:l.height}}function JP(e){return Iu(e).position==="static"}function HV(e,r){if(!Od(e)||Iu(e).position==="fixed")return null;if(r)return r(e);let n=e.offsetParent;return $d(e)===n&&(n=n.ownerDocument.body),n}function Rle(e,r){const n=$l(e);if(m4(e))return n;if(!Od(e)){let a=dp(e);for(;a&&!$v(a);){if(Pu(a)&&!JP(a))return a;a=dp(a)}return n}let i=HV(e,r);for(;i&&c5e(i)&&JP(i);)i=HV(i,r);return i&&$v(i)&&JP(i)&&!KU(i)?n:i||m5e(e)||n}const k5e=async function(e){const r=this.getOffsetParent||Rle,n=this.getDimensions,i=await n(e.floating);return{reference:S5e(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function E5e(e){return Iu(e).direction==="rtl"}const B5e={convertOffsetParentRelativeRectToViewportRelativeRect:x5e,getDocumentElement:$d,getClippingRect:C5e,getOffsetParent:Rle,getElementRects:k5e,getClientRects:y5e,getDimensions:N5e,getScale:Xy,isElement:Pu,isRTL:E5e};function Dle(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function T5e(e,r){let n=null,i;const a=$d(e);function o(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function l(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),o();const d=e.getBoundingClientRect(),{left:h,top:f,width:p,height:m}=d;if(c||r(),!p||!m)return;const A=cN(f),g=cN(a.clientWidth-(h+p)),y=cN(a.clientHeight-(f+m)),x=cN(h),v={rootMargin:-A+"px "+-g+"px "+-y+"px "+-x+"px",threshold:Il(0,up(1,u))||1};let j=!0;function _(C){const N=C[0].intersectionRatio;if(N!==u){if(!j)return l();N?l(!1,N):i=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!Dle(d,e.getBoundingClientRect())&&l(),j=!1}try{n=new IntersectionObserver(_,{...v,root:a.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return l(!0),o}function P5e(e,r,n,i){i===void 0&&(i={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=i,d=XU(e),h=a||o?[...d?I2(d):[],...I2(r)]:[];h.forEach(x=>{a&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const f=d&&c?T5e(d,n):null;let p=-1,m=null;l&&(m=new ResizeObserver(x=>{let[b]=x;b&&b.target===d&&m&&(m.unobserve(r),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(r)})),n()}),d&&!u&&m.observe(d),m.observe(r));let A,g=u?gg(e):null;u&&y();function y(){const x=gg(e);g&&!Dle(g,x)&&n(),g=x,A=requestAnimationFrame(y)}return n(),()=>{var x;h.forEach(b=>{a&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f==null||f(),(x=m)==null||x.disconnect(),m=null,u&&cancelAnimationFrame(A)}}const I5e=n5e,F5e=i5e,O5e=e5e,L5e=s5e,R5e=t5e,VV=ZEe,D5e=a5e,M5e=(e,r,n)=>{const i=new Map,a={platform:B5e,...n},o={...a.platform,_c:i};return JEe(e,r,{...a,platform:o})};var z5e=typeof document<"u",U5e=function(){},ak=z5e?w.useLayoutEffect:U5e;function pE(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let n,i,a;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==r.length)return!1;for(i=n;i--!==0;)if(!pE(e[i],r[i]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){const o=a[i];if(!(o==="_owner"&&e.$$typeof)&&!pE(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}function Mle(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function WV(e,r){const n=Mle(e);return Math.round(r*n)/n}function ZP(e){const r=w.useRef(e);return ak(()=>{r.current=e}),r}function $5e(e){e===void 0&&(e={});const{placement:r="bottom",strategy:n="absolute",middleware:i=[],platform:a,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[h,f]=w.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[p,m]=w.useState(i);pE(p,i)||m(i);const[A,g]=w.useState(null),[y,x]=w.useState(null),b=w.useCallback(U=>{U!==C.current&&(C.current=U,g(U))},[]),v=w.useCallback(U=>{U!==N.current&&(N.current=U,x(U))},[]),j=o||A,_=l||y,C=w.useRef(null),N=w.useRef(null),S=w.useRef(h),E=u!=null,O=ZP(u),B=ZP(a),T=ZP(d),F=w.useCallback(()=>{if(!C.current||!N.current)return;const U={placement:r,strategy:n,middleware:p};B.current&&(U.platform=B.current),M5e(C.current,N.current,U).then(Q=>{const $={...Q,isPositioned:T.current!==!1};I.current&&!pE(S.current,$)&&(S.current=$,Kh.flushSync(()=>{f($)}))})},[p,r,n,B,T]);ak(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[d]);const I=w.useRef(!1);ak(()=>(I.current=!0,()=>{I.current=!1}),[]),ak(()=>{if(j&&(C.current=j),_&&(N.current=_),j&&_){if(O.current)return O.current(j,_,F);F()}},[j,_,F,O,E]);const D=w.useMemo(()=>({reference:C,floating:N,setReference:b,setFloating:v}),[b,v]),L=w.useMemo(()=>({reference:j,floating:_}),[j,_]),V=w.useMemo(()=>{const U={position:n,left:0,top:0};if(!L.floating)return U;const Q=WV(L.floating,h.x),$=WV(L.floating,h.y);return c?{...U,transform:"translate("+Q+"px, "+$+"px)",...Mle(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:$}},[n,c,L.floating,h.x,h.y]);return w.useMemo(()=>({...h,update:F,refs:D,elements:L,floatingStyles:V}),[h,F,D,L,V])}const Q5e=e=>{function r(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:a}=typeof e=="function"?e(n):e;return i&&r(i)?i.current!=null?VV({element:i.current,padding:a}).fn(n):{}:i?VV({element:i,padding:a}).fn(n):{}}}},H5e=(e,r)=>({...I5e(e),options:[e,r]}),V5e=(e,r)=>({...F5e(e),options:[e,r]}),W5e=(e,r)=>({...D5e(e),options:[e,r]}),q5e=(e,r)=>({...O5e(e),options:[e,r]}),K5e=(e,r)=>({...L5e(e),options:[e,r]}),G5e=(e,r)=>({...R5e(e),options:[e,r]}),X5e=(e,r)=>({...Q5e(e),options:[e,r]});var Y5e="Arrow",zle=w.forwardRef((e,r)=>{const{children:n,width:i=10,height:a=5,...o}=e;return s.jsx(Rt.svg,{...o,ref:r,width:i,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});zle.displayName=Y5e;var J5e=zle;function A4(e){const[r,n]=w.useState(void 0);return xa(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,c;if("borderBoxSize"in o){const u=o.borderBoxSize,d=Array.isArray(u)?u[0]:u;l=d.inlineSize,c=d.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),r}var JU="Popper",[Ule,z0]=rs(JU),[Z5e,$le]=Ule(JU),Qle=e=>{const{__scopePopper:r,children:n}=e,[i,a]=w.useState(null);return s.jsx(Z5e,{scope:r,anchor:i,onAnchorChange:a,children:n})};Qle.displayName=JU;var Hle="PopperAnchor",Vle=w.forwardRef((e,r)=>{const{__scopePopper:n,virtualRef:i,...a}=e,o=$le(Hle,n),l=w.useRef(null),c=Mr(r,l);return w.useEffect(()=>{o.onAnchorChange((i==null?void 0:i.current)||l.current)}),i?null:s.jsx(Rt.div,{...a,ref:c})});Vle.displayName=Hle;var ZU="PopperContent",[eBe,tBe]=Ule(ZU),Wle=w.forwardRef((e,r)=>{var X,de,oe,ce,ye,ge;const{__scopePopper:n,side:i="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:h=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:A,...g}=e,y=$le(ZU,n),[x,b]=w.useState(null),v=Mr(r,Be=>b(Be)),[j,_]=w.useState(null),C=A4(j),N=(C==null?void 0:C.width)??0,S=(C==null?void 0:C.height)??0,E=i+(o!=="center"?"-"+o:""),O=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h}
vendor: 6,899 bytes, line 926
926,B=Array.isArray(d)?d:[d],T=B.length>0,F={padding:O,boundary:B.filter(nBe),altBoundary:T},{refs:I,floatingStyles:D,placement:L,isPositioned:V,middlewareData:U}=$5e({strategy:"fixed",placement:E,whileElementsMounted:(...Be)=>P5e(...Be,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[H5e({mainAxis:a+S,alignmentAxis:l}),u&&V5e({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?W5e():void 0,...F}),u&&q5e({...F}),K5e({...F,apply:({elements:Be,rects:Ve,availableWidth:te,availableHeight:xe})=>{const{width:We,height:ze}=Ve.reference,we=Be.floating.style;we.setProperty("--radix-popper-available-width",`${te}px`),we.setProperty("--radix-popper-available-height",`${xe}px`),we.setProperty("--radix-popper-anchor-width",`${We}px`),we.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),j&&X5e({element:j,padding:c}),iBe({arrowWidth:N,arrowHeight:S}),p&&G5e({strategy:"referenceHidden",...F})]}),[Q,$]=Gle(L),q=To(A);xa(()=>{V&&(q==null||q())},[V,q]);const M=(X=U.arrow)==null?void 0:X.x,z=(de=U.arrow)==null?void 0:de.y,K=((oe=U.arrow)==null?void 0:oe.centerOffset)!==0,[ne,ie]=w.useState();return xa(()=>{x&&ie(window.getComputedStyle(x).zIndex)},[x]),s.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:V?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(ce=U.transformOrigin)==null?void 0:ce.x,(ye=U.transformOrigin)==null?void 0:ye.y].join(" "),...((ge=U.hide)==null?void 0:ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(eBe,{scope:n,placedSide:Q,onArrowChange:_,arrowX:M,arrowY:z,shouldHideArrow:K,children:s.jsx(Rt.div,{"data-side":Q,"data-align":$,...g,ref:v,style:{...g.style,animation:V?void 0:"none"}})})})});Wle.displayName=ZU;var qle="PopperArrow",rBe={top:"bottom",right:"left",bottom:"top",left:"right"},Kle=w.forwardRef(function(r,n){const{__scopePopper:i,...a}=r,o=tBe(qle,i),l=rBe[o.placedSide];return s.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:s.jsx(J5e,{...a,ref:n,style:{...a.style,display:"block"}})})});Kle.displayName=qle;function nBe(e){return e!==null}var iBe=e=>({name:"transformOrigin",options:e,fn(r){var y,x,b;const{placement:n,rects:i,middlewareData:a}=r,l=((y=a.arrow)==null?void 0:y.centerOffset)!==0,c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,h]=Gle(n),f={start:"0%",center:"50%",end:"100%"}[h],p=(((x=a.arrow)==null?void 0:x.x)??0)+c/2,m=(((b=a.arrow)==null?void 0:b.y)??0)+u/2;let A="",g="";return d==="bottom"?(A=l?f:`${p}px`,g=`${-u}px`):d==="top"?(A=l?f:`${p}px`,g=`${i.floating.height+u}px`):d==="right"?(A=`${-u}px`,g=l?f:`${m}px`):d==="left"&&(A=`${i.floating.width+u}px`,g=l?f:`${m}px`),{data:{x:A,y:g}}}});function Gle(e){const[r,n="center"]=e.split("-");return[r,n]}var e8=Qle,t8=Vle,r8=Wle,n8=Kle,[g4,_Ut]=rs("Tooltip",[z0]),x4=z0(),Xle="TooltipProvider",aBe=700,oR="tooltip.open",[sBe,i8]=g4(Xle),Yle=e=>{const{__scopeTooltip:r,delayDuration:n=aBe,skipDelayDuration:i=300,disableHoverableContent:a=!1,children:o}=e,l=w.useRef(!0),c=w.useRef(!1),u=w.useRef(0);return w.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),s.jsx(sBe,{scope:r,isOpenDelayedRef:l,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(u.current),l.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l.current=!0,i)},[i]),isPointerInTransitRef:c,onPointerInTransitChange:w.useCallback(d=>{c.current=d},[]),disableHoverableContent:a,children:o})};Yle.displayName=Xle;var F2="Tooltip",[oBe,y4]=g4(F2),Jle=e=>{const{__scopeTooltip:r,children:n,open:i,defaultOpen:a,onOpenChange:o,disableHoverableContent:l,delayDuration:c}=e,u=i8(F2,e.__scopeTooltip),d=x4(r),[h,f]=w.useState(null),p=Ul(),m=w.useRef(0),A=l??u.disableHoverableContent,g=c??u.delayDuration,y=w.useRef(!1),[x,b]=nl({prop:i,defaultProp:a??!1,onChange:N=>{N?(u.onOpen(),document.dispatchEvent(new CustomEvent(oR))):u.onClose(),o==null||o(N)},caller:F2}),v=w.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),j=w.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,b(!0)},[b]),_=w.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),C=w.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,b(!0),m.current=0},g)},[g,b]);return w.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(e8,{...d,children:s.jsx(oBe,{scope:r,contentId:p,open:x,stateAttribute:v,trigger:h,onTriggerChange:f,onTriggerEnter:w.useCallback(()=>{u.isOpenDelayedRef.current?C():j()},[u.isOpenDelayedRef,C,j]),onTriggerLeave:w.useCallback(()=>{A?_():(window.clearTimeout(m.current),m.current=0)},[_,A]),onOpen:j,onClose:_,disableHoverableContent:A,children:n})})};Jle.displayName=F2;var lR="TooltipTrigger",Zle=w.forwardRef((e,r)=>{const{__scopeTooltip:n,...i}=e,a=y4(lR,n),o=i8(lR,n),l=x4(n),c=w.useRef(null),u=Mr(r,c,a.onTriggerChange),d=w.useRef(!1),h=w.useRef(!1),f=w.useCallback(()=>d.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),s.jsx(t8,{asChild:!0,...l,children:s.jsx(Rt.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...i,ref:u,onPointerMove:bt(e.onPointerMove,p=>{p.pointerType!=="touch"&&!h.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),h.current=!0)}),onPointerLeave:bt(e.onPointerLeave,()=>{a.onTriggerLeave(),h.current=!1}),onPointerDown:bt(e.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:bt(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:bt(e.onBlur,a.onClose),onClick:bt(e.onClick,a.onClose)})})});Zle.displayName=lR;var lBe="TooltipPortal",[CUt,cBe]=g4(lBe,{forceMount:void 0}),Qv="TooltipContent",ece=w.forwardRef((e,r)=>{const n=cBe(Qv,e.__scopeTooltip),{forceMount:i=n.forceMount,side:a="top",...o}=e,l=y4(Qv,e.__scopeTooltip);return s.jsx(cl,{present:i||l.open,children:l.disableHoverableContent?s.jsx(tce,{side:a,...o,ref:r}):s.jsx(uBe,{side:a,...o,ref:r})})}),uBe=w.forwardRef((e,r)=>{const n=y4(Qv,e.__scopeTooltip),i=i8(Qv,e.__scopeTooltip),a=w.useRef(null),o=Mr(r,a),[l,c]=w.useState(null),{trigger:u,onClose:d}=n,h=a.current,{onPointerInTransitChange:f}=i,p=w.useCallback(()=>{c(null),f(!1)},[f]),m=w.useCallback((A,g)=>{const y=A.currentTarget,x={x:A.clientX,y:A.clientY},b=pBe(x,y.getBoundingClientRect()),v=ABe(x,b),j=gBe(g.getBoundingClientRect()),_=yBe([...v,...j]);c(_),f(!0)},[f]);return w.useEffect(()=>()=>
926p(),[p]),w.useEffect(()=>{if(u&&h){const A=y=>m(y,h),g=y=>m(y,u);return u.addEventListener("pointerleave",A),h.addEventListener("pointerleave",g),()=>{u.removeEventListener("pointerleave",A),h.removeEventListener("pointerleave",g)}}},[u,h,m,p]),w.useEffect(()=>{if(l){const A=g=>{const y=g.target,x={x:g.clientX,y:g.clientY},b=(u==null?void 0:u.contains(y))||(h==null?void 0:h.contains(y)),v=!xBe(x,l);b?p():v&&(p(),d())};return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[u,h,l,d,p]),s.jsx(tce,{...e,ref:o})}),[dBe,hBe]=g4(F2,{isInside:!1}),fBe=yoe("TooltipContent"),tce=w.forwardRef((e,r)=>{const{__scopeTooltip:n,children:i,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:l,...c}=e,u=y4(Qv,n),d=x4(n),{onClose:h}=u;return w.useEffect(()=>(document.addEventListener(oR,h),()=>document.removeEventListener(oR,h)),[h]),w.useEffect(()=>{if(u.trigger){const f=p=>{const m=p.target;m!=null&&m.contains(u.trigger)&&h()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,h]),s.jsx(F0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:f=>f.preventDefault(),onDismiss:h,children:s.jsxs(r8,{"data-state":u.stateAttribute,...d,...c,ref:r,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(fBe,{children:i}),s.jsx(dBe,{scope:n,isInside:!0,children:s.jsx(xSe,{id:u.contentId,role:"tooltip",children:a||i})})]})})});ece.displayName=Qv;var rce="TooltipArrow",mBe=w.forwardRef((e,r)=>{const{__scopeTooltip:n,...i}=e,a=x4(n);return hBe(rce,n).isInside?null:s.jsx(n8,{...a,...i,ref:r})});mBe.displayName=rce;function pBe(e,r){const n=Math.abs(r.top-e.y),i=Math.abs(r.bottom-e.y),a=Math.abs(r.right-e.x),o=Math.abs(r.left-e.x);switch(Math.min(n,i,a,o)){case o:return"left";case a:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function ABe(e,r,n=5){const i=[];switch(r){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function gBe(e){const{top:r,right:n,bottom:i,left:a}=e;return[{x:a,y:r},{x:n,y:r},{x:n,y:i},{x:a,y:i}]}function xBe(e,r){const{x:n,y:i}=e;let a=!1;for(let o=0,l=r.length-1;o<r.length;l=o++){const c=r[o],u=r[l],d=c.x,h=c.y,f=u.x,p=u.y;h>i!=p>i&&n<(f-d)*(i-h)/(p-h)+d&&(a=!a)}return a}function yBe(e){const r=e.slice();return r.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),vBe(r)}function vBe(e){if(e.length<=1)return e.slice();const r=[];for(let i=0;i<e.length;i++){const a=e[i];for(;r.length>=2;){const o=r[r.length-1],l=r[r.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.x))r.pop();else break}r.push(a)}r.pop();const n=[];for(let i=e.length-1;i>=0;i--){const a=e[i];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.x))n.pop();else break}n.push(a)}return n.pop(),r.length===1&&n.length===1&&r[0].x===n[0].x&&r[0].y===n[0].y?r:r.concat(n)}var bBe=Yle,wBe=Jle,jBe=Zle,nce=ece;const ice=bBe,ace=wBe,sce=jBe,a8=w.forwardRef(({className:e,sideOffset:r=4,...n},i)=>s.jsx(nce,{ref:i,sideOffset:r,className:it("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));a8.displayName=nce.displayName;var U0=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},xg=typeof window>"u"||"Deno"in globalThis;function vo(){}function _Be(e,r){return typeof e=="function"?e(r):e}function cR(e){return typeof e=="number"&&e>=0&&e!==1/0}function oce(e,r){return Math.max(e+(r||0)-Date.now(),0)}function Km(e,r){return typeof e=="function"?e(r):e}function mc(e,r){return typeof e=="function"?e(r):e}function qV(e,r){const{type:n="all",exact:i,fetchStatus:a,predicate:o,queryKey:l,stale:c}=e;if(l){if(i){if(r.queryHash!==s8(l,r.options))return!1}else if(!O2(r.queryKey,l))return!1}if(n!=="all"){const u=r.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&r.isStale()!==c||a&&a!==r.state.fetchStatus||o&&!o(r))}function KV(e,r){const{exact:n,status:i,predicate:a,mutationKey:o}=e;if(o){if(!r.options.mutationKey)return!1;if(n){if(yg(r.options.mutationKey)!==yg(o))return!1}else if(!O2(r.options.mutationKey,o))return!1}return!(i&&r.state.status!==i||a&&!a(r))}function s8(e,r){return((r==null?void 0:r.queryKeyHashFn)||yg)(e)}function yg(e){return JSON.stringify(e,(r,n)=>uR(n)?Object.keys(n).sort().reduce((i,a)=>(i[a]=n[a],i),{}):n)}function O2(e,r){return e===r?!0:typeof e!=typeof r?!1:e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(r).every(n=>O2(e[n],r[n])):!1}function lce(e,r){if(e===r)return e;const n=GV(e)&&GV(r);if(n||uR(e)&&uR(r)){const i=n?e:Object.keys(e),a=i.length,o=n?r:Object.keys(r),l=o.length,c=n?[]:{},u=new Set(i);let d=0;for(let h=0;h<l;h++){const f=n?h:o[h];(!n&&u.has(f)||n)&&e[f]===void 0&&r[f]===void 0?(c[f]=void 0,d++):(c[f]=lce(e[f],r[f]),c[f]===e[f]&&e[f]!==void 0&&d++)}return a===l&&d===a?e:c}return r}function AE(e,r){if(!r||Object.keys(e).length!==Object.keys(r).length)return!1;for(const n in e)if(e[n]!==r[n])return!1;return!0}function GV(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function uR(e){if(!XV(e))return!1;const r=e.constructor;if(r===void 0)return!0;const n=r.prototype;return!(!XV(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function XV(e){return Object.prototype.toString.call(e)==="[object Object]"}function CBe(e){return new Promise(r=>{setTimeout(r,e)})}function dR(e,r,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,r):n.structuralSharing!==!1?lce(e,r):r}function NBe(e,r,n=0){const i=[...e,r];return n&&i.length>n?i.slice(1):i}function SBe(e,r,n=0){const i=[r,...e];return n&&i.length>n?i.slice(0,-1):i}var o8=Symbol();function cce(e,r){return!e.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!e.queryFn||e.queryFn===o8?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function uce(e,r){return typeof e=="function"?e(...r):!!e}var UA,pm,yv,zie,kBe=(zie=class extends U0{constructor(){super();hr(this,UA);hr(this,pm);hr(this,yv);kt(this,yv,r=>{if(!xg&&window.addEventListener){const n=()=>r();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Ne(this,pm)||this.setEventListener(Ne(this,yv))}onUnsubscribe(){var r;this.hasListeners()||((r=Ne(this,pm))==null||r.call(this),kt(this,pm,void 0))}setEventListener(r){var n;kt(this,yv,r),(n=Ne(this,pm))==null||n.call(this),kt(this,pm,r(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(r){Ne(this,UA)!==r&&(kt(this,UA,r),this.onFocus())}onFocus(){const r=this.isFocused();
vendor: 4,971 bytes, line 926
926this.listeners.forEach(n=>{n(r)})}isFocused(){var r;return typeof Ne(this,UA)=="boolean"?Ne(this,UA):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},UA=new WeakMap,pm=new WeakMap,yv=new WeakMap,zie),l8=new kBe,vv,Am,bv,Uie,EBe=(Uie=class extends U0{constructor(){super();hr(this,vv,!0);hr(this,Am);hr(this,bv);kt(this,bv,r=>{if(!xg&&window.addEventListener){const n=()=>r(!0),i=()=>r(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){Ne(this,Am)||this.setEventListener(Ne(this,bv))}onUnsubscribe(){var r;this.hasListeners()||((r=Ne(this,Am))==null||r.call(this),kt(this,Am,void 0))}setEventListener(r){var n;kt(this,bv,r),(n=Ne(this,Am))==null||n.call(this),kt(this,Am,r(this.setOnline.bind(this)))}setOnline(r){Ne(this,vv)!==r&&(kt(this,vv,r),this.listeners.forEach(i=>{i(r)}))}isOnline(){return Ne(this,vv)}},vv=new WeakMap,Am=new WeakMap,bv=new WeakMap,Uie),gE=new EBe;function hR(){let e,r;const n=new Promise((a,o)=>{e=a,r=o});n.status="pending",n.catch(()=>{});function i(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{i({status:"fulfilled",value:a}),e(a)},n.reject=a=>{i({status:"rejected",reason:a}),r(a)},n}function BBe(e){return Math.min(1e3*2**e,3e4)}function dce(e){return(e??"online")==="online"?gE.isOnline():!0}var hce=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function eI(e){return e instanceof hce}function fce(e){let r=!1,n=0,i=!1,a;const o=hR(),l=g=>{var y;i||(p(new hce(g)),(y=e.abort)==null||y.call(e))},c=()=>{r=!0},u=()=>{r=!1},d=()=>l8.isFocused()&&(e.networkMode==="always"||gE.isOnline())&&e.canRun(),h=()=>dce(e.networkMode)&&e.canRun(),f=g=>{var y;i||(i=!0,(y=e.onSuccess)==null||y.call(e,g),a==null||a(),o.resolve(g))},p=g=>{var y;i||(i=!0,(y=e.onError)==null||y.call(e,g),a==null||a(),o.reject(g))},m=()=>new Promise(g=>{var y;a=x=>{(i||d())&&g(x)},(y=e.onPause)==null||y.call(e)}).then(()=>{var g;a=void 0,i||(g=e.onContinue)==null||g.call(e)}),A=()=>{if(i)return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(f).catch(x=>{var C;if(i)return;const b=e.retry??(xg?0:3),v=e.retryDelay??BBe,j=typeof v=="function"?v(n,x):v,_=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,x);if(r||!_){p(x);return}n++,(C=e.onFail)==null||C.call(e,n,x),CBe(j).then(()=>d()?void 0:m()).then(()=>{r?p(x):A()})})};return{promise:o,cancel:l,continue:()=>(a==null||a(),o),cancelRetry:c,continueRetry:u,canStart:h,start:()=>(h()?A():m().then(A),o)}}var TBe=e=>setTimeout(e,0);function PBe(){let e=[],r=0,n=c=>{c()},i=c=>{c()},a=TBe;const o=c=>{r?e.push(c):a(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&a(()=>{i(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;r++;try{u=c()}finally{r--,r||l()}return u},batchCalls:c=>(...u)=>{o(()=>{c(...u)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{i=c},setScheduler:c=>{a=c}}}var Ka=PBe(),$A,$ie,mce=($ie=class{constructor(){hr(this,$A)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cR(this.gcTime)&&kt(this,$A,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xg?1/0:5*60*1e3))}clearGcTimeout(){Ne(this,$A)&&(clearTimeout(Ne(this,$A)),kt(this,$A,void 0))}},$A=new WeakMap,$ie),wv,QA,fc,HA,Xs,s_,VA,uu,xh,Qie,IBe=(Qie=class extends mce{constructor(r){super();hr(this,uu);hr(this,wv);hr(this,QA);hr(this,fc);hr(this,HA);hr(this,Xs);hr(this,s_);hr(this,VA);kt(this,VA,!1),kt(this,s_,r.defaultOptions),this.setOptions(r.options),this.observers=[],kt(this,HA,r.client),kt(this,fc,Ne(this,HA).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,kt(this,wv,FBe(this.options)),this.state=r.state??Ne(this,wv),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var r;return(r=Ne(this,Xs))==null?void 0:r.promise}setOptions(r){this.options={...Ne(this,s_),...r},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Ne(this,fc).remove(this)}setData(r,n){const i=dR(this.state.data,r,this.options);return Wr(this,uu,xh).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(r,n){Wr(this,uu,xh).call(this,{type:"setState",state:r,setStateOptions:n})}cancel(r){var i,a;const n=(i=Ne(this,Xs))==null?void 0:i.promise;return(a=Ne(this,Xs))==null||a.cancel(r),n?n.then(vo).catch(vo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Ne(this,wv))}isActive(){return this.observers.some(r=>mc(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===o8||this.state.dataUpdateCount+this.state.errorUpdate
926Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>Km(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!oce(this.state.dataUpdatedAt,r)}onFocus(){var n;const r=this.observers.find(i=>i.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(n=Ne(this,Xs))==null||n.continue()}onOnline(){var n;const r=this.observers.find(i=>i.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(n=Ne(this,Xs))==null||n.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),Ne(this,fc).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(n=>n!==r),this.observers.length||(Ne(this,Xs)&&(Ne(this,VA)?Ne(this,Xs).cancel({revert:!0}):Ne(this,Xs).cancelRetry()),this.scheduleGc()),Ne(this,fc).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Wr(this,uu,xh).call(this,{type:"invalidate"})}fetch(r,n){var d,h,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Ne(this,Xs))return Ne(this,Xs).continueRetry(),Ne(this,Xs).promise}if(r&&this.setOptions(r),!this.options.queryFn){const p=this.observers.find(m=>m.options.queryFn);p&&this.setOptions(p.options)}const i=new AbortController,a=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(kt(this,VA,!0),i.signal)})},o=()=>{const p=cce(this.options,n),A=(()=>{const g={client:Ne(this,HA),queryKey:this.queryKey,meta:this.meta};return a(g),g})();return kt(this,VA,!1),this.options.persister?this.options.persister(p,A,this):p(A)},c=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Ne(this,HA),state:this.state,fetchFn:o};return a(p),p})();(d=this.options.behavior)==null||d.onFetch(c,this),kt(this,QA,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=c.fetchOptions)==null?void 0:h.meta))&&Wr(this,uu,xh).call(this,{type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta});const u=p=>{var m,A,g,y;eI(p)&&p.silent||Wr(this,uu,xh).call(this,{type:"error",error:p}),eI(p)||((A=(m=Ne(this,fc).config).onError)==null||A.call(m,p,this),(y=(g=Ne(this,fc).config).onSettled)==null||y.call(g,this.state.data,p,this)),this.scheduleGc()};return kt(this,Xs,fce({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,abort:i.abort.bind(i),onSuccess:p=>{var m,A,g,y;if(p===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(x){u(x);return}(A=(m=Ne(this,fc).config).onSuccess)==null||A.call(m,p,this),(y=(g=Ne(this,fc).config).onSettled)==null||y.call(g,p,this.state.error,this),this.scheduleGc()},onError:u,onFail:(p,m)=>{Wr(this,uu,xh).call(this,{type:"failed",failureCount:p,error:m})},onPause:()=>{Wr(this,uu,xh).call(this,{type:"pause"})},onContinue:()=>{Wr(this,uu,xh).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0})),Ne(this,Xs).start()}},wv=new WeakMap,QA=new WeakMap,fc=new WeakMap,HA=new WeakMap,Xs=new WeakMap,s_=new WeakMap,VA=new WeakMap,uu=new WeakSet,xh=function(r){const n=i=>{switch(r.type){case"failed":return{...i,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...pce(i.data,this.options),fetchMeta:r.meta??null};case"success":return kt(this,QA,void 0),{...i,data:r.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:r.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=r.error;return eI(a)&&a.revert&&Ne(this,QA)?{...Ne(this,QA),fetchStatus:"idle"}
vendor: 27,432 bytes, lines 926-935
926:{...i,error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...r.state}}};this.state=n(this.state),Ka.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),Ne(this,fc).notify({query:this,type:"updated",action:r})})},Qie);function pce(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:dce(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function FBe(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,n=r!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ld,Hie,OBe=(Hie=class extends U0{constructor(r={}){super();hr(this,ld);this.config=r,kt(this,ld,new Map)}build(r,n,i){const a=n.queryKey,o=n.queryHash??s8(a,n);let l=this.get(o);return l||(l=new IBe({client:r,queryKey:a,queryHash:o,options:r.defaultQueryOptions(n),state:i,defaultOptions:r.getQueryDefaults(a)}),this.add(l)),l}add(r){Ne(this,ld).has(r.queryHash)||(Ne(this,ld).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const n=Ne(this,ld).get(r.queryHash);n&&(r.destroy(),n===r&&Ne(this,ld).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){Ka.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return Ne(this,ld).get(r)}getAll(){return[...Ne(this,ld).values()]}find(r){const n={exact:!0,...r};return this.getAll().find(i=>qV(n,i))}findAll(r={}){const n=this.getAll();return Object.keys(r).length>0?n.filter(i=>qV(r,i)):n}notify(r){Ka.batch(()=>{this.listeners.forEach(n=>{n(r)})})}onFocus(){Ka.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){Ka.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},ld=new WeakMap,Hie),cd,Ao,WA,ud,Kf,Vie,LBe=(Vie=class extends mce{constructor(r){super();hr(this,ud);hr(this,cd);hr(this,Ao);hr(this,WA);this.mutationId=r.mutationId,kt(this,Ao,r.mutationCache),kt(this,cd,[]),this.state=r.state||Ace(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){Ne(this,cd).includes(r)||(Ne(this,cd).push(r),this.clearGcTimeout(),Ne(this,Ao).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){kt(this,cd,Ne(this,cd).filter(n=>n!==r)),this.scheduleGc(),Ne(this,Ao).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){Ne(this,cd).length||(this.state.status==="pending"?this.scheduleGc():Ne(this,Ao).remove(this))}continue(){var r;return((r=Ne(this,WA))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var o,l,c,u,d,h,f,p,m,A,g,y,x,b,v,j,_,C,N,S;const n=()=>{Wr(this,ud,Kf).call(this,{type:"continue"})};kt(this,WA,fce({fn:()=>this.options.mutationFn?this.options.mutationFn(r):Promise.reject(new Error("No mutationFn found")),onFail:(E,O)=>{Wr(this,ud,Kf).call(this,{type:"failed",failureCount:E,error:O})},onPause:()=>{Wr(this,ud,Kf).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Ne(this,Ao).canRun(this)}));const i=this.state.status==="pending",a=!Ne(this,WA).canStart();try{if(i)n();else{Wr(this,ud,Kf).call(this,{type:"pending",variables:r,isPaused:a}),await((l=(o=Ne(this,Ao).config).onMutate)==null?void 0:l.call(o,r,this));const O=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,r));O!==this.state.context&&Wr(this,ud,Kf).call(this,{type:"pending",context:O,variables:r,isPaused:a})}const E=await Ne(this,WA).start();return await((h=(d=Ne(this,Ao).config).onSuccess)==null?void 0:h.call(d,E,r,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,E,r,this.state.context)),await((A=(m=Ne(this,Ao).config).onSettled)==null?void 0:A.call(m,E,null,this.state.variables,this.state.context,this)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,E,null,r,this.state.context)),Wr(this,ud,Kf).call(this,{type:"success",data:E}),E}catch(E){try{throw await((b=(x=Ne(this,Ao).config).onError)==null?void 0:b.call(x,E,r,this.state.context,this)),await((j=(v=this.options).onError)==null?void 0:j.call(v,E,r,this.state.context)),await((C=(_=Ne(this,Ao).config).onSettled)==null?void 0:C.call(_,void 0,E,this.state.variables,this.state.context,this)),await((S=(N=this.options).onSettled)==null?void 0:S.call(N,void 0,E,r,this.state.context)),E}finally{Wr(this,ud,Kf).call(this,{type:"error",error:E})}}finally{Ne(this,Ao).runNext(this)}}},cd=new WeakMap,Ao=new WeakMap,WA=new WeakMap,ud=new WeakSet,Kf=function(r){const n=i=>{switch(r.type){case"failed":return{...i,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...i,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:r.error,failureCount:i.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ka.batch(()=>{Ne(this,cd).forEach(i=>{i.onMutationUpdate(r)}),Ne(this,Ao).notify({mutation:this,type:"updated",action:r})})},Vie);function Ace(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ch,du,o_,Wie,RBe=(Wie=class extends U0{constructor(r={}){super();hr(this,Ch);hr(this,du);hr(this,o_);this.config=r,kt(this,Ch,new Set),kt(this,du,new Map),kt(this,o_,0)}build(r,n,i){const a=new LBe({mutationCache:this,mutationId:++UC(this,o_)._,options:r.defaultMutationOptions(n),state:i});return this.add(a),a}add(r){Ne(this,Ch).add(r);const n=uN(r);if(typeof n=="string"){const i=Ne(this,du).get(n);i?i.push(r):Ne(this,du).set(n,[r])}this.notify({type:"added",mutation:r})}remove(r){if(Ne(this,Ch).delete(r)){const n=uN(r);if(typeof n=="string"){const i=Ne(this,du).get(n);if(i)if(i.length>1){const a=i.indexOf(r);a!==-1&&i.splice(a,1)}else i[0]===r&&Ne(this,du).delete(n)}}this.notify({type:"removed",mutation:r})}canRun(r){const n=uN(r);if(typeof n=="string"){const i=Ne(this,du).get(n),a=i==null?void 0:i.find(o=>o.state.status==="pending");return!a||a===r}else return!0}runNext(r){var i;const n=uN(r);if(typeof n=="string"){const a=(i=Ne(this,du).get(n))==null?void 0:i.find(o=>o!==r&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ka.batch(()=>{Ne(this,Ch).forEach(r=>{this.notify({type:"removed",mutation:r})}),Ne(this,Ch).clear(),Ne(this,du).clear()})}getAll(){return Array.from(Ne(this,Ch))}find(r){const n={exact:!0,...r};return this.getAll().find(i=>KV(n,i))}findAll(r={}){return this.getAll().filter(n=>KV(r,n))}notify(r){Ka.batch(()=>{this.listeners.forEach(n=>{n(r)})})}resumePausedMutations(){const r=this.getAll().filter(n=>n.state.isPaused);return Ka.batch(()=>Promise.all(r.map(n=>n.continue().catch(vo))))}},Ch=new WeakMap,du=new WeakMap,o_=new WeakMap,Wie);function uN(e){var r;return(r=e.options.scope)==null?void 0:r.id}function YV(e){return{onFetch:(r,n)=>{var h,f,p,m,A;const i=r.options,a=(p=(f=(h=r.fetchOptions)==null?void 0:h.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,o=((m=r.state.data)==null?void 0:m.pages)||[],l=((A=r.state.data)==null?void 0:A.pageParams)||[];let c={pages:[],pageParams:[]},u=0;const d=async()=>{let g=!1;const y=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(r.signal.aborted?g=!0:r.signal.addEventListener("abort",()=>{g=!0}),r.signal)})},x=cce(r.options,r.fetchOptions),b=async(v,j,_)=>{if(g)return Promise.reject();if(j==null&&v.pages.length)return Promise.resolve(v);const N=(()=>{const B={client:r.client,queryKey:r.queryKey,pageParam:j,direction:_?"backward":"forward",meta:r.options.meta};return y(B),B})(),S=await x(N),{maxPages:E}=r.options,O=_?SBe:NBe;return{pages:O(v.pages,S,E),pageParams:O(v.pageParams,j,E)}};if(a&&o.length){const v=a==="backward",j=v?DBe:JV,_={pages:o,pageParams:l},C=j(i,_);c=await b(_,C,v)}else{const v=e??o.length;do{const j=u===0?l[0]??i.initialPageParam:JV(i,c);if(u>0&&j==null)break;c=await b(c,j),u++}while(u<v)}return c};r.options.persister?r.fetchFn=()=>{var g,y;return(y=(g=r.options).persister)==null?void 0:y.call(g,d,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},n)}:r.fetchFn=d}}}function JV(e,{pages:r,pageParams:n}){const i=r.length-1;return r.length>0?e.getNextPageParam(r[i],r,n[i],n):void 0}function DBe(e,{pages:r,pageParams:n}){var i;return r.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,r[0],r,n[0],n):void 0}var ta,gm,xm,jv,_v,ym,Cv,Nv,qie,MBe=(qie=class{constructor(e={}){hr(this,ta);hr(this,gm);hr(this,xm);hr(this,jv);hr(this,_v);hr(this,ym);hr(this,Cv);hr(this,Nv);kt(this,ta,e.queryCache||new OBe),kt(this,gm,e.mutationCache||new RBe),kt(this,xm,e.defaultOptions||{}),kt(this,jv,new Map),kt(this,_v,new Map),kt(this,ym,0)}mount(){UC(this,ym)._++,Ne(this,ym)===1&&(kt(this,Cv,l8.subscribe(async e=>{e&&(await this.resumePausedMutations(),Ne(this,ta).onFocus())})),kt(this,Nv,gE.subscribe(async e=>{e&&(await this.resumePausedMutations(),Ne(this,ta).onOnline())})))}unmount(){var e,r;UC(this,ym)._--,Ne(this,ym)===0&&((e=Ne(this,Cv))==null||e.call(this),kt(this,Cv,void 0),(r=Ne(this,Nv))==null||r.call(this),kt(this,Nv,void 0))}isFetching(e){return Ne(this,ta).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Ne(this,gm).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const r=this.defaultQueryOptions({queryKey:e});return(n=Ne(this,ta).get(r.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),n=Ne(this,ta).build(this,r),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Km(r.staleTime,n))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(e){return Ne(this,ta).findAll(e).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(e,r,n){const i=this.defaultQueryOptions({queryKey:e}),a=Ne(this,ta).get(i.queryHash),o=a==null?void 0:a.state.data,l=_Be(r,o);if(l!==void 0)return Ne(this,ta).build(this,i).setData(l,{...n,manual:!0})}setQueriesData(e,r,n){return Ka.batch(()=>Ne(this,ta).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(e){var n;const r=this.defaultQueryOptions({queryKey:e});return(n=Ne(this,ta).get(r.queryHash))==null?void 0:n.state}removeQueries(e){const r=Ne(this,ta);Ka.batch(()=>{r.findAll(e).forEach(n=>{r.remove(n)})})}resetQueries(e,r){const n=Ne(this,ta);return Ka.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},r)))}cancelQueries(e,r={}){const n={revert:!0,...r},i=Ka.batch(()=>Ne(this,ta).findAll(e).map(a=>a.cancel(n)));return Promise.all(i).then(vo).catch(vo)}invalidateQueries(e,r={}){return Ka.batch(()=>(Ne(this,ta).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},r)))}refetchQueries(e,r={}){const n={...r,cancelRefetch:r.cancelRefetch??!0},i=Ka.batch(()=>Ne(this,ta).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,n);return n.throwOnError||(o=o.catch(vo)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(i).then(vo)}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const n=Ne(this,ta).build(this,r);return n.isStaleByTime(Km(r.staleTime,n))?n.fetch(r):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vo).catch(vo)}fetchInfiniteQuery(e){return e.behavior=YV(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vo).catch(vo)}ensureInfiniteQueryData(e){return e.behavior=YV(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gE.isOnline()?Ne(this,gm).resumePausedMutations():Promise.resolve()}getQueryCache(){return Ne(this,ta)}getMutationCache(){return Ne(this,gm)}getDefaultOptions(){return Ne(this,xm)}setDefaultOptions(e){kt(this,xm,e)}setQueryDefaults(e,r){Ne(this,jv).set(yg(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...Ne(this,jv).values()],n={};return r.forEach(i=>{O2(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,r){Ne(this,_v).set(yg(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...Ne(this,_v).values()],n={};return r.forEach(i=>{O2(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const r={...Ne(this,xm).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=s8(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===o8&&(r.enabled=!1),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Ne(this,xm).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Ne(this,ta).clear(),Ne(this,gm).clear()}},ta=new WeakMap,gm=new WeakMap,xm=new WeakMap,jv=new WeakMap,_v=new WeakMap,ym=new WeakMap,Cv=new WeakMap,Nv=new WeakMap,qie),Uo,un,l_,go,qA,Sv,vm,bm,c_,kv,Ev,KA,GA,wm,Bv,Dn,rw,fR,mR,pR,AR,gR,xR,yR,gce,Kie,zBe=(Kie=class extends U0{constructor(r,n){super();hr(this,Dn);hr(this,Uo);hr(this,un);hr(this,l_);hr(this,go);hr(this,qA);hr(this,Sv);hr(this,vm);hr(this,bm);hr(this,c_);hr(this,kv);hr(this,Ev);hr(this,KA);hr(this,GA);hr(this,wm);hr(this,Bv,new Set);this.options=n,kt(this,Uo,r),kt(this,bm,null),kt(this,vm,hR()),this.options.experimental_prefetchInRender||Ne(this,vm).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Ne(this,un).addObserver(this),ZV(Ne(this,un),this.options)?Wr(this,Dn,rw).call(this):this.updateResult(),Wr(this,Dn,AR).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vR(Ne(this,un),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vR(Ne(this,un),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Wr(this,Dn,gR).call(this),Wr(this,Dn,xR).call(this),Ne(this,un).removeObserver(this)}setOptions(r){const n=this.options,i=Ne(this,un);if(this.options=Ne(this,Uo).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof mc(this.options.enabled,Ne(this,un))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Wr(this,Dn,yR).call(this),Ne(this,un).setOptions(this.options),n._defaulted&&!AE(this.options,n)&&Ne(this,Uo).getQueryCache().notify({type:"observerOptionsUpdated",query:Ne(this,un),observer:this});const a=this.hasListeners();a&&eW(Ne(this,un),i,this.options,n)&&Wr(this,Dn,rw).call(this),this.updateResult(),a&&(Ne(this,un)!==i||mc(this.options.enabled,Ne(this,un))!==mc(n.enabled,Ne(this,un))||Km(this.options.staleTime,Ne(this,un))!==Km(n.staleTime,Ne(this,un)))&&Wr(this,Dn,fR).call(this);const o=Wr(this,Dn,mR).call(this);a&&(Ne(this,un)!==i||mc(this.options.enabled,Ne(this,un))!==mc(n.enabled,Ne(this,un))||o!==Ne(this,wm))&&Wr(this,Dn,pR).call(this,o)}getOptimisticResult(r){const n=Ne(this,Uo).getQueryCache().build(Ne(this,Uo),r),i=this.createResult(n,r);return $Be(this,i)&&(kt(this,go,i),kt(this,Sv,this.options),kt(this,qA,Ne(this,un).state)),i}getCurrentResult(){return Ne(this,go)}trackResult(r,n){return new Proxy(r,{get:(i,a)=>(this.trackProp(a),n==null||n(a),Reflect.get(i,a))})}trackProp(r){Ne(this,Bv).add(r)}getCurrentQuery(){return Ne(this,un)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const n=Ne(this,Uo).defaultQueryOptions(r),i=Ne(this,Uo).getQueryCache().build(Ne(this,Uo),n);return i.fetch().then(()=>this.createResult(i,n))}fetch(r){return Wr(this,Dn,rw).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),Ne(this,go)))}createResult(r,n){var E;const i=Ne(this,un),a=this.options,o=Ne(this,go),l=Ne(this,qA),c=Ne(this,Sv),d=r!==i?r.state:Ne(this,l_),{state:h}=r;let f={...h},p=!1,m;if(n._optimisticResults){const O=this.hasListeners(),B=!O&&ZV(r,n),T=O&&eW(r,i,n,a);(B||T)&&(f={...f,...pce(h.data,r.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:A,errorUpdatedAt:g,status:y}=f;m=f.data;let x=!1;if(n.placeholderData!==void 0&&m===void 0&&y==="pending"){let O;o!=null&&o.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(O=o.data,x=!0):O=typeof n.placeholderData=="function"?n.placeholderData((E=Ne(this,Ev))==null?void 0:E.state.data,Ne(this,Ev)):n.placeholderData,O!==void 0&&(y="success",m=dR(o==null?void 0:o.data,O,n),p=!0)}if(n.select&&m!==void 0&&!x)if(o&&m===(l==null?void 0:l.data)&&n.select===Ne(this,c_))m=Ne(this,kv);else try{kt(this,c_,n.select),m=n.select(m),m=dR(o==null?void 0:o.data,m,n),kt(this,kv,m),kt(this,bm,null)}catch(O){kt(this,bm,O)}Ne(this,bm)&&(A=Ne(this,bm),m=Ne(this,kv),g=Date.now(),y="error");const b=f.fetchStatus==="fetching",v=y==="pending",j=y==="error",_=v&&b,C=m!==void 0,S={status:y,fetchStatus:f.fetchStatus,isPending:v,isSuccess:y==="success",isError:j,isInitialLoading:_,isLoading:_,data:m,dataUpdatedAt:f.dataUpdatedAt,error:A,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>d.dataUpdateCount||f.errorUpdateCount>d.errorUpdateCount,isFetching:b,isRefetching:b&&!v,isLoadingError:j&&!C,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:j&&C,isStale:c8(r,n),refetch:this.refetch,promise:Ne(this,vm),isEnabled:mc(n.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const O=F=>{S.status==="error"?F.reject(S.error):S.data!==void 0&&F.resolve(S.data)},B=()=>{const F=kt(this,vm,S.promise=hR());O(F)},T=Ne(this,vm);switch(T.status){case"pending":r.queryHash===i.queryHash&&O(T);break;case"fulfilled":(S.status==="error"||S.data!==T.value)&&B();break;case"rejected":(S.status!=="error"||S.error!==T.reason)&&B();break}}return S}updateResult(){const r=Ne(this,go),n=this.createResult(Ne(this,un),this.options);if(kt(this,qA,Ne(this,un).state),kt(this,Sv,this.options),Ne(this,qA).data!==void 0&&kt(this,Ev,Ne(this,un)),AE(n,r))return;kt(this,go,n);const i=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!Ne(this,Bv).size)return!0;const l=new Set(o??Ne(this,Bv));return this.options.throwOnError&&l.add("error"),Object.keys(Ne(this,go)).some(c=>{const u=c;return Ne(this,go)[u]!==r[u]&&l.has(u)})};Wr(this,Dn,gce).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Wr(this,Dn,AR).call(this)}},Uo=new WeakMap,un=new WeakMap,l_=new WeakMap,go=new WeakMap,qA=new WeakMap,Sv=new WeakMap,vm=new WeakMap,bm=new WeakMap,c_=new WeakMap,kv=new WeakMap,Ev=new WeakMap,KA=new WeakMap,GA=new WeakMap,wm=new WeakMap,Bv=new WeakMap,Dn=new WeakSet,rw=function(r){Wr(this,Dn,yR).call(this);let n=Ne(this,un).fetch(this.options,r);return r!=null&&r.throwOnError||(n=n.catch(vo)),n},fR=function(){Wr(this,Dn,gR).call(this);const r=Km(this.options.staleTime,Ne(this,un));if(xg||Ne(this,go).isStale||!cR(r))return;const i=oce(Ne(this,go).dataUpdatedAt,r)+1;kt(this,KA,setTimeout(()=>{Ne(this,go).isStale||this.updateResult()},i))},mR=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Ne(this,un)):this.options.refetchInterval)??!1},pR=function(r){Wr(this,Dn,xR).call(this),kt(this,wm,r),!(xg||mc(this.options.enabled,Ne(this,un))===!1||!cR(Ne(this,wm))||Ne(this,wm)===0)&&kt(this,GA,setInterval(()=>{(this.options.refetchIntervalInBackground||l8.isFocused())&&Wr(this,Dn,rw).call(this)},Ne(this,wm)))},AR=function(){Wr(this,Dn,fR).call(this),Wr(this,Dn,pR).call(this,Wr(this,Dn,mR).call(this))},gR=function(){Ne(this,KA)&&(clearTimeout(Ne(this,KA)),kt(this,KA,void 0))},xR=function(){Ne(this,GA)&&(clearInterval(Ne(this,GA)),kt(this,GA,void 0))},yR=function(){const r=Ne(this,Uo).getQueryCache().build(Ne(this,Uo),this.options);if(r===Ne(this,un))return;const n=Ne(this,un);kt(this,un,r),kt(this,l_,r.state),this.hasListeners()&&(n==null||n.removeObserver(this),r.addObserver(this))},gce=function(r){Ka.batch(()=>{r.listeners&&this.listeners.forEach(n=>{n(Ne(this,go))}),Ne(this,Uo).getQueryCache().notify({query:Ne(this,un),type:"observerResultsUpdated"})})},Kie);function UBe(e,r){return mc(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&r.retryOnMount===!1)}function ZV(e,r){return UBe(e,r)||e.state.data!==void 0&&vR(e,r,r.refetchOnMount)}function vR(e,r,n){if(mc(r.enabled,e)!==!1&&Km(r.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&c8(e,r)}return!1}function eW(e,r,n,i){return(e!==r||mc(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&c8(e,n)}function c8(e,r){return mc(r.enabled,e)!==!1&&e.isStaleByTime(Km(r.staleTime,e))}function $Be(e,r){return!AE(e.getCurrentResult(),r)}var jm,_m,$o,Nh,Qh,sk,bR,Gie,QBe=(Gie=class extends U0{constructor(n,i){super();hr(this,Qh);hr(this,jm);hr(this,_m);hr(this,$o);hr(this,Nh);kt(this,jm,n),this.setOptions(i),this.bindMethods(),Wr(this,Qh,sk).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const i=this.options;this.options=Ne(this,jm).defaultMutationOptions(n),AE(this.options,i)||Ne(this,jm).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Ne(this,$o),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&yg(i.mutationKey)!==yg(this.options.mutationKey)?this.reset():((a=Ne(this,$o))==null?void 0:a.state.status)==="pending"&&Ne(this,$o).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=Ne(this,$o))==null||n.removeObserver(this)}onMutationUpdate(n){Wr(this,Qh,sk).call(this),Wr(this,Qh,bR).call(this,n)}getCurrentResult(){return Ne(this,_m)}reset(){var n;(n=Ne(this,$o))==null||n.removeObserver(this),kt(this,$o,void 0),Wr(this,Qh,sk).call(this),Wr(this,Qh,bR).call(this)}mutate(n,i){var a;return kt(this,Nh,i),(a=Ne(this,$o))==null||a.removeObserver(this),kt(this,$o,Ne(this,jm).getMutationCache().build(Ne(this,jm),this.options)),Ne(this,$o).addObserver(this),Ne(this,$o).execute(n)}},jm=new WeakMap,_m=new WeakMap,$o=new WeakMap,Nh=new WeakMap,Qh=new WeakSet,sk=function(){var i;const n=((i=Ne(this,$o))==null?void 0:i.state)??Ace();kt(this,_m,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},bR=function(n){Ka.batch(()=>{var i,a,o,l,c,u,d,h;if(Ne(this,Nh)&&this.hasListeners()){const f=Ne(this,_m).variables,p=Ne(this,_m).context;(n==null?void 0:n.type)==="success"?((a=(i=Ne(this,Nh)).onSuccess)==null||a.call(i,n.data,f,p),(l=(o=Ne(this,Nh)).onSettled)==null||l.call(o,n.data,null,f,p)):(n==null?void 0:n.type)==="error"&&((u=(c=Ne(this,Nh)).onError)==null||u.call(c,n.error,f,p),(h=(d=Ne(this,Nh)).onSettled)==null||h.call(d,void 0,n.error,f,p))}this.listeners.forEach(f=>{f(Ne(this,_m))})})},Gie),xce=w.createContext(void 0),Kr=e=>{const r=w.useContext(xce);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},HBe=({client:e,children:r})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(xce.Provider,{value:e,children:r})),yce=w.createContext(!1),VBe=()=>w.useContext(yce);yce.Provider;function WBe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var qBe=w.createContext(WBe()),KBe=()=>w.useContext(qBe),GBe=(e,r)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(r.isReset()||(e.retryOnMount=!1))},XBe=e=>{w.useEffect(()=>{e.clearReset()},[e])},YBe=({result:e,errorResetBoundary:r,throwOnError:n,query:i,suspense:a})=>e.isError&&!r.isReset()&&!e.isFetching&&i&&(a&&e.data===void 0||uce(n,[e.error,i])),JBe=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},ZBe=(e,r)=>e.isLoading&&e.isFetching&&!r,e4e=(e,r)=>(e==null?void 0:e.suspense)&&r.isPending,tW=(e,r,n)=>r.fetchOptimistic(e).catch(()=>{n.clearReset()});function t4e(e,r,n){var f,p,m,A,g;const i=VBe(),a=KBe(),o=Kr(),l=o.defaultQueryOptions(e);(p=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||p.call(f,l),l._optimisticResults=i?"isRestoring":"optimistic",JBe(l),GBe(l,a),XBe(a);const c=!o.getQueryCache().get(l.queryHash),[u]=w.useState(()=>new r(o,l)),d=u.getOptimisticResult(l),h=!i&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(y=>{const x=h?u.subscribe(Ka.batchCalls(y)):vo;return u.updateResult(),x},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),w.useEffect(()=>{u.setOptions(l)},[l,u]),e4e(l,d))throw tW(l,u,a);if(YBe({result:d,errorResetBoundary:a,throwOnError:l.throwOnError,query:o.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw d.error;if((A=(m=o.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||A.call(m,l,d),l.experimental_prefetchInRender&&!xg&&ZBe(d,i)){const y=c?tW(l,u,a):(g=o.getQueryCache().get(l.queryHash))==null?void 0:g.promise;y==null||y.catch(vo).finally(()=>{u.updateResult()})}return l.notifyOnChangeProps?d:u.trackResult(d)}function Xe(e,r){return t4e(e,zBe)}function An(e,r){const n=Kr(),[i]=w.useState(()=>new QBe(n,e));w.useEffect(()=>{i.setOptions(e)},[i,e]);const a=w.useSyncExternalStore(w.useCallback(l=>i.subscribe(Ka.batchCalls(l)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=w.useCallback((l,c)=>{i.mutate(l,c).catch(vo)},[i]);if(a.error&&uce(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}/**
927 * @remix-run/router v1.23.0
928 *
929 * Copyright (c) Remix Software Inc.
930 *
931 * This source code is licensed under the MIT license found in the
932 * LICENSE.md file in the root directory of this source tree.
933 *
934 * @license MIT
935 */function L2(){return L2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},L2.apply(this,arguments)}var km;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(km||(km={}));const rW="popstate";function r4e(e){e===void 0&&(e={});function r(i,a){let{pathname:o,search:l,hash:c}=i.location;return wR("",{pathname:o,search:l,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}
vendor: 4,462 bytes, line 935
935function n(i,a){return typeof a=="string"?a:xE(a)}return i4e(r,n,null,e)}function qi(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function vce(e,r){if(!e){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function n4e(){return Math.random().toString(36).substr(2,8)}function nW(e,r){return{usr:e.state,key:e.key,idx:r}}function wR(e,r,n,i){return n===void 0&&(n=null),L2({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof r=="string"?$0(r):r,{state:n,key:r&&r.key||i||n4e()})}function xE(e){let{pathname:r="/",search:n="",hash:i=""}=e;return n&&n!=="?"&&(r+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(r+=i.charAt(0)==="#"?i:"#"+i),r}function $0(e){let r={};if(e){let n=e.indexOf("#");n>=0&&(r.hash=e.substr(n),e=e.substr(0,n));let i=e.indexOf("?");i>=0&&(r.search=e.substr(i),e=e.substr(0,i)),e&&(r.pathname=e)}return r}function i4e(e,r,n,i){i===void 0&&(i={});let{window:a=document.defaultView,v5Compat:o=!1}=i,l=a.history,c=km.Pop,u=null,d=h();d==null&&(d=0,l.replaceState(L2({},l.state,{idx:d}),""));function h(){return(l.state||{idx:null}).idx}function f(){c=km.Pop;let y=h(),x=y==null?null:y-d;d=y,u&&u({action:c,location:g.location,delta:x})}function p(y,x){c=km.Push;let b=wR(g.location,y,x);d=h()+1;let v=nW(b,d),j=g.createHref(b);try{l.pushState(v,"",j)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;a.location.assign(j)}o&&u&&u({action:c,location:g.location,delta:1})}function m(y,x){c=km.Replace;let b=wR(g.location,y,x);d=h();let v=nW(b,d),j=g.createHref(b);l.replaceState(v,"",j),o&&u&&u({action:c,location:g.location,delta:0})}function A(y){let x=a.location.origin!=="null"?a.location.origin:a.location.href,b=typeof y=="string"?y:xE(y);return b=b.replace(/ $/,"%20"),qi(x,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,x)}let g={get action(){return c},get location(){return e(a,l)},listen(y){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(rW,f),u=y,()=>{a.removeEventListener(rW,f),u=null}},createHref(y){return r(a,y)},createURL:A,encodeLocation(y){let x=A(y);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:p,replace:m,go(y){return l.go(y)}};return g}var iW;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(iW||(iW={}));function a4e(e,r,n){return n===void 0&&(n="/"),s4e(e,r,n,!1)}function s4e(e,r,n,i){let a=typeof r=="string"?$0(r):r,o=Hv(a.pathname||"/",n);if(o==null)return null;let l=bce(e);o4e(l);let c=null;for(let u=0;c==null&&u<l.length;++u){let d=x4e(o);c=A4e(l[u],d,i)}return c}function bce(e,r,n,i){r===void 0&&(r=[]),n===void 0&&(n=[]),i===void 0&&(i="");let a=(o,l,c)=>{let u={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};u.relativePath.startsWith("/")&&(qi(u.relativePath.startsWith(i),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(i.length));let d=Gm([i,u.relativePath]),h=n.concat(u);o.children&&o.children.length>0&&(qi(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),bce(o.children,r,h,d)),!(o.path==null&&!o.index)&&r.push({path:d,score:m4e(d,o.index),routesMeta:h})};return e.forEach((o,l)=>{var c;if(o.path===""||!((c=o.path)!=null&&c.includes("?")))a(o,l);else for(let u of wce(o.path))a(o,l,u)}),r}function wce(e){let r=e.split("/");if(r.length===0)return[];let[n,...i]=r,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(i.length===0)return a?[o,""]:[o];let l=wce(i.join("/")),c=[];return c.push(...l.map(u=>u===""?o:[o,u].join("/"))),a&&c.push(...l),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function o4e(e){e.sort((r,n)=>r.score!==n.score?n.score-r.score:p4e(r.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const l4e=/^:[\w-]+$/,c4e=3,u4e=2,d4e=1,h4e=10,f4e=-2,aW=e=>e==="*";function m4e(e,r){let n=e.split("/"),i=n.length;return n.some(aW)&&(i+=f4e),r&&(i+=u4e),n.filter(a=>!aW(a)).reduce((a,o)=>a+(l4e.test(o)?c4e:o===""?d4e:h4e),i)}function p4e(e,r){return e.length===r.length&&e.slice(0,-1).every((i,a)=>i===r[a])?e[e.length-1]-r[r.length-1]:0}function A4e(e,r,n){let{routesMeta:i}=e,a={},o="/",l=[];for(let c=0;c<i.length;++c){let u=i[c],d=c===i.length-1,h=o==="/"?r:r.slice(o.length)||"/",f
vendor: 7,156 bytes, lines 935-944
935=yE({path:u.relativePath,caseSensitive:u.caseSensitive,end:d},h),p=u.route;if(!f&&d&&n&&!i[i.length-1].route.index&&(f=yE({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},h)),!f)return null;Object.assign(a,f.params),l.push({params:a,pathname:Gm([o,f.pathname]),pathnameBase:w4e(Gm([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=Gm([o,f.pathnameBase]))}return l}function yE(e,r){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=g4e(e.path,e.caseSensitive,e.end),a=r.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:i.reduce((d,h,f)=>{let{paramName:p,isOptional:m}=h;if(p==="*"){let g=c[f]||"";l=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const A=c[f];return m&&!A?d[p]=void 0:d[p]=(A||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function g4e(e,r,n){r===void 0&&(r=!1),n===void 0&&(n=!0),vce(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let i=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,u)=>(i.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(i.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,r?void 0:"i"),i]}function x4e(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return vce(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+r+").")),e}}function Hv(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let n=r.endsWith("/")?r.length-1:r.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}function y4e(e,r){r===void 0&&(r="/");let{pathname:n,search:i="",hash:a=""}=typeof e=="string"?$0(e):e;return{pathname:n?n.startsWith("/")?n:v4e(n,r):r,search:j4e(i),hash:_4e(a)}}function v4e(e,r){let n=r.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function tI(e,r,n,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+r+"` field ["+JSON.stringify(i)+"].  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 b4e(e){return e.filter((r,n)=>n===0||r.route.path&&r.route.path.length>0)}function u8(e,r){let n=b4e(e);return r?n.map((i,a)=>a===n.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function d8(e,r,n,i){i===void 0&&(i=!1);let a;typeof e=="string"?a=$0(e):(a=L2({},e),qi(!a.pathname||!a.pathname.includes("?"),tI("?","pathname","search",a)),qi(!a.pathname||!a.pathname.includes("#"),tI("#","pathname","hash",a)),qi(!a.search||!a.search.includes("#"),tI("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,c;if(l==null)c=n;else{let f=r.length-1;if(!i&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),f-=1;a.pathname=p.join("/")}c=f>=0?r[f]:"/"}let u=y4e(a,c),d=l&&l!=="/"&&l.endsWith("/"),h=(o||l===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||h)&&(u.pathname+="/"),u}const Gm=e=>e.join("/").replace(/\/\/+/g,"/"),w4e=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),j4e=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_4e=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function C4e(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const jce=["post","put","patch","delete"];new Set(jce);const N4e=["get",...jce];new Set(N4e);/**
936 * React Router v6.30.1
937 *
938 * Copyright (c) Remix Software Inc.
939 *
940 * This source code is licensed under the MIT license found in the
941 * LICENSE.md file in the root directory of this source tree.
942 *
943 * @license MIT
944 */function R2(){return R2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},R2.apply(this,arguments)}const v4=w.createContext(null),_ce=w.createContext(null),mf=w.createContext(null),b4=w.createContext(null),pf=w.createContext({outlet:null,matches:[],isDataRoute:!1}),Cce=w.createContext(null);function S4e(e,r){let{relative:n}=r===void 0?{}:r;Q0()||qi(!1);let{basename:i,navigator:a}=w.useContext(mf),{hash:o,pathname:l,search:c}=w4(e,{relative:n}),u=l;return i!=="/"&&(u=l==="/"?i:Gm([i,l])),a.createHref({pathname:u,search:c,hash:o})}function Q0(){return w.useContext(b4)!=null}function ps(){return Q0()||qi(!1),w.useContext(b4).location}function Nce(e){w.useContext(mf).static||w.useLayoutEffect(e)}function As(){let{isDataRoute:e}=w.useContext(pf);return e?z4e():k4e()}function k4e(){Q0()||qi(!1);let e=w.useContext(v4),{basename:r,future:n,navigator:i}=w.useContext(mf),{matches:a}=w.useContext(pf),{pathname:o}=ps(),l=JSON.stringify(u8(a,n.v7_relativeSplatPath)),c=w.useRef(!1);return Nce(()=>{c.current=!0}),w.useCallback(function(d,h){if(h===void 0&&(h={}),!c.current)return;if(typeof d=="number"){i.go(d);return}let f=d8(d,JSON.parse(l),o,h.relative==="path");e==null&&r!=="/"&&(f.pathname=f.pathname==="/"?r:Gm([r,f.pathname])),(h.replace?i.replace:i.push)(f,h.state,h)},[r,i,l,o,e])}function Zl(){let{matches:e}=w.useContext(pf),r=e[e.length-1];return r?r.params:{}}function w4(e,r){let{relative:n}=r===void 0?{}:r,{future:i}=w.useContext(mf),{matches:a}=w.useContext(pf),{pathname:o}=ps(),l=JSON.stringify(u8(a,i.v7_relativeSplatPath));return w.useMemo(()=>d8(e,JSON.parse(l),o,n==="path"),[e,l,o,n])}function E4e(e,r){return B4e(e,r)}function B4e(e,r,n,i){Q0()||qi(!1);let{navigator:a}=w.useContext(mf),{matches:o}=w.useContext(pf),l=o[o.length-1],c=l?l.params:{};l&&l.pathname;let u=l?l.pathnameBase:"/";l&&l.route;let d=ps(),h;if(r){var f;let y=typeof r=="string"?$0(r):r;u==="/"||(f=y.pathname)!=null&&f.startsWith(u)||qi(!1),h=y}else h=d;let p=h.pathname||"/",m=p;if(u!=="/"){let y=u.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}let A=a4e(e,{pathname:m}),g=O4e(A&&A.map(y=>Object.assign({},y,{params:Object.assign({},c,y.params),pathname:Gm([u,a.encodeLocation?a.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:Gm([u,a.encodeLocation?a.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n,i);return r&&g?w.createElement(b4.Provider,{value:{location:R2({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:km.Pop}},g):g}function T4e(){let e=M4e(),r=C4e(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application 
944Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},r),n?w.createElement("pre",{style:a},n):null,null)}const P4e=w.createElement(T4e,null);class I4e extends w.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,n){return n.location!==r.location||n.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:n.error,location:n.location,revalidation:r.revalidation||n.revalidation}}componentDidCatch(r,n){console.error("React Router caught the following error during render",r,n)}render(){return this.state.error!==void 0?w.createElement(pf.Provider,{value:this.props.routeContext},w.createElement(Cce.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function F4e(e){let{routeContext:r,match:n,children:i}=e,a=w.useContext(v4);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(pf.Provider,{value:r},i)}function O4e(e,r,n,i){var a;if(r===void 0&&(r=[]),n===void 0&&(n=null),i===void 0&&(i=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=i)!=null&&o.v7_partialHydration&&r.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,c=(a=n)==null?void 0:a.errors;if(c!=null){let h=l.findIndex(f=>f.route.id&&(c==null?void 0:c[f.route.id])!==void 0);h>=0||qi(!1),l=l.slice(0,Math.min(l.length,h+1))}let u=!1,d=-1;if(n&&i&&i.v7_partialHydration)for(let h=0;h<l.length;h++){let f=l[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(d=h),f.route.id){let{loaderData:p,errors:m}=n,A=f.route.loader&&p[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||A){u=!0,d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}return l.reduceRight((h,f,p)=>{let m,A=!1,g=null,y=null;n&&(m=c&&f.route.id?c[f.route.id]:void 0,g=f.route.errorElement||P4e,u&&(d<0&&p===0?(A=!0,y=null):d===p&&(A=!0,y=f.route.hydrateFallbackElement||null)));let x=r.concat(l.slice(0,p+1)),b=()=>{let v;return m?v=g:A?v=y:f.route.Component?v=w.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=h,w.createElement(F4e,{match:f,routeContext:{outlet:h,matches:x,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?w.createElement(I4e,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:b(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):b()},null)}var Sce=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Sce||{}),vE=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(vE||{});function L4e(e){let r=w.useContext(v4);return r||qi(!1),r}function R4e(e){let r=w.useContext(_ce);return r||qi(!1),r}function D4e(e){let r=w.useContext(pf);return r||qi(!1),r}function kce(e){let r=D4e(),n=r.matches[r.matches.length-1];return n.route.id||qi(!1),n.route.id}function M4e(){var e;let r=w.useContext(Cce),n=R4e(vE.UseRouteError),i=kce(vE.UseRouteError);return r!==void 0?r:(e=n.errors)==null?void 0:e[i]}function z4e(){let{router:e}=L4e(Sce.UseNavigateStable),r=kce(vE.UseNavigateStable),n=w.useRef(!1);return Nce(()=>{n.current=!0}),w.useCallback(function(a,o){o===void 0&&(o={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,R2({fromRouteId:r},o)))},[e,r])}function U4e(e,r){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function xd(e){let{to:r,replace:n,state:i,relative:a}=e;Q0()||qi(!1);let{future:o,static:l}=w.useContext(mf),{matches:c}=w.useContext(pf),{pathname:u}=ps(),d=As(),h=d8(r,u8(c,o.v7_relativeSplatPath),u,a==="path"),f=JSON.stringify(h);return w.useEffect(()=>d(JSON.parse(f),{replace:n,state:i,relative:a}),[d,f,a,n,i]),null}function Ke(e){qi(!1)}function $4e(e){let{basename:r="/",children:n=null,location:i,navigationType:a=km.Pop,navigator:o,static:l=!1,future:c}=e;Q0()&&qi(!1);let u=r.replace(/^\/*/,"/"),d=w.useMemo(()=>({basename:u,navigator:o,static:l,future:R2({v7_relativeSplatPath:!1},c)}),[u,c,o,l]);typeof i=="string"&&(i=$0(i));let{pathname:h="/",search:f="",hash:p="",state:m=null,key:A="default"}=i,g=w.useMemo(()=>{let y=Hv(h,u);return y==null?null:{location:{pathname:y,search:f,hash:p,state:m,ke
944y:A},navigationType:a}},[u,h,f,p,m,A,a]);return g==null?null:w.createElement(mf.Provider,{value:d},w.createElement(b4.Provider,{children:n,value:g}))}function Q4e(e){let{children:r,location:n}=e;return E4e(jR(r),n)}new Promise(()=>{});function jR(e,r){r===void 0&&(r=[]);let n=[];return w.Children.forEach(e,(i,a)=>{if(!w.isValidElement(i))return;let o=[...r,a];if(i.type===w.Fragment){n.push.apply(n,jR(i.props.children,o));return}i.type!==Ke&&qi(!1),!i.props.index||!i.props.children||qi(!1);let l={id:i.props.id||o.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(l.children=jR(i.props.children,o)),n.push(l)}),n}/**
945 * React Router DOM v6.30.1
946 *
947 * Copyright (c) Remix Software Inc.
948 *
949 * This source code is licensed under the MIT license found in the
950 * LICENSE.md file in the root directory of this source tree.
951 *
952 * @license MIT
953 */function bE(){return bE=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},bE.apply(this,arguments)}function Ece(e,r){if(e==null)return{};var n={},i=Object.keys(e),a,o;for(o=0;o<i.length;o++)a=i[o],!(r.indexOf(a)>=0)&&(n[a]=e[a]);return n}function H4e(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function V4e(e,r){return e.button===0&&(!r||r==="_self")&&!H4e(e)}function _R(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((r,n)=>{let i=e[n];return r.concat(Array.isArray(i)?i.map(a=>[n,a]):[[n,i]])},[]))}function W4e(e,r){let n=_R(e);return r&&r.forEach((i,a)=>{n.has(a)||r.getAll(a).forEach(o=>{n.append(a,o)})}),n}const q4e=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],K4e=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],G4e="6";try{window.__reactRouterVersion=G4e}catch{}const X4e=w.createContext({isTransitioning:!1}),Y4e="startTransition",sW=D6[Y4e];function J4e(e){let{basename:r,children:n,future:i,window:a}=e,o=w.useRef();o.current==null&&(o.current=r4e({window:a,v5Compat:!0}));let l=o.current,[c,u]=w.useState({action:l.action,location:l.location}),{v7_startTransition:d}=i||{},h=w.useCallback(f=>{d&&sW?sW(()=>u(f)):u(f)},[u,d]);return w.useLayoutEffect(()=>l.listen(h),[l,h]),w.useEffect(()=>U4e(i),[i]),w.createElement($4e,{basename:r,children:n,location:c.location,navigationType:c.action,navigator:l,future:i})}const Z4e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",eTe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,be=w.forwardRef(function(r,n){let{onClick:i,relative:a,reloadDocument:o,replace:l,state:c,target:u,to:d,preventScrollReset:h,viewTransition:f}
953=r,p=Ece(r,q4e),{basename:m}=w.useContext(mf),A,g=!1;if(typeof d=="string"&&eTe.test(d)&&(A=d,Z4e))try{let v=new URL(window.location.href),j=d.startsWith("//")?new URL(v.protocol+d):new URL(d),_=Hv(j.pathname,m);j.origin===v.origin&&_!=null?d=_+j.search+j.hash:g=!0}catch{}let y=S4e(d,{relative:a}),x=nTe(d,{replace:l,state:c,target:u,preventScrollReset:h,relative:a,viewTransition:f});function b(v){i&&i(v),v.defaultPrevented||x(v)}return w.createElement("a",bE({},p,{href:A||y,onClick:g||o?i:b,ref:n,target:u}))}),tTe=w.forwardRef(function(r,n){let{"aria-current":i="page",caseSensitive:a=!1,className:o="",end:l=!1,style:c,to:u,viewTransition:d,children:h}=r,f=Ece(r,K4e),p=w4(u,{relative:f.relative}),m=ps(),A=w.useContext(_ce),{navigator:g,basename:y}=w.useContext(mf),x=A!=null&&iTe(p)&&d===!0,b=g.encodeLocation?g.encodeLocation(p).pathname:p.pathname,v=m.pathname,j=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;a||(v=v.toLowerCase(),j=j?j.toLowerCase():null,b=b.toLowerCase()),j&&y&&(j=Hv(j,y)||j);const _=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let C=v===b||!l&&v.startsWith(b)&&v.charAt(_)==="/",N=j!=null&&(j===b||!l&&j.startsWith(b)&&j.charAt(b.length)==="/"),S={isActive:C,isPending:N,isTransitioning:x},E=C?i:void 0,O;typeof o=="function"?O=o(S):O=[o,C?"active":null,N?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let B=typeof c=="function"?c(S):c;return w.createElement(be,bE({},f,{"aria-current":E,className:O,ref:n,style:B,to:u,viewTransition:d}),typeof h=="function"?h(S):h)});var CR;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(CR||(CR={}));var oW;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(oW||(oW={}));function rTe(e){let r=w.useContext(v4);return r||qi(!1),r}function nTe(e,r){let{target:n,replace:i,state:a,preventScrollReset:o,relative:l,viewTransition:c}=r===void 0?{}:r,u=As(),d=ps(),h=w4(e,{relative:l});return w.useCallback(f=>{if(V4e(f,n)){f.preventDefault();let p=i!==void 0?i:xE(d)===xE(h);u(e,{replace:p,state:a,preventScrollReset:o,relative:l,viewTransition:c})}},[d,u,h,i,a,n,e,o,l,c])}function H0(e){let r=w.useRef(_R(e)),n=w.useRef(!1),i=ps(),a=w.useMemo(()=>W4e(i.search,n.current?null:r.current),[i.search]),o=As(),l=w.useCallback((c,u)=>{const d=_R(typeof c=="function"?c(a):c);n.current=!0,o("?"+d,u)},[o,a]);return[a,l]}function iTe(e,r){r===void 0&&(r={});let n=w.useContext(X4e);n==null&&qi(!1);let{basename:i}=rTe(CR.useViewTransitionState),a=w4(e,{relative:r.relative});if(!n.isTransitioning)return!1;let o=Hv(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=Hv(n.nextLocation.pathname,i)||n.nextLocation.pathname;return yE(a.pathname,l)!=null||yE(a.pathname,o)!=null}const Bce=w.createContext({theme:"dark",toggleTheme:()=>{},setThemePreference:()=>{}});function aTe({children:e}){const[r,n]=w.useState(()=>{const o=localStorage.getItem("eduweb-theme");return o==="light"||o==="dark"?o:"dark"});w.useEffect(()=>{document.documentElement.classList.toggle("light",r==="light"),localStorage.setItem("eduweb-theme",r)},[r]);const i=w.useCallback(()=>n(o=>o==="dark"?"light":"dark"),[]),a=w.useCallback(o=>n(o),[]);return s.jsx(Bce.Provider,{value:{theme:r,toggleTheme:i,setThemePreference:a},children:e})}const j4=()=>w.useContext(Bce);var hd=function(){return hd=Object.assign||function(r){for(var n,i=1,a=arguments.length;i<a;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r},hd.apply(this,arguments)};function V0(e,r){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(e);a<i.length;a++)r.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]]);return n}function sTe(e,r,n,i){function a(o){return o instanceof n?o:new n(function(l){l(o)})}
953return new(n||(n=Promise))(function(o,l){function c(h){try{d(i.next(h))}catch(f){l(f)}}function u(h){try{d(i.throw(h))}catch(f){l(f)}}function d(h){h.done?o(h.value):a(h.value).then(c,u)}d((i=i.apply(e,r||[])).next())})}function oTe(e,r,n){if(n||arguments.length===2)for(var i=0,a=r.length,o;i<a;i++)(o||!(i in r))&&(o||(o=Array.prototype.slice.call(r,0,i)),o[i]=r[i]);return e.concat(o||Array.prototype.slice.call(r))}const lTe=e=>e?(...r)=>e(...r):(...r)=>fetch(...r);class h8 extends Error{constructor(r,n="FunctionsError",i){super(r),this.name=n,this.context=i}}class cTe extends h8{constructor(r){super("Failed to send a request to the Edge Function","FunctionsFetchError",r)}}class lW extends h8{constructor(r){super("Relay Error invoking the Edge Function","FunctionsRelayError",r)}}class cW extends h8{constructor(r){super("Edge Function returned a non-2xx status code","FunctionsHttpError",r)}}var NR;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(NR||(NR={}));class uTe{constructor(r,{headers:n={},customFetch:i,region:a=NR.Any}={}){this.url=r,this.headers=n,this.region=a,this.fetch=lTe(i)}setAuth(r){this.headers.Authorization=`Bearer ${r}`}invoke(r){return sTe(this,arguments,void 0,function*(n,i={}){var a;let o,l;try{const{headers:c,method:u,body:d,signal:h,timeout:f}=i;let p={},{region:m}=i;m||(m=this.region);const A=new URL(`${this.url}/${n}`);m&&m!=="any"&&(p["x-region"]=m,A.searchParams.set("forceFunctionRegion",m));let g;d&&(c&&!Object.prototype.hasOwnProperty.call(c,"Content-Type")||!c)?typeof Blob<"u"&&d instanceof Blob||d instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",g=d):typeof d=="string"?(p["Content-Type"]="text/plain",g=d):typeof FormData<"u"&&d instanceof FormData?g=d:(p["Content-Type"]="application/json",g=JSON.stringify(d)):d&&typeof d!="string"&&!(typeof Blob<"u"&&d instanceof Blob)&&!(d instanceof ArrayBuffer)&&!(typeof FormData<"u"&&d instanceof FormData)?g=JSON.stringify(d):g=d;let y=h;f&&(l=new AbortController,o=setTimeout(()=>l.abort(),f),h?(y=l.signal,h.addEventListener("abort",()=>l.abort())):y=l.signal);const x=yield this.fetch(A.toString(),{method:u||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),c),body:g,signal:y}).catch(_=>{throw new cTe(_)}),b=x.headers.get("x-relay-error");if(b&&b==="true")throw new lW(x);if(!x.ok)throw new cW(x);let v=((a=x.headers.get("Content-Type"))!==null&&a!==void 0?a:"text/plain").split(";")[0].trim(),j;return v==="application/json"?j=yield x.json():v==="application/octet-stream"||v==="application/pdf"?j=yield x.blob():v==="text/event-stream"?j=x:v==="multipart/form-data"?j=yield x.formData():j=yield x.text(),{data:j,error:null,response:x}}catch(c){return{data:null,error:c,response:c instanceof cW||c instanceof lW?c.context:void 0}}finally{o&&clearTimeout(o)}})}}var dTe=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
953de=e.code}},hTe=class{constructor(e){var r,n,i;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(r=e.shouldThrowOnError)!==null&&r!==void 0?r:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(i=e.urlLengthLimit)!==null&&i!==void 0?i:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,r){return this.headers=new Headers(this.headers),this.headers.set(e,r),this}then(e,r){var n=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const i=this.fetch;let a=i(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{let l=null,c=null,u=null,d=o.status,h=o.statusText;if(o.ok){var f,p;if(n.method!=="HEAD"){var m;const x=await o.text();x===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((m=n.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?c=x:c=JSON.parse(x))}const g=(f=n.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),y=(p=o.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");g&&y&&y.length>1&&(u=parseInt(y[1])),n.isMaybeSingle&&n.method==="GET"&&Array.isArray(c)&&(c.length>1?(l={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,u=null,d=406,h="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{var A;const g=await o.text();try{l=JSON.parse(g),Array.isArray(l)&&o.status===404&&(c=[],l=null,d=200,h="OK")}catch{o.status===404&&g===""?(d=204,h="No Content"):l={message:g}}if(l&&n.isMaybeSingle&&(!(l==null||(A=l.details)===null||A===void 0)&&A.includes("0 rows"))&&(l=null,d=200,h="OK"),l&&n.shouldThrowOnError)throw new dTe(l)}return{error:l,data:c,count:u,status:d,statusText:h}});return this.shouldThrowOnError||(a=a.catch(o=>{var l;let c="",u="",d="";const h=o==null?void 0:o.cause;if(h){var f,p,m,A;const x=(f=h==null?void 0:h.message)!==null&&f!==void 0?f:"",b=(p=h==null?void 0:h.code)!==null&&p!==void 0?p:"";c=`${(m=o==null?void 0:o.name)!==null&&m!==void 0?m:"FetchError"}: ${o==null?void 0:o.message}`,c+=`
954
955Caused by: ${(A=h==null?void 0:h.name)!==null&&A!==void 0?A:"Error"}: ${x}`,b&&(c+=` (${b})`),h!=null&&h.stack&&(c+=`
956${h.stack}`)}else{var g;c=(g=o==null?void 0:o.stack)!==null&&g!==void 0?g:""}const y=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(d="",u="Request was aborted (timeout or manual cancellation)",y>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",u="HTTP headers exceeded server limits (typically 16KB)",y>this.urlLengthLimit&&(u+=`. Your request URL is ${y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(l=o==null?void 0:o.name)!==null&&l!==void 0?l:"FetchError"}: ${o==null?void 0:o.message}`,details:c,hint:u,code:d},data:null,count:null,status:0,statusText:""}})),a.then(e,r)}returns(){return this}overrideTypes(){return this}},fTe=class extends hTe{select(e){let r=!1;const n=(e??"*").split("").map(i=>/\s/.test(i)&&!r?"":(i==='"'&&(r=!r),i)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:r=!0,nullsFirst:n,foreignTable:i,referencedTable:a=i}={}){const o=a?`${a}.order`:"order",l=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${l?`${l},`:""}${e}.${r?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:r,referencedTable:n=r}={}){const i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${e}`),this}range(e,r,{foreignTable:n,referencedTable:i=n}={}){const a=typeof i>"u"?"offset":`${i}.offset`,o=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(a,`${e}`),this.url.searchParams.set(o,`${r-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
956explain({analyze:e=!1,verbose:r=!1,settings:n=!1,buffers:i=!1,wal:a=!1,format:o="text"}={}){var l;const c=[e?"analyze":null,r?"verbose":null,n?"settings":null,i?"buffers":null,a?"wal":null].filter(Boolean).join("|"),u=(l=this.headers.get("Accept"))!==null&&l!==void 0?l:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${u}"; options=${c};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const uW=new RegExp("[,()]");var ty=class extends fTe{eq(e,r){return this.url.searchParams.append(e,`eq.${r}`),this}neq(e,r){return this.url.searchParams.append(e,`neq.${r}`),this}gt(e,r){return this.url.searchParams.append(e,`gt.${r}`),this}gte(e,r){return this.url.searchParams.append(e,`gte.${r}`),this}lt(e,r){return this.url.searchParams.append(e,`lt.${r}`),this}lte(e,r){return this.url.searchParams.append(e,`lte.${r}`),this}like(e,r){return this.url.searchParams.append(e,`like.${r}`),this}likeAllOf(e,r){return this.url.searchParams.append(e,`like(all).{${r.join(",")}}`),this}likeAnyOf(e,r){return this.url.searchParams.append(e,`like(any).{${r.join(",")}}`),this}ilike(e,r){return this.url.searchParams.append(e,`ilike.${r}`),this}ilikeAllOf(e,r){return this.url.searchParams.append(e,`ilike(all).{${r.join(",")}}`),this}ilikeAnyOf(e,r){return this.url.searchParams.append(e,`ilike(any).{${r.join(",")}}`),this}regexMatch(e,r){return this.url.searchParams.append(e,`match.${r}`),this}regexIMatch(e,r){return this.url.searchParams.append(e,`imatch.${r}`),this}is(e,r){return this.url.searchParams.append(e,`is.${r}`),this}isDistinct(e,r){return this.url.searchParams.append(e,`isdistinct.${r}`),this}in(e,r){const n=Array.from(new Set(r)).map(i=>typeof i=="string"&&uW.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,r){const n=Array.from(new Set(r)).map(i=>typeof i=="string"&&uW.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,r){return typeof r=="string"?this.url.searchParams.append(e,`cs.${r}`):Array.isArray(r)?this.url.searchParams.append(e,`cs.{${r.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(r)}`),this}containedBy(e,r){return typeof r=="string"?this.url.searchParams.append(e,`cd.${r}`):Array.isArray(r)?this.url.searchParams.append(e,`cd.{${r.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(r)}`),this}rangeGt(e,r){return this.url.searchParams.append(e,`sr.${r}`),this}rangeGte(e,r){return this.url.searchParams.append(e,`nxl.${r}`),this}rangeLt(e,r){return this.url.searchParams.append(e,`sl.${r}`),this}rangeLte(e,r){return this.url.searchParams.append(e,`nxr.${r}`),this}rangeAdjacent(e,r){return this.url.searchParams.append(e,`adj.${r}`),this}overlaps(e,r){return typeof r=="string"?this.url.searchParams.append(e,`ov.${r}`):this.url.searchParams.append(e,`ov.{${r.join(",")}}`),this}textSearch(e,r,{config:n,type:i}={}){let a="";i==="plain"?a="pl":i==="phrase"?a="ph":i==="websearch"&&(a="w");const o=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${a}fts${o}.${r}`),this}match(e){return Object.entries(e).forEach(([r,n])=>{this.url.searchParams.append(r,`eq.${n}`)}),this}not(e,r,n){return this.url.searchParams.append(e,`not.${r}.${n}`),this}or(e,{foreignTable:r,referencedTable:n=r}={}){const i=n?`${n}.or`:"or";return this.url.searchParams.append(i,`(${e})`),this}filter(e,r,n){return this.url.searchParams.append(e,`${r}.${n}`),this}},mTe=class{constructor(e,{headers:r={},schema:n,fetch:i,urlLengthLimit:a=8e3}){this.url=e,this.headers=new Headers(r),this.schema=n,this.fetch=i,this.urlLengthLimit=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,r){const{head:n=!1,count:i}=r??{},a=n?"HEAD":"GET";let o=!1;const l=(e??"*").split("").map(d=>/\s/.test(d)&&!o?"":(d==='"'&&(o=!o),d)).join(""),{url:c,headers:u}=this.cloneRequestState();return c.searchParams.set("select",l),i&&u.append("Prefer",`count=${i}`),new ty({method:a,url:c,headers:u,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:r,defaultToNull:n=!0}={}){var i;const a="POST",{url:o,headers:l}=this.cloneRequestState();if(r&&l.append("Prefer",`count=${r}`),n||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);o.searchParams.set("columns",u.join(","))}}return new ty({method:a,url:o,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:r,ignoreDuplicates:n=!1,count:i,defaultToNull:a=!0}={}){var o;const l="POST",{url:c,headers:u}=this.cloneRequestState();if(u.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),r!==void 0&&c.searchParams.set("on_conflict",r),i&&u.append("Prefer",`count=${i}`),a||u.append("Prefer","missing=default"),Array.isArray(e)){const d=e.reduce((h,f)=>h.concat(Object.keys(f)),[]);if(d.length>0){const h=[...new Set(d)].map(f=>`"${f}"`);c.searchParams.set("columns",h.join(","))}}return new ty({method:l,url:c,headers:u,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:r}={}){var n;const i="PATCH",{url:a,headers:o}=this.cloneRequestState();return r&&o.append("Prefer",`count=${r}`),new ty({method:i,url:a,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var r;const n="DELETE",{url:i,headers:a}=this.cloneRequestState();return e&&a.append("Prefer",`count=${e}`),new ty({method:n,url:i,headers:a,schema:this.schema,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}};function D2(e){"@babel/helpers - typeof";return D2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},D2(e)}function pTe(e,r){if(D2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(D2(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ATe(e){var r=pTe(e,"string");return D2(r)=="symbol"?r:r+""}function gTe(e,r,n){return(r=ATe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function dW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function dN(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};
956r%2?dW(Object(n),!0).forEach(function(i){gTe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}var xTe=class Tce{constructor(r,{headers:n={},schema:i,fetch:a,timeout:o,urlLengthLimit:l=8e3}={}){this.url=r,this.headers=new Headers(n),this.schemaName=i,this.urlLengthLimit=l;const c=a??globalThis.fetch;o!==void 0&&o>0?this.fetch=(u,d)=>{const h=new AbortController,f=setTimeout(()=>h.abort(),o),p=d==null?void 0:d.signal;if(p){if(p.aborted)return clearTimeout(f),c(u,d);const m=()=>{clearTimeout(f),h.abort()};return p.addEventListener("abort",m,{once:!0}),c(u,dN(dN({},d),{},{signal:h.signal})).finally(()=>{clearTimeout(f),p.removeEventListener("abort",m)})}return c(u,dN(dN({},d),{},{signal:h.signal})).finally(()=>clearTimeout(f))}:this.fetch=c}from(r){if(!r||typeof r!="string"||r.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new mTe(new URL(`${this.url}/${r}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(r){return new Tce(this.url,{headers:this.headers,schema:r,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(r,n={},{head:i=!1,get:a=!1,count:o}={}){var l;let c;const u=new URL(`${this.url}/rpc/${r}`);let d;const h=m=>m!==null&&typeof m=="object"&&(!Array.isArray(m)||m.some(h)),f=i&&Object.values(n).some(h);f?(c="POST",d=n):i||a?(c=i?"HEAD":"GET",Object.entries(n).filter(([m,A])=>A!==void 0).map(([m,A])=>[m,Array.isArray(A)?`{${A.join(",")}}`:`${A}`]).forEach(([m,A])=>{u.searchParams.append(m,A)})):(c="POST",d=n);const p=new Headers(this.headers);return f?p.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&p.set("Prefer",`count=${o}`),new ty({method:c,url:u,headers:p,schema:this.schemaName,body:d,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch,urlLengthLimit:this.urlLengthLimit})}};class yTe{constructor(){}static detectEnvironment(){var r;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((r=navigator.userAgent)===null||r===void 0)&&r.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const i=n.versions;if(i&&i.node){const a=i.node,o=parseInt(a.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
957import ws from "ws"
958new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const r=this.detectEnvironment();if(r.constructor)return r.constructor;let n=r.error||"WebSocket not supported in this environment.";throw r.workaround&&(n+=`
959
960Suggested solution: ${r.workaround}`),new Error(n)}static createWebSocket(r,n){const i=this.getWebSocketConstructor();return new i(r,n)}static isWebSocketSupported(){try{const r=this.detectEnvironment();return r.type==="native"||r.type==="ws"}catch{return!1}}}const vTe="2.98.0",bTe=`realtime-js/${vTe}`,wTe="1.0.0",Pce="2.0.0",hW=Pce,SR=1e4,jTe=1e3,_Te=100;var im;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(im||(im={}));var Va;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Va||(Va={}));var fu;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(fu||(fu={}));var kR;(function(e){e.websocket="websocket"})(kR||(kR={}));var xA;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(xA||(xA={}));class CTe{constructor(r){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=r??[]}encode(r,n){if(r.event===this.BROADCAST_EVENT&&!(r.payload instanceof ArrayBuffer)&&typeof r.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(r));let i=[r.join_ref,r.ref,r.topic,r.event,r.payload];return n(JSON.stringify(i))}_binaryEncodeUserBroadcastPush(r){var n;return this._isArrayBuffer((n=r.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(r):this._encodeJsonUserBroadcastPush(r)}_encodeBinaryUserBroadcastPush(r){var n,i;const a=(i=(n=r.payload)===null||n===void 0?void 0:n.payload)!==null&&i!==void 0?i:new ArrayBuffer(0);return this._encodeUserBroadcastPush(r,this.BINARY_ENCODING,a)}_encodeJsonUserBroadcastPush(r){var n,i;const a=(i=(n=r.payload)===null||n===void 0?void 0:n.payload)!==null&&i!==void 0?i:{},l=new TextEncoder().encode(JSON.stringify(a)).buffer;return this._encodeUserBroadcastPush(r,this.JSON_ENCODING,l)}_encodeUserBroadcastPush(r,n,i){var a,o;const l=r.topic,c=(a=r.ref)!==null&&a!==void 0?a:"",u=(o=r.join_ref)!==null&&o!==void 0?o:"",d=r.payload.event,h=this.allowedMetadataKeys?this._pick(r.payload,this.allowedMetadataKeys):{},f=Object.keys(h).length===0?"":JSON.stringify(h);if(u.length>255)throw new Error(`joinRef length ${u.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`ref length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`topic length ${l.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`userEvent length ${d.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+u.length+c.length+l.length+d.length+f.length,m=new ArrayBuffer(this.HEADER_LENGTH+p);let A=new DataView(m),g=0;A.setUint8(g++,this.KINDS.userBroadcastPush),A.setUint8(g++,u.length),A.setUint8(g++,c.length),A.setUint8(g++,l.length),A.setUint8(g++,d.length),A.setUint8(g++,f.length),A.setUint8(g++,n),Array.from(u,x=>A.setUint8(g++,x.charCodeAt(0))),Array.from(c,x=>A.setUint8(g++,x.charCodeAt(0))),Array.from(l,x=>A.setUint8(g++,x.charCodeAt(0))),Array.from(d,x=>A.setUint8(g++,x.charCodeAt(0))),Array.from(f,x=>A.setUint8(g++,x.charCodeAt(0)));var y=new Uint8Array(m.byteLength+i.byteLength);return y.set(new Uint8Array(m),0),y.set(new Uint8Array(i),m.byteLength),y.buffer}decode(r,n){if(this._isArrayBuffer(r)){let i=this._binaryDecode(r);return n(i)}if(typeof r=="string"){const i=JSON.parse(r),[a,o,l,c,u]=i;
960return n({join_ref:a,ref:o,topic:l,event:c,payload:u})}return n({})}_binaryDecode(r){const n=new DataView(r),i=n.getUint8(0),a=new TextDecoder;switch(i){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(r,n,a)}}_decodeUserBroadcast(r,n,i){const a=n.getUint8(1),o=n.getUint8(2),l=n.getUint8(3),c=n.getUint8(4);let u=this.HEADER_LENGTH+4;const d=i.decode(r.slice(u,u+a));u=u+a;const h=i.decode(r.slice(u,u+o));u=u+o;const f=i.decode(r.slice(u,u+l));u=u+l;const p=r.slice(u,r.byteLength),m=c===this.JSON_ENCODING?JSON.parse(i.decode(p)):p,A={type:this.BROADCAST_EVENT,event:h,payload:m};return l>0&&(A.meta=JSON.parse(f)),{join_ref:null,ref:null,topic:d,event:this.BROADCAST_EVENT,payload:A}}_isArrayBuffer(r){var n;return r instanceof ArrayBuffer||((n=r==null?void 0:r.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(r,n){return!r||typeof r!="object"?{}:Object.fromEntries(Object.entries(r).filter(([i])=>n.includes(i)))}}let Ice=class{constructor(r,n){this.callback=r,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=r,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}};var li;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(li||(li={}));const fW=(e,r,n={})=>{var i;const a=(i=n.skipTypes)!==null&&i!==void 0?i:[];return r?Object.keys(r).reduce((o,l)=>(o[l]=NTe(l,e,r,a),o),{}):{}},NTe=(e,r,n,i)=>{const a=r.find(c=>c.name===e),o=a==null?void 0:a.type,l=n[e];return o&&!i.includes(o)?Fce(o,l):ER(l)},Fce=(e,r)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return BTe(r,n)}switch(e){case li.bool:return STe(r);case li.float4:case li.float8:case li.int2:case li.int4:case li.int8:case li.numeric:case li.oid:return kTe(r);case li.json:case li.jsonb:return ETe(r);case li.timestamp:return TTe(r);case li.abstime:case li.date:case li.daterange:case li.int4range:case li.int8range:case li.money:case li.reltime:case li.text:case li.time:case li.timestamptz:case li.timetz:case li.tsrange:case li.tstzrange:return ER(r);default:return ER(r)}},ER=e=>e,STe=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},kTe=e=>{if(typeof e=="string"){const r=parseFloat(e);if(!Number.isNaN(r))return r}return e},ETe=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},BTe=(e,r)=>{if(typeof e!="string")return e;const n=e.length-1,i=e[n];if(e[0]==="{"&&i==="}"){let o;const l=e.slice(1,n);try{o=JSON.parse("["+l+"]")}catch{o=l?l.split(","):[]}return o.map(c=>Fce(r,c))}return e},TTe=e=>typeof e=="string"?e.replace(" ","T"):e,Oce=e=>{const r=new URL(e);return r.protocol=r.protocol.replace(/^ws/i,"http"),r.pathname=r.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),r.pathname===""||r.pathname==="/"?r.pathname="/api/broadcast":r.pathname=r.pathname+"/api/broadcast",r.href};class rI{constructor(r,n,i={},a=SR){this.channel=r,this.event=n,this.payload=i,this.timeout=a,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(r){this.timeout=r,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(r){this.payload=Object.assign(Object.assign({},this.payload),r)}receive(r,n){var i;return this._hasReceived(r)&&n((i=this.receivedResp)===null||i===void 0?void 0:i.response),this.recHo
960oks.push({status:r,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const r=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},r),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(r,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:r,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:r,response:n}){this.recHooks.filter(i=>i.status===r).forEach(i=>i.callback(n))}_hasReceived(r){return this.receivedResp&&this.receivedResp.status===r}}var mW;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(mW||(mW={}));class Iw{constructor(r,n){this.channel=r,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const i=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(i.state,{},a=>{const{onJoin:o,onLeave:l,onSync:c}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Iw.syncState(this.state,a,o,l),this.pendingDiffs.forEach(u=>{this.state=Iw.syncDiff(this.state,u,o,l)}),this.pendingDiffs=[],c()}),this.channel._on(i.diff,{},a=>{const{onJoin:o,onLeave:l,onSync:c}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(a):(this.state=Iw.syncDiff(this.state,a,o,l),c())}),this.onJoin((a,o,l)=>{this.channel._trigger("presence",{event:"join",key:a,currentPresences:o,newPresences:l})}),this.onLeave((a,o,l)=>{this.channel._trigger("presence",{event:"leave",key:a,currentPresences:o,leftPresences:l})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(r,n,i,a){const o=this.cloneDeep(r),l=this.transformState(n),c={},u={};return this.map(o,(d,h)=>{l[d]||(u[d]=h)}),this.map(l,(d,h)=>{const f=o[d];if(f){const p=h.map(y=>y.presence_ref),m=f.map(y=>y.presence_ref),A=h.filter(y=>m.indexOf(y.presence_ref)<0),g=f.filter(y=>p.indexOf(y.presence_ref)<0);A.length>0&&(c[d]=A),g.length>0&&(u[d]=g)}else c[d]=h}),this.syncDiff(o,{joins:c,leaves:u},i,a)}static syncDiff(r,n,i,a){const{joins:o,leaves:l}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return i||(i=()=>{}),a||(a=()=>{}),this.map(o,(c,u)=>{var d;const h=(d=r[c])!==null&&d!==void 0?d:[];if(r[c]=this.cloneDeep(u),h.length>0){const f=r[c].map(m=>m.presence_ref),p=h.filter(m=>f.indexOf(m.presence_ref)<0);r[c].unshift(...p)}i(c,h,u)}),this.map(l,(c,u)=>{let d=r[c];if(!d)return;const h=u.map(f=>f.presence_ref);d=d.filter(f=>h.indexOf(f.presence_ref)<0),r[c]=d,a(c,d,u),d.length===0&&delete r[c]}),r}static map(r,n){return Object.getOwnPropertyNames(r).map(i=>n(i,r[i]))}static transformState(r){return r=this.cloneDeep(r),Object.getOwnPropertyNames(r).reduce((n,i)=>{const a=r[i];return"metas"in a?n[i]=a.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[i]=a,n},{})}static cloneDeep(r){return JSON.parse(JSON.stringify(r))}onJoin(r){this.caller.onJoin=r}onLeave(r){this.caller.onLeave=r}onSync(r){this.caller.onSync=r}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var pW;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(pW||(pW={}));var Fw;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Fw||(Fw={}));var vh;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(vh||(vh={}));class _y{constructor(r,n={config:{}},i){var a,o;if(this.topic=r,this.params=n,this.socket=i,this.bindings={},this.state=Va.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=r.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new rI(this,fu.join,this.params,this.timeout),this.rejoinTimer=new Ice(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Va.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(l=>l.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Va.closed,this.socket._remove(this)}),this._onError(l=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,l),this.state=Va.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Va.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",l=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,l),this.state=Va.errored,this.rejoinTimer.scheduleTimeout())}),this._on(fu.reply,{},(l,c)=>{this._trigger(this._replyEventName(c),l)}),this.presence=new Iw(this),this.broadcastEndpointURL=Oce(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(a=this.params.config)===null||a===void 0?void 0:a.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(r,n=this.timeout){var i,a,o;if(this.socket.isConnected()||this.socket.connect(),this.state==Va.closed){const{config:{broadcast:l,presence:c,private:u}}=this.params,d=(a=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(m=>m.filter))!==null&&a!==void 0?a:[],h=!!this.bindings[Fw.PRESENCE]&&this.bindings[Fw.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,f={},p={broadcast:l,presence:Object.assign(Object.assign({},c),{enabled:h}),postgres_changes:d,private:u};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(m=>r==null?void 0:r(vh.CHANNEL_ERROR,m)),this._onClose(()=>r==null?void 0:r(vh.CLOSED)),this.updateJoinPayload(Object.assign({config:p},f)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:m})=>{var A;if(this.socket._isManualToken()||this.socket.setAuth(),m===void 0){r==null||r(vh.SUBSCRIBED);return}else{const g=this.bindings.postgres_changes,y=(A=g==null?void 0:g.length)!==null&&A!==void 0?A:0,x=[];for(let b=0;b<y;b++){const v=g[b],{filter:{event:j,schema:_,table:C,filter:N}}=v,S=m&&m[b];if(S&&S.event===j&&_y.isFilterValueEqual(S.schema,_)&&_y.isFilterValueEqual(S.table,C)&&_y.isFilterValueEqual(S.filter,N))x.push(Object.assign(Object.assign({},v),{id:S.id}));else{this.unsubscribe(),this.state=Va.errored,r==null||r(vh.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=x,r&&r(vh.SUBSCRIBED);return}}).receive("error",m=>{this.state=Va.errored,r==null||r(vh.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(m).join(", ")||"error")))}).receive("timeout",()=>{r==null||r(vh.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(r,n={}){return await this.send({type:"presence",event:"track",payload:r},n.timeout||this.timeout)}async untrack(r={}){return await this.send({type:"presence",event:"untrack"},r)}on(r,n,i){return this.state===Va.joined&&r===Fw.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(r,n,i)}async httpSend(r,n,i={}){var a;if(n==null)return Promise.reject("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:r,payload:n,private:this.private}]})},c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(a=i.timeout)!==null&&a!==void 0?a:this.timeout);if(c.status===202)return{success:!0};let u=c.statusText;
960try{const d=await c.json();u=d.error||d.message||u}catch{}return Promise.reject(new Error(u))}async send(r,n={}){var i,a;if(!this._canPush()&&r.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:l}=r,c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const u={method:"POST",headers:c,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:l,private:this.private}]})};try{const d=await this._fetchWithTimeout(this.broadcastEndpointURL,u,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);return await((a=d.body)===null||a===void 0?void 0:a.cancel()),d.ok?"ok":"error"}catch(d){return d.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var l,c,u;const d=this._push(r.type,r,n.timeout||this.timeout);r.type==="broadcast"&&!(!((u=(c=(l=this.params)===null||l===void 0?void 0:l.config)===null||c===void 0?void 0:c.broadcast)===null||u===void 0)&&u.ack)&&o("ok"),d.receive("ok",()=>o("ok")),d.receive("error",()=>o("error")),d.receive("timeout",()=>o("timed out"))})}updateJoinPayload(r){this.joinPush.updatePayload(r)}unsubscribe(r=this.timeout){this.state=Va.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(fu.close,"leave",this._joinRef())};this.joinPush.destroy();let i=null;return new Promise(a=>{i=new rI(this,fu.leave,{},r),i.receive("ok",()=>{n(),a("ok")}).receive("timeout",()=>{n(),a("timed out")}).receive("error",()=>{a("error")}),i.send(),this._canPush()||i.trigger("ok",{})}).finally(()=>{i==null||i.destroy()})}teardown(){this.pushBuffer.forEach(r=>r.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Va.closed,this.bindings={}}async _fetchWithTimeout(r,n,i){const a=new AbortController,o=setTimeout(()=>a.abort(),i),l=await this.socket.fetch(r,Object.assign(Object.assign({},n),{signal:a.signal}));return clearTimeout(o),l}_push(r,n,i=this.timeout){if(!this.joinedOnce)throw`tried to push '${r}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let a=new rI(this,r,n,i);return this._canPush()?a.send():this._addToPushBuffer(a),a}_addToPushBuffer(r){if(r.startTimeout(),this.pushBuffer.push(r),this.pushBuffer.length>_Te){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(r,n,i){return n}_isMember(r){return this.topic===r}_joinRef(){return this.joinPush.ref}_trigger(r,n,i){var a,o;const l=r.toLocaleLowerCase(),{close:c,error:u,leave:d,join:h}=fu;if(i&&[c,u,d,h].indexOf(l)>=0&&i!==this._joinRef())return;let p=this._onMessage(l,n,i);if(n&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(l)?(a=this.bindings.postgres_changes)===null||a===void 0||a.filter(m=>{var A,g,y;return((A=m.filter)===null||A===void 0?void 0:A.event)==="*"||((y=(g=m.filter)===null||g===void 0?void 0:g.event)===null||y===void 0?void 0:y.toLocaleLowerCase())===l}).map(m=>m.callback(p,i)):(o=this.bindings[l])===null||o===void 0||o.filter(m=>{var A,g,y,x,b,v;if(["broadcast","presence","postgres_changes"].includes(l))if("id"in m){const j=m.id,_=(A=m.filter)===null||A===void 0?void 0:A.event;return j&&((g=n.ids)===null||g===void 0?void 0:g.includes(j))&&(_==="*"||(_==null?void 0:_.toLocaleLowerCase())===((y=n.data)===null||y===void 0?void 0:y.type.toLocaleLowerCase()))}else{const j=(b=(x=m==null?void 0:m.filter)===null||x===void 0?void 0:x.event)===null||b===void 0?void 0:b.toLocaleLowerCase();return j==="*"||j===((v=n==null?void 0:n.event)===null||v===void 0?void 0:v.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===l}).map(m=>{if(typeof p=="object"&&"ids"in p){const A=p.data,{schema:g,table:y,commit_timestamp:x,type:b,errors:v}=A;p=Object.assign(Object.assign({},{schema:g,table:y,commit_timestamp:x,eventType:b,new:{},old:{},errors:v}),this._getPayloadRecords(A))}m.callback(p,i)})}_isClosed(){return this.state===Va.closed}_isJoined(){return this.state===Va.joined}_isJoining(){return this.state===Va.joining}_isLeaving(){return this.state===Va.leaving}_replyEventName(r){return`chan_reply_${r}`}_on(r,n,i){const a=r.toLocaleLowerCase(),o={type:a,filter:n,callback:i};return this.bindings[a]?this.bindings[a].push(o):this.bindings[a]=[o],this}_off(r,n){const i=r.toLocaleLowerCase();return this.bindings[i]&&(this.bindings[i]=this.bindings[i].filter(a=>{var o;return!(((o=a.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===i&&_y.isEqual(a.filter,n))})),this}static isEqual(r,n){if(Object.keys(r).length!==Object.keys(n).length)return!1;for(const i in r)if(r[i]!==n[i])return!1;return!0}static isFilterValueEqual(r,n){return(r??void 0)===(n??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(r){this._on(fu.close,{},r)}_onError(r){this._on(fu.error,{},n=>r(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(r=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Va.joining,this.joinPush.resend(r))}_getPayloadRecords(r){const n={new:{},old:{}};return(r.type==="INSERT"||r.type==="UPDATE")&&(n.new=fW(r.columns,r.record)),(r.type==="UPDATE"||r.type==="DELETE")&&(n.old=fW(r.columns,r.old_record)),n}}const nI=()=>{},hN={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},PTe=[1e3,2e3,5e3,1e4],ITe=1e4,FTe=`
961  addEventListener("message", (e) => {
962    if (e.data.event === "start") {
963      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
964    }
965  });`;class OTe{constructor(r,n){var i;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={}
965,this.timeout=SR,this.transport=null,this.heartbeatIntervalMs=hN.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=nI,this.ref=0,this.reconnectTimer=null,this.vsn=hW,this.logger=nI,this.conn=null,this.sendBuffer=[],this.serializer=new CTe,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=a=>a?(...o)=>a(...o):(...o)=>fetch(...o),!(!((i=n==null?void 0:n.params)===null||i===void 0)&&i.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${r}/${kR.websocket}`,this.httpEndpoint=Oce(r),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=yTe.createWebSocket(this.endpointURL())}catch(r){this._setConnectionState("disconnected");const n=r.message;throw n.includes("Node.js")?new Error(`${n}
966
967To use Realtime in Node.js, you need to provide a WebSocket implementation:
968
969Option 1: Use Node.js 22+ which has native WebSocket support
970Option 2: Install and provide the "ws" package:
971
972  npm install ws
973
974  import ws from "ws"
975  const client = new RealtimeClient(url, {
976    ...options,
977    transport: ws
978  })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(r,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const i=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(i),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(r?this.conn.close(r,n??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(r){const n=await r.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const r=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),r}log(r,n,i){this.logger(r,n,i)}connectionState(){switch(this.conn&&this.conn.readyState){case im.connecting:return xA.Connecting;case im.open:return xA.Open;case im.closing:return xA.Closing;default:return xA.Closed}}isConnected(){return this.connectionState()===xA.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(r,n={config:{}}){const i=`realtime:${r}`,a=this.getChannels().find(o=>o.topic===i);if(a)return a;{const o=new _y(`realtime:${r}`,n,this);return this.channels.push(o),o}}push(r){const{topic:n,event:i,payload:a,ref:o}=r,l=()=>{this.encode(r,c=>{var u;(u=this.conn)===null||u===void 0||u.send(c)})};this.log("push",`${n} ${i} (${o})`,a),this.isConnected()?l():this.sendBuffer.push(l)}async setAuth(r=null){this._authPromise=this._performAuth(r);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var r;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(r=this.conn)===null||r===void 0||r.close(jTe,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},hN.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(r){this.heartbeatCallback=r}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(r=>r()),this.sendBuffer=[])}_makeRef(){let r=this.ref+1;return r===this.ref?this.ref=0:this.ref=r,this.ref.toString()}_leaveOpenTopic(r){let n=this.channels.find(i=>i.topic===r&&(i._isJoined()||i._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${r}"`),n.unsubscribe())}_remove(r){this.channels=this.channels.filter(n=>n.topic!==r.topic)}_onConnMessage(r){this.decode(r.data,n=>
978{if(n.topic==="phoenix"&&n.event==="phx_reply"&&n.ref&&n.ref===this.pendingHeartbeatRef){const d=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error",d)}catch(h){this.log("error","error in heartbeat callback",h)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:i,event:a,payload:o,ref:l}=n,c=l?`(${l})`:"",u=o.status||"";this.log("receive",`${u} ${i} ${a} ${c}`.trim(),o),this.channels.filter(d=>d._isMember(i)).forEach(d=>d._trigger(a,o,l)),this._triggerStateCallbacks("message",n)})}_clearTimer(r){var n;r==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):r==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=r=>this._onConnError(r),this.conn.onmessage=r=>this._onConnMessage(r),this.conn.onclose=r=>this._onConnClose(r),this.conn.readyState===im.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===im.open||this.conn.readyState===im.connecting)try{this.conn.close()}catch(r){this.log("error","Error closing connection",r)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(r=>r.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.accessTokenValue&&(this.channels.forEach(n=>{n.updateJoinPayload({access_token:this.accessTokenValue})}),this.sendBuffer=[],this.channels.forEach(n=>{n._isJoining()&&(n.joinPush.sent=!1,n.joinPush.send())})),this.flushSendBuffer()}).catch(n=>{this.log("error","error waiting for auth on connect",n),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const r=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(r),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(r){var n;this._setConnectionState("disconnected"),this.log("transport","close",r),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",r)}_onConnError(r){this._setConnectionState("disconnected"),this.log("transport",`${r}`),this._triggerChanError(),this._triggerStateCallbacks("error",r);try{this.heartbeatCallback("error")}catch(n){this.log("error","error in heartbeat callback",n)}}_triggerChanError(){this.channels.forEach(r=>r._trigger(fu.error))}_appendParams(r,n){if(Object.keys(n).length===0)return r;const i=r.match(/\?/)?"&":"?",a=new URLSearchParams(n);return`${r}${i}${a}`}_workerObjectUrl(r){let n;if(r)n=r;else{const i=new Blob([FTe],{type:"application/javascript"});n=URL.createObjectURL(i)}return n}_setConnectionState(r,n=!1){this._connectionState=r,r==="connecting"?this._wasManualDisconnect=!1:r==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(r=null){let n,i=!1;if(r)n=r,i=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(a){this.log("error","Error fetching access token from callback",a),n=this.accessTokenValue}else n=this.accessTokenValue;i?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEac
978h(a=>{const o={access_token:n,version:bTe};n&&a.updateJoinPayload(o),a.joinedOnce&&a._isJoined()&&a._push(fu.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(r="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${r}`,n)})}_triggerStateCallbacks(r,n){try{this.stateChangeCallbacks[r].forEach(i=>{try{i(n)}catch(a){this.log("error",`error in ${r} callback`,a)}})}catch(i){this.log("error",`error triggering ${r} callbacks`,i)}}_setupReconnectionTimer(){this.reconnectTimer=new Ice(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},hN.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(r){var n,i,a,o,l,c,u,d,h,f,p,m;switch(this.transport=(n=r==null?void 0:r.transport)!==null&&n!==void 0?n:null,this.timeout=(i=r==null?void 0:r.timeout)!==null&&i!==void 0?i:SR,this.heartbeatIntervalMs=(a=r==null?void 0:r.heartbeatIntervalMs)!==null&&a!==void 0?a:hN.HEARTBEAT_INTERVAL,this.worker=(o=r==null?void 0:r.worker)!==null&&o!==void 0?o:!1,this.accessToken=(l=r==null?void 0:r.accessToken)!==null&&l!==void 0?l:null,this.heartbeatCallback=(c=r==null?void 0:r.heartbeatCallback)!==null&&c!==void 0?c:nI,this.vsn=(u=r==null?void 0:r.vsn)!==null&&u!==void 0?u:hW,r!=null&&r.params&&(this.params=r.params),r!=null&&r.logger&&(this.logger=r.logger),(r!=null&&r.logLevel||r!=null&&r.log_level)&&(this.logLevel=r.logLevel||r.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(d=r==null?void 0:r.reconnectAfterMs)!==null&&d!==void 0?d:A=>PTe[A-1]||ITe,this.vsn){case wTe:this.encode=(h=r==null?void 0:r.encode)!==null&&h!==void 0?h:(A,g)=>g(JSON.stringify(A)),this.decode=(f=r==null?void 0:r.decode)!==null&&f!==void 0?f:(A,g)=>g(JSON.parse(A));break;case Pce:this.encode=(p=r==null?void 0:r.encode)!==null&&p!==void 0?p:this.serializer.encode.bind(this.serializer),this.decode=(m=r==null?void 0:r.decode)!==null&&m!==void 0?m:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=r==null?void 0:r.workerUrl}}}var M2=class extends Error{constructor(e,r){var n;super(e),this.name="IcebergError",this.status=r.status,this.icebergType=r.icebergType,this.icebergCode=r.icebergCode,this.details=r.details,this.isCommitStateUnknown=r.icebergType==="CommitStateUnknownException"||[500,502,504].includes(r.status)&&((n=r.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function LTe(e,r,n){const i=new URL(r,e);if(n)for(const[a,o]of Object.entries(n))o!==void 0&&i.searchParams.set(a,o);return i.toString()}async function RTe(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function DTe(e){const r=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:i,query:a,body:o,headers:l}){const c=LTe(e.baseUrl,i,a),u=await RTe(e.auth),d=await r(c,{method:n,headers:{...o?{"Content-Type":"application/json"}:{},...u,...l},body:o?JSON.stringify(o):void 0}),h=await d.text(),f=(d.headers.get("content-type")||"").includes("application/json"),p=f&&h?JSON.parse(h):h;if(!d.ok){const m=f?p:void 0,A=m==null?void 0:m.error;throw new M2((A==null?void 0:A.message)??`Request failed with status ${d.status}`,{status:d.status,icebergType:A==null?void 0:A.type,icebergCode:A==null?void 0:A.code,details:m})}return{status:d.status,headers:d.headers,data:p}}}}function fN(e){return e.join("�")}var MTe=class{constructor(e,r=""){this.client=e,this.prefix=r}async listNamespaces(e){const r=e?{parent:fN(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:r})).data.namespaces.map(i=>({namespace:i}))}async createNamespace(e,r){const n={namespace:e.namespace,properties:r==null?void 0:r.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${fN(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${fN(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${fN(e.namespace)}`}),!0}catch(r){if(r instanceof M2&&r.status===404)return!1;throw r}}async createNamespaceIfNotExists(e,r){try{return await this.createNamespace(e,r)}catch(n){if(n instanceof M2&&n.status===409)return;throw n}}};function Nx(e){return e.join("�")}var zTe=class{constructor(e,r="",n){this.client=e,this.prefix=r,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Nx(e.namespace)}/tables`})).data.identifiers}async createTable(e,r){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Nx(e.namespace)}/tables`,body:r,headers:n})).data.metadata}async updateTable(e,r){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Nx(e.namespace)}/tables/${e.name}`,body:r});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,r){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Nx(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((r==null?void 0:r.purge)??!1)}})}async loadTable(e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Nx(e.namespace)}/tables/${e.name}`,headers:r})).data.metadata}async tableExists(e){const r={};this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Nx(e.namespace)}/tables/${e.name}`,headers:r}),!0}catch(n){if(n instanceof M2&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,r){try{return await this.createTable(e,r)}catch(n){if(n instanceof M2&&n.status===409)return await this.loadTable({namespace:e.namespace,name:r.name});throw n}}},UTe=class{constructor(e){var i;let r="v1";e.catalogName&&(r+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=DTe({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(i=e.accessDelegation)==null?void 0:i.join(","),this.namespaceOps=new MTe(this.client,r),this.tableOps=new zTe(this.client,r,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,r){return this.namespaceOps.createNamespace(e,r)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
978async createTable(e,r){return this.tableOps.createTable(e,r)}async updateTable(e,r){return this.tableOps.updateTable(e,r)}async dropTable(e,r){await this.tableOps.dropTable(e,r)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,r){return this.namespaceOps.createNamespaceIfNotExists(e,r)}async createTableIfNotExists(e,r){return this.tableOps.createTableIfNotExists(e,r)}},_4=class extends Error{constructor(e,r="storage",n,i){super(e),this.__isStorageError=!0,this.namespace=r,this.name=r==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=i}};function C4(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var mN=class extends _4{constructor(e,r,n,i="storage"){super(e,i,r,n),this.name=i==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Lce=class extends _4{constructor(e,r,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=r}};const $Te=e=>e?(...r)=>e(...r):(...r)=>fetch(...r),QTe=e=>{if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},BR=e=>{if(Array.isArray(e))return e.map(n=>BR(n));if(typeof e=="function"||e!==Object(e))return e;const r={};return Object.entries(e).forEach(([n,i])=>{const a=n.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));r[a]=BR(i)}),r},HTe=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function z2(e){"@babel/helpers - typeof";return z2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},z2(e)}function VTe(e,r){if(z2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(z2(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function WTe(e){var r=VTe(e,"string");return z2(r)=="symbol"?r:r+""}function qTe(e,r,n){return(r=WTe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function AW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function gr(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?AW(Object(n),!0).forEach(function(i){qTe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}const gW=e=>{var r;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(r=e.error)===null||r===void 0?void 0:r.message)||JSON.stringify(e)},KTe=async(e,r,n,i)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(n!=null&&n.noResolveJson)){const a=e,o=a.status||500;if(typeof a.json=="function")a.json().then(l=>{const c=(l==null?void 0:l.statusCode)||(l==null?void 0:l.code)||o+"";r(new mN(gW(l),o,c,i))}).catch(()=>{if(i==="vectors"){const l=o+"";r(new mN(a.statusText||`HTTP ${o} error`,o,l,i))}else{const l=o+"";r(new mN(a.statusText||`HTTP ${o} error`,o,l,i))}});else{const l=o+"";r(new mN(a.statusText||`HTTP ${o} error`,o,l,i))}}else r(new Lce(gW(e),e,i))},GTe=(e,r,n,i)=>{const a={method:e,headers:(r==null?void 0:r.headers)||{}};return e==="GET"||e==="HEAD"||!i?gr(gr({},a),n):(QTe(i)?(a.headers=gr({"Content-Type":"application/json"},r==null?void 0:r.headers),a.body=JSON.stringify(i)):a.body=i,r!=null&&r.duplex&&(a.duplex=r.duplex),gr(gr({},a),n))};async function h1(e,r,n,i,a,o,l){return new Promise((c,u)=>{e(n,GTe(r,i,a,o)).then(d=>{if(!d.ok)throw d;if(i!=null&&i.noResolveJson)return d;if(l==="vectors"){const h=d.headers.get("content-type");if(d.headers.get("content-length")==="0"||d.status===204)return{};
978if(!h||!h.includes("application/json"))return{}}return d.json()}).then(d=>c(d)).catch(d=>KTe(d,u,i,l))})}function Rce(e="storage"){return{get:async(r,n,i,a)=>h1(r,"GET",n,i,a,void 0,e),post:async(r,n,i,a,o)=>h1(r,"POST",n,a,o,i,e),put:async(r,n,i,a,o)=>h1(r,"PUT",n,a,o,i,e),head:async(r,n,i,a)=>h1(r,"HEAD",n,gr(gr({},i),{},{noResolveJson:!0}),a,void 0,e),remove:async(r,n,i,a,o)=>h1(r,"DELETE",n,a,o,i,e)}}const XTe=Rce("storage"),{get:U2,post:cu,put:TR,head:YTe,remove:f8}=XTe,Fl=Rce("vectors");var W0=class{constructor(e,r={},n,i="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=r,this.fetch=$Te(n),this.namespace=i}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,r){return this.headers=gr(gr({},this.headers),{},{[e]:r}),this}async handleOperation(e){var r=this;try{return{data:await e(),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(C4(n))return{data:null,error:n};throw n}}},JTe=class{constructor(e,r){this.downloadFn=e,this.shouldThrowOnError=r}then(e,r){return this.execute().then(e,r)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(C4(r))return{data:null,error:r};throw r}}};let Dce;Dce=Symbol.toStringTag;var ZTe=class{constructor(e,r){this.downloadFn=e,this.shouldThrowOnError=r,this[Dce]="BlobDownloadBuilder",this.promise=null}asStream(){return new JTe(this.downloadFn,this.shouldThrowOnError)}then(e,r){return this.getPromise().then(e,r)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(C4(r))return{data:null,error:r};throw r}}};const e3e={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},xW={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var t3e=class extends W0{constructor(e,r={},n,i){super(e,r,i,"storage"),this.bucketId=n}async uploadOrUpdate(e,r,n,i){var a=this;return a.handleOperation(async()=>{let o;const l=gr(gr({},xW),i);let c=gr(gr({},a.headers),e==="POST"&&{"x-upsert":String(l.upsert)});const u=l.metadata;typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",l.cacheControl),u&&o.append("metadata",a.encodeMetadata(u)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.has("cacheControl")||o.append("cacheControl",l.cacheControl),u&&!o.has("metadata")&&o.append("metadata",a.encodeMetadata(u))):(o=n,c["cache-control"]=`max-age=${l.cacheControl}`,c["content-type"]=l.contentType,u&&(c["x-metadata"]=a.toBase64(a.encodeMetadata(u))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!l.duplex&&(l.duplex="half")),i!=null&&i.headers&&(c=gr(gr({},c),i.headers));const d=a._removeEmptyFolders(r),h=a._getFinalPath(d),f=await(e=="PUT"?TR:cu)(a.fetch,`${a.url}/object/${h}`,o,gr({headers:c},l!=null&&l.duplex?{duplex:l.duplex}:{}));return{path:d,id:f.Id,fullPath:f.Key}})}async upload(e,r,n){return this.uploadOrUpdate("POST",e,r,n)}async uploadToSignedUrl(e,r,n,i){var a=this;const o=a._removeEmptyFolders(e),l=a._getFinalPath(o),c=new URL(a.url+`/object/upload/sign/${l}`);return c.searchParams.set("token",r),a.handleOperation(async()=>{let u;const d=gr({upsert:xW.upsert},i),h=gr(gr({},a.headers),{"x-upsert":String(d.upsert)});return typeof Blob<"u"&&n instanceof Blob?(u=new FormData,u.append("cacheControl",d.cacheControl),u.append("",n)):typeof FormData<"u"&&n instanceof FormData?(u=n,u.append("cacheControl",d.cacheControl)):(u=n,h["cache-control"]=`max-age=${d.cacheControl}`,h["content-type"]=d.contentType),{path:o,fullPath:(await TR(a.fetch,c.toString(),u,{headers:h})).Key}})}async createSignedUploadUrl(e,r){var n=this;return n.handleOperation(async()=>{let i=n._getFinalPath(e);const a=gr({},n.headers);r!=null&&r.upsert&&(a["x-upsert"]="true");const o=await cu(n.fetch,`${n.url}/object/upload/sign/${i}`,{},{headers:a}),l=new URL(n.url+o.url),c=l.searchParams.get("token");if(!c)throw new _4("No token returned by API");return{signedUrl:l.toString(),path:e,token:c}})}async update(e,r,n){return this.uploadOrUpdate("PUT",e,r,n)}async move(e,r,n){var i=this;return i.handleOperation(async()=>await cu(i.fetch,`${i.url}/object/move`,{bucketId:i.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:i.headers}))}async copy(e,r,n){var i=this;return i.handleOperation(async()=>({path:(await cu(i.fetch,`${i.url}/object/copy`,{bucketId:i.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:i.headers})).Key}))}async createSignedUrl(e,r,n){var i=this;return i.handleOperation(async()=>{let a=i._getFinalPath(e),o=await cu(i.fetch,`${i.url}/object/sign/${a}
978`,gr({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:i.headers});const l=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{signedUrl:encodeURI(`${i.url}${o.signedURL}${l}`)}})}async createSignedUrls(e,r,n){var i=this;return i.handleOperation(async()=>{const a=await cu(i.fetch,`${i.url}/object/sign/${i.bucketId}`,{expiresIn:r,paths:e},{headers:i.headers}),o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return a.map(l=>gr(gr({},l),{},{signedUrl:l.signedURL?encodeURI(`${i.url}${l.signedURL}${o}`):null}))})}download(e,r,n){const i=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",a=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),o=a?`?${a}`:"",l=this._getFinalPath(e),c=()=>U2(this.fetch,`${this.url}/${i}/${l}${o}`,{headers:this.headers,noResolveJson:!0},n);return new ZTe(c,this.shouldThrowOnError)}async info(e){var r=this;const n=r._getFinalPath(e);return r.handleOperation(async()=>BR(await U2(r.fetch,`${r.url}/object/info/${n}`,{headers:r.headers})))}async exists(e){var r=this;const n=r._getFinalPath(e);try{return await YTe(r.fetch,`${r.url}/object/${n}`,{headers:r.headers}),{data:!0,error:null}}catch(i){if(r.shouldThrowOnError)throw i;if(C4(i)&&i instanceof Lce){const a=i.originalError;if([400,404].includes(a==null?void 0:a.status))return{data:!1,error:i}}throw i}}getPublicUrl(e,r){const n=this._getFinalPath(e),i=[],a=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";a!==""&&i.push(a);const o=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});l!==""&&i.push(l);let c=i.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${c}`)}}}async remove(e){var r=this;return r.handleOperation(async()=>await f8(r.fetch,`${r.url}/object/${r.bucketId}`,{prefixes:e},{headers:r.headers}))}async list(e,r,n){var i=this;return i.handleOperation(async()=>{const a=gr(gr(gr({},e3e),r),{},{prefix:e||""});return await cu(i.fetch,`${i.url}/object/list/${i.bucketId}`,a,{headers:i.headers},n)})}async listV2(e,r){var n=this;return n.handleOperation(async()=>{const i=gr({},e);return await cu(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,i,{headers:n.headers},r)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const r=[];return e.width&&r.push(`width=${e.width}`),e.height&&r.push(`height=${e.height}`),e.resize&&r.push(`resize=${e.resize}`),e.format&&r.push(`format=${e.format}`),e.quality&&r.push(`quality=${e.quality}`),r.join("&")}};const r3e="2.98.0",b_={"X-Client-Info":`storage-js/${r3e}`};var n3e=class extends W0{constructor(e,r={},n,i){const a=new URL(e);i!=null&&i.useNewHostname&&/supabase\.(co|in|red)$/.test(a.hostname)&&!a.hostname.includes("storage.supabase.")&&(a.hostname=a.hostname.replace("supabase.","storage.supabase."));const o=a.href.replace(/\/$/,""),l=gr(gr({},b_),r);super(o,l,n,"storage")}async listBuckets(e){var r=this;return r.handleOperation(async()=>{const n=r.listBucketOptionsToQueryString(e);return await U2(r.fetch,`${r.url}/bucket${n}`,{headers:r.headers})})}async getBucket(e){var r=this;return r.handleOperation(async()=>await U2(r.fetch,`${r.url}/bucket/${e}`,{headers:r.headers}))}async createBucket(e,r={public:!1}){var n=this;return n.handleOperation(async()=>await cu(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:r.type,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,r){var n=this;return n.handleOperation(async()=>await TR(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var r=this;return r.handleOperation(async()=>await cu(r.fetch,`${r.url}/bucket/${e}/empty`,{},{headers:r.headers}))}async deleteBucket(e){var r=this;return r.handleOperation(async()=>await f8(r.fetch,`${r.url}/bucket/${e}`,{},{headers:r.headers}))}listBucketOptionsToQueryString(e){const r={};return e&&("limit"in e&&(r.limit=String(e.limit)),"offset"in e&&(r.offset=String(e.offset)),e.search&&(r.search=e.search),e.sortColumn&&(r.sortColumn=e.sortColumn),e.sortOrder&&(r.sortOrder=e.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}},i3e=class extends W0{constructor(e,r={},n){const i=e.replace(/\/$/,""),a=gr(gr({},b_),r);super(i,a,n,"storage")}async createBucket(e){var r=this;return r.handleOperation(async()=>await cu(r.fetch,`${r.url}/bucket`,{name:e},{headers:r.headers}))}async listBuckets(e){var r=this;return r.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const i=n.toString(),a=i?`${r.url}/bucket?${i}`:`${r.url}/bucket`;return await U2(r.fetch,a,{headers:r.headers})})}async deleteBucket(e){var r=this;return r.handleOperation(async()=>await f8(r.fetch,`${r.url}/bucket/${e}`,{},{headers:r.headers}))}from(e){var r=this;if(!HTe(e))throw new _4("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new UTe({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>r.headers},fetch:this.fetch}),i=this.shouldThrowOnError;return new Proxy(n,{get(a,o){const l=a[o];return typeof l!="function"?l:async(...c)=>{try{return{data:await l.apply(a,c),error:null}}catch(u){if(i)throw u;return{data:null,error:u}}}}})}},a3e=class extends W0{constructor(e,r={},n){const i=e.replace(/\/$/,""),a=gr(gr({},b_),{},{"Content-Type":"application/json"},r);super(i,a,n,"vectors")}async createIndex(e){var r=this;return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/CreateIndex`,e,{headers:r.headers})||{})}async getIndex(e,r){var n=this;return n.handleOperation(async()=>await Fl.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:r},{headers:n.headers}))}async listIndexes(e){var r=this;return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/ListIndexes`,e,{headers:r.headers}))}async deleteIndex(e,r){var n=this;return n.handleOperation(async()=>await Fl.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:r},{headers:n.headers})||{})}},s3e=class extends W0{constructor(e,r={},n){const i=e.replace(/\/$/,""),a=gr(gr({},b_),{},{"Content-Type":"application/json"},r);super(i,a,n,"vectors")}async putVectors(e){var r=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/PutVectors`,e,{headers:r.headers})||{})}async getVectors(e){var r=this;return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/GetVectors`,e,{headers:r.headers}))}async listVectors(e){var r=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
978if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/ListVectors`,e,{headers:r.headers}))}async queryVectors(e){var r=this;return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/QueryVectors`,e,{headers:r.headers}))}async deleteVectors(e){var r=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/DeleteVectors`,e,{headers:r.headers})||{})}},o3e=class extends W0{constructor(e,r={},n){const i=e.replace(/\/$/,""),a=gr(gr({},b_),{},{"Content-Type":"application/json"},r);super(i,a,n,"vectors")}async createBucket(e){var r=this;return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:r.headers})||{})}async getBucket(e){var r=this;return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/GetVectorBucket`,{vectorBucketName:e},{headers:r.headers}))}async listBuckets(e={}){var r=this;return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/ListVectorBuckets`,e,{headers:r.headers}))}async deleteBucket(e){var r=this;return r.handleOperation(async()=>await Fl.post(r.fetch,`${r.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:r.headers})||{})}},l3e=class extends o3e{constructor(e,r={}){super(e,r.headers||{},r.fetch)}from(e){return new c3e(this.url,this.headers,e,this.fetch)}async createBucket(e){var r=()=>super.createBucket,n=this;return r().call(n,e)}async getBucket(e){var r=()=>super.getBucket,n=this;return r().call(n,e)}async listBuckets(e={}){var r=()=>super.listBuckets,n=this;return r().call(n,e)}async deleteBucket(e){var r=()=>super.deleteBucket,n=this;return r().call(n,e)}},c3e=class extends a3e{constructor(e,r,n,i){super(e,r,i),this.vectorBucketName=n}async createIndex(e){var r=()=>super.createIndex,n=this;return r().call(n,gr(gr({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var r=()=>super.listIndexes,n=this;return r().call(n,gr(gr({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var r=()=>super.getIndex,n=this;return r().call(n,n.vectorBucketName,e)}async deleteIndex(e){var r=()=>super.deleteIndex,n=this;return r().call(n,n.vectorBucketName,e)}index(e){return new u3e(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},u3e=class extends s3e{constructor(e,r,n,i,a){super(e,r,a),this.vectorBucketName=n,this.indexName=i}async putVectors(e){var r=()=>super.putVectors,n=this;return r().call(n,gr(gr({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var r=()=>super.getVectors,n=this;return r().call(n,gr(gr({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var r=()=>super.listVectors,n=this;return r().call(n,gr(gr({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var r=()=>super.queryVectors,n=this;return r().call(n,gr(gr({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var r=()=>super.deleteVectors,n=this;return r().call(n,gr(gr({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},d3e=class extends n3e{constructor(e,r={},n,i){super(e,r,n,i)}from(e){return new t3e(this.url,this.headers,e,this.fetch)}get vectors(){return new l3e(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new i3e(this.url+"/iceberg",this.headers,this.fetch)}};const Mce="2.98.0",ry=30*1e3,PR=3,iI=PR*ry,h3e="http://localhost:9999",f3e="supabase.auth.token",m3e={"X-Client-Info":`gotrue-js/${Mce}`},IR="X-Supabase-Api-Version",zce={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},p3e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,A3e=10*60*1e3;class $2 extends Error{constructor(r,n,i){super(r),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=i}}function rr(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class g3e extends $2{constructor(r,n,i){super(r,n,i),this.name="AuthApiError",this.status=n,this.code=i}
978}function x3e(e){return rr(e)&&e.name==="AuthApiError"}class yA extends $2{constructor(r,n){super(r),this.name="AuthUnknownError",this.originalError=n}}class Af extends $2{constructor(r,n,i,a){super(r,i,a),this.name=n,this.status=i}}class Cl extends Af{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function aI(e){return rr(e)&&e.name==="AuthSessionMissingError"}class Sx extends Af{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class pN extends Af{constructor(r){super(r,"AuthInvalidCredentialsError",400,void 0)}}class AN extends Af{constructor(r,n=null){super(r,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function y3e(e){return rr(e)&&e.name==="AuthImplicitGrantRedirectError"}class yW extends Af{constructor(r,n=null){super(r,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class v3e extends Af{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class FR extends Af{constructor(r,n){super(r,"AuthRetryableFetchError",n,void 0)}}function sI(e){return rr(e)&&e.name==="AuthRetryableFetchError"}class vW extends Af{constructor(r,n,i){super(r,"AuthWeakPasswordError",n,"weak_password"),this.reasons=i}}class OR extends Af{constructor(r){super(r,"AuthInvalidJwtError",400,"invalid_jwt")}}const wE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),bW=` 	
979\r=`.split(""),b3e=(()=>{const e=new Array(128);for(let r=0;r<e.length;r+=1)e[r]=-1;for(let r=0;r<bW.length;r+=1)e[bW[r].charCodeAt(0)]=-2;for(let r=0;r<wE.length;r+=1)e[wE[r].charCodeAt(0)]=r;return e})();function wW(e,r,n){if(e!==null)for(r.queue=r.queue<<8|e,r.queuedBits+=8;r.queuedBits>=6;){const i=r.queue>>r.queuedBits-6&63;n(wE[i]),r.queuedBits-=6}else if(r.queuedBits>0)for(r.queue=r.queue<<6-r.queuedBits,r.queuedBits=6;r.queuedBits>=6;){const i=r.queue>>r.queuedBits-6&63;n(wE[i]),r.queuedBits-=6}}function Uce(e,r,n){const i=b3e[e];if(i>-1)for(r.queue=r.queue<<6|i,r.queuedBits+=6;r.queuedBits>=8;)n(r.queue>>r.queuedBits-8&255),r.queuedBits-=8;else{if(i===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function jW(e){const r=[],n=l=>{r.push(String.fromCodePoint(l))},i={utf8seq:0,codepoint:0},a={queue:0,queuedBits:0},o=l=>{_3e(l,i,n)};for(let l=0;l<e.length;l+=1)Uce(e.charCodeAt(l),a,o);return r.join("")}function w3e(e,r){if(e<=127){r(e);return}else if(e<=2047){r(192|e>>6),r(128|e&63);return}else if(e<=65535){r(224|e>>12),r(128|e>>6&63),r(128|e&63);return}else if(e<=1114111){r(240|e>>18),r(128|e>>12&63),r(128|e>>6&63),r(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function j3e(e,r){for(let n=0;n<e.length;n+=1){let i=e.charCodeAt(n);if(i>55295&&i<=56319){const a=(i-55296)*1024&65535;i=(e.charCodeAt(n+1)-56320&65535|a)+65536,n+=1}w3e(i,r)}}function _3e(e,r,n){if(r.utf8seq===0){if(e<=127){n(e);return}for(let i=1;i<6;i+=1)if(!(e>>7-i&1)){r.utf8seq=i;break}if(r.utf8seq===2)r.codepoint=e&31;else if(r.utf8seq===3)r.codepoint=e&15;else if(r.utf8seq===4)r.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");r.utf8seq-=1}else if(r.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");r.codepoint=r.codepoint<<6|e&63,r.utf8seq-=1,r.utf8seq===0&&n(r.codepoint)}}function Yy(e){const r=[],n={queue:0,queuedBits:0},i=a=>{r.push(a)};for(let a=0;a<e.length;a+=1)Uce(e.charCodeAt(a),n,i);return new Uint8Array(r)}function C3e(e){const r=[];return j3e(e,n=>r.push(n)),new Uint8Array(r)}function NA(e){const r=[],n={queue:0,queuedBits:0},i=a=>{r.push(a)};return e.forEach(a=>wW(a,n,i)),wW(null,n,i),r.join("")}function N3e(e){return Math.round(Date.now()/1e3)+e}function S3e(){return Symbol("auth-callback")}const _s=()=>typeof window<"u"&&typeof document<"u",eA={tested:!1,writable:!1},$ce=()=>{if(!_s())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}
979if(eA.tested)return eA.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),eA.tested=!0,eA.writable=!0}catch{eA.tested=!0,eA.writable=!1}return eA.writable};function k3e(e){const r={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((a,o)=>{r[o]=a})}catch{}return n.searchParams.forEach((i,a)=>{r[a]=i}),r}const Qce=e=>e?(...r)=>e(...r):(...r)=>fetch(...r),E3e=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ny=async(e,r,n)=>{await e.setItem(r,JSON.stringify(n))},tA=async(e,r)=>{const n=await e.getItem(r);if(!n)return null;try{return JSON.parse(n)}catch{return n}},ws=async(e,r)=>{await e.removeItem(r)};class N4{constructor(){this.promise=new N4.promiseConstructor((r,n)=>{this.resolve=r,this.reject=n})}}N4.promiseConstructor=Promise;function gN(e){const r=e.split(".");if(r.length!==3)throw new OR("Invalid JWT structure");for(let i=0;i<r.length;i++)if(!p3e.test(r[i]))throw new OR("JWT not in base64url format");return{header:JSON.parse(jW(r[0])),payload:JSON.parse(jW(r[1])),signature:Yy(r[2]),raw:{header:r[0],payload:r[1]}}}async function B3e(e){return await new Promise(r=>{setTimeout(()=>r(null),e)})}function T3e(e,r){return new Promise((i,a)=>{(async()=>{for(let o=0;o<1/0;o++)try{const l=await e(o);if(!r(o,null,l)){i(l);return}}catch(l){if(!r(o,l)){a(l);return}}})()})}function P3e(e){return("0"+e.toString(16)).substr(-2)}function I3e(){const r=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=n.length;let a="";for(let o=0;o<56;o++)a+=n.charAt(Math.floor(Math.random()*i));return a}return crypto.getRandomValues(r),Array.from(r,P3e).join("")}async function F3e(e){const n=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",n),a=new Uint8Array(i);return Array.from(a).map(o=>String.fromCharCode(o)).join("")}async function O3e(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await F3e(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function kx(e,r,n=!1){const i=I3e();let a=i;n&&(a+="/PASSWORD_RECOVERY"),await ny(e,`${r}-code-verifier`,a);const o=await O3e(i);return[o,i===o?"plain":"s256"]}const L3e=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;
979function R3e(e){const r=e.headers.get(IR);if(!r||!r.match(L3e))return null;try{return new Date(`${r}T00:00:00.0Z`)}catch{return null}}function D3e(e){if(!e)throw new Error("Missing exp claim");const r=Math.floor(Date.now()/1e3);if(e<=r)throw new Error("JWT has expired")}function M3e(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const z3e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ex(e){if(!z3e.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function oI(){const e={};return new Proxy(e,{get:(r,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(r,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(r,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function U3e(e,r){return new Proxy(e,{get:(n,i,a)=>{if(i==="__isInsecureUserWarningProxy")return!0;if(typeof i=="symbol"){const o=i.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,i,a)}return!r.value&&typeof i=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),r.value=!0),Reflect.get(n,i,a)}})}function _W(e){return JSON.parse(JSON.stringify(e))}const uA=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),$3e=[502,503,504];async function CW(e){var r;if(!E3e(e))throw new FR(uA(e),0);if($3e.includes(e.status))throw new FR(uA(e),e.status);let n;try{n=await e.json()}catch(o){throw new yA(uA(o),o)}let i;const a=R3e(e);if(a&&a.getTime()>=zce["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?i=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(i=n.error_code),i){if(i==="weak_password")throw new vW(uA(n),e.status,((r=n.weak_password)===null||r===void 0?void 0:r.reasons)||[]);if(i==="session_not_found")throw new Cl}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((o,l)=>o&&typeof l=="string",!0))throw new vW(uA(n),e.status,n.weak_password.reasons);throw new g3e(uA(n),e.status||500,i)}const Q3e=(e,r,n,i)=>{const a={method:e,headers:(r==null?void 0:r.headers)||{}};return e==="GET"?a:(a.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},r==null?void 0:r.headers),a.body=JSON.stringify(i),Object.assign(Object.assign({},a),n))};async function wr(e,r,n,i){var a;const o=Object.assign({},i==null?void 0:i.headers);o[IR]||(o[IR]=zce["2024-01-01"].name),i!=null&&i.jwt&&(o.Authorization=`Bearer ${i.jwt}`);const l=(a=i==null?void 0:i.query)!==null&&a!==void 0?a:{};i!=null&&i.redirectTo&&(l.redirect_to=i.redirectTo);const c=Object.keys(l).length?"?"+new URLSearchParams(l).toString():"",u=await H3e(e,r,n+c,{headers:o,noResolveJson:i==null?void 0:i.noResolveJson},{},i==null?void 0:i.body);return i!=null&&i.xform?i==null?void 0:i.xform(u):{data:Object.assign({},u),error:null}}async function H3e(e,r,n,i,a,o){const l=Q3e(r,i,a,o);let c;try{c=await e(n,Object.assign({},l))}catch(u){throw console.error(u),new FR(uA(u),0)}if(c.ok||await CW(c),i!=null&&i.noResolveJson)return c;try{return await c.json()}catch(u){await CW(u)}}function ru(e){var r;let n=null;q3e(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=N3e(e.expires_in)));const i=(r=e.user)!==null&&r!==void 0?r:e;return{data:{session:n,user:i},error:null}}function NW(e){const r=ru(e);return!r.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,i)=>n&&typeof i=="string",!0)&&(r.data.weak_password=e.weak_password),r}function dm(e){var r;return{data:{user:(r=e.user)!==null&&r!==void 0?r:e},error:null}}function V3e(e){return{data:e,error:null}}function W3e(e){const{action_link:r,email_otp:n,hashed_token:i,redirect_to:a,verification_type:o}=e,l=V0(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),c={action_link:r,email_otp:n,hashed_token:i,redirect_to:a,verification_type:o},u=Object.assign({},l);return{data:{properties:c,user:u},error:null}}function SW(e){return e}function q3e(e){return e.access_token&&e.refresh_token&&e.expires_in}const lI=["global","local","others"];class K3e{constructor({url:r="",headers:n={},fetch:i}){this.url=r,this.headers=n,this.fetch=Qce(i),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(r,n=lI[0]){if(lI.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${lI.join(", ")}`);try{return await wr(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:r,noResolveJson:!0}),{data:null,error:null}}catch(i){if(rr(i))return{data:null,error:i};throw i}}async inviteUserByEmail(r,n={}){try{return await wr(this.fetch,"POST",`${this.url}/invite`,{body:{email:r,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:dm})}catch(i){if(rr(i))return{data:{user:null},error:i};throw i}}async generateLink(r){try{const{options:n}=r,i=V0(r,["options"]),a=Object.assign(Object.assign({},i),n);return"newEmail"in i&&(a.new_email=i==null?void 0:i.newEmail,delete a.newEmail),await wr(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:a,headers:this.headers,xform:W3e,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(rr(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(r){try{return await wr(this.fetch,"POST",`${this.url}/admin/users`,{body:r,headers:this.headers,xform:dm})}catch(n){if(rr(n))return{data:{user:null},error:n};throw n}}async listUsers(r){var n,i,a,o,l,c,u;try{const d={nextPage:null,lastPage:0,total:0},h=await wr(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(n=r==null?void 0:r.page)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:"",per_page:(o=(a=r==null?void 0:r.perPage)===null||a===void 0?void 0:a.toString())!==null&&o!==void 0?o:""},xform:SW});if(h.error)throw h.error;const f=await h.json(),p=(l=h.headers.get("x-total-count"))!==null&&l!==void 0?l:0,m=(u=(c=h.headers.get("link"))===null||c===void 0?void 0:c.split(","))!==null&&u!==void 0?u:[];return m.length>0&&(m.forEach(A=>{const g=parseInt(A.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(A.split(";")[1].split("=")[1]);d[`${y}Page`]=g}),d.total=parseInt(p)),{data:Object.assign(Object.assign({},f),d),error:null}}catch(d){if(rr(d))return{data:{users:[]},error:d};throw d}}async getUserById(r){Ex(r);try{return await wr(this.fetch,"GET",`${this.url}/admin/users/${r}`,{headers:this.headers,xform:dm})}catch(n){if(rr(n))return{data:{user:null},error:n};throw n}}async updateUserById(r,n){Ex(r);try{return await wr(this.fetch,"PUT",`${this.url}/admin/users/${r}`,{body:n,headers:this.headers,xform:dm})}catch(i){if(rr(i))return{data:{user:null},error:i};throw i}}async deleteUser(r,n=!1){Ex(r);
979try{return await wr(this.fetch,"DELETE",`${this.url}/admin/users/${r}`,{headers:this.headers,body:{should_soft_delete:n},xform:dm})}catch(i){if(rr(i))return{data:{user:null},error:i};throw i}}async _listFactors(r){Ex(r.userId);try{const{data:n,error:i}=await wr(this.fetch,"GET",`${this.url}/admin/users/${r.userId}/factors`,{headers:this.headers,xform:a=>({data:{factors:a},error:null})});return{data:n,error:i}}catch(n){if(rr(n))return{data:null,error:n};throw n}}async _deleteFactor(r){Ex(r.userId),Ex(r.id);try{return{data:await wr(this.fetch,"DELETE",`${this.url}/admin/users/${r.userId}/factors/${r.id}`,{headers:this.headers}),error:null}}catch(n){if(rr(n))return{data:null,error:n};throw n}}async _listOAuthClients(r){var n,i,a,o,l,c,u;try{const d={nextPage:null,lastPage:0,total:0},h=await wr(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(n=r==null?void 0:r.page)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:"",per_page:(o=(a=r==null?void 0:r.perPage)===null||a===void 0?void 0:a.toString())!==null&&o!==void 0?o:""},xform:SW});if(h.error)throw h.error;const f=await h.json(),p=(l=h.headers.get("x-total-count"))!==null&&l!==void 0?l:0,m=(u=(c=h.headers.get("link"))===null||c===void 0?void 0:c.split(","))!==null&&u!==void 0?u:[];return m.length>0&&(m.forEach(A=>{const g=parseInt(A.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(A.split(";")[1].split("=")[1]);d[`${y}Page`]=g}),d.total=parseInt(p)),{data:Object.assign(Object.assign({},f),d),error:null}}catch(d){if(rr(d))return{data:{clients:[]},error:d};throw d}}async _createOAuthClient(r){try{return await wr(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(rr(n))return{data:null,error:n};throw n}}async _getOAuthClient(r){try{return await wr(this.fetch,"GET",`${this.url}/admin/oauth/clients/${r}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(rr(n))return{data:null,error:n};throw n}}async _updateOAuthClient(r,n){try{return await wr(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${r}`,{body:n,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(rr(i))return{data:null,error:i};throw i}}async _deleteOAuthClient(r){try{return await wr(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${r}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(rr(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(r){try{return await wr(this.fetch,"POST",`${this.url}/admin/oauth/clients/${r}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(rr(n))return{data:null,error:n};throw n}}}function kW(e={}){return{getItem:r=>e[r]||null,setItem:(r,n)=>{e[r]=n},removeItem:r=>{delete e[r]}}}const oh={debug:!!(globalThis&&$ce()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Hce extends Error{constructor(r){super(r),this.isAcquireTimeout=!0}}class G3e extends Hce{}async function X3e(e,r,n){oh.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,r);const i=new globalThis.AbortController;r>0&&setTimeout(()=>{i.abort(),oh.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},r),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,r===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:i.signal},async a=>{if(a){oh.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,a.name);try{return await n()}finally{oh.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,a.name)}}else{if(r===0)throw oh.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new G3e(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(oh.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}})}catch(a){if((a==null?void 0:a.name)==="AbortError"&&r>0)return oh.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@
979supabase/gotrue-js: Lock "${e}" was not released within ${r}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){oh.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await n()}finally{oh.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw a}}function Y3e(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Vce(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function J3e(e){return parseInt(e,16)}function Z3e(e){const r=new TextEncoder().encode(e);return"0x"+Array.from(r,i=>i.toString(16).padStart(2,"0")).join("")}function ePe(e){var r;const{chainId:n,domain:i,expirationTime:a,issuedAt:o=new Date,nonce:l,notBefore:c,requestId:u,resources:d,scheme:h,uri:f,version:p}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!i)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(l&&l.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${l}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((r=e.statement)===null||r===void 0)&&r.includes(`
980`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const m=Vce(e.address),A=h?`${h}://${i}`:i,g=e.statement?`${e.statement}
981`:"",y=`${A} wants you to sign in with your Ethereum account:
982${m}
983
984${g}`;let x=`URI: ${f}
985Version: ${p}
986Chain ID: ${n}${l?`
987Nonce: ${l}`:""}
988Issued At: ${o.toISOString()}`;if(a&&(x+=`
989Expiration Time: ${a.toISOString()}`),c&&(x+=`
990Not Before: ${c.toISOString()}`),u&&(x+=`
991Request ID: ${u}`),d){let b=`
992Resources:`;for(const v of d){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);b+=`
993- ${v}`}x+=b}return`${y}
994${x}`}class Sa extends Error{constructor({message:r,code:n,cause:i,name:a}){var o;super(r,{cause:i}),this.__isWebAuthnError=!0,this.name=(o=a??(i instanceof Error?i.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=n}}class jE extends Sa{constructor(r,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:r}),this.name="WebAuthnUnknownError",this.originalError=n}}function tPe({error:e,options:r}){var n,i,a;const{publicKey:o}=r;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(r.signal instanceof AbortSignal)return new Sa({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=o.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Sa({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(r.mediation==="conditional"&&((i=o.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Sa({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((a=o.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new Sa({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Sa({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Sa({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(c=>c.type==="public-key").length===0?new Sa({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Sa({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const l=window.location.hostname;if(Wce(l)){if(o.rp.id!==l)return new Sa({message:`The RP ID "${o.rp.id}
994" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Sa({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new Sa({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Sa({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Sa({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function rPe({error:e,options:r}){const{publicKey:n}=r;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(r.signal instanceof AbortSignal)return new Sa({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Sa({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(Wce(i)){if(n.rpId!==i)return new Sa({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Sa({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Sa({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Sa({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class nPe{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const r=new AbortController;return this.controller=r,r.signal}cancelCeremony(){if(this.controller){const r=new Error("Manually cancelling existing WebAuthn API call");r.name="AbortError",this.controller.abort(r),this.controller=void 0}}}const iPe=new nPe;function aPe(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:r,user:n,excludeCredentials:i}=e,a=V0(e,["challenge","user","excludeCredentials"]),o=Yy(r).buffer,l=Object.assign(Object.assign({},n),{id:Yy(n.id).buffer}),c=Object.assign(Object.assign({},a),{challenge:o,user:l});if(i&&i.length>0){c.excludeCredentials=new Array(i.length);for(let u=0;u<i.length;u++){const d=i[u];c.excludeCredentials[u]=Object.assign(Object.assign({},d),{id:Yy(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return c}function sPe(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:r,allowCredentials:n}=e,i=V0(e,["challenge","allowCredentials"]),a=Yy(r).buffer,o=Object.assign(Object.assign({},i),{challenge:a});if(n&&n.length>0){o.allowCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];o.allowCredentials[l]=Object.assign(Object.assign({},c),{id:Yy(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return o}function oPe(e){var r;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:NA(new Uint8Array(e.response.attestationObject)),clientDataJSON:NA(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(r=n.authenticatorAttachment)!==null&&r!==void 0?r:void 0}}function lPe(e){var r;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,i=e.getClientExtensionResults(),a=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:NA(new Uint8Array(a.authenticatorData)),clientDataJSON:NA(new Uint8Array(a.clientDataJSON)),signature:NA(new Uint8Array(a.signature)),userHandle:a.userHandle?NA(ne
994w Uint8Array(a.userHandle)):void 0},type:"public-key",clientExtensionResults:i,authenticatorAttachment:(r=n.authenticatorAttachment)!==null&&r!==void 0?r:void 0}}function Wce(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function EW(){var e,r;return!!(_s()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((r=navigator==null?void 0:navigator.credentials)===null||r===void 0?void 0:r.get)=="function")}async function cPe(e){try{const r=await navigator.credentials.create(e);return r?r instanceof PublicKeyCredential?{data:r,error:null}:{data:null,error:new jE("Browser returned unexpected credential type",r)}:{data:null,error:new jE("Empty credential response",r)}}catch(r){return{data:null,error:tPe({error:r,options:e})}}}async function uPe(e){try{const r=await navigator.credentials.get(e);return r?r instanceof PublicKeyCredential?{data:r,error:null}:{data:null,error:new jE("Browser returned unexpected credential type",r)}:{data:null,error:new jE("Empty credential response",r)}}catch(r){return{data:null,error:rPe({error:r,options:e})}}}const dPe={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},hPe={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function _E(...e){const r=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),n=a=>a instanceof ArrayBuffer||ArrayBuffer.isView(a),i={};for(const a of e)if(a)for(const o in a){const l=a[o];if(l!==void 0)if(Array.isArray(l))i[o]=l;else if(n(l))i[o]=l;else if(r(l)){const c=i[o];r(c)?i[o]=_E(c,l):i[o]=_E(l)}else i[o]=l}return i}function fPe(e,r){return _E(dPe,e,r||{})}function mPe(e,r){return _E(hPe,e,r||{})}class pPe{constructor(r){this.client=r,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(r){return this.client.mfa.enroll(Object.assign(Object.assign({},r),{factorType:"webauthn"}))}async _challenge({factorId:r,webauthn:n,friendlyName:i,signal:a},o){var l;try{const{data:c,error:u}=await this.client.mfa.challenge({factorId:r,webauthn:n});if(!c)return{data:null,error:u};const d=a??iPe.createNewAbortSignal();if(c.webauthn.type==="create"){const{user:h}=c.webauthn.credential_options.publicKey;if(!h.name){const f=i;if(f)h.name=`${h.id}:${f}`;else{const m=(await this.client.getUser()).data.user,A=((l=m==null?void 0:m.user_metadata)===null||l===void 0?void 0:l.name)||(m==null?void 0:m.email)||(m==null?void 0:m.id)||"User";h.name=`${h.id}:${A}`}}h.displayName||(h.displayName=h.name)}switch(c.webauthn.type){case"create":{const h=fPe(c.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:f,error:p}=await cPe({publicKey:h,signal:d});return f?{data:{factorId:r,challengeId:c.id,webauthn:{type:c.webauthn.type,credential_response:f}},error:null}:{data:null,error:p}}case"request":{const h=mPe(c.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:f,error:p}=await uPe(Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:h,signal:d}));return f?{data:{factorId:r,challengeId:c.id,webauthn:{type:c.webauthn.type,credential_response:f}},error:null}:{data:null,error:p}}}}catch(c){return rr(c)?{data:null,error:c}:{data:null,error:new yA("Unexpected error in challenge",c)}}}async _verify({challengeId:r,factorId:n,webauthn:i}){return this.client.mfa.verify({factorId:n,challengeId:r,webauthn:i})}async _authenticate({factorId:r,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:a}={}},o){if(!n)return{data:null,error:new $2("rpId is required for WebAuthn authentication")};try{if(!EW())return{data:null,error:new yA("Browser does not support WebAuthn",null)};const{data:l,error:c}=await this.challenge({factorId:r,webauthn:{rpId:n,rpOrigins:i},signal:a},{request:o});if(!l)return{data:null,error:c};const{webauthn:u}=l;return this._verify({factorId:r,challengeId:l.challengeId,webauthn:{type:u.type,rpId:n,rpOrigins:i,credential_response:u.credential_response}})}catch(l){return rr(l)?{data:null,error:l}:{data:null,error:new yA("Unexpected error in authenticate",l)}
994}}async _register({friendlyName:r,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:a}={}},o){if(!n)return{data:null,error:new $2("rpId is required for WebAuthn registration")};try{if(!EW())return{data:null,error:new yA("Browser does not support WebAuthn",null)};const{data:l,error:c}=await this._enroll({friendlyName:r});if(!l)return await this.client.mfa.listFactors().then(h=>{var f;return(f=h.data)===null||f===void 0?void 0:f.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===r&&p.status!=="unverified")}).then(h=>h?this.client.mfa.unenroll({factorId:h==null?void 0:h.id}):void 0),{data:null,error:c};const{data:u,error:d}=await this._challenge({factorId:l.id,friendlyName:l.friendly_name,webauthn:{rpId:n,rpOrigins:i},signal:a},{create:o});return u?this._verify({factorId:l.id,challengeId:u.challengeId,webauthn:{rpId:n,rpOrigins:i,type:u.webauthn.type,credential_response:u.webauthn.credential_response}}):{data:null,error:d}}catch(l){return rr(l)?{data:null,error:l}:{data:null,error:new yA("Unexpected error in register",l)}}}}Y3e();const APe={url:h3e,storageKey:f3e,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:m3e,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function BW(e,r,n){return await n()}const Bx={};class Q2{get jwks(){var r,n;return(n=(r=Bx[this.storageKey])===null||r===void 0?void 0:r.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(r){Bx[this.storageKey]=Object.assign(Object.assign({},Bx[this.storageKey]),{jwks:r})}get jwks_cached_at(){var r,n;return(n=(r=Bx[this.storageKey])===null||r===void 0?void 0:r.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(r){Bx[this.storageKey]=Object.assign(Object.assign({},Bx[this.storageKey]),{cachedAt:r})}constructor(r){var n,i,a;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},APe),r);if(this.storageKey=o.storageKey,this.instanceID=(n=Q2.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Q2.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&_s()){const l=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(l),this.logDebugMessages&&console.trace(l)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new K3e({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=Qce(o.fetch),this.lock=o.lock||BW,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&_s()&&(!((i=globalThis==null?void 0:globalThis.navigator)===null||i===void 0)&&i.locks)?this.lock=X3e:this.lock=BW,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new pPe(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:$ce()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=kW(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=kW(this.memoryStorage)),_s()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(l){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",l)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async l=>{this._debug("received broadcast notification from other tab or client",l);try{await this._notifyAllSubscribers(l.data.event,l.data.session,!1)}catch(c){this._debug("#broadcastChannel","error",c)}})}o.skipAutoInitialize||this.initialize().catch(l=>{this._debug("#initialize()","error",l)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(r){if(this.throwOnError&&r&&r.error)throw r.error;return r}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Mce}) ${new Date().toISOString()}`}_debug(...r){return this.logDebugMessages&&this.logger(this._logPrefix(),...r),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var r;try{let n={},i="none";if(_s()&&(n=k3e(window.location.href),this._isImplicitGrantCallback(n)?i="implicit":await this._isPKCECallback(n)&&(i="pkce")),_s()&&this.detectSessionInUrl&&i!=="none"){const{data:a,error:o}=await this._getSessionFromURL(n,i);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),y3e(o)){const u=(r=o.details)===null||r===void 0?void 0:r.code;if(u==="identity_already_exists"||u==="identity_not_found"||u==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:l,redirectType:c}=a;return this._debug("#_initialize()","detected session in URL",l,"redirect type",c),await this._saveSession(l),setTimeout(async()=>{c==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",l):await this._notifyAllSubscribers("SIGNED_IN",l)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return rr(n)?this._returnResult({error:n}):this._returnResult({error:new yA("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(r){var n,i,a;try{const o=await wr(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(n=r==null?void 0:r.options)===null||n===void 0?void 0:n.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:(a=r==null?void 0:r.options)===null||a===void 0?void 0:a.captchaToken}},xform:ru}),{data:l,error:c}=o;if(c||!l)return this._returnResult({data:{user:null,session:null},error:c});const u=l.session,d=l.user;return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",u)),this._returnResult({data:{user:d,session:u},error:null})}catch(o){if(rr(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(r){var n,i,a;try{let o;if("email"in r){const{email:h,password:f,options:p}=r;let m=null,A=null;this.flowType==="pkce"&&([m,A]=await kx(this.storage,this.storageKey)),o=await wr(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:h,password:f,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:m,code_challenge_method:A},xform:ru})}else if("phone"in r){const{phone:h,password:f,options:p}=r;o=await wr(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:h,password:f,data:(i=p==null?void 0:p.data)!==null&&i!==void 0?i:{},channel:(a=p==null?void 0:p.channel)!==null&&a!==void 0?a:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:ru})}else throw new pN("You must provide either an email or phone number and a password");const{data:l,error:c}=o;if(c||!l)return await ws(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:c});const u=l.session,d=l.user;return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",u)),this._returnResult({data:{user:d,session:u},error:null})}catch(o){if(await ws(this.storage,`${this.storageKey}-code-verifier`),rr(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(r){try{let n;if("email"in r){const{email:o,password:l,options:c}=r;n=await wr(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:l,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken}},xform:NW})}else if("phone"in r){const{phone:o,password:l,options:c}=r;n=await wr(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:l,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken}},xform:NW})}else throw new pN("You must provide either an email or phone number and a password");const{data:i,error:a}=n;
994if(a)return this._returnResult({data:{user:null,session:null},error:a});if(!i||!i.session||!i.user){const o=new Sx;return this._returnResult({data:{user:null,session:null},error:o})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:a})}catch(n){if(rr(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(r){var n,i,a,o;return await this._handleProviderSignIn(r.provider,{redirectTo:(n=r.options)===null||n===void 0?void 0:n.redirectTo,scopes:(i=r.options)===null||i===void 0?void 0:i.scopes,queryParams:(a=r.options)===null||a===void 0?void 0:a.queryParams,skipBrowserRedirect:(o=r.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(r){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(r))}async signInWithWeb3(r){const{chain:n}=r;switch(n){case"ethereum":return await this.signInWithEthereum(r);case"solana":return await this.signInWithSolana(r);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(r){var n,i,a,o,l,c,u,d,h,f,p;let m,A;if("message"in r)m=r.message,A=r.signature;else{const{chain:g,wallet:y,statement:x,options:b}=r;let v;if(_s())if(typeof y=="object")v=y;else{const E=window;if("ethereum"in E&&typeof E.ethereum=="object"&&"request"in E.ethereum&&typeof E.ethereum.request=="function")v=E.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=y}const j=new URL((n=b==null?void 0:b.url)!==null&&n!==void 0?n:window.location.href),_=await v.request({method:"eth_requestAccounts"}).then(E=>E).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const C=Vce(_[0]);let N=(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.chainId;if(!N){const E=await v.request({method:"eth_chainId"});N=J3e(E)}const S={domain:j.host,address:C,statement:x,uri:j.href,version:"1",chainId:N,nonce:(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.nonce,issuedAt:(l=(o=b==null?void 0:b.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&l!==void 0?l:new Date,expirationTime:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.expirationTime,notBefore:(u=b==null?void 0:b.signInWithEthereum)===null||u===void 0?void 0:u.notBefore,requestId:(d=b==null?void 0:b.signInWithEthereum)===null||d===void 0?void 0:d.requestId,resources:(h=b==null?void 0:b.signInWithEthereum)===null||h===void 0?void 0:h.resources};m=ePe(S),A=await v.request({method:"personal_sign",params:[Z3e(m),C]})}try{const{data:g,error:y}=await wr(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:m,signature:A},!((f=r.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=r.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:ru});if(y)throw y;if(!g||!g.session||!g.user){const x=new Sx;return this._returnResult({data:{user:null,session:null},error:x})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:y})}catch(g){if(rr(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(r){var n,i,a,o,l,c,u,d,h,f,p,m;let A,g;if("message"in r)A=r.message,g=r.signature;else{const{chain:y,wallet:x,statement:b,options:v}=r;let j;if(_s())if(typeof x=="object")j=x;else{const C=window;if("solana"in C&&typeof C.solana=="object"&&("signIn"in C.solana&&typeof C.solana.signIn=="function"||"signMessage"in C.solana&&typeof C.solana.signMessage=="function"))j=C.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=x}const _=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in j&&j.signIn){const C=await j.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),b?{statement:b}:null));let N;if(Array.isArray(C)&&C[0]&&typeof C[0]=="object")N=C[0];else if(C&&typeof C=="object"&&"signedMessage"in C&&"signature"in C)N=C;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in N&&"signature"in N&&(typeof N.signedMessage=="string"||N.signedMessage instanceof Uint8Array)&&N.signature instanceof Uint8Array)A=typeof N.signedMessage=="string"?N.signedMessage:new TextDecoder().decode(N.signedMessage),g=N.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");A=[`${_.host} wants you to sign in with your Solana account:`,j.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${_.href}
994`,`Issued At: ${(a=(i=v==null?void 0:v.signInWithSolana)===null||i===void 0?void 0:i.issuedAt)!==null&&a!==void 0?a:new Date().toISOString()}`,...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((c=v==null?void 0:v.signInWithSolana)===null||c===void 0)&&c.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((u=v==null?void 0:v.signInWithSolana)===null||u===void 0)&&u.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((d=v==null?void 0:v.signInWithSolana)===null||d===void 0)&&d.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((f=(h=v==null?void 0:v.signInWithSolana)===null||h===void 0?void 0:h.resources)===null||f===void 0)&&f.length?["Resources",...v.signInWithSolana.resources.map(N=>`- ${N}`)]:[]].join(`
995`);const C=await j.signMessage(new TextEncoder().encode(A),"utf8");if(!C||!(C instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=C}}try{const{data:y,error:x}=await wr(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:A,signature:NA(g)},!((p=r.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(m=r.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:ru});if(x)throw x;if(!y||!y.session||!y.user){const b=new Sx;return this._returnResult({data:{user:null,session:null},error:b})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:x})}catch(y){if(rr(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async _exchangeCodeForSession(r){const n=await tA(this.storage,`${this.storageKey}-code-verifier`),[i,a]=(n??"").split("/");try{if(!i&&this.flowType==="pkce")throw new v3e;const{data:o,error:l}=await wr(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:r,code_verifier:i},xform:ru});if(await ws(this.storage,`${this.storageKey}-code-verifier`),l)throw l;if(!o||!o.session||!o.user){const c=new Sx;return this._returnResult({data:{user:null,session:null,redirectType:null},error:c})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:a??null}),error:l})}catch(o){if(await ws(this.storage,`${this.storageKey}-code-verifier`),rr(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(r){try{const{options:n,provider:i,token:a,access_token:o,nonce:l}=r,c=await wr(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:a,access_token:o,nonce:l,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:ru}),{data:u,error:d}=c;if(d)return this._returnResult({data:{user:null,session:null},error:d});if(!u||!u.session||!u.user){const h=new Sx;return this._returnResult({data:{user:null,session:null},error:h})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",u.session)),this._returnResult({data:u,error:d})}catch(n){if(rr(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(r){var n,i,a,o,l;try{if("email"in r){const{email:c,options:u}=r;let d=null,h=null;this.flowType==="pkce"&&([d,h]=await kx(this.storage,this.storageKey));const{error:f}=await wr(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:c,data:(n=u==null?void 0:u.data)!==null&&n!==void 0?n:{},create_user:(i=u==null?void 0:u.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},code_challenge:d,code_challenge_method:h},redirectTo:u==null?void 0:u.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in r){const{phone:c,options:u}=r,{data:d,error:h}=await wr(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:c,data:(a=u==null?void 0:u.data)!==null&&a!==void 0?a:{},create_user:(o=u==null?void 0:u.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},channel:(l=u==null?void 0:u.channel)!==null&&l!==void 0?l:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:h})}throw new pN("You must provide either an email or phone number.")}catch(c){if(await ws(this.storage,`${this.storageKey}-code-verifier`),rr(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async verifyOtp(r){var n,i;try{let a,o;"options"in r&&(a=(n=r.options)===null||n===void 0?void 0:n.redirectTo,o=(i=r.options)===null||i===void 0?void 0:i.captchaToken);const{data:l,error:c}=await wr(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},r),{gotrue_meta_security:{captcha_token:o}}),redirectTo:a,xform:ru});if(c)throw c;if(!l)throw new Error("An error occurred on token verification.");const u=l.session,d=l.user;return u!=null&&u.access_token&&(await this._saveSession(u),await this._notifyAllSubscribers(r.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u)),this._returnResult({data:{user:d,session:u},error:null})}catch(a){if(rr(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithSSO(r){var n,i,a,o,l;try{let c=null,u=null;this.flowType==="pkce"&&([c,u]=await kx(this.storage,this.storageKey));const d=await wr(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in r?{provider_id:r.providerId}:null),"domain"in r?{domain:r.domain}:null),{redirect_to:(i=(n=r.options)===null||n===void 0?void 0:n.redirectTo)!==null&&i!==void 0?i:void 0}),!((a=r==null?void 0:r.options)===null||a===void 0)&&a.captchaToken?{gotrue_meta_security:{captcha_token:r.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:c,code_challenge_method:u}),headers:this.headers,xform:V3e});return!((o=d.data)===null||o===void 0)&&o.url&&_s()&&!(!((l=r.options)===null||l===void 0)&&l.skipBrowserRedirect)&&window.location.assign(d.data.url),this._returnResult(d)}catch(c){if(await ws(this.storage,`${this.storageKey}-code-verifier`),rr(c))return this._returnResult({data:null,error:c});throw c}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)throw i;if(!n)throw new Cl;const{error:a}=await wr(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:a})})}catch(r){if(rr(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async resend(r){try{const n=`${this.url}/resend`;if("email"in r){const{email:i,type:a,options:o}=r,{error:l}=await wr(this.fetch,"POST",n,{headers:this.headers,body:{email:i,type:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:l})}else if("phone"in r){const{phone:i,type:a,options:o}=r,{data:l,error:c}=await wr(this.fetch,"POST",n,{headers:this.headers,body:{phone:i,type:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:l==null?void 0:l.message_id},error:c})}throw new pN("You must provide either an email or phone number and a type")}catch(n){if(rr(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(r,n){this._debug("#_acquireLock","begin",r);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),a=(async()=>(await i,await n()))();return this.pendingInLock.push((async()=>{try{await a}catch{}})()),a}return await this.lock(`lock:${this.storageKey}`,r,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const i=n();for(this.pendingInLock.push((async()=>{try{await i}catch{}})()),await i;this.pendingInLock.length;){const a=[...this.pendingInLock];await Promise.all(a),this.pendingInLock.splice(0,a.length)}return await i}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(r){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await r(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 r=null;const n=await tA(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?r=n:(this._debug("#getSession()","session from storage is not val
995id"),await this._removeSession())),!r)return{data:{session:null},error:null};const i=r.expires_at?r.expires_at*1e3-Date.now()<iI:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",r.expires_at),!i){if(this.userStorage){const l=await tA(this.userStorage,this.storageKey+"-user");l!=null&&l.user?r.user=l.user:r.user=oI()}if(this.storage.isServer&&r.user&&!r.user.__isUserNotAvailableProxy){const l={value:this.suppressGetSessionWarning};r.user=U3e(r.user,l),l.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:r},error:null}}const{data:a,error:o}=await this._callRefreshToken(r.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:a},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(r){if(r)return await this._getUser(r);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(r){try{return r?await wr(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:r,xform:dm}):await this._useSession(async n=>{var i,a,o;const{data:l,error:c}=n;if(c)throw c;return!(!((i=l.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Cl}:await wr(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(a=l.session)===null||a===void 0?void 0:a.access_token)!==null&&o!==void 0?o:void 0,xform:dm})})}catch(n){if(rr(n))return aI(n)&&(await this._removeSession(),await ws(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(r,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(r,n))}async _updateUser(r,n={}){try{return await this._useSession(async i=>{const{data:a,error:o}=i;if(o)throw o;if(!a.session)throw new Cl;const l=a.session;let c=null,u=null;this.flowType==="pkce"&&r.email!=null&&([c,u]=await kx(this.storage,this.storageKey));const{data:d,error:h}=await wr(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},r),{code_challenge:c,code_challenge_method:u}),jwt:l.access_token,xform:dm});if(h)throw h;return l.user=d.user,await this._saveSession(l),await this._notifyAllSubscribers("USER_UPDATED",l),this._returnResult({data:{user:l.user},error:null})})}catch(i){if(await ws(this.storage,`${this.storageKey}-code-verifier`),rr(i))return this._returnResult({data:{user:null},error:i});throw i}}async setSession(r){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(r))}async _setSession(r){try{if(!r.access_token||!r.refresh_token)throw new Cl;const n=Date.now()/1e3;let i=n,a=!0,o=null;const{payload:l}=gN(r.access_token);if(l.exp&&(i=l.exp,a=i<=n),a){const{data:c,error:u}=await this._callRefreshToken(r.refresh_token);if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c)return{data:{user:null,session:null},error:null};o=c}else{const{data:c,error:u}=await this._getUser(r.access_token);if(u)return this._returnResult({data:{user:null,session:null},error:u});o={access_token:r.access_token,refresh_token:r.refresh_token,user:c.user,token_type:"bearer",expires_in:i-n,expires_at:i},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(n){if(rr(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(r){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(r))}async _refreshSession(r){try{return await this._useSession(async n=>{var i;if(!r){const{data:l,error:c}=n;if(c)throw c;r=(i=l.session)!==null&&i!==void 0?i:void 0}if(!(r!=null&&r.refresh_token))throw new Cl;const{data:a,error:o}=await this._callRefreshToken(r.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):a?this._returnResult({data:{user:a.user,session:a},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(rr(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(r,n){try{if(!_s())throw new AN("No browser detected.");
995if(r.error||r.error_description||r.error_code)throw new AN(r.error_description||"Error in URL with unspecified error_description",{error:r.error||"unspecified_error",code:r.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new yW("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new AN("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!r.code)throw new yW("No code detected.");const{data:b,error:v}=await this._exchangeCodeForSession(r.code);if(v)throw v;const j=new URL(window.location.href);return j.searchParams.delete("code"),window.history.replaceState(window.history.state,"",j.toString()),{data:{session:b.session,redirectType:null},error:null}}const{provider_token:i,provider_refresh_token:a,access_token:o,refresh_token:l,expires_in:c,expires_at:u,token_type:d}=r;if(!o||!c||!l||!d)throw new AN("No session defined in URL");const h=Math.round(Date.now()/1e3),f=parseInt(c);let p=h+f;u&&(p=parseInt(u));const m=p-h;m*1e3<=ry&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${f}s`);const A=p-f;h-A>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",A,p,h):h-A<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",A,p,h);const{data:g,error:y}=await this._getUser(o);if(y)throw y;const x={provider_token:i,provider_refresh_token:a,access_token:o,expires_in:f,expires_at:p,refresh_token:l,token_type:d,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:x,redirectType:r.type},error:null})}catch(i){if(rr(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_isImplicitGrantCallback(r){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),r):!!(r.access_token||r.error_description)}async _isPKCECallback(r){const n=await tA(this.storage,`${this.storageKey}-code-verifier`);return!!(r.code&&n)}async signOut(r={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(r))}async _signOut({scope:r}={scope:"global"}){return await this._useSession(async n=>{var i;const{data:a,error:o}=n;if(o&&!aI(o))return this._returnResult({error:o});const l=(i=a.session)===null||i===void 0?void 0:i.access_token;if(l){const{error:c}=await this.admin.signOut(l,r);if(c&&!(x3e(c)&&(c.status===404||c.status===401||c.status===403)||aI(c)))return this._returnResult({error:c})}return r!=="others"&&(await this._removeSession(),await ws(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(r){const n=S3e(),i={id:n,callback:r,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,i),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:i}}}async _emitInitialSession(r){return await this._useSession(async n=>{var i,a;try{const{data:{session:o},error:l}=n;if(l)throw l;await((i=this.stateChangeEmitters.get(r))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",r,"session",o)}catch(o){await((a=this.stateChangeEmitters.get(r))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",r,"error",o),console.error(o)}})}async resetPasswordForEmail(r,n={}){let i=null,a=null;this.flowType==="pkce"&&([i,a]=await kx(this.storage,this.storageKey,!0));try{return await wr(this.fetch,"POST",`${this.url}/recover`,{body:{email:r,code_challenge:i,code_challenge_method:a,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(await ws(this.storage,`${this.storageKey}-code-verifier`),rr(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var r;try{const{data:n,error:i}=await this.getUser();if(i)throw i;return this._returnResult({data:{identities:(r=n.user.identities)!==null&&r!==void 0?r:[]},error:null})}catch(n){if(rr(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(r){return"token"in r?this.linkIdentityIdToken(r):this.linkIdentityOAuth(r)}async linkIdentityOAuth(r){var n;try{const{data:i,error:a}=await this._useSession(async o=>{var l,c,u,d,h;const{data:f,error:p}=o;if(p)throw p;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,r.provider,{redirectTo:(l=r.options)===null||l===void 0?void 0:l.redirectTo,scopes:(c=r.options)===null||c===void 0?void 0:c.scopes,queryParams:(u=r.options)===null||u===void 0?void 0:u.queryParams,skipBrowserRedirect:!0});return await wr(this.fetch,"GET",m,{headers:this.headers,jwt:(h=(d=f.session)===null||d===void 0?void 0:d.access_token)!==null&&h!==void 0?h:void 0})});if(a)throw a;return _s()&&!(!((n=r.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(i==null?void 0:i.url),this._returnResult({data:{provider:r.provider,url:i==null?void 0:i.url},error:null})}catch(i){if(rr(i))return this._returnResult({data:{provider:r.provider,url:null},error:i});throw i}}async linkIdentityIdToken(r){return await this._useSession(async n=>{var i;try{const{error:a,data:{session:o}}=n;if(a)throw a;const{options:l,provider:c,token:u,access_token:d,nonce:h}=r,f=await wr(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(i=o==null?void 0:o.access_token)!==null&&i!==void 0?i:void 0,body:{provider:c,id_token:u,access_token:d,nonce:h,link_identity:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:ru}),{data:p,error:m}=f;return m?this._returnResult({data:{user:null,session:null},error:m}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new Sx}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:m}))}catch(a){if(await ws(this.storage,`${this.storageKey}-code-verifier`),rr(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}})}async unlinkIdentity(r){try{return await this._useSession(async n=>{var i,a;const{data:o,error:l}=n;if(l)throw l;
995return await wr(this.fetch,"DELETE",`${this.url}/user/identities/${r.identity_id}`,{headers:this.headers,jwt:(a=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0})})}catch(n){if(rr(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(r){const n=`#_refreshAccessToken(${r.substring(0,5)}...)`;this._debug(n,"begin");try{const i=Date.now();return await T3e(async a=>(a>0&&await B3e(200*Math.pow(2,a-1)),this._debug(n,"refreshing attempt",a),await wr(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:r},headers:this.headers,xform:ru})),(a,o)=>{const l=200*Math.pow(2,a);return o&&sI(o)&&Date.now()+l-i<ry})}catch(i){if(this._debug(n,"error",i),rr(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}finally{this._debug(n,"end")}}_isValidSession(r){return typeof r=="object"&&r!==null&&"access_token"in r&&"refresh_token"in r&&"expires_at"in r}async _handleProviderSignIn(r,n){const i=await this._getUrlForProvider(`${this.url}/authorize`,r,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",r,"options",n,"url",i),_s()&&!n.skipBrowserRedirect&&window.location.assign(i),{data:{provider:r,url:i},error:null}}async _recoverAndRefresh(){var r,n;const i="#_recoverAndRefresh()";this._debug(i,"begin");try{const a=await tA(this.storage,this.storageKey);if(a&&this.userStorage){let l=await tA(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!l&&(l={user:a.user},await ny(this.userStorage,this.storageKey+"-user",l)),a.user=(r=l==null?void 0:l.user)!==null&&r!==void 0?r:oI()}else if(a&&!a.user&&!a.user){const l=await tA(this.storage,this.storageKey+"-user");l&&(l!=null&&l.user)?(a.user=l.user,await ws(this.storage,this.storageKey+"-user"),await ny(this.storage,this.storageKey,a)):a.user=oI()}if(this._debug(i,"session from storage",a),!this._isValidSession(a)){this._debug(i,"session is not valid"),a!==null&&await this._removeSession();return}const o=((n=a.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<iI;if(this._debug(i,`session has${o?"":" not"} expired with margin of ${iI}s`),o){if(this.autoRefreshToken&&a.refresh_token){const{error:l}=await this._callRefreshToken(a.refresh_token);l&&(console.error(l),sI(l)||(this._debug(i,"refresh failed with a non-retryable error, removing the session",l),await this._removeSession()))}}else if(a.user&&a.user.__isUserNotAvailableProxy===!0)try{const{data:l,error:c}=await this._getUser(a.access_token);!c&&(l!=null&&l.user)?(a.user=l.user,await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)):this._debug(i,"could not get user data, skipping SIGNED_IN notification")}catch(l){console.error("Error getting user data:",l),this._debug(i,"error getting user data, skipping SIGNED_IN notification",l)}else await this._notifyAllSubscribers("SIGNED_IN",a)}catch(a){this._debug(i,"error",a),console.error(a);return}finally{this._debug(i,"end")}}async _callRefreshToken(r){var n,i;if(!r)throw new Cl;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const a=`#_callRefreshToken(${r.substring(0,5)}...)`;this._debug(a,"begin");try{this.refreshingDeferred=new N4;const{data:o,error:l}=await this._refreshAccessToken(r);if(l)throw l;if(!o.session)throw new Cl;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const c={data:o.session,error:null};return this.refreshingDeferred.resolve(c),c}catch(o){if(this._debug(a,"error",o),rr(o)){const l={data:null,error:o};return sI(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(l),l}throw(i=this.refreshingDeferred)===null||i===void 0||i.reject(o),o}finally{this.refreshingDeferred=null,this._debug(a,"end")}}async _notifyAllSubscribers(r,n,i=!0){const a=`#_notifyAllSubscribers(${r})`;this._debug(a,"begin",n,`broadcast = ${i}`);try{this.broadcastChannel&&i&&this.broadcastChannel.postMessage({event:r,session:n});const o=[],l=Array.from(this.stateChangeEmitters.values()).map(async c=>{try{await c.callback(r,n)}catch(u){o.push(u)}});if(await Promise.all(l),o.length>0){for(let c=0;c<o.length;c+=1)console.error(o[c]);throw o[0]}}finally{this._debug(a,"end")}}async _saveSession(r){this._debug("#_saveSession()",r),this.suppressGetSessionWarning=!0,await ws(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},r),i=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!i&&n.user&&await ny(this.userStorage,this.storageKey+"-user",{user:n.user});const a=Object.assign({},n);delete a.user;const o=_W(a);await ny(this.storage,this.storageKey,o)}else{const a=_W(n);await ny(this.storage,this.storageKey,a)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await ws(this.storage,this.storageKey),await ws(this.storage,this.storageKey+"-code-verifier"),await ws(this.storage,this.storageKey+"-user"),this.userStorage&&await ws(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const r=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{r&&_s()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",r)}
995catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const r=setInterval(()=>this._autoRefreshTokenTick(),ry);this.autoRefreshTicker=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const r=this.autoRefreshTicker;this.autoRefreshTicker=null,r&&clearInterval(r);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}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 r=Date.now();try{return await this._useSession(async n=>{const{data:{session:i}}=n;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const a=Math.floor((i.expires_at*1e3-r)/ry);this._debug("#_autoRefreshTokenTick()",`access token expires in ${a} ticks, a tick lasts ${ry}ms, refresh threshold is ${PR} ticks`),a<=PR&&await this._callRefreshToken(i.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(r){if(r.isAcquireTimeout||r instanceof Hce)this._debug("auto refresh token tick lock not available");else throw r}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!_s()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(r){this._debug("#visibilityChangedCallback","error",r)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(r){console.error("_handleVisibilityChange",r)}}async _onVisibilityChanged(r){const n=`#_onVisibilityChanged(${r})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),r||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,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(r,n,i){const a=[`provider=${encodeURIComponent(n)}`];if(i!=null&&i.redirectTo&&a.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),i!=null&&i.scopes&&a.push(`scopes=${encodeURIComponent(i.scopes)}`),this.flowType==="pkce"){const[o,l]=await kx(this.storage,this.storageKey),c=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(l)}`});a.push(c.toString())}if(i!=null&&i.queryParams){const o=new URLSearchParams(i.queryParams);a.push(o.toString())}return i!=null&&i.skipBrowserRedirect&&a.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${r}?${a.join("&")}`}async _unenroll(r){try{return await this._useSession(async n=>{var i;const{data:a,error:o}=n;return o?this._returnResult({data:null,error:o}):await wr(this.fetch,"DELETE",`${this.url}/factors/${r.factorId}`,{headers:this.headers,jwt:(i=a==null?void 0:a.session)===null||i===void 0?void 0:i.access_token})})}catch(n){if(rr(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(r){try{return await this._useSession(async n=>{var i,a;const{data:o,error:l}=n;if(l)return this._returnResult({data:null,error:l});const c=Object.assign({friendly_name:r.friendlyName,factor_type:r.factorType},r.factorType==="phone"?{phone:r.phone}:r.factorType==="totp"?{issuer:r.issuer}:{}),{data:u,error:d}=await wr(this.fetch,"POST",`${this.url}/factors`,{body:c,headers:this.headers,jwt:(i=o==null?void 0:o.session)===null||i===void 0?void 0:i.access_token});return d?this._returnResult({data:null,error:d}):(r.factorType==="totp"&&u.type==="totp"&&(!((a=u==null?void 0:u.totp)===null||a===void 0)&&a.qr_code)&&(u.totp.qr_code=`data:image/svg+xml;utf-8,${u.totp.qr_code}`),this._returnResult({data:u,error:null}))})}catch(n){if(rr(n))return this._returnResult({data:null,error:n});throw n}}async _verify(r){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var i;const{data:a,error:o}=n;
995if(o)return this._returnResult({data:null,error:o});const l=Object.assign({challenge_id:r.challengeId},"webauthn"in r?{webauthn:Object.assign(Object.assign({},r.webauthn),{credential_response:r.webauthn.type==="create"?oPe(r.webauthn.credential_response):lPe(r.webauthn.credential_response)})}:{code:r.code}),{data:c,error:u}=await wr(this.fetch,"POST",`${this.url}/factors/${r.factorId}/verify`,{body:l,headers:this.headers,jwt:(i=a==null?void 0:a.session)===null||i===void 0?void 0:i.access_token});return u?this._returnResult({data:null,error:u}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+c.expires_in},c)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",c),this._returnResult({data:c,error:u}))})}catch(n){if(rr(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(r){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var i;const{data:a,error:o}=n;if(o)return this._returnResult({data:null,error:o});const l=await wr(this.fetch,"POST",`${this.url}/factors/${r.factorId}/challenge`,{body:r,headers:this.headers,jwt:(i=a==null?void 0:a.session)===null||i===void 0?void 0:i.access_token});if(l.error)return l;const{data:c}=l;if(c.type!=="webauthn")return{data:c,error:null};switch(c.webauthn.type){case"create":return{data:Object.assign(Object.assign({},c),{webauthn:Object.assign(Object.assign({},c.webauthn),{credential_options:Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:aPe(c.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},c),{webauthn:Object.assign(Object.assign({},c.webauthn),{credential_options:Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:sPe(c.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(rr(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(r){const{data:n,error:i}=await this._challenge({factorId:r.factorId});return i?this._returnResult({data:null,error:i}):await this._verify({factorId:r.factorId,challengeId:n.id,code:r.code})}async _listFactors(){var r;const{data:{user:n},error:i}=await this.getUser();if(i)return{data:null,error:i};const a={all:[],phone:[],totp:[],webauthn:[]};for(const o of(r=n==null?void 0:n.factors)!==null&&r!==void 0?r:[])a.all.push(o),o.status==="verified"&&a[o.factor_type].push(o);return{data:a,error:null}}async _getAuthenticatorAssuranceLevel(r){var n,i,a,o;if(r)try{const{payload:m}=gN(r);let A=null;m.aal&&(A=m.aal);let g=A;const{data:{user:y},error:x}=await this.getUser(r);if(x)return this._returnResult({data:null,error:x});((i=(n=y==null?void 0:y.factors)===null||n===void 0?void 0:n.filter(j=>j.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(g="aal2");const v=m.amr||[];return{data:{currentLevel:A,nextLevel:g,currentAuthenticationMethods:v},error:null}}catch(m){if(rr(m))return this._returnResult({data:null,error:m});throw m}const{data:{session:l},error:c}
995=await this.getSession();if(c)return this._returnResult({data:null,error:c});if(!l)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:u}=gN(l.access_token);let d=null;u.aal&&(d=u.aal);let h=d;((o=(a=l.user.factors)===null||a===void 0?void 0:a.filter(m=>m.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(h="aal2");const p=u.amr||[];return{data:{currentLevel:d,nextLevel:h,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;return a?this._returnResult({data:null,error:a}):i?await wr(this.fetch,"GET",`${this.url}/oauth/authorizations/${r}`,{headers:this.headers,jwt:i.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Cl})})}catch(n){if(rr(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(r,n){try{return await this._useSession(async i=>{const{data:{session:a},error:o}=i;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Cl});const l=await wr(this.fetch,"POST",`${this.url}/oauth/authorizations/${r}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"approve"},xform:c=>({data:c,error:null})});return l.data&&l.data.redirect_url&&_s()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(l.data.redirect_url),l})}catch(i){if(rr(i))return this._returnResult({data:null,error:i});throw i}}async _denyAuthorization(r,n){try{return await this._useSession(async i=>{const{data:{session:a},error:o}=i;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Cl});const l=await wr(this.fetch,"POST",`${this.url}/oauth/authorizations/${r}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"deny"},xform:c=>({data:c,error:null})});return l.data&&l.data.redirect_url&&_s()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(l.data.redirect_url),l})}catch(i){if(rr(i))return this._returnResult({data:null,error:i});throw i}}async _listOAuthGrants(){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?await wr(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Cl})})}catch(r){if(rr(r))return this._returnResult({data:null,error:r});throw r}}async _revokeOAuthGrant(r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;return a?this._returnResult({data:null,error:a}):i?(await wr(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,query:{client_id:r.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Cl})})}catch(n){if(rr(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(r,n={keys:[]}){let i=n.keys.find(c=>c.kid===r);if(i)return i;const a=Date.now();if(i=this.jwks.keys.find(c=>c.kid===r),i&&this.jwks_cached_at+A3e>a)return i;const{data:o,error:l}=await wr(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(l)throw l;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=a,i=o.keys.find(c=>c.kid===r),!i)?null:i}async getClaims(r,n={}){try{let i=r;if(!i){const{data:m,error:A}
995=await this.getSession();if(A||!m.session)return this._returnResult({data:null,error:A});i=m.session.access_token}const{header:a,payload:o,signature:l,raw:{header:c,payload:u}}=gN(i);n!=null&&n.allowExpired||D3e(o.exp);const d=!a.alg||a.alg.startsWith("HS")||!a.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(a.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!d){const{error:m}=await this.getUser(i);if(m)throw m;return{data:{claims:o,header:a,signature:l},error:null}}const h=M3e(a.alg),f=await crypto.subtle.importKey("jwk",d,h,!0,["verify"]);if(!await crypto.subtle.verify(h,f,l,C3e(`${c}.${u}`)))throw new OR("Invalid JWT signature");return{data:{claims:o,header:a,signature:l},error:null}}catch(i){if(rr(i))return this._returnResult({data:null,error:i});throw i}}}Q2.nextInstanceID={};const gPe=Q2,xPe="2.98.0";let nw="";typeof Deno<"u"?nw="deno":typeof document<"u"?nw="web":typeof navigator<"u"&&navigator.product==="ReactNative"?nw="react-native":nw="node";const yPe={"X-Client-Info":`supabase-js-${nw}/${xPe}`},vPe={headers:yPe},bPe={schema:"public"},wPe={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},jPe={};function H2(e){"@babel/helpers - typeof";return H2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},H2(e)}function _Pe(e,r){if(H2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(H2(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function CPe(e){var r=_Pe(e,"string");return H2(r)=="symbol"?r:r+""}function NPe(e,r,n){return(r=CPe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function TW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function na(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?TW(Object(n),!0).forEach(function(i){NPe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}const SPe=e=>e?(...r)=>e(...r):(...r)=>fetch(...r),kPe=()=>Headers,EPe=(e,r,n)=>{const i=SPe(n),a=kPe();return async(o,l)=>{var c;const u=(c=await r())!==null&&c!==void 0?c:e;let d=new a(l==null?void 0:l.headers);return d.has("apikey")||d.set("apikey",e),d.has("Authorization")||d.set("Authorization",`Bearer ${u}`),i(o,na(na({},l),{},{headers:d}))}};function BPe(e){return e.endsWith("/")?e:e+"/"}function TPe(e,r){var n,i;const{db:a,auth:o,realtime:l,global:c}=e,{db:u,auth:d,realtime:h,global:f}=r,p={db:na(na({},u),a),auth:na(na({},d),o),realtime:na(na({},h),l),storage:{},global:na(na(na({},f),c),{},{headers:na(na({},(n=f==null?void 0:f.headers)!==null&&n!==void 0?n:{}),(i=c==null?void 0:c.headers)!==null&&i!==void 0?i:{})}),accessToken:async()=>""};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function PPe(e){const r=e==null?void 0:e.trim();if(!r)throw new Error("supabaseUrl is required.");if(!r.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(BPe(r))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var IPe=class extends gPe{constructor(e){super(e)}},FPe=class{constructor(e,r,n){var i,a;this.supabaseUrl=e,this.supabaseKey=r;const o=PPe(e);if(!r)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const l=`sb-${o.hostname.split(".")[0]}-auth-token`,c={db:bPe,realtime:jPe,auth:na(na({},wPe),{},{storageKey:l}),global:vPe},u=TPe(n??{},c);if(this.storageKey=(i=u.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(a=u.global.headers)!==null&&a!==void 0?a:{},u.accessToken)this.accessToken=u.accessToken,this.auth=new Proxy({},{get:(h,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}});else{var d;this.auth=this._initSupabaseAuthClient((d=u.auth)!==null&&d!==void 0?d:{},this.headers,u.global.fetch)}this.fetch=EPe(r,this._getAccessToken.bind(this),u.global.fetch),this.realtime=this._initRealtimeClient(na({headers:this.headers,accessToken:this._getAccessToken.bind(this)},u.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(h=>this.realtime.setAuth(h)).catch(h=>console.warn("Failed to set initial Realtime auth token:",h)),this.rest=new xTe(new 
995URL("rest/v1",o).href,{headers:this.headers,schema:u.db.schema,fetch:this.fetch,timeout:u.db.timeout,urlLengthLimit:u.db.urlLengthLimit}),this.storage=new d3e(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),u.accessToken||this._listenForAuthEvents()}get functions(){return new uTe(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,r={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,r,n)}channel(e,r={config:{}}){return this.realtime.channel(e,r)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,r,n;if(e.accessToken)return await e.accessToken();const{data:i}=await e.auth.getSession();return(r=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&r!==void 0?r:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,userStorage:a,storageKey:o,flowType:l,lock:c,debug:u,throwOnError:d},h,f){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new IPe({url:this.authUrl.href,headers:na(na({},p),h),storageKey:o,autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,userStorage:a,flowType:l,lock:c,debug:u,throwOnError:d,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(m=>m.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new OTe(this.realtimeUrl.href,na(na({},e),{},{params:na(na({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,r)=>{this._handleTokenChanged(e,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(e,r,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const OPe=(e,r,n)=>new FPe(e,r,n);function LPe(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const r=e.version;if(r==null)return!1;const n=r.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}LPe()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const RPe="https://ahleagpvrcuwshrzzpkq.supabase.co",DPe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw",G=OPe(RPe,DPe,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),qce=w.createContext(void 0);function MPe({children:e}){const[r,n]=w.useState(null),[i,a]=w.useState(null),[o,l]=w.useState(!1),[c,u]=w.useState(!1),[d,h]=w.useState(!0),[f,p]=w.useState(!1),m=w.useCallback(async x=>{p(!0);try{const{data:b}=await G.from("user_roles").select("role").eq("user_id",x),v=(b||[]).map(j=>j.role);l(v.includes("admin")),u(v.includes("partner"))}catch{l(!1),u(!1)}finally{p(!1)}},[]);w.useEffect(()=>{const x=window.location.hash;if(x.includes("access_token")&&x.includes("refresh_token")){const b=new URLSearchParams(x.substring(1)),v=b.get("access_token"),j=b.get("refresh_token");v&&j&&G.auth.setSession({access_token:v,refresh_token:j}).then(()=>{window.history.replaceState(null,"",window.location.pathname+window.location.search)})}},[]),w.useEffect(()=>{let x=!0;const{data:{subscription:b}}=G.auth.onAuthStateChange(async(v,j)=>{var _,C;if(x){if(a(j),n((j==null?void 0:j.user)??null),j!=null&&j.user){if(m(j.user.id),v==="SIGNED_IN"){const N=((_=j.user.app_metadata)==null?void 0:_.provider)||"unknown";N!=="email"&&G.from("user_login_events").insert({user_id:j.user.id,email:j.user.email,method:N,success:!0,user_agent:navigator.userAgent}).then(()=>{});const S=new Date(j.user.created_at).getTime();if(Date.now()-S<5*60*1e3){const O=window.location.hostname.includes("eduweb.ai")?"en":"ro";G.functions.invoke("send-transactional-email",{body:{templateName:"welcome-eduweb",recipientEmail:j.user.email,idempotencyKey:`welcome-${j.user.id}`,templateData:{name:((C=j.user.user_metadata)==null?void 0:C.display_name)||void 0,lang:O}}}).catch(B=>console.warn("Welcome email send failed:",B))}}}else l(!1),u(!1),p(!1);h(!1)}});return G.auth.getSession().then(({data:{session:v}})=>{x&&(a(v),n((v==null?void 0:v.user)??null),v!=null&&v.user&&m(v.user.id),h(!1))}),()=>{x=!1,b.unsubscribe()}},[m]);const A=async(x,b)=>{const{error:v}=await G.auth.signInWithPassword({email:x,password:b}),j=navigator.userAgent;if(v)G.from("user_login_events").insert({email:x,method:"email",success:!1,error_message:v.message,user_agent:j}).then(()=>{});else{const{data:{user:_}}
995=await G.auth.getUser();_&&G.from("user_login_events").insert({user_id:_.id,email:x,method:"email",success:!0,user_agent:j}).then(()=>{})}return{error:v}},g=async(x,b,v)=>{const{error:j}=await G.auth.signUp({email:x,password:b,options:{emailRedirectTo:window.location.origin,data:{display_name:v}}});return{error:j}},y=async()=>{n(null),a(null),l(!1),u(!1),p(!1),await G.auth.signOut()};return s.jsx(qce.Provider,{value:{user:r,session:i,isAdmin:o,isPartner:c,loading:d,adminLoading:f,signIn:A,signUp:g,signOut:y},children:e})}function Fn(){const e=w.useContext(qce);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}const zPe={"nav.news":"Știri","nav.analysis":"Analize","nav.academy":"Academy","nav.account":"Cont","nav.crypto_hub":"Crypto Hub","nav.converter":"Convertor","nav.toggle_theme":"Schimbă tema","topic.web3":"Web3","topic.blockchain":"Blockchain","topic.nft":"NFT","topic.validare-nft":"Validare NFT","topic.ai":"AI & Agenți AI","topic.digital-marketing":"Marketing Digital","topic.e-learning":"E-Learning","topic_desc.web3":"Explorează fundamentele Web3: internet descentralizat, aplicații distribuite și noua economie digitală.","topic_desc.blockchain":"Înțelege tehnologia blockchain: de la mecanisme de consens la contracte inteligente și cazuri de utilizare reale.","topic_desc.nft":"Descoperă tokenurile non-fungibile: artă digitală, colecționabile, și noi modele de proprietate digitală.","topic_desc.validare-nft":"Învață procesele de validare și autentificare a NFT-urilor, verificarea proveniență și securitatea activelor digitale.","topic_desc.ai":"Inteligența artificială și agenții AI: de la modele de limbaj la automatizare inteligentă și aplicații practice.","topic_desc.digital-marketing":"Inovații în marketing digital: strategii Web3, comunități token-gated și noile canale de comunicare.","topic_desc.e-learning":"Tehnologii educaționale avansate: platforme adaptive, certificare blockchain și învățare personalizată.","hero.badge":"Platformă Educațională","hero.title_start":"Învață","hero.title_highlight":"Web3, AI & Crypto","hero.title_end":"pe înțelesul tuturor","hero.description":"Ghiduri, cursuri și analize verificate despre blockchain, AI și tehnologii digitale.","hero.description_bold":"De la concept la certificare.","hero.cta_start":"Începe cu bazele","hero.cta_academy":"Explorează cursurile","hero.cta_news":"Cele mai recente știri","hero.cta_analysis":"Analize AI","hero.stat_guides":"Ghiduri","hero.stat_glossary":"Termeni glosar","hero.stat_courses":"Cursuri Academy","hero.stat_topics":"Tematici","hero.stat_sources":"Surse verificate","hero.stat_daily":"Articole zilnic","footer.description":"Platforma ta de referință pentru educație Web3 și tehnologii digitale avansate în limba română.","footer.contact":"Contact","footer.sections":"Secțiuni","footer.topics":"Tematici","footer.analysis_ai":"Analize AI","footer.best_exchange":"Best Exchange Crypto","footer.glossary":"Glosar","footer.rights":"© 2026 EduWeb. Toate drepturile rezervate.","footer.disclaimer":"Conținut educațional • Nu constituie sfat financiar","newsletter.title":"Newsletter EduWeb","newsletter.subt
995itle":"Cele mai importante știri crypto & tech.","newsletter.placeholder":"Adresa ta de email","newsletter.subscribe":"Abonează-te","newsletter.success_title":"Te-ai abonat cu succes!","newsletter.success_desc":"Vei primi cele mai importante știri direct pe email.","newsletter.no_spam":"Fără spam. Dezabonare oricând.","newsletter.gdpr":"Sunt de acord cu prelucrarea datelor personale conform","newsletter.gdpr_link":"Politicii de Confidențialitate","newsletter.gdpr_suffix":". Pot să mă dezabonez oricând.","cookie.text":"Folosim cookies pentru analiză și reclame. Poți accepta sau refuza.","cookie.privacy":"Politica de confidențialitate","cookie.deny":"Refuz","cookie.accept":"Accept","auth.title_login":"Autentificare Admin","auth.title_signup":"Creare Cont","auth.display_name":"Nume afișat","auth.email":"Email","auth.password":"Parolă","auth.login":"Conectare","auth.signup":"Creare cont","auth.no_account":"Nu ai cont? Creează unul","auth.has_account":"Ai deja cont? Conectează-te","auth.error_login":"Eroare la autentificare","auth.error_signup":"Eroare la înregistrare","auth.account_created":"Cont creat!","auth.verify_email":"Verifică-ți emailul pentru confirmare.","protected.restricted":"Acces restricționat","protected.admin_required":"Ai nevoie de rol de administrator.","common.loading":"Se încarcă...","common.read_more":"Citește mai mult","common.back":"Înapoi","common.save":"Salvează","common.delete":"Șterge","common.edit":"Editează","common.cancel":"Anulează","common.search":"Caută","common.not_found":"Pagina nu a fost găsită","common.all":"Toate","common.read":"Citește","common.discover":"Descoperă","common.explore":"Explorează","common.view_all":"Toate","mobile.crypto":"Crypto","home.tagline_prefix":"Navigăm spre","home.tagline_highlight":"era Web3","home.tagline_suffix":"— descentralizat · transparent · al tău","home.binance_cta":"Tranzacționează crypto pe Binance","home.binance_desc":"— Comisioane de la 0% · 350+ monede disponibile","home.binance_button":"Începe acum →","home.latest_news":"Ultimele știri","home.recommended":"Articole recomandate","home.loading_articles":"Se încarcă articolele...","home.no_articles":"Nu există încă articole publicate.","home.learn_deeper":"Vrei să înveți mai profund?","home.learn_deeper_desc":"Explorează cursurile EduWeb pentru a-ți aprofunda cunoștințele în Web3, blockchain, AI și tehnologii digitale.","home.discover_courses":"Descoperă cursurile EduWeb","home.most_read":"Cele mai citite","home.most_read_hint":"După ce înțelegi bazele, explorează cele mai importante subiecte","home.latest_news_title":"Ultimele știri din Web3, AI și blockchain","home.latest_news_desc":"Vezi cele mai noi articole și analize din industrie","home.start_here":"Începe de aici","home.start_here_desc":"Ghiduri complete, scrise pe înțelesul tuturor. Alege un subiect și începe să înveți.","home.start_here_hint":"👉 Dacă ești la început, începe cu aceste concepte","home.learning_path_title":"Urmează acest parcurs recomandat","home.learning_path_desc":"Un parcurs logic de învățare, de la noțiuni de bază la cursuri aprofundate.","home.step_understand":"Înțelege conceptul","home.step_understand_desc":'Citește ghidurile „Ce este?" pentru bazele fiecărui subiect.',"home.step_read":"Citește articole","home.step_read_desc":"Aprofundează cu știri și analize actuale.","home.step_glossary":"Verifică termenii","home.step_glossary_desc":"Folosește glosarul pentru a clarifica orice concept.","home.step_course":"Urmează un curs","home.step_course_desc":"Certifică-ți cunoștințele cu cursurile Academy.","home.step_practice":"Exersează","home.step_practice_desc":"Practică într-un sandbox sigur cu simulări Web3 interactive.","home.academy_title":"EduWeb Academy","home.academy_desc":"Ai înțeles conceptele? Mergi mai departe cu un curs structurat.","home.academy_cta":"Explorează cursurile","home.articles_title":"Învață din actualitate","home.articles_desc":"Știri și analize despre Web3, AI, blockchain și marketing digital, selectate pentru a te ajuta să înțelegi ce contează cu adevărat. Nu doar ce se întâmplă, ci de ce contează și cum se leagă de viitorul tehnologiei.","news.meta_desc":"Știri verificate editorial și analize AI despre blockchain, Web3 și inteligență artificială. Resurse educaționale actualizate zilnic pe EduWeb.","home.read_guide":"Citește ghidul","home.learn_deeper_transition":"Ai parcurs ghidurile și știrile? Certifică-ți cunoștințele.","topicgrid.title":"Explorează pe tematici","topicgrid.subtitle":"Alege un domeniu de interes și descoperă conținut educațional curated.","news.title":"Știri","news.subtitle":"Cele mai recente știri educaționale din lumea Web3 și tech.","news.search_placeholder":"Caută articole...","news.no_results":"Nu s-au găsit articole.","news.more_news":"Mai multe știri","news.crypto_hub_title":"Crypto Hub — Prețuri live & Analize zilnice","news.crypto_hub_desc":"BTC, ETH, SOL, BNB și alte 7 monede · Grafice 7 zile · Sumare AI · Convertor RON","news.analysis_title":"Analize editoriale aprofundate","news.analysis_desc":"Perspective expert pe piață, tendințe tech și contexte macro · Actualizate zilnic","news.read_analysis":"Citește analizele","news.explore_academy_title":"Explorează EduWeb Academy","news.explore_academy_desc":"Descoperă cursuri despre AI, blockchain, Web3 și multe altele. Începe să înveți astăzi.","news.explore_academy_btn":"Explorează Academy","news.time_minutes_ago":"acum câteva minute","news.time_hours_ago":"acum {h}h","news.time_days_ago":"acum {d}z","podcast.archive_title":"EduWeb Daily — Arhivă Podcast","podcast.archive_desc":"Toate episoadele zilnice, generate automat din cele mai importante știri tech.","binance.trade_on":"Tranzacționează pe Binance","binance.create_free":"Creează cont gratuit","binance.create_free_desc":"Creează cont gratuit — cea mai mare bursă crypto din lume","binance.sidebar_desc":"Cumpără și vinde criptomonede pe cea mai mare bursă din lume. Comisioane reduse, 350+ monede.","binance.register":"Înregistrare","crypto.trend_live":"Crypto Trend Live","difficulty.începător":"Începător","difficulty.intermediar":"Intermediar","difficulty.avansat":"Avansat","ad.advertisement":"PUBLICITATE","ad.sponsored":"SPONSORIZAT","footer.terms":"Termeni și Condiții","footer.privacy":"Politica de Confidențialitate"},UPe={"nav.news":"News","nav.analysis":"Analysis","nav.academy":"Academy","nav.account":"Account","nav.crypto_hub":"Crypto Hub","nav.converter":"Converter","nav.toggle_theme":"Toggle theme","topic.web3":"Web3","topic.blockchain":"Blockchain","topic.nft":"NFT","topic.validare-nft":"NFT Validation","topic.ai":"AI & AI Agents","topic.digital-marketing":"Digital Marketing","topic.e-learning":"E-Learning","topic_desc.web3":"Explore Web3 fundamentals: decentralized internet, distributed a
995pplications and the new digital economy.","topic_desc.blockchain":"Understand blockchain technology: from consensus mechanisms to smart contracts and real-world use cases.","topic_desc.nft":"Discover non-fungible tokens: digital art, collectibles, and new models of digital ownership.","topic_desc.validare-nft":"Learn NFT validation and authentication processes, provenance verification and digital asset security.","topic_desc.ai":"Artificial intelligence and AI agents: from language models to intelligent automation and practical applications.","topic_desc.digital-marketing":"Digital marketing innovations: Web3 strategies, token-gated communities and new communication channels.","topic_desc.e-learning":"Advanced educational technologies: adaptive platforms, blockchain certification and personalized learning.","hero.badge":"Educational Platform","hero.title_start":"Learn","hero.title_highlight":"Web3, AI & Crypto","hero.title_end":"made simple","hero.description":"Guides, courses and verified analysis about blockchain, AI and digital technologies.","hero.description_bold":"From concept to certification.","hero.cta_start":"Start with the basics","hero.cta_academy":"Explore courses","hero.cta_news":"Latest news","hero.cta_analysis":"AI Analysis","hero.stat_guides":"Guides","hero.stat_glossary":"Glossary terms","hero.stat_courses":"Academy courses","hero.stat_topics":"Topics","hero.stat_sources":"Verified sources","hero.stat_daily":"Daily articles","footer.description":"Your reference platform for Web3 education and advanced digital technologies.","footer.contact":"Contact","footer.sections":"Sections","footer.topics":"Topics","footer.analysis_ai":"AI Analysis","footer.best_exchange":"Best Crypto Exchanges","footer.glossary":"Glossary","footer.rights":"© 2026 EduWeb. All rights reserved.","footer.disclaimer":"Educational content • Not financial advice","newsletter.title":"EduWeb Newsletter","newsletter.subt
995itle":"The most important crypto & tech news.","newsletter.placeholder":"Your email address","newsletter.subscribe":"Subscribe","newsletter.success_title":"Successfully subscribed!","newsletter.success_desc":"You will receive the most important news directly in your inbox.","newsletter.no_spam":"No spam. Unsubscribe anytime.","newsletter.gdpr":"I agree to the processing of personal data according to the","newsletter.gdpr_link":"Privacy Policy","newsletter.gdpr_suffix":". I can unsubscribe at any time.","cookie.text":"We use cookies for analytics and ads. You can accept or decline.","cookie.privacy":"Privacy Policy","cookie.deny":"Decline","cookie.accept":"Accept","auth.title_login":"Admin Login","auth.title_signup":"Create Account","auth.display_name":"Display name","auth.email":"Email","auth.password":"Password","auth.login":"Log in","auth.signup":"Create account","auth.no_account":"Don't have an account? Create one","auth.has_account":"Already have an account? Log in","auth.error_login":"Login error","auth.error_signup":"Sign up error","auth.account_created":"Account created!","auth.verify_email":"Check your email for confirmation.","protected.restricted":"Access restricted","protected.admin_required":"You need an administrator role.","common.loading":"Loading...","common.read_more":"Read more","common.back":"Back","common.save":"Save","common.delete":"Delete","common.edit":"Edit","common.cancel":"Cancel","common.search":"Search","common.not_found":"Page not found","common.all":"All","common.read":"Read","common.discover":"Discover","common.explore":"Explore","common.view_all":"All","mobile.crypto":"Crypto","home.tagline_prefix":"Navigating toward","home.tagline_highlight":"the Web3 era","home.tagline_suffix":"— decentralized · transparent · yours","home.binance_cta":"Trade crypto on Binance","home.binance_desc":"— Fees from 0% · 350+ coins available","home.binance_button":"Start now →","home.latest_news":"Latest news","home.recommended":"Recommended articles","home.loading_articles":"Loading articles...","home.no_articles":"No published articles yet.","home.learn_deeper":"Want to learn deeper?","home.learn_deeper_desc":"Explore EduWeb courses to deepen your knowledge in Web3, blockchain, AI and digital technologies.","home.discover_courses":"Discover EduWeb courses","home.most_read":"Most read","home.most_read_hint":"After understanding the basics, explore the most important topics","home.latest_news_title":"Latest news from Web3, AI and blockchain","home.latest_news_desc":"See the newest articles and analysis from the industry","home.start_here":"Start here","home.start_here_desc":"Complete guides written for everyone. Pick a topic and start learning.","home.start_here_hint":"👉 If you're new, start with these concepts","home.learning_path_title":"Follow this recommended path","home.learning_path_desc":"A logical learning path, from basics to in-depth courses.","home.step_understand":"Understand the concept","home.step_understand_desc":'Read the "What is?" guides for the basics of each topic.',"home.step_read":"Read articles","home.step_read_desc":"Go deeper with current news and analysis.","home.step_glossary":"Check the terms","home.step_glossary_desc":"Use the glossary to clarify any concept.","home.step_course":"Take a course","home.step_course_desc":"Certify your knowledge with Academy courses.","home.step_practice":"Practice","home.step_practice_desc":"Practice in a safe sandbox with interactive Web3 simulations.","home.academy_title":"EduWeb Academy","home.academy_desc":"Understood the concepts? Go further with a structured course.","home.academy_cta":"Explore courses","home.articles_title":"Learn from the news","home.articles_desc":"News and analysis on Web3, AI, blockchain and digital marketing, curated to help you understand what truly matters. Not just what's happening, but why it matters and how it connects to the future of technology.","news.meta_desc":"Editorially verified news and AI analysis on blockchain, Web3 and artificial intelligence. Daily updated educational resources on EduWeb.","home.read_guide":"Read the guide","home.learn_deeper_transition":"Covered the guides and news? Certify your knowledge.","topicgrid.title":"Explore by topic","topicgrid.subtitle":"Choose a field of interest and discover curated educational content.","news.title":"News","news.subtitle":"Latest educational news from the Web3 and tech world.","news.search_placeholder":"Search articles...","news.no_results":"No articles found.","news.more_news":"More news","news.crypto_hub_title":"Crypto Hub — Live Prices & Daily Analysis","news.crypto_hub_desc":"BTC, ETH, SOL, BNB and 7 more coins · 7-day charts · AI summaries · Converter","news.analysis_title":"In-depth editorial analysis","news.analysis_desc":"Expert market perspectives, tech trends and macro context · Updated daily","news.read_analysis":"Read analysis","news.explore_academy_title":"Explore EduWeb Academy","news.explore_academy_desc":"Discover courses on AI, blockchain, Web3, and more. Start learning today.","news.explore_academy_btn":"Explore Academy","news.time_minutes_ago":"a few minutes ago","news.time_hours_ago":"{h}h ago","news.time_days_ago":"{d}d ago","podcast.archive_title":"EduWeb Daily — Podcast Archive","podcast.archive_desc":"All daily episodes, auto-generated from the most important tech news.","binance.trade_on":"Trade on Binance","binance.create_free":"Create free account","binance.create_free_desc":"Create free account — the world's largest crypto exchange","binance.sidebar_desc":"Buy and sell cryptocurrencies on the world's largest exch
995ange. Low fees, 350+ coins.","binance.register":"Sign up","crypto.trend_live":"Crypto Trend Live","difficulty.începător":"Beginner","difficulty.intermediar":"Intermediate","difficulty.avansat":"Advanced","ad.advertisement":"ADVERTISEMENT","ad.sponsored":"SPONSORED","footer.terms":"Terms of Service","footer.privacy":"Privacy Policy"},PW={ro:zPe,en:UPe},Kce=w.createContext(void 0);function $Pe(){return typeof window>"u"?"ro":window.location.hostname.includes("eduweb.ai")?"en":"ro"}function QPe({children:e}){const r=w.useMemo($Pe,[]),n=i=>PW[r][i]??PW.ro[i]??i;return s.jsx(Kce.Provider,{value:{lang:r,t:n},children:e})}function Pt(){const e=w.useContext(Kce);if(!e)throw new Error("useLanguage must be used within LanguageProvider");return e}function vr({children:e,requireAdmin:r=!1,requirePartner:n=!1}){const{user:i,isAdmin:a,isPartner:o,loading:l,adminLoading:c}=Fn();return l||c?s.jsx("div",{className:"flex items-center justify-center min-h-screen bg-background",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):i?r&&!a?s.jsx("div",{className:"flex items-center justify-center min-h-screen bg-background",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"font-heading text-2xl font-bold mb-2",children:"Acces restricționat"}),s.jsx("p",{className:"text-muted-foreground",children:"Ai nevoie de rol de administrator."})]})}):n&&!o&&!a?s.jsx("div",{className:"flex items-center justify-center min-h-screen bg-background",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"font-heading text-2xl font-bold mb-2",children:"Acces restricționat"}),s.jsx("p",{className:"text-muted-foreground",children:"Ai nevoie de rol de partener."})]})}):s.jsx(s.Fragment,{children:e}):s.jsx(xd,{to:"/auth",replace:!0})}var HPe=w.createContext(void 0);function q0(e){const r=w.useContext(HPe);return e||r||"ltr"}var cI=0;function m8(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??IW()),document.body.insertAdjacentElement("beforeend",e[1]??IW()),cI++,()=>{cI===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),cI--}},[])}function IW(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var uI="focusScope.autoFocusOnMount",dI="focusScope.autoFocusOnUnmount",FW={bubbles:!1,cancelable:!0},VPe="FocusScope",S4=w.forwardRef((e,r)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[c,u]=w.useState(null),d=To(a),h=To(o),f=w.useRef(null),p=Mr(r,g=>u(g)),m=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(i){let g=function(v){if(m.paused||!c)return;const j=v.target;c.contains(j)?f.current=j:Gf(f.current,{select:!0})},y=function(v){if(m.paused||!c)return;const j=v.relatedTarget;j!==null&&(c.contains(j)||Gf(f.current,{select:!0}))},x=function(v){if(document.activeElement===document.body)for(const _ of v)_.removedNodes.length>0&&Gf(c)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const b=new MutationObserver(x);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),b.disconnect()}}},[i,c,m.paused]),w.useEffect(()=>{if(c){LW.add(m);const g=document.activeElement;if(!c.contains(g)){const x=new CustomEvent(uI,FW);c.addEventListener(uI,d),c.dispatchEvent(x),x.defaultPrevented||(WPe(YPe(Gce(c)),{select:!0}),document.activeElement===g&&Gf(c))}return()=>{c.removeEventListener(uI,d),setTimeout(()=>{const x=new CustomEvent(dI,FW);c.addEventListener(dI,h),c.dispatchEvent(x),x.defaultPrevented||Gf(g??document.body,{select:!0}),c.removeEventListener(dI,h),LW.remove(m)},0)}}},[c,d,h,m]);const A=w.useCallback(g=>{if(!n&&!i||m.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(y&&x){const b=g.currentTarget,[v,j]=qPe(b);v&&j?!g.shiftKey&&x===j?(g.preventDefault(),n&&Gf(v,{select:!0})):g.shiftKey&&x===v&&(g.preventDefault(),n&&Gf(j,{select:!0})):x===b&&g.preventDefault()}},[n,i,m.paused]);return s.jsx(Rt.div,{tabIndex:-1,...l,ref:p,onKeyDown:A})});S4.displayName=VPe;function WPe(e,{select:r=!1}={}){const n=document.activeElement;for(const i of e)if(Gf(i,{select:r}),document.activeElement!==n)return}function qPe(e){const r=Gce(e),n=OW(r,e),i=OW(r.reverse(),e);return[n,i]}function Gce(e){const r=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const a=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||a?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)r.push(n.currentNode);return r}function OW(e,r){for(const n of e)if(!KPe(n,{upTo:r}))return n}function KPe(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function GPe(e){return e instanceof HTMLInputElement&&"select"in e}function Gf(e,{select:r=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&GPe(e)&&r&&e.select()}}var LW=XPe();function XPe(){let e=[];return{add(r){const n=e[0];r!==n&&(n==null||n.pause()),e=RW(e,r),e.unshift(r)},remove(r){var n;e=RW(e,r),(n=e[0])==null||n.resume()}}}function RW(e,r){const n=[...e],i=n.indexOf(r);return i!==-1&&n.splice(i,1),n}function YPe(e){return e.filter(r=>r.tagName!=="A")}var hI="rovingFocusGroup.onEntryFocus",JPe={bubbles:!1,cancelable:!0},w_="RovingFocusGroup",[LR,Xce,ZPe]=p_(w_),[eIe,K0]=rs(w_,[ZPe]),[tIe,rIe]=eIe(w_),Yce=w.forwardRef((e,r)=>s.jsx(LR.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(LR.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(nIe,{...e,ref:r})})}));
vendor: 5,852 bytes, line 995
995Yce.displayName=w_;var nIe=w.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:a=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...f}=e,p=w.useRef(null),m=Mr(r,p),A=q0(o),[g,y]=nl({prop:l,defaultProp:c??null,onChange:u,caller:w_}),[x,b]=w.useState(!1),v=To(d),j=Xce(n),_=w.useRef(!1),[C,N]=w.useState(0);return w.useEffect(()=>{const S=p.current;if(S)return S.addEventListener(hI,v),()=>S.removeEventListener(hI,v)},[v]),s.jsx(tIe,{scope:n,orientation:i,dir:A,loop:a,currentTabStopId:g,onItemFocus:w.useCallback(S=>y(S),[y]),onItemShiftTab:w.useCallback(()=>b(!0),[]),onFocusableItemAdd:w.useCallback(()=>N(S=>S+1),[]),onFocusableItemRemove:w.useCallback(()=>N(S=>S-1),[]),children:s.jsx(Rt.div,{tabIndex:x||C===0?-1:0,"data-orientation":i,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:bt(e.onMouseDown,()=>{_.current=!0}),onFocus:bt(e.onFocus,S=>{const E=!_.current;if(S.target===S.currentTarget&&E&&!x){const O=new CustomEvent(hI,JPe);if(S.currentTarget.dispatchEvent(O),!O.defaultPrevented){const B=j().filter(L=>L.focusable),T=B.find(L=>L.active),F=B.find(L=>L.id===g),D=[T,F,...B].filter(Boolean).map(L=>L.ref.current);eue(D,h)}}_.current=!1}),onBlur:bt(e.onBlur,()=>b(!1))})})}),Jce="RovingFocusGroupItem",Zce=w.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:a=!1,tabStopId:o,children:l,...c}=e,u=Ul(),d=o||u,h=rIe(Jce,n),f=h.currentTabStopId===d,p=Xce(n),{onFocusableItemAdd:m,onFocusableItemRemove:A,currentTabStopId:g}=h;return w.useEffect(()=>{if(i)return m(),()=>A()},[i,m,A]),s.jsx(LR.ItemSlot,{scope:n,id:d,focusable:i,active:a,children:s.jsx(Rt.span,{tabIndex:f?0:-1,"data-orientation":h.orientation,...c,ref:r,onMouseDown:bt(e.onMouseDown,y=>{i?h.onItemFocus(d):y.preventDefault()}),onFocus:bt(e.onFocus,()=>h.onItemFocus(d)),onKeyDown:bt(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){h.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const x=sIe(y,h.orientation,h.dir);if(x!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let v=p().filter(j=>j.focusable).map(j=>j.ref.current);if(x==="last")v.reverse();else if(x==="prev"||x==="next"){x==="prev"&&v.reverse();const j=v.indexOf(y.currentTarget);v=h.loop?oIe(v,j+1):v.slice(j+1)}setTimeout(()=>eue(v))}}),children:typeof l=="function"?l({isCurrentTabStop:f,hasTabStop:g!=null}):l})})});Zce.displayName=Jce;var iIe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function aIe(e,r){return r!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function sIe(e,r,n){const i=aIe(e.key,n);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return iIe[i]}function eue(e,r=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:r}),document.activeElement!==n))return}function oIe(e,r){return e.map((n,i)=>e[(r+i)%e.length])}var p8=Yce,A8=Zce,lIe=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},Tx=new WeakMap,xN=new WeakMap,yN={},fI=0,tue=function(e){return e&&(e.host||tue(e.parentNode))},cIe=function(e,r){return r.map(function(n){if(e.contains(n))return n;var i=tue(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},uIe=function(e,r,n,i){var a=cIe(r,Array.isArray(e)?e:[e]);yN[n]||(yN[n]=new WeakMap);var o=yN[n],l=[],c=new Set,u=new Set(a),d=function(f){!f||c.has(f)||(c.add(f),d(f.parentNode))};a.forEach(d);var h=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(p){if(c.has(p))h(p);else try{var m=p.getAttribute(i),A=m!==null&&m!=="false",g=(Tx.get(p)||0)+1,y=(o.get(p)||0)+1;Tx.set(p,g),o.set(p,y),l.push(p),g===1&&A&&xN.set(p,!0),y===1&&p.setAttribute(n,"true"),A||p.setAttribute(i,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return h(r),c.clear(),fI++,function(){l.forEach(function(f){var p=Tx.get(f)-1,m=o.get(f)-1;Tx.set(f,p),o.set(f,m),p||(xN.has(f)||f.removeAttribute(i),xN.delete(f)),m||f.removeAttribute(n)}),fI--,fI||(Tx=new WeakMap,Tx=new WeakMap,xN=new WeakMap,yN={})}},g8=function(e,r,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),a=lIe(e);return a?(i.push.apply(i,Array.from(a.querySelectorAll("[aria-live]"))),uIe(i,a,n,"aria-hidden")):function(){return null}},ok="right-scroll-bar-position",lk="width-before-scroll-bar",dIe="with-scroll-bars-hidden",hIe="--removed-body-scroll-bar-size";function mI(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function fIe(e,r){var n=w.useState(function(){return{value:e,callback:r,facade:{get current(){return n.value},set current(i){var a=n.value;a!==i&&(n.value=i,n.callback(i,a))}}}})[0];return n.callback=r,n.facade}var mIe=typeof window<"u"?w.useLayoutEffect:w.useEffect,DW=new WeakMap;function pIe(e,r){var n=fIe(null,function(i){return e.forEach(function(a){return mI(a,i)})});return mIe(function(){var i=DW.get(n);if(i){var a=new Set(i),o=new Set(e),l=n.current;a.forEach(function(c){o.has(c)||mI(c,null)}),o.forEach(function(c){a.has(c)||mI(c,l)})}DW.set(n,e)},[e]),n}function AIe(e){return e}function gIe(e,r){r===void 0&&(r=AIe);var n=[],i=!1,a={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=r(o,i);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(i=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){i=!0;var l=[];
vendor: 5,189 bytes, lines 995-1032
995if(n.length){var c=n;n=[],c.forEach(o),l=n}var u=function(){var h=l;l=[],h.forEach(o)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(h){l.push(h),d()},filter:function(h){return l=l.filter(h),n}}}};return a}function xIe(e){e===void 0&&(e={});var r=gIe(null);return r.options=hd({async:!0,ssr:!1},e),r}var rue=function(e){var r=e.sideCar,n=V0(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return w.createElement(i,hd({},n))};rue.isSideCarExport=!0;function yIe(e,r){return e.useMedium(r),rue}var nue=xIe(),pI=function(){},k4=w.forwardRef(function(e,r){var n=w.useRef(null),i=w.useState({onScrollCapture:pI,onWheelCapture:pI,onTouchMoveCapture:pI}),a=i[0],o=i[1],l=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,h=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,A=e.noIsolation,g=e.inert,y=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,v=e.gapMode,j=V0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=p,C=pIe([n,r]),N=hd(hd({},j),a);return w.createElement(w.Fragment,null,h&&w.createElement(_,{sideCar:nue,removeScrollBar:d,shards:f,noRelative:m,noIsolation:A,inert:g,setCallbacks:o,allowPinchZoom:!!y,lockRef:n,gapMode:v}),l?w.cloneElement(w.Children.only(c),hd(hd({},N),{ref:C})):w.createElement(b,hd({},N,{className:u,ref:C}),c))});k4.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};k4.classNames={fullWidth:lk,zeroRight:ok};var vIe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bIe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=vIe();return r&&e.setAttribute("nonce",r),e}function wIe(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function jIe(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var _Ie=function(){var e=0,r=null;return{add:function(n){e==0&&(r=bIe())&&(wIe(r,n),jIe(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},CIe=function(){var e=_Ie();return function(r,n){w.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&n])}},iue=function(){var e=CIe(),r=function(n){var i=n.styles,a=n.dynamic;return e(i,a),null};return r},NIe={left:0,top:0,right:0,gap:0},AI=function(e){return parseInt(e||"",10)||0},SIe=function(e){var r=window.getComputedStyle(document.body),n=r[e==="padding"?"paddingLeft":"marginLeft"],i=r[e==="padding"?"paddingTop":"marginTop"],a=r[e==="padding"?"paddingRight":"marginRight"];return[AI(n),AI(i),AI(a)]},kIe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return NIe;var r=SIe(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-n+r[2]-r[0])}},EIe=iue(),Jy="data-scroll-locked",BIe=function(e,r,n,i){var a=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
996  .`.concat(dIe,` {
997   overflow: hidden `).concat(i,`;
998   padding-right: `).concat(c,"px ").concat(i,`;
999  }
1000  body[`).concat(Jy,`] {
1001    overflow: hidden `).concat(i,`;
1002    overscroll-behavior: contain;
1003    `).concat([r&&"position: relative ".concat(i,";"),n==="margin"&&`
1004    padding-left: `.concat(a,`px;
1005    padding-top: `).concat(o,`px;
1006    padding-right: `).concat(l,`px;
1007    margin-left:0;
1008    margin-top:0;
1009    margin-right: `).concat(c,"px ").concat(i,`;
1010    `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
1011  }
1012  
1013  .`).concat(ok,` {
1014    right: `).concat(c,"px ").concat(i,`;
1015  }
1016  
1017  .`).concat(lk,` {
1018    margin-right: `).concat(c,"px ").concat(i,`;
1019  }
1020  
1021  .`).concat(ok," .").concat(ok,` {
1022    right: 0 `).concat(i,`;
1023  }
1024  
1025  .`).concat(lk," .").concat(lk,` {
1026    margin-right: 0 `).concat(i,`;
1027  }
1028  
1029  body[`).concat(Jy,`] {
1030    `).concat(hIe,": ").concat(c,`px;
1031  }
1032`)},MW=function(){var e=parseInt(document.body.getAttribute(Jy)||"0",10);return isFinite(e)?e:0},TIe=function(){w.useEffect(function(){return document.body.setAttribute(Jy,(MW()+1).toString()),function(){var e=MW()-1;e<=0?document.body.removeAttribute(Jy):document.body.setAttribute(Jy,e.toString())}},[])},PIe=function(e){var r=e.noRelative,n=e.noImportant,i=e.gapMode,a=i===void 0?"margin":i;TIe();var o=w.useMemo(function(){return kIe(a)},[a]);return w.createElement(EIe,{styles:BIe(o,!r,a,n?"":"!important")})},RR=!1;if(typeof window<"u")try{var vN=Object.defineProperty({},"passive",{get:function(){return RR=!0,!0}});window.addEventListener("test",vN,vN),window.removeEventListener("test",vN,vN)}catch{RR=!1}var Px=RR?{passive:!1}:!1,IIe=function(e){return e.tagName==="TEXTAREA"},aue=function(e,r){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[r]!=="hidden"&&!(n.overflowY===n.overflowX&&!IIe(e)&&n[r]==="visible")},FIe=function(e){return aue(e,"overflowY")},OIe=function(e){return aue(e,"overflowX")},zW=function(e,r){var n=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var a=sue(e,i);if(a){var o=oue(e,i),l=o[1],c=o[2];
vendor: 4,093 bytes, lines 1032-1035
1032if(l>c)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},LIe=function(e){var r=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[r,n,i]},RIe=function(e){var r=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[r,n,i]},sue=function(e,r){return e==="v"?FIe(r):OIe(r)},oue=function(e,r){return e==="v"?LIe(r):RIe(r)},DIe=function(e,r){return e==="h"&&r==="rtl"?-1:1},MIe=function(e,r,n,i,a){var o=DIe(e,window.getComputedStyle(r).direction),l=o*i,c=n.target,u=r.contains(c),d=!1,h=l>0,f=0,p=0;do{if(!c)break;var m=oue(e,c),A=m[0],g=m[1],y=m[2],x=g-y-o*A;(A||x)&&sue(e,c)&&(f+=x,p+=A);var b=c.parentNode;c=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!u&&c!==document.body||u&&(r.contains(c)||r===c));return(h&&(Math.abs(f)<1||!a)||!h&&(Math.abs(p)<1||!a))&&(d=!0),d},bN=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},UW=function(e){return[e.deltaX,e.deltaY]},$W=function(e){return e&&"current"in e?e.current:e},zIe=function(e,r){return e[0]===r[0]&&e[1]===r[1]},UIe=function(e){return`
1033  .block-interactivity-`.concat(e,` {pointer-events: none;}
1034  .allow-interactivity-`).concat(e,` {pointer-events: all;}
1035`)},$Ie=0,Ix=[];function QIe(e){var r=w.useRef([]),n=w.useRef([0,0]),i=w.useRef(),a=w.useState($Ie++)[0],o=w.useState(iue)[0],l=w.useRef(e);w.useEffect(function(){l.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=oTe([e.lockRef.current],(e.shards||[]).map($W),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=w.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!l.current.allowPinchZoom;var x=bN(g),b=n.current,v="deltaX"in g?g.deltaX:b[0]-x[0],j="deltaY"in g?g.deltaY:b[1]-x[1],_,C=g.target,N=Math.abs(v)>Math.abs(j)?"h":"v";if("touches"in g&&N==="h"&&C.type==="range")return!1;var S=zW(N,C);if(!S)return!0;if(S?_=N:(_=N==="v"?"h":"v",S=zW(N,C)),!S)return!1;if(!i.current&&"changedTouches"in g&&(v||j)&&(i.current=_),!_)return!0;var E=i.current||_;return MIe(E,y,g,E==="h"?v:j,!0)},[]),u=w.useCallback(function(g){var y=g;if(!(!Ix.length||Ix[Ix.length-1]!==o)){var x="deltaY"in y?UW(y):bN(y),b=r.current.filter(function(_){return _.name===y.type&&(_.target===y.target||y.target===_.shadowParent)&&zIe(_.delta,x)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var v=(l.current.shards||[]).map($W).filter(Boolean).filter(function(_){return _.contains(y.target)}),j=v.length>0?c(y,v[0]):!l.current.noIsolation;j&&y.cancelable&&y.preventDefault()}}},[]),d=w.useCallback(function(g,y,x,b){var v={name:g,delta:y,target:x,should:b,shadowParent:HIe(x)};r.current.push(v),setTimeout(function(){r.current=r.current.filter(function(j){return j!==v})},1)},[]),h=w.useCallback(function(g){n.current=bN(g),i.current=void 0},[]),f=w.useCallback(function(g){d(g.type,UW(g),g.target,c(g,e.lockRef.current))},[]),p=w.useCallback(function(g){d(g.type,bN(g),g.target,c(g,e.lockRef.current))},[]);w.useEffect(function(){return Ix.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Px),document.addEventListener("touchmove",u,Px),document.addEventListener("touchstart",h,Px),function(){Ix=Ix.filter(function(g){return g!==o}),document.removeEventListener("wheel",u,Px),document.removeEventListener("touchmove",u,Px),document.removeEventListener("touchstart",h,Px)}},[]);var m=e.removeScrollBar,A=e.inert;return w.createElement(w.Fragment,null,A?w.createElement(o,{styles:UIe(a)}):null,m?w.createElement(PIe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function HIe(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const VIe=yIe(nue,QIe);var E4=w.forwardRef(function(e,r){return w.createElement(k4,hd({}
vendor: 15,303 bytes, line 1035
1035,e,{ref:r,sideCar:VIe}))});E4.classNames=k4.classNames;var DR=["Enter"," "],WIe=["ArrowDown","PageUp","Home"],lue=["ArrowUp","PageDown","End"],qIe=[...WIe,...lue],KIe={ltr:[...DR,"ArrowRight"],rtl:[...DR,"ArrowLeft"]},GIe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},j_="Menu",[V2,XIe,YIe]=p_(j_),[Ug,cue]=rs(j_,[YIe,z0,K0]),B4=z0(),uue=K0(),[JIe,$g]=Ug(j_),[ZIe,__]=Ug(j_),due=e=>{const{__scopeMenu:r,open:n=!1,children:i,dir:a,onOpenChange:o,modal:l=!0}=e,c=B4(r),[u,d]=w.useState(null),h=w.useRef(!1),f=To(o),p=q0(a);return w.useEffect(()=>{const m=()=>{h.current=!0,document.addEventListener("pointerdown",A,{capture:!0,once:!0}),document.addEventListener("pointermove",A,{capture:!0,once:!0})},A=()=>h.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",A,{capture:!0}),document.removeEventListener("pointermove",A,{capture:!0})}},[]),s.jsx(e8,{...c,children:s.jsx(JIe,{scope:r,open:n,onOpenChange:f,content:u,onContentChange:d,children:s.jsx(ZIe,{scope:r,onClose:w.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:h,dir:p,modal:l,children:i})})})};due.displayName=j_;var eFe="MenuAnchor",x8=w.forwardRef((e,r)=>{const{__scopeMenu:n,...i}=e,a=B4(n);return s.jsx(t8,{...a,...i,ref:r})});x8.displayName=eFe;var y8="MenuPortal",[tFe,hue]=Ug(y8,{forceMount:void 0}),fue=e=>{const{__scopeMenu:r,forceMount:n,children:i,container:a}=e,o=$g(y8,r);return s.jsx(tFe,{scope:r,forceMount:n,children:s.jsx(cl,{present:n||o.open,children:s.jsx(A_,{asChild:!0,container:a,children:i})})})};fue.displayName=y8;var Tc="MenuContent",[rFe,v8]=Ug(Tc),mue=w.forwardRef((e,r)=>{const n=hue(Tc,e.__scopeMenu),{forceMount:i=n.forceMount,...a}=e,o=$g(Tc,e.__scopeMenu),l=__(Tc,e.__scopeMenu);return s.jsx(V2.Provider,{scope:e.__scopeMenu,children:s.jsx(cl,{present:i||o.open,children:s.jsx(V2.Slot,{scope:e.__scopeMenu,children:l.modal?s.jsx(nFe,{...a,ref:r}):s.jsx(iFe,{...a,ref:r})})})})}),nFe=w.forwardRef((e,r)=>{const n=$g(Tc,e.__scopeMenu),i=w.useRef(null),a=Mr(r,i);return w.useEffect(()=>{const o=i.current;if(o)return g8(o)},[]),s.jsx(b8,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:bt(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),iFe=w.forwardRef((e,r)=>{const n=$g(Tc,e.__scopeMenu);return s.jsx(b8,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),aFe=fg("MenuContent.ScrollLock"),b8=w.forwardRef((e,r)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:A,...g}=e,y=$g(Tc,n),x=__(Tc,n),b=B4(n),v=uue(n),j=XIe(n),[_,C]=w.useState(null),N=w.useRef(null),S=Mr(r,N,y.onContentChange),E=w.useRef(0),O=w.useRef(""),B=w.useRef(0),T=w.useRef(null),F=w.useRef("right"),I=w.useRef(0),D=A?E4:w.Fragment,L=A?{as:aFe,allowPinchZoom:!0}:void 0,V=Q=>{var X,de;const $=O.current+Q,q=j().filter(oe=>!oe.disabled),M=document.activeElement,z=(X=q.find(oe=>oe.ref.current===M))==null?void 0:X.textValue,K=q.map(oe=>oe.textValue),ne=gFe(K,$,z),ie=(de=q.find(oe=>oe.textValue===ne))==null?void 0:de.ref.current;(function oe(ce){O.current=ce,window.clearTimeout(E.current),ce!==""&&(E.current=window.setTimeout(()=>oe(""),1e3))})($),ie&&setTimeout(()=>ie.focus())};w.useEffect(()=>()=>window.clearTimeout(E.current),[]),m8();const U=w.useCallback(Q=>{var q,M;return F.current===((q=T.current)==null?void 0:q.side)&&yFe(Q,(M=T.current)==null?void 0:M.area)},[]);return s.jsx(rFe,{scope:n,searchRef:O,onItemEnter:w.useCallback(Q=>{U(Q)&&Q.preventDefault()},[U]),onItemLeave:w.useCallback(Q=>{var $;U(Q)||(($=N.current)==null||$.focus(),C(null))},[U]),onTriggerLeave:w.useCallback(Q=>{U(Q)&&Q.preventDefault()},[U]),pointerGraceTimerRef:B,onPointerGraceIntentChange:w.useCallback(Q=>{T.current=Q},[]),children:s.jsx(D,{...L,children:s.jsx(S4,{asChild:!0,trapped:a,onMountAutoFocus:bt(o,Q=>{var $;Q.preventDefault(),($=N.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:s.jsx(F0,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:s.jsx(p8,{asChild:!0,...v,dir:x.dir,orientation:"vertical",loop:i,currentTabStopId:_,onCurrentTabStopIdChange:C,onEntryFocus:bt(u,Q=>{x.isUsingKeyboardRef.current||Q.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(r8,{role:"menu","aria-orientation":"vertical","data-state":Bue(y.open),"data-radix-menu-content":"",dir:x.dir,...b,...g,ref:S,style:{outline:"none",...g.style},onKeyDown:bt(g.onKeyDown,Q=>{const q=Q.target.closest("[data-radix-menu-content]")===Q.currentTarget,M=Q.ctrlKey||Q.altKey||Q.metaKey,z=Q.key.length===1;q&&(Q.key==="Tab"&&Q.preventDefault(),!M&&z&&V(Q.key));const K=N.current;if(Q.target!==K||!qIe.includes(Q.key))return;Q.preventDefault();const ie=j().filter(X=>!X.disabled).map(X=>X.ref.current);lue.includes(Q.key)&&ie.reverse(),pFe(ie)}),onBlur:bt(e.onBlur,Q=>{Q.currentTarget.contains(Q.target)||(window.clearTimeout(E.current),O.current="")}),onPointerMove:bt(e.onPointerMove,W2(Q=>{const $=Q.target,q=I.current!==Q.clientX;if(Q.currentTarget.contains($)&&q){const M=Q.clientX>I.current?"right":"left";F.current=M,I.current=Q.clientX}}))})})})})})})});mue.displayName=Tc;var sFe="MenuGroup",w8=w.forwardRef((e,r)=>{const{__scopeMenu:n,...i}=e;return s.jsx(Rt.div,{role:"group",...i,ref:r})});w8.displayName=sFe;var oFe="MenuLabel",pue=w.forwardRef((e,r)=>{const{__scopeMenu:n,...i}=e;return s.jsx(Rt.div,{...i,ref:r})});pue.displayName=oFe;var CE="MenuItem",QW="menu.itemSelect",T4=w.forwardRef((e,r)=>{const{disabled:n=!1,onSelect:i,...a}=e,o=w.useRef(null),l=__(CE,e.__scopeMenu),c=v8(CE,e.__scopeMenu),u=Mr(r,o),d=w.useRef(!1),h=()=>{const f=o.current;if(!n&&f){const p=new CustomEvent(QW,{bubbles:!0,cancelable:!0});f.addEventListener(QW,m=>i==null?void 0:i(m),{once:!0}),BU(f,p),p.defaultPrevented?d.current=!1:l.onClose()}};return s.jsx(Aue,{...a,ref:u,disabled:n,onClick:bt(e.onClick,h),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),d.current=!0},onPointerUp:bt(e.onPointerUp,f=>{var p;d.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:bt(e.onKeyDown,f=>{const p=c.searchRef.current!=="";n||p&&f.key===" "||DR.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});T4.displayName=CE;var Aue=w.forwardRef((e,r)=>{const{__scopeMenu:n,disabled:i=!1,textValue:a,...o}=e,l=v8(CE,n),c=uue(n),u=w.useRef(null),d=Mr(r,u),[h,f]=w.useState(!1),[p,m]=w.useState("");return w.useEffect(()=>{const A=u.current;A&&m((A.textContent??"").trim())},[o.children]),s.jsx(V2.ItemSlot,{scope:n,disabled:i,textValue:a??p,children:s.jsx(A8,{asChild:!0,...c,focusable:!i,children:s.jsx(Rt.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...o,ref:d,onPointerMove:bt(e.onPointerMove,W2(A=>{i?l.onItemLeave(A):(l.onItemEnter(A),A.defaultPrevented||A.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:bt(e.onPointerLeave,W2(A=>l.onItemLeave(A))),onFocus:bt(e.onFocus,()=>f(!0)),onBlur:bt(e.onBlur,()=>f(!1))})})})}),lFe="MenuCheckboxItem",gue=w.forwardRef((e,r)=>{const{checked:n=!1,onCheckedChange:i,...a}=e;return s.jsx(wue,{scope:e.__scopeMenu,checked:n,children:s.jsx(T4,{role:"menuitemcheckbox","aria-checked":NE(n)?"mixed":n,...a,ref:r,"data-state":_8(n),onSelect:bt(a.onSelect,()=>i==null?void 0:i(NE(n)?!0:!n),{checkForDefaultPrevented:!1})})})});gue.displayName=lFe;var xue="MenuRadioGroup",[cFe,uFe]=Ug(xue,{value:void 0,onValueChange:()=>{}}),yue=w.forwardRef((e,r)=>{const{value:n,onValueChange:i,...a}=e,o=To(i);return s.jsx(cFe,{scope:e.__scopeMenu,value:n,onValueChange:o,children:s.jsx(w8,{...a,ref:r})})});yue.displayName=xue;var vue="MenuRadioItem",bue=w.forwardRef((e,r)=>{const{value:n,...i}=e,a=uFe(vue,e.__scopeMenu),o=n===a.value;return s.jsx(wue,{scope:e.__scopeMenu,checked:o,children:s.jsx(T4,{role:"menuitemradio","aria-checked":o,...i,ref:r,"data-state":_8(o),onSelect:bt(i.onSelect,()=>{var l;return(l=a.onValueChange)==null?void 0:l.call(a,n)},{checkForDefaultPrevented:!1})})})});bue.displayName=vue;var j8="MenuItemIndicator",[wue,dFe]=Ug(j8,{checked:!1}),jue=w.forwardRef((e,r)=>{const{__scopeMenu:n,forceMount:i,...a}=e,o=dFe(j8,n);return s.jsx(cl,{present:i||NE(o.checked)||o.checked===!0,children:s.jsx(Rt.span,{...a,ref:r,"data-state":_8(o.checked)})})});jue.displayName=j8;var hFe="MenuSeparator",_ue=w.forwardRef((e,r)=>{const{__scopeMenu:n,...i}=e;return s.jsx(Rt.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});_ue.displayName=hFe;var fFe="MenuArrow",Cue=w.forwardRef((e,r)=>{const{__scopeMenu:n,...i}=e,a=B4(n);return s.jsx(n8,{...a,...i,ref:r})});Cue.displayName=fFe;var mFe="MenuSub",[kUt,Nue]=Ug(mFe),iw="MenuSubTrigger",Sue=w.forwardRef((e,r)=>{const n=$g(iw,e.__scopeMenu),i=__(iw,e.__scopeMenu),a=Nue(iw,e.__scopeMenu),o=v8(iw,e.__scopeMenu),l=w.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=o,d={__scopeMenu:e.__scopeMenu},h=w.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return w.useEffect(()=>h,[h]),w.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),u(null)}},[c,u]),s.jsx(x8,{asChild:!0,...d,children:s.jsx(Aue,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Bue(n.open),...e,ref:e4(r,a.onTriggerChange),onClick:f=>{var p;(p=e.onClick)==null||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:bt(e.onPointerMove,W2(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:bt(e.onPointerLeave,W2(f=>{var m,A;h();const p=(m=n.content)==null?void 0:m.getBoundingClientRect();if(p){const g=(A=n.content)==null?void 0:A.dataset.side,y=g==="right",x=y?-5:5,b=p[y?"left":"right"],v=p[y?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:b,y:p.top},{x:v,y:p.top},{x:v,y:p.bottom},{x:b,y:p.bottom}],side:g}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:bt(e.onKeyDown,f=>{var m;const p=o.searchRef.current!=="";e.disabled||p&&f.key===" "||KIe[i.dir].includes(f.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),f.preventDefault())})})})});Sue.displayName=iw;var kue="MenuSubContent",Eue=w.forwardRef((e,r)=>{const n=hue(Tc,e.__scopeMenu),{forceMount:i=n.forceMount,...a}=e,o=$g(Tc,e.__scopeMenu),l=__(Tc,e.__scopeMenu),c=Nue(kue,e.__scopeMenu),u=w.useRef(null),d=Mr(r,u);return s.jsx(V2.Provider,{scope:e.__scopeMenu,children:s.jsx(cl,{present:i||o.open,children:s.jsx(V2.Slot,{scope:e.__scopeMenu,children:s.jsx(b8,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var f;l.isUsingKeyboardRef.current&&((f=u.current)==null||f.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:bt(e.onFocusOutside,h=>{h.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:bt(e.onEscapeKeyDown,h=>{l.onClose(),h.preventDefault()}),onKeyDown:bt(e.onKeyDown,h=>{var m;const f=h.currentTarget.contains(h.target),p=GIe[l.dir].includes(h.key);f&&p&&(o.onOpenChange(!1),(m=c.trigger)==null||m.focus(),h.preventDefault())})})})})})});Eue.displayName=kue;function Bue(e){return e?"open":"closed"}function NE(e){return e==="indeterminate"}function _8(e){return NE(e)?"indeterminate":e?"checked":"unchecked"}function pFe(e){const r=document.activeElement;for(const n of e)if(n===r||(n.focus(),document.activeElement!==r))return}function AFe(e,r){return e.map((n,i)=>e[(r+i)%e.length])}function gFe(e,r,n){const a=r.length>1&&Array.from(r).every(d=>d===r[0])?r[0]:r,o=n?e.indexOf(n):-1;let l=AFe(e,Math.max(o,0));a.length===1&&(l=l.filter(d=>d!==n));const u=l.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return u!==n?u:void 0}function xFe(e,r){const{x:n,y:i}=e;let a=!1;for(let o=0,l=r.length-1;o<r.length;l=o++){const c=r[o],u=r[l],d=c.x,h=c.y,f=u.x,p=u.y;h>i!=p>i&&n<(f-d)*(i-h)/(p-h)+d&&(a=!a)}return a}function yFe(e,r){if(!r)return!1;const n={x:e.clientX,y:e.clientY};return xFe(n,r)}function W2(e){return r=>r.pointerType==="mouse"?e(r):void 0}var vFe=due,bFe=x8,wFe=fue,jFe=mue,_Fe=w8,CFe=pue,NFe=T4,SFe=gue,kFe=yue,EFe=bue,BFe=jue,TFe=_ue,PFe=Cue,IFe=Sue,FFe=Eue,P4="DropdownMenu",[OFe,EUt]=rs(P4,[cue]),Oo=cue(),[LFe,Tue]=OFe(P4),Pue=e=>{const{__scopeDropdownMenu:r,children:n,dir:i,open:a,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,u=Oo(r),d=w.useRef(null),[h,f]=nl({prop:a,defaultProp:o??!1,onChange:l,caller:P4});return s.jsx(LFe,{scope:r,triggerId:Ul(),triggerRef:d,contentId:Ul(),open:h,onOpenChange:f,onOpenToggle:w.useCallback(()=>f(p=>!p),[f]),modal:c,children:s.jsx(vFe,{...u,open:h,onOpenChange:f,dir:i,modal:c,children:n})})};Pue.displayName=P4;var Iue="DropdownMenuTrigger",Fue=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...a}=e,o=Tue(Iue,n),l=Oo(n);return s.jsx(bFe,{asChild:!0,...l,children:s.jsx(Rt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...a,ref:e4(r,o.triggerRef),onPointerDown:bt(e.onPointerDown,c=>{!i&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:bt(e.onKeyDown,c=>{i||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Fue.displayName=Iue;var RFe="DropdownMenuPortal",Oue=e=>{const{__scopeDropdownMenu:r,...n}=e,i=Oo(r);return s.jsx(wFe,{...i,...n})};Oue.displayName=RFe;var Lue="DropdownMenuContent",Rue=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Tue(Lue,n),o=Oo(n),l=w.useRef(!1);return s.jsx(jFe,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...i,ref:r,onCloseAutoFocus:bt(e.onCloseAutoFocus,c=>{var u;l.current||(u=a.triggerRef.current)==null||u.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:bt(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,h=u.button===2||d;(!a.modal||h)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Rue.displayName=Lue;var DFe="DropdownMenuGroup",MFe=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(_Fe,{...a,...i,ref:r})});
1035MFe.displayName=DFe;var zFe="DropdownMenuLabel",Due=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(CFe,{...a,...i,ref:r})});Due.displayName=zFe;var UFe="DropdownMenuItem",Mue=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(NFe,{...a,...i,ref:r})});Mue.displayName=UFe;var $Fe="DropdownMenuCheckboxItem",zue=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(SFe,{...a,...i,ref:r})});zue.displayName=$Fe;var QFe="DropdownMenuRadioGroup",HFe=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(kFe,{...a,...i,ref:r})});HFe.displayName=QFe;var VFe="DropdownMenuRadioItem",Uue=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(EFe,{...a,...i,ref:r})});Uue.displayName=VFe;var WFe="DropdownMenuItemIndicator",$ue=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(BFe,{...a,...i,ref:r})});$ue.displayName=WFe;var qFe="DropdownMenuSeparator",Que=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(TFe,{...a,...i,ref:r})});Que.displayName=qFe;var KFe="DropdownMenuArrow",GFe=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(PFe,{...a,...i,ref:r})});GFe.displayName=KFe;var XFe="DropdownMenuSubTrigger",Hue=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(IFe,{...a,...i,ref:r})});Hue.displayName=XFe;var YFe="DropdownMenuSubContent",Vue=w.forwardRef((e,r)=>{const{__scopeDropdownMenu:n,...i}=e,a=Oo(n);return s.jsx(FFe,{...a,...i,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Vue.displayName=YFe;var JFe=Pue,ZFe=Fue,eOe=Oue,Wue=Rue,que=Due,Kue=Mue,Gue=zue,Xue=Uue,Yue=$ue,Jue=Que,Zue=Hue,ede=Vue;const SE=JFe,kE=ZFe,tOe=w.forwardRef(({className:e,inset:r,children:n,...i},a)=>s.jsxs(Zue,{ref:a,className:it("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",r&&"pl-8",e),...i,children:[n,s.jsx(hs,{className:"ml-auto h-4 w-4"})]}));tOe.displayName=Zue.displayName;const rOe=w.forwardRef(({className:e,...r},n)=>s.jsx(ede,{ref:n,className:it("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));rOe.displayName=ede.displayName;const q2=w.forwardRef(({className:e,sideOffset:r=4,...n},i)=>s.jsx(eOe,{children:s.jsx(Wue,{ref:i,sideOffset:r,className:it("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));q2.displayName=Wue.displayName;const Go=w.forwardRef(({className:e,inset:r,...n},i)=>s.jsx(Kue,{ref:i,className:it("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",r&&"pl-8",e),...n}));Go.displayName=Kue.displayName;const nOe=w.forwardRef(({className:e,children:r,checked:n,...i},a)=>s.jsxs(Gue,{ref:a,className:it("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...i,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Yue,{children:s.jsx(Bc,{className:"h-4 w-4"})})}),r]}));nOe.displayName=Gue.displayName;const iOe=w.forwardRef(({className:e,children:r,...n},i)=>s.jsxs(Xue,{ref:i,className:it("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Yue,{children:s.jsx(Goe,{className:"h-2 w-2 fill-current"})})}),r]}));iOe.displayName=Xue.displayName;const aOe=w.forwardRef(({className:e,inset:r,...n},i)=>s.jsx(que,{ref:i,className:it("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",e),...n}));aOe.displayName=que.displayName;const EE=w.forwardRef(({className:e,...r},n)=>s.jsx(Jue,{ref:n,className:it("-mx-1 my-1 h-px bg-muted",e),...r}));EE.displayName=Jue.displayName;const tde="/assets/logo-light-CYFAt7dB.png",K2="/assets/logo-dark-u6cUmz2y.png",fs=[{id:"bitcoin",symbol:"BTC",name:"Bitcoin",slug:"bitcoin-pret-azi",pillarSlug:"ce-este-bitcoin",color:"38 95% 54%",icon:"₿",metaTitle:"Bitcoin Preț Azi în RON – Grafic & Convertor BTC/RON",metaDescription:"Preț Bitcoin (BTC) live în lei (RON). Grafic, convertor BTC ↔ RON și analize zilnice. Află de ce crește sau scade Bitcoin azi.",shortDe
1035scription:"Prima și cea mai valoroasă criptomonedă, lansată în 2009 de Satoshi Nakamoto. Bitcoin funcționează ca un sistem de plăți peer-to-peer descentralizat.",faqItems:[{q:"Ce este Bitcoin?",a:"Bitcoin (BTC) este prima criptomonedă descentralizată, creată în 2009. Funcționează pe o rețea blockchain fără intermediari."},{q:"Cât valorează 1 Bitcoin în lei?",a:"Prețul Bitcoin fluctuează constant. Verifică convertorul de pe această pagină pentru cursul actual BTC/RON."},{q:"Cum cumpăr Bitcoin în România?",a:"Poți cumpăra Bitcoin prin exchange-uri precum Binance, Coinbase sau platforme locale. Ai nevoie de verificare KYC."},{q:"Este Bitcoin legal în România?",a:"Da, criptomonedele sunt legale în România. Profiturile din tranzacții trebuie declarate la ANAF."},{q:"De ce fluctuează prețul Bitcoin?",a:"Prețul este influențat de cerere/ofertă, reglementări, adopție instituțională, sentimentul pieței și factori macroeconomici."}],relatedKeywords:["Bitcoin","BTC","bitcoin"]},{id:"ethereum",symbol:"ETH",name:"Ethereum",slug:"ethereum-pret-ron",pillarSlug:"ce-este-ethereum",color:"231 60% 58%",icon:"Ξ",metaTitle:"Ethereum Preț Azi în RON – Grafic & Convertor ETH/RON",metaDescription:"Preț Ethereum (ETH) live în lei românești. Grafic, convertor ETH ↔ RON, analize. Află de ce se mișcă Ethereum azi.",shortDescription:"A doua cea mai mare criptomonedă, cu cea mai utilizată platformă de smart contracts și aplicații descentralizate (dApps).",faqItems:[{q:"Ce este Ethereum?",a:"Ethereum este o platformă blockchain open-source care permite crearea de smart contracts și aplicații descentralizate."},{q:"Care este diferența între Bitcoin și Ethereum?",a:"Bitcoin este o monedă digitală, Ethereum este o platformă programabilă. ETH permite smart contracts, NFT-uri și DeFi."},{q:"Ce sunt gas fees pe Ethereum?",a:"Gas fees sunt comisioanele plătite pentru tranzacții pe rețeaua Ethereum. Variază în funcție de congestionarea rețelei."},{q:"Ce este Ethereum 2.0?",a:"Ethereum a trecut la Proof of Stake, reducând consumul energetic cu ~99% și îmbunătățind scalabilitatea."},{q:"Cum pot face staking cu ETH?",a:"Poți face staking direct (32 ETH minim) sau prin pool-uri de staking pe exchange-uri și platforme DeFi."}],relatedKeywords:["Ethereum","ETH","ethereum"]},{id:"solana",symbol:"SOL",name:"Solana",slug:"solana-pret-azi",pillarSlug:"ce-este-solana",color:"270 70% 60%",icon:"◎",metaTitle:"Solana Preț Azi în RON – Grafic & Convertor SOL/RON",metaDescription:"Preț Solana (SOL) live în lei. Grafic, convertor SOL ↔ RON și analize zilnice. Solana – blockchain ultra-rapid.",shortDescription:"Blockchain de înaltă performanță, cunoscut pentru viteza tranzacțiilor (65.000 TPS) și costuri reduse.",faqItems:[{q:"Ce este Solana?",a:"Solana este o blockchain de înaltă performanță, cu tranzacții rapide și costuri foarte mici."},{q:"Cât de rapid este Solana?",a:"Solana poate procesa până la 65.000 tranzacții pe secundă, fiind una dintre cele mai rapide blockchain-uri."},{q:"Ce sunt meme coins pe Solana?",a:"Solana a devenit populară pentru lansarea de meme coins și NFT-uri datorită costurilor reduse de tranzacționare."},{q:"Este Solana o investiție bună?",a:"Solana are o comunitate activă și tehnologie avansată, dar orice investiție crypto implică riscuri semnificative."},{q:"Cum cumpăr Solana în România?",a:"Poți cumpăra SOL pe exchange-uri majore precum Binance sau Kraken, cu transfer bancar sau card."}],relatedKeywords:["Solana","SOL","solana"]},{id:"binancecoin",symbol:"BNB",name:"BNB",slug:"bnb-pret-azi",pillarSlug:"ce-este-bnb",color:"43 90% 50%",icon:"◆",metaTitle:"BNB Preț Azi în RON – Grafic & Convertor BNB/RON",metaDescription:"Preț BNB (Binance Coin) live în lei. Grafic, convertor BNB ↔ RON. Token-ul nativ al ecosistemului Binance.",shortDescription:"Token-ul nativ al ecosistemului Binance, cel mai mare exchange de criptomonede din lume.",faqItems:[{q:"Ce este BNB?",a:"BNB este token-ul nativ al ecosistemului Binance, folosit pentru reduceri de comisioane, plăț
1035i și DeFi pe BNB Chain."},{q:"La ce se folosește BNB?",a:"BNB se folosește pentru plata comisioanelor pe Binance, participare la launchpad-uri, staking și tranzacții pe BNB Chain."},{q:"Ce este BNB Chain?",a:"BNB Chain (fosta Binance Smart Chain) este o blockchain compatibilă EVM, cu comisioane mici și viteze mari."},{q:"Este BNB un token centralizat?",a:"BNB este emis de Binance dar operează pe blockchain descentralizat. Există dezbateri despre gradul de decentralizare."},{q:"Cum afectează token burn-ul prețul BNB?",a:"Binance face burn trimestrial, reducând supply-ul total, ceea ce teoretic crește valoarea per token."}],relatedKeywords:["BNB","Binance","binance"]},{id:"ripple",symbol:"XRP",name:"XRP",slug:"xrp-pret-azi",pillarSlug:"ce-este-xrp",color:"210 10% 40%",icon:"✕",metaTitle:"XRP Preț Azi în RON – Grafic & Convertor XRP/RON",metaDescription:"Preț XRP (Ripple) live în lei. Grafic, convertor XRP ↔ RON. Plăți internaționale rapide cu XRP.",shortDescription:"Criptomoneda creată pentru plăți internaționale rapide și ieftine, utilizată de instituții financiare.",faqItems:[{q:"Ce este XRP?",a:"XRP este o criptomonedă creată de Ripple Labs, destinată plăților internaționale rapide Ã
1035®ntre instituții financiare."},{q:"Care este diferența între XRP și Ripple?",a:"Ripple este compania, XRP este criptomoneda. Ripple folosește XRP ca punte pentru transferuri internaționale."},{q:"Cât durează o tranzacție XRP?",a:"Tranzacțiile XRP se confirmă în 3-5 secunde, fiind printre cele mai rapide din crypto."},{q:"Ce s-a întâmplat cu procesul SEC vs Ripple?",a:"Ripple a avut un proces cu SEC privind clasificarea XRP. Decizia din 2023 a stabilit că XRP nu este security pe piața secundară."},{q:"Este XRP o investiție bună?",a:"XRP are cazuri reale de utilizare în plăți internaționale, dar ca orice crypto, implică riscuri. Fă cercetare proprie."}],relatedKeywords:["XRP","Ripple","ripple"]},{id:"cardano",symbol:"ADA",name:"Cardano",slug:"cardano-pret-azi",pillarSlug:"ce-este-cardano",color:"210 85% 55%",icon:"◈",metaTitle:"Cardano Preț Azi în RON – Grafic & Convertor ADA/RON",metaDescription:"Preț Cardano (ADA) live în lei. Grafic, convertor ADA ↔ RON. Blockchain peer-reviewed cu abordare academică.",shortDescription:"Platformă blockchain bazată pe cercetare academică peer-reviewed, cu un accent pe sustenabilitate și scalabilitate.",faqItems:[{q:"Ce este Cardano?",a:"Cardano este o platformă blockchain de generația a treia, dezvoltată cu abordare academică și peer-reviewed."},{q:"Cine a creat Cardano?",a:"Cardano a fost co-fondat de Charles Hoskinson, care a fost și co-fondator Ethereum."},{q:"Ce este staking pe Cardano?",a:"Poți delega ADA către un stake pool pentru a primi recompense, fără a-ți bloca monedele."},{q:"Care sunt avantajele Cardano?",a:"Cardano oferă securitate dovedită matematic, consum energetic redus și un proces riguros de dezvoltare."},{q:"Are Cardano smart contracts?",a:"Da, Cardano suportă smart contracts prin platforma Plutus, bazată pe limbajul Haskell."}],relatedKeywords:["Cardano","ADA","cardano"]},{id:"dogecoin",symbol:"DOGE",name:"Dogecoin",slug:"dogecoin-pret-azi",pillarSlug:"ce-este-dogecoin",color:"38 80% 55%",icon:"Ð",metaTitle:"Dogecoin Preț Azi în RON – Grafic & Convertor DOGE/RON",metaDescription:"Preț Dogecoin (DOGE) live în lei. Grafic, convertor DOGE ↔ RON. Cel mai popular meme coin din lume.",shortDescription:"Cel mai popular meme coin, cu o comunitate mare și susținere din partea unor personalități precum Elon Musk.",faqItems:[{q:"Ce este Dogecoin?",a:"Dogecoin a fost creat în 2013 ca o glumă bazată pe meme-ul Shiba Inu, dar a devenit una dintre cele mai populare crypto."},{q:"De ce este popular Dogecoin?",a:"Datorită comunității active, susținerii lui Elon Musk și culturii meme care îl înconjoară."},{q:"Dogecoin are un supply limitat?",a:"Nu, Dogecoin are un supply nelimitat (inflationary), cu ~5 miliarde DOGE noi emise anual."},{q:"Se poate folosi DOGE pentru plăți?",a:"Da, Tesla și alte companii au acceptat DOGE. Comisioanele sunt mici și tranzacțiile rapide."},{q:"Este Dogecoin o investiție sigură?",a:"DOGE este foarte volatil și influențat de social media. Este considerat o investiție cu risc foarte mare."}],relatedKeywords:["Dogecoin","DOGE","dogecoin"]},{id:"polkadot",symbol:"DOT",name:"Polkadot",slug:"polkadot-pret-azi",pillarSlug:"ce-este-polkadot",color:"340 80% 55%",icon:"●",metaTitle:"Polkadot Preț Azi în RON – Grafic & Convertor DOT/RON",metaDescription:"Preț Polkadot (DOT) live în lei. Grafic, convertor DOT ↔ RON. Interoperabilitate multi-chain.",shortDescription:"Protocol de interoperabilitate care conectează multiple blockchain-uri, creat de co-fondatorul Ethereum.",faqItems:[{q:"Ce este Polkadot?",a:"Polkadot este un protocol care permite diferitelor blockchain-uri să comunice și să facă schimb de date."},{q:"Ce sunt parachain-urile?",a:"Parachain-urile sunt blockchain-uri individuale care rulează în paralel pe rețeaua Polkadot."},{q:"Cine a creat Polkadot?",a:"Dr. Gavin Wood, co-fondator Ethereum și creator al limbajului Solidity."},{q:"La ce se folosește DOT?",a:"DOT se folosește pentru governance, staking și bonding (conectarea de parachain-uri noi)."}
1035,{q:"Ce este Kusama?",a:"Kusama este rețeaua canary (testare) a Polkadot, cu funcționalități similare dar mai experimentale."}],relatedKeywords:["Polkadot","DOT","polkadot"]},{id:"avalanche-2",symbol:"AVAX",name:"Avalanche",slug:"avalanche-pret-azi",pillarSlug:"ce-este-avalanche",color:"0 80% 52%",icon:"▲",metaTitle:"Avalanche Preț Azi în RON – Grafic & Convertor AVAX/RON",metaDescription:"Preț Avalanche (AVAX) live în lei. Grafic, convertor AVAX ↔ RON. Blockchain rapid cu sub-rețele personalizate.",shortDescription:"Platformă blockchain rapidă și scalabilă, cu suport pentru sub-rețele (subnets) personalizate.",faqItems:[{q:"Ce este Avalanche?",a:"Avalanche este o platformă blockchain rapidă, cu finalizare sub 1 secundă și suport pentru subnets personalizate."},{q:"Ce sunt Avalanche Subnets?",a:"Subnets sunt rețele blockchain personalizate care rulează pe infrastructura Avalanche."},{q:"Cât de rapid este Avalanche?",a:"Avalanche finalizează tranzacțiile în sub 1 secundă, cu un throughput de peste 4.500 TPS."},{q:"Este Avalanche compatibil cu Ethereum?",a:"Da, C-Chain de pe Avalanche este compatibilă EVM, permițând portarea ușoară a aplicațiilor Ethereum."},{q:"Cum funcționează staking-ul AVAX?",a:"Poți face staking cu minim 25 AVAX ca delegator, cu perioade de lock între 2 săptămâni și 1 an."}],relatedKeywords:["Avalanche","AVAX","avalanche"]},{id:"chainlink",symbol:"LINK",name:"Chainlink",slug:"chainlink-pret-azi",pillarSlug:"ce-este-chainlink",color:"215 80% 55%",icon:"⬡",metaTitle:"Chainlink Preț Azi în RON – Grafic & Convertor LINK/RON",metaDescription:"Preț Chainlink (LINK) live în lei. Grafic, convertor LINK ↔ RON. Oracolele descentralizate nr. 1 din crypto.",shortDescription:"Rețea descentralizată de oracole care conectează smart contracts cu date din lumea reală.",faqItems:[{q:"Ce este Chainlink?",a:"Chainlink este o rețea de oracole descentralizate care furnizează date din lumea reală către smart contracts."},{q:"Ce sunt oracolele blockchain?",a:"Oracolele sunt servicii care aduc date externe (prețuri, vreme, etc.) pe blockchain pentru smart contracts."},{q:"De ce este important Chainlink?",a:"Fără oracole, smart contracts nu pot accesa date din afara blockchain-ului. Chainlink este cel mai utilizat oracol."},{q:"Ce este CCIP?",a:"Cross-Chain Interoperability Protocol permite transferul de date și token-uri între diferite blockchain-uri."},{q:"Cine folosește Chainlink?",a:"Aave, Synthetix, Compound și sute de protocoale DeFi depind de price feeds Chainlink."}],relatedKeywords:["Chainlink","LINK","chainlink"]}];fs.map(e=>e.slug);function sOe(e){return fs.find(r=>r.slug===e)}function oOe(){const[e,r]=w.useState(!1),n=w.useRef(null),i=w.useRef(),a=()=>{clearTimeout(i.current),r(!0)},o=()=>{i.current=window.setTimeout(()=>r(!1),200)};return w.useEffect(()=>{const l=c=>{n.current&&!n.current.contains(c.target)&&r(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]),s.jsxs("div",{ref:n,className:"relative",onMouseEnter:a,onMouseLeave:o,children:[s.jsxs("button",{onClick:()=>r(!e),className:"flex items-center gap-1 px-3 py-2 rounded-md text-sm font-semibold text-foreground hover:text-primary transition-all duration-200",children:[s.jsx(Wi,{size:14,className:"text-primary"}),"Crypto",s.jsx(Vl,{size:12,className:`transition-transform ${e?"rotate-180":""}`})]}),e&&s.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 mt-2 w-[600px] bg-popover border border-border rounded-xl shadow-xl p-5 z-50 animate-fade-in",children:s.jsxs("div",{className:"grid grid-cols-3 gap-5",children:[s.jsxs("div",{className:"col-span-2",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Prețuri Live în RON"}),s.jsx("div",{className:"grid grid-cols-2 gap-1",children:fs.map(l=>s.jsxs(be,{to:`/${l.slug}`,onClick:()=>r(!1),className:"flex items-center gap-2 px-2.5 py-2 rounded-lg hover:bg-secondary transition-colors group",children:[s.jsx("span",{className:"text-base w-5 text-center",children:l.icon}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:l.name}),s.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[l.symbol,"/RON"]})]})]},l.id))})]}),s.jsxs("div",{className:"border-l border-border pl-4",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Instrumente"}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs(be,{to:"/crypto",onClick:()=>r(!1),className:"flex items-center gap-2 px-2.5 py-2.5 rounded-lg hover:bg-secondary transition-colors",children:[s.jsx(oa,{size:16,className:"text-primary"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Crypto Hub"}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Top 10 monede live"})]})]}),s.jsxs(be,{to:"/preturi-crypto",onClick:()=>r(!1),className:"flex items-center gap-2 px-2.5 py-2.5 rounded-lg hover:bg-secondary transition-colors",children:[s.jsx(Eo,{size:16,className:"text-primary"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Prețuri Live"}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Top 100 monede"})]})]}),s.jsxs(be,{to:"/convertor-crypto-ron",onClick:()=>r(!1),className:"flex items-center gap-2 px-2.5 py-2.5 rounded-lg hover:bg-secondary transition-colors",children:[s.jsx(Gh,{size:16,className:"text-primary"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Convertor"}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Crypto ↔ RON instant"})]})]})]})]})]})})]})}function lOe(e){return Xe({queryKey:["module-quiz",e],queryFn:async()=>{const{data:r,error:n}=await G.rpc("get_module_quiz_questions",{p_module_id:e});if(n)throw n;return(r||[]).map(i=>({id:i.id,moduleId:i.module_id,question:i.question,options:i.options,sortOrder:i.sort_order}))},enabled:!!e})}function rde(e){return Xe({queryKey:["module-quiz-counts",e],queryFn:async()=>{const{data:r,error:n}=await G.rpc("get_module_quiz_counts",{p_course_id:e});if(n)throw n;return(r||[]).reduce((i,a)=>(i[a.module_id]=Number(a.question_count)||0,i),{})},enabled:!!e})}
1035function nde(e){const{user:r}=Fn();return Xe({queryKey:["quiz-attempts",r==null?void 0:r.id,e],queryFn:async()=>{const{data:n}=await G.from("course_modules").select("id").eq("course_id",e),i=(n||[]).map(l=>l.id);if(!i.length)return[];const{data:a,error:o}=await G.from("quiz_attempts").select("*").eq("user_id",r.id).in("module_id",i);if(o)throw o;return(a||[]).map(l=>({id:l.id,userId:l.user_id,moduleId:l.module_id,score:l.score,totalQuestions:l.total_questions,passed:l.passed,eduCoinsEarned:l.edu_coins_earned,attemptedAt:l.attempted_at}))},enabled:!!r&&!!e})}function ide(){const{user:e}=Fn();return Xe({queryKey:["edu-coins",e==null?void 0:e.id],queryFn:async()=>{const{data:r,error:n}=await G.from("user_edu_coins").select("*").eq("user_id",e.id).maybeSingle();if(n)throw n;return r?{balance:r.balance,totalEarned:r.total_earned,validatedEduScore:r.validated_edu_score??0,learningScore:r.learning_score??0,communityScore:r.community_score??0,passiveScore:r.passive_score??0,growthScore:r.growth_score??0,loginStreak:r.login_streak??0}:{balance:0,totalEarned:0,validatedEduScore:0,learningScore:0,communityScore:0,passiveScore:0,growthScore:0,loginStreak:0}},enabled:!!e})}const C8=w.createContext({});function N8(e){const r=w.useRef(null);return r.current===null&&(r.current=e()),r.current}const ade=typeof window<"u",sde=ade?w.useLayoutEffect:w.useEffect,I4=w.createContext(null);function S8(e,r){e.indexOf(r)===-1&&e.push(r)}function BE(e,r){const n=e.indexOf(r);n>-1&&e.splice(n,1)}const Ld=(e,r,n)=>n>r?r:n<e?e:n;let F4=()=>{},Vv=()=>{};const nf={},ode=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function lde(e){return typeof e=="object"&&e!==null}const cde=e=>/^0[^.\s]+$/u.test(e);function ude(e){let r;return()=>(r===void 0&&(r=e()),r)}const Pc=e=>e,cOe=(e,r)=>n=>r(e(n)),C_=(...e)=>e.reduce(cOe),G2=(e,r,n)=>{const i=r-e;return i===0?1:(n-e)/i};class k8{constructor(){this.subscriptions=[]}add(r){return S8(this.subscriptions,r),()=>BE(this.subscriptions,r)}notify(r,n,i){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](r,n,i);else for(let o=0;o<a;o++){const l=this.subscriptions[o];l&&l(r,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ic=e=>e*1e3,_c=e=>e/1e3;function dde(e,r){return r?e*(1e3/r):0}const hde=(e,r,n)=>(((1-3*n+3*r)*e+(3*n-6*r))*e+3*r)*e,uOe=1e-7,dOe=12;function hOe(e,r,n,i,a){let o,l,c=0;do l=r+(n-r)/2,o=hde(l,i,a)-e,o>0?n=l:r=l;while(Math.abs(o)>uOe&&++c<dOe);return l}function N_(e,r,n,i){if(e===r&&n===i)return Pc;const a=o=>hOe(o,0,1,e,n);return o=>o===0||o===1?o:hde(a(o),r,i)}const fde=e=>r=>r<=.5?e(2*r)/2:(2-e(2*(1-r)))/2,mde=e=>r=>1-e(1-r),pde=N_(.33,1.53,.69,.99),E8=mde(pde),Ade=fde(E8),gde=e=>(e*=2)<1?.5*E8(e):.5*(2-Math.pow(2,-10*(e-1))),B8=e=>1-Math.sin(Math.acos(e)),xde=mde(B8),yde=fde(B8),fOe=N_(.42,0,1,1),mOe=N_(0,0,.58,1),vde=N_(.42,0,.58,1),pOe=e=>Array.isArray(e)&&typeof e[0]!="number",bde=e=>Array.isArray(e)&&typeof e[0]=="number",HW={linear:Pc,easeIn:fOe,easeInOut:vde,easeOut:mOe,circIn:B8,circInOut:yde,circOut:xde,backIn:E8,backInOut:Ade,backOut:pde,anticipate:gde},AOe=e=>typeof e=="string",VW=e=>{if(bde(e)){Vv(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[r,n,i,a]=e;return N_(r,n,i,a)}else if(AOe(e))return Vv(HW[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),HW[e];return e},wN=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],WW={value:null,addProjectionMetrics:null};function gOe(e,r){let n=new Set,i=new Set,a=!1,o=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},u=0;function d(f){l.has(f)&&(h.schedule(f),e()),u++,f(c)}const h={schedule:(f,p=!1,m=!1)=>{const g=m&&a?n:i;return p&&l.add(f),g.has(f)||g.add(f),f},cancel:f=>{i.delete(f),l.delete(f)},process:f=>{if(c=f,a){o=!0;return}
vendor: 21,673 bytes, line 1035
1035a=!0,[n,i]=[i,n],n.forEach(d),r&&WW.value&&WW.value.frameloop[r].push(u),u=0,n.clear(),a=!1,o&&(o=!1,h.process(f))}};return h}const xOe=40;function wde(e,r){let n=!1,i=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=wN.reduce((v,j)=>(v[j]=gOe(o,r?j:void 0),v),{}),{setup:c,read:u,resolveKeyframes:d,preUpdate:h,update:f,preRender:p,render:m,postRender:A}=l,g=()=>{const v=nf.useManualTiming?a.timestamp:performance.now();n=!1,nf.useManualTiming||(a.delta=i?1e3/60:Math.max(Math.min(v-a.timestamp,xOe),1)),a.timestamp=v,a.isProcessing=!0,c.process(a),u.process(a),d.process(a),h.process(a),f.process(a),p.process(a),m.process(a),A.process(a),a.isProcessing=!1,n&&r&&(i=!1,e(g))},y=()=>{n=!0,i=!0,a.isProcessing||e(g)};return{schedule:wN.reduce((v,j)=>{const _=l[j];return v[j]=(C,N=!1,S=!1)=>(n||y(),_.schedule(C,N,S)),v},{}),cancel:v=>{for(let j=0;j<wN.length;j++)l[wN[j]].cancel(v)},state:a,steps:l}}const{schedule:mi,cancel:hp,state:ks,steps:gI}=wde(typeof requestAnimationFrame<"u"?requestAnimationFrame:Pc,!0);let ck;function yOe(){ck=void 0}const _o={now:()=>(ck===void 0&&_o.set(ks.isProcessing||nf.useManualTiming?ks.timestamp:performance.now()),ck),set:e=>{ck=e,queueMicrotask(yOe)}},jde=e=>r=>typeof r=="string"&&r.startsWith(e),_de=jde("--"),vOe=jde("var(--"),T8=e=>vOe(e)?bOe.test(e.split("/*")[0].trim()):!1,bOe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qW(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const G0={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},X2={...G0,transform:e=>Ld(0,1,e)},jN={...G0,default:1},Ow=e=>Math.round(e*1e5)/1e5,P8=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wOe(e){return e==null}const jOe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,I8=(e,r)=>n=>!!(typeof n=="string"&&jOe.test(n)&&n.startsWith(e)||r&&!wOe(n)&&Object.prototype.hasOwnProperty.call(n,r)),Cde=(e,r,n)=>i=>{if(typeof i!="string")return i;const[a,o,l,c]=i.match(P8);return{[e]:parseFloat(a),[r]:parseFloat(o),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},_Oe=e=>Ld(0,255,e),xI={...G0,transform:e=>Math.round(_Oe(e))},SA={test:I8("rgb","red"),parse:Cde("red","green","blue"),transform:({red:e,green:r,blue:n,alpha:i=1})=>"rgba("+xI.transform(e)+", "+xI.transform(r)+", "+xI.transform(n)+", "+Ow(X2.transform(i))+")"};function COe(e){let r="",n="",i="",a="";return e.length>5?(r=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),a=e.substring(7,9)):(r=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),a=e.substring(4,5),r+=r,n+=n,i+=i,a+=a),{red:parseInt(r,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:a?parseInt(a,16)/255:1}}const MR={test:I8("#"),parse:COe,transform:SA.transform},S_=e=>({test:r=>typeof r=="string"&&r.endsWith(e)&&r.split(" ").length===1,parse:parseFloat,transform:r=>`${r}${e}`}),Xf=S_("deg"),kd=S_("%"),$t=S_("px"),NOe=S_("vh"),SOe=S_("vw"),KW={...kd,parse:e=>kd.parse(e)/100,transform:e=>kd.transform(e*100)},Cy={test:I8("hsl","hue"),parse:Cde("hue","saturation","lightness"),transform:({hue:e,saturation:r,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+kd.transform(Ow(r))+", "+kd.transform(Ow(n))+", "+Ow(X2.transform(i))+")"},ka={test:e=>SA.test(e)||MR.test(e)||Cy.test(e),parse:e=>SA.test(e)?SA.parse(e):Cy.test(e)?Cy.parse(e):MR.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?SA.transform(e):Cy.transform(e),getAnimatableNone:e=>{const r=ka.parse(e);return r.alpha=0,ka.transform(r)}},kOe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function EOe(e){var r,n;return isNaN(e)&&typeof e=="string"&&(((r=e.match(P8))==null?void 0:r.length)||0)+(((n=e.match(kOe))==null?void 0:n.length)||0)>0}const Nde="number",Sde="color",BOe="var",TOe="var(",GW="${}",POe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Y2(e){const r=e.toString(),n=[],i={color:[],number:[],var:[]},a=[];let o=0;const c=r.replace(POe,u=>(ka.test(u)?(i.color.push(o),a.push(Sde),n.push(ka.parse(u))):u.startsWith(TOe)?(i.var.push(o),a.push(BOe),n.push(u)):(i.number.push(o),a.push(Nde),n.push(parseFloat(u))),++o,GW)).split(GW);return{values:n,split:c,indexes:i,types:a}}function kde(e){return Y2(e).values}function Ede(e){const{split:r,types:n}=Y2(e),i=r.length;return a=>{let o="";for(let l=0;l<i;l++)if(o+=r[l],a[l]!==void 0){const c=n[l];c===Nde?o+=Ow(a[l]):c===Sde?o+=ka.transform(a[l]):o+=a[l]}return o}}const IOe=e=>typeof e=="number"?0:ka.test(e)?ka.getAnimatableNone(e):e;function FOe(e){const r=kde(e);return Ede(e)(r.map(IOe))}const Nu={test:EOe,parse:kde,createTransformer:Ede,getAnimatableNone:FOe};function yI(e,r,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(r-e)*6*n:n<1/2?r:n<2/3?e+(r-e)*(2/3-n)*6:e}function OOe({hue:e,saturation:r,lightness:n,alpha:i}){e/=360,r/=100,n/=100;let a=0,o=0,l=0;if(!r)a=o=l=n;else{const c=n<.5?n*(1+r):n+r-n*r,u=2*n-c;a=yI(u,c,e+1/3),o=yI(u,c,e),l=yI(u,c,e-1/3)}return{red:Math.round(a*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:i}}function TE(e,r){return n=>n>0?r:e}const Qi=(e,r,n)=>e+(r-e)*n,vI=(e,r,n)=>{const i=e*e,a=n*(r*r-i)+i;return a<0?0:Math.sqrt(a)},LOe=[MR,SA,Cy],ROe=e=>LOe.find(r=>r.test(e));function XW(e){const r=ROe(e);if(F4(!!r,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!r)return!1;let n=r.parse(e);return r===Cy&&(n=OOe(n)),n}const YW=(e,r)=>{const n=XW(e),i=XW(r);if(!n||!i)return TE(e,r);const a={...n};return o=>(a.red=vI(n.red,i.red,o),a.green=vI(n.green,i.green,o),a.blue=vI(n.blue,i.blue,o),a.alpha=Qi(n.alpha,i.alpha,o),SA.transform(a))},zR=new Set(["none","hidden"]);function DOe(e,r){return zR.has(e)?n=>n<=0?e:r:n=>n>=1?r:e}function MOe(e,r){return n=>Qi(e,r,n)}function F8(e){return typeof e=="number"?MOe:typeof e=="string"?T8(e)?TE:ka.test(e)?YW:$Oe:Array.isArray(e)?Bde:typeof e=="object"?ka.test(e)?YW:zOe:TE}function Bde(e,r){const n=[...e],i=n.length,a=e.map((o,l)=>F8(o)(o,r[l]));return o=>{for(let l=0;l<i;l++)n[l]=a[l](o);return n}}function zOe(e,r){const n={...e,...r},i={};for(const a in n)e[a]!==void 0&&r[a]!==void 0&&(i[a]=F8(e[a])(e[a],r[a]));return a=>{for(const o in i)n[o]=i[o](a);return n}}function UOe(e,r){const n=[],i={color:0,var:0,number:0};for(let a=0;a<r.values.length;a++){const o=r.types[a],l=e.indexes[o][i[o]],c=e.values[l]??0;n[a]=c,i[o]++}return n}const $Oe=(e,r)=>{const n=Nu.createTransformer(r),i=Y2(e),a=Y2(r);return i.indexes.var.length===a.indexes.var.length&&i.indexes.color.length===a.indexes.color.length&&i.indexes.number.length>=a.indexes.number.length?zR.has(e)&&!a.values.length||zR.has(r)&&!i.values.length?DOe(e,r):C_(Bde(UOe(i,a),a.values),n):(F4(!0,`Complex values '${e}' and '${r}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),TE(e,r))};function Tde(e,r,n){return typeof e=="number"&&typeof r=="number"&&typeof n=="number"?Qi(e,r,n):F8(e)(e,r)}const QOe=e=>{const r=({timestamp:n})=>e(n);return{start:(n=!0)=>mi.update(r,n),stop:()=>hp(r),now:()=>ks.isProcessing?ks.timestamp:_o.now()}},Pde=(e,r,n=10)=>{let i="";const a=Math.max(Math.round(r/n),2);for(let o=0;o<a;o++)i+=Math.round(e(o/(a-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},PE=2e4;function O8(e){let r=0;const n=50;let i=e.next(r);for(;!i.done&&r<PE;)r+=n,i=e.next(r);return r>=PE?1/0:r}function HOe(e,r=100,n){const i=n({...e,keyframes:[0,r]}),a=Math.min(O8(i),PE);return{type:"keyframes",ease:o=>i.next(a*o).value/r,duration:_c(a)}}const VOe=5;function Ide(e,r,n){const i=Math.max(r-VOe,0);return dde(n-e(i),r-i)}const Ui={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},bI=.001;function WOe({duration:e=Ui.duration,bounce:r=Ui.bounce,velocity:n=Ui.velocity,mass:i=Ui.mass}){let a,o;F4(e<=Ic(Ui.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-r;l=Ld(Ui.minDamping,Ui.maxDamping,l),e=Ld(Ui.minDuration,Ui.maxDuration,_c(e)),l<1?(a=d=>{const h=d*l,f=h*e,p=h-n,m=UR(d,l),A=Math.exp(-f);return bI-p/m*A},o=d=>{const f=d*l*e,p=f*n+n,m=Math.pow(l,2)*Math.pow(d,2)*e,A=Math.exp(-f),g=UR(Math.pow(d,2),l);return(-a(d)+bI>0?-1:1)*((p-m)*A)/g}):(a=d=>{const h=Math.exp(-d*e),f=(d-n)*e+1;return-bI+h*f},o=d=>{const h=Math.exp(-d*e),f=(n-d)*(e*e);return h*f});const c=5/e,u=KOe(a,o,c);if(e=Ic(e),isNaN(u))return{stiffness:Ui.stiffness,damping:Ui.damping,duration:e};{const d=Math.pow(u,2)*i;return{stiffness:d,damping:l*2*Math.sqrt(i*d),duration:e}}}const qOe=12;function KOe(e,r,n){let i=n;for(let a=1;a<qOe;a++)i=i-e(i)/r(i);return i}function UR(e,r){return e*Math.sqrt(1-r*r)}const GOe=["duration","bounce"],XOe=["stiffness","damping","mass"];function JW(e,r){return r.some(n=>e[n]!==void 0)}function YOe(e){let r={velocity:Ui.velocity,stiffness:Ui.stiffness,damping:Ui.damping,mass:Ui.mass,isResolvedFromDuration:!1,...e};if(!JW(e,XOe)&&JW(e,GOe))if(r.velocity=0,e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),a=i*i,o=2*Ld(.05,1,1-(e.bounce||0))*Math.sqrt(a);r={...r,mass:Ui.mass,stiffness:a,damping:o}}else{const n=WOe({...e,velocity:0});r={...r,...n,mass:Ui.mass},r.isResolvedFromDuration=!0}return r}function IE(e=Ui.visualDuration,r=Ui.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:r}:e;let{restSpeed:i,restDelta:a}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],c={done:!1,value:o},{stiffness:u,damping:d,mass:h,duration:f,velocity:p,isResolvedFromDuration:m}=YOe({...n,velocity:-_c(n.velocity||0)}),A=p||0,g=d/(2*Math.sqrt(u*h)),y=l-o,x=_c(Math.sqrt(u/h)),b=Math.abs(y)<5;i||(i=b?Ui.restSpeed.granular:Ui.restSpeed.default),a||(a=b?Ui.restDelta.granular:Ui.restDelta.default);let v;if(g<1){const _=UR(x,g);v=C=>{const N=Math.exp(-g*x*C);return l-N*((A+g*x*y)/_*Math.sin(_*C)+y*Math.cos(_*C))}}else if(g===1)v=_=>l-Math.exp(-x*_)*(y+(A+x*y)*_);else{const _=x*Math.sqrt(g*g-1);v=C=>{const N=Math.exp(-g*x*C),S=Math.min(_*C,300);return l-N*((A+g*x*y)*Math.sinh(S)+_*y*Math.cosh(S))/_}}const j={calculatedDuration:m&&f||null,next:_=>{const C=v(_);if(m)c.done=_>=f;else{let N=_===0?A:0;g<1&&(N=_===0?Ic(A):Ide(v,_,C));const S=Math.abs(N)<=i,E=Math.abs(l-C)<=a;c.done=S&&E}return c.value=c.done?l:C,c},toString:()=>{const _=Math.min(O8(j),PE),C=Pde(N=>j.next(_*N).value,_,30);return _+"ms "+C},toTransition:()=>{}};return j}IE.applyToOptions=e=>{const r=HOe(e,100,IE);return e.ease=r.ease,e.duration=Ic(r.duration),e.type="keyframes",e};function $R({keyframes:e,velocity:r=0,power:n=.8,timeConstant:i=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:l,min:c,max:u,restDelta:d=.5,restSpeed:h}){const f=e[0],p={done:!1,value:f},m=S=>c!==void 0&&S<c||u!==void 0&&S>u,A=S=>c===void 0?u:u===void 0||Math.abs(c-S)<Math.abs(u-S)?c:u;let g=n*r;const y=f+g,x=l===void 0?y:l(y);x!==y&&(g=x-f);const b=S=>-g*Math.exp(-S/i),v=S=>x+b(S),j=S=>{const E=b(S),O=v(S);p.done=Math.abs(E)<=d,p.value=p.done?x:O};let _,C;const N=S=>{m(p.value)&&(_=S,C=IE({keyframes:[p.value,A(p.value)],velocity:Ide(v,S,p.value),damping:a,stiffness:o,restDelta:d,restSpeed:h}))};return N(0),{calculatedDuration:null,next:S=>{let E=!1;return!C&&_===void 0&&(E=!0,j(S),N(S)),_!==void 0&&S>=_?C.next(S-_):(!E&&j(S),p)}}}function JOe(e,r,n){const i=[],a=n||nf.mix||Tde,o=e.length-1;for(let l=0;l<o;l++){let c=a(e[l],e[l+1]);if(r){const u=Array.isArray(r)?r[l]||Pc:r;c=C_(u,c)}i.push(c)}return i}function ZOe(e,r,{clamp:n=!0,ease:i,mixer:a}={}){const o=e.length;if(Vv(o===r.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>r[0];if(o===2&&r[0]===r[1])return()=>r[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),r=[...r].reverse());const c=JOe(r,i,a),u=c.length,d=h=>{if(l&&h<e[0])return r[0];let f=0;if(u>1)for(;f<e.length-2&&!(h<e[f+1]);f++);const p=G2(e[f],e[f+1],h);return c[f](p)};return n?h=>d(Ld(e[0],e[o-1],h)):d}function eLe(e,r){const n=e[e.length-1];for(let i=1;i<=r;i++){const a=G2(0,r,i);e.push(Qi(n,1,a))}}function tLe(e){const r=[0];return eLe(r,e.length-1),r}function rLe(e,r){return e.map(n=>n*r)}function nLe(e,r){return e.map(()=>r||vde).splice(0,e.length-1)}function Lw({duration:e=300,keyframes:r,times:n,ease:i="easeInOut"}){const a=pOe(i)?i.map(VW):VW(i),o={done:!1,value:r[0]},l=rLe(n&&n.length===r.length?n:tLe(r),e),c=ZOe(l,r,{ease:Array.isArray(a)?a:nLe(r,a)});return{calculatedDuration:e,next:u=>(o.value=c(u),o.done=u>=e,o)}}const iLe=e=>e!==null;function L8(e,{repeat:r,repeatType:n="loop"},i,a=1){const o=e.filter(iLe),c=a<0||r&&n!=="loop"&&r%2===1?0:o.length-1;return!c||i===void 0?o[c]:i}const aLe={decay:$R,inertia:$R,tween:Lw,keyframes:Lw,spring:IE};function Fde(e){typeof e.type=="string"&&(e.type=aLe[e.type])}class R8{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(r=>{this.resolve=r})}notifyFinished(){this.resolve()}then(r,n){return this.finished.then(r,n)}}const sLe=e=>e/100;class D8 extends R8{constructor(r){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var i,a;const{motionValue:n}=this.options;n&&n.updatedAt!==_o.now()&&this.tick(_o.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(i=this.options).onStop)==null||a.call(i))},this.options=r,this.initAnimation(),this.play(),r.autoplay===!1&&this.pause()}initAnimation(){const{options:r}=this;Fde(r);const{type:n=Lw,repeat:i=0,repeatDelay:a=0,repeatType:o,velocity:l=0}=r;let{keyframes:c}=r;const u=n||Lw;u!==Lw&&typeof c[0]!="number"&&(this.mixKeyframes=C_(sLe,Tde(c[0],c[1])),c=[0,100]);const d=u({...r,keyframes:c});o==="mirror"&&(this.mirroredGenerator=u({...r,keyframes:[...c].reverse(),velocity:-l})),d.calculatedDuration===null&&(d.calculatedDuration=O8(d));const{calculatedDuration:h}=d;this.calculatedDuration=h,this.resolvedDuration=h+a,this.totalDuration=this.resolvedDuration*(i+1)-a,this.generator=d}updateTime(r){const n=Math.round(r-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(r,n=!1){const{generator:i,totalDuration:a,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return i.next(0);const{delay:d=0,keyframes:h,repeat:f,repeatType:p,repeatDelay:m,type:A,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,r):this.speed<0&&(this.startTime=Math.min(r-a/this.speed,this.startTime)),n?this.currentTime=r:this.updateTime(r);const x=this.currentTime-d*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?x<0:x>a;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let v=this.currentTime,j=i;if(f){const S=Math.min(this.currentTime,a)/c;let E=Math.floor(S),O=S%1;!O&&S>=1&&(O=1),O===1&&E--,E=Math.min(E,f+1),!!(E%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/c)):p==="mirror"&&(j=l)),v=Ld(0,1,O)*c}const _=b?{done:!1,value:h[0]}:j.next(v);o&&(_.value=o(_.value));let{done:C}=_;!b&&u!==null&&(C=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return N&&A!==$R&&(_.value=L8(h,this.options,y,this.speed)),g&&g(_.value),N&&this.finish(),_}then(r,n){return this.finished.then(r,n)}get duration(){return _c(this.calculatedDuration)}get iterationDuration(){const{delay:r=0}=this.options||{};return this.duration+_c(r)}get time(){return _c(this.currentTime)}set time(r){var n;r=Ic(r),this.currentTime=r,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=r:this.driver&&(this.startTime=this.driver.now()-r/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(r){this.updateTime(_o.now());const n=this.playbackSpeed!==r;this.playbackSpeed=r,n&&(this.time=_c(this.currentTime))}play(){var a,o;if(this.isStopped)return;const{driver:r=QOe,startTime:n}=this.options;this.driver||(this.driver=r(l=>this.tick(l))),(o=(a=this.options).onPlay)==null||o.call(a);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_o.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var r,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(r=this.options).onComplete)==null||n.call(r)}cancel(){var r,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(r=this.options).onCancel)==null||n.call(r)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(r){return this.startTime=0,this.tick(r,!0)}attachTimeline(r){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),r.observe(this)}}function oLe(e){for(let r=1;r<e.length;r++)e[r]??(e[r]=e[r-1])}const kA=e=>e*180/Math.PI,QR=e=>{const r=kA(Math.atan2(e[1],e[0]));return HR(r)},lLe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:QR,rotateZ:QR,skewX:e=>kA(Math.atan(e[1])),skewY:e=>kA(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},HR=e=>(e=e%360,e<0&&(e+=360),e),ZW=QR,eq=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),tq=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),cLe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:eq,scaleY:tq,scale:e=>(eq(e)+tq(e))/2,rotateX:e=>HR(kA(Math.atan2(e[6],e[5]))),rotateY:e=>HR(kA(Math.atan2(-e[2],e[0]))),rotateZ:ZW,rotate:ZW,skewX:e=>kA(Math.atan(e[4])),skewY:e=>kA(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function VR(e){return e.includes("scale")?1:0}function WR(e,r){if(!e||e==="none")return VR(r);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,a;if(n)i=cLe,a=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=lLe,a=c}if(!a)return VR(r);const o=i[r],l=a[1].split(",").map(dLe);return typeof o=="function"?o(l):l[o]}const uLe=(e,r)=>{const{transform:n="none"}=getComputedStyle(e);return WR(n,r)};function dLe(e){return parseFloat(e.trim())}const X0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Y0=new Set(X0),rq=e=>e===G0||e===$t,hLe=new Set(["x","y","z"]),fLe=X0.filter(e=>!hLe.has(e));function mLe(e){const r=[];return fLe.forEach(n=>{const i=e.getValue(n);i!==void 0&&(r.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),r}const Em={width:({x:e},{paddingLeft:r="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(r)-parseFloat(n),height:({y:e},{paddingTop:r="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(r)-parseFloat(n),top:(e,{top:r})=>parseFloat(r),left:(e,{left:r})=>parseFloat(r),bottom:({y:e},{top:r})=>parseFloat(r)+(e.max-e.min),right:({x:e},{left:r})=>parseFloat(r)+(e.max-e.min),x:(e,{transform:r})=>WR(r,"x"),y:(e,{transform:r})=>WR(r,"y")};Em.translateX=Em.x;Em.translateY=Em.y;const eg=new Set;let qR=!1,KR=!1,GR=!1;function Ode(){if(KR){const e=Array.from(eg).filter(i=>i.needsMeasurement),r=new Set(e.map(i=>i.element)),n=new Map;r.forEach(i=>{const a=mLe(i);a.length&&(n.set(i,a),i.render())}),e.forEach(i=>i.measureInitialState()),r.forEach(i=>{i.render();const a=n.get(i);a&&a.forEach(([o,l])=>{var c;(c=i.getValue(o))==null||c.set(l)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}KR=!1,qR=!1,eg.forEach(e=>e.complete(GR)),eg.clear()}function Lde(){eg.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(KR=!0)})}function pLe(){GR=!0,Lde(),Ode(),GR=!1}class M8{constructor(r,n,i,a,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...r],this.onComplete=n,this.name=i,this.motionValue=a,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(eg.add(this),qR||(qR=!0,mi.read(Lde),mi.resolveKeyframes(Ode))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:r,name:n,element:i,motionValue:a}=this;if(r[0]===null){const o=a==null?void 0:a.get(),l=r[r.length-1];if(o!==void 0)r[0]=o;else if(i&&n){const c=i.readValue(n,l);c!=null&&(r[0]=c)}r[0]===void 0&&(r[0]=l),a&&o===void 0&&a.set(r[0])}oLe(r)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(r=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,r),eg.delete(this)}cancel(){this.state==="scheduled"&&(eg.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ALe=e=>e.startsWith("--");function gLe(e,r,n){ALe(r)?e.style.setProperty(r,n):e.style[r]=n}const xLe={};function Rde(e,r){const n=ude(e);return()=>xLe[r]??n()}const yLe=Rde(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Dde=Rde(()=>{try{document.createElement("div").animate({opacity:0}
1035,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),aw=([e,r,n,i])=>`cubic-bezier(${e}, ${r}, ${n}, ${i})`,nq={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:aw([0,.65,.55,1]),circOut:aw([.55,0,1,.45]),backIn:aw([.31,.01,.66,-.59]),backOut:aw([.33,1.53,.69,.99])};function Mde(e,r){if(e)return typeof e=="function"?Dde()?Pde(e,r):"ease-out":bde(e)?aw(e):Array.isArray(e)?e.map(n=>Mde(n,r)||nq.easeOut):nq[e]}function vLe(e,r,n,{delay:i=0,duration:a=300,repeat:o=0,repeatType:l="loop",ease:c="easeOut",times:u}={},d=void 0){const h={[r]:n};u&&(h.offset=u);const f=Mde(c,a);Array.isArray(f)&&(h.easing=f);const p={delay:i,duration:a,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return d&&(p.pseudoElement=d),e.animate(h,p)}function zde(e){return typeof e=="function"&&"applyToOptions"in e}function bLe({type:e,...r}){return zde(e)&&Dde()?e.applyToOptions(r):(r.duration??(r.duration=300),r.ease??(r.ease="easeOut"),r)}class Ude extends R8{constructor(r){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!r)return;const{element:n,name:i,keyframes:a,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:c,onComplete:u}=r;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=r,Vv(typeof r.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=bLe(r);this.animation=vLe(n,i,a,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const h=L8(a,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(h):gLe(n,i,h),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var r,n;(n=(r=this.animation).finish)==null||n.call(r)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:r}=this;r==="idle"||r==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,i,a;const r=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(r!=null&&r.isConnected)&&((a=(i=this.animation).commitStyles)==null||a.call(i))}get duration(){var n,i;const r=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.call(n).duration)||0;return _c(Number(r))}get iterationDuration(){const{delay:r=0}=this.options||{};return this.duration+_c(r)}get time(){return _c(Number(this.animation.currentTime)||0)}set time(r){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ic(r)}get speed(){return this.animation.playbackRate}set speed(r){r<0&&(this.finishedTime=null),this.animation.playbackRate=r}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(r){this.manualStartTime=this.animation.startTime=r}attachTimeline({timeline:r,observe:n}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,r&&yLe()?(this.animation.timeline=r,Pc):n(this)}}const $de={anticipate:gde,backInOut:Ade,circInOut:yde};function wLe(e){return e in $de}function jLe(e){typeof e.ease=="string"&&wLe(e.ease)&&(e.ease=$de[e.ease])}const wI=10;class _Le extends Ude{constructor(r){jLe(r),Fde(r),super(r),r.startTime!==void 0&&(this.startTime=r.startTime),this.options=r}updateMotionValue(r){const{motionValue:n,onUpdate:i,onComplete:a,element:o,...l}=this.options;if(!n)return;if(r!==void 0){n.set(r);return}const c=new D8({...l,autoplay:!1}),u=Math.max(wI,_o.now()-this.startTime),d=Ld(0,wI,u-wI);n.setWithVelocity(c.sample(Math.max(0,u-d)).value,c.sample(u).value,d),c.stop()}}const iq=(e,r)=>r==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Nu.test(e)||e==="0")&&!e.startsWith("url("));function CLe(e){const r=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==r)return!0}function NLe(e,r,n,i){const a=e[0];if(a===null)return!1;if(r==="display"||r==="visibility")return!0;const o=e[e.length-1],l=iq(a,r),c=iq(o,r);return F4(l===c,`You are trying to animate ${r} from "${a}" to "${o}". "${l?o:a}" is not an animatable value.`,"value-not-animatable"),!l||!c?!1:CLe(e)||(n==="spring"||zde(n))&&i}function XR(e){e.duration=0,e.type="keyframes"}const SLe=new Set(["opacity","clipPath","filter","transform"]),kLe=ude(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ELe(e){var h;const{motionValue:r,name:n,repeatDelay:i,repeatType:a,damping:o,type:l}=e;if(!(((h=r==null?void 0:r.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=r.owner.getProps();return kLe()&&n&&SLe.has(n)&&(n!=="transform"||!d)&&!u&&!i&&a!=="mirror"&&o!==0&&l!=="inertia"}const BLe=40;class TLe extends R8{constructor({autoplay:r=!0,delay:n=0,type:i="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:l="loop",keyframes:c,name:u,motionValue:d,element:h,...f}){var A;super(),this.stop=()=>{var g,y;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=_o.now();const p={autoplay:r,delay:n,type:i,repeat:a,repeatDelay:o,repeatType:l,name:u,motionValue:d,element:h,...f},m=(h==null?void 0:h.KeyframeResolver)||M8;this.keyframeResolver=new m(c,(g,y,x)=>this.onKeyframesResolved(g,y,p,!x),u,d,h),(A=this.keyframeResolver)==null||A.scheduleResolve()}onKeyframesResolved(r,n,i,a){var y,x;this.keyframeResolver=void 0;const{name:o,type:l,velocity:c,delay:u,isHandoff:d,onUpdate:h}=i;this.resolvedAt=_o.now(),NLe(r,o,l,c)||((nf.instantAnimations||!u)&&(h==null||h(L8(r,i,n))),r[0]=r[r.length-1],XR(i),i.repeat=0);const p={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>BLe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:r},m=!d&&ELe(p),A=(x=(y=p.motionValue)==null?void 0:y.owner)==null?void 0:x.current,g=m?new _Le({...p,element:A}):new D8(p);
vendor: 7,061 bytes, line 1035
1035g.finished.then(()=>{this.notifyFinished()}).catch(Pc),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(r,n){return this.finished.finally(r).then(()=>{})}get animation(){var r;return this._animation||((r=this.keyframeResolver)==null||r.resume(),pLe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(r){this.animation.time=r}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(r){this.animation.speed=r}get startTime(){return this.animation.startTime}attachTimeline(r){return this._animation?this.stopTimeline=this.animation.attachTimeline(r):this.pendingTimeline=r,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var r;this._animation&&this.animation.cancel(),(r=this.keyframeResolver)==null||r.cancel()}}function Qde(e,r,n,i=0,a=1){const o=Array.from(e).sort((d,h)=>d.sortNodePosition(h)).indexOf(r),l=e.size,c=(l-1)*i;return typeof n=="function"?n(o,l):a===1?o*i:c-o*i}const PLe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ILe(e){const r=PLe.exec(e);if(!r)return[,];const[,n,i,a]=r;return[`--${n??i}`,a]}const FLe=4;function Hde(e,r,n=1){Vv(n<=FLe,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,a]=ILe(e);if(!i)return;const o=window.getComputedStyle(r).getPropertyValue(i);if(o){const l=o.trim();return ode(l)?parseFloat(l):l}return T8(a)?Hde(a,r,n+1):a}const OLe={type:"spring",stiffness:500,damping:25,restSpeed:10},LLe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),RLe={type:"keyframes",duration:.8},DLe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},MLe=(e,{keyframes:r})=>r.length>2?RLe:Y0.has(e)?e.startsWith("scale")?LLe(r[1]):OLe:DLe,zLe=e=>e!==null;function ULe(e,{repeat:r,repeatType:n="loop"},i){const a=e.filter(zLe),o=r&&n!=="loop"&&r%2===1?0:a.length-1;return!o||i===void 0?a[o]:i}function Vde(e,r){if(e!=null&&e.inherit&&r){const{inherit:n,...i}=e;return{...r,...i}}return e}function z8(e,r){const n=(e==null?void 0:e[r])??(e==null?void 0:e.default)??e;return n!==e?Vde(n,e):n}function $Le({when:e,delay:r,delayChildren:n,staggerChildren:i,staggerDirection:a,repeat:o,repeatType:l,repeatDelay:c,from:u,elapsed:d,...h}){return!!Object.keys(h).length}const U8=(e,r,n,i={},a,o)=>l=>{const c=z8(i,e)||{},u=c.delay||i.delay||0;let{elapsed:d=0}=i;d=d-Ic(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:r.getVelocity(),...c,delay:-d,onUpdate:p=>{r.set(p),c.onUpdate&&c.onUpdate(p)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:r,element:o?void 0:a};$Le(c)||Object.assign(h,MLe(e,h)),h.duration&&(h.duration=Ic(h.duration)),h.repeatDelay&&(h.repeatDelay=Ic(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let f=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(XR(h),h.delay===0&&(f=!0)),(nf.instantAnimations||nf.skipAnimations||a!=null&&a.shouldSkipAnimations)&&(f=!0,XR(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,f&&!o&&r.get()!==void 0){const p=ULe(h.keyframes,c);if(p!==void 0){mi.update(()=>{h.onUpdate(p),h.onComplete()});return}}return c.isSync?new D8(h):new TLe(h)};function aq(e){const r=[{},{}];return e==null||e.values.forEach((n,i)=>{r[0][i]=n.get(),r[1][i]=n.getVelocity()}),r}function $8(e,r,n,i){if(typeof r=="function"){const[a,o]=aq(i);r=r(n!==void 0?n:e.custom,a,o)}if(typeof r=="string"&&(r=e.variants&&e.variants[r]),typeof r=="function"){const[a,o]=aq(i);r=r(n!==void 0?n:e.custom,a,o)}return r}function Zy(e,r,n){const i=e.getProps();return $8(i,r,n!==void 0?n:i.custom,e)}const Wde=new Set(["width","height","top","left","right","bottom",...X0]),sq=30,QLe=e=>!isNaN(parseFloat(e));class HLe{constructor(r,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var o;const a=_o.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(r),this.owner=n.owner}setCurrent(r){this.current=r,this.updatedAt=_o.now(),this.canTrackVelocity===null&&r!==void 0&&(this.canTrackVelocity=QLe(this.current))}setPrevFrameValue(r=this.current){this.prevFrameValue=r,this.prevUpdatedAt=this.updatedAt}onChange(r){return this.on("change",r)}on(r,n){this.events[r]||(this.events[r]=new k8);const i=this.events[r].add(n);return r==="change"?()=>{i(),mi.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const r in this.events)this.events[r].clear()}attach(r,n){this.passiveEffect=r,this.stopPassiveEffect=n}set(r){this.passiveEffect?this.passiveEffect(r,this.updateAndNotify):this.updateAndNotify(r)}setWithVelocity(r,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=r,this.prevUpdatedAt=this.updatedAt-i}jump(r,n=!0){this.updateAndNotify(r),this.prev=r,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var r;(r=this.events.change)==null||r.notify(this.current)}addDependent(r){this.dependents||(this.dependents=new Set),this.dependents.add(r)}removeDependent(r){this.dependents&&this.dependents.delete(r)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const r=_o.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||r-this.updatedAt>sq)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,sq);return dde(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(r){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=r(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var r,n;(r=this.dependents)==null||r.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wv(e,r){return new HLe(e,r)}const YR=e=>Array.isArray(e);function VLe(e,r,n){e.hasValue(r)?e.getValue(r).set(n):e.addValue(r,Wv(n))}function WLe(e){return YR(e)?e[e.length-1]||0:e}function qLe(e,r){const n=Zy(e,r);let{transitionEnd:i={},transition:a={},...o}=n||{};o={...o,...i};for(const l in o){const c=WLe(o[l]);VLe(e,l,c)}}const io=e=>!!(e&&e.getVelocity);function KLe(e){return!!(io(e)&&e.add)}function JR(e,r){const n=e.getValue("willChange");if(KLe(n))return n.add(r);if(!n&&nf.WillChange){const i=new nf.WillChange("auto");
vendor: 4,554 bytes, line 1035
1035e.addValue("willChange",i),i.add(r)}}function Q8(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}const GLe="framerAppearId",qde="data-"+Q8(GLe);function Kde(e){return e.props[qde]}function XLe({protectedKeys:e,needsAnimating:r},n){const i=e.hasOwnProperty(n)&&r[n]!==!0;return r[n]=!1,i}function Gde(e,r,{delay:n=0,transitionOverride:i,type:a}={}){let{transition:o,transitionEnd:l,...c}=r;const u=e.getDefaultTransition();o=o?Vde(o,u):u;const d=o==null?void 0:o.reduceMotion;i&&(o=i);const h=[],f=a&&e.animationState&&e.animationState.getState()[a];for(const p in c){const m=e.getValue(p,e.latestValues[p]??null),A=c[p];if(A===void 0||f&&XLe(f,p))continue;const g={delay:n,...z8(o||{},p)},y=m.get();if(y!==void 0&&!m.isAnimating&&!Array.isArray(A)&&A===y&&!g.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const j=Kde(e);if(j){const _=window.MotionHandoffAnimation(j,p,mi);_!==null&&(g.startTime=_,x=!0)}}JR(e,p);const b=d??e.shouldReduceMotion;m.start(U8(p,m,A,b&&Wde.has(p)?{type:!1}:g,e,x));const v=m.animation;v&&h.push(v)}if(l){const p=()=>mi.update(()=>{l&&qLe(e,l)});h.length?Promise.all(h).then(p):p()}return h}function ZR(e,r,n={}){var u;const i=Zy(e,r,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(Gde(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:f,staggerDirection:p}=a;return YLe(e,r,d,h,f,p,n)}:()=>Promise.resolve(),{when:c}=a;if(c){const[d,h]=c==="beforeChildren"?[o,l]:[l,o];return d().then(()=>h())}else return Promise.all([o(),l(n.delay)])}function YLe(e,r,n=0,i=0,a=0,o=1,l){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",r),c.push(ZR(u,r,{...l,delay:n+(typeof i=="function"?0:i)+Qde(e.variantChildren,u,i,a,o)}).then(()=>u.notify("AnimationComplete",r)));return Promise.all(c)}function JLe(e,r,n={}){e.notify("AnimationStart",r);let i;if(Array.isArray(r)){const a=r.map(o=>ZR(e,o,n));i=Promise.all(a)}else if(typeof r=="string")i=ZR(e,r,n);else{const a=typeof r=="function"?Zy(e,r,n.custom):r;i=Promise.all(Gde(e,a,n))}return i.then(()=>{e.notify("AnimationComplete",r)})}const ZLe={test:e=>e==="auto",parse:e=>e},Xde=e=>r=>r.test(e),Yde=[G0,$t,kd,Xf,SOe,NOe,ZLe],oq=e=>Yde.find(Xde(e));function eRe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||cde(e):!0}const tRe=new Set(["brightness","contrast","saturate","opacity"]);function rRe(e){const[r,n]=e.slice(0,-1).split("(");if(r==="drop-shadow")return e;const[i]=n.match(P8)||[];if(!i)return e;const a=n.replace(i,"");let o=tRe.has(r)?1:0;return i!==n&&(o*=100),r+"("+o+a+")"}const nRe=/\b([a-z-]*)\(.*?\)/gu,eD={...Nu,getAnimatableNone:e=>{const r=e.match(nRe);return r?r.map(rRe).join(" "):e}},tD={...Nu,getAnimatableNone:e=>{const r=Nu.parse(e);return Nu.createTransformer(e)(r.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},lq={...G0,transform:Math.round},iRe={rotate:Xf,rotateX:Xf,rotateY:Xf,rotateZ:Xf,scale:jN,scaleX:jN,scaleY:jN,scaleZ:jN,skew:Xf,skewX:Xf,skewY:Xf,distance:$t,translateX:$t,translateY:$t,translateZ:$t,x:$t,y:$t,z:$t,perspective:$t,transformPerspective:$t,opacity:X2,originX:KW,originY:KW,originZ:$t},H8={borderWidth:$t,borderTopWidth:$t,borderRightWidth:$t,borderBottomWidth:$t,borderLeftWidth:$t,borderRadius:$t,borderTopLeftRadius:$t,borderTopRightRadius:$t,borderBottomRightRadius:$t,borderBottomLeftRadius:$t,width:$t,maxWidth:$t,height:$t,maxHeight:$t,top:$t,right:$t,bottom:$t,left:$t,inset:$t,insetBlock:$t,insetBlockStart:$t,insetBlockEnd:$t,insetInline:$t,insetInlineStart:$t,insetInlineEnd:$t,padding:$t,paddingTop:$t,paddingRight:$t,paddingBottom:$t,paddingLeft:$t,paddingBlock:$t,paddingBlockStart:$t,paddingBlockEnd:$t,paddingInline:$t,paddingInlineStart:$t,paddingInlineEnd:$t,margin:$t,marginTop:$t,marginRight:$t,marginBottom:$t,marginLeft:$t,marginBlock:$t,marginBlockStart:$t,marginBlockEnd:$t,marginInline:$t,marginInlineStart:$t,marginInlineEnd:$t,fontSize:$t,backgroundPositionX:$t,backgroundPositionY:$t,...iRe,zIndex:lq,fillOpacity:X2,strokeOpacity:X2,numOctaves:lq},aRe={...H8,color:ka,backgroundColor:ka,outlineColor:ka,fill:ka,stroke:ka,borderColor:ka,borderTopColor:ka,borderRightColor:ka,borderBottomColor:ka,borderLeftColor:ka,filter:eD,WebkitFilter:eD,mask:tD,WebkitMask:tD},Jde=e=>aRe[e],sRe=new Set([eD,tD]);function Zde(e,r){let n=Jde(e);return sRe.has(n)||(n=Nu),n.getAnimatableNone?n.getAnimatableNone(r):void 0}
vendor: 1,726 bytes, line 1035
1035const oRe=new Set(["auto","none","0"]);function lRe(e,r,n){let i=0,a;for(;i<e.length&&!a;){const o=e[i];typeof o=="string"&&!oRe.has(o)&&Y2(o).values.length&&(a=e[i]),i++}if(a&&n)for(const o of r)e[o]=Zde(n,a)}class cRe extends M8{constructor(r,n,i,a,o){super(r,n,i,a,o,!0)}readKeyframes(){const{unresolvedKeyframes:r,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<r.length;h++){let f=r[h];if(typeof f=="string"&&(f=f.trim(),T8(f))){const p=Hde(f,n.current);p!==void 0&&(r[h]=p),h===r.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Wde.has(i)||r.length!==2)return;const[a,o]=r,l=oq(a),c=oq(o),u=qW(a),d=qW(o);if(u!==d&&Em[i]){this.needsMeasurement=!0;return}if(l!==c)if(rq(l)&&rq(c))for(let h=0;h<r.length;h++){const f=r[h];typeof f=="string"&&(r[h]=parseFloat(f))}else Em[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:r,name:n}=this,i=[];for(let a=0;a<r.length;a++)(r[a]===null||eRe(r[a]))&&i.push(a);i.length&&lRe(r,i,n)}measureInitialState(){const{element:r,unresolvedKeyframes:n,name:i}=this;if(!r||!r.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Em[i](r.measureViewportBox(),window.getComputedStyle(r.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&r.getValue(i,a).jump(a,!1)}measureEndState(){var c;const{element:r,name:n,unresolvedKeyframes:i}=this;if(!r||!r.current)return;const a=r.getValue(n);a&&a.jump(this.measuredOrigin,!1);const o=i.length-1,l=i[o];i[o]=Em[n](r.measureViewportBox(),window.getComputedStyle(r.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(c=this.removedTransforms)!=null&&c.length&&this.removedTransforms.forEac
vendor: 9,608 bytes, line 1035
1035h(([u,d])=>{r.getValue(u).set(d)}),this.resolveNoneKeyframes()}}const uRe=new Set(["opacity","clipPath","filter","transform"]);function ehe(e,r,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const a=document.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e).filter(i=>i!=null)}const the=(e,r)=>r&&typeof e=="number"?r.transform(e):e;function rD(e){return lde(e)&&"offsetHeight"in e}const{schedule:V8,cancel:BUt}=wde(queueMicrotask,!1),su={x:!1,y:!1};function rhe(){return su.x||su.y}function dRe(e){return e==="x"||e==="y"?su[e]?null:(su[e]=!0,()=>{su[e]=!1}):su.x||su.y?null:(su.x=su.y=!0,()=>{su.x=su.y=!1})}function nhe(e,r){const n=ehe(e),i=new AbortController,a={passive:!0,...r,signal:i.signal};return[n,a,()=>i.abort()]}function hRe(e){return!(e.pointerType==="touch"||rhe())}function fRe(e,r,n={}){const[i,a,o]=nhe(e,n);return i.forEach(l=>{let c=!1,u=!1,d;const h=()=>{l.removeEventListener("pointerleave",A)},f=y=>{d&&(d(y),d=void 0),h()},p=y=>{c=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),u&&(u=!1,f(y))},m=()=>{c=!0,window.addEventListener("pointerup",p,a),window.addEventListener("pointercancel",p,a)},A=y=>{if(y.pointerType!=="touch"){if(c){u=!0;return}f(y)}},g=y=>{if(!hRe(y))return;u=!1;const x=r(l,y);typeof x=="function"&&(d=x,l.addEventListener("pointerleave",A,a))};l.addEventListener("pointerenter",g,a),l.addEventListener("pointerdown",m,a)}),o}const ihe=(e,r)=>r?e===r?!0:ihe(e,r.parentElement):!1,W8=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,mRe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pRe(e){return mRe.has(e.tagName)||e.isContentEditable===!0}const ARe=new Set(["INPUT","SELECT","TEXTAREA"]);function gRe(e){return ARe.has(e.tagName)||e.isContentEditable===!0}const uk=new WeakSet;function cq(e){return r=>{r.key==="Enter"&&e(r)}}function jI(e,r){e.dispatchEvent(new PointerEvent("pointer"+r,{isPrimary:!0,bubbles:!0}))}const xRe=(e,r)=>{const n=e.currentTarget;if(!n)return;const i=cq(()=>{if(uk.has(n))return;jI(n,"down");const a=cq(()=>{jI(n,"up")}),o=()=>jI(n,"cancel");n.addEventListener("keyup",a,r),n.addEventListener("blur",o,r)});n.addEventListener("keydown",i,r),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),r)};function uq(e){return W8(e)&&!rhe()}const dq=new WeakSet;function yRe(e,r,n={}){const[i,a,o]=nhe(e,n),l=c=>{const u=c.currentTarget;if(!uq(c)||dq.has(c))return;uk.add(u),n.stopPropagation&&dq.add(c);const d=r(u,c),h=(m,A)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),uk.has(u)&&uk.delete(u),uq(m)&&typeof d=="function"&&d(m,{success:A})},f=m=>{h(m,u===window||u===document||n.useGlobalTarget||ihe(u,m.target))},p=m=>{h(m,!1)};window.addEventListener("pointerup",f,a),window.addEventListener("pointercancel",p,a)};return i.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",l,a),rD(c)&&(c.addEventListener("focus",d=>xRe(d,a)),!pRe(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),o}function q8(e){return lde(e)&&"ownerSVGElement"in e}const dk=new WeakMap;let Yf;const ahe=(e,r,n)=>(i,a)=>a&&a[0]?a[0][e+"Size"]:q8(i)&&"getBBox"in i?i.getBBox()[r]:i[n],vRe=ahe("inline","width","offsetWidth"),bRe=ahe("block","height","offsetHeight");function wRe({target:e,borderBoxSize:r}){var n;(n=dk.get(e))==null||n.forEach(i=>{i(e,{get width(){return vRe(e,r)},get height(){return bRe(e,r)}})})}function jRe(e){e.forEach(wRe)}function _Re(){typeof ResizeObserver>"u"||(Yf=new ResizeObserver(jRe))}function CRe(e,r){Yf||_Re();const n=ehe(e);return n.forEach(i=>{let a=dk.get(i);a||(a=new Set,dk.set(i,a)),a.add(r),Yf==null||Yf.observe(i)}),()=>{n.forEach(i=>{const a=dk.get(i);a==null||a.delete(r),a!=null&&a.size||Yf==null||Yf.unobserve(i)})}}const hk=new Set;let Ny;function NRe(){Ny=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};hk.forEach(r=>r(e))},window.addEventListener("resize",Ny)}function SRe(e){return hk.add(e),Ny||NRe(),()=>{hk.delete(e),!hk.size&&typeof Ny=="function"&&(window.removeEventListener("resize",Ny),Ny=void 0)}}function hq(e,r){return typeof e=="function"?SRe(e):CRe(e,r)}function kRe(e){return q8(e)&&e.tagName==="svg"}const ERe=[...Yde,ka,Nu],BRe=e=>ERe.find(Xde(e)),fq=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sy=()=>({x:fq(),y:fq()}),mq=()=>({min:0,max:0}),Wa=()=>({x:mq(),y:mq()}),TRe=new WeakMap;function O4(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function J2(e){return typeof e=="string"||Array.isArray(e)}const K8=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],G8=["initial",...K8];function L4(e){return O4(e.animate)||G8.some(r=>J2(e[r]))}function she(e){return!!(L4(e)||e.variants)}function PRe(e,r,n){for(const i in r){const a=r[i],o=n[i];if(io(a))e.addValue(i,a);else if(io(o))e.addValue(i,Wv(a,{owner:e}));else if(o!==a)if(e.hasValue(i)){const l=e.getValue(i);l.liveStyle===!0?l.jump(a):l.hasAnimated||l.set(a)}else{const l=e.getStaticValue(i);e.addValue(i,Wv(l!==void 0?l:a,{owner:e}))}}for(const i in n)r[i]===void 0&&e.removeValue(i);return r}const nD={current:null},ohe={current:!1},IRe=typeof window<"u";function FRe(){if(ohe.current=!0,!!IRe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),r=()=>nD.current=e.matches;e.addEventListener("change",r),r()}else nD.current=!1}const pq=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let FE={};function lhe(e){FE=e}function ORe(){return FE}class LRe{scrapeMotionValuesFromProps(r,n,i){return{}}constructor({parent:r,props:n,presenceContext:i,reducedMotionConfig:a,skipAnimations:o,blockInitialAnimation:l,visualState:c},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=M8,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=_o.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,mi.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=c;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=h,this.parent=r,this.props=n,this.presenceContext=i,this.depth=r?r.depth+1:0,this.reducedMotionConfig=a,this.skipAnimationsConfig=o,this.options=u,this.blockInitialAnimation=!!l,this.isControllingVariants=L4(n),this.isVariantNode=she(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(r&&r.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const A=p[m];d[m]!==void 0&&io(A)&&A.set(d[m])}}mount(r){var n,i;if(this.hasBeenMounted)for(const a in this.initialValues)(n=this.values.get(a))==null||n.jump(this.initialValues[a]),this.latestValues[a]=this.initialValues[a];this.current=r,TRe.set(r,this),this.projection&&!this.projection.instance&&this.projection.mount(r),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((a,o)=>this.bindToMotionValue(o,a)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ohe.current||FRe(),this.shouldReduceMotion=nD.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var r;this.projection&&this.projection.unmount(),hp(this.notifyUpdate),hp(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(r=this.parent)==null||r.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const i=this.features[n];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(r){this.children.add(r),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(r)}removeChild(r){this.children.delete(r),this.enteringChildren&&this.enteringChildren.delete(r)}bindToMotionValue(r,n){if(this.valueSubscriptions.has(r)&&this.valueSubscriptions.get(r)(),n.accelerate&&uRe.has(r)&&this.current instanceof HTMLElement){const{factory:l,keyframes:c,times:u,ease:d,duration:h}=n.accelerate,f=new Ude({element:this.current,name:r,keyframes:c,times:u,ease:d,duration:Ic(h)}),p=l(f);this.valueSubscriptions.set(r,()=>{p(),f.cancel()});return}const i=Y0.has(r);i&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",l=>{this.latestValues[r]=l,this.props.onUpdate&&mi.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,r,n)),this.valueSubscriptions.set(r,()=>{a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(r){return!this.current||!this.sortInstanceNodePosition||this.type!==r.type?0:this.sortInstanceNodePosition(this.current,r.current)}updateFeatures(){let r="animation";for(r in FE){const n=FE[r];if(!n)continue;const{isEnabled:i,Feature:a}=n;
vendor: 5,513 bytes, line 1035
1035if(!this.features[r]&&a&&i(this.props)&&(this.features[r]=new a(this)),this.features[r]){const o=this.features[r];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wa()}getStaticValue(r){return this.latestValues[r]}setStaticValue(r,n){this.latestValues[r]=n}update(r,n){(r.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=r,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<pq.length;i++){const a=pq[i];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const o="on"+a,l=r[o];l&&(this.propEventSubscriptions[a]=this.on(a,l))}this.prevMotionValues=PRe(this,this.scrapeMotionValuesFromProps(r,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(r){return this.props.variants?this.props.variants[r]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(r){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(r),()=>n.variantChildren.delete(r)}addValue(r,n){const i=this.values.get(r);n!==i&&(i&&this.removeValue(r),this.bindToMotionValue(r,n),this.values.set(r,n),this.latestValues[r]=n.get())}removeValue(r){this.values.delete(r);const n=this.valueSubscriptions.get(r);n&&(n(),this.valueSubscriptions.delete(r)),delete this.latestValues[r],this.removeValueFromRenderState(r,this.renderState)}hasValue(r){return this.values.has(r)}getValue(r,n){if(this.props.values&&this.props.values[r])return this.props.values[r];let i=this.values.get(r);return i===void 0&&n!==void 0&&(i=Wv(n===null?void 0:n,{owner:this}),this.addValue(r,i)),i}readValue(r,n){let i=this.latestValues[r]!==void 0||!this.current?this.latestValues[r]:this.getBaseTargetFromProps(this.props,r)??this.readValueFromInstance(this.current,r,this.options);return i!=null&&(typeof i=="string"&&(ode(i)||cde(i))?i=parseFloat(i):!BRe(i)&&Nu.test(n)&&(i=Zde(r,n)),this.setBaseTarget(r,io(i)?i.get():i)),io(i)?i.get():i}setBaseTarget(r,n){this.baseTarget[r]=n}getBaseTarget(r){var o;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const l=$8(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);l&&(i=l[r])}if(n&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,r);return a!==void 0&&!io(a)?a:this.initialValues[r]!==void 0&&i===void 0?void 0:this.baseTarget[r]}on(r,n){return this.events[r]||(this.events[r]=new k8),this.events[r].add(n)}notify(r,...n){this.events[r]&&this.events[r].notify(...n)}scheduleRenderMicrotask(){V8.render(this.render)}}class che extends LRe{constructor(){super(...arguments),this.KeyframeResolver=cRe}sortInstanceNodePosition(r,n){return r.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(r,n){const i=r.style;return i?i[n]:void 0}removeValueFromRenderState(r,{vars:n,style:i}){delete n[r],delete i[r]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:r}=this.props;io(r)&&(this.childSubscription=r.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class jp{constructor(r){this.isMounted=!1,this.node=r}update(){}}function uhe({top:e,left:r,right:n,bottom:i}){return{x:{min:r,max:n},y:{min:e,max:i}}}function RRe({x:e,y:r}){return{top:r.min,right:e.max,bottom:r.max,left:e.min}}function DRe(e,r){if(!r)return e;const n=r({x:e.left,y:e.top}),i=r({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function _I(e){return e===void 0||e===1}function iD({scale:e,scaleX:r,scaleY:n}){return!_I(e)||!_I(r)||!_I(n)}function dA(e){return iD(e)||dhe(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function dhe(e){return Aq(e.x)||Aq(e.y)}function Aq(e){return e&&e!=="0%"}function OE(e,r,n){const i=e-n,a=r*i;return n+a}function gq(e,r,n,i,a){return a!==void 0&&(e=OE(e,a,i)),OE(e,n,i)+r}function aD(e,r=0,n=1,i,a){e.min=gq(e.min,r,n,i,a),e.max=gq(e.max,r,n,i,a)}function hhe(e,{x:r,y:n}){aD(e.x,r.translate,r.scale,r.originPoint),aD(e.y,n.translate,n.scale,n.originPoint)}const xq=.999999999999,yq=1.0000000000001;function MRe(e,r,n,i=!1){const a=n.length;if(!a)return;r.x=r.y=1;let o,l;for(let c=0;c<a;c++){o=n[c],l=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ey(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(r.x*=l.x.scale,r.y*=l.y.scale,hhe(e,l)),i&&dA(o.latestValues)&&Ey(e,o.latestValues))}r.x<yq&&r.x>xq&&(r.x=1),r.y<yq&&r.y>xq&&(r.y=1)}function ky(e,r){e.min=e.min+r,e.max=e.max+r}function vq(e,r,n,i,a=.5){const o=Qi(e.min,e.max,a);aD(e,r,n,o,i)}function Ey(e,r){vq(e.x,r.x,r.scaleX,r.scale,r.originX),vq(e.y,r.y,r.scaleY,r.scale,r.originY)}function fhe(e,r){return uhe(DRe(e.getBoundingClientRect(),r))}function zRe(e,r,n){const i=fhe(e,n),{scroll:a}=r;return a&&(ky(i.x,a.offset.x),ky(i.y,a.offset.y)),i}const URe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$Re=X0.length;function QRe(e,r,n){let i="",a=!0;for(let o=0;o<$Re;o++){const l=X0[o],c=e[l];
vendor: 5,192 bytes, line 1035
1035if(c===void 0)continue;let u=!0;if(typeof c=="number")u=c===(l.startsWith("scale")?1:0);else{const d=parseFloat(c);u=l.startsWith("scale")?d===1:d===0}if(!u||n){const d=the(c,H8[l]);if(!u){a=!1;const h=URe[l]||l;i+=`${h}(${d}) `}n&&(r[l]=d)}}return i=i.trim(),n?i=n(r,a?"":i):a&&(i="none"),i}function X8(e,r,n){const{style:i,vars:a,transformOrigin:o}=e;let l=!1,c=!1;for(const u in r){const d=r[u];if(Y0.has(u)){l=!0;continue}else if(_de(u)){a[u]=d;continue}else{const h=the(d,H8[u]);u.startsWith("origin")?(c=!0,o[u]=h):i[u]=h}}if(r.transform||(l||n?i.transform=QRe(r,e.transform,n):i.transform&&(i.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=o;i.transformOrigin=`${u} ${d} ${h}`}}function mhe(e,{style:r,vars:n},i,a){const o=e.style;let l;for(l in r)o[l]=r[l];a==null||a.applyProjectionStyles(o,i);for(l in n)o.setProperty(l,n[l])}function bq(e,r){return r.max===r.min?0:e/(r.max-r.min)*100}const f1={correct:(e,r)=>{if(!r.target)return e;if(typeof e=="string")if($t.test(e))e=parseFloat(e);else return e;const n=bq(e,r.target.x),i=bq(e,r.target.y);return`${n}% ${i}%`}},HRe={correct:(e,{treeScale:r,projectionDelta:n})=>{const i=e,a=Nu.parse(e);if(a.length>5)return i;const o=Nu.createTransformer(e),l=typeof a[0]!="number"?1:0,c=n.x.scale*r.x,u=n.y.scale*r.y;a[0+l]/=c,a[1+l]/=u;const d=Qi(c,u,.5);return typeof a[2+l]=="number"&&(a[2+l]/=d),typeof a[3+l]=="number"&&(a[3+l]/=d),o(a)}},sD={borderRadius:{...f1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:f1,borderTopRightRadius:f1,borderBottomLeftRadius:f1,borderBottomRightRadius:f1,boxShadow:HRe};function phe(e,{layout:r,layoutId:n}){return Y0.has(e)||e.startsWith("origin")||(r||n!==void 0)&&(!!sD[e]||e==="opacity")}function Y8(e,r,n){var l;const i=e.style,a=r==null?void 0:r.style,o={};if(!i)return o;for(const c in i)(io(i[c])||a&&io(a[c])||phe(c,e)||((l=n==null?void 0:n.getValue(c))==null?void 0:l.liveStyle)!==void 0)&&(o[c]=i[c]);return o}function VRe(e){return window.getComputedStyle(e)}class WRe extends che{constructor(){super(...arguments),this.type="html",this.renderInstance=mhe}readValueFromInstance(r,n){var i;if(Y0.has(n))return(i=this.projection)!=null&&i.isProjecting?VR(n):uLe(r,n);{const a=VRe(r),o=(_de(n)?a.getPropertyValue(n):a[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(r,{transformPagePoint:n}){return fhe(r,n)}build(r,n,i){X8(r,n,i.transformTemplate)}scrapeMotionValuesFromProps(r,n,i){return Y8(r,n,i)}}const qRe={offset:"stroke-dashoffset",array:"stroke-dasharray"},KRe={offset:"strokeDashoffset",array:"strokeDasharray"};function GRe(e,r,n=1,i=0,a=!0){e.pathLength=1;const o=a?qRe:KRe;e[o.offset]=`${-i}`,e[o.array]=`${r} ${n}`}const XRe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ahe(e,{attrX:r,attrY:n,attrScale:i,pathLength:a,pathSpacing:o=1,pathOffset:l=0,...c},u,d,h){if(X8(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p}=e;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete f.transformBox);for(const m of XRe)f[m]!==void 0&&(p[m]=f[m],delete f[m]);r!==void 0&&(f.x=r),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),a!==void 0&&GRe(f,a,o,l,!1)}const ghe=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),xhe=e=>typeof e=="string"&&e.toLowerCase()==="svg";function YRe(e,r,n,i){mhe(e,r,void 0,i);for(const a in r.attrs)e.setAttribute(ghe.has(a)?a:Q8(a),r.attrs[a])}function yhe(e,r,n){const i=Y8(e,r,n);for(const a in e)if(io(e[a])||io(r[a])){const o=X0.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;i[o]=e[a]}return i}class JRe extends che{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Wa}getBaseTargetFromProps(r,n){return r[n]}readValueFromInstance(r,n){if(Y0.has(n)){const i=Jde(n);return i&&i.default||0}return n=ghe.has(n)?n:Q8(n),r.getAttribute(n)}scrapeMotionValuesFromProps(r,n,i){return yhe(r,n,i)}build(r,n,i){Ahe(r,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(r,n,i,a){YRe(r,n,i,a)}mount(r){this.isSVGTag=xhe(r.tagName),super.mount(r)}}const ZRe=G8.length;function vhe(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?vhe(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const r={};for(let n=0;n<ZRe;n++){const i=G8[n],a=e.props[i];(J2(a)||a===!1)&&(r[i]=a)}return r}function bhe(e,r){if(!Array.isArray(r))return!1;const n=r.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(r[i]!==e[i])return!1;return!0}const eDe=[...K8].reverse(),tDe=K8.length;function rDe(e){return r=>Promise.all(r.map(({animation:n,options:i})=>
vendor: 4,623 bytes, line 1035
1035JLe(e,n,i)))}function nDe(e){let r=rDe(e),n=wq(),i=!0;const a=u=>(d,h)=>{var p;const f=Zy(e,h,u==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:m,transitionEnd:A,...g}=f;d={...d,...g,...A}}return d};function o(u){r=u(e)}function l(u){const{props:d}=e,h=vhe(e.parent)||{},f=[],p=new Set;let m={},A=1/0;for(let y=0;y<tDe;y++){const x=eDe[y],b=n[x],v=d[x]!==void 0?d[x]:h[x],j=J2(v),_=x===u?b.isActive:null;_===!1&&(A=y);let C=v===h[x]&&v!==d[x]&&j;if(C&&i&&e.manuallyAnimateOnMount&&(C=!1),b.protectedKeys={...m},!b.isActive&&_===null||!v&&!b.prevProp||O4(v)||typeof v=="boolean")continue;if(x==="exit"&&b.isActive&&_!==!0){b.prevResolvedValues&&(m={...m,...b.prevResolvedValues});continue}const N=iDe(b.prevProp,v);let S=N||x===u&&b.isActive&&!C&&j||y>A&&j,E=!1;const O=Array.isArray(v)?v:[v];let B=O.reduce(a(x),{});_===!1&&(B={});const{prevResolvedValues:T={}}=b,F={...T,...B},I=V=>{S=!0,p.has(V)&&(E=!0,p.delete(V)),b.needsAnimating[V]=!0;const U=e.getValue(V);U&&(U.liveStyle=!1)};for(const V in F){const U=B[V],Q=T[V];if(m.hasOwnProperty(V))continue;let $=!1;YR(U)&&YR(Q)?$=!bhe(U,Q):$=U!==Q,$?U!=null?I(V):p.add(V):U!==void 0&&p.has(V)?I(V):b.protectedKeys[V]=!0}b.prevProp=v,b.prevResolvedValues=B,b.isActive&&(m={...m,...B}),i&&e.blockInitialAnimation&&(S=!1);const D=C&&N;S&&(!D||E)&&f.push(...O.map(V=>{const U={type:x};if(typeof V=="string"&&i&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:Q}=e,$=Zy(Q,V);if(Q.enteringChildren&&$){const{delayChildren:q}=$.transition||{};U.delay=Qde(Q.enteringChildren,e,q)}}return{animation:V,options:U}}))}if(p.size){const y={};if(typeof d.initial!="boolean"){const x=Zy(e,Array.isArray(d.initial)?d.initial[0]:d.initial);x&&x.transition&&(y.transition=x.transition)}p.forEach(x=>{const b=e.getBaseTarget(x),v=e.getValue(x);v&&(v.liveStyle=!0),y[x]=b??null}),f.push({animation:y})}let g=!!f.length;return i&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(g=!1),i=!1,g?r(f):Promise.resolve()}function c(u,d){var f;if(n[u].isActive===d)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(u,d)}),n[u].isActive=d;const h=l(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=wq()}}}function iDe(e,r){return typeof r=="string"?r!==e:Array.isArray(r)?!bhe(r,e):!1}function rA(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wq(){return{animate:rA(!0),whileInView:rA(),whileHover:rA(),whileTap:rA(),whileDrag:rA(),whileFocus:rA(),exit:rA()}}function jq(e,r){e.min=r.min,e.max=r.max}function Zc(e,r){jq(e.x,r.x),jq(e.y,r.y)}function _q(e,r){e.translate=r.translate,e.scale=r.scale,e.originPoint=r.originPoint,e.origin=r.origin}const whe=1e-4,aDe=1-whe,sDe=1+whe,jhe=.01,oDe=0-jhe,lDe=0+jhe;function Co(e){return e.max-e.min}function cDe(e,r,n){return Math.abs(e-r)<=n}function Cq(e,r,n,i=.5){e.origin=i,e.originPoint=Qi(r.min,r.max,e.origin),e.scale=Co(n)/Co(r),e.translate=Qi(n.min,n.max,e.origin)-e.originPoint,(e.scale>=aDe&&e.scale<=sDe||isNaN(e.scale))&&(e.scale=1),(e.translate>=oDe&&e.translate<=lDe||isNaN(e.translate))&&(e.translate=0)}function Rw(e,r,n,i){Cq(e.x,r.x,n.x,i?i.originX:void 0),Cq(e.y,r.y,n.y,i?i.originY:void 0)}function Nq(e,r,n){e.min=n.min+r.min,e.max=e.min+Co(r)}function uDe(e,r,n){Nq(e.x,r.x,n.x),Nq(e.y,r.y,n.y)}function Sq(e,r,n){e.min=r.min-n.min,e.max=e.min+Co(r)}function LE(e,r,n){Sq(e.x,r.x,n.x),Sq(e.y,r.y,n.y)}function kq(e,r,n,i,a){return e-=r,e=OE(e,1/n,i),a!==void 0&&(e=OE(e,1/a,i)),e}function dDe(e,r=0,n=1,i=.5,a,o=e,l=e){if(kd.test(r)&&(r=parseFloat(r),r=Qi(l.min,l.max,r/100)-l.min),typeof r!="number")return;let c=Qi(o.min,o.max,i);e===o&&(c-=r),e.min=kq(e.min,r,n,c,a),e.max=kq(e.max,r,n,c,a)}function Eq(e,r,[n,i,a],o,l){dDe(e,r[n],r[i],r[a],r.scale,o,l)}const hDe=["x","scaleX","originX"],fDe=["y","scaleY","originY"];function Bq(e,r,n,i){Eq(e.x,r,hDe,n?n.x:void 0,i?i.x:void 0),Eq(e.y,r,fDe,n?n.y:void 0,i?i.y:void 0)}function Tq(e){return e.translate===0&&e.scale===1}function _he(e){return Tq(e.x)&&Tq(e.y)}function Pq(e,r){return e.min===r.min&&e.max===r.max}function mDe(e,r){return Pq(e.x,r.x)&&Pq(e.y,r.y)}function Iq(e,r){return Math.round(e.min)===Math.round(r.min)&&Math.round(e.max)===Math.round(r.max)}function Che(e,r){return Iq(e.x,r.x)&&Iq(e.y,r.y)}function Fq(e){return Co(e.x)/Co(e.y)}function Oq(e,r){return e.translate===r.translate&&e.scale===r.scale&&e.originPoint===r.originPoint}function rd(e){return[e("x"),e("y")]}function pDe(e,r,n){let i="";
vendor: 1,508 bytes, line 1035
1035const a=e.x.translate/r.x,o=e.y.translate/r.y,l=(n==null?void 0:n.z)||0;if((a||o||l)&&(i=`translate3d(${a}px, ${o}px, ${l}px) `),(r.x!==1||r.y!==1)&&(i+=`scale(${1/r.x}, ${1/r.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:f,rotateY:p,skewX:m,skewY:A}=n;d&&(i=`perspective(${d}px) ${i}`),h&&(i+=`rotate(${h}deg) `),f&&(i+=`rotateX(${f}deg) `),p&&(i+=`rotateY(${p}deg) `),m&&(i+=`skewX(${m}deg) `),A&&(i+=`skewY(${A}deg) `)}const c=e.x.scale*r.x,u=e.y.scale*r.y;return(c!==1||u!==1)&&(i+=`scale(${c}, ${u})`),i||"none"}const Nhe=["TopLeft","TopRight","BottomLeft","BottomRight"],ADe=Nhe.length,Lq=e=>typeof e=="string"?parseFloat(e):e,Rq=e=>typeof e=="number"||$t.test(e);function gDe(e,r,n,i,a,o){a?(e.opacity=Qi(0,n.opacity??1,xDe(i)),e.opacityExit=Qi(r.opacity??1,0,yDe(i))):o&&(e.opacity=Qi(r.opacity??1,n.opacity??1,i));for(let l=0;l<ADe;l++){const c=`border${Nhe[l]}Radius`;let u=Dq(r,c),d=Dq(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||Rq(u)===Rq(d)?(e[c]=Math.max(Qi(Lq(u),Lq(d),i),0),(kd.test(d)||kd.test(u))&&(e[c]+="%")):e[c]=d}(r.rotate||n.rotate)&&(e.rotate=Qi(r.rotate||0,n.rotate||0,i))}function Dq(e,r){return e[r]!==void 0?e[r]:e.borderRadius}const xDe=She(0,.5,xde),yDe=She(.5,.95,Pc);function She(e,r,n){return i=>i<e?0:i>r?1:n(G2(e,r,i))}function vDe(e,r,n){const i=io(e)?e:Wv(e);return i.start(U8("",i,r,n)),i.animation}function Z2(e,r,n,i={passive:!0}){return e.addEventListener(r,n,i),()=>e.removeEventListener(r,n)}const bDe=(e,r)=>e.depth-r.depth;
1035class wDe{constructor(){this.children=[],this.isDirty=!1}add(r){S8(this.children,r),this.isDirty=!0}remove(r){BE(this.children,r),this.isDirty=!0}forEach(r){this.isDirty&&this.children.sort(bDe),this.isDirty=!1,this.children.forEach(r)}}function jDe(e,r){const n=_o.now(),i=({timestamp:a})=>{const o=a-n;o>=r&&(hp(i),e(o-r))};return mi.setup(i,!0),()=>hp(i)}function fk(e){return io(e)?e.get():e}class _De{constructor(){this.members=[]}add(r){S8(this.members,r);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===r||i===this.lead||i===this.prevLead)continue;const a=i.instance;a&&a.isConnected===!1&&i.isPresent!==!1&&!i.snapshot&&BE(this.members,i)}r.scheduleRender()}remove(r){if(BE(this.members,r),r===this.prevLead&&(this.prevLead=void 0),r===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(r){const n=this.members.findIndex(a=>r===a);if(n===0)return!1;let i;for(let a=n;a>=0;a--){const o=this.members[a],l=o.instance;if(o.isPresent!==!1&&(!l||l.isConnected!==!1)){i=o;break}}return i?(this.promote(i),!0):!1}promote(r,n){const i=this.lead;if(r!==i&&(this.prevLead=i,this.lead=r,r.show(),i)){i.instance&&i.scheduleRender(),r.scheduleRender();const a=i.options.layoutDependency,o=r.options.layoutDependency;if(!(a!==void 0&&o!==void 0&&a===o)){const u=i.instance;u&&u.isConnected===!1&&!i.snapshot||(r.resumeFrom=i,n&&(r.resumeFrom.preserveOpacity=!0),i.snapshot&&(r.snapshot=i.snapshot,r.snapshot.latestValues=i.animationValues||i.latestValues),r.root&&r.root.isUpdating&&(r.isLayoutDirty=!0))}const{crossfade:c}=r.options;c===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(r=>{const{options:n,resumingFrom:i}=r;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(r=>{r.instance&&r.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const mk={hasAnimatedSinceResize:!0,hasEverUpdated:!1},CI=["","X","Y","Z"],CDe=1e3;let NDe=0;function NI(e,r,n,i){const{latestValues:a}=r;a[e]&&(n[e]=a[e],r.setStaticValue(e,0),i&&(i[e]=0))}function khe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:r}=e.options;if(!r)return;const n=Kde(r);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",mi,!(a||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&khe(i)}function Ehe({attachResizeListener:e,defaultParent:r,measureScroll:n,checkIsScrollRoot:i,resetTransform:a}){return class{constructor(l={},c=r==null?void 0:r()){this.id=NDe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(EDe),this.nodes.forEach(IDe),this.nodes.forEach(FDe),this.nodes.forEach(BDe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new wDe)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new k8),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const u=this.eventHandlers.get(l);u&&u.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=q8(l)&&!kRe(l),this.instance=l;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let h,f=0;const p=()=>this.root.updateBlockedByResize=!1;mi.read(()=>{f=window.innerWidth}),e(l,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,h&&h(),h=jDe(p,250),mk.hasAnimatedSinceResize&&(mk.hasA
vendor: 9,310 bytes, line 1035
1035nimatedSinceResize=!1,this.nodes.forEach(Uq)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||d.getDefaultTransition()||MDe,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=d.getProps(),x=!this.targetLayout||!Che(this.targetLayout,m),b=!f&&p;if(this.options.layoutRoot||this.resumeFrom||b||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...z8(A,"layout"),onPlay:g,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(h,b)}else f||Uq(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),hp(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ODe),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&khe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const f=this.path[h];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Mq);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(zq);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(PDe),this.nodes.forEach(SDe),this.nodes.forEach(kDe)):this.nodes.forEach(zq),this.clearAllSnapshots();const c=_o.now();ks.delta=Ld(0,1e3/60,c-ks.timestamp),ks.timestamp=c,ks.isProcessing=!0,gI.update.process(ks),gI.preRender.process(ks),gI.render.process(ks),ks.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,V8.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(TDe),this.sharedNodes.forEach(LDe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,mi.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){mi.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Co(this.snapshot.measuredBox.x)&&!Co(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Wa(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const u=i(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!a)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!_he(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;l&&this.instance&&(c||dA(this.latestValues)||h)&&(a(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return l&&(u=this.removeTransform(u)),zDe(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:l}=this.options;if(!l)return Wa();const c=l.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(UDe))){const{scroll:h}=this.root;h&&(ky(c.x,h.offset.x),ky(c.y,h.offset.y))}return c}removeElementScroll(l){var u;const c=Wa();if(Zc(c,l),(u=this.scroll)!=null&&u.wasRoot)return c;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:f,options:p}=h;h!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Zc(c,l),ky(c.x,f.offset.x),ky(c.y,f.offset.y))}return c}applyTransform(l,c=!1){const u=Wa();Zc(u,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&Ey(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),dA(h.latestValues)&&Ey(u,h.latestValues)}return dA(this.latestValues)&&Ey(u,this.latestValues),u}removeTransform(l){const c=Wa();Zc(c,l);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!dA(d.latestValues))continue;iD(d.latestValues)&&d.updateSnapshot();const h=Wa(),f=d.measurePageBox();Zc(h,f),Bq(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return dA(this.latestValues)&&Bq(c,this.latestValues),c}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ks.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var m;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(l||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!this.layout||!(h||f))return;this.resolvedRelativeTargetAt=ks.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Wa(),this.targetWithTransforms=Wa()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uDe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Zc(this.target,this.layout.layoutBox),hhe(this.target,this.targetDelta)):Zc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||iD(this.parent.latestValues)||dhe(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,c,u){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wa(),this.relativeTargetOrigin=Wa(),LE(this.relativeTargetOrigin,c,u),Zc(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var A;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||(A=this.parent)!=null&&A.isProjectionDirty)&&
vendor: 5,308 bytes, line 1035
1035(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===ks.timestamp&&(u=!1),u)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;Zc(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;MRe(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Wa());const{target:m}=l;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_q(this.prevProjectionDelta.x,this.projectionDelta.x),_q(this.prevProjectionDelta.y,this.projectionDelta.y)),Rw(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Oq(this.projectionDelta.x,this.prevProjectionDelta.x)||!Oq(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var c;if((c=this.options.visualElement)==null||c.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Sy(),this.projectionDelta=Sy(),this.projectionDeltaWithTransform=Sy()}setAnimationOrigin(l,c=!1){const u=this.snapshot,d=u?u.latestValues:{},h={...this.latestValues},f=Sy();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const p=Wa(),m=u?u.source:void 0,A=this.layout?this.layout.source:void 0,g=m!==A,y=this.getStack(),x=!y||y.members.length<=1,b=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(DDe));this.animationProgress=0;let v;this.mixTargetDelta=j=>{const _=j/1e3;$q(f.x,l.x,_),$q(f.y,l.y,_),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(LE(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),RDe(this.relativeTarget,this.relativeTargetOrigin,p,_),v&&mDe(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Wa()),Zc(v,this.relativeTarget)),g&&(this.animationValues=h,gDe(h,d,this.latestValues,_,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var c,u,d;this.notifyListeners("animationStart"),(c=this.currentAnimation)==null||c.stop(),(d=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||d.stop(),this.pendingAnimation&&(hp(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=mi.update(()=>{mk.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Wv(0)),this.motionValue.jump(0,!1),this.currentAnimation=vDe(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),l.onUpdate&&l.onUpdate(h)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(CDe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:u,layout:d,latestValues:h}=l;if(!(!c||!u||!d)){if(this!==l&&this.layout&&d&&Bhe(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||Wa();const f=Co(this.layout.layoutBox.x);u.x.min=l.target.x.min,u.x.max=u.x.min+f;const p=Co(this.layout.layoutBox.y);u.y.min=l.target.y.min,u.y.max=u.y.min+p}Zc(c,u),Ey(c,h),Rw(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new _De),this.sharedNodes.get(l).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var c;const{layoutId:l}=this.options;return l?((c=this.getStack())==null?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:l}=this.options;return l?(c=this.getStack())==null?void 0:c.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}
vendor: 18,648 bytes, lines 1035-1043
1035resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:u}=l;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const d={};u.z&&NI("z",l,d,this.animationValues);for(let h=0;h<CI.length;h++)NI(`rotate${CI[h]}`,l,d,this.animationValues),NI(`skew${CI[h]}`,l,d,this.animationValues);l.render();for(const h in d)l.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=fk(c==null?void 0:c.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=fk(c==null?void 0:c.pointerEvents)||""),this.hasProjected&&!dA(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1);return}l.visibility="";const h=d.animationValues||d.latestValues;this.applyTransformsToTarget();let f=pDe(this.projectionDeltaWithTransform,this.treeScale,h);u&&(f=u(h,f)),l.transform=f;const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?l.opacity=d===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const A in sD){if(h[A]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:x}=sD[A],b=f==="none"?h[A]:g(h[A],d);if(y){const v=y.length;for(let j=0;j<v;j++)l[y[j]]=b}else x?this.options.visualElement.renderState.vars[A]=b:l[A]=b}this.options.layoutId&&(l.pointerEvents=d===this?fk(c==null?void 0:c.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var c;return(c=l.currentAnimation)==null?void 0:c.stop()}),this.root.nodes.forEach(Mq),this.root.sharedNodes.clear()}}}function SDe(e){e.updateLayout()}function kDe(e){var n;const r=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:a}=e.layout,{animationType:o}=e.options,l=r.source!==e.layout.source;o==="size"?rd(f=>{const p=l?r.measuredBox[f]:r.layoutBox[f],m=Co(p);p.min=i[f].min,p.max=p.min+m}):Bhe(o,r.layoutBox,i)&&rd(f=>{const p=l?r.measuredBox[f]:r.layoutBox[f],m=Co(i[f]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const c=Sy();Rw(c,i,r.layoutBox);const u=Sy();l?Rw(u,e.applyTransform(a,!0),r.measuredBox):Rw(u,i,r.layoutBox);const d=!_he(c);let h=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:m}=f;if(p&&m){const A=Wa();LE(A,r.layoutBox,p.layoutBox);const g=Wa();LE(g,i,m.layoutBox),Che(A,g)||(h=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=A,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:r,delta:u,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function EDe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function BDe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function TDe(e){e.clearSnapshot()}function Mq(e){e.clearMeasurements()}function zq(e){e.isLayoutDirty=!1}function PDe(e){const{visualElement:r}=e.options;r&&r.getProps().onBeforeLayoutMeasure&&r.notify("BeforeLayoutMeasure"),e.resetTransform()}function Uq(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function IDe(e){e.resolveTargetDelta()}function FDe(e){e.calcProjection()}function ODe(e){e.resetSkewAndRotation()}function LDe(e){e.removeLeadSnapshot()}function $q(e,r,n){e.translate=Qi(r.translate,0,n),e.scale=Qi(r.scale,1,n),e.origin=r.origin,e.originPoint=r.originPoint}function Qq(e,r,n,i){e.min=Qi(r.min,n.min,i),e.max=Qi(r.max,n.max,i)}function RDe(e,r,n,i){Qq(e.x,r.x,n.x,i),Qq(e.y,r.y,n.y,i)}function DDe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const MDe={duration:.45,ease:[.4,0,.1,1]},Hq=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Vq=Hq("applewebkit/")&&!Hq("chrome/")?Math.round:Pc;function Wq(e){e.min=Vq(e.min),e.max=Vq(e.max)}function zDe(e){Wq(e.x),Wq(e.y)}function Bhe(e,r,n){return e==="position"||e==="preserve-aspect"&&!cDe(Fq(r),Fq(n),.2)}function UDe(e){var r;return e!==e.root&&((r=e.scroll)==null?void 0:r.wasRoot)}const $De=Ehe({attachResizeListener:(e,r)=>Z2(e,"resize",r),measureScroll:()=>{var e,r;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((r=document.body)==null?void 0:r.scrollTop)||0}},checkIsScrollRoot:()=>!0}),SI={current:void 0},The=Ehe({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!SI.current){const e=new $De({});e.mount(window),e.setOptions({layoutScroll:!0}),SI.current=e}return SI.current},resetTransform:(e,r)=>{e.style.transform=r!==void 0?r:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),J8=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function qq(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function QDe(...e){return r=>{let n=!1;const i=e.map(a=>{const o=qq(a,r);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<i.length;a++){const o=i[a];typeof o=="function"?o():qq(e[a],null)}}}}function HDe(...e){return w.useCallback(QDe(...e),e)}class VDe extends w.Component{getSnapshotBeforeUpdate(r){const n=this.props.childRef.current;if(n&&r.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,a=rD(i)&&i.offsetWidth||0,o=rD(i)&&i.offsetHeight||0,l=this.props.sizeRef.current;l.height=n.offsetHeight||0,l.width=n.offsetWidth||0,l.top=n.offsetTop,l.left=n.offsetLeft,l.right=a-l.width-l.left,l.bottom=o-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function WDe({children:e,isPresent:r,anchorX:n,anchorY:i,root:a,pop:o}){var p;const l=w.useId(),c=w.useRef(null),u=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=w.useContext(J8),h=((p=e.props)==null?void 0:p.ref)??(e==null?void 0:e.ref),f=HDe(c,h);return w.useInsertionEffect(()=>{const{width:m,height:A,top:g,left:y,right:x,bottom:b}=u.current;if(r||o===!1||!c.current||!m||!A)return;const v=n==="left"?`left: ${y}`:`right: ${x}`,j=i==="bottom"?`bottom: ${b}`:`top: ${g}`;c.current.dataset.motionPopId=l;const _=document.createElement("style");d&&(_.nonce=d);const C=a??document.head;return C.appendChild(_),_.sheet&&_.sheet.insertRule(`
1036          [data-motion-pop-id="${l}"] {
1037            position: absolute !important;
1038            width: ${m}px !important;
1039            height: ${A}px !important;
1040            ${v}px !important;
1041            ${j}px !important;
1042          }
1043        `),()=>{C.contains(_)&&C.removeChild(_)}},[r]),s.jsx(VDe,{isPresent:r,childRef:c,sizeRef:u,pop:o,children:o===!1?e:w.cloneElement(e,{ref:f})})}const qDe=({children:e,initial:r,isPresent:n,onExitComplete:i,custom:a,presenceAffectsLayout:o,mode:l,anchorX:c,anchorY:u,root:d})=>{const h=N8(KDe),f=w.useId();let p=!0,m=w.useMemo(()=>(p=!1,{id:f,initial:r,isPresent:n,custom:a,onExitComplete:A=>{h.set(A,!0);for(const g of h.values())if(!g)return;i&&i()},register:A=>(h.set(A,!1),()=>h.delete(A))}),[n,h,i]);return o&&p&&(m={...m}),w.useMemo(()=>{h.forEach((A,g)=>h.set(g,!1))},[n]),w.useEffect(()=>{!n&&!h.size&&i&&i()},[n]),e=s.jsx(WDe,{pop:l==="popLayout",isPresent:n,anchorX:c,anchorY:u,root:d,children:e}),s.jsx(I4.Provider,{value:m,children:e})};function KDe(){return new Map}function Phe(e=!0){const r=w.useContext(I4);if(r===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:a}=r,o=w.useId();w.useEffect(()=>{if(e)return a(o)},[e]);const l=w.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,l]:[!0]}const _N=e=>e.key||"";function Kq(e){const r=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&r.push(n)}),r}const Fu=({children:e,custom:r,initial:n=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o="sync",propagate:l=!1,anchorX:c="left",anchorY:u="top",root:d})=>{const[h,f]=Phe(l),p=w.useMemo(()=>Kq(e),[e]),m=l&&!h?[]:p.map(_N),A=w.useRef(!0),g=w.useRef(p),y=N8(()=>new Map),x=w.useRef(new Set),[b,v]=w.useState(p),[j,_]=w.useState(p);sde(()=>{A.current=!1,g.current=p;for(let S=0;S<j.length;S++){const E=_N(j[S]);m.includes(E)?(y.delete(E),x.current.delete(E)):y.get(E)!==!0&&y.set(E,!1)}},[j,m.length,m.join("-")]);const C=[];if(p!==b){let S=[...p];for(let E=0;E<j.length;E++){const O=j[E],B=_N(O);m.includes(B)||(S.splice(E,0,O),C.push(O))}return o==="wait"&&C.length&&(S=C),_(Kq(S)),v(p),null}const{forceRender:N}=w.useContext(C8);return s.jsx(s.Fragment,{children:j.map(S=>{const E=_N(S),O=l&&!h?!1:p===j||m.includes(E),B=()=>{if(x.current.has(E))return;if(x.current.add(E),y.has(E))y.set(E,!0);else return;let T=!0;y.forEach(F=>{F||(T=!1)}),T&&(N==null||N(),_(g.current),l&&(f==null||f()),i&&i())};return s.jsx(qDe,{isPresent:O,initial:!A.current||n?void 0:!1,custom:r,presenceAffectsLayout:a,mode:o,root:d,onExitComplete:O?void 0:B,anchorX:c,anchorY:u,children:S},E)})})},Ihe=w.createContext({strict:!1}),Gq={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Xq=!1;function GDe(){if(Xq)return;const e={};for(const r in Gq)e[r]={isEnabled:n=>Gq[r].some(i=>!!n[i])};lhe(e),Xq=!0}function Fhe(){return GDe(),ORe()}function XDe(e){const r=Fhe();for(const n in e)r[n]={...r[n],...e[n]};lhe(r)}const YDe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function RE(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||YDe.has(e)}let Ohe=e=>!RE(e);function JDe(e){typeof e=="function"&&(Ohe=r=>r.startsWith("on")?!RE(r):e(r))}try{JDe(require("@emotion/is-prop-valid").default)}catch{}function ZDe(e,r,n){const i={};for(const a in e)a==="values"&&typeof e.values=="object"||(Ohe(a)||n===!0&&RE(a)||!r&&!RE(a)||e.draggable&&a.startsWith("onDrag"))&&(i[a]=e[a]);return i}const R4=w.createContext({});function eMe(e,r){if(L4(e)){const{initial:n,animate:i}=e;return{initial:n===!1||J2(n)?n:void 0,animate:J2(i)?i:void 0}}return e.inherit!==!1?r:{}}function tMe(e){const{initial:r,animate:n}=eMe(e,w.useContext(R4));return w.useMemo(()=>({initial:r,animate:n}),[Yq(r),Yq(n)])}function Yq(e){return Array.isArray(e)?e.join(" "):e}const Z8=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Lhe(e,r,n){for(const i in r)!io(r[i])&&!phe(i,n)&&(e[i]=r[i])}function rMe({transformTemplate:e},r){return w.useMemo(()=>{const n=Z8();return X8(n,r,e),Object.assign({},n.vars,n.style)},[r])}function nMe(e,r){const n=e.style||{},i={};return Lhe(i,n,e),Object.assign(i,rMe(e,r)),i}function iMe(e,r){const n={},i=nMe(e,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const Rhe=()=>({...Z8(),attrs:{}});function aMe(e,r,n,i){const a=w.useMemo(()=>{const o=Rhe();return Ahe(o,r,xhe(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[r]);if(e.style){const o={};Lhe(o,e.style,e),a.style={...o,...a.style}}return a}const sMe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function e$(e){return typeof e!="string"||e.includes("-")?!1:!!(sMe.indexOf(e)>-1||/[A-Z]/u.test(e))}function oMe(e,r,n,{latestValues:i},a,o=!1,l){const u=(l??e$(e)?aMe:iMe)(r,i,a,e),d=ZDe(r,typeof e=="string",o),h=e!==w.Fragment?{...d,...u,ref:n}:{},{children:f}=r,p=w.useMemo(()=>io(f)?f.get():f,[f]);return w.createElement(e,{...h,children:p})}function lMe({scrapeMotionValuesFromProps:e,createRenderState:r},n,i,a){return{latestValues:cMe(n,i,a,e),renderState:r()}}function cMe(e,r,n,i){const a={},o=i(e,{});for(const p in o)a[p]=fk(o[p]);let{initial:l,animate:c}=e;const u=L4(e),d=she(e);r&&d&&!u&&e.inherit!==!1&&(l===void 0&&(l=r.initial),c===void 0&&(c=r.animate));let h=n?n.initial===!1:!1;h=h||l===!1;const f=h?c:l;if(f&&typeof f!="boolean"&&!O4(f)){const p=Array.isArray(f)?f:[f];for(let m=0;m<p.length;m++){const A=$8(e,p[m]);if(A){const{transitionEnd:g,transition:y,...x}=A;for(const b in x){let v=x[b];if(Array.isArray(v)){const j=h?v.length-1:0;v=v[j]}v!==null&&(a[b]=v)}for(const b in g)a[b]=g[b]}}}return a}const Dhe=e=>(r,n)=>{const i=w.useContext(R4),a=w.useContext(I4),o=()=>lMe(e,r,i,a);return n?o():N8(o)},uMe=Dhe({scrapeMotionValuesFromProps:Y8,createRenderState:Z8}),dMe=Dhe({scrapeMotionValuesFromProps:yhe,createRenderState:Rhe}),hMe=Symbol.for("motionComponentSymbol");function fMe(e,r,n){const i=w.useRef(n);w.useInsertionEffect(()=>{i.current=n});const a=w.useRef(null);return w.useCallback(o=>{var c;o&&((c=e.onMount)==null||c.call(e,o)),r&&(o?r.mount(o):r.unmount());const l=i.current;if(typeof l=="function")if(o){const u=l(o);typeof u=="function"&&(a.current=u)}else a.current?(a.current(),a.current=null):l(o);else l&&(l.current=o)},[r])}const Mhe=w.createContext({});function iy(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function mMe(e,r,n,i,a,o){var v,j;const{visualElement:l}=w.useContext(R4),c=w.useContext(Ihe),u=w.useContext(I4),d=w.useContext(J8),h=d.reducedMotion,f=d.skipAnimations,p=w.useRef(null),m=w.useRef(!1);i=i||c.renderer,!p.current&&i&&(p.current=i(e,{visualState:r,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:h,skipAnimations:f,isSVG:o}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const A=p.current,g=w.useContext(Mhe);A&&!A.projection&&a&&(A.type==="html"||A.type==="svg")&&pMe(p.current,n,a,g);const y=w.useRef(!1);w.useInsertionEffect(()=>{A&&y.current&&A.update(n,u)});const x=n[qde],b=w.useRef(!!x&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,x))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,x)));return sde(()=>{m.current=!0,A&&(y.current=!0,window.MotionIsMounted=!0,A.updateFeatures(),A.scheduleRenderMicrotask(),b.current&&A.animationState&&A.animationState.animateChanges())}),w.useEffect(()=>{A&&(!b.current&&A.animationState&&A.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,x)}),b.current=!1),A.enteringChildren=void 0)}),A}function pMe(e,r,n,i){const{layoutId:a,layout:o,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:d,layoutCrossfade:h}=r;e.projection=new n(e.latestValues,r["data-framer-portal-id"]?void 0:zhe(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:!!l||c&&iy(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:u,layoutRoot:d})}function zhe(e){if(e)return e.options.allowProjection!==!1?e.projection:zhe(e.parent)}function kI(e,{forwardMotionProps:r=!1,type:n}={},i,a){i&&XDe(i);const o=n?n==="svg":e$(e),l=o?dMe:uMe;function c(d,h){let f;const p={...w.useContext(J8),...d,layoutId:AMe(d)},{isStatic:m}=p,A=tMe(d),g=l(d,m);if(!m&&ade){gMe();const y=xMe(p);f=y.MeasureLayout,A.visualElement=mMe(e,g,p,a,y.ProjectionNode,o)}return s.jsxs(R4.Provider,{value:A,children:[f&&A.visualElement?s.jsx(f,{visualElement:A.visualElement,...p}):null,oMe(e,d,fMe(g,A.visualElement,h),g,m,r,o)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=w.forwardRef(c);return u[hMe]=e,u}function AMe({layoutId:e}){const r=w.useContext(C8).id;return r&&e!==void 0?r+"-"+e:e}function gMe(e,r){w.useContext(Ihe).strict}function xMe(e){const r=Fhe(),{drag:n,layout:i}=r;if(!n&&!i)return{};const a={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(e)||i!=null&&i.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}function yMe(e,r){if(typeof Proxy>"u")return kI;const n=new Map,i=(o,l)=>kI(o,l,e,r),a=(o,l)=>i(o,l);return new Proxy(a,{get:(o,l)=>l==="create"?i:(n.has(l)||n.set(l,kI(l,void 0,e,r)),n.get(l))})}const vMe=(e,r)=>r.isSVG??e$(e)?new JRe(r):new WRe(r,{allowProjection:e!==w.Fragment});class bMe extends jp{constructor(r){super(r),r.animationState||(r.animationState=nDe(r))}updateAnimationControlsSubscription(){const{animate:r}=this.node.getProps();O4(r)&&(this.unmountControls=r.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:r}=this.node.getProps(),{animate:n}=this.node.prevProps||{};r!==n&&this.updateAnimationControlsSubscription()}unmount(){var r;this.node.animationState.reset(),(r=this.unmountControls)==null||r.call(this)}}let wMe=0;class jMe extends jp{constructor(){super(...arguments),this.id=wMe++}update(){if(!this.node.presenceContext)return;const{isPresent:r,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||r===i)return;const a=this.node.animationState.setActive("exit",!r);n&&!r&&a.then(()=>{n(this.id)})}mount(){const{register:r,onExitComplete:n}=this.node.presenceContext||{};
vendor: 16,668 bytes, line 1043
1043n&&n(this.id),r&&(this.unmount=r(this.id))}unmount(){}}const _Me={animation:{Feature:bMe},exit:{Feature:jMe}};function k_(e){return{point:{x:e.pageX,y:e.pageY}}}const CMe=e=>r=>W8(r)&&e(r,k_(r));function Dw(e,r,n,i){return Z2(e,r,CMe(n),i)}const Uhe=({current:e})=>e?e.ownerDocument.defaultView:null,Jq=(e,r)=>Math.abs(e-r);function NMe(e,r){const n=Jq(e.x,r.x),i=Jq(e.y,r.y);return Math.sqrt(n**2+i**2)}const Zq=new Set(["auto","scroll"]);class $he{constructor(r,n,{transformPagePoint:i,contextWindow:a=window,dragSnapToOrigin:o=!1,distanceThreshold:l=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=BI(this.lastMoveEventInfo,this.history),A=this.startEvent!==null,g=NMe(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!A&&!g)return;const{point:y}=m,{timestamp:x}=ks;this.history.push({...y,timestamp:x});const{onStart:b,onMove:v}=this.handlers;A||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,m)},this.handlePointerMove=(m,A)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=EI(A,this.transformPagePoint),mi.update(this.updatePoint,!0)},this.handlePointerUp=(m,A)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=BI(m.type==="pointercancel"?this.lastMoveEventInfo:EI(A,this.transformPagePoint),this.history);this.startEvent&&g&&g(m,b),y&&y(m,b)},!W8(r))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=l,this.contextWindow=a||window;const u=k_(r),d=EI(u,this.transformPagePoint),{point:h}=d,{timestamp:f}=ks;this.history=[{...h,timestamp:f}];const{onSessionStart:p}=n;p&&p(r,BI(d,this.history)),this.removeListeners=C_(Dw(this.contextWindow,"pointermove",this.handlePointerMove),Dw(this.contextWindow,"pointerup",this.handlePointerUp),Dw(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(r){let n=r.parentElement;for(;n;){const i=getComputedStyle(n);(Zq.has(i.overflowX)||Zq.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(r){const n=this.scrollPositions.get(r);if(!n)return;const i=r===window,a=i?{x:window.scrollX,y:window.scrollY}:{x:r.scrollLeft,y:r.scrollTop},o={x:a.x-n.x,y:a.y-n.y};o.x===0&&o.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(r,a),mi.update(this.updatePoint,!0))}updateHandlers(r){this.handlers=r}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hp(this.updatePoint)}}function EI(e,r){return r?{point:r(e.point)}:e}function eK(e,r){return{x:e.x-r.x,y:e.y-r.y}}function BI({point:e},r){return{point:e,delta:eK(e,Qhe(r)),offset:eK(e,SMe(r)),velocity:kMe(r,.1)}}function SMe(e){return e[0]}function Qhe(e){return e[e.length-1]}function kMe(e,r){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const a=Qhe(e);for(;n>=0&&(i=e[n],!(a.timestamp-i.timestamp>Ic(r)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&a.timestamp-i.timestamp>Ic(r)*2&&(i=e[1]);const o=_c(a.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const l={x:(a.x-i.x)/o,y:(a.y-i.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function EMe(e,{min:r,max:n},i){return r!==void 0&&e<r?e=i?Qi(r,e,i.min):Math.max(e,r):n!==void 0&&e>n&&(e=i?Qi(n,e,i.max):Math.min(e,n)),e}function tK(e,r,n){return{min:r!==void 0?e.min+r:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function BMe(e,{top:r,left:n,bottom:i,right:a}){return{x:tK(e.x,n,a),y:tK(e.y,r,i)}}function rK(e,r){let n=r.min-e.min,i=r.max-e.max;return r.max-r.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function TMe(e,r){return{x:rK(e.x,r.x),y:rK(e.y,r.y)}}function PMe(e,r){let n=.5;const i=Co(e),a=Co(r);return a>i?n=G2(r.min,r.max-i,e.min):i>a&&(n=G2(e.min,e.max-a,r.min)),Ld(0,1,n)}function IMe(e,r){const n={};return r.min!==void 0&&(n.min=r.min-e.min),r.max!==void 0&&(n.max=r.max-e.min),n}const oD=.35;function FMe(e=oD){return e===!1?e=0:e===!0&&(e=oD),{x:nK(e,"left","right"),y:nK(e,"top","bottom")}}function nK(e,r,n){return{min:iK(e,r),max:iK(e,n)}}function iK(e,r){return typeof e=="number"?e:e[r]||0}const OMe=new WeakMap;class LMe{constructor(r){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Wa(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=r}start(r,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const o=f=>{n&&this.snapToCursor(k_(f).point),this.stopAnimation()},l=(f,p)=>{const{drag:m,dragPropagation:A,onDragStart:g}=this.getProps();if(m&&!A&&(this.openDragLock&&this.openDragLock(),this.openDragLock=dRe(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rd(x=>{let b=this.getAxisMotionValue(x).get()||0;if(kd.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const j=v.layout.layoutBox[x];j&&(b=Co(j)*(parseFloat(b)/100))}}this.originPoint[x]=b}),g&&mi.update(()=>g(f,p),!1,!0),JR(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},c=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:A,onDirectionLock:g,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:x}=p;if(A&&this.currentDirection===null){this.currentDirection=DMe(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,x),this.updateAxis("y",p.point,x),this.visualElement.render(),y&&mi.update(()=>y(f,p),!1,!0)},u=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:h}=this.getProps();this.panSession=new $he(r,{onSessionStart:o,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:i,contextWindow:Uhe(this.visualElement),element:this.visualElement.current})}stop(r,n){const i=r||this.latestPointerEvent,a=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!a||!i)return;const{velocity:l}=a;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&mi.postRender(()=>c(i,a))}cancel(){this.isDragging=!1;const{projection:r,animationState:n}=this.visualElement;r&&(r.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(r,n,i){const{drag:a}=this.getProps();if(!i||!CN(r,a,this.currentDirection))return;const o=this.getAxisMotionValue(r);let l=this.originPoint[r]+i[r];this.constraints&&this.constraints[r]&&(l=EMe(l,this.constraints[r],this.elastic[r])),o.set(l)}resolveConstraints(){var o;const{dragConstraints:r,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,a=this.constraints;r&&iy(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&i?this.constraints=BMe(i.layoutBox,r):this.constraints=!1,this.elastic=FMe(n),a!==this.constraints&&!iy(r)&&i&&this.constraints&&!this.hasMutatedConstraints&&rd(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=IMe(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:r,onMeasureDragConstraints:n}=this.getProps();if(!r||!iy(r))return!1;const i=r.current;Vv(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const o=zRe(i,a.root,this.visualElement.getTransformPagePoint());let l=TMe(a.layout.layoutBox,o);if(n){const c=n(RRe(l));this.hasMutatedConstraints=!!c,c&&(l=uhe(c))}return l}startAnimation(r){const{drag:n,dragMomentum:i,dragElastic:a,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=rd(h=>{if(!CN(h,n,this.currentDirection))return;let f=u&&u[h]||{};l&&(f={min:0,max:0});const p=a?200:1e6,m=a?40:1e7,A={type:"inertia",velocity:i?r[h]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(h,A)});return Promise.all(d).then(c)}startAxisValueAnimation(r,n){const i=this.getAxisMotionValue(r);return JR(this.visualElement,r),i.start(U8(r,i,0,n,this.visualElement,!1))}stopAnimation(){rd(r=>this.getAxisMotionValue(r).stop())}getAxisMotionValue(r){const n=`_drag${r.toUpperCase()}`,i=this.visualElement.getProps(),a=i[n];return a||this.visualElement.getValue(r,(i.initial?i.initial[r]:void 0)||0)}snapToCursor(r){rd(n=>{const{drag:i}=this.getProps();if(!CN(n,i,this.currentDirection))return;const{projection:a}=this.visualElement,o=this.getAxisMotionValue(n);if(a&&a.layout){const{min:l,max:c}=a.layout.layoutBox[n],u=o.get()||0;o.set(r[n]-Qi(l,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!iy(n)||!i||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};rd(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();a[l]=PMe({min:u,max:u},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),rd(l=>{if(!CN(l,r,null))return;const c=this.getAxisMotionValue(l),{min:u,max:d}=this.constraints[l];c.set(Qi(u,d,a[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;OMe.set(this.visualElement,this);const r=this.visualElement.current,n=Dw(r,"pointerdown",d=>{const{drag:h,dragListener:f=!0}=this.getProps(),p=d.target,m=p!==r&&gRe(p);h&&f&&!m&&this.start(d)});let i;const a=()=>{const{dragConstraints:d}=this.getProps();iy(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),i||(i=RMe(r,d.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,l=o.addEventListener("measure",a);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),mi.read(a);const c=Z2(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(rd(f=>{const p=this.getAxisMotionValue(f);p&&(this.originPoint[f]+=d[f].translate,p.set(p.get()+d[f].translate))}),this.visualElement.render())});return()=>{c(),n(),l(),u&&u(),i&&i()}}getProps(){const r=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:a=!1,dragConstraints:o=!1,dragElastic:l=oD,dragMomentum:c=!0}=r;return{...r,drag:n,dragDirectionLock:i,dragPropagation:a,dragConstraints:o,dragElastic:l,dragMomentum:c}}}function aK(e){let r=!0;return()=>{if(r){r=!1;return}e()}}function RMe(e,r,n){const i=hq(e,aK(n)),a=hq(r,aK(n));return()=>{i(),a()}}function CN(e,r,n){return(r===!0||r===e)&&(n===null||n===e)}function DMe(e,r=10){let n=null;return Math.abs(e.y)>r?n="y":Math.abs(e.x)>r&&(n="x"),n}class MMe extends jp{constructor(r){super(r),this.removeGroupControls=Pc,this.removeListeners=Pc,this.controls=new LMe(r)}mount(){const{dragControls:r}=this.node.getProps();r&&(this.removeGroupControls=r.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pc}update(){const{dragControls:r}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};r!==n&&(this.removeGroupControls(),r&&(this.removeGroupControls=r.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const TI=e=>(r,n)=>{e&&mi.update(()=>e(r,n),!1,!0)};class zMe extends jp{constructor(){super(...arguments),this.removePointerDownListener=Pc}onPointerDown(r){this.session=new $he(r,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Uhe(this.node)})}createPanHandlers(){const{onPanSessionStart:r,onPanStart:n,onPan:i,onPanEnd:a}=this.node.getProps();return{onSessionStart:TI(r),onStart:TI(n),onMove:TI(i),onEnd:(o,l)=>{delete this.session,a&&mi.postRender(()=>a(o,l))}}}mount(){this.removePointerDownListener=Dw(this.node.current,"pointerdown",r=>this.onPointerDown(r))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let PI=!1;class UMe extends w.Component{componentDidMount(){const{visualElement:r,layoutGroup:n,switchLayoutGroup:i,layoutId:a}=this.props,{projection:o}=r;o&&(n.group&&n.group.add(o),i&&i.register&&a&&i.register(o),PI&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),mk.hasEverUpdated=!0}getSnapshotBeforeUpdate(r){const{layoutDependency:n,visualElement:i,drag:a,isPresent:o}=this.props,{projection:l}=i;return l&&(l.isPresent=o,r.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),PI=!0,a||r.layoutDependency!==n||n===void 0||r.isPresent!==o?l.willUpdate():this.safeToRemove(),r.isPresent!==o&&(o?l.promote():l.relegate()||mi.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:r}=this.props.visualElement;r&&(r.root.didUpdate(),V8.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:r,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:a}=r;PI=!0,a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),i&&i.deregister&&i.deregister(a))}safeToRemove(){const{safeToRemove:r}=this.props;r&&r()}render(){return null}}function Hhe(e){const[r,n]=Phe(),i=w.useContext(C8);return s.jsx(UMe,{...e,layoutGroup:i,switchLayoutGroup:w.useContext(Mhe),isPresent:r,safeToRemove:n})}const $Me={pan:{Feature:zMe},drag:{Feature:MMe,ProjectionNode:The,MeasureLayout:Hhe}};function sK(e,r,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,o=i[a];o&&mi.postRender(()=>o(r,k_(r)))}class QMe extends jp{mount(){const{current:r}=this.node;r&&(this.unmount=fRe(r,(n,i)=>(sK(this.node,i,"Start"),a=>sK(this.node,a,"End"))))}unmount(){}}class HMe extends jp{constructor(){super(...arguments),this.isActive=!1}onFocus(){let r=!1;try{r=this.node.current.matches(":focus-visible")}catch{r=!0}!r||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=C_(Z2(this.node.current,"focus",()=>this.onFocus()),Z2(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function oK(e,r,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),o=i[a];o&&mi.postRender(()=>o(r,k_(r)))}class VMe extends jp{mount(){const{current:r}=this.node;if(!r)return;
1043const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=yRe(r,(a,o)=>(oK(this.node,o,"Start"),(l,{success:c})=>oK(this.node,l,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const lD=new WeakMap,II=new WeakMap,WMe=e=>{const r=lD.get(e.target);r&&r(e)},qMe=e=>{e.forEach(WMe)};function KMe({root:e,...r}){const n=e||document;II.has(n)||II.set(n,{});const i=II.get(n),a=JSON.stringify(r);return i[a]||(i[a]=new IntersectionObserver(qMe,{root:e,...r})),i[a]}function GMe(e,r,n){const i=KMe(r);return lD.set(e,n),i.observe(e),()=>{lD.delete(e),i.unobserve(e)}}const XMe={some:0,all:1};class YMe extends jp{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:r={}}=this.node.getProps(),{root:n,margin:i,amount:a="some",once:o}=r,l={root:n?n.current:void 0,rootMargin:i,threshold:typeof a=="number"?a:XMe[a]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),p=d?h:f;p&&p(u)};return GMe(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:r,prevProps:n}=this.node;["amount","margin","root"].some(JMe(r,n))&&this.startObserver()}unmount(){}}function JMe({viewport:e={}},{viewport:r={}}={}){return n=>e[n]!==r[n]}const ZMe={inView:{Feature:YMe},tap:{Feature:VMe},focus:{Feature:HMe},hover:{Feature:QMe}},eze={layout:{ProjectionNode:The,MeasureLayout:Hhe}},tze={..._Me,...ZMe,...$Me,...eze},Le=yMe(tze,vMe),qv=[{name:"Starter",nameKey:"level.starter",minCoins:0,icon:"🌱",color:"text-muted-foreground",description:"Abia ai început călătoria. Completează misiunile de onboarding!",description_en:"You just started. Complete onboarding missions!",benefits:["Badge de bază"]},{name:"Explorer",nameKey:"level.explorer",minCoins:50,icon:"🧭",color:"text-blue-500",description:"Ai descoperit ritmul! Continuă să explorezi.",description_en:"You found your rhythm! Keep exploring.",benefits:["Badge Explorer","Perks de profil"]},{name:"Builder",nameKey:"level.builder",minCoins:1e3,icon:"🔧",color:"text-emerald-500",description:"Construiești cunoștințe solide prin învățare activă.",description_en:"Building solid knowledge through active learning.",benefits:["Resurse extra","Acces timpuriu la conținut"]},{name:"Specialist",nameKey:"level.specialist",minCoins:5e3,icon:"⚡",color:"text-amber-500",description:"Expert în devenire! Cunoștințele tale sunt impresionante.",description_en:"Expert in the making!",benefits:["Badge puternic","Reduceri speciale","Acces Q&A"]},{name:"Architect",nameKey:"level.architect",minCoins:1e4,icon:"🏛️",color:"text-purple-500",description:"Arhitect al cunoașterii. Status rar și prestigios.",description_en:"Architect of knowledge. Rare and prestigious.",benefits:["Conținut exclusiv","Prioritate la lansări","Status rar"]},{name:"Visionary",nameKey:"level.visionary",minCoins:5e4,icon:"🚀",color:"text-primary",description:"Vizionar! Ești în elita EduWeb. Extrem de rar.",description_en:"Visionary! EduWeb elite. Extremely rare.",benefits:["Status public de elită","Acces comunitate premium","Sesiuni exclusive","Invitații speciale"]}],rze=[{action:"Citești un articol (70% scroll, 90s)",action_en:"Read an article",coins:1,icon:"📖",category:"passive"},{action:"Vizionezi un video brief (80%)",action_en:"Watch video brief",coins:1,icon:"🎧",category:"passive"},{action:"Asculți podcastul zilnic (70%)",action_en:"Listen to daily podcast",coins:2,icon:"🎙️",category:"passive"},{action:"Serie 7 zile login",action_en:"7-day login streak",coins:5,icon:"🔥",category:"passive"},{action:"Serie 30 zile login",action_en:"30-day login streak",coins:15,icon:"🔥",category:"passive"},{action:"Quiz completat (min 80%)",action_en:"Quiz passed (min 80%)",coins:8,icon:"✅",category:"learning"},{action:"Lecție completată",action_en:"Lesson completed",coins:3,icon:"📝",category:"learning"},{action:"Modul completat",action_en:"Module completed",coins:10,icon:"📦",category:"learning"},{action:"Mini-curs completat",action_en:"Mini-course completed",coins:25,icon:"🎓",category:"learning"},{action:"Curs standard completat",action_en:"Standard course completed",coins:60,icon:"🎓",category:"learning"},{action:"Curs premium completat",action_en:"Premium course completed",coins:120,icon:"🏆",category:"learning"},{action:"Diplomă obținută",action_en:"Certificate earned",coins:80,icon:"📜",category:"learning"},{action:"Comentariu aprobat (120+ car.)",action_en:"Approved comment",coins:1,icon:"💬",category:"community"},{action:"Articol publicat (standard)",action_en:"Published article",coins:20,icon:"✍️",category:"community"},{action:"Articol publicat (expert)",action_en:"Expert article",coins:40,icon:"✍️",category:"community"},{action:"Referral confirmat",action_en:"Referral confirmed",coins:5,icon:"🤝",category:"growth"},{action:"Referral profil complet",action_en:"Referral profile done",coins:5,icon:"🤝",category:"growth"},{action:"Referral prima lecție",action_en:"Referral first lesson",coins:10,icon:"🤝",category:"growth"},{action:"Referral primul curs",action_en:"Referral first course",coins:20,icon:"🤝",category:"growth"}],Vhe=[{coins:300,label:"5% reducere",discount_pct:5},{coins:700,label:"10% reducere",discount_pct:10},{coins:1500,label:"15% reducere",discount_pct:15},{coins:2500,label:"Mini-curs gratuit",type:"mini_course"},{coins:5e3,label:"Credit curs standard",type:"standard_course"},{coins:1e4,label:"Beneficii premium",type:"premium_perks"}],lK={passive:{label:"Conținut pasiv",icon:"📖"},learning:{label:"Învățare activă",icon:"🎓"},community:{label:"Comunitate",icon:"💬"},growth:{label:"Creștere",icon:"📣"}};function _p(e){let r=qv[0];for(const n of qv)if(e>=n.minCoins)r=n;else break;return r}function D4(e){for(const r of qv)if(e<r.minCoins)return r;return null}function t$(e){const r=_p(e),n=D4(e);if(!n)return 100;const i=n.minCoins-r.minCoins,a=e-r.minCoins;return Math.min(100,Math.round(a/i*100))}function r$(){const{user:e}=Fn(),{data:r}=ide();if(!e||!r)return null;const n=_p(r.validatedEduScore??r.totalEarned??0);return s.jsx(be,{to:"/edu-coins",children:s.jsxs(Le.div,{initial:{opacity:0,scale:.9}
1043,animate:{opacity:1,scale:1},className:"inline-flex items-center gap-1.5 bg-accent/10 border border-accent/20 text-accent px-2.5 py-1 rounded-full text-xs font-bold hover:bg-accent/20 transition-colors cursor-pointer",children:[s.jsx(Wi,{size:14,className:"text-accent"}),r.balance,s.jsx("span",{className:"text-[10px] opacity-70",children:n.icon})]})})}const cK=[{slug:"web3",labelKey:"topic.web3"},{slug:"blockchain",labelKey:"topic.blockchain"},{slug:"nft",labelKey:"topic.nft"},{slug:"ai",labelKey:"topic.ai"},{slug:"digital-marketing",labelKey:"topic.digital-marketing"},{slug:"e-learning",labelKey:"topic.e-learning"}];function nze(){const[e,r]=w.useState(!1),[n,i]=w.useState(!1),a=ps(),{theme:o,toggleTheme:l}=j4(),{user:c,isAdmin:u,signOut:d}=Fn(),h=As(),{t:f,lang:p}=Pt(),m=()=>{const y=a.pathname;return p==="ro"?`https://eduweb.ai${y}`:`https://eduweb.ro${y}`},A=y=>`px-3 py-2 rounded-md text-sm font-semibold transition-all duration-200 ${a.pathname===y?"text-primary":"text-foreground hover:text-primary"}`,g=y=>`px-2.5 py-1.5 rounded-md text-xs font-medium transition-all duration-200 ${a.pathname===y?"text-primary bg-primary/10":"text-foreground/70 hover:text-foreground hover:bg-secondary"}`;return s.jsxs("header",{className:"sticky top-0 z-50 pt-[env(safe-area-inset-top)]",style:{backgroundColor:"hsl(var(--secondary))"},children:[s.jsx("div",{className:"bg-secondary/50 backdrop-blur-xl border-b border-border/30",children:s.jsxs("div",{className:"container flex items-center justify-end h-9 gap-1.5",children:[s.jsx(r$,{}),s.jsx("div",{className:"w-px h-4 bg-border/50 mx-1"}),s.jsxs("a",{href:m(),className:"flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors","aria-label":p==="ro"?"Switch to English":"Comută în Română",title:p==="ro"?"English":"Română",children:[s.jsx(Dr,{size:14}),s.jsx("span",{className:"hidden sm:inline",children:p==="ro"?"EN":"RO"})]}),s.jsx("button",{onClick:l,className:"p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors","aria-label":f("nav.toggle_theme"),children:o==="dark"?s.jsx(fle,{size:14}):s.jsx(sle,{size:14})}),s.jsx("div",{className:"w-px h-4 bg-border/50 mx-1"}),c?s.jsx("div",{className:"flex items-center gap-1",children:s.jsxs(SE,{children:[s.jsxs(kE,{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs font-semibold text-foreground bg-secondary/80 hover:bg-secondary transition-colors outline-none",children:[s.jsx(jy,{size:14,className:"text-primary"}),s.jsx("span",{className:"hidden sm:inline",children:f("nav.account")}),s.jsx(Vl,{size:12})]}),s.jsxs(q2,{align:"end",className:"w-48",children:[s.jsxs(Go,{onClick:()=>h("/membru?tab=account"),className:"cursor-pointer",children:[s.jsx(jy,{size:14,className:"mr-2"})," Cont"]}),s.jsxs(Go,{onClick:()=>h("/membru?tab=settings"),className:"cursor-pointer",children:[s.jsx(lp,{size:14,className:"mr-2"})," Setări"]}),u&&s.jsxs(s.Fragment,{children:[s.jsx(EE,{}),s.jsxs(Go,{onClick:()=>h("/admin"),className:"cursor-pointer",children:[s.jsx(pi,{size:14,className:"mr-2"})," Admin"]})]}),s.jsx(EE,{}),s.jsxs(Go,{onClick:d,className:"cursor-pointer text-destructive",children:[s.jsx(s4,{size:14,className:"mr-2"})," Deconectare"]})]})]})}):s.jsxs(be,{to:"/auth",className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs font-bold text-primary-foreground bg-primary hover:brightness-110 transition-all shadow-sm",children:[s.jsx(jy,{size:14}),s.jsx("span",{children:p==="ro"?"Intră":"Login"})]})]})}),s.jsx("div",{className:"bg-background/85 backdrop-blur-xl border-b border-border/50",children:s.jsxs("div",{className:"container flex items-center justify-between h-14",children:[s.jsx(be,{to:"/",className:"flex items-center group -ml-2",children:s.jsx("img",{src:o==="dark"?K2:tde,alt:"EduWeb",className:"h-10 lg:h-12 w-auto"})}),s.jsxs("nav",{className:"hidden lg:flex items-center gap-1",children:[s.jsx(be,{to:"/stiri",className:A("/stiri"),children:f("nav.news")}),s.jsx(be,{to:"/analize",className:A("/analize"),children:f("nav.analysis")}),s.jsx(oOe,{}),s.jsx(be,{to:"/academy",className:A("/academy"),children:s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Rr,{size:14})," ",f("nav.academy")]})}),s.jsxs(be,{to:p==="ro"?"/evenimente":"/events",className:`ml-1 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-bold transition-all shadow-sm ${a.pathname===(p==="ro"?"/evenimente":"/events")?"bg-primary text-primary-foreground":"bg-primary/10 text-primary hover:bg-primary hover:text-primary-foreground"}`,children:[s.jsx(Ja,{size:14}),p==="ro"?"Evenimente":"Events"]}),s.jsx("div",{className:"w-px h-5 bg-border mx-2"}),cK.map(y=>s.jsx(be,{to:`/${y.slug}`,className:g(`/${y.slug}`),children:f(y.labelKey)},y.slug))]}),s.jsx("button",{onClick:()=>r(!e),className:"lg:hidden p-2 text-muted-foreground hover:text-foreground","aria-label":"Menu",children:e?s.jsx(Uc,{size:24}):s.jsx(cke,{size:24})})]})}),e&&s.jsxs("nav",{className:"lg:hidden border-t border-border/50 bg-background/95 backdrop-blur-xl px-4 py-4 space-y-1 max-h-[80vh] overflow-y-auto",children:[s.jsx(be,{to:"/stiri",onClick:()=>r(!1),className:"block px-4 py-3 rounded-lg text-base font-semibold text-foreground hover:bg-secondary transition-colors",children:f("nav.news")}),s.jsx(be,{to:"/analize",onClick:()=>r(!1),className:"block px-4 py-3 rounded-lg text-base font-semibold text-foreground hover:bg-secondary transition-colors",children:f("nav.analysis")}),s.jsxs(be,{to:p==="ro"?"/evenimente":"/events",onClick:()=>r(!1),className:"flex items-center gap-2 px-4 py-3 rounded-lg text-base font-semibold text-foreground hover:bg-secondary transition-colors",children:[s.jsx(Ja,{size:18,className:"text-primary"})," ",p==="ro"?"Evenimente":"Events"]}),s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>i(!n),className:"w-full flex items-center justify-between px-4 py-3 rounded-lg text-base font-semibold text-foreground hover:bg-secondary transition-colors",children:[s.jsx("span",{children:"Crypto"}),s.jsx(Vl,{size:16,className:`transition-transform ${n?"rotate-180":""}`})]}),n&&s.jsxs("div",{className:"ml-2 pl-3 border-l-2 border-primary/30 mt-1 space-y-0.5",children:[s.jsxs(be,{to:"/crypto",onClick:()=>r(!1),className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg text-sm text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",children:[s.jsx(oa,{size:15,className:"text-primary"})," Crypto Hub"]}),s.jsxs(be,{to:"/preturi-crypto",onClick:()=>r(!1),className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg text-sm text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",children:[s.jsx(Eo,{size:15,className:"text-primary"})," Prețuri Live"]}),s.jsxs(be,{to:"/convertor-crypto-ron",onClick:()=>r(!1),className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg text-sm text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",children:[s.jsx(Gh,{size:15,className:"text-primary"})," Convertor"]}),s.jsx("div",{className:"cyber-line my-2"}),fs.map(y=>s.jsxs(be,{to:`/${y.slug}`,onClick:()=>r(!1),className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg text-sm text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",children:[s.jsx("span",{className:"text-base",children:y.icon})," ",y.name]},y.id))]})]}),s.jsxs(be,{to:"/academy",onClick:()=>r(!1),className:"flex items-center gap-2 px-4 py-3 rounded-lg text-base font-semibold text-foreground hover:bg-secondary transition-colors",children:[s.jsx(Rr,{size:18})," ",f("nav.academy")]}),s.jsxs(be,{to:"/knowledge-map",onClick:()=>r(!1),className:"flex items-center gap-2 px-4 py-3 rounded-lg text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",children:[s.jsx(l4,{size:16,className:"text-primary"})," Knowledge Map"]}),s.jsxs(be,{to:"/simulari-web3",onClick:()=>r(!1),className:"flex items-center gap-2 px-4 py-3 rounded-lg text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",children:[s.jsx(Eu,{size:16,className:"text-primary"})," ",p==="ro"?"Simulări Web3":"Web3 Simulations"]}),s.jsx("div",{className:"cyber-line my-3"}),cK.map(y=>s.jsx(be,{to:`/${y.slug}`,onClick:()=>r(!1),className:"block px-4 py-3 rounded-lg text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",children:f(y.labelKey)},y.slug)),s.jsx("div",{className:"cyber-line my-3"}),s.jsxs(be,{to:"/instaleaza",onClick:()=>r(!1),className:"flex items-center gap-2 px-4 py-3 rounded-lg text-base font-semibold text-primary hover:bg-primary/10 transition-colors",children:[s.jsx(d4,{size:18})," ",p==="ro"?"Instalează aplicația":"Install the app"]}),!c&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"cyber-line my-3"}),s.jsxs(be,{to:"/auth",onClick:()=>r(!1),className:"flex items-center justify-center gap-2 mx-2 px-4 py-3.5 rounded-xl text-base font-bold bg-primary text-primary-foreground hover:brightness-110 transition-all shadow-lg shadow-primary/20",children:[s.jsx(jy,{size:18})," ",p==="ro"?"Autentificare / Creare cont":"Login / Sign up"]})]})]})]})}function ize(){const{theme:e}=j4(),{t:r,lang:n}=Pt(),i=e==="dark"?K2:tde,a=n==="ro";return s.jsx("footer",{className:"border-t border-border mt-20 bg-muted/30 pb-[env(safe-area-inset-bottom)]",children:s.jsxs("div",{className:"container py-14",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-10",children:[s.jsxs("div",{className:"md:col-span-2 space-y-5",children:[s.jsx(be,{to:"/",className:"inline-block",children:s.jsx("img",{src:i,alt:"EduWeb",className:"h-12 w-auto"})}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-md leading-relaxed",children:r("footer.description")}),s.jsxs("div",{className:"space-y-2 pt-2",children:[s.jsx("h4",{className:"font-heading font-semibold text-sm text-foreground",children:r("footer.contact")}),s.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[s.jsx(Mg,{className:"h-4 w-4 mt-0.5 shrink-0 text-primary"}),s.jsx("span",{children:"Aleea Calin Nemes 1, Cluj-Napoca, România"})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Za,{className:"h-4 w-4 shrink-0 text-primary"}),s.jsx("a",{href:"mailto:[email protected]",className:"hover:text-foreground transition-colors",children:"[email protected]"})]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(ole,{className:"h-4 w-4 shrink-0 text-primary"}),s.jsx("a",{href:"tel:+40752110109",className:"hover:text-foreground transition-colors",children:"0752 110 109"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-heading font-semibold text-sm mb-4 text-foreground",children:r("footer.sections")}),s.jsxs("ul",{className:"space-y-2.5 text-sm text-muted-foreground",children:[s.jsx("li",{children:s.jsx(be,{to:"/stiri",className:"hover:text-foreground transition-colors",children:r("nav.news")})}),s.jsx("li",{children:s.jsx(be,{to:a?"/evenimente":"/events",className:"hover:text-foreground transition-colors",children:a?"Evenimente":"Events"})}),s.jsx("li",{children:s.jsx(be,{to:"/analize",className:"hover:text-foreground transition-colors",children:r("footer.analysis_ai")})}),s.jsx("li",{children:s.jsx(be,{to:"/web3",className:"hover:text-foreground transition-colors",children:"Web3"})}),s.jsx("li",{children:s.jsx(be,{to:"/blockchain",className:"hover:text-foreground transition-colors",children:"Blockchain"})}),s.jsx("li",{children:s.jsx(be,{to:"/glosar",className:"hover:text-foreground transition-colors",children:r("footer.glossary")})}),s.jsx("li",{children:s.jsx(be,{to:"/knowledge-map",className:"hover:text-foreground transition-colors",children:"🧠 Knowledge Map"})}),s.jsx("li",{children:s.jsxs(be,{to:"/simulari-web3",className:"hover:text-foreground transition-colors",children:["🎮 ",a?"Simulări Web3":"Web3 Simulations"]})})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-heading font-semibold text-sm mb-4 text-foreground",children:r("footer.topics")}),s.jsxs("ul",{className:"space-y-2.5 text-sm text-muted-foreground",children:[s.jsx("li",{children:s.jsx(be,{to:"/nft",className:"hover:text-foreground transition-colors",children:"NFT"})}),s.jsx("li",{children:s.jsxs(be,{to:"/ai",className:"hover:text-foreground transition-colors",children:[r("topic.ai")," & AI Agents"]})}),s.jsx("li",{children:s.jsx(be,{to:"/digital-marketing",className:"hover:text-foreground transition-colors",children:r("topic.digital-marketing")})}),s.jsx("li",{children:s.jsx(be,{to:"/e-learning",className:"hover:text-foreground transition-colors",children:r("topic.e-learning")})}),s.jsx("li",{children:s.jsx(be,{to:"/cele-mai-bune-exchange-crypto-romania",className:"hover:text-foreground transition-colors",children:r("footer.best_exch
1043ange")})}),s.jsx("li",{children:s.jsx(be,{to:a?"/despre-noi":"/about",className:"hover:text-foreground transition-colors",children:a?"Despre Noi":"About Us"})}),s.jsx("li",{children:s.jsx(be,{to:"/contact",className:"hover:text-foreground transition-colors",children:r("footer.contact")})})]})]})]}),s.jsxs("div",{className:"border-t border-border mt-10 pt-6 flex flex-col md:flex-row justify-between items-center gap-4",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:r("footer.rights")}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(be,{to:"/termeni",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r("footer.terms")}),s.jsx(be,{to:"/confidentialitate",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r("footer.privacy")})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("footer.disclaimer")})]})]})})}const aze=4.65,sze="https://ahleagpvrcuwshrzzpkq.supabase.co/functions/v1/crypto-prices",uK="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw";function oze(e){const r=aze;return e.map(n=>({...n,current_price_usd:n.current_price,current_price:n.current_price*r,market_cap:n.market_cap*r,total_volume:n.total_volume*r,ath:n.ath*r,atl:n.atl*r,high_24h:n.high_24h*r,low_24h:n.low_24h*r,sparkline_in_7d:n.sparkline_in_7d?{price:n.sparkline_in_7d.price.map(i=>i*r)}:void 0}))}async function lze(e){const r=`${sze}?sparkline=${e}`,n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",apikey:uK,Authorization:`Bearer ${uK}`}});if(!n.ok){const a=await n.text().catch(()=>"");throw new Error(`Edge function error ${n.status}: ${a}`)}const i=await n.json();return oze(i)}function E_(){return Xe({queryKey:["all-coins-ron"],queryFn:()=>lze(!0),staleTime:2*6e4,refetchInterval:2*6e4})}function cze(e){var i;const r=E_(),n=((i=r.data)==null?void 0:i.find(a=>a.id===e))??null;return{...r,data:n}}function Whe(e){const{data:r,isLoading:n}=E_(),i=r==null?void 0:r.find(a=>a.id===e);return{data:(i==null?void 0:i.current_price)??void 0,isLoading:n}}function uze(){const{data:e}=E_(),r=fs.map(i=>{const a=e==null?void 0:e.find(o=>o.id===i.id);return{...i,live:a}}),n=[...r,...r];return s.jsx("div",{className:"w-full bg-card/60 backdrop-blur-sm border-b border-border/40 overflow-hidden",children:s.jsx("div",{className:"flex animate-ticker whitespace-nowrap py-2",children:n.map((i,a)=>{var l,c;const o=(((l=i.live)==null?void 0:l.price_change_percentage_24h)??0)>=0;return s.jsxs(be,{to:`/${i.slug}`,className:"inline-flex items-center gap-2 px-4 text-xs hover:bg-secondary/50 transition-colors rounded-md py-1 shrink-0",children:[(c=i.live)!=null&&c.image?s.jsx("img",{src:i.live.image,alt:i.name,className:"w-4 h-4 rounded-full"}):s.jsx("span",{className:"text-sm",children:i.icon}),s.jsx("span",{className:"font-heading font-semibold text-foreground",children:i.symbol}),i.live&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"font-mono text-foreground",children:new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:2,maximumFractionDigits:i.live.current_price<1?4:2}).format(i.live.current_price)}),s.jsxs("span",{className:`inline-flex items-center gap-0.5 font-semibold ${o?"text-green-500":"text-red-500"}`,children:[o?s.jsx(oa,{size:10}):s.jsx(B2,{size:10}),Math.abs(i.live.price_change_percentage_24h).toFixed(1),"%"]})]})]},`${i.id}-${a}`)})})})}const FI="eduweb_cookie_consent";function dze(){const[e,r]=w.useState(!1),{t:n}=Pt();w.useEffect(()=>{const o=localStorage.getItem(FI);o==="granted"?i():o==="denied"||r(!0)},[]);function i(){var o;(o=window.gtag)==null||o.call(window,"consent","update",{analytics_storage:"granted",ad_storage:"granted",ad_user_data:"granted",ad_personalization:"granted"}),localStorage.setItem(FI,"granted"),r(!1)}function a(){localStorage.setItem(FI,"denied"),r(!1)}return e?s.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-[100] p-4 pb-[calc(1rem+env(safe-area-inset-bottom))] animate-in slide-in-from-bottom duration-300",children:s.jsxs("div",{className:"max-w-3xl mx-auto rounded-xl border border-border bg-card shadow-lg p-4 flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[s.jsx(KSe,{size:20,className:"text-primary shrink-0 mt-0.5 sm:mt-0"}),s.jsxs("p",{className:"text-sm text-muted-foreground flex-1",children:[n("cookie.text"),s.jsx("a",{href:"/privacy",className:"text-primary hover:underline ml-1",children:n("cookie.privacy")})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s.jsx("button",{onClick:a,className:"px-4 py-2 rounded-lg text-sm font-medium border border-border bg-secondary text-secondary-foreground hover:bg-secondary/80 transition-colors",children:n("cookie.deny")}),s.jsx("button",{onClick:i,className:"px-4 py-2 rounded-lg text-sm font-medium bg-primary text-primary-foreground hover:brightness-110 transition-all",children:n("cookie.accept")})]})]})}):null}const hze={article_read:"article_read",video_brief:"video_brief",video_brief_play:"video_brief",daily_podcast:"daily_podcast",podcast_play:"daily_podcast",daily_login:"__skip__",comment:"comment_approved",article_c
1043omment:"comment_approved",quiz_correct:"quiz_passed",quiz_passed:"quiz_passed",lesson_complete:"lesson_complete",lesson_video_play:"__skip__",module_complete:"module_complete",course_complete:"standard_course_complete",certificate:"certificate_earned",certificate_earned:"certificate_earned",referral:"referral_confirmed",social_share:"__skip__",simulation_complete:"simulation_complete"},fze=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Cp(){const{user:e}=Fn(),r=Kr(),n=w.useRef(new Set);return{awardCoins:w.useCallback(async(a,o,l)=>{if(!e)return{success:!1,reason:"not_authenticated"};const c=hze[o]||o;if(c==="__skip__")return{success:!1,reason:"skipped"};const u=`${c}:${l||"none"}`;if(n.current.has(u))return{success:!1,reason:"client_dedup"};n.current.add(u);const d=l?fze.test(l):!1,h=d?l:null,f=d||!l?{}:{reference_key:l};try{const{data:p,error:m}=await G.rpc("award_edu_coins",{p_user_id:e.id,p_rule_key:c,p_reference_id:h,p_metadata:f});if(m)throw m;return p!=null&&p.success?(r.invalidateQueries({queryKey:["edu-coins"]}),r.invalidateQueries({queryKey:["gamification-wallet"]}),r.invalidateQueries({queryKey:["gamification-transactions"]}),{success:!0,coinsAwarded:(p==null?void 0:p.coins_awarded)??0}):(n.current.delete(u),{success:!1,reason:(p==null?void 0:p.reason)||"unknown"})}catch(p){return console.error("EduCoins award error:",p),n.current.delete(u),{success:!1,reason:"error"}}},[e,r])}}function mze(){const{lang:e}=Pt(),[r,n]=w.useState(!1),[i,a]=w.useState(0),[o,l]=w.useState(0),[c,u]=w.useState(!1),[d,h]=w.useState(!1),f=w.useRef(null),p=w.useRef(),{data:m,isLoading:A}=Xe({queryKey:["daily-podcast"],queryFn:async()=>{const{data:T,error:F}=await G.from("daily_podcasts").select("*").eq("status","published").order("podcast_date",{ascending:!1}).limit(1).single();if(F)throw F;return T},staleTime:60*1e3});w.useEffect(()=>()=>{p.current&&clearInterval(p.current),f.current&&(f.current.pause(),f.current=null)},[]);const{awardCoins:g}=Cp(),y=w.useRef(!1),x=()=>{S&&(f.current||(f.current=new Audio(S),f.current.addEventListener("loadedmetadata",()=>{var T;l(((T=f.current)==null?void 0:T.duration)||m.duration_seconds||0)}),f.current.addEventListener("ended",()=>{n(!1),a(0),p.current&&clearInterval(p.current)})),r?(f.current.pause(),p.current&&clearInterval(p.current)):(f.current.play(),p.current=window.setInterval(()=>{f.current&&a(f.current.currentTime)},200),!y.current&&m&&(y.current=!0,G.from("media_plays").insert({media_type:"podcast",media_id:m.id,media_title:m.title,topic:null}).then(()=>{}),g(2,"podcast_play",m.id).then(T=>{!T.success&&T.reason!=="client_dedup"&&T.reason!=="duplicate"&&console.warn("EduCoins podcast_play failed:",T.reason)}))),n(!r))},b=()=>{f.current&&(f.current.muted=!c),u(!c)},v=T=>{if(!f.current||!o)return;const F=T.currentTarget.getBoundingClientRect(),D=(T.clientX-F.left)/F.width*o;f.current.currentTime=D,a(D)},j=T=>{const F=Math.floor(T/60),I=Math.floor(T%60);return`${F}:${I.toString().padStart(2,"0")}`};if(A||!m)return null;const _=e==="en"&&m.audio_url_en||m.audio_url,C=e==="en"&&m.title_en||m.title,N=e==="en"&&m.duration_seconds_en||m.duration_seconds,S=_?`${_}?v=${new Date(m.updated_at).getTime()}`:null,O=new Date(m.podcast_date+"T00:00:00").toLocaleDateString(e==="ro"?"ro-RO":"en-US",{weekday:"short",day:"numeric",month:"short"}),B=o>0?i/o*100:0;return s.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4},className:"w-full",children:s.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-primary/20 bg-gradient-to-r from-primary/5 via-card to-accent/5 cursor-pointer",onClick:()=>h(!d),children:[s.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 bg-primary/10 rounded-full blur-3xl"}),s.jsx("div",{className:"absolute -bottom-10 -left-10 w-32 h-32 bg-accent/10 rounded-full blur-3xl"}),s.jsxs("div",{className:"relative z-10 px-4 py-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("button",{onClick:T=>{T.stopPropagation(),x()},className:"relative flex-shrink-0 w-10 h-10 rounded-full bg-primary text-primary-foreground flex items-center justify-center hover:brightness-110 transition-all shadow-lg shadow-primary/20",children:[s.jsx(Fu,{mode:"wait",children:r?s.jsx(Le.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:s.jsx(Fd,{size:18})},"pause"):s.jsx(Le.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:s.jsx(ya,{size:18,className:"ml-0.5"})},"play")}),r&&s.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-2.5 h-2.5 bg-destructive rounded-full animate-pulse"})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[s.jsx(c4,{size:12,className:"text-primary flex-shrink-0"}),s.jsx("span",{className:"text-[10px] font-mono font-bold uppercase tracking-widest text-primary",children:"EduWeb Daily"}),s.jsx("span",{className:"text-[10px] text-muted-foreground",children:"•"}),s.jsx("span",{className:"text-[10px] text-muted-foreground",children:O})]}),s.jsx("p",{className:"text-sm font-heading font-semibold text-foreground truncate",children:C})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[s.jsx("button",{onClick:T=>{T.stopPropagation(),b()},className:"p-2 rounded-lg hover:bg-secondary/50 transition-colors text-muted-foreground",children:c?s.jsx(zg,{size:14}):s.jsx(wo,{size:14})}),s.jsxs("div",{className:"flex items-center gap-1 text-[11px] text-muted-foreground font-mono",children:[s.jsx(ki,{size:10}),j(r?i:N||0)]})]})]}),s.jsx("div",{className:"mt-2 h-1 bg-border/50 rounded-full cursor-pointer group",onClick:T=>{T.stopPropagation(),v(T)},children:s.jsx(Le.div,{className:"h-full bg-primary rounded-full relative",style:{width:`${B}%`},transition:{duration:.1},children:s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-2.5 h-2.5 bg-primary rounded-full opacity-0 group-hover:opacity-100 transition-opacity shadow-sm"})})}),s.jsx(Fu,{children:d&&s.jsxs(Le.div,{initial:{height:0,opacity:0}
1043,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},className:"overflow-hidden",children:[s.jsxs("div",{className:"mt-3 pt-3 border-t border-border/30 flex flex-wrap items-center gap-x-4 gap-y-2",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(eR,{size:12,className:"text-primary"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[s.jsx("span",{className:"font-medium text-foreground",children:e==="en"?"Sarah":"Ana"})," — ",e==="en"?"Host":"Moderatoare"]})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(eR,{size:12,className:"text-accent-foreground"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[s.jsx("span",{className:"font-medium text-foreground",children:e==="en"?"James":"Robert"})," — ",e==="en"?"Tech Expert":"Expert Tehnic"]})]}),s.jsxs("div",{className:"ml-auto text-[10px] text-muted-foreground",children:[m.posts_count," ",e==="ro"?"știri acoperite":"stories covered"]})]}),s.jsx("div",{className:"mt-3 pt-3 border-t border-border/30",children:s.jsxs("a",{href:"https://eduweb.ro",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 group/sponsor rounded-lg p-2 -mx-2 hover:bg-primary/5 transition-colors",onClick:T=>T.stopPropagation(),children:[s.jsx("div",{className:"shrink-0 w-8 h-8 rounded-lg bg-gradient-to-br from-primary/20 to-accent/20 flex items-center justify-center text-primary font-bold text-[10px] tracking-tight",children:"365"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground font-mono mb-0.5",children:e==="ro"?"Susținut de":"Powered by"}),s.jsxs("p",{className:"text-xs font-semibold text-foreground group-hover/sponsor:text-primary transition-colors",children:["SEO 365 — ",e==="ro"?"Agenția de SEO":"SEO Agency"]}),s.jsx("p",{className:"text-[10px] text-muted-foreground leading-snug mt-0.5",children:e==="ro"?"Vrei să apari în to
1043p Google, ChatGPT și Gemini? Echipa SEO 365 te ajută.":"Want to rank on Google, ChatGPT & Gemini? SEO 365 can help."})]}),s.jsx(Yr,{size:12,className:"shrink-0 text-muted-foreground group-hover/sponsor:text-primary transition-colors"})]})})]})})]})]})})}const n$=O0("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),me=w.forwardRef(({className:e,variant:r,size:n,asChild:i=!1,...a},o)=>{const l=i?I0:"button";return s.jsx(l,{className:it(n$({variant:r,size:n,className:e})),ref:o,...a})});me.displayName="Button";function pze(e,r){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Aze=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gze=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xze={};function dK(e,r){return(xze.jsx?gze:Aze).test(e)}const yze=/[ \t\n\f\r]/g;function vze(e){return typeof e=="object"?e.type==="text"?hK(e.value):!1:hK(e)}function hK(e){return e.replace(yze,"")===""}class B_{constructor(r,n,i){this.normal=n,this.property=r,i&&(this.space=i)}}B_.prototype.normal={};B_.prototype.property={};B_.prototype.space=void 0;function qhe(e,r){const n={},i={};for(const a of e)Object.assign(n,a.property),Object.assign(i,a.normal);return new B_(n,i,r)}function cD(e){return e.toLowerCase()}class dl{constructor(r,n){this.attribute=n,this.property=r}}dl.prototype.attribute="";dl.prototype.booleanish=!1;dl.prototype.boolean=!1;dl.prototype.commaOrSpaceSeparated=!1;dl.prototype.commaSeparated=!1;dl.prototype.defined=!1;dl.prototype.mustUseProperty=!1;dl.prototype.number=!1;dl.prototype.overloadedBoolean=!1;dl.prototype.property="";dl.prototype.spaceSeparated=!1;dl.prototype.space=void 0;let bze=0;const Qr=Qg(),Ca=Qg(),uD=Qg(),At=Qg(),ci=Qg(),ev=Qg(),Nl=Qg();function Qg(){return 2**++bze}const dD=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qr,booleanish:Ca,commaOrSpaceSeparated:Nl,commaSeparated:ev,number:At,overloadedBoolean:uD,spaceSeparated:ci},Symbol.toStringTag,{value:"Module"})),OI=Object.keys(dD);class i$ extends dl{constructor(r,n,i,a){let o=-1;if(super(r,n),fK(this,"space",a),typeof i=="number")for(;++o<OI.length;){const l=OI[o];fK(this,OI[o],(i&dD[l])===dD[l])}}}i$.prototype.defined=!0;function fK(e,r,n){n&&(e[r]=n)}function J0(e){const r={},n={};for(const[i,a]of Object.entries(e.properties)){const o=new i$(i,e.transform(e.attributes||{},i),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),r[i]=o,n[cD(i)]=i,n[cD(o.attribute)]=i}return new B_(r,n,e.space)}const Khe=J0({properties:{ariaActiveDescendant:null,ariaAtomic:Ca,ariaAutoComplete:null,ariaBusy:Ca,ariaChecked:Ca,ariaColCount:At,ariaColIndex:At,ariaColSpan:At,ariaControls:ci,ariaCurrent:null,ariaDescribedBy:ci,ariaDetails:null,ariaDisabled:Ca,ariaDropEffect:ci,ariaErrorMessage:null,ariaExpanded:Ca,ariaFlowTo:ci,ariaGrabbed:Ca,ariaHasPopup:null,ariaHidden:Ca,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ci,ariaLevel:At,ariaLive:null,ariaModal:Ca,ariaMultiLine:Ca,ariaMultiSelectable:Ca,ariaOrientation:null,ariaOwns:ci,ariaPlaceholder:null,ariaPosInSet:At,ariaPressed:Ca,ariaReadOnly:Ca,ariaRelevant:null,ariaRequired:Ca,ariaRoleDescription:ci,ariaRowCount:At,ariaRowIndex:At,ariaRowSpan:At,ariaSelected:Ca,ariaSetSize:At,ariaSort:null,ariaValueMax:At,ariaValueMin:At,ariaValueNow:At,ariaValueText:null,role:null},transform(e,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function Ghe(e,r){return r in e?e[r]:r}function Xhe(e,r){return Ghe(e,r.toLowerCase())}const wze=J0({attributes:{acceptcharset:"accept-charset",classname:"
1043class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ev,acceptCharset:ci,accessKey:ci,action:null,allow:null,allowFullScreen:Qr,allowPaymentRequest:Qr,allowUserMedia:Qr,alt:null,as:null,async:Qr,autoCapitalize:null,autoComplete:ci,autoFocus:Qr,autoPlay:Qr,blocking:ci,capture:null,charSet:null,checked:Qr,cite:null,className:ci,cols:At,colSpan:null,content:null,contentEditable:Ca,controls:Qr,controlsList:ci,coords:At|ev,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qr,defer:Qr,dir:null,dirName:null,disabled:Qr,download:uD,draggable:Ca,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qr,formTarget:null,headers:ci,height:At,hidden:uD,high:At,href:null,hrefLang:null,htmlFor:ci,httpEquiv:ci,id:null,imageSizes:null,imageSrcSet:null,inert:Qr,inputMode:null,integrity:null,is:null,isMap:Qr,itemId:null,itemProp:ci,itemRef:ci,itemScope:Qr,itemType:ci,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qr,low:At,manifest:null,max:null,maxLength:At,media:null,method:null,min:null,minLength:At,multiple:Qr,muted:Qr,name:null,nonce:null,noModule:Qr,noValidate:Qr,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Qr,optimum:At,pattern:null,ping:ci,placeholder:null,playsInline:Qr,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qr,referrerPolicy:null,rel:ci,required:Qr,reversed:Qr,rows:At,rowSpan:At,sandbox:ci,scope:null,scoped:Qr,seamless:Qr,selected:Qr,shadowRootClonable:Qr,shadowRootDelegatesFocus:Qr,shadowRootMode:null,shape:null,size:At,sizes:null,slot:null,span:At,spellCheck:Ca,src:null,srcDoc:null,srcLang:null,srcSet:null,start:At,step:null,style:null,tabIndex:At,target:null,title:null,translate:null,type:null,typeMustMatch:Qr,useMap:null,value:Ca,width:At,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ci,axis:null,background:null,bgColor:null,border:At,borderColor:null,bottomMargin:At,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qr,declare:Qr,event:null,face:null,frame:null,frameBorder:null,hSpace:At,leftMargin:At,link:null,longDesc:null,lowSrc:null,marginHeight:At,marginWidth:At,noResize:Qr,noHref:Qr,noShade:Qr,noWrap:Qr,object:null,profile:null,prompt:null,rev:null,rightMargin:At,rules:null,scheme:null,scrolling:Ca,standby:null,summary:null,text:null,topMargin:At,valueType:null,version:null,vAlign:null,vLink:null,vSpace:At,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qr,disableRemotePlayback:Qr,prefix:null,property:null,results:At,security:null,unselectable:null},space:"html",transform:Xhe}),jze=J0({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRen
1043dering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Nl,accentHeight:At,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:At,amplitude:At,arabicForm:null,ascent:At,attributeName:null,attributeType:null,azimuth:At,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:At,by:null,calcMode:null,capHeight:At,className:ci,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRen
1043dering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:At,diffuseConstant:At,direction:null,display:null,dur:null,divisor:At,dominantBaseline:null,download:Qr,dx:null,dy:null,edgeMode:null,editable:null,elevation:At,enableBackground:null,end:null,event:null,exponent:At,externalResourcesRequired:null,fill:null,fillOpacity:At,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ev,g2:ev,glyphName:ev,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:At,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:At,horizOriginX:At,horizOriginY:At,id:null,ideographic:At,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:At,k:At,k1:At,k2:At,k3:At,k4:At,kernelMatrix:Nl,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:At,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:At,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:At,overlineThickness:At,paintOrder:null,panose1:null,path:null,pathLength:At,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ci,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:At,pointsAtY:At,pointsAtZ:At,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Nl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Nl,rev:Nl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Nl,requiredFeatures:Nl,requiredFonts:Nl,requiredFormats:Nl,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:At,specularExponent:At,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:At,strikethroughThickness:At,string:null,stroke:null,strokeDashArray:Nl,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:At,strokeOpacity:At,strokeWidth:null,style:null,surfaceScale:At,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Nl,tabIndex:At,tableValues:null,target:null,targetX:At,targetY:At,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Nl,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:At,underlineThickness:At,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:At,values:null,vAlphabetic:At,vMathematical:At,vectorEffect:null,vHanging:At,vIdeographic:At,version:null,vertAdvY:At,vertOriginX:At,vertOriginY:At,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:At,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ghe}),Yhe=J0({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}
vendor: 4,497 bytes, lines 1043-1044
1043,space:"xlink",transform(e,r){return"xlink:"+r.slice(5).toLowerCase()}}),Jhe=J0({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xhe}),Zhe=J0({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,r){return"xml:"+r.slice(3).toLowerCase()}}),_ze={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Cze=/[A-Z]/g,mK=/-[a-z]/g,Nze=/^data[-\w.:]+$/i;function Sze(e,r){const n=cD(r);let i=r,a=dl;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Nze.test(r)){if(r.charAt(4)==="-"){const o=r.slice(5).replace(mK,Eze);i="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=r.slice(4);if(!mK.test(o)){let l=o.replace(Cze,kze);l.charAt(0)!=="-"&&(l="-"+l),r="data"+l}}a=i$}return new a(i,r)}function kze(e){return"-"+e.toLowerCase()}function Eze(e){return e.charAt(1).toUpperCase()}const Bze=qhe([Khe,wze,Yhe,Jhe,Zhe],"html"),a$=qhe([Khe,jze,Yhe,Jhe,Zhe],"svg");function Tze(e){return e.join(" ").trim()}var s$={},pK=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Pze=/\n/g,Ize=/^\s*/,Fze=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Oze=/^:\s*/,Lze=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Rze=/^[;\s]*/,Dze=/^\s+|\s+$/g,Mze=`
1044`,AK="/",gK="*",vA="",zze="comment",Uze="declaration";function $ze(e,r){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];r=r||{};var n=1,i=1;function a(A){var g=A.match(Pze);g&&(n+=g.length);var y=A.lastIndexOf(Mze);i=~y?A.length-y:i+A.length}function o(){var A={line:n,column:i};return function(g){return g.position=new l(A),d(),g}}function l(A){this.start=A,this.end={line:n,column:i},this.source=r.source}l.prototype.content=e;function c(A){var g=new Error(r.source+":"+n+":"+i+": "+A);if(g.reason=A,g.filename=r.source,g.line=n,g.column=i,g.source=e,!r.silent)throw g}function u(A){var g=A.exec(e);if(g){var y=g[0];return a(y),e=e.slice(y.length),g}}function d(){u(Ize)}function h(A){var g;for(A=A||[];g=f();)g!==!1&&A.push(g);return A}function f(){var A=o();if(!(AK!=e.charAt(0)||gK!=e.charAt(1))){for(var g=2;vA!=e.charAt(g)&&(gK!=e.charAt(g)||AK!=e.charAt(g+1));)++g;if(g+=2,vA===e.charAt(g-1))return c("End of comment missing");var y=e.slice(2,g-2);return i+=2,a(y),e=e.slice(g),i+=2,A({type:zze,comment:y})}}function p(){var A=o(),g=u(Fze);if(g){if(f(),!u(Oze))return c("property missing ':'");var y=u(Lze),x=A({type:Uze,property:xK(g[0].replace(pK,vA)),value:y?xK(y[0].replace(pK,vA)):vA});return u(Rze),x}}function m(){var A=[];h(A);for(var g;g=p();)g!==!1&&(A.push(g),h(A));return A}return d(),m()}function xK(e){return e?e.replace(Dze,vA):vA}var Qze=$ze,Hze=Cm&&Cm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s$,"__esModule",{value:!0});s$.default=Wze;const Vze=Hze(Qze);function Wze(e,r){let n=null;if(!e||typeof e!="string")return n;const i=(0,Vze.default)(e),a=typeof r=="function";return i.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:c}=o;a?r(l,c,o):c&&(n=n||{},n[l]=c)}),n}var M4={};Object.defineProperty(M4,"__esModule",{value:!0});M4.camelCase=void 0;var qze=/^--[a-zA-Z0-9_-]+$/,Kze=/-([a-z])/g,Gze=/^[^-]+$/,Xze=/^-(webkit|moz|ms|o|khtml)-/,Yze=/^-(ms)-/,Jze=function(e){return!e||Gze.test(e)||qze.test(e)},Zze=function(e,r){return r.toUpperCase()},yK=function(e,r){return"".concat(r,"-")},e6e=function(e,r){return r===void 0&&(r={}),Jze(e)?e:(e=e.toLowerCase(),r.reactCompat?e=e.replace(Yze,yK):e=e.replace(Xze,yK),e.replace(Kze,Zze))};M4.camelCase=e6e;var t6e=Cm&&Cm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},r6e=t6e(s$),n6e=M4;function hD(e,r){var n={};return!e||typeof e!="string"||(0,r6e.default)(e,function(i,a){i&&a&&(n[(0,n6e.camelCase)(i,r)]=a)}),n}hD.default=hD;var i6e=hD;const a6e=bn(i6e),efe=tfe("end"),o$=tfe("start");function tfe(e){return r;function r(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function s6e(e){const r=o$(e),n=efe(e);
vendor: 2,268 bytes, line 1044
1044if(r&&n)return{start:r,end:n}}function Mw(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?vK(e.position):"start"in e||"end"in e?vK(e):"line"in e||"column"in e?fD(e):""}function fD(e){return bK(e&&e.line)+":"+bK(e&&e.column)}function vK(e){return fD(e&&e.start)+"-"+fD(e&&e.end)}function bK(e){return e&&typeof e=="number"?e:1}class co extends Error{constructor(r,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let a="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof r=="string"?a=r:!o.cause&&r&&(l=!0,a=r.message,o.cause=r),!o.ruleId&&!o.source&&typeof i=="string"){const u=i.indexOf(":");u===-1?o.ruleId=i:(o.source=i.slice(0,u),o.ruleId=i.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const c=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=c?c.line:void 0,this.name=Mw(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}co.prototype.file="";co.prototype.name="";co.prototype.reason="";co.prototype.message="";co.prototype.stack="";co.prototype.column=void 0;co.prototype.line=void 0;co.prototype.ancestors=void 0;co.prototype.cause=void 0;co.prototype.fatal=void 0;co.prototype.place=void 0;co.prototype.ruleId=void 0;co.prototype.source=void 0;const l$={}.hasOwnProperty,o6e=new Map,l6e=/[A-Z]/g,c6e=new Set(["table","tbody","thead","tfoot","tr"]),u6e=new Set(["td","th"]),rfe="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function d6e(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=r.filePath||void 0;let i;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=y6e(n,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 1,079 bytes, line 1044
1044if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=x6e(n,r.jsx,r.jsxs)}const a={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:i,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?a$:Bze,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},o=nfe(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function nfe(e,r,n){if(r.type==="element")return h6e(e,r,n);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return f6e(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return p6e(e,r,n);if(r.type==="mdxjsEsm")return m6e(e,r);if(r.type==="root")return A6e(e,r,n);if(r.type==="text")return g6e(e,r)}function h6e(e,r,n){const i=e.schema;let a=i;r.tagName.toLowerCase()==="svg"&&i.space==="html"&&(a=a$,e.
vendor: 5,282 bytes, line 1044
1044schema=a),e.ancestors.push(r);const o=afe(e,r.tagName,!1),l=v6e(e,r);let c=u$(e,r);return c6e.has(r.tagName)&&(c=c.filter(function(u){return typeof u=="string"?!vze(u):!0})),ife(e,l,o,r),c$(l,c),e.ancestors.pop(),e.schema=i,e.create(r,o,l,n)}function f6e(e,r){if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}ej(e,r.position)}function m6e(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);ej(e,r.position)}function p6e(e,r,n){const i=e.schema;let a=i;r.name==="svg"&&i.space==="html"&&(a=a$,e.schema=a),e.ancestors.push(r);const o=r.name===null?e.Fragment:afe(e,r.name,!0),l=b6e(e,r),c=u$(e,r);return ife(e,l,o,r),c$(l,c),e.ancestors.pop(),e.schema=i,e.create(r,o,l,n)}function A6e(e,r,n){const i={};return c$(i,u$(e,r)),e.create(r,e.Fragment,i,n)}function g6e(e,r){return r.value}function ife(e,r,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(r.node=i)}function c$(e,r){if(r.length>0){const n=r.length>1?r:r[0];n&&(e.children=n)}}function x6e(e,r,n){return i;function i(a,o,l,c){const d=Array.isArray(l.children)?n:r;return c?d(o,l,c):d(o,l)}}function y6e(e,r){return n;function n(i,a,o,l){const c=Array.isArray(o.children),u=o$(i);return r(a,o,l,c,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function v6e(e,r){const n={};let i,a;for(a in r.properties)if(a!=="children"&&l$.call(r.properties,a)){const o=w6e(e,a,r.properties[a]);if(o){const[l,c]=o;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&u6e.has(r.tagName)?i=c:n[l]=c}}if(i){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function b6e(e,r){const n={};for(const i of r.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const o=i.data.estree.body[0];o.type;const l=o.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ej(e,r.position);else{const a=i.name;let o;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else ej(e,r.position);else o=i.value===null?!0:i.value;n[a]=o}return n}function u$(e,r){const n=[];let i=-1;const a=e.passKeys?new Map:o6e;for(;++i<r.children.length;){const o=r.children[i];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const d=a.get(u)||0;l=u+"-"+d,a.set(u,d+1)}}const c=nfe(e,o,l);c!==void 0&&n.push(c)}return n}function w6e(e,r,n){const i=Sze(e.schema,r);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?pze(n):Tze(n)),i.property==="style"){let a=typeof n=="object"?n:j6e(e,String(n));return e.stylePropertyNameCase==="css"&&(a=_6e(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&i.space?_ze[i.property]||i.property:i.attribute,n]}}function j6e(e,r){try{return a6e(r,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,a=new co("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=rfe+"#cannot-parse-style-attribute",a}}function afe(e,r,n){let i;if(!n)i={type:"Literal",value:r};else if(r.includes(".")){const a=r.split(".");let o=-1,l;for(;++o<a.length;){const c=dK(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}i=l}else i=dK(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(i.type==="Literal"){const a=i.value;return l$.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(i);ej(e)}function ej(e,r){const n=new co("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=rfe+"#cannot-handle-mdx-estrees-without-createevaluater",n}function _6e(e){const r={};let n;for(n in e)l$.call(e,n)&&(r[C6e(n)]=e[n]);return r}function C6e(e){let r=e.replace(l6e,N6e);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function N6e(e){return"-"+e.toLowerCase()}const LI={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},S6e={};function k6e(e,r){const n=S6e,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sfe(e,i,a)}function sfe(e,r,n){if(E6e(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return wK(e.children,r,n)}return Array.isArray(e)?wK(e,r,n):""}function wK(e,r,n){const i=[];let a=-1;for(;++a<e.length;)i[a]=sfe(e[a],r,n);return i.join("")}function E6e(e){return!!(e&&typeof e=="object")}const jK=document.createElement("i");function d$(e){const r="&"+e+";";jK.innerHTML=r;const n=jK.textContent;
vendor: 10,930 bytes, line 1044
1044return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===r?!1:n}function Rd(e,r,n,i){const a=e.length;let o=0,l;if(r<0?r=-r>a?0:a+r:r=r>a?a:r,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(r,n),e.splice(...l);else for(n&&e.splice(r,n);o<i.length;)l=i.slice(o,o+1e4),l.unshift(r,0),e.splice(...l),o+=1e4,r+=1e4}function gc(e,r){return e.length>0?(Rd(e,e.length,0,r),e):r}const _K={}.hasOwnProperty;function B6e(e){const r={};let n=-1;for(;++n<e.length;)T6e(r,e[n]);return r}function T6e(e,r){let n;for(n in r){const a=(_K.call(e,n)?e[n]:void 0)||(e[n]={}),o=r[n];let l;if(o)for(l in o){_K.call(a,l)||(a[l]=[]);const c=o[l];P6e(a[l],Array.isArray(c)?c:c?[c]:[])}}}function P6e(e,r){let n=-1;const i=[];for(;++n<r.length;)(r[n].add==="after"?e:i).push(r[n]);Rd(e,0,0,i)}function ofe(e,r){const n=Number.parseInt(e,r);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function tv(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fd=Np(/[A-Za-z]/),Rl=Np(/[\dA-Za-z]/),I6e=Np(/[#-'*+\--9=?A-Z^-~]/);function mD(e){return e!==null&&(e<32||e===127)}const pD=Np(/\d/),F6e=Np(/[\dA-Fa-f]/),O6e=Np(/[!-/:-@[-`{-~]/);function Nr(e){return e!==null&&e<-2}function rl(e){return e!==null&&(e<0||e===32)}function Bn(e){return e===-2||e===-1||e===32}const L6e=Np(new RegExp("\\p{P}|\\p{S}","u")),R6e=Np(/\s/);function Np(e){return r;function r(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Z0(e){const r=[];let n=-1,i=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&Rl(e.charCodeAt(n+1))&&Rl(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(l=String.fromCharCode(o,c),a=1):l="�"}else l=String.fromCharCode(o);l&&(r.push(e.slice(i,n),encodeURIComponent(l)),i=n+a+1,l=""),a&&(n+=a,a=0)}return r.join("")+e.slice(i)}function fi(e,r,n,i){const a=i?i-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return Bn(u)?(e.enter(n),c(u)):r(u)}function c(u){return Bn(u)&&o++<a?(e.consume(u),c):(e.exit(n),r(u))}}const D6e={tokenize:M6e};function M6e(e){const r=e.attempt(this.parser.constructs.contentInitial,i,a);let n;return r;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),fi(e,r,"linePrefix")}function a(c){return e.enter("paragraph"),o(c)}function o(c){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Nr(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),l)}}const z6e={tokenize:U6e},CK={tokenize:$6e};function U6e(e){const r=this,n=[];let i=0,a,o,l;return c;function c(v){if(i<n.length){const j=n[i];return r.containerState=j[1],e.attempt(j[0].continuation,u,d)(v)}return d(v)}function u(v){if(i++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,a&&b();const j=r.events.length;let _=j,C;for(;_--;)if(r.events[_][0]==="exit"&&r.events[_][1].type==="chunkFlow"){C=r.events[_][1].end;break}x(i);let N=j;for(;N<r.events.length;)r.events[N][1].end={...C},N++;return Rd(r.events,_+1,0,r.events.slice(j)),r.events.length=N,d(v)}return c(v)}function d(v){if(i===n.length){if(!a)return p(v);if(a.currentConstruct&&a.currentConstruct.concrete)return A(v);r.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(CK,h,f)(v)}function h(v){return a&&b(),x(i),p(v)}function f(v){return r.parser.lazy[r.now().line]=i!==n.length,l=r.now().offset,A(v)}function p(v){return r.containerState={},e.attempt(CK,m,A)(v)}function m(v){return i++,n.push([r.currentConstruct,r.containerState]),p(v)}function A(v){if(v===null){a&&b(),x(0),e.consume(v);return}return a=a||r.parser.flow(r.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),g(v)}function g(v){if(v===null){y(e.exit("chunkFlow"),!0),x(0),e.consume(v);return}return Nr(v)?(e.consume(v),y(e.exit("chunkFlow")),i=0,r.interrupt=void 0,c):(e.consume(v),g)}function y(v,j){const _=r.sliceStream(v);if(j&&_.push(null),v.previous=o,o&&(o.next=v),o=v,a.defineSkip(v.start),a.write(_),r.parser.lazy[v.start.line]){let C=a.events.length;for(;C--;)if(a.events[C][1].start.offset<l&&(!a.events[C][1].end||a.events[C][1].end.offset>l))return;const N=r.events.length;let S=N,E,O;for(;S--;)if(r.events[S][0]==="exit"&&r.events[S][1].type==="chunkFlow"){if(E){O=r.events[S][1].end;break}E=!0}for(x(i),C=N;C<r.events.length;)r.events[C][1].end={...O},C++;Rd(r.events,S+1,0,r.events.slice(N)),r.events.length=C}}function x(v){let j=n.length;for(;j-- >v;){const _=n[j];r.containerState=_[1],_[0].exit.call(r,e)}n.length=v}function b(){a.write([null]),o=void 0,a=void 0,r.containerState._closeFlow=void 0}}function $6e(e,r,n){return fi(e,e.attempt(this.parser.constructs.document,r,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function NK(e){if(e===null||rl(e)||R6e(e))return 1;if(L6e(e))return 2}function h$(e,r,n){const i=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!i.includes(o)&&(r=o(r,n),i.push(o))}return r}const AD={name:"attention",resolveAll:Q6e,tokenize:H6e};function Q6e(e,r){let n=-1,i,a,o,l,c,u,d,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&r.sliceSerialize(e[i][1]).charCodeAt(0)===r.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[i][1].end},p={...e[n][1].start};SK(f,-u),SK(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[i][1].end}},c={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},a={type:u>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[i][1].end={...l.start},e[n][1].start={...c.end},d=[],e[i][1].end.offset-e[i][1].start.offset&&(d=gc(d,[["enter",e[i][1],r],["exit",e[i][1],r]])),d=gc(d,[["enter",a,r],["enter",l,r],["exit",l,r],["enter",o,r]]),d=gc(d,h$(r.parser.constructs.insideSpan.null,e.slice(i+1,n),r)),d=gc(d,[["exit",o,r],["enter",c,r],["exit",c,r],["exit",a,r]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=gc(d,[["enter",e[n][1],r],["exit",e[n][1],r]])):h=0,Rd(e,i-1,n-i+3,d),n=i+d.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function H6e(e,r){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,a=NK(i);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),c(u)}function c(u){if(u===o)return e.consume(u),c;const d=e.exit("attentionSequence"),h=NK(u),f=!h||h===2&&a||n.includes(u),p=!a||a===2&&h||n.includes(i);return d._open=!!(o===42?f:f&&(a||!p)),d._close=!!(o===42?p:p&&(h||!f)),r(u)}}function SK(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const V6e={name:"autolink",tokenize:W6e};function W6e(e,r,n){let i=0;return a;function a(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(m){return fd(m)?(e.consume(m),l):m===64?n(m):d(m)}function l(m){return m===43||m===45||m===46||Rl(m)?(i=1,c(m)):d(m)}function c(m){return m===58?(e.consume(m),i=0,u):(m===43||m===45||m===46||Rl(m))&&i++<32?(e.consume(m),c):(i=0,d(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),r):m===null||m===32||m===60||mD(m)?n(m):(e.consume(m),u)}function d(m){return m===64?(e.consume(m),h):I6e(m)?(e.consume(m),d):n(m)}function h(m){return Rl(m)?f(m):n(m)}function f(m){return m===46?(e.consume(m),i=0,h):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),r):p(m)}function p(m){if((m===45||Rl(m))&&i++<63){const A=m===45?p:f;return e.consume(m),A}return n(m)}}const z4={partial:!0,tokenize:q6e};function q6e(e,r,n){return i;function i(o){return Bn(o)?fi(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||Nr(o)?r(o):n(o)}}const lfe={continuation:{tokenize:G6e},exit:X6e,name:"blockQuote",tokenize:K6e};function K6e(e,r,n){const i=this;return a;function a(l){if(l===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return Bn(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(l))}}function G6e(e,r,n){const i=this;return a;function a(l){return Bn(l)?fi(e,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(lfe,r,n)(l)}}function X6e(e){e.exit("blockQuote")}const cfe={name:"characterEscape",tokenize:Y6e};function Y6e(e,r,n){return i;function i(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return O6e(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):n(o)}}const ufe={name:"characterReference",tokenize:J6e};function J6e(e,r,n){const i=this;let a=0,o,l;return c;function c(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),o=31,l=Rl,h(f))}function d(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=F6e,h):(e.enter("characterReferenceValue"),o=7,l=pD,h(f))}function h(f){if(f===59&&a){const p=e.exit("characterReferenceValue");return l===Rl&&!d$(i.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return l(f)&&a++<o?(e.consume(f),h):n(f)}}const kK={partial:!0,tokenize:eUe},EK={concrete:!0,name:"codeFenced",tokenize:Z6e};function Z6e(e,r,n){const i=this,a={partial:!0,tokenize:_};let o=0,l=0,c;return u;function u(C){return d(C)}function d(C){const N=i.events[i.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,c=C,e.enter("co
1044deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(C)}function h(C){return C===c?(l++,e.consume(C),h):l<3?n(C):(e.exit("codeFencedFenceSequence"),Bn(C)?fi(e,f,"whitespace")(C):f(C))}function f(C){return C===null||Nr(C)?(e.exit("codeFencedFence"),i.interrupt?r(C):e.check(kK,g,j)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||Nr(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(C)):Bn(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fi(e,m,"whitespace")(C)):C===96&&C===c?n(C):(e.consume(C),p)}function m(C){return C===null||Nr(C)?f(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),A(C))}function A(C){return C===null||Nr(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(C)):C===96&&C===c?n(C):(e.consume(C),A)}function g(C){return e.attempt(a,j,y)(C)}function y(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),x}function x(C){return o>0&&Bn(C)?fi(e,b,"linePrefix",o+1)(C):b(C)}function b(C){return C===null||Nr(C)?e.check(kK,g,j)(C):(e.enter("codeFlowValue"),v(C))}function v(C){return C===null||Nr(C)?(e.exit("codeFlowValue"),b(C)):(e.consume(C),v)}function j(C){return e.exit("codeFenced"),r(C)}function _(C,N,S){let E=0;return O;function O(D){return C.enter("lineEnding"),C.consume(D),C.exit("lineEnding"),B}function B(D){return C.enter("codeFencedFence"),Bn(D)?fi(C,T,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):T(D)}function T(D){return D===c?(C.enter("codeFencedFenceSequence"),F(D)):S(D)}function F(D){return D===c?(E++,C.consume(D),F):E>=l?(C.exit("codeFencedFenceSequence"),Bn(D)?fi(C,I,"whitespace")(D):I(D)):S(D)}function I(D){return D===null||Nr(D)?(C.exit("codeFencedFence"),N(D)):S(D)}}}function eUe(e,r,n){const i=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return i.parser.lazy[i.now().line]?n(l):r(l)}}const RI={name:"codeIndented",tokenize:rUe},tUe={partial:!0,tokenize:nUe};function rUe(e,r,n){const i=this;return a;function a(d){return e.enter("codeIndented"),fi(e,o,"linePrefix",5)(d)}function o(d){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(d):n(d)}function l(d){return d===null?u(d):Nr(d)?e.attempt(tUe,l,u)(d):(e.enter("codeFlowValue"),c(d))}function c(d){return d===null||Nr(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),c)}function u(d){return e.exit("codeIndented"),r(d)}}function nUe(e,r,n){const i=this;return a;function a(l){return i.parser.lazy[i.now().line]?n(l):Nr(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):fi(e,o,"linePrefix",5)(l)}function o(l){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?r(l):Nr(l)?a(l):n(l)}}const iUe={name:"codeText",previous:sUe,resolve:aUe,tokenize:oUe};function aUe(e){let r=e.length-4,n=3,i,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(i=n;++i<r;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[r][1].type="codeTextPadding",n+=2,r-=2;break}}for(i=n-1,r++;++i<=r;)a===void 0?i!==r&&e[i][1].type!=="lineEnding"&&(a=i):(i===r||e[i][1].type==="lineEnding")&&(e[a][1].type="codeTextData",i!==a+2&&(e[a][1].end=e[i-1][1].end,e.splice(a+2,i-a-2),r-=i-a-2,i=a+2),a=void 0);return e}function sUe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function oUe(e,r,n){let i=0,a,o;return l;function l(f){return e.enter("codeText"),e.enter("codeTextSequence"),c(f)}function c(f){return f===96?(e.consume(f),i++,c):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(o=e.enter("codeTextSequence"),a=0,h(f)):Nr(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),d(f))}function d(f){return f===null||f===32||f===96||Nr(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),d)}function h(f){return f===96?(e.consume(f),a++,h):a===i?(e.exit("codeTextSequence"),e.exit("codeText"),r(f)):(o.type="codeTextData",d(f))}}class lUe{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(r,i):r>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(r,n,i){const a=n||0;this.setCursor(Math.trunc(r));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return i&&m1(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),m1(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),m1(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const n=this.left.splice(r,Number.POSITIVE_INFINITY);
vendor: 7,904 bytes, line 1044
1044m1(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);m1(this.left,n.reverse())}}}function m1(e,r){let n=0;if(r.length<1e4)e.push(...r);else for(;n<r.length;)e.push(...r.slice(n,n+1e4)),n+=1e4}function dfe(e){const r={};let n=-1,i,a,o,l,c,u,d;const h=new lUe(e);for(;++n<h.length;){for(;n in r;)n=r[n];if(i=h.get(n),n&&i[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(u=i[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(r,cUe(h,n)),n=r[n],d=!0);else if(i[1]._container){for(o=n,a=void 0;o--;)if(l=h.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(h.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(i[1].end={...h.get(a)[1].start},c=h.slice(a,n),c.unshift(i),h.splice(a,n-a+1,c))}}return Rd(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!d}function cUe(e,r){const n=e.get(r)[1],i=e.get(r)[2];let a=r-1;const o=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,u=[],d={};let h,f,p=-1,m=n,A=0,g=0;const y=[g];for(;m;){for(;e.get(++a)[1]!==m;);o.push(a),m._tokenizer||(h=i.sliceStream(m),m.next||h.push(null),f&&l.defineSkip(m.start),m._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),m._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=n;++p<c.length;)c[p][0]==="exit"&&c[p-1][0]==="enter"&&c[p][1].type===c[p-1][1].type&&c[p][1].start.line!==c[p][1].end.line&&(g=p+1,y.push(g),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(l.events=[],m?(m._tokenizer=void 0,m.previous=void 0):y.pop(),p=y.length;p--;){const x=c.slice(y[p],y[p+1]),b=o.pop();u.push([b,b+x.length-1]),e.splice(b,2,x)}for(u.reverse(),p=-1;++p<u.length;)d[A+u[p][0]]=A+u[p][1],A+=u[p][1]-u[p][0]-1;return d}const uUe={resolve:hUe,tokenize:fUe},dUe={partial:!0,tokenize:mUe};function hUe(e){return dfe(e),e}function fUe(e,r){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(c)}function a(c){return c===null?o(c):Nr(c)?e.check(dUe,l,o)(c):(e.consume(c),a)}function o(c){return e.exit("chunkContent"),e.exit("content"),r(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function mUe(e,r,n){const i=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),fi(e,o,"linePrefix")}function o(l){if(l===null||Nr(l))return n(l);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?r(l):e.interrupt(i.parser.constructs.flow,n,r)(l)}}function hfe(e,r,n,i,a,o,l,c,u){const d=u||Number.POSITIVE_INFINITY;let h=0;return f;function f(x){return x===60?(e.enter(i),e.enter(a),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||mD(x)?n(x):(e.enter(i),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),g(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(a),e.exit(i),r):(e.enter(c),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(e.exit("chunkString"),e.exit(c),p(x)):x===null||x===60||Nr(x)?n(x):(e.consume(x),x===92?A:m)}function A(x){return x===60||x===62||x===92?(e.consume(x),m):m(x)}function g(x){return!h&&(x===null||x===41||rl(x))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(i),r(x)):h<d&&x===40?(e.consume(x),h++,g):x===41?(e.consume(x),h--,g):x===null||x===32||x===40||mD(x)?n(x):(e.consume(x),x===92?y:g)}function y(x){return x===40||x===41||x===92?(e.consume(x),g):g(x)}}function ffe(e,r,n,i,a,o){const l=this;let c=0,u;return d;function d(m){return e.enter(i),e.enter(a),e.consume(m),e.exit(a),e.enter(o),h}function h(m){return c>999||m===null||m===91||m===93&&!u||m===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(m):m===93?(e.exit(o),e.enter(a),e.consume(m),e.exit(a),e.exit(i),r):Nr(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||Nr(m)||c++>999?(e.exit("chunkString"),h(m)):(e.consume(m),u||(u=!Bn(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),c++,f):f(m)}}function mfe(e,r,n,i,a,o){let l;return c;function c(p){return p===34||p===39||p===40?(e.enter(i),e.enter(a),e.consume(p),e.exit(a),l=p===40?41:p,u):n(p)}function u(p){return p===l?(e.enter(a),e.consume(p),e.exit(a),e.exit(i),r):(e.enter(o),d(p))}function d(p){return p===l?(e.exit(o),u(l)):p===null?n(p):Nr(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),fi(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===l||p===null||Nr(p)?(e.exit("chunkString"),d(p)):(e.consume(p),p===92?f:h)}function f(p){return p===l||p===92?(e.consume(p),h):h(p)}}function zw(e,r){let n;return i;function i(a){return Nr(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,i):Bn(a)?fi(e,i,n?"linePrefix":"lineSuffix")(a):r(a)}}const pUe={name:"definition",tokenize:gUe},AUe={partial:!0,tokenize:xUe};function gUe(e,r,n){const i=this;let a;return o;function o(m){return e.enter("definition"),l(m)}function l(m){return ffe.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function c(m){return a=tv(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):n(m)}function u(m){return rl(m)?zw(e,d)(m):d(m)}function d(m){return hfe(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(AUe,f,f)(m)}function f(m){return Bn(m)?fi(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Nr(m)?(e.exit("definition"),i.parser.defined.push(a),r(m)):n(m)}}function xUe(e,r,n){return i;function i(c){return rl(c)?zw(e,a)(c):n(c)}function a(c){return mfe(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return Bn(c)?fi(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Nr(c)?r(c):n(c)}}const yUe={name:"hardBreakEscape",tokenize:vUe};function vUe(e,r,n){return i;function i(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return Nr(o)?(e.exit("hardBreakEscape"),r(o)):n(o)}}const bUe={name:"headingAtx",resolve:wUe,tokenize:jUe};function wUe(e,r){let n=e.length-2,i=3,a,o;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(a={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},o={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Rd(e,i,n-i+1,[["enter",a,r],["enter",o,r],["exit",o,r],["exit",a,r]])),e}function jUe(e,r,n){let i=0;return a;function a(h){return e.enter("atxHeading"),o(h)}function o(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&i++<6?(e.consume(h),l):h===null||rl(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),u(h)):h===null||Nr(h)?(e.exit("atxHeading"),r(h)):Bn(h)?fi(e,c,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function u(h){return h===35?(e.consume(h),u):(e.exit("atxHeadingSequence"),c(h))}function d(h){return h===null||h===35||rl(h)?(e.exit("atxHeadingText"),c(
vendor: 16,501 bytes, line 1044
1044h)):(e.consume(h),d)}}const _Ue=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],BK=["pre","script","style","textarea"],CUe={concrete:!0,name:"htmlFlow",resolveTo:kUe,tokenize:EUe},NUe={partial:!0,tokenize:TUe},SUe={partial:!0,tokenize:BUe};function kUe(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function EUe(e,r,n){const i=this;let a,o,l,c,u;return d;function d(z){return h(z)}function h(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),f}function f(z){return z===33?(e.consume(z),p):z===47?(e.consume(z),o=!0,g):z===63?(e.consume(z),a=3,i.interrupt?r:$):fd(z)?(e.consume(z),l=String.fromCharCode(z),y):n(z)}function p(z){return z===45?(e.consume(z),a=2,m):z===91?(e.consume(z),a=5,c=0,A):fd(z)?(e.consume(z),a=4,i.interrupt?r:$):n(z)}function m(z){return z===45?(e.consume(z),i.interrupt?r:$):n(z)}function A(z){const K="CDATA[";return z===K.charCodeAt(c++)?(e.consume(z),c===K.length?i.interrupt?r:T:A):n(z)}function g(z){return fd(z)?(e.consume(z),l=String.fromCharCode(z),y):n(z)}function y(z){if(z===null||z===47||z===62||rl(z)){const K=z===47,ne=l.toLowerCase();return!K&&!o&&BK.includes(ne)?(a=1,i.interrupt?r(z):T(z)):_Ue.includes(l.toLowerCase())?(a=6,K?(e.consume(z),x):i.interrupt?r(z):T(z)):(a=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(z):o?b(z):v(z))}return z===45||Rl(z)?(e.consume(z),l+=String.fromCharCode(z),y):n(z)}function x(z){return z===62?(e.consume(z),i.interrupt?r:T):n(z)}function b(z){return Bn(z)?(e.consume(z),b):O(z)}function v(z){return z===47?(e.consume(z),O):z===58||z===95||fd(z)?(e.consume(z),j):Bn(z)?(e.consume(z),v):O(z)}function j(z){return z===45||z===46||z===58||z===95||Rl(z)?(e.consume(z),j):_(z)}function _(z){return z===61?(e.consume(z),C):Bn(z)?(e.consume(z),_):v(z)}function C(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),u=z,N):Bn(z)?(e.consume(z),C):S(z)}function N(z){return z===u?(e.consume(z),u=null,E):z===null||Nr(z)?n(z):(e.consume(z),N)}function S(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||rl(z)?_(z):(e.consume(z),S)}function E(z){return z===47||z===62||Bn(z)?v(z):n(z)}function O(z){return z===62?(e.consume(z),B):n(z)}function B(z){return z===null||Nr(z)?T(z):Bn(z)?(e.consume(z),B):n(z)}function T(z){return z===45&&a===2?(e.consume(z),L):z===60&&a===1?(e.consume(z),V):z===62&&a===4?(e.consume(z),q):z===63&&a===3?(e.consume(z),$):z===93&&a===5?(e.consume(z),Q):Nr(z)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(NUe,M,F)(z)):z===null||Nr(z)?(e.exit("htmlFlowData"),F(z)):(e.consume(z),T)}function F(z){return e.check(SUe,I,M)(z)}function I(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),D}function D(z){return z===null||Nr(z)?F(z):(e.enter("htmlFlowData"),T(z))}function L(z){return z===45?(e.consume(z),$):T(z)}function V(z){return z===47?(e.consume(z),l="",U):T(z)}function U(z){if(z===62){const K=l.toLowerCase();return BK.includes(K)?(e.consume(z),q):T(z)}return fd(z)&&l.length<8?(e.consume(z),l+=String.fromCharCode(z),U):T(z)}function Q(z){return z===93?(e.consume(z),$):T(z)}function $(z){return z===62?(e.consume(z),q):z===45&&a===2?(e.consume(z),$):T(z)}function q(z){return z===null||Nr(z)?(e.exit("htmlFlowData"),M(z)):(e.consume(z),q)}function M(z){return e.exit("htmlFlow"),r(z)}}function BUe(e,r,n){const i=this;return a;function a(l){return Nr(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return i.parser.lazy[i.now().line]?n(l):r(l)}}function TUe(e,r,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(z4,r,n)}}const PUe={name:"htmlText",tokenize:IUe};function IUe(e,r,n){const i=this;let a,o,l;return c;function c($){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume($),u}function u($){return $===33?(e.consume($),d):$===47?(e.consume($),_):$===63?(e.consume($),v):fd($)?(e.consume($),S):n($)}function d($){return $===45?(e.consume($),h):$===91?(e.consume($),o=0,A):fd($)?(e.consume($),b):n($)}function h($){return $===45?(e.consume($),m):n($)}function f($){return $===null?n($):$===45?(e.consume($),p):Nr($)?(l=f,V($)):(e.consume($),f)}function p($){return $===45?(e.consume($),m):f($)}function m($){return $===62?L($):$===45?p($):f($)}function A($){const q="CDATA[";return $===q.charCodeAt(o++)?(e.consume($),o===q.length?g:A):n($)}function g($){return $===null?n($):$===93?(e.consume($),y):Nr($)?(l=g,V($)):(e.consume($),g)}function y($){return $===93?(e.consume($),x):g($)}function x($){return $===62?L($):$===93?(e.consume($),x):g($)}function b($){return $===null||$===62?L($):Nr($)?(l=b,V($)):(e.consume($),b)}function v($){return $===null?n($):$===63?(e.consume($),j):Nr($)?(l=v,V($)):(e.consume($),v)}function j($){return $===62?L($):v($)}function _($){return fd($)?(e.consume($),C):n($)}function C($){return $===45||Rl($)?(e.consume($),C):N($)}function N($){return Nr($)?(l=N,V($)):Bn($)?(e.consume($),N):L($)}function S($){return $===45||Rl($)?(e.consume($),S):$===47||$===62||rl($)?E($):n($)}function E($){return $===47?(e.consume($),L):$===58||$===95||fd($)?(e.consume($),O):Nr($)?(l=E,V($)):Bn($)?(e.consume($),E):L($)}function O($){return $===45||$===46||$===58||$===95||Rl($)?(e.consume($),O):B($)}function B($){return $===61?(e.consume($),T):Nr($)?(l=B,V($)):Bn($)?(e.consume($),B):E($)}function T($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(e.consume($),a=$,F):Nr($)?(l=T,V($)):Bn($)?(e.consume($),T):(e.consume($),I)}function F($){return $===a?(e.consume($),a=void 0,D):$===null?n($):Nr($)?(l=F,V($)):(e.consume($),F)}function I($){return $===null||$===34||$===39||$===60||$===61||$===96?n($):$===47||$===62||rl($)?E($):(e.consume($),I)}function D($){return $===47||$===62||rl($)?E($):n($)}function L($){return $===62?(e.consume($),e.exit("htmlTextData"),e.exit("htmlText"),r):n($)}function V($){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),U}function U($){return Bn($)?fi(e,Q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):Q($)}function Q($){return e.enter("htmlTextData"),l($)}}const f$={name:"labelEnd",resolveAll:RUe,resolveTo:DUe,tokenize:MUe},FUe={tokenize:zUe},OUe={tokenize:UUe},LUe={tokenize:$Ue};function RUe(e){let r=-1;const n=[];for(;++r<e.length;){const i=e[r][1];if(n.push(e[r]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const a=i.type==="labelImage"?4:2;i.type="data",r+=a}}return e.length!==n.length&&Rd(e,0,e.length,n),e}function DUe(e,r){let n=e.length,i=0,a,o,l,c;for(;n--;)if(a=e[n][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=n,a.type!=="labelLink")){i=2;break}}else a.type==="labelEnd"&&(l=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[o+i+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",u,r],["enter",d,r]],c=gc(c,e.slice(o+1,o+i+3)),c=gc(c,[["enter",h,r]]),c=gc(c,h$(r.parser.constructs.insideSpan.null,e.slice(o+i+4,l-3),r)),c=gc(c,[["exit",h,r],e[l-2],e[l-1],["exit",d,r]]),c=gc(c,e.slice(l+1)),c=gc(c,[["exit",u,r]]),Rd(e,o,e.length,c),e}function MUe(e,r,n){const i=this;let a=i.events.length,o,l;for(;a--;)if((i.events[a][1].type==="labelImage"||i.events[a][1].type==="labelLink")&&!i.events[a][1]._balanced){o=i.events[a][1];break}return c;function c(p){return o?o._inactive?f(p):(l=i.parser.defined.includes(tv(i.sliceSerialize({start:o.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(FUe,h,l?h:f)(p):p===91?e.attempt(OUe,h,l?d:f)(p):l?h(p):f(p)}function d(p){return e.attempt(LUe,h,f)(p)}function h(p){return r(p)}function f(p){return o._balanced=!0,n(p)}}function zUe(e,r,n){return i;function i(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),a}function a(f){return rl(f)?zw(e,o)(f):o(f)}function o(f){return f===41?h(f):hfe(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return rl(f)?zw(e,u)(f):h(f)}function c(f){return n(f)}function u(f){return f===34||f===39||f===40?mfe(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):h(f)}function d(f){return rl(f)?zw(e,h)(f):h(f)}function h(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),r):n(f)}}function UUe(e,r,n){const i=this;return a;function a(c){return ffe.call(i,e,o,l,"reference","referenceMarker","referenceString")(c)}function o(c){return i.parser.defined.includes(tv(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?r(c):n(c)}function l(c){return n(c)}}function $Ue(e,r,n){return i;function i(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),r):n(o)}}const QUe={name:"labelStartImage",resolveAll:f$.resolveAll,tokenize:HUe};function HUe(e,r,n){const i=this;return a;function a(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):r(c)}}const VUe={name:"labelStartLink",resolveAll:f$.resolveAll,tokenize:WUe};function WUe(e,r,n){const i=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):r(l)}}const DI={name:"lineEnding",tokenize:qUe};function qUe(e,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),fi(e,r,"linePrefix")}}const pk={name:"thematicBreak",tokenize:KUe};function KUe(e,r,n){let i=0,a;return o;function o(d){return e.enter("thematicBreak"),l(d)}function l(d){return a=d,c(d)}function c(d){return d===a?(e.enter("thematicBreakSequence"),u(d)):i>=3&&(d===null||Nr(d))?(e.exit("thematicBreak"),r(d)):n(d)}function u(d){return d===a?(e.consume(d),i++,u):(e.exit("thematicBreakSequence"),Bn(d)?fi(e,c,"whitespace")(d):c(d))}}const zo={continuation:{tokenize:JUe},exit:e8e,name:"list",tokenize:YUe},GUe={partial:!0,tokenize:t8e},XUe={partial:!0,tokenize:ZUe};function YUe(e,r,n){const i=this,a=i.events[i.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return c;function c(m){const A=i.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!i.containerState.marker||m===i.containerState.marker:pD(m)){if(i.containerState.type||(i.containerState.type=A,e.enter(A,{_container:!0})),A==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(pk,n,d)(m):d(m);if(!i.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return n(m)}function u(m){return pD(m)&&++l<10?(e.consume(m),u):(!i.interrupt||l<2)&&(i.containerState.marker?m===i.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),d(m)):n(m)}function d(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||m,e.check(z4,i.interrupt?n:h,e.attempt(GUe,p,f))}function h(m){return i.containerState.initialBlankLine=!0,o++,p(m)}function f(m){return Bn(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return i.containerState.size=o+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(m)}}function JUe(e,r,n){const i=this;return i.containerState._closeFlow=void 0,e.check(z4,a,o);function a(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,fi(e,r,"listItemIndent",i.containerState.size+1)(c)}function o(c){return i.containerState.furtherBlankLines||!Bn(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(XUe,r,l)(c))}function l(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,fi(e,e.attempt(zo,r,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function ZUe(e,r,n){const i=this;return fi(e,a,"listItemIndent",i.containerState.size+1);function a(o){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?r(o):n(o)}}function e8e(e){e.exit(this.containerState.type)}function t8e(e,r,n){const i=this;return fi(e,a,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const l=i.events[i.events.length-1];return!Bn(o)&&l&&l[1].type==="listItemPrefixWhitespace"?r(o):n(o)}}const TK={name:"setextUnderline",resolveTo:r8e,tokenize:n8e};function r8e(e,r){let n=e.length,i,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",l,r]),e.splice(o+1,0,["exit",e[i][1],r]),e[i][1].end={...e[o][1].end}):e[i][1]=l,e.push(["exit",l,r]),e}function n8e(e,r,n){const i=this;let a;return o;function o(d){let h=i.events.length,f;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){f=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||f)?(e.enter("setextHeadingLine"),a=d,l(d)):n(d)}function l(d){return e.enter("setextHeadingLineSequence"),c(d)}function c(d){return d===a?(e.consume(d),c):(e.exit("setextHeadingLineSequence"),Bn(d)?fi(e,u,"lineSuffix")(d):u(d))}function u(d){return d===null||Nr(d)?(e.exit("setextHeadingLine"),r(d)):n(d)}}const i8e={tokenize:a8e};function a8e(e){const r=this,n=e.attempt(z4,i,e.attempt(this.parser.constructs.flowInitial,a,fi(e,e.attempt(this.parser.constructs.flow,a,e.attempt(uUe,a)),"linePrefix")));return n;function i(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),r.currentConstruct=void 0,n}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r.currentConstruct=void 0,n}}const s8e={resolveAll:Afe()},o8e=pfe("string"),l8e=pfe("text");function pfe(e){return{resolveAll:Afe(e==="text"?c8e:void 0),tokenize:r};function r(n){const i=this,a=this.parser.constructs[e],o=n.attempt(a,l,c);return l;function l(h){return d(h)?o(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),u}function u(h){return d(h)?(n.exit("data"),o(h)):(n.consume(h),u)}function d(h){if(h===null)return!0;const f=a[h];let p=-1;if(f)for(;++p<f.length;){const m=f[p];if(!m.previous||m.previous.call(i,i.previous))return!0}return!1}}}function Afe(e){return r;function r(n,i){let a=-1,o;for(;++a<=n.length;)o===void 0?n[a]&&n[a][1].type==="data"&&(o=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==o+2&&(n[o][1].end=n[a-1][1].end,n.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(n,i):n}}function c8e(e,r){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],a=r.sliceStream(i);let o=a.length,l=-1,c=0,u;for(;o--;){const d=a[o];
vendor: 4,662 bytes, lines 1044-1046
1044if(typeof d=="string"){for(l=d.length;d.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(d===-2)u=!0,c++;else if(d!==-1){o++;break}}if(r._contentTypeTextTrailing&&n===e.length&&(c=0),c){const d={type:n===e.length||u||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:i.start._bufferIndex+l,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...d.start},i.start.offset===i.end.offset?Object.assign(i,d):(e.splice(n,0,["enter",d,r],["exit",d,r]),n+=2)}n++}return e}const u8e={42:zo,43:zo,45:zo,48:zo,49:zo,50:zo,51:zo,52:zo,53:zo,54:zo,55:zo,56:zo,57:zo,62:lfe},d8e={91:pUe},h8e={[-2]:RI,[-1]:RI,32:RI},f8e={35:bUe,42:pk,45:[TK,pk],60:CUe,61:TK,95:pk,96:EK,126:EK},m8e={38:ufe,92:cfe},p8e={[-5]:DI,[-4]:DI,[-3]:DI,33:QUe,38:ufe,42:AD,60:[V6e,PUe],91:VUe,92:[yUe,cfe],93:f$,95:AD,96:iUe},A8e={null:[AD,s8e]},g8e={null:[42,95]},x8e={null:[]},y8e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:g8e,contentInitial:d8e,disable:x8e,document:u8e,flow:f8e,flowInitial:h8e,insideSpan:A8e,string:m8e,text:p8e},Symbol.toStringTag,{value:"Module"}));function v8e(e,r,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let l=[],c=[];const u={attempt:N(_),check:N(C),consume:b,enter:v,exit:j,interrupt:N(C,{interrupt:!0})},d={code:null,containerState:{},defineSkip:g,events:[],now:A,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:f};let h=r.tokenize.call(d,u);return r.resolveAll&&o.push(r),d;function f(B){return l=gc(l,B),y(),l[l.length-1]!==null?[]:(S(r,0),d.events=h$(o,d.events,d),d.events)}function p(B,T){return w8e(m(B),T)}function m(B){return b8e(l,B)}function A(){const{_bufferIndex:B,_index:T,line:F,column:I,offset:D}=i;return{_bufferIndex:B,_index:T,line:F,column:I,offset:D}}function g(B){a[B.line]=B.column,O()}function y(){let B;for(;i._index<l.length;){const T=l[i._index];if(typeof T=="string")for(B=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===B&&i._bufferIndex<T.length;)x(T.charCodeAt(i._bufferIndex));else x(T)}}function x(B){h=h(B)}function b(B){Nr(B)?(i.line++,i.column=1,i.offset+=B===-3?2:1,O()):B!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),d.previous=B}function v(B,T){const F=T||{};return F.type=B,F.start=A(),d.events.push(["enter",F,d]),c.push(F),F}function j(B){const T=c.pop();return T.end=A(),d.events.push(["exit",T,d]),T}function _(B,T){S(B,T.from)}function C(B,T){T.restore()}function N(B,T){return F;function F(I,D,L){let V,U,Q,$;return Array.isArray(I)?M(I):"tokenize"in I?M([I]):q(I);function q(ie){return X;function X(de){const oe=de!==null&&ie[de],ce=de!==null&&ie.null,ye=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return M(ye)(de)}}function M(ie){return V=ie,U=0,ie.length===0?L:z(ie[U])}function z(ie){return X;function X(de){return $=E(),Q=ie,ie.partial||(d.currentConstruct=ie),ie.name&&d.parser.constructs.disable.null.includes(ie.name)?ne():ie.tokenize.call(T?Object.assign(Object.create(d),T):d,u,K,ne)(de)}}function K(ie){return B(Q,$),D}function ne(ie){return $.restore(),++U<V.length?z(V[U]):L}}}function S(B,T){B.resolveAll&&!o.includes(B)&&o.push(B),B.resolve&&Rd(d.events,T,d.events.length-T,B.resolve(d.events.slice(T),d)),B.resolveTo&&(d.events=B.resolveTo(d.events,d))}function E(){const B=A(),T=d.previous,F=d.currentConstruct,I=d.events.length,D=Array.from(c);return{from:I,restore:L};function L(){i=B,d.previous=T,d.currentConstruct=F,d.events.length=I,c=D,O()}}function O(){i.line in a&&i.column<2&&(i.column=a[i.line],i.offset+=a[i.line]-1)}}function b8e(e,r){const n=r.start._index,i=r.start._bufferIndex,a=r.end._index,o=r.end._bufferIndex;let l;if(n===a)l=[e[n].slice(i,o)];else{if(l=e.slice(n,a),i>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(i):l.shift()}o>0&&l.push(e[a].slice(0,o))}return l}function w8e(e,r){let n=-1;const i=[];let a;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
1045`;break}case-3:{l=`\r
1046`;break}case-2:{l=r?" ":"	";break}case-1:{if(!r&&a)continue;l=" ";break}default:l=String.fromCharCode(o)}a=o===-2,i.push(l)}return i.join("")}function j8e(e){const i={constructs:B6e([y8e,...(e||{}).extensions||[]]),content:a(D6e),defined:[],document:a(z6e),flow:a(i8e),lazy:{},string:a(o8e),text:a(l8e)};return i;function a(o){return l;function l(c){return v8e(i,o,c)}}}function _8e(e){for(;!dfe(e););return e}const PK=/[\0\t\n\r]/g;function C8e(){let e=1,r="",n=!0,i;return a;function a(o,l,c){const u=[];let d,h,f,p,m;
vendor: 11,378 bytes, line 1046
1046for(o=r+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),f=0,r="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(PK.lastIndex=f,d=PK.exec(o),p=d&&d.index!==void 0?d.index:o.length,m=o.charCodeAt(p),!d){r=o.slice(f);break}if(m===10&&f===p&&i)u.push(-3),i=void 0;else switch(i&&(u.push(-5),i=void 0),f<p&&(u.push(o.slice(f,p)),e+=p-f),m){case 0:{u.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,u.push(-2);e++<h;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:i=!0,e=1}f=p+1}return c&&(i&&u.push(-5),r&&u.push(r),u.push(null)),u}}const N8e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function S8e(e){return e.replace(N8e,k8e)}function k8e(e,r,n){if(r)return r;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return ofe(n.slice(o?2:1),o?16:10)}return d$(n)||e}const gfe={}.hasOwnProperty;function E8e(e,r,n){return r&&typeof r=="object"&&(n=r,r=void 0),B8e(n)(_8e(j8e(n).document().write(C8e()(e,r,!0))))}function B8e(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(we),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(te),blockQuote:o(ce),characterEscape:E,characterReference:E,codeFenced:o(ye),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(ye,l),codeText:o(ge,l),codeTextData:E,data:E,codeFlowValue:E,definition:o(Be),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ve),hardBreakEscape:o(xe),hardBreakTrailing:o(xe),htmlFlow:o(We,l),htmlFlowData:E,htmlText:o(We,l),htmlTextData:E,image:o(ze),label:l,link:o(we),listItem:o(he),listItemValue:p,listOrdered:o(J,f),listUnordered:o(J),paragraph:o(je),reference:z,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(te),strong:o(ve),thematicBreak:o(Ie)},exit:{atxHeading:u(),atxHeadingSequence:_,autolink:u(),autolinkEmail:oe,autolinkProtocol:de,blockQuote:u(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:ie,characterReference:X,codeFenced:u(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:A,codeFlowValue:O,codeIndented:u(x),codeText:u(D),codeTextData:O,data:O,definition:u(),definitionDestinationString:j,definitionLabelString:b,definitionTitleString:v,emphasis:u(),hardBreakEscape:u(T),hardBreakTrailing:u(T),htmlFlow:u(F),htmlFlowData:O,htmlText:u(I),htmlTextData:O,image:u(V),label:Q,labelText:U,lineEnding:B,link:u(L),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:K,resourceDestinationString:$,resourceTitleString:q,resource:M,setextHeading:u(S),setextHeadingLineSequence:N,setextHeadingText:C,strong:u(),thematicBreak:u()}};xfe(r,(e||{}).mdastExtensions||[]);const n={};return i;function i(ue){let Se={type:"root",children:[]};const He={stack:[Se],tokenStack:[],config:r,enter:c,exit:d,buffer:l,resume:h,data:n},Qe=[];let ct=-1;for(;++ct<ue.length;)if(ue[ct][1].type==="listOrdered"||ue[ct][1].type==="listUnordered")if(ue[ct][0]==="enter")Qe.push(ct);else{const dt=Qe.pop();ct=a(ue,dt,ct)}for(ct=-1;++ct<ue.length;){const dt=r[ue[ct][0]];gfe.call(dt,ue[ct][1].type)&&dt[ue[ct][1].type].call(Object.assign({sliceSerialize:ue[ct][2].sliceSerialize},He),ue[ct][1])}if(He.tokenStack.length>0){const dt=He.tokenStack[He.tokenStack.length-1];(dt[1]||IK).call(He,void 0,dt[0])}for(Se.position={start:Mf(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:Mf(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},ct=-1;++ct<r.transforms.length;)Se=r.transforms[ct](Se)||Se;return Se}function a(ue,Se,He){let Qe=Se-1,ct=-1,dt=!1,Fr,Xt,Vt,lr;for(;++Qe<=He;){const cr=ue[Qe];switch(cr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{cr[0]==="enter"?ct++:ct--,lr=void 0;break}case"lineEndingBlank":{cr[0]==="enter"&&(Fr&&!lr&&!ct&&!Vt&&(Vt=Qe),lr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:lr=void 0}if(!ct&&cr[0]==="enter"&&cr[1].type==="listItemPrefix"||ct===-1&&cr[0]==="exit"&&(cr[1].type==="listUnordered"||cr[1].type==="listOrdered")){if(Fr){let Bt=Qe;for(Xt=void 0;Bt--;){const kr=ue[Bt];if(kr[1].type==="lineEnding"||kr[1].type==="lineEndingBlank"){if(kr[0]==="exit")continue;Xt&&(ue[Xt][1].type="lineEndingBlank",dt=!0),kr[1].type="lineEnding",Xt=Bt}else if(!(kr[1].type==="linePrefix"||kr[1].type==="blockQuotePrefix"||kr[1].type==="blockQuotePrefixWhitespace"||kr[1].type==="blockQuoteMarker"||kr[1].type==="listItemIndent"))break}Vt&&(!Xt||Vt<Xt)&&(Fr._spread=!0),Fr.end=Object.assign({},Xt?ue[Xt][1].start:cr[1].end),ue.splice(Xt||Qe,0,["exit",Fr,cr[2]]),Qe++,He++}if(cr[1].type==="listItemPrefix"){const Bt={type:"listItem",_spread:!1,start:Object.assign({},cr[1].start),end:void 0};Fr=Bt,ue.splice(Qe,0,["enter",Bt,cr[2]]),Qe++,He++,Vt=void 0,lr=!0}}}return ue[Se][1]._spread=dt,He}function o(ue,Se){return He;function He(Qe){c.call(this,ue(Qe),Qe),Se&&Se.call(this,Qe)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(ue,Se,He){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([Se,He||void 0]),ue.position={start:Mf(Se.start),end:void 0}}function u(ue){return Se;function Se(He){ue&&ue.call(this,He),d.call(this,He)}}function d(ue,Se){const He=this.stack.pop(),Qe=this.tokenStack.pop();if(Qe)Qe[0].type!==ue.type&&(Se?Se.call(this,ue,Qe[0]):(Qe[1]||IK).call(this,ue,Qe[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Mw({start:ue.start,end:ue.end})+"): it’s not open");He.position.end=Mf(ue.end)}function h(){return k6e(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(ue){if(this.data.expectingFirstListItemValue){const Se=this.stack[this.stack.length-2];Se.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function m(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.lang=ue}function A(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.meta=ue}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue.replace(/(\r?\n|\r)$/g,"")}function b(ue){const Se=this.resume(),He=this.stack[this.stack.length-1];He.label=Se,He.identifier=tv(this.sliceSerialize(ue)).toLowerCase()}function v(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.title=ue}function j(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.url=ue}function _(ue){const Se=this.stack[this.stack.length-1];if(!Se.depth){const He=this.sliceSerialize(ue).length;Se.depth=He}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function N(ue){const Se=this.stack[this.stack.length-1];Se.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function E(ue){const He=this.stack[this.stack.length-1].children;let Qe=He[He.length-1];(!Qe||Qe.type!=="text")&&(Qe=Pe(),Qe.position={start:Mf(ue.start),end:void 0},He.push(Qe)),this.stack.push(Qe)}function O(ue){const Se=this.stack.pop();Se.value+=this.sliceSerialize(ue),Se.position.end=Mf(ue.end)}function B(ue){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const He=Se.children[Se.children.length-1];He.position.end=Mf(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(Se.type)&&(E.call(this,ue),O.call(this,ue))}function T(){this.data.atHardBreak=!0}function F(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function I(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function D(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function L(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Se,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function V(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Se,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function U(ue){const Se=this.sliceSerialize(ue),He=this.stack[this.stack.length-2];He.label=S8e(Se),He.identifier=tv(Se).toLowerCase()}function Q(){const ue=this.stack[this.stack.length-1],Se=this.resume(),He=this.stack[this.stack.length-1];if(this.data.inReference=!0,He.type==="link"){const Qe=ue.children;He.children=Qe}else He.alt=Se}function $(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.url=ue}function q(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.title=ue}function M(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function K(ue){const Se=this.resume(),He=this.stack[this.stack.length-1];He.label=Se,He.identifier=tv(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function ne(ue){this.data.characterReferenceType=ue.type}function ie(ue){const Se=this.sliceSerialize(ue),He=this.data.characterReferenceType;let Qe;He?(Qe=ofe(Se,He==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Qe=d$(Se);const ct=this.stack[this.stack.length-1];ct.value+=Qe}function X(ue){const Se=this.stack.pop();Se.position.end=Mf(ue.end)}function de(ue){O.call(this,ue);const Se=this.stack[this.stack.length-1];Se.url=this.sliceSerialize(ue)}function oe(ue){O.call(this,ue);const Se=this.stack[this.stack.length-1];Se.url="mailto:"+this.sliceSerialize(ue)}function ce(){return{type:"blockquote",children:[]}}function ye(){return{type:"code",lang:null,meta:null,value:""}}function ge(){return{type:"inlineCode",value:""}}function Be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ve(){return{type:"emphasis",children:[]}}function te(){return{type:"heading",depth:0,children:[]}}function xe(){return{type:"break"}}function We(){return{type:"html",value:""}}function ze(){return{type:"image",title:null,url:"",alt:null}}function we(){return{type:"link",title:null,url:"",children:[]}}function J(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function he(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function je(){return{type:"paragraph",children:[]}}function ve(){return{type:"strong",children:[]}}function Pe(){return{type:"text",value:""}}function Ie(){return{type:"thematicBreak"}}}function Mf(e){return{line:e.line,column:e.column,offset:e.offset}}function xfe(e,r){let n=-1;for(;++n<r.length;){const i=r[n];Array.isArray(i)?xfe(e,i):T8e(e,i)}}function T8e(e,r){let n;for(n in r)if(gfe.call(r,n))switch(n){case"canContainEols":{const i=r[n];i&&e[n].push(...i);break}case"transforms":{const i=r[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=r[n];i&&Object.assign(e[n],i);break}}}function IK(e,r){throw e?new Error("Cannot close `"+e.type+"` ("+Mw({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+Mw({start:r.start,end:r.end}
vendor: 8,951 bytes, lines 1046-1050
1046)+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Mw({start:r.start,end:r.end})+") is still open")}function P8e(e){const r=this;r.parser=n;function n(i){return E8e(i,{...r.data("settings"),...e,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function I8e(e,r){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(r),!0)};return e.patch(r,n),e.applyData(r,n)}function F8e(e,r){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(r,n),[e.applyData(r,n),{type:"text",value:`
1047`}]}function O8e(e,r){const n=r.value?r.value+`
1048`:"",i={},a=r.lang?r.lang.split(/\s+/):[];a.length>0&&(i.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return r.meta&&(o.data={meta:r.meta}),e.patch(r,o),o=e.applyData(r,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(r,o),o}function L8e(e,r){const n={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function R8e(e,r){const n={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function D8e(e,r){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(r.identifier).toUpperCase(),a=Z0(i.toLowerCase()),o=e.footnoteOrder.indexOf(i);let l,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=o+1,c+=1,e.footnoteCounts.set(i,c);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(r,u);const d={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(r,d),e.applyData(r,d)}function M8e(e,r){const n={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function z8e(e,r){if(e.options.allowDangerousHtml){const n={type:"raw",value:r.value};return e.patch(r,n),e.applyData(r,n)}}function yfe(e,r){const n=r.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+i}];const a=e.all(r),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=i:a.push({type:"text",value:i}),a}function U8e(e,r){const n=String(r.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return yfe(e,r);const a={src:Z0(i.url||""),alt:r.alt};i.title!==null&&i.title!==void 0&&(a.title=i.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(r,o),e.applyData(r,o)}function $8e(e,r){const n={src:Z0(r.url)};r.alt!==null&&r.alt!==void 0&&(n.alt=r.alt),r.title!==null&&r.title!==void 0&&(n.title=r.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(r,i),e.applyData(r,i)}function Q8e(e,r){const n={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(r,i),e.applyData(r,i)}function H8e(e,r){const n=String(r.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return yfe(e,r);const a={href:Z0(i.url||"")};i.title!==null&&i.title!==void 0&&(a.title=i.title);const o={type:"element",tagName:"a",properties:a,children:e.all(r)};return e.patch(r,o),e.applyData(r,o)}function V8e(e,r){const n={href:Z0(r.url)};r.title!==null&&r.title!==void 0&&(n.title=r.title);const i={type:"element",tagName:"a",properties:n,children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function W8e(e,r,n){const i=e.all(r),a=n?q8e(n):vfe(r),o={},l=[];if(typeof r.checked=="boolean"){const h=i[0];let f;h&&h.type==="element"&&h.tagName==="p"?f=h:(f={type:"element",tagName:"p",properties:{},children:[]},i.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const h=i[c];(a||c!==0||h.type!=="element"||h.tagName!=="p")&&l.push({type:"text",value:`
1049`}),h.type==="element"&&h.tagName==="p"&&!a?l.push(...h.children):l.push(h)}const u=i[i.length-1];u&&(a||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
1050`});const d={type:"element",tagName:"li",properties:o,children:l};return e.patch(r,d),e.applyData(r,d)}function q8e(e){let r=!1;if(e.type==="list"){r=e.spread||!1;const n=e.children;let i=-1;for(;!r&&++i<n.length;)r=vfe(n[i])}return r}function vfe(e){const r=e.spread;return r??e.children.length>1}function K8e(e,r){const n={},i=e.all(r);let a=-1;for(typeof r.start=="number"&&r.start!==1&&(n.start=r.start);++a<i.length;){const l=i[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:r.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(r,o),e.applyData(r,o)}function G8e(e,r){const n={type:"element",tagName:"p",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function X8e(e,r){const n={type:"root",children:e.wrap(e.all(r))};return e.patch(r,n),e.applyData(r,n)}function Y8e(e,r){const n={type:"element",tagName:"strong",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function J8e(e,r){const n=e.all(r),i=n.shift(),a=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(r.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=o$(r.children[1]),u=efe(r.children[r.children.length-1]);c&&u&&(l.position={start:c,end:u}),a.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(r,o),e.applyData(r,o)}function Z8e(e,r,n){const i=n?n.children:void 0,o=(i?i.indexOf(r):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:r.children.length;let u=-1;const d=[];for(;++u<c;){const f=r.children[u],p={},m=l?l[u]:void 0;m&&(p.align=m);let A={type:"element",tagName:o,properties:p,children:[]};f&&(A.children=e.all(f),e.patch(f,A),A=e.applyData(f,A)),d.push(A)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(r,h),e.applyData(r,h)}function e$e(e,r){const n={type:"element",tagName:"td",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}const FK=9,OK=32;function t$e(e){const r=String(e),n=/\r?\n|\r/g;let i=n.exec(r),a=0;const o=[];for(;i;)o.push(LK(r.slice(a,i.index),a>0,!0),i[0]),a=i.index+i[0].length,i=n.exec(r);return o.push(LK(r.slice(a),a>0,!1)),o.join("")}function LK(e,r,n){let i=0,a=e.length;if(r){let o=e.codePointAt(i);for(;o===FK||o===OK;)i++,o=e.codePointAt(i)}if(n){let o=e.codePointAt(a-1);for(;o===FK||o===OK;)a--,o=e.codePointAt(a-1)}return a>i?e.slice(i,a):""}function r$e(e,r){const n={type:"text",value:t$e(String(r.value))};return e.patch(r,n),e.applyData(r,n)}function n$e(e,r){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,n),e.applyData(r,n)}const i$e={blockquote:I8e,break:F8e,code:O8e,delete:L8e,emphasis:R8e,footnoteReference:D8e,heading:M8e,html:z8e,imageReference:U8e,image:$8e,inlineCode:Q8e,linkReference:H8e,link:V8e,listItem:W8e,list:K8e,paragraph:G8e,root:X8e,strong:Y8e,table:J8e,tableCell:e$e,tableRow:Z8e,text:r$e,thematicBreak:n$e,toml:NN,yaml:NN,definition:NN,footnoteDefinition:NN};function NN(){}const bfe=-1,U4=0,Uw=1,DE=2,m$=3,p$=4,A$=5,g$=6,wfe=7,jfe=8,RK=typeof self=="object"?self:globalThis,a$e=(e,r)=>{const n=(a,o)=>(e.set(o,a),a),i=a=>{if(e.has(a))return e.get(a);const[o,l]=r[a];switch(o){case U4:case bfe:return n(l,a);case Uw:{const c=n([],a);for(const u of l)c.push(i(u));return c}case DE:{const c=n({},a);for(const[u,d]of l)c[i(u)]=i(d);return c}case m$:return n(new Date(l),a);case p$:{const{source:c,flags:u}=l;return n(new RegExp(c,u),a)}case A$:{const c=n(new Map,a);for(const[u,d]of l)c.set(i(u),i(d));return c}case g$:{const c=n(new Set,a);for(const u of l)c.add(i(u));return c}case wfe:{const{name:c,message:u}=l;return n(new RK[c](u),a)}case jfe:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new RK[o](l),a)};return i},DK=e=>a$e(new Map,e)(0),Fx="",{toString:s$e}={},{keys:o$e}=Object,p1=e=>{const r=typeof e;if(r!=="object"||!e)return[U4,r];const n=s$e.call(e).slice(8,-1);switch(n){case"Array":return[Uw,Fx];case"Object":return[DE,Fx];case"Date":return[m$,Fx];case"RegExp":return[p$,Fx];case"Map":return[A$,Fx];case"Set":return[g$,Fx];case"DataView":return[Uw,n]}
vendor: 4,665 bytes, lines 1050-1052
1050return n.includes("Array")?[Uw,n]:n.includes("Error")?[wfe,n]:[DE,n]},SN=([e,r])=>e===U4&&(r==="function"||r==="symbol"),l$e=(e,r,n,i)=>{const a=(l,c)=>{const u=i.push(l)-1;return n.set(c,u),u},o=l=>{if(n.has(l))return n.get(l);let[c,u]=p1(l);switch(c){case U4:{let h=l;switch(u){case"bigint":c=jfe,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);h=null;break;case"undefined":return a([bfe],l)}return a([c,h],l)}case Uw:{if(u){let p=l;return u==="DataView"?p=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(l)),a([u,[...p]],l)}const h=[],f=a([c,h],l);for(const p of l)h.push(o(p));return f}case DE:{if(u)switch(u){case"BigInt":return a([u,l.toString()],l);case"Boolean":case"Number":case"String":return a([u,l.valueOf()],l)}if(r&&"toJSON"in l)return o(l.toJSON());const h=[],f=a([c,h],l);for(const p of o$e(l))(e||!SN(p1(l[p])))&&h.push([o(p),o(l[p])]);return f}case m$:return a([c,l.toISOString()],l);case p$:{const{source:h,flags:f}=l;return a([c,{source:h,flags:f}],l)}case A$:{const h=[],f=a([c,h],l);for(const[p,m]of l)(e||!(SN(p1(p))||SN(p1(m))))&&h.push([o(p),o(m)]);return f}case g$:{const h=[],f=a([c,h],l);for(const p of l)(e||!SN(p1(p)))&&h.push(o(p));return f}}const{message:d}=l;return a([c,{name:u,message:d}],l)};return o},MK=(e,{json:r,lossy:n}={})=>{const i=[];return l$e(!(r||n),!!r,new Map,i)(e),i},ME=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?DK(MK(e,r)):structuredClone(e):(e,r)=>DK(MK(e,r));function c$e(e,r){const n=[{type:"text",value:"↩"}];return r>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),n}function u$e(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function d$e(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||c$e,i=e.options.footnoteBackLabel||u$e,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let u=-1;for(;++u<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[u]);if(!d)continue;const h=e.all(d),f=String(d.identifier).toUpperCase(),p=Z0(f.toLowerCase());let m=0;const A=[],g=e.footnoteCounts.get(f);for(;g!==void 0&&++m<=g;){A.length>0&&A.push({type:"text",value:" "});let b=typeof n=="string"?n:n(u,m);typeof b=="string"&&(b={type:"text",value:b}),A.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(u,m),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const y=h[h.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const b=y.children[y.children.length-1];b&&b.type==="text"?b.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...A)}else h.push(...A);const x={type:"element",tagName:"li",properties:{id:r+"fn-"+p},children:e.wrap(h,!0)};e.patch(d,x),c.push(x)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ME(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
1051`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
1052`}]}}const _fe=function(e){if(e==null)return p$e;if(typeof e=="function")return $4(e);if(typeof e=="object")return Array.isArray(e)?h$e(e):f$e(e);if(typeof e=="string")return m$e(e);throw new Error("Expected function, string, or object as test")};function h$e(e){const r=[];let n=-1;for(;++n<e.length;)r[n]=_fe(e[n]);return $4(i);function i(...a){let o=-1;for(;++o<r.length;)if(r[o].apply(this,a))return!0;return!1}}function f$e(e){const r=e;return $4(n);function n(i){const a=i;let o;for(o in e)if(a[o]!==r[o])return!1;return!0}}function m$e(e){return $4(r);function r(n){return n&&n.type===e}}function $4(e){return r;function r(n,i,a){return!!(A$e(n)&&e.call(this,n,typeof i=="number"?i:void 0,a||void 0))}}function p$e(){return!0}function A$e(e){return e!==null&&typeof e=="object"&&"type"in e}const Cfe=[],g$e=!0,zK=!1,x$e="skip";function y$e(e,r,n,i){let a;typeof r=="function"&&typeof n!="function"?(i=n,n=r):a=r;const o=_fe(a),l=i?-1:1;c(e,void 0,[])();function c(u,d,h){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=Cfe,A,g,y;if((!r||o(u,d,h[h.length-1]||void 0))&&(m=v$e(n(u,h)),m[0]===zK))return m;if("children"in u&&u.children){const x=u;
vendor: 12,784 bytes, lines 1052-1056
1052if(x.children&&m[0]!==x$e)for(g=(i?x.children.length:-1)+l,y=h.concat(x);g>-1&&g<x.children.length;){const b=x.children[g];if(A=c(b,g,y)(),A[0]===zK)return A;g=typeof A[1]=="number"?A[1]:g+l}}return m}}}function v$e(e){return Array.isArray(e)?e:typeof e=="number"?[g$e,e]:e==null?Cfe:[e]}function Nfe(e,r,n,i){let a,o,l;typeof r=="function"&&typeof n!="function"?(o=void 0,l=r,a=n):(o=r,l=n,a=i),y$e(e,o,c,a);function c(u,d){const h=d[d.length-1],f=h?h.children.indexOf(u):void 0;return l(u,f,h)}}const gD={}.hasOwnProperty,b$e={};function w$e(e,r){const n=r||b$e,i=new Map,a=new Map,o=new Map,l={...i$e,...n.handlers},c={all:d,applyData:_$e,definitionById:i,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:l,one:u,options:n,patch:j$e,wrap:N$e};return Nfe(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const f=h.type==="definition"?i:a,p=String(h.identifier).toUpperCase();f.has(p)||f.set(p,h)}}),c;function u(h,f){const p=h.type,m=c.handlers[p];if(gD.call(c.handlers,p)&&m)return m(c,h,f);if(c.options.passThrough&&c.options.passThrough.includes(p)){if("children"in h){const{children:g,...y}=h,x=ME(y);return x.children=c.all(h),x}return ME(h)}return(c.options.unknownHandler||C$e)(c,h,f)}function d(h){const f=[];if("children"in h){const p=h.children;let m=-1;for(;++m<p.length;){const A=c.one(p[m],h);if(A){if(m&&p[m-1].type==="break"&&(!Array.isArray(A)&&A.type==="text"&&(A.value=UK(A.value)),!Array.isArray(A)&&A.type==="element")){const g=A.children[0];g&&g.type==="text"&&(g.value=UK(g.value))}Array.isArray(A)?f.push(...A):f.push(A)}}}return f}}function j$e(e,r){e.position&&(r.position=s6e(e))}function _$e(e,r){let n=r;if(e&&e.data){const i=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,ME(o)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function C$e(e,r){const n=r.data||{},i="value"in r&&!(gD.call(n,"hProperties")||gD.call(n,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function N$e(e,r){const n=[];let i=-1;for(r&&n.push({type:"text",value:`
1053`});++i<e.length;)i&&n.push({type:"text",value:`
1054`}),n.push(e[i]);return r&&e.length>0&&n.push({type:"text",value:`
1055`}),n}function UK(e){let r=0,n=e.charCodeAt(r);for(;n===9||n===32;)r++,n=e.charCodeAt(r);return e.slice(r)}function $K(e,r){const n=w$e(e,r),i=n.one(e,void 0),a=d$e(n),o=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return a&&o.children.push({type:"text",value:`
1056`},a),o}function S$e(e,r){return e&&"run"in e?async function(n,i){const a=$K(n,{file:i,...r});await e.run(a,i)}:function(n,i){return $K(n,{file:i,...e||r})}}function QK(e){if(e)throw e}var Ak=Object.prototype.hasOwnProperty,Sfe=Object.prototype.toString,HK=Object.defineProperty,VK=Object.getOwnPropertyDescriptor,WK=function(r){return typeof Array.isArray=="function"?Array.isArray(r):Sfe.call(r)==="[object Array]"},qK=function(r){if(!r||Sfe.call(r)!=="[object Object]")return!1;var n=Ak.call(r,"constructor"),i=r.constructor&&r.constructor.prototype&&Ak.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!n&&!i)return!1;var a;for(a in r);return typeof a>"u"||Ak.call(r,a)},KK=function(r,n){HK&&n.name==="__proto__"?HK(r,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):r[n.name]=n.newValue},GK=function(r,n){if(n==="__proto__")if(Ak.call(r,n)){if(VK)return VK(r,n).value}else return;return r[n]},k$e=function e(){var r,n,i,a,o,l,c=arguments[0],u=1,d=arguments.length,h=!1;for(typeof c=="boolean"&&(h=c,c=arguments[1]||{},u=2),(c==null||typeof c!="object"&&typeof c!="function")&&(c={});u<d;++u)if(r=arguments[u],r!=null)for(n in r)i=GK(c,n),a=GK(r,n),c!==a&&(h&&a&&(qK(a)||(o=WK(a)))?(o?(o=!1,l=i&&WK(i)?i:[]):l=i&&qK(i)?i:{},KK(c,{name:n,newValue:e(h,l,a)})):typeof a<"u"&&KK(c,{name:n,newValue:a}));return c};const MI=bn(k$e);function xD(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function E$e(){const e=[],r={run:n,use:i};return r;function n(...a){let o=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...a);function c(u,...d){const h=e[++o];let f=-1;if(u){l(u);return}for(;++f<a.length;)(d[f]===null||d[f]===void 0)&&(d[f]=a[f]);a=d,h?B$e(h,c)(...d):l(null,...d)}}function i(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),r}}function B$e(e,r){let n;return i;function i(...l){const c=e.length>l.length;let u;c&&l.push(a);try{u=e.apply(this,l)}catch(d){const h=d;if(c&&n)throw h;return a(h)}c||(u&&u.then&&typeof u.then=="function"?u.then(o,a):u instanceof Error?a(u):o(u))}function a(l,...c){n||(n=!0,r(l,...c))}function o(l){a(null,l)}}const nd={basename:T$e,dirname:P$e,extname:I$e,join:F$e,sep:"/"};function T$e(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');T_(e);let n=0,i=-1,a=e.length,o;if(r===void 0||r.length===0||r.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else i<0&&(o=!0,i=a+1);return i<0?"":e.slice(n,i)}if(r===e)return"";let l=-1,c=r.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else l<0&&(o=!0,l=a+1),c>-1&&(e.codePointAt(a)===r.codePointAt(c--)?c<0&&(i=a):(c=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function P$e(e){if(T_(e),e.length===0)return".";let r=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){r=n;break}}else i||(i=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function I$e(e){T_(e);let r=e.length,n=-1,i=0,a=-1,o=0,l;for(;r--;){const c=e.codePointAt(r);if(c===47){if(l){i=r+1;break}continue}n<0&&(l=!0,n=r+1),c===46?a<0?a=r:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||n<0||o===0||o===1&&a===n-1&&a===i+1?"":e.slice(a,n)}function F$e(...e){let r=-1,n;for(;++r<e.length;)T_(e[r]),e[r]&&(n=n===void 0?e[r]:n+"/"+e[r]);return n===void 0?".":O$e(n)}function O$e(e){T_(e);const r=e.codePointAt(0)===47;let n=L$e(e,!r);return n.length===0&&!r&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),r?"/"+n:n}function L$e(e,r){let n="",i=0,a=-1,o=0,l=-1,c,u;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(a===l-1||o===1))if(a!==l-1&&o===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",i=0):(n=n.slice(0,u),i=n.length-1-n.lastIndexOf("/")),a=l,o=0;continue}}else if(n.length>0){n="",i=0,a=l,o=0;continue}}r&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),i=l-a-1;a=l,o=0}else c===46&&o>-1?o++:o=-1}return n}function T_(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const R$e={cwd:D$e};function D$e(){return"/"}function yD(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function M$e(e){if(typeof e=="string")e=new URL(e);else if(!yD(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return z$e(e)}function z$e(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const r=e.pathname;let n=-1;for(;++n<r.length;)if(r.codePointAt(n)===37&&r.codePointAt(n+1)===50){const i=r.codePointAt(n+2);if(i===70||i===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(r)}const zI=["history","path","basename","stem","extname","dirname"];class kfe{constructor(r){let n;r?yD(r)?n={path:r}:typeof r=="string"||U$e(r)?n={value:r}:n=r:n={},this.cwd="cwd"in n?"":R$e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<zI.length;){const o=zI[i];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let a;for(a in n)zI.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?nd.basename(this.path):void 0}set basename(r){$I(r,"basename"),UI(r,"basename"),this.path=nd.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?nd.dirname(this.path):void 0}set dirname(r){XK(this.basename,"dirname"),this.path=nd.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?nd.extname(this.path):void 0}set extname(r){if(UI(r,"extname"),XK(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=nd.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){yD(r)&&(r=M$e(r)),$I(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?nd.basename(this.path,this.extname):void 0}set stem(r){$I(r,"stem"),UI(r,"stem"),this.path=nd.join(this.dirname||"",r+(this.extname||""))}fail(r,n,i){const a=this.message(r,n,i);throw a.fatal=!0,a}info(r,n,i){const a=this.message(r,n,i);return a.fatal=void 0,a}message(r,n,i){const a=new co(r,n,i);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function UI(e,r){if(e&&e.includes(nd.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+nd.sep+"`")}function $I(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function XK(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}function U$e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $$e=function(e){const i=this.constructor.prototype,a=i[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,i),o},Q$e={}.hasOwnProperty;class x$ extends $$e{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=E$e()}copy(){const r=new x$;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];r.use(...i)}return r.data(MI(!0,{},this.namespace)),r}data(r,n){return typeof r=="string"?arguments.length===2?(VI("data",this.frozen),this.namespace[r]=n,this):Q$e.call(this.namespace,r)&&this.namespace[r]||void 0:r?(VI("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const a=n.call(r,...i);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const n=kN(r),i=this.parser||this.Parser;return QI("parse",i),i(String(n),n)}process(r,n){const i=this;return this.freeze(),QI("process",this.parser||this.Parser),HI("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(o,l){const c=kN(r),u=i.parse(c);i.run(u,c,function(h,f,p){if(h||!f||!p)return d(h);const m=f,A=i.stringify(m,p);W$e(A)?p.value=A:p.result=A,d(h,p)});function d(h,f){h||!f?l(h):o?o(f):n(void 0,f)}}}processSync(r){let n=!1,i;return this.freeze(),QI("processSync",this.parser||this.Parser),HI("processSync",this.compiler||this.Compiler),this.process(r,a),JK("processSync","process",n),i;function a(o,l){n=!0,QK(o),i=l}}run(r,n,i){YK(r),this.freeze();const a=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?o(void 0,i):new Promise(o);function o(l,c){const u=kN(n);a.run(r,u,d);function d(h,f,p){const m=f||r;h?c(h):l?l(m):i(void 0,m,p)}}}runSync(r,n){let i=!1,a;return this.run(r,n,o),JK("runSync","run",i),a;function o(l,c){QK(l),a=c,i=!0}}stringify(r,n){this.freeze();const i=kN(n),a=this.compiler||this.Compiler;return HI("stringify",a),YK(r),a(r,i)}use(r,...n){const i=this.attachers,a=this.namespace;if(VI("use",this.frozen),r!=null)if(typeof r=="function")u(r,n);else if(typeof r=="object")Array.isArray(r)?c(r):l(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;
1056function o(d){if(typeof d=="function")u(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[h,...f]=d;u(h,f)}else l(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function l(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(d.plugins),d.settings&&(a.settings=MI(!0,a.settings,d.settings))}function c(d){let h=-1;if(d!=null)if(Array.isArray(d))for(;++h<d.length;){const f=d[h];o(f)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function u(d,h){let f=-1,p=-1;for(;++f<i.length;)if(i[f][0]===d){p=f;break}if(p===-1)i.push([d,...h]);else if(h.length>0){let[m,...A]=h;const g=i[p][1];xD(g)&&xD(m)&&(m=MI(!0,g,m)),i[p]=[d,m,...A]}}}}const H$e=new x$().freeze();function QI(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function HI(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function VI(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function YK(e){if(!xD(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function JK(e,r,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function kN(e){return V$e(e)?e:new kfe(e)}function V$e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function W$e(e){return typeof e=="string"||q$e(e)}function q$e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const K$e="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ZK=[],eG={allowDangerousHtml:!0},G$e=/^(https?|ircs?|mailto|xmpp)$/i,X$e=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function tg(e){const r=Y$e(e),n=J$e(e);return Z$e(r.runSync(r.parse(n),n),e)}function Y$e(e){const r=e.rehypePlugins||ZK,n=e.remarkPlugins||ZK,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...eG}:eG;return H$e().use(P8e).use(n).use(S$e,i).use(r)}function J$e(e){const r=e.children||"",n=new kfe;return typeof r=="string"&&(n.value=r),n}function Z$e(e,r){const n=r.allowedElements,i=r.allowElement,a=r.components,o=r.disallowedElements,l=r.skipHtml,c=r.unwrapDisallowed,u=r.urlTransform||eQe;for(const h of X$e)Object.hasOwn(r,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+K$e+h.id,void 0);return Nfe(e,d),d6e(e,{Fragment:s.Fragment,components:a,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function d(h,f,p){if(h.type==="raw"&&p&&typeof f=="number")return l?p.children.splice(f,1):p.children[f]={type:"text",value:h.value},f;if(h.type==="element"){let m;for(m in LI)if(Object.hasOwn(LI,m)&&Object.hasOwn(h.properties,m)){const A=h.properties[m],g=LI[m];(g===null||g.includes(h.tagName))&&(h.properties[m]=u(String(A||""),m,h))}}if(h.type==="element"){let m=n?!n.includes(h.tagName):o?o.includes(h.tagName):!1;if(!m&&i&&typeof f=="number"&&(m=!i(h,f,p)),m&&p&&typeof f=="number")return c&&h.children?p.children.splice(f,1,...h.children):p.children.splice(f,1),f}}}function eQe(e){const r=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),a=e.indexOf("/");return r===-1||a!==-1&&r>a||n!==-1&&r>n||i!==-1&&r>i||G$e.test(e.slice(0,r))?e:""}const tG=/\[\[NAVIGATE:(\/[^\]]+)\]\]/g,rG=/\[\[QUIZ\]\]([\s\S]*?)\[\[\/QUIZ\]\]/;function tQe({raw:e,onAnswer:r}){const[n,i]=w.useState(null);let a;try{a=JSON.parse(e.trim())}catch{return null}const o=n!==null,l=n===a.correctIndex;return s.jsxs("div",{className:"my-3 p-3 rounded-xl border border-primary/20 bg-primary/5 space-y-2",children:[s.jsx("p",{className:"font-semibold text-sm",children:a.question}),s.jsx("div",{className:"space-y-1.5",children:a.options.map((c,u)=>{let d="text-left w-full px-3 py-2 rounded-lg text-xs transition-colors ";return o?u===a.correctIndex?d+="bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300 font-medium":u===n?d+="bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-300":d+="bg-muted/50 opacity-60":d+="bg-muted hover:bg-muted/80 cursor-pointer",s.jsxs("button",{className:d,disabled:o,onClick:()=>{i(u),r(u===a.correctIndex)},children:[s.jsxs("span",{className:"font-medium mr-1.5",children:[String.fromCharCode(65+u),"."]}),c]},u)})}),o&&s.jsxs("p",{className:`text-xs mt-2 ${l?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"}`,children:[l?"✅ Corect! ":"❌ Greșit. ",a.explanation]})]})}function rQe({content:e,navigate:r,onNavigate:n,isLastAssistant:i,onQuizAnswer:a}){const o=[...e.matchAll(tG)],l=e.match(rG);let c=e.replace(tG,"").replace(rG,"").trim();return w.useEffect(()=>{i&&o.length>0&&(r(o[0][1]),n())},[]),s.jsxs(s.Fragment,{children:[s.jsx("div",{className:`prose prose-sm dark:prose-invert max-w-none
1057        [&>p]:my-1.5 [&>p]:leading-relaxed
1058        [&>ul]:my-2 [&>ul]:space-y-1 [&>ol]:my-2 [&>ol]:space-y-1
1059        [&>h1]:text-base [&>h1]:font-heading [&>h1]:mt-3 [&>h1]:mb-1.5
1060        [&>h2]:text-sm [&>h2]:font-heading [&>h2]:font-semibold [&>h2]:mt-3 [&>h2]:mb-1.5
1061        [&>h3]:text-sm [&>h3]:font-semibold [&>h3]:mt-2 [&>h3]:mb-1
1062        [&_strong]:text-foreground [&_strong]:font-semibold
1063        [&_li]:text-[13px] [&_li]:leading-relaxed
1064        [&>blockquote]:border-l-2 [&>blockquote]:border-primary/30 [&>blockquote]:pl-3 [&>blockquote]:italic [&>blockquote]:text-muted-foreground
1065        [&>hr]:my-3 [&>hr]:border-border
1066      `,children:s.jsx(tg,{children:c})}),l&&s.jsx(tQe,{raw:l[1],onAnswer:a})]})}function nQe({onAction:e,disabled:r}){const n=[{mode:"explain",icon:yr,label:"Explică-mi"},{mode:"quiz",icon:ff,label:"Testează-mă"},{mode:"summary",icon:ske,label:"Rezumă"}];return s.jsx("div",{className:"flex gap-1.5 mb-2",children:n.map(({mode:i,icon:a,label:o})=>s.jsxs("button",{disabled:r,onClick:()=>e(i,o),className:`flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-[11px] font-medium
1067            bg-primary/10 text-primary hover:bg-primary/20 transition-colors disabled:opacity-40`,children:[s.jsx(a,{size:12}),o]},i))})}function Efe(){var N;const e=As(),{user:r}=Fn(),n=Kr(),[i,a]=w.useState(!1),[o,l]=w.useState(""),[c,u]=w.useState([]),d=w.useRef(null),h=!!r,{data:f=[]}=Xe({queryKey:["member-chat",r==null?void 0:r.id],queryFn:async()=>{const{data:S}=await G.from("member_chat_messages").select("*").eq("user_id",r.id).order("created_at",{ascending:!0}).limit(50);return S??[]},enabled:h&&i}),p=h?f:c,{data:m=0}=Xe({queryKey:["member-chat-count",r==null?void 0:r.id],queryFn:async()=>
1067{if(!h)return 0;const S=new Date;S.setHours(0,0,0,0);const{count:E}=await G.from("member_chat_messages").select("*",{count:"exact",head:!0}).eq("user_id",r.id).eq("role","user").gte("created_at",S.toISOString());return E??0},enabled:h&&i}),[A,g]=w.useState(0),b=Math.max(0,(h?20:5)-(h?m:A)),v=An({mutationFn:async({message:S,mode:E})=>{const O=p.slice(-10).map(F=>({role:F.role,content:F.content}));O.push({role:"user",content:S}),h||u(F=>[...F,{role:"user",content:S}]);const{data:B,error:T}=await G.functions.invoke("member-chat",{body:{messages:O,mode:E}});if(T)throw new Error(T.message||"Eroare la trimitere");if(B!=null&&B.error)throw new Error(B.error);return B},onSuccess:S=>{h?(n.invalidateQueries({queryKey:["member-chat"]}),n.invalidateQueries({queryKey:["member-chat-count"]})):(S!=null&&S.content&&u(E=>[...E,{role:"assistant",content:S.content}]),g(E=>E+1))}}),j=w.useCallback((S,E)=>{const O=(S??o).trim();!O||v.isPending||b<=0||(S||l(""),v.mutate({message:O,mode:E}))},[o,v,b]),_=w.useCallback((S,E)=>{var F;const B=((F=[...p].reverse().find(I=>I.role==="user"))==null?void 0:F.content)||"crypto și blockchain",T={explain:`Explică-mi pe înțelesul meu: ${B}`,quiz:`Generează un quiz despre: ${B}`,summary:`Rezumă informațiile despre: ${B}`};j(T[S]||B,S)},[p,j]),C=w.useCallback(S=>{},[]);return w.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[p,c,v.isPending]),s.jsxs(s.Fragment,{children:[s.jsx(Fu,{children:!i&&s.jsx(Le.button,{initial:{scale:0},animate:{scale:1},exit:{scale:0},onClick:()=>a(!0),className:"fixed bottom-6 right-6 z-50 p-4 rounded-full bg-primary text-primary-foreground shadow-lg hover:shadow-xl transition-shadow mb-[env(safe-area-inset-bottom)]",children:s.jsx(o4,{size:24})})}),s.jsx(Fu,{children:i&&s.jsxs(Le.div,{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.95},className:"fixed bottom-6 right-6 z-50 w-[440px] max-w-[calc(100vw-2rem)] h-[min(600px,85vh)] flex flex-col rounded-2xl border border-border bg-background shadow-2xl overflow-hidden mb-[env(safe-area-inset-bottom)]",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-muted/30",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Li,{size:18,className:"text-primary"}),s.jsx("span",{className:"font-heading font-semibold text-sm",children:"Tudor — AI Tutor"}),s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-primary/10 text-primary font-medium",children:"RAG"})]}),s.jsx("button",{onClick:()=>a(!1),className:"p-1 rounded-lg hover:bg-muted transition-colors",children:s.jsx(Uc,{size:16})})]}),s.jsxs("div",{ref:d,className:"flex-1 overflow-y-auto p-5 space-y-4",children:[p.length===0&&!v.isPending&&s.jsxs("div",{className:"text-center py-8",children:[s.jsx(Ec,{size:40,className:"mx-auto text-muted-foreground/20 mb-4"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Salut! 👋 Sunt ",s.jsx("strong",{children:"Tudor"}),", AI Tutorul tău."]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Pot explica concepte, genera quiz-uri și rezuma lecții:"}),s.jsx("div",{className:"flex flex-col gap-2 mt-4",children:["Ce este blockchain-ul?","Explică-mi DeFi pe înțelesul meu","Ce cursuri gratuite aveți?","Testează-mă despre crypto"].map(S=>s.jsx("button",{onClick:()=>{l(S)},className:"text-xs text-left px-3 py-2 rounded-lg bg-muted hover:bg-muted/80 transition-colors text-foreground",children:S},S))})]}),p.map((S,E)=>{const O=S.role==="assistant"&&E===p.map((B,T)=>B.role==="assistant"?T:-1).filter(B=>B>=0).pop();return S.role==="user"?s.jsx("div",{className:"flex justify-end",children:s.jsx("div",{className:"max-w-[85%] rounded-2xl rounded-br-md px-4 py-2.5 text-sm bg-primary text-primary-foreground",children:S.content})},S.id||E):s.jsxs("div",{className:"flex gap-3 justify-start",children:[s.jsx("div",{className:"shrink-0 w-7 h-7 rounded-full bg-primary/10 flex items-center justify-center mt-1",children:s.jsx(Ec,{size:14,className:"text-primary"})}),s.jsx("div",{className:"flex-1 min-w-0 text-[13px] text-foreground leading-relaxed",children:s.jsx(rQe,{c
1067ontent:S.content,navigate:e,onNavigate:()=>a(!1),isLastAssistant:!!O,onQuizAnswer:C})})]},S.id||E)}),v.isPending&&s.jsxs("div",{className:"flex gap-3 justify-start",children:[s.jsx("div",{className:"shrink-0 w-7 h-7 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(Ec,{size:14,className:"text-primary"})}),s.jsxs("div",{className:"flex items-center gap-1.5 py-2",children:[s.jsx("span",{className:"w-2 h-2 rounded-full bg-muted-foreground/40 animate-bounce [animation-delay:0ms]"}),s.jsx("span",{className:"w-2 h-2 rounded-full bg-muted-foreground/40 animate-bounce [animation-delay:150ms]"}),s.jsx("span",{className:"w-2 h-2 rounded-full bg-muted-foreground/40 animate-bounce [animation-delay:300ms]"})]})]}),v.isError&&s.jsx("p",{className:"text-xs text-destructive text-center",children:((N=v.error)==null?void 0:N.message)||"Eroare. Încearcă din nou."})]}),s.jsx("div",{className:"border-t border-border p-3",children:b<=0?s.jsx("div",{className:"text-center py-2 space-y-2",children:h?s.jsx("p",{className:"text-xs text-muted-foreground",children:"Ai folosit toate cele 20 întrebări de azi. Revino mâine! 🌅"}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Ai folosit cele 5 întrebări gratuite de azi."}),s.jsx("a",{href:"/autentificare",className:"inline-block text-xs font-semibold px-4 py-2 rounded-lg bg-primary text-primary-foreground hover:opacity-90 transition-opacity",children:"🚀 Creează cont gratuit — 20 întrebări/zi + EduCoins"})]})}):s.jsxs(s.Fragment,{children:[p.length>0&&h&&s.jsx(nQe,{onAction:_,disabled:v.isPending}),!h&&b===1&&p.length>0&&s.jsx("a",{href:"/autentificare",className:"block text-center text-[11px] font-medium px-2 py-1.5 mb-2 rounded-lg bg-primary/10 text-primary hover:bg-primary/20 transition-colors",children:"✨ Cont gratuit → 20 întrebări/zi + câștigă EduCoins"}),s.jsxs("form",{onSubmit:S=>{S.preventDefault(),j()},className:"flex gap-2",children:[s.jsx("input",{value:o,onChange:S=>l(S.target.value),placeholder:"Întreabă-l pe Tudor...",className:"flex-1 bg-muted rounded-xl px-4 py-2.5 text-sm outline-none focus:ring-2 focus:ring-primary/30 transition-all",disabled:v.isPending}),s.jsx(me,{type:"submit",size:"icon",className:"shrink-0 rounded-xl h-10 w-10",disabled:!o.trim()||v.isPending,children:s.jsx(Dc,{size:16})})]})]})})]})})]})}function Ft({children:e,showTicker:r=!1,fullWidth:n=!1}){return Pt(),s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(nze,{}),r&&s.jsx(uze,{}),s.jsx("div",{className:"w-full px-4 md:px-6 lg:px-8 pt-3 pb-1",children:s.jsx(mze,{})}),s.jsx("main",{className:"flex-1 overflow-x-hidden",children:e}),s.jsx(ize,{}),s.jsx(dze,{}),s.jsx(Efe,{})]})}const iQe="/assets/hero-web3-ai-DwrVP4HL.jpg";function aQe(){j4();const{t:e,lang:r}=Pt(),n=r==="ro";return s.jsxs("section",{className:"relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 bg-background"}),s.jsxs(Le.div,{initial:{opacity:0}
1067,animate:{opacity:1},transition:{duration:1.2,delay:.3},className:"absolute inset-y-0 right-0 w-[45%] hidden lg:block pointer-events-none",children:[s.jsx("img",{src:iQe,alt:"","aria-hidden":"true",className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-background via-background/60 to-transparent"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/80 via-transparent to-background/40"})]}),s.jsxs("div",{className:"container relative z-10 py-14 md:py-20 lg:py-24",children:[s.jsx("div",{className:"flex flex-col lg:flex-row items-center gap-10 lg:gap-14",children:s.jsxs(Le.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.6},className:"flex-1 max-w-2xl",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-medium bg-primary/10 text-primary border border-primary/20 mb-5",children:[s.jsx(ts,{size:13}),e("hero.badge")]}),s.jsxs("h1",{className:"font-heading text-3xl md:text-4xl lg:text-5xl font-bold leading-[1.12] mb-5 tracking-tight",children:[e("hero.title_start")," ",s.jsx("span",{className:"text-gradient",children:e("hero.title_highlight")})," ",e("hero.title_end")]}),s.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed mb-7 max-w-xl",children:[e("hero.description"),s.jsxs("span",{className:"text-foreground font-medium",children:[" ",e("hero.description_bold")]})]}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs(be,{to:n?"/ce-este":"/what-is",className:"inline-flex items-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-lg font-heading font-semibold text-sm hover:brightness-110 transition-all shadow-md",children:[e("hero.cta_start"),s.jsx(Gt,{size:16})]}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 px-6 py-3 border border-border text-foreground rounded-lg font-heading font-semibold text-sm hover:bg-secondary transition-all",children:[s.jsx(Rr,{size:16}),e("hero.cta_academy")]})]})]})}),s.jsx(Le.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},className:"mt-10 flex gap-8 md:gap-12",children:[{label:e("hero.stat_guides"),value:"13+"},{label:e("hero.stat_glossary"),value:"180+"},{label:e("hero.stat_courses"),value:"3+"}].map(i=>s.jsxs("div",{children:[s.jsx("p",{className:"font-heading font-bold text-2xl text-primary",children:i.value}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i.label})]},i.label))})]})]})}const eb=[{slugRo:"ce-este-bitcoin",slugEn:"what-is-bitcoin",content:{ro:{title:"Ce este Bitcoin? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este Bitcoin? Ghid Complet — Origine, Tehnologie & Funcționare | EduWeb",metaDescription:'Află ce este Bitcoin, cum funcționează, cine l-a creat, ce este mining-ul, halving-ul și de ce BTC este considerat „aur digital". Ghid complet pentru începători.',heroClass:"cat-blockchain",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Bitcoin?",subheading:"Prima criptomonedă descentralizată din lume",intro:'Bitcoin (BTC) este prima criptomonedă din lume, lansată în 2009 de un creator anonim sub pseudonimul Satoshi Nakamoto. Funcționează ca un sistem de plăți electronic peer-to-peer, fără intermediari, bazat pe tehnologia blockchain. Bitcoin este adesea numit „aur digital" datorită ofertei limitate la 21 de milioane de monede.'},sections:[{icon:"globe",title:"Istoria Bitcoin: De la Whitepaper la Revoluție Financiară",content:`**31 octombrie 2008** — Satoshi Nakamoto publică whitepaper-ul „Bitcoin: A Peer-to-Peer Electronic Cash System", propunând un sistem de plăți fără intermediari.
1068
1069**3 ianuarie 2009** — Este minat „Genesis Block" (Blocul 0), primul bloc din rețeaua Bitcoin, care conține mesajul: „The Times 03/Jan/2009 Chancellor on brink of second bailout for banks."
1070
1071**22 mai 2010** — Prima tranzacție comercială cu Bitcoin: Laszlo Hanyecz plătește 10.000 BTC pentru două pizza-uri — acum cunoscută ca „Bitcoin Pizza Day".
1072
1073**2013–2017** — Bitcoin câștigă atenție mainstream, trecând de la câțiva dolari la aproape 20.000 USD. Apar primele exchange-uri mari și reglementări.
1074
1075**2020–2024** — Adopție instituțională masivă: Tesla, MicroStrategy și fonduri de investiții cumpără Bitcoin. În ianuarie 2024, SEC aprobă primul ETF Bitcoin spot din SUA, legitimând Bitcoin ca activ financiar.
1076
1077**2025** — Bitcoin depășește 100.000 USD, fiind tranzacționat pe piețele financiare globale ca un activ matur, alături de aur și acțiuni.`},{icon:"blocks",title:"Cum Funcționează Bitcoin? Tehnologia din Spate",content:`**Blockchain-ul Bitcoin** — Fiecare tranzacție Bitcoin este înregistrată într-un registru public, transparent și imuabil — blockchain-ul. Blocurile noi sunt adăugate la fiecare ~10 minute.
1078
1079**Rețeaua Peer-to-Peer** — Nu există o bancă sau un server central. Mii de calculatoare (noduri) din toată lumea validează și stochează fiecare tranzacție independent.
1080
1081**Chei Publice și Private** — Fiecare portofel Bitcoin are o cheie publică (adresa de primire) și o cheie privată (parola secretă). Cine deține cheia privată, controlează fondurile.
1082
1083**Tranzacțiile** — Când trimiți Bitcoin, tranzacția este difuzată rețelei, validată de mineri și adăugată permanent într-un bloc nou. Confirmarea completă durează ~60 de minute (6 blocuri).
1084
1085**Supply-ul Limitat** — Vor exista maxim 21 de milioane de Bitcoin. Această raritate programată face din BTC un activ deflaționar, similar aurului.`},{icon:"pickaxe",title:"Ce este Mining-ul Bitcoin?",content:`**Definiție** — Mining-ul (mineritul) este procesul prin care calculatoare puternice rezolvă probleme matematice complexe pentru a valida tranzacțiile și a adăuga blocuri noi la blockchain.
1086
1087**Proof of Work (PoW)** — Bitcoin folosește mecanismul Proof of Work, unde minerii concurează să rezolve un hash criptografic. Primul care reușește primește recompensa.
1088
1089**Recompensa de Bloc** — Minerii primesc BTC nou creat ca recompensă. În 2024, recompensa este de 3.125 BTC per bloc (după cel de-al patrulea halving).
1090
1091**Dificultatea** — Se ajustează automat la fiecare 2.016 blocuri (~2 săptămâni) pentru a menține un ritm constant de ~10 minute per bloc.
1092
1093**Consumul Energetic** — Mining-ul Bitcoin consumă energie semnificativă, dar peste 50% provine din surse regenerabile (2024). Industria migrează constant către energie verde.
1094
1095**Pool-uri de Mining** — Minerii individuali se asociază în pool-uri pentru a combina puterea de calcul și a împărți recompensele proporțional.`},{icon:"trending",title:"Ce este Halving-ul Bitcoin?",content:`**Definiție** — Halving-ul este evenimentul programat prin care recompensa minerilor se reduce la jumătate la fiecare 210.000 de blocuri (~4 ani). Reduce ritmul de creare a BTC nou.
1096
1097**Istoric Halving-uri:**
1098- 2012: recompensa de la 50 → 25 BTC
1099- 2016: de la 25 → 12.5 BTC
1100- 2020: de la 12.5 → 6.25 BTC
1101- 2024: de la 6.25 → 3.125 BTC
1102
1103**Impact asupra Prețului** — Istoric, fiecare halving a fost urmat de o creștere semnificativă a prețului în 12-18 luni, datorită reducerii ofertei noi cu cerere c
1103onstantă sau crescătoare.
1104
1105**Ultimul Bitcoin** — La ritmul actual, ultimul Bitcoin va fi minat în jurul anului 2140. După aceea, minerii vor fi recompensați exclusiv din comisioanele de tranzacție.
1106
1107**Modelul Stock-to-Flow** — Un model popular care măsoară raritatea Bitcoin comparativ cu aurul, sugerând creșteri de preț pe termen lung pe măsură ce supply-ul nou scade.`},{icon:"shield",title:"Securitatea și Descentralizarea Bitcoin",content:`**Rețea Indestructibilă** — Bitcoin funcționează pe peste 15.000 de noduri distribuite global. Pentru a compromite rețeaua, un atacator ar avea nevoie de peste 51% din puterea de calcul — practic imposibil.
1108
1109**Imuabilitate** — Odată confirmată, o tranzacție nu poate fi modificată sau anulată. Blockchain-ul Bitcoin nu a fost niciodată compromis în peste 15 ani de funcționare.
1110
1111**Descentralizare Reală** — Nu există CEO, sediu sau buton de oprire. Bitcoin este software open-source, menținut de mii de dezvoltatori voluntari din toată lumea.
1112
1113**Rezistență la Cenzură** — Nimeni nu poate bloca sau confisca Bitcoin-ul tău dacă deții cheia privată. Este „bani fără frontiere".
1114
1115**Pseudonimitate** — Tranzacțiile sunt publice, dar identitățile sunt protejate prin adrese criptografice. Nu este anonim complet, dar oferă un nivel ridicat de confidențialitate.`},{icon:"zap",title:"Bitcoin în Practică: Utilizări și Ecosistem",content:`**Rezervă de Valoare (Store of Value)** — Bitcoin este comparat cu aurul digital. Companiile și statele îl folosesc ca protecție împotriva inflației și devalorizării monedelor fiat.
1116
1117**Lightning Network** — Soluția Layer 2 care permite tranzacții Bitcoin instant și aproape gratuite. Ideală pentru plăți zilnice și micropayments.
1118
1119**ETF-uri Bitcoin** — Fondurile tranzacționate la bursă permit investitorilor tradiționali să acceseze Bitcoin fără a cumpăra direct criptomonedă.
1120
1121**Plăți și Comerț** — Companii precum Microsoft, AT&T și Overstock acceptă Bitcoin. El Salvador l-a adoptat ca monedă legală în 2021.
1122
1123**Bitcoin în România** — Poți cumpăra BTC pe Binance, Coinbase sau platforme locale. Profiturile din crypto trebuie declarate la ANAF (10% impozit pe câștiguri).
1124
1125**DeFi pe Bitcoin** — Proiecte precum Stacks și Ordinals aduc smart contracts și NFT-uri pe blockchain-ul Bitcoin, extinzându-i funcționalitatea.`}],glossary:{title:"Glosar de Termeni Bitcoin",terms:[{term:"Satoshi",def:"Cea mai mică unitate Bitcoin: 1 BTC = 100.000.000 satoshi. Numită după creatorul Bitcoin."},{term:"Halving",def:"Reducerea la jumătate a recompensei de bloc, la fiecare 210.000 blocuri (~4 ani)."},{term:"Mining",def:"Procesul de validare a tranzacțiilor și creare a BTC nou prin rezolvarea de probleme criptografice."},{term:"Wallet",def:"Portofel digital care stochează cheile private necesare pentru a accesa și trimite Bitcoin."},{term:"UTXO",def:"Unspent Transaction Output — modelul contabil al Bitcoin, unde fiecare tranzacție consumă output-uri anterioare."},{term:"Nod",def:"Calculator care rulează software-ul Bitcoin și menține o copie completă a blockchain-ului."},{term:"Lightning Network",def:"Protocol Layer 2 care permite tranzacții Bitcoin rapide și ieftine în afara lanțului principal."},{term:"Cold Storage",def:"Stocarea offline a cheilor private (hardware wallet, paper wallet) pentru securitate maximă."},{term:"Hash Rate",def:"Puterea totală de calcul a rețelei Bitcoin, măsurată în hashes pe secundă."},{term:"Mempool",def:"Zona de așteptare unde tranzacțiile neconfirmate sunt stocate înainte de a fi incluse într-un bloc."}]},faqs:[{q:"Ce este Bitcoin pe scurt?",a:"Bitcoin (BTC) este prima criptomonedă descentralizată din lume, creată în 2009. Funcționează pe blockchain fără bănci sau intermediari, cu un supply maxim de 21 milioane de monede."},{q:"Cine a creat Bitcoin?",a:"Bitcoin a fost creat de o persoană sau un grup sub pseudonimul Satoshi Nakamoto. Identitatea reală rămâne necunoscută."},{q:"Este Bitcoin o investiție sigură?",a:"Bitcoin este un activ volatil. A crescut semnificativ pe termen lung, dar cu variații mari pe termen scurt. Nu investi mai mult decât îți permiți să pierzi și informează-te înainte."},{q:"Cum pot cumpăra Bitcoin în România?",a:"Poți cumpăra Bitcoin pe exchange-uri precum Binance, Coinbase sau platforme locale. Ai nevoie de verificare KYC (document de identitate) și o metodă de plată (transfer bancar, card)."},{q:"De ce are Bitcoin valoare?",a:"Bitcoin are valoare datorită rarității (maxim 21 milioane), securității rețelei, descentralizării, adoptării globale și încrederii pieței. Similar aurului, valoarea vine din consens și utilitate."}],cta:{title:"Continuă să înveți despre Bitcoin",description:"Explorează cursurile noastre din EduWeb Academy despre criptomonede, blockchain și investiții responsabile.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este Bitcoin",path:"/ce-este-bitcoin"}],relatedTopics:[{label:"Ce este Blockchain",path:"/ce-este-blockchain"},{label:"Ce este Ethereum",path:"/ce-este-ethereum"},{label:"Preț Bitcoin Azi",path:"/bitcoin-pret-azi"}],courseTopics:["blockchain","web3"]},en:{title:"What is Bitcoin? Complete Beginner's Guide (2025)",metaTitle:"What is Bitcoin? Complete Guide — Origin, Technology & How It Works | EduWeb",metaDescription:'Learn what Bitcoin is, how it works, who created it, what mining and halving are, and why BTC is called "digital gold". Complete guide for beginners.',heroClass:"cat-blockchain",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Bitcoin?",subheading:"The world's first decentralized cryptocurrency",intro:`Bitc
1125oin (BTC) is the world's first cryptocurrency, launched in 2009 by an anonymous creator using the pseudonym Satoshi Nakamoto. It works as a peer-to-peer electronic payment system without intermediaries, based on blockchain technology. Bitcoin is often called "digital gold" due to its limited supply of 21 million coins.`},sections:[{icon:"globe",title:"The History of Bitcoin: From Whitepaper to Financial Revolution",content:`**October 31, 2008** — Satoshi Nakamoto publishes the whitepaper "Bitcoin: A Peer-to-Peer Electronic Cash System," proposing a payment system without intermediaries.
1126
1127**January 3, 2009** — The "Genesis Block" (Block 0) is mined, the first block in the Bitcoin network, containing the message: "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks."
1128
1129**May 22, 2010** — The first commercial Bitcoin transaction: Laszlo Hanyecz pays 10,000 BTC for two pizzas — now known as "Bitcoin Pizza Day."
1130
1131**2013–2017** — Bitcoin gains mainstream attention, going from a few dollars to nearly $20,000. The first major exchanges and regulations emerge.
1132
1133**2020–2024** — Massive institutional adoption: Tesla, MicroStrategy, and investment funds buy Bitcoin. In January 2024, the SEC approves the first spot Bitcoin ETF in the US, legitimizing Bitcoin as a financial asset.
1134
1135**2025** — Bitcoin surpasses $100,000, traded on global financial markets as a mature asset alongside gold and stocks.`},{icon:"blocks",title:"How Does Bitcoin Work? The Technology Behind It",content:`**Bitcoin Blockchain** — Every Bitcoin transaction is recorded in a public, transparent, and immutable ledger — the blockchain. New blocks are added approximately every 10 minutes.
1136
1137**Peer-to-Peer Network** — There is no bank or central server. Thousands of computers (nodes) worldwide validate and store every transaction independently.
1138
1139**Public and Private Keys** — Every Bitcoin wallet has a public key (receiving address) and a private key (secret password). Whoever holds the private key controls the funds.
1140
1141**Transactions** — When you send Bitcoin, the transaction is broadcast to the network, validated by miners, and permanently added to a new block. Full confirmation takes ~60 minutes (6 blocks).
1142
1143**Limited Supply** — There will only ever be 21 million Bitcoin. This programmed scarcity makes BTC a deflationary asset, similar to gold.`},{icon:"pickaxe",title:"What is Bitcoin Mining?",content:`**Definition** — Mining is the process where powerful computers solve complex mathematical problems to validate transactions and add new blocks to the blockchain.
1144
1145**Proof of Work (PoW)** — Bitcoin uses the Proof of Work mechanism, where miners compete to solve a cryptographic hash. The first to succeed receives the reward.
1146
1147**Block Reward** — Miners receive newly created BTC as a reward. In 2024, the reward is 3.125 BTC per block (after the fourth halving).
1148
1149**Difficulty** — It adjusts automatically every 2,016 blocks (~2 weeks) to maintain a consistent rate of ~10 minutes per block.
1150
1151**Energy Consumption** — Bitcoin mining consumes significant energy, but over 50% comes from renewable sources (2024). The industry is constantly migrating toward green energy.
1152
1153**Mining Pools** — Individual miners join pools to combine computing power and share rewards proportionally.`},{icon:"trending",title:"What is Bitcoin Halving?",content:`**Definition** — Halving is the programmed event where miner rewards are cut in half every 210,000 blocks (~4 years). It reduces the rate of new BTC creation.
1154
1155**Halving History:**
1156- 2012: reward from 50 → 25 BTC
1157- 2016: from 25 → 12.5 BTC
1158- 2020: from 12.5 → 6.25 BTC
1159- 2024: from 6.25 → 3.125 BTC
1160
1161**Price Impact** — Historically, each halving has been followed by significant price increases in 12-18 months, due to reduced new supply with constant or growing demand.
1162
1163**Last Bitcoin** — At the current rate, the last Bitcoin will be mined around the year 2140. After that, miners will be rewarded exclusively from transaction fees.
1164
1165**Stock-to-Flow Model** — A popular model measuring Bitcoin's scarcity compared to gold, suggesting long-term price increases as new supply decreases.`},{icon:"shield",title:"Bitcoin Security and Decentralization",content:`**Indestructible Network** — Bitcoin runs on over 15,000 globally distributed nodes. To compromise the network, an attacker would need over 51% of computing power — practically impossible.
1166
1167**Immutability** — Once confirmed, a transaction cannot be modified or reversed. The Bitcoin blockchain has never been compromised in over 15 years of operation.
1168
1169**True Decentralization** — There is no CEO, headquarters, or off switch. Bitcoin is open-source software, maintained by thousands of volunteer developers worldwide.
1170
1171**Censorship Resistance** — Nobody can block or confiscate your Bitcoin if you hold the private key. It is "money without borders."
1172
1173**Pseudonymity** — Transactions are public, but identities are protected through cryptographic addresses. Not completely anonymous, but offers a high level of privacy.`},{icon:"zap",title:"Bitcoin in Practice: Uses and Ecosystem",content:`**Store of Value** — Bitcoin is compared to digital gold. Companies and nations use it as protection against inflation and fiat currency devaluation.
1174
1175**Lightning Network** — The Layer 2 solution enabling instant, nearly free Bitcoin transactions. Ideal for daily payments and micropayments.
1176
1177**Bitcoin ETFs** — Exchange-traded funds allow traditional investors to access Bitcoin without directly buying cryptocurrency.
1178
1179**Payments and Commerce** — Companies like Microsoft, AT&T, and Overstock accept Bitcoin. El Salvador adopted it as legal tender in 2021.
1180
1181**DeFi on Bitcoin** — Projects like Stacks and Ordinals bring smart contracts and NFTs to the Bitcoin blockchain, extending its functionality.`}],glossary:{title:"Bitcoin Glossary",terms:[{term:"Satoshi",def:"The smallest Bitcoin unit: 1 BTC = 100,000,000 satoshi. Named after Bitcoin's creator."},{term:"Halving",def:"The halving of block rewards every 210,000 blocks (~4 years)."},{term:"Mining",def:"The process of validating transactions and creating new BTC by solving cryptographic problems."},{term:"Wallet",def:"Digital wallet storing private keys needed to access and send Bitcoin."},{term:"UTXO",def:"Unspent Transaction Output — Bitcoin's accounting model where each transaction consumes previous outputs."},{term:"Node",def:"A computer running Bitcoin software and maintaining a complete copy of the blockchain."},{term:"Lightning Network",def:"Layer 2 protocol enabling fast and cheap Bitcoin transactions off the main chain."},{term:"Cold Storage",def:"Offline storage of private keys (hardware wallet, paper wallet) for maximum security."},{term:"Hash Rate",def:"The total computing power of the Bitcoin network, measured in hashes per second."},{term:"Mempool",def:"The waiting area where unconfirmed transactions are stored before being included in a block."}]},faqs:[{q:"What is Bitcoin in simple terms?",a:"Bitcoin (BTC) is the world's first decentralized cryptocurrency, created in 2009. It runs on blockchain without banks or intermediaries, with a maximum supply of 21 million coins."},{q:"Who created Bitcoin?",a:"Bitcoin was created by a person or group under the pseudonym Satoshi Nakamoto. The real identity remains unknown."}
1181,{q:"Is Bitcoin a safe investment?",a:"Bitcoin is a volatile asset. It has grown significantly long-term, but with large short-term fluctuations. Don't invest more than you can afford to lose and do your research."},{q:"How can I buy Bitcoin?",a:"You can buy Bitcoin on exchanges like Binance, Coinbase, or local platforms. You need KYC verification (ID document) and a payment method (bank transfer, card)."},{q:"Why does Bitcoin have value?",a:"Bitcoin has value due to scarcity (max 21 million), network security, decentralization, global adoption, and market trust. Like gold, value comes from consensus and utility."}],cta:{title:"Continue Learning About Bitcoin",description:"Explore our EduWeb Academy courses on cryptocurrency, blockchain, and responsible investing.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is Bitcoin",path:"/what-is-bitcoin"}],relatedTopics:[{label:"What is Blockchain",path:"/what-is-blockchain"},{label:"What is Ethereum",path:"/what-is-ethereum"},{label:"Bitcoin Price Today",path:"/bitcoin-pret-azi"}],courseTopics:["blockchain","web3"]}}},{slugRo:"ce-este-ethereum",slugEn:"what-is-ethereum",content:{ro:{title:"Ce este Ethereum? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este Ethereum? Ghid Complet — Smart Contracts, DeFi & EVM | EduWeb",metaDescription:"Află ce este Ethereum, cum funcționează smart contracts, ce este EVM, DeFi și de ce ETH este a doua cea mai importantă criptomonedă. Ghid complet.",heroClass:"cat-blockchain",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Ethereum?",subheading:"Computerul mondial descentralizat",intro:"Ethereum este o platformă blockchain open-source care permite crearea și rularea de smart contracts și aplicații descentralizate (DApps). Creată de Vitalik Buterin în 2015, Ethereum a revoluționat industria crypto transformând blockchain-ul dintr-un simplu registru de tranzacții într-un computer mondial programabil."},sections:[{icon:"globe",title:"Istoria Ethereum: De la Idee la Computer Mondial",content:`**2013** — Vitalik Buterin, un programator canadiano-rus de 19 ani, publică whitepaper-ul Ethereum, propunând o platformă blockchain programabilă, dincolo de simpla monedă digitală.
1182
1183**2014** — Echipa Ethereum (incluzând Gavin Wood, Charles Hoskinson, Joseph Lubin) organizează un crowdfunding care strânge 18 milioane USD în Bitcoin — unul dintre cele mai mari din istorie la acel moment.
1184
1185**30 iulie 2015** — Rețeaua Ethereum este lansată oficial cu „Frontier". Dezvoltatorii pot crea smart contracts și aplicații descentralizate.
1186
1187**2016** — Incidentul DAO: un hack de 60 milioane USD duce la un hard fork controversat, creând Ethereum (ETH) și Ethereum Classic (ETC).
1188
1189**2020–2021** — Explozia DeFi și NFT transformă Ethereum în centrul inovației financiare. TVL-ul (Total Value Locked) în DeFi depășește 100 miliarde USD.
1190
1191**15 septembrie 2022** — „The Merge": Ethereum trece de la Proof of Work la Proof of Stake, reducând consumul energetic cu 99,95% și schimbând fundamental economia rețelei.`},{icon:"cpu",title:"Cum Funcționează Ethereum? Arhitectura Tehnică",content:`**EVM (Ethereum Virtual Machine)** — „Creierul" Ethereum. Este un calculator virtual distribuit care execută smart contracts pe toate nodurile rețelei simultan. Orice cod scris pentru EVM produce aceleași rezultate pe orice nod.
1192
1193**Smart Contracts** — Programe auto-executabile stocate pe blockchain. Definesc reguli și le aplică automat, fără intermediari. Exemplu: un smart contract poate elibera automat fonduri când anumite condiții sunt îndeplinite.
1194
1195**Gas și Comisioane** — Fiecare operație pe Ethereum costă „gas" (comision), plătit în ETH. Gas-ul previne spam-ul și recompensează validatorii. Prețul variază în funcție de congestionarea rețelei.
1196
1197**Conturi și Adrese** — Ethereum are două tipuri de conturi: conturi utilizator (controlate de chei private) și conturi contract (controlate de codul smart contract-ului).
1198
1199**Solidity** — Limbajul de programare principal pentru smart contracts Ethereum. Similar cu JavaScript, este folosit de milioane de dezvoltatori pentru a construi aplicații descentralizate.
1200
1201**Starea Globală** — Ethereum menține o „stare globală" (world state) care include toate conturile, soldurile și starea tuturor smart contracts — actualizată cu fiecare bloc nou.`},{icon:"coins",title:"ETH: Moneda care Alimentează Ethereum",content:`**Utilitate Multiplă** — ETH nu este doar o monedă digitală. Este „combustibilul" Ethereum, folosit pentru a plăti comisioanele de tranzacție (gas), a participa la staking și a interacționa cu aplicații DeFi.
1202
1203**Staking și Recompense** — După The Merge, deținătorii de ETH pot face staking (blochează minimum 32 ETH) pentru a deveni validatori și a câștiga recompense. Pool-urile de staking permit participarea cu sume mai mici.
1204
1205**EIP-1559 și Token Burn** — Din august 2021, o parte din comisioanele de tranzacție este „arsă" (distrusă permanent), reducând supply-ul circulant. În perioadele de activitate intensă, Ethereum devine deflaționar.
1206
1207**Supply Nelimitat** — Spre deosebire de Bitcoin (21 milioane), Ethereum nu are un supply maxim fix. Totuși, mecanismul de burn face ca rata de inflație netă să fie foarte mică sau chiar negativă.
1208
1209**Dominanța în DeFi** — Peste 60% din totalul valorii blocate (TVL) în protocoale DeFi se află pe Ethereum sau pe rețelele sale Layer 2.`},{icon:"layers",title:"Ecosistemul Ethereum: DeFi, NFT, Layer 2",content:`**DeFi (Finanțe Descentralizate)** — Ethereum găzduiește mii de protocoale DeFi: Uniswap (schimb descentralizat), Aave (împrumuturi), MakerDAO (stablecoin DAI), Lido (staking lichid). Total: peste 50 miliarde USD.
1210
1211**NFT-uri** — Ethereum a inventat standardul ERC-721 pentru NFT-uri. OpenSea, Blur și alte marketplace-uri tranzacționează artă digitală, colecții și active tokenizate.
1212
1213**Layer 2 (Soluții de Scalare)** — Rețele precum Arbitrum, Optimism, Base și zkSync procesează tranzacții off-chain și le securizează pe Ethereum. Comisioane de 10-100x mai mici.
1214
1215**ENS (Ethereum Name Service)** — Domenii blockchain (.eth) care înlocuiesc adresele lungi cu nume ușor de reținut (ex: vitalik.eth).
1216
1217**DAOs** — Organizații Autonome Descentralizate construite pe Ethereum, guvernate democratic de deținătorii de tokenuri. Exemple: Uniswap DAO, Aave DAO.
1218
1219**Account Abstraction (ERC-4337)** — Noua generație de wallet-uri care simplifică experiența: recuperare socială, tranzacții fără gas, autentificare biometrică.`},{icon:"shield",title:"Ethereum Proof of Stake: Cum Funcționează",content:`**The Merge (septembrie 2022)** — Cea mai mare actualizare din istoria blockchain. Ethereum a trecut de la mining (PoW) la staking (PoS), eliminând mineritul și reducând consumul energetic cu 99,95%.
1220
1221**Validatori** — În loc de mineri, Ethereum are validatori care blochează (stake) ETH ca garanție. Pentru a deveni validator solo, ai nevoie de 32 ETH.
1222
1223**Procesul de Validare** — Validatorii sunt aleși aleatoriu pentru a propune blocuri noi. Alți validatori atestează corectitudinea blocului. Validatorii necinstiți pierd o parte din ETH-ul blocat (slashing).
1224
1225**Finalizare** — Tranzacțiile sunt finalizate definitiv la fiecare ~13 minute (2 epoci). Spre deosebire de PoW, finalizarea PoS este deterministă, nu probabilistică.
1226
1227**Liquid Staking** — Protocoale precum Lido și Rocket Pool permit staking fără a bloca 32 ETH. Primești un token lichid (stETH) pe care îl poți folosi în DeFi.`},{icon:"zap",title:"Viitorul Ethereum: Roadmap și Provocări",content:`**Danksharding** — Următoarea etapă majoră de scalare. Va permite Ethereum să proceseze peste 100.000 TPS prin Layer 2, cu costuri minime. Proto-danksharding (EIP-4844) este deja activ.
1228
1229**Verkle Trees** — Vor înlocui structura de date Merkle Patricia, reducând dimensiunea stării și permițând „stateless clients" — noduri care nu trebuie să stocheze toată istoria.
1230
1231**Concurența** — Solana, Avalanche, BNB Chain și alte blockchain-uri concurează pe viteza și costuri. Ethereum pariază pe Layer 2 pentru scalabilitate.
1232
1233**Reglementare** — Clasificarea ETH (commoditate vs security) rămâne dezbătută în SUA. UE prin MiCA oferă mai multă claritate.
1234
1235**Adopție Enterprise** — Bănci (JPMorgan), corporații (Visa, PayPal) și guverne construiesc pe Ethereum sau pe soluțiile sale Layer 2.
1236
1237**Ethereum și AI** — Protocoale de AI descentralizat, verificarea datelor de antrenament pe blockchain și identitate digitală verificabilă sunt direcții emergente.`}],glossary:{title:"Glosar de Termeni Ethereum",terms:[{term:"Smart Contract",def:"Program auto-executabil stocat pe blockchain care se activează când condițiile predefinite sunt îndeplinite."},{term:"EVM",def:"Ethereum Virtual Machine — mașina virtuală care execută codul smart contracts pe toate nodurile rețelei."},{term:"Gas",def:"Unitate de măsură pentru efortul computațional pe Ethereum. Fiecare operație costă un anumit număr de unități de gas."},{term:"Solidity",def:"Limbajul de programare principal pentru smart contracts Ethereum, similar cu JavaScript."},{term:"Staking",def:"Blocarea de ETH ca garanție pentru a participa la validarea tranzacțiilor și a primi recompense."},{term:"Layer 2",def:"Rețele construite deasupra Ethereum pentru tranzacții mai rapide și mai ieftine (Arbitrum, Optimism, Base)."},{term:"ERC-20",def:"Standard pentru tokenuri fungibile pe Ethereum. Cele mai multe criptomonede pe Ethereum folosesc acest standard."},{term:"ERC-721",def:"Standard pentru NFT-uri pe Ethereum — tokenuri unice, ne-interschimbabile."},{term:"Wei",def:"Cea mai mică unitate ETH: 1 ETH = 10^18 Wei. Similar cu satoshi pentru Bitcoin."},{term:"The Merge",def:"Trecerea Ethereum de la Proof of Work la Proof of Stake în septembrie 2022."}]},faqs:[{q:"Ce este Ethereum pe scurt?",a:"Ethereum este o platformă blockchain programabilă care permite crearea de smart contracts și aplicații descentralizate. ETH este moneda sa nativă, a doua cea mai valoroasă criptomonedă."},{q:"Care este diferența dintre Bitcoin și Ethereum?",a:"Bitcoin este în principal o monedă digitală (rezervă de valoare), Ethereum este o platformă programabilă. Bitcoin = aur digital, Ethereum = computer mondial descentralizat."},{q:"Ce sunt gas fees pe Ethereum?",a:"Gas fees sunt comisioanele plătite în ETH pentru a procesa tranzacții pe rețea. Variază în funcție de congestionarea rețelei. Soluțiile Layer 2 oferă comisioane mult mai mici."},{q:"Pot face bani din staking Ethereum?",a:"Da, staking-ul ETH generează recompense de ~3-5% APR. Poți face staking solo (32 ETH minim) sau prin pool-uri/protocoale de staking lichid cu sume mai mici."},{q:"Este Ethereum ecologic?",a:"Da, după The Merge (2022), Ethereum consumă cu 99,95% mai puțină energie decât înainte. Este acum unul dintre cele mai ecologice blockchain-uri majore."}],cta:{title:"Continuă să înveți despre Ethereum",description:"Explorează cursurile noastre din EduWeb Academy despre smart contracts, DeFi și ecosistemul Ethereum.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este Ethereum",path:"/ce-este-ethereum"}],relatedTopics:[{label:"Ce este Bitcoin",path:"/ce-este-bitcoin"},{label:"Ce este Blockchain",path:"/ce-este-blockchain"},{label:"Preț Ethereum Azi",path:"/ethereum-pret-ron"}],courseTopics:["blockchain","web3"]},en:{title:"What is Ethereum? Complete Beginner's Guide (2025)",metaTitle:"What is Ethereum? Complete Guide — Smart Contracts, DeFi & EVM | EduWeb",metaDescription:"Learn what Ethereum is, how smart contracts work, what EVM and DeFi are, and why ETH 
1237is the second most important cryptocurrency. Complete guide.",heroClass:"cat-blockchain",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Ethereum?",subheading:"The decentralized world computer",intro:"Ethereum is an open-source blockchain platform that enables the creation and execution of smart contracts and decentralized applications (DApps). Created by Vitalik Buterin in 2015, Ethereum revolutionized the crypto industry by transforming blockchain from a simple transaction ledger into a programmable world computer."},sections:[{icon:"globe",title:"The History of Ethereum",content:`**2013** — Vitalik Buterin, a 19-year-old Canadian-Russian programmer, publishes the Ethereum whitepaper, proposing a programmable blockchain platform beyond simple digital currency.
1238
1239**2014** — The Ethereum team organizes a crowdfunding raising $18 million in Bitcoin.
1240
1241**July 30, 2015** — The Ethereum network officially launches with "Frontier."
1242
1243**2016** — The DAO hack: a $60 million exploit leads to a controversial hard fork, creating Ethereum (ETH) and Ethereum Classic (ETC).
1244
1245**2020–2021** — The DeFi and NFT explosion transforms Ethereum into the center of financial innovation.
1246
1247**September 15, 2022** — "The Merge": Ethereum switches from Proof of Work to Proof of Stake, reducing energy consumption by 99.95%.`},{icon:"cpu",title:"How Ethereum Works: Technical Architecture",content:`**EVM (Ethereum Virtual Machine)** — The "brain" of Ethereum. A distributed virtual computer that executes smart contracts on all nodes simultaneously.
1248
1249**Smart Contracts** — Self-executing programs stored on blockchain. They define rules and enforce them automatically, without intermediaries.
1250
1251**Gas and Fees** — Every operation on Ethereum costs "gas" (fee), paid in ETH. Gas prevents spam and rewards validators.
1252
1253**Solidity** — The main programming language for Ethereum smart contracts, similar to JavaScript.
1254
1255**Global State** — Ethereum maintains a "world state" that includes all accounts, balances, and the state of all smart contracts — updated with each new block.`},{icon:"coins",title:"ETH: The Currency Powering Ethereum",content:`**Multiple Utility** — ETH is not just a digital currency. It's the "fuel" of Ethereum, used to pay transaction fees (gas), participate in staking, and interact with DeFi apps.
1256
1257**Staking and Rewards** — After The Merge, ETH holders can stake (lock minimum 32 ETH) to become validators and earn rewards.
1258
1259**EIP-1559 and Token Burn** — Since August 2021, part of transaction fees is "burned" (permanently destroyed), reducing circulating supply.
1260
1261**DeFi Dominance** — Over 60% of total value locked (TVL) in DeFi protocols is on Ethereum or its Layer 2 networks.`},{icon:"layers",title:"The Ethereum Ecosystem: DeFi, NFTs, Layer 2",content:`**DeFi** — Ethereum hosts thousands of DeFi protocols: Uniswap, Aave, MakerDAO, Lido.
1262
1263**NFTs** — Ethereum invented the ERC-721 standard for NFTs.
1264
1265**Layer 2** — Networks like Arbitrum, Optimism, Base process transactions off-chain and secure them on Ethereum. 10-100x lower fees.
1266
1267**ENS** — Blockchain domains (.eth) replacing long addresses with memorable names.
1268
1269**DAOs** — Decentralized Autonomous Organizations governed by token holders.
1270
1271**Account Abstraction (ERC-4337)** — Next-gen wallets: social recovery, gasless transactions, biometric auth.`},{icon:"shield",title:"Ethereum Proof of Stake",content:`**The Merge (September 2022)** — The biggest blockchain upgrade in history. Ethereum switched from mining (PoW) to staking (PoS).
1272
1273**Validators** — Instead of miners, Ethereum has validators who stake ETH as collateral. Solo validation requires 32 ETH.
1274
1275**Finalization** — Transactions are definitively finalized every ~13 minutes.
1276
1277**Liquid Staking** — Protocols like Lido allow staking without locking 32 ETH.`},{icon:"zap",title:"The Future of Ethereum",content:`**Danksharding** — Next major scaling upgrade enabling 100,000+ TPS via Layer 2.
1278
1279**Verkle Trees** — Will replace Merkle Patricia trees, enabling stateless clients.
1280
1281**Competition** — Solana, Avalanche, BNB Chain compete on speed and costs.
1282
1283**Enterprise Adoption** — Banks, corporations, and governments building on Ethereum.
1284
1285**Ethereum and AI** — Decentralized AI protocols and verifiable digital identity are emerging directions.`}],glossary:{title:"Ethereum Glossary",terms:[{term:"Smart Contract",def:"Self-executing program stored on blockchain that activates when predefined conditions are met."},{term:"EVM",def:"Ethereum Virtual Machine — executes smart contract code on all network nodes."},{term:"Gas",def:"Unit measuring computational effort on Ethereum. Each operation costs gas units."},{term:"Solidity",def:"Main programming language for Ethereum smart contracts."},{term:"Staking",def:"Locking ETH as collateral to validate transactions and earn rewards."},{term:"Layer 2",def:"Networks built on top of Ethereum for faster, cheaper transactions."},{term:"ERC-20",def:"Standard for fungible tokens on Ethereum."},{term:"ERC-721",def:"Standard for NFTs on Ethereum."},{term:"Wei",def:"Smallest ETH unit: 1 ETH = 10^18 Wei."},{term:"The Merge",def:"Ethereum's switch from Proof of Work to Proof of Stake in September 2022."}]},faqs:[{q:"What is Ethereum in simple terms?",a:"Ethereum is a programmable blockchain platform for smart contracts and decentralized applications. ETH is its native currency, the second most valuable cryptocurrency."},{q:"What is the difference between Bitcoin and Ethereum?",a:"Bitcoin is primarily a digital currency (store of value), Ethereum is a programmable platform. Bitcoin = digital gold, Ethereum = decentralized world computer."},{q:"What are gas fees?",a:"Gas fees are commissions paid in ETH to process transactions. They vary with network congestion. Layer 2 solutions offer much lower fees."},{q:"Can I earn from staking Ethereum?",a:"Yes, ETH staking generates ~3-5% APR rewards. You can stake solo (32 ETH min) or through liquid staking protocols with smaller amounts."},{q:"Is Ethereum eco-friendly?",a:"Yes, after The Merge (2022), Ethereum consumes 99.95% less energy. It's now one of the most eco-friendly major blockchains."}],cta:{title:"Continue Learning About Ethereum",description:"Explore our EduWeb Academy courses on smart contracts, DeFi, and the Ethereum ecosystem.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is Ethereum",path:"/what-is-ethereum"}],relatedTopics:[{label:"What is Bitcoin",path:"/what-is-bitcoin"},{label:"What is Blockchain",path:"/what-is-blockchain"},{label:"Ethereum Price Today",path:"/ethereum-pret-ron"}],courseTopics:["blockchain","web3"]}}},{slugRo:"ce-este-solana",slugEn:"what-is-solana",content:{ro:{title:"Ce este Solana? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este Solana? Ghid Complet — Proof of History, Viteza & Ecosistem | EduWeb",metaDescription:"Află ce este Solana, cum funcționează Proof of History, de ce este cel mai rapid blockchain și cum arată ecosistemul DeFi, NFT și meme coins pe Solana.",heroClass:"cat-blockchain",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Solana?",subheading:"Blockchain-ul ultra-rapid pentru aplicații la scară",intro:"Solana este o platformă blockchain de înaltă performanță, concepută pentru viteza și scalabilitate. Lansată în 2020 de Anatoly Yakovenko, Solana poate procesa mii de tranzacții pe secundă cu costuri minime, datorită inovației s
1285ale principale: Proof of History (PoH)."},sections:[{icon:"rocket",title:"Istoria și Viziunea Solana",content:`**2017** — Anatoly Yakovenko, fost inginer la Qualcomm, publică whitepaper-ul Solana, propunând Proof of History ca soluție la problema sincronizării în rețelele distribuite.
1286
1287**2020** — Solana Labs lansează mainnet-ul beta. Proiectul atrage atenția prin promisiunea de 65.000 TPS și comisioane sub $0.01.
1288
1289**2021** — Ecosistemul Solana explodează: DeFi, NFT-uri (Magic Eden, Tensor), și proiecte gaming. SOL atinge un maxim de ~$260.
1290
1291**2022** — Solana traversează o perioadă dificilă: mai multe opriri ale rețelei și prăbușirea FTX (investitor major) afectează încrederea.
1292
1293**2023–2024** — Revenire puternică: Solana devine lider în meme coins, Saga phone, token extensions și plăți mobile. Fiabilitatea rețelei se îmbunătățește dramatic.
1294
1295**2025** — Solana se impune ca principalul concurent al Ethereum, cu un ecosistem diversificat și adopție în creștere.`},{icon:"gauge",title:"Proof of History: Secretul Vitezei Solana",content:`**Ce este PoH?** — Proof of History este o funcție criptografică care creează un registru verificabil al timpului. Fiecare eveniment primește un timestamp criptografic unic, permițând nodurilor să cadă de acord asupra ordinii evenimentelor fără comunicare suplimentară.
1296
1297**Cum funcționează?** — PoH folosește un SHA-256 secvențial continuu. Fiecare output devine input-ul următoarei operații, creând o „ceas" criptografic verificabil.
1298
1299**De ce contează?** — În blockchain-urile tradiționale, nodurile pierd timp coordonându-se pentru a cădea de acord asupra ordinii tranzacțiilor. PoH elimină această latență.
1300
1301**Combinat cu PoS** — Solana folosește PoH alături de Proof of Stake. PoH oferă ordinea temporală, PoS oferă securitatea și consensul.
1302
1303**Rezultatul** — Blocuri la fiecare ~400ms (vs 12s pe Ethereum), comisioane de ~$0.00025 per tranzacție, capacitate de peste 4.000 TPS în condiții reale.`},{icon:"layers",title:"Arhitectura Tehnică Solana",content:`**Tower BFT** — Versiunea Solana a algoritmului Byzantine Fault Tolerance, optimizată cu PoH pentru consens rapid fără mai multe runde de comunicare.
1304
1305**Gulf Stream** — Protocolul de propagare a tranzacțiilor care elimină mempool-ul tradițional. Tranzacțiile sunt trimise direct validatorilor desemnați.
1306
1307**Sealevel** — Motorul de execuție paralelă care procesează mii de smart contracts simultan, folosind toate core-urile CPU disponibile.
1308
1309**Turbine** — Protocol de propagare a blocurilor care fragmentează datele în pachete mici, reducând cerințele de bandwidth.
1310
1311**Pipeline** — Procesul de validare este organizat ca o linie de asamblare: colectare date → semnare → propagare, fiecare etapă pe hardware dedicat.
1312
1313**Cloudbreak** — Baza de date optimizată pentru citiri/scrieri concurente, esențială pentru performanța la scară mare.`},{icon:"coins",title:"Ecosistemul Solana: DeFi, NFT, Meme Coins",content:`**DeFi pe Solana** — Jupiter (DEX aggregator), Raydium, Orca (DEX-uri), Marinade (liquid staking), Kamino (lending). TVL peste 5 miliarde USD.
1314
1315**NFT-uri** — Tensor și Magic Eden sunt marketplace-urile principale. Standardele cNFT (compressed NFTs) permit mintarea a milioane de NFT
1315-uri la costuri minimale.
1316
1317**Meme Coins** — Solana a devenit „casa" meme coins-urilor în 2024: BONK, WIF, PEPE Solana. Platforma pump.fun a facilitat lansarea a mii de tokenuri.
1318
1319**Gaming** — Star Atlas, Aurory și alte jocuri blockchain folosesc Solana pentru tranzacții rapide in-game.
1320
1321**Plăți și Fintech** — Solana Pay permite comercianților să accepte plăți crypto instant și gratuit. Visa testează decontări USDC pe Solana.
1322
1323**Mobile** — Saga Phone și dApp Store aduc Web3 pe dispozitive mobile cu o experiență nativă.`},{icon:"shield",title:"Securitate, Descentralizare și Provocări",content:`**Validatori** — Solana are peste 1.500 de validatori activi, distribuiți global. Staking-ul necesită SOL ca garanție.
1324
1325**Opriri ale Rețelei** — Solana a avut mai multe opriri (outages) în 2021-2022, cauzate de congestionare. Actualizările din 2023-2024 (QUIC, stake-weighted QoS) au rezolvat majoritatea problemelor.
1326
1327**Dezbateri despre Descentralizare** — Cerințele hardware ridicate pentru validatori (comparativ cu Ethereum) ridică întrebări despre gradul de descentralizare.
1328
1329**Firedancer** — Clientul independent dezvoltat de Jump Crypto, care va dubla reziliența rețelei prin diversificarea software-ului de validare.
1330
1331**Securitatea Smart Contracts** — Solana folosește limbajul Rust pentru smart contracts (programele Solana), care oferă protecții de memorie superioare față de Solidity.`},{icon:"zap",title:"Viitorul Solana",content:`**Firedancer** — Al doilea client de validare, dezvoltat de Jump Crypto, va crește dramatic capacitatea și reziliența rețelei.
1332
1333**Token Extensions** — Funcționalități native avansate: confidențialitate, transfer hooks, metadata on-chain, royalties forțate.
1334
1335**Solana Actions & Blinks** — Permit interacțiuni blockchain direct din link-uri URL, social media și orice site web.
1336
1337**Adopție Instituțională** — Visa, PayPal, Shopify și Stripe integrează Solana pentru plăți și decontări.
1338
1339**Competiția cu Ethereum** — Solana se poziționează ca alternativă rapidă și ieftină, în timp ce Ethereum se bazează pe Layer 2 pentru scalare. Ambele abordări au avantaje.`}],glossary:{title:"Glosar de Termeni Solana",terms:[{term:"Proof of History",def:"Funcție criptografică care creează un registru verificabil al timpului, permițând ordonarea eficientă a tranzacțiilor."},{term:"SOL",def:"Token-ul nativ al rețelei Solana, folosit pentru comisioane, staking și governance."},{term:"Validator",def:"Nod care procesează tranzacții și menține securitatea rețelei prin staking SOL."},{term:"Program",def:"Echivalentul smart contract-ului pe Solana. Scris în Rust sau C."},{term:"Sealevel",def:"Motorul de execuție paralelă care procesează mii de tranzacții simultan pe Solana."},{term:"Rent",def:"Costul stocării datelor pe blockchain-ul Solana. Fondurile pot fi recuperate când datele sunt șterse."},{term:"SPL Token",def:"Standardul de tokenuri pe Solana, echivalentul ERC-20 de pe Ethereum."},{term:"cNFT",def:"Compressed NFT — NFT-uri comprimate care costă de 1000x mai puțin de mintat decât cele standard."},{term:"Epoch",def:"Perioadă de ~2-3 zile în care setul de validatori este fix. Recompensele sunt distribuite la finalul fiecărei epoci."},{term:"Firedancer",def:"Client de validare independent dezvoltat de Jump Crypto pentru a crește reziliența rețelei Solana."}]},faqs:[{q:"Ce este Solana pe scurt?",a:"Solana este un blockchain de înaltă performanță care procesează mii de tranzacții pe secundă cu comisioane sub $0.01, folosind inovația Proof of History."},{q:"Este Solana mai bun decât Ethereum?",a:"Solana este mai rapid și mai ieftin, dar Ethereum are un ecosistem mai mare și mai descentralizat. Ambele au avantaje diferite — nu este o competiție simplă."},{q:"De ce a avut Solana opriri de rețea?",a:"Congestionarea extremă și bug
1339-uri software au cauzat opriri în 2021-2022. Actualizările din 2023-2024 au îmbunătățit semnificativ stabilitatea."},{q:"Cum pot cumpăra SOL?",a:"SOL se poate cumpăra pe Binance, Coinbase, Kraken și alte exchange-uri majore cu transfer bancar sau card."},{q:"Ce pot face pe Solana?",a:"Poți tranzacționa DeFi (Jupiter, Raydium), colecta NFT-uri (Tensor), face staking, juca jocuri blockchain sau trimite plăți instant cu Solana Pay."}],cta:{title:"Continuă să înveți despre Solana",description:"Explorează cursurile din EduWeb Academy despre blockchain de înaltă performanță, DeFi și ecosistemul Solana.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este Solana",path:"/ce-este-solana"}],relatedTopics:[{label:"Ce este Ethereum",path:"/ce-este-ethereum"},{label:"Ce este Blockchain",path:"/ce-este-blockchain"},{label:"Preț Solana Azi",path:"/solana-pret-azi"}],courseTopics:["blockchain","web3"]},en:{title:"What is Solana? Complete Beginner's Guide (2025)",metaTitle:"What is Solana? Complete Guide — Proof of History, Speed & Ecosystem | EduWeb",metaDescription:"Learn what Solana is, how Proof of History works, why it's the fastest blockchain, and explore its DeFi, NFT and meme coin ecosystem.",heroClass:"cat-blockchain",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Solana?",subheading:"The ultra-fast blockchain for applications at scale",intro:"Solana is a high-performance blockchain platform designed for speed and scalability. Launched in 2020 by Anatoly Yakovenko, Solana can process thousands of transactions per second with minimal costs, thanks to its main innovation: Proof of History (PoH)."},sections:[{icon:"rocket",title:"The History and Vision of Solana",content:`**2017** — Anatoly Yakovenko, former Qualcomm engineer, publishes the Solana whitepaper.
1340
1341**2020** — Solana Labs launches the beta mainnet.
1342
1343**2021** — The Solana ecosystem explodes: DeFi, NFTs, gaming. SOL reaches ~$260.
1344
1345**2022** — Network outages and FTX collapse impact confidence.
1346
1347**2023–2024** — Strong comeback: Solana leads in meme coins, mobile crypto, and payments.
1348
1349**2025** — Solana establishes itself as Ethereum's main competitor.`},{icon:"gauge",title:"Proof of History: Solana's Speed Secret",content:`**What is PoH?** — A cryptographic function creating a verifiable time record. Each event gets a unique cryptographic timestamp.
1350
1351**How it works** — PoH uses sequential SHA-256. Each output becomes the next input, creating a verifiable cryptographic "clock."
1352
1353**Combined with PoS** — Solana uses PoH alongside Proof of Stake for security and consensus.
1354
1355**Result** — Blocks every ~400ms, fees of ~$0.00025, over 4,000 real-world TPS.`},{icon:"layers",title:"Solana Technical Architecture",content:`**Tower BFT** — Solana's optimized Byzantine Fault Tolerance algorithm.
1356
1357**Gulf Stream** — Transaction forwarding protocol eliminating the traditional mempool.
1358
1359**Sealevel** — Parallel execution engine processing thousands of smart contracts simultaneously.
1360
1361**Turbine** — Block propagation protocol fragmenting data into small packets.
1362
1363**Pipeline** — Validation organized as an assembly line.
1364
1365**Cloudbreak** — Database optimized for concurrent reads/writes.`},{icon:"coins",title:"The Solana Ecosystem",content:`**DeFi** — Jupiter, Raydium, Orca, Marinade, Kamino. Over $5B TVL.
1366
1367**NFTs** — Tensor and Magic Eden. Compressed NFTs (cNFTs) enable millions of mints at minimal cost.
1368
1369**Meme Coins** — BONK, WIF, and thousands more via pump.fun.
1370
1371**Gaming** — Star Atlas, Aurory.
1372
1373**Payments** — Solana Pay for instant merchant payments. Visa tests USDC settlements.
1374
1375**Mobile** — Saga Phone and dApp Store.`},{icon:"shield",title:"Security and Challenges",content:`**Validators** — Over 1,500 active validators globally.
1376
1377**Network Outages** — Improved significantly with 2023-2024 updates.
1378
1379**Decentralization Debates** — High hardware requirements raise questions.
1380
1381**Firedancer** — Independent validator client by Jump Crypto.
1382
1383**Smart Contract Security** — Rust programming offers superior memory safety.`},{icon:"zap",title:"The Future of Solana",content:`**Firedancer** — Second validator client for increased capacity.
1384
1385**Token Extensions** — Advanced native features: privacy, transfer hooks, on-chain metadata.
1386
1387**Solana Actions & Blinks** — Blockchain interactions from URLs and social media.
1388
1389**Institutional Adoption** — Visa, PayPal, Shopify, Stripe integrations.
1390
1391**Competition** — Solana as fast/cheap alternative vs Ethereum's Layer 2 approach.`}],glossary:{title:"Solana Glossary",terms:[{term:"Proof of History",def:"Cryptographic function creating a verifiable time record for efficient transaction ordering."},{term:"SOL",def:"Solana's native token for fees, staking, and governance."}
1391,{term:"Validator",def:"Node processing transactions and maintaining network security."},{term:"Program",def:"Solana's equivalent of a smart contract, written in Rust or C."},{term:"Sealevel",def:"Parallel execution engine on Solana."},{term:"SPL Token",def:"Solana token standard, equivalent to ERC-20."},{term:"cNFT",def:"Compressed NFTs, 1000x cheaper to mint."},{term:"Epoch",def:"~2-3 day period with fixed validator set."},{term:"Firedancer",def:"Independent validator client by Jump Crypto."},{term:"Rent",def:"Cost of storing data on Solana, recoverable when data is deleted."}]},faqs:[{q:"What is Solana?",a:"Solana is a high-performance blockchain processing thousands of TPS with fees under $0.01, using Proof of History."},{q:"Is Solana better than Ethereum?",a:"Solana is faster and cheaper, but Ethereum has a larger, more decentralized ecosystem. Both have different advantages."},{q:"Why did Solana have outages?",a:"Extreme congestion and software bugs caused outages in 2021-2022. Updates in 2023-2024 significantly improved stability."},{q:"How do I buy SOL?",a:"SOL can be bought on Binance, Coinbase, Kraken with bank transfer or card."},{q:"What can I do on Solana?",a:"Trade DeFi (Jupiter), collect NFTs (Tensor), stake, play blockchain games, or send instant payments."}],cta:{title:"Continue Learning About Solana",description:"Explore EduWeb Academy courses on high-performance blockchain and the Solana ecosystem.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is Solana",path:"/what-is-solana"}],relatedTopics:[{label:"What is Ethereum",path:"/what-is-ethereum"},{label:"What is Blockchain",path:"/what-is-blockchain"},{label:"Solana Price Today",path:"/solana-pret-azi"}],courseTopics:["blockchain","web3"]}}},{slugRo:"ce-este-bnb",slugEn:"what-is-bnb",content:{ro:{title:"Ce este BNB? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este BNB (Binance Coin)? Ghid Complet — Ecosistem, BNB Chain & Utilizări | EduWeb",metaDescription:"Află ce este BNB, cum funcționează BNB Chain, la ce se folosește token-ul Binance și ce oportunități oferă ecosistemul Binance.",heroClass:"cat-blockchain",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este BNB?",subheading:"Token-ul care alimentează cel mai mare ecosistem crypto",intro:"BNB (inițial Binance C
1391oin) este token-ul nativ al ecosistemului Binance, cel mai mare exchange de criptomonede din lume. Lansat în 2017, BNB a evoluat de la un simplu token de reducere a comisioanelor într-un activ central al unei întregi infrastructuri blockchain — BNB Chain."},sections:[{icon:"globe",title:"Istoria BNB: De la Token de Exchange la Ecosistem Complet",content:`**2017** — Binance lansează BNB ca token ERC-20 pe Ethereum prin ICO, strângând 15 milioane USD. Scopul inițial: reduceri de comisioane pe exchange.
1392
1393**2019** — BNB migrează pe propriul blockchain — Binance Chain, optimizat pentru tranzacționare rapidă.
1394
1395**2020** — Lansarea Binance Smart Chain (BSC), un blockchain compatibil EVM care devine rapid o alternativă ieftină la Ethereum.
1396
1397**2022** — BSC se rebranduiește ca BNB Chain (Build and Build). Ecosistemul depășește 1.000 de DApps active.
1398
1399**2023–2024** — În ciuda problemelor legale ale Binance (amenda de 4.3 miliarde USD în SUA), BNB rămâne în top 5 criptomonede.
1400
1401**2025** — BNB Chain se concentrează pe adopția AI, opBNB (Layer 2) și BNB Greenfield (stocare descentralizată).`},{icon:"blocks",title:"Cum Funcționează BNB Chain?",content:`**Dual Chain** — BNB Chain operează pe două straturi: BNB Beacon Chain (governance, staking) și BNB Smart Chain (smart contracts, DApps).
1402
1403**Compatibilitate EVM** — BNB Smart Chain este compatibilă cu Ethereum Virtual Machine, permițând dezvoltatorilor să porteze ușor aplicațiile de pe Ethereum.
1404
1405**Proof of Staked Authority (PoSA)** — Combină Proof of Stake cu Proof of Authority. 21 de validatori activi sunt aleși prin staking și vot, oferind tranzacții rapide (~3 secunde per bloc).
1406
1407**opBNB** — Soluție Layer 2 bazată pe Optimistic Rollups care reduce și mai mult comisioanele (sub $0.001).
1408
1409**BNB Greenfield** — Infrastructură de stocare descentralizată care permite gestionarea datelor pe blockchain cu acces programabil.`},{icon:"coins",title:"La Ce Se Folosește BNB?",content:`**Comisioane pe Binance** — Plata comisioanelor de tranzacționare cu BNB oferă reduceri de până la 25% pe cel mai mare exchange din lume.
1410
1411**Gas pe BNB Chain** — BNB este folosit pentru plata comisioanelor de tranzacție pe BNB Smart Chain și opBNB.
1412
1413**Launchpad** — Binance Launchpad folosește BNB pentru participarea la vânzările de tokenuri noi (IEO-uri).
1414
1415**Staking** — Deținătorii de BNB pot face staking pentru a câștiga recompense și a participa la governance-ul rețelei.
1416
1417**Plăți** — BNB este acceptat de milioane de comercianți prin Binance Pay și parteneriatele cu procesatori de plăți.
1418
1419**Token Burn** — Binance face burn trimestrial, reducând supply-ul total de la 200 milioane la un target de 100 milioane BNB.`},{icon:"layers",title:"Ecosistemul BNB Chain",content:`**PancakeSwap** — Cel mai mare DEX de pe BNB Chain, cu swap-uri, farming și loterie. Peste 2 miliarde USD TVL.
1420
1421**Venus** — Protocol de lending/borrowing similar cu Aave, nativ pe BNB Chain.
1422
1423**NFT-uri** — Marketplace-uri precum Element și Rareboard oferă NFT-uri cu costuri minime de mintare.
1424
1425**Gaming** — Jocuri blockchain precum Mobox și ERA7 funcționează pe BNB Chain.
1426
1427**Stablecoins** — BUSD (depreciat), dar USDT și USDC sunt larg disponibile pe BNB Chain.
1428
1429**AI și Date** — BNB Greenfield și proiecte AI integrează stocare descentralizată și compute.`},{icon:"scale",title:"Centralizare vs. Descentralizare: Dezbaterea BNB",content:`**Avantaje ale Modelului** — Tranzacții rapide, comisioane mici, suport puternic din partea Binance, ecosistem bogat, ușor de folosit pentru începători.
1430
1431**Critici** — Doar 21 de validatori activi (vs mii pe Ethereum), influența mare a Binance asupra rețelei, risc de reglementare concentrat.
1432
1433**Comparație cu Ethereum** — Ethereum este mai descentralizat dar mai scump. BNB Chain este mai rapid și mai ieftin dar mai centralizat. Fiecare are publicul său țintă.
1434
1435**Riscul Regulatory** — Binance a plătit 4.3 miliarde USD amendă în SUA. Impactul asupra BNB a fost limitat, dar riscul rămâne.
1436
1437**Tendința** — BNB Chain lucrează la creșterea numărului de validatori și la descentralizarea progresivă a infrastru
1437cturii.`},{icon:"zap",title:"Viitorul BNB și BNB Chain",content:`**opBNB** — Layer 2 Optimistic Rollup pentru scalabilitate extremă.
1438
1439**BNB Greenfield** — Stocare descentralizată cu acces programabil din smart contracts.
1440
1441**AI Integration** — Binance investește masiv în AI, de la trading bots la analiza datelor on-chain.
1442
1443**Adopție Globală** — Binance Pay, card crypto Binance și parteneriate cu comercianți globali.
1444
1445**Token Economics** — Burn-ul trimestrial continuă până la atingerea target-ului de 100 milioane BNB, crescând teoretic valoarea pe termen lung.`}],glossary:{title:"Glosar de Termeni BNB",terms:[{term:"BNB Chain",def:"Ecosistemul blockchain al Binance, format din BNB Beacon Chain și BNB Smart Chain."},{term:"PoSA",def:"Proof of Staked Authority — mecanismul de consens al BNB Chain, cu 21 de validatori activi."},{term:"Token Burn",def:"Distrugerea permanentă de tokenuri BNB pentru a reduce supply-ul total."},{term:"Launchpad",def:"Platforma Binance pentru lansarea și vânzarea de noi tokenuri (IEO)."},{term:"opBNB",def:"Soluția Layer 2 a BNB Chain bazată pe Optimistic Rollups."},{term:"BNB Greenfield",def:"Infrastructură de stocare descentralizată în ecosistemul BNB."},{term:"BEP-20",def:"Standard de token pe BNB Smart Chain, echivalent cu ERC-20."},{term:"PancakeSwap",def:"Cel mai mare exchange descentralizat (DEX) de pe BNB Chain."},{term:"Binance Pay",def:"Sistem de plăți crypto al Binance pentru transferuri și comerț."},{term:"EVM Compatible",def:"Capacitatea BNB Chain de a rula aplicații dezvoltate pentru Ethereum."}]},faqs:[{q:"Ce este BNB pe scurt?",a:"BNB este token-ul nativ al ecosistemului Binance, folosit pentru comisioane, staking, plăți și gas pe BNB Chain."},{q:"BNB este centralizat?",a:"BNB Chain este mai centralizat decât Ethereum (21 validatori vs mii), dar oferă tranzacții rapide și ieftine. Gradul de descentralizare crește treptat."},{q:"Ce se întâmplă cu BNB-ul ars (burned)?",a:"BNB-ul ars este distrus permanent, reducând supply-ul total. Binance face burn trimestrial până la target-ul de 100 milioane BNB."},{q:"Cum pot cumpăra BNB?",a:"BNB se cumpără cel mai ușor pe Binance, dar și pe alte exchange-uri majore. Transfer bancar sau card."},{q:"Este BNB o investiție bună?",a:"BNB beneficiază de succesul Binance și al BNB Chain, dar este legat de o companie centralizată. Fă cercetare proprie înainte de a investi."}],cta:{title:"Continuă să înveți despre BNB",description:"Explorează cursurile din EduWeb Academy despre ecosistemul Binance, DeFi și tranzacționare.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este BNB",path:"/ce-este-bnb"}],relatedTopics:[{label:"Ce este Ethereum",path:"/ce-este-ethereum"},{label:"Ce este Bitcoin",path:"/ce-este-bitcoin"},{label:"Preț BNB Azi",path:"/bnb-pret-azi"}],courseTopics:["blockchain","web3"]},en:{title:"What is BNB? Complete Beginner's Guide (2025)",metaTitle:"What is BNB (Binance Coin)? Complete Guide — Ecosystem, BNB Chain & Uses | EduWeb",metaDescription:"Learn what BNB is, how BNB Chain works, what the Binance token is used for, and the opportunities in the Binance ecosystem.",heroClass:"cat-blockchain",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is BNB?",subheading:"The token powering the largest crypto ecosystem",intro:"BNB (originally Binance Coin) is the native token of the Binance ecosystem, the world's largest cryptocurrency exchange. Launched in 2017, BNB evolved from a simple fee discount token into a central asset of an entire blockchain infrastructure — BNB Chain."},sections:[{icon:"globe",title:"The History of BNB",content:`**2017** — Binance launches BNB via ICO, raising $15M. Initial purpose: fee discounts.
1446
1447**2019** — BNB migrates to its own blockchain — Binance Chain.
1448
1449**2020** — Binance Smart Chain launches as a cheap Ethereum alternative.
1450
1451**2022** — Rebranded to BNB Chain. Ecosystem exceeds 1,000 active DApps.
1452
1453**2023–2024** — Despite Binance legal issues ($4.3B fine), BNB stays top 5.
1454
1455**2025** — Focus on AI, opBNB (L2), and BNB Greenfield.`},{icon:"blocks",title:"How BNB Chain Works",content:`**Dual Chain** — BNB Beacon Chain (governance) + BNB Smart Chain (smart contracts).
1456
1457**EVM Compatible** — Easy to port Ethereum applications.
1458
1459**PoSA** — 21 active validators, ~3s block time.
1460
1461**opBNB** — Layer 2 with fees under $0.001.
1462
1463**BNB Greenfield** — Decentralized storage infrastructure.`},{icon:"coins",title:"What is BNB Used For?",content:`**Exchange Fees** — Up to 25% discount on Binance.
1464
1465**Gas** — Transaction fees on BNB Chain.
1466
1467**Launchpad** — Participate in new token sales.
1468
1469**Staking** — Earn rewards and governance.
1470
1471**Payments** — Binance Pay and merchant partners.
1472
1473**Token Burn** — Quarterly burns targeting 100M total supply.`},{icon:"layers",title:"BNB Chain Ecosystem",content:`**PancakeSwap** — Largest DEX on BNB Chain, $2B+ TVL.
1474
1475**Venus** — Lending/borrowing protocol.
1476
1477**NFTs** — Low-cost minting on Element, Rareboard.
1478
1479**Gaming** — Mobox, ERA7.
1480
1481**Stablecoins** — USDT and USDC widely available.
1482
1483**AI** — BNB Greenfield and AI compute integration.`},{icon:"scale",title:"Centralization vs Decentralization",content:`**Advantages** — Fast, cheap, great UX, strong Binance support.
1484
1485**Criticism** — Only 21 validators, significant Binance influence.
1486
1487**vs Ethereum** — More centralized but cheaper and faster.
1488
1489**Regulatory Risk** — Binance paid $4.3B fine in the US.
1490
1491**Trend** — BNB Chain working on increasing validator count.`},{icon:"zap",title:"The Future of BNB",content:`**opBNB** — L2 for extreme scalability.
1492
1493**Greenfield** — Programmable decentralized storage.
1494
1495**AI** — Trading bots to on-chain analysis.
1496
1497**Global Adoption** — Binance Pay, crypto cards.
1498
1499**Token Burn** — Continues until 100M BNB target.`}],glossary:{title:"BNB Glossary",terms:[{term:"BNB Chain",def:"Binance blockchain ecosystem: BNB Beacon Chain + BNB Smart Chain."},{term:"PoSA",def:"Proof of Staked Authority — BNB Chain consensus with 21 active validators."},{term:"Token Burn",def:"Permanent destruction of BNB tokens to reduce total supply."},{term:"Launchpad",def:"Binance platform for new token sales (IEO)."},{term:"opBNB",def:"BNB Chain Layer 2 based on Optimistic Rollups."},{term:"BNB Greenfield",def:"Decentralized storage in the BNB ecosystem."},{term:"BEP-20",def:"BNB Smart Chain token standard, equivalent to ERC-20."},{term:"PancakeSwap",def:"Largest DEX on BNB Chain."},{term:"Binance Pay",def:"Binance crypto payment system."},{term:"EVM Compatible",def:"BNB Chain's ability to run Ethereum applications."}]},faqs:[{q:"What is BNB?",a:"BNB is the native token of the Binance ecosystem, used for fees, staking, payments, and gas on BNB Chain."},{q:"Is BNB centralized?",a:"BNB Chain is more centralized than Ethereum (21 validators), but offers fast, cheap transactions."},{q:"What happens to burned BNB?",a:"Burned BNB is permanently destroyed. Binance burns quarterly until 100M BNB target."},{q:"How to buy BNB?",a:"BNB is easiest to buy on Binance, also available on major exchanges."},{q:"Is BNB a good investment?",a:"BNB benefits from Binance success but is tied to a centralized company. Do your own research."}],cta:{title:"Continue Learning About BNB",description:"Explore EduWeb Academy courses on the Binance ecosystem, DeFi, and trading.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is BNB",path:"/what-is-bnb"}],relatedTopics:[{label:"What is Ethereum",path:"/what-is-ethereum"},{label:"What is Bitcoin",path:"/what-is-bitcoin"},{label:"BNB Price Today",path:"/bnb-pret-azi"}],courseTopics:["blockchain","web3"]}}},{slugRo:"ce-este-xrp",slugEn:"what-is-xrp",content:{ro:{title:"Ce este XRP? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este XRP (Ripple)? Ghid Complet — Plăți Transfrontaliere & XRPL | EduWeb",metaDescription:"Află ce este XRP, cum funcționează Ripple, ce este XRP Ledger și de ce XRP revoluționează plățile internaționale. Ghid complet pentru începători.",heroClass:"cat-blockchain",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este XRP?",subheading:"Criptomoneda pentru plăți globale instant",intro:"XRP este o criptomonedă creată de Ripple Labs, concepută special pentru plăți transfrontaliere rapide și ieftine. Spre deosebire de Bitcoin sau Ethereum, XRP nu folosește mining — toate cele 100 de miliarde de tokenuri au fost create de la început. XRP Ledger (XRPL) este unul dintre cele mai vechi și eficiente blockchain-uri, cu tranzacții confirmate în 3-5 secunde."},sections:[{icon:"globe",title:"Istoria XRP și Ripple",content:`**2012** — Chris Larsen și Jed McCaleb fondează OpenCoin (devenit Ripple Labs). XRP Ledger este lansat ca o alternativă la Bitcoin pentru plăți.
1500
1501**2013–2017** — Ripple semnează parteneriate cu bănci mari: Santander, Standard Chartered, SBI Holdings. Rețeaua RippleNet conectează instituții financiare global.
1502
1503**2017–2018** — XRP atinge un maxim de $3.84, devenind temporar a doua cea mai mare criptomonedă.
1504
1505**Decembrie 2020** — SEC dă în judecată Ripple, acuzând că XRP ar fi un „security" neînregistrat. Procesul devine cel mai important caz crypto din SUA.
1506
1507**Iulie 2023** — Judecătoarea Torres decide că XRP pe piața secundară NU este un security — o victorie majoră pe
1507ntru industria crypto.
1508
1509**2024–2025** — Ripple lansează stablecoin-ul RLUSD și extinde adopția XRP pentru plăți instituționale și CBDCs.`},{icon:"blocks",title:"Cum Funcționează XRP Ledger?",content:`**Fără Mining** — XRPL folosește un protocol de consens unic (XRP Ledger Consensus Protocol) bazat pe o listă de validatori de încredere (UNL — Unique Node List).
1510
1511**Viteză** — Tranzacțiile se confirmă în 3-5 secunde, comparativ cu 10+ minute pentru Bitcoin.
1512
1513**Cost Minim** — Comisionul mediu este de ~0.00001 XRP (~0.00002 USD), făcând XRP ideal pentru micropayments.
1514
1515**Supply Fix** — Toate cele 100 de miliarde XRP au fost create la lansare. Ripple deține ~40% în escrow, eliberând maxim 1 miliard pe lună.
1516
1517**DEX Nativ** — XRPL are un exchange descentralizat integrat direct în protocol, fără smart contracts suplimentare.
1518
1519**Sustenabilitate** — XRPL consumă cu 120.000x mai puțină energie decât Bitcoin, fiind carbon-neutral din 2020.`},{icon:"landmark",title:"RippleNet: Plăți Instituționale",content:`**On-Demand Liquidity (ODL)** — Produsul principal al Ripple. Folosește XRP ca monedă punte pentru transferuri internaționale instant, eliminând necesitatea prefundării conturilor.
1520
1521**Cum funcționează ODL** — Banca A convertește moneda locală în XRP → XRP este transferat instant pe XRPL → Banca B primește XRP și îl convertește în moneda locală. Totul în secunde.
1522
1523**Parteneriate** — Peste 300 de instituții financiare din 55+ țări folosesc RippleNet: Santander, SBI, Tranglo, Modulr.
1524
1525**Coridoare de plată** — XRP este folosit activ pe coridoare precum SUA-Mexic, Japonia-Filipine, Europa-Asia.
1526
1527**RLUSD** — Stablecoin-ul Ripple, un dolar digital pe XRPL, pentru instituții care preferă stabilitatea prețului.`},{icon:"shield",title:"Procesul SEC vs Ripple: Ce Trebuie Să Știi",content:`**Acuzația** — SEC a acuzat Ripple că a vândut XRP ca un security neînregistrat, cerând miliarde în despăgubiri.
1528
1529**Decizia din 2023** — Judecătoarea Torres a decis că XRP vândut pe exchange-uri (piața secundară) NU este un security. Vânzările instituționale au fost considerate securities.
1530
1531**Importanța** — Decizia a creat un precedent crucial: un token poate fi vândut ca security într-un context și nu în altul. A oferit claritate pentru toată industria.
1532
1533**Impact asupra Prețului** — XRP a crescut cu peste 75% în ziua deciziei.
1534
1535**Rezoluția** — Ripple a plătit o amendă redusă și a obținut dreptul de a continua vânzările de XRP pe piețele secundare.`},{icon:"network",title:"Ecosistemul XRP: Dincolo de Plăți",content:`**XRPL Sidechain — EVM** — O sidechain compatibilă EVM permite rularea de smart contracts Solidity pe XRPL.
1536
1537**NFT-uri pe XRPL** — Standardul XLS-20 aduce NFT-uri native pe XRPL, cu mintare ieftină și royalties forțate la nivel de protocol.
1538
1539**AMM Nativ** — XRPL integrează un Automated Market Maker direct în protocol, fără smart contracts externe.
1540
1541**Tokenizare** — XRPL permite crearea de tokenuri personalizate (IOU-uri) direct pe ledger. Ideal pentru tokenizarea activelor reale (RWA).
1542
1543**Hooks** — Extensii programabile similare smart contracts, native pe XRPL, pentru logică de business on-chain.`},{icon:"zap",title:"Viitorul XRP și Ripple",content:`**RLUSD** — Stablecoin-ul Ripple va extinde cazurile de utilizare și lichiditatea pe XRPL.
1544
1545**CBDCs** — Ripple lucrează cu bănci centrale pentru dezvoltarea de monede digitale pe XRPL (Bhutan, Palau, Columbia).
1546
1547**IPO Ripple** — Discuții despre o potențială listare la bursă a Ripple, care ar legitima și mai mult proiectul.
1548
1549**Interoperabilitate** — XRPL dezvoltă bridge-uri cu Ethereum și alte blockchain-uri.
1550
1551**Reglementare** — Cu procesul SEC în spate, Ripple are mai multă claritate regulatorie decât concurența.`}],glossary:{title:"Glosar de Termeni XRP",terms:[{term:"XRPL",def:"XRP Ledger — blockchain-ul descentralizat pe care funcționează XRP."},{term:"RippleNet",def:"Rețeaua de plăți a Ripple care conectează instituții financiare global."},{term:"ODL",def:"On-Demand Liquidity — serviciu Ripple care folosește XRP ca punte pentru transferuri internaționale."},{term:"Escrow",def:"Mecanism de blocare a XRP-ului Ripple, eliberat treptat (max 1 miliard/lună)."},{term:"UNL",def:"Unique Node List — lista de validatori de încredere pentru consensul XRPL."},{term:"Drop",def:"Cea mai mică unitate XRP: 1 XRP = 1.000.000 drops."},{term:"RLUSD",def:"Stablecoin-ul dolar al Ripple, pe XRPL."}
1551,{term:"XLS-20",def:"Standard pentru NFT-uri native pe XRP Ledger."},{term:"AMM",def:"Automated Market Maker — exchange descentralizat integrat nativ în XRPL."},{term:"Hooks",def:"Extensii programabile pe XRPL, similare smart contracts."}]},faqs:[{q:"Ce este XRP pe scurt?",a:"XRP este o criptomonedă pentru plăți globale instant, cu tranzacții în 3-5 secunde și comisioane aproape zero, creată de Ripple Labs."},{q:"Care este diferența dintre XRP și Ripple?",a:"Ripple este compania, XRP este criptomoneda, XRPL este blockchain-ul. Ripple folosește XRP în produsul ODL pentru plăți transfrontaliere."},{q:"XRP este un security?",a:"Nu pe piața secundară. Judecătoarea Torres a decis în 2023 că XRP tranzacționat pe exchange-uri nu este un security."},{q:"De ce este XRP atât de ieftin de tranzacționat?",a:"XRPL nu folosește mining, are consens rapid și eficient. Comisionul standard este de ~0.00001 XRP."},{q:"Cum cumpăr XRP în România?",a:"XRP se poate cumpăra pe Binance, Bitstamp, Kraken și alte exchange-uri majore cu transfer bancar sau card."}],cta:{title:"Continuă să înveți despre XRP",description:"Explorează cursurile din EduWeb Academy despre plăți crypto, blockchain și ecosistemul XRP.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este XRP",path:"/ce-este-xrp"}],relatedTopics:[{label:"Ce este Bitcoin",path:"/ce-este-bitcoin"},{label:"Ce este Blockchain",path:"/ce-este-blockchain"},{label:"Preț XRP Azi",path:"/xrp-pret-azi"}],courseTopics:["blockchain","web3"]},en:{title:"What is XRP? Complete Beginner's Guide (2025)",metaTitle:"What is XRP (Ripple)? Complete Guide — Cross-Border Payments & XRPL | EduWeb",metaDescription:"Learn what XRP is, how Ripple works, what XRP Ledger is, and why XRP revolutionizes international payments.",heroClass:"cat-blockchain",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is XRP?",subheading:"The cryptocurrency for instant global payments",intro:"XRP is a cryptocurrency created by Ripple Labs, designed for fast, cheap cross-border payments. Unlike Bitcoin or Ethereum, XRP uses no mining — all 100 billion tokens were created at launch. XRP Ledger (XRPL) is one of the oldest and most efficient blockchains, with transactions confirmed in 3-5 seconds."},sections:[{icon:"globe",title:"The History of XRP and Ripple",content:`**2012** — Chris Larsen and Jed McCaleb found OpenCoin (later Ripple Labs). XRPL launches as a Bitcoin alternative for payments.
1552
1553**2017–2018** — XRP reaches $3.84, temporarily becoming the second-largest cryptocurrency.
1554
1555**December 2020** — SEC sues Ripple, alleging XRP is an unregistered security.
1556
1557**July 2023** — Judge Torres rules XRP on secondary markets is NOT a security.
1558
1559**2024–2025** — Ripple launches RLUSD stablecoin and expands institutional adoption.`},{icon:"blocks",title:"How XRP Ledger Works",content:`**No Mining** — XRPL uses a unique consensus protocol based on trusted validators (UNL).
1560
1561**Speed** — 3-5 second confirmations.
1562
1563**Minimal Cost** — ~$0.00002 per transaction.
1564
1565**Fixed Supply** — All 100 billion XRP created at launch. ~40% held in escrow.
1566
1567**Native DEX** — Built-in decentralized exchange.
1568
1569**Sustainability** — 120,000x less energy than Bitcoin.`},{icon:"landmark",title:"RippleNet: Institutional Payments",content:`**ODL** — Uses XRP as bridge currency for instant international transfers.
1570
1571**How ODL works** — Bank A converts local currency to XRP → instant transfer → Bank B converts to local currency.
1572
1573**Partnerships** — 300+ financial institutions in 55+ countries.
1574
1575**RLUSD** — Ripple's stablecoin for institutions preferring price stability.`},{icon:"shield",title:"SEC vs Ripple: What You Need to Know",content:`**The Charge** — SEC alleged XRP was an unregistered security.
1576
1577**2023 Decision** — XRP on exchanges is NOT a security. Institutional sales were securities.
1578
1579**Significance** — Set crucial precedent for the entire crypto industry.
1580
1581**Resolution** — Ripple paid a reduced fine and retained right to sell XRP on secondary markets.`},{icon:"network",title:"XRP Ecosystem: Beyond Payments",content:`**EVM Sidechain** — EVM-compatible sidechain for Solidity smart contracts.
1582
1583**NFTs** — XLS-20 standard for native NFTs with protocol-level royalties.
1584
1585**Native AMM** — Automated Market Maker built into the protocol.
1586
1587**Tokenization** — Create custom tokens (IOUs) directly on ledger.
1588
1589**Hooks** — Programmable extensions for on-chain business logic.`},{icon:"zap",title:"The Future of XRP",content:`**RLUSD** — Expanding use cases and XRPL liquidity.
1590
1591**CBDCs** — Working with central banks (Bhutan, Palau, Colombia).
1592
1593**IPO** — Discussions about potential Ripple stock listing.
1594
1595**Interoperability** — Bridges to Ethereum and other blockchains.
1596
1597**Regulatory Clarity** — Post-SEC lawsuit, Ripple has more regulatory clarity than competitors.`}],glossary:{title:"XRP Glossary",terms:[{term:"XRPL",def:"XRP Ledger — the decentralized blockchain powering XRP."},{term:"RippleNet",def:"Ripple's payment network connecting financial institutions globally."},{term:"ODL",def:"On-Demand Liquidity — uses XRP as bridge for international transfers."},{term:"Escrow",def:"Mechanism locking Ripple's XRP, released gradually (max 1B/month)."},{term:"UNL",def:"Unique Node List — trusted validators for XRPL consensus."},{term:"Drop",def:"Smallest XRP unit: 1 XRP = 1,000,000 drops."},{term:"RLUSD",def:"Ripple's USD stablecoin on XRPL."},{term:"XLS-20",def:"Standard for native NFTs on XRP Ledger."},{term:"AMM",def:"Automated Market Maker built natively into XRPL."},{term:"Hooks",def:"Programmable extensions on XRPL, similar to smart contracts."}]},faqs:[{q:"What is XRP?",a:"XRP is a cryptocurrency for instant global payments, with 3-5 second transactions and near-zero fees, created by Ripple Labs."},{q:"What's the difference between XRP and Ripple?",a:"Ripple is the company, XRP is the cryptocurrency, XRPL is the blockchain."},{q:"Is XRP a security?",a:"Not on secondary markets. A 2023 court ruling determined XRP traded on exchanges is not a security."},{q:"Why is XRP so cheap to transact?",a:"XRPL uses no mining, has fast efficient consensus. Standard fee is ~0.00001 XRP."},{q:"How do I buy XRP?",a:"XRP can be bought on Binance, Bitstamp, Kraken and other major exchanges."}],cta:{title:"Continue Learning About XRP",description:"Explore EduWeb Academy courses on crypto payments, blockchain, and the XRP ecosystem.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is XRP",path:"/what-is-xrp"}],relatedTopics:[{label:"What is Bitcoin",path:"/what-is-bitcoin"},{label:"What is Blockchain",path:"/what-is-blockchain"},{label:"XRP Price Today",path:"/xrp-pret-azi"}],courseTopics:["blockchain","web3"]}}},{slugRo:"ce-este-cardano",slugEn:"what-is-cardano",content:{ro:{title:"Ce este Cardano? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este Cardano (ADA)? Ghid Complet — Cercetare Academică & Ouroboros | EduWeb",metaDescription:"Află ce este Cardano, cum funcționează protocolul Ouroboros, cine este Charles Hoskinson și de ce ADA se bazează pe cercetare academică peer-reviewed.",heroClass:"cat-blockchain",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Cardano?",subheading:"Blockchain-ul construit pe știință",intro:"Cardano este o platformă blockchain de generația a treia, dezvoltată cu o abordare unică în industrie: cercetare academică peer-reviewed. Fondată de Charles Hoskinson (co-fondator Ethereum) și construită de IOHK, Cardano promite scalabilitate, sustenabilitate și interoperabilitate, toate dovedite matematic înainte de implementare."},sections:[{icon:"award",title:"Istoria și Filosofia Cardano",content:`**2015** — Charles Hoskinson (care a părăsit Ethereum din cauza dezacordurilor asupra direcției) începe dezvoltarea Cardano cu echipa IOHK.
1598
1599**2017** — Lansarea erei Byron — rețeaua de bază Cardano, cu wallet-ul Daedalus și token-ul ADA.
1600
1601**2020** — Era Shelley introduce staking-ul descentralizat. Mii de stake pools devin active.
1602
1603**2021** — Era Alonzo aduce smart contracts pe Cardano, folosind limbajul Plutus bazat pe Haskell.
1604
1605**2023–2024** — Era Basho se concentrează pe scalabilitate: Hydra (Layer 2), sidechains și optimizare.
1606
1607**Filosofia** — Fiecare actualizare Cardano este mai întâi publicată ca articol academic, revizuită de experți și apoi implementată. Această abordare este mai lentă dar produce cod dovedit sigur matematic.`},{icon:"shieldcheck",title:"Ouroboros: Primul PoS Dovedit Matematic",content:`**Ce este Ouroboros?** — Protocolul de consens al Cardano, primul Proof of Stake dovedit sigur prin cercetare academică publicată la conferințe de top (Crypto, Eurocrypt).
1608
1609**Cum funcționează?** — Timpul este împărțit în epoci și sloturi. Un validator (stake pool operator) este ales aleatoriu pentru fiecare slot, proporțional cu cantitatea de ADA delegată.
1610
1611**Securitate** — Ouroboros oferă garanții de securitate similare cu Proof of Work, dar cu consum energetic de milioane de ori mai mic.
1612
1613**Delegare** — Deținătorii de ADA pot delega către stake pools fără a-și bloca monedele. Primesc re
1613compense la fiecare epocă (~5 zile).
1614
1615**Evoluția** — Ouroboros a evoluat: Classic → Praos (rezistență la atac adaptiv) → Genesis (bootstrapping sigur) → Leios (high throughput).`},{icon:"cpu",title:"Arhitectura Tehnică Cardano",content:`**Model UTXO Extins (eUTXO)** — Cardano folosește un model de tranzacții bazat pe UTXO (ca Bitcoin) dar extins pentru a suporta smart contracts. Oferă predictibilitate: știi exact costul tranzacției înainte de a o trimite.
1616
1617**Plutus** — Platforma de smart contracts bazată pe Haskell, un limbaj de programare funcțional folosit în industria aeronautică și financiară pentru siguranță critică.
1618
1619**Marlowe** — Limbaj de domeniu specific (DSL) pentru smart contracts financiare, accesibil non-programatorilor.
1620
1621**Hydra** — Soluția Layer 2 a Cardano. Fiecare „Hydra Head" este un canal de state off-chain care poate procesa tranzacții instant, cu decontare finală pe lanțul principal.
1622
1623**Mithril** — Protocol de semnătură criptografică care permite sincronizarea rapidă a nodurilor noi, fără a descărca întreaga istorie a blockchain-ului.`}
1623,{icon:"users",title:"Governance și Project Catalyst",content:`**Project Catalyst** — Cel mai mare fond de inovație descentralizat din blockchain, cu peste 1 miliard ADA alocat. Comunitatea votează proiectele care primesc finanțare.
1624
1625**CIP-1694** — Propunerea de governance on-chain care transformă Cardano într-un DAO complet: DReps (Delegated Representatives), Comitet Constituțional și Votul SPO.
1626
1627**Constituția Cardano** — Un document formal care definește principiile și regulile de guvernanță ale rețelei, votat de comunitate.
1628
1629**Treasury** — O parte din recompensele de bloc alimentează trezoreria Cardano, gestionată democratic de comunitate pentru finanțarea dezvoltării.`},{icon:"heart",title:"Cardano în Lumea Reală",content:`**Identitate Digitală în Africa** — Cardano a semnat parteneriat cu Ministerul Educației din Etiopia pentru a crea identități digitale blockchain pentru 5 milioane de studenți.
1630
1631**Supply Chain** — Proiecte de trasabilitate pentru cafea, vin și produse farmaceutice.
1632
1633**DeFi pe Cardano** — Minswap, SundaeSwap, Liqwid Finance formează un ecosistem DeFi în creștere. TVL peste 500 milioane USD.
1634
1635**Stablecoins** — DJED (stablecoin algoritmic) și USDA (backed de fiat) oferă stabilitate în ecosistem.
1636
1637**RealFi** — Inițiativa de a aduce servicii financiare pentru cei 3 miliarde de oameni subbancarizați, prin identitate digitală și lending descentralizat.`},{icon:"zap",title:"Viitorul Cardano",content:`**Era Voltaire** — Governance complet descentralizat: comunitatea decide direcția protocolului prin vot on-chain.
1638
1639**Hydra Scalare** — Fiecare Hydra Head adaugă capacitate. Teoretic, Cardano poate scala la milioane de TPS cu suficiente headuri.
1640
1641**Partner Chains** — Blockchain-uri partenere care folosesc infrastructura Cardano pentru securitate și consens.
1642
1643**Midnight** — Sidechain focusat pe confidențialitate, pentru date sensibile și compliance enterprise.
1644
1645**Leios** — Viitorul protocol de consens, optimizat pentru throughput maxim menținând securitatea dovedită matematic.`}],glossary:{title:"Glosar de Termeni Cardano",terms:[{term:"ADA",def:"Token-ul nativ al Cardano, numit după Ada Lovelace, prima programatoare din istorie."},{term:"Ouroboros",def:"Protocolul PoS al Cardano, primul dovedit sigur prin cercetare academică peer-reviewed."},{term:"Stake Pool",def:"Nod care procesează tranzacții pe Cardano. Deținătorii de ADA delegă către pool-uri."},{term:"eUTXO",def:"Extended UTXO — modelul de tranzacții al Cardano, care combină predictibilitatea UTXO cu smart contracts."},{term:"Plutus",def:"Platforma de smart contracts a Cardano, bazată pe limbajul funcțional Haskell."},{term:"Hydra",def:"Soluția Layer 2 a Cardano pentru scalabilitate, bazată pe canale de state."},{term:"Epoch",def:"Perioadă de ~5 zile în care recompensele de staking sunt calculate și distribuite."},{term:"Catalyst",def:"Fond de inovație descentralizat al Cardano, finanțat din trezoreria rețelei."},{term:"Lovelace",def:"Cea mai mică unitate ADA: 1 ADA = 1.000.000 Lovelace."},{term:"DRep",def:"Delegated Representative — reprezentant delegat pentru governance-ul on-chain al Cardano."}]},faqs:[{q:"Ce este Cardano pe scurt?",a:"Cardano este o platformă blockchain bazată pe cercetare academică peer-reviewed, cu staking, smart contracts și governance descentralizat."},{q:"Cine a creat Cardano?",a:"Charles Hoskinson, co-fondator Ethereum, prin compania IOHK. Dezvoltarea se bazează pe articole academice publicate și revizuite."},{q:"De ce este Cardano considerat mai lent în dezvoltare?",a:"Cardano adoptă o abordare academică: fiecare funcționalitate este mai întâi cercetată, publicată, revizuită și apoi implementată. Este mai lent, dar produce cod dovedit matematic."},{q:"Cum fac staking cu ADA?",a:"Delegi ADA către un stake pool din wallet-ul tău (Daedalus, Yoroi, Eternl). Monedele NU sunt blocate — le poți retrage oricând. Recompensele vin la fiecare epocă (~5 zile)."},{q:"Este Cardano ecologic?",a:"Da, Cardano consumă de aproximativ 10.000x mai puțină energie decât Bitcoin, datorită protocolului Proof of Stake Ouroboros."}],cta:{title:"Continuă să înveți despre Cardano",description:"Explorează cursurile din EduWeb Academy despre blockchain academic, staking și smart contracts.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este Cardano",path:"/ce-este-cardano"}],relatedTopics:[{label:"Ce este Ethereum",path:"/ce-este-ethereum"},{label:"Ce este Blockchain",path:"/ce-este-blockchain"},{label:"Preț Cardano Azi",path:"/cardano-pret-azi"}],courseTopics:["blockchain","web3"]},en:{title:"What is Cardano? Complete Beginner's Guide (2025)",metaTitle:"What is Cardano (ADA)? Complete Guide — Ac
1645ademic Research & Ouroboros | EduWeb",metaDescription:"Learn what Cardano is, how the Ouroboros protocol works, who Charles Hoskinson is, and why ADA is built on peer-reviewed academic research.",heroClass:"cat-blockchain",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Cardano?",subheading:"The blockchain built on science",intro:"Cardano is a third-generation blockchain platform developed with a unique approach: peer-reviewed academic research. Founded by Charles Hoskinson (Ethereum co-founder) and built by IOHK, Cardano promises scalability, sustainability, and interoperability, all mathematically proven before implementation."},sections:[{icon:"award",title:"History and Philosophy",content:`**2015** — Charles Hoskinson begins Cardano development with IOHK.
1646
1647**2017** — Byron era launches.
1648
1649**2020** — Shelley introduces decentralized staking.
1650
1651**2021** — Alonzo brings smart contracts via Plutus.
1652
1653**2023–2024** — Basho era: Hydra L2, sidechains, optimization.
1654
1655**Philosophy** — Every update is first published as academic paper, peer-reviewed, then implemented.`},{icon:"shieldcheck",title:"Ouroboros: First Mathematically Proven PoS",content:`**What is Ouroboros?** — Cardano's consensus protocol, first PoS proven secure through academic research.
1656
1657**How it works** — Time divided into epochs and slots. Validators selected proportionally to delegated ADA.
1658
1659**Delegation** — ADA holders delegate without locking coins. Rewards every ~5 days.
1660
1661**Evolution** — Classic → Praos → Genesis → Leios.`},{icon:"cpu",title:"Technical Architecture",content:`**eUTXO Model** — Extended UTXO for predictable smart contracts.
1662
1663**Plutus** — Smart contracts based on Haskell.
1664
1665**Marlowe** — DSL for financial contracts.
1666
1667**Hydra** — Layer 2 state channels.
1668
1669**Mithril** — Fast node synchronization.`}
1669,{icon:"users",title:"Governance and Project Catalyst",content:`**Project Catalyst** — Largest decentralized innovation fund: 1B+ ADA.
1670
1671**CIP-1694** — On-chain governance: DReps, Constitutional Committee, SPO voting.
1672
1673**Constitution** — Formal governance document voted by community.
1674
1675**Treasury** — Block rewards fund community-managed development.`},{icon:"heart",title:"Real-World Applications",content:`**Digital Identity in Africa** — Partnership with Ethiopia for 5M student digital IDs.
1676
1677**Supply Chain** — Traceability for coffee, wine, pharmaceuticals.
1678
1679**DeFi** — Minswap, SundaeSwap, Liqwid. $500M+ TVL.
1680
1681**RealFi** — Financial services for 3 billion underbanked people.`},{icon:"zap",title:"The Future of Cardano",content:`**Voltaire Era** — Fully decentralized governance.
1682
1683**Hydra Scaling** — Theoretically millions of TPS.
1684
1685**Partner Chains** — Blockchains using Cardano infrastructure.
1686
1687**Midnight** — Privacy-focused sidechain.
1688
1689**Leios** — Future consensus protocol for max throughput.`}],glossary:{title:"Cardano Glossary",terms:[{term:"ADA",def:"Cardano's native token, named after Ada Lovelace."},{term:"Ouroboros",def:"Cardano's peer-reviewed PoS consensus protocol."},{term:"Stake Pool",def:"Node processing Cardano transactions via delegated ADA."},{term:"eUTXO",def:"Extended UTXO model combining UTXO predictability with smart contracts."},{term:"Plutus",def:"Cardano's Haskell-based smart contract platform."},{term:"Hydra",def:"Cardano's Layer 2 scaling solution using state channels."},{term:"Epoch",def:"~5 day period for staking reward calculation."},{term:"Catalyst",def:"Decentralized innovation fund from Cardano treasury."},{term:"Lovelace",def:"Smallest ADA unit: 1 ADA = 1,000,000 Lovelace."},{term:"DRep",def:"Delegated Representative for on-chain governance."}]},faqs:[{q:"What is Cardano?",a:"A blockchain platform built on peer-reviewed academic research, with staking, smart contracts, and decentralized governance."},{q:"Who created Cardano?",a:"Charles Hoskinson, Ethereum co-founder, through IOHK."},{q:"Why is Cardano considered slow in development?",a:"Cardano uses an academic approach: research → publish → peer-review → implement. Slower but mathematically proven."},{q:"How do I stake ADA?",a:"Delegate ADA to a stake pool from your wallet. Coins are NOT locked. Rewards every ~5 days."},{q:"Is Cardano eco-friendly?",a:"Yes, Cardano uses ~10,000x less energy than Bitcoin thanks to Ouroboros PoS."}],cta:{title:"Continue Learning About Cardano",description:"Explore EduWeb Academy courses on academic blockchain, staking, and smart contracts.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is Cardano",path:"/what-is-cardano"}],relatedTopics:[{label:"What is Ethereum",path:"/what-is-ethereum"},{label:"What is Blockchain",path:"/what-is-blockchain"},{label:"Cardano Price Today",path:"/cardano-pret-azi"}],courseTopics:["blockchain","web3"]}}},{slugRo:"ce-este-dogecoin",slugEn:"what-is-dogecoin",content:{ro:{title:"Ce este Dogecoin? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este Dogecoin (DOGE)? Ghid Complet — Meme Coin, Comunitate & Elon Musk | EduWeb",metaDescription:"Află ce este Dogecoin, cum a apărut cel mai popular meme coin, rolul lui Elon Musk și de ce DOGE rămâne relevant în crypto.",heroClass:"cat-blockchain",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Dogecoin?",subheading:"De la glumă la criptomonedă cu capitalizare de miliarde",intro:"Dogecoin (DOGE) a fost creat în 2013 ca o glumă bazată pe meme-ul Shiba Inu, dar a devenit una dintre cele mai populare și tranzacționate criptomonede din lume. Cu o comunitate pasionată și susținerea lui Elon Musk, Dogecoin demonstrează puterea culturii și comunității în crypto."},sections:[{icon:"globe",title:"Istoria Dogecoin: De la Meme la Miliarde",content:`**Decembrie 2013** — Billy Markus (inginer IBM) și Jackson Palmer (manager Adobe) creează Dogecoin ca o parodie a Bitcoin, bazată pe meme-ul Shiba Inu „Doge".
1690
1691**2014** — Comunitatea Dogecoin finanțează echipa de bob a Jamaicai pentru Olimpiadă și sponsorizează un pilot NASCAR. „Do Only Good Everyday" devine motto-ul.
1692
1693**2019–2020** — Elon Musk începe să posteze despre Dogecoin pe Twitter/X, numându-l „the people's crypto".
1694
1695**Ianuarie–Mai 2021** — Dogecoin crește cu peste 10.000% (de la $0.007 la $0.73). Elon Musk apare la SNL vorbind despre DOGE.
1696
1697**2022–2023** — Integrarea DOGE pe Twitter/X (tipping), Tesla acceptă DOGE pentru merchandise.
1698
1699**2024–2025** — Dogecoin Foundation publică un roadmap serios: GigaWallet API, RadioDoge (acces fără internet), LibDogecoin.`},{icon:"blocks",title:"Cum Funcționează Dogecoin?",content:`**Fork Litecoin** — Dogecoin este un fork al Litecoin, care la rândul său este un fork al Bitcoin. Folosește algoritmul Scrypt pentru mining.
1700
1701**Proof of Work** — Ca Bitcoin, Dogecoin folosește mining PoW, dar algoritmul Scrypt este mai accesibil pentru minerii individuali.
1702
1703**Merged Mining** — Din 2014, Dogecoin poate fi minat simultan cu Litecoin (merged mining), crescând securitatea rețelei.
1704
1705**Bloc rapid** — Blocuri la fiecare 1 minut (vs 10 minute Bitcoin), tranzacții confirmate rapid.
1706
1707**Supply Infinit** — Spre deosebire de Bitcoin (21 milioane), Dogecoin are supply nelimitat: ~5.26 miliarde DOGE noi sunt emise anual, făcându-l inflationar.
1708
1709**Comisioane** — Costul mediu al unei tranzacții DOGE este sub $0.01, făcându-l potrivit pentru bacșișuri și micropayments.`},{icon:"users",title:"Comunitatea și Cultura Dogecoin",content:`**„Do Only Good Everyday"** — Motto-ul comunității reflectă spiritul pozitiv și caritabil al Dogecoin.
1710
1711**Tipping Culture** — Dogecoin a popularizat cultura de bacșișuri crypto pe Reddit și Twitter, recompensând creatorii de conținut.
1712
1713**Elon Musk** — „The Dogefather" a influențat enorm prețul și popularitatea DOGE. Twitter/X a integrat DOGE pentru tipping-uri.
1714
1715**Comunitate vs. Tehnologie** — Dogecoin demonstrează că în crypto, comunitatea poate fi la fel de importantă ca tehnologia. Efectul de rețea al DOGE este uriaș.
1716
1717**Caritate** — Comunitatea a finanțat forări de puțuri de apă în Kenya, a sponsorizat sportivi și a donat pentru cauze multiple.`},{icon:"shield",title:"Tokenomics: Supply Infinit și Implicații",content:`**Model Inflationar** — ~5.26 miliarde DOGE noi sunt create anual (din recompensele de bloc de 10.000 DOGE). Nu există un „halving" ca la Bitcoin.
1718
1719**Argumentul Pro** — Inflația scăzută și constantă (sub 3% anual, descrescătoare) face DOGE mai potrivit ca monedă de plată decât ca rezervă de valoare. Banii reali (euro, dolari) sunt tot inflationari.
1720
1721**Argumentul Contra** — Lipsa unui supply maxim înseamnă că DOGE nu poate beneficia de „efectul de raritate" al Bitcoin.
1722
1723**Distribuție** — O concentrare semnificativă: top 100 de adrese dețin un procent mare din supply. Identitatea deținătorilor principali rămâne speculativă.
1724
1725**Viteza Circulației** — Tocmai pentru că DOGE nu este „deflaționat", oamenii sunt mai dispuși să-l cheltuiască, nu să-l „hodleze" — ceea ce îl face o monedă funcțională.`},{icon:"trending",title:"Dogecoin vs. Alte Meme Coins",content:`**Dogecoin — Originalul** — Lansat 2013, cea mai mare capitalizare, cel mai recunoscut brand, utilitate reală (plăți, tipping-uri).
1726
1727**Shiba Inu (SHIB)** — Auto-proclamat „Dogecoin Killer", pe Ethereum, cu un ecosistem DeFi propriu (ShibaSwap).
1728
1729**Meme Coins pe Solana** — BONK, WIF, PEPE Solana — noua generație de meme coins, cu accent pe viralitate și comunitate.
1730
1731**Diferența fundamentală** — Dogecoin are propriul blockchain, mining, 10+ ani de istorie și adopție reală (Tesla, Twitter). Majoritatea meme coins sunt tokenuri fără infrastructură proprie.
1732
1733**Riscuri** — Toate meme coins sunt extrem de volatile și influențate de social media. DOGE beneficiază de longevitate și Elon Musk, dar riscul rămâne ridicat.`},{icon:"zap",title:"Viitorul Dogecoin",content:`**GigaWallet API** — Soluție backend care simplifică integrarea plăților DOGE pentru comercianți.
1734
1735**RadioDoge** — Proiect care permite tranzacții DOGE prin frecvențe radio, fără internet — ideal pentru regiuni neconectate.
1736
1737**LibDogecoin** — Bibliotecă open-source pentru integrarea ușoară a Dogecoin în orice aplicație.
1738
1739**Plăți și Comerț** — Tesla, Space, AMC, și mii de comercianți acceptă DOGE. Adopția continuă să crească.
1740
1741**Updatări de Protocol** — Dogecoin Foundation lucrează la actualizări de scalabilitate și reducerea comisioanelor.`}],glossary:{title:"Glosar de Termeni Dogecoin",terms:[{term:"DOGE",def:"Token-ul nativ al blockchain-ului Dogecoin, bazat pe meme-ul Shiba Inu."},{term:"Scrypt",def:"Algoritmul de mining folosit de Dogecoin (și Litecoin), mai accesibil decât SHA-256."},{term:"Merged Mining",def:"Capacitatea de a mina Dogecoin simultan cu Litecoin, folosind aceeași putere de calcul."},{term:"Meme Coin",def:"Criptomonedă inspirată de internet culture și meme-uri, cu valoare determinată de comunitate."},{term:"HODL",def:'Argou crypto pentru „Hold On for Dear Life" — a păstra o monedă pe termen lung.'},{term:"Tipping",def:"Practica de a trimite cantități mici de DOGE ca bacșiș pentru conținut online."},{term:"The Dogefather",def:"Supranumele lui Elon Musk în comunitatea Dogecoin."},{term:"GigaWallet",def:"API backend pentru integrarea facilă a plăților Dogecoin de către comercianți."},{term:"RadioDoge",def:"Proiect care permite tranzacții DOGE prin frecvențe radio, fără internet."},{term:"Supply Infinit",def:"Dogecoin nu are un supply maxim — ~5.26 miliarde DOGE noi sunt create anual."}]},faqs:[{q:"Ce este Dogecoin pe scurt?",a:"Dogecoin este o criptomonedă lansată în 2013 ca meme coin, cu propriu blockchain, comunitate activă și utilizare reală în plăți și bacșișuri."},{q:"Dogecoin este o investiție serioasă?",a:"DOGE este extrem de volatil și influențat de social media. Are utilitate reală (plăți, tipping-uri) dar rămâne un activ cu risc foarte mare. Fă cercetare proprie."},{q:"De ce susține Elon Musk Dogecoin?",a:"Musk apreciază simplitatea, accesibilitatea și comunitatea pozitivă a DOGE. L-a integrat pe Twitter/X pentru tipping-uri și Tesla acceptă DOGE."},{q:"Dogecoin are un supply maxim?",a:"Nu. Dogecoin este inflationar, cu ~5.26 miliarde DOGE noi anual. Rata de inflație scade treptat (sub 3%)."},{q:"Cum cumpăr Dogecoin?",a:"DOGE se cumpără pe Binance, Coinbase, Kraken și majoritatea exchange-urilor majore cu transfer bancar sau card."}],cta:{title:"Continuă să înveți despre Dogecoin",description:"Explorează cursurile din EduWeb Academy despre criptomonede, cultura crypto și investiții responsabile.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este Dogecoin",path:"/ce-este-dogecoin"}],relatedTopics:[{label:"Ce este Bitcoin",path:"/ce-este-bitcoin"},{label:"Ce este Blockchain",path:"/ce-este-blockchain"},{label:"Preț Dogecoin Azi",path:"/dogecoin-pret-azi"}],courseTopics:["blockchain","web3"]},en:{title:"What is Dogecoin? Complete Beginner's Guide (2025)",metaTitle:"What is Dogecoin (DOGE)? Complete Guide — Meme Coin, Community & Elon Musk | EduWeb",metaDescription:"Learn what Dogecoin is, how the most popular meme coin was created, Elon Musk's role, and why DOGE remains relevant.",heroClass:"cat-blockchain",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Dogecoin?",subheading:"From joke to billion-dollar cryptocurrency",intro:"Dogecoin (DOGE) was created in 2013 as a joke based on the Shiba Inu meme but became one of the most popular and traded cryptocurrencies. With a passionate community and Elon Musk's support, Dogecoin demonstrates the power of culture and community in crypto."},sections:[{icon:"globe",title:"History: From Meme to Billions",content:`**December 2013** — Billy Markus and Jackson Palmer create Dogecoin as a Bitcoin parody.
1742
1743**2014** — Community funds Jamaica bobsled team and sponsors NASCAR driver.
1744
1745**2021** — DOGE rises 10,000%+. Elon Musk appears on SNL.
1746
1747**2024–2025** — Dogecoin Foundation publishes serious roadmap: GigaWallet API, RadioDoge, LibDogecoin.`},{icon:"blocks",title:"How Dogecoin Works",content:`**Litecoin Fork** — Uses Scrypt algorithm for mining.
1748
1749**Merged Mining** — Can be mined alongside Litecoin.
1750
1751**1-Minute Blocks** — Fast confirmation times.
1752
1753**Infinite Supply** — ~5.26 billion new DOGE annually.
1754
1755**Low Fees** — Under $0.01 per transaction.`},{icon:"users",title:"Community and Culture",content:`**"Do Only Good Everyday"** — Community motto.
1756
1757**Tipping Culture** — Popularized crypto tipping on Reddit and Twitter.
1758
1759**Elon Musk** — "The Dogefather" has enormous influence.
1760
1761**Community > Technology** — Network effect is massive.
1762
1763**Charity** — Water wells in Kenya, athlete sponsorships.`},{icon:"shield",title:"Tokenomics: Infinite Supply",content:`**Inflationary Model** — ~5.26B new DOGE annually. No halving.
1764
1765**Pro Argument** — Low constant inflation makes DOGE better as payment currency.
1766
1767**Contra Argument** — No scarcity effect like Bitcoin.
1768
1769**Velocity** — People spend rather than hoard DOGE — functional currency.`},{icon:"trending",title:"Dogecoin vs Other Meme Coins",content:`**Dogecoin** — The original. Own blockchain, 10+ years, real adoption.
1770
1771**SHIB** — "Dogecoin Killer" on Ethereum.
1772
1773**Solana Meme Coins** — BONK, WIF — new generation.
1774
1775**Key Difference** — DOGE has its own infrastructure; most meme coins are just tokens.
1776
1777**Risk** — All meme coins are extremely volatile.`},{icon:"zap",title:"The Future of Dogecoin",content:`**GigaWallet API** — Easy merchant payment integration.
1778
1779**RadioDoge** — DOGE transactions via radio without internet.
1780
1781**LibDogecoin** — Open-source integration library.
1782
1783**Payments** — Tesla, SpaceX, AMC accept DOGE.
1784
1785**Protocol Updates** — Scalability and fee reduction.`}],glossary:{title:"Dogecoin Glossary",terms:[{term:"DOGE",def:"Dogecoin's native token based on the Shiba Inu meme."},{term:"Scrypt",def:"Mining algorithm used by Dogecoin and Litecoin."},{term:"Merged Mining",def:"Mining Dogecoin simultaneously with Litecoin."},{term:"Meme Coin",def:"Cryptocurrency inspired by internet culture and memes."},{term:"Tipping",def:"Sending small DOGE amounts as tips for online content."},{term:"The Dogefather",def:"Elon Musk's nickname in the Dogecoin community."},{term:"GigaWallet",def:"Backend API for easy Dogecoin merchant payments."},{term:"RadioDoge",def:"DOGE transactions via radio without internet."},{term:"Infinite Supply",def:"No max supply — ~5.26B new DOGE created annually."},{term:"HODL",def:'Crypto slang for "Hold On for Dear Life."'}]},faqs:[{q:"What is Dogecoin?",a:"A cryptocurrency launched in 2013 as a meme coin with its own blockchain, active community, and real-world payment usage."},{q:"Is Dogecoin a serious investment?",a:"DOGE is extremely volatile. It has real utility but remains very high risk."},{q:"Why does Elon Musk support Dogecoin?",a:"Musk appreciates its simplicity, accessibility, and positive community."},{q:"Does Dogecoin have a max supply?",a:"No. Dogecoin is inflationary with ~5.26 billion new DOGE annually."},{q:"How do I buy Dogecoin?",a:"DOGE is available on Binance, Coinbase, Kraken and most major exchanges."}],cta:{title:"Continue Learning About Dogecoin",description:"Explore EduWeb Academy courses on cryptocurrencies, crypto culture, and responsible investing.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is Dogecoin",path:"/what-is-dogecoin"}],relatedTopics:[{label:"What is Bitcoin",path:"/what-is-bitcoin"},{label:"What is Blockchain",path:"/what-is-blockchain"},{label:"Dogecoin Price",path:"/dogecoin-pret-azi"}],courseTopics:["blockchain","web3"]}}},{slugRo:"ce-este-polkadot",slugEn:"what-is-polkadot",content:{ro:{title:"Ce este Polkadot? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este Polkadot (DOT)? Ghid Complet — Interoperabilitate & Parachains | EduWeb",metaDescription:"Află ce este Polkadot, cum funcționează parachains, ce este Relay Chain și de ce interoperabilitatea multi-chain contează.",heroClass:"cat-blockchain",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Polkadot?",subheading:"Protocolul care conectează blockchain-urile",intro:'Polkadot este un protocol de interoperabilitate multi-chain creat de Dr. Gavin Wood (co-fondator Ethereum, creatorul Solidity). Polkadot permite diferitelor blockchain-uri să comunice și să transfere date și active între ele, rezolvând problema „insulelor" izolate din ecosistemul crypto.'},sections:[{icon:"globe",title:"Istoria Polkadot",content:`**2016** — Dr. Gavin Wood publică whitepaper-ul Polkadot.
1786
1787**2017** — Web3 Foundation organizează token sale, strângând 144 milioane USD.
1788
1789**2020** — Lansarea Relay Chain și începerea staking-ului DOT.
1790
1791**2021** — Primele parachain auctions pe Kusama (canary network) apoi pe Polkadot.
1792
1793**2023** — Polkadot 2.0 introduce „agile coretime" — model flexibil de alocare a resurselor.
1794
1795**2024–2025** — JAM (Join-Accumulate Machine) — viitoarea arhitectură Polkadot pentru scalabilitate maximă.`},{icon:"network",title:"Arhitectura Polkadot",content:`**Relay Chain** — Lanțul principal care asigură securitatea, consensul și interoperabilitatea tuturor parachain-urilor.
1796
1797**Parachains** — Blockchain-uri individuale, specializate, care rulează în paralel pe Polkadot. Fiecare poate avea propriul mecanism de consens și logică.
1798
1799**Bridges** — Poduri care conectează Polkadot cu blockchain-uri externe (Ethereum, Bitcoin).
1800
1801**Validatori** — Securizează Relay Chain și validează tranzacțiile parachain-urilor.
1802
1803**Collatori** — Colectează tranzacțiile pe fiecare parachain și le trimit validatorilor.
1804
1805**Nominatorii** — Deținători de DOT care aleg validatorii de încredere și primesc recompense.`},{icon:"link",title:"Interoperabilitate: De Ce Contează",content:`**Problema** — Blockchain-urile funcționează ca „insule" izolate: Bitcoin nu poate comunica nativ cu Ethereum, Solana nu cu Cardano.
1806
1807**Soluția Polkadot** — XCM (Cross-Consensus Messaging) permite parachain-urilor să trimită mesaje și active între ele, fără bridge-uri centralizate.
1808
1809**Shared Security** — Toate parachain-urile beneficiază de securitatea Relay Chain, fără a trebui să-și construiască propria rețea de validatori.
1810
1811**Specializare** — Fiecare parachain poate fi optimizat pentru un caz de utilizare specific: DeFi, identitate, gaming, privacy.
1812
1813**Compunabilitate** — Aplicațiile de pe diferite parachain-uri pot interacționa, creând un ecosistem mai puternic decât suma părților.`},{icon:"coins",title:"DOT: Token-ul Polkadot",content:`**Governance** — DOT oferă drept de vot în OpenGov, sistemul de governance descentralizat al Polkadot.
1814
1815**Staking** — DOT este folosit pentru staking de către validatori și nominatori. APY tipic: 12-15%.
1816
1817**Coretime** — DOT este folosit pentru achiziționarea de „coretime" — resurse de procesare pe Relay Chain.
1818
1819**Treasury** — O parte din comisioanele rețelei alimentează trezoreria, gestionată de comunitate prin OpenGov.`},{icon:"blocks",title:"Ecosistemul Polkadot",content:`**Moonbeam** — Parachain compatibil EVM, ușor de folosit pentru dezvoltatori Ethereum.
1820
1821**Acala** — Hub DeFi al Polkadot: stablecoin, staking lichid, DEX.
1822
1823**Astar** — Parachain multi-VM cu suport pentru EVM și WebAssembly.
1824
1825**Phala** — Cloud computing confidențial, bazat pe TEE (Trusted Execution Environment).
1826
1827**Kusama** — Rețeaua „canary" a Polkadot, pentru testarea funcționalităților în condiții reale, mai rapidă și experimentală.`},{icon:"zap",title:"Viitorul: Polkadot 2.0 și JAM",content:`**Agile Coretime** — Înlocuiește auctionele de parachain cu un model flexibil de achiziție a timpului de procesare.
1828
1829**JAM** — Join-Accumulate Machine: arhitectura viitoare care va unifica executarea tranzacțiilor și va crește dramatic scalabilitatea.
1830
1831**Asynchronous Backing** — Permite parachain-urilor să producă blocuri mai rapid.
1832
1833**Elastic Scaling** — Parachain-urile pot folosi mai multe core-uri simultan pentru capacitate suplimentară.
1834
1835**Bridge Hub** — Hub centralizat pentru bridge-uri trustless cu Ethereum și alte rețele.`}],glossary:{title:"Glosar Polkadot",terms:[{term:"Relay Chain",def:"Lanțul principal Polkadot care asigură securitatea și interoperabilitatea."},{term:"Parachain",def:"Blockchain individual care rulează în paralel pe Polkadot, cu propria logică."},{term:"DOT",def:"Token-ul nativ Polkadot pentru governance, staking și coretime."},{term:"XCM",def:"Cross-Consensus Messaging — protocolul de comunicare între parachains."},{term:"Kusama",def:"Rețeaua canary a Polkadot pentru testare în condiții reale."},{term:"Collator",def:"Nod care colectează tranzacții pe un parachain și le trimite la Relay Chain."}
1835,{term:"Nominator",def:"Deținător DOT care selectează și susține validatori de încredere."},{term:"OpenGov",def:"Sistemul de governance descentralizat al Polkadot."},{term:"Coretime",def:"Resurse de procesare pe Relay Chain, achiziționate cu DOT."},{term:"JAM",def:"Join-Accumulate Machine — viitoarea arhitectură Polkadot."}]},faqs:[{q:"Ce este Polkadot pe scurt?",a:"Polkadot este un protocol multi-chain care permite diferitelor blockchain-uri să comunice și să transfere date și active între ele."},{q:"Cine a creat Polkadot?",a:"Dr. Gavin Wood, co-fondator Ethereum și creator al limbajului Solidity."},{q:"Ce sunt parachains?",a:"Blockchain-uri individuale care rulează în paralel pe Polkadot, beneficiind de securitatea shared a Relay Chain."},{q:"Cum fac staking cu DOT?",a:"Poți face staking ca nominator (selectezi validatori) sau prin pool-uri de staking cu orice cantitate de DOT."},{q:"Ce este Kusama?",a:"Rețeaua canary a Polkadot — mai experimentală și rapidă, folosită pentru testare înainte de implementare pe Polkadot."}],cta:{title:"Continuă să înveți despre Polkadot",description:"Explorează cursurile din EduWeb Academy despre interoperabilitate, Web3 și ecosistemul multi-chain.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este Polkadot",path:"/ce-este-polkadot"}],relatedTopics:[{label:"Ce este Ethereum",path:"/ce-este-ethereum"},{label:"Ce este Web3",path:"/ce-este-web3"},{label:"Preț Polkadot",path:"/polkadot-pret-azi"}],courseTopics:["blockchain","web3"]},en:{title:"What is Polkadot? Complete Beginner's Guide (2025)",metaTitle:"What is Polkadot (DOT)? Complete Guide — Interoperability & Parachains | EduWeb",metaDescription:"Learn what Polkadot is, how parachains work, what Relay Chain does, and why multi-chain interoperability matters.",heroClass:"cat-blockchain",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Polkadot?",subheading:"The protocol connecting blockchains",intro:"Polkadot is a multi-chain interoperability protocol created by Dr. Gavin Wood (Ethereum co-founder, Solidity creator). It allows different blockchains to communicate and transfer data and assets between each other."},sections:[{icon:"globe",title:"History",content:`**2016** — Dr. Gavin Wood publishes the Polkadot whitepaper.
1836
1837**2020** — Relay Chain launch and DOT staking.
1838
1839**2021** — First parachain auctions.
1840
1841**2023** — Polkadot 2.0 introduces agile coretime.
1842
1843**2024–2025** — JAM architecture development.`},{icon:"network",title:"Architecture",content:`**Relay Chain** — Main chain for security and consensus.
1844
1845**Parachains** — Individual blockchains running in parallel.
1846
1847**Bridges** — Connect to external blockchains.
1848
1849**Validators** — Secure Relay Chain.
1850
1851**Collators** — Collect parachain transactions.
1852
1853**Nominators** — DOT holders selecting validators.`},{icon:"link",title:"Why Interoperability Matters",content:`**Problem** — Blockchains are isolated "islands."
1854
1855**Solution** — XCM enables cross-chain messaging without centralized bridges.
1856
1857**Shared Security** — All parachains benefit from Relay Chain security.
1858
1859**Specialization** — Each parachain optimized for specific use cases.
1860
1861**Composability** — Apps across parachains can interact.`},{icon:"coins",title:"DOT Token",content:`**Governance** — Voting in OpenGov.
1862
1863**Staking** — 12-15% APY.
1864
1865**Coretime** — Processing resources.
1866
1867**Treasury** — Community-managed via OpenGov.`},{icon:"blocks",title:"Ecosystem",content:`**Moonbeam** — EVM-compatible parachain.
1868
1869**Acala** — DeFi hub: stablecoin, liquid staking, DEX.
1870
1871**Astar** — Multi-VM parachain.
1872
1873**Phala** — Confidential cloud computing.
1874
1875**Kusama** — Canary network for real-world testing.`},{icon:"zap",title:"Future: Polkadot 2.0 and JAM",content:`**Agile Coretime** — Flexible processing time purchase.
1876
1877**JAM** — Future architecture for maximum scalability.
1878
1879**Async Backing** — Faster parachain blocks.
1880
1881**Elastic Scaling** — Multiple cores per parachain.
1882
1883**Bridge Hub** — Trustless bridges to Ethereum.`}],glossary:{title:"Polkadot Glossary",terms:[{term:"Relay Chain",def:"Main Polkadot chain for security and interoperability."},{term:"Parachain",def:"Individual blockchain running in parallel on Polkadot."},{term:"DOT",def:"Native token for governance, staking, and coretime."},{term:"XCM",def:"Cross-Consensus Messaging protocol."},{term:"Kusama",def:"Polkadot canary network for testing."},{term:"Collator",def:"Node collecting parachain transactions."},{term:"Nominator",def:"DOT holder selecting trusted validators."},{term:"OpenGov",def:"Polkadot's decentralized governance system."},{term:"Coretime",def:"Processing resources on Relay Chain."},{term:"JAM",def:"Join-Accumulate Machine — future Polkadot architecture."}]},faqs:[{q:"What is Polkadot?",a:"A multi-chain protocol enabling different blockchains to communicate and transfer data between each other."},{q:"Who created Polkadot?",a:"Dr. Gavin Wood, Ethereum co-founder and Solidity creator."},{q:"What are parachains?",a:"Individual blockchains running in parallel on Polkadot with shared security."},{q:"How do I stake DOT?",a:"As a nominator (select validators) or through staking pools."},{q:"What is Kusama?",a:"Polkadot's canary network for experimental testing before Polkadot deployment."}],cta:{title:"Continue Learning About Polkadot",description:"Explore EduWeb Academy courses on interoperability, Web3, and the multi-chain ecosystem.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is Polkadot",path:"/what-is-polkadot"}],relatedTopics:[{label:"What is Ethereum",path:"/what-is-ethereum"},{label:"What is Web3",path:"/what-is-web3"},{label:"Polkadot Price",path:"/polkadot-pret-azi"}],courseTopics:["blockchain","web3"]}}},{slugRo:"ce-este-avalanche",slugEn:"what-is-avalanche",content:{ro:{title:"Ce este Avalanche? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este Avalanche (AVAX)? Ghid Complet — Subnets, Finalizare Sub 1s | EduWeb",metaDescription:"Află ce este Avalanche, cum funcționează subnets, de ce finalizarea sub 1 secundă contează și ecosistemul DeFi pe AVAX.",heroClass:"cat-blockchain",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Avalanche?",subheading:"Blockchain-ul cu finalizare sub o secundă",intro:"Avalanche este o platformă blockchain lansată în 2020 de Ava Labs (fondată de profesorul Emin Gün Sirer de la Cornell University). Se remarcă prin finalizare sub 1 secundă, subnets personalizabile și compatibilitate completă cu Ethereum."},sections:[{icon:"globe",title:"Istoria Avalanche",content:`**2018** — Emin Gün Sirer (profesor Cornell, cercetător în sisteme distribuite) co-fondează Ava Labs.
1884
1885**2020** — Lansarea mainnet Avalanche. AVAX se impune rapid ca alternativă la Ethereum.
1886
1887**2021** — Avalanche Rush: program de 180 milioane USD pentru atragerea protocoalelor DeFi. TVL depășește 10 miliarde USD.
1888
1889**2022–2023** — Dezvoltarea Avalanche Warp Messaging și subnets enterprise (Evergreen).
1890
1891**2024–2025** — Avalanche9000 upgrade: subnets devin mai ieftine și mai flexibile. Parteneriate cu instituții financiare pentru tokenizare RWA.`},{icon:"blocks",title:"Arhitectura Tri-Chain",content:`**X-Chain (Exchange)** — Optimizată pe
1891ntru crearea și transferul de active digitale. Folosește consensul Avalanche (DAG-based).
1892
1893**C-Chain (Contract)** — Compatibilă EVM, pentru smart contracts și DApps. Folosește consensul Snowman (liniar).
1894
1895**P-Chain (Platform)** — Coordonează validatorii și gestionează subnets. Administratorul platformei Avalanche.
1896
1897**De ce trei lanțuri?** — Separarea responsabilităților permite optimizarea fiecărui lanț pentru rolul său specific, oferind performanță superioară față de un blockchain monolitic.`},{icon:"gauge",title:"Consensul Avalanche: Rapid și Inovator",content:`**Familie de protocoale** — Snowball → Snowflake → Snowman. Inspirate din meta-stabilitate — cum fluxurile de opinie converg rapid în sisteme biologice.
1898
1899**Sampling repetat** — Fiecare validator întreabă un subset mic de validatori aleatoriu. Prin repetare, consensul converge exponențial rapid.
1900
1901**Finalizare sub 1 secundă** — Tranzacțiile sunt finalizate definitiv în sub 1 secundă, fără risc de reorganizare.
1902
1903**Throughput** — Peste 4.500 TPS pe C-Chain, cu latență de sub 2 secunde.
1904
1905**Eficiență energetică** — Consumul este minimal comparativ cu Proof of Work.`},{icon:"network",title:"Subnets: Blockchain-uri Personalizate",content:`**Ce sunt Subnets?** — Rețele blockchain personalizate care rulează pe infrastructura Avalanche. Fiecare subnet poate avea propriul set de validatori, reguli și tokenomics.
1906
1907**Cazuri de utilizare** — Gaming (Beam subnet), DeFi instituțional (Evergreen subnets), întreprinderi private, CBDC-uri.
1908
1909**Avalanche Evergreen** — Subnets pentru instituții: KYC/AML integrat, acces permissioned, compliance regulatoriu.
1910
1911**Elastic Subnets** — Validatorii pot alege câte subnets doresc, flexibilizând participarea.
1912
1913**Avantaj** — Fiecare subnet nu afectează performanța altora. Un joc viral pe un subnet nu încetinește DeFi-ul pe altul.`},{icon:"coins",title:"Ecosistemul Avalanche",content:`**Trader Joe** — DEX principal pe Avalanche, cu Liquidity Book (concentrated liquidity).
1914
1915**AAVE** — Protocolul major de lending este activ pe Avalanche C-Chain.
1916
1917**Benqi** — Protocol nativ de lending și liquid staking (sAVAX).
1918
1919**GameFi** — Beam (subnet dedicat gaming), cu multiple jocuri blockchain.
1920
1921**Tokenizare RWA** — Parteneriate cu JP Morgan, Citi și alte instituții pentru tokenizarea activelor reale.
1922
1923**Bridge-uri** — Avalanche Bridge conectează rapid cu Ethereum, cu comisioane reduse.`},{icon:"zap",title:"Viitorul Avalanche",content:`**Avalanche9000** — Upgrade major: subnets mai ieftine, interoperabilitate nativă, performanță crescută.
1924
1925**ACP-77** — Subnets „validate" automat de rețea, fără costuri de intrare prohibitive.
1926
1927**Teleporter** — Protocol de mesagerie cross-subnet, similar cu XCM al Polkadot.
1928
1929**Tokenizare Instituțională** — Avalanche se poziționează ca platforma preferată pentru tokenizarea activelor reale (RWA) de către instituțiile financiare.
1930
1931**AI + Blockchain** — Subnets dedicat pentru compute AI descentralizat.`}],glossary:{title:"Glosar Avalanche",terms:[{term:"AVAX",def:"Token-ul nativ Avalanche pentru gas, staking și governance."},{term:"Subnet",def:"Rețea blockchain personalizată pe infrastructura Avalanche."},{term:"C-Chain",def:"Lanțul de contracte Avalanche, compatibil EVM."},{term:"X-Chain",def:"Lanțul de exchange pentru crearea și transferul de active."},{term:"P-Chain",def:"Lanțul platformă pentru coordonarea validatorilor și subnets."},{term:"Snowman",def:"Protocolul de consens liniar folosit pe C-Chain."},{term:"Teleporter",def:"Protocol de mesagerie cross-subnet pe Avalanche."},{term:"sAVAX",def:"AVAX stakeat lichid prin protocolul Benqi."},{term:"Evergreen",def:"Subnets enterprise cu compliance și acces permissioned."},{term:"Finalizare Sub 1s",def:"Tranzacțiile sunt irevocabile în sub 1 secundă pe Avalanche."}]},faqs:[{q:"Ce este Avalanche pe scurt?",a:"Avalanche este un blockchain rapid cu finalizare sub 1 secundă, subnets personalizabile și compatibilitate EVM."},{q:"Cine a creat Avalanche?",a:"Emin Gün Sirer, profesor la Cornell University, prin Ava Labs."},{q:"Ce sunt subnets?",a:"Blockchain-uri personalizate care rulează pe Avalanche, fiecare cu propriile reguli și validatori."},{q:"Este Avalanche compatibil cu Ethereum?",a:"Da, C-Chain este 100% compatibilă EVM. Poți folosi MetaMask și porta aplicații Ethereum direct."},{q:"Cum fac staking cu AVAX?",a:"Poți deveni validator (2.000 AVAX minim) sau delegator (25 AVAX minim) prin portofelul oficial Avalanche."}],cta:{title:"Continuă să înveți despre Avalanche",description:"Explorează cursurile din EduWeb Academy despre blockchain, subnets și DeFi pe Avalanche.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este Avalanche",path:"/ce-este-avalanche"}],relatedTopics:[{label:"Ce este Ethereum",path:"/ce-este-ethereum"},{label:"Ce este Solana",path:"/ce-este-solana"},{label:"Preț Avalanche",path:"/avalanche-pret-azi"}],courseTopics:["blockchain","web3"]},en:{title:"What is Avalanche? Complete Beginner's Guide (2025)",metaTitle:"What is Avalanche (AVAX)? Complete Guide — Subnets & Sub-1s Finality | EduWeb",metaDescription:"Learn what Avalanche is, how subnets work, why sub-1-second finality matters, and the DeFi ecosystem on AVAX.",heroClass:"cat-blockchain",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Avalanche?",subheading:"The blockchain with sub-second finality",intro:"Avalanche is a blockchain platform launched in 2020 by Ava Labs (founded by Cornell Professor Emin Gün Sirer). It features sub-1-second finality, customizable subnets, and full Ethereum compatibility."},sections:[{icon:"globe",title:"History",content:`**2018** — Emin Gün Sirer co-founds Ava Labs.
1932
1933**2020** — Mainnet launch.
1934
1935**2021** — Avalanche Rush: $180M DeFi incentive program.
1936
1937**2024–2025** — Avalanche9000 upgrade, institutional RWA partnerships.`},{icon:"blocks",title:"Tri-Chain Architecture",content:`**X-Chain** — Asset creation/transfer.
1938
1939**C-Chain** — EVM-compatible smart contracts.
1940
1941**P-Chain** — Validator coordination and subnet management.`},{icon:"gauge",title:"Avalanche Consensus",content:`**Repeated Sampling** — Fast consensus through random validator polling.
1942
1943**Sub-1s Finality** — Definitive, no reorganization risk.
1944
1945**4,500+ TPS** on C-Chain.`},{icon:"network",title:"Subnets: Custom Blockchains",content:`**What** — Custom blockchain networks on Avalanche infrastructure.
1946
1947**Use Cases** — Gaming, institutional DeFi, enterprise, CBDCs.
1948
1949**Evergreen** — Enterprise subnets with KYC/AML compliance.
1950
1951**Isolation** — Subnets don't affect each other's performance.`},{icon:"coins",title:"Ecosystem",content:`**Trader Joe** — Main DEX.
1952
1953**AAVE** — Lending on C-Chain.
1954
1955**Benqi** — Native lending + sAVAX liquid staking.
1956
1957**RWA Tokenization** — JP Morgan, Citi partnerships.`},{icon:"zap",title:"Future",content:`**Avalanche9000** — Cheaper subnets, native interoperability.
1958
1959**Teleporter** — Cross-subnet messaging.
1960
1961**Institutional Tokenization** — Preferred platform for RWA.
1962
1963**AI Subnets** — Decentralized AI compute.`}],glossary:{title:"Avalanche Glossary",terms:[{term:"AVAX",def:"Native token for gas, staking, governance."},{term:"Subnet",def:"Custom blockchain network on Avalanche."},{term:"C-Chain",def:"EVM-compatible contract chain."},{term:"X-Chain",def:"Asset exchange chain."},{term:"P-Chain",def:"Platform chain for validators and subnets."},{term:"Snowman",def:"Linear consensus protocol on C-Chain."},{term:"Teleporter",def:"Cross-subnet messaging protocol."},{term:"sAVAX",def:"Liquid staked AVAX via Benqi."},{term:"Evergreen",def:"Enterprise subnets with compliance."},{term:"Sub-1s Finality",def:"Transactions irreversible in under 1 second."}]},faqs:[{q:"What is Avalanche?",a:"A fast blockchain with sub-1s finality, customizable subnets, and EVM compatibility."},{q:"Who created Avalanche?",a:"Emin Gün Sirer, Cornell University professor, through Ava Labs."},{q:"What are subnets?",a:"Custom blockchains on Avalanche with their own rules and validators."},{q:"Is Avalanche EVM compatible?",a:"Yes, C-Chain is 100% EVM compatible. Use MetaMask directly."},{q:"How do I stake AVAX?",a:"As validator (2,000 AVAX min) or delegator (25 AVAX min)."}],cta:{title:"Continue Learning About Avalanche",description:"Explore EduWeb Academy courses on blockchain, subnets, and DeFi on Avalanche.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is Avalanche",path:"/what-is-avalanche"}],relatedTopics:[{label:"What is Ethereum",path:"/what-is-ethereum"},{label:"What is Solana",path:"/what-is-solana"},{label:"Avalanche Price",path:"/avalanche-pret-azi"}],courseTopics:["blockchain","web3"]}}},{slugRo:"ce-este-chainlink",slugEn:"what-is-chainlink",content:{ro:{title:"Ce este Chainlink? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este Chainlink (LINK)? Ghid Complet — Oracole, CCIP & Date Off-Chain | EduWeb",metaDescription:"Află ce este Chainlink, cum funcționează oracolele descentralizate, ce este CCIP și de ce LINK este esențial pentru DeFi și smart contracts.",heroClass:"cat-blockchain",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Chainlink?",subheading:"Rețeaua de oracole care conectează blockchain cu lumea reală",intro:"Chainlink este cea mai importantă rețea de oracole descentralizate din ecosistemul blockchain. Fondată de Sergey Nazarov, Chainlink rezolvă o problemă fundamentală: smart contracts nu pot accesa date din afara blockchain-ului (prețuri, vreme, rezultate sportive). Chainlink furnizează aceste date în mod securizat și descentralizat."},sections:[{icon:"globe",title:"Istoria și Importanța Chainlink",content:`**2017** — Sergey Nazarov și Steve Ellis lansează Chainlink prin ICO, strângând 32 milioane USD.
1964
1965**2019** — Chainlink lansează pe mainnet Ethereum. Primul mare parteneriat: Google Cloud.
1966
1967**2020–2021** — „DeFi Summer" confirmă Chainlink ca infrastructură critică. Peste 1.000 de protocoale integrează Chainlink Price Feeds.
1968
1969**2022** — Lansarea Chainlink Staking v0.1, permițând deținătorilor LINK să securizeze rețeaua.
1970
1971**2023** — CCIP (Cross-Chain Interoperability Protocol) se lansează, permițând comunicarea inter-blockchain.
1972
1973**2024–2025** — Chainlink devine standardul pentru tokenizarea activelor reale (RWA). Parteneriate cu Swift, DTCC, ANZ Bank.`},{icon:"database",title:"Problema Oracolului: De Ce Contează",content:`**Blockchain-ul este orb** — Smart contracts pot accesa doar date de pe propriul blockchain. Nu știu prețul Bitcoin, temperatura din București sau rezultatul unui meci.
1974
1975**Fără oracole, fără DeFi** — Un protocol de lending trebuie să știe prețul colateralului. Un contract de asigurare trebuie să verifice dacă a avut loc un eveniment. Fără date externe, smart contracts sunt inutile.
1976
1977**Problema încrederii** — Un singur oracol centralizat este un punct unic de eșec. Chainlink rezolvă acest lucru prin descentralizare: multiple noduri independente furnizează date, iar rezultatul este agregat.
1978
1979**Chainlink ca infrastructură** — La fel cum internetul are nevoie de DNS, blockchain-ul are nevoie de oracole. Chainlink este DNS-ul lumii crypto.`},{icon:"workflow",title:"Cum Funcționează Chainlink?",content:`**Rețeaua de Noduri** — Operatori independenți de noduri (Oracle nodes) colectează date din surse externe (API-uri, baze de date) și le furnizează on-chain.
1980
1981**Agregare Descentralizată** — Multiple noduri raportează independent. Datele sunt agregate (median, medie ponderată) pentru a elimina erorile și manipularea.
1982
1983**Reputație și Staking** — Nodurile sunt evaluate pe baza performanței istorice. Staking-ul LINK penalizează nodurile necinstite.
1984
1985**Data Feeds** — Fluxuri de prețuri actualizate continuu pentru sute de active. Baza DeFi-ului: Aave, Compound, Synthetix, MakerDAO.
1986
1987**VRF (Verifiable Random Function)** — Generare de numere aleatorii verificabile on-chain. Esențial pentru gaming, NFT-uri și loterii.
1988
1989**Automation (Keepers)** — Execuție automată de smart contracts bazată pe condiții predefinite (ex: lichidare când prețul scade sub un prag).`},{icon:"link",title:"CCIP: Protocolul Cross-Chain",content:`**Ce este CCIP?** — Cross-Chain Interoperability Protocol permite tranzacții și mesaje între diferite blockchain-uri, într-un mod securizat.
1990
1991**Problemă** — Bridge-urile tradiționale au pierdut peste 2 miliarde USD din hack-uri. Sunt puncte slabe critice în ecosistem.
1992
1993**Soluția CCIP** — Folosește rețeaua de oracole Chainlink existentă pentru a verifica mesajele cross-chain, adăugând un strat de securitate absent din bridge-urile tradiționale.
1994
1995**Cazuri de utilizare** — Transferuri de tokenuri cross-chain, mesagerie inter-blockchain, NFT-uri cross-chain, governance multi-chain.
1996
1997**Parteneriate** — Swift (rețeaua interbancară globală) testează CCIP pentru transferuri cross-chain cu bănci tradiționale.`},{icon:"landmark",title:"Chainlink și Tokenizarea Activelor Reale",content:`**RWA (Real World Assets)** — Tokenizarea proprietăților, obligațiunilor, acțiunilor și altor active pe blockchain. Piață estimată la trilioane de dolari.
1998
1999**Proof of Reserve** — Chainlink verifică on-chain că activele tokenizate sunt acoperite de activele reale corespunzătoare.
2000
2001**Swift Integration** — Chainlink conectează sistemul bancar tradițional (Swift, cu 11.000+ bănci) cu blockchain.
2002
2003**DTCC** — Cel mai mare depozitar de titluri de valoare din lume testează Chainlink pentru tokenizare.
2004
2005**Bănci și Corporații** — ANZ Bank, BNY Mellon, Citi explorează Chainlink pentru infrastru
2005ctură cross-chain.`},{icon:"zap",title:"LINK Token și Viitorul Chainlink",content:`**LINK Token** — ERC-20 token folosit pentru plata serviciilor oracol și staking. Supply maxim: 1 miliard LINK.
2006
2007**Staking 2.0** — Nodurile și deținătorii LINK pot face staking pentru a securiza rețeaua și a câștiga recompense.
2008
2009**BUILD Program** — Proiecte care integrează Chainlink primesc acces prioritar la servicii noi în schimbul unui commitment pe termen lung.
2010
2011**Chainlink Functions** — Permite smart contracts să apeleze orice API extern, extinzând enorm capacitățile on-chain.
2012
2013**Data Streams** — Fluxuri de date de înaltă frecvență pentru trading instituțional pe blockchain.
2014
2015**Scale** — Chainlink securizează peste 75 de miliarde USD în valoare (TVE — Total Value Enabled), pe 35+ blockchain-uri.`}],glossary:{title:"Glosar Chainlink",terms:[{term:"Oracol",def:"Serviciu care furnizează date din lumea reală către smart contracts pe blockchain."},{term:"LINK",def:"Token-ul nativ Chainlink, pentru plata serviciilor și staking."},{term:"Price Feed",def:"Flux de prețuri actualizat continuu, folosit de protocoale DeFi."},{term:"CCIP",def:"Cross-Chain Interoperability Protocol — comunicare securizată inter-blockchain."},{term:"VRF",def:"Verifiable Random Function — generare verificabilă de numere aleatorii."},{term:"Automation",def:"Execuție automată de smart contracts bazată pe condiții (ex: la un anumit preț)."},{term:"Proof of Reserve",def:"Verificare on-chain că activele tokenizate sunt acoperite de active reale."},{term:"DON",def:"Decentralized Oracle Network — rețeaua de noduri oracol Chainlink."},{term:"Data Streams",def:"Fluxuri de date de înaltă frecvență pentru trading instituțional."},{term:"Functions",def:"Capacitatea smart contracts de a apela orice API extern prin Chainlink."}]},faqs:[{q:"Ce este Chainlink pe scurt?",a:"Chainlink este rețeaua de oracole descentralizate nr. 1 care conectează smart contracts cu date din lumea reală (prețuri, vreme, rezultate)."},{q:"De ce au nevoie smart contracts de oracole?",a:"Smart contracts pot accesa doar date de pe blockchain. Oracolele furnizează informații externe (prețuri, API-uri) necesare pentru DeFi, asigurări, gaming."},{q:"Ce este CCIP?",a:"Cross-Chain Interoperability Protocol — permite comunicarea securizată între diferite blockchain-uri, mai sigur decât bridge-urile tradiționale."},{q:"Cine folosește Chainlink?",a:"Aave, Compound, Synthetix, MakerDAO și sute de protocoale DeFi. Plus Swift, DTCC și bănci pentru tokenizare."}
2015,{q:"Cum cumpăr LINK?",a:"LINK se cumpără pe Binance, Coinbase, Kraken și alte exchange-uri majore."}],cta:{title:"Continuă să înveți despre Chainlink",description:"Explorează cursurile din EduWeb Academy despre oracole, DeFi și infrastructura blockchain.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este Chainlink",path:"/ce-este-chainlink"}],relatedTopics:[{label:"Ce este Ethereum",path:"/ce-este-ethereum"},{label:"Ce este DeFi",path:"/ce-este-web3"},{label:"Preț Chainlink",path:"/chainlink-pret-azi"}],courseTopics:["blockchain","web3"]},en:{title:"What is Chainlink? Complete Beginner's Guide (2025)",metaTitle:"What is Chainlink (LINK)? Complete Guide — Oracles, CCIP & Off-Chain Data | EduWeb",metaDescription:"Learn what Chainlink is, how decentralized oracles work, what CCIP is, and why LINK is essential for DeFi and smart contracts.",heroClass:"cat-blockchain",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Chainlink?",subheading:"The oracle network connecting blockchain to the real world",intro:"Chainlink is the most important decentralized oracle network in the blockchain ecosystem. Founded by Sergey Nazarov, Chainlink solves a fundamental problem: smart contracts cannot access off-chain data (prices, weather, sports results). Chainlink provides this data securely and in a decentralized manner."},sections:[{icon:"globe",title:"History and Importance",content:`**2017** — Sergey Nazarov launches Chainlink ICO ($32M raised).
2016
2017**2019** — Mainnet launch. Google Cloud partnership.
2018
2019**2020–2021** — DeFi Summer confirms Chainlink as critical infrastructure. 1,000+ integrations.
2020
2021**2023** — CCIP launches for cross-chain communication.
2022
2023**2024–2025** — Standard for RWA tokenization. Swift, DTCC partnerships.`},{icon:"database",title:"The Oracle Problem",content:`**Blockchain is blind** — Smart contracts only access on-chain data.
2024
2025**No oracles, no DeFi** — Lending needs collateral prices. Insurance needs event verification.
2026
2027**Trust problem** — Centralized oracles are single points of failure. Chainlink solves this with decentralization.
2028
2029**Chainlink as infrastructure** — Like DNS for the internet, oracles are DNS for crypto.`},{icon:"workflow",title:"How Chainlink Works",content:`**Node Network** — Independent operators collect external data and deliver on-chain.
2030
2031**Decentralized Aggregation** — Multiple nodes report independently. Data is aggregated.
2032
2033**Data Feeds** — Continuous price feeds for hundreds of assets.
2034
2035**VRF** — Verifiable random number generation.
2036
2037**Automation** — Automatic smart contract execution based on conditions.`},{icon:"link",title:"CCIP: Cross-Chain Protocol",content:`**What** — Secure cross-chain transactions and messages.
2038
2039**Problem** — Traditional bridges lost $2B+ to hacks.
2040
2041**Solution** — Uses existing Chainlink oracle network for verification.
2042
2043**Swift Partnership** — Testing CCIP for traditional bank cross-chain transfers.`},{icon:"landmark",title:"Chainlink and RWA Tokenization",content:`**RWA** — Tokenizing real estate, bonds, stocks on blockchain.
2044
2045**Proof of Reserve** — On-chain verification of tokenized asset backing.
2046
2047**Swift** — Connecting 11,000+ banks to blockchain.
2048
2049**DTCC, ANZ, Citi** — Testing Chainlink for infrastructure.`},{icon:"zap",title:"LINK Token and Future",content:`**LINK** — ERC-20 for oracle payments and staking. 1B max supply.
2050
2051**Staking 2.0** — Secure the network and earn rewards.
2052
2053**Functions** — Smart contracts can call any external API.
2054
2055**Data Streams** — High-frequency data for institutional trading.
2056
2057**Scale** — $75B+ Total Value Enabled across 35+ blockchains.`}],glossary:{title:"Chainlink Glossary",terms:[{term:"Oracle",def:"Service providing real-world data to blockchain smart contracts."},{term:"LINK",def:"Chainlink native token for payments and staking."},{term:"Price Feed",def:"Continuously updated price data used by DeFi protocols."},{term:"CCIP",def:"Cross-Chain Interoperability Protocol for secure inter-blockchain communication."},{term:"VRF",def:"Verifiable Random Function for provably random number generation."},{term:"Automation",def:"Automatic smart contract execution based on conditions."},{term:"Proof of Reserve",def:"On-chain verification that tokenized assets have real backing."},{term:"DON",def:"Decentralized Oracle Network."},{term:"Data Streams",def:"High-frequency data feeds for institutional trading."},{term:"Functions",def:"Smart contracts calling any external API through Chainlink."}]},faqs:[{q:"What is Chainlink?",a:"The #1 decentralized oracle network connecting smart contracts with real-world data."},{q:"Why do smart contracts need oracles?",a:"Smart contracts only access blockchain data. Oracles provide external information needed for DeFi, insurance, gaming."},{q:"What is CCIP?",a:"Cross-Chain Interoperability Protocol — secure communication between different blockchains."},{q:"Who uses Chainlink?",a:"Aave, Compound, Synthetix, MakerDAO, and hundreds of DeFi protocols. Plus Swift, DTCC, and banks."},{q:"How do I buy LINK?",a:"LINK is available on Binance, Coinbase, Kraken and other major exchanges."}],cta:{title:"Continue Learning About Chainlink",description:"Explore EduWeb Academy courses on oracles, DeFi, and blockchain infrastructure.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is Chainlink",path:"/what-is-chainlink"}],relatedTopics:[{label:"What is Ethereum",path:"/what-is-ethereum"},{label:"What is DeFi",path:"/what-is-web3"},{label:"Chainlink Price",path:"/chainlink-pret-azi"}],courseTopics:["blockchain","web3"]}}}];function sQe(e){return eb.find(r=>r.slugRo===e||r.slugEn===e)}eb.map(e=>e.slugRo);eb.map(e=>e.slugEn);const oQe={ro:[{title:"Ce este Web3?",desc:"Internetul descentralizat – cum funcționează.",path:"/ce-este-web3",icon:Dr},{title:"Ce este Blockchain?",desc:"Tehnologia din spatele criptomonedelor.",path:"/ce-este-blockchain",icon:es},{title:"Ce este Crypto?",desc:"Ghid complet despre criptomonede.",path:"/ce-este-crypto",icon:Zh}],en:[{title:"What is Web3?",desc:"The decentralized internet – how it works.",path:"/what-is-web3",icon:Dr},{title:"What is Blockchain?",desc:"The technology behind cryptocurrencies.",path:"/what-is-blockchain",icon:es},{title:"What is Crypto?",desc:"Complete guide to cryptocurrencies.",path:"/what-is-crypto",icon:Zh}]};function lQe(){const{lang:e,t:r}=Pt(),n=e==="ro",i=oQe[e],a=w.useMemo(()=>eb.slice(0,4).map(l=>{const c=n?l.content.ro:l.content.en;return{title:c.title.split("?")[0]+"?",desc:c.metaDescription.slice(0,70)+"…",path:n?`/${l.slugRo}`:`/${l.slugEn}`,icon:Koe}}),[n]),o=[...i,...a];return s.jsx("section",{className:"w-full px-4 md:px-6 lg:px-8 py-10",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"mb-6 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("div",{className:"w-7 h-7 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(ms,{size:16,className:"text-primary"})}),s.jsx("h2",{className:"font-heading text-xl font-bold text-foreground",children:r("home.start_here")})]}),s.jsx("p",{className:"text-sm text-muted-foreground ml-9",children:r("home.start_here_desc")}),s.jsx("p",{className:"text-sm font-medium text-primary ml-9 mt-1",children:r("home.start_here_hint")})]}),s.jsxs(be,{to:n?"/ce-este":"/what-is",className:"hidden sm:flex items-center gap-1 text-sm font-medium text-primary hover:underline",children:[n?"Vezi toate ghidurile":"View all guides"," ",s.jsx(Gt,{size:14})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",children:o.map((l,c)=>{const u=l.icon;return s.jsx(Le.div,{initial:{opacity:0,y:10}
2057,animate:{opacity:1,y:0},transition:{delay:c*.04},children:s.jsxs(be,{to:l.path,className:`group flex items-start gap-3 p-4 rounded-xl border bg-card hover:border-primary/30 hover:shadow-md transition-all h-full ${c===0?"border-primary/40 ring-1 ring-primary/20 bg-primary/5":"border-border"}`,children:[s.jsx("div",{className:"shrink-0 w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center group-hover:bg-primary/20 transition-colors",children:s.jsx(u,{size:18,className:"text-primary"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h3",{className:"font-heading text-sm font-semibold text-foreground group-hover:text-primary transition-colors",children:l.title}),s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mt-0.5",children:l.desc})]})]})},l.path)})}),s.jsx("div",{className:"sm:hidden mt-3 text-center",children:s.jsxs(be,{to:n?"/ce-este":"/what-is",className:"inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",children:[n?"Vezi toate ghidurile":"View all guides"," ",s.jsx(Gt,{size:14})]})})]})})}const nG=[{icon:ms,key:"understand",link:"/ce-este",linkEn:"/what-is",color:"from-blue-500/20 to-blue-600/5",iconColor:"text-blue-600 dark:text-blue-400",emoji:"🧠"},{icon:ZA,key:"read",link:"/stiri",linkEn:"/stiri",color:"from-emerald-500/20 to-emerald-600/5",iconColor:"text-emerald-600 dark:text-emerald-400",emoji:"📰"},{icon:yr,key:"glossary",link:"/glosar",linkEn:"/glosar",color:"from-amber-500/20 to-amber-600/5",iconColor:"text-amber-600 dark:text-amber-400",emoji:"📖"},{icon:Rr,key:"course",link:"/academy",linkEn:"/academy",color:"from-purple-500/20 to-purple-600/5",iconColor:"text-purple-600 dark:text-purple-400",emoji:"🎓"},{icon:Eu,key:"practice",link:"/simulari-web3",linkEn:"/simulari-web3",color:"from-teal-500/20 to-teal-600/5",iconColor:"text-teal-600 dark:text-teal-400",emoji:"🎮"}];function cQe(){const{lang:e,t:r}=Pt(),n=e==="ro";return s.jsx("section",{className:"w-full px-4 md:px-6 lg:px-8 py-6 border-y border-border/30 bg-secondary/20",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsx("h2",{className:"font-heading text-base md:text-lg font-bold text-foreground text-center mb-1",children:r("home.learning_path_title")}),s.jsx("p",{className:"text-sm text-muted-foreground text-center mb-5",children:r("home.learning_path_desc")}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3",children:nG.map((i,a)=>{const o=n?i.link:i.linkEn;return s.jsxs(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:a*.06},className:"relative",children:[s.jsxs(be,{to:o,className:`group flex flex-col items-center text-center p-4 md:p-5 rounded-xl border border-border bg-gradient-to-b ${i.color} hover:border-primary/30 hover:shadow-md transition-all h-full cursor-pointer`,children:[s.jsx("span",{className:"text-3xl md:text-4xl mb-2",children:i.emoji}),s.jsx("span",{className:"text-[10px] font-bold text-muted-foreground/50 font-mono mb-1",children:String(a+1).padStart(2,"0")}),s.jsx("h3",{className:"font-heading text-sm font-semibold text-foreground group-hover:text-primary transition-colors",children:r(`home.step_${i.key}`)}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-1 line-clamp-2",children:r(`home.step_${i.key}_desc`)})]}),a<nG.length-1&&s.jsx("div",{className:"hidden lg:flex absolute -right-2 top-1/2 -translate-y-1/2 z-10 w-4 h-4 rounded-full bg-border items-center justify-center",children:s.jsx(hs,{size:10,className:"text-muted-foreground"})})]},i.key)})})]})})}function iG(e,r){return w.useMemo(()=>{if(e.length<=r)return e;const i=Math.floor(Date.now()/864e5)%e.length,a=[];for(let o=0;o<r;o++)a.push(e[(i+o)%e.length]);return a},[e,r])}function uQe(){const{lang:e}=Pt(),r=e==="ro",n=w.useMemo(()=>{const o=r?[{title:"Ce este Web3?",path:"/ce-este-web3"},{title:"Ce este Blockchain?",path:"/ce-este-blockchain"},{title:"Ce este Crypto?",path:"/ce-este-crypto"}]:[{title:"What is Web3?",path:"/what-is-web3"},{title:"What is Blockchain?",path:"/what-is-blockchain"},{title:"What is Crypto?",path:"/what-is-crypto"}],l=eb.map(c=>({title:(r?c.content.ro:c.content.en).title.split("?")[0]+"?",path:r?`/${c.slugRo}`:`/${c.slugEn}`}));return[...o,...l]},[r]);iG(n,12);const{data:i=[]}=Xe({queryKey:["home-glossary",e],queryFn:async()=>{const{data:o}=await G.from("glossary_terms").select("slug, term_ro, term_en, short_def_ro, short_def_en").eq("is_published",!0).limit(50);return o?o.map(l=>({slug:l.slug,term:e==="en"&&l.term_en?l.term_en:l.term_ro,shortDef:e==="en"&&l.short_def_en?l.short_def_en:l.short_def_ro})):[]},staleTime:10*6e4}),a=iG(i,24);return s.jsx("div",{className:"w-full px-4 md:px-6 lg:px-8 py-6",children:s.jsx("div",{className:"max-w-6xl mx-auto",children:s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2.5",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(yr,{size:14,className:"text-primary"}),s.jsx("h3",{className:"font-heading text-sm font-bold text-foreground",children:r?"Glosar":"Glossary"})]}),s.jsxs(be,{to:"/glosar",className:"text-[11px] font-medium text-primary hover:underline flex items-center gap-0.5",children:[r?"Toate":"All"," ",s.jsx(Gt,{size:10})]})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.length===0?s.jsx("span",{className:"text-xs text-muted-foreground",children:r?"Se încarcă…":"Loading…"}):a.map(o=>s.jsxs(be,{to:`/glosar/${o.slug}`,className:"inline-flex items-center gap-1 px-3 py-1.5 rounded-full border border-border bg-card text-xs font-medium text-foreground hover:border-primary/40 hover:text-primary hover:bg-primary/5 transition-all",title:o.shortDef,children:[s.jsx(yr,{size:10,
2057className:"text-primary shrink-0"}),o.term]},o.slug))})]})})})}function P_(e,r="ro"){var f,p;const n={web3:"web3",blockchain:"blockchain",nft:"nft","validare-nft":"validare-nft",ai:"ai","digital-marketing":"digital-marketing","e-learning":"e-learning"},i={aggregated:"aggregated",ai_brief:"ai-brief"},a=(e.topics||[]).map(m=>n[m]).filter(Boolean),o=r==="en"&&e.title_en?e.title_en:e.title_ro,l=r==="en"&&e.summary_en?e.summary_en:e.summary_ro||"",c=r==="en"&&e.body_en?e.body_en:e.body_ro||"",u=r==="en"&&((f=e.faqs_en)!=null&&f.length)?e.faqs_en:e.faqs||[];let d;try{d=(p=e.source_links)!=null&&p[0]?new URL(e.source_links[0]).hostname:void 0}catch{d=void 0}const h=e.slug_en;return{id:e.id,slug:e.slug,slugEn:h||void 0,title:o,summary:l,content:c,topic:a[0]||"web3",topics:a.length>0?a:["web3"],difficulty:e.difficulty_level,contentType:i[e.type]||"aggregated",sourceUrl:e.original_url||void 0,sourceName:d,publishedAt:e.published_at||e.created_at,imageUrl:e.image_url||void 0,originalPublishedAt:e.original_published_at||void 0,faqs:u,hasVideo:!!(e.video_audio_url&&e.video_status==="ready")}}const Bfe="id,slug,slug_en,title_ro,title_en,summary_ro,summary_en,topics,difficulty_level,type,image_url,published_at,created_at,original_url,original_published_at,source_links,pinned_until,video_audio_url,video_status,ai_generated,editorial_reviewed,author_id,source_id,status";function dQe(e){const{lang:r}=Pt();return Xe({queryKey:["published-posts",e,r],queryFn:async()=>{let n=G.from("posts").select(Bfe).eq("status","published").lte("published_at",new Date().toISOString()).order("published_at",{ascending:!1});if(e!=null&&e.topic&&(n=n.contains("topics",[e.topic])),e!=null&&e.type){const c=e.type==="ai-brief"?"ai_brief":"aggregated";n=n.eq("type",c)}e!=null&&e.limit&&(n=n.limit(e.limit));const{data:i,error:a}=await n;if(a)throw a;const o=new Date().toISOString();return(i||[]).sort((c,u)=>{const d=c.pinned_until&&c.pinned_until>o?1:0,h=u.pinned_until&&u.pinned_until>o?1:0;return d!==h?h-d:new Date(u.published_at||u.created_at).getTime()-new Date(c.published_at||c.created_at).getTime()}).map(c=>P_(c,r))}})}const WI=20;function y$(e){const{lang:r}=Pt(),n=(e==null?void 0:e.page)||1,i=(n-1)*WI,a=i+WI-1;return Xe({queryKey:["paginated-posts",e,r],queryFn:async()=>{let o=G.from("posts").select("id",{count:"exact",head:!0}).eq("status","published").lte("published_at",new Date().toISOString()),l=G.from("posts").select(Bfe).eq("status","published").lte("published_at",new Date().toISOString()).order("published_at",{ascending:!1}).range(i,a);if(e!=null&&e.topic&&(o=o.contains("topics",[e.topic]),l=l.contains("topics",[e.topic])),e!=null&&e.type){const p=e.type==="ai-brief"?"ai_brief":"aggregated";o=o.eq("type",p),l=l.eq("type",p)}const[{count:c},{data:u,error:d}]=await Promise.all([o,l]);if(d)throw d;const h=new Date().toISOString();return{articles:(u||[]).sort((p,m)=>{const A=p.pinned_until&&p.pinned_until>h?1:0,g=m.pinned_until&&m.pinned_until>h?1:0;return A!==g?g-A:new Date(m.published_at||m.created_at).getTime()-new Date(p.published_at||p.created_at).getTime()}).map(p=>P_(p,r)),totalCount:c||0,totalPages:Math.ceil((c||0)/WI),currentPage:n}}})}function Tfe(){const{lang:e,t:r}=Pt(),n=e==="en"?"en-US":"ro-RO",{data:i=[],isLoading:a}=Xe({queryKey:["most-read-articles",e],queryFn:async()=>{try{const p=new Map;let m=0;const A=1e3;for(;;){const{data:v,error:j}=await G.from("post_views").select("post_id").range(m,m+A-1);if(j)throw j;if(!v||v.length===0)break;for(const _ of v)_.post_id&&p.set(_.post_id,(p.get(_.post_id)||0)+1);if(v.length<A)break;m+=A}if(p.size===0)return[];const g=[...p.entries()].sort((v,j)=>j[1]-v[1]).slice(0,7).map(([v])=>v);if(g.length===0)return[];const{data:y,error:x}=await G.from("posts").select("id, title_ro, title_en, slug, image_url, published_at").in("id",g).eq("status","published");if(x)throw x;if(!y||y.length===0)return[];const b=new Map(y.map(v=>[v.id,v]));return g.map(v=>b.get(v)).filter(Boolean).map(v=>({id:v.id,title:e==="en"&&v.title_en?v.title_en:v.title_ro,slug:v.slug,imageUrl:v.image_url,publishedAt:v.published_at}))}catch(p){return console.error("Failed to load most read articles",p),[]}},staleTime:5*6e4}),{data:o=[],isLoading:l}=dQe({limit:7}),c=i.length>0?i:o.slice(0,7).map(p=>({id:p.id,title:p.title,slug:p.slug,imageUrl:p.imageUrl??null,publishedAt:p.publishedAt??null}));if((a||l)&&c.length===0||c.length===0)return null;const u=c[0],d=c.slice(1,7),h=d.filter((p,m)=>m%2===0),f=d.filter((p,m)=>m%2===1);return s.jsx("div",{className:"w-full px-4 md:px-6 lg:px-8 py-6",children:s.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden p-4 md:p-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(oa,{size:18,className:"text-primary"}),s.jsx("h2",{className:"font-heading text-lg font-bold text-foreground",children:r("home.latest_news_title")})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4 ml-[26px]",children:r("home.latest_news_desc")}),s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 lg:gap-6",children:[s.jsxs(be,{to:`/articol/${u.slug}`,className:"group lg:w-[38%] shrink-0",children:[u.imageUrl&&s.jsx("div",{className:"overflow-hidden rounded-lg mb-3",children:s.jsx("img",{src:u.imageUrl,alt:u.title,className:"w-full aspect-[16/10] object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"})}),s.jsxs("div",{className:"flex items-start gap-2.5",children:[s.jsx("span",{className:"shrink-0 w-7 h-7 rounded-full bg-primary flex items-center justify-center text-xs font-heading font-bold text-primary-foreground",children:"01."}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-heading text-base md:text-lg font-bold leading-snug text-foreground group-hover:text-primary transition-colors",children:u.title}),u.publishedAt&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:new Date(u.publishedAt).toLocaleDateString(n,{day:"numeric",month:"short",year:"numeric"})})]})]})]}),s.jsxs("div",{className:"flex-1 grid grid-cols-1 md:grid-cols-2 gap-x-5 gap-y-0",children:[s.jsx("div",{className:"divide-y divide-border/40",children:h.map((p,m)=>{const A=String(m*2+2).padStart(2,"0");return s.jsxs(be,{to:`/articol/${p.slug}`,className:"group flex items-start gap-3 py-4 first:pt-0",children:[s.jsxs("span",{className:"shrink-0 w-7 h-7 rounded-full bg-primary flex items-center justify-center text-xs font-heading font-bold text-primary-foreground",children:[A,"."]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h4",{className:"font-heading text-sm font-semibold leading-snug text-foreground group-hover:text-primary transition-colors line-clamp-3",children:p.title}),p.publishedAt&&s.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:new Date(p.publishedAt).toLocaleDateString(n,{day:"numeric",month:"short",year:"numeric"})})]})]}
2057,p.id)})}),s.jsx("div",{className:"divide-y divide-border/40",children:f.map((p,m)=>{const A=String(m*2+3).padStart(2,"0");return s.jsxs(be,{to:`/articol/${p.slug}`,className:"group flex items-start gap-3 py-4 first:pt-0",children:[s.jsxs("span",{className:"shrink-0 w-7 h-7 rounded-full bg-primary flex items-center justify-center text-xs font-heading font-bold text-primary-foreground",children:[A,"."]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h4",{className:"font-heading text-sm font-semibold leading-snug text-foreground group-hover:text-primary transition-colors line-clamp-3",children:p.title}),p.publishedAt&&s.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:new Date(p.publishedAt).toLocaleDateString(n,{day:"numeric",month:"short",year:"numeric"})})]})]},p.id)})})]})]})]})})}function hQe(){const{lang:e,t:r}=Pt(),n=e==="ro",{data:i=[]}=Xe({queryKey:["homepage-courses"],queryFn:async()=>{const{data:l}=await G.from("courses").select("id, title, title_en, slug, topics, total_lessons, estimated_hours, price_type, difficulty_level, image_url").eq("is_published",!0).order("created_at",{ascending:!1}).limit(3);return l||[]},staleTime:10*6e4}),a=n?"Gratuit":"Free",o=n?"lecții":"lessons";return s.jsx("section",{className:"w-full px-4 md:px-6 lg:px-8 py-8",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"mb-6 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-7 h-7 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(Rr,{size:16,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-xl font-bold text-foreground",children:r("home.academy_title")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:r("home.academy_desc")})]})]}),s.jsxs(be,{to:"/academy",className:"hidden sm:flex items-center gap-1 text-sm font-medium text-primary hover:underline",children:[r("home.academy_cta")," ",s.jsx(Gt,{size:14})]})]}),i.length>0?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:i.map((l,c)=>s.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:c*.06},children:s.jsxs(be,{to:"/academy",className:"group flex flex-col h-full rounded-xl border border-border bg-card overflow-hidden hover:border-primary/30 hover:shadow-md transition-all",children:[l.image_url&&s.jsx("div",{className:"aspect-[16/9] overflow-hidden",children:s.jsx("img",{src:l.image_url,alt:n?l.title:l.title_en||l.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"})}),s.jsxs("div",{className:"p-5 flex flex-col flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.price_type==="free"&&s.jsx("span",{className:"text-[10px] font-bold text-primary bg-primary/10 px-2 py-0.5 rounded-full",children:a}),s.jsx("span",{className:"text-[10px] font-medium text-muted-foreground capitalize",children:l.difficulty_level})]}),s.jsx("h3",{className:"font-heading text-sm font-semibold text-foreground group-hover:text-primary transition-colors mb-2 line-clamp-2",children:n?l.title:l.title_en||l.title}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground mt-auto",children:[l.total_lessons>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(yr,{size:11})," ",l.total_lessons," ",o]}),l.estimated_hours&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ki,{size:11})," ",l.estimated_hours,"h"]})]})]})]})},l.id))}):s.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-8 text-center",children:[s.jsx(Rr,{size:32,className:"text-primary mx-auto mb-3"}),s.jsx("p",{className:"font-heading font-semibold mb-1",children:r("home.academy_title")}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:r("home.academy_desc")}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 px-5 py-2.5 bg-primary text-primary-foreground rounded-lg text-sm font-semibold hover:brightness-110 transition-all",children:[r("home.academy_cta")," ",s.jsx(Gt,{size:14})]})]}),s.jsx("div",{className:"sm:hidden mt-3 text-center",children:s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",children:[r("home.academy_cta")," ",s.jsx(Gt,{size:14})]})})]})})}function fQe(){return new Date().toISOString().slice(0,10)}function Pfe(e){return Xe({queryKey:["events","public-future"],queryFn:async()=>{let r=G.from("events").select("*").order("start_date",{ascending:!0});{const a=fQe();r=r.eq("is_published",!0).or(`end_date.gte.${a},and(end_date.is.null,start_date.gte.${a})`)}const{data:n,error:i}=await r;if(i)throw i;return n??[]}})}function mQe(e){return Xe({queryKey:["event",e],enabled:!!e,queryFn:async()=>{const{data:r,error:n}=await G.from("events").select("*").or(`slug.eq.${e},slug_en.eq.${e}`).eq("is_published",!0).maybeSingle();if(n)throw n;if(!r)return null;const{data:i}=await G.from("event_testimonials").select("*").eq("event_id",r.id).order("sort_order",{ascending:!0});return{event:r,testimonials:i??[]}}})}function pQe(){const{lang:e}=Pt(),r=e==="ro",{data:n=[],isLoading:i}=Pfe(),a=n.slice(0,6);if(!i&&a.length===0)return null;const o=(u,d)=>{const h=r?"ro-RO":"en-GB",f=new Date(u);if(!d)return f.toLocaleDateString(h,{day:"numeric",month:"short",year:"numeric"});const p=new Date(d);return f.getMonth()===p.getMonth()&&f.getFullYear()===p.getFullYear()?`${f.getDate()}–${p.getDate()} ${f.toLocaleDateString(h,{month:"short",year:"numeric"})}`:`${f.toLocaleDateString(h,{day:"numeric",month:"short"})} – ${p.toLocaleDateString(h,{day:"numeric",month:"short",year:"numeric"})}`},l=u=>u==="online"?"Online":u==="hybrid"?r?"Hibrid":"Hybrid":r?"Fizic":"Onsite",c=r?"/evenimente":"/events";return s.jsx("section",{className:"w-full px-4 md:px-6 lg:px-8 py-12 md:py-16",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between gap-4 mb-8",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-primary/10 text-primary text-xs font-semibold mb-3",children:[s.jsx(Ja,{size:14}),r?"Evenimente apropiate":"Upcoming events"]}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl lg:text-4xl font-bold tracking-tight",children:r?s.jsxs(s.Fragment,{children:["Evenimente ",s.jsx("span",{className:"text-primary",children:"Web3, AI & Marketing"})]}):s.jsxs(s.Fragment,{children:["Top ",s.jsx("span",{className:"text-primary",children:"Web3, AI & Marketing"})," events"]})}),s.jsx("p",{className:"text-muted-foreground mt-2 max-w-2xl",children:r?"Cele mai relevante conferințe din lume despre AI, crypto, Web3, blockchain și marketing digital — sortate cronologic.":"The most relevant global conferences on AI, crypto, Web3, blockchain and digital marketing — sorted chronologically."})]}),s.jsxs(be,{to:c,className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-lg text-sm font-heading font-semibold bg-primary/10 text-primary hover:bg-primary hover:text-primary-foreground transition-all self-start md:self-auto",children:[r?"Vezi toate evenimentele":"See all events",s.jsx(Gt,{size:14})]})]}),i&&s.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6}).map((u,d)=>s.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[s.jsx("div",{className:"aspect-[16/9] bg-muted animate-pulse"}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsx("div",{className:"h-4 bg-muted rounded animate-pulse w-3/4"}),s.jsx("div",{className:"h-3 bg-muted rounded animate-pulse w-1/2"})]})]},d))}),!i&&s.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:a.map(u=>{const d=r?u.title:u.title_en||u.title,h=r?u.summary:u.summary_en||u.summary,f=r?u.slug:u.slug_en||u.slug,p=`${c}/${f}`;return s.jsxs(be,{to:p,className:"group flex flex-col rounded-xl border border-border bg-card overflow-hidden hover:border-primary/40 hover:shadow-lg transition-all",children:[s.jsxs("div",{className:"relative aspect-[16/9] overflow-hidden bg-gradient-to-br from-primary/20 via-primary/5 to-secondary",children:[u.cover_image_url?s.jsx("img",{src:u.cover_image_url,alt:d,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):s.jsx("div",{className:"w-full h-full flex items-center justify-center",children:s.jsx(Ja,{size:48,className:"text-primary/40"})}),s.jsxs("div",{className:"absolute top-3 left-3 flex gap-2",children:[s.jsx("span",{className:"px-2 py-1 rounded-md bg-background/90 backdrop-blur text-xs font-bold text-foreground",children:l(u.format)}),u.country&&s.jsxs("span",{className:"px-2 py-1 rounded-md bg-background/90 backdrop-blur text-xs font-medium text-foreground inline-flex items-center gap-1",children:[s.jsx(XSe,{size:11})," ",u.country]})]})]}),s.jsxs("div",{className:"p-5 flex flex-col flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[s.jsx(Ja,{size:13,className:"text-primary"}),s.jsx("span",{className:"font-medium",children:o(u.start_date,u.end_date)})]}),s.jsx("h3",{className:"font-heading font-bold text-base md:text-lg leading-tight mb-2 group-hover:text-primary transition-colors line-clamp-2",children:d}),h&&s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 flex-1",children:h}),s.jsxs("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border/60",children:[(u.city||u.venue)&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground truncate",children:[s.jsx(Mg,{size:12,className:"text-primary flex-shrink-0"}),s.jsx("span",{className:"truncate",children:u.city||u.venue})]}),u.rating_score&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-foreground flex-shrink-0",children:[s.jsx(cp,{size:12,className:"text-primary fill-primary"}),u.rating_score.toFixed(1),u.rating_count?s.jsxs("span",{className:"text-muted-foreground font-normal",children:["(",u.rating_count,")"]}):null]})]})]})]},u.id)})})]})})}const aG={"identitate-digitala":{label:"Identitate Digitală",labelEn:"Digital Identity",color:"bg-blue-500/10 text-blue-600 dar
2057k:text-blue-400"},"dao-guvernanta":{label:"DAO & Guvernanță",labelEn:"DAO & Governance",color:"bg-purple-500/10 text-purple-600 dark:text-purple-400"},"supply-chain":{label:"Supply Chain",labelEn:"Supply Chain",color:"bg-orange-500/10 text-orange-600 dark:text-orange-400"},"defi-tokenizare":{label:"DeFi & Tokenizare",labelEn:"DeFi & Tokenization",color:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400"},"gaming-metaverse":{label:"Gaming & Metaverse",labelEn:"Gaming & Metaverse",color:"bg-pink-500/10 text-pink-600 dark:text-pink-400"},"social-creator":{label:"Social & Creator",labelEn:"Social & Creator",color:"bg-cyan-500/10 text-cyan-600 dark:text-cyan-400"},infrastructura:{label:"Infrastructură",labelEn:"Infrastructure",color:"bg-slate-500/10 text-slate-600 dark:text-slate-400"},sanatate:{label:"Sănătate",labelEn:"Healthcare",color:"bg-red-500/10 text-red-600 dark:text-red-400"},educatie:{label:"Educație",labelEn:"Education",color:"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400"},"energie-mediu":{label:"Energie & Mediu",labelEn:"Energy & Environment",color:"bg-green-500/10 text-green-600 dark:text-green-400"}};function AQe(){const{lang:e}=Pt(),r=e==="ro",n=r?"/web3-studii-de-caz":"/web3-case-studies",{data:i=[]}=Xe({queryKey:["homepage-case-studies"],queryFn:async()=>{const{data:o}=await G.from("web3_case_studies").select("id, title, title_en, slug, category, company_name, summary_ro, summary_en, published_at").eq("status","published").order("published_at",{ascending:!1}).limit(3);return o||[]},staleTime:10*6e4}),a=o=>o?new Date(o).toLocaleDateString(r?"ro-RO":"en-US",{day:"numeric",month:"short",year:"numeric"}):"";return s.jsx("section",{className:"w-full px-4 md:px-6 lg:px-8 py-8",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"mb-6 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-7 h-7 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(us,{size:16,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-xl font-bold text-foreground",children:r?"Studii de Caz Web3":"Web3 Case Studies"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:r?"Proiecte reale care transformă industriile cu tehnologie Web3":"Real projects transforming industries with Web3 technology"})]})]}),s.jsxs(be,{to:n,className:"hidden sm:flex items-center gap-1 text-sm font-medium text-primary hover:underline",children:[r?"Vezi toate":"View all"," ",s.jsx(Gt,{size:14})]})]}),i.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:i.map((o,l)=>{const c=aG[o.category||""]||aG.infrastructura,u=`${n}/${o.slug}`;return s.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:l*.06},children:s.jsx(be,{to:u,className:"group flex flex-col h-full rounded-xl border border-border bg-card overflow-hidden hover:border-primary/30 hover:shadow-md transition-all",children:s.jsxs("div",{className:"p-5 flex flex-col flex-1",children:[s.jsx("div",{className:"flex items-center gap-2 mb-2",children:s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium ${c.color}`,children:r?c.label:c.labelEn})}),s.jsx("h3",{className:"font-heading text-sm font-semibold text-foreground group-hover:text-primary transition-colors mb-2 line-clamp-2",children:r?o.title:o.title_en||o.title}),s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-3",children:r?o.summary_ro:o.summary_en||o.summary_ro}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mt-auto",children:[o.company_name&&s.jsx("span",{className:"font-medium",children:o.company_name}),o.company_name&&o.published_at&&s.jsx("span",{children:"·"}),o.published_at&&s.jsx("span",{children:a(o.published_at)})]})]})})},o.id)})}),s.jsx("div",{className:"mt-5 text-center",children:s.jsxs(be,{to:n,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-primary text-primary-foreground rounded-lg text-sm font-semibold hover:brightness-110 transition-all",children:[r?"Citește toate studiile de caz":"Read all case studies"," ",s.jsx(Gt,{size:14})]})})]}):s.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-8 text-center",children:[s.jsx(us,{size:32,className:"text-primary mx-auto mb-3"}),s.jsx("p",{className:"font-heading font-semibold mb-1",children:r?"Studii de Caz Web3":"Web3 Case Studies"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:r?"Proiecte reale care transformă industriile cu tehnologie Web3":"Real projects transforming industries with Web3 technology"}),s.jsxs(be,{to:n,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-primary text-primary-foreground rounded-lg text-sm font-semibold hover:brightness-110 transition-all",children:[r?"Descoperă studiile de caz":"Discover case studies"," ",s.jsx(Gt,{size:14})]})]}),s.jsx("div",{className:"sm:hidden mt-3 text-center",children:s.jsxs(be,{to:n,className:"inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",children:[r?"Vezi toate":"View all"," ",s.jsx(Gt,{size:14})]})})]})})}const gQe=[{icon:Ec,emoji:"🤖",key:"ai_tutor",link:"/membru?tab=ai",color:"from-blue-500/20 to-blue-600/5",iconColor:"text-blue-600 dar
2057k:text-blue-400"},{icon:l4,emoji:"🧠",key:"knowledge_map",link:"/knowledge-map",color:"from-purple-500/20 to-purple-600/5",iconColor:"text-purple-600 dark:text-purple-400"},{icon:Eu,emoji:"🎮",key:"simulations",link:"/simulari-web3",color:"from-emerald-500/20 to-emerald-600/5",iconColor:"text-emerald-600 dark:text-emerald-400"}],xQe={ro:{title:"Funcționalități Inovatoare",desc:"Instrumente interactive care transformă modul în care înveți despre Web3.",ai_tutor:"AI Tutor Tudor",ai_tutor_desc:"Asistentul tău personal AI. Pune întrebări, primește explicații personalizate și exerciții interactive.",knowledge_map:"Knowledge Map",knowledge_map_desc:"Hartă vizuală interactivă a conexiunilor dintre concepte. Explorează și descoperă legături.",simulations:"Simulări Web3",simulations_desc:"Exersează tranzacții, wallet-uri și swap-uri într-un sandbox sigur, fără risc real.",explore:"Explorează"},en:{title:"Innovative Features",desc:"Interactive tools that transform the way you learn about Web3.",ai_tutor:"AI Tutor Tudor",ai_tutor_desc:"Your personal AI assistant. Ask questions, get personalized explanations and interactive exercises.",knowledge_map:"Knowledge Map",knowledge_map_desc:"Interactive visual map of concept connections. Explore and discover relationships.",simulations:"Web3 Simulations",simulations_desc:"Practice transactions, wallets and swaps in a safe sandbox, with no real risk.",explore:"Explore"}};function yQe(){const{lang:e}=Pt(),r=xQe[e];return s.jsx("section",{className:"w-full px-4 md:px-6 lg:px-8 py-8",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-bold text-foreground text-center mb-1",children:r.title}),s.jsx("p",{className:"text-sm text-muted-foreground text-center mb-6",children:r.desc}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:gQe.map((n,i)=>s.jsx(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:i*.08},children:s.jsxs(be,{to:n.link,className:`group flex flex-col items-center text-center p-6 rounded-xl border border-border bg-gradient-to-b ${n.color} hover:border-primary/30 hover:shadow-lg transition-all h-full`,children:[s.jsx("span",{className:"text-4xl mb-3",children:n.emoji}),s.jsx("h3",{className:"font-heading text-base font-bold text-foreground group-hover:text-primary transition-colors mb-2",children:r[n.key]}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed mb-3",children:r[`${n.key}_desc`]}),s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-primary group-hover:gap-2 transition-all mt-auto",children:[r.explore," ",s.jsx(Gt,{size:12})]})]})},n.key))})]})})}var Q4="Collapsible",[vQe,Ife]=rs(Q4),[bQe,v$]=vQe(Q4),Ffe=w.forwardRef((e,r)=>{const{__scopeCollapsible:n,open:i,defaultOpen:a,disabled:o,onOpenChange:l,...c}=e,[u,d]=nl({prop:i,defaultProp:a??!1,onChange:l,caller:Q4});return s.jsx(bQe,{scope:n,disabled:o,contentId:Ul(),open:u,onOpenToggle:w.useCallback(()=>d(h=>!h),[d]),children:s.jsx(Rt.div,{"data-state":_$(u),"data-disabled":o?"":void 0,...c,ref:r})})});Ffe.displayName=Q4;var Ofe="CollapsibleTrigger",b$=w.forwardRef((e,r)=>{const{__scopeCollapsible:n,...i}=e,a=v$(Ofe,n);return s.jsx(Rt.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":_$(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...i,ref:r,onClick:bt(e.onClick,a.onOpenToggle)})});b$.displayName=Ofe;var w$="CollapsibleContent",j$=w.forwardRef((e,r)=>{const{forceMount:n,...i}=e,a=v$(w$,e.__scopeCollapsible);return s.jsx(cl,{present:n||a.open,children:({present:o})=>s.jsx(wQe,{...i,ref:r,present:o})})});j$.displayName=w$;var wQe=w.forwardRef((e,r)=>{const{__scopeCollapsible:n,present:i,children:a,...o}=e,l=v$(w$,n),[c,u]=w.useState(i),d=w.useRef(null),h=Mr(r,d),f=w.useRef(0),p=f.current,m=w.useRef(0),A=m.current,g=l.open||c,y=w.useRef(g),x=w.useRef(void 0);return w.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),xa(()=>{const b=d.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const v=b.getBoundingClientRect();
2057f.current=v.height,m.current=v.width,y.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),u(i)}},[l.open,i]),s.jsx(Rt.div,{"data-state":_$(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!g,...o,ref:h,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":A?`${A}px`:void 0,...e.style},children:g&&a})});function _$(e){return e?"open":"closed"}var Lfe=Ffe,jQe=b$,_Qe=j$,Lu="Accordion",CQe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[C$,NQe,SQe]=p_(Lu),[H4,PUt]=rs(Lu,[SQe,Ife]),N$=Ife(),Rfe=ee.forwardRef((e,r)=>{const{type:n,...i}=e,a=i,o=i;return s.jsx(C$.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?s.jsx(TQe,{...o,ref:r}):s.jsx(BQe,{...a,ref:r})})});Rfe.displayName=Lu;var[Dfe,kQe]=H4(Lu),[Mfe,EQe]=H4(Lu,{collapsible:!1}),BQe=ee.forwardRef((e,r)=>{const{value:n,defaultValue:i,onValueChange:a=()=>{},collapsible:o=!1,...l}=e,[c,u]=nl({prop:n,defaultProp:i??"",onChange:a,caller:Lu});return s.jsx(Dfe,{scope:e.__scopeAccordion,value:ee.useMemo(()=>c?[c]:[],[c]),onItemOpen:u,onItemClose:ee.useCallback(()=>o&&u(""),[o,u]),children:s.jsx(Mfe,{scope:e.__scopeAccordion,collapsible:o,children:s.jsx(zfe,{...l,ref:r})})})}),TQe=ee.forwardRef((e,r)=>{const{value:n,defaultValue:i,onValueChange:a=()=>{},...o}=e,[l,c]=nl({prop:n,defaultProp:i??[],onChange:a,caller:Lu}),u=ee.useCallback(h=>c((f=[])=>[...f,h]),[c]),d=ee.useCallback(h=>c((f=[])=>f.filter(p=>p!==h)),[c]);return s.jsx(Dfe,{scope:e.__scopeAccordion,value:l,onItemOpen:u,onItemClose:d,children:s.jsx(Mfe,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(zfe,{...o,ref:r})})})}),[PQe,V4]=H4(Lu),zfe=ee.forwardRef((e,r)=>{const{__scopeAccordion:n,disabled:i,dir:a,orientation:o="vertical",...l}=e,c=ee.useRef(null),u=Mr(c,r),d=NQe(n),f=q0(a)==="ltr",p=bt(e.onKeyDown,m=>{var S;if(!CQe.includes(m.key))return;const A=m.target,g=d().filter(E=>{var O;return!((O=E.ref.current)!=null&&O.disabled)}),y=g.findIndex(E=>E.ref.current===A),x=g.length;if(y===-1)return;m.preventDefault();let b=y;const v=0,j=x-1,_=()=>{b=y+1,b>j&&(b=v)},C=()=>{b=y-1,b<v&&(b=j)};switch(m.key){case"Home":b=v;break;case"End":b=j;break;case"ArrowRight":o==="horizontal"&&(f?_():C());break;case"ArrowDown":o==="vertical"&&_();break;case"ArrowLeft":o==="horizontal"&&(f?C():_());break;case"ArrowUp":o==="vertical"&&C();break}const N=b%x;(S=g[N].ref.current)==null||S.focus()});return s.jsx(PQe,{scope:n,disabled:i,direction:a,orientation:o,children:s.jsx(C$.Slot,{scope:n,children:s.jsx(Rt.div,{...l,"data-orientation":o,ref:u,onKeyDown:i?void 0:p})})})}),zE="AccordionItem",[IQe,S$]=H4(zE),Ufe=ee.forwardRef((e,r)=>{const{__scopeAccordion:n,value:i,...a}=e,o=V4(zE,n),l=kQe(zE,n),c=N$(n),u=Ul(),d=i&&l.value.includes(i)||!1,h=o.disabled||e.disabled;return s.jsx(IQe,{scope:n,open:d,disabled:h,triggerId:u,children:s.jsx(Lfe,{"data-orientation":o.orientation,"data-state":qfe(d),...c,...a,ref:r,disabled:h,open:d,onOpenChange:f=>{f?l.onItemOpen(i):l.onItemClose(i)}})})});Ufe.displayName=zE;var $fe="AccordionHeader",Qfe=ee.forwardRef((e,r)=>{const{__scopeAccordion:n,...i}=e,a=V4(Lu,n),o=S$($fe,n);return s.jsx(Rt.h3,{"data-orientation":a.orientation,"data-state":qfe(o.open),"data-disabled":o.disabled?"":void 0,...i,ref:r})});Qfe.displayName=$fe;var vD="AccordionTrigger",Hfe=ee.forwardRef((e,r)=>{const{__scopeAccordion:n,...i}=e,a=V4(Lu,n),o=S$(vD,n),l=EQe(vD,n),c=N$(n);return s.jsx(C$.ItemSlot,{scope:n,children:s.jsx(jQe,{"aria-disabled":o.open&&!l.collapsible||void 0,"data-orientation":a.orientation,id:o.triggerId,...c,...i,ref:r})})});Hfe.displayName=vD;var Vfe="AccordionContent",Wfe=ee.forwardRef((e,r)=>{const{__scopeAccordion:n,...i}=e,a=V4(Lu,n),o=S$(Vfe,n),l=N$(n);return s.jsx(_Qe,{role:"region","aria-labelledby":o.triggerId,"data-orientation":a.orientation,...l,...i,ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Wfe.displayName=Vfe;function qfe(e){return e?"open":"closed"}var FQe=Rfe,OQe=Ufe,LQe=Qfe,Kfe=Hfe,Gfe=Wfe;const lo=FQe,Os=w.forwardRef(({className:e,...r},n)=>s.jsx(OQe,{ref:n,className:it("border-b",e),...r}));Os.displayName="AccordionItem";const Ls=w.forwardRef(({className:e,children:r,...n},i)=>s.jsx(LQe,{className:"flex",children:s.jsxs(Kfe,{ref:i,className:it("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[r,s.jsx(Vl,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Ls.displayName=Kfe.displayName;const Rs=w.forwardRef(({className:e,children:r,...n},i)=>s.jsx(Gfe,{ref:i,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:s.jsx("div",{className:it("pb-4 pt-0",e),children:r})}));Rs.displayName=Gfe.displayName;const RQe=[{q:"Ce este EduWeb și pentru cine este?",a:"EduWeb este prima platformă educațională din România dedicată Web3, blockchain, crypto și AI. Ne adresăm tuturor — de la curioși la profesioniști."},{q:"Este conținutul EduWeb gratuit?",a:"Da! Articolele, glosarul, ghidurile și podcast-ul zilnic sunt 100% gratuite. Cursurile avansate pot avea opțiuni premium."},{q:"Cum verificați informațiile?",a:"Agregăm surse internaționale de încredere, structurăm cu AI, revizuim editorial și publicăm cu transparență — fiecare articol include sursele originale."},{q:"Ce sunt cursurile Academy?",a:"Cursuri structurate pe module cu lecții, quiz-uri și certificate. Fiecare curs e adaptat nivelului tău — de la începător la avansat."},{q:"Ce este Innovation Network?",a:"Ecosistemul EduWeb pentru companii și experți. Partenerii verificați pot publica conținut educațional și contribui la comunitatea tech."},{q:"Cum rămân la curent?",a:"Abonează-te la newsletter, ascultă podcast-ul zilnic sau vizitează secțiunea de știri actualizată în timp real."},{q:"Ce este AI Tutor Tudor?",a:"Tudor este asistentul AI integrat în platformă. Poți pune întrebări despre orice concept Web3, blockchain sau crypto și primești explicații personalizate, adaptate nivelului tău."},{q:"Ce sunt simulările Web3?",a:"Sandbox-uri interactive unde exersezi crearea unui wallet, tranzacții și swap-uri pe DEX — totul fără risc real, cu un portofel virtual."}],DQe=[{q:"What is EduWeb and who is it for?",a:"Romania's first educational platform for Web3, blockchain, crypto and AI. For everyone — from curious beginners to seasoned professionals."}
2057,{q:"Is EduWeb content free?",a:"Yes! Articles, glossary, guides and the daily podcast are 100% free. Advanced courses may have premium options."},{q:"How do you verify information?",a:"We aggregate trusted international sources, structure with AI, perform editorial review and publish with full transparency."},{q:"What are Academy courses?",a:"Structured courses with modules, lessons, quizzes and certificates. Tailored to your level — beginner to advanced."},{q:"What is Innovation Network?",a:"EduWeb's ecosystem for companies and experts. Verified partners can publish educational content and contribute to the tech community."},{q:"How can I stay updated?",a:"Subscribe to our newsletter, listen to the daily podcast, or visit the real-time updated news section."},{q:"What is AI Tutor Tudor?",a:"Tudor is the AI assistant built into the platform. Ask questions about any Web3, blockchain or crypto concept and get personalized explanations adapted to your level."},{q:"What are Web3 Simulations?",a:"Interactive sandboxes where you practice creating wallets, transactions and DEX swaps — all risk-free, with a virtual portfolio."}];function MQe(){const{lang:e}=Pt(),r=e==="ro",n=r?RQe:DQe,i={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.map(a=>
2057({"@type":"Question",name:a.q,acceptedAnswer:{"@type":"Answer",text:a.a}}))};return s.jsxs(s.Fragment,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(i)}}),s.jsx("div",{className:"w-full px-4 md:px-6 lg:px-8 py-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(ms,{size:18,className:"text-primary"}),s.jsx("h3",{className:"font-heading text-lg font-bold text-foreground",children:r?"Întrebări frecvente":"FAQ"})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-0",children:n.map((a,o)=>s.jsx(lo,{type:"single",collapsible:!0,children:s.jsxs(Os,{value:`faq-${o}`,className:"border-b border-border/30",children:[s.jsx(Ls,{className:"text-left font-heading font-medium py-3 hover:no-underline hover:text-primary transition-colors text-[15px] gap-2",children:a.q}),s.jsx(Rs,{className:"text-muted-foreground leading-relaxed pb-3 text-sm",children:a.a})]})},o))})]})})]})}function tj({label:e}){return null}function zQe({label:e}){return null}function UQe(){return null}function $Qe(){return null}const Xfe="https://eduweb.ro",Yfe="https://eduweb.ai",QQe="EduWeb",sG="/og-default.png",HQe="EduWeb — Portal Educațional Web3, AI & Blockchain",VQe="Portal educațional dedicat Web3, Blockchain, NFT, AI și Marketing Digital. Știri, analize și resurse.",WQe="EduWeb — Web3, AI & Blockchain Educational Portal",qQe="Educational portal dedicated to Web3, Blockchain, NFT, AI and Digital Marketing. News, analysis and resources.";function k$(){return typeof window>"u"?!1:window.location.hostname.includes("eduweb.ai")}function oG(){return k$()?Yfe:Xfe}function KQe(){return k$()?Xfe:Yfe}function lG(){return k$()?{title:WQe,desc:qQe,locale:"en_US",lang:"en",altLang:"ro"}:{title:HQe,desc:VQe,locale:"ro_RO",lang:"ro",altLang:"en"}}function cG(e,r){if(e.length<=r)return e;const n=e.slice(0,r-3),i=n.lastIndexOf(". ");if(i>r*.6)return n.slice(0,i+1);const a=n.lastIndexOf(" ");return(a>r*.6?n.slice(0,a):n)+"..."}function $a(e,r,n="property"){let i=document.querySelector(`meta[${n}="${e}"]`);i||(i=document.createElement("meta"),i.setAttribute(n,e),document.head.appendChild(i)),i.setAttribute("content",r)}function GQe(e){let r=document.querySelector('link[rel="canonical"]');r||(r=document.createElement("link"),r.setAttribute("rel","canonical"),document.head.appendChild(r)),r.setAttribute("href",e)}function qI(e,r){const n=`link[rel="alternate"][hreflang="${e}"]`;let i=document.querySelector(n);i||(i=document.createElement("link"),i.setAttribute("rel","alternate"),i.setAttribute("hreflang",e),document.head.appendChild(i)),i.setAttribute("href",r)}function XQe(){document.querySelectorAll('link[rel="alternate"][hreflang]').forEach(e=>e.remove())}function Zr(e){const r=ps();w.useEffect(()=>{const n=lG(),i=oG(),a=KQe(),o=e!=null&&e.title?cG(e.title,60):n.title,l=e!=null&&e.description?cG(e.description,158):n.desc,c=(e==null?void 0:e.image)||sG,u=c.startsWith("http")?c:`${i}${c}`,d=(e==null?void 0:e.canonicalUrl)||`${i}${r.pathname}`,h=`${a}${r.pathname}`;document.documentElement.setAttribute("lang",n.lang),document.title=o,$a("description",l,"name"),$a("og:title",o),$a("og:description",l),$a("og:type",(e==null?void 0:e.type)||"website"),$a("og:image",u),$a("og:url",d),$a("og:site_name",QQe),$a("og:locale",n.locale),$a("twitter:card","summary_large_image","name"),$a("twitter:title",o,"name"),$a("twitter:description",l,"name"),$a("twitter:image",u,"name"),GQe(d);const f=(e==null?void 0:e.hreflangRo)||(n.lang==="ro"?d:h),p=(e==null?void 0:e.hreflangEn)||(n.lang==="en"?d:h);return qI("ro",f),qI("en",p),qI("x-default",f),e!=null&&e.noIndex&&$a("robots","noindex, nofollow","name"),()=>{const m=lG(),A=oG();document.title=m.title,$a("og:title",m.title),$a("og:description",m.desc),$a("description",m.desc,"name"),$a("og:type","website"),$a("og:image",`${A}${sG}`),$a("og:locale",m.locale),XQe();const g=document.querySelector('meta[name="robots"]');g&&g.remove()}},[e==null?void 0:e.title,e==null?void 0:e.description,e==null?void 0:e.image,e==null?void 0:e.type,e==null?void 0:e.noIndex,e==null?void 0:e.canonicalUrl,e==null?void 0:e.hreflangRo,e==null?void 0:e.hreflangEn,r.pathname])}const YQe=()=>{const{lang:e,t:r}=Pt();Zr();const n=e==="en"?"https://eduweb.ai":"https://eduweb.ro",i={"@context":"https://schema.org","@type":"WebSite",name:"EduWeb",url:n,description:e==="en"?"Educational portal dedicated to Web3, Blockchain, NFT, AI and Digital Marketing.":"Portal educațional dedicat Web3, Blockchain, NFT, AI și Marketing Digital.",inLanguage:e==="en"?"en":"ro",potentialAction:{"@type":"SearchAction",target:`${n}/stiri?q={search_term_string}`,"query-input":"required name=search_term_string"}},a={"@context":"https://schema.org","@type":"Organization",name:"EduWeb",url:n,logo:`${n}
2057/favicon.png`,description:e==="en"?"Romania's first educational platform for Web3, Blockchain, Crypto and AI.":"Prima platformă educațională din România dedicată Web3, Blockchain, Crypto și AI.",sameAs:["https://eduweb.ro","https://eduweb.ai"]};return s.jsxs(Ft,{showTicker:!0,children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(i)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(a)}}),s.jsx(aQe,{}),s.jsx("div",{className:"w-full bg-[#F0B90B]",children:s.jsxs("a",{href:"https://www.binance.com/activity/referral-entry/CPA?ref=CPA_00KR00ENVV",target:"_blank",rel:"noopener noreferrer nofollow",className:"flex items-center justify-center gap-3 px-4 py-2.5 hover:brightness-105 transition-all",children:[s.jsx("span",{className:"text-sm md:text-base font-heading font-bold text-black tracking-tight",children:r("home.binance_cta")}),s.jsx("span",{className:"hidden sm:inline text-xs md:text-sm font-medium text-black/70",children:r("home.binance_desc")}),s.jsx("span",{className:"ml-2 px-3 py-1 bg-black text-[#F0B90B] text-xs font-heading font-bold rounded-md",children:r("home.binance_button")})]})}),s.jsx(lQe,{}),s.jsx(cQe,{}),s.jsx(uQe,{}),s.jsx(Tfe,{}),s.jsx(hQe,{}),s.jsx(pQe,{}),s.jsx(yQe,{}),s.jsx(AQe,{}),s.jsx("div",{className:"w-full max-w-full",children:s.jsx(tj,{})}),s.jsx(MQe,{}),s.jsx("div",{className:"w-full px-4 md:px-6 lg:px-8 py-6",children:s.jsxs(be,{to:"/instaleaza",className:"flex items-center justify-between gap-4 rounded-xl border border-primary/20 bg-primary/5 hover:bg-primary/10 p-4 md:p-5 transition-colors group",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(d4,{className:"w-5 h-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-heading font-bold text-sm md:text-base",children:e==="ro"?"Instalează aplicația EduWeb":"Install the EduWeb App"}),s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:e==="ro"?"Acces rapid de pe ecranul principal, fără App Store":"Quick access from your home screen, no App Store needed"})]})]}),s.jsx(Gt,{size:18,className:"text-primary flex-shrink-0 group-hover:translate-x-1 transition-transform"})]})}),s.jsx("div",{className:"w-full max-w-full",children:s.jsx(tj,{})}),s.jsx("div",{className:"w-full px-4 md:px-6 lg:px-8 py-8",children:s.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-border p-8 md:p-12 text-center bg-card",children:[s.jsx("div",{className:"absolute inset-0 grid-bg opacity-[0.04]"}),s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-96 h-32 bg-primary/5 rounded-full blur-3xl"}),s.jsxs("div",{className:"relative z-10",children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:r("home.learn_deeper_transition")}),s.jsxs("h2",{className:"font-heading text-2xl md:text-3xl font-bold mb-4 tracking-tight",children:[r("home.learn_deeper").split(" ").slice(0,-1).join(" ")," ",s.jsx("span",{className:"text-primary",children:r("home.learn_deeper").split(" ").slice(-1)})]}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-lg mx-auto mb-6",children:r("home.learn_deeper_desc")}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-lg font-heading font-semibold text-sm hover:brightness-110 transition-all shadow-md",children:[r("home.discover_courses"),s.jsx(Gt,{size:16})]})]})]})})]})};function Hg({topic:e}){const{t:r}=Pt();return s.jsx(be,{to:`/${e}`,className:`cat-${e} cat-badge inline-flex items-center px-3 py-1.5 rounded-md text-[11px] font-heading font-medium tracking-wide transition-colors`,children:r(`topic.${e}`)})}const JQe={începător:{className:"bg-neon/10 text-neon"},intermediar:{className:"bg-cyber-blue/15 text-cyber-blue"},avansat:{className:"bg-destructive/15 text-destructive"}};function tb({level:e}){const{t:r}=Pt(),{className:n}=JQe[e],i=r(`difficulty.${e}`);return s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded text-[10px] font-heading font-medium uppercase tracking-wider ${n}`,children:i})}function E$({src:e,alt:r,className:n="",loading:i="lazy"}){return s.jsxs("div",{className:"relative overflow-hidden",children:[s.jsx("img",{src:e,alt:r,className:n,loading:i}),s.jsx("span",{className:"absolute bottom-2 right-3 text-[10px] md:text-xs font-semibold tracking-wider text-white/40 select-none pointer-events-none drop-shadow-sm",children:"EduWeb"})]})}function ZQe({article:e}){return s.jsx(Le.article,{initial:{opacity:0,y:12}
2057,animate:{opacity:1,y:0},transition:{duration:.5},className:"group rounded-xl overflow-hidden border border-border bg-card",children:s.jsxs(be,{to:`/articol/${e.slug}`,className:"block",children:[e.imageUrl?s.jsx(E$,{src:e.imageUrl,alt:e.title,className:"w-full aspect-[16/9] md:aspect-[2/1] object-cover transition-transform duration-700 group-hover:scale-105",loading:"eager"}):s.jsx("div",{className:"w-full aspect-[16/9] md:aspect-[2/1] bg-muted"}),s.jsxs("div",{className:"p-5 md:p-6",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-3",children:[(e.topics||[e.topic]).map(r=>s.jsx(Hg,{topic:r},r)),s.jsx(tb,{level:e.difficulty}),e.contentType==="ai-brief"&&s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-[10px] font-semibold bg-accent/20 text-accent border border-accent/30",children:[s.jsx(ts,{size:10})," AI Brief"]}),e.hasVideo&&s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-[10px] font-semibold bg-primary/20 text-primary border border-primary/30",children:[s.jsx(Pa,{size:10})," Video"]})]}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl lg:text-4xl font-bold leading-tight text-foreground group-hover:text-primary transition-colors",children:e.title})]})]})})}function e7e({article:e,index:r=0}){const{lang:n}=Pt(),i=n==="en"?"en-US":"ro-RO",a=Math.max(2,Math.ceil(e.content.split(" ").length/200));return s.jsxs(Le.article,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:r*.05},className:"group flex gap-4 py-4 border-b border-border/40 last:border-0",children:[e.imageUrl&&s.jsx(be,{to:`/articol/${e.slug}`,className:"shrink-0",children:s.jsx(E$,{src:e.imageUrl,alt:e.title,className:"w-24 h-24 md:w-28 md:h-20 object-cover rounded-lg transition-transform duration-300 group-hover:scale-105"})}),s.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center gap-1.5 mb-1.5",children:(e.topics||[e.topic]).slice(0,1).map(o=>s.jsx(Hg,{topic:o},o))}),s.jsx(be,{to:`/articol/${e.slug}`,children:s.jsx("h3",{className:"font-heading font-semibold text-sm leading-snug text-foreground group-hover:text-primary transition-colors line-clamp-2",children:e.title})})]}),s.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground mt-1.5",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ja,{size:10}),new Date(e.publishedAt).toLocaleDateString(i,{day:"numeric",month:"short"})]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ki,{size:10}),a," min"]})]})]})]})}function W4({article:e,featured:r=!1}){const{t:n}=Pt();return s.jsxs("article",{className:`group glass-card rounded-xl overflow-hidden transition-all duration-300 flex flex-col ${r?"md:col-span-2":""}`,children:[e.imageUrl&&s.jsx(be,{to:`/articol/${e.slug}`,className:"block",children:s.jsx(E$,{src:e.imageUrl,alt:e.title,className:`w-full object-cover transition-transform duration-500 group-hover:scale-105 ${r?"h-56 md:h-72":"h-44 md:h-52"}`})}),!e.imageUrl&&s.jsx("div",{className:`cat-${(e.topics||[e.topic])[0]} h-1 w-full`,style:{background:"hsl(var(--cat))"}}),s.jsxs("div",{className:"p-5 md:p-6 flex flex-col gap-3 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[(e.topics||[e.topic]).map(i=>s.jsx(Hg,{topic:i},i)),s.jsx(tb,{level:e.difficulty}),e.contentType==="ai-brief"&&s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-[10px] font-semibold bg-accent/12 text-accent border border-accent/20",children:[s.jsx(ts,{size:10}),"AI Brief"]}),e.hasVideo&&s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-[10px] font-semibold bg-primary/12 text-primary border border-primary/20",children:[s.jsx(Pa,{size:10}),"Video"]})]}),s.jsx(be,{to:`/articol/${e.slug}`,children:s.jsx("h3",{className:`font-heading font-semibold leading-snug text-foreground group-hover:text-primary transition-colors duration-200 ${r?"text-2xl md:text-3xl":"text-lg md:text-xl"}`,children:e.title})}),s.jsx("div",{className:"flex items-center justify-end mt-auto pt-2",children:s.jsxs(be,{to:`/articol/${e.slug}`,className:"text-xs font-medium text-primary flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[n("common.read")," ",s.jsx(Gt,{size:12})]})})]})]})}function t7e({topic:e,articles:r,icon:n}){const{t:i}=Pt();if(r.length===0)return null;const a=r[0],o=r.slice(1,4);return s.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[s.jsx("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border/60",children:s.jsxs(be,{to:`/${e}`,className:"flex items-center gap-2 font-heading text-sm font-bold text-foreground hover:text-primary transition-colors",children:[s.jsx("div",{className:`cat-${e} cat-icon-bg w-6 h-6 rounded-md flex items-center justify-center`,children:n}),i(`topic.${e}`),s.jsx(Gt,{size:14})]})}),s.jsxs("div",{className:"flex flex-col md:flex-row",children:[s.jsxs(be,{to:`/articol/${a.slug}`,className:`group p-4 ${o.length>0?"md:w-1/2 md:border-r border-border/40":"w-full"}`,children:[a.imageUrl&&s.jsx("div",{className:"overflow-hidden rounded-lg mb-3",children:s.jsx("img",{src:a.imageUrl,alt:a.title,className:"w-full h-44 object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"})}),s.jsx("h3",{className:"font-heading text-base md:text-lg font-bold leading-snug text-foreground group-hover:text-primary transition-colors",children:a.title}),a.summary&&s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-2",children:a.summary})]}),o.length>0&&s.jsx("div",{className:"md:w-1/2 divide-y divide-border/40",children:o.map(l
2057=>s.jsxs(be,{to:`/articol/${l.slug}`,className:"group flex gap-3 p-4 hover:bg-secondary/30 transition-colors",children:[l.imageUrl&&s.jsx("img",{src:l.imageUrl,alt:l.title,className:"w-20 h-14 rounded-md object-cover shrink-0",loading:"lazy"}),s.jsx("div",{className:"min-w-0",children:s.jsx("h4",{className:"font-heading text-sm font-semibold leading-snug text-foreground group-hover:text-primary transition-colors line-clamp-2",children:l.title})})]},l.id))})]})]})}const Jfe="https://www.binance.com/activity/referral-entry/CPA?ref=CPA_00KR00ENVV";function rj(){const{t:e}=Pt();return s.jsx("a",{href:Jfe,target:"_blank",rel:"noopener noreferrer nofollow",className:"group block rounded-xl border border-[hsl(45,100%,51%)]/30 bg-gradient-to-r from-[hsl(45,100%,51%)]/10 via-transparent to-[hsl(45,100%,51%)]/5 p-4 md:p-5 hover:border-[hsl(45,100%,51%)]/60 transition-all duration-300",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("img",{src:"https://public.bnbstatic.com/static/images/common/favicon.ico",alt:"Binance",className:"w-8 h-8 rounded-lg"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-heading font-bold text-sm md:text-base text-foreground",children:e("binance.trade_on")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:e("binance.create_free_desc")})]})]}),s.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1.5 px-4 py-2 rounded-lg bg-[hsl(45,100%,51%)] text-black font-heading font-semibold text-xs md:text-sm group-hover:brightness-110 transition-all shadow-sm",children:[e("binance.register"),s.jsx(Yr,{size:13})]})]})})}function Zfe(){const{t:e}=Pt();return s.jsxs("a",{href:Jfe,target:"_blank",rel:"noopener noreferrer nofollow",className:"group block rounded-xl border border-border bg-card p-4 hover:border-[hsl(45,100%,51%)]/40 transition-all",children:[s.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[s.jsx("img",{src:"https://public.bnbstatic.com/static/images/common/favicon.ico",alt:"Binance",className:"w-6 h-6 rounded"}),s.jsx("p",{className:"font-heading text-sm font-bold text-foreground",children:"Binance"})]}),s.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:e("binance.sidebar_desc")}),s.jsxs("span",{className:"inline-flex items-center gap-1.5 w-full justify-center px-3 py-2 rounded-lg bg-[hsl(45,100%,51%)] text-black font-heading font-semibold text-xs group-hover:brightness-110 transition-all",children:[e("binance.create_free"),s.jsx(Yr,{size:12})]})]})}function r7e(){const[e,r]=w.useState(""),[n,i]=w.useState(!1),[a,o]=w.useState(!1),[l,c]=w.useState(!1),{t:u}=Pt(),{toast:d}=wn(),h=async f=>{if(f.preventDefault(),!(!e||!n)){c(!0);try{const{error:p}=await G.from("newsletter_subscribers").insert([{email:e,gdpr_consent:!0,gdpr_consent_at:new Date().toISOString(),source:"website"}]);if(p){if(p.code==="23505"){d({title:"Ești deja abonat!",description:"Acest email este deja înregistrat în newsletter."}),o(!0);return}throw p}try{await G.functions.invoke("newsletter-confirm",{body:{email:e}})}catch(m){console.error("Failed to send confirmation email:",m)}o(!0)}catch(p){console.error("Newsletter error:",p),d({title:"Eroare",description:"Nu am putut procesa abonarea. Încearcă din nou.",variant:"destructive"})}finally{c(!1)}}};return a?s.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-5 text-center",children:[s.jsx(Xh,{size:28,className:"text-primary mx-auto mb-2"}),s.jsx("p",{className:"font-heading text-sm font-semibold text-foreground",children:u("newsletter.success_title")}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:u("newsletter.success_desc")})]}):s.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-primary/10",children:s.jsx(Za,{size:14,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-heading text-sm font-bold text-foreground",children:u("newsletter.title")}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:u("newsletter.subt
2057itle")})]})]}),s.jsxs("form",{onSubmit:h,className:"space-y-2",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Za,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"email",value:e,onChange:f=>r(f.target.value),placeholder:u("newsletter.placeholder"),required:!0,className:"w-full pl-9 pr-3 py-2.5 text-sm rounded-lg border border-border bg-secondary/50 text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary/50 transition-all"})]}),s.jsxs("label",{className:"flex items-start gap-2 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:n,onChange:f=>i(f.target.checked),className:"mt-0.5 rounded border-border",required:!0}),s.jsxs("span",{className:"text-[10px] text-muted-foreground leading-tight",children:[u("newsletter.gdpr")," ",s.jsx("a",{href:"/politica-confidentialitate",className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",children:u("newsletter.gdpr_link")}),u("newsletter.gdpr_suffix")]})]}),s.jsxs("button",{type:"submit",disabled:l||!n,className:"w-full flex items-center justify-center gap-2 py-2.5 rounded-lg bg-primary text-primary-foreground font-heading text-sm font-semibold hover:brightness-110 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:[l?s.jsx(rt,{size:14,className:"animate-spin"}):null,u("newsletter.subscribe"),!l&&s.jsx(Gt,{size:14})]})]}),s.jsx("p",{className:"text-[10px] text-muted-foreground mt-2 text-center",children:u("newsletter.no_spam")})]})}const n7e=["all","web3","blockchain","ai","nft","validare-nft","digital-marketing","e-learning"],i7e={web3:s.jsx(Dr,{size:13}),blockchain:s.jsx(es,{size:13}),nft:s.jsx(il,{size:13}),"validare-nft":s.jsx(u4,{size:13}),ai:s.jsx(ff,{size:13}),"digital-marketing":s.jsx(DU,{size:13}),"e-learning":s.jsx(Rr,{size:13})};
2057function a7e({active:e,onChange:r}){const{t:n}=Pt();return s.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:n7e.map(i=>s.jsxs("button",{onClick:()=>r(i),className:`inline-flex items-center gap-1.5 px-3.5 py-2 rounded-lg text-xs font-heading font-medium transition-all ${e===i?"bg-primary text-primary-foreground shadow-sm shadow-primary/20":"bg-card border border-border text-muted-foreground hover:text-foreground hover:border-foreground/20"}`,children:[i!=="all"&&i7e[i],n(i==="all"?"common.all":`topic.${i}`)]},i))})}function q4({currentPage:e,totalPages:r,basePath:n}){if(r<=1)return null;const i=o=>o===1?n:`${n}${n.includes("?")?"&":"?"}page=${o}`,a=()=>{if(r<=7)return Array.from({length:r},(u,d)=>d+1);const o=[1],l=Math.max(2,e-1),c=Math.min(r-1,e+1);l>2&&o.push("...");for(let u=l;u<=c;u++)o.push(u);return c<r-1&&o.push("..."),o.push(r),o};return s.jsxs("nav",{"aria-label":"Paginare",className:"flex items-center justify-center gap-1 mt-10 mb-6",children:[e>1&&s.jsxs(be,{to:i(e-1),className:"inline-flex items-center gap-1 px-3 py-2 text-sm rounded-lg border border-border bg-card hover:bg-muted transition-colors text-foreground",rel:"prev",children:[s.jsx(pg,{size:16}),s.jsx("span",{className:"hidden sm:inline",children:"Anterior"})]}),a().map((o,l)=>o==="..."?s.jsx("span",{className:"px-2 py-2 text-sm text-muted-foreground",children:"…"},`ellipsis-${l}`):s.jsx(be,{to:i(o),className:`inline-flex items-center justify-center min-w-[2.25rem] h-9 px-2 text-sm rounded-lg border transition-colors ${o===e?"bg-primary text-primary-foreground border-primary font-semibold":"border-border bg-card hover:bg-muted text-foreground"}`,...o===e?{"aria-current":"page"}:{},children:o},o)),e<r&&s.jsxs(be,{to:i(e+1),className:"inline-flex items-center gap-1 px-3 py-2 text-sm rounded-lg border border-border bg-card hover:bg-muted transition-colors text-foreground",rel:"next",children:[s.jsx("span",{className:"hidden sm:inline",children:"Următoarea"}),s.jsx(hs,{size:16})]})]})}function s7e(){const{t:e}=Pt();return s.jsx("section",{className:"py-8",children:s.jsxs("div",{className:"rounded-xl border border-primary/20 bg-gradient-to-r from-primary/5 via-card to-accent/5 p-6 md:p-8 text-center",children:[s.jsx("div",{className:"w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4",children:s.jsx(Rr,{size:28,className:"text-primary"})}),s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-bold text-foreground mb-2",children:e("news.explore_academy_title")}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-md mx-auto mb-5",children:e("news.explore_academy_desc")}),s.jsxs(be,{to:"/academie",className:"inline-flex items-center gap-2 px-6 py-3 rounded-lg bg-primary text-primary-foreground font-heading font-bold text-sm hover:brightness-110 transition-all shadow-lg shadow-primary/20",children:[e("news.explore_academy_btn"),s.jsx(Gt,{size:16})]})]})})}const o7e={web3:s.jsx(Dr,{size:14}),blockchain:s.jsx(es,{size:14}),nft:s.jsx(il,{size:14}),"validare-nft":s.jsx(u4,{size:14}),ai:s.jsx(ff,{size:14}),"digital-marketing":s.jsx(DU,{size:14}),"e-learning":s.jsx(Rr,{size:14})};function l7e(){const[e]=H0(),r=parseInt(e.get("page")||"1",10),n=isNaN(r)||r<1?1:r,[i,a]=w.useState("all"),[o,l]=w.useState(""),{lang:c,t:u}=Pt(),d=c==="en"?"en-US":"ro-RO";Zr({title:n>1?`${u("news.title")} — Pagina ${n}`:u("news.title"),description:u("news.meta_desc")});const{data:h,isLoading:f}=y$(i!=="all"?{topic:i,page:n}:{page:n}),p=(h==null?void 0:h.articles)||[],m=(h==null?void 0:h.totalPages)||1,A=w.useMemo(()=>{if(!o)return p;const j=o.toLowerCase();return p.filter(_=>_.title.toLowerCase().includes(j))},[p,o]),g=A[0],y=A.slice(1,5),x=A.slice(5,15),b=w.useMemo(()=>{const j=new Set(A.slice(0,15).map(S=>S.id)),_=A.filter(S=>!j.has(S.id)),C=[],N=["ai","blockchain","web3","nft"];for(const S of N){const E=_.filter(O=>(O.topics||[O.topic]).includes(S)).slice(0,4);E.length>=2&&(C.push({topic:S,articles:E}
2057),E.forEach(O=>j.add(O.id)))}return C},[A]),v=i!=="all"?`/stiri?topic=${i}`:"/stiri";return s.jsxs(Ft,{children:[s.jsxs("div",{className:"w-full px-4 md:px-6 lg:px-8 py-6 md:py-8",children:[s.jsxs("div",{className:"max-w-6xl mx-auto mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:s.jsx(ZA,{size:20,className:"text-primary"})}),s.jsx("div",{children:s.jsx("h1",{className:"font-heading text-2xl md:text-3xl font-bold tracking-tight",children:u("home.articles_title")})})]}),s.jsx("p",{className:"text-sm md:text-base text-muted-foreground mb-3",children:u("home.articles_desc")}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground mb-4",children:[s.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-card border border-border/60 px-3 py-1.5 rounded-full",children:[s.jsx(ff,{size:12,className:"text-primary"}),"AI & Tehnologie"]}),s.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-card border border-border/60 px-3 py-1.5 rounded-full",children:[s.jsx(es,{size:12,className:"text-primary"}),"Blockchain & Crypto"]}),s.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-card border border-border/60 px-3 py-1.5 rounded-full",children:[s.jsx(Dr,{size:12,className:"text-primary"}),"Web3 & Inovație"]}),s.jsx("span",{className:"text-muted-foreground/60",children:"•"}),s.jsx("span",{className:"text-muted-foreground/80",children:"Actualizat zilnic cu analize verificate editorial"})]}),s.jsxs("div",{className:"relative max-w-md mb-4",children:[s.jsx(ul,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"text",placeholder:u("news.search_placeholder"),value:o,onChange:j=>l(j.target.value),className:"w-full pl-10 pr-4 py-2 rounded-lg bg-card border border-border text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary/50 transition-all"})]}),s.jsx(a7e,{active:i,onChange:a})]}),s.jsxs("div",{className:"flex flex-col lg:flex-row gap-6 max-w-6xl mx-auto",children:[s.jsx("aside",{className:"hidden xl:block w-72 shrink-0",children:s.jsxs("div",{className:"sticky top-20",children:[s.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[s.jsx("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border/60",children:s.jsxs("h3",{className:"font-heading text-sm font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(ZA,{size:14,className:"text-primary"}),u("home.latest_news")]})}),s.jsx("div",{className:"divide-y divide-border/40",children:f?s.jsx("p",{className:"text-muted-foreground text-sm py-8 px-4",children:u("common.loading")}):x.map(j=>s.jsxs(be,{to:`/articol/${j.slug}`,className:"group block px-4 py-3 hover:bg-secondary/30 transition-colors",children:[s.jsx("p",{className:"text-[10px] text-muted-foreground mb-0.5 font-mono",children:new Date(j.publishedAt).toLocaleTimeString(d,{hour:"2-digit",minute:"2-digit"})}),s.jsx("h4",{className:"font-heading text-[13px] font-semibold leading-snug text-foreground group-hover:text-primary transition-colors line-clamp-3",children:j.title})]},j.id))})]}),s.jsx("div",{className:"mt-4",children:s.jsx(Zfe,{})}),s.jsx("div",{className:"mt-4",children:s.jsx(zQe,{})})]})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[f?s.jsx("p",{className:"text-muted-foreground text-center py-16",children:u("home.loading_articles")}):A.length===0?s.jsx("p",{className:"text-muted-foreground text-center py-16",children:u("news.no_results")}):s.jsxs("div",{className:"space-y-6",children:[g&&s.jsx(ZQe,{article:g}),y.length>0&&s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:y.map(j=>s.jsx(W4,{article:j},j.id))}),s.jsxs("div",{className:"xl:hidden",children:[s.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[s.jsx("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border/60",children:s.jsxs("h3",{className:"font-heading text-sm font-bold flex items-center gap-1.5",children:[s.jsx(ZA,{size:14,className:"text-primary"}),u("home.latest_news")]})}),x.slice(0,5).map((j,_)=>s.jsx(e7e,{article:j,index:_},j.id))]}),s.jsx("div",{className:"mt-4",children:s.jsx(r7e,{})})]})]}),s.jsx("div",{className:"mt-8",children:s.jsx(q4,{currentPage:n,totalPages:m,basePath:v})})]})]})]}),s.jsx("div",{className:"w-full max-w-full",children:s.jsx(tj,{})}),s.jsx(Tfe,{}),b.length>0&&s.jsx("div",{className:"w-full px-4 md:px-6 lg:px-8 py-8",children:s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5 max-w-6xl mx-auto",children:b.map(({topic:j,articles:_})=>s.jsx(t7e,{topic:j,articles:_,icon:o7e[j]},j))})}),s.jsx(s7e,{})]})}function c7e(){const[e]=H0(),r=parseInt(e.get("page")||"1",10),n=isNaN(r)||r<1?1:r,{data:i,isLoading:a}=y$({type:"ai-brief",page:n}),o=(i==null?void 0:i.articles)||[],l=(i==null?void 0:i.totalPages)||1;return Zr({title:n>1?`Analize AI — Pagina ${n} — Briefuri Educaționale Web3 & Tech`:"Analize AI — Briefuri Educaționale Web3 & Tech",description:"Briefuri educaționale generate cu AI și revizuite editorial. Analize obiective despre blockchain, NFT, AI și tehnologii digitale."}),s.jsx(Ft,{children:s.jsxs("div",{className:"container py-10",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(ts,{size:20,className:"text-accent"}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold tracking-tight",children:"Analize AI"})]}),s.jsx("p",{className:"text-lg text-muted-foreground mb-3",children:"Briefuri educaționale generate cu AI și revizuite editorial."}),s.jsxs("div",{className:"inline-flex items-center gap-2 text-xs text-muted-foreground bg-accent/8 border border-accent/15 px-3 py-1.5 rounded-lg",children:[s.jsx(ts,{size:11,className:"text-accent"}),"Conținut verificat editorial • Nu constituie sfat financiar"]})]}),a?s.jsx("p",{className:"text-muted-foreground text-center py-12",children:"Se încarcă..."}):o.length===0?s.jsx("p",{className:"text-muted-foreground text-center py-12",children:"Nu există încă analize publicate."}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:o.map(c=>s.jsx(W4,{article:c},c.id))}),s.jsx(q4,{currentPage:n,totalPages:l,basePath:"/analize"})]})]})})}const u7e=["web3","blockchain","nft","validare-nft","ai","digital-marketing","e-learning"],d7e={web3:s.jsx(Dr,{size:28}),blockchain:s.jsx(es,{size:28}),nft:s.jsx(il,{size:28}),"validare-nft":s.jsx(u4,{size:28}),ai:s.jsx(ff,{size:28}),"digital-marketing":s.jsx(DU,{size:28}),"e-learning":s.jsx(Rr,{size:28})};function h7e(){const{topic:e}=Zl(),[r]=H0(),n=parseInt(r.get("page")||"1",10),i=isNaN(n)||n<1?1:n,{t:a}=Pt();if(!e||!u7e.includes(e))return s.jsx(Ft,{children:s.jsx("div",{className:"container py-20 text-center",children:s.jsx("h1",{className:"font-heading text-2xl font-bold mb-2",children:a("common.not_found")})})});const o=e,{data:l,isLoading:c}=y$({topic:o,page:i}),u=(l==null?void 0:l.articles)||[],d=(l==null?void 0:l.totalPages)||1,h=a(`topic.${o}`),f=a(`topic_desc.${o}`);return Zr({title:i>1?`${h} — Pagina ${i}`:h,description:f}),s.jsxs(Ft,{children:[s.jsxs("div",{className:`cat-${o} relative overflow-hidden border-b border-border/30`,children:[s.jsx("div",{className:"absolute inset-0 hero-gradient"}),s.jsx("div",{className:"absolute inset-0 grid-bg opacity-[0.04]"}),s.jsx("div",{className:"container relative z-10 py-14",children:s.jsxs(Le.div,{initial:{opacity:0,y:15}
2057,animate:{opacity:1,y:0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsx("div",{className:"cat-icon-bg w-14 h-14 rounded-xl flex items-center justify-center",children:d7e[o]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-xs uppercase tracking-widest text-muted-foreground font-medium",children:a("hero.stat_topics")}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold tracking-tight",children:h})]})]}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-xl ml-[4.5rem]",children:f})]})})]}),s.jsx("div",{className:"container py-10",children:c?s.jsx("p",{className:"text-muted-foreground text-center py-12",children:a("common.loading")}):u.length===0?s.jsx("p",{className:"text-muted-foreground text-center py-12",children:a("news.no_results")}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:u.map((p,m)=>s.jsxs(w.Fragment,{children:[s.jsx(W4,{article:p}),m===5&&s.jsx("div",{className:"col-span-full",children:s.jsx(tj,{})})]},p.id))}),s.jsx(q4,{currentPage:i,totalPages:d,basePath:`/${o}`})]})})]})}const uG={ai:"from-violet-950 via-indigo-950 to-slate-950",blockchain:"from-emerald-950 via-teal-950 to-slate-950",web3:"from-blue-950 via-cyan-950 to-slate-950",nft:"from-fuchsia-950 via-purple-950 to-slate-950","validare-nft":"from-amber-950 via-orange-950 to-slate-950","digital-marketing":"from-rose-950 via-pink-950 to-slate-950","e-learning":"from-sky-950 via-blue-950 to-slate-950"},f7e=["","Ce s-a întâmplat","De ce contează","Impact & Ce urmează"],m7e=["","What happened","Why it matters","Impact & What's next"];function p7e(){try{const e=new AudioContext,r=e.currentTime;[{freq:523.25,start:0,dur:.15},{freq:659.25,start:.15,dur:.15},{freq:783.99,start:.3,dur:.3}].forEach(({freq:i,start:a,dur:o})=>{const l=e.createOscillator(),c=e.createGain();l.type="sine",l.frequency.value=i,c.gain.setValueAtTime(0,r+a),c.gain.linearRampToValueAtTime(.08,r+a+.03),c.gain.linearRampToValueAtTime(0,r+a+o),l.connect(c),c.connect(e.destination),l.start(r+a),l.stop(r+a+o+.01)}),setTimeout(()=>e.close(),2e3)}catch{}}function fp({script:e,audioUrl:r,duration:n,topic:i,postId:a,postTitle:o,shareUrl:l,onDemandGenerate:c,isGenerating:u,sectionLabels:d}){var ie,X,de,oe;const h=typeof window<"u"&&window.location.hostname.includes(".ai")?"en":"ro",{awardCoins:f}=Cp(),p=w.useRef(!1),m=d||(h==="en"?m7e:f7e),[A,g]=w.useState(!1),[y,x]=w.useState(0),[b,v]=w.useState(0),[j,_]=w.useState(!1),[C,N]=w.useState(null),S=w.useRef(null),E=w.useRef(null),O=w.useRef(!1),B=2,T=3,F=h==="en"?"Tomorrow's technology, explained today.":"Tehnologia de mâine, explicată azi.",I=[{text:e.hook,label:"",words:e.hook.split(/\s+/).length},{text:e.section1,label:m[1],words:e.section1.split(/\s+/).length},{text:e.section2,label:m[2],words:e.section2.split(/\s+/).length},{text:e.section3,label:m[3],words:e.section3.split(/\s+/).length}],D=I.reduce((ce,ye)=>ce+ye.words,0),L=C||n,V=I.reduce((ce,ye)=>{const ge=ce.length>0?ce[ce.length-1]:0;return ce.push(ge+ye.words/D*L),ce},[]),U=[{text:"",label:"",isIntro:!0},...I,{text:"",label:"",isOutro:!0}],Q=B+L+T,$=w.useRef(0),q=w.useCallback(()=>{var ye;$.current+=.1;const ce=$.current;if(v(ce/Q*100),ce<B)x(0);else if(ce>=B+L)x(U.length-1),!O.current&&!j&&(O.current=!0,p7e());else{const ge=((ye=S.current)==null?void 0:ye.currentTime)??ce-B;let Be=0;for(let Ve=0;Ve<V.length;Ve++){if(ge<V[Ve]){Be=Ve;break}Be=Ve}x(1+Be)}},[L,U.length,Q,V,j]);w.useEffect(()=>(A?E.current=window.setInterval(()=>{q(),$.current>=Q&&(S.current&&S.current.pause(),g(!1),x(0),v(0),$.current=0,O.current=!1)},100):E.current&&clearInterval(E.current),()=>{E.current&&clearInterval(E.current)}),[A,q,Q]);const M=w.useRef(null);w.useEffect(()=>{const ce=new Audio(r);return ce.addEventListener("loadedmetadata",()=>{ce.duration&&isFinite(ce.duration)&&N(ce.duration)}),ce.preload="metadata",S.current=ce,()=>{ce.pause(),S.current=null}},[r]);const z=async()=>{S.current||(S.current=new Audio(r)),S.current.muted=j,A?(S.current.pause(),M.current&&(clearTimeout(
2057M.current),M.current=null),g(!1)):($.current=0,x(0),v(0),O.current=!1,g(!0),!p.current&&a&&(p.current=!0,G.from("media_plays").insert({media_type:"video_brief",media_id:a,media_title:o||null,topic:i}).then(()=>{}),f(1,"video_brief_play",a).then(ce=>{!ce.success&&ce.reason!=="client_dedup"&&ce.reason!=="duplicate"&&console.warn("EduCoins video_brief failed:",ce.reason)})),M.current=window.setTimeout(async()=>{if(S.current){S.current.currentTime=0;try{await S.current.play()}catch{}}},B*1e3))},K=()=>{_(!j),S.current&&(S.current.muted=!j)};w.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]);const ne=uG[i]||uG.ai;return s.jsxs("div",{className:"rounded-xl overflow-hidden border border-border/50 shadow-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 bg-card border-b border-border/50",children:[s.jsx(Pa,{size:16,className:"text-primary"}),s.jsx("span",{className:"text-sm font-medium",children:h==="en"?"🎥 Video summary (60 seconds)":"🎥 Rezumat video (60 secunde)"})]}),s.jsxs("div",{className:`relative aspect-video bg-gradient-to-br ${ne} overflow-hidden`,children:[s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:`radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
2058                             radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%)`}})}),s.jsx("div",{className:"absolute inset-0 opacity-5",style:{backgroundImage:`linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
2059                           linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px)`,backgroundSize:"40px 40px"}}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-8 md:p-12",children:s.jsx(Fu,{mode:"wait",children:s.jsx(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5},className:"text-center max-w-2xl",children:(ie=U[y])!=null&&ie.isIntro||(X=U[y])!=null&&X.isOutro?s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx(Le.img,{src:K2,alt:"EduWeb Logo",className:"h-14 md:h-20 w-auto drop-shadow-2xl",initial:{scale:.8,opacity:0}
2059,animate:{scale:1,opacity:1},transition:{duration:.6,ease:"easeOut"}}),s.jsx(Le.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3,duration:.5},className:"text-sm md:text-lg font-medium text-white/70 tracking-wide",children:F})]}):s.jsxs(s.Fragment,{children:[((de=U[y])==null?void 0:de.label)&&s.jsx(Le.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},className:"text-xs md:text-sm font-medium text-white/50 uppercase tracking-widest mb-3",children:U[y].label}),s.jsx("p",{className:`font-heading font-bold text-white leading-tight ${y===1?"text-xl md:text-3xl lg:text-4xl":"text-base md:text-xl lg:text-2xl"}`,children:(oe=U[y])==null?void 0:oe.text})]})},y)})}),s.jsx("div",{className:"absolute bottom-3 right-4 text-white/20 text-xs font-medium",children:"EduWeb.ro"}),!A&&s.jsx("button",{onClick:c&&!u?c:z,disabled:u,className:"absolute inset-0 flex items-center justify-center bg-black/30 hover:bg-black/40 transition-colors cursor-pointer group",children:s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("div",{className:"w-16 h-16 md:w-20 md:h-20 rounded-full bg-primary/90 flex items-center justify-center group-hover:scale-110 transition-transform shadow-2xl",children:u?s.jsx(rt,{size:28,className:"text-primary-foreground animate-spin"}):s.jsx(ya,{size:28,className:"text-primary-foreground ml-1"})}),u&&s.jsx("p",{className:"text-white/80 text-sm font-medium",children:h==="en"?"Generating...":"Se generează..."}),c&&!u&&s.jsx("p",{className:"text-white/60 text-xs",children:h==="en"?"Click to generate summary":"Apasă pentru a genera rezumatul"})]})})]}),s.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 bg-card",children:[s.jsx("button",{onClick:z,className:"p-1.5 rounded-md hover:bg-accent transition-colors",children:A?s.jsx(Fd,{size:16}):s.jsx(ya,{size:16})}),s.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden cursor-pointer",children:s.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-100",style:{width:`${b}%`}})}),s.jsx("div",{className:"flex gap-1",children:U.map((ce,ye)=>s.jsx("div",{className:`w-1.5 h-1.5 rounded-full transition-colors ${ye===y?"bg-primary":"bg-muted-foreground/30"}`},ye))}),s.jsx("button",{onClick:K,className:"p-1.5 rounded-md hover:bg-accent transition-colors",children:j?s.jsx(zg,{size:16}):s.jsx(wo,{size:16})}),(()=>{const ce=l||(typeof window<"u"?window.location.href:""),ye=o||e.hook,ge=encodeURIComponent(ce),Be=encodeURIComponent(ye),Ve=async()=>{if(navigator.share)try{await navigator.share({title:ye,url:ce})}catch{}};return s.jsxs("div",{className:"flex items-center gap-0.5 ml-1 border-l border-border/50 pl-2",children:[typeof navigator<"u"&&"share"in navigator?s.jsx("button",{onClick:Ve,className:"p-1.5 rounded-md hover:bg-accent transition-colors",title:"Share",children:s.jsx(zU,{size:14,className:"text-muted-foreground"})}):null,s.jsx("a",{href:`https://www.facebook.com/sharer/sharer.php?u=${ge}`,target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded-md hover:bg-accent transition-colors",title:"Facebook",children:s.jsx(Yoe,{size:14,className:"text-muted-foreground"})}),s.jsx("a",{href:`https://twitter.com/intent/tweet?url=${ge}&text=${Be}`,target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded-md hover:bg-accent transition-colors",title:"X (Twitter)",children:s.jsx("svg",{viewBox:"0 0 24 24",className:"w-3.5 h-3.5 text-muted-foreground fill-current",children:s.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),s.jsx("a",{href:`https://www.linkedin.com/sharing/share-offsite/?url=${ge}`,target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded-md hover:bg-accent transition-colors",title:"LinkedIn",children:s.jsx(LU,{size:14,className:"text-muted-foreground"})}),s.jsx("a",{href:`https://api.whatsapp.com/send?text=${Be}%20${ge}`,target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded-md hover:bg-accent transition-colors",title:"WhatsApp",children:s.jsx("svg",{viewBox:"0 0 24 24",className:"w-3.5 h-3.5 text-muted-foreground fill-current",children:s.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.
2059198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})})]})})()]})]})}function K4(e){return{id:e.id,title:e.title,slug:e.slug,description:e.description,shortDescription:e.short_description,imageUrl:e.image_url,topics:e.topics||[],difficultyLevel:e.difficulty_level,priceType:e.price_type,priceAmount:Number(e.price_amount)||0,currency:e.currency||"RON",isPublished:e.is_published,estimatedHours:e.estimated_hours?Number(e.estimated_hours):null,totalLessons:e.total_lessons||0,createdAt:e.created_at,videoPresentationScript:e.video_presentation_script||null,videoPresentationAudioUrl:e.video_presentation_audio_url||null,courseCode:e.course_code||"",faqRo:Array.isArray(e.faq_ro)?e.faq_ro:[],faqEn:Array.isArray(e.faq_en)?e.faq_en:[]}}function A7e(e){return Xe({queryKey:["courses",e==null?void 0:e.topic],queryFn:async()=>{let r=G.from("courses").select("*").eq("is_published",!0).order("created_at",{ascending:!1});e!=null&&e.topic&&(r=r.contains("topics",[e.topic]));const{data:n,error:i}=await r;if(i)throw i;return(n||[]).map(K4)}})}function g7e(e){return Xe({queryKey:["course",e],queryFn:async()=>{const{data:r,error:n}=await G.from("courses").select("*").eq("slug",e).eq("is_published",!0).single();if(n)throw n;return K4(r)},enabled:!!e})}function x7e(e){return Xe({queryKey:["course-by-id",e],queryFn:async()=>{const{data:r,error:n}=await G.from("courses").select("*").eq("id",e).single();if(n)throw n;return K4(r)},enabled:!!e})}function eme(e){return Xe({queryKey:["course-modules",e],queryFn:async()=>{const{data:r,error:n}=await G.from("course_modules").select("*").eq("course_id",e).order("sort_order");if(n)throw n;const i=(r||[]).map(l=>l.id),{data:a,error:o}=await G.from("course_lessons").select("id, module_id, title, sort_order, is_free_preview, estimated_minutes").in("module_id",i).order("sort_order");if(o)throw o;return(r||[]).map(l=>({id:l.id,courseId:l.course_id,title:l.title,description:l.description,sortOrder:l.sort_order,lessons:(a||[]).filter(c=>c.module_id===l.id).map(c=>({id:c.id,moduleId:c.module_id,title:c.title,content:null,videoUrl:null,sortOrder:c.sort_order,isFreePreview:c.is_free_preview,estimatedMinutes:c.estimated_minutes||10}))}))},enabled:!!e})}function tme(){const{user:e}=Fn();return Xe({queryKey:["enrollments",e==null?void 0:e.id],queryFn:async()=>{const{data:r,error:n}=await G.from("enrollments").select("*, courses(*)").eq("user_id",e.id);if(n)throw n;return r||[]},enabled:!!e})}function rme(e){const{user:r}=Fn();return Xe({queryKey:["lesson-progress",r==null?void 0:r.id,e],queryFn:async()=>{const{data:n}=await G.from("course_modules").select("id").eq("course_id",e),i=(n||[]).map(u=>u.id),{data:a}=await G.from("course_lessons").select("id").in("module_id",i),o=(a||[]).map(u=>u.id),{data:l,error:c}=await G.from("lesson_progress").select("*").eq("user_id",r.id).in("lesson_id",o);if(c)throw c;return l||[]},enabled:!!r&&!!e})}function y7e(e){return Xe({queryKey:["recommended-courses",e],queryFn:async()=>{if(!e.length)return[];const{data:r,error:n}=await G.from("courses").select("*").eq("is_published",!0).overlaps("topics",e).limit(3);if(n)throw n;return(r||[]).map(K4)},enabled:e.length>0})}function Kv({topics:e,variant:r="inline"}){const{data:n=[]}=y7e(e),{lang:i,t:a}=Pt();if(n.length===0)return null;const o=i==="en"?"Free":"Gratuit",l=i==="en"?"lessons":"lecții",c=i==="en"?"Want to learn more?":"Vrei să înveți mai mult?",u=i==="en"?"Start course":"Începe cursul",d=i==="en"?"Recommended courses":"Cursuri recomandate";if(r==="banner"){const h=n[0];return s.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-5 flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[s.jsx("div",{className:"p-2.5 rounded-lg bg-primary/10 shrink-0",children:s.jsx(Rr,{size:22,className:"text-primary"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs font-medium text-primary mb-1",children:c}),s.jsx("p",{className:"font-heading font-semibold text-sm line-clamp-1",children:h.title}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[h.priceType==="free"?o:`${h.priceAmount} ${h.currency}`,h.totalLessons>0&&` · ${h.totalLessons} ${l}`]})]}),s.jsxs(be,{to:i==="en"?`/academy/course/${h.slug}`:`/academy/curs/${h.slug}`,className:"inline-flex items-center gap-1 px-4 py-2 bg-primary text-primary-foreground rounded-lg text-sm font-semibold hover:brightness-110 transition-all shrink-0",children:[u," ",s.jsx(Gt,{size:14})]})]})}return s.jsxs("div",{className:"mt-10 pt-8 border-t border-border",children:[s.jsxs("h3",{className:"font-heading text-lg font-semibold mb-4 flex items-center gap-2",children:[s.jsx(Rr,{size:20,className:"text-primary"}),d]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map(h=>s.jsxs(be,{to:i==="en"?`/academy/course/${h.slug}`:`/academy/curs/${h.slug}`,className:"group glass-card rounded-lg p-4 hover:border-primary/30 transition-all",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[h.topics.slice(0,1).map(f=>s.jsx("span",{className:`cat-${f} cat-badge px-2 py-0.5 rounded text-[10px] font-medium`,children:a(`topic.${f}`)},f)),h.priceType==="free"?s.jsx("span",{className:"text-[10px] font-bold text-primary",children:o}):s.jsxs("span",{className:"text-[10px] font-bold text-accent flex items-center gap-0.5",children:[s.jsx(Ko,{size:10})," ",h.priceAmount," ",h.currency]})]}),s.jsx("h4",{className:"font-heading text-sm font-semibold line-clamp-2 group-hover:text-primary transition-colors mb-2",children:h.title}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[h.totalLessons>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(yr,{size:10})," ",h.totalLessons]}),h.estimatedHours&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ki,{size:10})," ",h.estimatedHours,"h"]})]})]}
2059,h.id))})]})}const fr=w.forwardRef(({className:e,...r},n)=>s.jsx("textarea",{className:it("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));fr.displayName="Textarea";function v7e({postId:e,lang:r}){const{user:n}=Fn(),{awardCoins:i}=Cp(),{toast:a}=wn(),o=Kr(),[l,c]=w.useState(""),[u,d]=w.useState(!1),{data:h=[],isLoading:f}=Xe({queryKey:["post-comments",e],queryFn:async()=>{const{data:A}=await G.from("post_comments").select("*").eq("post_id",e).order("created_at",{ascending:!0});if(A&&A.length>0){const g=[...new Set(A.map(b=>b.user_id))],{data:y}=await G.from("profiles").select("user_id, display_name").in("user_id",g),x=new Map((y==null?void 0:y.map(b=>[b.user_id,b.display_name]))||[]);return A.map(b=>({...b,display_name:x.get(b.user_id)||"Utilizator"}))}return A||[]}}),p=async()=>{if(!(!n||!l.trim())){d(!0);try{const{error:A}=await G.from("post_comments").insert({post_id:e,user_id:n.id,content:l.trim()});if(A)throw A;c(""),o.invalidateQueries({queryKey:["post-comments",e]});const g=await i(1,"article_comment",e);g.success?a({title:"+1 EduCoin!",description:r==="en"?"Thanks for commenting!":"Mulțumim pentru comentariu!"}):(a({title:r==="en"?"Comment posted!":"Comentariu postat!",description:r==="en"?"Thanks for commenting!":"Mulțumim pentru comentariu!"}),g.reason!=="client_dedup"&&g.reason!=="skipped"&&console.warn("EduCoins award failed:",g.reason))}catch{a({title:"Eroare",description:"Nu s-a putut posta comentariul.",variant:"destructive"})}d(!1)}},m=async A=>{await G.from("post_comments").delete().eq("id",A),o.invalidateQueries({queryKey:["post-comments",e]})};return s.jsxs("section",{className:"mt-10 pt-8 border-t border-border",children:[s.jsxs("h2",{className:"font-heading text-xl font-semibold mb-6 flex items-center gap-2 text-foreground",children:[s.jsx(o4,{size:20,className:"text-primary"}),r==="en"?"Comments":"Comentarii"," (",h.length,")"]}),f?s.jsx("div",{className:"flex justify-center py-6",children:s.jsx(rt,{className:"animate-spin text-muted-foreground",size:20})}):h.length===0?s.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:r==="en"?"No comments yet. Be the first!":"Niciun comentariu încă. Fii primul!"}):s.jsx("div",{className:"space-y-4 mb-6",children:h.map(A=>s.jsxs("div",{className:"glass-card rounded-lg p-4 border border-border/30",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-semibold text-foreground",children:A.display_name}),s.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(A.created_at).toLocaleDateString("ro-RO",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})})]}),(n==null?void 0:n.id)===A.user_id&&s.jsx("button",{onClick:()=>m(A.id),className:"text-muted-foreground hover:text-destructive transition-colors",children:s.jsx(Xr,{size:14})})]}),s.jsx("p",{className:"text-sm text-foreground/90 whitespace-pre-wrap",children:A.content})]},A.id))}),n?s.jsxs("div",{className:"space-y-3",children:[s.jsx(fr,{value:l,onChange:A=>c(A.target.value),placeholder:r==="en"?"Write a comment... (+5 EduCoins)":"Scrie un comentariu... (+5 EduCoins)",className:"min-h-[80px] bg-card",maxLength:1e3}),s.jsx("div",{className:"flex justify-end",children:s.jsxs(me,{onClick:p,disabled:u||!l.trim(),size:"sm",children:[u?s.jsx(rt,{className:"animate-spin",size:14}):s.jsx(Dc,{size:14}),s.jsx("span",{className:"ml-1.5",children:r==="en"?"Post":"Postează"})]})})]}):s.jsx("div",{className:"glass-card rounded-lg p-4 text-center border border-border/30",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.jsx(be,{to:"/autentificare",className:"text-primary hover:underline font-medium",children:r==="en"?"Log in":"Conectează-te"}),r==="en"?" to leave a comment and earn 5 EduCoins.":" pentru a lăsa un comentariu și a câștiga 5 EduCoins."]})})]})}function bD(e){return e.startsWith("http://")||e.startsWith("https://")}const b7e=new Set(["/","/stiri","/analize","/academy","/crypto","/convertor-crypto-ron","/
2059preturi-crypto","/bitcoin-pret-azi","/ethereum-pret-ron","/solana-pret-azi","/bnb-pret-azi","/xrp-pret-azi","/cardano-pret-azi","/dogecoin-pret-azi","/polkadot-pret-azi","/avalanche-pret-azi","/chainlink-pret-azi","/cele-mai-bune-exchange-crypto-romania","/contact","/podcast","/termeni","/confidentialitate","/ce-este","/what-is","/ce-este-web3","/what-is-web3","/ce-este-blockchain","/what-is-blockchain","/ce-este-crypto","/what-is-crypto","/ce-este-bitcoin","/what-is-bitcoin","/ce-este-ethereum","/what-is-ethereum","/ce-este-solana","/what-is-solana","/ce-este-bnb","/what-is-bnb","/ce-este-xrp","/what-is-xrp","/ce-este-cardano","/what-is-cardano","/ce-este-dogecoin","/what-is-dogecoin","/ce-este-polkadot","/what-is-polkadot","/ce-este-avalanche","/what-is-avalanche","/ce-este-chainlink","/what-is-chainlink","/glosar","/web3-studii-de-caz","/web3-case-studies","/despre-noi","/about","/innovation-network"]),w7e=["/articol/","/article/","/glosar/","/innovation-network/","/autor/","/ce-este-","/what-is-"],j7e=/[\p{L}\p{N}]/u,gk=[["EduWeb Academy","/academy"],["Blockchain","/ce-este-blockchain"],["Web3","/ce-este-web3"],["NFT","/ce-este-blockchain"],["Bitcoin","/bitcoin-pret-azi"],["Ethereum","/ethereum-pret-ron"]];let ay=null,dG=0;const _7e=5*60*1e3;function hG(e){return e?j7e.test(e):!1}function C7e(e,r,n){return!hG(e[r-1])&&!hG(e[n])}function N7e(e,r){const n=e.toLocaleLowerCase("ro-RO"),i=r.toLocaleLowerCase("ro-RO");let a=0;for(;a<n.length;){const o=n.indexOf(i,a);if(o===-1)return-1;const l=o+r.length;if(C7e(e,o,l))return o;a=o+1}return-1}function nme(e){return bD(e)||b7e.has(e)||w7e.some(r=>e.startsWith(r))}async function S7e(){if(ay&&Date.now()-dG<_7e)return ay;try{const{data:e,error:r}=await G.from("internal_links").select("keyword, path").eq("is_active",!0).order("sort_order",{ascending:!0});return r||!(e!=null&&e.length)?gk:(ay=e.filter(n=>nme(n.path)).map(n=>[n.keyword,n.path]),dG=Date.now(),ay.length?ay:gk)}catch{return gk}}function k7e(){return ay||gk}S7e();const fG=1;function bu(e,r=!1){const n=k7e();let i=[e];const a=new Map;for(const[o,l]of n)(a.get(l)||0)>=fG||nme(l)&&(r&&bD(l)||(i=i.flatMap((u,d)=>{if(typeof u!="string")return[u];if((a.get(l)||0)>=fG)return[u];const h=N7e(u,o);if(h===-1)return[u];const f=u.slice(0,h),p=u.slice(h,h+o.length),m=u.slice(h+p.length);a.set(l,(a.get(l)||0)+1);const A=[];return f&&A.push(f),bD(l)?A.push(s.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:p},`el-${d}-${o}`)):A.push(s.jsx(be,{to:l,className:"text-primary hover:underline font-medium",children:p},`il-${d}-${o}`)),m&&A.push(m),A})));return i}function E7e({faqs:e}){if(!e.length)return null;const r={"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.answer}}))};return s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(r)}})}function B7e({article:e,readTime:r,author:n,lang:i}){var o;const a={"@context":"https://schema.org","@type":"NewsArticle",headline:e.title,description:e.summary,image:e.imageUrl,datePublished:e.publishedAt,dateModified:e.publishedAt,...e.originalPublishedAt&&{dateCreated:e.originalPublishedAt},author:n?{"@type":"Person",name:`${n.first_name} ${n.last_name}`,...n.linkedin_url&&{url:n.linkedin_url}}:{"@type":"Organization",name:"EduWeb"},publisher:{"@type":"Organization",name:"EduWeb",url:window.location.origin,logo:{"@type":"ImageObject",url:`${window.location.origin}/og-default.png`}},mainEntityOfPage:{"@type":"WebPage","@id":window.location.href},inLanguage:i,wordCount:((o=e.content)==null?void 0:o.split(/\s+/).filter(Boolean).length)||0,articleSection:e.topic,keywords:e.topic,timeRequired:`PT${r}M`};return s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(a)}})}function T7e({article:e,lang:r}){const n={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:r==="en"?"Home":"Acasă",item:window.location.origin},{"@type":"ListItem",position:2,name:r==="en"?"News":"Știri",item:`${window.location.origin}/stiri`},{"@type":"ListItem",position:3,name:e.title}]};return s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(n)}})}function P7e({article:e,audioUrl:r,duration:n,lang:i}){const a={"@context":"https://schema.org","@type":"VideoObject",name:`EduWeb Brief: ${e.title}`,description:e.summary,thumbnailUrl:e.imageUrl,uploadDate:e.publishedAt,duration:`PT${n}S`,contentUrl:r,embedUrl:r,publisher:{"@type":"Organization",name:"EduWeb"},inLanguage:i};return s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(a)}})}function zf(e){if(e.split(/(\[([^\]]+)\]\(([^)]+)\)|\*\*[^*]+\*\*)/g).length===1)return e;const n=[];let i=0;const a=/\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*/g;let o=0,l;for(;(l=a.exec(e))!==null;){if(l.index>o&&n.push(s.jsx("span",{children:e.slice(o,l.index)},i++)),l[1]!==void 0&&l[2]!==void 0){const c=l[2];c.startsWith("/")?n.push(s.jsx(be,{to:c,className:"text-primary hover:underline font-medium",children:l[1]},i++)):n.push(s.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:l[1]},i++))}else l[3]!==void 0&&n.push(s.jsx("strong",{className:"font-semibold text-foreground",children:l[3]},i++));o=l.index+l[0].length}return o<e.length&&n.push(s.jsx("span",{children:e.slice(o)},i++)),n.length>0?n:e}function I7e(e){return/\b(USD|EUR|RON|\$|€|billion|miliarde|million|milioane|CAGR|%)\b/i.test(e)&&e.length<120&&(e.startsWith("**")||/^\d/.test(e.trim()))}function F7e({text:e}){const r=e.replace(/\*\*/g,"");return s.jsx("div",{className:"my-6 rounded-xl border border-primary/20 bg-primary/5 px-6 py-5",children:s.jsx("p",{className:"font-heading text-lg md:text-xl font-bold text-foreground leading-snug",children:r})})}function mG(){const{slug:e}=Zl(),{lang:r}=Pt(),n=r==="en"?"en-US":"ro-RO",i=typeof window<"u"&&window.location.pathname.startsWith("/article/"),{data:a,isLoading:o}=Xe({queryKey:["article",e,r,i],queryFn:async()=>
2059{if(i){const{data:V}=await G.from("posts").select("*").eq("slug_en",e).eq("status","published").maybeSingle();if(V)return V}const{data:D,error:L}=await G.from("posts").select("*").eq("slug",e).eq("status","published").single();if(L)throw L;return D},enabled:!!e}),l=a==null?void 0:a.author_id,{data:c}=Xe({queryKey:["post-author",l],queryFn:async()=>{const{data:D,error:L}=await G.from("authors").select("*").eq("id",l).single();if(L)throw L;return D},enabled:!!l}),u=a?P_(a,r):null,d=(()=>{const D=r==="en"&&(a==null?void 0:a.video_script_en)||(a==null?void 0:a.video_script);if(!D)return null;try{return JSON.parse(D)}catch{return null}})(),h=r==="en"&&(a==null?void 0:a.video_audio_url_en)||(a==null?void 0:a.video_audio_url),f=r==="en"&&(a==null?void 0:a.video_duration_seconds_en)||(a==null?void 0:a.video_duration_seconds),m=(r==="en"&&(a==null?void 0:a.video_status_en)||(a==null?void 0:a.video_status))==="ready"&&d&&h,A=a&&a.status==="published"&&a.word_count>=300,[g,y]=w.useState(!1),x=Kr(),b=async()=>{if(!(!(a!=null&&a.id)||g)){y(!0);try{(await fetch("https://ahleagpvrcuwshrzzpkq.supabase.co/functions/v1/generate-video-brief",{method:"POST",headers:{"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw"},body:JSON.stringify({post_id:a.id,lang:r})})).ok&&x.invalidateQueries({queryKey:["article",e,r]})}catch(D){console.error("Video generation error:",D)}finally{y(!1)}}},v=a==null?void 0:a.slug,j=a==null?void 0:a.slug_en,_=v?`https://eduweb.ro/articol/${v}`:"",C=j?`https://eduweb.ai/article/${j}`:"",N=i?C||`https://eduweb.ai/article/${e}`:`https://eduweb.ro/articol/${e}`,S=N,{awardCoins:E}=Cp();Xe({queryKey:["track-view",u==null?void 0:u.id],queryFn:async()=>{await G.from("post_views").insert({post_id:u.id});const D=await E(1,"article_read",u.id);return!D.success&&D.reason!=="client_dedup"&&D.reason!=="duplicate"&&console.warn("EduCoins article_read failed:",D.reason),!0},enabled:!!(u!=null&&u.id),staleTime:1/0,refetchOnWindowFocus:!1});const O=r==="en"?(a==null?void 0:a.meta_title_en)||(a==null?void 0:a.meta_title)||(u==null?void 0:u.title):(a==null?void 0:a.meta_title)||(u==null?void 0:u.title),B=r==="en"?(a==null?void 0:a.meta_description_en)||(a==null?void 0:a.meta_description)||(u==null?void 0:u.summary):(a==null?void 0:a.meta_description)||(u==null?void 0:u.summary);if(Zr(u?{title:O,description:B,image:u.imageUrl,type:"article",canonicalUrl:N,hreflangRo:_||void 0,hreflangEn:C||void 0}:void 0),o)return s.jsx(Ft,{children:s.jsx("div",{className:"container py-20 flex justify-center",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})})});if(!u)return s.jsx(Ft,{children:s.jsxs("div",{className:"container py-20 text-center",children:[s.jsx("h1",{className:"font-heading text-2xl font-bold mb-2",children:r==="en"?"Article not found":"Articol negăsit"}),s.jsxs(be,{to:"/stiri",className:"text-primary text-sm hover:underline",children:["← ",r==="en"?"Back to news":"Înapoi la știri"]})]})});const T=Math.max(2,Math.ceil(u.content.split(" ").length/200)),F=u.faqs||[],I=u.topics||[u.topic];return s.jsxs(Ft,{children:[s.jsx(B7e,{article:u,readTime:T,author:c,lang:r}),s.jsx(T7e,{article:u,lang:r}),F.length>0&&s.jsx(E7e,{faqs:F}),m&&h&&s.jsx(P7e,{article:u,audioUrl:h,duration:f,lang:r}),s.jsx("article",{className:"px-4 md:px-6",children:s.jsx("div",{className:"mx-auto max-w-[720px] pt-8 pb-16",children:s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.5},children:[s.jsxs(be,{to:"/stiri",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," ",r==="en"?"Back to news":"Înapoi la știri"]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-4",children:[I.map(D=>s.jsx(Hg,{topic:D},D)),s.jsx(tb,{level:u.difficulty}),u.contentType==="ai-brief"&&s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-[10px] font-semibold bg-accent/12 text-accent border border-accent/20",children:[s.jsx(ts,{size:10})," AI Brief"]})]}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl lg:text-[2.75rem] font-bold leading-[1.15] mb-5 tracking-tight text-foreground",children:u.title}),s.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground mb-6 flex-wrap",children:[c&&s.jsxs(be,{to:`/autor/${c.slug}`,className:"flex items-center gap-2 hover:text-primary transition-colors",children:[c.avatar_url?s.jsx("img",{src:c.avatar_url,alt:`${c.first_name} ${c.last_name}`,className:"w-7 h-7 rounded-full object-cover border border-border"}):s.jsxs("div",{className:"w-7 h-7 rounded-full bg-primary/10 flex items-center justify-center text-primary text-[11px] font-semibold",children:[c.first_name[0],c.last_name[0]]}),s.jsxs("div",{className:"flex flex-col leading-tight",children:[s.jsxs("span",{className:"font-medium text-foreground",children:[c.first_name," ",c.last_name]}),c.title&&s.jsx("span",{className:"text-xs text-muted-foreground",children:c.title})]})]}),c&&s.jsx("span",{className:"text-border",children:"·"}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ja,{size:14}),new Date(u.publishedAt).toLocaleDateString(n,{day:"numeric",month:"long",year:"numeric"})]}),s.jsx("span",{className:"text-border",children:"·"}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ki,{size:14}),T," min ",r==="en"?"read":"citire"]})]}),u.imageUrl&&s.jsx("figure",{className:"mb-8",children:s.jsxs("div",{className:"relative rounded-xl overflow-hidden",children:[s.jsx("img",{src:u.imageUrl,alt:u.title,className:"w-full h-auto max-h-[420px] object-cover"}),s.jsx("span",{className:"absolute bottom-3 right-4 text-xs font-semibold tracking-wider text-white/40 select-none pointer-events-none drop-shadow-sm",children:"EduWeb"})]})}),u.originalPublishedAt&&s.jsxs("p",{className:"text-xs text-muted-foreground mb-6 flex items-center gap-1.5",children:[s.jsx(yr,{size:12}),r==="en"?"Originally published:":"Publicat original:"," ",new Date(u.originalPublishedAt).toLocaleDateString(n,{day:"numeric",month:"long",year:"numeric"})]}),I.some(D=>["blockchain","web3","nft","validare-nft"].includes(D))&&s.jsx("div",{className:"mb-8",children:s.jsx(rj,{})}),s.jsx("div",{className:"mb-8",children:s.jsx(Kv,{topics:I,variant:"banner"})}),u.summary&&s.jsx("div",{className:"mb-8 pl-4 border-l-[3px] border-primary/40",children:s.jsx("p",{className:"text-lg md:text-xl text-foreground
2059/80 leading-relaxed font-[450]",children:u.summary})}),m&&s.jsx("div",{className:"mb-8",children:s.jsx(fp,{script:d,audioUrl:h,duration:f,topic:u.topic,postId:u.id,postTitle:u.title})}),!m&&A&&s.jsx("div",{className:"mb-8",children:s.jsx(fp,{script:{hook:u.title,section1:u.summary||"",section2:"",section3:"",closing:r==="en"?"Learn more on EduWeb":"Află mai mult pe EduWeb"},audioUrl:"",duration:60,topic:u.topic,postId:u.id,postTitle:u.title,onDemandGenerate:b,isGenerating:g})}),s.jsxs("div",{className:"prose-eduweb",children:[(()=>{const D=/^##\s*(Termeni\s+explica[ți]i|Glossary|Termeni\s+explica)/i;let L=u.content;L=L.replace(/([^\n])(\n?)(#{2,3}\s)/g,`$1
2060$3`),L=L.replace(/([.!?:;,])(\s*)(#{2,3}\s)/g,`$1
2061$3`),L=L.replace(/---\s*\n\s*Analiză educațională generată cu AI și revizuită editorial\.\s*\n?\s*---?/gi,""),L=L.replace(/Analiză educațională generată cu AI și revizuită editorial\./gi,"");const V=L.split(`
2062`);let U=!1;const Q=V.filter((q,M)=>D.test(q.trim())?(U=!0,!1):U?/^##\s/.test(q.trim())&&!D.test(q.trim())?(U=!1,!0):(q.startsWith("---")&&(U=!1),!1):!0);let $=0;return Q.map((q,M)=>{if(/^#{1,6}\s*$/.test(q.trim()))return null;if(I7e(q))return s.jsx(F7e,{text:q},M);if(q.startsWith("# ")&&!q.startsWith("## "))return s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold mt-12 mb-5 text-foreground tracking-tight",children:zf(q.replace("# ",""))},M);if(q.startsWith("#### "))return s.jsx("h4",{className:"font-heading text-base font-semibold mt-6 mb-2 text-foreground",children:zf(q.replace("#### ",""))},M);if(q.startsWith("### "))return s.jsx("h3",{className:"font-heading text-lg font-semibold mt-8 mb-3 text-foreground",children:zf(q.replace("### ",""))},M);if(q.startsWith("## "))return s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-semibold mt-12 mb-4 text-foreground tracking-tight border-b border-border/50 pb-2",children:zf(q.replace("## ",""))},M);if(q.startsWith("- ")||q.startsWith("• ")||/^\*\s+/.test(q)){const ne=q.replace(/^[\*\-•]\s+/,""),ie=ne.match(/^(.*?)\s*(#{2,3}\s.+)$/);if(ie){const X=[];ie[1].trim()&&X.push(s.jsx("li",{className:"mb-2 text-[1.0625rem] text-foreground/85 leading-[1.8] ml-5 list-disc",children:bu(ie[1].trim())},`${M}-li`));const de=ie[2];return de.startsWith("### ")?X.push(s.jsx("h3",{className:"font-heading text-lg font-semibold mt-8 mb-3 text-foreground",children:zf(de.replace("### ",""))},`${M}-h`)):de.startsWith("## ")&&X.push(s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-semibold mt-12 mb-4 text-foreground tracking-tight border-b border-border/50 pb-2",children:zf(de.replace("## ",""))},`${M}-h`)),s.jsx(s.Fragment,{children:X})}return s.jsx("li",{className:"mb-2 text-[1.0625rem] text-foreground/85 leading-[1.8] ml-5 list-disc",children:bu(ne)},M)}if(q.startsWith("---"))return s.jsx("hr",{className:"my-10 border-border/50"},M);if(q.startsWith("*")&&q.endsWith("*")&&!q.startsWith("**"))return s.jsx("p",{className:"mb-5 text-sm italic text-muted-foreground",children:q.replace(/\*/g,"")},M);if(q.startsWith("**")&&q.endsWith("**"))return s.jsx("p",{className:"mb-4 text-lg font-semibold text-foreground",children:q.replace(/\*\*/g,"")},M);if(q.trim()==="")return null;$++;const z=$===1,K=zf(q);return s.jsx("p",{className:"mb-5 text-[1.0625rem] text-foreground/85 leading-[1.85]",children:typeof K=="string"?bu(K,z):K},M)})})(),(()=>{const D=/^##\s*(Termeni\s+explica[ți]i|Glossary|Termeni\s+explica)/i,L=u.content.split(`
2063`);let V=!1;const U=[];for(let Q=0;Q<L.length;Q++){const $=L[Q];if(D.test($.trim())){V=!0;continue}if(V){if(/^##\s/.test($.trim())&&!D.test($.trim())||$.startsWith("---"))break;$.trim()&&U.push($)}}return U.length===0?null:s.jsxs("section",{className:"mt-10 pt-6 border-t border-border",children:[s.jsxs("h2",{className:"font-heading text-xl md:text-2xl font-semibold mb-4 flex items-center gap-2 text-foreground",children:[s.jsx(yr,{size:20,className:"text-primary"}),r==="en"?"Key Terms Explained":"Termeni explicați din articol"]}),s.jsx("div",{className:"space-y-2",children:U.map((Q,$)=>{const q=Q.replace(/^[\*\-•]\s*/,""),M=zf(q);
2063return s.jsx("p",{className:"text-[1.0625rem] text-foreground/85 leading-[1.8] ml-1",children:typeof M=="string"?bu(M):M},$)})})]})})()]}),(()=>{const D={blockchain:{label:"Ce este Blockchain?",labelEn:"What is Blockchain?",path:"/ce-este-blockchain"},web3:{label:"Ce este Web3?",labelEn:"What is Web3?",path:"/ce-este-web3"},nft:{label:"Ce este Blockchain?",labelEn:"What is Blockchain?",path:"/ce-este-blockchain"},ai:{label:"Ce este Web3?",labelEn:"What is Web3?",path:"/ce-este-web3"},"digital-marketing":{label:"Ce este Web3?",labelEn:"What is Web3?",path:"/ce-este-web3"},"e-learning":{label:"Ce este Web3?",labelEn:"What is Web3?",path:"/ce-este-web3"},"validare-nft":{label:"Ce este Blockchain?",labelEn:"What is Blockchain?",path:"/ce-este-blockchain"}},V=(u.topic?Array.isArray(u.topic)?u.topic:[u.topic]:[]).find(z=>D[z.toLowerCase()]),U=V?D[V.toLowerCase()]:null,Q=[{keyword:/bitcoin/i,label:"Ce este Bitcoin?",labelEn:"What is Bitcoin?",path:"/ce-este-bitcoin"},{keyword:/ethereum/i,label:"Ce este Ethereum?",labelEn:"What is Ethereum?",path:"/ce-este-ethereum"},{keyword:/solana/i,label:"Ce este Solana?",labelEn:"What is Solana?",path:"/ce-este-solana"},{keyword:/\bbnb\b/i,label:"Ce este BNB?",labelEn:"What is BNB?",path:"/ce-este-bnb"},{keyword:/\bxrp\b/i,label:"Ce este XRP?",labelEn:"What is XRP?",path:"/ce-este-xrp"},{keyword:/cardano/i,label:"Ce este Cardano?",labelEn:"What is Cardano?",path:"/ce-este-cardano"},{keyword:/dogecoin/i,label:"Ce este Dogecoin?",labelEn:"What is Dogecoin?",path:"/ce-este-dogecoin"},{keyword:/polkadot/i,label:"Ce este Polkadot?",labelEn:"What is Polkadot?",path:"/ce-este-polkadot"},{keyword:/avalanche/i,label:"Ce este Avalanche?",labelEn:"What is Avalanche?",path:"/ce-este-avalanche"},{keyword:/chainlink/i,label:"Ce este Chainlink?",labelEn:"What is Chainlink?",path:"/ce-este-chainlink"}],$=u.title||"",M=Q.find(z=>z.keyword.test($))||U;return M?s.jsx("div",{className:"my-8 p-5 rounded-xl border border-primary/20 bg-primary/5",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Rr,{className:"h-5 w-5 text-primary shrink-0"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:r==="en"?"Want to learn the fundamentals?":"Vrei să înveți bazele?"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:r==="en"?"Read our comprehensive guide":"Citește ghidul nostru complet"})]}),s.jsxs(be,{to:M.path,className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:brightness-110 transition-all shrink-0",children:[r==="en"?M.labelEn:M.label,s.jsx(Gt,{size:12})]})]})}):null})(),u.slug.includes("comunicat-de-presa-eduweb-lansare")&&s.jsxs("div",{className:"mt-12 mb-8",children:[s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-semibold mb-8 text-foreground tracking-tight border-b border-border/50 pb-2",children:r==="en"?"EduWeb Journey Timeline":"Cronologia EduWeb"}),s.jsx("div",{className:"relative pl-8 border-l-2 border-primary/30 space-y-8",children:[{year:"2020",title:r==="en"?"European POCU Project":"Proiect European POCU",desc:r==="en"?"Won the European POCU project, marking the beginning of a 5-year collaboration with over 525 students through practical internships.":"Câștigarea proiectului european POCU, marcând începutul unei colaborări de 5 ani cu peste 525 de studenți prin stagii de practică."},{year:"2020–2025",title:r==="en"?"525+ Students Trained":"525+ Studenți Instruiți",desc:r==="en"?"Over five years, we trained hundreds of students, understanding their real needs and building an educational vision grounded in practice.":"De-a lungul a cinci ani, am instruit sute de studenți, înțelegând nevoile lor reale și construind o viziune educațională ancorată în practică."},{year:"2025",title:r==="en"?"Platform Transformation":"Transformarea Platformei",desc:r==="en"?"Transition from a simple e-learning site to a complete educational ecosystem integrating news, courses, crypto data, and AI.":"Tranziția de la un simplu site de e-learning la un ecosistem educațional complet care integrează știri, cursuri, date crypto și AI."},{year:"2025–2026",title:r==="en"?"Beta Period":"Perioada de Beta",desc:r==="en"?"Months of intensive testing and refinement to ensure every feature works exactly as planned.":"Luni de testare intensivă și rafinare pentru a ne asigura că fiecare funcționalitate operează conform planului."},{year:"20 Apr 2026",title:r==="en"?"Official Launch":"Lansare Oficială",desc:r==="en"?"EduWeb officially launches as the platform of the future — a complete educational hub for Web3, AI & Blockchain.":"EduWeb se lansează oficial ca platforma viitorului — un hub educațional complet pentru Web3, AI și Blockchain."},{year:r==="en"?"Coming Soon":"În curând",title:r==="en"?"NFT Diplomas & Partnerships":"Diplome NFT & Parteneriate",desc:r==="en"?"NFT-validated diplomas (a first in Romania) and strategic partnerships with technology companies for community growth.":"Diplome validate prin NFT (în premieră în România) și parteneriate strategice cu companii tehnologice pentru creșterea comunității."}].map((D,L)=>s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute -left-[2.55rem] top-1 w-4 h-4 rounded-full bg-primary border-2 border-background shadow-sm"}),s.jsxs("div",{className:"bg-card/50 border border-border/50 rounded-lg p-4",children:[s.jsx("span",{className:"inline-block px-2 py-0.5 rounded text-xs font-bold bg-primary/10 text-primary mb-2",children:D.year}),s.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-1",children:D.title}),s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:D.desc})]})]},L))})]}),s.jsx(UQe,{}),u.sourceUrl&&s.jsx("div",{className:"mt-10 pt-6 border-t border-border",children:s.jsxs("p",{className:"text-sm text-muted-foreground flex items-center gap-1.5",children:[s.jsx(Yr,{size:14}),r==="en"?"Original source:":"Sursa originală:"," ",s.jsx("a",{href:u.sourceUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:u.sourceName||new URL(u.sourceUrl).hostname})]})}),s.jsxs("div",{className:"mt-6 pt-4 border-t border-border",children:[s.jsxs("p",{className:"text-sm font-medium text-muted-foreground mb-3 flex items-center gap-2",children:[s.jsx(zU,{size:14}),r==="en"?"Share this article (+5 EduCoins)":"Distribuie articolul (+5 EduCoins)"]}),s.jsx("div",{className:"flex gap-2 flex-wrap",children:[{name:"X",icon:"𝕏",url:`https://twitter.com/intent/tweet?text=${encodeURIComponent(u.title)}&url=${encodeURIComponent(S)}`},{name:"Facebook",icon:"f",url:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(S)}`},{name:"LinkedIn",icon:"in",url:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(S)}`},{name:"WhatsApp",icon:"💬",url:`https://wa.me/?text=${encodeURIComponent(u.title+" "+S)}`}].map(D=>s.jsxs("button",{onClick:()=>{window.open(D.url,"_blank","width=600,height=400"),E(5,"social_share",`${u.id}_${D.name.toLowerCase()}`)},className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-border bg-card hover:bg-primary/5 hover:border-primary/30 transition-colors",children:[s.jsx("span",{children:D.icon})," ",D.name]},D.name))})]}),s.jsx(v7e,{postId:u.id,lang:r}),F.length>0&&s.jsxs("section",{className:"mt-12 pt-8 border-t border-border",children:[s.jsxs("h2",{className:"font-heading text-xl md:text-2xl font-semibold mb-6 flex items-center gap-2 text-foreground",children:[s.jsx(ms,{size:20,className:"text-primary"}
2063),r==="en"?"Frequently Asked Questions":"Întrebări frecvente"]}),s.jsx(lo,{type:"single",collapsible:!0,className:"space-y-2",children:F.map((D,L)=>s.jsxs(Os,{value:`faq-${L}`,className:"border border-border rounded-lg px-4 bg-card/50",children:[s.jsx(Ls,{className:"text-left text-base font-medium hover:no-underline",children:D.question}),s.jsx(Rs,{className:"text-muted-foreground text-base leading-relaxed",children:D.answer})]},L))})]}),s.jsx(Kv,{topics:I}),I.some(D=>["blockchain","web3","nft","validare-nft"].includes(D))&&s.jsx("div",{className:"mt-10",children:s.jsx(rj,{})}),s.jsx($Qe,{}),s.jsxs("section",{className:"mt-14 rounded-xl border border-primary/20 bg-gradient-to-br from-primary/5 to-primary/10 p-8 text-center",children:[s.jsx(Rr,{size:32,className:"text-primary mx-auto mb-3"}),s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-bold mb-2 text-foreground",children:r==="en"?"Continue Learning":"Continuă să înveți"}),s.jsx("p",{className:"text-muted-foreground text-sm md:text-base mb-5 max-w-md mx-auto",children:r==="en"?"Explore more insights about technology, automation, and Web3 in the EduWeb Academy.":"Descoperă mai multe despre tehnologie, automatizare și Web3 în EduWeb Academy."}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-lg font-semibold hover:brightness-110 transition-all",children:[r==="en"?"Explore Academy":"Explorează Academy",s.jsx(Gt,{size:16})]})]})]})})})]})}function O7e(){const{user:e}=Fn();w.useEffect(()=>{e&&(async()=>{const{data:o}=await G.from("profiles").select("referral_code").eq("user_id",e.id).maybeSingle();if(o&&!o.referral_code){const l=e.id.slice(0,8).toUpperCase();await G.from("profiles").update({referral_code:l}).eq("user_id",e.id)}})()},[e]);const{data:r}=Xe({queryKey:["referral-code",e==null?void 0:e.id],queryFn:async()=>{const{data:o}=await G.from("profiles").select("referral_code").eq("user_id",e.id).maybeSingle();return o},enabled:!!e}),{data:n=0}=Xe({queryKey:["referral-count",e==null?void 0:e.id],queryFn:async()=>{const{count:o}=await G.from("referrals").select("id",{count:"exact",head:!0}).eq("referrer_id",e.id);return o||0},enabled:!!e}),i=(r==null?void 0:r.referral_code)||"",a=i?`https://eduweb.ro/autentificare?ref=${i}`:"";return{referralCode:i,referralLink:a,referralCount:n}}function ime(){const r=new URLSearchParams(window.location.search).get("ref");r&&localStorage.setItem("eduweb_referral",r)}async function ame(e){const r=localStorage.getItem("eduweb_referral");if(r)try{const{data:n}=await G.from("profiles").select("user_id").eq("referral_code",r).maybeSingle();if(!n||n.user_id===e)return;const{data:i}=await G.from("referrals").select("id").eq("referred_user_id",e).maybeSingle();if(i)return;await G.from("referrals").insert({referrer_id:n.user_id,referred_user_id:e,referral_code:r});const{data:a}=await G.from("user_edu_coins").select("*").eq("user_id",n.user_id
2063).maybeSingle();a?await G.from("user_edu_coins").update({balance:a.balance+25,total_earned:a.total_earned+25}).eq("user_id",n.user_id):await G.from("user_edu_coins").insert({user_id:n.user_id,balance:25,total_earned:25}),await G.from("edu_coin_transactions").insert({user_id:n.user_id,amount:25,reason:"referral",reference_id:e}),localStorage.removeItem("eduweb_referral")}catch(n){console.error("Referral processing error:",n)}}const qe=w.forwardRef(({className:e,type:r,...n},i)=>s.jsx("input",{type:r,className:it("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:i,...n}));qe.displayName="Input";var L7e="Label",sme=w.forwardRef((e,r)=>s.jsx(Rt.label,{...e,ref:r,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));sme.displayName=L7e;var ome=sme;const R7e=O0("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ge=w.forwardRef(({className:e,...r},n)=>s.jsx(ome,{ref:n,className:it(R7e(),e),...r}));Ge.displayName=ome.displayName;var D7e="authorization_response",M7e="/~oauth/initiate",z7e=["https://oauth.lovable.app","https://lovable.dev"],U7e="lovable://oauth-callback",$7e="http://127.0.0.1/iframe-oauth/callback",Q7e=500,H7e=12e4;function V7e(e){let r;const n=new Promise(o=>{r=o}),i=o=>{if(!e.some(u=>o.origin===u))return;const c=o.data;!c||typeof c!="object"||c.type===D7e&&r(c.response)},a=()=>{window.removeEventListener("message",i)};return window.addEventListener("message",i),{cleanup:a,messagePromise:n}}function W7e(e){const r=window.screenX!==0||window.screenY!==0||!e,n=r?window.outerWidth*.5:window.screen.width*.5,i=r?window.outerHeight*.5:window.screen.height*.5,a=r?window.screenX+(window.outerWidth-n)/2:(window.screen.width-n)/2,o=r?window.screenY+(window.outerHeight-i)/2:(window.screen.height-i)/2;return{width:n,height:i,left:a,top:o}}function pG(e,r){return e.state!==r?{error:new Error("State is invalid")}:e.error?e.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(e.error_description??"Sign in failed")}:!e.access_token||!e.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:e.access_token,refresh_token:e.refresh_token},error:null}}function q7e(){const e=navigator.userAgent;return!!(/iPhone|iPad|iPod|Android/i.test(e)||/Macintosh/i.test(e)&&navigator.maxTouchPoints>1)}function K7e(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function G7e(e={}){const r=e.oauthBrokerUrl??M7e,n=e.supportedOAuthOrigins??z7e;async function i(a,o={}){let l=!1;try{l=window.self!==window.top}catch{l=!0}const c=navigator.userAgent,u=/LovableApp\//.test(c),d=!u&&/lovable/i.test(c),h=K7e();let f=o.redirect_uri??window.location.origin;u&&l?f=U7e:d&&l&&(f=$7e);const p=new URLSearchParams({...o.extraParams,provider:a,redirect_uri:f,state:h});if(!l)return window.location.href=`${r}?${p.toString()}`,{error:null,redirected:!0};!u&&!d&&p.set("response_mode","web_message");const m=`${r}?${p.toString()}`,A=d?[...n,window.location.origin]:n,{messagePromise:g,cleanup:y}=V7e(A);let x;if(q7e())x=window.open(m,"_blank");else{const{width:j,height:_,left:C,top:N}=W7e(l);x=window.open(m,"oauth",`width=${j},height=${_},left=${C},top=${N}`)}if(!x&&(u||d)){let j;const _=new Promise((C,N)=>{j=setTimeout(()=>{N(new Error("OAuth timed out waiting for response"))},H7e)});try{const C=await Promise.race([g,_]);return pG(C,h)}catch(C){return{error:C instanceof Error?C:new Error(String(C))}}finally{j&&clearTimeout(j),y()}}if(!x)return y(),{error:new Error("Popup was blocked")};let b;const v=new Promise((j,_)=>{b=setInterval(()=>{x.closed&&(clearInterval(b),_(new Error("Sign in was cancelled")))},Q7e)});try{const j=await Promise.race([g,v]);return pG(j,h)}catch(j){return{error:j instanceof Error?j:new Error(String(j))}}finally{clearInterval(b),y(),x==null||x.close()}}return{signInWithOAuth:i}}var X7e={name:"@lovable.dev/cloud-auth-js",version:"1.1.1",description:"Lovable Cloud Auth JS",main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist"],scripts:{build:"tsup src/index.ts --format cjs,esm --dts --outDir dist",dev:"tsup src/index.ts --format cjs,esm --dts --watch",test:"vitest run",typecheck:"tsgo --noEmit",prepublishOnly:"npm run clean && npm run build",clean:"rimraf dist"},keywords:["lovable","oauth","authentication"],license:"MIT",devDependencies:{"@types/node":"^22",jsdom:"^26",rimraf:"^5.0.0",tsup:"^7.2.0",typescript:"^5",vitest:"^4.1.0"}};typeof window<"u"&&(window.__lovable_cloud_auth_js_version=X7e.version);function Y7e(e={}){return G7e(e)}const J7e=Y7e(),lme={auth:{signInWithOAuth:async(e,r)=>{const n=await J7e.signInWithOAuth(e,{redirect_uri:r==null?void 0:r.redirect_uri,extraParams:{...r==null?void 0:r.extraParams}});if(n.redirected||n.error)return n;try{await G.auth.setSession(n.tokens)}catch(i){return{error:i instanceof Error?i:new Error(String(i))}}return n}}}
2063,Z7e=[{icon:Ec,label:"AI Tutor Tudor",desc:"Întreabă orice, primești răspunsuri personalizate"},{icon:Rr,label:"Cursuri interactive",desc:"De la zero la avansat, cu diplome"},{icon:Eu,label:"Simulări Web3",desc:"Exersează tranzacții fără risc real"},{icon:ff,label:"Knowledge Map",desc:"Vizualizează conexiunile între concepte"},{icon:Wi,label:"EduCoins & Niveluri",desc:"Câștigă recompense pe măsură ce înveți"},{icon:ZA,label:"Newsletter personalizat",desc:"Știri crypto adaptate intereselor tale"}],eHe=[{icon:yr,value:"13+",label:"Ghiduri"},{icon:Rn,value:"180+",label:"Termeni"},{icon:oo,value:"3+",label:"Cursuri"}];function tHe(){const{user:e,loading:r,signIn:n,signUp:i,isAdmin:a,adminLoading:o}=Fn(),{toast:l}=wn();Zr({title:"Autentificare",noIndex:!0});const[c,u]=w.useState(!0),[d,h]=w.useState(""),[f,p]=w.useState(""),[m,A]=w.useState(""),[g,y]=w.useState(!1),[x,b]=w.useState(!1);if(w.useEffect(()=>{ime()},[]),w.useEffect(()=>{e&&ame(e.id)},[e]),r||e&&o)return s.jsx(Ft,{children:s.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})})});if(e)return s.jsx(xd,{to:a?"/admin":"/membru",replace:!0});const v=async _=>{if(_.preventDefault(),y(!0),c){const{error:C}=await n(d,f);C&&l({title:"Eroare la autentificare",description:C.message,variant:"destructive"})}else{const{error:C}=await i(d,f,m);l(C?{title:"Eroare la înregistrare",description:C.message,variant:"destructive"}:{title:"Cont creat!",description:"Verifică-ți emailul pentru confirmare."})}y(!1)},j=async()=>{b(!0);try{const _=await lme.auth.signInWithOAuth("google",{redirect_uri:"https://eduweb-romania-flux.lovable.app"});_!=null&&_.error&&l({title:"Eroare Google Sign-In",description:String(_.error),variant:"destructive"})}catch(_){l({title:"Eroare",description:_ instanceof Error?_.message:"Eroare la autentificare cu Google",variant:"destructive"})}finally{b(!1)}};return s.jsx(Ft,{children:s.jsx("div",{className:"container max-w-6xl py-8 lg:py-0",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-0 min-h-[70vh]",children:[s.jsxs("div",{className:"flex flex-col justify-center py-8 lg:py-16 lg:pr-12",children:[s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[s.jsx("h1",{className:"font-heading text-3xl lg:text-4xl font-bold tracking-tight mb-3",children:"Învață Web3, Crypto & AI"}),s.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:"Totul gratuit. Creează-ți cont și accesezi instant toate instrumentele."})]}),s.jsx("div",{className:"space-y-4 mb-8",children:Z7e.map((_,C)=>s.jsxs(Le.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.1+C*.07,duration:.4},className:"flex items-start gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary/10 shrink-0 mt-0.5",children:s.jsx(_.icon,{size:18,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-sm",children:_.label}),s.jsx("p",{className:"text-xs text-muted-foreground",children:_.desc})]})]},_.label))}),s.jsx(Le.div,{initial:{opacity:0}
2063,animate:{opacity:1},transition:{delay:.6},className:"flex items-center gap-6 pt-6 border-t border-border/50",children:eHe.map(_=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(_.icon,{size:16,className:"text-primary"}),s.jsx("span",{className:"font-heading font-bold text-lg",children:_.value}),s.jsx("span",{className:"text-xs text-muted-foreground",children:_.label})]},_.label))})]}),s.jsx("div",{className:"flex items-center justify-center py-8 lg:py-16 lg:pl-12 lg:border-l border-border/30",children:s.jsx(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2,duration:.5},className:"w-full max-w-sm",children:s.jsxs("div",{className:"glass-card rounded-xl p-8",children:[s.jsx("h2",{className:"font-heading text-xl font-bold mb-6 text-center",children:c?"Conectează-te":"Creare Cont"}),s.jsxs("form",{onSubmit:v,className:"space-y-4",children:[!c&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{htmlFor:"displayName",children:"Nume afișat"}),s.jsx(qe,{id:"displayName",value:m,onChange:_=>A(_.target.value),placeholder:"Numele tău"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{htmlFor:"email",children:"Email"}),s.jsx(qe,{id:"email",type:"email",value:d,onChange:_=>h(_.target.value),placeholder:"[email protected]",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{htmlFor:"password",children:"Parolă"}),s.jsx(qe,{id:"password",type:"password",value:f,onChange:_=>p(_.target.value),placeholder:"••••••••",required:!0,minLength:6}),c&&s.jsx("button",{type:"button",onClick:async()=>{if(!d){l({title:"Introdu emailul mai întâi",variant:"destructive"});return}const{error:_}=await G.auth.resetPasswordForEmail(d,{redirectTo:`${window.location.origin}/reset-password`});l(_?{title:"Eroare",description:_.message,variant:"destructive"}:{title:"Email trimis!",description:"Verifică-ți inbox-ul pentru link-ul de resetare."})},className:"text-xs text-primary hover:underline",children:"Ai uitat parola?"})]}),s.jsx(me,{type:"submit",className:"w-full",disabled:g,children:g?s.jsx(rt,{className:"animate-spin",size:16}):c?s.jsxs(s.Fragment,{children:[s.jsx(a4,{size:16})," Conectare"]}):s.jsxs(s.Fragment,{children:[s.jsx(ple,{size:16})," Creare cont"]})})]}),s.jsxs("div",{className:"relative my-6",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("span",{className:"w-full border-t border-border"})}),s.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:s.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"sau"})})]}),s.jsxs(me,{type:"button",variant:"outline",className:"w-full",onClick:j,disabled:x,children:[x?s.jsx(rt,{className:"animate-spin",size:16}):s.jsxs("svg",{className:"w-4 h-4 mr-2",viewBox:"0 0 24 24",children:[s.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),s.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),s.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),s.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),"Continuă cu Google"]}),s.jsx("button",{onClick:()=>u(!c),className:"w-full text-center text-sm text-muted-foreground mt-4 hover:text-primary transition-colors",children:c?"Nu ai cont? Creează unul gratuit":"Ai deja cont? Conectează-te"})]})})})]})})})}const vg={web3:"Web3",blockchain:"Blockchain",nft:"NFT","validare-nft":"Validare NFT",ai:"AI & Agenți AI","digital-marketing":"Marketing Digital","e-learning":"E-Learning"},rHe={ro:[{title:"Ce este Web3?",path:"/ce-este-web3",icon:Dr},{title:"Ce este Blockchain?",path:"/ce-este-blockchain",icon:es},{title:"Ce este Crypto?",path:"/ce-este-crypto",icon:Zh}],en:[{title:"What is Web3?",path:"/ce-este-web3",icon:Dr},{title:"What is Blockchain?",path:"/ce-este-blockchain",icon:es},{title:"What is Crypto?",path:"/ce-este-crypto",icon:Zh}]},nHe={ro:{title:"Studii de caz Web3",path:"/web3-studii-de-caz"},en:{title:"Web3 Case Studies",path:"/web3-case-studies"}},iHe={ro:{title:"Glosar Blockchain & Web3",path:"/glosar"},en:{title:"Blockchain & Web3 Glossary",path:"/glossary"}};function aHe(){const{lang:e}=Pt(),r={learnBasics:e==="en"?"Learn the Basics":"Învață bazele",learnBasicsDesc:e==="en"?"Start with the fundamentals before diving into courses.":"Începe cu bazele înainte să te apuci de cursuri.",caseStudies:e==="en"?"Real-World Examples":"Exemple din practică",caseStudiesDesc:e
2063==="en"?"See how companies use Web3, blockchain and NFT in real projects.":"Vezi cum companiile folosesc Web3, blockchain și NFT în proiecte reale.",glossary:e==="en"?"Glossary":"Glosar",glossaryDesc:e==="en"?"Don't know a term? Look it up in our illustrated glossary.":"Nu cunoști un termen? Caută-l în glosarul nostru ilustrat.",explore:e==="en"?"Explore":"Explorează",viewAll:e==="en"?"View all":"Vezi tot",quickTips:e==="en"?"Quick Tips":"Sfaturi rapide",tips:e==="en"?[`Start with "What is Blockchain?" if you're a total beginner.`,"Each course has free preview lessons — try before you commit.","Complete quizzes to earn EduCoins and unlock rewards."]:['Începe cu „Ce este Blockchain?" dacă ești complet nou.',"Fiecare curs are lecții gratuite de previzualizare — încearcă înainte.","Completează quiz-urile pentru a câștiga EduCoins și a debloca recompense."],cryptoPrices:e==="en"?"Live Crypto Prices":"Prețuri Crypto Live",cryptoPricesDesc:e==="en"?"Track real-time prices for the top cryptocurrencies.":"Urmărește prețurile în timp real pentru criptomonedele de top.",interactiveTools:e==="en"?"Interactive Tools":"Instrumente Interactive",interactiveToolsDesc:e==="en"?"Explore our innovative tools to enhance your learning.":"Explorează instrumentele inovatoare pentru a-ți îmbunătăți învățarea."},n=rHe[e],i=nHe[e],a=iHe[e];return s.jsxs("aside",{className:"space-y-6",children:[s.jsxs(Le.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},transition:{delay:.1},className:"glass-card rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-primary/10",children:s.jsx(ms,{size:16,className:"text-primary"})}),s.jsx("h3",{className:"font-heading text-sm font-bold",children:r.learnBasics})]}),s.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:r.learnBasicsDesc}),s.jsx("div",{className:"space-y-2 mb-4",children:n.map(o=>s.jsxs(be,{to:o.path,className:"group flex items-center gap-3 p-2.5 rounded-lg hover:bg-secondary/80 transition-colors",children:[s.jsx("div",{className:"p-1.5 rounded-md bg-secondary group-hover:bg-primary/10 transition-colors",children:s.jsx(o.icon,{size:14,className:"text-muted-foreground group-hover:text-primary transition-colors"})}),s.jsx("span",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:o.title}),s.jsx(Gt,{size:12,className:"ml-auto text-muted-foreground/50 group-hover:text-primary transition-colors"})]},o.path))}),s.jsxs(be,{to:e==="en"?"/what-is":"/ce-este",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:[r.viewAll," ",s.jsx(Gt,{size:13})]})]}),s.jsxs(Le.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},transition:{delay:.2},className:"glass-card rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-accent/10",children:s.jsx(eke,{size:16,className:"text-accent-foreground"})}),s.jsx("h3",{className:"font-heading text-sm font-bold",children:r.caseStudies})]}),s.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:r.caseStudiesDesc}),s.jsxs(be,{to:i.path,className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:[r.explore," ",s.jsx(Gt,{size:13})]})]}),s.jsxs(Le.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},transition:{delay:.25},className:"glass-card rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-primary/10",children:s.jsx(Eu,{size:16,className:"text-primary"})}),s.jsx("h3",{className:"font-heading text-sm font-bold",children:r.interactiveTools})]}),s.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:r.interactiveToolsDesc}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(be,{to:"/knowledge-map",className:"group flex items-center gap-3 p-2.5 rounded-lg hover:bg-secondary/80 transition-colors",children:[s.jsx("div",{className:"p-1.5 rounded-md bg-secondary group-hover:bg-primary/10 transition-colors",children:s.jsx(l4,{size:14,className:"text-muted-foreground group-hover:text-primary transition-colors"})}),s.jsx("span",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:"Knowledge Map"}
2063),s.jsx(Gt,{size:12,className:"ml-auto text-muted-foreground/50 group-hover:text-primary transition-colors"})]}),s.jsxs(be,{to:"/simulari-web3",className:"group flex items-center gap-3 p-2.5 rounded-lg hover:bg-secondary/80 transition-colors",children:[s.jsx("div",{className:"p-1.5 rounded-md bg-secondary group-hover:bg-primary/10 transition-colors",children:s.jsx(Eu,{size:14,className:"text-muted-foreground group-hover:text-primary transition-colors"})}),s.jsx("span",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:e==="en"?"Web3 Simulations":"Simulări Web3"}),s.jsx(Gt,{size:12,className:"ml-auto text-muted-foreground/50 group-hover:text-primary transition-colors"})]}),s.jsxs(be,{to:"/membru?tab=ai",className:"group flex items-center gap-3 p-2.5 rounded-lg hover:bg-secondary/80 transition-colors",children:[s.jsx("div",{className:"p-1.5 rounded-md bg-secondary group-hover:bg-primary/10 transition-colors",children:s.jsx(Ec,{size:14,className:"text-muted-foreground group-hover:text-primary transition-colors"})}),s.jsx("span",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:"AI Tutor Tudor"}),s.jsx(Gt,{size:12,className:"ml-auto text-muted-foreground/50 group-hover:text-primary transition-colors"})]})]})]}),s.jsxs(Le.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},transition:{delay:.3},className:"glass-card rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-secondary",children:s.jsx(yr,{size:16,className:"text-muted-foreground"})}),s.jsx("h3",{className:"font-heading text-sm font-bold",children:r.glossary})]}),s.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:r.glossaryDesc}),s.jsxs(be,{to:a.path,className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:[r.viewAll," ",s.jsx(Gt,{size:13})]})]}),s.jsxs(Le.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},transition:{delay:.4},className:"glass-card rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-primary/10",children:s.jsx(Ag,{size:16,className:"text-primary"})}),s.jsx("h3",{className:"font-heading text-sm font-bold",children:r.quickTips})]}),s.jsx("ul",{className:"space-y-3",children:r.tips.map((o,l)=>s.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[s.jsx("span",{className:"mt-0.5 w-5 h-5 rounded-full bg-primary/10 text-primary flex items-center justify-center shrink-0 text-[10px] font-bold",children:l+1}),o]},l))})]}),s.jsxs(Le.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},transition:{delay:.5},className:"rounded-xl border border-primary/20 bg-gradient-to-br from-primary/5 to-accent/5 p-5 text-center",children:[s.jsx(ff,{size:24,className:"mx-auto text-primary mb-2"}),s.jsx("h3",{className:"font-heading text-sm font-bold mb-1",children:r.cryptoPrices}),s.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:r.cryptoPricesDesc}),s.jsxs(be,{to:e==="en"?"/crypto-prices":"/preturi-crypto",className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:brightness-110 transition-all",children:[r.explore," ",s.jsx(Gt,{size:12})]})]})]})}const sHe="price_1TJZPEKSHaVEFOzeftVnl5Na",oHe="price_1TKlwtKSHaVEFOzeUau2L13x";function G4(){var c,u,d,h,f,p,m,A,g;const{user:e,session:r}=Fn(),n=Xe({queryKey:["subscription",e==null?void 0:e.id],queryFn:async()=>{const{data:y,error:x}=await G.functions.invoke("check-subscription",{headers:{Authorization:`Bearer ${r.access_token}`}});if(x)throw x;return y},enabled:!!e&&!!r,refetchInterval:6e4,staleTime:3e4}),i=async(y="monthly")=>{if(!r)return;const x=y==="yearly"?oHe:sHe,{data:b,error:v}=await G.functions.invoke("create-checkout",{headers:{Authorization:`Bearer ${r.access_token}`},body:{priceId:x}});if(v)throw v;b!=null&&b.url&&window.open(b.url,"_blank")},a=async()=>{if(!r)return;const{data:y,error:x}=await G.functions.invoke("customer-portal",{headers:{Authorization:`Bearer ${r.access_token}`}});if(x)throw x;y!=null&&y.url&&window.open(y.url,"_blank")},o=(((c=n.data)==null?void 0:c.subscribed)&&n.data.monthly_enrollments<n.data.monthly_limit)??!1,l=(u=n.data)!=null&&u.grace_peri
2063od_end?Math.max(0,Math.ceil((new Date(n.data.grace_period_end).getTime()-Date.now())/(24*60*60*1e3))):null;return{...n,isSubscribed:((d=n.data)==null?void 0:d.subscribed)??!1,subscriptionStatus:((h=n.data)==null?void 0:h.subscription_status)??"none",canEnrollMore:o,monthlyEnrollments:((f=n.data)==null?void 0:f.monthly_enrollments)??0,monthlyLimit:((p=n.data)==null?void 0:p.monthly_limit)??3,subscriptionEnd:((m=n.data)==null?void 0:m.subscription_end)??null,paymentFailed:((A=n.data)==null?void 0:A.payment_failed)??!1,gracePeriodEnd:((g=n.data)==null?void 0:g.grace_period_end)??null,graceDaysRemaining:l,startCheckout:i,openPortal:a}}function lHe(){const{lang:e}=Pt(),r=e,{user:n}=Fn(),{isSubscribed:i,startCheckout:a,openPortal:o,monthlyEnrollments:l,monthlyLimit:c,paymentFailed:u,graceDaysRemaining:d}=G4(),h=As();if(r==="en")return null;const f=r==="en"?[{icon:yr,text:"Access to all courses"},{icon:ts,text:"Up to 3 courses / month"},{icon:oo,text:"Official diploma"},{icon:Ko,text:"Priority access"}]:[{icon:yr,text:"Acce
2063s la toate cursurile"},{icon:ts,text:"Max 3 cursuri / lună"},{icon:oo,text:"Diplomă oficială"},{icon:Ko,text:"Acces prioritar"}],p=()=>{if(!n){h("/academy/abonament");return}i||u?o():a()};return u&&n?s.jsx("div",{className:"w-full bg-gradient-to-r from-red-500/20 via-orange-500/15 to-red-400/20 border-y border-red-500/40",children:s.jsx("div",{className:"container py-4 md:py-5",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-wrap justify-center md:justify-start",children:[s.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-destructive/20 text-destructive text-xs font-bold",children:[s.jsx(Tu,{size:14}),r==="en"?"Payment Issue":"Problemă plată"]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:r==="en"?"Your subscription payment failed. Please update your payment method.":"Plata abonamentului nu a reușit. Te rugăm să actualizezi metoda de plată."}),d!==null&&d>0&&s.jsx("p",{className:"text-xs text-muted-foreground",children:r==="en"?`You have ${d} day${d!==1?"s":""} before course access is suspended.`:`Mai ai ${d} ${d===1?"zi":"zile"} înainte ca accesul la cursuri să fie suspendat.`}),(d===null||d<=0)&&s.jsx("p",{className:"text-xs text-destructive font-medium",children:r==="en"?"Course access has been suspended. Your account, EduCoins, and diplomas remain safe.":"Accesul la cursuri a fost suspendat. Contul, EduCoins și diplomele tale sunt în siguranță."})]})]}),s.jsxs("button",{onClick:p,className:"inline-flex items-center gap-2 px-6 py-2.5 rounded-lg bg-destructive text-destructive-foreground font-heading font-semibold text-sm hover:brightness-110 transition-all whitespace-nowrap shrink-0",children:[r==="en"?"Update payment":"Actualizează plata"," ",s.jsx(lp,{size:14})]})]})})}):s.jsx("div",{className:"w-full bg-gradient-to-r from-amber-500/20 via-yellow-500/15 to-amber-400/20 border-y border-amber-500/30",children:s.jsx("div",{className:"container py-4 md:py-5",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-4 flex-wrap justify-center md:justify-start",children:[s.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-primary/20 text-primary text-xs font-bold",children:[s.jsx(Ko,{size:14}),r==="en"?"EduWeb Subscription":"Abonament EduWeb Academy"]}),i?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-heading text-lg font-bold text-primary",children:r==="en"?"Active":"Activ"}),s.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",l,"/",c," ",r==="en"?"courses this month":"cursuri luna aceasta",")"]})]}):s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"font-heading text-2xl md:text-3xl font-bold text-primary",children:"199 RON"}),s.jsxs("span",{className:"text-muted-foreground text-xs",children:["/ ",r==="en"?"month":"lună"]}),s.jsx("span",{className:"text-muted-foreground text-xs",children:"|"}),s.jsx("span",{className:"font-heading text-lg font-bold text-primary",children:"1.499 RON"}),s.jsxs("span",{className:"text-muted-foreground text-xs",children:["/ ",r==="en"?"year":"an"]})]})]}),s.jsx("div",{className:"flex flex-wrap items-center gap-3 justify-center",children:f.map((m,A)=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-foreground/80",children:[s.jsx(m.icon,{size:14,className:"text-primary shrink-0"}),m.text]},A))}),s.jsx("button",{onClick:p,className:"inline-flex items-center gap-2 px-6 py-2.5 rounded-lg bg-primary text-primary-foreground font-heading font-semibold text-sm hover:brightness-110 transition-all whitespace-nowrap shrink-0",children:i?s.jsxs(s.Fragment,{children:[r==="en"?"Manage subscription":"Gestionează abonamentul"," ",s.jsx(lp,{size:14})]}):s.jsxs(s.Fragment,{children:[r==="en"?"Subscribe now":"Abonează-te acum"," ",s.jsx(Gt,{size:14})]})})]})})})}var cHe=Object.defineProperty,UE=Object.getOwnPropertySymbols,cme=Object.prototype.hasOwnProperty,ume=Object.prototype.propertyIsEnumerable,AG=(e,r,n)=>r in e?cHe(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,wD=(e,r)=>{for(var n in r||(r={}))cme.call(r,n)&&AG(e,n,r[n]);if(UE)for(var n of UE(r))ume.call(r,n)&&AG(e,n,r[n]);return e},jD=(e,r)=>{var n={};for(var i in e)cme.call(e,i)&&r.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&UE)for(var i of UE(e))r.indexOf(i)<0&&ume.call(e,i)&&(n[i]=e[i]);return n};/**
2064 * @license QR Code generator library (TypeScript)
2065 * Copyright (c) Project Nayuki.
2066 * SPDX-License-Identifier: MIT
2067 */var bg;(e=>{const r=class en{constructor(u,d,h,f){if(this.version=u,this.errorCorrectionLevel=d,this.modules=[],this.isFunction=[],u<en.MIN_VERSION||u>en.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=u*4+17;let p=[];for(let A=0;A<this.size;A++)p.push(!1);for(let A=0;A<this.size;A++)this.modules.push(p.slice()),this.isFunction.push(p.slice());this.drawFunctionPatterns();const m=this.addEccAndInterleave(h);if(this.drawCodewords(m),f==-1){let A=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const y=this.getPenaltyScore();y<A&&(f=g,A=y),this.applyMask(g)}}a(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(u,d){const h=e.QrSegment.makeSegments(u);return en.encodeSegments(h,d)}static encodeBinary(u,d){const h=e.QrSegment.makeBytes(u);return en.encodeSegments([h],d)}static encodeSegments(u,d,h=1,f=40,p=-1,m=!0){if(!(en.MIN_VERSION<=h&&h<=f&&f<=en.MAX_VERSION)||p<-1||p>7)throw new RangeError("Invalid value");let A,g;for(A=h;;A++){const v=en.getNumDataCodewords(A,d)*8,j=l.getTotalBits(u,A);if(j<=v){g=j;break}if(A>=f)throw new RangeError("Data too long")}for(const v of[en.Ecc.MEDIUM,en.Ecc.QUARTILE,en.Ecc.HIGH])m&&g<=en.getNumDataCodewords(A,v)*8&&(d=v);let y=[];for(const v of u){n(v.mode.modeBits,4,y),n(v.numChars,v.mode.numCharCountBits(A),y);for(const j of v.getData())y.push(j)}a(y.length==g);const x=en.getNumDataCodewords(A,d)*8;a(y.length<=x),n(0,Math.min(4,x-y.length),y),n(0,(8-y.length%8)%8,y),a(y.length%8==0);for(let v=236;y.length<x;v^=253)n(v,8,y);let b=[];for(;b.length*8<y.length;)b.push(0);
vendor: 5,798 bytes, line 2067
2067return y.forEach((v,j)=>b[j>>>3]|=v<<7-(j&7)),new en(A,d,b,p)}getModule(u,d){return 0<=u&&u<this.size&&0<=d&&d<this.size&&this.modules[d][u]}getModules(){return this.modules}drawFunctionPatterns(){for(let h=0;h<this.size;h++)this.setFunctionModule(6,h,h%2==0),this.setFunctionModule(h,6,h%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const u=this.getAlignmentPatternPositions(),d=u.length;for(let h=0;h<d;h++)for(let f=0;f<d;f++)h==0&&f==0||h==0&&f==d-1||h==d-1&&f==0||this.drawAlignmentPattern(u[h],u[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(u){const d=this.errorCorrectionLevel.formatBits<<3|u;let h=d;for(let p=0;p<10;p++)h=h<<1^(h>>>9)*1335;const f=(d<<10|h)^21522;a(f>>>15==0);for(let p=0;p<=5;p++)this.setFunctionModule(8,p,i(f,p));this.setFunctionModule(8,7,i(f,6)),this.setFunctionModule(8,8,i(f,7)),this.setFunctionModule(7,8,i(f,8));for(let p=9;p<15;p++)this.setFunctionModule(14-p,8,i(f,p));for(let p=0;p<8;p++)this.setFunctionModule(this.size-1-p,8,i(f,p));for(let p=8;p<15;p++)this.setFunctionModule(8,this.size-15+p,i(f,p));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let u=this.version;for(let h=0;h<12;h++)u=u<<1^(u>>>11)*7973;const d=this.version<<12|u;a(d>>>18==0);for(let h=0;h<18;h++){const f=i(d,h),p=this.size-11+h%3,m=Math.floor(h/3);this.setFunctionModule(p,m,f),this.setFunctionModule(m,p,f)}}drawFinderPattern(u,d){for(let h=-4;h<=4;h++)for(let f=-4;f<=4;f++){const p=Math.max(Math.abs(f),Math.abs(h)),m=u+f,A=d+h;0<=m&&m<this.size&&0<=A&&A<this.size&&this.setFunctionModule(m,A,p!=2&&p!=4)}}drawAlignmentPattern(u,d){for(let h=-2;h<=2;h++)for(let f=-2;f<=2;f++)this.setFunctionModule(u+f,d+h,Math.max(Math.abs(f),Math.abs(h))!=1)}setFunctionModule(u,d,h){this.modules[d][u]=h,this.isFunction[d][u]=!0}addEccAndInterleave(u){const d=this.version,h=this.errorCorrectionLevel;if(u.length!=en.getNumDataCodewords(d,h))throw new RangeError("Invalid argument");const f=en.NUM_ERROR_CORRECTION_BLOCKS[h.ordinal][d],p=en.ECC_CODEWORDS_PER_BLOCK[h.ordinal][d],m=Math.floor(en.getNumRawDataModules(d)/8),A=f-m%f,g=Math.floor(m/f);let y=[];const x=en.reedSolomonComputeDivisor(p);for(let v=0,j=0;v<f;v++){let _=u.slice(j,j+g-p+(v<A?0:1));j+=_.length;const C=en.reedSolomonComputeRemainder(_,x);v<A&&_.push(0),y.push(_.concat(C))}let b=[];for(let v=0;v<y[0].length;v++)y.forEach((j,_)=>{(v!=g-p||_>=A)&&b.push(j[v])});return a(b.length==m),b}drawCodewords(u){if(u.length!=Math.floor(en.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let d=0;for(let h=this.size-1;h>=1;h-=2){h==6&&(h=5);for(let f=0;f<this.size;f++)for(let p=0;p<2;p++){const m=h-p,g=(h+1&2)==0?this.size-1-f:f;!this.isFunction[g][m]&&d<u.length*8&&(this.modules[g][m]=i(u[d>>>3],7-(d&7)),d++)}}a(d==u.length*8)}applyMask(u){if(u<0||u>7)throw new RangeError("Mask value out of range");for(let d=0;d<this.size;d++)for(let h=0;h<this.size;h++){let f;switch(u){case 0:f=(h+d)%2==0;break;case 1:f=d%2==0;break;case 2:f=h%3==0;break;case 3:f=(h+d)%3==0;break;case 4:f=(Math.floor(h/3)+Math.floor(d/2))%2==0;break;case 5:f=h*d%2+h*d%3==0;break;case 6:f=(h*d%2+h*d%3)%2==0;break;case 7:f=((h+d)%2+h*d%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[d][h]&&f&&(this.modules[d][h]=!this.modules[d][h])}}getPenaltyScore(){let u=0;for(let p=0;p<this.size;p++){let m=!1,A=0,g=[0,0,0,0,0,0,0];for(let y=0;y<this.size;y++)this.modules[p][y]==m?(A++,A==5?u+=en.PENALTY_N1:A>5&&u++):(this.finderPenaltyAddHistory(A,g),m||(u+=this.finderPenaltyCountPatterns(g)*en.PENALTY_N3),m=this.modules[p][y],A=1);u+=this.finderPenaltyTerminateAndCount(m,A,g)*en.PENALTY_N3}for(let p=0;p<this.size;p++){let m=!1,A=0,g=[0,0,0,0,0,0,0];for(let y=0;y<this.size;y++)this.modules[y][p]==m?(A++,A==5?u+=en.PENALTY_N1:A>5&&u++):(this.finderPenaltyAddHistory(A,g),m||(u+=this.finderPenaltyCountPatterns(g)*en.PENALTY_N3),m=this.modules[y][p],A=1);u+=this.finderPenaltyTerminateAndCount(m,A,g)*en.PENALTY_N3}for(let p=0;p<this.size-1;p++)for(let m=0;m<this.size-1;m++){const A=this.modules[p][m];A==this.modules[p][m+1]&&A==this.modules[p+1][m]&&A==this.modules[p+1][m+1]&&(u+=en.PENALTY_N2)}let d=0;for(const p of this.modules)d=p.reduce((m,A)=>m+(A?1:0),d);const h=this.size*this.size,f=Math.ceil(Math.abs(d*20-h*10)/h)-1;return a(0<=f&&f<=9),u+=f*en.PENALTY_N4,a(0<=u&&u<=2568888),u}getAlignmentPatternPositions(){if(this.version==1)return[];{const u=Math.floor(this.version/7)+2,d=this.version==32?26:Math.ceil((this.version*4+4)/(u*2-2))*2;let h=[6];for(let f=this.size-7;h.length<u;f-=d)h.splice(1,0,f);return h}}static getNumRawDataModules(u){if(u<en.MIN_VERSION||u>en.MAX_VERSION)throw new RangeError("Version number out of range");let d=(16*u+128)*u+64;if(u>=2){const h=Math.floor(u/7)+2;d-=(25*h-10)*h-55,u>=7&&(d-=36)}return a(208<=d&&d<=29648),d}static getNumDataCodewords(u,d){return Math.floor(en.getNumRawDataModules(u)/8)-en.ECC_CODEWORDS_PER_BLOCK[d.ordinal][u]*en.NUM_ERROR_CORRECTION_BLOCKS[d.ordinal][u]}static reedSolomonComputeDivisor(u){if(u<1||u>255)throw new RangeError("Degree out of range");let d=[];for(let f=0;f<u-1;f++)d.push(0);d.push(1);let h=1;for(let f=0;f<u;f++){for(let p=0;p<d.length;p++)d[p]=en.reedSolomonMultiply(d[p],h),p+1<d.length&&(d[p]^=d[p+1]);h=en.reedSolomonMultiply(h,2)}return d}static reedSolomonComputeRemainder(u,d){let h=d.map(f=>0);for(const f of u){const p=f^h.shift();h.push(0),d.forEach((m,A)=>h[A]^=en.reedSolomonMultiply(m,p))}return h}static reedSolomonMultiply(u,d){if(u>>>8||d>>>8)throw new RangeError("Byte out of range");let h=0;for(let f=7;f>=0;f--)h=h<<1^(h>>>7)*285,h^=(d>>>f&1)*u;return a(h>>>8==0),h}finderPenaltyCountPatterns(u){const d=u[1];a(d<=this.size*3);const h=d>0&&u[2]==d&&u[3]==d*3&&u[4]==d&&u[5]==d;
2067return(h&&u[0]>=d*4&&u[6]>=d?1:0)+(h&&u[6]>=d*4&&u[0]>=d?1:0)}finderPenaltyTerminateAndCount(u,d,h){return u&&(this.finderPenaltyAddHistory(d,h),d=0),d+=this.size,this.finderPenaltyAddHistory(d,h),this.finderPenaltyCountPatterns(h)}finderPenaltyAddHistory(u,d){d[0]==0&&(u+=this.size),d.pop(),d.unshift(u)}};r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;function n(c,u,d){if(u<0||u>31||c>>>u)throw new RangeError("Value out of range");for(let h=u-1;h>=0;h--)d.push(c>>>h&1)}function i(c,u){return(c>>>u&1)!=0}function a(c){if(!c)throw new Error("Assertion error")}const o=class ea{constructor(u,d,h){if(this.mode=u,this.numChars=d,this.bitData=h,d<0)throw new RangeError("Invalid argument");this.bitData=h.slice()}static makeBytes(u){let d=[];for(const h of u)n(h,8,d);return new ea(ea.Mode.BYTE,u.length,d)}static makeNumeric(u){if(!ea.isNumeric(u))throw new RangeError("String contains non-numeric characters");let d=[];for(let h=0;h<u.length;){const f=Math.min(u.length-h,3);n(parseInt(u.substring(h,h+f),10),f*3+1,d),h+=f}return new ea(ea.Mode.NUMERIC,u.length,d)}static makeAlphanumeric(u){if(!ea.isAlphanumeric(u))throw new RangeError("String contains unencodable characters in alphanumeric mode");let d=[],h;for(h=0;h+2<=u.length;h+=2){let f=ea.ALPHANUMERIC_CHARSET.indexOf(u.charAt(h))*45;f+=ea.ALPHANUMERIC_CHARSET.indexOf(u.charAt(h+1)),n(f,11,d)}return h<u.length&&n(ea.ALPHANUMERIC_CHARSET.indexOf(u.charAt(h)),6,d),new ea(ea.Mode.ALPHANUMERIC,u.length,d)}static makeSegments(u){return u==""?[]:ea.isNumeric(u)?[ea.makeNumeric(u)]:ea.isAlphanumeric(u)?[ea.makeAlphanumeric(u)]:[ea.makeBytes(ea.toUtf8ByteArray(u))]}static makeEci(u){let d=[];if(u<0)throw new RangeError("ECI assignment value out of range");if(u<128)n(u,8,d);else if(u<16384)n(2,2,d),n(u,14,d);else if(u<1e6)n(6,3,d),n(u,21,d);else throw new RangeError("ECI assignment value out of range");return new ea(ea.Mode.ECI,0,d)}static isNumeric(u){return ea.NUMERIC_REGEX.test(u)}static isAlphanumeric(u){return ea.ALPHANUMERIC_REGEX.test(u)}getData(){return this.bitData.slice()}static getTotalBits(u,d){let h=0;for(const f of u){const p=f.mode.numCharCountBits(d);if(f.numChars>=1<<p)return 1/0;h+=4+p+f.bitData.length}return h}static toUtf8ByteArray(u){u=encodeURI(u);let d=[];for(let h=0;h<u.length;h++)u.charAt(h)!="%"?d.push(u.charCodeAt(h)):(d.push(parseInt(u.substring(h+1,h+3),16)),h+=2);return d}};o.NUMERIC_REGEX=/^[0-9]*$/,o.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,o.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let l=o;e.QrSegment=o})(bg||(bg={}));(e=>{(r=>{const n=class{constructor(a,o){this.ordinal=a,this.formatBits=o}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),r.Ecc=n})(e.QrCode||(e.QrCode={}))})(bg||(bg={}));(e=>{(r=>{const n=class{constructor(a,o){this.modeBits=a,this.numBitsCharCount=o}numCharCountBits(a){return this.numBitsCharCount[Math.floor((a+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),r.Mode=n})(e.QrSegment||(e.QrSegment={}))})(bg||(bg={}));var By=bg;/**
2068 * @license qrcode.react
2069 * Copyright (c) Paul O'Shannessy
2070 * SPDX-License-Identifier: ISC
2071 */var uHe={L:By.QrCode.Ecc.LOW,M:By.QrCode.Ecc.MEDIUM,Q:By.QrCode.Ecc.QUARTILE,H:By.QrCode.Ecc.HIGH},dme=128,hme="L",fme="#FFFFFF",mme="#000000",pme=!1,Ame=1,dHe=4,hHe=0,fHe=.1;function gme(e,r=0){const n=[];return e.forEach(function(i,a){let o=null;
2071i.forEach(function(l,c){if(!l&&o!==null){n.push(`M${o+r} ${a+r}h${c-o}v1H${o+r}z`),o=null;return}if(c===i.length-1){if(!l)return;o===null?n.push(`M${c+r},${a+r} h1v1H${c+r}z`):n.push(`M${o+r},${a+r} h${c+1-o}v1H${o+r}z`);return}l&&o===null&&(o=c)})}),n.join("")}function xme(e,r){return e.slice().map((n,i)=>i<r.y||i>=r.y+r.h?n:n.map((a,o)=>o<r.x||o>=r.x+r.w?a:!1))}function mHe(e,r,n,i){if(i==null)return null;const a=e.length+n*2,o=Math.floor(r*fHe),l=a/r,c=(i.width||o)*l,u=(i.height||o)*l,d=i.x==null?e.length/2-c/2:i.x*l,h=i.y==null?e.length/2-u/2:i.y*l,f=i.opacity==null?1:i.opacity;let p=null;if(i.excavate){let A=Math.floor(d),g=Math.floor(h),y=Math.ceil(c+d-A),x=Math.ceil(u+h-g);p={x:A,y:g,w:y,h:x}}const m=i.crossOrigin;return{x:d,y:h,h:u,w:c,excavation:p,opacity:f,crossOrigin:m}}function pHe(e,r){return r!=null?Math.max(Math.floor(r),0):e?dHe:hHe}function yme({value:e,level:r,minVersion:n,includeMargin:i,marginSize:a,imageSettings:o,size:l,boostLevel:c}){let u=ee.useMemo(()=>{const A=(Array.isArray(e)?e:[e]).reduce((g,y)=>(g.push(...By.QrSegment.makeSegments(y)),g),[]);return By.QrCode.encodeSegments(A,uHe[r],n,void 0,void 0,c)},[e,r,n,c]);const{cells:d,margin:h,numCells:f,calculatedImageSettings:p}=ee.useMemo(()=>{let m=u.getModules();const A=pHe(i,a),g=m.length+A*2,y=mHe(m,l,A,o);return{cells:m,margin:A,numCells:g,calculatedImageSettings:y}},[u,l,o,i,a]);return{qrcode:u,margin:h,cells:d,numCells:f,calculatedImageSettings:p}}var AHe=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),gHe=ee.forwardRef(function(r,n){const i=r,{value:a,size:o=dme,level:l=hme,bgColor:c=fme,fgColor:u=mme,includeMargin:d=pme,minVersion:h=Ame,boostLevel:f,marginSize:p,imageSettings:m}=i,g=jD(i,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:y}=g,x=jD(g,["style"]),b=m==null?void 0:m.src,v=ee.useRef(null),j=ee.useRef(null),_=ee.useCallback(I=>{v.current=I,typeof n=="function"?n(I):n&&(n.current=I)},[n]),[C,N]=ee.useState(!1),{margin:S,cells:E,numCells:O,calculatedImageSettings:B}=yme({value:a,level:l,minVersion:h,boostLevel:f,includeMargin:d,marginSize:p,imageSettings:m,size:o});ee.useEffect(()=>{if(v.current!=null){const I=v.current,D=I.getContext("2d");if(!D)return;let L=E;const V=j.current,U=B!=null&&V!==null&&V.complete&&V.naturalHeight!==0&&V.naturalWidth!==0;U&&B.excavation!=null&&(L=xme(E,B.excavation));const Q=window.devicePixelRatio||1;I.height=I.width=o*Q;const $=o/O*Q;D.scale($,$),D.fillStyle=c,D.fillRect(0,0,O,O),D.fillStyle=u,AHe?D.fill(new Path2D(gme(L,S))):E.forEach(function(q,M){q.forEach(function(z,K){z&&D.fillRect(K+S,M+S,1,1)})}),B&&(D.globalAlpha=B.opacity),U&&D.drawImage(V,B.x+S,B.y+S,B.w,B.h)}}),ee.useEffect(()=>{N(!1)},[b]);const T=wD({height:o,width:o},y);let F=null;return b!=null&&(F=ee.createElement("img",{src:b,key:b,style:{display:"none"},onLoad:()=>{N(!0)},ref:j,crossOrigin:B==null?void 0:B.crossOrigin})),ee.createElement(ee.Fragment,null,ee.createElement("canvas",wD({style:T,height:o,width:o,ref:_,role:"img"},x)),F)});gHe.displayName="QRCodeCanvas";var vme=ee.forwardRef(function(r,n){const i=r,{value:a,size:o=dme,level:l=hme,bgColor:c=fme,fgColor:u=mme,includeMargin:d=pme,minVersion:h=Ame,boostLevel:f,title:p,marginSize:m,imageSettings:A}=i,g=jD(i,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:y,cells:x,numCells:b,calculatedImageSettings:v}=yme({value:a,level:l,minVersion:h,boostLevel:f,includeMargin:d,marginSize:m,imageSettings:A,size:o});let j=x,_=null;A!=null&&v!=null&&(v.excavation!=null&&(j=xme(x,v.excavation)),_=ee.createElement("image",{href:A.src,height:v.h,width:v.w,x:v.x+y,y:v.y+y,preserveAspectRatio:"none",opacity:v.opacity,crossOrigin:v.crossOrigin}));const C=gme(j,y);return ee.createElement("svg",wD({height:o,width:o,viewBox:`0 0 ${b} ${b}`,ref:n,role:"img"},g),!!p&&ee.createElement("title",null,p),ee.createElement("path",{fill:c,d:`M0,0 h${b}v${b}H0z`,shapeRendering:"crispEdges"}),ee.createElement("path",{fill:u,d:C,shapeRendering:"crispEdges"}),_)});vme.displayName="QRCodeSVG";const X4=w.forwardRef(({holderName:e,courseTitle:r,certificateNumber:n,issuedAt:i,isDemo:a,estimatedHours:o,competencies:l,verificationUrl:c},u)=>{const d=new Date(i).toLocaleDateString("ro-RO",{year:"numeric",month:"long",day:"numeric"}),h=c||`https://eduweb.ro/verify/${n}`;return s.jsxs("div",{ref:u,className:"relative w-full max-w-2xl mx-auto bg-white text-gray-900",style:{fontFamily:"'Plus Jakarta Sans', sans-serif",aspectRatio:"1.414 / 1"},children:[s.jsx("div",{className:"absolute inset-3 border-4 border-emerald-600/40 rounded-xl"}),s.jsx("div",{className:"absolute inset-6 border-2 border-dashed border-emerald-600/20 rounded-lg"}),s.jsxs("div",{className:"relative flex flex-col h-full px-10 py-8 md:px-14 md:py-10",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(oo,{size:36,className:"mx-auto text-emerald-600 mb-1"}),s.jsx("p",{className:"text-[10px] uppercase tracking-[0.35em] text-gray-500 font-medium mb-0.5",children:"EduWeb Academy"}),s.jsx("h2",{className:"text-xl md:text-2xl font-bold text-emerald-700 tracking-tight",children:"Certificat de absolvire curs online"})]}),s.jsxs("div",{className:"text-center flex-1 flex flex-col items-center justify-center -mt-2",children:[s.jsx("p",{className:"text-[10px] text-gray-500 mb-2",children:"Se certifică faptul că"}),s.jsx("p",{className:"text-2xl md:text-3xl font-bold text-gray-900 border-b-2 border-emerald-600/30 pb-1.5 px-4 min-w-[200px]",style:{fontFamily:"'Plus Jakarta Sans', sans-serif"},children:e||"Numele Tău"}),s.jsx("p",{className:"text-[10px] text-gray-500 mt-3",children:"a finalizat cu succes cursul"}),s.jsx("p",{className:"text-base md:text-lg font-semibold text-gray-800 mt-0.5",children:r}),o!=null&&o>0&&s.jsxs("p",{className:"text-[10px] text-gray-500 mt-1",children:["Durată: ",o," ",o===1?"oră":"ore"]}),l&&l.length>0&&s.jsxs("div",{className:"mt-2 max-w-md",children:[s.jsx("p",{className:"text-[9px] uppercase tracking-wider text-gray-400 mb-0.5",children:"Competențe dobândite"}),s.jsx("p",{className:"text-[10px] text-gray-600 leading-relaxed",children:l.join(" • ")})]})]}),s.jsxs("div",{className:"flex items-end justify-between w-full mt-auto",children:[s.jsxs("div",{className:"min-w-[120px]",children:[s.jsx("p",{className:"text-[9px] text-gray-400 uppercase tracking-wider",children:"Data"}),s.jsx("p",{className:"text-xs font-medium text-gray-700",children:d}),s.jsxs("p",{className:"text-[8px] text-gray-400 mt-1.5 leading-tight",children:["Emis de: EduWeb Academy",s.jsx("br",{}),"COMITNET SRL"]})]}),s.jsxs("div",{className:"text-center flex-1 px-2",children:[s.jsx("svg",{viewBox:"0 0 200 50",className:"mx-auto w-28 h-8 mb-0.5","aria-label":"Semnătură Attila Kiraly",children:s.jsx("text",{x:"100",y:"38",textAnchor:"middle",fill:"#065f46",fontSize:"28",fontFamily:"'Brush Script MT', 'Segoe Script', cursive",style:{fontStyle:"italic"},children:"Attila Kiraly"})}),s.jsx("p",{className:"text-[9px] text-gray-600 font-medium",children:"Attila Kiraly"}),s.jsx("p",{className:"text-[8px] text-gray-400",children:"Fondator EduWeb"}),a&&s.jsx("p",{className:"text-[8px] text-emerald-600 font-medium uppercase tracking-wider mt-0.5",children:"Exemplu"})]}),s.jsxs("div",{className:"text-right min-w-[120px] flex flex-col items-end",children:[s.jsx(vme,{value:h,size:52,level:"M",className:"mb-1"}),s.jsx("p",{className:"text-[9px] text-gray-400 uppercase tracking-wider",children:"Nr. certificat"}),s.jsx("p",{className:"text-[10px] font-medium font-mono text-gray-700",children:n})]})]}),s.jsx("p",{className:"text-center text-[8px] text-gray-400 mt-2",children:"Acest certificat poate fi verificat online la: eduweb.ro/verify"})]})]})});X4.displayName="CertificateView";function xHe(){const{lang:e}=Pt(),r=e==="en"?["Validate your skills for employers","Shareable on LinkedIn and social media","NFT-validated certificates coming soon!"]:["Validează-ți competențele pentru angajatori","Distribuie pe LinkedIn și social media","Diplome validate prin NFT – în curând!"],n=e==="en"?["Blockchain fundamentals","Consensus mechanisms","Smart contracts"]:["Fundamentele blockchain","Mecanisme de consens","Contracte inteligente"];return s.jsxs(Le.div,{initial:{opacity:0,y:16}
2071,animate:{opacity:1,y:0},transition:{delay:.4},className:"mt-10 rounded-xl border border-border/50 bg-card p-8 md:p-10",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h3",{className:"font-heading text-xl md:text-2xl font-bold mb-2",children:e==="en"?"Earn your official certificate":"Obține certificatul tău oficial"}),s.jsx("p",{className:"text-muted-foreground max-w-xl mx-auto",children:e==="en"?"After completing each course, you receive an official EduWeb Academy certificate. Add it to your CV or LinkedIn profile.":"După finalizarea fiecărui curs, primești un certificat oficial EduWeb Academy. Adaugă-l în CV-ul tău sau pe profilul de LinkedIn."})]}),s.jsx("div",{className:"rounded-xl overflow-hidden border border-border/30 shadow-lg max-w-lg mx-auto",children:s.jsx(X4,{holderName:"",courseTitle:e==="en"?"Introduction to Blockchain":"Introducere în Blockchain",certificateNumber:"EW-2026-BLC-00001",issuedAt:new Date().toISOString(),isDemo:!0,estimatedHours:8,competencies:n,verificationUrl:"https://eduweb.ro/verify/EW-2026-BLC-00001"})}),s.jsx("div",{className:"flex flex-wrap justify-center gap-4 mt-8 mb-6",children:r.map((i,a)=>s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(oo,{size:14,className:"text-primary shrink-0"}),i]},a))}),s.jsx("div",{className:"text-center",children:s.jsxs(be,{to:"/auth",className:"inline-flex items-center gap-2 px-6 py-2.5 rounded-lg bg-primary text-primary-foreground font-heading font-semibold text-sm hover:brightness-110 transition-all",children:[e==="en"?"Start learning & earn your certificate":"Începe să înveți și obține certificatul"," ",s.jsx(Gt,{size:14})]})})]})}const yHe=[{slug:"web3",label:"Web3"},{slug:"crypto",label:"Crypto"},{slug:"blockchain",label:"Blockchain"},{slug:"nft",label:"NFT"},{slug:"ai",label:"AI"},{slug:"digital-marketing",label:"Marketing"},{slug:"e-learning",label:"E-Learning"}];function vHe(){const[e,r]=w.useState(null),{data:n=[],isLoading:i}=A7e(e&&e!=="crypto"?{topic:e}:void 0),{lang:a}=Pt(),o=n;Zr({title:a==="en"?"EduWeb Academy – Tech & Web3 Courses":"EduWeb Academy – Cursuri Tech & Web3",description:a==="en"?"Learn blockchain, AI, Web3 and digital marketing with interactive, modular and certified courses.":"Învață blockchain, AI, Web3 și marketing digital cu cursuri interactive, modulare și certificate."});const l={heroDesc:a==="en"?"From blockchain to AI, learn with structured modules, progress tracking and certification.":"De la blockchain la AI, învață cu module structurate, tracking de progres și certificare la final.",all:a==="en"?"All":"Toate",noCourses:a==="en"?"No courses available at the moment.":"Nu există cursuri disponibile momentan.",free:a==="en"?"Free":"Gratuit",lessons:a==="en"?"lessons":"lecții",viewCourse:a==="en"?"View course":"Vezi cursul"};return s.jsxs(Ft,{children:[s.jsx("section",{className:"hero-gradient border-b border-border/50",children:s.jsxs("div",{className:"container py-16 md:py-20 text-center",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary/10 text-primary text-sm font-medium mb-4",children:[s.jsx(Rr,{size:16}),"EduWeb Academy"]}),s.jsx("h1",{className:"font-heading text-4xl md:text-5xl font-bold tracking-tight mb-4",children:a==="en"?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-gradient",children:"Interactive"})," courses for the digital future"]}):s.jsxs(s.Fragment,{children:["Cursuri ",s.jsx("span",{className:"text-gradient",children:"interactive"})," pentru viitorul digital"]})}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:l.heroDesc})]})}),s.jsx(lHe,{}),s.jsx("section",{className:"container py-10",children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-8",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[a!=="en"&&s.jsxs("div",{className:"flex flex-wrap gap-2 mb-8",children:[s.jsx("button",{onClick:()=>r(null),className:`px-4 py-2 rounded-lg text-sm font-medium transition-colors ${e?"bg-secondary text-secondary-foreground hover:bg-secondary/80":"bg-primary text-primary-foreground"}`,children:l.all}),yHe.map(c=>s.jsx("button",{onClick:()=>r(c.slug),className:`px-4 py-2 rounded-lg text-sm font-medium transition-colors ${e===c.slug?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground hover:bg-secondary/80"}`,children:c.label},c.slug))]}),a==="en"?s.jsxs("div",{className:"text-center py-16 space-y-4",children:[s.jsx(Rr,{size:48,className:"mx-auto text-muted-foreground
2071/30"}),s.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground",children:"Courses coming soon"}),s.jsx("p",{className:"text-muted-foreground text-sm max-w-md mx-auto",children:"We're working on translating our courses into English. Create a free account to be notified when they become available."}),s.jsxs(be,{to:"/academy/abonament",className:"inline-flex items-center gap-2 px-6 py-2.5 rounded-lg bg-primary text-primary-foreground font-heading font-semibold text-sm hover:brightness-110 transition-all",children:["Create free account ",s.jsx(Gt,{size:14})]})]}):i?s.jsx("div",{className:"flex justify-center py-20",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):o.length===0?s.jsxs("div",{className:"text-center py-8",children:[s.jsx(Rr,{size:32,className:"mx-auto text-muted-foreground/30 mb-2"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:l.noCourses})]}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:o.map((c,u)=>s.jsx(Le.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:u*.05},children:s.jsxs(be,{to:`/academy/${a==="en"?"course":"curs"}/${c.slug}`,className:"group block glass-card rounded-xl overflow-hidden hover:border-primary/30 transition-all",children:[c.imageUrl?s.jsxs("div",{className:"relative h-44 overflow-hidden",children:[s.jsx("img",{src:c.imageUrl,alt:c.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),s.jsx("div",{className:"absolute top-3 right-3",children:c.priceType==="free"?s.jsx("span",{className:"px-2.5 py-1 rounded-md bg-primary/90 text-primary-foreground text-xs font-bold",children:l.free}):s.jsxs("span",{className:"px-2.5 py-1 rounded-md bg-accent/90 text-accent-foreground text-xs font-bold flex items-center gap-1",children:[s.jsx(Ko,{size:12}),c.priceAmount>0?`${c.priceAmount} ${c.currency}`:"Premium"]})})]}):s.jsx("div",{className:"h-44 bg-secondary flex items-center justify-center",children:s.jsx(Rr,{size:48,className:"text-muted-foreground/20"})}),s.jsxs("div",{className:"p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-3",children:[c.topics.slice(0,2).map(d=>s.jsx("span",{className:`cat-${d} cat-badge px-2 py-0.5 rounded text-[10px] font-medium`,children:vg[d]||d},d)),s.jsx(tb,{level:c.difficultyLevel})]}),s.jsx("h3",{className:"font-heading text-lg font-semibold mb-2 line-clamp-2 group-hover:text-primary transition-colors",children:c.title}),s.jsxs("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-4",children:[c.courseCode&&s.jsxs("span",{className:"text-muted-foreground/60 mr-1",children:["#",c.courseCode]}),c.shortDescription||c.description]}),s.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[c.totalLessons>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(yr,{size:12})," ",c.totalLessons," ",l.lessons]}),c.estimatedHours&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ki,{size:12})," ",c.estimatedHours,"h"]})]}),s.jsxs("div",{className:"mt-4 flex items-center gap-1 text-sm font-medium text-primary opacity-0 group-hover:opacity-100 transition-opacity",children:[l.viewCourse," ",s.jsx(Gt,{size:14})]})]})]})},c.id))}),s.jsx(xHe,{})]}),s.jsx("div",{className:"w-full lg:w-80 shrink-0",children:s.jsx(aHe,{})})]})})]})}var B$="Progress",T$=100,[bHe,OUt]=rs(B$),[wHe,jHe]=bHe(B$),bme=w.forwardRef((e,r)=>{const{__scopeProgress:n,value:i=null,max:a,getValueLabel:o=_He,...l}=e;(a||a===0)&&!gG(a)&&console.error(CHe(`${a}`,"Progress"));const c=gG(a)?a:T$;i!==null&&!xG(i,c)&&console.error(NHe(`${i}`,"Progress"));const u=xG(i,c)?i:null,d=$E(u)?o(u,c):void 0;return s.jsx(wHe,{scope:n,value:u,max:c,children:s.jsx(Rt.div,{"aria-valuemax":c,"aria-valuemin":0,"aria-valuenow":$E(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":_me(u,c),"data-value":u??void 0,"data-max":c,...l,ref:r})})});bme.displayName=B$;var wme="ProgressIndicator",jme=w.forwardRef((e,r)=>{const{__scopeProgress:n,...i}=e,a=jHe(wme,n);return s.jsx(Rt.div,{"data-state":_me(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...i,ref:r})});jme.displayName=wme;function _He(e,r){return`${Math.round(e/r*100)}%`}function _me(e,r){return e==null?"indeterminate":e===r?"complete":"loading"}function $E(e){return typeof e=="number"}function gG(e){return $E(e)&&!isNaN(e)&&e>0}function xG(e,r){return $E(e)&&!isNaN(e)&&e<=r&&e>=0}function CHe(e,r){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${r}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${T$}\`.`}function NHe(e,r){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${r}\`. The \`value\` prop must be:
2072  - a positive number
2073  - less than the value passed to \`max\` (or ${T$} if no \`max\` prop is set)
2074  - \`null\` or \`undefined\` if the progress is indeterminate.
2075
2076Defaulting to \`null\`.`}var Cme=bme,SHe=jme;const ql=w.forwardRef(({className:e,value:r,...n},i)=>s.jsx(Cme,{ref:i,className:it("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:s.jsx(SHe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(r||0)}%)`}})}));ql.displayName=Cme.displayName;var Y4="Tabs",[kHe,LUt]=rs(Y4,[K0]),Nme=K0(),[EHe,P$]=kHe(Y4),Sme=w.forwardRef((e,r)=>{const{__scopeTabs:n,value:i,onValueChange:a,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:u="automatic",...d}=e,h=q0(c),[f,p]=nl({prop:i,onChange:a,defaultProp:o??"",caller:Y4});return s.jsx(EHe,{scope:n,baseId:Ul(),value:f,onValueChange:p,orientation:l,dir:h,activationMode:u,children:s.jsx(Rt.div,{dir:h,"data-orientation":l,...d,ref:r})})});Sme.displayName=Y4;var kme="TabsList",Eme=w.forwardRef((e,r)=>{const{__scopeTabs:n,loop:i=!0,...a}=e,o=P$(kme,n),l=Nme(n);return s.jsx(p8,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:i,children:s.jsx(Rt.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:r})})});Eme.displayName=kme;var Bme="TabsTrigger",Tme=w.forwardRef((e,r)=>{const{__scopeTabs:n,value:i,disabled:a=!1,...o}=e,l=P$(Bme,n),c=Nme(n),u=Fme(l.baseId,i),d=Ome(l.baseId,i),h=i===l.value;return s.jsx(A8,{asChild:!0,...c,focusable:!a,active:h,children:s.jsx(Rt.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":d,"data-state":h?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:u,...o,ref:r,onMouseDown:bt(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?l.onValueChange(i):f.preventDefault()}),onKeyDown:bt(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&l.onValueChange(i)}),onFocus:bt(e.onFocus,()=>{const f=l.activationMode!=="manual";!h&&!a&&f&&l.onValueChange(i)})})})});Tme.displayName=Bme;var Pme="TabsContent",Ime=w.forwardRef((e,r)=>{const{__scopeTabs:n,value:i,forceMount:a,children:o,...l}=e,c=P$(Pme,n),u=Fme(c.baseId,i),d=Ome(c.baseId,i),h=i===c.value,f=w.useRef(h);return w.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),s.jsx(cl,{present:a||h,children:({present:p})=>s.jsx(Rt.div,{"data-state":h?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!p,id:d,tabIndex:0,...l,ref:r,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&o})})});Ime.displayName=Pme;function Fme(e,r){return`${e}-trigger-${r}`}function Ome(e,r){return`${e}-content-${r}`}var BHe=Sme,Lme=Eme,Rme=Tme,Dme=Ime;const Gi=BHe,Ri=w.forwardRef(({className:e,...r},n)=>s.jsx(Lme,{ref:n,className:it("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...r}));Ri.displayName=Lme.displayName;const Mt=w.forwardRef(({className:e,...r},n)=>s.jsx(Rme,{ref:n,className:it("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...r}));Mt.displayName=Rme.displayName;const er=w.forwardRef(({className:e,...r},n)=>s.jsx(Dme,{ref:n,className:it("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r}));er.displayName=Dme.displayName;function Oh(e,r=Date.now()){try{const n=new URL(e);return n.searchParams.set("cb",String(r)),n.toString()}catch{const n=e.includes("?")?"&":"?";return`${e}${n}cb=${r}`}}async function J4(e,r,n){if(r.startsWith("lesson-audio:")){const{data:{session:i}}=await G.auth.getSession(),a=n||(i==null?void 0:i.access_token);if(!a)throw new Error("Authentication required for lesson audio");const o=await fetch("https://ahleagpvrcuwshrzzpkq.supabase.co/functions/v1/get-lesson-audio",{method:"POST",headers:{"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw",Authorization:`Bearer ${a}`},body:JSON.stringify({lessonId:e})});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error||"Failed to get lesson audio")}return(await o.json()).audioUrl}return r}const THe=Object.freeze(Object.defineProperty({__proto__:null,resolveLessonAudioUrl:J4},Symbol.toStringTag,{value:"Module"})),yG={ai:"from-violet-950 via-indigo-950 to-slate-950",blockchain:"from-emerald-950 via-teal-950 to-slate-950",web3:"from-blue-950 via-cyan-950 to-slate-950",nft:"from-fuchsia-950 via-purple-950 to-slate-950","validare-nft":"from-amber-950 via-orange-950 to-slate-950","digital-marketing":"from-rose-950 via-pink-950 to-slate-950","e-learning":"from-sky-950 via-blue-950 to-slate-950"};function EN(e){const r=e.toLowerCase().replace(/[•\-*#]/g,"").split(/\s+/).filter(i=>i.length>4);return[...new Set(r)].slice(0,3)}function PHe(e,r){const n=r.split(`
2077`),i=[];i.push({label:"",text:e,words:e.split(/\s+/).length,keywords:[]});let a="",o="";for(const l of n){const c=l.trim();if(!c||c.startsWith("|")||c.startsWith("```")||c.startsWith(">")||c.match(/^[-─]{3,}$/))continue;const u=c.match(/^#{1,4}\s+(.+)/);if(u){o.trim()&&i.push({label:a,text:o.trim(),words:o.trim().split(/\s+/).length,keywords:EN(o.trim())}),a=u[1].replace(/\*\*/g,""),o="";continue}if(c.startsWith("- ")||c.startsWith("* ")||c.match(/^\d+\.\s/)){const h=c.replace(/^[-*]\s+/,"").replace(/^\d+\.\s+/,"").replace(/\*\*/g,"");o+=(o?`
2078`:"")+"• "+h,o.split(/\s+/).length>40&&(i.push({label:a,text:o.trim(),words:o.trim().split(/\s+/).length,keywords:EN(o.trim())}),o="");continue}const d=c.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1");o&&o.split(/\s+/).length+d.split(/\s+/).length>35?(i.push({label:a,text:o.trim(),words:o.trim().split(/\s+/).length,keywords:EN(o.trim())}),o=d):o+=(o?" ":"")+d}return o.trim()&&i.push({label:a,text:o.trim(),words:o.trim().split(/\s+/).length,keywords:EN(o.trim())}),i}function IHe(){try{const e=new AudioContext,r=e.currentTime;[{freq:523.25,start:0,dur:.15},{freq:659.25,start:.15,dur:.15},{freq:783.99,start:.3,dur:.3}
2078].forEach(({freq:i,start:a,dur:o})=>{const l=e.createOscillator(),c=e.createGain();l.type="sine",l.frequency.value=i,c.gain.setValueAtTime(0,r+a),c.gain.linearRampToValueAtTime(.08,r+a+.03),c.gain.linearRampToValueAtTime(0,r+a+o),l.connect(c),c.connect(e.destination),l.start(r+a),l.stop(r+a+o+.01)}),setTimeout(()=>e.close(),2e3)}catch{}}const vG={ai:["1620712943543-bcc4688e7485","1677442135198-7d26e4fbeac3","1555255707-c07966088b7b","1516321318423-f06f85e504b3","1504639725590-34d0984388bd"],blockchain:["1639322537228-f710d846310a","1639762681485-074b7f938ba0","1551288049-bebda4e38f71","1558494949-ef010cbdcc31","1526374965328-7f61d4dc18c5"],web3:["1451187580459-43490279c0fa","1639322537228-f710d846310a","1558494949-ef010cbdcc31","1535378917042-10a22c95931a","1518770660439-4636190af475"],nft:["1618005198919-d3d4b5a9281a","1634986666676-ec8fd927c23d","1561070791-2526d30994b5","1550751827-4bd374c3f58b","1526374965328-7f61d4dc18c5"],"digital-marketing":["1460925895917-afdab827c52f","1432888498266-38ffec3eaf0a","1557838923-2985c318be48","1551288049-bebda4e38f71","1504639725590-34d0984388bd"],"e-learning":["1501504905252-473c47e087f8","1516321318423-f06f85e504b3","1488190211105-8b0e65b80b4e","1451187580459-43490279c0fa","1558494949-ef010cbdcc31"],default:["1451187580459-43490279c0fa","1526374965328-7f61d4dc18c5","1558494949-ef010cbdcc31","1535378917042-10a22c95931a","1504639725590-34d0984388bd"]};function FHe(e){const r=[],n=e.split(`
2079`);let i=0;for(const a of n){const o=a.match(/!\[.*?\]\((https?:\/\/[^\s)]+)\)/);o&&r.push({index:i,url:o[1]}),i++}return r}function OHe(e,r,n,i){if(i.length>0&&n.keywords.length>0){for(const l of i)if(i.indexOf(l)===e%i.length)return l.url}const a=vG[r]||vG.default;return`https://images.unsplash.com/photo-${a[e%a.length]}?w=960&h=540&fit=crop&q=60`}function LHe({topic:e}){const r=w.useMemo(()=>[{x:"15%",y:"20%",size:80,delay:0,duration:8},{x:"75%",y:"60%",size:60,delay:2,duration:10},{x:"85%",y:"15%",size:40,delay:4,duration:7},{x:"25%",y:"75%",size:50,delay:1,duration:9}],[]);return s.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:r.map((n,i)=>s.jsx(Le.div,{className:"absolute rounded-full border border-white/10",style:{left:n.x,top:n.y,width:n.size,height:n.size},animate:{y:[0,-15,0,15,0],rotate:[0,90,180,270,360],opacity:[.05,.15,.05]},transition:{duration:n.duration,delay:n.delay,repeat:1/0,ease:"easeInOut"}},i))})}function RHe({current:e,total:r}){return s.jsx("div",{className:"absolute top-4 left-4 flex items-center gap-1.5",children:Array.from({length:Math.min(r,12)}).map((n,i)=>s.jsx(Le.div,{className:`h-1 rounded-full transition-all duration-300 ${i===e?"bg-white/80 w-6":i<e?"bg-white/30 w-2":"bg-white/10 w-2"}`},i))})}function I$({lessonId:e,lessonTitle:r,lessonContent:n,topic:i="web3"}){const{lang:a}=Pt(),{awardCoins:o}=Cp(),[l,c]=w.useState("idle"),[u,d]=w.useState(null),[h,f]=w.useState(0),[p,m]=w.useState(0),[A,g]=w.useState(!1),[y,x]=w.useState(null),[b,v]=w.useState(60),j=w.useRef(null),_=w.useRef(0),C=w.useRef(null),N=w.useRef(null),S=w.useRef(null),E=w.useRef(!1),[O,B]=w.useState(!1),T=w.useRef(null),F=2.5,I=3,{data:D}=Xe({queryKey:["lesson-slides",e],queryFn:async()=>{const{data:ve,error:Pe}=await G.from("lesson_slides").select("*").eq("lesson_id",e).order("sort_order");if(Pe)throw Pe;return ve||[]}}),L=D&&D.length>0,V=L&&D.some(ve=>ve.timestamp_start!=null),U=w.useMemo(()=>PHe(r,n),[r,n]),Q=w.useMemo(()=>FHe(n),[n]),$=L?D.length:U.length,q=U.reduce((ve,Pe)=>ve+Pe.words,0),M=w.useMemo(()=>L?[]:U.reduce((ve,Pe)=>{const Ie=ve.length>0?ve[ve.length-1]:0;return ve.push(Ie+Pe.words/q*b),ve},[]),[U,q,b,L]),z=w.useMemo(()=>{const ve={text:"",label:"",words:0,keywords:[],isIntro:!0,isOutro:!1,imageSlideUrl:void 0},Pe={text:"",label:"",words:0,keywords:[],isIntro:!1,isOutro:!0,imageSlideUrl:void 0};if(L){const ue=D.map(Se=>({text:"",label:"",words:0,keywords:[],isIntro:!1,isOutro:!1,imageSlideUrl:Se.image_url}));return[ve,...ue,Pe]}const Ie=U.map(ue=>({...ue,isIntro:!1,isOutro:!1,imageSlideUrl:void 0}));return[ve,...Ie,Pe]},[U,L,D]),K=F+b+I,[ne,ie]=w.useState(0),X=ve=>{const Pe=Math.floor(ve/60),Ie=Math.floor(ve%60);return`${Pe}:${Ie.toString().padStart(2,"0")}`},de=w.useCallback(()=>{S.current&&(clearTimeout(S.current),S.current=null)},[]),oe=w.useCallback(async(ve,Pe)=>{const Ie=j.current;if(!Ie)return;de();const ue=Math.max(0,Math.min(ve,K)),Se=Ie.duration&&isFinite(Ie.duration)?Ie.duration:b,He=async Qe=>{j.current&&(Ie.readyState<1&&await new Promise(ct=>{const dt=()=>{Ie.removeEventListener("loadedmetadata",dt),ct()};Ie.addEventListener("loadedmetadata",dt,{once:!0}),window.setTimeout(ct,500)}),await new Promise(ct=>{const dt=()=>{Ie.removeEventListener("seeked",dt),ct()};Ie.addEventListener("seeked",dt,{once:!0}),Ie.currentTime=Math.max(0,Math.min(Qe,Se)),window.setTimeout(()=>{Ie.removeEventListener("seeked",dt),ct()},250)}))};if(ue<F){Ie.pause(),await He(0),_.current=ue,C.current=null,Pe&&(S.current=window.setTimeout(async()=>{const Qe=j.current;if(Qe){await He(0);try{await Qe.play()}catch{}S.current=null}},(F-ue)*1e3));return}if(_.current=F,ue>=F+Se){Ie.pause(),await He(Se);const Qe=Math.min(ue-F-Se,I);C.current=performance.now()-Qe*1e3;return}if(Ie.pause(),C.current=null,await He(ue-F),Pe)try{await Ie.play()}catch{}},[F,I,b,de,K]),ce=w.useCallback(()=>{const ve=j.current;let Pe;const Ie=ve!=null&&ve.duration&&isFinite(ve.duration)?ve.duration:b;if(!ve||!ve.duration||!isFinite(ve.duration)||ve.paused&&_.current<F)_.current+=.1,Pe=_.current;else if(ve.ended||ve.currentTime>=Ie-.05){C.current===null&&(C.current=performance.now());const Se=(performance.now()-C.current)/1e3;Pe=F+Ie+Se}else Pe=F+ve.currentTime;const ue=F+Ie+I;if(m(Math.min(Pe/ue*100,100)),ie(Pe),Pe<F)f(0);else if(Pe>=F+Ie)f(z.length-1),!E.current&&!A&&(E.current=!0,IHe());else{const Se=(ve==null?void 0:ve.currentTime)??0;if(L&&V){let He=0;for(let Qe=D.length-1;Qe>=0;Qe--){const ct=D[Qe].timestamp_start;if(ct!=null&&Se>=ct){He=Qe;break}}f(1+He)}else if(L){const He=Ie/D.length,Qe=Math.min(Math.floor(Se/He),D.length-1);f(1+Qe)}else{let He=0;for(let Qe=0;Qe<M.length;Qe++){if(Se<M[Qe]){He=Qe;break}He=Qe}f(1+He)}}},[b,z.length,M,A,L,V,D]);w.useEffect(()=>
2079(l==="playing"?N.current=window.setInterval(()=>{var ve;ce(),C.current!==null&&(performance.now()-C.current)/1e3>=I&&((ve=j.current)==null||ve.pause(),c("ended"),N.current&&clearInterval(N.current))},100):N.current&&clearInterval(N.current),()=>{N.current&&clearInterval(N.current)}),[l,ce]);const ye=/(?:^|\n)\s*(?:\*\*)?(?:Moderatoare \(Ana\)|Anna|Ana|Andrei|Brian|Robert|Tudor)(?:\*\*)?\s*[:\-–—]/i.test(n),ge=w.useCallback(async ve=>{const Pe=j.current;if(!Pe)throw new Error("Playerul audio nu este gata.");const Ie=Oh(ve);return Pe.muted=A,Pe.src!==Ie?await new Promise((ue,Se)=>{const He=()=>{Pe.removeEventListener("loadedmetadata",Qe),Pe.removeEventListener("error",ct)},Qe=()=>{Pe.duration&&isFinite(Pe.duration)&&v(Pe.duration),He(),ue()},ct=()=>{He(),Se(new Error("Fișierul audio nu s-a putut încărca."))};Pe.addEventListener("loadedmetadata",Qe),Pe.addEventListener("error",ct),Pe.src=Ie,Pe.load(),window.setTimeout(()=>{He(),ue()},3e3)}):Pe.duration&&isFinite(Pe.duration)&&v(Pe.duration),Pe},[A]),Be=async()=>{c("loading"),d(null);try{let ve=null;const{data:Pe}=await G.from("course_lessons").select("video_url, estimated_minutes").eq("id",e).single();if(Pe!=null&&Pe.video_url)ve=await J4(e,Pe.video_url),ve.startsWith("lesson-audio:")||(ve=Oh(ve)),Pe.estimated_minutes&&v(Pe.estimated_minutes*60);else{const ue=await fetch(`https://ahleagpvrcuwshrzzpkq.supabase.co/functions/v1/${ye?"lesson-tts-conversation":"lesson-tts"}`,{method:"POST",headers:{"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw"},body:JSON.stringify({lessonId:e})});if(!ue.ok){const He=await ue.text();throw console.error("TTS response error:",He),He.includes("quota_exceeded")||He.includes("quota")?new Error("Quota ElevenLabs epuizată. Credite insuficiente pentru generare audio."):new Error("Generarea audio a eșuat. Încearcă din nou mai târziu.")}const Se=await ue.json();ve=Se.audioUrl,Se.durationSeconds&&isFinite(Se.durationSeconds)&&v(Se.durationSeconds)}x(ve),await ge(ve),_.current=0,C.current=null,f(0),m(0),ie(0),E.current=!1,c("playing"),G.from("media_plays").insert({media_type:"lesson_video",media_id:e,media_title:r,topic:i}).then(()=>{}),o(1,"lesson_video_play",e),await oe(0,!0)}catch(ve){console.error("Lesson video error:",ve),d((ve==null?void 0:ve.message)||"Eroare la generarea audio."),c("error")}},Ve=()=>{_.current=0,C.current=null,f(0),m(0),E.current=!1,Be()},te=()=>{g(ve=>!ve),j.current&&(j.current.muted=!A)},xe=()=>{T.current&&(document.fullscreenElement?document.exitFullscreen().then(()=>B(!1)).catch(()=>{}):T.current.requestFullscreen().then(()=>B(!0)).catch(()=>{}))},We=ve=>{if(!j.current||!b)return;const Ie=ve.currentTarget.getBoundingClientRect(),ue=Math.max(0,Math.min(1,(ve.clientX-Ie.left)/Ie.width)),Se=F+b+I,He=ue*Se,Qe=l==="playing"||l==="ended";l==="ended"&&c("playing"),oe(He,Qe),m(ue*100),ie(He),ce()},ze=()=>{const ve=j.current;if(ve){if(l==="playing"){de(),ve.pause(),N.current&&clearInterval(N.current),c("paused");return}l==="paused"&&(c("playing"),oe(ne,!0))}};w.useEffect(()=>{const ve=()=>B(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",ve),()=>document.removeEventListener("fullscreenchange",ve)},[]),w.useEffect(()=>()=>{de(),j.current&&(j.current.pause(),j.current.removeAttribute("src"),j.current.load()),N.current&&clearInterval(N.current)},[de]),w.useEffect(()=>{const ve=j.current;ve&&(de(),ve.pause(),ve.removeAttribute("src"),ve.load(),x(null),c("idle"),d(null),f(0),m(0),ie(0),C.current=null,_.current=0,E.current=!1)},[e,n,de]);const we=yG[i]||yG.web3,J=z[h],he=!(J!=null&&J.isIntro)&&!(J!=null&&J.isOutro),je=he?h-1:0;return s.jsxs("div",{ref:T,className:`rounded-xl overflow-hidden border border-border/50 shadow-lg ${O?"fixed inset-0 z-50 rounded-none border-none flex flex-col bg-black":""}`,children:[s.jsx("audio",{ref:j,preload:"auto",className:"hidden"}),s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 bg-card border-b border-border/50",children:[s.jsx(Pa,{size:16,className:"text-primary"}),s.jsx("span",{className:"text-sm font-medium",children:ye?a==="en"?"🎙️ Podcast — AI dialogue with two voices":"🎙️ Podcast — dialog AI cu două voci":a==="en"?"🎥 Video lesson — AI narration":"🎥 Video lecție — narație AI"}),s.jsxs("span",{className:"text-xs text-muted-foreground ml-auto",children:[$," ",a==="en"?"slides":"slide-uri"]})]}),s.jsxs("div",{className:`relative overflow-hidden ${O?"flex-1":"aspect-video"} ${L&&he?"bg-white":`bg-gradient-to-br ${we}`}`,children:[!L&&s.jsxs(s.Fragment,{children:[s.jsx(Fu,{mode:"wait",children:he&&(()=>{const ve=OHe(je,i,U[je],Q),Pe=ve.includes(".svg")||ve.includes("course-graphics");return s.jsxs(Le.div,{initial:{opacity:0,scale:1.1}
2079,animate:{opacity:Pe?.85:.25,scale:1},exit:{opacity:0},transition:{duration:.8},className:"absolute inset-0",children:[s.jsx("img",{src:ve,alt:"",className:Pe?"w-full h-full object-contain p-8":"w-full h-full object-cover",loading:"lazy"}),s.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${we} ${Pe?"opacity-40":"opacity-75"}`})]},`bg-${je}`)})()}),s.jsx(LHe,{topic:i}),s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:`radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
2080                                 radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%)`}})}),s.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:`linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
2081                               linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px)`,backgroundSize:"40px 40px"}})]}),l==="playing"&&!L&&s.jsx(RHe,{current:h,total:z.length}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:s.jsx(Fu,{mode:"wait",children:s.jsx(Le.div,{initial:{opacity:0,y:L?0:20},animate:{opacity:1,y:0},exit:{opacity:0,y:L?0:-20},transition:{duration:.5},className:L&&he?"w-full h-full":"text-center max-w-2xl w-full p-6 md:p-12",children:J!=null&&J.isIntro?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:[s.jsx(Le.img,{src:K2,alt:"EduWeb",className:"h-14 md:h-20 w-auto drop-shadow-2xl",initial:{scale:.8,opacity:0}
2081,animate:{scale:1,opacity:1},transition:{duration:.6}}),s.jsx(Le.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},className:"text-sm md:text-lg font-medium text-white/70 tracking-wide",children:r})]}):J!=null&&J.isOutro?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:[s.jsx(Le.img,{src:K2,alt:"EduWeb",className:"h-14 md:h-20 w-auto drop-shadow-2xl",initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.6}}),s.jsx(Le.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},className:"text-sm md:text-lg font-medium text-white/70 tracking-wide",children:a==="en"?"Tomorrow's technology, explained today.":"Tehnologia de mâine, explicată azi."})]}):L&&(J!=null&&J.imageSlideUrl)?s.jsx("img",{src:J.imageSlideUrl,alt:`Slide ${je+1}`,className:"w-full h-full object-contain"}):s.jsxs("div",{className:"flex flex-col items-center gap-3",children:[(J==null?void 0:J.label)&&s.jsxs(Le.div,{initial:{opacity:0,width:0},animate:{opacity:1,width:"auto"},transition:{delay:.15},className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-px w-8 bg-gradient-to-r from-transparent to-white/30"}),s.jsx("p",{className:"text-xs md:text-sm font-medium text-white/50 uppercase tracking-widest",children:J.label}),s.jsx("div",{className:"h-px w-8 bg-gradient-to-l from-transparent to-white/30"})]}),s.jsxs(Le.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:.2,duration:.4},className:"relative px-6 py-5 md:px-8 md:py-6 rounded-2xl bg-white/[0.06] backdrop-blur-sm border border-white/10 shadow-2xl",children:[s.jsx("div",{className:"absolute -inset-px rounded-2xl bg-gradient-to-br from-white/10 via-trans
2081parent to-white/5 pointer-events-none"}),s.jsx("p",{className:`relative font-heading font-bold text-white leading-relaxed whitespace-pre-line ${h===1?"text-lg md:text-2xl lg:text-3xl":"text-sm md:text-lg lg:text-xl"}`,children:J==null?void 0:J.text})]}),s.jsxs(Le.span,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},className:"text-[10px] text-white/25 font-mono",children:[je+1," / ",$]})]})},h)})}),s.jsx("div",{className:"absolute bottom-3 right-4 text-white/20 text-xs font-medium",children:"EduWeb.ro"}),l==="error"&&s.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-black/50 gap-3 p-6",children:[s.jsx(k2,{size:32,className:"text-destructive"}),s.jsx("p",{className:"text-sm text-white/90 text-center max-w-sm",children:u}),s.jsx("button",{onClick:()=>{c("idle"),d(null)},className:"mt-2 px-4 py-1.5 rounded-md bg-white/10 hover:bg-white/20 text-white text-xs transition-colors",children:"Închide"})]}),l==="idle"&&s.jsx("button",{onClick:Be,className:"absolute inset-0 flex items-center justify-center bg-black/30 hover:bg-black/40 transition-colors cursor-pointer group",children:s.jsx("div",{className:"w-16 h-16 md:w-20 md:h-20 rounded-full bg-primary/90 flex items-center justify-center group-hover:scale-110 transition-transform shadow-2xl",children:s.jsx(ya,{size:28,className:"text-primary-foreground ml-1"})})}),l==="loading"&&s.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-black/50 gap-3",children:[s.jsx(rt,{size:32,className:"text-primary animate-spin"}),s.jsx("p",{className:"text-sm text-white/70",children:a==="en"?"Generating AI narration...":"Se generează narația AI..."})]}),l==="ended"&&s.jsxs("button",{onClick:Ve,className:"absolute inset-0 flex flex-col items-center justify-center bg-black/40 hover:bg-black/50 transition-colors cursor-pointer gap-3",children:[s.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/90 flex items-center justify-center shadow-2xl",children:s.jsx(mke,{size:24,className:"text-primary-foreground"})}),s.jsx("p",{className:"text-sm text-white/80 font-medium",children:"Reia lecția"})]})]}),s.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 bg-card shrink-0",children:[s.jsx("button",{onClick:l==="playing"||l==="paused"?ze:Be,className:"p-1.5 rounded-md hover:bg-accent transition-colors",disabled:l==="loading",children:l==="playing"?s.jsx(Fd,{size:16}):s.jsx(ya,{size:16})}),s.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden cursor-pointer group",onClick:We,children:s.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-100 relative",style:{width:`${p}%`},children:s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-2.5 h-2.5 bg-primary rounded-full opacity-0 group-hover:opacity-100 transition-opacity shadow-sm"})})}),s.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums whitespace-nowrap",children:[X(ne)," / ",X(K)]}),s.jsx("button",{onClick:te,className:"p-1.5 rounded-md hover:bg-accent transition-colors",children:A?s.jsx(zg,{size:16}):s.jsx(wo,{size:16})}),s.jsx("button",{onClick:xe,className:"p-1.5 rounded-md hover:bg-accent transition-colors",children:O?s.jsx(MU,{size:16}):s.jsx(RU,{size:16})})]})]})}function Mme({courseId:e,audioUrl:r,slides:n}){const i=w.useRef(null),a=w.useRef(null),[o,l]=w.useState(!1),[c,u]=w.useState(!1),[d,h]=w.useState(0),[f,p]=w.useState(0),[m,A]=w.useState(!1),[g,y]=w.useState(!1),[x,b]=w.useState(!1),{data:v=[]}=Xe({queryKey:["presentation-slides",e],queryFn:async()=>{const{data:F,error:I}=await G.from("course_presentation_slides").select("*").eq("course_id",e).order("sort_order");if(I)throw I;return F||[]},enabled:!n}),j=w.useMemo(()=>[...n||v].sort((I,D)=>I.sort_order-D.sort_order),[n,v]),_=w.useMemo(()=>{if(j.length===0)return-1;for(let F=j.length-1;F>=0;F--){const I=j[F].timestamp_start;if(I!=null&&d>=I)return F}return 0},[j,d]),C=w.useCallback(()=>{if(i.current)return i.current;const F=new Audio(Oh(r));return F.crossOrigin="anonymous",F.preload="auto",i.current=F,F.addEventListener("loadedmetadata",()=>{F.duration&&isFinite(F.duration)&&p(F.duration)}),F.addEventListener("timeupdate",()=>h(F.currentTime)),F.addEventListener("ended",()=>{l(!1),h(0)}),F},[r]);w.useEffect(()=>()=>{i.current&&(i.current.pause(),i.current.removeAttribute("src"),i.current.load(),i.current=null)},[]);const N=async()=>{const F=C();if(o)F.pause(),l(!1);else{u(!0);try{await F.play(),l(!0),b(!0)}catch{}u(!1)}},S=()=>{i.current&&(i.current.muted=!m),A(!m)},E=F=>{const I=parseFloat(F.target.value);i.current&&(i.current.currentTime=I),h(I)},O=async()=>{a.current&&(document.fullscreenElement?(await document.exitFullscreen(),y(!1)):(await a.current.requestFullscreen(),y(!0)))};w.useEffect(()=>{const F=()=>y(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",F),()=>document.removeEventListener("fullscreenchange",F)},[]);const B=F=>{const I=Math.floor(F/60),D=Math.floor(F%60);return`${I}:${D.toString().padStart(2,"0")}`};if(j.length===0)return null;const T=_>=0?j[_]:j[0];return s.jsxs("div",{ref:a,className:"relative rounded-xl overflow-hidden bg-black group cursor-pointer",style:{aspectRatio:"16/9"},children:[s.jsx(Fu,{mode:"wait",children:s.jsx(Le.img,{src:T==null?void 0:T.image_url,alt:"Slide",className:"absolute inset-0 w-full h-full object-contain bg-black",initial:{opacity:0}
2081,animate:{opacity:1},exit:{opacity:0},transition:{duration:.4}},(T==null?void 0:T.id)||"empty")}),!x&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40 z-10",onClick:N,children:s.jsx(Le.div,{className:"w-20 h-20 rounded-full bg-primary/90 flex items-center justify-center shadow-lg",whileHover:{scale:1.1},whileTap:{scale:.95},children:c?s.jsx(rt,{size:32,className:"text-primary-foreground animate-spin"}):s.jsx(ya,{size:32,className:"text-primary-foreground ml-1"})})}),x&&s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent p-3 opacity-0 group-hover:opacity-100 transition-opacity z-20",onClick:F=>F.stopPropagation(),children:[s.jsx("input",{type:"range",min:0,max:f||1,step:.1,value:d,onChange:E,className:"w-full h-1 mb-2 accent-primary cursor-pointer"}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:N,className:"text-white hover:text-primary transition-colors",children:c?s.jsx(rt,{size:18,className:"animate-spin"}):o?s.jsx(Fd,{size:18}):s.jsx(ya,{size:18})}),s.jsxs("span",{className:"text-white/80 text-xs font-mono",children:[B(d)," / ",B(f)]}),s.jsx("button",{onClick:S,className:"text-white hover:text-primary transition-colors ml-auto",children:m?s.jsx(zg,{size:16}):s.jsx(wo,{size:16})}),s.jsx("button",{onClick:O,className:"text-white hover:text-primary transition-colors",children:g?s.jsx(MU,{size:16}):s.jsx(RU,{size:16})})]})]}),x&&s.jsx("div",{className:"absolute inset-0 z-10",onClick:N}),s.jsxs("div",{className:"absolute top-3 right-3 bg-black/60 text-white text-xs px-2 py-1 rounded-full z-20",children:[_+1," / ",j.length]})]})}function zme({moduleId:e,moduleTitle:r,moduleIndex:n,onPassed:i,previousAttempt:a}){const{user:o}=Fn(),{toast:l}=wn(),c=Kr(),{data:u=[],isLoading:d}=lOe(e),[h,f]=w.useState(0),[p,m]=w.useState(null),[A,g]=w.useState([]),[y,x]=w.useState(!1),[b,v]=w.useState(!1),[j,_]=w.useState(!1),[C,N]=w.useState(0),[S,E]=w.useState(!1),[O,B]=w.useState(0),[T,F]=w.useState([]),[I,D]=w.useState([]);if(d)return s.jsx("div",{className:"glass-card rounded-xl p-12 text-center",children:s.jsx(rt,{className:"animate-spin mx-auto text-primary",size:24})});if(!u.length)return s.jsxs("div",{className:"glass-card rounded-xl p-12 text-center text-muted-foreground",children:[s.jsx(ms,{size:32,className:"mx-auto mb-3 opacity-40"}),s.jsx("p",{children:"Nu există quiz pentru acest modul încă."})]});if(a)return s.jsxs("div",{className:"glass-card rounded-xl p-8 text-center",children:[s.jsx("div",{className:it("w-20 h-20 rounded-full flex items-center justify-center mx-auto mb-6",a.passed?"bg-primary/20":"bg-destructive/20"),children:a.passed?s.jsx(Ky,{size:36,className:"text-primary"}):s.jsx(JA,{size:36,className:"text-destructive"})}),s.jsx("h3",{className:"font-heading text-2xl font-bold mb-2",children:a.passed?"Quiz trecut! 🎉":"Quiz nereușit"}),s.jsxs("p",{className:"text-muted-foreground mb-4",children:["Ai răspuns corect la ",a.score," din ",a.totalQuestions," întrebări.",!a.passed&&" Quiz-ul poate fi dat o singură dată."]}),a.eduCoinsEarned>0&&s.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent/10 text-accent px-4 py-2 rounded-lg text-lg font-bold mb-6",children:[s.jsx(Wi,{size:20})," +",a.eduCoinsEarned," Edu Coins"]}),a.passed&&s.jsx("div",{className:"mt-4",children:s.jsxs(me,{onClick:i,className:"gap-2",children:["Continuă la modulul următor ",s.jsx(Gt,{size:16})]})})]});const L=u[h],V=h===u.length-1,U=M=>{j||m(M)},Q=()=>{p!==null&&_(!0)},$=()=>{const M=[...A,p];g(M),m(null),_(!1),V?(F(M),q()):f(z=>z+1)},q=async(M,z,K)=>{if(o){v(!0),x(!0);try{const ne=[...A,p].map(ge=>ge??-1),{data:ie,error:X}=await G.rpc("submit_quiz_attempt",{p_user_id:o.id,p_module_id:e,p_answers:ne});if(X)throw X;if(!(ie!=null&&ie.success))throw new Error((ie==null?void 0:ie.reason)||"submission_failed");const de=ie.score,oe=ie.passed,ce=ie.coins_earned,ye=ie.correct_answers||[];N(de),E(oe),B(ce),D(ye),c.invalidateQueries({queryKey:["quiz-attempts"]}),c.invalidateQueries({queryKey:["edu-coins"]}),c.invalidateQueries({queryKey:["gamification-wallet"]}),oe&&l({title:`🎉 Quiz trecut! +${ce} Edu Coins`,description:"Poți avansa la modulul următor."})}catch(ne){l({title:"Eroare",description:ne.message,variant:"destructive"})}finally{v(!1)}}};return y?s.jsxs(Le.div,{initial:{opacity:0,scale:.95}
2081,animate:{opacity:1,scale:1},className:"glass-card rounded-xl p-8",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx(Le.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring",stiffness:200},className:it("w-20 h-20 rounded-full flex items-center justify-center mx-auto mb-6",S?"bg-primary/20":"bg-accent/20"),children:S?s.jsx(Ky,{size:36,className:"text-primary"}):s.jsx(ms,{size:36,className:"text-accent"})}),s.jsx("h3",{className:"font-heading text-2xl font-bold mb-2",children:S?"Felicitări! Ai trecut quiz-ul! 🎉":"Bună treabă! Ai terminat quiz-ul! 💪"}),s.jsxs("p",{className:"text-muted-foreground mb-2",children:["Ai răspuns corect la ",C," din ",u.length," întrebări."]}),!S&&s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nu te descuraja — fiecare greșeală e o lecție învățată. Revizuiește materialul și vei fi mai pregătit data viitoare!"}),O>0&&S&&s.jsxs(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.4},className:"inline-flex items-center gap-2 bg-accent/10 text-accent px-4 py-2 rounded-lg text-lg font-bold mt-4",children:[s.jsx(Wi,{size:20})," +",O," Edu Coins"]})]}),s.jsxs("div",{className:"space-y-3 mb-8",children:[s.jsx("h4",{className:"font-heading text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-4",children:"Rezultatele tale"}),u.map((M,z)=>{const K=T[z],ne=I[z],ie=K===ne;return s.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3+z*.08},className:it("p-4 rounded-lg border-2",ie?"border-primary/30 bg-primary/5":"border-destructive/30 bg-destructive/5"),children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:it("w-6 h-6 rounded-full flex items-center justify-center shrink-0 mt-0.5",ie?"bg-primary text-primary-foreground":"bg-destructive text-destructive-foreground"),children:ie?s.jsx(hn,{size:14}):s.jsx(Yh,{size:14})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium text-sm mb-1",children:M.question}),!ie&&K!==null&&K!==void 0&&s.jsxs("p",{className:"text-xs text-destructive/80 line-through mb-0.5",children:["Răspunsul tău: ",M.options[K]]}),ne!==void 0&&M.options[ne]!==void 0&&s.jsxs("p",{className:"text-xs text-primary font-medium",children:["✓ Răspuns corect: ",M.options[ne]]})]})]})},M.id||z)})]}),s.jsx("div",{className:"flex justify-center pt-2",children:s.jsxs(me,{onClick:i,size:"lg",className:"gap-2",children:[S?"Continuă la modulul următor":"Continuă"," ",s.jsx(Gt,{size:16})]})})]}):s.jsxs("div",{className:"glass-card rounded-xl p-6 md:p-8",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("span",{className:"text-xs text-muted-foreground font-mono",children:["Quiz M",n+1," · Întrebarea ",h+1,"/",u.length]}),s.jsx("div",{className:"flex gap-1",children:u.map((M,z)=>s.jsx("div",{className:it("w-8 h-1.5 rounded-full transition-colors",z<h?"bg-primary":z===h?"bg-primary/50":"bg-muted")},z))})]}),s.jsx(Fu,{mode:"wait",children:s.jsxs(Le.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.25},children:[s.jsx("h3",{className:"font-heading text-lg md:text-xl font-semibold mb-6",children:L.question}),s.jsx("div",{className:"space-y-3",children:L.options.map((M,z)=>{const K=p===z;return s.jsx("button",{onClick:()=>U(z),className:it("w-full text-left p-4 rounded-lg border-2 transition-all",!j&&!K&&"border-border hover:border-primary/50 hover:bg-primary/5",!j&&K&&"border-primary bg-primary/10",j&&K&&"border-primary bg-primary/10",j&&!K&&"border-border opacity-50"),disabled:j,children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:it("w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold shrink-0",K?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:j&&K?s.jsx(hn,{size:16}):String.fromCharCode(65+z)}),s.jsx("span",{className:"text-sm md:text-base",children:M})]})},z)})})]},h)}),s.jsx("div",{className:"flex justify-end mt-6 gap-3",children:j?s.jsxs(me,{onClick:$,className:"gap-2",children:[V?"Vezi rezultatul":"Următoarea întrebare"," ",s.jsx(Gt,{size:16})]}):s.jsx(me,{onClick:Q,disabled:p===null,children:"Confirmă răspunsul"})})]})}function Gv(e,r){return e===0?"Intro":e===r-1?"Final":`M${e}`}function F$(e){const r=new Map;let n=0;for(const i of e)for(const a of i.lessons)a.title.startsWith("Podcast:")?r.set(a.id,{label:"Podcast",displayTitle:a.title,isPodcast:!0,globalIndex:-1}):(n++,r.set(a.id,{label:`Lecția ${n}`,displayTitle:`Lecția ${n}: ${a.title}`,isPodcast:!1,globalIndex:n}));return r}function bG(){var Ve,te;const{slug:e}=Zl(),r=As(),[n,i]=H0(),{user:a,session:o}=Fn(),{lang:l}=Pt(),{toast:c}=wn(),{awardCoins:u}=Cp(),d=Kr(),[h,f]=w.useState(!1),[p,m]=w.useState(null),[A,g]=w.useState(null),{isSubscribed:y,canEnrollMore:x,startCheckout:b}=G4(),{data:v,isLoading:j}=g7e(e),{data:_=[]}=eme(v==null?void 0:v.id),{data:C=[]}=rme(v==null?void 0:v.id),{data:N=[]}=nde(v==null?void 0:v.id),{data:S={}}=rde(v==null?void 0:v.id),{data:E=[]}=tme(),O=E.some(xe=>xe.course_id===(v==null?void 0:v.id)),B=(v==null?void 0:v.priceType)==="free"||O,T=!O,F=_.reduce((xe,We)=>xe+We.lessons.length,0),I=C.filter(xe=>xe.completed).length,D=F>0?Math.round(I/F*100):0,L=w.useMemo(()=>F$(_),[_]),V=xe=>(S[xe]||0)>0,U=xe=>{if(T||xe===0)return!0;const We=_[xe-1];return We?V(We.id)?N.some(ze=>ze.moduleId===We.id&&ze.passed):!0:!1},Q=((Ve=v==null?void 0:v.topics)==null?void 0:Ve[0])||"web3",$=l==="en"?"course":"curs",q=v?`${l==="en"?"Course":"Curs"} ${v.title} | EduWeb Academy`:void 0;
2081Zr(v?{title:q,description:v.shortDescription||v.description||"",image:v.imageUrl||void 0}:void 0);const M=v?{"@context":"https://schema.org","@type":"Course",name:v.title,description:v.shortDescription||v.description||"",provider:{"@type":"Organization",name:"EduWeb",url:l==="en"?"https://eduweb.ai":"https://eduweb.ro"},educationalLevel:v.difficultyLevel,isAccessibleForFree:v.priceType==="free",...v.imageUrl&&{image:v.imageUrl},inLanguage:l,...v.estimatedHours&&{timeRequired:`PT${v.estimatedHours}H`},...v.totalLessons&&{numberOfLessons:v.totalLessons},url:`${l==="en"?"https://eduweb.ai":"https://eduweb.ro"}/academy/${$}/${v.slug}`,..._.length>0&&{syllabusSections:_.map(xe=>({"@type":"Syllabus",name:xe.title})),hasCourseInstance:[{"@type":"CourseInstance",courseMode:"Online"}]}}:null,z=l==="en"?(v==null?void 0:v.faqEn)||[]:(v==null?void 0:v.faqRo)||[],ne=[...w.useMemo(()=>{if(!v)return[];const xe=[],We=l!=="en",ze=_.length,we=F,J=v.estimatedHours,he=(v.topics||[]).join(", ");if(xe.push({question:We?`Pentru cine este cursul „${v.title}"?`:`Who is the course "${v.title}" for?`,answer:We?`Cursul este destinat ${v.difficultyLevel==="beginner"?"începătorilor care doresc să înțeleagă":v.difficultyLevel==="intermediate"?"celor cu cunoștințe de bază care vor să aprofundeze":"profesioniștilor care doresc să se perfecționeze în"} ${he}. Nu ai nevoie de experiență anterioară ${v.difficultyLevel==="beginner"?"— totul este explicat pas cu pas":"avansată"}.`:`This course is designed for ${v.difficultyLevel==="beginner"?"beginners who want to understand":v.difficultyLevel==="intermediate"?"those with basic knowledge looking to deepen their understanding of":"professionals looking to advance their skills in"} ${he}. ${v.difficultyLevel==="beginner"?"No prior experience is needed — everything is explained step by step.":""}`}),ze>0){const je=_.slice(0,4).map(ve=>ve.title).join(", ");xe.push({question:We?"Ce voi învăța în acest curs?":"What will I learn in this course?",answer:We?`Cursul include ${ze} module și ${we} lecții care acoperă: ${je}${ze>4?" și altele":""}. ${J?`Durata estimată este de ${J} ore.`:""}`:`The course includes ${ze} modules and ${we} lessons covering: ${je}${ze>4?" and more":""}. ${J?`Estimated duration is ${J} hours.`:""}`})}return v.priceType==="free"?xe.push({question:We?"Cursul este gratuit?":"Is this course free?",answer:We?"Da, acest curs este complet gratuit. Te poți înrola oricând și vei avea acces la toate lecțiile și quiz-urile.":"Yes, this course is completely free. You can enroll at any time and access all lessons and quizzes."}):(xe.push({question:We?"Cât costă cursul și cum pot plăti?":"How much does the course cost and how can I pay?",answer:We?`Cursul costă ${v.priceAmount} ${v.currency}. Poți plăti online cu cardul prin Stripe. De asemenea, cursul este inclus în abonamentul EduWeb Academy (199 RON/lună sau 1.499 RON/an).`:`The course costs ${v.priceAmount} ${v.currency}. You can pay online by card via Stripe. The course is also included in the EduWeb Academy subscription (199 RON/month or 1,499 RON/year).`}),xe.push({question:We?"Cursul este inclus în abonamentul EduWeb Academy?":"Is this course included in the EduWeb Academy subscription?",answer:We?"Da, toți abonații EduWeb Academy au acces la acest curs și la toate cursurile din platformă, cu limita de 3 înrolări noi pe lună. Abonamentul este disponibil lunar (199 RON) sau anual (1.499 RON).":"Yes, all EduWeb Academy subscribers have access to this course and all courses on the platform, with a limit of 3 new enrollments per month. The subscription is available monthly (199 RON) or annually (1,499 RON)."})),xe.push({question:We?"Primesc certificat la finalizarea cursului?":"Will I receive a certificate upon completion?",answer:We?"Da, la finalizarea tuturor lecțiilor și quiz-urilor vei primi un certificat digital EduWeb pe care îl poți descărca și distribui. Fiecare certificat are un cod unic de verificare.":"Yes, upon completing all lessons and quizzes you will receive a digital EduWeb certificate that you can download and share. Each certificate has a unique verification code."}),xe.push({question:We?"Cum funcționează cursul?":"How does the course work?",answer:We?"Cursul este 100% online și self-paced — înveți în ritmul tău. Fiecare modul conține lecții cu conținut text, iar la finalul modulului există un quiz. Trebuie să treci quiz-ul pe
2081ntru a debloca modulul următor. Progresul tău este salvat automat.":"The course is 100% online and self-paced — you learn at your own pace. Each module contains text lessons, and at the end of each module there is a quiz. You need to pass the quiz to unlock the next module. Your progress is saved automatically."}),xe},[v,_,F,l]),...z],ie=ne.length>0?{"@context":"https://schema.org","@type":"FAQPage",mainEntity:ne.map(xe=>({"@type":"Question",name:xe.question,acceptedAnswer:{"@type":"Answer",text:xe.answer}}))}:null,X=v?{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:l==="en"?"Home":"Acasă",item:l==="en"?"https://eduweb.ai":"https://eduweb.ro"},{"@type":"ListItem",position:2,name:"Academy",item:`${l==="en"?"https://eduweb.ai":"https://eduweb.ro"}/academy`},{"@type":"ListItem",position:3,name:`${l==="en"?"Course":"Curs"} ${v.title}`}]}:null;w.useEffect(()=>{n.get("payment")==="success"&&a&&o&&(v!=null&&v.id)&&(async()=>{try{const{data:We,error:ze}=await G.functions.invoke("verify-course-payment",{headers:{Authorization:`Bearer ${o.access_token}`},body:{courseId:v.id}});!ze&&(We!=null&&We.enrolled)&&(c({title:l==="en"?"Payment successful!":"Plată reușită!",description:l==="en"?"You are now enrolled.":"Ești acum înrolat în curs."}),d.invalidateQueries({queryKey:["enrollments"]}),oe(v,"paid"))}catch(We){console.error("Payment verification failed:",We)}i({},{replace:!0})})()},[n,a,o,v==null?void 0:v.id]);const de=async()=>{if(!a||!o){r("/auth");return}if(v){f(!0);try{const{data:xe,error:We}=await G.functions.invoke("create-course-payment",{headers:{Authorization:`Bearer ${o.access_token}`},body:{courseId:v.id}});if(We)throw We;xe!=null&&xe.url&&window.open(xe.url,"_blank")}catch(xe){c({title:l==="en"?"Error":"Eroare",description:xe.message,variant:"destructive"})}finally{f(!1)}}},oe=(xe,We)=>{if(!(a!=null&&a.email))return;const ze=xe.title;G.functions.invoke("send-transactional-email",{body:{templateName:"course-enrollment",recipientEmail:a.email,idempotencyKey:`course-enroll-${xe.id}-${a.id}`,templateData:{courseName:ze,courseSlug:xe.slug,priceType:We,lang:l}}}).catch(we=>console.warn("Enrollment email failed:",we))},ce=async()=>{if(!a){r("/auth");return}if((v==null?void 0:v.priceType)==="paid")if(y){if(!x){c({title:l==="en"?"Monthly limit reached":"Limită lunară atinsă",description:l==="en"?"You can enroll in max 3 courses per month with your subscription.":"Poți accesa maxim 3 cursuri pe lună cu abonamentul.",variant:"destructive"});return}f(!0);try{const{data:xe,error:We}=await G.rpc("enroll_via_subscription",{p_course_id:v.id});if(We)throw We;const ze=xe;ze!=null&&ze.success?(c({title:l==="en"?"Enrolled successfully!":"Înrolare reușită!"}),d.invalidateQueries({queryKey:["enrollments"]}),oe(v,"subscription")):c({title:l==="en"?"Error":"Eroare",description:(ze==null?void 0:ze.reason)||"Unknown error",variant:"destructive"})}catch(xe){c({title:l==="en"?"Error":"Eroare",description:xe.message,variant:"destructive"})}finally{f(!1)}return}else return;f(!0);try{const{data:xe,error:We}=await G.rpc("enroll_free_course",{p_course_id:v.id});if(We)throw We;const ze=xe;ze!=null&&ze.success?(c({title:l==="en"?"Enrolled successfully!":"Înrolare reușită!",description:l==="en"?"You can start the course now.":"Poți începe cursul acum."}),d.invalidateQueries({queryKey:["enrollments"]}),oe(v,"free")):(ze==null?void 0:ze.reason)==="already_enrolled"?c({title:l==="en"?"You are already enrolled!":"Ești deja înrolat în acest curs!"}):c({title:l==="en"?"Error":"Eroare",description:(ze==null?void 0:ze.reason)||"Unknown error",variant:"destructive"})}catch(xe){c({title:l==="en"?"Error":"Eroare",description:xe.message,variant:"destructive"})}finally{f(!1)}},ye=async xe=>{var We,ze,we,J,he;if(a)try{const je=C.find(ue=>ue.lesson_id===xe);je?await G.from("lesson_progress").update({completed:!0,completed_at:new Date().toISOString()}).eq("id",je.id):await G.from("lesson_progress").insert({user_id:a.id,lesson_id:xe,completed:!0,completed_at:new Date().toISOString()}),d.invalidateQueries({queryKey:["lesson-progress"]}),c({title:l==="en"?"Lesson completed! ✅":"Lecție completată! ✅"});const ve=await u(2,"lesson_complete",xe);!ve.success&&ve.reason!=="client_dedup"&&ve.reason!=="duplicate"&&console.warn("EduCoins lesson_complete failed:",ve.reason);const Pe=_.flatMap(ue=>ue.lessons);if(C.filter(ue=>ue.completed).length+1>=Pe.length&&(v!=null&&v.id)&&a){await G.from("enrollments").update({completed_at:new Date().toISOString()}).eq("user_id",a.id).eq("course_id",v.id),d.invalidateQueries({queryKey:["enrollments"]});const ue=await u(50,"course_complete",v.id);ue.success||console.warn("EduCoins course_complete failed:",ue.reason);let Se="";try{const He=v.course_code||((ze=(We=v.slug)==null?void 0:We.slice(0,4))==null?void 0:ze.toUpperCase())||"GEN",{data:Qe}=await G.rpc("generate_certificate_number",{p_course_code:He});Se=Qe||`EDUWEB-${Date.now().toString(36).toUpperCase()}`;const ct=((we=a.user_metadata)==null?void 0:we.full_name)||((J=a.user_metadata)==null?void 0:J.name)||((he=a.email)==null?void 0:he.split("@")[0])||"",{data:dt}=await G.from("enrollments").select("id").eq("user_id",a.id).eq("course_id",v.id).maybeSingle();if(dt){await G.from("certificates").insert({user_id:a.id,course_id:v.id,enrollment_id:dt.id,certificate_number:Se,holder_name:ct,verification_url:`${window.location.origin}/verify/${Se}`}),await G.from("enrollments").update({certificate_issued:!0}).eq("id",dt.id);
2081const Fr=await u(30,"certificate_earned",v.id);Fr.success||console.warn("EduCoins certificate_earned failed:",Fr.reason)}}catch(He){console.error("Certificate issuance failed:",He)}try{await G.functions.invoke("send-transactional-email",{body:{templateName:"course-completion",recipientEmail:a.email,idempotencyKey:`course-completion-${v.id}-${a.id}`,templateData:{courseName:v.title,certificateNumber:Se||void 0,eduCoinsEarned:80,lang:l}}})}catch{}c({title:l==="en"?"🎓 Course completed!":"🎓 Curs completat!",description:l==="en"?"+80 EduCoins earned (course + diploma)!":"+80 EduCoins câștigați (curs + diplomă)!"})}}catch{}},ge=async(xe,We)=>{var J;const ze=(J=_[xe])==null?void 0:J.lessons[We];if(!ze)return;if(!ze.isFreePreview&&!B){if(!a){c({title:l==="en"?"Login required":"Autentificare necesară",description:l==="en"?"Please log in to access this course.":"Te rugăm să te autentifici pentru a accesa acest curs.",variant:"destructive"}),r("/auth");return}c({title:l==="en"?"Enrollment required":"Înrolare necesară",description:l==="en"?"You need to purchase or subscribe to access this lesson.":"Trebuie să achiziționezi cursul sau să te abonezi pentru a accesa această lecție.",variant:"destructive"});return}let we="";try{const{data:he}=await G.from("course_lessons").select("content").eq("id",ze.id).single();we=(he==null?void 0:he.content)||""}catch{}m({id:ze.id,title:ze.title,content:we,moduleIndex:xe,lessonIndex:We})},Be=()=>{if(!p)return;const{moduleIndex:xe,lessonIndex:We}=p,ze=_[xe];We+1<ze.lessons.length?ge(xe,We+1):xe+1<_.length&&ge(xe+1,0)};if(j)return s.jsx(Ft,{children:s.jsx("div",{className:"container py-20 flex justify-center",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})})});if(!v)return s.jsx(Ft,{children:s.jsxs("div",{className:"container py-20 text-center",children:[s.jsx("h1",{className:"font-heading text-2xl font-bold mb-2",children:l==="en"?"Course not found":"Curs negăsit"}),s.jsxs(be,{to:"/academy",className:"text-primary text-sm hover:underline",children:["← ",l==="en"?"Back to Academy":"Înapoi la Academy"]})]})});if(p){const xe=C.some(We=>We.lesson_id===p.id&&We.completed);return s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-5xl py-8",children:[s.jsxs("button",{onClick:()=>m(null),className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," ",l==="en"?"Back to curriculum":"Înapoi la curriculum"]}),s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:((te=L.get(p.id))==null?void 0:te.label)||"Lecția ?"}),xe&&s.jsx(hn,{size:16,className:"text-primary"})]}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold tracking-tight mb-6",children:p.title}),s.jsxs(Gi,{defaultValue:"video",className:"w-full",children:[s.jsxs(Ri,{className:"w-full justify-start mb-6 bg-card border border-border/50",children:[s.jsxs(Mt,{value:"video",className:"gap-2 data-[state=active]:bg-primary/10",children:[s.jsx(Pa,{size:16})," Video"]}),s.jsxs(Mt,{value:"text",className:"gap-2 data-[state=active]:bg-primary/10",children:[s.jsx(us,{size:16})," Text"]})]}),s.jsx(er,{value:"video",children:p.content?s.jsx(I$,{lessonId:p.id,lessonTitle:p.title,lessonContent:p.content,topic:Q}):s.jsxs("div",{className:"glass-card rounded-xl p-12 text-center text-muted-foreground",children:[s.jsx(Pa,{size:32,className:"mx-auto mb-3 opacity-40"}),s.jsx("p",{children:l==="en"?"Video content coming soon.":"Conținutul video va fi disponibil în curând."})]})}),s.jsx(er,{value:"text",children:s.jsx("div",{className:"glass-card rounded-xl p-6 md:p-8",children:p.content?s.jsx("div",{className:"prose prose-sm md:prose-base dark:prose-invert max-w-none",children:s.jsx("div",{className:"whitespace-pre-line text-foreground/85 leading-relaxed",children:p.content})}):s.jsx("p",{className:"text-muted-foreground text-center py-8",children:l==="en"?"Text content coming soon.":"Conținutul text va fi adăugat în curând."})})})]}),s.jsxs("div",{className:"flex items-center justify-between mt-8 pt-6 border-t border-border/50",children:[a&&!xe&&s.jsxs(me,{onClick:()=>ye(p.id),variant:"outline",className:"gap-2",children:[s.jsx(hn,{size:16})," ",l==="en"?"Mark as completed":"Marchează ca finalizată"]}),xe&&s.jsxs("span",{className:"text-sm text-primary font-medium flex items-center gap-1",children:[s.jsx(hn,{size:14})," ",l==="en"?"Lesson completed":"Lecție completată"]}),s.jsxs(me,{onClick:Be,className:"gap-2 ml-auto",children:[l==="en"?"Next lesson":"Lecția următoare"," ",s.jsx(hs,{size:16})]})]})]})})}return A?V(A.id)?s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-3xl py-10",children:[s.jsxs("button",{onClick:()=>g(null),className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," ",l==="en"?"Back to curriculum":"Înapoi la curriculum"]}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/10 text-primary px-4 py-2 rounded-full text-sm font-bold mb-4",children:[s.jsx(pi,{size:16})," ",l==="en"?"Module Quiz":"Quiz de modul"]}),s.jsxs("h2",{className:"font-heading text-2xl md:text-3xl font-bold tracking-tight mb-2",children:["Quiz – ",Gv(A.index,_.length),": ",A.title]}),s.jsx("p",{className:"text-muted-foreground text-sm",children:l==="en"?"Answer all questions correctly to unlock the next module and earn Edu Coins.":"Răspunde corect la toate întrebările pentru a debloca modulul următor și a câștiga Edu Coins."})]}),s.jsx(zme,{moduleId:A.id,moduleTitle:A.title,moduleIndex:A.index,onPassed:()=>g(null),previousAttempt:N.find(xe=>xe.moduleId===A.id)||null})]})}):(g(null),null):s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-4xl py-10",children:[s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary transition-colors",children:[s.jsx(rn,{size:14})," ",l==="en"?"Back to Academy":"Înapoi la Academy"]}),a&&s.jsx(r$,{})]}),s.jsxs(Le.div,{initial:{opacity:0,y:12}
2081,animate:{opacity:1,y:0},transition:{duration:.4},children:[v.imageUrl&&s.jsx("div",{className:"rounded-xl overflow-hidden mb-8",children:s.jsx("img",{src:v.imageUrl,alt:v.title,className:"w-full h-56 md:h-72 object-cover"})}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-4",children:[v.topics.map(xe=>s.jsx(Hg,{topic:xe},xe)),s.jsx(tb,{level:v.difficultyLevel})]}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold tracking-tight mb-4",children:v.title}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mb-6 flex-wrap",children:[F>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(yr,{size:14})," ",F," ",l==="en"?"lessons":"lecții"]}),v.estimatedHours&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ki,{size:14})," ",v.estimatedHours,"h ",l==="en"?"estimated":"estimat"]}),!O&&s.jsx("span",{className:"flex items-center gap-1",children:v.priceType==="free"?s.jsx("span",{className:"text-primary font-semibold",children:l==="en"?"Free":"Gratuit"}):s.jsxs("span",{className:"flex items-center gap-1 font-semibold text-accent",children:[s.jsx(Ko,{size:14})," ",v.priceAmount," ",v.currency]})})]}),O&&s.jsxs("div",{className:"glass-card rounded-xl p-6 mb-8",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-sm font-medium",children:l==="en"?"Your progress":"Progresul tău"}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[D,"%"]})]}),s.jsx(ql,{value:D,className:"h-2 mb-4"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[I," ",l==="en"?"of":"din"," ",F," ",l==="en"?"lessons completed":"lecții completate"]})]}),!O&&s.jsx("div",{className:"glass-card rounded-xl p-6 mb-8",children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-heading font-semibold text-lg mb-1",children:v.priceType==="free"?l==="en"?"Start for free now":"Începe gratuit acum":l==="en"?"Start this course":"Începe acest curs"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:a?l==="en"?"Choose your preferred option.":"Alege opțiunea preferată.":l==="en"?"Create a free account to enroll.":"Creează un cont gratuit pentru a te înrola."})]}),v.priceType==="paid"&&!y?s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsxs(me,{onClick:de,disabled:h,size:"lg",className:"font-heading font-semibold",children:[h?s.jsx(rt,{size:16,className:"animate-spin"}):s.jsx(JL,{size:16}),l==="en"?"Buy":"Cumpără"," – ",v.priceAmount," ",v.currency]}),s.jsxs(me,{onClick:()=>a?b("monthly"):r("/academy/abonament"),variant:"outline",size:"lg",className:"font-heading font-semibold border-primary/50 text-primary hover:bg-primary/10",children:[s.jsx(Ko,{size:16}),l==="en"?"Subscription:":"Abonament:"," 199 RON/",l==="en"?"mo":"lună"]})]}):y&&v.priceType==="paid"?s.jsxs(me,{onClick:ce,disabled:h,size:"lg",className:"font-heading font-semibold w-fit",children:[h?s.jsx(rt,{size:16,className:"animate-spin"}):s.jsx(Ko,{size:16}),l==="en"?"Enroll with subscription":"Înrolează-te cu abonamentul"]}):s.jsxs(me,{onClick:ce,disabled:h,size:"lg",className:"font-heading font-semibold w-fit",children:[h?s.jsx(rt,{size:16,className:"animate-spin"}):s.jsx(Rr,{size:16}),a?l==="en"?"Enroll for free":"Înrolează-te gratuit":l==="en"?"Create account & Enroll":"Creează cont & Înrolează-te"]})]})}),!O&&v.description&&s.jsxs("div",{className:"mb-10",children:[s.jsx("h2",{className:"font-heading text-xl font-semibold mb-4",children:l==="en"?"About the course":"Despre curs"}),s.jsx("div",{className:"text-foreground/85 leading-relaxed whitespace-pre-line",children:v.description})]}),!O&&v.videoPresentationAudioUrl&&s.jsxs("div",{className:"mb-10",children:[s.jsxs("h2",{className:"font-heading text-xl font-semibold mb-4 flex items-center gap-2",children:[s.jsx(tR,{size:20,className:"text-primary"}),l==="en"?"Course Presentation":"Prezentarea cursului"]}),s.jsx(Mme,{courseId:v.id,audioUrl:v.videoPresentationAudioUrl})]}),!O&&v.videoPresentationScript&&!v.videoPresentationAudioUrl&&s.jsxs("div",{className:"mb-10",children:[s.jsxs("h2",{className:"font-heading text-xl font-semibold mb-4 flex items-center gap-2",children:[s.jsx(tR,{size:20,className:"text-primary"}),l==="en"?"Course Presentation":"Prezentarea cursului"]}),s.jsx("div",{className:"glass-card rounded-xl p-6 md:p-8",children:s.jsx("div",{className:"prose prose-sm md:prose-base dark:prose-invert max-w-none",children:s.jsx(tg,{children:v.videoPresentationScript})})})]}),_.length>0&&s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-xl font-semibold mb-4",children:"Curriculum"}),s.jsx(lo,{type:"multiple",defaultValue:O?[]:_.map(xe=>xe.id),className:"space-y-2",children:_.map((xe,We)=>{const ze=U(We),we=N.some(ve=>ve.moduleId===xe.id&&ve.passed),J=N.find(ve=>ve.moduleId===xe.id),he=V(xe.id),je=Gv(We,_.length);return s.jsxs(Os,{value:xe.id,className:it("border border-border rounded-lg px-4 bg-card/50 transition-opacity",!ze&&"opacity-50"),children:[s.jsx(Ls,{className:"text-left hover:no-underline",children:s.jsxs("div",{className:"flex items-center gap-3 w-full",children:[ze?we?s.jsx(hn,{size:14,className:"text-primary shrink-0"}):null:s.jsx(JA,{size:14,className:"text-muted-foreground shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:je}),s.jsx("span",{className:"font-heading font-medium",children:xe.title}),s.jsxs("span",{className:"text-xs text-muted-foreground ml-auto mr-4",children:[xe.lessons.length," ",l==="en"?"lessons":"lecții"]})]})}),s.jsx(Rs,{children:ze?s.jsxs(s.Fragment,{children:[s.jsx("ul",{className:"space-y-1 py-2",children:xe.lessons.map((ve,Pe)=>{const Ie=C.some(Qe=>Qe.lesson_id===ve.id&&Qe.completed),ue=L.get(ve.id),Se=(ue==null?void 0:ue.isPodcast)??ve.title.startsWith("Podcast:"),He=(ue==null?void 0:ue.displayTitle)??ve.title;return s.jsx("li",{children:s.jsxs("button",{onClick:()=>ge(We,Pe),className:"w-full flex items-center gap-3 py-2.5 px-3 rounded-lg hover:bg-primary/5 transition-colors text-left group",children:[Se?s.jsx(zv,{size:16,className:"text-accent shrink-0"}):Ie?s.jsx(hn,{size:16,className:"text-primary shrink-0"}):ve.isFreePreview||B?s.jsx(ya,{size:16,className:"text-primary shrink-0"}
2081):s.jsx(JA,{size:16,className:"text-muted-foreground/40 shrink-0"}),s.jsx("span",{className:it("text-sm flex-1 group-hover:text-primary transition-colors",Se&&"italic"),children:He}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded flex items-center gap-1",children:Se?s.jsxs(s.Fragment,{children:[s.jsx(zv,{size:10})," 🎙 Podcast"]}):s.jsxs(s.Fragment,{children:[s.jsx(Pa,{size:10})," Video"]})}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[ve.estimatedMinutes," min"]}),ve.isFreePreview&&s.jsx("span",{className:"text-[10px] font-medium text-primary bg-primary/10 px-1.5 py-0.5 rounded",children:"Preview"})]}),s.jsx(hs,{size:14,className:"text-muted-foreground/40 group-hover:text-primary transition-colors"})]})},ve.id)})}),he&&s.jsx("div",{className:"border-t border-border/50 mt-2 pt-3 pb-2",children:T?s.jsxs("div",{className:"flex items-center gap-3 py-2.5 px-3 rounded-lg bg-primary/5 text-left",children:[s.jsx(ms,{size:16,className:"text-primary shrink-0"}),s.jsxs("span",{className:"text-sm font-medium text-primary flex-1",children:["Quiz ",je," – ",S[xe.id]||0," ",l==="en"?"questions":"întrebări"]}),s.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[s.jsx(Wi,{size:12})," ",l==="en"?"Unlock after enrollment":"Disponibil după înrolare"]})]}):we?s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 text-sm text-primary",children:[s.jsx(hn,{size:16}),s.jsx("span",{className:"font-medium",children:l==="en"?"Quiz passed":"Quiz trecut"}),J&&s.jsxs("span",{className:"ml-auto text-xs text-muted-foreground flex items-center gap-1",children:[s.jsx(Wi,{size:12})," +",J.eduCoinsEarned," Edu Coins"]})]}):s.jsxs("button",{onClick:()=>g({id:xe.id,title:xe.title,index:We}),className:"w-full flex items-center gap-3 py-2.5 px-3 rounded-lg bg-primary/5 hover:bg-primary/10 transition-colors text-left group",children:[s.jsx(ms,{size:16,className:"text-primary shrink-0"}),s.jsxs("span",{className:"text-sm font-medium text-primary flex-1",children:["Quiz ",je," – ",S[xe.id]||0," ",l==="en"?"questions":"întrebări"]}),s.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[s.jsx(Wi,{size:12})," ",l==="en"?"Earn Edu Coins":"Câștigă Edu Coins"]}),s.jsx(hs,{size:14,className:"text-primary/50 group-hover:text-primary transition-colors"})]})})]}):s.jsxs("div",{className:"py-4 text-center text-sm text-muted-foreground",children:[s.jsx(JA,{size:16,className:"mx-auto mb-2 opacity-40"}),l==="en"?"Complete the previous module quiz to unlock.":"Completează quiz-ul modulului anterior pentru a debloca."]})})]},xe.id)})})]}),!O&&ne.length>0&&s.jsxs("div",{className:"mt-10",children:[s.jsx("h2",{className:"font-heading text-xl font-semibold mb-4",children:l==="en"?"Frequently Asked Questions":"Întrebări frecvente"}),s.jsx(lo,{type:"single",collapsible:!0,className:"space-y-2",children:ne.map((xe,We)=>s.jsxs(Os,{value:`faq-${We}`,className:"border border-border rounded-lg px-4 bg-card/50",children:[s.jsx(Ls,{className:"text-left hover:no-underline text-sm font-medium",children:xe.question}),s.jsx(Rs,{children:s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:xe.answer})})]},We))})]}),M&&s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(M)}}),ie&&s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(ie)}}),X&&s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(X)}})]})]})})}const st=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{ref:n,className:it("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r}));st.displayName="Card";const Ot=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{ref:n,className:it("flex flex-col space-y-1.5 p-6",e),...r}));Ot.displayName="CardHeader";const Ht=w.forwardRef(({className:e,...r},n)=>s.jsx("h3",{ref:n,className:it("text-2xl font-semibold leading-none tracking-tight",e),...r}));
2081Ht.displayName="CardTitle";const nj=w.forwardRef(({className:e,...r},n)=>s.jsx("p",{ref:n,className:it("text-sm text-muted-foreground",e),...r}));nj.displayName="CardDescription";const ot=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{ref:n,className:it("p-6 pt-0",e),...r}));ot.displayName="CardContent";const DHe=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{ref:n,className:it("flex items-center p-6 pt-0",e),...r}));DHe.displayName="CardFooter";function Bo({className:e,...r}){return s.jsx("div",{className:it("animate-pulse rounded-md bg-muted",e),...r})}function MHe({coinData:e,slug:r,symbol:n,name:i,icon:a,index:o}){const l=((e==null?void 0:e.price_change_percentage_24h)??0)>=0;return s.jsx(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:o*.05},children:s.jsx(be,{to:`/${r}`,children:s.jsx(st,{className:"glass-card hover:border-primary/30 transition-all group",children:s.jsxs(ot,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[e!=null&&e.image?s.jsx("img",{src:e.image,alt:i,className:"w-8 h-8 rounded-full"}):s.jsx("span",{className:"text-2xl",children:a}),s.jsxs("div",{children:[s.jsx("p",{className:"font-heading font-bold text-sm",children:i}),s.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:n})]})]}),e&&s.jsxs("span",{className:`text-xs font-semibold flex items-center gap-0.5 ${l?"text-green-500":"text-red-500"}`,children:[l?s.jsx(n4,{size:12}):s.jsx(Dv,{size:12}),Math.abs(e.price_change_percentage_24h).toFixed(2),"%"]})]}),e?s.jsx("p",{className:"font-heading text-xl font-bold",children:new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:2,maximumFractionDigits:e.current_price<1?6:2}).format(e.current_price)}):s.jsx(Bo,{className:"h-7 w-28"})]})})})})}function zHe(){const{data:e,isLoading:r}=E_();return Zr({title:"Crypto Hub – Prețuri Live în RON, Grafice & Convertor",description:"Prețuri criptomonede live în lei (RON). Bitcoin, Ethereum, Solana și top 10 crypto cu grafice, convertor și analize zilnice."}),s.jsx(Ft,{children:s.jsxs("section",{className:"container py-10",children:[s.jsxs(Le.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(oa,{size:22,className:"text-primary"}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold tracking-tight",children:"Crypto Hub"})]}),s.jsx("p",{className:"text-muted-foreground text-lg mb-8",children:"Prețuri live în RON, grafice, convertor și analize pentru cele mai importante criptomonede."})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4 mb-10",children:fs.map((n,i)=>s.jsx(MHe,{coinData:e==null?void 0:e.find(a=>a.id===n.id),slug:n.slug,symbol:n.symbol,name:n.name,icon:n.icon,index:i},n.id))}),s.jsx("div",{className:"mb-10",children:s.jsx(rj,{})}),s.jsx("div",{className:"text-center",children:s.jsxs(be,{to:"/convertor-crypto-ron",className:"inline-flex items-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-lg font-heading font-semibold text-sm hover:brightness-110 transition-all shadow-md",children:[s.jsx(Gh,{size:16}),"Convertor Crypto ↔ RON"]})})]})})}const UHe=O0("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),at=w.forwardRef(({className:e,variant:r,...n},i)=>s.jsx("div",{ref:i,className:it(UHe({variant:r}),e),...n}));at.displayName="Badge";function $He({coinId:e,coinSymbol:r,coinName:n}){const{data:i,isLoading:a}=Whe(e),[o,l]=w.useState("1"),[c,u]=w.useState(""),[d,h]=w.useState("crypto-to-ron");w.useEffect(()=>{if(i)if(d==="crypto-to-ron"){const m=parseFloat(o)||0;u((m*i).toFixed(2))}else{const m=parseFloat(c)||0;l((m/i).toFixed(8))}},[i,o,c,d]);const f=m=>{if(l(m),h("crypto-to-ron"),i){const A=parseFloat(m)||0;u((A*i).toFixed(2))}},p=m=>{if(u(m),h("ron-to-crypto"),i){const A=parseFloat(m)||0;l((A/i).toFixed(8))}};return s.jsxs(st,{className:"glass-card",children:[s.jsx(Ot,{className:"pb-3",children:s.jsxs(Ht,{className:"text-sm flex items-center gap-2",children:[s.jsx(Gh,{size:14,className:"text-primary"}),"Convertor ",r," ↔ RON"]})}),s.jsxs(ot,{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:r}),s.jsx(qe,{type:"number",value:o,onChange:m=>f(m.target.value),placeholder:`1 ${r}`,className:"font-heading"})]}),s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"p-1.5 rounded-full bg-secondary",children:s.jsx(Gh,{size:14,className:"text-muted-foreground"})})}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"RON (Lei)"}),s.jsx(qe,{type:"number",value:c,onChange:m=>p(m.target.value),placeholder:"0.00 RON",className:"font-heading"})]}),a&&s.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Se încarcă cursul..."}),i&&s.jsxs("p",{className:"text-xs text-muted-foreground text-center",children:["1 ",r," = ",i.toLocaleStr
vendor: 5,087 bytes, line 2081
2081ing("ro-RO",{minimumFractionDigits:2})," RON"]})]})]})}var QHe=Array.isArray,hl=QHe,HHe=typeof Cm=="object"&&Cm&&Cm.Object===Object&&Cm,Ume=HHe,VHe=Ume,WHe=typeof self=="object"&&self&&self.Object===Object&&self,qHe=VHe||WHe||Function("return this")(),Qd=qHe,KHe=Qd,GHe=KHe.Symbol,I_=GHe,wG=I_,$me=Object.prototype,XHe=$me.hasOwnProperty,YHe=$me.toString,A1=wG?wG.toStringTag:void 0;function JHe(e){var r=XHe.call(e,A1),n=e[A1];try{e[A1]=void 0;var i=!0}catch{}var a=YHe.call(e);return i&&(r?e[A1]=n:delete e[A1]),a}var ZHe=JHe,e9e=Object.prototype,t9e=e9e.toString;function r9e(e){return t9e.call(e)}var n9e=r9e,jG=I_,i9e=ZHe,a9e=n9e,s9e="[object Null]",o9e="[object Undefined]",_G=jG?jG.toStringTag:void 0;function l9e(e){return e==null?e===void 0?o9e:s9e:_G&&_G in Object(e)?i9e(e):a9e(e)}var gf=l9e;function c9e(e){return e!=null&&typeof e=="object"}var xf=c9e,u9e=gf,d9e=xf,h9e="[object Symbol]";function f9e(e){return typeof e=="symbol"||d9e(e)&&u9e(e)==h9e}var rb=f9e,m9e=hl,p9e=rb,A9e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,g9e=/^\w*$/;function x9e(e,r){if(m9e(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||p9e(e)?!0:g9e.test(e)||!A9e.test(e)||r!=null&&e in Object(r)}var O$=x9e;function y9e(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var Sp=y9e;const nb=bn(Sp);var v9e=gf,b9e=Sp,w9e="[object AsyncFunction]",j9e="[object Function]",_9e="[object GeneratorFunction]",C9e="[object Proxy]";function N9e(e){if(!b9e(e))return!1;var r=v9e(e);return r==j9e||r==_9e||r==w9e||r==C9e}var L$=N9e;const Hr=bn(L$);var S9e=Qd,k9e=S9e["__core-js_shared__"],E9e=k9e,KI=E9e,CG=function(){var e=/[^.]+$/.exec(KI&&KI.keys&&KI.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function B9e(e){return!!CG&&CG in e}var T9e=B9e,P9e=Function.prototype,I9e=P9e.toString;function F9e(e){if(e!=null){try{return I9e.call(e)}catch{}try{return e+""}catch{}}return""}var Qme=F9e,O9e=L$,L9e=T9e,R9e=Sp,D9e=Qme,M9e=/[\\^$.*+?()[\]{}|]/g,z9e=/^\[object .+?Constructor\]$/,U9e=Function.prototype,$9e=Object.prototype,Q9e=U9e.toString,H9e=$9e.hasOwnProperty,V9e=RegExp("^"+Q9e.call(H9e).replace(M9e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function W9e(e){if(!R9e(e)||L9e(e))return!1;var r=O9e(e)?V9e:z9e;return r.test(D9e(e))}var q9e=W9e;function K9e(e,r){return e==null?void 0:e[r]}var G9e=K9e,X9e=q9e,Y9e=G9e;function J9e(e,r){var n=Y9e(e,r);return X9e(n)?n:void 0}var Vg=J9e,Z9e=Vg,eVe=Z9e(Object,"create"),Z4=eVe,NG=Z4;function tVe(){this.__data__=NG?NG(null):{},this.size=0}var rVe=tVe;function nVe(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var iVe=nVe,aVe=Z4,sVe="__lodash_hash_undefined__",oVe=Object.prototype,lVe=oVe.hasOwnProperty;function cVe(e){var r=this.__data__;if(aVe){var n=r[e];return n===sVe?void 0:n}return lVe.call(r,e)?r[e]:void 0}var uVe=cVe,dVe=Z4,hVe=Object.prototype,fVe=hVe.hasOwnProperty;function mVe(e){var r=this.__data__;return dVe?r[e]!==void 0:fVe.call(r,e)}var pVe=mVe,AVe=Z4,gVe="__lodash_hash_undefined__";function xVe(e,r){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=AVe&&r===void 0?gVe:r,this}var yVe=xVe,vVe=rVe,bVe=iVe,wVe=uVe,jVe=pVe,_Ve=yVe;function ib(e){var r=-1,n=e==null?0:e.length;for(this.clear();++r<n;){var i=e[r];this.set(i[0],i[1])}}ib.prototype.clear=vVe;ib.prototype.delete=bVe;ib.prototype.get=wVe;ib.prototype.has=jVe;ib.prototype.set=_Ve;var CVe=ib;function NVe(){this.__data__=[],this.size=0}var SVe=NVe;function kVe(e,r){return e===r||e!==e&&r!==r}var R$=kVe,EVe=R$;function BVe(e,r){for(var n=e.length;n--;)if(EVe(e[n][0],r))return n;return-1}var eT=BVe,TVe=eT,PVe=Array.prototype,IVe=PVe.splice;function FVe(e){var r=this.__data__,n=TVe(r,e);if(n<0)return!1;var i=r.length-1;return n==i?r.pop():IVe.call(r,n,1),--this.size,!0}var OVe=FVe,LVe=eT;function RVe(e){var r=this.__data__,n=LVe(r,e);return n<0?void 0:r[n][1]}var DVe=RVe,MVe=eT;function zVe(e){return MVe(this.__data__,e)>-1}var UVe=zVe,$Ve=eT;function QVe(e,r){var n=this.__data__,i=$Ve(n,e);return i<0?(++this.size,n.push([e,r])):n[i][1]=r,this}var HVe=QVe,VVe=SVe,WVe=OVe,qVe=DVe,KVe=UVe,GVe=HVe;function ab(e){var r=-1,n=e==null?0:e.length;for(this.clear();++r<n;){var i=e[r];this.set(i[0],i[1])}}ab.prototype.clear=VVe;ab.prototype.delete=WVe;ab.prototype.get=qVe;ab.prototype.has=KVe;ab.prototype.set=GVe;var tT=ab,XVe=Vg,YVe=Qd,JVe=XVe(YVe,"Map"),D$=JVe,SG=CVe,ZVe=tT,eWe=D$;function tWe(){this.size=0,this.__data__={hash:new SG,map:new(eWe||ZVe),string:new SG}}var rWe=tWe;function nWe(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var iWe=nWe,aWe=iWe;function sWe(e,r){var n=e.__data__;return aWe(r)?n[typeof r=="string"?"string":"hash"]:n.map}var rT=sWe,oWe=rT;function lWe(e){var r=oWe(this,e).delete(e);return this.size-=r?1:0,r}var cWe=lWe,uWe=rT;function dWe(e){return uWe(this,e).get(e)}var hWe=dWe,fWe=rT;function mWe(e){return fWe(this,e).has(e)}var pWe=mWe,AWe=rT;function gWe(e,r){var n=AWe(this,e),i=n.size;return n.set(e,r),this.size+=n.size==i?0:1,this}
2081var xWe=gWe,yWe=rWe,vWe=cWe,bWe=hWe,wWe=pWe,jWe=xWe;function sb(e){var r=-1,n=e==null?0:e.length;for(this.clear();++r<n;){var i=e[r];this.set(i[0],i[1])}}sb.prototype.clear=yWe;sb.prototype.delete=vWe;sb.prototype.get=bWe;sb.prototype.has=wWe;sb.prototype.set=jWe;var M$=sb,Hme=M$,_We="Expected a function";function z$(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(_We);var n=function(){var i=arguments,a=r?r.apply(this,i):i[0],o=n.cache;if(o.has(a))return o.get(a);var l=e.apply(this,i);return n.cache=o.set(a,l)||o,l};return n.cache=new(z$.Cache||Hme),n}z$.Cache=Hme;var Vme=z$;const CWe=bn(Vme);var NWe=Vme,SWe=500;function kWe(e){var r=NWe(e,function(i){return n.size===SWe&&n.clear(),i}),n=r.cache;return r}var EWe=kWe,BWe=EWe,TWe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PWe=/\\(\\)?/g,IWe=BWe(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(TWe,function(n,i,a,o){r.push(a?o.replace(PWe,"$1"):i||n)}),r}),FWe=IWe;function OWe(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++n<i;)a[n]=r(e[n],n,e);return a}var U$=OWe,kG=I_,LWe=U$,RWe=hl,DWe=rb,MWe=1/0,EG=kG?kG.prototype:void 0,BG=EG?EG.toString:void 0;function Wme(e){if(typeof e=="string")return e;if(RWe(e))return LWe(e,Wme)+"";if(DWe(e))return BG?BG.call(e):"";var r=e+"";return r=="0"&&1/e==-MWe?"-0":r}var zWe=Wme,UWe=zWe;function $We(e){return e==null?"":UWe(e)}var qme=$We,QWe=hl,HWe=O$,VWe=FWe,WWe=qme;function qWe(e,r){return QWe(e)?e:HWe(e,r)?[e]:VWe(WWe(e))}var Kme=qWe,KWe=rb,GWe=1/0;function XWe(e){if(typeof e=="string"||KWe(e))return e;var r=e+"";return r=="0"&&1/e==-GWe?"-0":r}var nT=XWe,YWe=Kme,JWe=nT;function ZWe(e,r){r=YWe(r,e);for(var n=0,i=r.length;e!=null&&n<i;)e=e[JWe(r[n++])];return n&&n==i?e:void 0}var $$=ZWe,eqe=$$;function tqe(e,r,n){var i=e==null?void 0:eqe(e,r);return i===void 0?n:i}var Gme=tqe;const Fc=bn(Gme);function rqe(e){return e==null}var nqe=rqe;const on=bn(nqe);var iqe=gf,aqe=hl,sqe=xf,oqe="[object String]";function lqe(e){return typeof e=="string"||!aqe(e)&&sqe(e)&&iqe(e)==oqe}var cqe=lqe;const wg=bn(cqe);var Xme={exports:{}},Wn={};/**
2082 * @license React
2083 * react-is.production.min.js
2084 *
2085 * Copyright (c) Facebook, Inc. and its affiliates.
2086 *
2087 * This source code is licensed under the MIT license found in the
2088 * LICENSE file in the root directory of this source tree.
2089 */var Q$=Symbol.for("react.element"),H$=Symbol.for("react.portal"),iT=Symbol.for("react.fragment"),aT=Symbol.for("react.strict_mode"),sT=Symbol.for("react.profiler"),oT=Symbol.for("react.provider"),lT=Symbol.for("react.context"),uqe=Symbol.for("react.server_context"),cT=Symbol.for("react.forward_ref"),uT=Symbol.for("react.suspense"),dT=Symbol.for("react.suspense_list"),hT=Symbol.for("react.memo"),fT=Symbol.for("react.lazy"),dqe=Symbol.for("react.offscreen"),Yme;Yme=Symbol.for("react.module.reference");function $c(e){if(typeof e=="object"&&e!==null){var r=e.$$typeof;switch(r){case Q$:switch(e=e.type,e){case iT:case sT:case aT:case uT:case dT:return e;default:switch(e=e&&e.$$typeof,e){case uqe:case lT:case cT:case fT:case hT:case oT:return e;default:return r}}case H$:return r}}}Wn.ContextConsumer=lT;Wn.ContextProvider=oT;Wn.Element=Q$;Wn.ForwardRef=cT;Wn.Fragment=iT;Wn.Lazy=fT;Wn.Memo=hT;Wn.Portal=H$;Wn.Profiler=sT;Wn.StrictMode=aT;Wn.Suspense=uT;Wn.SuspenseList=dT;Wn.isAsyncMode=function(){return!1};Wn.isConcurrentMode=function(){return!1};Wn.isContextConsumer=function(e){return $c(e)===lT};Wn.isContextProvider=function(e){return $c(e)===oT};Wn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Q$};Wn.isForwardRef=function(e){return $c(e)===cT};Wn.isFragment=function(e){return $c(e)===iT};Wn.isLazy=function(e){return $c(e)===fT};Wn.isMemo=function(e){return $c(e)===hT};Wn.isPortal=function(e){return $c(e)===H$};Wn.isProfiler=function(e){return $c(e)===sT};Wn.isStrictMode=function(e){return $c(e)===aT};Wn.isSuspense=function(e){return $c(e)===uT};Wn.isSuspenseList=function(e){return $c(e)===dT};Wn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===iT||e===sT||e===aT||e===uT||e===dT||e===dqe||typeof e=="object"&&e!==null&&(e.$$typeof===fT||e.$$typeof===hT||e.$$typeof===oT||e.$$typeof===lT||e.$$typeof===cT||e.$$typeof===Yme||e.getModuleId!==void 0)};Wn.typeOf=$c;Xme.exports=Wn;var hqe=Xme.exports,fqe=gf,mqe=xf,pqe="[object Number]";function Aqe(e){return typeof e=="number"||mqe(e)&&fqe(e)==pqe}var Jme=Aqe;const gqe=bn(Jme);var xqe=Jme;function yqe(e){return xqe(e)&&e!=+e}var vqe=yqe;const ob=bn(vqe);var wu=function(r){return r===0?0:r>0?1:-1},EA=function(r){return wg(r)&&r.indexOf("%")===r.length-1},vt=function(r){return gqe(r)&&!ob(r)},bqe=function(r){return on(r)},Ya=function(r){return vt(r)||wg(r)},wqe=0,F_=function(r){var n=++wqe;return"".concat(r||"").concat(n)},jg=function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!vt(r)&&!wg(r))return i;var o;if(EA(r)){var l=r.indexOf("%");o=n*parseFloat(r.slice(0,l))/100}else o=+r;
vendor: 5,294 bytes, line 2089
2089return ob(o)&&(o=i),a&&o>n&&(o=n),o},hm=function(r){if(!r)return null;var n=Object.keys(r);return n&&n.length?r[n[0]]:null},jqe=function(r){if(!Array.isArray(r))return!1;for(var n=r.length,i={},a=0;a<n;a++)if(!i[r[a]])i[r[a]]=!0;else return!0;return!1},xc=function(r,n){return vt(r)&&vt(n)?function(i){return r+i*(n-r)}:function(){return n}};function QE(e,r,n){return!e||!e.length?null:e.find(function(i){return i&&(typeof r=="function"?r(i):Fc(i,r))===n})}var _qe=function(r,n){return vt(r)&&vt(n)?r-n:wg(r)&&wg(n)?r.localeCompare(n):r instanceof Date&&n instanceof Date?r.getTime()-n.getTime():String(r).localeCompare(String(n))};function rv(e,r){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(r,n)||e[n]!==r[n]))return!1;for(var i in r)if({}.hasOwnProperty.call(r,i)&&!{}.hasOwnProperty.call(e,i))return!1;return!0}function _D(e){"@babel/helpers - typeof";return _D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_D(e)}var Cqe=["viewBox","children"],Nqe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],TG=["points","pathLength"],GI={svg:Cqe,polygon:TG,polyline:TG},V$=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
2089ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],HE=function(r,n){if(!r||typeof r=="function"||typeof r=="boolean")return null;var i=r;if(w.isValidElement(r)&&(i=r.props),!nb(i))return null;var a={};
vendor: 5,071 bytes, line 2089
2089return Object.keys(i).forEach(function(o){V$.includes(o)&&(a[o]=n||function(l){return i[o](i,l)})}),a},Sqe=function(r,n,i){return function(a){return r(n,i,a),null}},VE=function(r,n,i){if(!nb(r)||_D(r)!=="object")return null;var a=null;return Object.keys(r).forEach(function(o){var l=r[o];V$.includes(o)&&typeof l=="function"&&(a||(a={}),a[o]=Sqe(l,n,i))}),a},kqe=["children"],Eqe=["children"];function PG(e,r){if(e==null)return{};var n=Bqe(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Bqe(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function CD(e){"@babel/helpers - typeof";return CD=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},CD(e)}var IG={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Lh=function(r){return typeof r=="string"?r:r?r.displayName||r.name||"Component":""},FG=null,XI=null,W$=function e(r){if(r===FG&&Array.isArray(XI))return XI;var n=[];return w.Children.forEach(r,function(i){on(i)||(hqe.isFragment(i)?n=n.concat(e(i.props.children)):n.push(i))}),XI=n,FG=r,n};function Su(e,r){var n=[],i=[];return Array.isArray(r)?i=r.map(function(a){return Lh(a)}):i=[Lh(r)],W$(e).forEach(function(a){var o=Fc(a,"type.displayName")||Fc(a,"type.name");i.indexOf(o)!==-1&&n.push(a)}),n}function Pl(e,r){var n=Su(e,r);return n&&n[0]}var OG=function(r){if(!r||!r.props)return!1;var n=r.props,i=n.width,a=n.height;return!(!vt(i)||i<=0||!vt(a)||a<=0)},Tqe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Pqe=function(r){return r&&r.type&&wg(r.type)&&Tqe.indexOf(r.type)>=0},Iqe=function(r){return r&&CD(r)==="object"&&"clipDot"in r},Fqe=function(r,n,i,a){var o,l=(o=GI==null?void 0:GI[a])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!Hr(r)&&(a&&l.includes(n)||Nqe.includes(n))||i&&V$.includes(n)},tn=function(r,n,i){if(!r||typeof r=="function"||typeof r=="boolean")return null;var a=r;if(w.isValidElement(r)&&(a=r.props),!nb(a))return null;var o={};return Object.keys(a).forEach(function(l){var c;Fqe((c=a)===null||c===void 0?void 0:c[l],l,n,i)&&(o[l]=a[l])}),o},ND=function e(r,n){if(r===n)return!0;var i=w.Children.count(r);if(i!==w.Children.count(n))return!1;if(i===0)return!0;if(i===1)return LG(Array.isArray(r)?r[0]:r,Array.isArray(n)?n[0]:n);for(var a=0;a<i;a++){var o=r[a],l=n[a];if(Array.isArray(o)||Array.isArray(l)){if(!e(o,l))return!1}else if(!LG(o,l))return!1}return!0},LG=function(r,n){if(on(r)&&on(n))return!0;if(!on(r)&&!on(n)){var i=r.props||{},a=i.children,o=PG(i,kqe),l=n.props||{},c=l.children,u=PG(l,Eqe);return a&&c?rv(o,u)&&ND(a,c):!a&&!c?rv(o,u):!1}return!1},RG=function(r,n){var i=[],a={};return W$(r).forEach(function(o,l){if(Pqe(o))i.push(o);else if(o){var c=Lh(o.type),u=n[c]||{},d=u.handler,h=u.once;if(d&&(!h||!a[c])){var f=d(o,c,l);i.push(f),a[c]=!0}}}),i},Oqe=function(r){var n=r&&r.type;return n&&IG[n]?IG[n]:null},Lqe=function(r,n){return W$(n).indexOf(r)},Rqe=["children","width","height","viewBox","className","style","title","desc"];function SD(){return SD=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},SD.apply(this,arguments)}function Dqe(e,r){if(e==null)return{};var n=Mqe(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Mqe(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}
2089function kD(e){var r=e.children,n=e.width,i=e.height,a=e.viewBox,o=e.className,l=e.style,c=e.title,u=e.desc,d=Dqe(e,Rqe),h=a||{width:n,height:i,x:0,y:0},f=fn("recharts-surface",o);return ee.createElement("svg",SD({},tn(d,!0,"svg"),{className:f,width:n,height:i,style:l,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),ee.createElement("title",null,c),ee.createElement("desc",null,u),r)}var zqe=["children","className"];function ED(){return ED=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ED.apply(this,arguments)}function Uqe(e,r){if(e==null)return{};var n=$qe(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function $qe(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}var Hi=ee.forwardRef(function(e,r){var n=e.children,i=e.className,a=Uqe(e,zqe),o=fn("recharts-layer",i);return ee.createElement("g",ED({className:o},tn(a,!0),{ref:r}),n)}),Rh=function(r,n){for(var i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o]};function Qqe(e,r,n){var i=-1,a=e.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=e[i+r];return o}var Hqe=Qqe,Vqe=Hqe;function Wqe(e,r,n){var i=e.length;return n=n===void 0?i:n,!r&&n>=i?e:Vqe(e,r,n)}var qqe=Wqe,Kqe="\\ud800-\\udfff",Gqe="\\u0300-\\u036f",Xqe="\\ufe20-\\ufe2f",Yqe="\\u20d0-\\u20ff",Jqe=Gqe+Xqe+Yqe,Zqe="\\ufe0e\\ufe0f",eKe="\\u200d",tKe=RegExp("["+eKe+Kqe+Jqe+Zqe+"]");function rKe(e){return tKe.test(e)}var Zme=rKe;function nKe(e){return e.split("")}var iKe=nKe,epe="\\ud800-\\udfff",aKe="\\u0300-\\u036f",sKe="\\ufe20-\\ufe2f",oKe="\\u20d0-\\u20ff",lKe=aKe+sKe+oKe,cKe="\\ufe0e\\ufe0f",uKe="["+epe+"]",BD="["+lKe+"]",TD="\\ud83c[\\udffb-\\udfff]",dKe="(?:"+BD+"|"+TD+")",tpe="[^"+epe+"]",rpe="(?:\\ud83c[\\udde6-\\uddff]){2}",npe="[\\ud800-\\udbff][\\udc00-\\udfff]",hKe="\\u200d",ipe=dKe+"?",ape="["+cKe+"]?",fKe="(?:"+hKe+"(?:"+[tpe,rpe,npe].join("|")+")"+ape+ipe+")*",mKe=ape+ipe+fKe,pKe="(?:"+[tpe+BD+"?",BD,rpe,npe,uKe].join("|")+")",AKe=RegExp(TD+"(?="+TD+")|"+pKe+mKe,"g");function gKe(e){return e.match(AKe)||[]}var xKe=gKe,yKe=iKe,vKe=Zme,bKe=xKe;function wKe(e){return vKe(e)?bKe(e):yKe(e)}var jKe=wKe,_Ke=qqe,CKe=Zme,NKe=jKe,SKe=qme;function kKe(e){return function(r){r=SKe(r);var n=CKe(r)?NKe(r):void 0,i=n?n[0]:r.charAt(0),a=n?_Ke(n,1).join(""):r.slice(1);return i[e]()+a}}var EKe=kKe,BKe=EKe,TKe=BKe("toUpperCase"),PKe=TKe;const mT=bn(PKe);function ui(e){return function(){return e}}const spe=Math.cos,WE=Math.sin,Ru=Math.sqrt,qE=Math.PI,pT=2*qE,PD=Math.PI,ID=2*PD,hA=1e-6,IKe=ID-hA;function ope(e){this._+=e[0];for(let r=1,n=e.length;r<n;++r)this._+=arguments[r]+e[r]}function FKe(e){let r=Math.floor(e);if(!(r>=0))throw new Error(`invalid digits: ${e}`);if(r>15)return ope;const n=10**r;return function(i){this._+=i[0];for(let a=1,o=i.length;a<o;++a)this._+=Math.round(arguments[a]*n)/n+i[a]}}class OKe{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?ope:FKe(r)}moveTo(r,n){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(r,n){this._append`L${this._x1=+r},${this._y1=+n}`}quadraticCurveTo(r,n,i,a){this._append`Q${+r},${+n},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(r,n,i,a,o,l){this._append`C${+r},${+n},${+i},${+a},${this._x1=+o},${this._y1=+l}`}arcTo(r,n,i,a,o){if(r=+r,n=+n,i=+i,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,c=this._y1,u=i-r,d=a-n,h=l-r,f=c-n,p=h*h+f*f;if(this._x1===null)this._append`M${this._x1=r},${this._y1=n}`;else if(p>hA)if(!(Math.abs(f*u-d*h)>hA)||!o)this._append`L${this._x1=r},${this._y1=n}`;else{let m=i-l,A=a-c,g=u*u+d*d,y=m*m+A*A,x=Math.sqrt(g),b=Math.sqrt(p),v=o*Math.tan((PD-Math.acos((g+p-y)/(2*x*b)))/2),j=v/b,_=v/x;Math.abs(j-1)>hA&&this._append`L${r+j*h},${n+j*f}`,this._append`A${o},${o},0,0,${+(f*m>h*A)},${this._x1=r+_*u},${this._y1=n+_*d}`}}arc(r,n,i,a,o,l){if(r=+r,n=+n,i=+i,l=!!l,i<0)throw new Error(`negative radius: ${i}`);let c=i*Math.cos(a),u=i*Math.sin(a),d=r+c,h=n+u,f=1^l,p=l?a-o:o-a;this._x1===null?this._append`M${d},${h}`:(Math.abs(this._x1-d)>hA||Math.abs(this._y1-h)>hA)&&this._append`L${d},${h}`,i&&(p<0&&(p=p%ID+ID),p>IKe?this._append`A${i},${i},0,1,${f},${r-c},${n-u}A${i},${i},0,1,${f},${this._x1=d},${this._y1=h}`:p>hA&&this._append`A${i},${i},0,${+(p>=PD)},${f},${this._x1=r+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(r,n,i,a){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+n}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function q$(e){let r=3;return e.digits=function(n){if(!arguments.length)return r;if(n==null)r=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);r=i}return e},()=>new OKe(r)}function K$(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lpe(e){this._context=e}lpe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;default:this._context.lineTo(e,r);break}}};function AT(e){return new lpe(e)}function cpe(e){return e[0]}function upe(e){return e[1]}function dpe(e,r){var n=ui(!0),i=null,a=AT,o=null,l=q$(c);e=typeof e=="function"?e:e===void 0?cpe:ui(e),r=typeof r=="function"?r:r===void 0?upe:ui(r);function c(u){var d,h=(u=K$(u)).length,f,p=!1,m;
vendor: 8,613 bytes, line 2089
2089for(i==null&&(o=a(m=l())),d=0;d<=h;++d)!(d<h&&n(f=u[d],d,u))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+e(f,d,u),+r(f,d,u));if(m)return o=null,m+""||null}return c.x=function(u){return arguments.length?(e=typeof u=="function"?u:ui(+u),c):e},c.y=function(u){return arguments.length?(r=typeof u=="function"?u:ui(+u),c):r},c.defined=function(u){return arguments.length?(n=typeof u=="function"?u:ui(!!u),c):n},c.curve=function(u){return arguments.length?(a=u,i!=null&&(o=a(i)),c):a},c.context=function(u){return arguments.length?(u==null?i=o=null:o=a(i=u),c):i},c}function BN(e,r,n){var i=null,a=ui(!0),o=null,l=AT,c=null,u=q$(d);e=typeof e=="function"?e:e===void 0?cpe:ui(+e),r=typeof r=="function"?r:ui(r===void 0?0:+r),n=typeof n=="function"?n:n===void 0?upe:ui(+n);function d(f){var p,m,A,g=(f=K$(f)).length,y,x=!1,b,v=new Array(g),j=new Array(g);for(o==null&&(c=l(b=u())),p=0;p<=g;++p){if(!(p<g&&a(y=f[p],p,f))===x)if(x=!x)m=p,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),A=p-1;A>=m;--A)c.point(v[A],j[A]);c.lineEnd(),c.areaEnd()}x&&(v[p]=+e(y,p,f),j[p]=+r(y,p,f),c.point(i?+i(y,p,f):v[p],n?+n(y,p,f):j[p]))}if(b)return c=null,b+""||null}function h(){return dpe().defined(a).curve(l).context(o)}return d.x=function(f){return arguments.length?(e=typeof f=="function"?f:ui(+f),i=null,d):e},d.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ui(+f),d):e},d.x1=function(f){return arguments.length?(i=f==null?null:typeof f=="function"?f:ui(+f),d):i},d.y=function(f){return arguments.length?(r=typeof f=="function"?f:ui(+f),n=null,d):r},d.y0=function(f){return arguments.length?(r=typeof f=="function"?f:ui(+f),d):r},d.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ui(+f),d):n},d.lineX0=d.lineY0=function(){return h().x(e).y(r)},d.lineY1=function(){return h().x(e).y(n)},d.lineX1=function(){return h().x(i).y(r)},d.defined=function(f){return arguments.length?(a=typeof f=="function"?f:ui(!!f),d):a},d.curve=function(f){return arguments.length?(l=f,o!=null&&(c=l(o)),d):l},d.context=function(f){return arguments.length?(f==null?o=c=null:c=l(o=f),d):o},d}class hpe{constructor(r,n){this._context=r,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(r,n){switch(r=+r,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,n,r,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,r,this._y0,r,n);break}}this._x0=r,this._y0=n}}function LKe(e){return new hpe(e,!0)}function RKe(e){return new hpe(e,!1)}const G$={draw(e,r){const n=Ru(r/qE);e.moveTo(n,0),e.arc(0,0,n,0,pT)}},DKe={draw(e,r){const n=Ru(r/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},fpe=Ru(1/3),MKe=fpe*2,zKe={draw(e,r){const n=Ru(r/MKe),i=n*fpe;e.moveTo(0,-n),e.lineTo(i,0),e.lineTo(0,n),e.lineTo(-i,0),e.closePath()}},UKe={draw(e,r){const n=Ru(r),i=-n/2;e.rect(i,i,n,n)}},$Ke=.8908130915292852,mpe=WE(qE/10)/WE(7*qE/10),QKe=WE(pT/10)*mpe,HKe=-spe(pT/10)*mpe,VKe={draw(e,r){const n=Ru(r*$Ke),i=QKe*n,a=HKe*n;e.moveTo(0,-n),e.lineTo(i,a);for(let o=1;o<5;++o){const l=pT*o/5,c=spe(l),u=WE(l);e.lineTo(u*n,-c*n),e.lineTo(c*i-u*a,u*i+c*a)}e.closePath()}},YI=Ru(3),WKe={draw(e,r){const n=-Ru(r/(YI*3));e.moveTo(0,n*2),e.lineTo(-YI*n,-n),e.lineTo(YI*n,-n),e.closePath()}},ac=-.5,sc=Ru(3)/2,FD=1/Ru(12),qKe=(FD/2+1)*3,KKe={draw(e,r){const n=Ru(r/qKe),i=n/2,a=n*FD,o=i,l=n*FD+n,c=-o,u=l;e.moveTo(i,a),e.lineTo(o,l),e.lineTo(c,u),e.lineTo(ac*i-sc*a,sc*i+ac*a),e.lineTo(ac*o-sc*l,sc*o+ac*l),e.lineTo(ac*c-sc*u,sc*c+ac*u),e.lineTo(ac*i+sc*a,ac*a-sc*i),e.lineTo(ac*o+sc*l,ac*l-sc*o),e.lineTo(ac*c+sc*u,ac*u-sc*c),e.closePath()}};function GKe(e,r){let n=null,i=q$(a);e=typeof e=="function"?e:ui(e||G$),r=typeof r=="function"?r:ui(r===void 0?64:+r);function a(){let o;if(n||(n=o=i()),e.apply(this,arguments).draw(n,+r.apply(this,arguments)),o)return n=null,o+""||null}return a.type=function(o){return arguments.length?(e=typeof o=="function"?o:ui(o),a):e},a.size=function(o){return arguments.length?(r=typeof o=="function"?o:ui(+o),a):r},a.context=function(o){return arguments.length?(n=o??null,a):n},a}function KE(){}function GE(e,r,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+r)/6,(e._y0+4*e._y1+n)/6)}function ppe(e){this._context=e}ppe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:GE(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:GE(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function XKe(e){return new ppe(e)}function Ape(e){this._context=e}Ape.prototype={areaStart:KE,areaEnd:KE,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._x2=e,this._y2=r;break;case 1:this._point=2,this._x3=e,this._y3=r;break;case 2:this._point=3,this._x4=e,this._y4=r,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+r)/6);break;default:GE(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function YKe(e){return new Ape(e)}function gpe(e){this._context=e}gpe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+r)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:GE(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function JKe(e){return new gpe(e)}function xpe(e){this._context=e}xpe.prototype={areaStart:KE,areaEnd:KE,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,r){e=+e,r=+r,this._point?this._context.lineTo(e,r):(this._point=1,this._context.moveTo(e,r))}};function ZKe(e){return new xpe(e)}function DG(e){return e<0?-1:1}function MG(e,r,n){var i=e._x1-e._x0,a=r-e._x1,o=(e._y1-e._y0)/(i||a<0&&-0),l=(n-e._y1)/(a||i<0&&-0),c=(o*a+l*i)/(i+a);return(DG(o)+DG(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function zG(e,r){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-r)/2:r}function JI(e,r,n){var i=e._x0,a=e._y0,o=e._x1,l=e._y1,c=(o-i)/3;e._context.bezierCurveTo(i+c,a+c*r,o-c,l-c*n,o,l)}function XE(e){this._context=e}XE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:JI(this,this._t0,zG(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){var n=NaN;if(e=+e,r=+r,!(e===this._x1&&r===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;break;case 2:this._point=3,JI(this,zG(this,n=MG(this,e,r)),n);break;
2089default:JI(this,this._t0,n=MG(this,e,r));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r,this._t0=n}}};function ype(e){this._context=new vpe(e)}(ype.prototype=Object.create(XE.prototype)).point=function(e,r){XE.prototype.point.call(this,r,e)};function vpe(e){this._context=e}vpe.prototype={moveTo:function(e,r){this._context.moveTo(r,e)},closePath:function(){this._context.closePath()},lineTo:function(e,r){this._context.lineTo(r,e)},bezierCurveTo:function(e,r,n,i,a,o){this._context.bezierCurveTo(r,e,i,n,o,a)}};function eGe(e){return new XE(e)}function tGe(e){return new ype(e)}function bpe(e){this._context=e}bpe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,r=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],r[0]):this._context.moveTo(e[0],r[0]),n===2)this._context.lineTo(e[1],r[1]);else for(var i=UG(e),a=UG(r),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(i[0][o],a[0][o],i[1][o],a[1][o],e[l],r[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,r){this._x.push(+e),this._y.push(+r)}};function UG(e){var r,n=e.length-1,i,a=new Array(n),o=new Array(n),l=new Array(n);for(a[0]=0,o[0]=2,l[0]=e[0]+2*e[1],r=1;r<n-1;++r)a[r]=1,o[r]=4,l[r]=4*e[r]+2*e[r+1];for(a[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],r=1;r<n;++r)i=a[r]/o[r-1],o[r]-=i,l[r]-=i*l[r-1];for(a[n-1]=l[n-1]/o[n-1],r=n-2;r>=0;--r)a[r]=(l[r]-a[r+1])/o[r];for(o[n-1]=(e[n]+a[n-1])/2,r=0;r<n-1;++r)o[r]=2*e[r+1]-a[r+1];return[a,o]}function rGe(e){return new bpe(e)}function gT(e,r){this._context=e,this._t=r}gT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,r),this._context.lineTo(e,r);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,r)}break}}this._x=e,this._y=r}};function nGe(e){return new gT(e,.5)}function iGe(e){return new gT(e,0)}function aGe(e){return new gT(e,1)}function Xv(e,r){if((l=e.length)>1)for(var n=1,i,a,o=e[r[0]],l,c=o.length;n<l;++n)for(a=o,o=e[r[n]],i=0;i<c;++i)o[i][1]+=o[i][0]=isNaN(a[i][1])?a[i][0]:a[i][1]}function OD(e){for(var r=e.length,n=new Array(r);--r>=0;)n[r]=r;return n}function sGe(e,r){return e[r]}function oGe(e){const r=[];return r.key=e,r}function lGe(){var e=ui([]),r=OD,n=Xv,i=sGe;function a(o){var l=Array.from(e.apply(this,arguments),oGe),c,u=l.length,d=-1,h;for(const f of o)for(c=0,++d;c<u;++c)(l[c][d]=[0,+i(f,l[c].key,d,o)]).data=f;for(c=0,h=K$(r(l));c<u;++c)l[h[c]].index=c;return n(l,h),l}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ui(Array.from(o)),a):e},a.value=function(o){return arguments.length?(i=typeof o=="function"?o:ui(+o),a):i},a.order=function(o){return arguments.length?(r=o==null?OD:typeof o=="function"?o:ui(Array.from(o)),a):r},a.offset=function(o){return arguments.length?(n=o??Xv,a):n},a}function cGe(e,r){if((i=e.length)>0){for(var n,i,a=0,o=e[0].length,l;a<o;++a){for(l=n=0;n<i;++n)l+=e[n][a][1]||0;if(l)for(n=0;n<i;++n)e[n][a][1]/=l}Xv(e,r)}}function uGe(e,r){if((a=e.length)>0){for(var n=0,i=e[r[0]],a,o=i.length;n<o;++n){for(var l=0,c=0;l<a;++l)c+=e[l][n][1]||0;i[n][1]+=i[n][0]=-c/2}Xv(e,r)}}function dGe(e,r){if(!(!((l=e.length)>0)||!((o=(a=e[r[0]]).length)>0))){for(var n=0,i=1,a,o,l;i<o;++i){for(var c=0,u=0,d=0;c<l;++c){for(var h=e[r[c]],f=h[i][1]||0,p=h[i-1][1]||0,m=(f-p)/2,A=0;A<c;++A){var g=e[r[A]],y=g[i][1]||0,x=g[i-1][1]||0;m+=y-x}u+=f,d+=m*f}a[i-1][1]+=a[i-1][0]=n,u&&(n-=d/u)}a[i-1][1]+=a[i-1][0]=n,Xv(e,r)}}function ij(e){"@babel/helpers - typeof";return ij=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ij(e)}var hGe=["type","size","sizeType"];function LD(){return LD=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},LD.apply(this,arguments)}function $G(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function QG(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};
vendor: 5,268 bytes, line 2089
2089r%2?$G(Object(n),!0).forEach(function(i){fGe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$G(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function fGe(e,r,n){return r=mGe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function mGe(e){var r=pGe(e,"string");return ij(r)=="symbol"?r:r+""}function pGe(e,r){if(ij(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(ij(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function AGe(e,r){if(e==null)return{};var n=gGe(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function gGe(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}var wpe={symbolCircle:G$,symbolCross:DKe,symbolDiamond:zKe,symbolSquare:UKe,symbolStar:VKe,symbolTriangle:WKe,symbolWye:KKe},xGe=Math.PI/180,yGe=function(r){var n="symbol".concat(mT(r));return wpe[n]||G$},vGe=function(r,n,i){if(n==="area")return r;switch(i){case"cross":return 5*r*r/9;case"diamond":return .5*r*r/Math.sqrt(3);case"square":return r*r;case"star":{var a=18*xGe;return 1.25*r*r*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*r*r/4;case"wye":return(21-10*Math.sqrt(3))*r*r/8;default:return Math.PI*r*r/4}},bGe=function(r,n){wpe["symbol".concat(mT(r))]=n},X$=function(r){var n=r.type,i=n===void 0?"circle":n,a=r.size,o=a===void 0?64:a,l=r.sizeType,c=l===void 0?"area":l,u=AGe(r,hGe),d=QG(QG({},u),{},{type:i,size:o,sizeType:c}),h=function(){var y=yGe(i),x=GKe().type(y).size(vGe(o,c,i));return x()},f=d.className,p=d.cx,m=d.cy,A=tn(d,!0);return p===+p&&m===+m&&o===+o?ee.createElement("path",LD({},A,{className:fn("recharts-symbols",f),transform:"translate(".concat(p,", ").concat(m,")"),d:h()})):null};X$.registerSymbol=bGe;function Yv(e){"@babel/helpers - typeof";return Yv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Yv(e)}function RD(){return RD=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},RD.apply(this,arguments)}function HG(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function wGe(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?HG(Object(n),!0).forEach(function(i){aj(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HG(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function jGe(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _Ge(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_pe(i.key),i)}}function CGe(e,r,n){return r&&_Ge(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function NGe(e,r,n){return r=YE(r),SGe(e,jpe()?Reflect.construct(r,n||[],YE(e).constructor):r.apply(e,n))}function SGe(e,r){if(r&&(Yv(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kGe(e)}function kGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jpe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jpe=function(){return!!e})()}function YE(e){return YE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},YE(e)}function EGe(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&DD(e,r)}function DD(e,r){return DD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},DD(e,r)}function aj(e,r,n){return r=_pe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function _pe(e){var r=BGe(e,"string");return Yv(r)=="symbol"?r:r+""}function BGe(e,r){if(Yv(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Yv(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var oc=32,Y$=function(e){function r(){return jGe(this,r),NGe(this,r,arguments)}
2089return EGe(r,e),CGe(r,[{key:"renderIcon",value:function(i){var a=this.props.inactiveColor,o=oc/2,l=oc/6,c=oc/3,u=i.inactive?a:i.color;if(i.type==="plainline")return ee.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:i.payload.strokeDasharray,x1:0,y1:o,x2:oc,y2:o,className:"recharts-legend-icon"});if(i.type==="line")return ee.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(o,"h").concat(c,`
2090            A`).concat(l,",").concat(l,",0,1,1,").concat(2*c,",").concat(o,`
2091            H`).concat(oc,"M").concat(2*c,",").concat(o,`
2092            A`).concat(l,",").concat(l,",0,1,1,").concat(c,",").concat(o),className:"recharts-legend-icon"});if(i.type==="rect")return ee.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(oc/8,"h").concat(oc,"v").concat(oc*3/4,"h").concat(-oc,"z"),className:"recharts-legend-icon"});if(ee.isValidElement(i.legendIcon)){var d=wGe({},i);return delete d.legendIcon,ee.cloneElement(i.legendIcon,d)}return ee.createElement(X$,{fill:u,cx:o,cy:o,size:oc,sizeType:"diameter",type:i.type})}},{key:"renderItems",value:function(){var i=this,a=this.props,o=a.payload,l=a.iconSize,c=a.layout,u=a.formatter,d=a.inactiveColor,h={x:0,y:0,width:oc,height:oc},f={display:c==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(m,A){var g=m.formatter||u,y=fn(aj(aj({"recharts-legend-item":!0},"legend-item-".concat(A),!0),"inactive",m.inactive));if(m.type==="none")return null;var x=Hr(m.value)?null:m.value;Rh(!Hr(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var b=m.inactive?d:m.color;return ee.createElement("li",RD({className:y,style:f,key:"legend-item-".concat(A)},VE(i.props,m,A)),ee.createElement(kD,{width:l,height:l,viewBox:h,style:p},i.renderIcon(m)),ee.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},g?g(x,m,A):x))})}},{key:"render",value:function(){var i=this.props,a=i.payload,o=i.layout,l=i.align;if(!a||!a.length)return null;var c={padding:0,margin:0,textAlign:o==="horizontal"?l:"left"};return ee.createElement("ul",{className:"recharts-default-legend",style:c},this.renderItems())}}])}(w.PureComponent);aj(Y$,"displayName","Legend");aj(Y$,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var TGe=tT;function PGe(){this.__data__=new TGe,this.size=0}var IGe=PGe;function FGe(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}var OGe=FGe;function LGe(e){return this.__data__.get(e)}var RGe=LGe;function DGe(e){return this.__data__.has(e)}var MGe=DGe,zGe=tT,UGe=D$,$Ge=M$,QGe=200;function HGe(e,r){var n=this.__data__;if(n instanceof zGe){var i=n.__data__;if(!UGe||i.length<QGe-1)return i.push([e,r]),this.size=++n.size,this;n=this.__data__=new $Ge(i)}return n.set(e,r),this.size=n.size,this}var VGe=HGe,WGe=tT,qGe=IGe,KGe=OGe,GGe=RGe,XGe=MGe,YGe=VGe;function lb(e){var r=this.__data__=new WGe(e);this.size=r.size}lb.prototype.clear=qGe;lb.prototype.delete=KGe;lb.prototype.get=GGe;lb.prototype.has=XGe;lb.prototype.set=YGe;var Cpe=lb,JGe="__lodash_hash_undefined__";function ZGe(e){return this.__data__.set(e,JGe),this}var eXe=ZGe;function tXe(e){return this.__data__.has(e)}var rXe=tXe,nXe=M$,iXe=eXe,aXe=rXe;function JE(e){var r=-1,n=e==null?0:e.length;for(this.__data__=new nXe;++r<n;)this.add(e[r])}JE.prototype.add=JE.prototype.push=iXe;JE.prototype.has=aXe;var Npe=JE;function sXe(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(e[n],n,e))return!0;return!1}var Spe=sXe;function oXe(e,r){return e.has(r)}var kpe=oXe,lXe=Npe,cXe=Spe,uXe=kpe,dXe=1,hXe=2;function fXe(e,r,n,i,a,o){var l=n&dXe,c=e.length,u=r.length;if(c!=u&&!(l&&u>c))return!1;var d=o.get(e),h=o.get(r);if(d&&h)return d==r&&h==e;var f=-1,p=!0,m=n&hXe?new lXe:void 0;for(o.set(e,r),o.set(r,e);++f<c;){var A=e[f],g=r[f];if(i)var y=l?i(g,A,f,r,e,o):i(A,g,f,e,r,o);if(y!==void 0){if(y)continue;p=!1;break}if(m){if(!cXe(r,function(x,b){if(!uXe(m,b)&&(A===x||a(A,x,n,i,o)))return m.push(b)})){p=!1;break}}else if(!(A===g||a(A,g,n,i,o))){p=!1;break}}return o.delete(e),o.delete(r),p}var Epe=fXe,mXe=Qd,pXe=mXe.Uint8Array,AXe=pXe;function gXe(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}var xXe=gXe;function yXe(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}var J$=yXe,VG=I_,WG=AXe,vXe=R$,bXe=Epe,wXe=xXe,jXe=J$,_Xe=1,CXe=2,NXe="[object Boolean]",SXe="[object Date]",kXe="[object Error]",EXe="[object Map]",BXe="[object Number]",TXe="[object RegExp]",PXe="[object Set]",IXe="[object String]",FXe="[object Symbol]",OXe="[object ArrayBuffer]",LXe="[object DataView]",qG=VG?VG.prototype:void 0,ZI=qG?qG.valueOf:void 0;function RXe(e,r,n,i,a,o,l){switch(n){case LXe:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case OXe:return!(e.byteLength!=r.byteLength||!o(new WG(e),new WG(r)));case NXe:case SXe:case BXe:return vXe(+e,+r);case kXe:return e.name==r.name&&e.message==r.message;case TXe:case IXe:return e==r+"";case EXe:var c=wXe;case PXe:var u=i&_Xe;if(c||(c=jXe),e.size!=r.size&&!u)return!1;var d=l.get(e);if(d)return d==r;i|=CXe,l.set(e,r);var h=bXe(c(e),c(r),i,a,o,l);return l.delete(e),h;case FXe:if(ZI)return ZI.call(e)==ZI.call(r)}return!1}var DXe=RXe;function MXe(e,r){for(var n=-1,i=r.length,a=e.length;++n<i;)e[a+n]=r[n];return e}var Bpe=MXe,zXe=Bpe,UXe=hl;function $Xe(e,r,n){var i=r(e);return UXe(e)?i:zXe(i,n(e))}var QXe=$Xe;function HXe(e,r){for(var n=-1,i=e==null?0:e.length,a=0,o=[];++n<i;){var l=e[n];r(l,n,e)&&(o[a++]=l)}return o}var VXe=HXe;function WXe(){return[]}var qXe=WXe,KXe=VXe,GXe=qXe,XXe=Object.prototype,YXe=XXe.propertyIsEnumerable,KG=Object.getOwnPropertySymbols,JXe=KG?function(e){return e==null?[]:(e=Object(e),KXe(KG(e),function(r){return YXe.call(e,r)}))}:GXe,ZXe=JXe;function eYe(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}var tYe=eYe,rYe=gf,nYe=xf,iYe="[object Arguments]";function aYe(e){return nYe(e)&&rYe(e)==iYe}var sYe=aYe,GG=sYe,oYe=xf,Tpe=Object.prototype,lYe=Tpe.hasOwnProperty,cYe=Tpe.propertyIsEnumerable,uYe=GG(function(){return arguments}())?GG:function(e){return oYe(e)&&lYe.call(e,"callee")&&!cYe.call(e,"callee")},Z$=uYe,ZE={exports:{}};function dYe(){return!1}var hYe=dYe;ZE.exports;(function(e,r){var n=Qd,i=hYe,a=r&&!r.nodeType&&r,o=a&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===a,c=l?n.Buffer:void 0,u=c?c.isBuffer:void 0,d=u||i;e.exports=d}
vendor: 4,595 bytes, line 2092
2092)(ZE,ZE.exports);var Ppe=ZE.exports,fYe=9007199254740991,mYe=/^(?:0|[1-9]\d*)$/;function pYe(e,r){var n=typeof e;return r=r??fYe,!!r&&(n=="number"||n!="symbol"&&mYe.test(e))&&e>-1&&e%1==0&&e<r}var eQ=pYe,AYe=9007199254740991;function gYe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=AYe}var tQ=gYe,xYe=gf,yYe=tQ,vYe=xf,bYe="[object Arguments]",wYe="[object Array]",jYe="[object Boolean]",_Ye="[object Date]",CYe="[object Error]",NYe="[object Function]",SYe="[object Map]",kYe="[object Number]",EYe="[object Object]",BYe="[object RegExp]",TYe="[object Set]",PYe="[object String]",IYe="[object WeakMap]",FYe="[object ArrayBuffer]",OYe="[object DataView]",LYe="[object Float32Array]",RYe="[object Float64Array]",DYe="[object Int8Array]",MYe="[object Int16Array]",zYe="[object Int32Array]",UYe="[object Uint8Array]",$Ye="[object Uint8ClampedArray]",QYe="[object Uint16Array]",HYe="[object Uint32Array]",_i={};_i[LYe]=_i[RYe]=_i[DYe]=_i[MYe]=_i[zYe]=_i[UYe]=_i[$Ye]=_i[QYe]=_i[HYe]=!0;_i[bYe]=_i[wYe]=_i[FYe]=_i[jYe]=_i[OYe]=_i[_Ye]=_i[CYe]=_i[NYe]=_i[SYe]=_i[kYe]=_i[EYe]=_i[BYe]=_i[TYe]=_i[PYe]=_i[IYe]=!1;function VYe(e){return vYe(e)&&yYe(e.length)&&!!_i[xYe(e)]}var WYe=VYe;function qYe(e){return function(r){return e(r)}}var Ipe=qYe,e5={exports:{}};e5.exports;(function(e,r){var n=Ume,i=r&&!r.nodeType&&r,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o&&n.process,c=function(){try{var u=a&&a.require&&a.require("util").types;return u||l&&l.binding&&l.binding("util")}catch{}}();e.exports=c})(e5,e5.exports);var KYe=e5.exports,GYe=WYe,XYe=Ipe,XG=KYe,YG=XG&&XG.isTypedArray,YYe=YG?XYe(YG):GYe,Fpe=YYe,JYe=tYe,ZYe=Z$,eJe=hl,tJe=Ppe,rJe=eQ,nJe=Fpe,iJe=Object.prototype,aJe=iJe.hasOwnProperty;function sJe(e,r){var n=eJe(e),i=!n&&ZYe(e),a=!n&&!i&&tJe(e),o=!n&&!i&&!a&&nJe(e),l=n||i||a||o,c=l?JYe(e.length,String):[],u=c.length;for(var d in e)(r||aJe.call(e,d))&&!(l&&(d=="length"||a&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||rJe(d,u)))&&c.push(d);return c}var oJe=sJe,lJe=Object.prototype;function cJe(e){var r=e&&e.constructor,n=typeof r=="function"&&r.prototype||lJe;return e===n}var uJe=cJe;function dJe(e,r){return function(n){return e(r(n))}}var Ope=dJe,hJe=Ope,fJe=hJe(Object.keys,Object),mJe=fJe,pJe=uJe,AJe=mJe,gJe=Object.prototype,xJe=gJe.hasOwnProperty;function yJe(e){if(!pJe(e))return AJe(e);var r=[];for(var n in Object(e))xJe.call(e,n)&&n!="constructor"&&r.push(n);return r}var vJe=yJe,bJe=L$,wJe=tQ;function jJe(e){return e!=null&&wJe(e.length)&&!bJe(e)}var O_=jJe,_Je=oJe,CJe=vJe,NJe=O_;function SJe(e){return NJe(e)?_Je(e):CJe(e)}var xT=SJe,kJe=QXe,EJe=ZXe,BJe=xT;function TJe(e){return kJe(e,BJe,EJe)}var PJe=TJe,JG=PJe,IJe=1,FJe=Object.prototype,OJe=FJe.hasOwnProperty;function LJe(e,r,n,i,a,o){var l=n&IJe,c=JG(e),u=c.length,d=JG(r),h=d.length;if(u!=h&&!l)return!1;for(var f=u;f--;){var p=c[f];if(!(l?p in r:OJe.call(r,p)))return!1}var m=o.get(e),A=o.get(r);if(m&&A)return m==r&&A==e;var g=!0;o.set(e,r),o.set(r,e);for(var y=l;++f<u;){p=c[f];var x=e[p],b=r[p];if(i)var v=l?i(b,x,p,r,e,o):i(x,b,p,e,r,o);if(!(v===void 0?x===b||a(x,b,n,i,o):v)){g=!1;break}y||(y=p=="constructor")}if(g&&!y){var j=e.constructor,_=r.constructor;j!=_&&"constructor"in e&&"constructor"in r&&!(typeof j=="function"&&j instanceof j&&typeof _=="function"&&_ instanceof _)&&(g=!1)}return o.delete(e),o.delete(r),g}var RJe=LJe,DJe=Vg,MJe=Qd,zJe=DJe(MJe,"DataView"),UJe=zJe,$Je=Vg,QJe=Qd,HJe=$Je(QJe,"Promise"),VJe=HJe,WJe=Vg,qJe=Qd,KJe=WJe(qJe,"Set"),Lpe=KJe,GJe=Vg,XJe=Qd,YJe=GJe(XJe,"WeakMap"),JJe=YJe,MD=UJe,zD=D$,UD=VJe,$D=Lpe,QD=JJe,Rpe=gf,cb=Qme,ZG="[object Map]",ZJe="[object Object]",eX="[object Promise]",tX="[object Set]",rX="[object WeakMap]",nX="[object DataView]",eZe=cb(MD),tZe=cb(zD),rZe=cb(UD),nZe=cb($D),iZe=cb(QD),fA=Rpe;(MD&&fA(new MD(new ArrayBuffer(1)))!=nX||zD&&fA(new zD)!=ZG||UD&&fA(UD.resolve())!=eX||$D&&fA(new $D)!=tX||QD&&fA(new QD)!=rX)&&(fA=function(e){var r=Rpe(e),n=r==ZJe?e.constructor:void 0,i=n?cb(n):"";if(i)switch(i){case eZe:return nX;case tZe:return ZG;case rZe:return eX;case nZe:return tX;case iZe:return rX}return r});var aZe=fA,eF=Cpe,sZe=Epe,oZe=DXe,lZe=RJe,iX=aZe,aX=hl,sX=Ppe,cZe=Fpe,uZe=1,oX="[object Arguments]",lX="[object Array]",TN="[object Object]",dZe=Object.prototype,cX=dZe.hasOwnProperty;function hZe(e,r,n,i,a,o){var l=aX(e),c=aX(r),u=l?lX:iX(e),d=c?lX:iX(r);u=u==oX?TN:u,d=d==oX?TN:d;var h=u==TN,f=d==TN,p=u==d;if(p&&sX(e)){if(!sX(r))return!1;l=!0,h=!1}if(p&&!h)return o||(o=new eF),l||cZe(e)?sZe(e,r,n,i,a,o):oZe(e,r,u,n,i,a,o);if(!(n&uZe)){var m=h&&cX.call(e,"__wrapped__"),A=f&&cX.call(r,"__wrapped__");
vendor: 4,130 bytes, line 2092
2092if(m||A){var g=m?e.value():e,y=A?r.value():r;return o||(o=new eF),a(g,y,n,i,o)}}return p?(o||(o=new eF),lZe(e,r,n,i,a,o)):!1}var fZe=hZe,mZe=fZe,uX=xf;function Dpe(e,r,n,i,a){return e===r?!0:e==null||r==null||!uX(e)&&!uX(r)?e!==e&&r!==r:mZe(e,r,n,i,Dpe,a)}var rQ=Dpe,pZe=Cpe,AZe=rQ,gZe=1,xZe=2;function yZe(e,r,n,i){var a=n.length,o=a,l=!i;if(e==null)return!o;for(e=Object(e);a--;){var c=n[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<o;){c=n[a];var u=c[0],d=e[u],h=c[1];if(l&&c[2]){if(d===void 0&&!(u in e))return!1}else{var f=new pZe;if(i)var p=i(d,h,u,e,r,f);if(!(p===void 0?AZe(h,d,gZe|xZe,i,f):p))return!1}}return!0}var vZe=yZe,bZe=Sp;function wZe(e){return e===e&&!bZe(e)}var Mpe=wZe,jZe=Mpe,_Ze=xT;function CZe(e){for(var r=_Ze(e),n=r.length;n--;){var i=r[n],a=e[i];r[n]=[i,a,jZe(a)]}return r}var NZe=CZe;function SZe(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}var zpe=SZe,kZe=vZe,EZe=NZe,BZe=zpe;function TZe(e){var r=EZe(e);return r.length==1&&r[0][2]?BZe(r[0][0],r[0][1]):function(n){return n===e||kZe(n,e,r)}}var PZe=TZe;function IZe(e,r){return e!=null&&r in Object(e)}var FZe=IZe,OZe=Kme,LZe=Z$,RZe=hl,DZe=eQ,MZe=tQ,zZe=nT;function UZe(e,r,n){r=OZe(r,e);for(var i=-1,a=r.length,o=!1;++i<a;){var l=zZe(r[i]);if(!(o=e!=null&&n(e,l)))break;e=e[l]}return o||++i!=a?o:(a=e==null?0:e.length,!!a&&MZe(a)&&DZe(l,a)&&(RZe(e)||LZe(e)))}var $Ze=UZe,QZe=FZe,HZe=$Ze;function VZe(e,r){return e!=null&&HZe(e,r,QZe)}var WZe=VZe,qZe=rQ,KZe=Gme,GZe=WZe,XZe=O$,YZe=Mpe,JZe=zpe,ZZe=nT,eet=1,tet=2;function ret(e,r){return XZe(e)&&YZe(r)?JZe(ZZe(e),r):function(n){var i=KZe(n,e);return i===void 0&&i===r?GZe(n,e):qZe(r,i,eet|tet)}}var net=ret;function iet(e){return e}var ub=iet;function aet(e){return function(r){return r==null?void 0:r[e]}}var set=aet,oet=$$;function cet(e){return function(r){return oet(r,e)}}var uet=cet,det=set,het=uet,fet=O$,met=nT;function pet(e){return fet(e)?det(met(e)):het(e)}var Aet=pet,get=PZe,xet=net,yet=ub,vet=hl,bet=Aet;function wet(e){return typeof e=="function"?e:e==null?yet:typeof e=="object"?vet(e)?xet(e[0],e[1]):get(e):bet(e)}var kp=wet;function jet(e,r,n,i){for(var a=e.length,o=n+(i?1:-1);i?o--:++o<a;)if(r(e[o],o,e))return o;return-1}var Upe=jet;function _et(e){return e!==e}var Cet=_et;function Net(e,r,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===r)return i;return-1}var ket=Net,Eet=Upe,Bet=Cet,Tet=ket;function Pet(e,r,n){return r===r?Tet(e,r,n):Eet(e,Bet,n)}var Iet=Pet,Fet=Iet;function Oet(e,r){var n=e==null?0:e.length;return!!n&&Fet(e,r,0)>-1}var Let=Oet;function Ret(e,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(r,e[i]))return!0;return!1}var Det=Ret;function Met(){}var zet=Met,tF=Lpe,Uet=zet,$et=J$,Qet=1/0,Het=tF&&1/$et(new tF([,-0]))[1]==Qet?function(e){return new tF(e)}:Uet,Vet=Het,Wet=Npe,qet=Let,Ket=Det,Get=kpe,Xet=Vet,Yet=J$,Jet=200;function Zet(e,r,n){var i=-1,a=qet,o=e.length,l=!0,c=[],u=c;if(n)l=!1,a=Ket;else if(o>=Jet){var d=r?null:Xet(e);if(d)return Yet(d);l=!1,a=Get,u=new Wet}else u=r?[]:c;e:for(;++i<o;){var h=e[i],f=r?r(h):h;if(h=n||h!==0?h:0,l&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;r&&u.push(f),c.push(h)}else a(u,f,n)||(u!==c&&u.push(f),c.push(h))}return c}var ett=Zet,ttt=kp,rtt=ett;function ntt(e,r){return e&&e.length?rtt(e,ttt(r)):[]}var itt=ntt;const dX=bn(itt);function $pe(e,r,n){return r===!0?dX(e,n):Hr(r)?dX(e,r):e}function Jv(e){"@babel/helpers - typeof";return Jv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Jv(e)}var att=["ref"];function hX(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function lh(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?hX(Object(n),!0).forEach(function(i){yT(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hX(Object(n)).forEac
vendor: 39,864 bytes, lines 2092-2100
2092h(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function stt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function fX(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Hpe(i.key),i)}}function ott(e,r,n){return r&&fX(e.prototype,r),n&&fX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ltt(e,r,n){return r=t5(r),ctt(e,Qpe()?Reflect.construct(r,n||[],t5(e).constructor):r.apply(e,n))}function ctt(e,r){if(r&&(Jv(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return utt(e)}function utt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qpe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qpe=function(){return!!e})()}function t5(e){return t5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},t5(e)}function dtt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&HD(e,r)}function HD(e,r){return HD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},HD(e,r)}function yT(e,r,n){return r=Hpe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Hpe(e){var r=htt(e,"string");return Jv(r)=="symbol"?r:r+""}function htt(e,r){if(Jv(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Jv(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ftt(e,r){if(e==null)return{};var n=mtt(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function mtt(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function ptt(e){return e.value}function Att(e,r){if(ee.isValidElement(e))return ee.cloneElement(e,r);if(typeof e=="function")return ee.createElement(e,r);r.ref;var n=ftt(r,att);return ee.createElement(Y$,n)}var mX=1,nv=function(e){function r(){var n;stt(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=ltt(this,r,[].concat(a)),yT(n,"lastBoundingBox",{width:-1,height:-1}),n}return dtt(r,e),ott(r,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var i=this.wrapperNode.getBoundingClientRect();return i.height=this.wrapperNode.offsetHeight,i.width=this.wrapperNode.offsetWidth,i}return null}},{key:"updateBBox",value:function(){var i=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>mX||Math.abs(a.height-this.lastBoundingBox.height)>mX)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,i&&i(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?lh({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var a=this.props,o=a.layout,l=a.align,c=a.verticalAlign,u=a.margin,d=a.chartWidth,h=a.chartHeight,f,p;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(l==="center"&&o==="vertical"){var m=this.getBBoxSnapshot();f={left:((d||0)-m.width)/2}}else f=l==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(c==="middle"){var A=this.getBBoxSnapshot();p={top:((h||0)-A.height)/2}}else p=c==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return lh(lh({},f),p)}},{key:"render",value:function(){var i=this,a=this.props,o=a.content,l=a.width,c=a.height,u=a.wrapperStyle,d=a.payloadUniqBy,h=a.payload,f=lh(lh({position:"absolute",width:l||"auto",height:c||"auto"},this.getDefaultPosition(u)),u);return ee.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(m){i.wrapperNode=m}},Att(o,lh(lh({},this.props),{},{payload:$pe(h,d,ptt)})))}}],[{key:"getWithHeight",value:function(i,a){var o=lh(lh({},this.defaultProps),i.props),l=o.layout;return l==="vertical"&&vt(i.props.height)?{height:i.props.height}:l==="horizontal"?{width:i.props.width||a}:null}}])}(w.PureComponent);yT(nv,"displayName","Legend");yT(nv,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var pX=I_,gtt=Z$,xtt=hl,AX=pX?pX.isConcatSpreadable:void 0;function ytt(e){return xtt(e)||gtt(e)||!!(AX&&e&&e[AX])}var vtt=ytt,btt=Bpe,wtt=vtt;function Vpe(e,r,n,i,a){var o=-1,l=e.length;for(n||(n=wtt),a||(a=[]);++o<l;){var c=e[o];r>0&&n(c)?r>1?Vpe(c,r-1,n,i,a):btt(a,c):i||(a[a.length]=c)}return a}var Wpe=Vpe;function jtt(e){return function(r,n,i){for(var a=-1,o=Object(r),l=i(r),c=l.length;c--;){var u=l[e?c:++a];if(n(o[u],u,o)===!1)break}return r}}var _tt=jtt,Ctt=_tt,Ntt=Ctt(),Stt=Ntt,ktt=Stt,Ett=xT;function Btt(e,r){return e&&ktt(e,r,Ett)}var qpe=Btt,Ttt=O_;function Ptt(e,r){return function(n,i){if(n==null)return n;if(!Ttt(n))return e(n,i);for(var a=n.length,o=r?a:-1,l=Object(n);(r?o--:++o<a)&&i(l[o],o,l)!==!1;);return n}}var Itt=Ptt,Ftt=qpe,Ott=Itt,Ltt=Ott(Ftt),nQ=Ltt,Rtt=nQ,Dtt=O_;function Mtt(e,r){var n=-1,i=Dtt(e)?Array(e.length):[];return Rtt(e,function(a,o,l){i[++n]=r(a,o,l)}),i}var Kpe=Mtt;function ztt(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}var Utt=ztt,gX=rb;function $tt(e,r){if(e!==r){var n=e!==void 0,i=e===null,a=e===e,o=gX(e),l=r!==void 0,c=r===null,u=r===r,d=gX(r);if(!c&&!d&&!o&&e>r||o&&l&&u&&!c&&!d||i&&l&&u||!n&&u||!a)return 1;if(!i&&!o&&!d&&e<r||d&&n&&a&&!i&&!o||c&&n&&a||!l&&a||!u)return-1}return 0}var Qtt=$tt,Htt=Qtt;function Vtt(e,r,n){for(var i=-1,a=e.criteria,o=r.criteria,l=a.length,c=n.length;++i<l;){var u=Htt(a[i],o[i]);if(u){if(i>=c)return u;var d=n[i];return u*(d=="desc"?-1:1)}}return e.index-r.index}var Wtt=Vtt,rF=U$,qtt=$$,Ktt=kp,Gtt=Kpe,Xtt=Utt,Ytt=Ipe,Jtt=Wtt,Ztt=ub,ert=hl;function trt(e,r,n){r.length?r=rF(r,function(o){return ert(o)?function(l){return qtt(l,o.length===1?o[0]:o)}:o}):r=[Ztt];var i=-1;r=rF(r,Ytt(Ktt));var a=Gtt(e,function(o,l,c){var u=rF(r,function(d){return d(o)});return{criteria:u,index:++i,value:o}});return Xtt(a,function(o,l){return Jtt(o,l,n)})}var rrt=trt;function nrt(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}var irt=nrt,art=irt,xX=Math.max;function srt(e,r,n){return r=xX(r===void 0?e.length-1:r,0),function(){for(var i=arguments,a=-1,o=xX(i.length-r,0),l=Array(o);++a<o;)l[a]=i[r+a];a=-1;for(var c=Array(r+1);++a<r;)c[a]=i[a];return c[r]=n(l),art(e,this,c)}}var ort=srt;function lrt(e){return function(){return e}}var crt=lrt,urt=Vg,drt=function(){try{var e=urt(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Gpe=drt,hrt=crt,yX=Gpe,frt=ub,mrt=yX?function(e,r){return yX(e,"toString",{configurable:!0,enumerable:!1,value:hrt(r),writable:!0})}:frt,prt=mrt,Art=800,grt=16,xrt=Date.now;function yrt(e){var r=0,n=0;return function(){var i=xrt(),a=grt-(i-n);if(n=i,a>0){if(++r>=Art)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}var vrt=yrt,brt=prt,wrt=vrt,jrt=wrt(brt),_rt=jrt,Crt=ub,Nrt=ort,Srt=_rt;function krt(e,r){return Srt(Nrt(e,r,Crt),e+"")}var Ert=krt,Brt=R$,Trt=O_,Prt=eQ,Irt=Sp;function Frt(e,r,n){if(!Irt(n))return!1;var i=typeof r;return(i=="number"?Trt(n)&&Prt(r,n.length):i=="string"&&r in n)?Brt(n[r],e):!1}var vT=Frt,Ort=Wpe,Lrt=rrt,Rrt=Ert,vX=vT,Drt=Rrt(function(e,r){if(e==null)return[];var n=r.length;return n>1&&vX(e,r[0],r[1])?r=[]:n>2&&vX(r[0],r[1],r[2])&&(r=[r[0]]),Lrt(e,Ort(r,1),[])}),Mrt=Drt;const iQ=bn(Mrt);function sj(e){"@babel/helpers - typeof";return sj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},sj(e)}function VD(){return VD=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},VD.apply(this,arguments)}function zrt(e,r){return Hrt(e)||Qrt(e,r)||$rt(e,r)||Urt()}function Urt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2093In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $rt(e,r){if(e){if(typeof e=="string")return bX(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bX(e,r)}}function bX(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Qrt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Hrt(e){if(Array.isArray(e))return e}function wX(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function nF(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?wX(Object(n),!0).forEach(function(i){Vrt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wX(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Vrt(e,r,n){return r=Wrt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Wrt(e){var r=qrt(e,"string");return sj(r)=="symbol"?r:r+""}function qrt(e,r){if(sj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(sj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Krt(e){return Array.isArray(e)&&Ya(e[0])&&Ya(e[1])?e.join(" ~ "):e}var Grt=function(r){var n=r.separator,i=n===void 0?" : ":n,a=r.contentStyle,o=a===void 0?{}:a,l=r.itemStyle,c=l===void 0?{}:l,u=r.labelStyle,d=u===void 0?{}:u,h=r.payload,f=r.formatter,p=r.itemSorter,m=r.wrapperClassName,A=r.labelClassName,g=r.label,y=r.labelFormatter,x=r.accessibilityLayer,b=x===void 0?!1:x,v=function(){if(h&&h.length){var T={padding:0,margin:0},F=(p?iQ(h,p):h).map(function(I,D){if(I.type==="none")return null;var L=nF({display:"block",paddingTop:4,paddingBottom:4,color:I.color||"#000"},c),V=I.formatter||f||Krt,U=I.value,Q=I.name,$=U,q=Q;if(V&&$!=null&&q!=null){var M=V(U,Q,I,D,h);if(Array.isArray(M)){var z=zrt(M,2);$=z[0],q=z[1]}else $=M}return ee.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:L},Ya(q)?ee.createElement("span",{className:"recharts-tooltip-item-name"},q):null,Ya(q)?ee.createElement("span",{className:"recharts-tooltip-item-separator"},i):null,ee.createElement("span",{className:"recharts-tooltip-item-value"},$),ee.createElement("span",{className:"recharts-tooltip-item-unit"},I.unit||""))});return ee.createElement("ul",{className:"recharts-tooltip-item-list",style:T},F)}return null},j=nF({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),_=nF({margin:0},d),C=!on(g),N=C?g:"",S=fn("recharts-default-tooltip",m),E=fn("recharts-tooltip-label",A);C&&y&&h!==void 0&&h!==null&&(N=y(g,h));var O=b?{role:"status","aria-live":"assertive"}:{};return ee.createElement("div",VD({className:S,style:j},O),ee.createElement("p",{className:E,style:_},ee.isValidElement(N)?N:"".concat(N)),v())};function oj(e){"@babel/helpers - typeof";return oj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},oj(e)}function PN(e,r,n){return r=Xrt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Xrt(e){var r=Yrt(e,"string");return oj(r)=="symbol"?r:r+""}function Yrt(e,r){if(oj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(oj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var g1="recharts-tooltip-wrapper",Jrt={visibility:"hidden"};function Zrt(e){var r=e.coordinate,n=e.translateX,i=e.translateY;return fn(g1,PN(PN(PN(PN({},"".concat(g1,"-right"),vt(n)&&r&&vt(r.x)&&n>=r.x),"".concat(g1,"-left"),vt(n)&&r&&vt(r.x)&&n<r.x),"".concat(g1,"-bottom"),vt(i)&&r&&vt(r.y)&&i>=r.y),"".concat(g1,"-top"),vt(i)&&r&&vt(r.y)&&i<r.y))}function jX(e){var r=e.allowEscapeViewBox,n=e.coordinate,i=e.key,a=e.offsetTopLeft,o=e.position,l=e.reverseDirection,c=e.tooltipDimension,u=e.viewBox,d=e.viewBoxDimension;if(o&&vt(o[i]))return o[i];var h=n[i]-c-a,f=n[i]+a;if(r[i])return l[i]?h:f;if(l[i]){var p=h,m=u[i];return p<m?Math.max(f,u[i]):Math.max(h,u[i])}var A=f+c,g=u[i]+d;return A>g?Math.max(h,u[i]):Math.max(f,u[i])}function ent(e){var r=e.translateX,n=e.translateY,i=e.useTranslate3d;return{transform:i?"translate3d(".concat(r,"px, ").concat(n,"px, 0)"):"translate(".concat(r,"px, ").concat(n,"px)")}}function tnt(e){var r=e.allowEscapeViewBox,n=e.coordinate,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipBox,c=e.useTranslate3d,u=e.viewBox,d,h,f;return l.height>0&&l.width>0&&n?(h=jX({allowEscapeViewBox:r,coordinate:n,key:"x",offsetTopLeft:i,position:a,reverseDirection:o,tooltipDimension:l.width,viewBox:u,viewBoxDimension:u.width}),f=jX({allowEscapeViewBox:r,coordinate:n,key:"y",offsetTopLeft:i,position:a,reverseDirection:o,tooltipDimension:l.height,viewBox:u,viewBoxDimension:u.height}),d=ent({translateX:h,translateY:f,useTranslate3d:c})):d=Jrt,{cssProperties:d,cssClasses:Zrt({translateX:h,translateY:f,coordinate:n})}}function Zv(e){"@babel/helpers - typeof";return Zv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Zv(e)}function _X(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function CX(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?_X(Object(n),!0).forEach(function(i){qD(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_X(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function rnt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function nnt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Ype(i.key),i)}}function int(e,r,n){return r&&nnt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ant(e,r,n){return r=r5(r),snt(e,Xpe()?Reflect.construct(r,n||[],r5(e).constructor):r.apply(e,n))}function snt(e,r){if(r&&(Zv(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ont(e)}function ont(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xpe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xpe=function(){return!!e})()}function r5(e){return r5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},r5(e)}function lnt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&WD(e,r)}function WD(e,r){return WD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},WD(e,r)}function qD(e,r,n){return r=Ype(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ype(e){var r=cnt(e,"string");return Zv(r)=="symbol"?r:r+""}function cnt(e,r){if(Zv(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Zv(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var NX=1,unt=function(e){function r(){var n;rnt(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=ant(this,r,[].concat(a)),qD(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),qD(n,"handleKeyDown",function(l){if(l.key==="Escape"){var c,u,d,h;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(c=(u=n.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&c!==void 0?c:0,y:(d=(h=n.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&d!==void 0?d:0}})}}),n}return lnt(r,e),int(r,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var i=this.wrapperNode.getBoundingClientRect();(Math.abs(i.width-this.state.lastBoundingBox.width)>NX||Math.abs(i.height-this.state.lastBoundingBox.height)>NX)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,a=this.props,o=a.active,l=a.allowEscapeViewBox,c=a.animationDuration,u=a.animationEasing,d=a.children,h=a.coordinate,f=a.hasPayload,p=a.isAnimationActive,m=a.offset,A=a.position,g=a.reverseDirection,y=a.useTranslate3d,x=a.viewBox,b=a.wrapperStyle,v=tnt({allowEscapeViewBox:l,coordinate:h,offsetTopLeft:m,position:A,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}),j=v.cssClasses,_=v.cssProperties,C=CX(CX({transition:p&&o?"transform ".concat(c,"ms ").concat(u):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return ee.createElement("div",{tabIndex:-1,className:j,style:C,ref:function(S){i.wrapperNode=S}},d)}}])}(w.PureComponent),dnt=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Dh={isSsr:dnt(),get:function(r){return Dh[r]},set:function(r,n){if(typeof r=="string")Dh[r]=n;else{var i=Object.keys(r);i&&i.length&&i.forEach(function(a){Dh[a]=r[a]})}}};function e0(e){"@babel/helpers - typeof";return e0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e0(e)}function SX(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function kX(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?SX(Object(n),!0).forEach(function(i){aQ(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SX(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function hnt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function fnt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Zpe(i.key),i)}}function mnt(e,r,n){return r&&fnt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pnt(e,r,n){return r=n5(r),Ant(e,Jpe()?Reflect.construct(r,n||[],n5(e).constructor):r.apply(e,n))}function Ant(e,r){if(r&&(e0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gnt(e)}function gnt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jpe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jpe=function(){return!!e})()}function n5(e){return n5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},n5(e)}function xnt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&KD(e,r)}function KD(e,r){return KD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},KD(e,r)}function aQ(e,r,n){return r=Zpe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Zpe(e){var r=ynt(e,"string");return e0(r)=="symbol"?r:r+""}function ynt(e,r){if(e0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(e0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function vnt(e){return e.dataKey}function bnt(e,r){return ee.isValidElement(e)?ee.cloneElement(e,r):typeof e=="function"?ee.createElement(e,r):ee.createElement(Grt,r)}var ad=function(e){function r(){return hnt(this,r),pnt(this,r,arguments)}return xnt(r,e),mnt(r,[{key:"render",value:function(){var i=this,a=this.props,o=a.active,l=a.allowEscapeViewBox,c=a.animationDuration,u=a.animationEasing,d=a.content,h=a.coordinate,f=a.filterNull,p=a.isAnimationActive,m=a.offset,A=a.payload,g=a.payloadUniqBy,y=a.position,x=a.reverseDirection,b=a.useTranslate3d,v=a.viewBox,j=a.wrapperStyle,_=A??[];f&&_.length&&(_=$pe(A.filter(function(N){return N.value!=null&&(N.hide!==!0||i.props.includeHidden)}),g,vnt));var C=_.length>0;return ee.createElement(unt,{allowEscapeViewBox:l,animationDuration:c,animationEasing:u,isAnimationActive:p,active:o,coordinate:h,hasPayload:C,offset:m,position:y,reverseDirection:x,useTranslate3d:b,viewBox:v,wrapperStyle:j},bnt(d,kX(kX({},this.props),{},{payload:_})))}}])}(w.PureComponent);aQ(ad,"displayName","Tooltip");aQ(ad,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Dh.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var wnt=Qd,jnt=function(){return wnt.Date.now()},_nt=jnt,Cnt=/\s/;function Nnt(e){for(var r=e.length;r--&&Cnt.test(e.charAt(r)););return r}var Snt=Nnt,knt=Snt,Ent=/^\s+/;function Bnt(e){return e&&e.slice(0,knt(e)+1).replace(Ent,"")}var Tnt=Bnt,Pnt=Tnt,EX=Sp,Int=rb,BX=NaN,Fnt=/^[-+]0x[0-9a-f]+$/i,Ont=/^0b[01]+$/i,Lnt=/^0o[0-7]+$/i,Rnt=parseInt;function Dnt(e){if(typeof e=="number")return e;if(Int(e))return BX;if(EX(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=EX(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=Pnt(e);var n=Ont.test(e);return n||Lnt.test(e)?Rnt(e.slice(2),n?2:8):Fnt.test(e)?BX:+e}var eAe=Dnt,Mnt=Sp,iF=_nt,TX=eAe,znt="Expected a function",Unt=Math.max,$nt=Math.min;function Qnt(e,r,n){var i,a,o,l,c,u,d=0,h=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(znt);r=TX(r)||0,Mnt(n)&&(h=!!n.leading,f="maxWait"in n,o=f?Unt(TX(n.maxWait)||0,r):o,p="trailing"in n?!!n.trailing:p);function m(C){var N=i,S=a;return i=a=void 0,d=C,l=e.apply(S,N),l}function A(C){return d=C,c=setTimeout(x,r),h?m(C):l}function g(C){var N=C-u,S=C-d,E=r-N;return f?$nt(E,o-S):E}function y(C){var N=C-u,S=C-d;return u===void 0||N>=r||N<0||f&&S>=o}function x(){var C=iF();if(y(C))return b(C);c=setTimeout(x,g(C))}function b(C){return c=void 0,p&&i?m(C):(i=a=void 0,l)}function v(){c!==void 0&&clearTimeout(c),d=0,i=u=a=c=void 0}function j(){return c===void 0?l:b(iF())}function _(){var C=iF(),N=y(C);if(i=arguments,a=this,u=C,N){if(c===void 0)return A(u);if(f)return clearTimeout(c),c=setTimeout(x,r),m(u)}return c===void 0&&(c=setTimeout(x,r)),l}return _.cancel=v,_.flush=j,_}var Hnt=Qnt,Vnt=Hnt,Wnt=Sp,qnt="Expected a function";function Knt(e,r,n){var i=!0,a=!0;if(typeof e!="function")throw new TypeError(qnt);return Wnt(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),Vnt(e,r,{leading:i,maxWait:r,trailing:a})}var Gnt=Knt;const tAe=bn(Gnt);function lj(e){"@babel/helpers - typeof";return lj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lj(e)}function PX(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function IN(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?PX(Object(n),!0).forEach(function(i){Xnt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PX(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Xnt(e,r,n){return r=Ynt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ynt(e){var r=Jnt(e,"string");return lj(r)=="symbol"?r:r+""}function Jnt(e,r){if(lj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(lj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Znt(e,r){return nit(e)||rit(e,r)||tit(e,r)||eit()}function eit(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2094In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tit(e,r){if(e){if(typeof e=="string")return IX(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IX(e,r)}}function IX(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function rit(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function nit(e){if(Array.isArray(e))return e}var iit=w.forwardRef(function(e,r){var n=e.aspect,i=e.initialDimension,a=i===void 0?{width:-1,height:-1}:i,o=e.width,l=o===void 0?"100%":o,c=e.height,u=c===void 0?"100%":c,d=e.minWidth,h=d===void 0?0:d,f=e.minHeight,p=e.maxHeight,m=e.children,A=e.debounce,g=A===void 0?0:A,y=e.id,x=e.className,b=e.onResize,v=e.style,j=v===void 0?{}:v,_=w.useRef(null),C=w.useRef();C.current=b,w.useImperativeHandle(r,function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})});var N=w.useState({containerWidth:a.width,containerHeight:a.height}),S=Znt(N,2),E=S[0],O=S[1],B=w.useCallback(function(F,I){O(function(D){var L=Math.round(F),V=Math.round(I);return D.containerWidth===L&&D.containerHeight===V?D:{containerWidth:L,containerHeight:V}})},[]);w.useEffect(function(){var F=function(Q){var $,q=Q[0].contentRect,M=q.width,z=q.height;B(M,z),($=C.current)===null||$===void 0||$.call(C,M,z)};g>0&&(F=tAe(F,g,{trailing:!0,leading:!1}));var I=new ResizeObserver(F),D=_.current.getBoundingClientRect(),L=D.width,V=D.height;return B(L,V),I.observe(_.current),function(){I.disconnect()}},[B,g]);var T=w.useMemo(function(){var F=E.containerWidth,I=E.containerHeight;if(F<0||I<0)return null;Rh(EA(l)||EA(u),`The width(%s) and height(%s) are both fixed numbers,
2095       maybe you don't need to use a ResponsiveContainer.`,l,u),Rh(!n||n>0,"The aspect(%s) must be greater than zero.",n);var D=EA(l)?F:l,L=EA(u)?I:u;n&&n>0&&(D?L=D/n:L&&(D=L*n),p&&L>p&&(L=p)),Rh(D>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0,
2096       please check the style of container, or the props width(%s) and height(%s),
2097       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
2098       height and width.`,D,L,l,u,h,f,n);var V=!Array.isArray(m)&&Lh(m.type).endsWith("Chart");return ee.Children.map(m,function(U){return ee.isValidElement(U)?w.cloneElement(U,IN({width:D,height:L},V?{style:IN({height:"100%",width:"100%",maxHeight:L,maxWidth:D},U.props.style)}:{})):U})},[n,m,u,p,f,h,E,l]);return ee.createElement("div",{id:y?"".concat(y):void 0,className:fn("recharts-responsive-container",x),style:IN(IN({},j),{},{width:l,height:u,minWidth:h,minHeight:f,maxHeight:p}),ref:_},T)}),rAe=function(r){return null};rAe.displayName="Cell";function cj(e){"@babel/helpers - typeof";return cj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},cj(e)}function FX(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function GD(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?FX(Object(n),!0).forEach(function(i){ait(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FX(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function ait(e,r,n){return r=sit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function sit(e){var r=oit(e,"string");return cj(r)=="symbol"?r:r+""}function oit(e,r){if(cj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(cj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Ox={widthCache:{},cacheCount:0},lit=2e3,cit={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},OX="recharts_measurement_span";function uit(e){var r=GD({},e);return Object.keys(r).forEach(function(n){r[n]||delete r[n]}),r}var $w=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r==null||Dh.isSsr)return{width:0,height:0};var i=uit(n),a=JSON.stringify({text:r,copyStyle:i});if(Ox.widthCache[a])return Ox.widthCache[a];try{var o=document.getElementById(OX);o||(o=document.createElement("span"),o.setAttribute("id",OX),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=GD(GD({},cit),i);Object.assign(o.style,l),o.textContent="".concat(r);var c=o.getBoundingClientRect(),u={width:c.width,height:c.height};return Ox.widthCache[a]=u,++Ox.cacheCount>lit&&(Ox.cacheCount=0,Ox.widthCache={}),u}catch{return{width:0,height:0}}},dit=function(r){return{top:r.top+window.scrollY-document.documentElement.clientTop,left:r.left+window.scrollX-document.documentElement.clientLeft}};function uj(e){"@babel/helpers - typeof";return uj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},uj(e)}function i5(e,r){return pit(e)||mit(e,r)||fit(e,r)||hit()}function hit(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2099In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fit(e,r){if(e){if(typeof e=="string")return LX(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LX(e,r)}}function LX(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function mit(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function pit(e){if(Array.isArray(e))return e}function Ait(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function RX(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,xit(i.key),i)}}function git(e,r,n){return r&&RX(e.prototype,r),n&&RX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xit(e){var r=yit(e,"string");return uj(r)=="symbol"?r:r+""}function yit(e,r){if(uj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(uj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var DX=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,MX=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,vit=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,bit=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,nAe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},wit=Object.keys(nAe),Ty="NaN";function jit(e,r){return e*nAe[r]}var FN=function(){function e(r,n){Ait(this,e),this.num=r,this.unit=n,this.num=r,this.unit=n,Number.isNaN(r)&&(this.unit=""),n!==""&&!vit.test(n)&&(this.num=NaN,this.unit=""),wit.includes(n)&&(this.num=jit(r,n),this.unit="px")}return git(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var i,a=(i=bit.exec(n))!==null&&i!==void 0?i:[],o=i5(a,3),l=o[1],c=o[2];return new e(parseFloat(l),c??"")}}])}();function iAe(e){if(e.includes(Ty))return Ty;for(var r=e;r.includes("*")||r.includes("/");){var n,i=(n=DX.exec(r))!==null&&n!==void 0?n:[],a=i5(i,4),o=a[1],l=a[2],c=a[3],u=FN.parse(o??""),d=FN.parse(c??""),h=l==="*"?u.multiply(d):u.divide(d);if(h.isNaN())return Ty;r=r.replace(DX,h.toString())}for(;r.includes("+")||/.-\d+(?:\.\d+)?/.test(r);){var f,p=(f=MX.exec(r))!==null&&f!==void 0?f:[],m=i5(p,4),A=m[1],g=m[2],y=m[3],x=FN.parse(A??""),b=FN.parse(y??""),v=g==="+"?x.add(b):x.subtract(b);if(v.isNaN())return Ty;r=r.replace(MX,v.toString())}return r}var zX=/\(([^()]*)\)/;function _it(e){for(var r=e;r.includes("(");){var n=zX.exec(r),i=i5(n,2),a=i[1];r=r.replace(zX,iAe(a))}return r}function Cit(e){var r=e.replace(/\s+/g,"");return r=_it(r),r=iAe(r),r}function Nit(e){try{return Cit(e)}catch{return Ty}}function aF(e){var r=Nit(e.slice(5,-1));return r===Ty?"":r}var Sit=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],kit=["dx","dy","angle","className","breakAll"];function XD(){return XD=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},XD.apply(this,arguments)}function UX(e,r){if(e==null)return{};var n=Eit(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Eit(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function $X(e,r){return Iit(e)||Pit(e,r)||Tit(e,r)||Bit()}function Bit(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2100In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tit(e,r){if(e){if(typeof e=="string")return QX(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QX(e,r)}}function QX(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Pit(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Iit(e){if(Array.isArray(e))return e}var aAe=/[ \f\n\r\t\v\u2028\u2029]+/,sAe=function(r){var n=r.children,i=r.breakAll,a=r.style;try{var o=[];on(n)||(i?o=n.toString().split(""):o=n.toString().split(aAe));var l=o.map(function(u){return{word:u,width:$w(u,a).width}}),c=i?0:$w(" ",a).width;
2100return{wordsWithComputedWidth:l,spaceWidth:c}}catch{return null}},Fit=function(r,n,i,a,o){var l=r.maxLines,c=r.children,u=r.style,d=r.breakAll,h=vt(l),f=c,p=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(L,V){var U=V.word,Q=V.width,$=L[L.length-1];if($&&(a==null||o||$.width+Q+i<Number(a)))$.words.push(U),$.width+=Q+i;else{var q={words:[U],width:Q};L.push(q)}return L},[])},m=p(n),A=function(D){return D.reduce(function(L,V){return L.width>V.width?L:V})};if(!h)return m;for(var g="…",y=function(D){var L=f.slice(0,D),V=sAe({breakAll:d,style:u,children:L+g}).wordsWithComputedWidth,U=p(V),Q=U.length>l||A(U).width>Number(a);return[Q,U]},x=0,b=f.length-1,v=0,j;x<=b&&v<=f.length-1;){var _=Math.floor((x+b)/2),C=_-1,N=y(C),S=$X(N,2),E=S[0],O=S[1],B=y(_),T=$X(B,1),F=T[0];if(!E&&!F&&(x=_+1),E&&F&&(b=_-1),!E&&F){j=O;break}v++}return j||m},HX=function(r){var n=on(r)?[]:r.toString().split(aAe);return[{words:n}]},Oit=function(r){var n=r.width,i=r.scaleToFit,a=r.children,o=r.style,l=r.breakAll,c=r.maxLines;if((n||i)&&!Dh.isSsr){var u,d,h=sAe({breakAll:l,children:a,style:o});if(h){var f=h.wordsWithComputedWidth,p=h.spaceWidth;u=f,d=p}else return HX(a);return Fit({breakAll:l,children:a,maxLines:c,style:o},u,d,n,i)}return HX(a)},VX="#808080",a5=function(r){var n=r.x,i=n===void 0?0:n,a=r.y,o=a===void 0?0:a,l=r.lineHeight,c=l===void 0?"1em":l,u=r.capHeight,d=u===void 0?"0.71em":u,h=r.scaleToFit,f=h===void 0?!1:h,p=r.textAnchor,m=p===void 0?"start":p,A=r.verticalAnchor,g=A===void 0?"end":A,y=r.fill,x=y===void 0?VX:y,b=UX(r,Sit),v=w.useMemo(function(){return Oit({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),j=b.dx,_=b.dy,C=b.angle,N=b.className,S=b.breakAll,E=UX(b,kit);if(!Ya(i)||!Ya(o))return null;var O=i+(vt(j)?j:0),B=o+(vt(_)?_:0),T;switch(g){case"start":T=aF("calc(".concat(d,")"));break;case"middle":T=aF("calc(".concat((v.length-1)/2," * -").concat(c," + (").concat(d," / 2))"));break;default:T=aF("calc(".concat(v.length-1," * -").concat(c,")"));break}var F=[];if(f){var I=v[0].width,D=b.width;F.push("scale(".concat((vt(D)?D/I:1)/I,")"))}return C&&F.push("rotate(".concat(C,", ").concat(O,", ").concat(B,")")),F.length&&(E.transform=F.join(" ")),ee.createElement("text",XD({},tn(E,!0),{x:O,y:B,className:fn("recharts-text",N),textAnchor:m,fill:x.includes("url")?VX:x}),v.map(function(L,V){var U=L.words.join(S?"":" ");return ee.createElement("tspan",{x:O,dy:V===0?T:c,key:"".concat(U,"-").concat(V)},U)}))};function Xm(e,r){return e==null||r==null?NaN:e<r?-1:e>r?1:e>=r?0:NaN}function Lit(e,r){return e==null||r==null?NaN:r<e?-1:r>e?1:r>=e?0:NaN}function sQ(e){let r,n,i;e.length!==2?(r=Xm,n=(c,u)=>Xm(e(c),u),i=(c,u)=>e(c)-u):(r=e===Xm||e===Lit?e:Rit,n=e,i=e);function a(c,u,d=0,h=c.length){if(d<h){if(r(u,u)!==0)return h;do{const f=d+h>>>1;n(c[f],u)<0?d=f+1:h=f}while(d<h)}return d}function o(c,u,d=0,h=c.length){if(d<h){if(r(u,u)!==0)return h;do{const f=d+h>>>1;n(c[f],u)<=0?d=f+1:h=f}while(d<h)}return d}function l(c,u,d=0,h=c.length){const f=a(c,u,d,h-1);return f>d&&i(c[f-1],u)>-i(c[f],u)?f-1:f}return{left:a,center:l,right:o}}function Rit(){return 0}function oAe(e){return e===null?NaN:+e}function*Dit(e,r){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Mit=sQ(Xm),L_=Mit.right;sQ(oAe).center;class WX extends Map{constructor(r,n=$it){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),r!=null)for(const[i,a]of r)this.set(i,a)}get(r){return super.get(qX(this,r))}has(r){return super.has(qX(this,r))}set(r,n){return super.set(zit(this,r),n)}delete(r){return super.delete(Uit(this,r))}}function qX({_intern:e,_key:r},n){const i=r(n);return e.has(i)?e.get(i):n}function zit({_intern:e,_key:r},n){const i=r(n);return e.has(i)?e.get(i):(e.set(i,n),n)}function Uit({_intern:e,_key:r},n){const i=r(n);return e.has(i)&&(n=e.get(i),e.delete(i)),n}function $it(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Qit(e=Xm){if(e===Xm)return lAe;if(typeof e!="function")throw new TypeError("compare is not a function");return(r,n)=>{const i=e(r,n);return i||i===0?i:(e(n,n)===0)-(e(r,r)===0)}}function lAe(e,r){return(e==null||!(e>=e))-(r==null||!(r>=r))||(e<r?-1:e>r?1:0)}const Hit=Math.sqrt(50),Vit=Math.sqrt(10),Wit=Math.sqrt(2);
vendor: 14,829 bytes, line 2100
2100function s5(e,r,n){const i=(r-e)/Math.max(0,n),a=Math.floor(Math.log10(i)),o=i/Math.pow(10,a),l=o>=Hit?10:o>=Vit?5:o>=Wit?2:1;let c,u,d;return a<0?(d=Math.pow(10,-a)/l,c=Math.round(e*d),u=Math.round(r*d),c/d<e&&++c,u/d>r&&--u,d=-d):(d=Math.pow(10,a)*l,c=Math.round(e/d),u=Math.round(r/d),c*d<e&&++c,u*d>r&&--u),u<c&&.5<=n&&n<2?s5(e,r,n*2):[c,u,d]}function YD(e,r,n){if(r=+r,e=+e,n=+n,!(n>0))return[];if(e===r)return[e];const i=r<e,[a,o,l]=i?s5(r,e,n):s5(e,r,n);if(!(o>=a))return[];const c=o-a+1,u=new Array(c);if(i)if(l<0)for(let d=0;d<c;++d)u[d]=(o-d)/-l;else for(let d=0;d<c;++d)u[d]=(o-d)*l;else if(l<0)for(let d=0;d<c;++d)u[d]=(a+d)/-l;else for(let d=0;d<c;++d)u[d]=(a+d)*l;return u}function JD(e,r,n){return r=+r,e=+e,n=+n,s5(e,r,n)[2]}function ZD(e,r,n){r=+r,e=+e,n=+n;const i=r<e,a=i?JD(r,e,n):JD(e,r,n);return(i?-1:1)*(a<0?1/-a:a)}function o5(e,r){let n;if(r===void 0)for(const i of e)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let a of e)(a=r(a,++i,e))!=null&&(n<a||n===void 0&&a>=a)&&(n=a)}return n}function l5(e,r){let n;if(r===void 0)for(const i of e)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let a of e)(a=r(a,++i,e))!=null&&(n>a||n===void 0&&a>=a)&&(n=a)}return n}function cAe(e,r,n=0,i=1/0,a){if(r=Math.floor(r),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=r&&r<=i))return e;for(a=a===void 0?lAe:Qit(a);i>n;){if(i-n>600){const u=i-n+1,d=r-n+1,h=Math.log(u),f=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*f*(u-f)/u)*(d-u/2<0?-1:1),m=Math.max(n,Math.floor(r-d*f/u+p)),A=Math.min(i,Math.floor(r+(u-d)*f/u+p));cAe(e,r,m,A,a)}const o=e[r];let l=n,c=i;for(x1(e,n,r),a(e[i],o)>0&&x1(e,n,i);l<c;){for(x1(e,l,c),++l,--c;a(e[l],o)<0;)++l;for(;a(e[c],o)>0;)--c}a(e[n],o)===0?x1(e,n,c):(++c,x1(e,c,i)),c<=r&&(n=c+1),r<=c&&(i=c-1)}return e}function x1(e,r,n){const i=e[r];e[r]=e[n],e[n]=i}function qit(e,r,n){if(e=Float64Array.from(Dit(e)),!(!(i=e.length)||isNaN(r=+r))){if(r<=0||i<2)return l5(e);if(r>=1)return o5(e);var i,a=(i-1)*r,o=Math.floor(a),l=o5(cAe(e,o).subarray(0,o+1)),c=l5(e.subarray(o+1));return l+(c-l)*(a-o)}}function Kit(e,r,n=oAe){if(!(!(i=e.length)||isNaN(r=+r))){if(r<=0||i<2)return+n(e[0],0,e);if(r>=1)return+n(e[i-1],i-1,e);var i,a=(i-1)*r,o=Math.floor(a),l=+n(e[o],o,e),c=+n(e[o+1],o+1,e);return l+(c-l)*(a-o)}}function Git(e,r,n){e=+e,r=+r,n=(a=arguments.length)<2?(r=e,e=0,1):a<3?1:+n;for(var i=-1,a=Math.max(0,Math.ceil((r-e)/n))|0,o=new Array(a);++i<a;)o[i]=e+i*n;return o}function Xit(e,r){let n=0;for(let i of e)(i=+i)&&(n+=i);return n}function Qc(e,r){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(r).domain(e);break}return this}function yf(e,r){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof r=="function"?this.interpolator(r):this.range(r);break}}return this}const eM=Symbol("implicit");function bT(){var e=new WX,r=[],n=[],i=eM;function a(o){let l=e.get(o);if(l===void 0){if(i!==eM)return i;e.set(o,l=r.push(o)-1)}return n[l%n.length]}return a.domain=function(o){if(!arguments.length)return r.slice();r=[],e=new WX;for(const l of o)e.has(l)||e.set(l,r.push(l)-1);return a},a.range=function(o){return arguments.length?(n=Array.from(o),a):n.slice()},a.unknown=function(o){return arguments.length?(i=o,a):i},a.copy=function(){return bT(r,n).unknown(i)},Qc.apply(a,arguments),a}function dj(){var e=bT().unknown(void 0),r=e.domain,n=e.range,i=0,a=1,o,l,c=!1,u=0,d=0,h=.5;delete e.unknown;function f(){var p=r().length,m=a<i,A=m?a:i,g=m?i:a;o=(g-A)/Math.max(1,p-u+d*2),c&&(o=Math.floor(o)),A+=(g-A-o*(p-u))*h,l=o*(1-u),c&&(A=Math.round(A),l=Math.round(l));var y=Git(p).map(function(x){return A+o*x});return n(m?y.reverse():y)}return e.domain=function(p){return arguments.length?(r(p),f()):r()},e.range=function(p){return arguments.length?([i,a]=p,i=+i,a=+a,f()):[i,a]},e.rangeRound=function(p){return[i,a]=p,i=+i,a=+a,c=!0,f()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(p){return arguments.length?(c=!!p,f()):c},e.padding=function(p){return arguments.length?(u=Math.min(1,d=+p),f()):u},e.paddingInner=function(p){return arguments.length?(u=Math.min(1,p),f()):u},e.paddingOuter=function(p){return arguments.length?(d=+p,f()):d},e.align=function(p){return arguments.length?(h=Math.max(0,Math.min(1,p)),f()):h},e.copy=function(){return dj(r(),[i,a]).round(c).paddingInner(u).paddingOuter(d).align(h)},Qc.apply(f(),arguments)}function uAe(e){var r=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return uAe(r())},e}function Qw(){return uAe(dj.apply(null,arguments).paddingInner(1))}function oQ(e,r,n){e.prototype=r.prototype=n,n.constructor=e}function dAe(e,r){var n=Object.create(e.prototype);for(var i in r)n[i]=r[i];return n}function R_(){}var hj=.7,c5=1/hj,iv="\\s*([+-]?\\d+)\\s*",fj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ed="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yit=/^#([0-9a-f]{3,8})$/,Jit=new RegExp(`^rgb\\(${iv},${iv},${iv}\\)$`),Zit=new RegExp(`^rgb\\(${Ed},${Ed},${Ed}\\)$`),eat=new RegExp(`^rgba\\(${iv},${iv},${iv},${fj}\\)$`),tat=new RegExp(`^rgba\\(${Ed},${Ed},${Ed},${fj}\\)$`),rat=new RegExp(`^hsl\\(${fj},${Ed},${Ed}\\)$`),nat=new RegExp(`^hsla\\(${fj},${Ed},${Ed},${fj}\\)$`),KX={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};oQ(R_,_g,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:GX,formatHex:GX,formatHex8:iat,formatHsl:aat,formatRgb:XX,toString:XX});function GX(){return this.rgb().formatHex()}function iat(){return this.rgb().formatHex8()}function aat(){return hAe(this).formatHsl()}function XX(){return this.rgb().formatRgb()}function _g(e){var r,n;return e=(e+"").trim().toLowerCase(),(r=Yit.exec(e))?(n=r[1].length,r=parseInt(r[1],16),n===6?YX(r):n===3?new Yo(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):n===8?ON(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):n===4?ON(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=Jit.exec(e))?new Yo(r[1],r[2],r[3],1):(r=Zit.exec(e))?new Yo(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=eat.exec(e))?ON(r[1],r[2],r[3],r[4]):(r=tat.exec(e))?ON(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=rat.exec(e))?eY(r[1],r[2]/100,r[3]/100,1):(r=nat.exec(e))?eY(r[1],r[2]/100,r[3]/100,r[4]):KX.hasOwnProperty(e)?YX(KX[e]):e==="transparent"?new Yo(NaN,NaN,NaN,0):null}function YX(e){return new Yo(e>>16&255,e>>8&255,e&255,1)}function ON(e,r,n,i){return i<=0&&(e=r=n=NaN),new Yo(e,r,n,i)}function sat(e){return e instanceof R_||(e=_g(e)),e?(e=e.rgb(),new Yo(e.r,e.g,e.b,e.opacity)):new Yo}function tM(e,r,n,i){return arguments.length===1?sat(e):new Yo(e,r,n,i??1)}function Yo(e,r,n,i){this.r=+e,this.g=+r,this.b=+n,this.opacity=+i}oQ(Yo,tM,dAe(R_,{brighter(e){return e=e==null?c5:Math.pow(c5,e),new Yo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hj:Math.pow(hj,e),new Yo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yo(rg(this.r),rg(this.g),rg(this.b),u5(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JX,formatHex:JX,formatHex8:oat,formatRgb:ZX,toString:ZX}));function JX(){return`#${BA(this.r)}${BA(this.g)}${BA(this.b)}`}function oat(){return`#${BA(this.r)}${BA(this.g)}${BA(this.b)}${BA((isNaN(this.opacity)?1:this.opacity)*255)}`}function ZX(){const e=u5(this.opacity);return`${e===1?"rgb(":"rgba("}${rg(this.r)}, ${rg(this.g)}, ${rg(this.b)}${e===1?")":`, ${e})`}`}function u5(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function rg(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function BA(e){return e=rg(e),(e<16?"0":"")+e.toString(16)}function eY(e,r,n,i){return i<=0?e=r=n=NaN:n<=0||n>=1?e=r=NaN:r<=0&&(e=NaN),new gu(e,r,n,i)}function hAe(e){if(e instanceof gu)return new gu(e.h,e.s,e.l,e.opacity);if(e instanceof R_||(e=_g(e)),!e)return new gu;if(e instanceof gu)return e;e=e.rgb();var r=e.r/255,n=e.g/255,i=e.b/255,a=Math.min(r,n,i),o=Math.max(r,n,i),l=NaN,c=o-a,u=(o+a)/2;return c?(r===o?l=(n-i)/c+(n<i)*6:n===o?l=(i-r)/c+2:l=(r-n)/c+4,c/=u<.5?o+a:2-o-a,l*=60):c=u>0&&u<1?0:l,new gu(l,c,u,e.opacity)}function lat(e,r,n,i){return arguments.length===1?hAe(e):new gu(e,r,n,i??1)}function gu(e,r,n,i){this.h=+e,this.s=+r,this.l=+n,this.opacity=+i}oQ(gu,lat,dAe(R_,{brighter(e){return e=e==null?c5:Math.pow(c5,e),new gu(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hj:Math.pow(hj,e),new gu(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*r,a=2*n-i;return new Yo(sF(e>=240?e-240:e+120,a,i),sF(e,a,i),sF(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new gu(tY(this.h),LN(this.s),LN(this.l),u5(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=u5(this.opacity);return`${e===1?"hsl(":"hsla("}${tY(this.h)}, ${LN(this.s)*100}%, ${LN(this.l)*100}%${e===1?")":`, ${e})`}`}}));function tY(e){return e=(e||0)%360,e<0?e+360:e}function LN(e){return Math.max(0,Math.min(1,e||0))}function sF(e,r,n){return(e<60?r+(n-r)*e/60:e<180?n:e<240?r+(n-r)*(240-e)/60:r)*255}const lQ=e=>()=>e;function cat(e,r){return function(n){return e+n*r}}function uat(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(i){return Math.pow(e+i*r,n)}}function dat(e){return(e=+e)==1?fAe:function(r,n){return n-r?uat(r,n,e):lQ(isNaN(r)?n:r)}}function fAe(e,r){var n=r-e;return n?cat(e,n):lQ(isNaN(e)?r:e)}const d5=function e(r){var n=dat(r);function i(a,o){var l=n((a=tM(a)).r,(o=tM(o)).r),c=n(a.g,o.g),u=n(a.b,o.b),d=fAe(a.opacity,o.opacity);return function(h){return a.r=l(h),a.g=c(h),a.b=u(h),a.opacity=d(h),a+""}}return i.gamma=e,i}(1);function hat(e,r){r||(r=[]);var n=e?Math.min(r.length,e.length):0,i=r.slice(),a;return function(o){for(a=0;a<n;++a)i[a]=e[a]*(1-o)+r[a]*o;return i}}function fat(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mat(e,r){var n=r?r.length:0,i=e?Math.min(n,e.length):0,a=new Array(i),o=new Array(n),l;for(l=0;l<i;++l)a[l]=db(e[l],r[l]);for(;l<n;++l)o[l]=r[l];return function(c){for(l=0;l<i;++l)o[l]=a[l](c);return o}}function pat(e,r){var n=new Date;return e=+e,r=+r,function(i){return n.setTime(e*(1-i)+r*i),n}}function Au(e,r){return e=+e,r=+r,function(n){return e*(1-n)+r*n}}function Aat(e,r){var n={},i={},a;(e===null||typeof e!="object")&&(e={}),(r===null||typeof r!="object")&&(r={});for(a in r)a in e?n[a]=db(e[a],r[a]):i[a]=r[a];return function(o){for(a in n)i[a]=n[a](o);return i}}var rM=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oF=new RegExp(rM.source,"g");function gat(e){return function(){return e}}function xat(e){return function(r){return e(r)+""}}function mAe(e,r){var n=rM.lastIndex=oF.lastIndex=0,i,a,o,l=-1,c=[],u=[];for(e=e+"",r=r+"";(i=rM.exec(e))&&(a=oF.exec(r));)(o=a.index)>n&&(o=r.slice(n,o),c[l]?c[l]+=o:c[++l]=o),(i=i[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,u.push({i:l,x:Au(i,a)})),n=oF.lastIndex;return n<r.length&&(o=r.slice(n),c[l]?c[l]+=o:c[++l]=o),c.length<2?u[0]?xat(u[0].x):gat(r):(r=u.length,function(d){for(var h=0,f;h<r;++h)c[(f=u[h]).i]=f.x(d);return c.join("")})}function db(e,r){var n=typeof r,i;return r==null||n==="boolean"?lQ(r):(n==="number"?Au:n==="string"?(i=_g(r))?(r=i,d5):mAe:r instanceof _g?d5:r instanceof Date?pat:fat(r)?hat:Array.isArray(r)?mat:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Aat:Au)(e,r)}function cQ(e,r){return e=+e,r=+r,function(n){return Math.round(e*(1-n)+r*n)}}var rY=180/Math.PI,nM={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pAe(e,r,n,i,a,o){var l,c,u;return(l=Math.sqrt(e*e+r*r))&&(e/=l,r/=l),(u=e*n+r*i)&&(n-=e*u,i-=r*u),(c=Math.sqrt(n*n+i*i))&&(n/=c,i/=c,u/=c),e*i<r*n&&(e=-e,r=-r,u=-u,l=-l),{translateX:a,translateY:o,rotate:Math.atan2(r,e)*rY,skewX:Math.atan(u)*rY,scaleX:l,scaleY:c}}var RN;function yat(e){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return r.isIdentity?nM:pAe(r.a,r.b,r.c,r.d,r.e,r.f)}
vendor: 4,014 bytes, line 2100
2100function vat(e){return e==null||(RN||(RN=document.createElementNS("http://www.w3.org/2000/svg","g")),RN.setAttribute("transform",e),!(e=RN.transform.baseVal.consolidate()))?nM:(e=e.matrix,pAe(e.a,e.b,e.c,e.d,e.e,e.f))}function AAe(e,r,n,i){function a(d){return d.length?d.pop()+" ":""}function o(d,h,f,p,m,A){if(d!==f||h!==p){var g=m.push("translate(",null,r,null,n);A.push({i:g-4,x:Au(d,f)},{i:g-2,x:Au(h,p)})}else(f||p)&&m.push("translate("+f+r+p+n)}function l(d,h,f,p){d!==h?(d-h>180?h+=360:h-d>180&&(d+=360),p.push({i:f.push(a(f)+"rotate(",null,i)-2,x:Au(d,h)})):h&&f.push(a(f)+"rotate("+h+i)}function c(d,h,f,p){d!==h?p.push({i:f.push(a(f)+"skewX(",null,i)-2,x:Au(d,h)}):h&&f.push(a(f)+"skewX("+h+i)}function u(d,h,f,p,m,A){if(d!==f||h!==p){var g=m.push(a(m)+"scale(",null,",",null,")");A.push({i:g-4,x:Au(d,f)},{i:g-2,x:Au(h,p)})}else(f!==1||p!==1)&&m.push(a(m)+"scale("+f+","+p+")")}return function(d,h){var f=[],p=[];return d=e(d),h=e(h),o(d.translateX,d.translateY,h.translateX,h.translateY,f,p),l(d.rotate,h.rotate,f,p),c(d.skewX,h.skewX,f,p),u(d.scaleX,d.scaleY,h.scaleX,h.scaleY,f,p),d=h=null,function(m){for(var A=-1,g=p.length,y;++A<g;)f[(y=p[A]).i]=y.x(m);return f.join("")}}}var bat=AAe(yat,"px, ","px)","deg)"),wat=AAe(vat,", ",")",")"),jat=1e-12;function nY(e){return((e=Math.exp(e))+1/e)/2}function _at(e){return((e=Math.exp(e))-1/e)/2}function Cat(e){return((e=Math.exp(2*e))-1)/(e+1)}const Nat=function e(r,n,i){function a(o,l){var c=o[0],u=o[1],d=o[2],h=l[0],f=l[1],p=l[2],m=h-c,A=f-u,g=m*m+A*A,y,x;if(g<jat)x=Math.log(p/d)/r,y=function(N){return[c+N*m,u+N*A,d*Math.exp(r*N*x)]};else{var b=Math.sqrt(g),v=(p*p-d*d+i*g)/(2*d*n*b),j=(p*p-d*d-i*g)/(2*p*n*b),_=Math.log(Math.sqrt(v*v+1)-v),C=Math.log(Math.sqrt(j*j+1)-j);x=(C-_)/r,y=function(N){var S=N*x,E=nY(_),O=d/(n*b)*(E*Cat(r*S+_)-_at(_));return[c+O*m,u+O*A,d*E/nY(r*S+_)]}}return y.duration=x*1e3*r/Math.SQRT2,y}return a.rho=function(o){var l=Math.max(.001,+o),c=l*l,u=c*c;return e(l,c,u)},a}(Math.SQRT2,2,4);function Sat(e,r){r===void 0&&(r=e,e=db);for(var n=0,i=r.length-1,a=r[0],o=new Array(i<0?0:i);n<i;)o[n]=e(a,a=r[++n]);return function(l){var c=Math.max(0,Math.min(i-1,Math.floor(l*=i)));return o[c](l-c)}}function kat(e){return function(){return e}}function h5(e){return+e}var iY=[0,1];function No(e){return e}function iM(e,r){return(r-=e=+e)?function(n){return(n-e)/r}:kat(isNaN(r)?NaN:.5)}function Eat(e,r){var n;return e>r&&(n=e,e=r,r=n),function(i){return Math.max(e,Math.min(r,i))}}function Bat(e,r,n){var i=e[0],a=e[1],o=r[0],l=r[1];return a<i?(i=iM(a,i),o=n(l,o)):(i=iM(i,a),o=n(o,l)),function(c){return o(i(c))}}function Tat(e,r,n){var i=Math.min(e.length,r.length)-1,a=new Array(i),o=new Array(i),l=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),r=r.slice().reverse());++l<i;)a[l]=iM(e[l],e[l+1]),o[l]=n(r[l],r[l+1]);return function(c){var u=L_(e,c,1,i)-1;return o[u](a[u](c))}}function D_(e,r){return r.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wT(){var e=iY,r=iY,n=db,i,a,o,l=No,c,u,d;function h(){var p=Math.min(e.length,r.length);return l!==No&&(l=Eat(e[0],e[p-1])),c=p>2?Tat:Bat,u=d=null,f}function f(p){return p==null||isNaN(p=+p)?o:(u||(u=c(e.map(i),r,n)))(i(l(p)))}return f.invert=function(p){return l(a((d||(d=c(r,e.map(i),Au)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,h5),h()):e.slice()},f.range=function(p){return arguments.length?(r=Array.from(p),h()):r.slice()},f.rangeRound=function(p){return r=Array.from(p),n=cQ,h()},f.clamp=function(p){return arguments.length?(l=p?!0:No,h()):l!==No},f.interpolate=function(p){return arguments.length?(n=p,h()):n},f.unknown=function(p){return arguments.length?(o=p,f):o},function(p,m){return i=p,a=m,h()}}function uQ(){return wT()(No,No)}function Pat(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function f5(e,r){if((n=(e=r?e.toExponential(r-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>
vendor: 4,269 bytes, line 2100
21001?i[0]+i.slice(2):i,+e.slice(n+1)]}function t0(e){return e=f5(Math.abs(e)),e?e[1]:NaN}function Iat(e,r){return function(n,i){for(var a=n.length,o=[],l=0,c=e[0],u=0;a>0&&c>0&&(u+c+1>i&&(c=Math.max(1,i-u)),o.push(n.substring(a-=c,a+c)),!((u+=c+1)>i));)c=e[l=(l+1)%e.length];return o.reverse().join(r)}}function Fat(e){return function(r){return r.replace(/[0-9]/g,function(n){return e[+n]})}}var Oat=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mj(e){if(!(r=Oat.exec(e)))throw new Error("invalid format: "+e);var r;return new dQ({fill:r[1],align:r[2],sign:r[3],symbol:r[4],zero:r[5],width:r[6],comma:r[7],precision:r[8]&&r[8].slice(1),trim:r[9],type:r[10]})}mj.prototype=dQ.prototype;function dQ(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}dQ.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Lat(e){e:for(var r=e.length,n=1,i=-1,a;n<r;++n)switch(e[n]){case".":i=a=n;break;case"0":i===0&&(i=n),a=n;break;default:if(!+e[n])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(a+1):e}var gAe;function Rat(e,r){var n=f5(e,r);if(!n)return e+"";var i=n[0],a=n[1],o=a-(gAe=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,l=i.length;return o===l?i:o>l?i+new Array(o-l+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+f5(e,Math.max(0,r+o-1))[0]}function aY(e,r){var n=f5(e,r);if(!n)return e+"";var i=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}const sY={"%":(e,r)=>(e*100).toFixed(r),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Pat,e:(e,r)=>e.toExponential(r),f:(e,r)=>e.toFixed(r),g:(e,r)=>e.toPrecision(r),o:e=>Math.round(e).toString(8),p:(e,r)=>aY(e*100,r),r:aY,s:Rat,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function oY(e){return e}var lY=Array.prototype.map,cY=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Dat(e){var r=e.grouping===void 0||e.thousands===void 0?oY:Iat(lY.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?oY:Fat(lY.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function d(f){f=mj(f);var p=f.fill,m=f.align,A=f.sign,g=f.symbol,y=f.zero,x=f.width,b=f.comma,v=f.precision,j=f.trim,_=f.type;_==="n"?(b=!0,_="g"):sY[_]||(v===void 0&&(v=12),j=!0,_="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var C=g==="$"?n:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",N=g==="$"?i:/[%p]/.test(_)?l:"",S=sY[_],E=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function O(B){var T=C,F=N,I,D,L;if(_==="c")F=S(B)+F,B="";else{B=+B;var V=B<0||1/B<0;if(B=isNaN(B)?u:S(Math.abs(B),v),j&&(B=Lat(B)),V&&+B==0&&A!=="+"&&(V=!1),T=(V?A==="("?A:c:A==="-"||A==="("?"":A)+T,F=(_==="s"?cY[8+gAe/3]:"")+F+(V&&A==="("?")":""),E){for(I=-1,D=B.length;++I<D;)if(L=B.charCodeAt(I),48>L||L>57){F=(L===46?a+B.slice(I+1):B.slice(I))+F,B=B.slice(0,I);break}}}b&&!y&&(B=r(B,1/0));var U=T.length+B.length+F.length,Q=U<x?new Array(x-U+1).join(p):"";switch(b&&y&&(B=r(Q+B,Q.length?x-F.length:1/0),Q=""),m){case"<":B=T+B+F+Q;break;case"=":B=T+Q+B+F;break;case"^":B=Q.slice(0,U=Q.length>>1)+T+B+F+Q.slice(U);break;default:B=Q+T+B+F;break}return o(B)}return O.toString=function(){return f+""},O}function h(f,p){var m=d((f=mj(f),f.type="f",f)),A=Math.max(-8,Math.min(8,Math.floor(t0(p)/3)))*3,g=Math.pow(10,-A),y=cY[8+A/3];return function(x){return m(g*x)+y}}return{format:d,formatPrefix:h}}var DN,hQ,xAe;Mat({thousands:",",grouping:[3],currency:["$",""]});
vendor: 2,342 bytes, line 2100
2100function Mat(e){return DN=Dat(e),hQ=DN.format,xAe=DN.formatPrefix,DN}function zat(e){return Math.max(0,-t0(Math.abs(e)))}function Uat(e,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(t0(r)/3)))*3-t0(Math.abs(e)))}function $at(e,r){return e=Math.abs(e),r=Math.abs(r)-e,Math.max(0,t0(r)-t0(e))+1}function yAe(e,r,n,i){var a=ZD(e,r,n),o;switch(i=mj(i??",f"),i.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(r));return i.precision==null&&!isNaN(o=Uat(a,l))&&(i.precision=o),xAe(i,l)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=$at(a,Math.max(Math.abs(e),Math.abs(r))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=zat(a))&&(i.precision=o-(i.type==="%")*2);break}}return hQ(i)}function Ep(e){var r=e.domain;return e.ticks=function(n){var i=r();return YD(i[0],i[i.length-1],n??10)},e.tickFormat=function(n,i){var a=r();return yAe(a[0],a[a.length-1],n??10,i)},e.nice=function(n){n==null&&(n=10);var i=r(),a=0,o=i.length-1,l=i[a],c=i[o],u,d,h=10;for(c<l&&(d=l,l=c,c=d,d=a,a=o,o=d);h-- >0;){if(d=JD(l,c,n),d===u)return i[a]=l,i[o]=c,r(i);if(d>0)l=Math.floor(l/d)*d,c=Math.ceil(c/d)*d;else if(d<0)l=Math.ceil(l*d)/d,c=Math.floor(c*d)/d;else break;u=d}return e},e}function m5(){var e=uQ();return e.copy=function(){return D_(e,m5())},Qc.apply(e,arguments),Ep(e)}function vAe(e){var r;function n(i){return i==null||isNaN(i=+i)?r:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(e=Array.from(i,h5),n):e.slice()},n.unknown=function(i){return arguments.length?(r=i,n):r},n.copy=function(){return vAe(e).unknown(r)},e=arguments.length?Array.from(e,h5):[0,1],Ep(n)}function bAe(e,r){e=e.slice();var n=0,i=e.length-1,a=e[n],o=e[i],l;return o<a&&(l=n,n=i,i=l,l=a,a=o,o=l),e[n]=r.floor(a),e[i]=r.ceil(o),e}function uY(e){return Math.log(e)}function dY(e){return Math.exp(e)}function Qat(e){return-Math.log(-e)}function Hat(e){return-Math.exp(-e)}function Vat(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Wat(e){return e===10?Vat:e===Math.E?Math.exp:r=>Math.pow(e,r)}function qat(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),r=>Math.log(r)/e)}function hY(e){return(r,n)=>-e(-r,n)}function fQ(e){const r=e(uY,dY),n=r.domain;let i=10,a,o;function l(){return a=qat(i),o=Wat(i),n()[0]<0?(a=hY(a),o=hY(o),e(Qat,Hat)):e(uY,dY),r}
vendor: 5,012 bytes, line 2100
2100return r.base=function(c){return arguments.length?(i=+c,l()):i},r.domain=function(c){return arguments.length?(n(c),l()):n()},r.ticks=c=>{const u=n();let d=u[0],h=u[u.length-1];const f=h<d;f&&([d,h]=[h,d]);let p=a(d),m=a(h),A,g;const y=c==null?10:+c;let x=[];if(!(i%1)&&m-p<y){if(p=Math.floor(p),m=Math.ceil(m),d>0){for(;p<=m;++p)for(A=1;A<i;++A)if(g=p<0?A/o(-p):A*o(p),!(g<d)){if(g>h)break;x.push(g)}}else for(;p<=m;++p)for(A=i-1;A>=1;--A)if(g=p>0?A/o(-p):A*o(p),!(g<d)){if(g>h)break;x.push(g)}x.length*2<y&&(x=YD(d,h,y))}else x=YD(p,m,Math.min(m-p,y)).map(o);return f?x.reverse():x},r.tickFormat=(c,u)=>{if(c==null&&(c=10),u==null&&(u=i===10?"s":","),typeof u!="function"&&(!(i%1)&&(u=mj(u)).precision==null&&(u.trim=!0),u=hQ(u)),c===1/0)return u;const d=Math.max(1,i*c/r.ticks().length);return h=>{let f=h/o(Math.round(a(h)));return f*i<i-.5&&(f*=i),f<=d?u(h):""}},r.nice=()=>n(bAe(n(),{floor:c=>o(Math.floor(a(c))),ceil:c=>o(Math.ceil(a(c)))})),r}function wAe(){const e=fQ(wT()).domain([1,10]);return e.copy=()=>D_(e,wAe()).base(e.base()),Qc.apply(e,arguments),e}function fY(e){return function(r){return Math.sign(r)*Math.log1p(Math.abs(r/e))}}function mY(e){return function(r){return Math.sign(r)*Math.expm1(Math.abs(r))*e}}function mQ(e){var r=1,n=e(fY(r),mY(r));return n.constant=function(i){return arguments.length?e(fY(r=+i),mY(r)):r},Ep(n)}function jAe(){var e=mQ(wT());return e.copy=function(){return D_(e,jAe()).constant(e.constant())},Qc.apply(e,arguments)}function pY(e){return function(r){return r<0?-Math.pow(-r,e):Math.pow(r,e)}}function Kat(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Gat(e){return e<0?-e*e:e*e}function pQ(e){var r=e(No,No),n=1;function i(){return n===1?e(No,No):n===.5?e(Kat,Gat):e(pY(n),pY(1/n))}return r.exponent=function(a){return arguments.length?(n=+a,i()):n},Ep(r)}function AQ(){var e=pQ(wT());return e.copy=function(){return D_(e,AQ()).exponent(e.exponent())},Qc.apply(e,arguments),e}function Xat(){return AQ.apply(null,arguments).exponent(.5)}function AY(e){return Math.sign(e)*e*e}function Yat(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function _Ae(){var e=uQ(),r=[0,1],n=!1,i;function a(o){var l=Yat(e(o));return isNaN(l)?i:n?Math.round(l):l}return a.invert=function(o){return e.invert(AY(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((r=Array.from(o,h5)).map(AY)),a):r.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(n=!!o,a):n},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(i=o,a):i},a.copy=function(){return _Ae(e.domain(),r).round(n).clamp(e.clamp()).unknown(i)},Qc.apply(a,arguments),Ep(a)}function CAe(){var e=[],r=[],n=[],i;function a(){var l=0,c=Math.max(1,r.length);for(n=new Array(c-1);++l<c;)n[l-1]=Kit(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?i:r[L_(n,l)]}return o.invertExtent=function(l){var c=r.indexOf(l);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let c of l)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Xm),a()},o.range=function(l){return arguments.length?(r=Array.from(l),a()):r.slice()},o.unknown=function(l){return arguments.length?(i=l,o):i},o.quantiles=function(){return n.slice()},o.copy=function(){return CAe().domain(e).range(r).unknown(i)},Qc.apply(o,arguments)}function NAe(){var e=0,r=1,n=1,i=[.5],a=[0,1],o;function l(u){return u!=null&&u<=u?a[L_(i,u,0,n)]:o}function c(){var u=-1;for(i=new Array(n);++u<n;)i[u]=((u+1)*r-(u-n)*e)/(n+1);return l}return l.domain=function(u){return arguments.length?([e,r]=u,e=+e,r=+r,c()):[e,r]},l.range=function(u){return arguments.length?(n=(a=Array.from(u)).length-1,c()):a.slice()},l.invertExtent=function(u){var d=a.indexOf(u);return d<0?[NaN,NaN]:d<1?[e,i[0]]:d>=n?[i[n-1],r]:[i[d-1],i[d]]},l.unknown=function(u){return arguments.length&&(o=u),l},l.thresholds=function(){return i.slice()},l.copy=function(){return NAe().domain([e,r]).range(a).unknown(o)},Qc.apply(Ep(l),arguments)}function SAe(){var e=[.5],r=[0,1],n,i=1;function a(o){return o!=null&&o<=o?r[L_(e,o,0,i)]:n}return a.domain=function(o){return arguments.length?(e=Array.from(o),i=Math.min(e.length,r.length-1),a):e.slice()},a.range=function(o){return arguments.length?(r=Array.from(o),i=Math.min(e.length,r.length-1),a):r.slice()},a.invertExtent=function(o){var l=r.indexOf(o);return[e[l-1],e[l]]},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return SAe().domain(e).range(r).unknown(n)},Qc.apply(a,arguments)}const lF=new Date,cF=new Date;function ns(e,r,n,i){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),r(o,1),e(o),o),a.round=o=>{const l=a(o),c=a.ceil(o);return o-l<c-o?l:c},a.offset=(o,l)=>(r(o=new Date(+o),l==null?1:Math.floor(l)),o),a.range=(o,l,c)=>{const u=[];
vendor: 6,016 bytes, line 2100
2100if(o=a.ceil(o),c=c==null?1:Math.floor(c),!(o<l)||!(c>0))return u;let d;do u.push(d=new Date(+o)),r(o,c),e(o);while(d<o&&o<l);return u},a.filter=o=>ns(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;r(l,-1),!o(l););else for(;--c>=0;)for(;r(l,1),!o(l););}),n&&(a.count=(o,l)=>(lF.setTime(+o),cF.setTime(+l),e(lF),e(cF),Math.floor(n(lF,cF))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(i?l=>i(l)%o===0:l=>a.count(0,l)%o===0):a)),a}const p5=ns(()=>{},(e,r)=>{e.setTime(+e+r)},(e,r)=>r-e);p5.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ns(r=>{r.setTime(Math.floor(r/e)*e)},(r,n)=>{r.setTime(+r+n*e)},(r,n)=>(n-r)/e):p5);p5.range;const Eh=1e3,Cc=Eh*60,Bh=Cc*60,af=Bh*24,gQ=af*7,gY=af*30,uF=af*365,TA=ns(e=>{e.setTime(e-e.getMilliseconds())},(e,r)=>{e.setTime(+e+r*Eh)},(e,r)=>(r-e)/Eh,e=>e.getUTCSeconds());TA.range;const xQ=ns(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Eh)},(e,r)=>{e.setTime(+e+r*Cc)},(e,r)=>(r-e)/Cc,e=>e.getMinutes());xQ.range;const yQ=ns(e=>{e.setUTCSeconds(0,0)},(e,r)=>{e.setTime(+e+r*Cc)},(e,r)=>(r-e)/Cc,e=>e.getUTCMinutes());yQ.range;const vQ=ns(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Eh-e.getMinutes()*Cc)},(e,r)=>{e.setTime(+e+r*Bh)},(e,r)=>(r-e)/Bh,e=>e.getHours());vQ.range;const bQ=ns(e=>{e.setUTCMinutes(0,0,0)},(e,r)=>{e.setTime(+e+r*Bh)},(e,r)=>(r-e)/Bh,e=>e.getUTCHours());bQ.range;const M_=ns(e=>e.setHours(0,0,0,0),(e,r)=>e.setDate(e.getDate()+r),(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Cc)/af,e=>e.getDate()-1);M_.range;const jT=ns(e=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/af,e=>e.getUTCDate()-1);jT.range;const kAe=ns(e=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/af,e=>Math.floor(e/af));kAe.range;function Wg(e){return ns(r=>{r.setDate(r.getDate()-(r.getDay()+7-e)%7),r.setHours(0,0,0,0)},(r,n)=>{r.setDate(r.getDate()+n*7)},(r,n)=>(n-r-(n.getTimezoneOffset()-r.getTimezoneOffset())*Cc)/gQ)}const _T=Wg(0),A5=Wg(1),Jat=Wg(2),Zat=Wg(3),r0=Wg(4),est=Wg(5),tst=Wg(6);_T.range;A5.range;Jat.range;Zat.range;r0.range;est.range;tst.range;function qg(e){return ns(r=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-e)%7),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCDate(r.getUTCDate()+n*7)},(r,n)=>(n-r)/gQ)}const CT=qg(0),g5=qg(1),rst=qg(2),nst=qg(3),n0=qg(4),ist=qg(5),ast=qg(6);CT.range;g5.range;rst.range;nst.range;n0.range;ist.range;ast.range;const wQ=ns(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,r)=>{e.setMonth(e.getMonth()+r)},(e,r)=>r.getMonth()-e.getMonth()+(r.getFullYear()-e.getFullYear())*12,e=>e.getMonth());wQ.range;const jQ=ns(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCMonth(e.getUTCMonth()+r)},(e,r)=>r.getUTCMonth()-e.getUTCMonth()+(r.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());jQ.range;const sf=ns(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r)},(e,r)=>r.getFullYear()-e.getFullYear(),e=>e.getFullYear());sf.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ns(r=>{r.setFullYear(Math.floor(r.getFullYear()/e)*e),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,n)=>{r.setFullYear(r.getFullYear()+n*e)});sf.range;const of=ns(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r)},(e,r)=>r.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());of.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ns(r=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/e)*e),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCFullYear(r.getUTCFullYear()+n*e)});of.range;function EAe(e,r,n,i,a,o){const l=[[TA,1,Eh],[TA,5,5*Eh],[TA,15,15*Eh],[TA,30,30*Eh],[o,1,Cc],[o,5,5*Cc],[o,15,15*Cc],[o,30,30*Cc],[a,1,Bh],[a,3,3*Bh],[a,6,6*Bh],[a,12,12*Bh],[i,1,af],[i,2,2*af],[n,1,gQ],[r,1,gY],[r,3,3*gY],[e,1,uF]];function c(d,h,f){const p=h<d;p&&([d,h]=[h,d]);const m=f&&typeof f.range=="function"?f:u(d,h,f),A=m?m.range(d,+h+1):[];return p?A.reverse():A}function u(d,h,f){const p=Math.abs(h-d)/f,m=sQ(([,,y])=>y).right(l,p);if(m===l.length)return e.every(ZD(d/uF,h/uF,f));if(m===0)return p5.every(Math.max(ZD(d,h,f),1));const[A,g]=l[p/l[m-1][2]<l[m][2]/p?m-1:m];return A.every(g)}return[c,u]}const[sst,ost]=EAe(of,jQ,CT,kAe,bQ,yQ),[lst,cst]=EAe(sf,wQ,_T,M_,vQ,xQ);function dF(e){if(0<=e.y&&e.y<100){var r=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return r.setFullYear(e.y),r}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function hF(e){if(0<=e.y&&e.y<100){var r=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return r.setUTCFullYear(e.y),r}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function y1(e,r,n){return{y:e,m:r,d:n,H:0,M:0,S:0,L:0}}function ust(e){var r=e.dateTime,n=e.date,i=e.time,a=e.periods,o=e.days,l=e.shortDays,c=e.months,u=e.shortMonths,d=v1(a),h=b1(a),f=v1(o),p=b1(o),m=v1(l),A=b1(l),g=v1(c),y=b1(c),x=v1(u),b=b1(u),v={a:V,A:U,b:Q,B:$,c:null,d:jY,e:jY,f:Ist,g:Qst,G:Vst,H:Bst,I:Tst,j:Pst,L:BAe,m:Fst,M:Ost,p:q,q:M,Q:NY,s:SY,S:Lst,u:Rst,U:Dst,V:Mst,w:zst,W:Ust,x:null,X:null,y:$st,Y:Hst,Z:Wst,"%":CY},j={a:z,A:K,b:ne,B:ie,c:null,d:_Y,e:_Y,f:Xst,g:sot,G:lot,H:qst,I:Kst,j:Gst,L:PAe,m:Yst,M:Jst,p:X,q:de,Q:NY,s:SY,S:Zst,u:eot,U:tot,V:rot,w:not,W:iot,x:null,X:null,y:aot,Y:oot,Z:cot,"%":CY},_={a:O,A:B,b:T,B:F,c:I,d:bY,e:bY,f:Nst,g:vY,G:yY,H:wY,I:wY,j:wst,L:Cst,m:bst,M:jst,p:E,q:vst,Q:kst,s:Est,S:_st,u:pst,U:Ast,V:gst,w:mst,W:xst,x:D,X:L,y:vY,Y:yY,Z:yst,"%":Sst};v.x=C(n,v),v.X=C(i,v),v.c=C(r,v),j.x=C(n,j),j.X=C(i,j),j.c=C(r,j);function C(oe,ce){return function(ye){var ge=[],Be=-1,Ve=0,te=oe.length,xe,We,ze;for(ye instanceof Date||(ye=new Date(+ye));++Be<te;)oe.charCodeAt(Be)===37&&(ge.push(oe.slice(Ve,Be)),(We=xY[xe=oe.charAt(++Be)])!=null?xe=oe.charAt(++Be):We=xe==="e"?" ":"0",(ze=ce[xe])&&(xe=ze(ye,We)),ge.push(xe),Ve=Be+1);return ge.push(oe.slice(Ve,Be)),ge.join("")}}function N(oe,ce){return function(ye){var ge=y1(1900,void 0,1),Be=S(ge,oe,ye+="",0),Ve,te;if(Be!=ye.length)return null;if("Q"in ge)return new Date(ge.Q);if("s"in ge)return new Date(ge.s*1e3+("L"in ge?ge.L:0));
vendor: 7,313 bytes, line 2100
2100if(ce&&!("Z"in ge)&&(ge.Z=0),"p"in ge&&(ge.H=ge.H%12+ge.p*12),ge.m===void 0&&(ge.m="q"in ge?ge.q:0),"V"in ge){if(ge.V<1||ge.V>53)return null;"w"in ge||(ge.w=1),"Z"in ge?(Ve=hF(y1(ge.y,0,1)),te=Ve.getUTCDay(),Ve=te>4||te===0?g5.ceil(Ve):g5(Ve),Ve=jT.offset(Ve,(ge.V-1)*7),ge.y=Ve.getUTCFullYear(),ge.m=Ve.getUTCMonth(),ge.d=Ve.getUTCDate()+(ge.w+6)%7):(Ve=dF(y1(ge.y,0,1)),te=Ve.getDay(),Ve=te>4||te===0?A5.ceil(Ve):A5(Ve),Ve=M_.offset(Ve,(ge.V-1)*7),ge.y=Ve.getFullYear(),ge.m=Ve.getMonth(),ge.d=Ve.getDate()+(ge.w+6)%7)}else("W"in ge||"U"in ge)&&("w"in ge||(ge.w="u"in ge?ge.u%7:"W"in ge?1:0),te="Z"in ge?hF(y1(ge.y,0,1)).getUTCDay():dF(y1(ge.y,0,1)).getDay(),ge.m=0,ge.d="W"in ge?(ge.w+6)%7+ge.W*7-(te+5)%7:ge.w+ge.U*7-(te+6)%7);return"Z"in ge?(ge.H+=ge.Z/100|0,ge.M+=ge.Z%100,hF(ge)):dF(ge)}}function S(oe,ce,ye,ge){for(var Be=0,Ve=ce.length,te=ye.length,xe,We;Be<Ve;){if(ge>=te)return-1;if(xe=ce.charCodeAt(Be++),xe===37){if(xe=ce.charAt(Be++),We=_[xe in xY?ce.charAt(Be++):xe],!We||(ge=We(oe,ye,ge))<0)return-1}else if(xe!=ye.charCodeAt(ge++))return-1}return ge}function E(oe,ce,ye){var ge=d.exec(ce.slice(ye));return ge?(oe.p=h.get(ge[0].toLowerCase()),ye+ge[0].length):-1}function O(oe,ce,ye){var ge=m.exec(ce.slice(ye));return ge?(oe.w=A.get(ge[0].toLowerCase()),ye+ge[0].length):-1}function B(oe,ce,ye){var ge=f.exec(ce.slice(ye));return ge?(oe.w=p.get(ge[0].toLowerCase()),ye+ge[0].length):-1}function T(oe,ce,ye){var ge=x.exec(ce.slice(ye));return ge?(oe.m=b.get(ge[0].toLowerCase()),ye+ge[0].length):-1}function F(oe,ce,ye){var ge=g.exec(ce.slice(ye));return ge?(oe.m=y.get(ge[0].toLowerCase()),ye+ge[0].length):-1}function I(oe,ce,ye){return S(oe,r,ce,ye)}function D(oe,ce,ye){return S(oe,n,ce,ye)}function L(oe,ce,ye){return S(oe,i,ce,ye)}function V(oe){return l[oe.getDay()]}function U(oe){return o[oe.getDay()]}function Q(oe){return u[oe.getMonth()]}function $(oe){return c[oe.getMonth()]}function q(oe){return a[+(oe.getHours()>=12)]}function M(oe){return 1+~~(oe.getMonth()/3)}function z(oe){return l[oe.getUTCDay()]}function K(oe){return o[oe.getUTCDay()]}function ne(oe){return u[oe.getUTCMonth()]}function ie(oe){return c[oe.getUTCMonth()]}function X(oe){return a[+(oe.getUTCHours()>=12)]}function de(oe){return 1+~~(oe.getUTCMonth()/3)}return{format:function(oe){var ce=C(oe+="",v);return ce.toString=function(){return oe},ce},parse:function(oe){var ce=N(oe+="",!1);return ce.toString=function(){return oe},ce},utcFormat:function(oe){var ce=C(oe+="",j);return ce.toString=function(){return oe},ce},utcParse:function(oe){var ce=N(oe+="",!0);return ce.toString=function(){return oe},ce}}}var xY={"-":"",_:" ",0:"0"},gs=/^\s*\d+/,dst=/^%/,hst=/[\\^$*+?|[\]().{}]/g;function Sn(e,r,n){var i=e<0?"-":"",a=(i?-e:e)+"",o=a.length;return i+(o<n?new Array(n-o+1).join(r)+a:a)}function fst(e){return e.replace(hst,"\\$&")}function v1(e){return new RegExp("^(?:"+e.map(fst).join("|")+")","i")}function b1(e){return new Map(e.map((r,n)=>[r.toLowerCase(),n]))}function mst(e,r,n){var i=gs.exec(r.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function pst(e,r,n){var i=gs.exec(r.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Ast(e,r,n){var i=gs.exec(r.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function gst(e,r,n){var i=gs.exec(r.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function xst(e,r,n){var i=gs.exec(r.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function yY(e,r,n){var i=gs.exec(r.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function vY(e,r,n){var i=gs.exec(r.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function yst(e,r,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function vst(e,r,n){var i=gs.exec(r.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function bst(e,r,n){var i=gs.exec(r.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function bY(e,r,n){var i=gs.exec(r.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function wst(e,r,n){var i=gs.exec(r.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function wY(e,r,n){var i=gs.exec(r.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function jst(e,r,n){var i=gs.exec(r.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function _st(e,r,n){var i=gs.exec(r.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function Cst(e,r,n){var i=gs.exec(r.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Nst(e,r,n){var i=gs.exec(r.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Sst(e,r,n){var i=dst.exec(r.slice(n,n+1));return i?n+i[0].length:-1}function kst(e,r,n){var i=gs.exec(r.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Est(e,r,n){var i=gs.exec(r.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function jY(e,r){return Sn(e.getDate(),r,2)}function Bst(e,r){return Sn(e.getHours(),r,2)}function Tst(e,r){return Sn(e.getHours()%12||12,r,2)}function Pst(e,r){return Sn(1+M_.count(sf(e),e),r,3)}function BAe(e,r){return Sn(e.getMilliseconds(),r,3)}function Ist(e,r){return BAe(e,r)+"000"}function Fst(e,r){return Sn(e.getMonth()+1,r,2)}function Ost(e,r){return Sn(e.getMinutes(),r,2)}function Lst(e,r){return Sn(e.getSeconds(),r,2)}function Rst(e){var r=e.getDay();return r===0?7:r}function Dst(e,r){return Sn(_T.count(sf(e)-1,e),r,2)}function TAe(e){var r=e.getDay();return r>=4||r===0?r0(e):r0.ceil(e)}function Mst(e,r){return e=TAe(e),Sn(r0.count(sf(e),e)+(sf(e).getDay()===4),r,2)}function zst(e){return e.getDay()}function Ust(e,r){return Sn(A5.count(sf(e)-1,e),r,2)}function $st(e,r){return Sn(e.getFullYear()%100,r,2)}function Qst(e,r){return e=TAe(e),Sn(e.getFullYear()%100,r,2)}function Hst(e,r){return Sn(e.getFullYear()%1e4,r,4)}function Vst(e,r){var n=e.getDay();return e=n>=4||n===0?r0(e):r0.ceil(e),Sn(e.getFullYear()%1e4,r,4)}function Wst(e){var r=e.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+Sn(r/60|0,"0",2)+Sn(r%60,"0",2)}function _Y(e,r){return Sn(e.getUTCDate(),r,2)}function qst(e,r){return Sn(e.getUTCHours(),r,2)}function Kst(e,r){return Sn(e.getUTCHours()%12||12,r,2)}function Gst(e,r){return Sn(1+jT.count(of(e),e),r,3)}function PAe(e,r){return Sn(e.getUTCMilliseconds(),r,3)}function Xst(e,r){return PAe(e,r)+"000"}function Yst(e,r){return Sn(e.getUTCMonth()+1,r,2)}function Jst(e,r){return Sn(e.getUTCMinutes(),r,2)}function Zst(e,r){return Sn(e.getUTCSeconds(),r,2)}function eot(e){var r=e.getUTCDay();return r===0?7:r}function tot(e,r){return Sn(CT.count(of(e)-1,e),r,2)}function IAe(e){var r=e.getUTCDay();return r>=4||r===0?n0(e):n0.ceil(e)}function rot(e,r){return e=IAe(e),Sn(n0.count(of(e),e)+(of(e).getUTCDay()===4),r,2)}function not(e){return e.getUTCDay()}function iot(e,r){return Sn(g5.count(of(e)-1,e),r,2)}function aot(e,r){return Sn(e.getUTCFullYear()%100,r,2)}function sot(e,r){return e=IAe(e),Sn(e.getUTCFullYear()%100,r,2)}function oot(e,r){return Sn(e.getUTCFullYear()%1e4,r,4)}function lot(e,r){var n=e.getUTCDay();return e=n>=4||n===0?n0(e):n0.ceil(e),Sn(e.getUTCFullYear()%1e4,r,4)}function cot(){return"+0000"}function CY(){return"%"}function NY(e){return+e}function SY(e){return Math.floor(+e/1e3)}var Lx,FAe,OAe;uot({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
2100ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function uot(e){return Lx=ust(e),FAe=Lx.format,Lx.parse,OAe=Lx.utcFormat,Lx.utcParse,Lx}function dot(e){return new Date(e)}function hot(e){return e instanceof Date?+e:+new Date(+e)}function _Q(e,r,n,i,a,o,l,c,u,d){var h=uQ(),f=h.invert,p=h.domain,m=d(".%L"),A=d(":%S"),g=d("%I:%M"),y=d("%I %p"),x=d("%a %d"),b=d("%b %d"),v=d("%B"),j=d("%Y");function _(C){return(u(C)<C?m:c(C)<C?A:l(C)<C?g:o(C)<C?y:i(C)<C?a(C)<C?x:b:n(C)<C?v:j)(C)}return h.invert=function(C){return new Date(f(C))},h.domain=function(C){return arguments.length?p(Array.from(C,hot)):p().map(dot)},h.ticks=function(C){var N=p();return e(N[0],N[N.length-1],C??10)},h.tickFormat=function(C,N){return N==null?_:d(N)},h.nice=function(C){var N=p();return(!C||typeof C.range!="function")&&(C=r(N[0],N[N.length-1],C??10)),C?p(bAe(N,C)):h},h.copy=function(){return D_(h,_Q(e,r,n,i,a,o,l,c,u,d))},h}function fot(){return Qc.apply(_Q(lst,cst,sf,wQ,_T,M_,vQ,xQ,TA,FAe).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function mot(){return Qc.apply(_Q(sst,ost,of,jQ,CT,jT,bQ,yQ,TA,OAe).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function NT(){var e=0,r=1,n,i,a,o,l=No,c=!1,u;function d(f){return f==null||isNaN(f=+f)?u:l(a===0?.5:(f=(o(f)-n)*a,c?Math.max(0,Math.min(1,f)):f))}d.domain=function(f){return arguments.length?([e,r]=f,n=o(e=+e),i=o(r=+r),a=n===i?0:1/(i-n),d):[e,r]},d.clamp=function(f){return arguments.length?(c=!!f,d):c},d.interpolator=function(f){return arguments.length?(l=f,d):l};function h(f){return function(p){var m,A;return arguments.length?([m,A]=p,l=f(m,A),d):[l(0),l(1)]}}return d.range=h(db),d.rangeRound=h(cQ),d.unknown=function(f){return arguments.length?(u=f,d):u},function(f){return o=f,n=f(e),i=f(r),a=n===i?0:1/(i-n),d}}function Bp(e,r){return r.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function LAe(){var e=Ep(NT()(No));return e.copy=function(){return Bp(e,LAe())},yf.apply(e,arguments)}function RAe(){var e=fQ(NT()).domain([1,10]);return e.copy=function(){return Bp(e,RAe()).base(e.base())},yf.apply(e,arguments)}function DAe(){var e=mQ(NT());return e.copy=function(){return Bp(e,DAe()).constant(e.constant())},yf.apply(e,arguments)}function CQ(){var e=pQ(NT());return e.copy=function(){return Bp(e,CQ()).exponent(e.exponent())},yf.apply(e,arguments)}function pot(){return CQ.apply(null,arguments).exponent(.5)}function MAe(){var e=[],r=No;function n(i){if(i!=null&&!isNaN(i=+i))return r((L_(e,i,1)-1)/(e.length-1))}return n.domain=function(i){if(!arguments.length)return e.slice();e=[];for(let a of i)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Xm),n},n.interpolator=function(i){return arguments.length?(r=i,n):r},n.range=function(){return e.map((i,a)=>r(a/(e.length-1)))},n.quantiles=function(i){return Array.from({length:i+1},(a,o)=>qit(e,o/i))},n.copy=function(){return MAe(r).domain(e)},yf.apply(n,arguments)}function ST(){var e=0,r=.5,n=1,i=1,a,o,l,c,u,d=No,h,f=!1,p;function m(g){return isNaN(g=+g)?p:(g=.5+((g=+h(g))-o)*(i*g<i*o?c:u),d(f?Math.max(0,Math.min(1,g)):g))}m.domain=function(g){return arguments.length?([e,r,n]=g,a=h(e=+e),o=h(r=+r),l=h(n=+n),c=a===o?0:.5/(o-a),u=o===l?0:.5/(l-o),i=o<a?-1:1,m):[e,r,n]},m.clamp=function(g){return arguments.length?(f=!!g,m):f},m.interpolator=function(g){return arguments.length?(d=g,m):d};function A(g){return function(y){var x,b,v;return arguments.length?([x,b,v]=y,d=Sat(g,[x,b,v]),m):[d(0),d(.5),d(1)]}}return m.range=A(db),m.rangeRound=A(cQ),m.unknown=function(g){return arguments.length?(p=g,m):p},function(g){return h=g,a=g(e),o=g(r),l=g(n),c=a===o?0:.5/(o-a),u=o===l?0:.5/(l-o),i=o<a?-1:1,m}}function zAe(){var e=Ep(ST()(No));return e.copy=function(){return Bp(e,zAe())},yf.apply(e,arguments)}function UAe(){var e=fQ(ST()).domain([.1,1,10]);return e.copy=function(){return Bp(e,UAe()).base(e.base())},yf.apply(e,arguments)}function $Ae(){var e=mQ(ST());return e.copy=function(){return Bp(e,$Ae()).constant(e.constant())},yf.apply(e,arguments)}function NQ(){var e=pQ(ST());return e.copy=function(){return Bp(e,NQ()).exponent(e.exponent())},yf.apply(e,arguments)}function Aot(){return NQ.apply(null,arguments).exponent(.5)}const kY=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:dj,scaleDiverging:zAe,scaleDivergingLog:UAe,scaleDivergingPow:NQ,scaleDivergingSqrt:Aot,scaleDivergingSymlog:$Ae,scaleIdentity:vAe,scaleImplicit:eM,scaleLinear:m5,scaleLog:wAe,scaleOrdinal:bT,scalePoint:Qw,scalePow:AQ,scaleQuantile:CAe,scaleQuantize:NAe,scaleRadial:_Ae,scaleSequential:LAe,scaleSequentialLog:RAe,scaleSequentialPow:CQ,scaleSequentialQuantile:MAe,scaleSequentialSqrt:pot,scaleSequentialSymlog:DAe,scaleSqrt:Xat,scaleSymlog:jAe,scaleThreshold:SAe,scaleTime:fot,scaleUtc:mot,tickFormat:yAe},Symbol.toStringTag,{value:"Module"}));var got=rb;function xot(e,r,n){for(var i=-1,a=e.length;++i<a;){var o=e[i],l=r(o);if(l!=null&&(c===void 0?l===l&&!got(l):n(l,c)))var c=l,u=o}return u}var QAe=xot;function yot(e,r){return e>r}var vot=yot,bot=QAe,wot=vot,jot=ub;function _ot(e){return e&&e.length?bot(e,jot,wot):void 0}var Cot=_ot;const Bm=bn(Cot);function Not(e,r){return e<r}var Sot=Not,kot=QAe,Eot=Sot,Bot=ub;function Tot(e){return e&&e.length?kot(e,Bot,Eot):void 0}var Pot=Tot;
vendor: 62,279 bytes, lines 2100-2126
2100const kT=bn(Pot);var Iot=U$,Fot=kp,Oot=Kpe,Lot=hl;function Rot(e,r){var n=Lot(e)?Iot:Oot;return n(e,Fot(r))}var Dot=Rot,Mot=Wpe,zot=Dot;function Uot(e,r){return Mot(zot(e,r),1)}var $ot=Uot;const Qot=bn($ot);var Hot=rQ;function Vot(e,r){return Hot(e,r)}var Wot=Vot;const pj=bn(Wot);var hb=1e9,qot={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},kQ,Ii=!0,Mc="[DecimalError] ",ng=Mc+"Invalid argument: ",SQ=Mc+"Exponent out of range: ",fb=Math.floor,mA=Math.pow,Kot=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ol,os=1e7,Ci=7,HAe=9007199254740991,x5=fb(HAe/Ci),Lt={};Lt.absoluteValue=Lt.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Lt.comparedTo=Lt.cmp=function(e){var r,n,i,a,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(i=o.d.length,a=e.d.length,r=0,n=i<a?i:a;r<n;++r)if(o.d[r]!==e.d[r])return o.d[r]>e.d[r]^o.s<0?1:-1;return i===a?0:i>a^o.s<0?1:-1};Lt.decimalPlaces=Lt.dp=function(){var e=this,r=e.d.length-1,n=(r-e.e)*Ci;if(r=e.d[r],r)for(;r%10==0;r/=10)n--;return n<0?0:n};Lt.dividedBy=Lt.div=function(e){return Mh(this,new this.constructor(e))};Lt.dividedToIntegerBy=Lt.idiv=function(e){var r=this,n=r.constructor;return ni(Mh(r,new n(e),0,1),n.precision)};Lt.equals=Lt.eq=function(e){return!this.cmp(e)};Lt.exponent=function(){return Ia(this)};Lt.greaterThan=Lt.gt=function(e){return this.cmp(e)>0};Lt.greaterThanOrEqualTo=Lt.gte=function(e){return this.cmp(e)>=0};Lt.isInteger=Lt.isint=function(){return this.e>this.d.length-2};Lt.isNegative=Lt.isneg=function(){return this.s<0};Lt.isPositive=Lt.ispos=function(){return this.s>0};Lt.isZero=function(){return this.s===0};Lt.lessThan=Lt.lt=function(e){return this.cmp(e)<0};Lt.lessThanOrEqualTo=Lt.lte=function(e){return this.cmp(e)<1};Lt.logarithm=Lt.log=function(e){var r,n=this,i=n.constructor,a=i.precision,o=a+5;if(e===void 0)e=new i(10);else if(e=new i(e),e.s<1||e.eq(Ol))throw Error(Mc+"NaN");if(n.s<1)throw Error(Mc+(n.s?"NaN":"-Infinity"));return n.eq(Ol)?new i(0):(Ii=!1,r=Mh(Aj(n,o),Aj(e,o),o),Ii=!0,ni(r,a))};Lt.minus=Lt.sub=function(e){var r=this;return e=new r.constructor(e),r.s==e.s?qAe(r,e):VAe(r,(e.s=-e.s,e))};Lt.modulo=Lt.mod=function(e){var r,n=this,i=n.constructor,a=i.precision;if(e=new i(e),!e.s)throw Error(Mc+"NaN");return n.s?(Ii=!1,r=Mh(n,e,0,1).times(e),Ii=!0,n.minus(r)):ni(new i(n),a)};Lt.naturalExponential=Lt.exp=function(){return WAe(this)};Lt.naturalLogarithm=Lt.ln=function(){return Aj(this)};Lt.negated=Lt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Lt.plus=Lt.add=function(e){var r=this;return e=new r.constructor(e),r.s==e.s?VAe(r,e):qAe(r,(e.s=-e.s,e))};Lt.precision=Lt.sd=function(e){var r,n,i,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ng+e);if(r=Ia(a)+1,i=a.d.length-1,n=i*Ci+1,i=a.d[i],i){for(;i%10==0;i/=10)n--;for(i=a.d[0];i>=10;i/=10)n++}return e&&r>n?r:n};Lt.squareRoot=Lt.sqrt=function(){var e,r,n,i,a,o,l,c=this,u=c.constructor;if(c.s<1){if(!c.s)return new u(0);throw Error(Mc+"NaN")}for(e=Ia(c),Ii=!1,a=Math.sqrt(+c),a==0||a==1/0?(r=yd(c.d),(r.length+e)%2==0&&(r+="0"),a=Math.sqrt(r),e=fb((e+1)/2)-(e<0||e%2),a==1/0?r="5e"+e:(r=a.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),i=new u(r)):i=new u(a.toString()),n=u.precision,a=l=n+3;;)if(o=i,i=o.plus(Mh(c,o,l+2)).times(.5),yd(o.d).slice(0,l)===(r=yd(i.d)).slice(0,l)){if(r=r.slice(l-3,l+1),a==l&&r=="4999"){if(ni(o,n+1,0),o.times(o).eq(c)){i=o;break}}else if(r!="9999")break;l+=4}return Ii=!0,ni(i,n)};Lt.times=Lt.mul=function(e){var r,n,i,a,o,l,c,u,d,h=this,f=h.constructor,p=h.d,m=(e=new f(e)).d;if(!h.s||!e.s)return new f(0);for(e.s*=h.s,n=h.e+e.e,u=p.length,d=m.length,u<d&&(o=p,p=m,m=o,l=u,u=d,d=l),o=[],l=u+d,i=l;i--;)o.push(0);for(i=d;--i>=0;){for(r=0,a=u+i;a>i;)c=o[a]+m[i]*p[a-i-1]+r,o[a--]=c%os|0,r=c/os|0;o[a]=(o[a]+r)%os|0}for(;!o[--l];)o.pop();return r?++n:o.shift(),e.d=o,e.e=n,Ii?ni(e,f.precision):e};Lt.toDecimalPlaces=Lt.todp=function(e,r){var n=this,i=n.constructor;return n=new i(n),e===void 0?n:(Dd(e,0,hb),r===void 0?r=i.rounding:Dd(r,0,8),ni(n,e+Ia(n)+1,r))};Lt.toExponential=function(e,r){var n,i=this,a=i.constructor;return e===void 0?n=Cg(i,!0):(Dd(e,0,hb),r===void 0?r=a.rounding:Dd(r,0,8),i=ni(new a(i),e+1,r),n=Cg(i,!0,e+1)),n};Lt.toFixed=function(e,r){var n,i,a=this,o=a.constructor;return e===void 0?Cg(a):(Dd(e,0,hb),r===void 0?r=o.rounding:Dd(r,0,8),i=ni(new o(a),e+Ia(a)+1,r),n=Cg(i.abs(),!1,e+Ia(i)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Lt.toInteger=Lt.toint=function(){var e=this,r=e.constructor;return ni(new r(e),Ia(e)+1,r.rounding)};Lt.toNumber=function(){return+this};Lt.toPower=Lt.pow=function(e){var r,n,i,a,o,l,c=this,u=c.constructor,d=12,h=+(e=new u(e));if(!e.s)return new u(Ol);if(c=new u(c),!c.s){if(e.s<1)throw Error(Mc+"Infinity");return c}if(c.eq(Ol))return c;if(i=u.precision,e.eq(Ol))return ni(c,i);if(r=e.e,n=e.d.length-1,l=r>=n,o=c.s,l){if((n=h<0?-h:h)<=HAe){for(a=new u(Ol),r=Math.ceil(i/Ci+4),Ii=!1;n%2&&(a=a.times(c),BY(a.d,r)),n=fb(n/2),n!==0;)c=c.times(c),BY(c.d,r);return Ii=!0,e.s<0?new u(Ol).div(a):ni(a,i)}}else if(o<0)throw Error(Mc+"NaN");return o=o<0&&e.d[Math.max(r,n)]&1?-1:1,c.s=1,Ii=!1,a=e.times(Aj(c,i+d)),Ii=!0,a=WAe(a),a.s=o,a};Lt.toPrecision=function(e,r){var n,i,a=this,o=a.constructor;return e===void 0?(n=Ia(a),i=Cg(a,n<=o.toExpNeg||n>=o.toExpPos)):(Dd(e,1,hb),r===void 0?r=o.rounding:Dd(r,0,8),a=ni(new o(a),e,r),n=Ia(a),i=Cg(a,e<=n||n<=o.toExpNeg,e)),i};Lt.toSignificantDigits=Lt.tosd=function(e,r){var n=this,i=n.constructor;return e===void 0?(e=i.precision,r=i.rounding):(Dd(e,1,hb),r===void 0?r=i.rounding:Dd(r,0,8)),ni(new i(n),e,r)};Lt.toString=Lt.valueOf=Lt.val=Lt.toJSON=Lt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,r=Ia(e),n=e.constructor;return Cg(e,r<=n.toExpNeg||r>=n.toExpPos)};function VAe(e,r){var n,i,a,o,l,c,u,d,h=e.constructor,f=h.precision;if(!e.s||!r.s)return r.s||(r=new h(e)),Ii?ni(r,f):r;if(u=e.d,d=r.d,l=e.e,a=r.e,u=u.slice(),o=l-a,o){for(o<0?(i=u,o=-o,c=d.length):(i=d,a=l,c=u.length),l=Math.ceil(f/Ci),c=l>c?l+1:c+1,o>c&&(o=c,i.length=1),i.reverse();o--;)i.push(0);i.reverse()}for(c=u.length,o=d.length,c-o<0&&(o=c,i=d,d=u,u=i),n=0;o;)n=(u[--o]=u[o]+d[o]+n)/os|0,u[o]%=os;for(n&&(u.unshift(n),++a),c=u.length;u[--c]==0;)u.pop();return r.d=u,r.e=a,Ii?ni(r,f):r}function Dd(e,r,n){if(e!==~~e||e<r||e>n)throw Error(ng+e)}function yd(e){var r,n,i,a=e.length-1,o="",l=e[0];if(a>0){for(o+=l,r=1;r<a;r++)i=e[r]+"",n=Ci-i.length,n&&(o+=am(n)),o+=i;l=e[r],i=l+"",n=Ci-i.length,n&&(o+=am(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Mh=function(){function e(i,a){var o,l=0,c=i.length;for(i=i.slice();c--;)o=i[c]*a+l,i[c]=o%os|0,l=o/os|0;return l&&i.unshift(l),i}function r(i,a,o,l){var c,u;if(o!=l)u=o>l?1:-1;else for(c=u=0;c<o;c++)if(i[c]!=a[c]){u=i[c]>a[c]?1:-1;break}return u}function n(i,a,o){for(var l=0;o--;)i[o]-=l,l=i[o]<a[o]?1:0,i[o]=l*os+i[o]-a[o];for(;!i[0]&&i.length>1;)i.shift()}return function(i,a,o,l){var c,u,d,h,f,p,m,A,g,y,x,b,v,j,_,C,N,S,E=i.constructor,O=i.s==a.s?1:-1,B=i.d,T=a.d;if(!i.s)return new E(i);if(!a.s)throw Error(Mc+"Division by zero");for(u=i.e-a.e,N=T.length,_=B.length,m=new E(O),A=m.d=[],d=0;T[d]==(B[d]||0);)++d;if(T[d]>(B[d]||0)&&--u,o==null?b=o=E.precision:l?b=o+(Ia(i)-Ia(a))+1:b=o,b<0)return new E(0);if(b=b/Ci+2|0,d=0,N==1)for(h=0,T=T[0],b++;(d<_||h)&&b--;d++)v=h*os+(B[d]||0),A[d]=v/T|0,h=v%T|0;else{for(h=os/(T[0]+1)|0,h>1&&(T=e(T,h),B=e(B,h),N=T.length,_=B.length),j=N,g=B.slice(0,N),y=g.length;y<N;)g[y++]=0;S=T.slice(),S.unshift(0),C=T[0],T[1]>=os/2&&++C;do h=0,c=r(T,g,N,y),c<0?(x=g[0],N!=y&&(x=x*os+(g[1]||0)),h=x/C|0,h>1?(h>=os&&(h=os-1),f=e(T,h),p=f.length,y=g.length,c=r(f,g,p,y),c==1&&(h--,n(f,N<p?S:T,p))):(h==0&&(c=h=1),f=T.slice()),p=f.length,p<y&&f.unshift(0),n(g,f,y),c==-1&&(y=g.length,c=r(T,g,N,y),c<1&&(h++,n(g,N<y?S:T,y))),y=g.length):c===0&&(h++,g=[0]),A[d++]=h,c&&g[0]?g[y++]=B[j]||0:(g=[B[j]],y=1);while((j++<_||g[0]!==void 0)&&b--)}return A[0]||A.shift(),m.e=u,ni(m,l?o+Ia(m)+1:o)}}();function WAe(e,r){var n,i,a,o,l,c,u=0,d=0,h=e.constructor,f=h.precision;if(Ia(e)>16)throw Error(SQ+Ia(e));if(!e.s)return new h(Ol);for(r==null?(Ii=!1,c=f):c=r,l=new h(.03125);e.abs().gte(.1);)e=e.times(l),d+=5;for(i=Math.log(mA(2,d))/Math.LN10*2+5|0,c+=i,n=a=o=new h(Ol),h.precision=c;;){if(a=ni(a.times(e),c),n=n.times(++u),l=o.plus(Mh(a,n,c)),yd(l.d).slice(0,c)===yd(o.d).slice(0,c)){for(;d--;)o=ni(o.times(o),c);return h.precision=f,r==null?(Ii=!0,ni(o,f)):o}o=l}}function Ia(e){for(var r=e.e*Ci,n=e.d[0];n>=10;n/=10)r++;return r}function fF(e,r,n){if(r>e.LN10.sd())throw Ii=!0,n&&(e.precision=n),Error(Mc+"LN10 precision limit exceeded");return ni(new e(e.LN10),r)}function am(e){for(var r="";e--;)r+="0";return r}function Aj(e,r){var n,i,a,o,l,c,u,d,h,f=1,p=10,m=e,A=m.d,g=m.constructor,y=g.precision;if(m.s<1)throw Error(Mc+(m.s?"NaN":"-Infinity"));if(m.eq(Ol))return new g(0);if(r==null?(Ii=!1,d=y):d=r,m.eq(10))return r==null&&(Ii=!0),fF(g,d);if(d+=p,g.precision=d,n=yd(A),i=n.charAt(0),o=Ia(m),Math.abs(o)<15e14){for(;i<7&&i!=1||i==1&&n.charAt(1)>3;)m=m.times(e),n=yd(m.d),i=n.charAt(0),f++;o=Ia(m),i>1?(m=new g("0."+n),o++):m=new g(i+"."+n.slice(1))}else return u=fF(g,d+2,y).times(o+""),m=Aj(new g(i+"."+n.slice(1)),d-p).plus(u),g.precision=y,r==null?(Ii=!0,ni(m,y)):m;for(c=l=m=Mh(m.minus(Ol),m.plus(Ol),d),h=ni(m.times(m),d),a=3;;){if(l=ni(l.times(h),d),u=c.plus(Mh(l,new g(a),d)),yd(u.d).slice(0,d)===yd(c.d).slice(0,d))return c=c.times(2),o!==0&&(c=c.plus(fF(g,d+2,y).times(o+""))),c=Mh(c,new g(f),d),g.precision=y,r==null?(Ii=!0,ni(c,y)):c;c=u,a+=2}}function EY(e,r){var n,i,a;for((n=r.indexOf("."))>-1&&(r=r.replace(".","")),(i=r.search(/e/i))>0?(n<0&&(n=i),n+=+r.slice(i+1),r=r.substring(0,i)):n<0&&(n=r.length),i=0;r.charCodeAt(i)===48;)++i;for(a=r.length;r.charCodeAt(a-1)===48;)--a;if(r=r.slice(i,a),r){if(a-=i,n=n-i-1,e.e=fb(n/Ci),e.d=[],i=(n+1)%Ci,n<0&&(i+=Ci),i<a){for(i&&e.d.push(+r.slice(0,i)),a-=Ci;i<a;)e.d.push(+r.slice(i,i+=Ci));r=r.slice(i),i=Ci-r.length}else i-=a;for(;i--;)r+="0";if(e.d.push(+r),Ii&&(e.e>x5||e.e<-x5))throw Error(SQ+n)}else e.s=0,e.e=0,e.d=[0];return e}function ni(e,r,n){var i,a,o,l,c,u,d,h,f=e.d;for(l=1,o=f[0];o>=10;o/=10)l++;if(i=r-l,i<0)i+=Ci,a=r,d=f[h=0];else{if(h=Math.ceil((i+1)/Ci),o=f.length,h>=o)return e;for(d=o=f[h],l=1;o>=10;o/=10)l++;i%=Ci,a=i-Ci+l}if(n!==void 0&&(o=mA(10,l-a-1),c=d/o%10|0,u=r<0||f[h+1]!==void 0||d%o,u=n<4?(c||u)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||u||n==6&&(i>0?a>0?d/mA(10,l-a):0:f[h-1])%10&1||n==(e.s<0?8:7))),r<1||!f[0])return u?(o=Ia(e),f.length=1,r=r-o-1,f[0]=mA(10,(Ci-r%Ci)%Ci),e.e=fb(-r/Ci)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(i==0?(f.length=h,o=1,h--):(f.length=h+1,o=mA(10,Ci-i),f[h]=a>0?(d/mA(10,l-a)%mA(10,a)|0)*o:0),u)for(;;)if(h==0){(f[0]+=o)==os&&(f[0]=1,++e.e);break}else{if(f[h]+=o,f[h]!=os)break;f[h--]=0,o=1}for(i=f.length;f[--i]===0;)f.pop();if(Ii&&(e.e>x5||e.e<-x5))throw Error(SQ+Ia(e));return e}function qAe(e,r){var n,i,a,o,l,c,u,d,h,f,p=e.constructor,m=p.precision;if(!e.s||!r.s)return r.s?r.s=-r.s:r=new p(e),Ii?ni(r,m):r;if(u=e.d,f=r.d,i=r.e,d=e.e,u=u.slice(),l=d-i,l){for(h=l<0,h?(n=u,l=-l,c=f.length):(n=f,i=d,c=u.length),a=Math.max(Math.ceil(m/Ci),c)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;a--;)n.push(0);n.reverse()}else{for(a=u.length,c=f.length,h=a<c,h&&(c=a),a=0;a<c;a++)if(u[a]!=f[a]){h=u[a]<f[a];break}l=0}for(h&&(n=u,u=f,f=n,r.s=-r.s),c=u.length,a=f.length-c;a>0;--a)u[c++]=0;for(a=f.length;a>l;){if(u[--a]<f[a]){for(o=a;o&&u[--o]===0;)u[o]=os-1;--u[o],u[a]+=os}u[a]-=f[a]}for(;u[--c]===0;)u.pop();for(;u[0]===0;u.shift())--i;return u[0]?(r.d=u,r.e=i,Ii?ni(r,m):r):new p(0)}function Cg(e,r,n){var i,a=Ia(e),o=yd(e.d),l=o.length;return r?(n&&(i=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+am(i):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+am(-a-1)+o,n&&(i=n-l)>0&&(o+=am(i))):a>=l?(o+=am(a+1-l),n&&(i=n-a-1)>0&&(o=o+"."+am(i))):((i=a+1)<l&&(o=o.slice(0,i)+"."+o.slice(i)),n&&(i=n-l)>0&&(a+1===l&&(o+="."),o+=am(i))),e.s<0?"-"+o:o}function BY(e,r){if(e.length>r)return e.length=r,!0}function KAe(e){var r,n,i;function a(o){var l=this;if(!(l instanceof a))return new a(o);if(l.constructor=a,o instanceof a){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(ng+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return EY(l,o.toString())}else if(typeof o!="string")throw Error(ng+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,Kot.test(o))EY(l,o);else throw Error(ng+o)}if(a.prototype=Lt,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=KAe,a.config=a.set=Got,e===void 0&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],r=0;r<i.length;)e.hasOwnProperty(n=i[r++])||(e[n]=this[n]);return a.config(e),a}function Got(e){if(!e||typeof e!="object")throw Error(Mc+"Object expected");var r,n,i,a=["precision",1,hb,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(r=0;r<a.length;r+=3)if((i=e[n=a[r]])!==void 0)if(fb(i)===i&&i>=a[r+1]&&i<=a[r+2])this[n]=i;else throw Error(ng+n+": "+i);if((i=e[n="LN10"])!==void 0)if(i==Math.LN10)this[n]=new this(i);else throw Error(ng+n+": "+i);return this}var kQ=KAe(qot);Ol=new kQ(1);const Gn=kQ;function Xot(e){return elt(e)||Zot(e)||Jot(e)||Yot()}function Yot(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2101In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jot(e,r){if(e){if(typeof e=="string")return aM(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aM(e,r)}}function Zot(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function elt(e){if(Array.isArray(e))return aM(e)}function aM(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}var tlt=function(r){return r},GAe={"@@functional/placeholder":!0},XAe=function(r){return r===GAe},TY=function(r){return function n(){return arguments.length===0||arguments.length===1&&XAe(arguments.length<=0?void 0:arguments[0])?n:r.apply(void 0,arguments)}},rlt=function e(r,n){return r===1?n:TY(function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var l=a.filter(function(c){return c!==GAe}).length;return l>=r?n.apply(void 0,a):e(r-l,TY(function(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];var h=a.map(function(f){return XAe(f)?u.shift():f});return n.apply(void 0,Xot(h).concat(u))}))})},ET=function(r){return rlt(r.length,r)},sM=function(r,n){for(var i=[],a=r;a<n;++a)i[a-r]=a;return i},nlt=ET(function(e,r){return Array.isArray(r)?r.map(e):Object.keys(r).map(function(n){return r[n]}).map(e)}),ilt=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];if(!n.length)return tlt;var a=n.reverse(),o=a[0],l=a.slice(1);return function(){return l.reduce(function(c,u){return u(c)},o.apply(void 0,arguments))}},oM=function(r){return Array.isArray(r)?r.reverse():r.split("").reverse.join("")},YAe=function(r){var n=null,i=null;return function(){for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return n&&o.every(function(c,u){return c===n[u]})||(n=o,i=r.apply(void 0,o)),i}};function alt(e){var r;return e===0?r=1:r=Math.floor(new Gn(e).abs().log(10).toNumber())+1,r}function slt(e,r,n){for(var i=new Gn(e),a=0,o=[];i.lt(r)&&a<1e5;)o.push(i.toNumber()),i=i.add(n),a++;return o}var olt=ET(function(e,r,n){var i=+e,a=+r;return i+n*(a-i)}),llt=ET(function(e,r,n){var i=r-+e;return i=i||1/0,(n-e)/i}),clt=ET(function(e,r,n){var i=r-+e;return i=i||1/0,Math.max(0,Math.min(1,(n-e)/i))});const BT={rangeStep:slt,getDigitCount:alt,interpolateNumber:olt,uninterpolateNumber:llt,uninterpolateTruncation:clt};function lM(e){return hlt(e)||dlt(e)||JAe(e)||ult()}function ult(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2102In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dlt(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function hlt(e){if(Array.isArray(e))return cM(e)}function gj(e,r){return plt(e)||mlt(e,r)||JAe(e,r)||flt()}function flt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2103In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JAe(e,r){if(e){if(typeof e=="string")return cM(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cM(e,r)}}function cM(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function mlt(e,r){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],i=!0,a=!1,o=void 0;try{for(var l=e[Symbol.iterator](),c;!(i=(c=l.next()).done)&&(n.push(c.value),!(r&&n.length===r));i=!0);}catch(u){a=!0,o=u}finally{try{!i&&l.return!=null&&l.return()}finally{if(a)throw o}}return n}}function plt(e){if(Array.isArray(e))return e}function ZAe(e){var r=gj(e,2),n=r[0],i=r[1],a=n,o=i;return n>i&&(a=i,o=n),[a,o]}function ege(e,r,n){if(e.lte(0))return new Gn(0);var i=BT.getDigitCount(e.toNumber()),a=new Gn(10).pow(i),o=e.div(a),l=i!==1?.05:.1,c=new Gn(Math.ceil(o.div(l).toNumber())).add(n).mul(l),u=c.mul(a);return r?u:new Gn(Math.ceil(u))}function Alt(e,r,n){var i=1,a=new Gn(e);if(!a.isint()&&n){var o=Math.abs(e);o<1?(i=new Gn(10).pow(BT.getDigitCount(e)-1),a=new Gn(Math.floor(a.div(i).toNumber())).mul(i)):o>1&&(a=new Gn(Math.floor(e)))}else e===0?a=new Gn(Math.floor((r-1)/2)):n||(a=new Gn(Math.floor(e)));var l=Math.floor((r-1)/2),c=ilt(nlt(function(u){return a.add(new Gn(u-l).mul(i)).toNumber()}),sM);return c(0,r)}function tge(e,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-e)/(n-1)))return{step:new Gn(0),tickMin:new Gn(0),tickMax:new Gn(0)};var o=ege(new Gn(r).sub(e).div(n-1),i,a),l;e<=0&&r>=0?l=new Gn(0):(l=new Gn(e).add(r).div(2),l=l.sub(new Gn(l).mod(o)));var c=Math.ceil(l.sub(e).div(o).toNumber()),u=Math.ceil(new Gn(r).sub(l).div(o).toNumber()),d=c+u+1;return d>n?tge(e,r,n,i,a+1):(d<n&&(u=r>0?u+(n-d):u,c=r>0?c:c+(n-d)),{step:o,tickMin:l.sub(new Gn(c).mul(o)),tickMax:l.add(new Gn(u).mul(o))})}function glt(e){var r=gj(e,2),n=r[0],i=r[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(a,2),c=ZAe([n,i]),u=gj(c,2),d=u[0],h=u[1];if(d===-1/0||h===1/0){var f=h===1/0?[d].concat(lM(sM(0,a-1).map(function(){return 1/0}))):[].concat(lM(sM(0,a-1).map(function(){return-1/0})),[h]);return n>i?oM(f):f}if(d===h)return Alt(d,a,o);var p=tge(d,h,l,o),m=p.step,A=p.tickMin,g=p.tickMax,y=BT.rangeStep(A,g.add(new Gn(.1).mul(m)),m);return n>i?oM(y):y}function xlt(e,r){var n=gj(e,2),i=n[0],a=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=ZAe([i,a]),c=gj(l,2),u=c[0],d=c[1];if(u===-1/0||d===1/0)return[i,a];if(u===d)return[u];var h=Math.max(r,2),f=ege(new Gn(d).sub(u).div(h-1),o,0),p=[].concat(lM(BT.rangeStep(new Gn(u),new Gn(d).sub(new Gn(.99).mul(f)),f)),[d]);return i>a?oM(p):p}var ylt=YAe(glt),vlt=YAe(xlt),blt="Invariant failed";function Ng(e,r){throw new Error(blt)}var wlt=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function i0(e){"@babel/helpers - typeof";return i0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},i0(e)}function y5(){return y5=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},y5.apply(this,arguments)}function jlt(e,r){return Slt(e)||Nlt(e,r)||Clt(e,r)||_lt()}function _lt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2104In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Clt(e,r){if(e){if(typeof e=="string")return PY(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PY(e,r)}}function PY(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Nlt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Slt(e){if(Array.isArray(e))return e}function klt(e,r){if(e==null)return{};var n=Elt(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Elt(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function Blt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Tlt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ige(i.key),i)}}function Plt(e,r,n){return r&&Tlt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ilt(e,r,n){return r=v5(r),Flt(e,rge()?Reflect.construct(r,n||[],v5(e).constructor):r.apply(e,n))}function Flt(e,r){if(r&&(i0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Olt(e)}function Olt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rge=function(){return!!e})()}function v5(e){return v5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},v5(e)}function Llt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&uM(e,r)}function uM(e,r){return uM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},uM(e,r)}function nge(e,r,n){return r=ige(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ige(e){var r=Rlt(e,"string");return i0(r)=="symbol"?r:r+""}function Rlt(e,r){if(i0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(i0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var TT=function(e){function r(){return Blt(this,r),Ilt(this,r,arguments)}return Llt(r,e),Plt(r,[{key:"render",value:function(){var i=this.props,a=i.offset,o=i.layout,l=i.width,c=i.dataKey,u=i.data,d=i.dataPointFormatter,h=i.xAxis,f=i.yAxis,p=klt(i,wlt),m=tn(p,!1);this.props.direction==="x"&&h.type!=="number"&&Ng();var A=u.map(function(g){var y=d(g,c),x=y.x,b=y.y,v=y.value,j=y.errorVal;if(!j)return null;var _=[],C,N;if(Array.isArray(j)){var S=jlt(j,2);C=S[0],N=S[1]}else C=N=j;if(o==="vertical"){var E=h.scale,O=b+a,B=O+l,T=O-l,F=E(v-C),I=E(v+N);_.push({x1:I,y1:B,x2:I,y2:T}),_.push({x1:F,y1:O,x2:I,y2:O}),_.push({x1:F,y1:B,x2:F,y2:T})}else if(o==="horizontal"){var D=f.scale,L=x+a,V=L-l,U=L+l,Q=D(v-C),$=D(v+N);_.push({x1:V,y1:$,x2:U,y2:$}),_.push({x1:L,y1:Q,x2:L,y2:$}),_.push({x1:V,y1:Q,x2:U,y2:Q})}return ee.createElement(Hi,y5({className:"recharts-errorBar",key:"bar-".concat(_.map(function(q){return"".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))},m),_.map(function(q){return ee.createElement("line",y5({},q,{key:"line-".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))}))});return ee.createElement(Hi,{className:"recharts-errorBars"},A)}}])}(ee.Component);nge(TT,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});nge(TT,"displayName","ErrorBar");function xj(e){"@babel/helpers - typeof";return xj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xj(e)}function IY(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function nA(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?IY(Object(n),!0).forEach(function(i){Dlt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IY(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Dlt(e,r,n){return r=Mlt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Mlt(e){var r=zlt(e,"string");return xj(r)=="symbol"?r:r+""}function zlt(e,r){if(xj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(xj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var age=function(r){var n=r.children,i=r.formattedGraphicalItems,a=r.legendWidth,o=r.legendContent,l=Pl(n,nv);if(!l)return null;var c=nv.defaultProps,u=c!==void 0?nA(nA({},c),l.props):{},d;return l.props&&l.props.payload?d=l.props&&l.props.payload:o==="children"?d=(i||[]).reduce(function(h,f){var p=f.item,m=f.props,A=m.sectors||m.data||[];return h.concat(A.map(function(g){return{type:l.props.iconType||p.props.legendType,value:g.name,color:g.fill,payload:g}}))},[]):d=(i||[]).map(function(h){var f=h.item,p=f.type.defaultProps,m=p!==void 0?nA(nA({},p),f.props):{},A=m.dataKey,g=m.name,y=m.legendType,x=m.hide;return{inactive:x,dataKey:A,type:u.iconType||y||"square",color:EQ(f),value:g||A,payload:m}}),nA(nA(nA({},u),nv.getWithHeight(l,a)),{},{payload:d,item:l})};function yj(e){"@babel/helpers - typeof";return yj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},yj(e)}function FY(e){return Hlt(e)||Qlt(e)||$lt(e)||Ult()}function Ult(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2105In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $lt(e,r){if(e){if(typeof e=="string")return dM(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dM(e,r)}}function Qlt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hlt(e){if(Array.isArray(e))return dM(e)}function dM(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function OY(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function sa(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?OY(Object(n),!0).forEach(function(i){av(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OY(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function av(e,r,n){return r=Vlt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Vlt(e){var r=Wlt(e,"string");return yj(r)=="symbol"?r:r+""}function Wlt(e,r){if(yj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(yj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Kl(e,r,n){return on(e)||on(r)?n:Ya(r)?Fc(e,r,n):Hr(r)?r(e):n}function Hw(e,r,n,i){var a=Qot(e,function(c){return Kl(c,r)});if(n==="number"){var o=a.filter(function(c){return vt(c)||parseFloat(c)});return o.length?[kT(o),Bm(o)]:[1/0,-1/0]}var l=i?a.filter(function(c){return!on(c)}):a;return l.map(function(c){return Ya(c)||c instanceof Date?c:""})}var qlt=function(r){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,l=-1,c=(n=i==null?void 0:i.length)!==null&&n!==void 0?n:0;if(c<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var u=o.range,d=0;d<c;d++){var h=d>0?a[d-1].coordinate:a[c-1].coordinate,f=a[d].coordinate,p=d>=c-1?a[0].coordinate:a[d+1].coordinate,m=void 0;if(wu(f-h)!==wu(p-f)){var A=[];if(wu(p-f)===wu(u[1]-u[0])){m=p;var g=f+u[1]-u[0];A[0]=Math.min(g,(g+h)/2),A[1]=Math.max(g,(g+h)/2)}else{m=h;var y=p+u[1]-u[0];A[0]=Math.min(f,(y+f)/2),A[1]=Math.max(f,(y+f)/2)}var x=[Math.min(f,(m+f)/2),Math.max(f,(m+f)/2)];if(r>x[0]&&r<=x[1]||r>=A[0]&&r<=A[1]){l=a[d].index;break}}else{var b=Math.min(h,p),v=Math.max(h,p);if(r>(b+f)/2&&r<=(v+f)/2){l=a[d].index;break}}}else for(var j=0;j<c;j++)if(j===0&&r<=(i[j].coordinate+i[j+1].coordinate)/2||j>0&&j<c-1&&r>(i[j].coordinate+i[j-1].coordinate)/2&&r<=(i[j].coordinate+i[j+1].coordinate)/2||j===c-1&&r>(i[j].coordinate+i[j-1].coordinate)/2){l=i[j].index;break}return l},EQ=function(r){var n,i=r,a=i.type.displayName,o=(n=r.type)!==null&&n!==void 0&&n.defaultProps?sa(sa({},r.type.defaultProps),r.props):r.props,l=o.stroke,c=o.fill,u;switch(a){case"Line":u=l;break;case"Area":case"Radar":u=l&&l!=="none"?l:c;break;default:u=c;break}return u},Klt=function(r){var n=r.barSize,i=r.totalSize,a=r.stackGroups,o=a===void 0?{}:a;if(!o)return{};for(var l={},c=Object.keys(o),u=0,d=c.length;u<d;u++)for(var h=o[c[u]].stackGroups,f=Object.keys(h),p=0,m=f.length;p<m;p++){var A=h[f[p]],g=A.items,y=A.cateAxisId,x=g.filter(function(N){return Lh(N.type).indexOf("Bar")>=0});if(x&&x.length){var b=x[0].type.defaultProps,v=b!==void 0?sa(sa({},b),x[0].props):x[0].props,j=v.barSize,_=v[y];l[_]||(l[_]=[]);var C=on(j)?n:j;l[_].push({item:x[0],stackList:x.slice(1),barSize:on(C)?void 0:jg(C,i,0)})}}return l},Glt=function(r){var n=r.barGap,i=r.barCategoryGap,a=r.bandSize,o=r.sizeList,l=o===void 0?[]:o,c=r.maxBarSize,u=l.length;if(u<1)return null;var d=jg(n,a,0,!0),h,f=[];if(l[0].barSize===+l[0].barSize){var p=!1,m=a/u,A=l.reduce(function(j,_){return j+_.barSize||0},0);A+=(u-1)*d,A>=a&&(A-=(u-1)*d,d=0),A>=a&&m>0&&(p=!0,m*=.9,A=u*m);var g=(a-A)/2>>0,y={offset:g-d,size:0};h=l.reduce(function(j,_){var C={item:_.item,position:{offset:y.offset+y.size+d,size:p?m:_.barSize}},N=[].concat(FY(j),[C]);return y=N[N.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(S){N.push({item:S,position:y})}),N},f)}else{var x=jg(i,a,0,!0);a-2*x-(u-1)*d<=0&&(d=0);var b=(a-2*x-(u-1)*d)/u;b>1&&(b>>=0);var v=c===+c?Math.min(b,c):b;h=l.reduce(function(j,_,C){var N=[].concat(FY(j),[{item:_.item,position:{offset:x+(b+d)*C+(b-v)/2,size:v}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(S){N.push({item:S,position:N[N.length-1].position})}),N},f)}return h},Xlt=function(r,n,i,a){var o=i.children,l=i.width,c=i.margin,u=l-(c.left||0)-(c.right||0),d=age({children:o,legendWidth:u});if(d){var h=a||{},f=h.width,p=h.height,m=d.align,A=d.verticalAlign,g=d.layout;if((g==="vertical"||g==="horizontal"&&A==="middle")&&m!=="center"&&vt(r[m]))return sa(sa({},r),{},av({},m,r[m]+(f||0)));if((g==="horizontal"||g==="vertical"&&m==="center")&&A!=="middle"&&vt(r[A]))return sa(sa({},r),{},av({},A,r[A]+(p||0)))}return r},Ylt=function(r,n,i){return on(n)?!0:r==="horizontal"?n==="yAxis":r==="vertical"||i==="x"?n==="xAxis":i==="y"?n==="yAxis":!0},sge=function(r,n,i,a,o){var l=n.props.children,c=Su(l,TT).filter(function(d){return Ylt(a,o,d.props.direction)});if(c&&c.length){var u=c.map(function(d){return d.props.dataKey});return r.reduce(function(d,h){var f=Kl(h,i);if(on(f))return d;var p=Array.isArray(f)?[kT(f),Bm(f)]:[f,f],m=u.reduce(function(A,g){var y=Kl(h,g,0),x=p[0]-Math.abs(Array.isArray(y)?y[0]:y),b=p[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,A[0]),Math.max(b,A[1])]},[1/0,-1/0]);return[Math.min(m[0],d[0]),Math.max(m[1],d[1])]},[1/0,-1/0])}return null},Jlt=function(r,n,i,a,o){var l=n.map(function(c){return sge(r,c,i,o,a)}).filter(function(c){return!on(c)});return l&&l.length?l.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]):null},oge=function(r,n,i,a,o){var l=n.map(function(u){var d=u.props.dataKey;return i==="number"&&d&&sge(r,u,d,a)||Hw(r,d,i,o)});if(i==="number")return l.reduce(function(u,d){return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);var c={};return l.reduce(function(u,d){for(var h=0,f=d.length;h<f;h++)c[d[h]]||(c[d[h]]=!0,u.push(d[h]));return u},[])},lge=function(r,n){return r==="horizontal"&&n==="xAxis"||r==="vertical"&&n==="yAxis"||r==="centric"&&n==="angleAxis"||r==="radial"&&n==="radiusAxis"},cge=function(r,n,i,a){if(a)return r.map(function(u){return u.coordinate});var o,l,c=r.map(function(u){return u.coordinate===n&&(o=!0),u.coordinate===i&&(l=!0),u.coordinate});return o||c.push(n),l||c.push(i),c},Th=function(r,n,i){if(!r)return null;var a=r.scale,o=r.duplicateDomain,l=r.type,c=r.range,u=r.realScaleType==="scaleBand"?a.bandwidth()/2:2,d=(n||i)&&l==="category"&&a.bandwidth?a.bandwidth()/u:0;if(d=r.axisType==="angleAxis"&&(c==null?void 0:c.length)>=2?wu(c[0]-c[1])*2*d:d,n&&(r.ticks||r.niceTicks)){var h=(r.ticks||r.niceTicks).map(function(f){var p=o?o.indexOf(f):f;return{coordinate:a(p)+d,value:f,offset:d}});return h.filter(function(f){return!ob(f.coordinate)})}return r.isCategorical&&r.categoricalDomain?r.categoricalDomain.map(function(f,p){return{coordinate:a(f)+d,value:f,index:p,offset:d}}):a.ticks&&!i?a.ticks(r.tickCount).map(function(f){return{coordinate:a(f)+d,value:f,offset:d}}):a.domain().map(function(f,p){return{coordinate:a(f)+d,value:o?o[f]:f,index:p,offset:d}})},mF=new WeakMap,MN=function(r,n){if(typeof n!="function")return r;mF.has(r)||mF.set(r,new WeakMap);var i=mF.get(r);if(i.has(n))return i.get(n);var a=function(){r.apply(void 0,arguments),n.apply(void 0,arguments)};return i.set(n,a),a},Zlt=function(r,n,i){var a=r.scale,o=r.type,l=r.layout,c=r.axisType;if(a==="auto")return l==="radial"&&c==="radiusAxis"?{scale:dj(),realScaleType:"band"}:l==="radial"&&c==="angleAxis"?{scale:m5(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!i)?{scale:Qw(),realScaleType:"point"}:o==="category"?{scale:dj(),realScaleType:"band"}:{scale:m5(),realScaleType:"linear"};if(wg(a)){var u="scale".concat(mT(a));return{scale:(kY[u]||Qw)(),realScaleType:kY[u]?u:"point"}}return Hr(a)?{scale:a}:{scale:Qw(),realScaleType:"point"}},LY=1e-4,ect=function(r){var n=r.domain();if(!(!n||n.length<=2)){var i=n.length,a=r.range(),o=Math.min(a[0],a[1])-LY,l=Math.max(a[0],a[1])+LY,c=r(n[0]),u=r(n[i-1]);(c<o||c>l||u<o||u>l)&&r.domain([n[0],n[i-1]])}},tct=function(r,n){if(!r)return null;for(var i=0,a=r.length;i<a;i++)if(r[i].item===n)return r[i].position;return null},rct=function(r,n){if(!n||n.length!==2||!vt(n[0])||!vt(n[1]))return r;var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),o=[r[0],r[1]];return(!vt(r[0])||r[0]<i)&&(o[0]=i),(!vt(r[1])||r[1]>a)&&(o[1]=a),o[0]>a&&(o[0]=a),o[1]<i&&(o[1]=i),o},nct=function(r){var n=r.length;if(!(n<=0))for(var i=0,a=r[0].length;i<a;++i)for(var o=0,l=0,c=0;c<n;++c){var u=ob(r[c][i][1])?r[c][i][0]:r[c][i][1];u>=0?(r[c][i][0]=o,r[c][i][1]=o+u,o=r[c][i][1]):(r[c][i][0]=l,r[c][i][1]=l+u,l=r[c][i][1])}},ict=function(r){var n=r.length;if(!(n<=0))for(var i=0,a=r[0].length;i<a;++i)for(var o=0,l=0;l<n;++l){var c=ob(r[l][i][1])?r[l][i][0]:r[l][i][1];c>=0?(r[l][i][0]=o,r[l][i][1]=o+c,o=r[l][i][1]):(r[l][i][0]=0,r[l][i][1]=0)}},act={sign:nct,expand:cGe,none:Xv,silhouette:uGe,wiggle:dGe,positive:ict},sct=function(r,n,i){var a=n.map(function(c){return c.props.dataKey}),o=act[i],l=lGe().keys(a).value(function(c,u){return+Kl(c,u,0)}).order(OD).offset(o);return l(r)},oct=function(r,n,i,a,o,l){if(!r)return null;var c=l?n.reverse():n,u={},d=c.reduce(function(f,p){var m,A=(m=p.type)!==null&&m!==void 0&&m.defaultProps?sa(sa({},p.type.defaultProps),p.props):p.props,g=A.stackId,y=A.hide;if(y)return f;var x=A[i],b=f[x]||{hasStack:!1,stackGroups:{}};if(Ya(g)){var v=b.stackGroups[g]||{numericAxisId:i,cateAxisId:a,items:[]};v.items.push(p),b.hasStack=!0,b.stackGroups[g]=v}else b.stackGroups[F_("_stackId_")]={numericAxisId:i,cateAxisId:a,items:[p]};return sa(sa({},f),{},av({},x,b))},u),h={};return Object.keys(d).reduce(function(f,p){var m=d[p];if(m.hasStack){var A={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(g,y){var x=m.stackGroups[y];return sa(sa({},g),{},av({},y,{numericAxisId:i,cateAxisId:a,items:x.items,stackedData:sct(r,x.items,o)}))},A)}return sa(sa({},f),{},av({},p,m))},h)},lct=function(r,n){var i=n.realScaleType,a=n.type,o=n.tickCount,l=n.originalDomain,c=n.allowDecimals,u=i||n.scale;if(u!=="auto"&&u!=="linear")return null;if(o&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var d=r.domain();if(!d.length)return null;var h=ylt(d,o,c);return r.domain([kT(h),Bm(h)]),{niceTicks:h}}if(o&&a==="number"){var f=r.domain(),p=vlt(f,o,c);return{niceTicks:p}}return null};function RY(e){var r=e.axis,n=e.ticks,i=e.bandSize,a=e.entry,o=e.index,l=e.dataKey;if(r.type==="category"){if(!r.allowDuplicatedCategory&&r.dataKey&&!on(a[r.dataKey])){var c=QE(n,"value",a[r.dataKey]);if(c)return c.coordinate+i/2}return n[o]?n[o].coordinate+i/2:null}var u=Kl(a,on(l)?r.dataKey:l);return on(u)?null:r.scale(u)}var DY=function(r){var n=r.axis,i=r.ticks,a=r.offset,o=r.bandSize,l=r.entry,c=r.index;if(n.type==="category")return i[c]?i[c].coordinate+a:null;var u=Kl(l,n.dataKey,n.domain[c]);return on(u)?null:n.scale(u)-o/2+a},cct=function(r){var n=r.numericAxis,i=n.scale.domain();if(n.type==="number"){var a=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);return a<=0&&o>=0?0:o<0?o:a}return i[0]},uct=function(r,n){var i,a=(i=r.type)!==null&&i!==void 0&&i.defaultProps?sa(sa({},r.type.defaultProps),r.props):r.props,o=a.stackId;if(Ya(o)){var l=n[o];if(l){var c=l.items.indexOf(r);return c>=0?l.stackedData[c]:null}}return null},dct=function(r){return r.reduce(function(n,i){return[kT(i.concat([n[0]]).filter(vt)),Bm(i.concat([n[1]]).filter(vt))]},[1/0,-1/0])},uge=function(r,n,i){return Object.keys(r).reduce(function(a,o){var l=r[o],c=l.stackedData,u=c.reduce(function(d,h){var f=dct(h.slice(n,i+1));return[Math.min(d[0],f[0]),Math.max(d[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],a[0]),Math.max(u[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},MY=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zY=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hM=function(r,n,i){if(Hr(r))return r(n,i);if(!Array.isArray(r))return n;var a=[];if(vt(r[0]))a[0]=i?r[0]:Math.min(r[0],n[0]);else if(MY.test(r[0])){var o=+MY.exec(r[0])[1];a[0]=n[0]-o}else Hr(r[0])?a[0]=r[0](n[0]):a[0]=n[0];if(vt(r[1]))a[1]=i?r[1]:Math.max(r[1],n[1]);else if(zY.test(r[1])){var l=+zY.exec(r[1])[1];a[1]=n[1]+l}else Hr(r[1])?a[1]=r[1](n[1]):a[1]=n[1];return a},b5=function(r,n,i){if(r&&r.scale&&r.scale.bandwidth){var a=r.scale.bandwidth();if(!i||a>0)return a}if(r&&n&&n.length>=2){for(var o=iQ(n,function(f){return f.coordinate}),l=1/0,c=1,u=o.length;c<u;c++){var d=o[c],h=o[c-1];l=Math.min((d.coordinate||0)-(h.coordinate||0),l)}return l===1/0?0:l}return i?void 0:0},UY=function(r,n,i){return!r||!r.length||pj(r,Fc(i,"type.defaultProps.domain"))?n:r},dge=function(r,n){var i=r.type.defaultProps?sa(sa({},r.type.defaultProps),r.props):r.props,a=i.dataKey,o=i.name,l=i.unit,c=i.formatter,u=i.tooltipType,d=i.chartType,h=i.hide;return sa(sa({},tn(r,!1)),{},{dataKey:a,unit:l,formatter:c,name:o||a,color:EQ(r),value:Kl(n,a),type:u,payload:n,chartType:d,hide:h})};function vj(e){"@babel/helpers - typeof";return vj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},vj(e)}function $Y(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function QY(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?$Y(Object(n),!0).forEach(function(i){hct(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$Y(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function hct(e,r,n){return r=fct(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function fct(e){var r=mct(e,"string");return vj(r)=="symbol"?r:r+""}function mct(e,r){if(vj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(vj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var w5=Math.PI/180,pct=function(r){return r*180/Math.PI},Bs=function(r,n,i,a){return{x:r+Math.cos(-w5*a)*i,y:n+Math.sin(-w5*a)*i}},Act=function(r,n){var i=r.x,a=r.y,o=n.x,l=n.y;return Math.sqrt(Math.pow(i-o,2)+Math.pow(a-l,2))},gct=function(r,n){var i=r.x,a=r.y,o=n.cx,l=n.cy,c=Act({x:i,y:a},{x:o,y:l});if(c<=0)return{radius:c};var u=(i-o)/c,d=Math.acos(u);return a>l&&(d=2*Math.PI-d),{radius:c,angle:pct(d),angleInRadian:d}},xct=function(r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),l=Math.min(a,o);return{startAngle:n-l*360,endAngle:i-l*360}},yct=function(r,n){var i=n.startAngle,a=n.endAngle,o=Math.floor(i/360),l=Math.floor(a/360),c=Math.min(o,l);return r+c*360},HY=function(r,n){var i=r.x,a=r.y,o=gct({x:i,y:a},n),l=o.radius,c=o.angle,u=n.innerRadius,d=n.outerRadius;if(l<u||l>d)return!1;if(l===0)return!0;var h=xct(n),f=h.startAngle,p=h.endAngle,m=c,A;if(f<=p){for(;m>p;)m-=360;for(;m<f;)m+=360;A=m>=f&&m<=p}else{for(;m>f;)m-=360;for(;m<p;)m+=360;A=m>=p&&m<=f}return A?QY(QY({},n),{},{radius:l,angle:yct(m,n)}):null};function bj(e){"@babel/helpers - typeof";return bj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},bj(e)}var vct=["offset"];function bct(e){return Cct(e)||_ct(e)||jct(e)||wct()}function wct(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2106In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jct(e,r){if(e){if(typeof e=="string")return fM(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fM(e,r)}}function _ct(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cct(e){if(Array.isArray(e))return fM(e)}function fM(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Nct(e,r){if(e==null)return{};var n=Sct(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Sct(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function VY(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function Ha(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?VY(Object(n),!0).forEach(function(i){kct(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VY(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function kct(e,r,n){return r=Ect(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ect(e){var r=Bct(e,"string");return bj(r)=="symbol"?r:r+""}function Bct(e,r){if(bj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(bj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function wj(){return wj=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},wj.apply(this,arguments)}var Tct=function(r){var n=r.value,i=r.formatter,a=on(r.children)?n:r.children;return Hr(i)?i(a):a},Pct=function(r,n){var i=wu(n-r),a=Math.min(Math.abs(n-r),360);return i*a},Ict=function(r,n,i){var a=r.position,o=r.viewBox,l=r.offset,c=r.className,u=o,d=u.cx,h=u.cy,f=u.innerRadius,p=u.outerRadius,m=u.startAngle,A=u.endAngle,g=u.clockWise,y=(f+p)/2,x=Pct(m,A),b=x>=0?1:-1,v,j;a==="insideStart"?(v=m+b*l,j=g):a==="insideEnd"?(v=A-b*l,j=!g):a==="end"&&(v=A+b*l,j=g),j=x<=0?j:!j;var _=Bs(d,h,y,v),C=Bs(d,h,y,v+(j?1:-1)*359),N="M".concat(_.x,",").concat(_.y,`
2107    A`).concat(y,",").concat(y,",0,1,").concat(j?0:1,`,
2108    `).concat(C.x,",").concat(C.y),S=on(r.id)?F_("recharts-radial-line-"):r.id;return ee.createElement("text",wj({},i,{dominantBaseline:"central",className:fn("recharts-radial-bar-label",c)}),ee.createElement("defs",null,ee.createElement("path",{id:S,d:N})),ee.createElement("textPath",{xlinkHref:"#".concat(S)},n))},Fct=function(r){var n=r.viewBox,i=r.offset,a=r.position,o=n,l=o.cx,c=o.cy,u=o.innerRadius,d=o.outerRadius,h=o.startAngle,f=o.endAngle,p=(h+f)/2;if(a==="outside"){var m=Bs(l,c,d+i,p),A=m.x,g=m.y;return{x:A,y:g,textAnchor:A>=l?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"end"};var y=(u+d)/2,x=Bs(l,c,y,p),b=x.x,v=x.y;return{x:b,y:v,textAnchor:"middle",verticalAnchor:"middle"}},Oct=function(r){var n=r.viewBox,i=r.parentViewBox,a=r.offset,o=r.position,l=n,c=l.x,u=l.y,d=l.width,h=l.height,f=h>=0?1:-1,p=f*a,m=f>0?"end":"start",A=f>0?"start":"end",g=d>=0?1:-1,y=g*a,x=g>0?"end":"start",b=g>0?"start":"end";if(o==="top"){var v={x:c+d/2,y:u-f*a,textAnchor:"middle",verticalAnchor:m};return Ha(Ha({},v),i?{height:Math.max(u-i.y,0),width:d}:{})}if(o==="bottom"){var j={x:c+d/2,y:u+h+p,textAnchor:"middle",verticalAnchor:A};return Ha(Ha({},j),i?{height:Math.max(i.y+i.height-(u+h),0),width:d}:{})}if(o==="left"){var _={x:c-y,y:u+h/2,textAnchor:x,verticalAnchor:"middle"};return Ha(Ha({},_),i?{width:Math.max(_.x-i.x,0),height:h}:{})}if(o==="right"){var C={x:c+d+y,y:u+h/2,textAnchor:b,verticalAnchor:"middle"};return Ha(Ha({},C),i?{width:Math.max(i.x+i.width-C.x,0),height:h}:{})}var N=i?{width:d,height:h}:{};return o==="insideLeft"?Ha({x:c+y,y:u+h/2,textAnchor:b,verticalAnchor:"middle"},N):o==="insideRight"?Ha({x:c+d-y,y:u+h/2,textAnchor:x,verticalAnchor:"middle"},N):o==="insideTop"?Ha({x:c+d/2,y:u+p,textAnchor:"middle",verticalAnchor:A},N):o==="insideBottom"?Ha({x:c+d/2,y:u+h-p,textAnchor:"middle",verticalAnchor:m},N):o==="insideTopLeft"?Ha({x:c+y,y:u+p,textAnchor:b,verticalAnchor:A},N):o==="insideTopRight"?Ha({x:c+d-y,y:u+p,textAnchor:x,verticalAnchor:A},N):o==="insideBottomLeft"?Ha({x:c+y,y:u+h-p,textAnchor:b,verticalAnchor:m},N):o==="insideBottomRight"?Ha({x:c+d-y,y:u+h-p,textAnchor:x,verticalAnchor:m},N):nb(o)&&(vt(o.x)||EA(o.x))&&(vt(o.y)||EA(o.y))?Ha({x:c+jg(o.x,d),y:u+jg(o.y,h),textAnchor:"end",verticalAnchor:"end"},N):Ha({x:c+d/2,y:u+h/2,textAnchor:"middle",verticalAnchor:"middle"},N)},Lct=function(r){return"cx"in r&&vt(r.cx)};function to(e){var r=e.offset,n=r===void 0?5:r,i=Nct(e,vct),a=Ha({offset:n},i),o=a.viewBox,l=a.position,c=a.value,u=a.children,d=a.content,h=a.className,f=h===void 0?"":h,p=a.textBreakAll;if(!o||on(c)&&on(u)&&!w.isValidElement(d)&&!Hr(d))return null;if(w.isValidElement(d))return w.cloneElement(d,a);var m;if(Hr(d)){if(m=w.createElement(d,a),w.isValidElement(m))return m}else m=Tct(a);var A=Lct(o),g=tn(a,!0);if(A&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Ict(a,m,g);var y=A?Fct(a):Oct(a);return ee.createElement(a5,wj({className:fn("recharts-label",f)},g,y,{breakAll:p}),m)}to.displayName="Label";var hge=function(r){var n=r.cx,i=r.cy,a=r.angle,o=r.startAngle,l=r.endAngle,c=r.r,u=r.radius,d=r.innerRadius,h=r.outerRadius,f=r.x,p=r.y,m=r.top,A=r.left,g=r.width,y=r.height,x=r.clockWise,b=r.labelViewBox;if(b)return b;if(vt(g)&&vt(y)){if(vt(f)&&vt(p))return{x:f,y:p,width:g,height:y};if(vt(m)&&vt(A))return{x:m,y:A,width:g,height:y}}return vt(f)&&vt(p)?{x:f,y:p,width:0,height:0}:vt(n)&&vt(i)?{cx:n,cy:i,startAngle:o||a||0,endAngle:l||a||0,innerRadius:d||0,outerRadius:h||u||c||0,clockWise:x}:r.viewBox?r.viewBox:{}},Rct=function(r,n){return r?r===!0?ee.createElement(to,{key:"label-implicit",viewBox:n}):Ya(r)?ee.createElement(to,{key:"label-implicit",viewBox:n,value:r}):w.isValidElement(r)?r.type===to?w.cloneElement(r,{key:"label-implicit",viewBox:n}):ee.createElement(to,{key:"label-implicit",content:r,viewBox:n}):Hr(r)?ee.createElement(to,{key:"label-implicit",content:r,viewBox:n}):nb(r)?ee.createElement(to,wj({viewBox:n},r,{key:"label-implicit"})):null:null},Dct=function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!r||!r.children&&i&&!r.label)return null;var a=r.children,o=hge(r),l=Su(a,to).map(function(u,d){return w.cloneElement(u,{viewBox:n||o,key:"label-".concat(d)})});if(!i)return l;var c=Rct(r.label,n||o);return[c].concat(bct(l))};to.parseViewBox=hge;to.renderCallByParent=Dct;function Mct(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}var zct=Mct;const Uct=bn(zct);function jj(e){"@babel/helpers - typeof";return jj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},jj(e)}var $ct=["valueAccessor"],Qct=["data","dataKey","clockWise","id","textBreakAll"];function Hct(e){return Kct(e)||qct(e)||Wct(e)||Vct()}function Vct(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2109In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wct(e,r){if(e){if(typeof e=="string")return mM(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mM(e,r)}}function qct(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kct(e){if(Array.isArray(e))return mM(e)}function mM(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function j5(){return j5=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},j5.apply(this,arguments)}function WY(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function qY(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?WY(Object(n),!0).forEach(function(i){Gct(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WY(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Gct(e,r,n){return r=Xct(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Xct(e){var r=Yct(e,"string");return jj(r)=="symbol"?r:r+""}function Yct(e,r){if(jj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(jj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function KY(e,r){if(e==null)return{};var n=Jct(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Jct(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}var Zct=function(r){return Array.isArray(r.value)?Uct(r.value):r.value};function Ym(e){var r=e.valueAccessor,n=r===void 0?Zct:r,i=KY(e,$ct),a=i.data,o=i.dataKey,l=i.clockWise,c=i.id,u=i.textBreakAll,d=KY(i,Qct);return!a||!a.length?null:ee.createElement(Hi,{className:"recharts-label-list"},a.map(function(h,f){var p=on(o)?n(h,f):Kl(h&&h.payload,o),m=on(c)?{}:{id:"".concat(c,"-").concat(f)};return ee.createElement(to,j5({},tn(h,!0),d,m,{parentViewBox:h.parentViewBox,value:p,textBreakAll:u,viewBox:to.parseViewBox(on(l)?h:qY(qY({},h),{},{clockWise:l})),key:"label-".concat(f),index:f}))}))}Ym.displayName="LabelList";function eut(e,r){return e?e===!0?ee.createElement(Ym,{key:"labelList-implicit",data:r}):ee.isValidElement(e)||Hr(e)?ee.createElement(Ym,{key:"labelList-implicit",data:r,content:e}):nb(e)?ee.createElement(Ym,j5({data:r},e,{key:"labelList-implicit"})):null:null}function tut(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var i=e.children,a=Su(i,Ym).map(function(l,c){return w.cloneElement(l,{data:r,key:"labelList-".concat(c)})});if(!n)return a;var o=eut(e.label,r);return[o].concat(Hct(a))}Ym.renderCallByParent=tut;function _j(e){"@babel/helpers - typeof";return _j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_j(e)}function pM(){return pM=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},pM.apply(this,arguments)}function GY(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function XY(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?GY(Object(n),!0).forEach(function(i){rut(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GY(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function rut(e,r,n){return r=nut(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function nut(e){var r=iut(e,"string");return _j(r)=="symbol"?r:r+""}function iut(e,r){if(_j(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(_j(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var aut=function(r,n){var i=wu(n-r),a=Math.min(Math.abs(n-r),359.999);return i*a},zN=function(r){var n=r.cx,i=r.cy,a=r.radius,o=r.angle,l=r.sign,c=r.isExternal,u=r.cornerRadius,d=r.cornerIsExternal,h=u*(c?1:-1)+a,f=Math.asin(u/h)/w5,p=d?o:o+l*f,m=Bs(n,i,h,p),A=Bs(n,i,a,p),g=d?o-l*f:o,y=Bs(n,i,h*Math.cos(f*w5),g);return{center:m,circleTangency:A,lineTangency:y,theta:f}},fge=function(r){var n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,l=r.startAngle,c=r.endAngle,u=aut(l,c),d=l+u,h=Bs(n,i,o,l),f=Bs(n,i,o,d),p="M ".concat(h.x,",").concat(h.y,`
2110    A `).concat(o,",").concat(o,`,0,
2111    `).concat(+(Math.abs(u)>180),",").concat(+(l>d),`,
2112    `).concat(f.x,",").concat(f.y,`
2113  `);if(a>0){var m=Bs(n,i,a,l),A=Bs(n,i,a,d);p+="L ".concat(A.x,",").concat(A.y,`
2114            A `).concat(a,",").concat(a,`,0,
2115            `).concat(+(Math.abs(u)>180),",").concat(+(l<=d),`,
2116            `).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(n,",").concat(i," Z");return p},sut=function(r){var n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,d=r.startAngle,h=r.endAngle,f=wu(h-d),p=zN({cx:n,cy:i,radius:o,angle:d,sign:f,cornerRadius:l,cornerIsExternal:u}),m=p.circleTangency,A=p.lineTangency,g=p.theta,y=zN({cx:n,cy:i,radius:o,angle:h,sign:-f,cornerRadius:l,cornerIsExternal:u}),x=y.circleTangency,b=y.lineTangency,v=y.theta,j=u?Math.abs(d-h):Math.abs(d-h)-g-v;if(j<0)return c?"M ".concat(A.x,",").concat(A.y,`
2117        a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
2118        a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
2119      `):fge({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:d,endAngle:h});var _="M ".concat(A.x,",").concat(A.y,`
2120    A`).concat(l,",").concat(l,",0,0,").concat(+(f<0),",").concat(m.x,",").concat(m.y,`
2121    A`).concat(o,",").concat(o,",0,").concat(+(j>180),",").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
2122    A`).concat(l,",").concat(l,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
2123  `);if(a>0){var C=zN({cx:n,cy:i,radius:a,angle:d,sign:f,isExternal:!0,cornerRadius:l,cornerIsExternal:u}),N=C.circleTangency,S=C.lineTangency,E=C.theta,O=zN({cx:n,cy:i,radius:a,angle:h,sign:-f,isExternal:!0,cornerRadius:l,cornerIsExternal:u}),B=O.circleTangency,T=O.lineTangency,F=O.theta,I=u?Math.abs(d-h):Math.abs(d-h)-E-F;if(I<0&&l===0)return"".concat(_,"L").concat(n,",").concat(i,"Z");_+="L".concat(T.x,",").concat(T.y,`
2124      A`).concat(l,",").concat(l,",0,0,").concat(+(f<0),",").concat(B.x,",").concat(B.y,`
2125      A`).concat(a,",").concat(a,",0,").concat(+(I>180),",").concat(+(f>0),",").concat(N.x,",").concat(N.y,`
2126      A`).concat(l,",").concat(l,",0,0,").concat(+(f<0),",").concat(S.x,",").concat(S.y,"Z")}else _+="L".concat(n,",").concat(i,"Z");return _},out={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},mge=function(r){var n=XY(XY({},out),r),i=n.cx,a=n.cy,o=n.innerRadius,l=n.outerRadius,c=n.cornerRadius,u=n.forceCornerRadius,d=n.cornerIsExternal,h=n.startAngle,f=n.endAngle,p=n.className;if(l<o||h===f)return null;var m=fn("recharts-sector",p),A=l-o,g=jg(c,A,0,!0),y;return g>0&&Math.abs(h-f)<360?y=sut({cx:i,cy:a,innerRadius:o,outerRadius:l,cornerRadius:Math.min(g,A/2),forceCornerRadius:u,cornerIsExternal:d,startAngle:h,endAngle:f}):y=fge({cx:i,cy:a,innerRadius:o,outerRadius:l,startAngle:h,endAngle:f}),ee.createElement("path",pM({},tn(n,!0),{className:m,d:y,role:"img"}))};function Cj(e){"@babel/helpers - typeof";return Cj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Cj(e)}function AM(){return AM=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},AM.apply(this,arguments)}function YY(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function JY(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?YY(Object(n),!0).forEach(function(i){lut(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YY(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function lut(e,r,n){return r=cut(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function cut(e){var r=uut(e,"string");return Cj(r)=="symbol"?r:r+""}function uut(e,r){if(Cj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Cj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var ZY={curveBasisClosed:YKe,curveBasisOpen:JKe,curveBasis:XKe,curveBumpX:LKe,curveBumpY:RKe,curveLinearClosed:ZKe,curveLinear:AT,curveMonotoneX:eGe,curveMonotoneY:tGe,curveNatural:rGe,curveStep:nGe,curveStepAfter:aGe,curveStepBefore:iGe},UN=function(r){return r.x===+r.x&&r.y===+r.y},w1=function(r){return r.x},j1=function(r){return r.y},dut=function(r,n){if(Hr(r))return r;var i="curve".concat(mT(r));return(i==="curveMonotone"||i==="curveBump")&&n?ZY["".concat(i).c
2126oncat(n==="vertical"?"Y":"X")]:ZY[i]||AT},hut=function(r){var n=r.type,i=n===void 0?"linear":n,a=r.points,o=a===void 0?[]:a,l=r.baseLine,c=r.layout,u=r.connectNulls,d=u===void 0?!1:u,h=dut(i,c),f=d?o.filter(function(g){return UN(g)}):o,p;if(Array.isArray(l)){var m=d?l.filter(function(g){return UN(g)}):l,A=f.map(function(g,y){return JY(JY({},g),{},{base:m[y]})});return c==="vertical"?p=BN().y(j1).x1(w1).x0(function(g){return g.base.x}):p=BN().x(w1).y1(j1).y0(function(g){return g.base.y}),p.defined(UN).curve(h),p(A)}return c==="vertical"&&vt(l)?p=BN().y(j1).x1(w1).x0(l):vt(l)?p=BN().x(w1).y1(j1).y0(l):p=dpe().x(w1).y(j1),p.defined(UN).curve(h),p(f)},Vw=function(r){var n=r.className,i=r.points,a=r.path,o=r.pathRef;if((!i||!i.length)&&!a)return null;var l=i&&i.length?hut(r):a;return w.createElement("path",AM({},tn(r,!1),HE(r),{className:fn("recharts-curve",n),d:l,ref:o}))},pge={exports:{}},fut="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mut=fut,put=mut;function Age(){}function gge(){}gge.resetWarningCache=Age;var Aut=function(){function e(i,a,o,l,c,u){if(u!==put){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}}e.isRequired=e;function r(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:gge,resetWarningCache:Age};return n.PropTypes=n,n};pge.exports=Aut();var gut=pge.exports;const _e=bn(gut);var xut=Object.getOwnPropertyNames,yut=Object.getOwnPropertySymbols,vut=Object.prototype.hasOwnProperty;function eJ(e,r){return function(i,a,o){return e(i,a,o)&&r(i,a,o)}}function $N(e){return function(n,i,a){if(!n||!i||typeof n!="object"||typeof i!="object")return e(n,i,a);var o=a.cache,l=o.get(n),c=o.get(i);if(l&&c)return l===i&&c===n;o.set(n,i),o.set(i,n);var u=e(n,i,a);return o.delete(n),o.delete(i),u}}function tJ(e){return xut(e).concat(yut(e))}var but=Object.hasOwn||function(e,r){return vut.call(e,r)};function Kg(e,r){return e===r||!e&&!r&&e!==e&&r!==r}var wut="__v",jut="__o",_ut="_owner",rJ=Object.getOwnPropertyDescriptor,nJ=Object.keys;function Cut(e,r,n){var i=e.length;if(r.length!==i)return!1;for(;i-- >0;)if(!n.equals(e[i],r[i],i,i,e,r,n))return!1;return!0}function Nut(e,r){return Kg(e.getTime(),r.getTime())}function Sut(e,r){return e.name===r.name&&e.message===r.message&&e.cause===r.cause&&e.stack===r.stack}function kut(e,r){return e===r}function iJ(e,r,n){var i=e.size;if(i!==r.size)return!1;if(!i)return!0;for(var a=new Array(i),o=e.entries(),l,c,u=0;(l=o.next())&&!l.done;){for(var d=r.entries(),h=!1,f=0;(c=d.next())&&!c.done;){if(a[f]){f++;continue}var p=l.value,m=c.value;if(n.equals(p[0],m[0],u,f,e,r,n)&&n.equals(p[1],m[1],p[0],m[0],e,r,n)){h=a[f]=!0;break}f++}if(!h)return!1;u++}return!0}var Eut=Kg;function But(e,r,n){var i=nJ(e),a=i.length;if(nJ(r).length!==a)return!1;for(;a-- >0;)if(!xge(e,r,n,i[a]))return!1;return!0}function _1(e,r,n){var i=tJ(e),a=i.length;if(tJ(r).length!==a)return!1;for(var o,l,c;a-- >0;)if(o=i[a],!xge(e,r,n,o)||(l=rJ(e,o),c=rJ(r,o),(l||c)&&(!l||!c||l.configurable!==c.configurable||l.enumerable!==c.enumerable||l.writable!==c.writable)))return!1;return!0}function Tut(e,r){return Kg(e.valueOf(),r.valueOf())}function Put(e,r){return e.source===r.source&&e.flags===r.flags}function aJ(e,r,n){var i=e.size;if(i!==r.size)return!1;if(!i)return!0;for(var a=new Array(i),o=e.values(),l,c;(l=o.next())&&!l.done;){for(var u=r.values(),d=!1,h=0;(c=u.next())&&!c.done;){if(!a[h]&&n.equals(l.value,c.value,l.value,c.value,e,r,n)){d=a[h]=!0;break}h++}if(!d)return!1}return!0}function Iut(e,r){var n=e.length;if(r.length!==n)return!1;for(;n-- >0;)if(e[n]!==r[n])return!1;return!0}function Fut(e,r){return e.hostname===r.hostname&&e.pathname===r.pathname&&e.protocol===r.protocol&&e.port===r.port&&e.hash===r.hash&&e.username===r.username&&e.password===r.password}function xge(e,r,n,i){return(i===_ut||i===jut||i===wut)&&(e.$$typeof||r.$$typeof)?!0:but(r,i)&&n.equals(e[i],r[i],i,i,e,r,n)}var Out="[object Arguments]",Lut="[object Boolean]",Rut="[object Date]",Dut="[object Error]",Mut="[object Map]",zut="[object Number]",Uut="[object Object]",$ut="[object RegExp]",Qut="[object Set]",Hut="[object String]",Vut="[object URL]",Wut=Array.isArray,sJ=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,oJ=Object.assign,qut=Object.prototype.toString.call.bind(Object.prototype.toString);function Kut(e){var r=e.areArraysEqual,n=e.areDatesEqual,i=e.areErrorsEqual,a=e.areFunctionsEqual,o=e.areMapsEqual,l=e.areNumbersEqual,c=e.areObjectsEqual,u=e.arePrimitiveWrappersEqual,d=e.areRegExpsEqual,h=e.areSetsEqual,f=e.areTypedArraysEqual,p=e.areUrlsEqual;return function(A,g,y){if(A===g)return!0;
2126if(A==null||g==null)return!1;var x=typeof A;if(x!==typeof g)return!1;if(x!=="object")return x==="number"?l(A,g,y):x==="function"?a(A,g,y):!1;var b=A.constructor;if(b!==g.constructor)return!1;if(b===Object)return c(A,g,y);if(Wut(A))return r(A,g,y);if(sJ!=null&&sJ(A))return f(A,g,y);if(b===Date)return n(A,g,y);if(b===RegExp)return d(A,g,y);if(b===Map)return o(A,g,y);if(b===Set)return h(A,g,y);var v=qut(A);return v===Rut?n(A,g,y):v===$ut?d(A,g,y):v===Mut?o(A,g,y):v===Qut?h(A,g,y):v===Uut?typeof A.then!="function"&&typeof g.then!="function"&&c(A,g,y):v===Vut?p(A,g,y):v===Dut?i(A,g,y):v===Out?c(A,g,y):v===Lut||v===zut||v===Hut?u(A,g,y):!1}}function Gut(e){var r=e.circular,n=e.createCustomConfig,i=e.strict,a={areArraysEqual:i?_1:Cut,areDatesEqual:Nut,areErrorsEqual:Sut,areFunctionsEqual:kut,areMapsEqual:i?eJ(iJ,_1):iJ,areNumbersEqual:Eut,areObjectsEqual:i?_1:But,arePrimitiveWrappersEqual:Tut,areRegExpsEqual:Put,areSetsEqual:i?eJ(aJ,_1):aJ,areTypedArraysEqual:i?_1:Iut,areUrlsEqual:Fut};if(n&&(a=oJ({},a,n(a))),r){var o=$N(a.areArraysEqual),l=$N(a.areMapsEqual),c=$N(a.areObjectsEqual),u=$N(a.areSetsEqual);a=oJ({},a,{areArraysEqual:o,areMapsEqual:l,areObjectsEqual:c,areSetsEqual:u})}return a}function Xut(e){return function(r,n,i,a,o,l,c){return e(r,n,c)}}function Yut(e){var r=e.circular,n=e.comparator,i=e.createState,a=e.equals,o=e.strict;if(i)return function(u,d){var h=i(),f=h.cache,p=f===void 0?r?new WeakMap:void 0:f,m=h.meta;return n(u,d,{cache:p,equals:a,meta:m,strict:o})};if(r)return function(u,d){return n(u,d,{cache:new WeakMap,equals:a,meta:void 0,strict:o})};var l={cache:void 0,equals:a,meta:void 0,strict:o};return function(u,d){return n(u,d,l)}}var Jut=Tp();Tp({strict:!0});Tp({circular:!0});Tp({circular:!0,strict:!0});Tp({createInternalComparator:function(){return Kg}});Tp({strict:!0,createInternalComparator:function(){return Kg}});Tp({circular:!0,createInternalComparator:function(){return Kg}});Tp({circular:!0,createInternalComparator:function(){return Kg},strict:!0});function Tp(e){e===void 0&&(e={});var r=e.circular,n=r===void 0?!1:r,i=e.createInternalComparator,a=e.createState,o=e.strict,l=o===void 0?!1:o,c=Gut(e),u=Kut(c),d=i?i(u):Xut(u);return Yut({circular:n,comparator:u,createState:a,equals:d,strict:l})}function Zut(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function lJ(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,i=function a(o){n<0&&(n=o),o-n>r?(e(o),n=-1):Zut(a)};requestAnimationFrame(i)}function gM(e){"@babel/helpers - typeof";return gM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gM(e)}function edt(e){return idt(e)||ndt(e)||rdt(e)||tdt()}function tdt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2127In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rdt(e,r){if(e){if(typeof e=="string")return cJ(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cJ(e,r)}}function cJ(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function ndt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function idt(e){if(Array.isArray(e))return e}function adt(){var e={},r=function(){return null},n=!1,i=function a(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var l=o,c=edt(l),u=c[0],d=c.slice(1);if(typeof u=="number"){lJ(a.bind(null,d),u);return}a(u),lJ(a.bind(null,d));return}gM(o)==="object"&&(e=o,r(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,i(o)},subscribe:function(o){return r=o,function(){r=function(){return null}}}}}function Nj(e){"@babel/helpers - typeof";return Nj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Nj(e)}function uJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function dJ(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};
vendor: 158,308 bytes, lines 2127-2148
2127r%2?uJ(Object(n),!0).forEach(function(i){yge(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function yge(e,r,n){return r=sdt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function sdt(e){var r=odt(e,"string");return Nj(r)==="symbol"?r:String(r)}function odt(e,r){if(Nj(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Nj(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var ldt=function(r,n){return[Object.keys(r),Object.keys(n)].reduce(function(i,a){return i.filter(function(o){return a.includes(o)})})},cdt=function(r){return r},udt=function(r){return r.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Ww=function(r,n){return Object.keys(n).reduce(function(i,a){return dJ(dJ({},i),{},yge({},a,r(a,n[a])))},{})},hJ=function(r,n,i){return r.map(function(a){return"".concat(udt(a)," ").concat(n,"ms ").concat(i)}).join(",")};function ddt(e,r){return mdt(e)||fdt(e,r)||vge(e,r)||hdt()}function hdt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2128In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fdt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function mdt(e){if(Array.isArray(e))return e}function pdt(e){return xdt(e)||gdt(e)||vge(e)||Adt()}function Adt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2129In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vge(e,r){if(e){if(typeof e=="string")return xM(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xM(e,r)}}function gdt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xdt(e){if(Array.isArray(e))return xM(e)}function xM(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}var _5=1e-4,bge=function(r,n){return[0,3*r,3*n-6*r,3*r-3*n+1]},wge=function(r,n){return r.map(function(i,a){return i*Math.pow(n,a)}).reduce(function(i,a){return i+a})},fJ=function(r,n){return function(i){var a=bge(r,n);return wge(a,i)}},ydt=function(r,n){return function(i){var a=bge(r,n),o=[].concat(pdt(a.map(function(l,c){return l*c}).slice(1)),[0]);return wge(o,i)}},mJ=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=n[0],o=n[1],l=n[2],c=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,o=0,l=1,c=1;break;case"ease":a=.25,o=.1,l=.25,c=1;break;case"ease-in":a=.42,o=0,l=1,c=1;break;case"ease-out":a=.42,o=0,l=.58,c=1;break;case"ease-in-out":a=0,o=0,l=.58,c=1;break;default:{var u=n[0].split("(");if(u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4){var d=u[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),h=ddt(d,4);a=h[0],o=h[1],l=h[2],c=h[3]}}}var f=fJ(a,l),p=fJ(o,c),m=ydt(a,l),A=function(x){return x>1?1:x<0?0:x},g=function(x){for(var b=x>1?1:x,v=b,j=0;j<8;++j){var _=f(v)-b,C=m(v);if(Math.abs(_-b)<_5||C<_5)return p(v);v=A(v-_/C)}return p(v)};return g.isStepper=!1,g},vdt=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=r.stiff,i=n===void 0?100:n,a=r.damping,o=a===void 0?8:a,l=r.dt,c=l===void 0?17:l,u=function(h,f,p){var m=-(h-f)*i,A=p*o,g=p+(m-A)*c/1e3,y=p*c/1e3+h;return Math.abs(y-f)<_5&&Math.abs(g)<_5?[f,0]:[y,g]};return u.isStepper=!0,u.dt=c,u},bdt=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return mJ(a);case"spring":return vdt();default:if(a.split("(")[0]==="cubic-bezier")return mJ(a)}return typeof a=="function"?a:null};function Sj(e){"@babel/helpers - typeof";return Sj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Sj(e)}function pJ(e){return _dt(e)||jdt(e)||jge(e)||wdt()}function wdt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2130In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jdt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _dt(e){if(Array.isArray(e))return vM(e)}function AJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function Cs(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?AJ(Object(n),!0).forEach(function(i){yM(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function yM(e,r,n){return r=Cdt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Cdt(e){var r=Ndt(e,"string");return Sj(r)==="symbol"?r:String(r)}function Ndt(e,r){if(Sj(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Sj(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Sdt(e,r){return Bdt(e)||Edt(e,r)||jge(e,r)||kdt()}function kdt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2131In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jge(e,r){if(e){if(typeof e=="string")return vM(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vM(e,r)}}function vM(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Edt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Bdt(e){if(Array.isArray(e))return e}var C5=function(r,n,i){return r+(n-r)*i},bM=function(r){var n=r.from,i=r.to;return n!==i},Tdt=function e(r,n,i){var a=Ww(function(o,l){if(bM(l)){var c=r(l.from,l.to,l.velocity),u=Sdt(c,2),d=u[0],h=u[1];return Cs(Cs({},l),{},{from:d,velocity:h})}return l},n);return i<1?Ww(function(o,l){return bM(l)?Cs(Cs({},l),{},{velocity:C5(l.velocity,a[o].velocity,i),from:C5(l.from,a[o].from,i)}):l},n):e(r,a,i-1)};const Pdt=function(e,r,n,i,a){var o=ldt(e,r),l=o.reduce(function(y,x){return Cs(Cs({},y),{},yM({},x,[e[x],r[x]]))},{}),c=o.reduce(function(y,x){return Cs(Cs({},y),{},yM({},x,{from:e[x],velocity:0,to:r[x]}))},{}),u=-1,d,h,f=function(){return null},p=function(){return Ww(function(x,b){return b.from},c)},m=function(){return!Object.values(c).filter(bM).length},A=function(x){d||(d=x);var b=x-d,v=b/n.dt;c=Tdt(n,c,v),a(Cs(Cs(Cs({},e),r),p())),d=x,m()||(u=requestAnimationFrame(f))},g=function(x){h||(h=x);var b=(x-h)/i,v=Ww(function(_,C){return C5.apply(void 0,pJ(C).concat([n(b)]))},l);if(a(Cs(Cs(Cs({},e),r),v)),b<1)u=requestAnimationFrame(f);else{var j=Ww(function(_,C){return C5.apply(void 0,pJ(C).concat([n(1)]))},l);a(Cs(Cs(Cs({},e),r),j))}};return f=n.isStepper?A:g,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(u)}}};function a0(e){"@babel/helpers - typeof";return a0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},a0(e)}var Idt=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Fdt(e,r){if(e==null)return{};var n=Odt(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Odt(e,r){if(e==null)return{};var n={},i=Object.keys(e),a,o;for(o=0;o<i.length;o++)a=i[o],!(r.indexOf(a)>=0)&&(n[a]=e[a]);return n}function pF(e){return Mdt(e)||Ddt(e)||Rdt(e)||Ldt()}function Ldt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2132In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rdt(e,r){if(e){if(typeof e=="string")return wM(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wM(e,r)}}function Ddt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mdt(e){if(Array.isArray(e))return wM(e)}function wM(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function gJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function eu(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?gJ(Object(n),!0).forEach(function(i){sw(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function sw(e,r,n){return r=_ge(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function zdt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Udt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_ge(i.key),i)}}function $dt(e,r,n){return r&&Udt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _ge(e){var r=Qdt(e,"string");return a0(r)==="symbol"?r:String(r)}function Qdt(e,r){if(a0(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(a0(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Hdt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&jM(e,r)}function jM(e,r){return jM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},jM(e,r)}function Vdt(e){var r=Wdt();return function(){var i=N5(e),a;if(r){var o=N5(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return _M(this,a)}}function _M(e,r){if(r&&(a0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CM(e)}function CM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wdt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function N5(e){return N5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},N5(e)}var lf=function(e){Hdt(n,e);var r=Vdt(n);function n(i,a){var o;zdt(this,n),o=r.call(this,i,a);var l=o.props,c=l.isActive,u=l.attributeName,d=l.from,h=l.to,f=l.steps,p=l.children,m=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(CM(o)),o.changeStyle=o.changeStyle.bind(CM(o)),!c||m<=0)return o.state={style:{}},typeof p=="function"&&(o.state={style:h}),_M(o);if(f&&f.length)o.state={style:f[0].style};else if(d){if(typeof p=="function")return o.state={style:d},_M(o);o.state={style:u?sw({},u,d):d}}else o.state={style:{}};return o}return $dt(n,[{key:"componentDidMount",value:function(){var a=this.props,o=a.isActive,l=a.canBegin;this.mounted=!0,!(!o||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var o=this.props,l=o.isActive,c=o.canBegin,u=o.attributeName,d=o.shouldReAnimate,h=o.to,f=o.from,p=this.state.style;if(c){if(!l){var m={style:u?sw({},u,h):h};this.state&&p&&(u&&p[u]!==h||!u&&p!==h)&&this.setState(m);return}if(!(Jut(a.to,h)&&a.canBegin&&a.isActive)){var A=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=A||d?f:a.to;if(this.state&&p){var y={style:u?sw({},u,g):g};(u&&p[u]!==g||!u&&p!==g)&&this.setState(y)}this.runAnimation(eu(eu({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var o=this,l=a.from,c=a.to,u=a.duration,d=a.easing,h=a.begin,f=a.onAnimationEnd,p=a.onAnimationStart,m=Pdt(l,c,bdt(d),u,this.changeStyle),A=function(){o.stopJSAnimation=m()};this.manager.start([p,h,A,u,f])}},{key:"runStepAnimation",value:function(a){var o=this,l=a.steps,c=a.begin,u=a.onAnimationStart,d=l[0],h=d.style,f=d.duration,p=f===void 0?0:f,m=function(g,y,x){if(x===0)return g;var b=y.duration,v=y.easing,j=v===void 0?"ease":v,_=y.style,C=y.properties,N=y.onAnimationEnd,S=x>0?l[x-1]:y,E=C||Object.keys(_);if(typeof j=="function"||j==="spring")return[].concat(pF(g),[o.runJSAnimation.bind(o,{from:S.style,to:_,duration:b,easing:j}),b]);var O=hJ(E,b,j),B=eu(eu(eu({},S.style),_),{},{transition:O});return[].concat(pF(g),[B,b,N]).filter(cdt)};return this.manager.start([u].concat(pF(l.reduce(m,[h,Math.max(p,c)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=adt());var o=a.begin,l=a.duration,c=a.attributeName,u=a.to,d=a.easing,h=a.onAnimationStart,f=a.onAnimationEnd,p=a.steps,m=a.children,A=this.manager;if(this.unSubscribe=A.subscribe(this.handleStyleChange),typeof d=="function"||typeof m=="function"||d==="spring"){this.runJSAnimation(a);return}if(p.length>1){this.runStepAnimation(a);return}var g=c?sw({},c,u):u,y=hJ(Object.keys(g),l,d);A.start([h,o,eu(eu({},g),{},{transition:y}),l,f])}},{key:"render",value:function(){var a=this.props,o=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var c=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var u=Fdt(a,Idt),d=w.Children.count(o),h=this.state.style;if(typeof o=="function")return o(h);if(!c||d===0||l<=0)return o;var f=function(m){var A=m.props,g=A.style,y=g===void 0?{}:g,x=A.className,b=w.cloneElement(m,eu(eu({},u),{},{style:eu(eu({},y),h),className:x}));return b};return d===1?f(w.Children.only(o)):ee.createElement("div",null,w.Children.map(o,function(p){return f(p)}))}}]),n}(w.PureComponent);lf.displayName="Animate";lf.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};lf.propTypes={from:_e.oneOfType([_e.object,_e.string]),to:_e.oneOfType([_e.object,_e.string]),attributeName:_e.string,duration:_e.number,begin:_e.number,easing:_e.oneOfType([_e.string,_e.func]),steps:_e.arrayOf(_e.shape({duration:_e.number.isRequired,style:_e.object.isRequired,easing:_e.oneOfType([_e.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),_e.func]),properties:_e.arrayOf("string"),onAnimationEnd:_e.func})),children:_e.oneOfType([_e.node,_e.func]),isActive:_e.bool,canBegin:_e.bool,onAnimationEnd:_e.func,shouldReAnimate:_e.bool,onAnimationStart:_e.func,onAnimationReStart:_e.func};function kj(e){"@babel/helpers - typeof";return kj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},kj(e)}function S5(){return S5=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},S5.apply(this,arguments)}function qdt(e,r){return Ydt(e)||Xdt(e,r)||Gdt(e,r)||Kdt()}function Kdt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2133In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gdt(e,r){if(e){if(typeof e=="string")return xJ(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xJ(e,r)}}function xJ(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Xdt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Ydt(e){if(Array.isArray(e))return e}function yJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function vJ(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?yJ(Object(n),!0).forEach(function(i){Jdt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Jdt(e,r,n){return r=Zdt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Zdt(e){var r=eht(e,"string");return kj(r)=="symbol"?r:r+""}function eht(e,r){if(kj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(kj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var bJ=function(r,n,i,a,o){var l=Math.min(Math.abs(i)/2,Math.abs(a)/2),c=a>=0?1:-1,u=i>=0?1:-1,d=a>=0&&i>=0||a<0&&i<0?1:0,h;if(l>0&&o instanceof Array){for(var f=[0,0,0,0],p=0,m=4;p<m;p++)f[p]=o[p]>l?l:o[p];h="M".concat(r,",").concat(n+c*f[0]),f[0]>0&&(h+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(d,",").concat(r+u*f[0],",").concat(n)),h+="L ".concat(r+i-u*f[1],",").concat(n),f[1]>0&&(h+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(d,`,
2134        `).concat(r+i,",").concat(n+c*f[1])),h+="L ".concat(r+i,",").concat(n+a-c*f[2]),f[2]>0&&(h+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(d,`,
2135        `).concat(r+i-u*f[2],",").concat(n+a)),h+="L ".concat(r+u*f[3],",").concat(n+a),f[3]>0&&(h+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(d,`,
2136        `).concat(r,",").concat(n+a-c*f[3])),h+="Z"}else if(l>0&&o===+o&&o>0){var A=Math.min(l,o);h="M ".concat(r,",").concat(n+c*A,`
2137            A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(r+u*A,",").concat(n,`
2138            L `).concat(r+i-u*A,",").concat(n,`
2139            A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(r+i,",").concat(n+c*A,`
2140            L `).concat(r+i,",").concat(n+a-c*A,`
2141            A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(r+i-u*A,",").concat(n+a,`
2142            L `).concat(r+u*A,",").concat(n+a,`
2143            A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(r,",").concat(n+a-c*A," Z")}else h="M ".concat(r,",").concat(n," h ").concat(i," v ").concat(a," h ").concat(-i," Z");return h},tht=function(r,n){if(!r||!n)return!1;var i=r.x,a=r.y,o=n.x,l=n.y,c=n.width,u=n.height;if(Math.abs(c)>0&&Math.abs(u)>0){var d=Math.min(o,o+c),h=Math.max(o,o+c),f=Math.min(l,l+u),p=Math.max(l,l+u);return i>=d&&i<=h&&a>=f&&a<=p}return!1},rht={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},BQ=function(r){var n=vJ(vJ({},rht),r),i=w.useRef(),a=w.useState(-1),o=qdt(a,2),l=o[0],c=o[1];w.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var j=i.current.getTotalLength();j&&c(j)}catch{}},[]);var u=n.x,d=n.y,h=n.width,f=n.height,p=n.radius,m=n.className,A=n.animationEasing,g=n.animationDuration,y=n.animationBegin,x=n.isAnimationActive,b=n.isUpdateAnimationActive;if(u!==+u||d!==+d||h!==+h||f!==+f||h===0||f===0)return null;var v=fn("recharts-rectangle",m);return b?ee.createElement(lf,{canBegin:l>0,from:{width:h,height:f,x:u,y:d},to:{width:h,height:f,x:u,y:d},duration:g,animationEasing:A,isActive:b},function(j){var _=j.width,C=j.height,N=j.x,S=j.y;return ee.createElement(lf,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,isActive:x,easing:A},ee.createElement("path",S5({},tn(n,!0),{className:v,d:bJ(N,S,_,C,p),ref:i})))}):ee.createElement("path",S5({},tn(n,!0),{className:v,d:bJ(u,d,h,f,p)}))};function NM(){return NM=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},NM.apply(this,arguments)}var TQ=function(r){var n=r.cx,i=r.cy,a=r.r,o=r.className,l=fn("recharts-dot",o);return n===+n&&i===+i&&a===+a?w.createElement("circle",NM({},tn(r,!1),HE(r),{className:l,cx:n,cy:i,r:a})):null};function Ej(e){"@babel/helpers - typeof";return Ej=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ej(e)}var nht=["x","y","top","left","width","height","className"];function SM(){return SM=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},SM.apply(this,arguments)}function wJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function iht(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?wJ(Object(n),!0).forEach(function(i){aht(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function aht(e,r,n){return r=sht(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function sht(e){var r=oht(e,"string");return Ej(r)=="symbol"?r:r+""}function oht(e,r){if(Ej(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Ej(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function lht(e,r){if(e==null)return{};var n=cht(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function cht(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}var uht=function(r,n,i,a,o,l){return"M".concat(r,",").concat(o,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(i)},dht=function(r){var n=r.x,i=n===void 0?0:n,a=r.y,o=a===void 0?0:a,l=r.top,c=l===void 0?0:l,u=r.left,d=u===void 0?0:u,h=r.width,f=h===void 0?0:h,p=r.height,m=p===void 0?0:p,A=r.className,g=lht(r,nht),y=iht({x:i,y:o,top:c,left:d,width:f,height:m},g);return!vt(i)||!vt(o)||!vt(f)||!vt(m)||!vt(c)||!vt(d)?null:ee.createElement("path",SM({},tn(y,!0),{className:fn("recharts-cross",A),d:uht(i,o,f,m,c,d)}))},hht=Ope,fht=hht(Object.getPrototypeOf,Object),mht=fht,pht=gf,Aht=mht,ght=xf,xht="[object Object]",yht=Function.prototype,vht=Object.prototype,Cge=yht.toString,bht=vht.hasOwnProperty,wht=Cge.call(Object);function jht(e){if(!ght(e)||pht(e)!=xht)return!1;var r=Aht(e);if(r===null)return!0;var n=bht.call(r,"constructor")&&r.constructor;return typeof n=="function"&&n instanceof n&&Cge.call(n)==wht}var _ht=jht;const Cht=bn(_ht);var Nht=gf,Sht=xf,kht="[object Boolean]";function Eht(e){return e===!0||e===!1||Sht(e)&&Nht(e)==kht}var Bht=Eht;const Tht=bn(Bht);function Bj(e){"@babel/helpers - typeof";return Bj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bj(e)}function k5(){return k5=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},k5.apply(this,arguments)}function Pht(e,r){return Lht(e)||Oht(e,r)||Fht(e,r)||Iht()}function Iht(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2144In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fht(e,r){if(e){if(typeof e=="string")return jJ(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jJ(e,r)}}function jJ(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Oht(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Lht(e){if(Array.isArray(e))return e}function _J(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function CJ(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?_J(Object(n),!0).forEach(function(i){Rht(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_J(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Rht(e,r,n){return r=Dht(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Dht(e){var r=Mht(e,"string");return Bj(r)=="symbol"?r:r+""}function Mht(e,r){if(Bj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Bj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var NJ=function(r,n,i,a,o){var l=i-a,c;return c="M ".concat(r,",").concat(n),c+="L ".concat(r+i,",").concat(n),c+="L ".concat(r+i-l/2,",").concat(n+o),c+="L ".concat(r+i-l/2-a,",").concat(n+o),c+="L ".concat(r,",").concat(n," Z"),c},zht={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Uht=function(r){var n=CJ(CJ({},zht),r),i=w.useRef(),a=w.useState(-1),o=Pht(a,2),l=o[0],c=o[1];w.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var v=i.current.getTotalLength();v&&c(v)}catch{}},[]);var u=n.x,d=n.y,h=n.upperWidth,f=n.lowerWidth,p=n.height,m=n.className,A=n.animationEasing,g=n.animationDuration,y=n.animationBegin,x=n.isUpdateAnimationActive;if(u!==+u||d!==+d||h!==+h||f!==+f||p!==+p||h===0&&f===0||p===0)return null;var b=fn("recharts-trapezoid",m);return x?ee.createElement(lf,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:p,x:u,y:d},to:{upperWidth:h,lowerWidth:f,height:p,x:u,y:d},duration:g,animationEasing:A,isActive:x},function(v){var j=v.upperWidth,_=v.lowerWidth,C=v.height,N=v.x,S=v.y;return ee.createElement(lf,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,easing:A},ee.createElement("path",k5({},tn(n,!0),{className:b,d:NJ(N,S,j,_,C),ref:i})))}):ee.createElement("g",null,ee.createElement("path",k5({},tn(n,!0),{className:b,d:NJ(u,d,h,f,p)})))},$ht=["option","shapeType","propTransformer","activeClassName","isActive"];function Tj(e){"@babel/helpers - typeof";return Tj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Tj(e)}function Qht(e,r){if(e==null)return{};var n=Hht(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Hht(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function SJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function E5(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?SJ(Object(n),!0).forEach(function(i){Vht(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Vht(e,r,n){return r=Wht(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Wht(e){var r=qht(e,"string");return Tj(r)=="symbol"?r:r+""}function qht(e,r){if(Tj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Tj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Kht(e,r){return E5(E5({},r),e)}function Ght(e,r){return e==="symbols"}function kJ(e){var r=e.shapeType,n=e.elementProps;switch(r){case"rectangle":return ee.createElement(BQ,n);case"trapezoid":return ee.createElement(Uht,n);case"sector":return ee.createElement(mge,n);case"symbols":if(Ght(r))return ee.createElement(X$,n);break;default:return null}}function Xht(e){return w.isValidElement(e)?e.props:e}function Yht(e){var r=e.option,n=e.shapeType,i=e.propTransformer,a=i===void 0?Kht:i,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,c=e.isActive,u=Qht(e,$ht),d;if(w.isValidElement(r))d=w.cloneElement(r,E5(E5({},u),Xht(r)));else if(Hr(r))d=r(u);else if(Cht(r)&&!Tht(r)){var h=a(r,u);d=ee.createElement(kJ,{shapeType:n,elementProps:h})}else{var f=u;d=ee.createElement(kJ,{shapeType:n,elementProps:f})}return c?ee.createElement(Hi,{className:l},d):d}function PT(e,r){return r!=null&&"trapezoids"in e.props}function IT(e,r){return r!=null&&"sectors"in e.props}function Pj(e,r){return r!=null&&"points"in e.props}function Jht(e,r){var n,i,a=e.x===(r==null||(n=r.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===r.x,o=e.y===(r==null||(i=r.labelViewBox)===null||i===void 0?void 0:i.y)||e.y===r.y;return a&&o}function Zht(e,r){var n=e.endAngle===r.endAngle,i=e.startAngle===r.startAngle;return n&&i}function eft(e,r){var n=e.x===r.x,i=e.y===r.y,a=e.z===r.z;return n&&i&&a}function tft(e,r){var n;return PT(e,r)?n=Jht:IT(e,r)?n=Zht:Pj(e,r)&&(n=eft),n}function rft(e,r){var n;return PT(e,r)?n="trapezoids":IT(e,r)?n="sectors":Pj(e,r)&&(n="points"),n}function nft(e,r){if(PT(e,r)){var n;return(n=r.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(IT(e,r)){var i;return(i=r.tooltipPayload)===null||i===void 0||(i=i[0])===null||i===void 0||(i=i.payload)===null||i===void 0?void 0:i.payload}return Pj(e,r)?r.payload:{}}function ift(e){var r=e.activeTooltipItem,n=e.graphicalItem,i=e.itemData,a=rft(n,r),o=nft(n,r),l=i.filter(function(u,d){var h=pj(o,u),f=n.props[a].filter(function(A){var g=tft(n,r);return g(A,r)}),p=n.props[a].indexOf(f[f.length-1]),m=d===p;return h&&m}),c=i.indexOf(l[l.length-1]);return c}var aft=Math.ceil,sft=Math.max;function oft(e,r,n,i){for(var a=-1,o=sft(aft((r-e)/(n||1)),0),l=Array(o);o--;)l[i?o:++a]=e,e+=n;return l}var lft=oft,cft=eAe,EJ=1/0,uft=17976931348623157e292;function dft(e){if(!e)return e===0?e:0;if(e=cft(e),e===EJ||e===-EJ){var r=e<0?-1:1;return r*uft}return e===e?e:0}var Nge=dft,hft=lft,fft=vT,AF=Nge;function mft(e){return function(r,n,i){return i&&typeof i!="number"&&fft(r,n,i)&&(n=i=void 0),r=AF(r),n===void 0?(n=r,r=0):n=AF(n),i=i===void 0?r<n?1:-1:AF(i),hft(r,n,i,e)}}var pft=mft,Aft=pft,gft=Aft(),xft=gft;const B5=bn(xft);function Ij(e){"@babel/helpers - typeof";return Ij=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ij(e)}function BJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function TJ(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?BJ(Object(n),!0).forEach(function(i){Sge(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Sge(e,r,n){return r=yft(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function yft(e){var r=vft(e,"string");return Ij(r)=="symbol"?r:r+""}function vft(e,r){if(Ij(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Ij(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var bft=["Webkit","Moz","O","ms"],wft=function(r,n){var i=r.replace(/(\w)/,function(o){return o.toUpperCase()}),a=bft.reduce(function(o,l){return TJ(TJ({},o),{},Sge({},l+i,n))},{});return a[r]=n,a};function s0(e){"@babel/helpers - typeof";return s0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},s0(e)}function T5(){return T5=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},T5.apply(this,arguments)}function PJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function gF(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?PJ(Object(n),!0).forEach(function(i){El(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function jft(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function IJ(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Ege(i.key),i)}}function _ft(e,r,n){return r&&IJ(e.prototype,r),n&&IJ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cft(e,r,n){return r=P5(r),Nft(e,kge()?Reflect.construct(r,n||[],P5(e).constructor):r.apply(e,n))}function Nft(e,r){if(r&&(s0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sft(e)}function Sft(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kge=function(){return!!e})()}function P5(e){return P5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},P5(e)}function kft(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&kM(e,r)}function kM(e,r){return kM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},kM(e,r)}function El(e,r,n){return r=Ege(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ege(e){var r=Eft(e,"string");return s0(r)=="symbol"?r:r+""}function Eft(e,r){if(s0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(s0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Bft=function(r){var n=r.data,i=r.startIndex,a=r.endIndex,o=r.x,l=r.width,c=r.travellerWidth;if(!n||!n.length)return{};var u=n.length,d=Qw().domain(B5(0,u)).range([o,o+l-c]),h=d.domain().map(function(f){return d(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:d(i),endX:d(a),scale:d,scaleValues:h}},FJ=function(r){return r.changedTouches&&!!r.changedTouches.length},o0=function(e){function r(n){var i;return jft(this,r),i=Cft(this,r,[n]),El(i,"handleDrag",function(a){i.leaveTimer&&(clearTimeout(i.leaveTimer),i.leaveTimer=null),i.state.isTravellerMoving?i.handleTravellerMove(a):i.state.isSlideMoving&&i.handleSlideDrag(a)}),El(i,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&i.handleDrag(a.changedTouches[0])}),El(i,"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=i.props,o=a.endIndex,l=a.onDragEnd,c=a.startIndex;l==null||l({endIndex:o,startIndex:c})}),i.detachDragEndListener()}),El(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),El(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),El(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),El(i,"handleSlideDragStart",function(a){var o=FJ(a)?a.changedTouches[0]:a;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(i,"startX"),endX:i.handleTravellerDragStart.bind(i,"endX")},i.state={},i}return kft(r,e),_ft(r,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var a=i.startX,o=i.endX,l=this.state.scaleValues,c=this.props,u=c.gap,d=c.data,h=d.length-1,f=Math.min(a,o),p=Math.max(a,o),m=r.getIndexInRange(l,f),A=r.getIndexInRange(l,p);return{startIndex:m-m%u,endIndex:A===h?h:A-A%u}}},{key:"getTextOfTick",value:function(i){var a=this.props,o=a.data,l=a.tickFormatter,c=a.dataKey,u=Kl(o[i],c,i);return Hr(l)?l(u,i):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var a=this.state,o=a.slideMoveStartX,l=a.startX,c=a.endX,u=this.props,d=u.x,h=u.width,f=u.travellerWidth,p=u.startIndex,m=u.endIndex,A=u.onChange,g=i.pageX-o;g>0?g=Math.min(g,d+h-f-c,d+h-f-l):g<0&&(g=Math.max(g,d-l,d-c));var y=this.getIndex({startX:l+g,endX:c+g});(y.startIndex!==p||y.endIndex!==m)&&A&&A(y),this.setState({startX:l+g,endX:c+g,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,a){var o=FJ(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var a=this.state,o=a.brushMoveStartX,l=a.movingTravellerId,c=a.endX,u=a.startX,d=this.state[l],h=this.props,f=h.x,p=h.width,m=h.travellerWidth,A=h.onChange,g=h.gap,y=h.data,x={startX:this.state.startX,endX:this.state.endX},b=i.pageX-o;b>0?b=Math.min(b,f+p-m-d):b<0&&(b=Math.max(b,f-d)),x[l]=d+b;var v=this.getIndex(x),j=v.startIndex,_=v.endIndex,C=function(){var S=y.length-1;return l==="startX"&&(c>u?j%g===0:_%g===0)||c<u&&_===S||l==="endX"&&(c>u?_%g===0:j%g===0)||c>u&&_===S};this.setState(El(El({},l,d+b),"brushMoveStartX",i.pageX),function(){A&&C()&&A(v)})}},{key:"handleTravellerMoveKeyboard",value:function(i,a){var o=this,l=this.state,c=l.scaleValues,u=l.startX,d=l.endX,h=this.state[a],f=c.indexOf(h);if(f!==-1){var p=f+i;if(!(p===-1||p>=c.length)){var m=c[p];a==="startX"&&m>=d||a==="endX"&&m<=u||this.setState(El({},a,m),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,a=i.x,o=i.y,l=i.width,c=i.height,u=i.fill,d=i.stroke;return ee.createElement("rect",{stroke:d,fill:u,x:a,y:o,width:l,height:c})}},{key:"renderPanorama",value:function(){var i=this.props,a=i.x,o=i.y,l=i.width,c=i.height,u=i.data,d=i.children,h=i.padding,f=w.Children.only(d);return f?ee.cloneElement(f,{x:a,y:o,width:l,height:c,margin:h,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(i,a){var o,l,c=this,u=this.props,d=u.y,h=u.travellerWidth,f=u.height,p=u.traveller,m=u.ariaLabel,A=u.data,g=u.startIndex,y=u.endIndex,x=Math.max(i,this.props.x),b=gF(gF({},tn(this.props,!1)),{},{x,y:d,width:h,height:f}),v=m||"Min value: ".concat((o=A[g])===null||o===void 0?void 0:o.name,", Max value: ").concat((l=A[y])===null||l===void 0?void 0:l.name);return ee.createElement(Hi,{tabIndex:0,role:"slider","aria-label":v,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),c.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,a))},onFocus:function(){c.setState({isTravellerFocused:!0})},onBlur:function(){c.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},r.renderTraveller(p,b))}},{key:"renderSlide",value:function(i,a){var o=this.props,l=o.y,c=o.height,u=o.stroke,d=o.travellerWidth,h=Math.min(i,a)+d,f=Math.max(Math.abs(a-i)-d,0);return ee.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:h,y:l,width:f,height:c})}},{key:"renderText",value:function(){var i=this.props,a=i.startIndex,o=i.endIndex,l=i.y,c=i.height,u=i.travellerWidth,d=i.stroke,h=this.state,f=h.startX,p=h.endX,m=5,A={pointerEvents:"none",fill:d};return ee.createElement(Hi,{className:"recharts-brush-texts"},ee.createElement(a5,T5({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,p)-m,y:l+c/2},A),this.getTextOfTick(a)),ee.createElement(a5,T5({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,p)+u+m,y:l+c/2},A),this.getTextOfTick(o)))}},{key:"render",value:function(){var i=this.props,a=i.data,o=i.className,l=i.children,c=i.x,u=i.y,d=i.width,h=i.height,f=i.alwaysShowText,p=this.state,m=p.startX,A=p.endX,g=p.isTextActive,y=p.isSlideMoving,x=p.isTravellerMoving,b=p.isTravellerFocused;if(!a||!a.length||!vt(c)||!vt(u)||!vt(d)||!vt(h)||d<=0||h<=0)return null;var v=fn("recharts-brush",o),j=ee.Children.count(l)===1,_=wft("userSelect","none");return ee.createElement(Hi,{className:v,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),j&&this.renderPanorama(),this.renderSlide(m,A),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(A,"endX"),(g||y||x||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var a=i.x,o=i.y,l=i.width,c=i.height,u=i.stroke,d=Math.floor(o+c/2)-1;return ee.createElement(ee.Fragment,null,ee.createElement("rect",{x:a,y:o,width:l,height:c,fill:u,stroke:"none"}),ee.createElement("line",{x1:a+1,y1:d,x2:a+l-1,y2:d,fill:"none",stroke:"#fff"}),ee.createElement("line",{x1:a+1,y1:d+2,x2:a+l-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,a){var o;return ee.isValidElement(i)?o=ee.cloneElement(i,a):Hr(i)?o=i(a):o=r.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(i,a){var o=i.data,l=i.width,c=i.x,u=i.travellerWidth,d=i.updateId,h=i.startIndex,f=i.endIndex;if(o!==a.prevData||d!==a.prevUpdateId)return gF({prevData:o,prevTravellerWidth:u,prevUpdateId:d,prevX:c,prevWidth:l},o&&o.length?Bft({data:o,width:l,x:c,travellerWidth:u,startIndex:h,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||c!==a.prevX||u!==a.prevTravellerWidth)){a.scale.range([c,c+l-u]);var p=a.scale.domain().map(function(m){return a.scale(m)});return{prevData:o,prevTravellerWidth:u,prevUpdateId:d,prevX:c,prevWidth:l,startX:a.scale(i.startIndex),endX:a.scale(i.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(i,a){for(var o=i.length,l=0,c=o-1;c-l>1;){var u=Math.floor((l+c)/2);i[u]>a?c=u:l=u}return a>=i[c]?c:l}}])}(w.PureComponent);El(o0,"displayName","Brush");El(o0,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Tft=nQ;function Pft(e,r){var n;return Tft(e,function(i,a,o){return n=r(i,a,o),!n}),!!n}var Ift=Pft,Fft=Spe,Oft=kp,Lft=Ift,Rft=hl,Dft=vT;function Mft(e,r,n){var i=Rft(e)?Fft:Lft;return n&&Dft(e,r,n)&&(r=void 0),i(e,Oft(r))}var zft=Mft;const Uft=bn(zft);var Bd=function(r,n){var i=r.alwaysShow,a=r.ifOverflow;return i&&(a="extendDomain"),a===n},OJ=Gpe;function $ft(e,r,n){r=="__proto__"&&OJ?OJ(e,r,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[r]=n}var Qft=$ft,Hft=Qft,Vft=qpe,Wft=kp;function qft(e,r){var n={};return r=Wft(r),Vft(e,function(i,a,o){Hft(n,a,r(i,a,o))}),n}var Kft=qft;const Gft=bn(Kft);function Xft(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(!r(e[n],n,e))return!1;return!0}var Yft=Xft,Jft=nQ;function Zft(e,r){var n=!0;return Jft(e,function(i,a,o){return n=!!r(i,a,o),n}),n}var emt=Zft,tmt=Yft,rmt=emt,nmt=kp,imt=hl,amt=vT;function smt(e,r,n){var i=imt(e)?tmt:rmt;return n&&amt(e,r,n)&&(r=void 0),i(e,nmt(r))}var omt=smt;const Bge=bn(omt);var lmt=["x","y"];function Fj(e){"@babel/helpers - typeof";return Fj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fj(e)}function EM(){return EM=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},EM.apply(this,arguments)}function LJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function C1(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?LJ(Object(n),!0).forEach(function(i){cmt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function cmt(e,r,n){return r=umt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function umt(e){var r=dmt(e,"string");return Fj(r)=="symbol"?r:r+""}function dmt(e,r){if(Fj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Fj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function hmt(e,r){if(e==null)return{};var n=fmt(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function fmt(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function mmt(e,r){var n=e.x,i=e.y,a=hmt(e,lmt),o="".concat(n),l=parseInt(o,10),c="".concat(i),u=parseInt(c,10),d="".concat(r.height||a.height),h=parseInt(d,10),f="".concat(r.width||a.width),p=parseInt(f,10);return C1(C1(C1(C1(C1({},r),a),l?{x:l}:{}),u?{y:u}:{}),{},{height:h,width:p,name:r.name,radius:r.radius})}function RJ(e){return ee.createElement(Yht,EM({shapeType:"rectangle",propTransformer:mmt,activeClassName:"recharts-active-bar"},e))}var pmt=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(i,a){if(typeof r=="number")return r;var o=vt(i)||bqe(i);return o?r(i,a):(o||Ng(),n)}},Amt=["value","background"],Tge;function l0(e){"@babel/helpers - typeof";return l0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},l0(e)}function gmt(e,r){if(e==null)return{};var n=xmt(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function xmt(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function I5(){return I5=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},I5.apply(this,arguments)}function DJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function Na(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?DJ(Object(n),!0).forEach(function(i){Tm(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function ymt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function MJ(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Ige(i.key),i)}}function vmt(e,r,n){return r&&MJ(e.prototype,r),n&&MJ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bmt(e,r,n){return r=F5(r),wmt(e,Pge()?Reflect.construct(r,n||[],F5(e).constructor):r.apply(e,n))}function wmt(e,r){if(r&&(l0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jmt(e)}function jmt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pge=function(){return!!e})()}function F5(e){return F5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},F5(e)}function _mt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&BM(e,r)}function BM(e,r){return BM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},BM(e,r)}function Tm(e,r,n){return r=Ige(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ige(e){var r=Cmt(e,"string");return l0(r)=="symbol"?r:r+""}function Cmt(e,r){if(l0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(l0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var z_=function(e){function r(){var n;ymt(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=bmt(this,r,[].concat(a)),Tm(n,"state",{isAnimationFinished:!1}),Tm(n,"id",F_("recharts-bar-")),Tm(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),Tm(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return _mt(r,e),vmt(r,[{key:"renderRectanglesStatically",value:function(i){var a=this,o=this.props,l=o.shape,c=o.dataKey,u=o.activeIndex,d=o.activeBar,h=tn(this.props,!1);return i&&i.map(function(f,p){var m=p===u,A=m?d:l,g=Na(Na(Na({},h),f),{},{isActive:m,option:A,index:p,dataKey:c,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return ee.createElement(Hi,I5({className:"recharts-bar-rectangle"},VE(a.props,f,p),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(p)}),ee.createElement(RJ,g))})}},{key:"renderRectanglesWithAnimation",value:function(){var i=this,a=this.props,o=a.data,l=a.layout,c=a.isAnimationActive,u=a.animationBegin,d=a.animationDuration,h=a.animationEasing,f=a.animationId,p=this.state.prevData;return ee.createElement(lf,{begin:u,duration:d,isActive:c,easing:h,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var A=m.t,g=o.map(function(y,x){var b=p&&p[x];if(b){var v=xc(b.x,y.x),j=xc(b.y,y.y),_=xc(b.width,y.width),C=xc(b.height,y.height);return Na(Na({},y),{},{x:v(A),y:j(A),width:_(A),height:C(A)})}if(l==="horizontal"){var N=xc(0,y.height),S=N(A);return Na(Na({},y),{},{y:y.y+y.height-S,height:S})}var E=xc(0,y.width),O=E(A);return Na(Na({},y),{},{width:O})});return ee.createElement(Hi,null,i.renderRectanglesStatically(g))})}},{key:"renderRectangles",value:function(){var i=this.props,a=i.data,o=i.isAnimationActive,l=this.state.prevData;return o&&a&&a.length&&(!l||!pj(l,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var i=this,a=this.props,o=a.data,l=a.dataKey,c=a.activeIndex,u=tn(this.props.background,!1);return o.map(function(d,h){d.value;var f=d.background,p=gmt(d,Amt);if(!f)return null;var m=Na(Na(Na(Na(Na({},p),{},{fill:"#eee"},f),u),VE(i.props,d,h)),{},{onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd,dataKey:l,index:h,className:"recharts-bar-background-rectangle"});return ee.createElement(RJ,I5({key:"background-bar-".concat(h),option:i.props.background,isActive:h===c},m))})}},{key:"renderErrorBar",value:function(i,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.data,c=o.xAxis,u=o.yAxis,d=o.layout,h=o.children,f=Su(h,TT);if(!f)return null;var p=d==="vertical"?l[0].height/2:l[0].width/2,m=function(y,x){var b=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:b,errorVal:Kl(y,x)}},A={clipPath:i?"url(#clipPath-".concat(a,")"):null};return ee.createElement(Hi,A,f.map(function(g){return ee.cloneElement(g,{key:"error-bar-".concat(a,"-").concat(g.props.dataKey),data:l,xAxis:c,yAxis:u,layout:d,offset:p,dataPointFormatter:m})}))}},{key:"render",value:function(){var i=this.props,a=i.hide,o=i.data,l=i.className,c=i.xAxis,u=i.yAxis,d=i.left,h=i.top,f=i.width,p=i.height,m=i.isAnimationActive,A=i.background,g=i.id;if(a||!o||!o.length)return null;var y=this.state.isAnimationFinished,x=fn("recharts-bar",l),b=c&&c.allowDataOverflow,v=u&&u.allowDataOverflow,j=b||v,_=on(g)?this.id:g;return ee.createElement(Hi,{className:x},b||v?ee.createElement("defs",null,ee.createElement("clipPath",{id:"clipPath-".concat(_)},ee.createElement("rect",{x:b?d:d-f/2,y:v?h:h-p/2,width:b?f:f*2,height:v?p:p*2}))):null,ee.createElement(Hi,{className:"recharts-bar-rectangles",clipPath:j?"url(#clipPath-".concat(_,")"):null},A?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(j,_),(!m||y)&&Ym.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(i,a){return i.animationId!==a.prevAnimationId?{prevAnimationId:i.animationId,curData:i.data,prevData:a.curData}:i.data!==a.curData?{curData:i.data}:null}}])}(w.PureComponent);Tge=z_;Tm(z_,"displayName","Bar");Tm(z_,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Dh.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Tm(z_,"getComposedData",function(e){var r=e.props,n=e.item,i=e.barPosition,a=e.bandSize,o=e.xAxis,l=e.yAxis,c=e.xAxisTicks,u=e.yAxisTicks,d=e.stackedData,h=e.dataStartIndex,f=e.displayedData,p=e.offset,m=tct(i,n);if(!m)return null;var A=r.layout,g=n.type.defaultProps,y=g!==void 0?Na(Na({},g),n.props):n.props,x=y.dataKey,b=y.children,v=y.minPointSize,j=A==="horizontal"?l:o,_=d?j.scale.domain():null,C=cct({numericAxis:j}),N=Su(b,rAe),S=f.map(function(E,O){var B,T,F,I,D,L;d?B=rct(d[h+O],_):(B=Kl(E,x),Array.isArray(B)||(B=[C,B]));var V=pmt(v,Tge.defaultProps.minPointSize)(B[1],O);if(A==="horizontal"){var U,Q=[l.scale(B[0]),l.scale(B[1])],$=Q[0],q=Q[1];T=DY({axis:o,ticks:c,bandSize:a,offset:m.offset,entry:E,index:O}),F=(U=q??$)!==null&&U!==void 0?U:void 0,I=m.size;var M=$-q;if(D=Number.isNaN(M)?0:M,L={x:T,y:l.y,width:I,height:l.height},Math.abs(V)>0&&Math.abs(D)<Math.abs(V)){var z=wu(D||V)*(Math.abs(V)-Math.abs(D));F-=z,D+=z}}else{var K=[o.scale(B[0]),o.scale(B[1])],ne=K[0],ie=K[1];if(T=ne,F=DY({axis:l,ticks:u,bandSize:a,offset:m.offset,entry:E,index:O}),I=ie-ne,D=m.size,L={x:o.x,y:F,width:o.width,height:D},Math.abs(V)>0&&Math.abs(I)<Math.abs(V)){var X=wu(I||V)*(Math.abs(V)-Math.abs(I));I+=X}}return Na(Na(Na({},E),{},{x:T,y:F,width:I,height:D,value:d?B:B[1],payload:E,background:L},N&&N[O]&&N[O].props),{},{tooltipPayload:[dge(n,E)],tooltipPosition:{x:T+I/2,y:F+D/2}})});return Na({data:S,layout:A},p)});function Oj(e){"@babel/helpers - typeof";return Oj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Oj(e)}function Nmt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function zJ(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Fge(i.key),i)}}function Smt(e,r,n){return r&&zJ(e.prototype,r),n&&zJ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function UJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function mu(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?UJ(Object(n),!0).forEach(function(i){FT(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function FT(e,r,n){return r=Fge(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Fge(e){var r=kmt(e,"string");return Oj(r)=="symbol"?r:r+""}function kmt(e,r){if(Oj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Oj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Emt=function(r,n,i,a,o){var l=r.width,c=r.height,u=r.layout,d=r.children,h=Object.keys(n),f={left:i.left,leftMirror:i.left,right:l-i.right,rightMirror:l-i.right,top:i.top,topMirror:i.top,bottom:c-i.bottom,bottomMirror:c-i.bottom},p=!!Pl(d,z_);return h.reduce(function(m,A){var g=n[A],y=g.orientation,x=g.domain,b=g.padding,v=b===void 0?{}:b,j=g.mirror,_=g.reversed,C="".concat(y).concat(j?"Mirror":""),N,S,E,O,B;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var T=x[1]-x[0],F=1/0,I=g.categoricalDomain.sort(_qe);if(I.forEach(function(K,ne){ne>0&&(F=Math.min((K||0)-(I[ne-1]||0),F))}),Number.isFinite(F)){var D=F/T,L=g.layout==="vertical"?i.height:i.width;if(g.padding==="gap"&&(N=D*L/2),g.padding==="no-gap"){var V=jg(r.barCategoryGap,D*L),U=D*L/2;N=U-V-(U-V)/L*V}}}a==="xAxis"?S=[i.left+(v.left||0)+(N||0),i.left+i.width-(v.right||0)-(N||0)]:a==="yAxis"?S=u==="horizontal"?[i.top+i.height-(v.bottom||0),i.top+(v.top||0)]:[i.top+(v.top||0)+(N||0),i.top+i.height-(v.bottom||0)-(N||0)]:S=g.range,_&&(S=[S[1],S[0]]);var Q=Zlt(g,o,p),$=Q.scale,q=Q.realScaleType;$.domain(x).range(S),ect($);var M=lct($,mu(mu({},g),{},{realScaleType:q}));a==="xAxis"?(B=y==="top"&&!j||y==="bottom"&&j,E=i.left,O=f[C]-B*g.height):a==="yAxis"&&(B=y==="left"&&!j||y==="right"&&j,E=f[C]-B*g.width,O=i.top);var z=mu(mu(mu({},g),M),{},{realScaleType:q,x:E,y:O,scale:$,width:a==="xAxis"?i.width:g.width,height:a==="yAxis"?i.height:g.height});return z.bandSize=b5(z,M),!g.hide&&a==="xAxis"?f[C]+=(B?-1:1)*z.height:g.hide||(f[C]+=(B?-1:1)*z.width),mu(mu({},m),{},FT({},A,z))},{})},Oge=function(r,n){var i=r.x,a=r.y,o=n.x,l=n.y;return{x:Math.min(i,o),y:Math.min(a,l),width:Math.abs(o-i),height:Math.abs(l-a)}},Bmt=function(r){var n=r.x1,i=r.y1,a=r.x2,o=r.y2;return Oge({x:n,y:i},{x:a,y:o})},Lge=function(){function e(r){Nmt(this,e),this.scale=r}return Smt(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,o=i.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var c=this.bandwidth?this.bandwidth():0;return this.scale(n)+c}default:return this.scale(n)}if(a){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var i=this.range(),a=i[0],o=i[i.length-1];return a<=o?n>=a&&n<=o:n>=o&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])}();FT(Lge,"EPS",1e-4);var PQ=function(r){var n=Object.keys(r).reduce(function(i,a){return mu(mu({},i),{},FT({},a,Lge.create(r[a])))},{});return mu(mu({},n),{},{apply:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,c=o.position;return Gft(a,function(u,d){return n[d].apply(u,{bandAware:l,position:c})})},isInRange:function(a){return Bge(a,function(o,l){return n[l].isInRange(o)})}})};function Tmt(e){return(e%180+180)%180}var Pmt=function(r){var n=r.width,i=r.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Tmt(a),l=o*Math.PI/180,c=Math.atan(i/n),u=l>c&&l<Math.PI-c?i/Math.sin(l):n/Math.cos(l);return Math.abs(u)},Imt=kp,Fmt=O_,Omt=xT;function Lmt(e){return function(r,n,i){var a=Object(r);if(!Fmt(r)){var o=Imt(n);r=Omt(r),n=function(c){return o(a[c],c,a)}}var l=e(r,n,i);return l>-1?a[o?r[l]:l]:void 0}}var Rmt=Lmt,Dmt=Nge;function Mmt(e){var r=Dmt(e),n=r%1;return r===r?n?r-n:r:0}var zmt=Mmt,Umt=Upe,$mt=kp,Qmt=zmt,Hmt=Math.max;function Vmt(e,r,n){var i=e==null?0:e.length;if(!i)return-1;var a=n==null?0:Qmt(n);return a<0&&(a=Hmt(i+a,0)),Umt(e,$mt(r),a)}var Wmt=Vmt,qmt=Rmt,Kmt=Wmt,Gmt=qmt(Kmt),Xmt=Gmt;const Ymt=bn(Xmt);var Jmt=CWe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),IQ=w.createContext(void 0),FQ=w.createContext(void 0),Rge=w.createContext(void 0),Dge=w.createContext({}),Mge=w.createContext(void 0),zge=w.createContext(0),Uge=w.createContext(0),$J=function(r){var n=r.state,i=n.xAxisMap,a=n.yAxisMap,o=n.offset,l=r.clipPathId,c=r.children,u=r.width,d=r.height,h=Jmt(o);return ee.createElement(IQ.Provider,{value:i},ee.createElement(FQ.Provider,{value:a},ee.createElement(Dge.Provider,{value:o},ee.createElement(Rge.Provider,{value:h},ee.createElement(Mge.Provider,{value:l},ee.createElement(zge.Provider,{value:d},ee.createElement(Uge.Provider,{value:u},c)))))))},Zmt=function(){return w.useContext(Mge)},$ge=function(r){var n=w.useContext(IQ);n==null&&Ng();var i=n[r];return i==null&&Ng(),i},ept=function(){var r=w.useContext(IQ);return hm(r)},tpt=function(){var r=w.useContext(FQ),n=Ymt(r,function(i){return Bge(i.domain,Number.isFinite)});return n||hm(r)},Qge=function(r){var n=w.useContext(FQ);n==null&&Ng();var i=n[r];return i==null&&Ng(),i},rpt=function(){var r=w.useContext(Rge);return r},npt=function(){return w.useContext(Dge)},OQ=function(){return w.useContext(Uge)},LQ=function(){return w.useContext(zge)};function c0(e){"@babel/helpers - typeof";return c0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},c0(e)}function ipt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function apt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Vge(i.key),i)}}function spt(e,r,n){return r&&apt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function opt(e,r,n){return r=O5(r),lpt(e,Hge()?Reflect.construct(r,n||[],O5(e).constructor):r.apply(e,n))}function lpt(e,r){if(r&&(c0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cpt(e)}function cpt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hge=function(){return!!e})()}function O5(e){return O5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},O5(e)}function upt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&TM(e,r)}function TM(e,r){return TM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},TM(e,r)}function QJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function HJ(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?QJ(Object(n),!0).forEach(function(i){RQ(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function RQ(e,r,n){return r=Vge(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Vge(e){var r=dpt(e,"string");return c0(r)=="symbol"?r:r+""}function dpt(e,r){if(c0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(c0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function hpt(e,r){return Apt(e)||ppt(e,r)||mpt(e,r)||fpt()}function fpt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2145In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mpt(e,r){if(e){if(typeof e=="string")return VJ(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VJ(e,r)}}function VJ(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function ppt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Apt(e){if(Array.isArray(e))return e}function PM(){return PM=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},PM.apply(this,arguments)}var gpt=function(r,n){var i;return ee.isValidElement(r)?i=ee.cloneElement(r,n):Hr(r)?i=r(n):i=ee.createElement("line",PM({},n,{className:"recharts-reference-line-line"})),i},xpt=function(r,n,i,a,o,l,c,u,d){var h=o.x,f=o.y,p=o.width,m=o.height;if(i){var A=d.y,g=r.y.apply(A,{position:l});if(Bd(d,"discard")&&!r.y.isInRange(g))return null;var y=[{x:h+p,y:g},{x:h,y:g}];return u==="left"?y.reverse():y}if(n){var x=d.x,b=r.x.apply(x,{position:l});if(Bd(d,"discard")&&!r.x.isInRange(b))return null;var v=[{x:b,y:f+m},{x:b,y:f}];return c==="top"?v.reverse():v}if(a){var j=d.segment,_=j.map(function(C){return r.apply(C,{position:l})});return Bd(d,"discard")&&Uft(_,function(C){return!r.isInRange(C)})?null:_}return null};function ypt(e){var r=e.x,n=e.y,i=e.segment,a=e.xAxisId,o=e.yAxisId,l=e.shape,c=e.className,u=e.alwaysShow,d=Zmt(),h=$ge(a),f=Qge(o),p=rpt();if(!d||!p)return null;Rh(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=PQ({x:h.scale,y:f.scale}),A=Ya(r),g=Ya(n),y=i&&i.length===2,x=xpt(m,A,g,y,p,e.position,h.orientation,f.orientation,e);if(!x)return null;var b=hpt(x,2),v=b[0],j=v.x,_=v.y,C=b[1],N=C.x,S=C.y,E=Bd(e,"hidden")?"url(#".concat(d,")"):void 0,O=HJ(HJ({clipPath:E},tn(e,!0)),{},{x1:j,y1:_,x2:N,y2:S});return ee.createElement(Hi,{className:fn("recharts-reference-line",c)},gpt(l,O),to.renderCallByParent(e,Bmt({x1:j,y1:_,x2:N,y2:S})))}var DQ=function(e){function r(){return ipt(this,r),opt(this,r,arguments)}return upt(r,e),spt(r,[{key:"render",value:function(){return ee.createElement(ypt,this.props)}}])}(ee.Component);RQ(DQ,"displayName","ReferenceLine");RQ(DQ,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function IM(){return IM=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},IM.apply(this,arguments)}function u0(e){"@babel/helpers - typeof";return u0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},u0(e)}function WJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function qJ(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?WJ(Object(n),!0).forEach(function(i){OT(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function vpt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function bpt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,qge(i.key),i)}}function wpt(e,r,n){return r&&bpt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function jpt(e,r,n){return r=L5(r),_pt(e,Wge()?Reflect.construct(r,n||[],L5(e).constructor):r.apply(e,n))}function _pt(e,r){if(r&&(u0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cpt(e)}function Cpt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wge=function(){return!!e})()}function L5(e){return L5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},L5(e)}function Npt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&FM(e,r)}function FM(e,r){return FM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},FM(e,r)}function OT(e,r,n){return r=qge(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function qge(e){var r=Spt(e,"string");return u0(r)=="symbol"?r:r+""}function Spt(e,r){if(u0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(u0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var kpt=function(r){var n=r.x,i=r.y,a=r.xAxis,o=r.yAxis,l=PQ({x:a.scale,y:o.scale}),c=l.apply({x:n,y:i},{bandAware:!0});return Bd(r,"discard")&&!l.isInRange(c)?null:c},LT=function(e){function r(){return vpt(this,r),jpt(this,r,arguments)}return Npt(r,e),wpt(r,[{key:"render",value:function(){var i=this.props,a=i.x,o=i.y,l=i.r,c=i.alwaysShow,u=i.clipPathId,d=Ya(a),h=Ya(o);if(Rh(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!h)return null;var f=kpt(this.props);if(!f)return null;var p=f.x,m=f.y,A=this.props,g=A.shape,y=A.className,x=Bd(this.props,"hidden")?"url(#".concat(u,")"):void 0,b=qJ(qJ({clipPath:x},tn(this.props,!0)),{},{cx:p,cy:m});return ee.createElement(Hi,{className:fn("recharts-reference-dot",y)},r.renderDot(g,b),to.renderCallByParent(this.props,{x:p-l,y:m-l,width:2*l,height:2*l}))}}])}(ee.Component);OT(LT,"displayName","ReferenceDot");OT(LT,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});OT(LT,"renderDot",function(e,r){var n;return ee.isValidElement(e)?n=ee.cloneElement(e,r):Hr(e)?n=e(r):n=ee.createElement(TQ,IM({},r,{cx:r.cx,cy:r.cy,className:"recharts-reference-dot-dot"})),n});function OM(){return OM=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},OM.apply(this,arguments)}function d0(e){"@babel/helpers - typeof";return d0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},d0(e)}function KJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function GJ(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?KJ(Object(n),!0).forEach(function(i){RT(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ept(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Bpt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Gge(i.key),i)}}function Tpt(e,r,n){return r&&Bpt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ppt(e,r,n){return r=R5(r),Ipt(e,Kge()?Reflect.construct(r,n||[],R5(e).constructor):r.apply(e,n))}function Ipt(e,r){if(r&&(d0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fpt(e)}function Fpt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kge=function(){return!!e})()}function R5(e){return R5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},R5(e)}function Opt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&LM(e,r)}function LM(e,r){return LM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},LM(e,r)}function RT(e,r,n){return r=Gge(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Gge(e){var r=Lpt(e,"string");return d0(r)=="symbol"?r:r+""}function Lpt(e,r){if(d0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(d0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Rpt=function(r,n,i,a,o){var l=o.x1,c=o.x2,u=o.y1,d=o.y2,h=o.xAxis,f=o.yAxis;if(!h||!f)return null;var p=PQ({x:h.scale,y:f.scale}),m={x:r?p.x.apply(l,{position:"start"}):p.x.rangeMin,y:i?p.y.apply(u,{position:"start"}):p.y.rangeMin},A={x:n?p.x.apply(c,{position:"end"}):p.x.rangeMax,y:a?p.y.apply(d,{position:"end"}):p.y.rangeMax};return Bd(o,"discard")&&(!p.isInRange(m)||!p.isInRange(A))?null:Oge(m,A)},DT=function(e){function r(){return Ept(this,r),Ppt(this,r,arguments)}return Opt(r,e),Tpt(r,[{key:"render",value:function(){var i=this.props,a=i.x1,o=i.x2,l=i.y1,c=i.y2,u=i.className,d=i.alwaysShow,h=i.clipPathId;Rh(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ya(a),p=Ya(o),m=Ya(l),A=Ya(c),g=this.props.shape;if(!f&&!p&&!m&&!A&&!g)return null;var y=Rpt(f,p,m,A,this.props);if(!y&&!g)return null;var x=Bd(this.props,"hidden")?"url(#".concat(h,")"):void 0;return ee.createElement(Hi,{className:fn("recharts-reference-area",u)},r.renderRect(g,GJ(GJ({clipPath:x},tn(this.props,!0)),y)),to.renderCallByParent(this.props,y))}}])}(ee.Component);RT(DT,"displayName","ReferenceArea");RT(DT,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});RT(DT,"renderRect",function(e,r){var n;return ee.isValidElement(e)?n=ee.cloneElement(e,r):Hr(e)?n=e(r):n=ee.createElement(BQ,OM({},r,{className:"recharts-reference-area-rect"})),n});function Xge(e,r,n){if(r<1)return[];if(r===1&&n===void 0)return e;for(var i=[],a=0;a<e.length;a+=r)i.push(e[a]);return i}function Dpt(e,r,n){var i={width:e.width+r.width,height:e.height+r.height};return Pmt(i,n)}function Mpt(e,r,n){var i=n==="width",a=e.x,o=e.y,l=e.width,c=e.height;return r===1?{start:i?a:o,end:i?a+l:o+c}:{start:i?a+l:o+c,end:i?a:o}}function D5(e,r,n,i,a){if(e*r<e*i||e*r>e*a)return!1;var o=n();return e*(r-e*o/2-i)>=0&&e*(r+e*o/2-a)<=0}function zpt(e,r){return Xge(e,r+1)}function Upt(e,r,n,i,a){for(var o=(i||[]).slice(),l=r.start,c=r.end,u=0,d=1,h=l,f=function(){var A=i==null?void 0:i[u];if(A===void 0)return{v:Xge(i,d)};var g=u,y,x=function(){return y===void 0&&(y=n(A,g)),y},b=A.coordinate,v=u===0||D5(e,b,x,h,c);v||(u=0,h=l,d+=1),v&&(h=b+e*(x()/2+a),u+=d)},p;d<=o.length;)if(p=f(),p)return p.v;return[]}function Lj(e){"@babel/helpers - typeof";return Lj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Lj(e)}function XJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function Js(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?XJ(Object(n),!0).forEach(function(i){$pt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function $pt(e,r,n){return r=Qpt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Qpt(e){var r=Hpt(e,"string");return Lj(r)=="symbol"?r:r+""}function Hpt(e,r){if(Lj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Lj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Vpt(e,r,n,i,a){for(var o=(i||[]).slice(),l=o.length,c=r.start,u=r.end,d=function(p){var m=o[p],A,g=function(){return A===void 0&&(A=n(m,p)),A};if(p===l-1){var y=e*(m.coordinate+e*g()/2-u);o[p]=m=Js(Js({},m),{},{tickCoord:y>0?m.coordinate-y*e:m.coordinate})}else o[p]=m=Js(Js({},m),{},{tickCoord:m.coordinate});var x=D5(e,m.tickCoord,g,c,u);x&&(u=m.tickCoord-e*(g()/2+a),o[p]=Js(Js({},m),{},{isShow:!0}))},h=l-1;h>=0;h--)d(h);return o}function Wpt(e,r,n,i,a,o){var l=(i||[]).slice(),c=l.length,u=r.start,d=r.end;if(o){var h=i[c-1],f=n(h,c-1),p=e*(h.coordinate+e*f/2-d);l[c-1]=h=Js(Js({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var m=D5(e,h.tickCoord,function(){return f},u,d);m&&(d=h.tickCoord-e*(f/2+a),l[c-1]=Js(Js({},h),{},{isShow:!0}))}for(var A=o?c-1:c,g=function(b){var v=l[b],j,_=function(){return j===void 0&&(j=n(v,b)),j};if(b===0){var C=e*(v.coordinate-e*_()/2-u);l[b]=v=Js(Js({},v),{},{tickCoord:C<0?v.coordinate-C*e:v.coordinate})}else l[b]=v=Js(Js({},v),{},{tickCoord:v.coordinate});var N=D5(e,v.tickCoord,_,u,d);N&&(u=v.tickCoord+e*(_()/2+a),l[b]=Js(Js({},v),{},{isShow:!0}))},y=0;y<A;y++)g(y);return l}function MQ(e,r,n){var i=e.tick,a=e.ticks,o=e.viewBox,l=e.minTickGap,c=e.orientation,u=e.interval,d=e.tickFormatter,h=e.unit,f=e.angle;if(!a||!a.length||!i)return[];if(vt(u)||Dh.isSsr)return zpt(a,typeof u=="number"&&vt(u)?u:0);var p=[],m=c==="top"||c==="bottom"?"width":"height",A=h&&m==="width"?$w(h,{fontSize:r,letterSpacing:n}):{width:0,height:0},g=function(v,j){var _=Hr(d)?d(v.value,j):v.value;return m==="width"?Dpt($w(_,{fontSize:r,letterSpacing:n}),A,f):$w(_,{fontSize:r,letterSpacing:n})[m]},y=a.length>=2?wu(a[1].coordinate-a[0].coordinate):1,x=Mpt(o,y,m);return u==="equidistantPreserveStart"?Upt(y,x,g,a,l):(u==="preserveStart"||u==="preserveStartEnd"?p=Wpt(y,x,g,a,l,u==="preserveStartEnd"):p=Vpt(y,x,g,a,l),p.filter(function(b){return b.isShow}))}var qpt=["viewBox"],Kpt=["viewBox"],Gpt=["ticks"];function h0(e){"@babel/helpers - typeof";return h0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},h0(e)}function Py(){return Py=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Py.apply(this,arguments)}function YJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function Qa(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?YJ(Object(n),!0).forEach(function(i){zQ(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function xF(e,r){if(e==null)return{};var n=Xpt(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Xpt(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function Ypt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function JJ(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Jge(i.key),i)}}function Jpt(e,r,n){return r&&JJ(e.prototype,r),n&&JJ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zpt(e,r,n){return r=M5(r),eAt(e,Yge()?Reflect.construct(r,n||[],M5(e).constructor):r.apply(e,n))}function eAt(e,r){if(r&&(h0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tAt(e)}function tAt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yge=function(){return!!e})()}function M5(e){return M5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},M5(e)}function rAt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&RM(e,r)}function RM(e,r){return RM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},RM(e,r)}function zQ(e,r,n){return r=Jge(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Jge(e){var r=nAt(e,"string");return h0(r)=="symbol"?r:r+""}function nAt(e,r){if(h0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(h0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var mb=function(e){function r(n){var i;return Ypt(this,r),i=Zpt(this,r,[n]),i.state={fontSize:"",letterSpacing:""},i}return rAt(r,e),Jpt(r,[{key:"shouldComponentUpdate",value:function(i,a){var o=i.viewBox,l=xF(i,qpt),c=this.props,u=c.viewBox,d=xF(c,Kpt);return!rv(o,u)||!rv(l,d)||!rv(a,this.state)}},{key:"componentDidMount",value:function(){var i=this.layerReference;if(i){var a=i.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(i){var a=this.props,o=a.x,l=a.y,c=a.width,u=a.height,d=a.orientation,h=a.tickSize,f=a.mirror,p=a.tickMargin,m,A,g,y,x,b,v=f?-1:1,j=i.tickSize||h,_=vt(i.tickCoord)?i.tickCoord:i.coordinate;switch(d){case"top":m=A=i.coordinate,y=l+ +!f*u,g=y-v*j,b=g-v*p,x=_;break;case"left":g=y=i.coordinate,A=o+ +!f*c,m=A-v*j,x=m-v*p,b=_;break;case"right":g=y=i.coordinate,A=o+ +f*c,m=A+v*j,x=m+v*p,b=_;break;default:m=A=i.coordinate,y=l+ +f*u,g=y+v*j,b=g+v*p,x=_;break}return{line:{x1:m,y1:g,x2:A,y2:y},tick:{x,y:b}}}},{key:"getTickTextAnchor",value:function(){var i=this.props,a=i.orientation,o=i.mirror,l;switch(a){case"left":l=o?"start":"end";break;case"right":l=o?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var i=this.props,a=i.orientation,o=i.mirror,l="end";switch(a){case"left":case"right":l="middle";break;case"top":l=o?"start":"end";break;default:l=o?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var i=this.props,a=i.x,o=i.y,l=i.width,c=i.height,u=i.orientation,d=i.mirror,h=i.axisLine,f=Qa(Qa(Qa({},tn(this.props,!1)),tn(h,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var p=+(u==="top"&&!d||u==="bottom"&&d);f=Qa(Qa({},f),{},{x1:a,y1:o+p*c,x2:a+l,y2:o+p*c})}else{var m=+(u==="left"&&!d||u==="right"&&d);f=Qa(Qa({},f),{},{x1:a+m*l,y1:o,x2:a+m*l,y2:o+c})}return ee.createElement("line",Py({},f,{className:fn("recharts-cartesian-axis-line",Fc(h,"className"))}))}},{key:"renderTicks",value:function(i,a,o){var l=this,c=this.props,u=c.tickLine,d=c.stroke,h=c.tick,f=c.tickFormatter,p=c.unit,m=MQ(Qa(Qa({},this.props),{},{ticks:i}),a,o),A=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),y=tn(this.props,!1),x=tn(h,!1),b=Qa(Qa({},y),{},{fill:"none"},tn(u,!1)),v=m.map(function(j,_){var C=l.getTickLineCoord(j),N=C.line,S=C.tick,E=Qa(Qa(Qa(Qa({textAnchor:A,verticalAnchor:g},y),{},{stroke:"none",fill:d},x),S),{},{index:_,payload:j,visibleTicksCount:m.length,tickFormatter:f});return ee.createElement(Hi,Py({className:"recharts-cartesian-axis-tick",key:"tick-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},VE(l.props,j,_)),u&&ee.createElement("line",Py({},b,N,{className:fn("recharts-cartesian-axis-tick-line",Fc(u,"className"))})),h&&r.renderTickItem(h,E,"".concat(Hr(f)?f(j.value,_):j.value).concat(p||"")))});return ee.createElement("g",{className:"recharts-cartesian-axis-ticks"},v)}},{key:"render",value:function(){var i=this,a=this.props,o=a.axisLine,l=a.width,c=a.height,u=a.ticksGenerator,d=a.className,h=a.hide;if(h)return null;var f=this.props,p=f.ticks,m=xF(f,Gpt),A=p;return Hr(u)&&(A=p&&p.length>0?u(this.props):u(m)),l<=0||c<=0||!A||!A.length?null:ee.createElement(Hi,{className:fn("recharts-cartesian-axis",d),ref:function(y){i.layerReference=y}},o&&this.renderAxisLine(),this.renderTicks(A,this.state.fontSize,this.state.letterSpacing),to.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,a,o){var l,c=fn(a.className,"recharts-cartesian-axis-tick-value");return ee.isValidElement(i)?l=ee.cloneElement(i,Qa(Qa({},a),{},{className:c})):Hr(i)?l=i(Qa(Qa({},a),{},{className:c})):l=ee.createElement(a5,Py({},a,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])}(w.Component);zQ(mb,"displayName","CartesianAxis");zQ(mb,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var iAt=["x1","y1","x2","y2","key"],aAt=["offset"];function Sg(e){"@babel/helpers - typeof";return Sg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Sg(e)}function ZJ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function ro(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ZJ(Object(n),!0).forEach(function(i){sAt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZJ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function sAt(e,r,n){return r=oAt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function oAt(e){var r=lAt(e,"string");return Sg(r)=="symbol"?r:r+""}function lAt(e,r){if(Sg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Sg(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function PA(){return PA=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},PA.apply(this,arguments)}function eZ(e,r){if(e==null)return{};var n=cAt(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function cAt(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}var uAt=function(r){var n=r.fill;if(!n||n==="none")return null;var i=r.fillOpacity,a=r.x,o=r.y,l=r.width,c=r.height,u=r.ry;return ee.createElement("rect",{x:a,y:o,ry:u,width:l,height:c,stroke:"none",fill:n,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function Zge(e,r){var n;if(ee.isValidElement(e))n=ee.cloneElement(e,r);else if(Hr(e))n=e(r);else{var i=r.x1,a=r.y1,o=r.x2,l=r.y2,c=r.key,u=eZ(r,iAt),d=tn(u,!1);d.offset;var h=eZ(d,aAt);n=ee.createElement("line",PA({},h,{x1:i,y1:a,x2:o,y2:l,fill:"none",key:c}))}return n}function dAt(e){var r=e.x,n=e.width,i=e.horizontal,a=i===void 0?!0:i,o=e.horizontalPoints;if(!a||!o||!o.length)return null;var l=o.map(function(c,u){var d=ro(ro({},e),{},{x1:r,y1:c,x2:r+n,y2:c,key:"line-".concat(u),index:u});return Zge(a,d)});return ee.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function hAt(e){var r=e.y,n=e.height,i=e.vertical,a=i===void 0?!0:i,o=e.verticalPoints;if(!a||!o||!o.length)return null;var l=o.map(function(c,u){var d=ro(ro({},e),{},{x1:c,y1:r,x2:c,y2:r+n,key:"line-".concat(u),index:u});return Zge(a,d)});return ee.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function fAt(e){var r=e.horizontalFill,n=e.fillOpacity,i=e.x,a=e.y,o=e.width,l=e.height,c=e.horizontalPoints,u=e.horizontal,d=u===void 0?!0:u;if(!d||!r||!r.length)return null;var h=c.map(function(p){return Math.round(p+a-a)}).sort(function(p,m){return p-m});a!==h[0]&&h.unshift(0);var f=h.map(function(p,m){var A=!h[m+1],g=A?a+l-p:h[m+1]-p;if(g<=0)return null;var y=m%r.length;return ee.createElement("rect",{key:"react-".concat(m),y:p,x:i,height:g,width:o,stroke:"none",fill:r[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return ee.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function mAt(e){var r=e.vertical,n=r===void 0?!0:r,i=e.verticalFill,a=e.fillOpacity,o=e.x,l=e.y,c=e.width,u=e.height,d=e.verticalPoints;if(!n||!i||!i.length)return null;var h=d.map(function(p){return Math.round(p+o-o)}).sort(function(p,m){return p-m});o!==h[0]&&h.unshift(0);var f=h.map(function(p,m){var A=!h[m+1],g=A?o+c-p:h[m+1]-p;if(g<=0)return null;var y=m%i.length;return ee.createElement("rect",{key:"react-".concat(m),x:p,y:l,width:g,height:u,stroke:"none",fill:i[y],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return ee.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var pAt=function(r,n){var i=r.xAxis,a=r.width,o=r.height,l=r.offset;return cge(MQ(ro(ro(ro({},mb.defaultProps),i),{},{ticks:Th(i,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.left,l.left+l.width,n)},AAt=function(r,n){var i=r.yAxis,a=r.width,o=r.height,l=r.offset;return cge(MQ(ro(ro(ro({},mb.defaultProps),i),{},{ticks:Th(i,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.top,l.top+l.height,n)},Rx={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function exe(e){var r,n,i,a,o,l,c=OQ(),u=LQ(),d=npt(),h=ro(ro({},e),{},{stroke:(r=e.stroke)!==null&&r!==void 0?r:Rx.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Rx.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:Rx.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Rx.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Rx.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:Rx.verticalFill,x:vt(e.x)?e.x:d.left,y:vt(e.y)?e.y:d.top,width:vt(e.width)?e.width:d.width,height:vt(e.height)?e.height:d.height}),f=h.x,p=h.y,m=h.width,A=h.height,g=h.syncWithTicks,y=h.horizontalValues,x=h.verticalValues,b=ept(),v=tpt();if(!vt(m)||m<=0||!vt(A)||A<=0||!vt(f)||f!==+f||!vt(p)||p!==+p)return null;var j=h.verticalCoordinatesGenerator||pAt,_=h.horizontalCoordinatesGenerator||AAt,C=h.horizontalPoints,N=h.verticalPoints;if((!C||!C.length)&&Hr(_)){var S=y&&y.length,E=_({yAxis:v?ro(ro({},v),{},{ticks:S?y:v.ticks}):void 0,width:c,height:u,offset:d},S?!0:g);Rh(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Sg(E),"]")),Array.isArray(E)&&(C=E)}if((!N||!N.length)&&Hr(j)){var O=x&&x.length,B=j({xAxis:b?ro(ro({},b),{},{ticks:O?x:b.ticks}):void 0,width:c,height:u,offset:d},O?!0:g);Rh(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Sg(B),"]")),Array.isArray(B)&&(N=B)}return ee.createElement("g",{className:"recharts-cartesian-grid"},ee.createElement(uAt,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),ee.createElement(dAt,PA({},h,{offset:d,horizontalPoints:C,xAxis:b,yAxis:v})),ee.createElement(hAt,PA({},h,{offset:d,verticalPoints:N,xAxis:b,yAxis:v})),ee.createElement(fAt,PA({},h,{horizontalPoints:C})),ee.createElement(mAt,PA({},h,{verticalPoints:N})))}exe.displayName="CartesianGrid";var gAt=["layout","type","stroke","connectNulls","isRange","ref"],xAt=["key"],txe;function f0(e){"@babel/helpers - typeof";return f0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f0(e)}function rxe(e,r){if(e==null)return{};var n=yAt(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function yAt(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function IA(){return IA=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},IA.apply(this,arguments)}function tZ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function Jf(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?tZ(Object(n),!0).forEach(function(i){vd(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tZ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function vAt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function rZ(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ixe(i.key),i)}}function bAt(e,r,n){return r&&rZ(e.prototype,r),n&&rZ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wAt(e,r,n){return r=z5(r),jAt(e,nxe()?Reflect.construct(r,n||[],z5(e).constructor):r.apply(e,n))}function jAt(e,r){if(r&&(f0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _At(e)}function _At(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nxe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nxe=function(){return!!e})()}function z5(e){return z5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z5(e)}function CAt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&DM(e,r)}function DM(e,r){return DM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},DM(e,r)}function vd(e,r,n){return r=ixe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ixe(e){var r=NAt(e,"string");return f0(r)=="symbol"?r:r+""}function NAt(e,r){if(f0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(f0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Pp=function(e){function r(){var n;vAt(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=wAt(this,r,[].concat(a)),vd(n,"state",{isAnimationFinished:!0}),vd(n,"id",F_("recharts-area-")),vd(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Hr(l)&&l()}),vd(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Hr(l)&&l()}),n}return CAt(r,e),bAt(r,[{key:"renderDots",value:function(i,a,o){var l=this.props.isAnimationActive,c=this.state.isAnimationFinished;if(l&&!c)return null;var u=this.props,d=u.dot,h=u.points,f=u.dataKey,p=tn(this.props,!1),m=tn(d,!0),A=h.map(function(y,x){var b=Jf(Jf(Jf({key:"dot-".concat(x),r:3},p),m),{},{index:x,cx:y.x,cy:y.y,dataKey:f,value:y.value,payload:y.payload,points:h});return r.renderDotItem(d,b)}),g={clipPath:i?"url(#clipPath-".concat(a?"":"dots-").concat(o,")"):null};return ee.createElement(Hi,IA({className:"recharts-area-dots"},g),A)}},{key:"renderHorizontalRect",value:function(i){var a=this.props,o=a.baseLine,l=a.points,c=a.strokeWidth,u=l[0].x,d=l[l.length-1].x,h=i*Math.abs(u-d),f=Bm(l.map(function(p){return p.y||0}));return vt(o)&&typeof o=="number"?f=Math.max(o,f):o&&Array.isArray(o)&&o.length&&(f=Math.max(Bm(o.map(function(p){return p.y||0})),f)),vt(f)?ee.createElement("rect",{x:u<d?u:u-h,y:0,width:h,height:Math.floor(f+(c?parseInt("".concat(c),10):1))}):null}},{key:"renderVerticalRect",value:function(i){var a=this.props,o=a.baseLine,l=a.points,c=a.strokeWidth,u=l[0].y,d=l[l.length-1].y,h=i*Math.abs(u-d),f=Bm(l.map(function(p){return p.x||0}));return vt(o)&&typeof o=="number"?f=Math.max(o,f):o&&Array.isArray(o)&&o.length&&(f=Math.max(Bm(o.map(function(p){return p.x||0})),f)),vt(f)?ee.createElement("rect",{x:0,y:u<d?u:u-h,width:f+(c?parseInt("".concat(c),10):1),height:Math.floor(h)}):null}},{key:"renderClipRect",value:function(i){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(i):this.renderHorizontalRect(i)}},{key:"renderAreaStatically",value:function(i,a,o,l){var c=this.props,u=c.layout,d=c.type,h=c.stroke,f=c.connectNulls,p=c.isRange;c.ref;var m=rxe(c,gAt);return ee.createElement(Hi,{clipPath:o?"url(#clipPath-".concat(l,")"):null},ee.createElement(Vw,IA({},tn(m,!0),{points:i,connectNulls:f,type:d,baseLine:a,layout:u,stroke:"none",className:"recharts-area-area"})),h!=="none"&&ee.createElement(Vw,IA({},tn(this.props,!1),{className:"recharts-area-curve",layout:u,type:d,connectNulls:f,fill:"none",points:i})),h!=="none"&&p&&ee.createElement(Vw,IA({},tn(this.props,!1),{className:"recharts-area-curve",layout:u,type:d,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(i,a){var o=this,l=this.props,c=l.points,u=l.baseLine,d=l.isAnimationActive,h=l.animationBegin,f=l.animationDuration,p=l.animationEasing,m=l.animationId,A=this.state,g=A.prevPoints,y=A.prevBaseLine;return ee.createElement(lf,{begin:h,duration:f,isActive:d,easing:p,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var b=x.t;if(g){var v=g.length/c.length,j=c.map(function(S,E){var O=Math.floor(E*v);if(g[O]){var B=g[O],T=xc(B.x,S.x),F=xc(B.y,S.y);return Jf(Jf({},S),{},{x:T(b),y:F(b)})}return S}),_;if(vt(u)&&typeof u=="number"){var C=xc(y,u);_=C(b)}else if(on(u)||ob(u)){var N=xc(y,0);_=N(b)}else _=u.map(function(S,E){var O=Math.floor(E*v);if(y[O]){var B=y[O],T=xc(B.x,S.x),F=xc(B.y,S.y);return Jf(Jf({},S),{},{x:T(b),y:F(b)})}return S});return o.renderAreaStatically(j,_,i,a)}return ee.createElement(Hi,null,ee.createElement("defs",null,ee.createElement("clipPath",{id:"animationClipPath-".concat(a)},o.renderClipRect(b))),ee.createElement(Hi,{clipPath:"url(#animationClipPath-".concat(a,")")},o.renderAreaStatically(c,u,i,a)))})}},{key:"renderArea",value:function(i,a){var o=this.props,l=o.points,c=o.baseLine,u=o.isAnimationActive,d=this.state,h=d.prevPoints,f=d.prevBaseLine,p=d.totalLength;return u&&l&&l.length&&(!h&&p>0||!pj(h,l)||!pj(f,c))?this.renderAreaWithAnimation(i,a):this.renderAreaStatically(l,c,i,a)}},{key:"render",value:function(){var i,a=this.props,o=a.hide,l=a.dot,c=a.points,u=a.className,d=a.top,h=a.left,f=a.xAxis,p=a.yAxis,m=a.width,A=a.height,g=a.isAnimationActive,y=a.id;if(o||!c||!c.length)return null;var x=this.state.isAnimationFinished,b=c.length===1,v=fn("recharts-area",u),j=f&&f.allowDataOverflow,_=p&&p.allowDataOverflow,C=j||_,N=on(y)?this.id:y,S=(i=tn(l,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},E=S.r,O=E===void 0?3:E,B=S.strokeWidth,T=B===void 0?2:B,F=Iqe(l)?l:{},I=F.clipDot,D=I===void 0?!0:I,L=O*2+T;return ee.createElement(Hi,{className:v},j||_?ee.createElement("defs",null,ee.createElement("clipPath",{id:"clipPath-".concat(N)},ee.createElement("rect",{x:j?h:h-m/2,y:_?d:d-A/2,width:j?m:m*2,height:_?A:A*2})),!D&&ee.createElement("clipPath",{id:"clipPath-dots-".concat(N)},ee.createElement("rect",{x:h-L/2,y:d-L/2,width:m+L,height:A+L}))):null,b?null:this.renderArea(C,N),(l||b)&&this.renderDots(C,D,N),(!g||x)&&Ym.renderCallByParent(this.props,c))}}],[{key:"getDerivedStateFromProps",value:function(i,a){return i.animationId!==a.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:i.points!==a.curPoints||i.baseLine!==a.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])}(w.PureComponent);txe=Pp;vd(Pp,"displayName","Area");vd(Pp,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Dh.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});vd(Pp,"getBaseValue",function(e,r,n,i){var a=e.layout,o=e.baseValue,l=r.props.baseValue,c=l??o;if(vt(c)&&typeof c=="number")return c;var u=a==="horizontal"?i:n,d=u.scale.domain();if(u.type==="number"){var h=Math.max(d[0],d[1]),f=Math.min(d[0],d[1]);return c==="dataMin"?f:c==="dataMax"||h<0?h:Math.max(Math.min(d[0],d[1]),0)}return c==="dataMin"?d[0]:c==="dataMax"?d[1]:d[0]});vd(Pp,"getComposedData",function(e){var r=e.props,n=e.item,i=e.xAxis,a=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,c=e.bandSize,u=e.dataKey,d=e.stackedData,h=e.dataStartIndex,f=e.displayedData,p=e.offset,m=r.layout,A=d&&d.length,g=txe.getBaseValue(r,n,i,a),y=m==="horizontal",x=!1,b=f.map(function(j,_){var C;A?C=d[h+_]:(C=Kl(j,u),Array.isArray(C)?x=!0:C=[g,C]);var N=C[1]==null||A&&Kl(j,u)==null;return y?{x:RY({axis:i,ticks:o,bandSize:c,entry:j,index:_}),y:N?null:a.scale(C[1]),value:C,payload:j}:{x:N?null:i.scale(C[1]),y:RY({axis:a,ticks:l,bandSize:c,entry:j,index:_}),value:C,payload:j}}),v;return A||x?v=b.map(function(j){var _=Array.isArray(j.value)?j.value[0]:null;return y?{x:j.x,y:_!=null&&j.y!=null?a.scale(_):null}:{x:_!=null?i.scale(_):null,y:j.y}}):v=y?a.scale(g):i.scale(g),Jf({points:b,baseLine:v,layout:m,isRange:x},p)});vd(Pp,"renderDotItem",function(e,r){var n;if(ee.isValidElement(e))n=ee.cloneElement(e,r);else if(Hr(e))n=e(r);else{var i=fn("recharts-area-dot",typeof e!="boolean"?e.className:""),a=r.key,o=rxe(r,xAt);n=ee.createElement(TQ,IA({},o,{key:a,className:i}))}return n});function m0(e){"@babel/helpers - typeof";return m0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},m0(e)}function SAt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function kAt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,oxe(i.key),i)}}function EAt(e,r,n){return r&&kAt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function BAt(e,r,n){return r=U5(r),TAt(e,axe()?Reflect.construct(r,n||[],U5(e).constructor):r.apply(e,n))}function TAt(e,r){if(r&&(m0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PAt(e)}function PAt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function axe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(axe=function(){return!!e})()}function U5(e){return U5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},U5(e)}function IAt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&MM(e,r)}function MM(e,r){return MM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},MM(e,r)}function sxe(e,r,n){return r=oxe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function oxe(e){var r=FAt(e,"string");return m0(r)=="symbol"?r:r+""}function FAt(e,r){if(m0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(m0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function zM(){return zM=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},zM.apply(this,arguments)}function OAt(e){var r=e.xAxisId,n=OQ(),i=LQ(),a=$ge(r);return a==null?null:w.createElement(mb,zM({},a,{className:fn("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(l){return Th(l,!0)}}))}var MT=function(e){function r(){return SAt(this,r),BAt(this,r,arguments)}return IAt(r,e),EAt(r,[{key:"render",value:function(){return w.createElement(OAt,this.props)}}])}(w.Component);sxe(MT,"displayName","XAxis");sxe(MT,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function p0(e){"@babel/helpers - typeof";return p0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},p0(e)}function LAt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function RAt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,uxe(i.key),i)}}function DAt(e,r,n){return r&&RAt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function MAt(e,r,n){return r=$5(r),zAt(e,lxe()?Reflect.construct(r,n||[],$5(e).constructor):r.apply(e,n))}function zAt(e,r){if(r&&(p0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UAt(e)}function UAt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lxe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lxe=function(){return!!e})()}function $5(e){return $5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$5(e)}function $At(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&UM(e,r)}function UM(e,r){return UM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},UM(e,r)}function cxe(e,r,n){return r=uxe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function uxe(e){var r=QAt(e,"string");return p0(r)=="symbol"?r:r+""}function QAt(e,r){if(p0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(p0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function $M(){return $M=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},$M.apply(this,arguments)}var HAt=function(r){var n=r.yAxisId,i=OQ(),a=LQ(),o=Qge(n);return o==null?null:w.createElement(mb,$M({},o,{className:fn("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:i,height:a},ticksGenerator:function(c){return Th(c,!0)}}))},zT=function(e){function r(){return LAt(this,r),MAt(this,r,arguments)}return $At(r,e),DAt(r,[{key:"render",value:function(){return w.createElement(HAt,this.props)}}])}(w.Component);cxe(zT,"displayName","YAxis");cxe(zT,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function nZ(e){return KAt(e)||qAt(e)||WAt(e)||VAt()}function VAt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2146In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WAt(e,r){if(e){if(typeof e=="string")return QM(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QM(e,r)}}function qAt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KAt(e){if(Array.isArray(e))return QM(e)}function QM(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}var HM=function(r,n,i,a,o){var l=Su(r,DQ),c=Su(r,LT),u=[].concat(nZ(l),nZ(c)),d=Su(r,DT),h="".concat(a,"Id"),f=a[0],p=n;if(u.length&&(p=u.reduce(function(g,y){if(y.props[h]===i&&Bd(y.props,"extendDomain")&&vt(y.props[f])){var x=y.props[f];return[Math.min(g[0],x),Math.max(g[1],x)]}return g},p)),d.length){var m="".concat(f,"1"),A="".concat(f,"2");p=d.reduce(function(g,y){if(y.props[h]===i&&Bd(y.props,"extendDomain")&&vt(y.props[m])&&vt(y.props[A])){var x=y.props[m],b=y.props[A];return[Math.min(g[0],x,b),Math.max(g[1],x,b)]}return g},p)}return o&&o.length&&(p=o.reduce(function(g,y){return vt(y)?[Math.min(g[0],y),Math.max(g[1],y)]:g},p)),p},dxe={exports:{}};(function(e){var r=Object.prototype.hasOwnProperty,n="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1));function a(u,d,h){this.fn=u,this.context=d,this.once=h||!1}function o(u,d,h,f,p){if(typeof h!="function")throw new TypeError("The listener must be a function");var m=new a(h,f||u,p),A=n?n+d:d;return u._events[A]?u._events[A].fn?u._events[A]=[u._events[A],m]:u._events[A].push(m):(u._events[A]=m,u._eventsCount++),u}function l(u,d){--u._eventsCount===0?u._events=new i:delete u._events[d]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],h,f;if(this._eventsCount===0)return d;for(f in h=this._events)r.call(h,f)&&d.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},c.prototype.listeners=function(d){var h=n?n+d:d,f=this._events[h];if(!f)return[];if(f.fn)return[f.fn];for(var p=0,m=f.length,A=new Array(m);p<m;p++)A[p]=f[p].fn;return A},c.prototype.listenerCount=function(d){var h=n?n+d:d,f=this._events[h];return f?f.fn?1:f.length:0},c.prototype.emit=function(d,h,f,p,m,A){var g=n?n+d:d;if(!this._events[g])return!1;var y=this._events[g],x=arguments.length,b,v;if(y.fn){switch(y.once&&this.removeListener(d,y.fn,void 0,!0),x){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,h),!0;case 3:return y.fn.call(y.context,h,f),!0;case 4:return y.fn.call(y.context,h,f,p),!0;case 5:return y.fn.call(y.context,h,f,p,m),!0;case 6:return y.fn.call(y.context,h,f,p,m,A),!0}for(v=1,b=new Array(x-1);v<x;v++)b[v-1]=arguments[v];y.fn.apply(y.context,b)}else{var j=y.length,_;for(v=0;v<j;v++)switch(y[v].once&&this.removeListener(d,y[v].fn,void 0,!0),x){case 1:y[v].fn.call(y[v].context);break;case 2:y[v].fn.call(y[v].context,h);break;case 3:y[v].fn.call(y[v].context,h,f);break;case 4:y[v].fn.call(y[v].context,h,f,p);break;default:if(!b)for(_=1,b=new Array(x-1);_<x;_++)b[_-1]=arguments[_];y[v].fn.apply(y[v].context,b)}}return!0},c.prototype.on=function(d,h,f){return o(this,d,h,f,!1)},c.prototype.once=function(d,h,f){return o(this,d,h,f,!0)},c.prototype.removeListener=function(d,h,f,p){var m=n?n+d:d;if(!this._events[m])return this;if(!h)return l(this,m),this;var A=this._events[m];if(A.fn)A.fn===h&&(!p||A.once)&&(!f||A.context===f)&&l(this,m);else{for(var g=0,y=[],x=A.length;g<x;g++)(A[g].fn!==h||p&&!A[g].once||f&&A[g].context!==f)&&y.push(A[g]);y.length?this._events[m]=y.length===1?y[0]:y:l(this,m)}return this},c.prototype.removeAllListeners=function(d){var h;return d?(h=n?n+d:d,this._events[h]&&l(this,h)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(dxe);var GAt=dxe.exports;const XAt=bn(GAt);var yF=new XAt,vF="recharts.syncMouseEvents";function Rj(e){"@babel/helpers - typeof";return Rj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Rj(e)}function YAt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function JAt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,hxe(i.key),i)}}function ZAt(e,r,n){return r&&JAt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function bF(e,r,n){return r=hxe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function hxe(e){var r=egt(e,"string");return Rj(r)=="symbol"?r:r+""}function egt(e,r){if(Rj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Rj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tgt=function(){function e(){YAt(this,e),bF(this,"activeIndex",0),bF(this,"coordinateList",[]),bF(this,"layout","horizontal")}return ZAt(e,[{key:"setDetails",value:function(n){var i,a=n.coordinateList,o=a===void 0?null:a,l=n.container,c=l===void 0?null:l,u=n.layout,d=u===void 0?null:u,h=n.offset,f=h===void 0?null:h,p=n.mouseHandlerCallback,m=p===void 0?null:p;this.coordinateList=(i=o??this.coordinateList)!==null&&i!==void 0?i:[],this.container=c??this.container,this.layout=d??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,i;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),o=a.x,l=a.y,c=a.height,u=this.coordinateList[this.activeIndex].coordinate,d=((n=window)===null||n===void 0?void 0:n.scrollX)||0,h=((i=window)===null||i===void 0?void 0:i.scrollY)||0,f=o+u+d,p=l+this.offset.top+c/2+h;this.mouseHandlerCallback({pageX:f,pageY:p})}}}])}();function rgt(e,r,n){if(n==="number"&&r===!0&&Array.isArray(e)){var i=e==null?void 0:e[0],a=e==null?void 0:e[1];if(i&&a&&vt(i)&&vt(a))return!0}return!1}function ngt(e,r,n,i){var a=i/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?r.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:r.y-a,width:e==="horizontal"?i:n.width-1,height:e==="horizontal"?n.height-1:i}}function fxe(e){var r=e.cx,n=e.cy,i=e.radius,a=e.startAngle,o=e.endAngle,l=Bs(r,n,i,a),c=Bs(r,n,i,o);return{points:[l,c],cx:r,cy:n,radius:i,startAngle:a,endAngle:o}}function igt(e,r,n){var i,a,o,l;if(e==="horizontal")i=r.x,o=i,a=n.top,l=n.top+n.height;else if(e==="vertical")a=r.y,l=a,i=n.left,o=n.left+n.width;else if(r.cx!=null&&r.cy!=null)if(e==="centric"){var c=r.cx,u=r.cy,d=r.innerRadius,h=r.outerRadius,f=r.angle,p=Bs(c,u,d,f),m=Bs(c,u,h,f);i=p.x,a=p.y,o=m.x,l=m.y}else return fxe(r);return[{x:i,y:a},{x:o,y:l}]}function Dj(e){"@babel/helpers - typeof";return Dj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Dj(e)}function iZ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function QN(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?iZ(Object(n),!0).forEach(function(i){agt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iZ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function agt(e,r,n){return r=sgt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function sgt(e){var r=ogt(e,"string");return Dj(r)=="symbol"?r:r+""}function ogt(e,r){if(Dj(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(Dj(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function lgt(e){var r,n,i=e.element,a=e.tooltipEventType,o=e.isActive,l=e.activeCoordinate,c=e.activePayload,u=e.offset,d=e.activeTooltipIndex,h=e.tooltipAxisBandSize,f=e.layout,p=e.chartName,m=(r=i.props.cursor)!==null&&r!==void 0?r:(n=i.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!i||!m||!o||!l||p!=="ScatterChart"&&a!=="axis")return null;var A,g=Vw;if(p==="ScatterChart")A=l,g=dht;else if(p==="BarChart")A=ngt(f,l,u,h),g=BQ;else if(f==="radial"){var y=fxe(l),x=y.cx,b=y.cy,v=y.radius,j=y.startAngle,_=y.endAngle;A={cx:x,cy:b,startAngle:j,endAngle:_,innerRadius:v,outerRadius:v},g=mge}else A={points:igt(f,l,u)},g=Vw;var C=QN(QN(QN(QN({stroke:"#ccc",pointerEvents:"none"},u),A),tn(m,!1)),{},{payload:c,payloadIndex:d,className:fn("recharts-tooltip-cursor",m.className)});return w.isValidElement(m)?w.cloneElement(m,C):w.createElement(g,C)}var cgt=["item"],ugt=["children","className","width","height","style","compact","title","desc"];function A0(e){"@babel/helpers - typeof";return A0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},A0(e)}function Iy(){return Iy=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Iy.apply(this,arguments)}function aZ(e,r){return fgt(e)||hgt(e,r)||pxe(e,r)||dgt()}function dgt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2147In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hgt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function fgt(e){if(Array.isArray(e))return e}function sZ(e,r){if(e==null)return{};var n=mgt(e,r),i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function mgt(e,r){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(r.indexOf(i)>=0)continue;n[i]=e[i]}return n}function pgt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Agt(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Axe(i.key),i)}}function ggt(e,r,n){return r&&Agt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function xgt(e,r,n){return r=Q5(r),ygt(e,mxe()?Reflect.construct(r,n||[],Q5(e).constructor):r.apply(e,n))}function ygt(e,r){if(r&&(A0(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vgt(e)}function vgt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mxe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mxe=function(){return!!e})()}function Q5(e){return Q5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Q5(e)}function bgt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&VM(e,r)}function VM(e,r){return VM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},VM(e,r)}function g0(e){return _gt(e)||jgt(e)||pxe(e)||wgt()}function wgt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2148In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pxe(e,r){if(e){if(typeof e=="string")return WM(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WM(e,r)}}function jgt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _gt(e){if(Array.isArray(e))return WM(e)}function WM(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function oZ(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function Ze(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?oZ(Object(n),!0).forEach(function(i){br(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oZ(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function br(e,r,n){return r=Axe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Axe(e){var r=Cgt(e,"string");return A0(r)=="symbol"?r:r+""}function Cgt(e,r){if(A0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(A0(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Ngt={xAxis:["bottom","top"],yAxis:["left","right"]},Sgt={width:"100%",height:"100%"},gxe={x:0,y:0};function HN(e){return e}var kgt=function(r,n){return n==="horizontal"?r.x:n==="vertical"?r.y:n==="centric"?r.angle:r.radius},Egt=function(r,n,i,a){var o=n.find(function(h){return h&&h.index===i});if(o){if(r==="horizontal")return{x:o.coordinate,y:a.y};if(r==="vertical")return{x:a.x,y:o.coordinate};if(r==="centric"){var l=o.coordinate,c=a.radius;return Ze(Ze(Ze({},a),Bs(a.cx,a.cy,c,l)),{},{angle:l,radius:c})}var u=o.coordinate,d=a.angle;return Ze(Ze(Ze({},a),Bs(a.cx,a.cy,u,d)),{},{angle:d,radius:u})}return gxe},UT=function(r,n){var i=n.graphicalItems,a=n.dataStartIndex,o=n.dataEndIndex,l=(i??[]).reduce(function(c,u){var d=u.props.data;return d&&d.length?[].concat(g0(c),g0(d)):c},[]);return l.length>0?l:r&&r.length&&vt(a)&&vt(o)?r.slice(a,o+1):[]};function xxe(e){return e==="number"?[0,"auto"]:void 0}var qM=function(r,n,i,a){var o=r.graphicalItems,l=r.tooltipAxis,c=UT(n,r);return i<0||!o||!o.length||i>=c.length?null:o.reduce(function(u,d){var h,f=(h=d.props.data)!==null&&h!==void 0?h:n;f&&r.dataStartIndex+r.dataEndIndex!==0&&r.dataEndIndex-r.dataStartIndex>=i&&(f=f.slice(r.dataStartIndex,r.dataEndIndex+1));var p;if(l.dataKey&&!l.allowDuplicatedCategory){var m=f===void 0?c:f;p=QE(m,l.dataKey,a)}else p=f&&f[i]||c[i];return p?[].concat(g0(u),[dge(d,p)]):u},[])},lZ=function(r,n,i,a){var o=a||{x:r.chartX,y:r.chartY},l=kgt(o,i),c=r.orderedTooltipTicks,u=r.tooltipAxis,d=r.tooltipTicks,h=qlt(l,c,d,u);if(h>=0&&d){var f=d[h]&&d[h].value,p=qM(r,n,h,f),m=Egt(i,c,h,o);return{activeTooltipIndex:h,activeLabel:f,activePayload:p,activeCoordinate:m}}return null},Bgt=function(r,n){var i=n.axes,a=n.graphicalItems,o=n.axisType,l=n.axisIdKey,c=n.stackGroups,u=n.dataStartIndex,d=n.dataEndIndex,h=r.layout,f=r.children,p=r.stackOffset,m=lge(h,o);return i.reduce(function(A,g){var y,x=g.type.defaultProps!==void 0?Ze(Ze({},g.type.defaultProps),g.props):g.props,b=x.type,v=x.dataKey,j=x.allowDataOverflow,_=x.allowDuplicatedCategory,C=x.scale,N=x.ticks,S=x.includeHidden,E=x[l];if(A[E])return A;var O=UT(r.data,{graphicalItems:a.filter(function(M){var z,K=l in M.props?M.props[l]:(z=M.type.defaultProps)===null||z===void 0?void 0:z[l];return K===E}),dataStartIndex:u,dataEndIndex:d}),B=O.length,T,F,I;rgt(x.domain,j,b)&&(T=hM(x.domain,null,j),m&&(b==="number"||C!=="auto")&&(I=Hw(O,v,"category")));var D=xxe(b);if(!T||T.length===0){var L,V=(L=x.domain)!==null&&L!==void 0?L:D;if(v){if(T=Hw(O,v,b),b==="category"&&m){var U=jqe(T);_&&U?(F=T,T=B5(0,B)):_||(T=UY(V,T,g).reduce(function(M,z){return M.indexOf(z)>=0?M:[].concat(g0(M),[z])},[]))}else if(b==="category")_?T=T.filter(function(M){return M!==""&&!on(M)}):T=UY(V,T,g).reduce(function(M,z){return M.indexOf(z)>=0||z===""||on(z)?M:[].concat(g0(M),[z])},[]);else if(b==="number"){var Q=Jlt(O,a.filter(function(M){var z,K,ne=l in M.props?M.props[l]:(z=M.type.defaultProps)===null||z===void 0?void 0:z[l],ie="hide"in M.props?M.props.hide:(K=M.type.defaultProps)===null||K===void 0?void 0:K.hide;return ne===E&&(S||!ie)}),v,o,h);Q&&(T=Q)}m&&(b==="number"||C!=="auto")&&(I=Hw(O,v,"category"))}else m?T=B5(0,B):c&&c[E]&&c[E].hasStack&&b==="number"?T=p==="expand"?[0,1]:uge(c[E].stackGroups,u,d):T=oge(O,a.filter(function(M){var z=l in M.props?M.props[l]:M.type.defaultProps[l],K="hide"in M.props?M.props.hide:M.type.defaultProps.hide;return z===E&&(S||!K)}),b,h,!0);if(b==="number")T=HM(f,T,E,o,N),V&&(T=hM(V,T,j));else if(b==="category"&&V){var $=V,q=T.every(function(M){return $.indexOf(M)>=0});q&&(T=$)}}return Ze(Ze({},A),{},br({},E,Ze(Ze({},x),{},{axisType:o,domain:T,categoricalDomain:I,duplicateDomain:F,originalDomain:(y=x.domain)!==null&&y!==void 0?y:D,isCategorical:m,layout:h})))},{})},Tgt=function(r,n){var i=n.graphicalItems,a=n.Axis,o=n.axisType,l=n.axisIdKey,c=n.stackGroups,u=n.dataStartIndex,d=n.dataEndIndex,h=r.layout,f=r.children,p=UT(r.data,{graphicalItems:i,dataStartIndex:u,dataEndIndex:d}),m=p.length,A=lge(h,o),g=-1;return i.reduce(function(y,x){var b=x.type.defaultProps!==void 0?Ze(Ze({},x.type.defaultProps),x.props):x.props,v=b[l],j=xxe("number");if(!y[v]){g++;var _;return A?_=B5(0,m):c&&c[v]&&c[v].hasStack?(_=uge(c[v].stackGroups,u,d),_=HM(f,_,v,o)):(_=hM(j,oge(p,i.filter(function(C){var N,S,E=l in C.props?C.props[l]:(N=C.type.defaultProps)===null||N===void 0?void 0:N[l],O="hide"in C.props?C.props.hide:(S=C.type.defaultProps)===null||S===void 0?void 0:S.hide;return E===v&&!O}),"number",h),a.defaultProps.allowDataOverflow),_=HM(f,_,v,o)),Ze(Ze({},y),{},br({},v,Ze(Ze({axisType:o},a.defaultProps),{},{hide:!0,orientation:Fc(Ngt,"".concat(o,".").concat(g%2),null),domain:_,originalDomain:j,isCategorical:A,layout:h})))}return y},{})},Pgt=function(r,n){var i=n.axisType,a=i===void 0?"xAxis":i,o=n.AxisComp,l=n.graphicalItems,c=n.stackGroups,u=n.dataStartIndex,d=n.dataEndIndex,h=r.children,f="".concat(a,"Id"),p=Su(h,o),m={};return p&&p.length?m=Bgt(r,{axes:p,graphicalItems:l,axisType:a,axisIdKey:f,stackGroups:c,dataStartIndex:u,dataEndIndex:d}):l&&l.length&&(m=Tgt(r,{Axis:o,graphicalItems:l,axisType:a,axisIdKey:f,stackGroups:c,dataStartIndex:u,dataEndIndex:d})),m},Igt=function(r){var n=hm(r),i=Th(n,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:iQ(i,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:b5(n,i)}},cZ=function(r){var n=r.children,i=r.defaultShowTooltip,a=Pl(n,o0),o=0,l=0;return r.data&&r.data.length!==0&&(l=r.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(o=a.props.startIndex),a.props.endIndex>=0&&(l=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!i}},Fgt=function(r){return!r||!r.length?!1:r.some(function(n){var i=Lh(n&&n.type);return i&&i.indexOf("Bar")>=0})},uZ=function(r){return r==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:r==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:r==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Ogt=function(r,n){var i=r.props,a=r.graphicalItems,o=r.xAxisMap,l=o===void 0?{}:o,c=r.yAxisMap,u=c===void 0?{}:c,d=i.width,h=i.height,f=i.children,p=i.margin||{},m=Pl(f,o0),A=Pl(f,nv),g=Object.keys(u).reduce(function(_,C){var N=u[C],S=N.orientation;return!N.mirror&&!N.hide?Ze(Ze({},_),{},br({},S,_[S]+N.width)):_},{left:p.left||0,right:p.right||0}),y=Object.keys(l).reduce(function(_,C){var N=l[C],S=N.orientation;return!N.mirror&&!N.hide?Ze(Ze({},_),{},br({},S,Fc(_,"".concat(S))+N.height)):_},{top:p.top||0,bottom:p.bottom||0}),x=Ze(Ze({},y),g),b=x.bottom;m&&(x.bottom+=m.props.height||o0.defaultProps.height),A&&n&&(x=Xlt(x,a,i,n));var v=d-x.left-x.right,j=h-x.top-x.bottom;return Ze(Ze({brushBottom:b},x),{},{width:Math.max(v,0),height:Math.max(j,0)})},Lgt=function(r,n){if(n==="xAxis")return r[n].width;if(n==="yAxis")return r[n].height},Rgt=function(r){var n=r.chartName,i=r.GraphicalChild,a=r.defaultTooltipEventType,o=a===void 0?"axis":a,l=r.validateTooltipEventTypes,c=l===void 0?["axis"]:l,u=r.axisComponents,d=r.legendContent,h=r.formatAxisMap,f=r.defaultProps,p=function(x,b){var v=b.graphicalItems,j=b.stackGroups,_=b.offset,C=b.updateId,N=b.dataStartIndex,S=b.dataEndIndex,E=x.barSize,O=x.layout,B=x.barGap,T=x.barCategoryGap,F=x.maxBarSize,I=uZ(O),D=I.numericAxisName,L=I.cateAxisName,V=Fgt(v),U=[];return v.forEach(function(Q,$){var q=UT(x.data,{graphicalItems:[Q],dataStartIndex:N,dataEndIndex:S}),M=Q.type.defaultProps!==void 0?Ze(Ze({},Q.type.defaultProps),Q.props):Q.props,z=M.dataKey,K=M.maxBarSize,ne=M["".concat(D,"Id")],ie=M["".concat(L,"Id")],X={},de=u.reduce(function(he,je){var ve=b["".concat(je.axisType,"Map")],Pe=M["".concat(je.axisType,"Id")];ve&&ve[Pe]||je.axisType==="zAxis"||Ng();var Ie=ve[Pe];return Ze(Ze({},he),{},br(br({},je.axisType,Ie),"".concat(je.axisType,"Ticks"),Th(Ie)))},X),oe=de[L],ce=de["".concat(L,"Ticks")],ye=j&&j[ne]&&j[ne].hasStack&&uct(Q,j[ne].stackGroups),ge=Lh(Q.type).indexOf("Bar")>=0,Be=b5(oe,ce),Ve=[],te=V&&Klt({barSize:E,stackGroups:j,totalSize:Lgt(de,L)});if(ge){var xe,We,ze=on(K)?F:K,we=(xe=(We=b5(oe,ce,!0))!==null&&We!==void 0?We:ze)!==null&&xe!==void 0?xe:0;Ve=Glt({barGap:B,barCategoryGap:T,bandSize:we!==Be?we:Be,sizeList:te[ie],maxBarSize:ze}),we!==Be&&(Ve=Ve.map(function(he){return Ze(Ze({},he),{},{position:Ze(Ze({},he.position),{},{offset:he.position.offset-we/2})})}))}var J=Q&&Q.type&&Q.type.getComposedData;J&&U.push({props:Ze(Ze({},J(Ze(Ze({},de),{},{displayedData:q,props:x,dataKey:z,item:Q,bandSize:Be,barPosition:Ve,offset:_,stackedData:ye,layout:O,dataStartIndex:N,dataEndIndex:S}))),{},br(br(br({key:Q.key||"item-".concat($)},D,de[D]),L,de[L]),"animationId",C)),childIndex:Lqe(Q,x.children),item:Q})}),U},m=function(x,b){var v=x.props,j=x.dataStartIndex,_=x.dataEndIndex,C=x.updateId;if(!OG({props:v}))return null;var N=v.children,S=v.layout,E=v.stackOffset,O=v.data,B=v.reverseStackOrder,T=uZ(S),F=T.numericAxisName,I=T.cateAxisName,D=Su(N,i),L=oct(O,D,"".concat(F,"Id"),"".concat(I,"Id"),E,B),V=u.reduce(function(M,z){var K="".concat(z.axisType,"Map");return Ze(Ze({},M),{},br({},K,Pgt(v,Ze(Ze({},z),{},{graphicalItems:D,stackGroups:z.axisType===F&&L,dataStartIndex:j,dataEndIndex:_}))))},{}),U=Ogt(Ze(Ze({},V),{},{props:v,graphicalItems:D}),b==null?void 0:b.legendBBox);Object.keys(V).forEach(function(M){V[M]=h(v,V[M],U,M.replace("Map",""),n)});var Q=V["".concat(I,"Map")],$=Igt(Q),q=p(v,Ze(Ze({},V),{},{dataStartIndex:j,dataEndIndex:_,updateId:C,graphicalItems:D,stackGroups:L,offset:U}));return Ze(Ze({formattedGraphicalItems:q,graphicalItems:D,offset:U,stackGroups:L},$),V)},A=function(y){function x(b){var v,j,_;return pgt(this,x),_=xgt(this,x,[b]),br(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),br(_,"accessibilityManager",new tgt),br(_,"handleLegendBBoxUpdate",function(C){if(C){var N=_.state,S=N.dataStartIndex,E=N.dataEndIndex,O=N.updateId;_.setState(Ze({legendBBox:C},m({props:_.props,dataStartIndex:S,dataEndIndex:E,updateId:O},Ze(Ze({},_.state),{},{legendBBox:C}))))}}),br(_,"handleReceiveSyncEvent",function(C,N,S){if(_.props.syncId===C){if(S===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(N)}}),br(_,"handleBrushChange",function(C){var N=C.startIndex,S=C.endIndex;if(N!==_.state.dataStartIndex||S!==_.state.dataEndIndex){var E=_.state.updateId;_.setState(function(){return Ze({dataStartIndex:N,dataEndIndex:S},m({props:_.props,dataStartIndex:N,dataEndIndex:S,updateId:E},_.state))}),_.triggerSyncEvent({dataStartIndex:N,dataEndIndex:S})}}),br(_,"handleMouseEnter",function(C){var N=_.getMouseInfo(C);if(N){var S=Ze(Ze({},N),{},{isTooltipActive:!0});_.setState(S),_.triggerSyncEvent(S);var E=_.props.onMouseEnter;Hr(E)&&E(S,C)}}),br(_,"triggeredAfterMouseMove",function(C){var N=_.getMouseInfo(C),S=N?Ze(Ze({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(S),_.triggerSyncEvent(S);var E=_.props.onMouseMove;Hr(E)&&E(S,C)}),br(_,"handleItemMouseEnter",function(C){_.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),br(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),br(_,"handleMouseMove",function(C){C.persist(),_.throttleTriggeredAfterMouseMove(C)}),br(_,"handleMouseLeave",function(C){_.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};_.setState(N),_.triggerSyncEvent(N);var S=_.props.onMouseLeave;Hr(S)&&S(N,C)}),br(_,"handleOuterEvent",function(C){var N=Oqe(C),S=Fc(_.props,"".concat(N));if(N&&Hr(S)){var E,O;/.*touch.*/i.test(N)?O=_.getMouseInfo(C.changedTouches[0]):O=_.getMouseInfo(C),S((E=O)!==null&&E!==void 0?E:{},C)}}),br(_,"handleClick",function(C){var N=_.getMouseInfo(C);if(N){var S=Ze(Ze({},N),{},{isTooltipActive:!0});_.setState(S),_.triggerSyncEvent(S);var E=_.props.onClick;Hr(E)&&E(S,C)}}),br(_,"handleMouseDown",function(C){var N=_.props.onMouseDown;if(Hr(N)){var S=_.getMouseInfo(C);N(S,C)}}),br(_,"handleMouseUp",function(C){var N=_.props.onMouseUp;if(Hr(N)){var S=_.getMouseInfo(C);N(S,C)}}),br(_,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),br(_,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&_.handleMouseDown(C.changedTouches[0])}),br(_,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&_.handleMouseUp(C.changedTouches[0])}),br(_,"handleDoubleClick",function(C){var N=_.props.onDoubleClick;if(Hr(N)){var S=_.getMouseInfo(C);N(S,C)}}),br(_,"handleContextMenu",function(C){var N=_.props.onContextMenu;if(Hr(N)){var S=_.getMouseInfo(C);N(S,C)}}),br(_,"triggerSyncEvent",function(C){_.props.syncId!==void 0&&yF.emit(vF,_.props.syncId,C,_.eventEmitterSymbol)}),br(_,"applySyncEvent",function(C){var N=_.props,S=N.layout,E=N.syncMethod,O=_.state.updateId,B=C.dataStartIndex,T=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)_.setState(Ze({dataStartIndex:B,dataEndIndex:T},m({props:_.props,dataStartIndex:B,dataEndIndex:T,updateId:O},_.state)));else if(C.activeTooltipIndex!==void 0){var F=C.chartX,I=C.chartY,D=C.activeTooltipIndex,L=_.state,V=L.offset,U=L.tooltipTicks;if(!V)return;if(typeof E=="function")D=E(U,C);else if(E==="value"){D=-1;for(var Q=0;Q<U.length;Q++)if(U[Q].value===C.activeLabel){D=Q;break}}var $=Ze(Ze({},V),{},{x:V.left,y:V.top}),q=Math.min(F,$.x+$.width),M=Math.min(I,$.y+$.height),z=U[D]&&U[D].value,K=qM(_.state,_.props.data,D),ne=U[D]?{x:S==="horizontal"?U[D].coordinate:q,y:S==="horizontal"?M:U[D].coordinate}:gxe;_.setState(Ze(Ze({},C),{},{activeLabel:z,activeCoordinate:ne,activePayload:K,activeTooltipIndex:D}))}else _.setState(C)}),br(_,"renderCursor",function(C){var N,S=_.state,E=S.isTooltipActive,O=S.activeCoordinate,B=S.activePayload,T=S.offset,F=S.activeTooltipIndex,I=S.tooltipAxisBandSize,D=_.getTooltipEventType(),L=(N=C.props.active)!==null&&N!==void 0?N:E,V=_.props.layout,U=C.key||"_recharts-cursor";return ee.createElement(lgt,{key:U,activeCoordinate:O,activePayload:B,activeTooltipIndex:F,chartName:n,element:C,isActive:L,layout:V,offset:T,tooltipAxisBandSize:I,tooltipEventType:D})}),br(_,"renderPolarAxis",function(C,N,S){var E=Fc(C,"type.axisType"),O=Fc(_.state,"".concat(E,"Map")),B=C.type.defaultProps,T=B!==void 0?Ze(Ze({},B),C.props):C.props,F=O&&O[T["".concat(E,"Id")]];return w.cloneElement(C,Ze(Ze({},F),{},{className:fn(E,F.className),key:C.key||"".concat(N,"-").concat(S),ticks:Th(F,!0)}))}),br(_,"renderPolarGrid",function(C){var N=C.props,S=N.radialLines,E=N.polarAngles,O=N.polarRadius,B=_.state,T=B.radiusAxisMap,F=B.angleAxisMap,I=hm(T),D=hm(F),L=D.cx,V=D.cy,U=D.innerRadius,Q=D.outerRadius;return w.cloneElement(C,{polarAngles:Array.isArray(E)?E:Th(D,!0).map(function($){return $.coordinate}),polarRadius:Array.isArray(O)?O:Th(I,!0).map(function($){return $.coordinate}),cx:L,cy:V,innerRadius:U,outerRadius:Q,key:C.key||"polar-grid",radialLines:S})}),br(_,"renderLegend",function(){var C=_.state.formattedGraphicalItems,N=_.props,S=N.children,E=N.width,O=N.height,B=_.props.margin||{},T=E-(B.left||0)-(B.right||0),F=age({children:S,formattedGraphicalItems:C,legendWidth:T,legendContent:d});if(!F)return null;var I=F.item,D=sZ(F,cgt);return w.cloneElement(I,Ze(Ze({},D),{},{chartWidth:E,chartHeight:O,margin:B,onBBoxUpdate:_.handleLegendBBoxUpdate}))}),br(_,"renderTooltip",function(){var C,N=_.props,S=N.children,E=N.accessibilityLayer,O=Pl(S,ad);if(!O)return null;var B=_.state,T=B.isTooltipActive,F=B.activeCoordinate,I=B.activePayload,D=B.activeLabel,L=B.offset,V=(C=O.props.active)!==null&&C!==void 0?C:T;return w.cloneElement(O,{viewBox:Ze(Ze({},L),{},{x:L.left,y:L.top}),active:V,label:D,payload:V?I:[],coordinate:F,accessibilityLayer:E})}),br(_,"renderBrush",function(C){var N=_.props,S=N.margin,E=N.data,O=_.state,B=O.offset,T=O.dataStartIndex,F=O.dataEndIndex,I=O.updateId;return w.cloneElement(C,{key:C.key||"_recharts-brush",onChange:MN(_.handleBrushChange,C.props.onChange),data:E,x:vt(C.props.x)?C.props.x:B.left,y:vt(C.props.y)?C.props.y:B.top+B.height+B.brushBottom-(S.bottom||0),width:vt(C.props.width)?C.props.width:B.width,startIndex:T,endIndex:F,updateId:"brush-".concat(I)})}),br(_,"renderReferenceElement",function(C,N,S){if(!C)return null;var E=_,O=E.clipPathId,B=_.state,T=B.xAxisMap,F=B.yAxisMap,I=B.offset,D=C.type.defaultProps||{},L=C.props,V=L.xAxisId,U=V===void 0?D.xAxisId:V,Q=L.yAxisId,$=Q===void 0?D.yAxisId:Q;return w.cloneElement(C,{key:C.key||"".concat(N,"-").concat(S),xAxis:T[U],yAxis:F[$],viewBox:{x:I.left,y:I.top,width:I.width,height:I.height},clipPathId:O})}),br(_,"renderActivePoints",function(C){var N=C.item,S=C.activePoint,E=C.basePoint,O=C.childIndex,B=C.isRange,T=[],F=N.props.key,I=N.item.type.defaultProps!==void 0?Ze(Ze({},N.item.type.defaultProps),N.item.props):N.item.props,D=I.activeDot,L=I.dataKey,V=Ze(Ze({index:O,dataKey:L,cx:S.x,cy:S.y,r:4,fill:EQ(N.item),strokeWidth:2,stroke:"#fff",payload:S.payload,value:S.value},tn(D,!1)),HE(D));return T.push(x.renderActiveDot(D,V,"".concat(F,"-activePoint-").concat(O))),E?T.push(x.renderActiveDot(D,Ze(Ze({},V),{},{cx:E.x,cy:E.y}),"".concat(F,"-basePoint-").concat(O))):B&&T.push(null),T}),br(_,"renderGraphicChild",function(C,N,S){var E=_.filterFormatItem(C,N,S);if(!E)return null;var O=_.getTooltipEventType(),B=_.state,T=B.isTooltipActive,F=B.tooltipAxis,I=B.activeTooltipIndex,D=B.activeLabel,L=_.props.children,V=Pl(L,ad),U=E.props,Q=U.points,$=U.isRange,q=U.baseLine,M=E.item.type.defaultProps!==void 0?Ze(Ze({},E.item.type.defaultProps),E.item.props):E.item.props,z=M.activeDot,K=M.hide,ne=M.activeBar,ie=M.activeShape,X=!!(!K&&T&&V&&(z||ne||ie)),de={};O!=="axis"&&V&&V.props.trigger==="click"?de={onClick:MN(_.handleItemMouseEnter,C.props.onClick)}:O!=="axis"&&(de={onMouseLeave:MN(_.handleItemMouseLeave,C.props.onMouseLeave),onMouseEnter:MN(_.handleItemMouseEnter,C.props.onMouseEnter)});var oe=w.cloneElement(C,Ze(Ze({},E.props),de));function ce(je){return typeof F.dataKey=="function"?F.dataKey(je.payload):null}if(X)if(I>=0){var ye,ge;if(F.dataKey&&!F.allowDuplicatedCategory){var Be=typeof F.dataKey=="function"?ce:"payload.".concat(F.dataKey.toString());ye=QE(Q,Be,D),ge=$&&q&&QE(q,Be,D)}else ye=Q==null?void 0:Q[I],ge=$&&q&&q[I];if(ie||ne){var Ve=C.props.activeIndex!==void 0?C.props.activeIndex:I;return[w.cloneElement(C,Ze(Ze(Ze({},E.props),de),{},{activeIndex:Ve})),null,null]}if(!on(ye))return[oe].concat(g0(_.renderActivePoints({item:E,activePoint:ye,basePoint:ge,childIndex:I,isRange:$})))}else{var te,xe=(te=_.getItemByXY(_.state.activeCoordinate))!==null&&te!==void 0?te:{graphicalItem:oe},We=xe.graphicalItem,ze=We.item,we=ze===void 0?C:ze,J=We.childIndex,he=Ze(Ze(Ze({},E.props),de),{},{activeIndex:J});return[w.cloneElement(we,he),null,null]}return $?[oe,null,null]:[oe,null]}),br(_,"renderCustomized",function(C,N,S){return w.cloneElement(C,Ze(Ze({key:"recharts-customized-".concat(S)},_.props),_.state))}),br(_,"renderMap",{CartesianGrid:{handler:HN,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:HN},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:HN},YAxis:{handler:HN},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((v=b.id)!==null&&v!==void 0?v:F_("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=tAe(_.triggeredAfterMouseMove,(j=b.throttleDelay)!==null&&j!==void 0?j:1e3/60),_.state={},_}return bgt(x,y),ggt(x,[{key:"componentDidMount",value:function(){var v,j;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(v=this.props.margin.left)!==null&&v!==void 0?v:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var v=this.props,j=v.children,_=v.data,C=v.height,N=v.layout,S=Pl(j,ad);if(S){var E=S.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var O=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,B=qM(this.state,_,E,O),T=this.state.tooltipTicks[E].coordinate,F=(this.state.offset.top+C)/2,I=N==="horizontal",D=I?{x:T,y:F}:{y:T,x:F},L=this.state.formattedGraphicalItems.find(function(U){var Q=U.item;return Q.type.name==="Scatter"});L&&(D=Ze(Ze({},D),L.props.points[E].tooltipPosition),B=L.props.points[E].tooltipPayload);var V={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:O,activePayload:B,activeCoordinate:D};this.setState(V),this.renderCursor(S),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(v,j){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==j.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==v.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==v.margin){var _,C;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(v){ND([Pl(v.children,ad)],[Pl(this.props.children,ad)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var v=Pl(this.props.children,ad);if(v&&typeof v.props.shared=="boolean"){var j=v.props.shared?"axis":"item";return c.indexOf(j)>=0?j:o}return o}},{key:"getMouseInfo",value:function(v){if(!this.container)return null;var j=this.container,_=j.getBoundingClientRect(),C=dit(_),N={chartX:Math.round(v.pageX-C.left),chartY:Math.round(v.pageY-C.top)},S=_.width/j.offsetWidth||1,E=this.inRange(N.chartX,N.chartY,S);if(!E)return null;var O=this.state,B=O.xAxisMap,T=O.yAxisMap,F=this.getTooltipEventType(),I=lZ(this.state,this.props.data,this.props.layout,E);if(F!=="axis"&&B&&T){var D=hm(B).scale,L=hm(T).scale,V=D&&D.invert?D.invert(N.chartX):null,U=L&&L.invert?L.invert(N.chartY):null;return Ze(Ze({},N),{},{xValue:V,yValue:U},I)}return I?Ze(Ze({},N),I):null}},{key:"inRange",value:function(v,j){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,N=v/_,S=j/_;if(C==="horizontal"||C==="vertical"){var E=this.state.offset,O=N>=E.left&&N<=E.left+E.width&&S>=E.top&&S<=E.top+E.height;return O?{x:N,y:S}:null}var B=this.state,T=B.angleAxisMap,F=B.radiusAxisMap;if(T&&F){var I=hm(T);return HY({x:N,y:S},I)}return null}},{key:"parseEventsOfWrapper",value:function(){var v=this.props.children,j=this.getTooltipEventType(),_=Pl(v,ad),C={};_&&j==="axis"&&(_.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var N=HE(this.props,this.handleOuterEvent);return Ze(Ze({},N),C)}},{key:"addListener",value:function(){yF.on(vF,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){yF.removeListener(vF,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(v,j,_){for(var C=this.state.formattedGraphicalItems,N=0,S=C.length;N<S;N++){var E=C[N];if(E.item===v||E.props.key===v.key||j===Lh(E.item.type)&&_===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var v=this.clipPathId,j=this.state.offset,_=j.left,C=j.top,N=j.height,S=j.width;return ee.createElement("defs",null,ee.createElement("clipPath",{id:v},ee.createElement("rect",{x:_,y:C,height:N,width:S})))}},{key:"getXScales",value:function(){var v=this.state.xAxisMap;return v?Object.entries(v).reduce(function(j,_){var C=aZ(_,2),N=C[0],S=C[1];return Ze(Ze({},j),{},br({},N,S.scale))},{}):null}},{key:"getYScales",value:function(){var v=this.state.yAxisMap;return v?Object.entries(v).reduce(function(j,_){var C=aZ(_,2),N=C[0],S=C[1];return Ze(Ze({},j),{},br({},N,S.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(v){var j;return(j=this.state.xAxisMap)===null||j===void 0||(j=j[v])===null||j===void 0?void 0:j.scale}},{key:"getYScaleByAxisId",value:function(v){var j;return(j=this.state.yAxisMap)===null||j===void 0||(j=j[v])===null||j===void 0?void 0:j.scale}},{key:"getItemByXY",value:function(v){var j=this.state,_=j.formattedGraphicalItems,C=j.activeItem;if(_&&_.length)for(var N=0,S=_.length;N<S;N++){var E=_[N],O=E.props,B=E.item,T=B.type.defaultProps!==void 0?Ze(Ze({},B.type.defaultProps),B.props):B.props,F=Lh(B.type);if(F==="Bar"){var I=(O.data||[]).find(function(U){return tht(v,U)});if(I)return{graphicalItem:E,payload:I}}else if(F==="RadialBar"){var D=(O.data||[]).find(function(U){return HY(v,U)});if(D)return{graphicalItem:E,payload:D}}else if(PT(E,C)||IT(E,C)||Pj(E,C)){var L=ift({graphicalItem:E,activeTooltipItem:C,itemData:T.data}),V=T.activeIndex===void 0?L:T.activeIndex;return{graphicalItem:Ze(Ze({},E),{},{childIndex:V}),payload:Pj(E,C)?T.data[L]:E.props.data[L]}}}return null}},{key:"render",value:function(){var v=this;if(!OG(this))return null;
2148var j=this.props,_=j.children,C=j.className,N=j.width,S=j.height,E=j.style,O=j.compact,B=j.title,T=j.desc,F=sZ(j,ugt),I=tn(F,!1);if(O)return ee.createElement($J,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ee.createElement(kD,Iy({},I,{width:N,height:S,title:B,desc:T}),this.renderClipPath(),RG(_,this.renderMap)));if(this.props.accessibilityLayer){var D,L;I.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,I.role=(L=this.props.role)!==null&&L!==void 0?L:"application",I.onKeyDown=function(U){v.accessibilityManager.keyboardEvent(U)},I.onFocus=function(){v.accessibilityManager.focus()}}var V=this.parseEventsOfWrapper();return ee.createElement($J,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ee.createElement("div",Iy({className:fn("recharts-wrapper",C),style:Ze({position:"relative",cursor:"default",width:N,height:S},E)},V,{ref:function(Q){v.container=Q}}),ee.createElement(kD,Iy({},I,{width:N,height:S,title:B,desc:T,style:Sgt}),this.renderClipPath(),RG(_,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(w.Component);br(A,"displayName",n),br(A,"defaultProps",Ze({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),br(A,"getDerivedStateFromProps",function(y,x){var b=y.dataKey,v=y.data,j=y.children,_=y.width,C=y.height,N=y.layout,S=y.stackOffset,E=y.margin,O=x.dataStartIndex,B=x.dataEndIndex;if(x.updateId===void 0){var T=cZ(y);return Ze(Ze(Ze({},T),{},{updateId:0},m(Ze(Ze({props:y},T),{},{updateId:0}),x)),{},{prevDataKey:b,prevData:v,prevWidth:_,prevHeight:C,prevLayout:N,prevStackOffset:S,prevMargin:E,prevChildren:j})}if(b!==x.prevDataKey||v!==x.prevData||_!==x.prevWidth||C!==x.prevHeight||N!==x.prevLayout||S!==x.prevStackOffset||!rv(E,x.prevMargin)){var F=cZ(y),I={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},D=Ze(Ze({},lZ(x,v,N)),{},{updateId:x.updateId+1}),L=Ze(Ze(Ze({},F),I),D);return Ze(Ze(Ze({},L),m(Ze({props:y},L),x)),{},{prevDataKey:b,prevData:v,prevWidth:_,prevHeight:C,prevLayout:N,prevStackOffset:S,prevMargin:E,prevChildren:j})}if(!ND(j,x.prevChildren)){var V,U,Q,$,q=Pl(j,o0),M=q&&(V=(U=q.props)===null||U===void 0?void 0:U.startIndex)!==null&&V!==void 0?V:O,z=q&&(Q=($=q.props)===null||$===void 0?void 0:$.endIndex)!==null&&Q!==void 0?Q:B,K=M!==O||z!==B,ne=!on(v),ie=ne&&!K?x.updateId:x.updateId+1;return Ze(Ze({updateId:ie},m(Ze(Ze({props:y},x),{},{updateId:ie,dataStartIndex:M,dataEndIndex:z}),x)),{},{prevChildren:j,dataStartIndex:M,dataEndIndex:z})}return null}),br(A,"renderActiveDot",function(y,x,b){var v;return w.isValidElement(y)?v=w.cloneElement(y,x):Hr(y)?v=y(x):v=ee.createElement(TQ,x),ee.createElement(Hi,{className:"recharts-active-dot",key:b},v)});var g=w.forwardRef(function(x,b){return ee.createElement(A,Iy({},x,{ref:b}))});return g.displayName=A.displayName,g},Dgt=Rgt({chartName:"AreaChart",GraphicalChild:Pp,axisComponents:[{axisType:"xAxis",AxisComp:MT},{axisType:"yAxis",AxisComp:zT}],formatAxisMap:Emt});function Mgt(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e<1?e.toFixed(4):e.toFixed(2)}function zgt(e){return new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:2,maximumFractionDigits:e<1?6:2}).format(e)}function yxe({prices:e,color:r,height:n=280}){const a=e.length>1&&e[e.length-1]>=e[0]?"hsl(142 70% 45%)":"hsl(0 70% 50%)",o=w.useMemo(()=>{if(!e.length)return[];const d=Date.now(),h=e.length;return e.map((f,p)=>{const m=d-(h-1-p)*36e5;return{timestamp:m,price:f,date:new Date(m)}})},[e]);if(!o.length)return null;const l=Math.min(...e),c=Math.max(...e),u=(c-l)*.05;return s.jsx("div",{style:{height:n},className:"w-full",children:s.jsx(iit,{width:"100%",height:"100%",children:s.jsxs(Dgt,{data:o,margin:{top:8,right:8,bottom:0,left:0},children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:`chartGrad-${r}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:.25}),s.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:.02})]})}),s.jsx(exe,{strokeDasharray:"3 3",stroke:"hsl(var(--border) / 0.3)",vertical:!1}),s.jsx(MT,{dataKey:"timestamp",type:"number",domain:["dataMin","dataMax"],tickFormatter:d=>new Date(d).toLocaleDateString("ro-RO",{day:"numeric",month:"short"}),tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"}
2148,axisLine:!1,tickLine:!1,minTickGap:60}),s.jsx(zT,{domain:[l-u,c+u],tickFormatter:Mgt,tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},axisLine:!1,tickLine:!1,width:65}),s.jsx(ad,{content:({active:d,payload:h})=>{if(!d||!(h!=null&&h.length))return null;const f=h[0].payload;return s.jsxs("div",{className:"glass-card rounded-lg px-3 py-2 shadow-lg border border-border/60 text-sm",children:[s.jsx("p",{className:"text-muted-foreground text-xs mb-1",children:new Date(f.timestamp).toLocaleDateString("ro-RO",{weekday:"short",day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})}),s.jsx("p",{className:"font-heading font-bold",style:{color:a},children:zgt(f.price)})]})}}),s.jsx(Pp,{type:"monotone",dataKey:"price",stroke:a,strokeWidth:2,fill:`url(#chartGrad-${r})`,dot:!1,activeDot:{r:5,stroke:a,strokeWidth:2,fill:"hsl(var(--background))"},animationDuration:800})]})})})}function Ugt({coinId:e,coinName:r,priceChange24h:n,priceChange30d:i}){const a=new Date().toISOString().split("T")[0],{data:o,isLoading:l}=Xe({queryKey:["crypto-daily-summary",e,a],queryFn:async()=>{const{data:m,error:A}=await G.from("crypto_daily_summaries").select("*").eq("coin_id",e).eq("summary_date",a).maybeSingle();if(A)throw A;return m},staleTime:10*6e4}),c=(n??0)>=0?"up":"down",u=c==="up"?oa:B2,d=c==="up"?"text-green-500":"text-red-500",h=c==="up"?"crește":"scade";if(l)return s.jsxs(st,{className:"glass-card",children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Bo,{className:"h-6 w-64"})}),s.jsx(ot,{children:s.jsx(Bo,{className:"h-20 w-full"})})]});if(o){const m=o.direction==="up"?oa:o.direction==="down"?B2:dke,A=o.direction==="up"?"text-green-500":o.direction==="down"?"text-red-500":"text-muted-foreground";return s.jsxs(st,{className:"glass-card border-l-4",style:{borderLeftColor:`hsl(${o.direction==="up"?"142 71% 45%":o.direction==="down"?"0 84% 60%":"0 0% 50%"})`},children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-lg flex items-center gap-2",children:[s.jsx(m,{size:18,className:A}),"Evoluția ",r," azi"]})}),s.jsxs(ot,{className:"space-y-3",children:[s.jsx("p",{className:"text-sm leading-relaxed",children:o.summary_ro}),o.monthly_context_ro&&s.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-secondary/50",children:[s.jsx(mg,{size:14,className:"text-primary mt-0.5 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-1",children:"Context lunar"}),s.jsx("p",{className:"text-sm leading-relaxed",children:o.monthly_context_ro})]})]}),s.jsxs("p",{className:"text-[10px] text-muted-foreground flex items-center gap-1",children:[s.jsx(Li,{size:10}),"Generat automat · Actualizat zilnic"]})]})]})}if(n===void 0)return null;const f=Math.abs(n).toFixed(2),p=i!==void 0?Math.abs(i).toFixed(2):null;return s.jsxs(st,{className:"glass-card border-l-4",style:{borderLeftColor:`hsl(${c==="up"?"142 71% 45%":"0 84% 60%"})`},children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-lg flex items-center gap-2",children:[s.jsx(u,{size:18,className:d}),"Evoluția ",r," azi"]})}),s.jsxs(ot,{className:"space-y-3",children:[s.jsxs("p",{className:"text-sm leading-relaxed",children:[r," a ",h==="crește"?"crescut":"scăzut"," cu ",f,"% în ultimele 24 de ore.",p&&s.jsxs(s.Fragment,{children:[" Pe termen de 30 de zile, ",r," a înregistrat o variație de ",i>=0?"+":"-",p,"%."]})]}),p&&s.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-secondary/50",children:[s.jsx(mg,{size:14,className:"text-primary mt-0.5 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-1",children:"Context lunar"}),s.jsxs("p",{className:"text-sm leading-relaxed",children:["În ultima lună, ",r," a avut o performanță de ",i>=0?"+":"",i.toFixed(2),"%, reflectând ",i>=5?"un trend ascendent solid":i<=-5?"o corecție semnificativă":"o perioadă de consolidare"," pe piață."]})]})]}),s.jsxs("p",{className:"text-[10px] text-muted-foreground flex items-center gap-1",children:[s.jsx(Li,{size:10}),"Sumar automat bazat pe date de piață"]})]})]})}function $gt({coinName:e,coinSymbol:r,relatedKeywords:n}){const{lang:i}=Pt(),{data:a,isLoading:o}=Xe({queryKey:["coin-related-articles",e,r,i],queryFn:async()=>{const l=[e];
2148r&&r!==e&&l.push(r),n.forEach(h=>{l.includes(h)||l.push(h)});const c=l.map(h=>`title_ro.ilike.%${h}%,title_en.ilike.%${h}%`).join(","),{data:u,error:d}=await G.from("posts").select("*").eq("status","published").or(c).order("published_at",{ascending:!1}).limit(5);if(d)throw d;return(u||[]).map(h=>P_(h,i))},staleTime:5*6e4});return o||!(a!=null&&a.length)?null:s.jsxs(st,{className:"glass-card",children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"text-lg flex items-center gap-2",children:[s.jsx(ZA,{size:16,className:"text-primary"}),"Articole despre ",e]})}),s.jsx(ot,{className:"space-y-3",children:a.map(l=>s.jsxs(be,{to:`/articol/${l.slug}`,className:"group flex gap-3 p-3 rounded-lg hover:bg-secondary/50 transition-colors",children:[l.imageUrl&&s.jsx("img",{src:l.imageUrl,alt:l.title,className:"w-16 h-16 rounded-md object-cover flex-shrink-0",loading:"lazy"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h4",{className:"text-sm font-medium leading-snug line-clamp-2 group-hover:text-primary transition-colors",children:l.title}),s.jsxs("div",{className:"flex items-center gap-2 mt-1.5 text-xs text-muted-foreground",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ja,{size:10}),new Date(l.publishedAt).toLocaleDateString("ro-RO",{day:"numeric",month:"short",year:"numeric"})]}),(l.topics||[l.topic]).slice(0,2).map(c=>s.jsx(Hg,{topic:c},c))]})]}),s.jsx(Gt,{size:14,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity self-center flex-shrink-0"})]},l.id))})]})}function Qgt(e){const r=e.split(`
2149`).filter(l=>l.trim()),n=[];let i=[];const a=l=>l.replace(/\*\*(.*?)\*\*/g,'<strong class="text-foreground font-semibold">$1</strong>'),o=()=>{i.length>0&&(n.push({type:"list",items:[...i]}),i=[])};for(const l of r){const c=l.trim(),u=c.match(/^[-*•]\s+(.+)/)||c.match(/^\d+[.)]\s+(.+)/);if(u)i.push(a(u[1]));else{o();const d=a(c);if(c.length>400){const h=c.split(new RegExp("(?<=\\.)\\s+"));let f="";for(const p of h)f.length+p.length>350&&f.length>0?(n.push({type:"paragraph",html:a(f.trim())}),f=p):f+=(f?" ":"")+p;f&&n.push({type:"paragraph",html:a(f.trim())})}else n.push({type:"paragraph",html:d})}}return o(),n}function Hgt({coinId:e,coinName:r,coinSymbol:n,pillarSlug:i}){const{lang:a}=Pt(),{data:o,isLoading:l}=Xe({queryKey:["coin-educational-content",e],queryFn:async()=>{const{data:m,error:A}=await G.from("crypto_coin_content").select("*").eq("coin_id",e).maybeSingle();if(A)throw A;return m},staleTime:30*6e4});if(l)return s.jsxs("div",{className:"space-y-4",children:[s.jsx(Bo,{className:"h-8 w-64"}),s.jsx(Bo,{className:"h-32 w-full"}),s.jsx(Bo,{className:"h-32 w-full"})]});if(!o)return null;const c=a==="en"?"_en":"_ro",u=o[`overview${c}`],d=o[`price_history${c}`],h=o[`price_factors${c}`],f=o[`technology${c}`],p=[{key:"overview",title:a==="en"?`${r} General Overview`:`Prezentare Generală ${r}`,icon:yr,text:u},{key:"history",title:a==="en"?`${r} Price History`:`Istoricul de Preț ${r}`,icon:oa,text:d},{key:"factors",title:a==="en"?`Factors Influencing ${r} Price`:`Factori ce Influențează Prețul ${r}`,icon:Eo,text:h},{key:"tech",title:a==="en"?`${r} Technology & Adoption`:`Tehnologie și Adopție ${r}`,icon:Mv,text:f}].filter(m=>m.text);return p.length===0?null:s.jsxs("div",{className:"space-y-10",children:[i&&s.jsx(st,{className:"glass-card border-l-4 border-l-primary",children:s.jsxs(ot,{className:"p-4 flex items-center gap-3",children:[s.jsx(yr,{size:20,className:"text-primary flex-shrink-0"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-foreground/90",children:a==="en"?"Want to learn the basics? Read our complete guide:":"Vrei să înveți bazele? Citește ghidul nostru complet:"}),s.jsxs(be,{to:`/${i}`,className:"text-primary hover:underline font-semibold inline-flex items-center gap-1 mt-1",children:[a==="en"?`What is ${r}?`:`Ce este ${r}?`,s.jsx(Yr,{size:12})]})]})]})}),p.map(m=>{const A=m.icon,g=Qgt(m.text);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-start gap-4 mb-5",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary shrink-0 mt-0.5",children:s.jsx(A,{size:20})}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:m.title})]}),s.jsxs("div",{className:"space-y-4 pl-14",children:[g.map((y,x)=>y.type==="list"?s.jsx("div",{className:"space-y-3",children:y.items.map((b,v)=>s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(hs,{size:16,className:"text-primary mt-1 shrink-0"}
2149),s.jsx("span",{className:"text-foreground/90 leading-relaxed",dangerouslySetInnerHTML:{__html:b}})]},v))},x):s.jsx("p",{className:"text-foreground/90 leading-relaxed",dangerouslySetInnerHTML:{__html:y.html}},x)),s.jsx("div",{className:"pt-2",children:s.jsx("div",{className:"h-px bg-gradient-to-r from-primary/20 via-border to-transparent"})})]})]},m.key)})]})}function iA(e){return new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:2,maximumFractionDigits:e<1?6:2}).format(e)}function Vgt(e){return e>=1e12?`${(e/1e12).toFixed(2)}T`:e>=1e9?`${(e/1e9).toFixed(2)}B`:e>=1e6?`${(e/1e6).toFixed(2)}M`:new Intl.NumberFormat("ro-RO").format(e)}function wF({value:e}){const r=e>=0;return s.jsxs("span",{className:`inline-flex items-center gap-0.5 font-semibold ${r?"text-green-500":"text-red-500"}`,children:[r?s.jsx(n4,{size:14}):s.jsx(Dv,{size:14}),Math.abs(e).toFixed(2),"%"]})}function Dx({label:e,value:r,icon:n}){return s.jsx(st,{className:"glass-card",children:s.jsxs(ot,{className:"p-4 flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:s.jsx(n,{size:18,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:e}),s.jsx("p",{className:"font-heading font-semibold text-sm",children:r})]})]})})}function Yu(){var u;const r=ps().pathname.replace("/",""),n=sOe(r);if(Zr({title:n==null?void 0:n.metaTitle,description:n==null?void 0:n.metaDescription}),!n)return s.jsx(Ft,{children:s.jsxs("div",{className:"container py-20 text-center",children:[s.jsx("h1",{className:"font-heading text-3xl font-bold mb-4",children:"Moneda nu a fost găsită"}),s.jsx(be,{to:"/crypto",className:"text-primary hover:underline",children:"← Înapoi la Crypto Hub"})]})});const{data:i,isLoading:a}=cze(n.id),{data:o}=E_(),l={"@context":"https://schema.org","@type":"WebPage",name:n.metaTitle,description:n.metaDescription,url:`https://eduweb.ro/${n.slug}`,mainEntity:{"@type":"FinancialProduct",name:n.name,description:n.shortDescription}},c={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.faqItems.map(d=>
2149({"@type":"Question",name:d.q,acceptedAnswer:{"@type":"Answer",text:d.a}}))};return s.jsxs(Ft,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(c)}}),s.jsxs("section",{className:"container py-8",children:[s.jsxs("nav",{className:"text-sm text-muted-foreground mb-6 flex items-center gap-1.5",children:[s.jsx(be,{to:"/",className:"hover:text-foreground",children:"Acasă"}),s.jsx("span",{children:"/"}),s.jsx(be,{to:"/crypto",className:"hover:text-foreground",children:"Crypto"}),s.jsx("span",{children:"/"}),s.jsx("span",{className:"text-foreground",children:n.name})]}),s.jsxs(Le.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4},className:"flex flex-col lg:flex-row gap-8",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[(i==null?void 0:i.image)&&s.jsx("img",{src:i.image,alt:n.name,className:"w-12 h-12 rounded-full"}),s.jsxs("div",{children:[s.jsxs("h1",{className:"font-heading text-3xl md:text-4xl font-bold tracking-tight",children:[n.name," ",s.jsxs("span",{className:"text-muted-foreground",children:["(",n.symbol,")"]})]}),s.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:n.shortDescription})]})]}),s.jsxs("h2",{className:"font-heading text-xl md:text-2xl font-bold mt-4 mb-3",children:["Preț ",n.name]}),a?s.jsxs("div",{className:"space-y-3",children:[s.jsx(Bo,{className:"h-12 w-64"}),s.jsx(Bo,{className:"h-6 w-48"})]}):i?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-baseline gap-4 mb-2",children:[s.jsx("span",{className:"font-heading text-4xl md:text-5xl font-bold",children:iA(i.current_price)}),s.jsx(wF,{value:i.price_change_percentage_24h})]}),s.jsxs("div",{className:"flex gap-4 text-sm text-muted-foreground mb-6",children:[s.jsxs("span",{children:["7z: ",s.jsx(wF,{value:i.price_change_percentage_7d_in_currency})]}),s.jsxs("span",{children:["30z: ",s.jsx(wF,{value:i.price_change_percentage_30d_in_currency})]})]}),((u=i.sparkline_in_7d)==null?void 0:u.price)&&s.jsxs(st,{className:"glass-card mb-6",children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-base flex items-center gap-2",children:[s.jsx(Eo,{size:16,className:"text-primary"}),"Grafic 7 zile (",n.symbol,"/RON)"]})}),s.jsx(ot,{className:"pb-4",children:s.jsx(yxe,{prices:i.sparkline_in_7d.price,color:n.color})})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-6",children:[s.jsx(Dx,{label:"Market Cap",value:iA(i.market_cap),icon:Wi}),s.jsx(Dx,{label:"Volum 24h",value:iA(i.total_volume),icon:Eo}),s.jsx(Dx,{label:"Maxim 24h",value:iA(i.high_24h),icon:oa}),s.jsx(Dx,{label:"Minim 24h",value:iA(i.low_24h),icon:B2}),s.jsx(Dx,{label:"Circulație",value:Vgt(i.circulating_supply)+" "+n.symbol,icon:Gh}),s.jsx(Dx,{label:"ATH",value:iA(i.ath),icon:Uv})]})]}):null,s.jsx(Ugt,{coinId:n.id,coinName:n.name,priceChange24h:i==null?void 0:i.price_change_percentage_24h,priceChange30d:i==null?void 0:i.price_change_percentage_30d_in_currency}),s.jsx("div",{className:"my-8",children:s.jsx(Hgt,{coinId:n.id,coinName:n.name,coinSymbol:n.symbol,pillarSlug:n.pillarSlug})}),s.jsx($gt,{coinName:n.name,coinSymbol:n.symbol,relatedKeywords:n.relatedKeywords}),s.jsx("div",{className:"my-6",children:s.jsx(rj,{})}),s.jsxs(st,{className:"glass-card",children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"text-lg flex items-center gap-2",children:[s.jsx(ki,{size:16,className:"text-primary"}),"Întrebări frecvente despre ",n.name]})}),s.jsx(ot,{children:s.jsx(lo,{type:"single",collapsible:!0,className:"w-full",children:n.faqItems.map((d,h)=>s.jsxs(Os,{value:`faq-${h}`,children:[s.jsx(Ls,{className:"text-left text-sm font-medium",children:d.q}),s.jsx(Rs,{className:"text-muted-foreground text-sm",children:d.a})]},h))})})]})]}),s.jsxs("div",{className:"w-full lg:w-80 space-y-5",children:[s.jsx($He,{coinId:n.id,coinSymbol:n.symbol,coinName:n.name}),s.jsxs(st,{className:"glass-card",children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm",children:"Alte monede"})}),s.jsx(ot,{className:"space-y-1",children:fs.filter(d=>
vendor: 19,405 bytes, line 2149
2149d.id!==n.id).map(d=>{const h=o==null?void 0:o.find(p=>p.id===d.id),f=((h==null?void 0:h.price_change_percentage_24h)??0)>=0;return s.jsxs(be,{to:`/${d.slug}`,className:"flex items-center justify-between px-2 py-2 rounded-md text-sm hover:bg-secondary transition-colors",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-base",children:d.icon}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:d.name}),h&&s.jsx("p",{className:"text-[10px] text-muted-foreground",children:iA(h.current_price)})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx(at,{variant:"secondary",className:"text-[10px] mb-0.5",children:d.symbol}),h&&s.jsxs("p",{className:`text-[10px] font-semibold flex items-center justify-end gap-0.5 ${f?"text-green-500":"text-red-500"}`,children:[f?s.jsx(n4,{size:9}):s.jsx(Dv,{size:9}),Math.abs(h.price_change_percentage_24h).toFixed(1),"%"]})]})]},d.id)})})]}),s.jsx(Zfe,{})]})]})]})]})}function dZ(e,[r,n]){return Math.min(n,Math.max(r,e))}function $T(e){const r=w.useRef({value:e,previous:e});return w.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}var Wgt=[" ","Enter","ArrowUp","ArrowDown"],qgt=[" ","Enter"],kg="Select",[QT,HT,Kgt]=p_(kg),[pb,RUt]=rs(kg,[Kgt,z0]),VT=z0(),[Ggt,Ip]=pb(kg),[Xgt,Ygt]=pb(kg),vxe=e=>{const{__scopeSelect:r,children:n,open:i,defaultOpen:a,onOpenChange:o,value:l,defaultValue:c,onValueChange:u,dir:d,name:h,autoComplete:f,disabled:p,required:m,form:A}=e,g=VT(r),[y,x]=w.useState(null),[b,v]=w.useState(null),[j,_]=w.useState(!1),C=q0(d),[N,S]=nl({prop:i,defaultProp:a??!1,onChange:o,caller:kg}),[E,O]=nl({prop:l,defaultProp:c,onChange:u,caller:kg}),B=w.useRef(null),T=y?A||!!y.closest("form"):!0,[F,I]=w.useState(new Set),D=Array.from(F).map(L=>L.props.value).join(";");return s.jsx(e8,{...g,children:s.jsxs(Ggt,{required:m,scope:r,trigger:y,onTriggerChange:x,valueNode:b,onValueNodeChange:v,valueNodeHasChildren:j,onValueNodeHasChildrenChange:_,contentId:Ul(),value:E,onValueChange:O,open:N,onOpenChange:S,dir:C,triggerPointerDownPosRef:B,disabled:p,children:[s.jsx(QT.Provider,{scope:r,children:s.jsx(Xgt,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(L=>{I(V=>new Set(V).add(L))},[]),onNativeOptionRemove:w.useCallback(L=>{I(V=>{const U=new Set(V);return U.delete(L),U})},[]),children:n})}),T?s.jsxs(Hxe,{"aria-hidden":!0,required:m,tabIndex:-1,name:h,autoComplete:f,value:E,onChange:L=>O(L.target.value),disabled:p,form:A,children:[E===void 0?s.jsx("option",{value:""}):null,Array.from(F)]},D):null]})})};vxe.displayName=kg;var bxe="SelectTrigger",wxe=w.forwardRef((e,r)=>{const{__scopeSelect:n,disabled:i=!1,...a}=e,o=VT(n),l=Ip(bxe,n),c=l.disabled||i,u=Mr(r,l.onTriggerChange),d=HT(n),h=w.useRef("touch"),[f,p,m]=Wxe(g=>{const y=d().filter(v=>!v.disabled),x=y.find(v=>v.value===l.value),b=qxe(y,g,x);b!==void 0&&l.onValueChange(b.value)}),A=g=>{c||(l.onOpenChange(!0),m()),g&&(l.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return s.jsx(t8,{asChild:!0,...o,children:s.jsx(Rt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Vxe(l.value)?"":void 0,...a,ref:u,onClick:bt(a.onClick,g=>{g.currentTarget.focus(),h.current!=="mouse"&&A(g)}),onPointerDown:bt(a.onPointerDown,g=>{h.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(A(g),g.preventDefault())}),onKeyDown:bt(a.onKeyDown,g=>{const y=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(y&&g.key===" ")&&Wgt.includes(g.key)&&(A(),g.preventDefault())})})})});wxe.displayName=bxe;var jxe="SelectValue",_xe=w.forwardRef((e,r)=>{const{__scopeSelect:n,className:i,style:a,children:o,placeholder:l="",...c}=e,u=Ip(jxe,n),{onValueNodeHasChildrenChange:d}=u,h=o!==void 0,f=Mr(r,u.onValueNodeChange);return xa(()=>{d(h)},[d,h]),s.jsx(Rt.span,{...c,ref:f,style:{pointerEvents:"none"},children:Vxe(u.value)?s.jsx(s.Fragment,{children:l}):o})});_xe.displayName=jxe;var Jgt="SelectIcon",Cxe=w.forwardRef((e,r)=>{const{__scopeSelect:n,children:i,...a}=e;return s.jsx(Rt.span,{"aria-hidden":!0,...a,ref:r,children:i||"▼"})});Cxe.displayName=Jgt;var Zgt="SelectPortal",Nxe=e=>s.jsx(A_,{asChild:!0,...e});Nxe.displayName=Zgt;var Eg="SelectContent",Sxe=w.forwardRef((e,r)=>{const n=Ip(Eg,e.__scopeSelect),[i,a]=w.useState();if(xa(()=>{a(new DocumentFragment)},[]),!n.open){const o=i;return o?Kh.createPortal(s.jsx(kxe,{scope:e.__scopeSelect,children:s.jsx(QT.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),o):null}return s.jsx(Exe,{...e,ref:r})});Sxe.displayName=Eg;var ou=10,[kxe,Fp]=pb(Eg),ext="SelectContentImpl",txt=fg("SelectContent.RemoveScroll"),Exe=w.forwardRef((e,r)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:u,align:d,alignOffset:h,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:A,hideWhenDetached:g,avoidCollisions:y,...x}=e,b=Ip(Eg,n),[v,j]=w.useState(null),[_,C]=w.useState(null),N=Mr(r,X=>j(X)),[S,E]=w.useState(null),[O,B]=w.useState(null),T=HT(n),[F,I]=w.useState(!1),D=w.useRef(!1);w.useEffect(()=>{if(v)return g8(v)},[v]),m8();const L=w.useCallback(X=>{const[de,...oe]=T().map(ge=>ge.ref.current),[ce]=oe.slice(-1),ye=document.activeElement;for(const ge of X)if(ge===ye||(ge==null||ge.scrollIntoView({block:"nearest"}),ge===de&&_&&(_.scrollTop=0),ge===ce&&_&&(_.scrollTop=_.scrollHeight),ge==null||ge.focus(),document.activeElement!==ye))return},[T,_]),V=w.useCallback(()=>L([S,v]),[L,S,v]);w.useEffect(()=>{F&&V()},[F,V]);const{onOpenChange:U,triggerPointerDownPosRef:Q}=b;w.useEffect(()=>{if(v){let X={x:0,y:0};const de=ce=>{var ye,ge;X={x:Math.abs(Math.round(ce.pageX)-(((ye=Q.current)==null?void 0:ye.x)??0)),y:Math.abs(Math.round(ce.pageY)-(((ge=Q.current)==null?void 0:ge.y)??0))}},oe=ce=>{X.x<=10&&X.y<=10?ce.preventDefault():v.contains(ce.target)||U(!1),document.removeEventListener("pointermove",de),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",de),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",de),document.removeEventListener("pointerup",oe,{capture:!0})}}},[v,U,Q]),w.useEffect(()=>{const X=()=>U(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[U]);const[$,q]=Wxe(X=>{const de=T().filter(ye=>!ye.disabled),oe=de.find(ye=>ye.ref.current===document.activeElement),ce=qxe(de,X,oe);ce&&setTimeout(()=>ce.ref.current.focus())}),M=w.useCallback((X,de,oe)=>{const ce=!D.current&&!oe;(b.value!==void 0&&b.value===de||ce)&&(E(X),ce&&(D.current=!0))},[b.value]),z=w.useCallback(()=>v==null?void 0:v.focus(),[v]),K=w.useCallback((X,de,oe)=>{const ce=!D.current&&!oe;(b.value!==void 0&&b.value===de||ce)&&B(X)},[b.value]),ne=i==="popper"?KM:Bxe,ie=ne===KM?{side:c,sideOffset:u,align:d,alignOffset:h,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:A,hideWhenDetached:g,avoidCollisions:y}:{};return s.jsx(kxe,{scope:n,content:v,viewport:_,onViewportChange:C,itemRefCallback:M,selectedItem:S,onItemLeave:z,itemTextRefCallback:K,focusSelectedItem:V,selectedItemText:O,position:i,isPositioned:F,searchRef:$,children:s.jsx(E4,{as:txt,allowPinchZoom:!0,children:s.jsx(S4,{asChild:!0,trapped:b.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:bt(a,X=>{var de;(de=b.trigger)==null||de.focus({preventScroll:!0}),X.preventDefault()}),children:s.jsx(F0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:s.jsx(ne,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:X=>X.preventDefault(),...x,...ie,onPlaced:()=>I(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:bt(x.onKeyDown,X=>{const de=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!de&&X.key.length===1&&q(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let ce=T().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);if(["ArrowUp","End"].includes(X.key)&&(ce=ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const ye=X.target,ge=ce.indexOf(ye);ce=ce.slice(ge+1)}setTimeout(()=>L(ce)),X.preventDefault()}})})})})})})});Exe.displayName=ext;var rxt="SelectItemAlignedPosition",Bxe=w.forwardRef((e,r)=>{const{__scopeSelect:n,onPlaced:i,...a}=e,o=Ip(Eg,n),l=Fp(Eg,n),[c,u]=w.useState(null),[d,h]=w.useState(null),f=Mr(r,N=>h(N)),p=HT(n),m=w.useRef(!1),A=w.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:x,focusSelectedItem:b}=l,v=w.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&d&&g&&y&&x){const N=o.trigger.getBoundingClientRect(),S=d.getBoundingClientRect(),E=o.valueNode.getBoundingClientRect(),O=x.getBoundingClientRect();if(o.dir!=="rtl"){const ye=O.left-S.left,ge=E.left-ye,Be=N.left-ge,Ve=N.width+Be,te=Math.max(Ve,S.width),xe=window.innerWidth-ou,We=dZ(ge,[ou,Math.max(ou,xe-te)]);c.style.minWidth=Ve+"px",c.style.left=We+"px"}else{const ye=S.right-O.right,ge=window.innerWidth-E.right-ye,Be=window.innerWidth-N.right-ge,Ve=N.width+Be,te=Math.max(Ve,S.width),xe=window.innerWidth-ou,We=dZ(ge,[ou,Math.max(ou,xe-te)]);c.style.minWidth=Ve+"px",c.style.right=We+"px"}const B=p(),T=window.innerHeight-ou*2,F=g.scrollHeight,I=window.getComputedStyle(d),D=parseInt(I.borderTopWidth,10),L=parseInt(I.paddingTop,10),V=parseInt(I.borderBottomWidth,10),U=parseInt(I.paddingBottom,10),Q=D+L+F+U+V,$=Math.min(y.offsetHeight*5,Q),q=window.getComputedStyle(g),M=parseInt(q.paddingTop,10),z=parseInt(q.paddingBottom,10),K=N.top+N.height/2-ou,ne=T-K,ie=y.offsetHeight/2,X=y.offsetTop+ie,de=D+L+X,oe=Q-de;if(de<=K){const ye=B.length>0&&y===B[B.length-1].ref.current;c.style.bottom="0px";const ge=d.clientHeight-g.offsetTop-g.offsetHeight,Be=Math.max(ne,ie+(ye?z:0)+ge+V),Ve=de+Be;c.style.height=Ve+"px"}else{const ye=B.length>0&&y===B[0].ref.current;c.style.top="0px";const Be=Math.max(K,D+g.offsetTop+(ye?M:0)+ie)+oe;c.style.height=Be+"px",g.scrollTop=de-K+g.offsetTop}c.style.margin=`${ou}px 0`,c.style.minHeight=$+"px",c.style.maxHeight=T+"px",i==null||i(),requestAnimationFrame(()=>m.current=!0)}},[p,o.trigger,o.valueNode,c,d,g,y,x,o.dir,i]);xa(()=>v(),[v]);const[j,_]=w.useState();xa(()=>{d&&_(window.getComputedStyle(d).zIndex)},[d]);const C=w.useCallback(N=>{N&&A.current===!0&&(v(),b==null||b(),A.current=!1)},[v,b]);return s.jsx(ixt,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:s.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:s.jsx(Rt.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Bxe.displayName=rxt;var nxt="SelectPopperPosition",KM=w.forwardRef((e,r)=>{const{__scopeSelect:n,align:i="start",collisionPadding:a=ou,...o}=e,l=VT(n);return s.jsx(r8,{...l,...o,ref:r,align:i,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});KM.displayName=nxt;var[ixt,UQ]=pb(Eg,{}),GM="SelectViewport",Txe=w.forwardRef((e,r)=>{const{__scopeSelect:n,nonce:i,...a}=e,o=Fp(GM,n),l=UQ(GM,n),c=Mr(r,o.onViewportChange),u=w.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),s.jsx(QT.Slot,{scope:n,children:s.jsx(Rt.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:bt(a.onScroll,d=>{const h=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=l;if(p!=null&&p.current&&f){const m=Math.abs(u.current-h.scrollTop);if(m>0){const A=window.innerHeight-ou*2,g=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),x=Math.max(g,y);if(x<A){const b=x+m,v=Math.min(A,b),j=b-v;f.style.height=v+"px",f.style.bottom==="0px"&&(h.scrollTop=j>0?j:0,f.style.justifyContent="flex-end")}}}u.current=h.scrollTop})})})]})});Txe.displayName=GM;var Pxe="SelectGroup",[axt,sxt]=pb(Pxe),oxt=w.forwardRef((e,r)=>{const{__scopeSelect:n,...i}=e,a=Ul();return s.jsx(axt,{scope:n,id:a,children:s.jsx(Rt.div,{role:"group","aria-labelledby":a,...i,ref:r})})});oxt.displayName=Pxe;var Ixe="SelectLabel",Fxe=w.forwardRef((e,r)=>{const{__scopeSelect:n,...i}=e,a=sxt(Ixe,n);return s.jsx(Rt.div,{id:a.id,...i,ref:r})});Fxe.displayName=Ixe;var H5="SelectItem",[lxt,Oxe]=pb(H5),Lxe=w.forwardRef((e,r)=>{const{__scopeSelect:n,value:i,disabled:a=!1,textValue:o,...l}=e,c=Ip(H5,n),u=Fp(H5,n),d=c.value===i,[h,f]=w.useState(o??""),[p,m]=w.useState(!1),A=Mr(r,b=>{var v;return(v=u.itemRefCallback)==null?void 0:v.call(u,b,i,a)}),g=Ul(),y=w.useRef("touch"),x=()=>{a||(c.onValueChange(i),c.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(lxt,{scope:n,value:i,disabled:a,textId:g,isSelected:d,onItemTextChange:w.useCallback(b=>{f(v=>v||((b==null?void 0:b.textContent)??"").trim())},[]),children:s.jsx(QT.ItemSlot,{scope:n,value:i,disabled:a,textValue:h,children:s.jsx(Rt.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:A,onFocus:bt(l.onFocus,()=>m(!0)),onBlur:bt(l.onBlur,()=>m(!1)),onClick:bt(l.onClick,()=>{y.current!=="mouse"&&x()}),onPointerUp:bt(l.onPointerUp,()=>{y.current==="mouse"&&x()}),onPointerDown:bt(l.onPointerDown,b=>{y.current=b.pointerType}),onPointerMove:bt(l.onPointerMove,b=>{var v;y.current=b.pointerType,a?(v=u.onItemLeave)==null||v.call(u):y.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:bt(l.onPointerLeave,b=>{var v;b.currentTarget===document.activeElement&&((v=u.onItemLeave)==null||v.call(u))}),onKeyDown:bt(l.onKeyDown,b=>{var j;((j=u.searchRef)==null?void 0:j.current)!==""&&b.key===" "||(qgt.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});Lxe.displayName=H5;var ow="SelectItemText",Rxe=w.forwardRef((e,r)=>{const{__scopeSelect:n,className:i,style:a,...o}=e,l=Ip(ow,n),c=Fp(ow,n),u=Oxe(ow,n),d=Ygt(ow,n),[h,f]=w.useState(null),p=Mr(r,x=>f(x),u.onItemTextChange,x=>{var b;return(b=c.itemTextRefCallback)==null?void 0:b.call(c,x,u.value,u.disabled)}),m=h==null?void 0:h.textContent,A=w.useMemo(()=>s.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=d;return xa(()=>(g(A),()=>y(A)),[g,y,A]),s.jsxs(s.Fragment,{children:[s.jsx(Rt.span,{id:u.textId,...o,ref:p}),u.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Kh.createPortal(o.children,l.valueNode):null]})});Rxe.displayName=ow;var Dxe="SelectItemIndicator",Mxe=w.forwardRef((e,r)=>{const{__scopeSelect:n,...i}=e;return Oxe(Dxe,n).isSelected?s.jsx(Rt.span,{"aria-hidden":!0,...i,ref:r}):null});Mxe.displayName=Dxe;var XM="SelectScrollUpButton",zxe=w.forwardRef((e,r)=>{const n=Fp(XM,e.__scopeSelect),i=UQ(XM,e.__scopeSelect),[a,o]=w.useState(!1),l=Mr(r,i.onScrollButtonChange);return xa(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollTop>0;o(d)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?s.jsx($xe,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});zxe.displayName=XM;var YM="SelectScrollDownButton",Uxe=w.forwardRef((e,r)=>{const n=Fp(YM,e.__scopeSelect),i=UQ(YM,e.__scopeSelect),[a,o]=w.useState(!1),l=Mr(r,i.onScrollButtonChange);return xa(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollHeight-u.clientHeight,h=Math.ceil(u.scrollTop)<d;o(h)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?s.jsx($xe,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});Uxe.displayName=YM;var $xe=w.forwardRef((e,r)=>{const{__scopeSelect:n,onAutoScroll:i,...a}=e,o=Fp("SelectScrollButton",n),l=w.useRef(null),c=HT(n),u=w.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return w.useEffect(()=>()=>u(),[u]),xa(()=>{var h;const d=c().find(f=>f.ref.current===document.activeElement);(h=d==null?void 0:d.ref.current)==null||h.scrollIntoView({block:"nearest"})},[c]),s.jsx(Rt.div,{"aria-hidden":!0,...a,ref:r,style:{flexShrink:0,...a.style},onPointerDown:bt(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(i,50))}),onPointerMove:bt(a.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),l.current===null&&(l.current=window.setInterval(i,50))}),onPointerLeave:bt(a.onPointerLeave,()=>{u()})})}),cxt="SelectSeparator",Qxe=w.forwardRef((e,r)=>{const{__scopeSelect:n,...i}=e;return s.jsx(Rt.div,{"aria-hidden":!0,...i,ref:r})});Qxe.displayName=cxt;var JM="SelectArrow",uxt=w.forwardRef((e,r)=>{const{__scopeSelect:n,...i}=e,a=VT(n),o=Ip(JM,n),l=Fp(JM,n);return o.open&&l.position==="popper"?s.jsx(n8,{...a,...i,ref:r}):null});uxt.displayName=JM;var dxt="SelectBubbleInput",Hxe=w.forwardRef(({__scopeSelect:e,value:r,...n},i)=>{const a=w.useRef(null),o=Mr(i,a),l=$T(r);return w.useEffect(()=>{const c=a.current;if(!c)return;const u=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(l!==r&&h){const f=new Event("change",{bubbles:!0});h.call(c,r),c.dispatchEvent(f)}},[l,r]),s.jsx(Rt.select,{...n,style:{...joe,...n.style},ref:o,defaultValue:r})});Hxe.displayName=dxt;function Vxe(e){return e===""||e===void 0}function Wxe(e){const r=To(e),n=w.useRef(""),i=w.useRef(0),a=w.useCallback(l=>{const c=n.current+l;r(c),function u(d){n.current=d,window.clearTimeout(i.current),d!==""&&(i.current=window.setTimeout(()=>u(""),1e3))}(c)},[r]),o=w.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,a,o]}function qxe(e,r,n){const a=r.length>1&&Array.from(r).every(d=>d===r[0])?r[0]:r,o=n?e.indexOf(n):-1;let l=hxt(e,Math.max(o,0));a.length===1&&(l=l.filter(d=>d!==n));const u=l.find(d=>d.textValue.toLowerCase().startsWith(a.toLowerCase()));return u!==n?u:void 0}function hxt(e,r){return e.map((n,i)=>e[(r+i)%e.length])}var fxt=vxe,Kxe=wxe,mxt=_xe,pxt=Cxe,Axt=Nxe,Gxe=Sxe,gxt=Txe,Xxe=Fxe,Yxe=Lxe,xxt=Rxe,yxt=Mxe,Jxe=zxe,Zxe=Uxe,eye=Qxe;
2149const Cn=fxt,Nn=mxt,yn=w.forwardRef(({className:e,children:r,...n},i)=>s.jsxs(Kxe,{ref:i,className:it("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[r,s.jsx(pxt,{asChild:!0,children:s.jsx(Vl,{className:"h-4 w-4 opacity-50"})})]}));yn.displayName=Kxe.displayName;const tye=w.forwardRef(({className:e,...r},n)=>s.jsx(Jxe,{ref:n,className:it("flex cursor-default items-center justify-center py-1",e),...r,children:s.jsx(i4,{className:"h-4 w-4"})}));tye.displayName=Jxe.displayName;const rye=w.forwardRef(({className:e,...r},n)=>s.jsx(Zxe,{ref:n,className:it("flex cursor-default items-center justify-center py-1",e),...r,children:s.jsx(Vl,{className:"h-4 w-4"})}));rye.displayName=Zxe.displayName;const vn=w.forwardRef(({className:e,children:r,position:n="popper",...i},a)=>s.jsx(Axt,{children:s.jsxs(Gxe,{ref:a,className:it("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...i,children:[s.jsx(tye,{}),s.jsx(gxt,{className:it("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),s.jsx(rye,{})]})}));vn.displayName=Gxe.displayName;const vxt=w.forwardRef(({className:e,...r},n)=>s.jsx(Xxe,{ref:n,className:it("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...r}));vxt.displayName=Xxe.displayName;const _t=w.forwardRef(({className:e,children:r,...n},i)=>s.jsxs(Yxe,{ref:i,className:it("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(yxt,{children:s.jsx(Bc,{className:"h-4 w-4"})})}),s.jsx(xxt,{children:r})]}));_t.displayName=Yxe.displayName;const bxt=w.forwardRef(({className:e,...r},n)=>s.jsx(eye,{ref:n,className:it("-mx-1 my-1 h-px bg-muted",e),...r}));bxt.displayName=eye.displayName;function wxt(){const[e,r]=w.useState(fs[0].id),[n,i]=w.useState("1"),[a,o]=w.useState(""),[l,c]=w.useState("c2r"),{data:u}=Whe(e),d=fs.find(p=>p.id===e),h=p=>{i(p),c("c2r"),u&&o(((parseFloat(p)||0)*u).toFixed(2))},f=p=>{o(p),c("r2c"),u&&i(((parseFloat(p)||0)/u).toFixed(8))};return u&&l==="c2r"&&((parseFloat(n)||0)*u).toFixed(2),s.jsxs(st,{className:"glass-card max-w-lg mx-auto",children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"text-xl flex items-center gap-2",children:[s.jsx(Gh,{size:20,className:"text-primary"}),"Convertor Crypto ↔ RON"]})}),s.jsxs(ot,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm text-muted-foreground mb-1.5 block",children:"Selectează moneda"}),s.jsxs(Cn,{value:e,onValueChange:p=>{r(p),i("1"),c("c2r")},children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsx(vn,{children:fs.map(p=>s.jsxs(_t,{value:p.id,children:[p.icon," ",p.name," (",p.symbol,")"]},p.id))})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm text-muted-foreground mb-1.5 block",children:d.symbol}),s.jsx(qe,{type:"number",value:n,onChange:p=>h(p.target.value),className:"text-lg font-heading"})]}),s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"p-2 rounded-full bg-secondary",children:s.jsx(Gh,{size:16,className:"text-muted-foreground"})})}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm text-muted-foreground mb-1.5 block",children:"RON (Lei românești)"}),s.jsx(qe,{type:"number",value:a,onChange:p=>f(p.target.value),className:"text-lg font-heading"})]}),u&&s.jsxs("p",{className:"text-sm text-muted-foreground text-center pt-2",children:["1 ",d.symbol," = ",u.toLocaleStr
2149ing("ro-RO",{minimumFractionDigits:2})," RON"]})]})]})}function jxt(){return Zr({title:"Convertor Crypto ↔ RON – Calculează instant",description:"Convertor criptomonede în lei (RON). Calculează instant prețul Bitcoin, Ethereum, Solana și altor monede în lei românești."}),s.jsx(Ft,{children:s.jsxs("section",{className:"container py-10",children:[s.jsxs(Le.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4},children:[s.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold tracking-tight text-center mb-2",children:"Convertor Crypto ↔ RON"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-lg mx-auto mb-8",children:"Transformă instant criptomonede în lei românești (RON) și invers. Cursuri live."})]}),s.jsx(wxt,{}),s.jsx("div",{className:"mt-8 max-w-lg mx-auto",children:s.jsx(rj,{})}),s.jsxs("div",{className:"mt-12",children:[s.jsx("h2",{className:"font-heading text-xl font-semibold mb-4 text-center",children:"Prețuri live în RON"}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-3 max-w-3xl mx-auto",children:fs.map(e=>s.jsxs(be,{to:`/${e.slug}`,className:"flex items-center gap-2 px-3 py-2.5 rounded-lg border border-border hover:border-primary/30 hover:bg-secondary transition-colors",children:[s.jsx("span",{className:"text-lg",children:e.icon}),s.jsxs("div",{children:[s.jsx("p",{className:"font-heading font-semibold text-sm",children:e.symbol}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:e.name})]})]},e.id))})]})]})})}const _xt="https://ahleagpvrcuwshrzzpkq.supabase.co/functions/v1/crypto-prices",hZ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw";async function Cxt(e=1,r=100){const n=await fetch(`${_xt}?mode=full&page=${e}&per_page=${r}`,{headers:{"Content-Type":"application/json",apikey:hZ,Authorization:`Bearer ${hZ}`}});if(!n.ok)throw new Error(`Edge error ${n.status}`);return n.json()}function Nxt(e=1,r=100){return Xe({queryKey:["full-market",e,r],queryFn:()=>Cxt(e,r),staleTime:3*6e4,refetchInterval:3*6e4})}function nye(e){return e<.01?`$${e.toFixed(6)}`:e<1?`$${e.toFixed(4)}`:new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function fZ(e){return e>=1e12?`$${(e/1e12).toFixed(2)}T`:e>=1e9?`$${(e/1e9).toFixed(2)}B`:e>=1e6?`$${(e/1e6).toFixed(2)}M`:`$${e.toLocaleString("en-US")}`}function ZM({value:e}){if(e==null)return s.jsx("span",{className:"text-muted-foreground",children:"—"});const r=e>=0;return s.jsxs("span",{className:`inline-flex items-center gap-0.5 font-semibold text-sm ${r?"text-green-500":"text-red-500"}`,children:[r?s.jsx(n4,{size:12}):s.jsx(Dv,{size:12}),Math.abs(e).toFixed(2),"%"]})}function mZ({coin:e,rank:r}){e.price_change_percentage_24h>=0;const n=fs.find(o=>o.id===e.id),i=n?`/${n.slug}`:void 0,a=s.jsxs("div",{className:"flex items-center gap-3 p-3",children:[s.jsx("span",{className:"text-xs font-bold text-muted-foreground w-5",children:r}),s.jsx("img",{src:e.image,alt:e.name,className:"w-8 h-8 rounded-full",loading:"lazy"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-heading font-semibold text-sm truncate",children:e.name}),s.jsx("p",{className:"text-xs text-muted-foreground uppercase",children:e.symbol})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("p",{className:"font-semibold text-sm",children:nye(e.current_price)}),s.jsx(ZM,{value:e.price_change_percentage_24h})]})]});return i?s.jsx(be,{to:i,className:"block rounded-lg border border-border hover:border-primary/30 hover:bg-secondary/50 transition-all",children:a}):s.jsx("div",{className:"rounded-lg border border-border",children:a})}function Sxt(){Zr({title:"Prețuri Crypto Live — Top 100 Monede",description:"Urmărește prețurile crypto live pentru top 100 monede. Câștigători, perdanți, market cap și volum actualizate în timp real."});const[e,r]=w.useState(1),[n,i]=w.useState(""),[a,o]=w.useState("market_cap_rank"),[l,c]=w.useState(!0),{data:u,isLoading:d}=Nxt(e,100),h=w.useMemo(()=>
2149{if(!u)return[];let g=[...u];if(n.trim()){const y=n.toLowerCase();g=g.filter(x=>x.name.toLowerCase().includes(y)||x.symbol.toLowerCase().includes(y))}return g.sort((y,x)=>{const b=y[a]??0,v=x[a]??0;return l?b-v:v-b}),g},[u,n,a,l]),f=w.useMemo(()=>u?[...u].sort((g,y)=>(y.price_change_percentage_24h??0)-(g.price_change_percentage_24h??0)).slice(0,5):[],[u]),p=w.useMemo(()=>u?[...u].sort((g,y)=>(g.price_change_percentage_24h??0)-(y.price_change_percentage_24h??0)).slice(0,5):[],[u]),m=g=>{a===g?c(!l):(o(g),c(g==="market_cap_rank"))},A=({label:g,field:y,className:x=""})=>s.jsx("th",{className:`px-3 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider cursor-pointer hover:text-foreground transition-colors select-none ${x}`,onClick:()=>m(y),children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[g,a===y&&s.jsx("span",{className:"text-primary",children:l?"↑":"↓"})]})});return s.jsx(Ft,{children:s.jsxs("section",{className:"container py-8",children:[s.jsxs("nav",{className:"text-sm text-muted-foreground mb-6 flex items-center gap-1.5",children:[s.jsx(be,{to:"/",className:"hover:text-foreground",children:"Acasă"}),s.jsx("span",{children:"/"}),s.jsx(be,{to:"/crypto",className:"hover:text-foreground",children:"Crypto"}),s.jsx("span",{children:"/"}),s.jsx("span",{className:"text-foreground",children:"Prețuri"})]}),s.jsxs(Le.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4},children:[s.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold tracking-tight mb-2",children:"Prețuri Crypto Live"}),s.jsx("p",{className:"text-muted-foreground mb-8 max-w-2xl",children:"Top 100 criptomonede după capitalizare de piață. Prețuri actualizate la fiecare 3 minute."}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8",children:[s.jsxs(st,{className:"glass-card",children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-base flex items-center gap-2",children:[s.jsx(oa,{size:16,className:"text-green-500"}),"Top Câștigători 24h"]})}),s.jsx(ot,{className:"space-y-1 p-3 pt-0",children:d?Array.from({length:5}).map((g,y)=>s.jsx(Bo,{className:"h-14 w-full rounded-lg"},y)):f.map((g,y)=>s.jsx(mZ,{coin:g,rank:y+1},g.id))})]}),s.jsxs(st,{className:"glass-card",children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-base flex items-center gap-2",children:[s.jsx(B2,{size:16,className:"text-red-500"}),"Top Perdanți 24h"]})}),s.jsx(ot,{className:"space-y-1 p-3 pt-0",children:d?Array.from({length:5}).map((g,y)=>s.jsx(Bo,{className:"h-14 w-full rounded-lg"},y)):p.map((g,y)=>s.jsx(mZ,{coin:g,rank:y+1},g.id))})]})]}),s.jsx(tj,{}),s.jsxs(st,{className:"glass-card",children:[s.jsxs(Ot,{className:"pb-3 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[s.jsx(Ht,{className:"text-lg",children:"Toate Monedele"}),s.jsxs("div",{className:"relative w-full sm:w-64",children:[s.jsx(ul,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută monedă...",value:n,onChange:g=>i(g.target.value),className:"pl-9 h-9 text-sm"})]})]}),s.jsxs(ot,{className:"p-0",children:[s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border",children:[s.jsx(A,{label:"#",field:"market_cap_rank",className:"text-center w-12"}),s.jsx("th",{className:"px-3 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider text-left",children:"Monedă"}),s.jsx(A,{label:"Preț",field:"current_price",className:"text-right"}),s.jsx(A,{label:"24h %",field:"price_change_percentage_24h",className:"text-right"}),s.jsx(A,{label:"7z %",field:"price_change_percentage_7d_in_currency",className:"text-right hidden md:table-cell"}),s.jsx(A,{label:"Market Cap",field:"market_cap",className:"text-right hidden lg:table-cell"}),s.jsx(A,{label:"Volum 24h",field:"total_volume",className:"text-right hidden lg:table-cell"}),s.jsx("th",{className:"px-3 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider text-center hidden md:table-cell w-28",children:"7z Grafic"})]})}),s.jsx("tbody",{children:d?Array.from({length:20}).map((g,y)=>s.jsx("tr",{className:"border-b border-border/50",children:Array.from({length:8}).map((x,b)=>s.jsx("td",{className:"px-3 py-3",children:s.jsx(Bo,{className:"h-5 w-full"})},b))},y)):h.map(g=>{var j;const y=fs.find(_=>_.id===g.id),x=y?`/${y.slug}`:void 0,v=(g.price_change_percentage_7d_in_currency??0)>=0?"#22c55e":"#ef4444";return s.jsxs("tr",{className:"border-b border-border/50 hover:bg-secondary/30 transition-colors",children:[s.jsx("td",{className:"px-3 py-3 text-center text-muted-foreground text-xs font-medium",children:g.market_cap_rank}),s.jsx("td",{className:"px-3 py-3",children:x?s.jsxs(be,{to:x,className:"flex items-center gap-2.5 group",children:[s.jsx("img",{src:g.image,alt:g.name,className:"w-7 h-7 rounded-full",loading:"lazy"}),s.jsxs("div",{children:[s.jsx("span",{className:"font-heading font-semibold group-hover:text-primary transition-colors",children:g.name}),s.jsx("span",{className:"text-muted-foreground text-xs ml-1.5 uppercase",children:g.symbol})]})]}):s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("img",{src:g.image,alt:g.name,className:"w-7 h-7 rounded-full",loading:"lazy"}),s.jsxs("div",{children:[s.jsx("span",{className:"font-heading font-semibold",children:g.name}),s.jsx("span",{className:"text-muted-foreground text-xs ml-1.5 uppercase",children:g.symbol})]})]})}),s.jsx("td",{className:"px-3 py-3 text-right font-semibold",children:nye(g.current_price)}),s.jsx("td",{className:"px-3 py-3 text-right",children:s.jsx(ZM,{value:g.price_change_percentage_24h})}),s.jsx("td",{className:"px-3 py-3 text-right hidden md:table-cell",children:s.jsx(ZM,{value:g.price_change_percentage_7d_in_currency})}),s.jsx("td",{className:"px-3 py-3 text-right hidden lg:table-cell text-muted-foreground",children:fZ(g.market_cap)}),s.jsx("td",{className:"px-3 py-3 text-right hidden lg:table-cell text-muted-foreground",children:fZ(g.total_volume)}),s.jsx("td",{className:"px-3 py-3 hidden md:table-cell",children:(j=g.sparkline_in_7d)!=null&&j.price?s.jsx("div",{className:"w-24 h-8 mx-auto",children:s.jsx(yxe,{prices:g.sparkline_in_7d.price,color:v,he
2149ight:32})}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"—"})})]},g.id)})})]})}),!n.trim()&&s.jsxs("div",{className:"flex items-center justify-center gap-3 p-4 border-t border-border",children:[s.jsxs(me,{variant:"outline",size:"sm",onClick:()=>r(g=>Math.max(1,g-1)),disabled:e<=1,children:[s.jsx(pg,{size:14})," Anterior"]}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:["Pagina ",s.jsx("span",{className:"font-semibold text-foreground",children:e})]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:()=>r(g=>g+1),disabled:!u||u.length<100,children:["Următor ",s.jsx(hs,{size:14})]})]})]})]})]})]})})}var WT="Switch",[kxt,DUt]=rs(WT),[Ext,Bxt]=kxt(WT),iye=w.forwardRef((e,r)=>{const{__scopeSwitch:n,name:i,checked:a,defaultChecked:o,required:l,disabled:c,value:u="on",onCheckedChange:d,form:h,...f}=e,[p,m]=w.useState(null),A=Mr(r,v=>m(v)),g=w.useRef(!1),y=p?h||!!p.closest("form"):!0,[x,b]=nl({prop:a,defaultProp:o??!1,onChange:d,caller:WT});return s.jsxs(Ext,{scope:n,checked:x,disabled:c,children:[s.jsx(Rt.button,{type:"button",role:"switch","aria-checked":x,"aria-required":l,"data-state":lye(x),"data-disabled":c?"":void 0,disabled:c,value:u,...f,ref:A,onClick:bt(e.onClick,v=>{b(j=>!j),y&&(g.current=v.isPropagationStopped(),g.current||v.stopPropagation())})}),y&&s.jsx(oye,{control:p,bubbles:!g.current,name:i,value:u,checked:x,required:l,disabled:c,form:h,style:{transform:"translateX(-100%)"}})]})});iye.displayName=WT;var aye="SwitchThumb",sye=w.forwardRef((e,r)=>{const{__scopeSwitch:n,...i}=e,a=Bxt(aye,n);return s.jsx(Rt.span,{"data-state":lye(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:r})});sye.displayName=aye;var Txt="SwitchBubbleInput",oye=w.forwardRef(({__scopeSwitch:e,control:r,checked:n,bubbles:i=!0,...a},o)=>{const l=w.useRef(null),c=Mr(l,o),u=$T(n),d=A4(r);return w.useEffect(()=>{const h=l.current;if(!h)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&m){const A=new Event("click",{bubbles:i});m.call(h,n),h.dispatchEvent(A)}},[u,n,i]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});oye.displayName=Txt;function lye(e){return e?"checked":"unchecked"}var cye=iye,Pxt=sye;const Pm=w.forwardRef(({className:e,...r},n)=>s.jsx(cye,{className:it("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...r,ref:n,children:s.jsx(Pxt,{className:it("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Pm.displayName=cye.displayName;const Ixt=["web3","blockchain","nft","ai","digital-marketing","e-learning","validare-nft"],Fxt={web3:"Web3",blockchain:"Blockchain",nft:"NFT",ai:"AI & Agenți AI","digital-marketing":"Marketing Digital","e-learning":"E-Learning","validare-nft":"Validare NFT"},Oxt=[{id:"tron",symbol:"TRX",icon:"⚡"},{id:"shiba-inu",symbol:"SHIB",icon:"🐕"},{id:"toncoin",symbol:"TON",icon:"💎"},{id:"stellar",symbol:"XLM",icon:"⭐"},{id:"uniswap",symbol:"UNI",icon:"🦄"},{id:"litecoin",symbol:"LTC",icon:"Ł"},{id:"near",symbol:"NEAR",icon:"🌐"},{id:"cosmos",symbol:"ATOM",icon:"⚛️"},{id:"arbitrum",symbol:"ARB",icon:"🔵"},{id:"optimism",symbol:"OP",icon:"🔴"},{id:"filecoin",symbol:"FIL",icon:"📁"},{id:"hedera-hashgraph",symbol:"HBAR",icon:"ℏ"},{id:"aptos",symbol:"APT",icon:"🅰️"},{id:"sui",symbol:"SUI",icon:"💧"},{id:"render-token",symbol:"RNDR",icon:"🎨"},{id:"injective-protocol",symbol:"INJ",icon:"💉"},{id:"the-graph",symbol:"GRT",icon:"📊"},{id:"aave",symbol:"AAVE",icon:"👻"},{id:"maker",symbol:"MKR",icon:"🏛️"}
2149,{id:"pepe",symbol:"PEPE",icon:"🐸"}],pZ=[...fs.map(e=>({id:e.id,symbol:e.symbol,icon:e.icon})),...Oxt];function Lxt(){const{user:e}=Fn(),{theme:r,setThemePreference:n}=j4(),[i,a]=w.useState("weekly"),[o,l]=w.useState([]),[c,u]=w.useState([]),[d,h]=w.useState(""),[f,p]=w.useState(!0),[m,A]=w.useState(!1),g=fs.map(N=>N.id);w.useEffect(()=>{e&&G.from("profiles").select("theme_preference, newsletter_frequency, newsletter_topics, newsletter_crypto_coins").eq("user_id",e.id).maybeSingle().then(({data:N})=>{N&&(N.theme_preference&&n(N.theme_preference),N.newsletter_frequency&&a(N.newsletter_frequency),N.newsletter_topics&&l(N.newsletter_topics),N.newsletter_crypto_coins&&u(N.newsletter_crypto_coins)),p(!1)})},[e]);const y=async N=>{if(!e)return;A(!0);const{error:S}=await G.from("profiles").update({...N,updated_at:new Date().toISOString()}).eq("user_id",e.id);A(!1),Ho(S?{title:"Eroare la salvare",description:S.message,variant:"destructive"}:{title:"Preferințe salvate ✓"})},x=()=>{const N=r==="dark"?"light":"dark";n(N),y({theme_preference:N})},b=N=>{a(N),y({newsletter_frequency:N})},v=N=>{const S=o.includes(N)?o.filter(E=>E!==N):[...o,N];l(S),y({newsletter_topics:S})},j=N=>{const S=c.includes(N)?c.filter(E=>E!==N):[...c,N];u(S),y({newsletter_crypto_coins:S})},_=w.useMemo(()=>{if(!d.trim())return[];const N=d.toLowerCase();return pZ.filter(S=>!g.includes(S.id)).filter(S=>S.symbol.toLowerCase().includes(N)||S.id.toLowerCase().includes(N))},[d]),C=w.useMemo(()=>c.filter(N=>!g.includes(N)).map(N=>pZ.find(S=>S.id===N)).filter(Boolean),[c]);return f?null:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(st,{className:"glass-card border-border/50",children:[s.jsx(Ot,{className:"pb-3",children:s.jsxs(Ht,{className:"text-base font-heading flex items-center gap-2",children:[r==="dark"?s.jsx(sle,{size:18}):s.jsx(fle,{size:18}),"Aspect vizual"]})}),s.jsxs(ot,{children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ge,{htmlFor:"dark-mode",className:"text-sm",children:"Dark Mode"}),s.jsx(Pm,{id:"dark-mode",checked:r==="dark",onCheckedChange:x})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1.5",children:"Preferința se salvează în contul tău și se aplică automat la logare."})]})]}),s.jsxs(st,{className:"glass-card border-border/50",children:[s.jsxs(Ot,{className:"pb-3",children:[s.jsxs(Ht,{className:"text-base font-heading flex items-center gap-2",children:[s.jsx(Za,{size:18}),"Preferințe Newsletter"]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Personalizează ce primești în newsletter-ul tău EduWeb."})]}),s.jsxs(ot,{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-primary/20 text-primary text-xs font-bold shrink-0",children:"1"}),s.jsx(Ge,{className:"text-sm font-semibold text-foreground",children:"Alege frecvența"})]}),s.jsx("div",{className:"ml-8",children:s.jsxs(Cn,{value:i,onValueChange:b,children:[s.jsx(yn,{className:"w-full max-w-xs bg-secondary/50 border-border",children:s.jsx(Nn,{})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"daily",children:"📬 Zilnic"}),s.jsx(_t,{value:"weekly",children:"📩 Săptămânal"}),s.jsx(_t,{value:"monthly",children:"📅 Lunar"}),s.jsx(_t,{value:"none",children:"🚫 Nu doresc newsletter"})]})]})})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-primary/20 text-primary text-xs font-bold shrink-0",children:"2"}),s.jsx(Ge,{className:"text-sm font-semibold text-foreground",children:"Selectează subiectele"})]}),s.jsx("div",{className:"ml-8 flex flex-wrap gap-2",children:Ixt.map(N=>{const S=o.includes(N);return s.jsxs(at,{variant:S?"default":"outline",className:`cursor-pointer transition-all text-xs px-3 py-1.5 ${S?"bg-primary text-primary-foreground shadow-sm":"bg-secondary/40 text-secondary-foreground hover:bg-primary/15 hover:text-primary border-border/60"}`,onClick:()=>v(N),children:[S&&s.jsx(Bc,{size:12,className:"mr-1"}),Fxt[N]||N]},N)})})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-primary/20 text-primary text-xs font-bold shrink-0",children:"3"}),s.jsx(Ge,{className:"text-sm font-semibold text-foreground",children:"Focus crypto"})]}),s.jsxs("div",{className:"ml-8 space-y-3",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Top 10 monede — apasă pentru a selecta:"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:fs.map(N=>{const S=c.includes(N.id);
2149return s.jsxs(at,{variant:S?"default":"outline",className:`cursor-pointer transition-all text-xs px-3 py-1.5 ${S?"bg-primary text-primary-foreground shadow-sm":"bg-secondary/40 text-secondary-foreground hover:bg-primary/15 hover:text-primary border-border/60"}`,onClick:()=>j(N.id),children:[S&&s.jsx(Bc,{size:12,className:"mr-1"}),N.icon," ",N.symbol]},N.id)})}),C.length>0&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Monede adăugate:"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:C.map(N=>s.jsxs(at,{className:"bg-primary text-primary-foreground cursor-pointer text-xs px-3 py-1.5",onClick:()=>j(N.id),children:[s.jsx(Uc,{size:12,className:"mr-1"}),N.icon," ",N.symbol]},N.id))})]}),s.jsxs("div",{className:"relative max-w-xs",children:[s.jsx(ul,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută alte monede (ex: SHIB, TON)...",value:d,onChange:N=>h(N.target.value),className:"pl-9 h-9 text-sm bg-secondary/50 border-border"})]}),_.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2 p-3 rounded-lg bg-secondary/30 border border-border/40",children:_.map(N=>{const S=c.includes(N.id);return s.jsxs(at,{variant:S?"default":"outline",className:`cursor-pointer transition-all text-xs px-3 py-1.5 ${S?"bg-primary text-primary-foreground shadow-sm":"bg-secondary/40 text-secondary-foreground hover:bg-primary/15 hover:text-primary border-border/60"}`,onClick:()=>{j(N.id),h("")},children:[S&&s.jsx(Bc,{size:12,className:"mr-1"}),N.icon," ",N.symbol]},N.id)})}),d.trim()&&_.length===0&&s.jsxs("p",{className:"text-xs text-muted-foreground ml-1",children:["Niciun rezultat pentru „",d,'"']})]})]})]})]})]})}const AZ={balance:0,total_earned:0,learning_score:0,community_score:0,passive_score:0,growth_score:0,validated_edu_score:0,login_streak:0,last_login_date:null};function qT(){const{user:e}=Fn(),r=Kr(),{data:n=AZ}=Xe({queryKey:["gamification-wallet",e==null?void 0:e.id],queryFn:async()=>{const{data:h}=await G.from("user_edu_coins").select("*").eq("user_id",e.id).maybeSingle();return h?{balance:h.balance,total_earned:h.total_earned,learning_score:h.learning_score??0,community_score:h.community_score??0,passive_score:h.passive_score??0,growth_score:h.growth_score??0,validated_edu_score:h.validated_edu_score??0,login_streak:h.login_streak??0,last_login_date:h.last_login_date??null}:AZ},enabled:!!e}),{data:i=[]}=Xe({queryKey:["reward-rules"],queryFn:async()=>{const{data:h}=await G.from("reward_rules").select("*").order("sort_order");return h||[]},staleTime:5*60*1e3}),{data:a={}}=Xe({queryKey:["gamification-config"],queryFn:async()=>{const{data:h}=await G.from("gamification_config").select("*"),f={};return(h||[]).forEach(p=>{f[p.key]=p.value}),f},staleTime:5*60*1e3}),{data:o=[]}=Xe({queryKey:["onboarding-missions",e==null?void 0:e.id],queryFn:async()=>{const h=(a==null?void 0:a.onboarding_missions)||[];if(!h.length)return[];const{data:f}=await G.from("onboarding_missions").select("mission_key").eq("user_id",e.id),p=new Set((f||[]).map(m=>m.mission_key));return h.map(m=>({...m,completed:p.has(m.key)}))},enabled:!!e&&!!(a!=null&&a.onboarding_missions)}),{data:l=[]}=Xe({queryKey:["gamification-transactions",e==null?void 0:e.id],queryFn:async()=>{const{data:h}=await G.from("edu_coin_transactions").select("*").eq("user_id",e.id).order("created_at",{ascending:!1}).limit(50);return(h||[]).map(f=>({id:f.id,amount:f.amount,reason:f.reason,category:f.category??"passive",created_at:f.created_at,status:f.status??"awarded",reference_id:f.reference_id}))},enabled:!!e});w.useEffect(()=>{e&&G.rpc("record_daily_login",{p_user_id:e.id}).then(({data:h})=>{(h==null?void 0:h.reward)>
21490&&(r.invalidateQueries({queryKey:["gamification-wallet"]}),r.invalidateQueries({queryKey:["gamification-transactions"]}),r.invalidateQueries({queryKey:["edu-coins"]}))})},[e==null?void 0:e.id]);const c=An({mutationFn:async({ruleKey:h,referenceId:f,metadata:p})=>{const{data:m,error:A}=await G.rpc("award_edu_coins",{p_user_id:e.id,p_rule_key:h,p_reference_id:f||null,p_metadata:p||{}});if(A)throw A;return m},onSuccess:()=>{r.invalidateQueries({queryKey:["gamification-wallet"]}),r.invalidateQueries({queryKey:["gamification-transactions"]}),r.invalidateQueries({queryKey:["edu-coins"]})}}),u=An({mutationFn:async h=>{const{data:f,error:p}=await G.rpc("complete_onboarding_mission",{p_user_id:e.id,p_mission_key:h});if(p)throw p;return f},onSuccess:()=>{r.invalidateQueries({queryKey:["gamification-wallet"]}),r.invalidateQueries({queryKey:["onboarding-missions"]}),r.invalidateQueries({queryKey:["gamification-transactions"]}),r.invalidateQueries({queryKey:["edu-coins"]})}}),d=An({mutationFn:async({coins:h,rewardType:f,details:p})=>{const{data:m,error:A}=await G.rpc("spend_edu_coins",{p_user_id:e.id,p_coins:h,p_reward_type:f,p_details:p||{}});if(A)throw A;return m},onSuccess:()=>{r.invalidateQueries({queryKey:["gamification-wallet"]}),r.invalidateQueries({queryKey:["gamification-transactions"]}),r.invalidateQueries({queryKey:["edu-coins"]})}});return{wallet:n,rewardRules:i,config:a,missions:o,transactions:l,awardCoins:c.mutateAsync,completeMission:u.mutateAsync,spendCoins:d.mutateAsync,isAwarding:c.isPending}}var Rxt="Separator",gZ="horizontal",Dxt=["horizontal","vertical"],uye=w.forwardRef((e,r)=>{const{decorative:n,orientation:i=gZ,...a}=e,o=Mxt(i)?i:gZ,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return s.jsx(Rt.div,{"data-orientation":o,...c,...a,ref:r})});uye.displayName=Rxt;function Mxt(e){return Dxt.includes(e)}var dye=uye;const Mj=w.forwardRef(({className:e,orientation:r="horizontal",decorative:n=!0,...i},a)=>s.jsx(dye,{ref:a,decorative:n,orientation:r,className:it("shrink-0 bg-border",r==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));Mj.displayName=dye.displayName;const hye=Lfe,fye=b$,mye=j$;var pye={exports:{}},Aye={};/**
2150 * @license React
2151 * use-sync-external-store-shim.production.js
2152 *
2153 * Copyright (c) Meta Platforms, Inc. and affiliates.
2154 *
2155 * This source code is licensed under the MIT license found in the
2156 * LICENSE file in the root directory of this source tree.
2157 */var x0=w;function zxt(e,r){return e===r&&(e!==0||1/e===1/r)||e!==e&&r!==r}var Uxt=typeof Object.is=="function"?Object.is:zxt,$xt=x0.useState,Qxt=x0.useEffect,Hxt=x0.useLayoutEffect,Vxt=x0.useDebugValue;function Wxt(e,r){var n=r(),i=$xt({inst:{value:n,getSnapshot:r}}),a=i[0].inst,o=i[1];return Hxt(function(){a.value=n,a.getSnapshot=r,jF(a)&&o({inst:a})},[e,n,r]),Qxt(function(){return jF(a)&&o({inst:a}),e(function(){jF(a)&&o({inst:a})})},[e]),Vxt(n),n}function jF(e){var r=e.getSnapshot;e=e.value;try{var n=r();return!Uxt(e,n)}catch{return!0}}function qxt(e,r){return r()}var Kxt=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?qxt:Wxt;Aye.useSyncExternalStore=x0.useSyncExternalStore!==void 0?x0.useSyncExternalStore:Kxt;pye.exports=Aye;var Gxt=pye.exports;function Xxt(){return Gxt.useSyncExternalStore(Yxt,()=>!0,()=>!1)}function Yxt(){return()=>{}}var $Q="Avatar",[Jxt,MUt]=rs($Q),[Zxt,gye]=Jxt($Q),xye=w.forwardRef((e,r)=>{const{__scopeAvatar:n,...i}=e,[a,o]=w.useState("idle");return s.jsx(Zxt,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:s.jsx(Rt.span,{...i,ref:r})})});xye.displayName=$Q;var yye="AvatarImage",vye=w.forwardRef((e,r)=>{const{__scopeAvatar:n,src:i,onLoadingStatusChange:a=()=>{},...o}=e,l=gye(yye,n),c=eyt(i,o),u=To(d=>{a(d),l.onImageLoadingStatusChange(d)});return xa(()=>{c!=="idle"&&u(c)},[c,u]),c==="loaded"?s.jsx(Rt.img,{...o,ref:r,src:i}):null});vye.displayName=yye;var bye="AvatarFallback",wye=w.forwardRef((e,r)=>{const{__scopeAvatar:n,delayMs:i,...a}=e,o=gye(bye,n),[l,c]=w.useState(i===void 0);return w.useEffect(()=>{if(i!==void 0){const u=window.setTimeout(()=>c(!0),i);return()=>window.clearTimeout(u)}},[i]),l&&o.imageLoadingStatus!=="loaded"?s.jsx(Rt.span,{...a,ref:r}):null});wye.displayName=bye;function xZ(e,r){return e?r?(e.src!==r&&(e.src=r),e.complete&&e.naturalWi
2157dth>0?"loaded":"loading"):"error":"idle"}function eyt(e,{referrerPolicy:r,crossOrigin:n}){const i=Xxt(),a=w.useRef(null),o=i?(a.current||(a.current=new window.Image),a.current):null,[l,c]=w.useState(()=>xZ(o,e));return xa(()=>{c(xZ(o,e))},[o,e]),xa(()=>{const u=f=>()=>{c(f)};if(!o)return;const d=u("loaded"),h=u("error");return o.addEventListener("load",d),o.addEventListener("error",h),r&&(o.referrerPolicy=r),typeof n=="string"&&(o.crossOrigin=n),()=>{o.removeEventListener("load",d),o.removeEventListener("error",h)}},[o,n,r]),l}var jye=xye,_ye=vye,Cye=wye;const Nye=w.forwardRef(({className:e,...r},n)=>s.jsx(jye,{ref:n,className:it("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...r}));Nye.displayName=jye.displayName;const Sye=w.forwardRef(({className:e,...r},n)=>s.jsx(_ye,{ref:n,className:it("aspect-square h-full w-full",e),...r}));Sye.displayName=_ye.displayName;const kye=w.forwardRef(({className:e,...r},n)=>s.jsx(Cye,{ref:n,className:it("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...r}));kye.displayName=Cye.displayName;const N1={hidden:{opacity:0,y:16},visible:e=>({opacity:1,y:0,transition:{delay:e*.08,duration:.4}})};function tyt(){var X,de,oe,ce,ye,ge;const{user:e,signOut:r}=Fn(),{isSubscribed:n,subscriptionStatus:i,subscriptionEnd:a,paymentFailed:o,graceDaysRemaining:l,monthlyEnrollments:c,monthlyLimit:u,openPortal:d,isLoading:h}=G4(),{wallet:f,transactions:p}=qT(),[m,A]=w.useState(!1),[g,y]=w.useState(((X=e==null?void 0:e.user_metadata)==null?void 0:X.display_name)||""),[x,b]=w.useState(!1),[v,j]=w.useState(!1),[_,C]=w.useState(!1),[N,S]=w.useState(!1),[E,O]=w.useState(!1),[B,T]=w.useState(null),[F,I]=w.useState(!1),D=w.useRef(null);w.useEffect(()=>{e!=null&&e.id&&G.from("profiles").select("avatar_url").eq("user_id",e.id).single().then(({data:Be})=>{Be!=null&&Be.avatar_url&&T(Be.avatar_url)})},[e==null?void 0:e.id]);const L=((oe=(de=e==null?void 0:e.app_metadata)==null?void 0:de.providers)==null?void 0:oe.length)===1&&((ye=(ce=e==null?void 0:e.app_metadata)==null?void 0:ce.providers)==null?void 0:ye[0])==="google",V=_p(f.validated_edu_score),U=D4(f.validated_edu_score),Q=t$(f.validated_edu_score),$=(g||(e==null?void 0:e.email)||"?").split(/[\s@]/).slice(0,2).map(Be=>{var Ve;return(Ve=Be[0])==null?void 0:Ve.toUpperCase()}).join(""),q=e!=null&&e.created_at?new Date(e.created_at).toLocaleDateString("ro-RO",{year:"numeric",month:"long",day:"numeric"}):"—",M=async()=>{if(!g.trim())return;b(!0);const{error:Be}=await G.auth.updateUser({data:{display_name:g.trim()}});Be||await G.from("profiles").update({display_name:g.trim(),updated_at:new Date().toISOString()}).eq("user_id",e.id),b(!1),Be?Ho({title:"Eroare",description:Be.message,variant:"destructive"}):(A(!1),Ho({title:"Nume actualizat ✓"}))},z=async()=>{if(!(e!=null&&e.email))return;j(!0);const{error:Be}=await G.auth.resetPasswordForEmail(e.email,{redirectTo:`${window.location.origin}/reset-password`});j(!1),Be?Ho({title:"Eroare",description:Be.message,variant:"destructive"}):(C(!0),Ho({title:"Email trimis!",description:"Verifică-ți inbox-ul pentru link-ul de resetare."}))},K=async()=>{S(!0);try{await d()}catch(Be){Ho({title:"Eroare",description:Be.message,variant:"destructive"})}S(!1)},ne=async Be=>{var te;const Ve=(te=Be.target.files)==null?void 0:te[0];if(!(!Ve||!(e!=null&&e.id))){if(!Ve.type.startsWith("image/")){Ho({title:"Eroare",description:"Te rugăm să încarci doar imagini.",variant:"destructive"});return}if(Ve.size>2*1024*1024){Ho({title:"Eroare",description:"Imaginea trebuie să fie sub 2MB.",variant:"destructive"});return}I(!0);try{const xe=Ve.name.split(".").pop()||"jpg",We=`${e.id}/avatar.${xe}`,{error:ze}=await G.storage.from("user-avatars").upload(We,Ve,{upsert:!0,contentType:Ve.type});if(ze)throw ze;const{data:we}=G.storage.from("user-avatars").getPublicUrl(We),J=`${we.publicUrl}?t=${Date.now()}`;await G.from("profiles").update({avatar_url:J,updated_at:new Date().toISOString()}).eq("user_id",e.id),T(J),Ho({title:"Avatar actualizat ✓"})}catch(xe){Ho({title:"Eroare",description:xe.message,variant:"destructive"})}finally{I(!1),D.current&&(D.current.value="")}}},ie=p.slice(0,5);return s.jsxs("div",{className:"space-y-6",children:[s.jsx(Le.div,{variants:N1,initial:"hidden",animate:"visible",custom:0,children:s.jsxs(st,{className:"glass-card border-border/50 overflow-hidden",children:[s.jsx("div",{className:"h-20 bg-gradient-to-r from-primary/20 via-primary/10 to-transparent"}),s.jsx(ot,{className:"relative -mt-10 pb-6",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-end gap-4",children:[s.jsxs("div",{className:"relative group",children:[s.jsxs(Nye,{className:"h-20 w-20 border-4 border-background shadow-lg",children:[B&&s.jsx(Sye,{src:B,alt:"Avatar"}),s.jsx(kye,{className:"bg-gradient-to-br from-primary to-primary/60 text-primary-foreground text-2xl font-bold",children:$})]}),s.jsx("button",{onClick:()=>{var Be;return(Be=D.current)==null?void 0:Be.click()},disabled:F,className:"absolute inset-0 flex items-center justify-center rounded-full bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",children:F?s.jsx(rt,{size:20,className:"text-white animate-spin"}):s.jsx(QSe,{size:20,className:"text-white"})}),s.jsx("input",{ref:D,type:"file",accept:"image/*",className:"hidden",onChange:ne})]}),s.jsxs("div",{className:"flex-1 min-w-0 pt-2",children:[m?s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(qe,{value:g,onChange:Be=>y(Be.target.value),className:"max-w-xs h-8 text-base bg-secondary/50",autoFocus:!0,onKeyDown:Be=>Be.key==="Enter"&&M()}),s.jsx(me,{size:"icon",variant:"ghost",className:"h-7 w-7",onClick:M,disabled:x,children:x?s.jsx(rt,{size:14,className:"animate-spin"}):s.jsx(Bc,{size:14})}),s.jsx(me,{size:"icon",variant:"ghost",className:"h-7 w-7",onClick:()=>{var Be;A(!1),y(((Be=e==null?void 0:e.user_metadata)==null?void 0:Be.display_name)||"")},children:s.jsx(Uc,{size:14})})]}):s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h2",{className:"text-xl font-heading font-bold truncate",children:g||((ge=e==null?void 0:e.email)==null?void 0:ge.split("@")[0])}),s.jsx("button",{onClick:()=>A(!0),className:"text-muted-foreground hover:text-foreground transition-colors",children:s.jsx(wp,{size:14})})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm text-muted-foreground",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Za,{size:13})," ",e==null?void 0:e.email]}),s.jsx("span",{className:"text-border",children:"•"}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ja,{size:13})," ",q]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-2",children:[s.jsxs(at,{variant:"outline",className:`${V.color} border-current/20 text-xs`,children:[V.icon," ",V.name]}),s.jsx(at,{variant:"secondary",className:"text-xs",children:L?"🔗 Google":"✉️ Email"}),s.jsxs(at,{variant:"secondary",className:"text-xs",children:[s.jsx(Wi,{size:12,className:"mr-1"})," ",f.balance," EduCoins"]})]}),U&&s.jsxs("div",{className:"mt-3 max-w-sm",children:[s.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[s.jsxs("span",{children:[V.icon," ",V.name]}
2157),s.jsxs("span",{children:[U.icon," ",U.name," (",f.validated_edu_score,"/",U.minCoins,")"]})]}),s.jsx(ql,{value:Q,className:"h-1.5"})]})]})]})})]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsx(Le.div,{variants:N1,initial:"hidden",animate:"visible",custom:1,children:s.jsx(st,{className:`glass-card border-border/50 h-full ${n?i==="active"?"border-l-4 border-l-emerald-500/50":"border-l-4 border-l-amber-500/50":""}`,children:s.jsxs(ot,{className:"pt-5 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-base font-heading font-semibold",children:[s.jsx(JL,{size:18,className:"text-muted-foreground"})," Abonament"]}),h?s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(rt,{size:14,className:"animate-spin"})," Se verifică..."]}):n?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(at,{className:i==="active"?"bg-emerald-500/20 text-emerald-500 border-emerald-500/30":"bg-amber-500/20 text-amber-500 border-amber-500/30",children:i==="active"?"✓ Activ":"⚠️ Plată în așteptare"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"EduWeb Academy"})]}),o&&l!==null&&s.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20 text-sm",children:[s.jsx(Tu,{size:16,className:"text-amber-500 shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-amber-500",children:"Plata a eșuat"}),s.jsxs("p",{className:"text-muted-foreground text-xs mt-0.5",children:["Mai ai ",l," ",l===1?"zi":"zile"," pentru a actualiza metoda de plată."]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[a&&s.jsxs("div",{className:"p-3 rounded-lg bg-secondary/50",children:[s.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Următoarea plată"}),s.jsxs("div",{className:"flex items-center gap-1.5 font-medium",children:[s.jsx(Ja,{size:14,className:"text-muted-foreground"}),new Date(a).toLocaleDateString("ro-RO",{day:"numeric",month:"short",year:"numeric"})]})]}),s.jsxs("div",{className:"p-3 rounded-lg bg-secondary/50",children:[s.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Înrolări luna aceasta"}),s.jsxs("div",{className:"font-medium",children:[c," / ",u," cursuri"]}),s.jsx(ql,{value:c/u*100,className:"h-1 mt-1.5"})]})]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:K,disabled:N,className:"w-full",children:[N?s.jsx(rt,{size:14,className:"animate-spin mr-2"}):s.jsx(JL,{size:14,className:"mr-2"}),"Gestionează abonament"]})]}):s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Nu ai un abonament activ. Cu abonamentul EduWeb Academy ai acces la toate cursurile."}),s.jsx(me,{size:"sm",asChild:!0,children:s.jsx("a",{href:"/academy",children:"Descoperă Academy →"})})]})]})})}),s.jsx(Le.div,{variants:N1,initial:"hidden",animate:"visible",custom:2,children:s.jsx(st,{className:"glass-card border-border/50 h-full",children:s.jsxs(ot,{className:"pt-5 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-base font-heading font-semibold",children:[s.jsx(pi,{size:18,className:"text-muted-foreground"})," Securitate"]}),s.jsxs("div",{className:"p-3 rounded-lg bg-secondary/50",children:[s.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Metodă de autentificare"}),s.jsx("p",{className:"text-sm font-medium",children:L?"🔗 Cont Google conectat":"✉️ Email și parolă"})]}),!L&&s.jsxs(s.Fragment,{children:[s.jsx(Mj,{}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(JA,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:"Schimbă parola"})]}),s.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Vei primi un email cu un link pentru a seta o parolă nouă."}),_?s.jsxs("div",{className:"flex items-center gap-2 text-sm text-emerald-500",children:[s.jsx(Xh,{size:16})," Email trimis! Verifică-ți inbox-ul."]}):s.jsxs(me,{variant:"outline",size:"sm",onClick:z,disabled:v,children:[v?s.jsx(rt,{size:14,className:"animate-spin mr-2"}):s.jsx(Za,{size:14,className:"mr-2"}),"Trimite email de resetare"]})]})]})]})})})]}),ie.length>0&&s.jsx(Le.div,{variants:N1,initial:"hidden",animate:"visible",custom:3,children:s.jsx(st,{className:"glass-card border-border/50",children:s.jsxs(ot,{className:"pt-5",children:[s.jsxs("div",{className:"flex items-center gap-2 text-base font-heading font-semibold mb-4",children:[s.jsx(ki,{size:18,className:"text-muted-foreground"})," Activitate recentă"]}),s.jsx("div",{className:"space-y-2",children:ie.map(Be=>s.jsxs("div",{className:"flex items-center justify-between p-2.5 rounded-lg bg-secondary/30 hover:bg-secondary/50 transition-colors text-sm",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx("div",{className:`p-1.5 rounded-md ${Be.amount>0?"bg-emerald-500/10 text-emerald-500":"bg-red-500/10 text-red-500"}`,children:Be.amount>0?s.jsx(qoe,{size:14}):s.jsx(USe,{size:14})}),s.jsxs("div",{className:"truncate",children:[s.jsx("span",{className:"capitalize",children:Be.reason.replace(/_/g," ")}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:new Date(Be.created_at).toLocaleDateString("ro-RO",{day:"numeric",month:"short"})})]})]}),s.jsxs("span",{className:`font-mono font-medium tabular-nums ${Be.amount>0?"text-emerald-500":"text-red-500"}`,children:[Be.amount>0?"+":"",Be.amount]})]},Be.id))})]})})}),s.jsx(Le.div,{variants:N1,initial:"hidden",animate:"visible",custom:4,children:s.jsxs(hye,{open:E,onOpenChange:O,children:[s.jsx(fye,{asChild:!0,children:s.jsxs("button",{className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-destructive transition-colors w-full py-2",children:[s.jsx(Tu,{size:14}),s.jsx("span",{children:"Zona de pericol"}),s.jsx(Vl,{size:14,className:`ml-auto transition-transform ${E?"rotate-180":""}`})]})}),s.jsx(mye,{children:s.jsx(st,{className:"border-destructive/20 mt-2",children:s.jsxs(ot,{className:"pt-4 space-y-4",children:[s.jsx("div",{children:s.jsxs(me,{variant:"outline",size:"sm",className:"border-destructive/30 text-destructive hover:bg-destructive/10",onClick:()=>{r()},children:[s.jsx(s4,{size:14,className:"mr-2"})," Deconectare de pe toate dispozitivele"]})}),s.jsx(Mj,{}),s.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[s.jsx(Xr,{size:14,className:"shrink-0 mt-0.5"}),s.jsxs("p",{children:["Pentru ștergerea completă a contului, te rugăm să ne contactezi la"," ",s.jsx("a",{href:"/contact",className:"text-primary underline",children:"pagina de contact"}),"."]})]})]})})})]})})]})}const ryt=[{icon:yr,label:"Cursurile mele",desc:"Continuă de unde ai rămas",tab:"courses",color:"bg-primary/10 text-primary"},{icon:Ec,label:"AI Tutor Tudor",desc:"Întreabă orice despre crypto",tab:"ai",color:"bg-blue-500/10 text-blue-500"},{icon:Eu,label:"Simulări Web3",desc:"Exersează fără risc",link:"/simulari-web3",color:"bg-teal-500/10 text-teal-500"},{icon:ff,label:"Knowledge Map",desc:"Explorează conceptele",link:"/knowledge-map",color:"bg-purple-500/10 text-purple-500"}];function nyt(){var _;const{user:e,signOut:r}=Fn(),{data:n=[],isLoading:i}=tme(),{wallet:a}=qT(),[o,l]=H0(),c=o.get("tab")||"courses",u=C=>{C!=="educoins"&&l({tab:C},{replace:!0})};Zr({title:"Zona Membru – EduWeb Academy",noIndex:!0});const d=n.filter(C=>C.completed_at),h=n.filter(C=>
2157!C.completed_at),f=n,p=a.validated_edu_score,m=a.balance,A=_p(p),g=D4(p),y=t$(p),[x,b]=w.useState("all"),v=x==="all"?f:x==="active"?h:d,j=(_=h[0])==null?void 0:_.courses;return s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-5xl py-8",children:[s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-2xl sm:text-3xl font-bold tracking-tight flex items-center gap-2",children:"Bine ai revenit! 👋"}),s.jsxs("p",{className:"text-muted-foreground mt-1 text-sm flex items-center gap-3 flex-wrap",children:[s.jsx("span",{children:e==null?void 0:e.email}),s.jsxs("span",{className:"inline-flex items-center gap-1",children:[A.icon," ",A.name]}),a.login_streak>0&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-amber-500",children:[s.jsx(cE,{size:14})," ",a.login_streak," ",a.login_streak===1?"zi":"zile"]})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[j?s.jsxs(be,{to:`/academy/${j.slug}`,className:"inline-flex items-center gap-2 text-sm font-medium bg-primary text-primary-foreground px-4 py-2 rounded-lg hover:bg-primary/90 transition-colors",children:[s.jsx(Rr,{size:16})," Continuă să înveți"]}):s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 text-sm font-medium bg-primary text-primary-foreground px-4 py-2 rounded-lg hover:bg-primary/90 transition-colors",children:[s.jsx(Rr,{size:16})," Explorează cursuri"]}),s.jsxs("button",{onClick:r,className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[s.jsx(s4,{size:14})," Ieși"]})]})]}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-8",children:ryt.map((C,N)=>{const S=s.jsxs(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:N*.05},className:"glass-card rounded-xl p-4 hover:border-primary/30 transition-all cursor-pointer group h-full",children:[s.jsx("div",{className:`p-2.5 rounded-xl ${C.color} w-fit mb-3`,children:s.jsx(C.icon,{size:20})}),s.jsx("p",{className:"font-heading font-semibold text-sm group-hover:text-primary transition-colors",children:C.label}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:C.desc})]});return C.link?s.jsx(be,{to:C.link,children:S},C.label):s.jsx("button",{onClick:()=>u(C.tab),className:"text-left",children:S},C.label)})}),s.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"glass-card rounded-xl p-4 mb-8 border border-border/50",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(yr,{size:16,className:"text-primary"}),s.jsx("span",{className:"font-heading font-bold",children:h.length}),s.jsx("span",{className:"text-muted-foreground text-xs",children:"active"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Rr,{size:16,className:"text-emerald-500"}),s.jsx("span",{className:"font-heading font-bold",children:d.length}),s.jsx("span",{className:"text-muted-foreground text-xs",children:"completate"})]}),s.jsxs(be,{to:"/edu-coins",className:"flex items-center gap-2 group",children:[s.jsx(Wi,{size:16,className:"text-accent"}),s.jsx("span",{className:"font-heading font-bold group-hover:text-primary transition-colors",children:m}),s.jsx("span",{className:"text-muted-foreground text-xs",children:"EduCoins"})]}),g&&s.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:["→ ",g.icon," ",g.name]}),s.jsx(ql,{value:y,className:"h-1.5 w-20"})]})]})}),s.jsxs(Gi,{value:c,onValueChange:u,className:"space-y-4",children:[s.jsxs(Ri,{className:"grid w-full grid-cols-3 max-w-lg",children:[s.jsxs(Mt,{value:"courses",children:[s.jsx(yr,{size:14,className:"mr-1.5"})," Cursuri"]}),s.jsxs(Mt,{value:"ai",children:[s.jsx(Ec,{size:14,className:"mr-1.5"})," AI Tutor"]}),s.jsxs(Mt,{value:"account",children:[s.jsx(lp,{size:14,className:"mr-1.5"})," Cont"]})]}),s.jsxs(er,{value:"courses",children:[s.jsx("div",{className:"flex items-center gap-2 mb-4",children:["all","active","completed"].map(C=>s.jsx("button",{onClick:()=>b(C),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-colors ${x===C?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:C==="all"?`Toate (${f.length})`:C==="active"?`Active (${h.length})`:`Completate (${d.length})`},C))}),i?s.jsx(iyt,{}):v.length===0?s.jsx(ayt,{message:"Nu ai cursuri în această categorie."}):s.jsx(syt,{courses:v})]}),s.jsx(er,{value:"ai",children:s.jsx(Efe,{})}),s.jsx(er,{value:"account",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(tyt,{}),s.jsx(Lxt,{})]})})]}),s.jsx("div",{className:"mt-10 text-center",children:s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 text-sm text-primary font-medium hover:underline",children:[s.jsx(Rr,{size:16})," Explorează toate cursurile"]})})]})})}function iyt(){return s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})})}function ayt({message:e}){return s.jsxs("div",{className:"glass-card rounded-xl p-10 text-center",children:[s.jsx(Rr,{size:48,className:"mx-auto text-muted-foreground
2157/30 mb-4"}),s.jsx("p",{className:"text-muted-foreground text-lg mb-2",children:e}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-1 text-primary font-medium hover:underline",children:["Explorează cursurile ",s.jsx(Gt,{size:14})]})]})}function syt({courses:e}){return s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.map((r,n)=>{const i=r.courses;if(!i)return null;const a=!!r.completed_at;return s.jsx(Le.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:n*.05},children:s.jsx(be,{to:`/academy/${i.slug}`,className:"group block glass-card rounded-xl overflow-hidden hover:border-primary/30 transition-all",children:s.jsxs("div",{className:"flex",children:[i.image_url&&s.jsx("img",{src:i.image_url,alt:i.title,className:"w-28 h-28 object-cover shrink-0"}),s.jsxs("div",{className:"p-4 flex-1 min-w-0",children:[s.jsx("h3",{className:"font-heading font-semibold text-sm line-clamp-2 group-hover:text-primary transition-colors mb-2",children:i.title}),s.jsx(ql,{value:a?100:0,className:"h-1.5 mb-2"}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a?"✅ Completat":"📚 În progres"}),r.certificate_issued&&s.jsxs(be,{to:"/membru/diplome",onClick:o=>o.stopPropagation(),className:"text-xs text-amber-500 flex items-center gap-1 hover:underline",children:[s.jsx(oo,{size:12})," Vezi diploma"]})]})]})]})})},r.id)})})}function oyt(){const{user:e}=Fn(),{wallet:r,missions:n,transactions:i,completeMission:a,spendCoins:o}=qT(),{referralLink:l,referralCount:c}=O7e(),[u,d]=w.useState(!1),{toast:h}=wn();Zr({title:"EduCoins – EduWeb Academy",noIndex:!0});const f=r.validated_edu_score,p=r.balance,m=r.total_earned,A=_p(f),g=D4(f),y=t$(f),x=n.filter(j=>j.completed).length,b=n.length,v=async j=>{try{const _=await a(j);_!=null&&_.success&&h({title:`✅ Misiune completată! +${_.coins_awarded} EduCoins`})}catch{h({title:"Eroare",variant:"destructive"})}};return s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-4xl py-8",children:[s.jsxs(be,{to:"/membru",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Zona Membru"]}),s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"glass-card rounded-2xl p-8 mb-8 text-center border border-border/50",children:[s.jsx("div",{className:"text-5xl mb-3",children:A.icon}),s.jsx("h1",{className:"font-heading text-3xl font-bold tracking-tight",children:A.name}),s.jsx("p",{className:"text-muted-foreground mt-2 max-w-md mx-auto text-sm",children:A.description}),s.jsxs("div",{className:"flex items-center justify-center gap-6 mt-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-3xl font-heading font-bold text-primary",children:p}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Coins disponibile"})]}),s.jsx("div",{className:"w-px h-10 bg-border"}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-3xl font-heading font-bold",children:m}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Total câștigate"})]}),s.jsx("div",{className:"w-px h-10 bg-border"}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-3xl font-heading font-bold text-emerald-500",children:f}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Progres validat"})]})]}),r.login_streak>0&&s.jsxs("div",{className:"mt-4 inline-flex items-center gap-1.5 text-sm text-amber-500",children:[s.jsx(cE,{size:16})," Serie: ",r.login_streak," ",r.login_streak===1?"zi":"zile"]}),g&&s.jsxs("div",{className:"mt-6 max-w-sm mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground mb-1.5",children:[s.jsxs("span",{children:[A.icon," ",A.name]}),s.jsxs("span",{children:[g.icon," ",g.name]})]}),s.jsx(ql,{value:y,className:"h-2"}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1.5",children:["Încă ",s.jsx("strong",{children:g.minCoins-f}
2157)," progres validat pentru nivelul următor"]})]}),s.jsx("div",{className:"grid grid-cols-4 gap-3 mt-6 max-w-md mx-auto",children:[{label:"Învățare",value:r.learning_score,color:"text-emerald-500"},{label:"Comunitate",value:r.community_score,color:"text-blue-500"},{label:"Pasiv",value:r.passive_score,color:"text-muted-foreground"},{label:"Creștere",value:r.growth_score,color:"text-amber-500"}].map(j=>s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:`font-heading font-bold text-sm ${j.color}`,children:j.value}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:j.label})]},j.label))})]}),s.jsx("div",{className:"flex justify-center mb-8",children:s.jsxs(be,{to:"/edu-coins/reguli",className:"inline-flex items-center gap-2 text-sm font-medium text-primary hover:underline transition-colors",children:[s.jsx(yr,{size:16})," Vezi regulile complete, nivelurile și limitele →"]})}),s.jsxs(Gi,{defaultValue:"missions",className:"space-y-6",children:[s.jsxs(Ri,{className:"grid w-full grid-cols-4 max-w-xl",children:[s.jsxs(Mt,{value:"missions",children:[s.jsx(Uv,{size:14,className:"mr-1"})," Misiuni"]}),s.jsxs(Mt,{value:"spend",children:[s.jsx(xke,{size:14,className:"mr-1"})," Cheltuie"]}),s.jsxs(Mt,{value:"referral",children:[s.jsx(Wi,{size:14,className:"mr-1"})," Referral"]}),s.jsxs(Mt,{value:"history",children:[s.jsx(nke,{size:14,className:"mr-1"})," Istoric"]})]}),s.jsxs(er,{value:"missions",children:[s.jsx("h2",{className:"font-heading text-xl font-semibold mb-4",children:"🚀 Misiuni de onboarding"}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Completează aceste misiuni pentru a ajunge rapid la nivelul Explorer. Total posibil: ",s.jsx("strong",{children:"50 EduCoins"}),"."]}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(ql,{value:b?x/b*100:0,className:"h-2 flex-1"}),s.jsxs("span",{className:"text-xs text-muted-foreground font-medium",children:[x,"/",b]})]}),s.jsx("div",{className:"space-y-2",children:n.map((j,_)=>s.jsxs(Le.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:_*.03},className:`flex items-center justify-between glass-card rounded-lg px-4 py-3 border ${j.completed?"border-emerald-500/30 bg-emerald-500/5":"border-border/30"}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-lg",children:j.icon}),s.jsx("span",{className:`text-sm ${j.completed?"line-through text-muted-foreground":""}`,children:j.label})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"font-heading font-bold text-sm text-primary",children:["+",j.coins]}),j.completed?s.jsx("span",{className:"text-emerald-500 text-xs",children:"✅"}):s.jsx("button",{onClick:()=>v(j.key),className:"text-xs px-2 py-1 rounded bg-primary/10 text-primary hover:bg-primary/20 transition-colors",children:"Completează"})]})]},j.key))})]}),s.jsxs(er,{value:"spend",children:[s.jsx("h2",{className:"font-heading text-xl font-semibold mb-2",children:"Ce poți face cu EduCoins"}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Cheltuirea coins-ilor reduce doar ",s.jsx("strong",{children:"coins disponibile"}),". Nivelul tău NU este afectat."]}),s.jsx("div",{className:"space-y-3",children:Vhe.map((j,_)=>{const C=p>=j.coins;return s.jsxs(Le.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:_*.04},className:`flex items-center justify-between glass-card rounded-lg px-5 py-4 border ${C?"border-primary/30":"border-border/30 opacity-60"}`,children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-heading font-semibold text-sm",children:j.label}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[j.coins.toLocaleString()," EduCoins necesare"]})]}),s.jsx("div",{className:"text-right",children:C?s.jsx("span",{className:"text-xs font-medium text-primary bg-primary/10 px-2.5 py-1 rounded-full",children:"Disponibil ✓"}):s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Încă ",j.coins-p," coins"]})})]},j.coins)})})]}),s.jsxs(er,{value:"referral",children:[s.jsx("h2",{className:"font-heading text-xl font-semibold mb-3",children:"🤝 Invită prieteni"}),e&&l?s.jsxs("div",{className:"glass-card rounded-xl p-5 border border-border/30 space-y-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Recompense progresive: confirmare cont (+5), profil (+5), prima lecție (+10), primul curs (+20). Max +40/referral."}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"text",readOnly:!0,value:l,className:"flex-1 bg-muted/50 border border-border rounded-lg px-3 py-2 text-sm font-mono text-foreground"}),s.jsxs("button",{onClick:()=>
2157{navigator.clipboard.writeText(l),d(!0),h({title:"Link copiat!"}),setTimeout(()=>d(!1),2e3)},className:"inline-flex items-center gap-1.5 px-3 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:brightness-110 transition-all",children:[u?s.jsx(Bc,{size:14}):s.jsx(Jh,{size:14}),u?"Copiat":"Copiază"]})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Prieteni invitați: ",s.jsx("strong",{children:c})," · Max 100 coins/lună din referraluri"]})]}):s.jsx("p",{className:"text-sm text-muted-foreground",children:"Trebuie să fii autentificat pentru a genera un link de referral."})]}),s.jsxs(er,{value:"history",children:[s.jsx("h2",{className:"font-heading text-xl font-semibold mb-4",children:"Istoric recent"}),i.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nicio tranzacție încă."}):s.jsx("div",{className:"space-y-1.5",children:i.map(j=>{var _,C;return s.jsxs("div",{className:"flex items-center justify-between glass-card rounded-lg px-4 py-2.5 border border-border/30",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx("span",{className:"text-xs",children:((_=lK[j.category])==null?void 0:_.icon)||"📦"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm truncate",children:j.reason.replace(/_/g," ")}),s.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[new Date(j.created_at).toLocaleDateString("ro-RO",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})," · ",((C=lK[j.category])==null?void 0:C.label)||j.category]})]})]}),s.jsxs("span",{className:`font-heading font-bold text-sm shrink-0 ${j.amount>=0?"text-primary":"text-red-500"}`,children:[j.amount>=0?"+":"",j.amount]})]},j.id)})})]})]})]})})}function lyt(){Fn();const{wallet:e}=qT();Zr({title:"Reguli EduCoins – EduWeb Academy",noIndex:!0});const r=e.validated_edu_score,n=_p(r),i=[{key:"learning",label:"🎓 Învățare activă",desc:"Contează 100% pentru nivel"},{key:"community",label:"💬 Comunitate",desc:"Contează 100% pentru nivel"},{key:"passive",label:"📖 Conținut pasiv",desc:"Max 20% din scorul de învățare"},{key:"growth",label:"📣 Creștere",desc:"Max 30% din scorul de învățare"}];return s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-4xl py-8",children:[s.jsxs(be,{to:"/edu-coins",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-6 transition-colors",children:[s.jsx(rn,{size:14})," EduCoins"]}),s.jsx("h1",{className:"font-heading text-3xl font-bold tracking-tight mb-2",children:"📜 Reguli EduCoins"}),s.jsx("p",{className:"text-muted-foreground mb-8",children:"Cum funcționează economia EduWeb — câștiguri, niveluri, limite și cheltuieli."}),s.jsxs("div",{className:"glass-card rounded-xl p-5 mb-8 border border-border/30 text-sm space-y-2",children:[s.jsxs("h2",{className:"font-heading font-semibold text-base flex items-center gap-2",children:[s.jsx(pi,{size:16,className:"text-primary"})," Cum se calculează progresul validat"]}),s.jsxs("p",{className:"text-muted-foreground",children:["Nivelul tău depinde de ",s.jsx("strong",{children:"progresul validat"}),", nu de coins disponibile. Cheltuirea coins-ilor NU reduce nivelul."]}),s.jsxs("div",{className:"bg-muted/50 rounded-lg px-4 py-3 font-mono text-xs",children:[s.jsx("p",{children:"validatedEduScore ="}),s.jsxs("p",{className:"ml-4",children:["learningScore ",s.jsx("span",{className:"text-muted-foreground",children:"(100%)"})]}),s.jsxs("p",{className:"ml-4",children:["+ communityScore ",s.jsx("span",{className:"text-muted-foreground",children:"(100%)"})]}),s.jsx("p",{className:"ml-4",children:"+ min(passiveScore, 20% × learningScore)"}),s.jsx("p",{className:"ml-4",children:"+ min(growthScore, 30% × learningScore)"})]}),s.jsxs("p",{className:"text-muted-foreground text-xs",children:[s.jsx("strong",{children:"Exemplu:"})," Dacă ai 1000 învățare, 400 pasiv, 500 creștere, 100 comunitate → scor validat = 1000 + 100 + 200 + 300 = ",s.jsx("strong",{children:"1600"}),"."]})]}),s.jsxs(Gi,{defaultValue:"earn",className:"space-y-6",children:[s.jsxs(Ri,{className:"grid w-full grid-cols-4 max-w-xl",children:[s.jsxs(Mt,{value:"earn",children:[s.jsx(yr,{size:14,className:"mr-1"})," Câștigă"]}),s.jsxs(Mt,{value:"levels",children:[s.jsx(Li,{size:14,className:"mr-1"})," Niveluri"]}),s.jsx(Mt,{value:"spend",children:"💰 Cheltuie"}),s.jsxs(Mt,{value:"limits",children:[s.jsx(pi,{size:14,className:"mr-1"})," Limite"]})]}),s.jsx(er,{value:"earn",children:s.jsx("div",{className:"space-y-6",children:i.map(a=>{const o=rze.filter(l=>l.category===a.key);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("h3",{className:"text-sm font-semibold",children:a.label}),s.jsx("span",{className:"text-[11px] text-muted-foreground",children:a.desc})]}
2157),s.jsx("div",{className:"space-y-1.5",children:o.map(l=>s.jsxs("div",{className:"flex items-center justify-between glass-card rounded-lg px-4 py-2.5 border border-border/30",children:[s.jsxs("span",{className:"text-sm flex items-center gap-2",children:[s.jsx("span",{children:l.icon})," ",l.action]}),s.jsxs("span",{className:"font-heading font-bold text-primary text-sm",children:["+",l.coins]})]},l.action))})]},a.key)})})}),s.jsx(er,{value:"levels",children:s.jsx("div",{className:"space-y-3",children:qv.map((a,o)=>{const l=n.name===a.name,c=r<a.minCoins;return s.jsx(Le.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{delay:o*.04},children:s.jsx(st,{className:`glass-card transition-all ${l?"border-primary/40 ring-1 ring-primary/20":""} ${c?"opacity-50":""}`,children:s.jsx(ot,{className:"py-4 px-5",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("span",{className:"text-3xl",children:a.icon}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h3",{className:`font-heading font-bold ${a.color}`,children:a.name}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[a.minCoins.toLocaleString(),"+ scor"]}),l&&s.jsx("span",{className:"text-[10px] font-semibold text-primary bg-primary/10 px-2 py-0.5 rounded-full",children:"ACTUAL"})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.description}),s.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1.5",children:a.benefits.map(u=>s.jsx("span",{className:"text-[10px] bg-muted px-1.5 py-0.5 rounded",children:u},u))})]})]})})})},a.name)})})}),s.jsxs(er,{value:"spend",children:[s.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Cheltuirea coins-ilor reduce doar ",s.jsx("strong",{children:"coins disponibile"}),". Nivelul tău NU este afectat."]}),s.jsx("div",{className:"space-y-3",children:Vhe.map((a,o)=>s.jsx(Le.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:o*.04},className:"flex items-center justify-between glass-card rounded-lg px-5 py-4 border border-border/30",children:s.jsxs("div",{children:[s.jsx("h3",{className:"font-heading font-semibold text-sm",children:a.label}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[a.coins.toLocaleString()," EduCoins necesare"]})]})},a.coins))})]}),s.jsxs(er,{value:"limits",children:[s.jsx("h2",{className:"font-heading text-lg font-semibold mb-4",children:"⚠️ Limite anti-abuz"}),s.jsxs("div",{className:"space-y-3 text-sm",children:[s.jsxs("div",{className:"glass-card rounded-lg p-4 border border-border/30",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"📖 Conținut pasiv"}),s.jsxs("ul",{className:"space-y-1 text-muted-foreground list-disc list-inside",children:[s.jsxs("li",{children:["Max ",s.jsx("strong",{children:"60 EduCoins/lună"})," din categoria pasivă"]}),s.jsx("li",{children:"Articole: max 2/zi, 20/lună (70% scroll, 90s pe pagină, tab activ)"}),s.jsx("li",{children:"Video brief: max 1/zi, 10/lună (80% vizionat)"}),s.jsx("li",{children:"Podcast zilnic: max 1/zi, 10/lună (70% ascultat)"}),s.jsx("li",{children:"Același articol: cooldown 30 zile"})]})]}),s.jsxs("div",{className:"glass-card rounded-lg p-4 border border-border/30",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"🎓 Învățare"}),s.jsxs("ul",{className:"space-y-1 text-muted-foreground list-disc list-inside",children:[s.jsx("li",{children:"Quiz: max 3/zi, min scor 80%, doar prima trecere validă"}),s.jsx("li",{children:"Lecții: max 5/zi"}),s.jsx("li",{children:"Module: max 2/zi"}),s.jsx("li",{children:"Certificate: nu se pot duplica per curs"})]})]}),s.jsxs("div",{className:"glass-card rounded-lg p-4 border border-border/30",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"💬 Comunitate"}),s.jsxs("ul",{className:"space-y-1 text-muted-foreground list-disc list-inside",children:[s.jsx("li",{children:"Comentarii: max 2/zi, 20/lună, min 120 caractere, aprobate de moderare"}),s.jsx("li",{children:"Articole publicate: max 2/lună"})]})]}),s.jsxs("div",{className:"glass-card rounded-lg p-4 border border-border/30",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"📣 Creștere"}),s.jsxs("ul",{className:"space-y-1 text-muted-foreground list-disc list-inside",children:[s.jsxs("li",{children:["Max ",s.jsx("strong",{children:"100 EduCoins/lună"})," din referraluri"]}),s.jsx("li",{children:"Recompense etapizate: confirmare (+5), profil (+5), lecție (+10), curs (+20)"}),s.jsx("li",{children:"Detecție anti-abuz pe IP/device/pattern"})]})]}),s.jsxs("div",{className:"glass-card rounded-lg p-4 border border-amber-500/20",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"🔒 Reguli generale"}),s.jsxs("ul",{className:"space-y-1 text-muted-foreground list-disc list-inside",children:[s.jsx("li",{children:"Fiecare recompensă e verificată server-side (idempotent)"}),s.jsx("li",{children:"Tab activ obligatoriu pentru conținut pasiv"}),s.jsx("li",{children:"Log complet al fiecărei tranzacții"}),s.jsx("li",{children:"Administratorii pot ajusta oricând valorile și plafoanele"})]})]})]})]})]})]})})}const _F=768;function cyt(){const[e,r]=w.useState(void 0);return w.useEffect(()=>{const n=window.matchMedia(`(max-width: ${_F-1}px)`),i=()=>{r(window.innerWidth<_F)};
vendor: 5,148 bytes, lines 2157-2161
2157return n.addEventListener("change",i),r(window.innerWidth<_F),()=>n.removeEventListener("change",i)},[]),!!e}var KT="Dialog",[Eye,Bye]=rs(KT),[uyt,Du]=Eye(KT),Tye=e=>{const{__scopeDialog:r,children:n,open:i,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,c=w.useRef(null),u=w.useRef(null),[d,h]=nl({prop:i,defaultProp:a??!1,onChange:o,caller:KT});return s.jsx(uyt,{scope:r,triggerRef:c,contentRef:u,contentId:Ul(),titleId:Ul(),descriptionId:Ul(),open:d,onOpenChange:h,onOpenToggle:w.useCallback(()=>h(f=>!f),[h]),modal:l,children:n})};Tye.displayName=KT;var Pye="DialogTrigger",Iye=w.forwardRef((e,r)=>{const{__scopeDialog:n,...i}=e,a=Du(Pye,n),o=Mr(r,a.triggerRef);return s.jsx(Rt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":VQ(a.open),...i,ref:o,onClick:bt(e.onClick,a.onOpenToggle)})});Iye.displayName=Pye;var QQ="DialogPortal",[dyt,Fye]=Eye(QQ,{forceMount:void 0}),Oye=e=>{const{__scopeDialog:r,forceMount:n,children:i,container:a}=e,o=Du(QQ,r);return s.jsx(dyt,{scope:r,forceMount:n,children:w.Children.map(i,l=>s.jsx(cl,{present:n||o.open,children:s.jsx(A_,{asChild:!0,container:a,children:l})}))})};Oye.displayName=QQ;var V5="DialogOverlay",Lye=w.forwardRef((e,r)=>{const n=Fye(V5,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,o=Du(V5,e.__scopeDialog);return o.modal?s.jsx(cl,{present:i||o.open,children:s.jsx(fyt,{...a,ref:r})}):null});Lye.displayName=V5;var hyt=fg("DialogOverlay.RemoveScroll"),fyt=w.forwardRef((e,r)=>{const{__scopeDialog:n,...i}=e,a=Du(V5,n);return s.jsx(E4,{as:hyt,allowPinchZoom:!0,shards:[a.contentRef],children:s.jsx(Rt.div,{"data-state":VQ(a.open),...i,ref:r,style:{pointerEvents:"auto",...i.style}})})}),Bg="DialogContent",Rye=w.forwardRef((e,r)=>{const n=Fye(Bg,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,o=Du(Bg,e.__scopeDialog);return s.jsx(cl,{present:i||o.open,children:o.modal?s.jsx(myt,{...a,ref:r}):s.jsx(pyt,{...a,ref:r})})});Rye.displayName=Bg;var myt=w.forwardRef((e,r)=>{const n=Du(Bg,e.__scopeDialog),i=w.useRef(null),a=Mr(r,n.contentRef,i);return w.useEffect(()=>{const o=i.current;if(o)return g8(o)},[]),s.jsx(Dye,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:bt(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:bt(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:bt(e.onFocusOutside,o=>o.preventDefault())})}),pyt=w.forwardRef((e,r)=>{const n=Du(Bg,e.__scopeDialog),i=w.useRef(!1),a=w.useRef(!1);return s.jsx(Dye,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(i.current||(c=n.triggerRef.current)==null||c.focus(),o.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:o=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),Dye=w.forwardRef((e,r)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,c=Du(Bg,n),u=w.useRef(null),d=Mr(r,u);return m8(),s.jsxs(s.Fragment,{children:[s.jsx(S4,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:s.jsx(F0,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":VQ(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(gyt,{titleId:c.titleId}),s.jsx(yyt,{contentRef:u,descriptionId:c.descriptionId})]})]})}),HQ="DialogTitle",Mye=w.forwardRef((e,r)=>{const{__scopeDialog:n,...i}=e,a=Du(HQ,n);return s.jsx(Rt.h2,{id:a.titleId,...i,ref:r})});Mye.displayName=HQ;var zye="DialogDescription",Uye=w.forwardRef((e,r)=>{const{__scopeDialog:n,...i}=e,a=Du(zye,n);return s.jsx(Rt.p,{id:a.descriptionId,...i,ref:r})});Uye.displayName=zye;var $ye="DialogClose",Qye=w.forwardRef((e,r)=>{const{__scopeDialog:n,...i}=e,a=Du($ye,n);return s.jsx(Rt.button,{type:"button",...i,ref:r,onClick:bt(e.onClick,()=>a.onOpenChange(!1))})});Qye.displayName=$ye;function VQ(e){return e?"open":"closed"}var Hye="DialogTitleWarning",[Ayt,Vye]=KNe(Hye,{contentName:Bg,titleName:HQ,docsSlug:"dialog"}),gyt=({titleId:e})=>{const r=Vye(Hye),n=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
2158
2159If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
2160
2161For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},xyt="DialogDescriptionWarning",yyt=({contentRef:e,descriptionId:r})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vye(xyt).contentName}}.`;return w.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");
2161r&&a&&(document.getElementById(r)||console.warn(i))},[i,e,r]),null},WQ=Tye,Wye=Iye,qQ=Oye,U_=Lye,$_=Rye,Q_=Mye,H_=Uye,V_=Qye;const vyt=WQ,byt=qQ,qye=w.forwardRef(({className:e,...r},n)=>s.jsx(U_,{className:it("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r,ref:n}));qye.displayName=U_.displayName;const wyt=O0("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Kye=w.forwardRef(({side:e="right",className:r,children:n,...i},a)=>s.jsxs(byt,{children:[s.jsx(qye,{}),s.jsxs($_,{ref:a,className:it(wyt({side:e}),r),...i,children:[n,s.jsxs(V_,{className:"absolute right-4 top-4 roun
2161ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(Uc,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Kye.displayName=$_.displayName;const jyt=w.forwardRef(({className:e,...r},n)=>s.jsx(Q_,{ref:n,className:it("text-lg font-semibold text-foreground",e),...r}));jyt.displayName=Q_.displayName;const _yt=w.forwardRef(({className:e,...r},n)=>s.jsx(H_,{ref:n,className:it("text-sm text-muted-foreground",e),...r}));_yt.displayName=H_.displayName;const Cyt="sidebar:state",Nyt=60*60*24*7,Syt="16rem",kyt="18rem",Eyt="3rem",Byt="b",Gye=w.createContext(null);function W_(){const e=w.useContext(Gye);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Xye=w.forwardRef(({defaultOpen:e=!0,open:r,onOpenChange:n,className:i,style:a,children:o,...l},c)=>{const u=cyt(),[d,h]=w.useState(!1),[f,p]=w.useState(e),m=r??f,A=w.useCallback(b=>{const v=typeof b=="function"?b(m):b;n?n(v):p(v),document.cookie=`${Cyt}=${v}; path=/; max-age=${Nyt}`},[n,m]),g=w.useCallback(()=>u?h(b=>!b):A(b=>!b),[u,A,h]);w.useEffect(()=>{const b=v=>{v.key===Byt&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),g())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[g]);const y=m?"expanded":"collapsed",x=w.useMemo(()=>({state:y,open:m,setOpen:A,isMobile:u,openMobile:d,setOpenMobile:h,toggleSidebar:g}),[y,m,A,u,d,h,g]);return s.jsx(Gye.Provider,{value:x,children:s.jsx(ice,{delayDuration:0,children:s.jsx("div",{style:{"--sidebar-width":Syt,"--sidebar-width-icon":Eyt,...a},className:it("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:c,...l,children:o})})})});Xye.displayName="SidebarProvider";const Yye=w.forwardRef(({side:e="left",variant:r="sidebar",collapsible:n="offcanvas",className:i,children:a,...o},l)=>{const{isMobile:c,state:u,openMobile:d,setOpenMobile:h}=W_();return n==="none"?s.jsx("div",{className:it("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:l,...o,children:a}):c?s.jsx(vyt,{open:d,onOpenChange:h,...o,children:s.jsx(Kye,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":kyt},side:e,children:s.jsx("div",{className:"flex h-full w-full flex-col",children:a})})}):s.jsxs("div",{ref:l,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":u==="collapsed"?n:"","data-variant":r,"data-side":e,children:[s.jsx("div",{className:it("relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",r==="floating"||r==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),s.jsx("div",{className:it("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",r==="floating"||r==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...o,children:s.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});Yye.displayName="Sidebar";const Jye=w.forwardRef(({className:e,onClick:r,...n},i)=>{const{toggleSidebar:a}=W_();return s.jsxs(me,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:it("h-7 w-7",e),onClick:o=>{r==null||r(o),a()},...n,children:[s.jsx(hke,{}),s.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Jye.displayName="SidebarTrigger";const Tyt=w.forwardRef(({className:e,...r},n)=>{const{toggleSidebar:i}=W_();return s.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:it("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 hover:after:bg-sidebar-border sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...r})});Tyt.displayName="SidebarRail";const Pyt=w.forwardRef(({className:e,...r},n)=>s.jsx("main",{ref:n,className:it("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-
2161h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...r}));Pyt.displayName="SidebarInset";const Iyt=w.forwardRef(({className:e,...r},n)=>s.jsx(qe,{ref:n,"data-sidebar":"input",className:it("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...r}));Iyt.displayName="SidebarInput";const Fyt=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{ref:n,"data-sidebar":"header",className:it("flex flex-col gap-2 p-2",e),...r}));Fyt.displayName="SidebarHeader";const Oyt=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{ref:n,"data-sidebar":"footer",className:it("flex flex-col gap-2 p-2",e),...r}));Oyt.displayName="SidebarFooter";const Lyt=w.forwardRef(({className:e,...r},n)=>s.jsx(Mj,{ref:n,"data-sidebar":"separator",className:it("mx-2 w-auto bg-sidebar-border",e),...r}));Lyt.displayName="SidebarSeparator";const Zye=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{ref:n,"data-sidebar":"content",className:it("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...r}));Zye.displayName="SidebarContent";const eve=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{ref:n,"data-sidebar":"group",className:it("relative flex w-full min-w-0 flex-col p-2",e),...r}));eve.displayName="SidebarGroup";const tve=w.forwardRef(({className:e,asChild:r=!1,...n},i)=>{const a=r?I0:"div";return s.jsx(a,{ref:i,"data-sidebar":"group-label",className:it("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});tve.displayName="SidebarGroupLabel";const Ryt=w.forwardRef(({className:e,asChild:r=!1,...n},i)=>{const a=r?I0:"button";return s.jsx(a,{ref:i,"data-sidebar":"group-action",className:it("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});Ryt.displayName="SidebarGroupAction";const rve=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{ref:n,"data-sidebar":"group-content",className:it("w-full text-sm",e),...r}));rve.displayName="SidebarGroupContent";const nve=w.forwardRef(({className:e,...r},n)=>s.jsx("ul",{ref:n,"data-sidebar":"menu",className:it("flex w-full min-w-0 flex-col gap-1",e),...r}));nve.displayName="SidebarMenu";const ive=w.forwardRef(({className:e,...r},n)=>s.jsx("li",{ref:n,"data-sidebar":"menu-item",className:it("group/menu-item relative",e),...r}));ive.displayName="SidebarMenuItem";const Dyt=O0("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),ave=w.forwardRef(({asChild:e=!1,isActive:r=!1,variant:n="default",size:i="default",tooltip:a,className:o,...l},c)=>{const u=e?I0:"button",{isMobile:d,state:h}=W_(),f=s.jsx(u,{ref:c,"data-sidebar":"menu-button","data-size":i,"data-active":r,className:it(Dyt({variant:n,size:i}),o),...l});
2161return a?(typeof a=="string"&&(a={children:a}),s.jsxs(ace,{children:[s.jsx(sce,{asChild:!0,children:f}),s.jsx(a8,{side:"right",align:"center",hidden:h!=="collapsed"||d,...a})]})):f});ave.displayName="SidebarMenuButton";const Myt=w.forwardRef(({className:e,asChild:r=!1,showOnHover:n=!1,...i},a)=>{const o=r?I0:"button";return s.jsx(o,{ref:a,"data-sidebar":"menu-action",className:it("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...i})});Myt.displayName="SidebarMenuAction";const zyt=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:it("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...r}));zyt.displayName="SidebarMenuBadge";const Uyt=w.forwardRef(({className:e,showIcon:r=!1,...n},i)=>{const a=w.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return s.jsxs("div",{ref:i,"data-sidebar":"menu-skeleton",className:it("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[r&&s.jsx(Bo,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),s.jsx(Bo,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});Uyt.displayName="SidebarMenuSkeleton";const $yt=w.forwardRef(({className:e,...r},n)=>s.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:it("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...r}));$yt.displayName="SidebarMenuSub";const Qyt=w.forwardRef(({...e},r)=>s.jsx("li",{ref:r,...e}));Qyt.displayName="SidebarMenuSubItem";const Hyt=w.forwardRef(({asChild:e=!1,size:r="md",isActive:n,className:i,...a},o)=>{const l=e?I0:"a";return s.jsx(l,{ref:o,"data-sidebar":"menu-sub-button","data-size":r,"data-active":n,className:it("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...a})});Hyt.displayName="SidebarMenuSubButton";const sve=w.forwardRef(({className:e,activeClassName:r,pendingClassName:n,to:i,...a},o)=>s.jsx(tTe,{ref:o,to:i,className:({isActive:l,isPending:c})=>it(e,l&&r,c&&n),...a}));sve.displayName="NavLink";const Vyt=[{label:"General",items:[{title:"Dashboard",url:"/admin",icon:ike,end:!0},{title:"Utilizatori",url:"/admin/users",icon:Rn}]},{label:"Conținut",items:[{title:"Surse RSS",url:"/admin/sources",icon:dE},{title:"Articole",url:"/admin/posts",icon:us},{title:"Publicate",url:"/admin/published",icon:Eo},{title:"Plan Editorial",url:"/admin/editorial",icon:Joe},{title:"Autori",url:"/admin/authors",icon:Rn},{title:"Evenimente",url:"/admin/events",icon:mg}]},{label:"Academy & Educație",items:[{title:"Course Prompting",url:"/admin/course-prompting",icon:Li},{title:"Cursuri",url:"/admin/courses",icon:Rr},{title:"Analytics Cursanți",url:"/admin/course-analytics",icon:Eo},{title:"Demo Video",url:"/admin/video-demo",icon:Pa},{title:"Short Video",url:"/admin/short-video",icon:ZL},{title:'Pagini „Ce este?"',url:"/admin/pillar-pages",icon:yr},{title:"Glosar",url:"/admin/glossary",icon:yr},{title:"Studii de Caz Web3",url:"/admin/web3-cases",icon:Dr}
2161,{title:"Innovation Network",url:"/admin/innovation-network",icon:Rn}]},{label:"Gamificare",items:[{title:"EduCoins",url:"/admin/educoins",icon:Wi},{title:"Reguli Gamificare",url:"/admin/gamification",icon:Eu}]},{label:"Analytics",items:[{title:"Site Analytics",url:"/admin/site-analytics",icon:Voe},{title:"Media Analytics",url:"/admin/media-analytics",icon:Eo},{title:"Galerie Media",url:"/admin/media-gallery",icon:il},{title:"User Analytics",url:"/admin/user-analytics",icon:Rn},{title:"Bot Access Logs",url:"/admin/bot-logs",icon:Oi},{title:"Chat AI Logs",url:"/admin/chat-logs",icon:o4}]},{label:"SEO & Pagini",items:[{title:"SEO Overview",url:"/admin/seo-overview",icon:Oi},{title:"Instrucțiuni SEO",url:"/admin/seo-instructions",icon:us},{title:"Pagini Custom",url:"/admin/custom-pages",icon:Dr},{title:"Linkuri Interne",url:"/admin/internal-links",icon:rle},{title:"Prerender Audit",url:"/admin/prerender-audit",icon:Oi},{title:"SEO Audit Weekly",url:"/admin/seo-audit",icon:hn},{title:"Sumar Sitemap",url:"/admin/sitemap",icon:Dr}]},{label:"Configurare",items:[{title:"Setări Proiect",url:"/admin/settings",icon:xle},{title:"Reguli & Config",url:"/admin/rules",icon:ule},{title:"Prompturi AI",url:"/admin/prompts",icon:nle},{title:"Email Templates",url:"/admin/email-templates",icon:Za},{title:"Arhivă Emailuri",url:"/admin/email-logs",icon:Za},{title:"Tracking",url:"/admin/tracking",icon:qy},{title:"Cron Jobs",url:"/admin/cron-jobs",icon:ki},{title:"Backups",url:"/admin/backups",icon:rke},{title:"Newsletter",url:"/admin/newsletter",icon:Za}]}];function Wyt(){const{state:e}=W_(),r=e==="collapsed",i=ps().pathname,a=(o,l)=>l?i===o:i.startsWith(o);return s.jsx(Yye,{collapsible:"icon",className:"border-r",children:s.jsx(Zye,{className:"pt-2",children:Vyt.map(o=>(o.items.some(l=>a(l.url,l.end)),s.jsx(hye,{defaultOpen:!0,className:"group/collapsible",children:s.jsxs(eve,{children:[s.jsx(fye,{asChild:!0,children:s.jsxs(tve,{className:"cursor-pointer select-none flex items-center justify-between",children:[!r&&s.jsx("span",{children:o.label}),!r&&s.jsx(Vl,{className:"h-3 w-3 transition-transform group-data-[state=closed]/collapsible:rotate-[-90deg]"})]})}),s.jsx(mye,{children:s.jsx(rve,{children:s.jsx(nve,{children:o.items.map(l=>s.jsx(ive,{children:s.jsx(ave,{asChild:!0,children:s.jsxs(sve,{to:l.url,end:l.end,className:"hover:bg-muted/50",activeClassName:"bg-primary/10 text-primary font-medium",children:[s.jsx(l.icon,{className:"mr-2 h-4 w-4 shrink-0"}),!r&&s.jsx("span",{className:"truncate",children:l.title})]})})},l.url))})})})]})},o.label)))})})}function xr({children:e}){const{user:r,signOut:n}=Fn();return s.jsx(Xye,{children:s.jsxs("div",{className:"min-h-screen flex w-full",children:[s.jsx(Wyt,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[s.jsxs("header",{className:"h-14 flex items-center justify-between border-b px-4 shrink-0 bg-background sticky top-0 z-20",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Jye,{}),s.jsx(pi,{className:"text-primary",size:20}),s.jsx("span",{className:"font-heading font-semibold text-sm hidden sm:inline",children:"Admin Panel"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground hidden sm:inline",children:r==null?void 0:r.email}),s.jsxs(me,{variant:"ghost",size:"sm",onClick:n,children:[s.jsx(s4,{size:14})," ",s.jsx("span",{className:"hidden sm:inline",children:"Deconectare"})]})]})]}),s.jsx("main",{className:"flex-1 overflow-auto",children:e})]})]})})}function qyt(){const{toast:e}=wn(),[r,n]=w.useState(!1),[i,a]=w.useState(!1),[o,l]=w.useState(!1),[c,u]=w.useState(!1),[d,h]=w.useState({users:0,posts:0,courses:0,enrollments:0});w.useEffect(()=>{(async()=>{const[y,x,b,v]=await Promise.all([G.from("profiles").select("*",{count:"exact",head:!0}),G.from("posts").select("*",{count:"exact",head:!0}).eq("status","published"),G.from("courses").select("*",{count:"exact",head:!0}).eq("is_published",!0),G.from("enrollments").select("*",{count:"exact",head:!0})]);h({users:y.count??0,posts:x.count??0,courses:b.count??0,enrollments:v.count??0})})()},[]);const f=async()=>{var g;n(!0);try{const{data:y,error:x}=await G.functions.invoke("fetch-rss");if(x)throw x;e({title:"RSS Fetch complet",description:`${y.imported} articole noi importate.${(g=y.errors)!=null&&g.length?` ${y.errors.length} erori.`:""}`})}catch(y){e({title:"Eroare",description:y instanceof Error?y.message:"Eroare la fetch RSS",variant:"destructive"})}finally{n(!1)}},p=async()=>{var g;a(!0);try{const{data:y,error:x}=await G.functions.invoke("generate-ai-brief");if(x)throw x;e({title:"Generare AI Briefs completă",description:`${y.generated} briefs generate.${(g=y.errors)!=null&&g.length?` ${y.errors.length} erori.`:""}`})}catch(y){e({title:"Eroare",description:y instanceof Error?y.message:"Eroare la generare AI Briefs",variant:"destructive"})}finally{a(!1)}},m=async()=>
2161{l(!0);try{const{data:g}=await G.from("posts").select("id, title_ro").eq("status","published").or("video_status.eq.none,video_status.is.null").gte("word_count",300).limit(3);if(!(g!=null&&g.length)){e({title:"Info",description:"Nu există articole publicate fără video."});return}let y=0,x=0;for(const b of g)try{const{error:v}=await G.functions.invoke("generate-video-brief",{body:{post_id:b.id}});if(v)throw v;y++}catch{x++}e({title:"Video Briefs generate",description:`${y} videouri generate. ${x?`${x} erori.`:""}`})}catch(g){e({title:"Eroare",description:g instanceof Error?g.message:"Eroare la generare video",variant:"destructive"})}finally{l(!1)}},A=async()=>{var g;u(!0);try{const{data:y,error:x}=await G.functions.invoke("post-to-facebook");if(x)throw x;e({title:"Facebook Post complet",description:`${y.posted} articole postate pe Facebook.${(g=y.errors)!=null&&g.length?` ${y.errors.length} erori.`:""}`})}catch(y){e({title:"Eroare",description:y instanceof Error?y.message:"Eroare la postare Facebook",variant:"destructive"})}finally{u(!1)}};return s.jsx(xr,{children:s.jsxs("div",{className:"p-6 max-w-5xl",children:[s.jsx("h1",{className:"font-heading text-2xl font-bold mb-6",children:"Dashboard"}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[{label:"Utilizatori",value:d.users,icon:Rn,color:"text-primary"},{label:"Articole publicate",value:d.posts,icon:us,color:"text-primary"},{label:"Cursuri active",value:d.courses,icon:Rr,color:"text-primary"},{label:"Înscrieri cursuri",value:d.enrollments,icon:ile,color:"text-primary"}].map(g=>s.jsxs("div",{className:"rounded-xl border bg-card p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(g.icon,{className:`h-4 w-4 ${g.color}`}),s.jsx("span",{className:"text-xs text-muted-foreground",children:g.label})]}),s.jsx("p",{className:"text-2xl font-bold",children:g.value})]},g.label))}),s.jsxs("div",{className:"rounded-xl border bg-card p-6 mb-6",children:[s.jsx("h2",{className:"font-heading text-lg font-semibold mb-4",children:"Pipeline Conținut"}),s.jsxs("div",{className:"flex items-center gap-2 mb-4 p-3 rounded-lg bg-green-500/10 border border-green-500/20",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),s.jsx("span",{className:"text-sm text-green-700 dark:text-green-400 font-medium",children:"Automatizare activă — RSS la fiecare oră, AI Briefs + publicare la fiecare 2 ore, Facebook 3x/zi (08:00, 15:00, 20:00)"})]}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs(me,{onClick:f,disabled:r,variant:"outline",size:"sm",children:[r?s.jsx(rt,{className:"animate-spin",size:16}):s.jsx(ya,{size:16}),r?"Se importă...":"Fetch RSS manual"]}),s.jsxs(me,{onClick:p,disabled:i,size:"sm",children:[i?s.jsx(rt,{className:"animate-spin",size:16}):s.jsx(Li,{size:16}),i?"Se generează...":"Generează + Publică AI Briefs"]}),s.jsxs(me,{onClick:m,disabled:o,variant:"outline",size:"sm",children:[o?s.jsx(rt,{className:"animate-spin",size:16}):s.jsx(Pa,{size:16}),o?"Se generează video...":"Generează Video Briefs (3 art.)"]}),s.jsxs(me,{onClick:A,disabled:c,variant:"outline",size:"sm",children:[c?s.jsx(rt,{className:"animate-spin",size:16}):s.jsx(Yoe,{size:16}),c?"Se postează...":"Postează pe Facebook (3 art.)"]})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-3",children:"Pipeline-ul rulează automat. Butoanele sunt pentru declanșare manuală imediată."})]})]})})}const Tn=w.forwardRef(({className:e,...r},n)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:n,className:it("w-full caption-bottom text-sm",e),...r})}));Tn.displayName="Table";const Pn=w.forwardRef(({className:e,...r},n)=>s.jsx("thead",{ref:n,className:it("[&_tr]:border-b",e),...r}));Pn.displayName="TableHeader";const In=w.forwardRef(({className:e,...r},n)=>s.jsx("tbody",{ref:n,className:it("[&_tr:last-child]:border-0",e),...r}));In.displayName="TableBody";const Kyt=w.forwardRef(({className:e,...r},n)=>s.jsx("tfoot",{ref:n,className:it("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...r}));Kyt.displayName="TableFooter";const Nt=w.forwardRef(({className:e,...r},n)=>s.jsx("tr",{ref:n,className:it("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...r}));Nt.displayName="TableRow";const Me=w.forwardRef(({className:e,...r},n)=>s.jsx("th",{ref:n,className:it("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...r}));Me.displayName="TableHead";const Oe=w.forwardRef(({className:e,...r},n)=>s.jsx("td",{ref:n,className:it("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...r}));Oe.displayName="TableCell";const Gyt=w.forwardRef(({className:e,...r},n)=>s.jsx("caption",{ref:n,className:it("mt-4 text-sm text-muted-foreground",e),...r}));Gyt.displayName="TableCaption";const Xyt=["web3","blockchain","nft","validare-nft","ai","digital-marketing","e-learning"];function Yyt(){const{toast:e}=wn(),r=As(),n=Kr(),i=async(B,T)=>{await Promise.all([n.invalidateQueries({queryKey:["admin-courses"]}),n.invalidateQueries({queryKey:["courses"]}),...B?[n.invalidateQueries({queryKey:["course-by-id",B]})]:[],...T?[n.invalidateQueries({queryKey:["course",T]})]:[]])},[a,o]=w.useState(!1),[l,c]=w.useState(""),[u,d]=w.useState(""),[h,f]=w.useState("all"),[p,m]=w.useState("all"),[A,g]=w.useState("all"),{data:y=[],isLoading:x}=Xe({queryKey:["admin-courses"],queryFn:async()=>{const{data:B,error:T}=await G.from("courses").select("*").order("created_at",{ascending:!1});if(T)throw T;return B||[]}}),{data:b={}}=Xe({queryKey:["admin-enrollment-counts"],queryFn:async()=>{const{data:B,error:T}=await G.from("enrollments").select("course_id");if(T)throw T;const F={};
2161return(B||[]).forEach(I=>{F[I.course_id]=(F[I.course_id]||0)+1}),F}}),{data:v={}}=Xe({queryKey:["admin-completed-counts"],queryFn:async()=>{const{data:B,error:T}=await G.from("enrollments").select("course_id").not("completed_at","is",null);if(T)throw T;const F={};return(B||[]).forEach(I=>{F[I.course_id]=(F[I.course_id]||0)+1}),F}}),j=w.useMemo(()=>{const B=Object.values(b).reduce((L,V)=>L+V,0),T=y.filter(L=>L.is_published).length,I=y.filter(L=>L.price_type!=="free").reduce((L,V)=>{const U=b[V.id]||0;return L+(Number(V.price_amount)||0)*U},0),D=y.reduce((L,V)=>L+(V.total_lessons||0),0);return{totalEnrollments:B,published:T,draft:y.length-T,totalRevenuePotential:I,totalLessons:D}},[y,b]),_=w.useMemo(()=>y.filter(B=>!(u&&!B.title.toLowerCase().includes(u.toLowerCase())||h==="published"&&!B.is_published||h==="draft"&&B.is_published||p!=="all"&&!(B.topics||[]).includes(p)||A!=="all"&&B.price_type!==A)),[y,u,h,p,A]),C=An({mutationFn:async({id:B,isPublished:T})=>{const{error:F}=await G.from("courses").update({is_published:!T}).eq("id",B);if(F)throw F},onSuccess:async(B,T)=>{const F=y.find(I=>I.id===T.id);await i(T.id,F==null?void 0:F.slug),e({title:"Status actualizat"})}}),N=An({mutationFn:async B=>{const{error:T}=await G.from("courses").delete().eq("id",B);if(T)throw T},onSuccess:()=>{n.invalidateQueries({queryKey:["admin-courses"]}),e({title:"Curs șters"})}}),S=An({mutationFn:async B=>{const T=y.find(D=>D.id===B);if(!T)throw new Error("Curs negăsit");const{data:F,error:I}=await G.from("courses").insert({title:`${T.title} (copie)`,slug:`${T.slug}-copie-${Date.now().toString(36)}`,description:T.description,short_description:T.short_description,image_url:T.image_url,topics:T.topics,difficulty_level:T.difficulty_level,price_type:T.price_type,price_amount:T.price_amount,currency:T.currency,estimated_hours:T.estimated_hours,is_published:!1}).select().single();if(I)throw I;return F},onSuccess:B=>{n.invalidateQueries({queryKey:["admin-courses"]}),e({title:"Curs duplicat",description:"Poți edita copia acum."}),r(`/admin/courses/${B.id}`)}}),E=async()=>{if(l.trim()){o(!0);try{const B=l.toLowerCase().replace(/[^a-z0-9ăîșțâ\s-]/g,"").replace(/\s+/g,"-").slice(0,80),{data:T,error:F}=await G.from("courses").insert({title:l.trim(),slug:`${B}-${Date.now().toString(36)}`}).select().single();if(F)throw F;r(`/admin/courses/${T.id}`)}catch(B){e({title:"Eroare",description:B.message,variant:"destructive"})}finally{o(!1)}}},O=B=>{switch(B){case"începător":return"bg-emerald-500/10 text-emerald-700 dark:text-emerald-400 border-emerald-500/20";case"intermediar":return"bg-amber-500/10 text-amber-700 dark:text-amber-400 border-amber-500/20";case"avansat":return"bg-rose-500/10 text-rose-700 dark:text-rose-400 border-rose-500/20";default:return"bg-muted text-muted-foreground"}};return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-7xl",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Admin Dashboard"]}),s.jsx("div",{className:"flex items-center justify-between mb-8",children:s.jsxs("h1",{className:"font-heading text-3xl font-bold flex items-center gap-3",children:[s.jsx(Rr,{size:28,className:"text-primary"}),"EduWeb Academy — Cursuri"]})}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3 mb-6",children:[s.jsx(st,{className:"bg-card/50 border-border/50",children:s.jsxs(ot,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mb-1",children:[s.jsx(yr,{size:14}),s.jsx("span",{className:"text-xs font-medium uppercase tracking-wide",children:"Total cursuri"})]}),s.jsx("p",{className:"text-2xl font-bold",children:y.length}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[j.published," publicate · ",j.draft," draft"]})]})}),s.jsx(st,{className:"bg-card/50 border-border/50",children:s.jsxs(ot,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mb-1",children:[s.jsx(Rn,{size:14}),s.jsx("span",{className:"text-xs font-medium uppercase tracking-wide",children:"Înrolări"})]}),s.jsx("p",{className:"text-2xl font-bold",children:j.totalEnrollments}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"total studenți"})]})}),s.jsx(st,{className:"bg-card/50 border-border/50",children:s.jsxs(ot,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mb-1",children:[s.jsx(Eo,{size:14}),s.jsx("span",{className:"text-xs font-medium uppercase tracking-wide",children:"Lecții"})]}),s.jsx("p",{className:"text-2xl font-bold",children:j.totalLessons}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"conținut total"})]})}),s.jsx(st,{className:"bg-card/50 border-border/50",children:s.jsxs(ot,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mb-1",children:[s.jsx(GSe,{size:14}),s.jsx("span",{className:"text-xs font-medium uppercase tracking-wide",children:"Venit"})]}),s.jsxs("p",{className:"text-2xl font-bold",children:[j.totalRevenuePotential.toLocaleStr
2161ing("ro-RO")," RON"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"din înrolări plătite"})]})}),s.jsx(st,{className:"bg-card/50 border-border/50",children:s.jsxs(ot,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mb-1",children:[s.jsx(oa,{size:14}),s.jsx("span",{className:"text-xs font-medium uppercase tracking-wide",children:"Completare"})]}),s.jsxs("p",{className:"text-2xl font-bold",children:[j.totalEnrollments>0?Math.round(Object.values(v).reduce((B,T)=>B+T,0)/j.totalEnrollments*100):0,"%"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"rată finalizare"})]})})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5 mb-6 space-y-4",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsx(qe,{placeholder:"Titlu curs nou...",value:l,onChange:B=>c(B.target.value),onKeyDown:B=>B.key==="Enter"&&E(),className:"flex-1"}),s.jsxs(me,{onClick:E,disabled:a||!l.trim(),children:[a?s.jsx(rt,{size:16,className:"animate-spin"}):s.jsx(Qn,{size:16}),"Creează curs"]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[s.jsx(ul,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută cursuri...",value:u,onChange:B=>d(B.target.value),className:"pl-9"})]}),s.jsxs(Cn,{value:h,onValueChange:B=>f(B),children:[s.jsxs(yn,{className:"w-[140px]",children:[s.jsx(y_,{size:14,className:"mr-1"}),s.jsx(Nn,{})]}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:"Toate"}),s.jsx(_t,{value:"published",children:"Publicate"}),s.jsx(_t,{value:"draft",children:"Draft"})]})]}),s.jsxs(Cn,{value:p,onValueChange:m,children:[s.jsx(yn,{className:"w-[160px]",children:s.jsx(Nn,{placeholder:"Topic"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:"Toate topicurile"}),Xyt.map(B=>s.jsx(_t,{value:B,children:vg[B]},B))]})]}),s.jsxs(Cn,{value:A,onValueChange:B=>g(B),children:[s.jsx(yn,{className:"w-[140px]",children:s.jsx(Nn,{placeholder:"Preț"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:"Orice preț"}),s.jsx(_t,{value:"free",children:"Gratuit"}),s.jsx(_t,{value:"paid",children:"Cu plată"}),s.jsx(_t,{value:"subscription",children:"Abonament"})]})]}),(u||h!=="all"||p!=="all"||A!=="all")&&s.jsx(me,{variant:"ghost",size:"sm",onClick:()=>{d(""),f("all"),m("all"),g("all")},children:"Resetează filtre"})]})]}),!x&&s.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:[_.length," din ",y.length," cursuri"]}),x?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):_.length===0?s.jsx("div",{className:"text-center py-12 text-muted-foreground glass-card rounded-xl",children:y.length===0?"Niciun curs creat. Folosește formularul de mai sus pentru a adăuga primul curs.":"Niciun curs nu corespunde filtrelor selectate."}):s.jsx("div",{className:"glass-card rounded-xl overflow-hidden",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{className:"w-[300px]",children:"Curs"}),s.jsx(Me,{children:"Topicuri"}),s.jsx(Me,{children:"Dificultate"}),s.jsx(Me,{children:"Preț"}),s.jsx(Me,{className:"text-center",children:"Lecții"}),s.jsx(Me,{className:"text-center",children:"Înrolări"}),s.jsx(Me,{className:"text-center",children:"Completare"}),s.jsx(Me,{children:"Status"}),s.jsx(Me,{className:"text-right w-[60px]",children:"Acțiuni"})]})}),s.jsx(In,{children:_.map(B=>{const T=b[B.id]||0,F=v[B.id]||0,I=T>0?Math.round(F/T*100):0;return s.jsxs(Nt,{children:[s.jsx(Oe,{children:s.jsx(be,{to:`/admin/courses/${B.id}`,className:"group",children:s.jsxs("div",{className:"flex items-center gap-3",children:[B.image_url?s.jsx("img",{src:B.image_url,alt:"",className:"w-10 h-10 rounded-lg object-cover shrink-0"}):s.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:s.jsx(Rr,{size:16,className:"text-primary"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("p",{className:"font-medium truncate group-hover:text-primary transition-colors",children:[B.course_code&&s.jsxs("span",{className:"text-xs text-muted-foreground font-normal mr-1",children:["#",B.course_code]}),B.title]}),B.estimated_hours&&s.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[s.jsx(ki,{size:10})," ",B.estimated_hours,"h estimat"]})]})]})})}),s.jsx(Oe,{children:s.jsxs("div",{className:"flex gap-1 flex-wrap",children:[(B.topics||[]).slice(0,2).map(D=>s.jsx("span",{className:`cat-${D} cat-badge px-1.5 py-0.5 rounded text-[10px]`,children:vg[D]||D},D)),(B.topics||[]).length>2&&s.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",(B.topics||[]).length-2]})]})}),s.jsx(Oe,{children:s.jsx("span",{className:`text-[11px] font-medium px-2 py-1 rounded-md border ${O(B.difficulty_level)}`,children:B.difficulty_level})}),s.jsx(Oe,{className:"text-sm",children:B.price_type==="free"?s.jsx(at,{variant:"secondary",className:"bg-emerald-500/10 text-emerald-700 dark:text-emerald-400 border-emerald-500/20",children:"Gratuit"}):B.price_type==="subscription"?s.jsx(at,{variant:"secondary",className:"bg-purple-500/10 text-purple-700 dark:text-purple-400 border-purple-500/20",children:"Abonament"}):s.jsxs("span",{className:"font-medium",children:[B.price_amount," ",B.currency]})}),s.jsx(Oe,{className:"text-center text-sm font-medium",children:B.total_lessons}
2161),s.jsx(Oe,{className:"text-center",children:s.jsx("span",{className:`text-sm font-semibold ${T>0?"text-primary":"text-muted-foreground"}`,children:T})}),s.jsx(Oe,{className:"text-center",children:T>0?s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx("div",{className:"w-12 h-1.5 bg-muted rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${I}%`}})}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[I,"%"]})]}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})}),s.jsx(Oe,{children:B.is_published?s.jsx(at,{variant:"secondary",className:"bg-primary/10 text-primary border-primary/20",children:"Publicat"}):s.jsx(at,{variant:"secondary",children:"Draft"})}),s.jsx(Oe,{className:"text-right",children:s.jsxs(SE,{children:[s.jsx(kE,{asChild:!0,children:s.jsx(me,{variant:"ghost",size:"icon",className:"h-8 w-8",children:s.jsx(Xoe,{size:16})})}),s.jsxs(q2,{align:"end",children:[s.jsxs(Go,{onClick:()=>r(`/admin/courses/${B.id}`),children:[s.jsx(wp,{size:14,className:"mr-2"})," Editează"]}),s.jsx(Go,{onClick:()=>C.mutate({id:B.id,isPublished:B.is_published}),children:B.is_published?s.jsxs(s.Fragment,{children:[s.jsx(x_,{size:14,className:"mr-2"})," Ascunde"]}):s.jsxs(s.Fragment,{children:[s.jsx(Oi,{size:14,className:"mr-2"})," Publică"]})}),B.is_published&&s.jsxs(Go,{onClick:()=>window.open(`/academy/${B.slug}`,"_blank"),children:[s.jsx(Yr,{size:14,className:"mr-2"})," Vizualizează"]}),s.jsxs(Go,{onClick:()=>S.mutate(B.id),children:[s.jsx(Jh,{size:14,className:"mr-2"})," Duplică"]}),s.jsx(EE,{}),s.jsxs(Go,{className:"text-destructive focus:text-destructive",onClick:()=>{const D=prompt("Introdu codul PIN de 4 cifre pentru a șterge cursul:");D==="5580"?N.mutate(B.id):D!==null&&alert("Cod PIN incorect. Ștergerea a fost anulată.")},children:[s.jsx(Xr,{size:14,className:"mr-2"})," Șterge"]})]})]})})]},B.id)})})]})})]})})}function Hn(e){const r=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&r==="[object Date]"?new e.constructor(+e):typeof e=="number"||r==="[object Number]"||typeof e=="string"||r==="[object String]"?new Date(e):new Date(NaN)}function mp(e,r){return e instanceof Date?new e.constructor(r):new Date(r)}const ove=6048e5,Jyt=864e5,VN=43200,yZ=1440;let Zyt={};function q_(){return Zyt}function zj(e,r){var c,u,d,h;const n=q_(),i=(r==null?void 0:r.weekStartsOn)??((u=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((h=(d=n.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,a=Hn(e),o=a.getDay(),l=(o<i?7:0)+o-i;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function W5(e){return zj(e,{weekStartsOn:1})}function lve(e){const r=Hn(e),n=r.getFullYear(),i=mp(e,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const a=W5(i),o=mp(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const l=W5(o);return r.getTime()>=a.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function vZ(e){const r=Hn(e);return r.setHours(0,0,0,0),r}function q5(e){const r=Hn(e),n=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return n.setUTCFullYear(r.getFullYear()),+e-+n}function cve(e,r){const n=vZ(e),i=vZ(r),a=+n-q5(n),o=+i-q5(i);return Math.round((a-o)/Jyt)}function evt(e){const r=lve(e),n=mp(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),W5(n)}function xk(e,r){const n=Hn(e),i=Hn(r),a=n.getTime()-i.getTime();return a<0?-1:a>0?1:a}function tvt(e){return mp(e,Date.now())}function rvt(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function nvt(e){if(!rvt(e)&&typeof e!="number")return!1;const r=Hn(e);return!isNaN(Number(r))}function ivt(e,r){const n=Hn(e),i=Hn(r),a=n.getFullYear()-i.getFullYear(),o=n.getMonth()-i.getMonth();return a*12+o}function avt(e,r){const n=Hn(e),i=Hn(r),a=bZ(n,i),o=Math.abs(cve(n,i));n.setDate(n.getDate()-a*o);const l=+(bZ(n,i)===-a),c=a*(o-l);return c===0?0:c}function bZ(e,r){const n=e.getFullYear()-r.getFullYear()||e.getMonth()-r.getMonth()||e.getDate()-r.getDate()||e.getHours()-r.getHours()||e.getMinutes()-r.getMinutes()||e.getSeconds()-r.getSeconds()||e.getMilliseconds()-r.getMilliseconds();return n<0?-1:n>0?1:n}function svt(e){return r=>{const i=(e?Math[e]:Math.trunc)(r);return i===0?0:i}}function ovt(e,r){return+Hn(e)-+Hn(r)}function lvt(e){const r=Hn(e);return r.setHours(23,59,59,999),r}function cvt(e){const r=Hn(e),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function uvt(e){const r=Hn(e);return+lvt(r)==+cvt(r)}function dvt(e,r){const n=Hn(e),i=Hn(r),a=xk(n,i),o=Math.abs(ivt(n,i));let l;if(o<1)l=0;else{n.getMonth()===1&&n.getDate()>
vendor: 6,355 bytes, line 2161
216127&&n.setDate(30),n.setMonth(n.getMonth()-a*o);let c=xk(n,i)===-a;uvt(Hn(e))&&o===1&&xk(e,i)===1&&(c=!1),l=a*(o-Number(c))}return l===0?0:l}function hvt(e,r,n){const i=ovt(e,r)/1e3;return svt(n==null?void 0:n.roundingMethod)(i)}function fvt(e){const r=Hn(e),n=mp(e,0);return n.setFullYear(r.getFullYear(),0,1),n.setHours(0,0,0,0),n}const mvt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},pvt=(e,r,n)=>{let i;const a=mvt[e];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function sv(e){return(r={})=>{const n=r.width?String(r.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Avt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},gvt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xvt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yvt={date:sv({formats:Avt,defaultWidth:"full"}),time:sv({formats:gvt,defaultWidth:"full"}),dateTime:sv({formats:xvt,defaultWidth:"full"})},vvt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bvt=(e,r,n,i)=>vvt[e];function md(e){return(r,n)=>{const i=n!=null&&n.context?String(n.context):"standalone";let a;if(i==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):l;a=e.formattingValues[c]||e.formattingValues[l]}else{const l=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[c]||e.values[l]}const o=e.argumentCallback?e.argumentCallback(r):r;return a[o]}}const wvt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},jvt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_vt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Cvt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Nvt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Svt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},kvt=(e,r)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Evt={ordinalNumber:kvt,era:md({values:wvt,defaultWidth:"wide"}),quarter:md({values:jvt,defaultWidth:"wide",argumentCallback:e=>e-1}),month:md({values:_vt,defaultWidth:"wide"}),day:md({values:Cvt,defaultWidth:"wide"}),dayPeriod:md({values:Nvt,defaultWidth:"wide",formattingValues:Svt,defaultFormattingWidth:"wide"})};function pd(e){return(r,n={})=>{const i=n.width,a=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=r.match(a);if(!o)return null;const l=o[0],c=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?Tvt(c,f=>f.test(l)):Bvt(c,f=>f.test(l));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const h=r.slice(l.length);return{value:d,rest:h}}}function Bvt(e,r){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r(e[n]))return n}function Tvt(e,r){for(let n=0;n<e.length;n++)if(r(e[n]))return n}function uve(e){return(r,n={})=>{const i=r.match(e.matchPattern);if(!i)return null;const a=i[0],o=r.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=n.valueCallback?n.valueCallback(l):l;const c=r.slice(a.length);return{value:l,rest:c}}}const Pvt=/^(\d+)(th|st|nd|rd)?/i,Ivt=/\d+/i,Fvt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ovt={any:[/^b/i,/^(a|c)/i]},Lvt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rvt={any:[/1/i,/2/i,/3/i,/4/i]},Dvt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Mvt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},zvt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i}
vendor: 5,225 bytes, line 2161
2161,Uvt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$vt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Qvt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Hvt={ordinalNumber:uve({matchPattern:Pvt,parsePattern:Ivt,valueCallback:e=>parseInt(e,10)}),era:pd({matchPatterns:Fvt,defaultMatchWidth:"wide",parsePatterns:Ovt,defaultParseWidth:"any"}),quarter:pd({matchPatterns:Lvt,defaultMatchWidth:"wide",parsePatterns:Rvt,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pd({matchPatterns:Dvt,defaultMatchWidth:"wide",parsePatterns:Mvt,defaultParseWidth:"any"}),day:pd({matchPatterns:zvt,defaultMatchWidth:"wide",parsePatterns:Uvt,defaultParseWidth:"any"}),dayPeriod:pd({matchPatterns:$vt,defaultMatchWidth:"any",parsePatterns:Qvt,defaultParseWidth:"any"})},KQ={code:"en-US",formatDistance:pvt,formatLong:yvt,formatRelative:bvt,localize:Evt,match:Hvt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Vvt(e){const r=Hn(e);return cve(r,fvt(r))+1}function Wvt(e){const r=Hn(e),n=+W5(r)-+evt(r);return Math.round(n/ove)+1}function dve(e,r){var h,f,p,m;const n=Hn(e),i=n.getFullYear(),a=q_(),o=(r==null?void 0:r.firstWeekContainsDate)??((f=(h=r==null?void 0:r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(p=a.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,l=mp(e,0);l.setFullYear(i+1,0,o),l.setHours(0,0,0,0);const c=zj(l,r),u=mp(e,0);u.setFullYear(i,0,o),u.setHours(0,0,0,0);const d=zj(u,r);return n.getTime()>=c.getTime()?i+1:n.getTime()>=d.getTime()?i:i-1}function qvt(e,r){var c,u,d,h;const n=q_(),i=(r==null?void 0:r.firstWeekContainsDate)??((u=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((h=(d=n.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,a=dve(e,r),o=mp(e,0);return o.setFullYear(a,0,i),o.setHours(0,0,0,0),zj(o,r)}function Kvt(e,r){const n=Hn(e),i=+zj(n,r)-+qvt(n,r);return Math.round(i/ove)+1}function Un(e,r){const n=e<0?"-":"",i=Math.abs(e).toString().padStart(r,"0");return n+i}const Uf={y(e,r){const n=e.getFullYear(),i=n>0?n:1-n;return Un(r==="yy"?i%100:i,r.length)},M(e,r){const n=e.getMonth();return r==="M"?String(n+1):Un(n+1,2)},d(e,r){return Un(e.getDate(),r.length)},a(e,r){const n=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,r){return Un(e.getHours()%12||12,r.length)},H(e,r){return Un(e.getHours(),r.length)},m(e,r){return Un(e.getMinutes(),r.length)},s(e,r){return Un(e.getSeconds(),r.length)},S(e,r){const n=r.length,i=e.getMilliseconds(),a=Math.trunc(i*Math.pow(10,n-3));return Un(a,r.length)}},Mx={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wZ={G:function(e,r,n){const i=e.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,r,n){if(r==="yo"){const i=e.getFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return Uf.y(e,r)},Y:function(e,r,n,i){const a=dve(e,i),o=a>0?a:1-a;if(r==="YY"){const l=o%100;return Un(l,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):Un(o,r.length)},R:function(e,r){const n=lve(e);return Un(n,r.length)},u:function(e,r){const n=e.getFullYear();return Un(n,r.length)},Q:function(e,r,n){const i=Math.ceil((e.getMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Un(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,r,n){const i=Math.ceil((e.getMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Un(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,r,n){const i=e.getMonth();switch(r){case"M":case"MM":return Uf.M(e,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,r,n){const i=e.getMonth();switch(r){case"L":return String(i+1);case"LL":return Un(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}}
vendor: 4,513 bytes, line 2161
2161,w:function(e,r,n,i){const a=Kvt(e,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):Un(a,r.length)},I:function(e,r,n){const i=Wvt(e);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Un(i,r.length)},d:function(e,r,n){return r==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Uf.d(e,r)},D:function(e,r,n){const i=Vvt(e);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Un(i,r.length)},E:function(e,r,n){const i=e.getDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,r,n,i){const a=e.getDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return Un(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,r,n,i){const a=e.getDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return Un(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,r,n){const i=e.getDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return Un(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,r,n){const a=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,r,n){const i=e.getHours();let a;switch(i===12?a=Mx.noon:i===0?a=Mx.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,r,n){const i=e.getHours();let a;switch(i>=17?a=Mx.evening:i>=12?a=Mx.afternoon:i>=4?a=Mx.morning:a=Mx.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,r,n){if(r==="ho"){let i=e.getHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Uf.h(e,r)},H:function(e,r,n){return r==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Uf.H(e,r)},K:function(e,r,n){const i=e.getHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Un(i,r.length)},k:function(e,r,n){let i=e.getHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Un(i,r.length)},m:function(e,r,n){return r==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Uf.m(e,r)},s:function(e,r,n){return r==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Uf.s(e,r)},S:function(e,r){return Uf.S(e,r)},X:function(e,r,n){const i=e.getTimezoneOffset();if(i===0)return"Z";switch(r){case"X":return _Z(i);case"XXXX":case"XX":return pA(i);case"XXXXX":case"XXX":default:return pA(i,":")}},x:function(e,r,n){const i=e.getTimezoneOffset();switch(r){case"x":return _Z(i);case"xxxx":case"xx":return pA(i);case"xxxxx":case"xxx":default:return pA(i,":")}},O:function(e,r,n){const i=e.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+jZ(i,":");case"OOOO":default:return"GMT"+pA(i,":")}},z:function(e,r,n){const i=e.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+jZ(i,":");
2161case"zzzz":default:return"GMT"+pA(i,":")}},t:function(e,r,n){const i=Math.trunc(e.getTime()/1e3);return Un(i,r.length)},T:function(e,r,n){const i=e.getTime();return Un(i,r.length)}};function jZ(e,r=""){const n=e>0?"-":"+",i=Math.abs(e),a=Math.trunc(i/60),o=i%60;return o===0?n+String(a):n+String(a)+r+Un(o,2)}function _Z(e,r){return e%60===0?(e>0?"-":"+")+Un(Math.abs(e)/60,2):pA(e,r)}function pA(e,r=""){const n=e>0?"-":"+",i=Math.abs(e),a=Un(Math.trunc(i/60),2),o=Un(i%60,2);return n+a+r+o}const CZ=(e,r)=>{switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},hve=(e,r)=>{switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Gvt=(e,r)=>{const n=e.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return CZ(e,r);let o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",CZ(i,r)).replace("{{time}}",hve(a,r))},Xvt={p:hve,P:Gvt},Yvt=/^D+$/,Jvt=/^Y+$/,Zvt=["D","DD","YY","YYYY"];function e0t(e){return Yvt.test(e)}function t0t(e){return Jvt.test(e)}function r0t(e,r,n){const i=n0t(e,r,n);if(console.warn(i),Zvt.includes(e))throw new RangeError(i)}function n0t(e,r,n){const i=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${r}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const i0t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,a0t=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,s0t=/^'([^]*?)'?$/,o0t=/''/g,l0t=/[a-zA-Z]/;function al(e,r,n){var h,f,p,m,A,g,y,x;const i=q_(),a=(n==null?void 0:n.locale)??i.locale??KQ,o=(n==null?void 0:n.firstWeekContainsDate)??((f=(h=n==null?void 0:n.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(p=i.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,l=(n==null?void 0:n.weekStartsOn)??((g=(A=n==null?void 0:n.locale)==null?void 0:A.options)==null?void 0:g.weekStartsOn)??i.weekStartsOn??((x=(y=i.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0,c=Hn(e);if(!nvt(c))throw new RangeError("Invalid time value");let u=r.match(a0t).map(b=>{const v=b[0];if(v==="p"||v==="P"){const j=Xvt[v];return j(b,a.formatLong)}return b}).join("").match(i0t).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const v=b[0];if(v==="'")return{isToken:!1,value:c0t(b)};if(wZ[v])return{isToken:!0,value:b};if(v.match(l0t))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:b}});a.localize.preprocessor&&(u=a.localize.preprocessor(c,u));const d={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return u.map(b=>{if(!b.isToken)return b.value;const v=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&t0t(v)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&e0t(v))&&r0t(v,r,String(e));const j=wZ[v[0]];return j(c,v,a.localize,d)}).join("")}function c0t(e){const r=e.match(s0t);return r?r[1].replace(o0t,"'"):e}function u0t(e,r,n){const i=q_(),a=(n==null?void 0:n.locale)??i.locale??KQ,o=2520,l=xk(e,r);if(isNaN(l))throw new RangeError("Invalid time value");const c=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:l});let u,d;l>0?(u=Hn(r),d=Hn(e)):(u=Hn(e),d=Hn(r));const h=hvt(d,u),f=(q5(d)-q5(u))/1e3,p=Math.round((h-f)/60);let m;if(p<2)return n!=null&&n.includeSeconds?h<5?a.formatDistance("lessThanXSeconds",5,c):h<10?a.formatDistance("lessThanXSeconds",10,c):h<20?a.formatDistance("lessThanXSeconds",20,c):h<40?a.formatDistance("halfAMinute",0,c):h<60?a.formatDistance("lessThanXMinutes",1,c):a.formatDistance("xMinutes",1,c):p===0?a.formatDistance("lessThanXMinutes",1,c):a.formatDistance("xMinutes",p,c);if(p<45)return a.formatDistance("xMinutes",p,c);if(p<90)return a.formatDistance("aboutXHours",1,c);if(p<yZ){const A=Math.round(p/60);return a.formatDistance("aboutXHours",A,c)}else{if(p<o)return a.formatDistance("xDays",1,c);if(p<VN){const A=Math.round(p/yZ);return a.formatDistance("xDays",A,c)}else if(p<VN*2)return m=Math.round(p/VN),a.formatDistance("aboutXMonths",m,c)}if(m=dvt(d,u),m<12){const A=Math.round(p/VN);return a.formatDistance("xMonths",A,c)}else{const A=m%12,g=Math.trunc(m/12);return A<3?a.formatDistance("aboutXYears",g,c):A<9?a.formatDistance("overXYears",g,c):a.formatDistance("almostXYears",g+1,c)}}function NZ(e,r){return u0t(e,tvt(e),r)}const d0t={lessThanXSeconds:{one:"mai puțin de o secundă",other:"mai puțin de {{count}} secunde"},xSeconds:{one:"1 secundă",other:"{{count}} secunde"},halfAMinute:"jumătate de minut",lessThanXMinutes:{one:"mai puțin de un minut",other:"mai puțin de {{count}} minute"},xMinutes:{one:"1 minut",other:"{{count}} minute"},aboutXHours:{one:"circa 1 oră",other:"circa {{count}} ore"},xHours:{one:"1 oră",other:"{{count}} ore"},xDays:{one:"1 zi",other:"{{count}} zile"},aboutXWeeks:{one:"circa o săptămână",other:"circa {{count}} săptămâni"},xWeeks:{one:"1 săptămână",other:"{{count}} săptămâni"},aboutXMonths:{one:"circa 1 lună",other:"circa {{count}} luni"},xMonths:{one:"1 lună",other:"{{count}} luni"},aboutXYears:{one:"circa 1 an",other:"circa {{count}} ani"},xYears:{one:"1 an",other:"{{count}} ani"},overXYears:{one:"peste 1 an",other:"peste {{count}} ani"},almostXYears:{one:"aproape 1 an",other:"aproape {{count}} ani"}},h0t=(e,r,n)=>{let i;const a=d0t[e];
2161return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",String(r)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"în "+i:i+" în urmă":i},f0t={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd.MM.yyyy"},m0t={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},p0t={full:"{{date}} 'la' {{time}}",long:"{{date}} 'la' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},A0t={date:sv({formats:f0t,defaultWidth:"full"}),time:sv({formats:m0t,defaultWidth:"full"}),dateTime:sv({formats:p0t,defaultWidth:"full"})},g0t={lastWeek:"eeee 'trecută la' p",yesterday:"'ieri la' p",today:"'astăzi la' p",tomorrow:"'mâine la' p",nextWeek:"eeee 'viitoare la' p",other:"P"},x0t=(e,r,n,i)=>g0t[e],y0t={narrow:["Î","D"],abbreviated:["Î.d.C.","D.C."],wide:["Înainte de Cristos","După Cristos"]},v0t={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["primul trimestru","al doilea trimestru","al treilea trimestru","al patrulea trimestru"]},b0t={narrow:["I","F","M","A","M","I","I","A","S","O","N","D"],abbreviated:["ian","feb","mar","apr","mai","iun","iul","aug","sep","oct","noi","dec"],wide:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"]},w0t={narrow:["d","l","m","m","j","v","s"],short:["du","lu","ma","mi","jo","vi","sâ"],abbreviated:["dum","lun","mar","mie","joi","vin","sâm"],wide:["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"]},j0t={narrow:{am:"a",pm:"p",midnight:"mn",noon:"ami",morning:"dim",afternoon:"da",evening:"s",night:"n"},abbreviated:{am:"AM",pm:"PM",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},wide:{am:"a.m.",pm:"p.m.",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"}},_0t={narrow:{am:"a",pm:"p",midnight:"mn",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},abbreviated:{am:"AM",pm:"PM",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},wide:{am:"a.m.",pm:"p.m.",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"}},C0t=(e,r)=>String(e),N0t={ordinalNumber:C0t,era:md({values:y0t,defaultWidth:"wide"}),quarter:md({values:v0t,defaultWidth:"wide",argumentCallback:e=>e-1}),month:md({values:b0t,defaultWidth:"wide"}),day:md({values:w0t,defaultWidth:"wide"}),dayPeriod:md({values:j0t,defaultWidth:"wide",formattingValues:_0t,defaultFormattingWidth:"wide"})},S0t=/^(\d+)?/i,k0t=/\d+/i,E0t={narrow:/^(Î|D)/i,abbreviated:/^(Î\.?\s?d\.?\s?C\.?|Î\.?\s?e\.?\s?n\.?|D\.?\s?C\.?|e\.?\s?n\.?)/i,wide:/^(Înainte de Cristos|Înaintea erei noastre|După Cristos|Era noastră)/i},B0t={any:[/^ÎC/i,/^DC/i],wide:[/^(Înainte de Cristos|Înaintea erei noastre)/i,/^(După Cristos|Era noastră)/i]},T0t={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^trimestrul [1234]/i},P0t={any:[/1/i,/2/i,/3/i,/4/i]},I0t={narrow:/^[ifmaasond]/i,abbreviated:/^(ian|feb|mar|apr|mai|iun|iul|aug|sep|oct|noi|dec)/i,wide:/^(ianuarie|februarie|martie|aprilie|mai|iunie|iulie|august|septembrie|octombrie|noiembrie|decembrie)/i},F0t={narrow:[/^i/i,/^f/i,/^m/i,/^a/i,/^m/i,/^i/i,/^i/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ia/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^iun/i,/^iul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},O0t={narrow:/^[dlmjvs]/i,short:/^(d|l|ma|mi|j|v|s)/i,abbreviated:/^(dum|lun|mar|mie|jo|vi|sâ)/i,wide:/^(duminica|luni|marţi|miercuri|joi|vineri|sâmbătă)/i},L0t={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^mi/i,/^j/i,/^v/i,/^s/i]},R0t={narrow:/^(a|p|mn|a|(dimineaţa|după-amiaza|seara|noaptea))/i,any:/^([ap]\.?\s?m\.?|miezul nopții|amiaza|(dimineaţa|după-amiaza|seara|noaptea))/i},D0t={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/amiaza/i,morning:/dimineaţa/i,afternoon:/după-amiaza/i,evening:/seara/i,night:/noaptea/i}},M0t={ordinalNumber:uve({matchPattern:S0t,parsePattern:k0t,valueCallback:e=>parseInt(e,10)}),era:pd({matchPatterns:E0t,defaultMatchWidth:"wide",parsePatterns:B0t,defaultParseWidth:"any"}),quarter:pd({matchPatterns:T0t,defaultMatchWidth:"wide",parsePatterns:P0t,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pd({matchPatterns:I0t,defaultMatchWidth:"wide",parsePatterns:F0t,defaultParseWidth:"any"}
2161),day:pd({matchPatterns:O0t,defaultMatchWidth:"wide",parsePatterns:L0t,defaultParseWidth:"any"}),dayPeriod:pd({matchPatterns:R0t,defaultMatchWidth:"any",parsePatterns:D0t,defaultParseWidth:"any"})},Md={code:"ro",formatDistance:h0t,formatLong:A0t,formatRelative:x0t,localize:N0t,match:M0t,options:{weekStartsOn:1,firstWeekContainsDate:1}};function z0t(){const[e,r]=w.useState(""),[n,i]=w.useState("all"),{data:a=[]}=Xe({queryKey:["analytics-courses"],queryFn:async()=>{const{data:b,error:v}=await G.from("courses").select("id, title, slug, total_lessons, is_published").order("title");if(v)throw v;return b||[]}}),{data:o=[],isLoading:l}=Xe({queryKey:["analytics-enrollments"],queryFn:async()=>{const{data:b,error:v}=await G.from("enrollments").select("*, courses(id, title, slug, total_lessons)").order("enrolled_at",{ascending:!1});if(v)throw v;return b||[]}}),{data:c=[]}=Xe({queryKey:["analytics-profiles"],queryFn:async()=>{const{data:b,error:v}=await G.from("profiles").select("user_id, display_name, email");if(v)throw v;return b||[]}}),{data:u=[]}=Xe({queryKey:["analytics-quiz-attempts"],queryFn:async()=>{const{data:b,error:v}=await G.from("quiz_attempts").select("*").order("attempted_at",{ascending:!1});if(v)throw v;return b||[]}}),{data:d=[]}=Xe({queryKey:["analytics-lesson-progress"],queryFn:async()=>{const{data:b,error:v}=await G.from("lesson_progress").select("*").eq("completed",!0);if(v)throw v;return b||[]}}),{data:h=[]}=Xe({queryKey:["analytics-modules"],queryFn:async()=>{const{data:b,error:v}=await G.from("course_modules").select("id, course_id, title");if(v)throw v;return b||[]}}),{data:f=[]}=Xe({queryKey:["analytics-lessons"],queryFn:async()=>{const{data:b,error:v}=await G.from("course_lessons").select("id, module_id");if(v)throw v;return b||[]}}),p=w.useMemo(()=>{const b=new Map;return c.forEach(v=>b.set(v.user_id,{name:v.display_name||v.email||"Anonim",email:v.email||""})),b},[c]),m=w.useMemo(()=>{const b=new Map;return h.forEach(v=>b.set(v.id,v.course_id)),b},[h]);w.useMemo(()=>{const b=new Map;return f.forEach(v=>b.set(v.id,v.module_id)),b},[f]);const A=w.useMemo(()=>{const b=new Map;return o.forEach(v=>{if(!b.has(v.user_id)){const _=p.get(v.user_id);b.set(v.user_id,{userId:v.user_id,name:(_==null?void 0:_.name)||"Anonim",email:(_==null?void 0:_.email)||"",enrollments:[],completedCourses:0,inProgressCourses:0,totalQuizzes:0,passedQuizzes:0,totalQuizScore:0,totalQuizQuestions:0,lessonsCompleted:0,firstEnrollment:null,lastActivity:null,avgCompletionDays:null,eduCoinsFromQuizzes:0})}const j=b.get(v.user_id);j.enrollments.push(v),v.completed_at?j.completedCourses++:j.inProgressCourses++,(!j.firstEnrollment||v.enrolled_at<j.firstEnrollment)&&(j.firstEnrollment=v.enrolled_at)}),u.forEach(v=>{const j=b.get(v.user_id);j&&(j.totalQuizzes++,v.passed&&j.passedQuizzes++,j.totalQuizScore+=v.score,j.totalQuizQuestions+=v.total_questions,j.eduCoinsFromQuizzes+=v.edu_coins_earned,(!j.lastActivity||v.attempted_at>j.lastActivity)&&(j.lastActivity=v.attempted_at))}),d.forEach(v=>{const j=b.get(v.user_id);j&&(j.lessonsCompleted++,v.completed_at&&(!j.lastActivity||v.completed_at>j.lastActivity)&&(j.lastActivity=v.completed_at))}),b.forEach(v=>{const j=v.enrollments.filter(_=>_.completed_at);if(j.length>0){const _=j.reduce((C,N)=>C+avt(new Date(N.completed_at),new Date(N.enrolled_at)),0);v.avgCompletionDays=Math.round(_/j.length)}}),Array.from(b.values())},[o,u,d,p]),g=w.useMemo(()=>A.filter(b=>{if(e){const v=e.toLowerCase();if(!b.name.toLowerCase().includes(v)&&!b.email.toLowerCase().includes(v))return!1}return!(n!=="all"&&!b.enrollments.some(v=>v.course_id===n))}),[A,e,n]),y=w.useMemo(()=>{const b=A.length,v=o.length,j=o.filter(E=>E.completed_at).length,_=v>0?Math.round(j/v*100):0,C=u.filter(E=>E.passed).length,N=u.length,S=N>0?Math.round(u.reduce((E,O)=>E+(O.total_questions>0?O.score/O.total_questions*100:0),0)/N):0;return{totalStudents:b,totalEnrollments:v,totalCompleted:j,completionRate:_,totalQuizzesPassed:C,totalQuizzesTotal:N,avgQuizScore:S}},[A,o,u]),x=w.useMemo(()=>{const b=new Map;return a.forEach(v=>b.set(v.id,{enrolled:0,completed:0,quizzes:0,passed:0,avgScore:0})),o.forEach(v=>{const j=b.get(v.course_id);j&&(j.enrolled++,v.completed_at&&j.completed++)}),u.forEach(v=>{const j=m.get(v.module_id);if(j){const _=b.get(j);_&&(_.quizzes++,v.passed&&_.passed++)}}),b},[a,o,u,m]);return s.jsx(xr,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(be,{to:"/admin/courses",children:s.jsx(me,{variant:"ghost",size:"icon",children:s.jsx(rn,{size:18})})}),s.jsxs("div",{children:[s.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[s.jsx(Eo,{size:24})," Analytics Cursanți"]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Vizualizare detaliată a progresului studenților"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsx(st,{children:s.jsx(ot,{className:"pt-4 pb-3 px-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:s.jsx(Rn,{size:20,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-bold",children:y.totalStudents}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Cursanți unici"})]})]})})}),s.jsx(st,{children:s.jsx(ot,{className:"pt-4 pb-3 px-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:s.jsx(Rr,{size:20,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-bold",children:y.totalEnrollments}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Înscrieri totale"})]})]})})}),s.jsx(st,{children:s.jsx(ot,{className:"pt-4 pb-3 px-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-green-500/10",children:s.jsx(oa,{size:20,className:"text-green-500"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-2xl font-bold",children:[y.completionRate,"%"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Rată completare"})]})]})})}),s.jsx(st,{children:s.jsx(ot,{className:"pt-4 pb-3 px-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-amber-500/10",children:s.jsx(Ky,{size:20,className:"text-amber-500"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-2xl font-bold",children:[y.avgQuizScore,"%"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Scor mediu quiz"})]})]})})})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-3",children:s.jsx(Ht,{className:"text-base",children:"Statistici per curs"})}),s.jsx(ot,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Curs"}),s.jsx(Me,{className:"text-center",children:"Înscriși"}),s.jsx(Me,{className:"text-center",children:"Completat"}),s.jsx(Me,{className:"text-center",children:"Rată"}
2161),s.jsx(Me,{className:"text-center",children:"Quiz-uri date"}),s.jsx(Me,{className:"text-center",children:"Quiz-uri trecute"})]})}),s.jsxs(In,{children:[a.map(b=>{const v=x.get(b.id);if(!v||v.enrolled===0)return null;const j=v.enrolled>0?Math.round(v.completed/v.enrolled*100):0;return s.jsxs(Nt,{children:[s.jsx(Oe,{className:"font-medium max-w-[250px] truncate",children:b.title}),s.jsx(Oe,{className:"text-center",children:v.enrolled}),s.jsx(Oe,{className:"text-center",children:v.completed}),s.jsx(Oe,{className:"text-center",children:s.jsxs(at,{variant:j>=50?"default":"secondary",children:[j,"%"]})}),s.jsx(Oe,{className:"text-center",children:v.quizzes}),s.jsx(Oe,{className:"text-center",children:v.passed})]},b.id)}),a.every(b=>{var v;return!((v=x.get(b.id))!=null&&v.enrolled)})&&s.jsx(Nt,{children:s.jsx(Oe,{colSpan:6,className:"text-center text-muted-foreground py-8",children:"Nu există înscrieri încă"})})]})]})})})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-sm",children:[s.jsx(ul,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută cursant...",value:e,onChange:b=>r(b.target.value),className:"pl-9"})]}),s.jsxs(Cn,{value:n,onValueChange:i,children:[s.jsx(yn,{className:"w-[220px]",children:s.jsx(Nn,{placeholder:"Toate cursurile"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:"Toate cursurile"}),a.map(b=>s.jsx(_t,{value:b.id,children:b.title},b.id))]})]})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-3",children:s.jsxs(Ht,{className:"text-base",children:["Detalii cursanți (",g.length,")"]})}),s.jsx(ot,{children:l?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Se încarcă..."}):g.length===0?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Nu s-au găsit cursanți"}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Cursant"}),s.jsx(Me,{className:"text-center",children:"Cursuri"}),s.jsx(Me,{className:"text-center",children:"Completate"}),s.jsx(Me,{className:"text-center",children:"Lecții parcurse"}),s.jsx(Me,{className:"text-center",children:"Quiz-uri"}),s.jsx(Me,{className:"text-center",children:"Scor quiz"}),s.jsx(Me,{className:"text-center",children:"EduCoins quiz"}),s.jsx(Me,{className:"text-center",children:"Timp mediu"}),s.jsx(Me,{className:"text-center",children:"Ultima activitate"})]})}),s.jsx(In,{children:g.map(b=>{const v=b.totalQuizQuestions>0?Math.round(b.totalQuizScore/b.totalQuizQuestions*100):null;return s.jsxs(Nt,{children:[s.jsx(Oe,{children:s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:b.name}),s.jsx("p",{className:"text-xs text-muted-foreground",children:b.email})]})}),s.jsx(Oe,{className:"text-center",children:s.jsx(at,{variant:"outline",children:b.enrollments.length})}),s.jsx(Oe,{className:"text-center",children:s.jsxs("div",{className:"flex items-center justify-center gap-1",children:[b.completedCourses>0&&s.jsxs("span",{className:"flex items-center gap-0.5 text-green-600",children:[s.jsx(hn,{size:14})," ",b.completedCourses]}),b.inProgressCourses>0&&s.jsxs("span",{className:"flex items-center gap-0.5 text-amber-500 ml-1",children:[s.jsx(ki,{size:14})," ",b.inProgressCourses]})]})}),s.jsx(Oe,{className:"text-center",children:b.lessonsCompleted}),s.jsx(Oe,{className:"text-center",children:s.jsxs("span",{className:"text-sm",children:[b.passedQuizzes,"/",b.totalQuizzes]})}),s.jsx(Oe,{className:"text-center",children:v!==null?s.jsxs(at,{variant:v>=70?"default":"secondary",children:[v,"%"]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"—"})}),s.jsx(Oe,{className:"text-center",children:b.eduCoinsFromQuizzes>0?s.jsxs("span",{className:"text-sm font-medium text-amber-600",children:[b.eduCoinsFromQuizzes," 🪙"]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"—"})}),s.jsx(Oe,{className:"text-center",children:b.avgCompletionDays!==null?s.jsxs("span",{className:"text-sm",children:[b.avgCompletionDays," zile"]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"în curs"})}),s.jsx(Oe,{className:"text-center",children:b.lastActivity?s.jsx("span",{className:"text-xs text-muted-foreground",children:al(new Date(b.lastActivity),"dd MMM yyyy",{locale:M
2161d})}):s.jsx("span",{className:"text-xs text-muted-foreground",children:b.firstEnrollment?al(new Date(b.firstEnrollment),"dd MMM yyyy",{locale:Md}):"—"})})]},b.userId)})})]})})})]})]})})}const sl=WQ,Ab=Wye,U0t=qQ,$0t=V_,fve=w.forwardRef(({className:e,...r},n)=>s.jsx(U_,{ref:n,className:it("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}));fve.displayName=U_.displayName;const Po=w.forwardRef(({className:e,children:r,...n},i)=>s.jsxs(U0t,{children:[s.jsx(fve,{}),s.jsxs($_,{ref:i,className:it("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[r,s.jsxs(V_,{className:"absolute right-4 top-4 roun
2161ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(Uc,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Po.displayName=$_.displayName;const ol=({className:e,...r})=>s.jsx("div",{className:it("flex flex-col space-y-1.5 text-center sm:text-left",e),...r});ol.displayName="DialogHeader";const gb=({className:e,...r})=>s.jsx("div",{className:it("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});gb.displayName="DialogFooter";const ll=w.forwardRef(({className:e,...r},n)=>s.jsx(Q_,{ref:n,className:it("text-lg font-semibold leading-none tracking-tight",e),...r}));ll.displayName=Q_.displayName;const mve=w.forwardRef(({className:e,...r},n)=>s.jsx(H_,{ref:n,className:it("text-sm text-muted-foreground",e),...r}));mve.displayName=H_.displayName;function Q0t({lessonId:e,lessonTitle:r,lessonContent:n,topic:i="web3"}){return s.jsx(I$,{lessonId:e,lessonTitle:r,lessonContent:n,topic:i})}const H0t="modulepreload",V0t=function(e){return"/"+e},SZ={},qw=function(r,n,i){let a=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));a=Promise.allSettled(n.map(u=>{if(u=V0t(u),u in SZ)return;SZ[u]=!0;const d=u.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${h}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":H0t,d||(f.as="script"),f.crossOrigin="",f.href=u,c&&f.setAttribute("nonce",c),document.head.appendChild(f),d)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return a.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return r().catch(o)})},W0t=/\[SLIDE(?:\s+([^\]]+))?\]/gi,pve=e=>{var i,a;if(!e)return null;const r=(a=(i=e.split("/").pop())==null?void 0:i.split("?")[0])==null?void 0:a.trim();if(!r)return null;const n=r.replace(/^["']|["']$/g,"");try{return decodeURIComponent(n)}catch{return n}},kZ=e=>e.trim().split(/\s+/).filter(Boolean).length,q0t=e=>{const r=e.replace(/!\[.*?\]\(.*?\)/g,"").replace(/\[GRAFIC[ĂA]?:[^\]]*\]/gi,"").replace(/\[IMAGINE:[^\]]*\]/gi,"").replace(/\[DIAGRAM[ĂA]?:[^\]]*\]/gi,"").replace(/\[INFOGRAFIC:[^\]]*\]/gi,"").replace(/\[SCREENSHOT:[^\]]*\]/gi,"").replace(/\[VISUAL:[^\]]*\]/gi,"").replace(/#{1,6}\s/g,"").replace(/\*\*/g,"").replace(/\*/g,""),n=Array.from(r.matchAll(W0t));if(n.length===0)return[];let i=0,a=0;const o=n.map((c,u)=>{const d=c.index??0;return i+=kZ(r.slice(a,d)),a=d+c[0].length,{fileName:pve(c[1]??null),index:u,wordsBefore:i}}),l=i+kZ(r.slice(a));return l===0?o.map((c,u)=>({fileName:c.fileName,index:c.index,startRatio:n.length===1?0:u/n.length,endRatio:n.length===1?1:(u+1)/n.length})):o.map((c,u)=>({fileName:c.fileName,index:c.index,startRatio:c.wordsBefore/l,endRatio:u<o.length-1?o[u+1].wordsBefore/l:1}))};function K0t({lessonId:e,lessonTitle:r}){const{toast:n}=wn(),i=Kr(),[a,o]=w.useState(!1),[l,c]=w.useState(""),u=w.useRef(null),d=w.useRef(null),[h,f]=w.useState(null),[p,m]=w.useState(1),[A,g]=w.useState(!1),[y,x]=w.useState(!1),[b,v]=w.useState(!1),[j,_]=w.useState(1),[C,N]=w.useState(0),[S,E]=w.useState(0),[O,B]=w.useState(!1);w.useEffect(()=>{if(!O)return;const X=oe=>{if(!d.current||!u.current||!S)return;const ce=d.current.getBoundingClientRect(),ye=Math.max(0,Math.min(1,(oe.clientX-ce.left)/ce.width));u.current.currentTime=ye*S},de=()=>B(!1);return window.addEventListener("mousemove",X),window.addEventListener("mouseup",de),()=>{window.removeEventListener("mousemove",X),window.removeEventListener("mouseup",de)}},[O,S]);const T=w.useCallback(()=>{u.current&&(u.current.pause(),u.current.removeAttribute("src"),u.current.load(),u.current=null,f(null),x(!1),N(0),E(0))},[]),F=async()=>
2161{if(u.current&&h){u.current.muted=b,u.current.volume=j,y?(u.current.pause(),x(!1)):(await u.current.play(),x(!0));return}g(!0);try{T();const{data:X,error:de}=await G.from("course_lessons").select("video_url").eq("id",e).single();if(console.log("[SlideUploader] Lesson data:",X,"Error:",de),!(X!=null&&X.video_url)){n({title:"Nu există audio",description:"Generează mai întâi narația audio.",variant:"destructive"}),g(!1);return}let oe=X.video_url;if(oe.startsWith("lesson-audio:")){const{resolveLessonAudioUrl:ge}=await qw(async()=>{const{resolveLessonAudioUrl:Be}=await Promise.resolve().then(()=>THe);return{resolveLessonAudioUrl:Be}},void 0);oe=await ge(e,oe)}const ce=Oh(oe);console.log("[SlideUploader] Loading audio from:",ce);const ye=new Audio(ce);ye.crossOrigin="anonymous",ye.preload="auto",ye.muted=!1,ye.defaultMuted=!1,ye.volume=1,v(!1),_(1),f(ce),u.current=ye,ye.addEventListener("loadedmetadata",()=>{console.log("[SlideUploader] Audio loaded, duration:",ye.duration),ye.duration&&isFinite(ye.duration)&&E(ye.duration)}),ye.addEventListener("timeupdate",()=>N(ye.currentTime)),ye.addEventListener("ended",()=>x(!1)),ye.addEventListener("error",()=>{var ge;console.error("[SlideUploader] Audio error event:",ye.error),n({title:"Eroare audio",description:`Nu se poate reda: ${((ge=ye.error)==null?void 0:ge.message)||"eroare necunoscută"}`,variant:"destructive"}),g(!1)}),ye.addEventListener("canplaythrough",async()=>{try{ye.muted=!1,ye.volume=1,ye.playbackRate=p,await ye.play(),console.log("[SlideUploader] Audio playing!"),x(!0),g(!1)}catch(ge){console.error("[SlideUploader] Play error:",ge),n({title:"Eroare redare",description:ge.message,variant:"destructive"}),g(!1)}},{once:!0}),ye.load()}catch(X){console.error("[SlideUploader] General error:",X),n({title:"Eroare audio",description:X.message,variant:"destructive"}),g(!1)}},I=()=>{u.current&&(u.current.pause(),u.current.currentTime=0,u.current.muted=b,u.current.volume=j,x(!1),N(0))},D=()=>{const X=!b;v(X),u.current&&(u.current.muted=X)};w.useEffect(()=>()=>{T()},[T]),w.useEffect(()=>{T()},[e,T]);const{data:L=[],isLoading:V}=Xe({queryKey:["lesson-slides",e],queryFn:async()=>{const{data:X,error:de}=await G.from("lesson_slides").select("*").eq("lesson_id",e).order("sort_order");if(de)throw de;return X||[]}}),U=w.useCallback(async X=>{const de=X.target.files;if(!de||de.length===0)return;o(!0);const oe=Array.from(de).sort((ge,Be)=>ge.name.localeCompare(Be.name,void 0,{numeric:!0}));let ce=0;const ye=L.length;for(const ge of oe){c(`${ce+1}/${oe.length}: ${ge.name}`);try{const Be=ge.name.split(".").pop()||"png",Ve=`slides/${e}/${Date.now()}-${ce}.${Be}`,{error:te}=await G.storage.from("course-graphics").upload(Ve,ge,{contentType:ge.type});if(te)throw te;const{data:{publicUrl:xe}}=G.storage.from("course-graphics").getPublicUrl(Ve),{error:We}=await G.from("lesson_slides").insert({lesson_id:e,image_url:xe,sort_order:ye+ce});if(We)throw We;ce++}catch(Be){console.error("Upload error:",Be),n({title:"Eroare upload",description:Be.message,variant:"destructive"})}}i.invalidateQueries({queryKey:["lesson-slides",e]}),i.invalidateQueries({queryKey:["lesson-slides-player",e]}),n({title:`${ce} slide-uri încărcate!`}),o(!1),c(""),X.target.value=""},[e,L.length,i,n]),Q=async X=>{const{error:de}=await G.from("lesson_slides").delete().eq("id",X);de?n({title:"Eroare",description:de.message,variant:"destructive"}):(i.invalidateQueries({queryKey:["lesson-slides",e]}),i.invalidateQueries({queryKey:["lesson-slides-player",e]}))},[$,q]=w.useState(!1),M=async()=>{if(L.length!==0){q(!0);try{const{data:X}=await G.from("course_lessons").select("content, estimated_minutes").eq("id",e).single();if(!(X!=null&&X.content)){n({title:"Lipsă conținut",description:"Lecția nu are conținut text.",variant:"destructive"}),q(!1);return}const de=q0t(X.content);if(de.length===0){n({title:"Lipsă tag-uri [SLIDE]",description:"Adaugă [SLIDE] în textul lecției unde vrei să se schimbe slide-ul.",variant:"destructive"}),q(!1);return}let oe=S;(!oe||oe===0)&&(oe=(X.estimated_minutes||5)*60);const ce=[...L].sort((ze,we)=>ze.sort_order-we.sort_order),ye=new Map(ce.map(ze=>{const we=pve(ze.image_url);return we?[we.toLowerCase(),ze]:null}
2161).filter(Boolean)),Ve=(de.some(ze=>ze.fileName)?de.map(ze=>({marker:ze,slide:ze.fileName?ye.get(ze.fileName.toLowerCase())??null:ce[ze.index]??null})):ce.map((ze,we)=>({marker:de[we]??null,slide:ze}))).filter(ze=>!!(ze.marker&&ze.slide));if(Ve.length===0){n({title:"Nicio potrivire",description:"Tag-urile [SLIDE filename] nu corespund cu imaginile încărcate.",variant:"destructive"}),q(!1);return}const xe=(await Promise.all(Ve.map(({marker:ze,slide:we})=>{const J=ze.startRatio*oe,he=ze.endRatio*oe;return G.from("lesson_slides").update({timestamp_start:Math.round(J*10)/10,timestamp_end:Math.round(he*10)/10}).eq("id",we.id)}))).find(ze=>ze.error);if(xe!=null&&xe.error)throw xe.error;i.invalidateQueries({queryKey:["lesson-slides",e]}),i.invalidateQueries({queryKey:["lesson-slides-player",e]});const We=de.filter(ze=>ze.fileName&&!ye.has(ze.fileName.toLowerCase()));n({title:`✅ ${Ve.length} slide-uri sincronizate`,description:We.length>0?`${We.length} tag-uri nu au găsit imagine corespondentă.`:`Mapare exactă după [SLIDE filename], durată audio: ${Math.round(oe)}s`})}catch(X){n({title:"Eroare sync",description:X.message,variant:"destructive"})}q(!1)}},z=async()=>{if(!confirm(`Ștergi toate cele ${L.length} slide-uri pentru "${r}"?`))return;const{error:X}=await G.from("lesson_slides").delete().eq("lesson_id",e);X?n({title:"Eroare",description:X.message,variant:"destructive"}):(i.invalidateQueries({queryKey:["lesson-slides",e]}),i.invalidateQueries({queryKey:["lesson-slides-player",e]}),n({title:"Slide-uri șterse"}))},K=async(X,de)=>{const oe=de===""?null:parseFloat(de),{error:ce}=await G.from("lesson_slides").update({timestamp_start:oe}).eq("id",X);ce?n({title:"Eroare",description:ce.message,variant:"destructive"}):(i.invalidateQueries({queryKey:["lesson-slides",e]}),i.invalidateQueries({queryKey:["lesson-slides-player",e]}))},ne=X=>{if(X==null)return"";const de=Math.floor(X/60),oe=Math.floor(X%60),ce=Math.floor(X%1*10);return`${de}:${oe.toString().padStart(2,"0")}.${ce}`},ie=async X=>{const de=Math.round(C*10)/10;await K(X,de.toString())};return s.jsxs("div",{className:"border border-border rounded-lg p-4 bg-card/50",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(il,{size:16,className:"text-primary"}),s.jsx("span",{className:"text-sm font-medium",children:"Slide-uri Prezentare"}),L.length>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",L.length," slide-uri)"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[L.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs(me,{variant:"outline",size:"sm",onClick:M,disabled:$,className:"text-xs",children:[$?s.jsx(rt,{size:12,className:"animate-spin"}):s.jsx(T2,{size:12}),"Auto-sync [SLIDE]"]}),s.jsxs(me,{variant:"outline",size:"sm",className:"text-xs",onClick:()=>{const X=L.map((de,oe)=>{var ye;return`[SLIDE ${((ye=de.image_url.split("/").pop())==null?void 0:ye.split("?")[0])||`slide-${oe+1}`}]`}).join(`
2162`);navigator.clipboard.writeText(X),n({title:"Copiat!",description:`${L.length} tag-uri [SLIDE] copiate`})},children:[s.jsx(Jh,{size:12})," Copiază toate [SLIDE]"]}),s.jsxs(me,{variant:"ghost",size:"sm",onClick:z,className:"text-destructive text-xs",children:[s.jsx(Xr,{size:12})," Șterge tot"]})]}),s.jsxs("label",{className:"cursor-pointer",children:[s.jsx(me,{variant:"outline",size:"sm",asChild:!0,disabled:a,children:s.jsxs("span",{children:[a?s.jsx(rt,{size:12,className:"animate-spin"}):s.jsx(h4,{size:12}),a?l:"Încarcă PNG-uri"]})}),s.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,onChange:U,className:"hidden",disabled:a})]})]})]}),L.length>0&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4 p-3 rounded-lg bg-muted/50 border border-border/50",children:[s.jsxs(me,{variant:y?"secondary":"default",size:"sm",onClick:F,disabled:A,className:"shrink-0",children:[A?s.jsx(rt,{size:14,className:"animate-spin"}):y?s.jsx(Fd,{size:14}):s.jsx(ya,{size:14}),y?"Pauză":"Redă audio"]}),u.current&&s.jsxs(s.Fragment,{children:[s.jsxs(me,{variant:"ghost",size:"sm",onClick:I,className:"shrink-0",children:[s.jsx(YL,{size:14})," Stop"]}),s.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>{u.current&&S>0&&(u.current.currentTime=Math.max(0,u.current.currentTime-10))},className:"shrink-0 px-2",children:[s.jsx(dle,{size:14})," 10s"]}),s.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>{u.current&&S>0&&(u.current.currentTime=Math.min(S,u.current.currentTime+10))},className:"shrink-0 px-2",children:[s.jsx(hle,{size:14})," 10s"]}),s.jsxs(me,{variant:p!==1?"secondary":"ghost",size:"sm",onClick:()=>{const X=[1,1.5,2,4],de=X[(X.indexOf(p)+1)%X.length];m(de),u.current&&(u.current.playbackRate=de)},className:"shrink-0 px-2 font-mono min-w-[40px]",title:"Viteză redare",children:[p,"x"]}),s.jsxs(me,{variant:"ghost",size:"sm",onClick:D,className:"shrink-0",children:[b?s.jsx(zg,{size:14}):s.jsx(wo,{size:14}),b?"Mut":"Sunet"]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Vol"}),s.jsx(qe,{type:"range",min:"0",max:"1",step:"0.05",value:j,onChange:X=>{const de=Number(X.target.value);_(de),u.current&&(u.current.volume=de,de>0&&b&&(u.current.muted=!1,v(!1)))},className:"w-24 h-7 p-0 border-0 bg-transparent"})]}),s.jsxs("div",{ref:d,className:"relative flex-1 min-w-[180px] h-3 hover:h-4 bg-muted rounded-full cursor-pointer transition-all duration-150 group",onMouseDown:X=>{if(!u.current||!S)return;X.preventDefault(),B(!0);const de=X.currentTarget.getBoundingClientRect(),oe=Math.max(0,Math.min(1,(X.clientX-de.left)/de.width));u.current.currentTime=oe*S},children:[s.jsx("div",{className:"h-full bg-primary rounded-full transition-[width] duration-75",style:{width:S>0?`${C/S*100}%`:"0%"}}),S>0&&s.jsx("div",{className:"absolute top-1/2 -translate-y-1/2 w-4 h-4 bg-primary rounded-full shadow-md border-2 border-background opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",style:{left:`calc(${C/S*100}% - 8px)`}})]}),s.jsx("span",{className:"text-sm font-mono font-semibold text-primary tabular-nums whitespace-nowrap",children:ne(C)}),s.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums whitespace-nowrap",children:["/ ",ne(S)]})]})]}),V?s.jsx("div",{className:"flex justify-center py-4",children:s.jsx(rt,{size:16,className:"animate-spin text-muted-foreground"})}):L.length===0?s.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:"Niciun slide încărcat. Exportă slide-urile din Gamma ca PNG și încarcă-le aici."}):s.jsx("div",{className:"space-y-3",children:L.map((X,de)=>s.jsxs("div",{className:"flex items-start gap-3 p-2 rounded-lg border border-border/50 bg-background/50",children:[s.jsxs("div",{className:"relative shrink-0 w-28 aspect-[16/10] rounded overflow-hidden border border-border/30",children:[s.jsx("img",{src:X.image_url,alt:`Slide ${de+1}`,className:"w-full h-full object-cover"}),s.jsx("span",{className:"absolute top-0.5 left-0.5 text-[10px] font-mono bg-black/60 text-white px-1 rounded",children:de+1})]}),s.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[s.jsx("div",{className:"flex items-center gap-1.5",children:(()=>{var ye;const oe=((ye=X.image_url.split("/").pop())==null?void 0:ye.split("?")[0])||`slide-${de+1}`,ce=`[SLIDE ${oe}]`;return s.jsxs(s.Fragment,{children:[s.jsx("code",{className:"text-[10px] text-muted-foreground font-mono truncate max-w-[180px]",children:oe}),s.jsxs(me,{variant:"ghost",size:"sm",className:"h-5 px-1.5 text-[10px] font-mono text-primary hover:text-primary-foreground hover:bg-primary shrink-0",onClick:()=>{navigator.clipboard.writeText(ce),n({title:"Copiat!",description:`${ce} copiat în clipboard`})}
2162,children:[s.jsx(Jh,{size:10,className:"mr-0.5"}),"[SLIDE]"]})]})})()}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx(ki,{size:14,className:"text-muted-foreground shrink-0"}),s.jsx("div",{className:"flex items-center gap-1",children:s.jsx(qe,{type:"number",step:"0.1",min:"0",placeholder:"Start (s)",defaultValue:X.timestamp_start??"",onBlur:oe=>K(X.id,oe.target.value),className:"w-24 h-7 text-xs"})}),u.current&&s.jsxs(me,{variant:"outline",size:"sm",className:"h-6 px-2 text-[10px]",onClick:()=>ie(X.id),title:"Setează Start la timpul curent din audio",children:["📌 ",ne(C)]}),X.timestamp_start!=null&&s.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["Pornește la ",ne(X.timestamp_start)]})]})]}),s.jsx(me,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive shrink-0",onClick:()=>Q(X.id),children:s.jsx(Xr,{size:12})})]},X.id))})]})}function G0t({courseId:e,modules:r}){const{toast:n}=wn(),i=Kr(),[a,o]=w.useState(null),{data:l=[],isLoading:c}=Xe({queryKey:["admin-quizzes",e],queryFn:async()=>{const p=r.map(g=>g.id);if(!p.length)return[];const{data:m,error:A}=await G.from("module_quizzes").select("*").in("module_id",p).order("sort_order");if(A)throw A;return m||[]},enabled:r.length>0}),u=p=>l.filter(m=>m.module_id===p),d=async p=>{o(p);try{const m=u(p),{error:A}=await G.from("module_quizzes").insert({module_id:p,question:"Întrebare nouă",options:["Opțiunea A","Opțiunea B","Opțiunea C","Opțiunea D"],correct_index:0,sort_order:m.length});if(A)throw A;i.invalidateQueries({queryKey:["admin-quizzes",e]})}catch(m){n({title:"Eroare",description:m.message,variant:"destructive"})}finally{o(null)}},h=async(p,m)=>{const{error:A}=await G.from("module_quizzes").update(m).eq("id",p);A?n({title:"Eroare",description:A.message,variant:"destructive"}):i.invalidateQueries({queryKey:["admin-quizzes",e]})},f=async p=>{if(!confirm("Sigur vrei să ștergi această întrebare?"))return;const{error:m}=await G.from("module_quizzes").delete().eq("id",p);m?n({title:"Eroare",description:m.message,variant:"destructive"}):(i.invalidateQueries({queryKey:["admin-quizzes",e]}),n({title:"Întrebare ștearsă"}))};return c?s.jsx(st,{children:s.jsx(ot,{className:"py-8 flex justify-center",children:s.jsx(rt,{className:"animate-spin text-primary",size:24})})}):s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"text-lg flex items-center gap-2",children:[s.jsx(ms,{size:20,className:"text-primary"}),"Quiz-uri per modul"]})}),s.jsx(ot,{children:r.length===0?s.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"Adaugă mai întâi module pentru a gestiona quiz-urile."}):s.jsx(lo,{type:"multiple",className:"space-y-3",children:r.map((p,m)=>{const A=u(p.id);return s.jsxs(Os,{value:`quiz-${p.id}`,className:"border border-border rounded-lg px-4 bg-card/30",children:[s.jsx(Ls,{className:"hover:no-underline",children:s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsxs("span",{className:"text-xs text-muted-foreground font-mono shrink-0",children:["M",m+1]}),s.jsx("span",{className:"font-medium truncate",children:p.title}),s.jsxs("span",{className:"text-xs text-muted-foreground ml-auto mr-2 shrink-0",children:[A.length," întrebări"]})]})}),s.jsxs(Rs,{className:"pt-2 pb-4 space-y-3",children:[A.map((g,y)=>s.jsx(X0t,{question:g,index:y,onUpdate:h,onDelete:f},g.id)),s.jsxs(me,{variant:"outline",size:"sm",onClick:()=>d(p.id),disabled:a===p.id,className:"w-full",children:[a===p.id?s.jsx(rt,{size:14,className:"animate-spin"}):s.jsx(Qn,{size:14}),"Adaugă întrebare"]})]})]},p.id)})})})]})}function X0t({question:e,index:r,onUpdate:n,onDelete:i}){const a=Array.isArray(e.options)?e.options:[],o=(u,d)=>{const h=[...a];h[u]=d,n(e.id,{options:h})},l=()=>{const u=[...a,`Opțiunea ${String.fromCharCode(65+a.length)}`];n(e.id,{options:u})},c=u=>{if(a.length<=2)return;const d=a.filter((f,p)=>p!==u);e.correct_index>=u?Math.max(0,e.correct_index-(e.correct_index===u,0)):e.correct_index;const h=u===e.correct_index?0:u<e.correct_index?e.correct_index-1:e.correct_index;
2162n(e.id,{options:d,correct_index:Math.min(h,d.length-1)})};return s.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30 border border-border/50 space-y-2",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsxs("span",{className:"text-xs text-muted-foreground font-mono mt-2.5 shrink-0",children:["Q",r+1]}),s.jsx(qe,{defaultValue:e.question,onBlur:u=>{u.target.value!==e.question&&n(e.id,{question:u.target.value})},placeholder:"Întrebarea...",className:"flex-1 font-medium"}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>i(e.id),className:"text-destructive hover:text-destructive shrink-0",children:s.jsx(Xr,{size:14})})]}),s.jsxs("div",{className:"ml-8 space-y-1.5",children:[a.map((u,d)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>n(e.id,{correct_index:d}),className:it("w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold shrink-0 transition-colors border",d===e.correct_index?"bg-primary text-primary-foreground border-primary":"bg-muted text-muted-foreground border-border hover:border-primary/50"),title:d===e.correct_index?"Răspuns corect":"Setează ca răspuns corect",children:d===e.correct_index?s.jsx(hn,{size:12}):String.fromCharCode(65+d)}),s.jsx(qe,{defaultValue:u,onBlur:h=>{h.target.value!==u&&o(d,h.target.value)},className:"text-sm flex-1",placeholder:`Opțiunea ${String.fromCharCode(65+d)}`}),a.length>2&&s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>c(d),className:"text-muted-foreground hover:text-destructive shrink-0 h-7 w-7",children:s.jsx(Xr,{size:12})})]},d)),a.length<6&&s.jsxs(me,{variant:"ghost",size:"sm",onClick:l,className:"text-xs text-muted-foreground",children:[s.jsx(Qn,{size:12})," Adaugă opțiune"]})]})]})}const Y0t=/\[SLIDE(?:\s+([^\]]+))?\]/gi,Ave=e=>{var i,a;if(!e)return null;const r=(a=(i=e.split("/").pop())==null?void 0:i.split("?")[0])==null?void 0:a.trim();if(!r)return null;const n=r.replace(/^["']|["']$/g,"");try{return decodeURIComponent(n)}catch{return n}},EZ=e=>e.trim().split(/\s+/).filter(Boolean).length,J0t=e=>{const r=e.replace(/!\[.*?\]\(.*?\)/g,"").replace(/\[GRAFIC[ĂA]?:[^\]]*\]/gi,"").replace(/\[IMAGINE:[^\]]*\]/gi,"").replace(/\[DIAGRAM[ĂA]?:[^\]]*\]/gi,"").replace(/\[INFOGRAFIC:[^\]]*\]/gi,"").replace(/\[SCREENSHOT:[^\]]*\]/gi,"").replace(/\[VISUAL:[^\]]*\]/gi,"").replace(/#{1,6}\s/g,"").replace(/\*\*/g,"").replace(/\*/g,""),n=Array.from(r.matchAll(Y0t));if(n.length===0)return[];let i=0,a=0;const o=n.map((c,u)=>{const d=c.index??0;return i+=EZ(r.slice(a,d)),a=d+c[0].length,{fileName:Ave(c[1]??null),index:u,wordsBefore:i}}),l=i+EZ(r.slice(a));return l===0?o.map((c,u)=>({fileName:c.fileName,index:c.index,startRatio:n.length===1?0:u/n.length,endRatio:n.length===1?1:(u+1)/n.length})):o.map((c,u)=>({fileName:c.fileName,index:c.index,startRatio:c.wordsBefore/l,endRatio:u<o.length-1?o[u+1].wordsBefore/l:1}))};function Z0t({courseId:e,script:r,audioUrl:n,onScriptChange:i}){const{toast:a}=wn(),o=Kr(),[l,c]=w.useState(!1),[u,d]=w.useState(!1),[h,f]=w.useState(!1),p=async()=>{if(!(r.trim()&&!confirm("Scriptul existent va fi înlocuit cu unul generat AI. Continui?"))){f(!0);try{const{data:we,error:J}=await G.functions.invoke("generate-presentation-script",{body:{courseId:e}});if(J)throw J;if(we!=null&&we.error)throw new Error(we.error);we!=null&&we.script&&(i(we.script),a({title:"✨ Script generat!",description:"Script promoțional creat cu AI. Revizuiește și ajustează."}))}catch(we){a({title:"Eroare generare script",description:we.message,variant:"destructive"})}finally{f(!1)}}},m=w.useRef(null),A=w.useRef(null),g=w.useRef(!1),[y,x]=w.useState(n),[b,v]=w.useState(!1),[j,_]=w.useState(!1),[C,N]=w.useState(0),[S,E]=w.useState(0),[O,B]=w.useState(!1),[T,F]=w.useState(1),[I,D]=w.useState(!1),[L,V]=w.useState(""),[U,Q]=w.useState(!1);w.useEffect(()=>{x(n)},[n]);const $=w.useCallback(()=>{m.current&&(m.current.pause(),m.current.removeAttribute("src"),m.current.load(),m.current=null,x(null),_(!1),N(0),E(0),B(!1))},[]);w.useEffect(()=>()=>{$()},[$]);const q=w.useCallback(we=>{if(!A.current||!S)return 0;const J=A.current.getBoundingClientRect();return Math.max(0,Math.min(1,(we-J.left)/J.width))*S},[S]),M=w.useCallback(we=>{const J=m.current;if(!J)return;const he=S>0?S:Number.isFinite(J.duration)?J.duration:0,je=he>0?Math.max(0,Math.min(he,we)):Math.max(0,we);J.currentTime=je,N(je)},[S]),z=w.useCallback(async()=>{const we=m.current;if(!(!we||!g.current))try{await we.play(),_(!0)}catch(J){a({title:"Eroare redare",description:J.message,variant:"destructive"})}},[a]);w.useEffect(()=>{if(!O)return;const we=he=>{M(q(he.clientX))},J=he=>{M(q(he.clientX)),B(!1),z()};return window.addEventListener("mousemove",we),window.addEventListener("mouseup",J),()=>{window.removeEventListener("mousemove",we),window.removeEventListener("mouseup",J)}
2162},[M,q,O,z]);const K=w.useCallback(async we=>{const J=m.current;if(!J)return;const he=!J.paused&&!J.ended;g.current=he,he&&(J.pause(),_(!1)),M(J.currentTime+we),await z()},[M,z]),ne=w.useCallback(we=>{const J=m.current;!J||!S||(we.preventDefault(),g.current=!J.paused&&!J.ended,g.current&&(J.pause(),_(!1)),M(q(we.clientX)),B(!0))},[M,S,q]),{data:ie=[],isLoading:X}=Xe({queryKey:["presentation-slides",e],queryFn:async()=>{const{data:we,error:J}=await G.from("course_presentation_slides").select("*").eq("course_id",e).order("sort_order");if(J)throw J;return we||[]}}),de=async()=>{if(!r.trim()){a({title:"Fără script",description:"Adaugă mai întâi textul de prezentare.",variant:"destructive"});return}const we=!!y;if(!(we&&!confirm("Regenerezi audio-ul de prezentare? Cel vechi va fi înlocuit."))){d(!0);try{await G.from("courses").update({video_presentation_script:r}).eq("id",e);const{data:J,error:he}=await G.functions.invoke("presentation-tts",{body:{courseId:e,forceRegenerate:we}});if(he)throw he;if(J!=null&&J.error)throw new Error(J.error);x(J.audioUrl),o.invalidateQueries({queryKey:["admin-course",e]}),a({title:"Audio generat!",description:`Durată estimată: ${J.durationSeconds}s`})}catch(J){a({title:"Eroare audio",description:J.message,variant:"destructive"})}finally{d(!1)}}},oe=async()=>{const we=y||n;if(!we){a({title:"Nu există audio",description:"Generează mai întâi narația audio.",variant:"destructive"});return}if(m.current){j?(m.current.pause(),_(!1)):(await m.current.play(),_(!0));return}v(!0);try{const J=new Audio(Oh(we));J.crossOrigin="anonymous",J.preload="auto",J.volume=1,m.current=J,J.addEventListener("loadedmetadata",()=>{J.duration&&isFinite(J.duration)&&E(J.duration)}),J.addEventListener("timeupdate",()=>{O||N(J.currentTime)}),J.addEventListener("ended",()=>_(!1)),J.addEventListener("canplaythrough",async()=>{try{J.playbackRate=T,await J.play(),_(!0),v(!1)}catch(he){a({title:"Eroare redare",description:he.message,variant:"destructive"}),v(!1)}},{once:!0}),J.load()}catch(J){a({title:"Eroare audio",description:J.message,variant:"destructive"}),v(!1)}},ce=()=>{m.current&&(m.current.pause(),m.current.currentTime=0,_(!1),N(0))},ye=we=>{const J=Math.floor(we/60),he=Math.floor(we%60);return`${J}:${he.toString().padStart(2,"0")}`},ge=w.useCallback(async we=>{const J=we.target.files;if(!J||J.length===0)return;D(!0);const he=Array.from(J).sort((Pe,Ie)=>Pe.name.localeCompare(Ie.name,void 0,{numeric:!0}));let je=0;const ve=ie.length;for(const Pe of he){V(`${je+1}/${he.length}: ${Pe.name}`);try{const Ie=Pe.name.split(".").pop()||"png",ue=`slides/presentation-${e}/${Date.now()}-${je}.${Ie}`,{error:Se}=await G.storage.from("course-graphics").upload(ue,Pe,{contentType:Pe.type});if(Se)throw Se;const{data:{publicUrl:He}}=G.storage.from("course-graphics").getPublicUrl(ue),{error:Qe}=await G.from("course_presentation_slides").insert({course_id:e,image_url:He,sort_order:ve+je});if(Qe)throw Qe;je++}catch(Ie){a({title:"Eroare upload",description:Ie.message,variant:"destructive"})}}o.invalidateQueries({queryKey:["presentation-slides",e]}),a({title:`${je} slide-uri încărcate!`}),D(!1),V(""),we.target.value=""},[e,ie.length,o,a]),Be=async we=>{const{error:J}=await G.from("course_presentation_slides").delete().eq("id",we);J||o.invalidateQueries({queryKey:["presentation-slides",e]})},Ve=async()=>{if(!confirm(`Ștergi toate cele ${ie.length} slide-uri de prezentare?`))return;const{error:we}=await G.from("course_presentation_slides").delete().eq("course_id",e);we||(o.invalidateQueries({queryKey:["presentation-slides",e]}),a({title:"Slide-uri șterse"}))},te=async(we,J)=>{const he=J===""?null:parseFloat(J);await G.from("course_presentation_slides").update({timestamp_start:he}).eq("id",we),o.invalidateQueries({queryKey:["presentation-slides",e]})},xe=async we=>{const J=Math.round(C*10)/10;await te(we,J.toString())},We=async()=>{if(!(ie.length===0||!r)){Q(!0);try{const we=J0t(r);if(we.length===0){a({title:"Lipsă tag-uri [SLIDE]",description:"Adaugă [SLIDE] în textul scriptului.",variant:"destructive"}),Q(!1);return}let J=S;(!J||J===0)&&(J=120);const he=[...ie].sort((ue,Se)=>ue.sort_order-Se.sort_order),je=new Map(he.map(ue=>{const Se=Ave(ue.image_url);return Se?[Se.toLowerCase(),ue]:null}
2162).filter(Boolean)),Ie=(we.some(ue=>ue.fileName)?we.map(ue=>({marker:ue,slide:ue.fileName?je.get(ue.fileName.toLowerCase())??null:he[ue.index]??null})):he.map((ue,Se)=>({marker:we[Se]??null,slide:ue}))).filter(ue=>!!(ue.marker&&ue.slide));if(Ie.length===0){a({title:"Nicio potrivire",variant:"destructive"}),Q(!1);return}await Promise.all(Ie.map(({marker:ue,slide:Se})=>{const He=ue.startRatio*J,Qe=ue.endRatio*J;return G.from("course_presentation_slides").update({timestamp_start:Math.round(He*10)/10,timestamp_end:Math.round(Qe*10)/10}).eq("id",Se.id)})),o.invalidateQueries({queryKey:["presentation-slides",e]}),a({title:`✅ ${Ie.length} slide-uri sincronizate`})}catch(we){a({title:"Eroare sync",description:we.message,variant:"destructive"})}Q(!1)}},ze=S>0?Math.min(100,Math.max(0,C/S*100)):0;return s.jsxs("div",{className:"border border-border rounded-lg p-4 bg-card/50 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ZL,{size:18,className:"text-primary"}),s.jsx("span",{className:"font-medium",children:"Prezentare Video Curs"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(me,{variant:l?"default":"outline",size:"sm",onClick:()=>c(!l),children:[l?s.jsx(x_,{size:14}):s.jsx(Oi,{size:14}),l?"Editor":"Preview"]}),y?s.jsxs(s.Fragment,{children:[s.jsxs(me,{variant:"outline",size:"sm",onClick:oe,disabled:b,className:"text-xs gap-1",children:[b?s.jsx(rt,{size:12,className:"animate-spin"}):j?s.jsx(Fd,{size:12}):s.jsx(ya,{size:12}),j?ye(C):"Redă audio"]}),j&&s.jsxs(me,{variant:"ghost",size:"sm",onClick:ce,className:"text-xs gap-1",children:[s.jsx(YL,{size:12})," Stop"]}),s.jsx(me,{variant:"outline",size:"sm",className:"text-xs gap-1",asChild:!0,children:s.jsxs("a",{href:y,download:!0,target:"_blank",rel:"noopener noreferrer",children:[s.jsx(Wl,{size:12})," MP3"]})})]}):s.jsxs(at,{variant:"outline",className:"text-xs gap-1 opacity-40",children:[s.jsx(wo,{size:10})," —"]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:de,disabled:u,className:"text-xs gap-1",children:[u?s.jsx(rt,{size:12,className:"animate-spin"}):s.jsx(wo,{size:12}),u?"Se generează...":y?"🔄":"Audio"]})]})]}),l?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"border border-border rounded-lg p-3 bg-secondary/30",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(il,{size:14,className:"text-primary"}),s.jsx("span",{className:"text-sm font-medium",children:"Slide-uri Prezentare"}),ie.length>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",ie.length," slide-uri)"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[ie.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs(me,{variant:"outline",size:"sm",onClick:We,disabled:U,className:"text-xs",children:[U?s.jsx(rt,{size:12,className:"animate-spin"}):s.jsx(T2,{size:12}),"Auto-sync [SLIDE]"]}),s.jsxs(me,{variant:"outline",size:"sm",className:"text-xs",onClick:()=>{const we=ie.map((J,he)=>{var ve;return`[SLIDE ${((ve=J.image_url.split("/").pop())==null?void 0:ve.split("?")[0])||`slide-${he+1}`}]`}).join(`
2163`);navigator.clipboard.writeText(we),a({title:"Copiat!",description:`${ie.length} tag-uri [SLIDE] copiate`})},children:[s.jsx(Jh,{size:12})," Copiază toate [SLIDE]"]}),s.jsxs(me,{variant:"ghost",size:"sm",onClick:Ve,className:"text-destructive text-xs",children:[s.jsx(Xr,{size:12})," Șterge tot"]})]}),s.jsxs("label",{className:"cursor-pointer",children:[s.jsx(me,{variant:"outline",size:"sm",asChild:!0,disabled:I,children:s.jsxs("span",{children:[I?s.jsx(rt,{size:12,className:"animate-spin"}):s.jsx(h4,{size:12}),I?L:"Încarcă PNG-uri"]})}),s.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,className:"hidden",onChange:ge})]})]})]}),ie.length>0&&y&&s.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2 rounded-lg border border-border/50 bg-background/80 p-3",children:[s.jsxs(me,{variant:j?"secondary":"default",size:"sm",onClick:oe,disabled:b,className:"text-xs gap-1",children:[b?s.jsx(rt,{size:12,className:"animate-spin"}):j?s.jsx(Fd,{size:12}):s.jsx(ya,{size:12}),j?"Pauză":"Redă audio"]}),s.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>K(-10),disabled:!S,className:"text-xs gap-1",children:[s.jsx(dle,{size:12})," -10s"]}),s.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>K(10),disabled:!S,className:"text-xs gap-1",children:[s.jsx(hle,{size:12})," +10s"]}),s.jsxs(me,{variant:"ghost",size:"sm",onClick:ce,disabled:!m.current&&!j,className:"text-xs gap-1",children:[s.jsx(YL,{size:12})," Stop"]}),s.jsxs(me,{variant:T!==1?"secondary":"ghost",size:"sm",onClick:()=>{const we=[1,1.5,2,4],J=we[(we.indexOf(T)+1)%we.length];F(J),m.current&&(m.current.playbackRate=J)},className:"shrink-0 px-2 font-mono min-w-[40px] text-xs",title:"Viteză redare",children:[T,"x"]}),s.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[s.jsx("span",{className:"text-xs font-mono text-muted-foreground tabular-nums whitespace-nowrap",children:ye(C)}),s.jsxs("div",{ref:A,className:"group relative h-3 flex-1 min-w-[160px] cursor-pointer rounded-full bg-muted transition-all hover:h-4",onMouseDown:ne,children:[s.jsx("div",{className:"h-full rounded-full bg-primary transition-[width] duration-75",style:{width:`${ze}%`}}),S>0&&s.jsx("div",{className:"pointer-events-none absolute top-1/2 h-4 w-4 -translate-y-1/2 roun
2163ded-full border-2 border-background bg-primary shadow-sm opacity-0 transition-opacity group-hover:opacity-100",style:{left:`calc(${ze}% - 8px)`}})]}),s.jsx("span",{className:"text-xs font-mono text-muted-foreground tabular-nums whitespace-nowrap",children:ye(S)})]})]}),ie.length>0&&s.jsx("div",{className:"space-y-2",children:ie.map((we,J)=>{var je;const he=((je=we.image_url.split("/").pop())==null?void 0:je.split("?")[0])||"";return s.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-background border border-border/50",children:[s.jsx("img",{src:we.image_url,alt:`Slide ${J+1}`,className:"w-32 h-20 object-cover rounded border border-border"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:he}),s.jsx("div",{className:"flex items-center gap-2 mt-1",children:s.jsxs(me,{variant:"outline",size:"sm",className:"text-xs px-2 h-7",onClick:()=>{navigator.clipboard.writeText(`[SLIDE ${he}]`),a({title:"Copiat!"})},children:[s.jsx(Jh,{size:10})," [SLIDE]"]})})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ki,{size:12,className:"text-muted-foreground"}),s.jsx(qe,{type:"number",step:"0.1",defaultValue:we.timestamp_start??"",onBlur:ve=>te(we.id,ve.target.value),className:"w-20 h-7 text-xs",placeholder:"sec"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:we.timestamp_start!=null?`Pornește la ${ye(we.timestamp_start)}`:""}),j&&s.jsxs(me,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>xe(we.id),children:[s.jsx(ki,{size:10})," Stamp"]})]}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>Be(we.id),className:"text-destructive h-7 w-7",children:s.jsx(Xr,{size:12})})]},we.id)})})]}),ie.length>0&&y&&s.jsxs("div",{children:[s.jsxs("h4",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[s.jsx(ZL,{size:14,className:"text-primary"})," Preview Video Prezentare"]}),s.jsx(Mme,{courseId:e,audioUrl:y,slides:ie})]}),s.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-4 rounded-lg bg-background border border-border overflow-auto max-h-[600px]",children:s.jsx(tg,{children:r||"_Fără script de prezentare_"})})]}):s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"flex justify-end",children:s.jsxs(me,{variant:"outline",size:"sm",onClick:p,disabled:h,className:"text-xs gap-1",children:[h?s.jsx(rt,{size:12,className:"animate-spin"}):s.jsx(T2,{size:12}),h?"Se generează...":"✨ Generează script promo AI"]})}),s.jsx(fr,{value:r,onChange:we=>i(we.target.value),rows:12,placeholder:"Scriptul video de prezentare al cursului... Adaugă tag-uri [SLIDE filename.png] pentru sincronizarea cu slide-urile.",className:"text-sm"})]})]})}const ebt=["web3","blockchain","nft","validare-nft","ai","digital-marketing","e-learning"];function tbt(){const{id:e}=Zl(),r=As(),{toast:n}=wn(),i=Kr(),a=w.useCallback(async Ee=>{await Promise.all([i.invalidateQueries({queryKey:["admin-course",e]}),i.invalidateQueries({queryKey:["admin-courses"]}),i.invalidateQueries({queryKey:["courses"]}),i.invalidateQueries({queryKey:["course-by-id",e]}),...Ee?[i.invalidateQueries({queryKey:["course",Ee]})]:[]])},[e,i]),[o,l]=w.useState(""),[c,u]=w.useState(""),[d,h]=w.useState(""),[f,p]=w.useState(""),[m,A]=w.useState(""),[g,y]=w.useState([]),[x,b]=w.useState("începător"),[v,j]=w.useState("free"),[_,C]=w.useState("0"),[N,S]=w.useState(""),[E,O]=w.useState(!1),[B,T]=w.useState(""),[F,I]=w.useState([]),[D,L]=w.useState([]),[V,U]=w.useState(!1),[Q,$]=w.useState(!1),[q,M]=w.useState(""),[z,K]=w.useState(!1),[ne,ie]=w.useState(""),[X,de]=w.useState(0),[oe,ce]=w.useState(null),[ye,ge]=w.useState(!1),[Be,Ve]=w.useState(""),[te,xe]=w.useState(0),[We,ze]=w.useState(!1),[we,J]=w.useState(!1),[he,je]=w.useState(!1),[ve,Pe]=w.useState(""),[Ie,ue]=w.useState(!1),Se=async()=>{if(!ve.trim()){n({title:"Introdu parola de confirmare",variant:"destructive"});return}ue(!0);try{const{data:Ee,error:nt}=await G.rpc("force_delete_course",{p_course_id:e,p_confirmation_password:ve});if(nt)throw nt;n({title:"Cursul a fost șters definitiv."}),je(!1),r("/admin/courses")}catch(Ee){n({title:"Eroare la ștergere",description:Ee.message,variant:"destructive"})}finally{ue(!1),Pe("")}},He=async(Ee,nt)=>{const gt=Ee==="ro"?ze:J,wt=Ee==="ro"?I:L,dr=Ee==="ro"?F:D,jr=Ee==="ro"?"faq_ro":"faq_en";gt(!0);try{const{data:Ar,error:Ct}=await G.functions.invoke("generate-course-faq",{body:{course_id:e,count:nt,language:Ee}});if(Ct)throw Ct;if(Ar!=null&&Ar.error)throw new Error(Ar.error);const qn=(Ar==null?void 0:Ar.faqs)||[];if(qn.length===0){n({title:"Nu s-au generat FAQ-uri",description:"Verifică dacă lecțiile au conținut."});return}const pl=[...dr,...qn],{error:Wc}=await G.from("courses").update({[jr]:pl}).eq("id",e);if(Wc)throw Wc;wt(pl),await a(c),n({title:`${qn.length} FAQ-uri generate și salvate cu succes!`})}catch(Ar){n({title:"Eroare generare FAQ",description:Ar.message,variant:"destructive"})}finally{gt(!1)}},Qe=async(Ee,nt)=>{const gt=Ee==="ro"?F:D,wt=Ee==="ro"?I:L,dr=Ee==="ro"?"faq_ro":"faq_en",jr=gt.filter((Ar,Ct)=>Ct!==nt);wt(jr);try{await G.from("courses").update({[dr]:jr}).eq("id",e),c&&await a(c)}catch(Ar){n({title:"Eroare la ștergerea FAQ",description:Ar.message,variant:"destructive"})}},ct=async Ee=>{const nt=Ee==="ro"?I:L,gt=Ee==="ro"?"faq_ro":"faq_en";nt([]);try{await G.from("courses").update({[gt]:[]}).eq("id",e),c&&await a(c),n({title:`FAQ-uri (${Ee.toUpperCase()}) șterse cu succes`})}catch(wt){n({title:"Eroare la ștergerea FAQ",description:wt.message,variant:"destructive"})}},[dt,Fr]=w.useState(!1),[Xt,Vt]=w.useState(""),[lr,cr]=w.useState(null),[Bt,kr]=w.useState({}),ar=Ee=>Ee?/(?:^|\n)\s*(?:\*\*)?(?:Moderatoare \(Ana\)|Anna|Ana|Andrei|Brian|Robert|Tudor)(?:\*\*)?\s*[:\-–—]/i.test(Ee):!1,ur=w.useCallback(Ee=>{const nt=document.getElementById(`audio-${Ee}`);
2163nt&&(nt.pause(),nt.removeAttribute("src"),nt.dataset.src="",nt.load())},[]),kn=w.useCallback(Ee=>{kr(nt=>({...nt,[Ee]:(nt[Ee]??0)+1}))},[]),Sr=w.useCallback(async(Ee,nt)=>{const gt=document.getElementById(`audio-${Ee}`);if(gt)try{const{data:wt,error:dr}=await G.from("course_lessons").select("video_url").eq("id",Ee).single();if(dr)throw dr;const jr=(wt==null?void 0:wt.video_url)??nt;if(!jr){ur(Ee),await i.invalidateQueries({queryKey:["admin-course-modules",e]}),n({title:"Audio șters",description:"Fișierul vechi nu mai există. Regenerează audio din nou."});return}if(!gt.paused&&gt.dataset.src===jr){gt.pause();return}const Ar=await J4(Ee,jr);gt.dataset.src=jr,gt.src=Oh(Ar),gt.load(),gt.muted=!1,gt.volume=1,await gt.play()}catch(wt){console.error("Play lesson audio error:",wt),ur(Ee),n({title:"Eroare audio",description:wt.message,variant:"destructive"})}},[e,i,ur,n]),zt=async(Ee,nt,gt={})=>{ge(!0),Ve(`0/${Ee.length}`),xe(0);let wt=0,dr=0;for(const jr of Ee){const Ar=ar(jr.content),Ct=Ar?"lesson-tts-conversation":"lesson-tts";try{Ve(`${wt+1}/${Ee.length}: ${jr.title.slice(0,35)}... (${Ar?"dialog":"narativ"})`);const{data:qn,error:pl}=await G.functions.invoke(Ct,{body:{lessonId:jr.id,forceRegenerate:gt.forceRegenerate===!0}});if(pl)throw pl;if(qn!=null&&qn.error)throw new Error(qn.error);wt++}catch(qn){console.error(`Audio error for ${jr.title}:`,qn),dr++}xe(Math.round((wt+dr)/Ee.length*100)),Ve(`${wt}/${Ee.length} generate, ${dr} erori`)}i.invalidateQueries({queryKey:["admin-course-modules",e]}),n({title:`${nt} — audio completă!`,description:`${wt} fișiere audio create, ${dr} erori.`}),ge(!1),Ve(""),xe(0)},an=async()=>{if(!ln.length)return;const Ee=ln.flatMap(gt=>gt.lessons||[]),nt=Ee.filter(gt=>gt.content&&!gt.video_url);if(nt.length===0){n({title:"Audio complet",description:`Toate ${Ee.length} lecțiile au deja audio generat.`});return}confirm(`Vrei să generezi audio pentru ${nt.length} lecții? (${Ee.length-nt.length} deja generate)`)&&await zt(nt,"Generare")},nr=async Ee=>{const nt=ln[Ee];if(!nt)return;const gt=(nt.lessons||[]).filter(wt=>wt.content);if(gt.length===0){n({title:"Fără lecții",description:"Modulul nu are lecții cu conținut.",variant:"destructive"});return}if(confirm(`Regenerezi audio pentru ${gt.length} lecții din "${nt.title}"?
2164Acestea vor fi șterse și recreate.`)){Fr(!0),Vt(`Ștergere audio vechi pentru ${gt.length} lecții...`);try{for(const wt of gt){const dr=`lessons/${wt.id}.mp3`;ur(wt.id),kn(wt.id),await G.storage.from("lesson-audio").remove([dr]),await G.storage.from("video-audio").remove([dr]),await G.from("course_lessons").update({video_url:null}).eq("id",wt.id)}i.invalidateQueries({queryKey:["admin-course-modules",e]}),Vt("Generare audio nou...")}finally{Fr(!1)}await zt(gt,`M${Ee+1}`,{forceRegenerate:!0})}},pr=async Ee=>{const nt=document.getElementById(`lesson-content-${Ee.id}`),gt=(nt==null?void 0:nt.value)??Ee.content??"";if(!gt.trim()){n({title:"Fără conținut",description:"Lecția nu are conținut pentru generare audio.",variant:"destructive"});return}if(confirm(`Regenerezi audio pentru „${Ee.title}"?`)){cr(Ee.id);try{const wt=`lessons/${Ee.id}.mp3`;ur(Ee.id),kn(Ee.id),await G.storage.from("lesson-audio").remove([wt]),await G.storage.from("video-audio").remove([wt]),await G.from("course_lessons").update({video_url:null,content:gt}).eq("id",Ee.id);const dr=ar(gt),jr=dr?"lesson-tts-conversation":"lesson-tts",{data:Ar,error:Ct}=await G.functions.invoke(jr,{body:{lessonId:Ee.id,forceRegenerate:!0}});if(Ct)throw Ct;if(Ar!=null&&Ar.error)throw new Error(Ar.error);i.invalidateQueries({queryKey:["admin-course-modules",e]});const qn=document.getElementById(`audio-${Ee.id}`);qn&&(qn.dataset.src=(Ar==null?void 0:Ar.audioUrl)||""),n({title:"Audio regenerat!",description:`„${Ee.title}" — ${dr?"dialog":"narativ"}`})}catch(wt){console.error("Lesson audio regen error:",wt),n({title:"Eroare audio",description:wt.message,variant:"destructive"})}finally{cr(null)}}},Gr=async()=>{if(confirm("Vrei să rulezi curățarea editorială AI pe toate lecțiile? Acest proces va corecta ortografia, diacriticele, markup-ul rezidual și va standardiza indicațiile grafice.")){$(!0),M("Se pornește...");try{let Ee=0,nt=!0,gt=0,wt=0;for(;nt;){M(`Lot ${Ee+1}: se procesează...`);const{data:dr,error:jr}=await G.functions.invoke("cleanup-course-content",{body:{courseId:e,dryRun:!1,batchSize:5,batchIndex:Ee}});if(jr)throw jr;gt+=(dr.results||[]).filter(Ar=>Ar.status==="cleaned").length,wt+=(dr.results||[]).filter(Ar=>Ar.status==="error").length,nt=dr.hasMore,Ee=dr.nextBatchIndex,M(`Procesate: ${gt} lecții, ${wt} erori`)}i.invalidateQueries({queryKey:["admin-course-modules",e]}),n({title:"Curățare completă!",description:`${gt} lecții curățate, ${wt} erori.`})}catch(Ee){n({title:"Eroare",description:Ee.message,variant:"destructive"})}finally{$(!1),M("")}}},ii=async()=>{K(!0),ie("Se scanează lecțiile..."),de(0);try{const{data:Ee,error:nt}=await G.functions.invoke("generate-edu-graphic",{body:{courseId:e,mode:"scan"}});if(nt)throw nt;if(!Ee.success)throw new Error(Ee.error);const gt=(Ee.graphics||[]).filter(Ar=>!Ar.alreadyGenerated);if(gt.length===0){n({title:"Nicio grafică de generat",description:`${Ee.total} grafice deja generate sau niciun placeholder [GRAFICĂ: ...] găsit.`});return}const wt=gt.length;ie(`0/${wt} grafice generate...`);let dr=0,jr=0;for(const Ar of gt){try{ie(`${dr+1}/${wt}: ${Ar.description.slice(0,40)}...`);const{data:Ct,error:qn}=await G.functions.invoke("generate-edu-graphic",{body:{courseId:e,lessonId:Ar.lessonId,description:Ar.description,mode:"generate"}});if(qn)throw qn;if(!Ct.success)throw new Error(Ct.error);dr++}catch(Ct){console.error(`Error generating graphic: ${Ar.description}`,Ct),jr++}de(Math.round((dr+jr)/wt*100)),ie(`${dr}/${wt} generate, ${jr} erori`)}i.invalidateQueries({queryKey:["admin-course-modules",e]}),n({title:"Grafice generate!",description:`${dr} SVG-uri create, ${jr} erori. Placeholder-ele au fost înlocuite în lecții.`})}catch(Ee){n({title:"Eroare",description:Ee.message,variant:"destructive"})}finally{K(!1),ie(""),de(0)}},{data:pt,isLoading:Di}=Xe({queryKey:["admin-course",e],queryFn:async()=>{const{data:Ee,error:nt}=await G.from("courses").select("*").eq("id",e).single();if(nt)throw nt;return Ee},enabled:!!e});w.useEffect(()=>{pt&&(l(pt.title||""),u(pt.slug||""),h(pt.description||""),p(pt.short_description||""),A(pt.image_url||""),y(pt.topics||[]),b(pt.difficulty_level||"începător"),j(pt.price_type||"free"),C(String(pt.price_amount||0)),S(pt.estimated_hours?String(pt.estimated_hours):""),O(pt.is_published||!1),T(pt.video_presentation_script||""),I(Array.isArray(pt.faq_ro)?pt.faq_ro:[]),L(Array.isArray(pt.faq_en)?pt.faq_en:[]))},[pt]);const{data:ln=[],isLoading:Yn}=Xe({queryKey:["admin-course-modules",e],queryFn:async()=>{const{data:Ee,error:nt}=await G.from("course_modules").select("*").eq("course_id",e).order("sort_order");if(nt)throw nt;const gt=(Ee||[]).map(dr=>dr.id);let wt=[];if(gt.length>0){const{data:dr,error:jr}=await G.from("course_lessons").select("*").in("module_id",gt).order("sort_order");if(jr)throw jr;wt=dr||[]}return(Ee||[]).map(dr=>({...dr,lessons:wt.filter(jr=>jr.module_id===dr.id)}))},enabled:!!e});Xe({queryKey:["lesson-video-statuses",e],queryFn:async()=>ln.flatMap(nt=>(nt.lessons||[]).map(gt=>gt.id)).length===0?{}:{},enabled:!!e&&ln.length>0});const Ai=async()=>{U(!0);try{const Ee={title:o,slug:c,description:d,short_description:f,image_url:m||null,topics:g,difficulty_level:x,price_type:v,price_amount:Number(_)||0,estimated_hours:N?Number(N):null,is_published:E,video_presentation_script:B||null,faq_ro:F,faq_en:D};console.log("Saving course payload:",Ee);const{data:nt,error:gt,count:wt}=await G.from("courses").update(Ee).eq("id",e).select();if(gt)throw console.error("Course save error:",gt),gt;if(!nt||nt.length===0)throw new Error("Salvarea nu a afectat niciun rând. Verifică permisiunile de admin.");await a(c),n({title:"Curs salvat cu succes!"})}catch(Ee){console.error("Course save failed:",Ee),n({title:"Eroare la salvare",description:Ee.message,variant:"destructive"})}finally{U(!1)}},gi=async()=>{try{const{error:Ee}=await G.from("course_modules").insert({course_id:e,title:"Modul nou",sort_order:ln.length});if(Ee)throw Ee;i.invalidateQueries({queryKey:["admin-course-modules",e]})}catch(Ee){n({title:"Eroare",description:Ee.message,variant:"destructive"})}},Xi=async(Ee,nt)=>{const{error:gt}=await G.from("course_modules").update(nt).eq("id",Ee);gt?n({title:"Eroare",description:gt.message,variant:"destructive"}):i.invalidateQueries({queryKey:["admin-course-modules",e]})},Yi=async Ee=>{if(!confirm("Sigur vrei să ștergi acest modul și toate lecțiile din el?"))return;const{error:nt}=await G.from("course_modules").delete().eq("id",Ee);nt?n({title:"Eroare",description:nt.message,variant:"destructive"}):(i.invalidateQueries({queryKey:["admin-course-modules",e]}),n({title:"Modul șters"}))},Vr=async(Ee,nt)=>{const{error:gt}=await G.from("course_lessons").insert({module_id:Ee,title:"Lecție nouă",sort_order:nt});gt?n({title:"Eroare",description:gt.message,variant:"destructive"}):i.invalidateQueries({queryKey:["admin-course-modules",e]})},Br=async(Ee,nt)=>{const{error:gt}=await G.from("course_lessons").update(nt).eq("id",Ee);gt?n({title:"Eroare",description:gt.message,variant:"destructive"}):i.invalidateQueries({queryKey:["admin-course-modules",e]})},xi=async Ee=>{if(!confirm("Sigur vrei să ștergi această lecție?"))return;const{error:nt}=await G.from("course_lessons").delete().eq("id",Ee);nt?n({title:"Eroare",description:nt.message,variant:"destructive"}):(i.invalidateQueries({queryKey:["admin-course-modules",e]}),n({title:"Lecție ștearsă"}))},La=Ee=>{y(nt=>nt.includes(Ee)?nt.filter(gt=>gt!==Ee):[...nt,Ee])};return Di?s.jsx(xr,{children:s.jsx("div",{className:"container py-20 flex justify-center",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})})}):s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-4xl",children:[s.jsxs(be,{to:"/admin/courses",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Înapoi la cursuri"]}),s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsxs("h1",{className:"font-heading text-2xl font-bold flex items-center gap-2",children:[s.jsx(Rr,{size:24,className:"text-primary"}),"Editare curs"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(me,{variant:"outline",size:"sm",onClick:()=>
2164{if(!pt||!ln.length)return;const Ee=[];Ee.push("═══════════════════════════════════════════"),Ee.push(`CURS: ${o}`),Ee.push("═══════════════════════════════════════════"),Ee.push(`Slug: ${c}`),Ee.push(`Nivel: ${x}`),Ee.push(`Topicuri: ${g.length?g.join(", "):"—"}`),Ee.push(`Preț: ${v==="free"?"Gratuit":`${_} ${pt.currency||"RON"}`}`),Ee.push(`Ore estimate: ${N||"—"}`),Ee.push(`Publicat: ${E?"Da":"Nu"}`),Ee.push(""),d&&(Ee.push("DESCRIERE:"),Ee.push(d),Ee.push("")),f&&(Ee.push("DESCRIERE SCURTĂ:"),Ee.push(f),Ee.push("")),Ee.push(`STRUCTURĂ: ${ln.length} module, ${ln.reduce((wt,dr)=>{var jr;return wt+(((jr=dr.lessons)==null?void 0:jr.length)||0)},0)} lecții`),Ee.push("═══════════════════════════════════════════"),Ee.push("");let nt=0;ln.forEach((wt,dr)=>{const jr=Gv(dr,ln.length);Ee.push("───────────────────────────────────────────"),Ee.push(`${jr}: ${wt.title}`),wt.description&&Ee.push(`Descriere: ${wt.description}`),Ee.push("───────────────────────────────────────────"),Ee.push(""),(wt.lessons||[]).forEach(Ar=>{const Ct=(Ar.title||"").startsWith("Podcast:");Ct||nt++;const qn=Ct?"Podcast":`Lecția ${nt}`;if(Ee.push(`  ${qn}: ${Ar.title}`),Ee.push(`  Status: ${Ar.content_status||"draft"} | Minute estimate: ${Ar.estimated_minutes||"—"}`),Ar.content){const pl=Ar.content.replace(/!\[.*?\]\(.*?\)/g,"").replace(/\[GRAFIC[ĂA]?:[^\]]*\]/gi,"").replace(/\[IMAGINE:[^\]]*\]/gi,"").replace(/\[DIAGRAM[ĂA]?:[^\]]*\]/gi,"").replace(/\[INFOGRAFIC:[^\]]*\]/gi,"").replace(/\[SCREENSHOT:[^\]]*\]/gi,"").replace(/\[VISUAL:[^\]]*\]/gi,"").replace(/📌\s*\d{1,2}:\d{2}/g,"").replace(/^(?:Imagine|Visual|Prompt imagine|Image prompt|Slide|Thumbnail|Grafic|Graphic|Ilustrație|Diagramă|Infografic|Screenshot)[:\s].*$/gim,"").replace(/^.*(?:generează|generate|creează|create|adaugă|add)\s+(?:o\s+)?(?:imagine|image|grafic|graphic|ilustrație|slide|foto|diagramă|infografic|screenshot).*$/gim,"").replace(/\((?:imagine|image|foto|photo|grafic|graphic|slide|visual|ilustrație|diagramă|infografic|screenshot)[^)]*\)/gi,"").replace(/https?:\/\/\S+\.(png|jpg|jpeg|gif|svg|webp)\S*/gi,"").replace(/\n{3,}/g,`
2165
2166`).trim();Ee.push(""),Ee.push(pl)}else Ee.push("  [Fără conținut]");Ee.push(""),Ee.push("  · · · · · · · · · · · · · · · · · · · · ·"),Ee.push("")})});const gt=Ee.join(`
2167`);navigator.clipboard.writeText(gt).then(()=>{n({title:"Copiat!",description:`${gt.length.toLocaleString()} caractere copiate în clipboard.`})}).catch(()=>{const wt=window.open("","_blank");wt&&wt.document.write(`<pre style="white-space:pre-wrap;font-family:monospace;padding:20px">${gt.replace(/</g,"&lt;")}</pre>`)})},children:[s.jsx(Jh,{size:14})," Copiază tot"]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:Gr,disabled:Q,children:[Q?s.jsx(rt,{size:14,className:"animate-spin"}):s.jsx(Li,{size:14}),Q?q:"Curățare AI"]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:ii,disabled:z,children:[z?s.jsx(rt,{size:14,className:"animate-spin"}):s.jsx(il,{size:14}),z?ne:"Generare grafice"]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:an,disabled:ye,children:[ye?s.jsx(rt,{size:14,className:"animate-spin"}):s.jsx(wo,{size:14}),ye?Be:"Generare audio"]}),s.jsx(me,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs(be,{to:`/admin/courses/${e}/preview`,children:[s.jsx(Yr,{size:14})," Previzualizare"]})}),s.jsx(me,{variant:"outline",size:"sm",onClick:async()=>{const Ee=!E;O(Ee),U(!0);try{const{error:nt}=await G.from("courses").update({is_published:Ee}).eq("id",e);if(nt)throw nt;await a(c),n({title:Ee?"Curs publicat!":"Curs ascuns"})}catch(nt){O(!Ee),n({title:"Eroare",description:nt.message,variant:"destructive"})}finally{U(!1)}},children:E?s.jsxs(s.Fragment,{children:[s.jsx(x_,{size:14})," Ascunde"]}
2167):s.jsxs(s.Fragment,{children:[s.jsx(Oi,{size:14})," Publică"]})}),s.jsxs(me,{onClick:Ai,disabled:V,size:"sm",children:[V?s.jsx(rt,{size:14,className:"animate-spin"}):s.jsx(Bu,{size:14}),"Salvează"]}),s.jsxs(sl,{open:he,onOpenChange:je,children:[s.jsx(Ab,{asChild:!0,children:s.jsxs(me,{variant:"destructive",size:"sm",children:[s.jsx(Xr,{size:14})," Șterge cursul"]})}),s.jsxs(Po,{children:[s.jsxs(ol,{children:[s.jsx(ll,{children:"⚠️ Ștergere definitivă curs"}),s.jsxs(mve,{children:["Această acțiune este ireversibilă. Cursul „",o,'" și toate datele asociate vor fi șterse permanent. Introdu parola de confirmare pentru a continua.']})]}),s.jsx(qe,{type:"password",placeholder:"Parola de confirmare",value:ve,onChange:Ee=>Pe(Ee.target.value),onKeyDown:Ee=>Ee.key==="Enter"&&Se()}),s.jsxs(gb,{children:[s.jsx(me,{variant:"outline",onClick:()=>{je(!1),Pe("")},children:"Anulează"}),s.jsxs(me,{variant:"destructive",onClick:Se,disabled:Ie,children:[Ie?s.jsx(rt,{size:14,className:"animate-spin mr-1"}):s.jsx(Xr,{size:14,className:"mr-1"}),"Confirmă ștergerea"]})]})]})]})]})]}),s.jsxs(st,{className:"mb-6",children:[s.jsx(Ot,{children:s.jsx(Ht,{className:"text-lg",children:"Detalii curs"})}),s.jsxs(ot,{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Titlu"}),s.jsx(qe,{value:o,onChange:Ee=>l(Ee.target.value)})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Slug"}),s.jsx(qe,{value:c,onChange:Ee=>u(Ee.target.value)})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Descriere scurtă"}),s.jsx(qe,{value:f,onChange:Ee=>p(Ee.target.value),placeholder:"O propoziție..."})]}),s.jsx(Z0t,{courseId:e,script:B,audioUrl:(pt==null?void 0:pt.video_presentation_audio_url)||null,onScriptChange:T}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Descriere completă"}),s.jsx(fr,{value:d,onChange:Ee=>h(Ee.target.value),rows:4})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"URL Imagine"}),s.jsx(qe,{value:m,onChange:Ee=>A(Ee.target.value),placeholder:"https://..."})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Topicuri"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:ebt.map(Ee=>s.jsx("button",{type:"button",onClick:()=>La(Ee),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-colors ${g.includes(Ee)?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground hover:bg-secondary/80"}`,children:vg[Ee]},Ee))})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Dificultate"}),s.jsxs(Cn,{value:x,onValueChange:b,children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"începător",children:"Începător"}),s.jsx(_t,{value:"intermediar",children:"Intermediar"}),s.jsx(_t,{value:"avansat",children:"Avansat"})]})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Tip preț"}),s.jsxs(Cn,{value:v,onValueChange:j,children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"free",children:"Gratuit"}),s.jsx(_t,{value:"paid",children:"Cu plată"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Cursurile cu plată sunt incluse automat în abonamentul EduWeb Academy."})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Preț (RON)"}),s.jsx(qe,{type:"number",value:_,onChange:Ee=>C(Ee.target.value)})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Ore estimate"}),s.jsx(qe,{type:"number",step:"0.5",value:N,onChange:Ee=>S(Ee.target.value),placeholder:"ex: 4.5",className:"w-40"})]}),s.jsx("div",{className:"flex justify-end pt-4 border-t",children:s.jsxs(me,{onClick:Ai,disabled:V,size:"sm",children:[V?s.jsx(rt,{size:14,className:"animate-spin"}):s.jsx(Bu,{size:14}),"Salvează detalii"]})})]})]}),(ye||z)&&s.jsxs("div",{className:"space-y-2",children:[ye&&s.jsxs("div",{className:"glass-card rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(wo,{size:16,className:"text-primary"}),s.jsx("span",{className:"text-sm font-medium",children:"Generare Audio TTS"}),s.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:Be})]}),s.jsx(ql,{value:te,className:"h-2"})]}),z&&s.jsxs("div",{className:"glass-card rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(il,{size:16,className:"text-primary"}),s.jsx("span",{className:"text-sm font-medium",children:"Generare Grafice SVG"}),s.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:ne})]}),s.jsx(ql,{value:X,className:"h-2"})]})]}),s.jsxs(st,{className:"mb-6",children:[s.jsx(Ot,{children:s.jsx(Ht,{className:"text-lg",children:"FAQ Curs (RO)"})}),s.jsxs(ot,{className:"space-y-3",children:[F.map((Ee,nt)=>s.jsxs("div",{className:"flex gap-2 items-start",children:[s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx(qe,{placeholder:"Întrebare",value:Ee.question,onChange:gt=>{const wt=[...F];wt[nt]={...wt[nt],question:gt.target.value},I(wt)}}),s.jsx(fr,{placeholder:"Răspuns",value:Ee.answer,rows:2,onChange:gt=>{const wt=[...F];wt[nt]={...wt[nt],answer:gt.target.value},I(wt)}})]}),s.jsx(me,{variant:"ghost",size:"sm",onClick:()=>Qe("ro",nt),children:s.jsx(Xr,{size:14})})]},nt)),s.jsxs(SE,{children:[s.jsx(kE,{asChild:!0,children:s.jsxs(me,{variant:"outline",size:"sm",disabled:We,children:[We?s.jsx(rt,{size:14,className:"animate-spin mr-1"}):s.jsx(Qn,{size:14,className:"mr-1"}),"Adaugă FAQ ",s.jsx(Vl,{size:12,className:"ml-1"})]})}),s.jsxs(q2,{children:[s.jsxs(Go,{onClick:()=>I([...F,{question:"",answer:""}]),children:[s.jsx(Qn,{size:14,className:"mr-2"})," FAQ gol"]}),[3,5,7,10].map(Ee=>s.jsxs(Go,{onClick:()=>He("ro",Ee),children:[s.jsx(T2,{size:14,className:"mr-2"})," Generează ",Ee," cu AI"]},Ee))]})]}),F.length>0&&s.jsxs(me,{variant:"destructive",size:"sm",onClick:()=>ct("ro"),children:[s.jsx(Xr,{size:14,className:"mr-1"})," Șterge toate FAQ (RO)"]})]})]}),s.jsxs(st,{className:"mb-6",children:[s.jsx(Ot,{children:s.jsx(Ht,{className:"text-lg",children:"FAQ Curs (EN)"})}),s.jsxs(ot,{className:"space-y-3",children:[D.map((Ee,nt)=>s.jsxs("div",{className:"flex gap-2 items-start",children:[s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx(qe,{placeholder:"Question",value:Ee.question,onChange:gt=>{const wt=[...D];wt[nt]={...wt[nt],question:gt.target.value},L(wt)}}),s.jsx(fr,{placeholder:"Answer",value:Ee.answer,rows:2,onChange:gt=>{const wt=[...D];wt[nt]={...wt[nt],answer:gt.target.value},L(wt)}})]}),s.jsx(me,{variant:"ghost",size:"sm",onClick:()=>Qe("en",nt),children:s.jsx(Xr,{size:14})})]},nt)),s.jsxs(SE,{children:[s.jsx(kE,{asChild:!0,children:s.jsxs(me,{variant:"outline",size:"sm",disabled:we,children:[we?s.jsx(rt,{size:14,className:"animate-spin mr-1"}):s.jsx(Qn,{size:14,className:"mr-1"}),"Add FAQ ",s.jsx(Vl,{size:12,className:"ml-1"})]})}),s.jsxs(q2,{children:[s.jsxs(Go,{onClick:()=>L([...D,{question:"",answer:""}]),children:[s.jsx(Qn,{size:14,className:"mr-2"})," Empty FAQ"]}),[3,5,7,10].map(Ee=>s.jsxs(Go,{onClick:()=>He("en",Ee),children:[s.jsx(T2,{size:14,className:"mr-2"})," Generate ",Ee," with AI"]},Ee))]})]}),D.length>0&&s.jsxs(me,{variant:"destructive",size:"sm",onClick:()=>ct("en"),children:[s.jsx(Xr,{size:14,className:"mr-1"})," Delete all FAQ (EN)"]})]})]}),s.jsxs(st,{children:[s.jsxs(Ot,{className:"flex flex-row items-center justify-between",children:[s.jsx(Ht,{className:"text-lg",children:"Module & Lecții"}),s.jsxs(me,{variant:"outline",size:"sm",onClick:gi,children:[s.jsx(Qn,{size:14})," Adaugă modul"]})]}),s.jsx(ot,{children:Yn?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(rt,{className:"animate-spin text-primary",size:24})}):ln.length===0?s.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:'Niciun modul adăugat. Apasă "Adaugă modul" pentru a crea structura cursului.'}):s.jsx(lo,{type:"multiple",className:"space-y-3",children:(()=>{const Ee=F$(ln);return ln.map((nt,gt)=>{const wt=Gv(gt,ln.length),dr=nt.lessons.filter(Ct=>!Ct.title.startsWith("Podcast:")).length,jr=nt.lessons.filter(Ct=>Ct.title.startsWith("Podcast:")).length,Ar=nt.lessons.filter(Ct=>Ct.video_url).length;return s.jsxs(Os,{value:nt.id,className:"border border-border rounded-lg px-4 bg-card/30",children:[s.jsx(Ls,{className:"hover:no-underline",children:s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(FU,{size:14,className:"text-muted-foreground
2167/40 shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground font-mono shrink-0",children:wt}),s.jsx("span",{className:"font-medium truncate",children:nt.title}),s.jsxs("span",{className:"text-xs text-muted-foreground ml-auto mr-2 shrink-0",children:[dr>0?`${dr} lecții`:`${jr} podcast${jr>1?"uri":""}`,dr>0&&jr>0&&s.jsxs("span",{className:"ml-1",children:["• 🎙 ",jr," podcast",jr>1?"uri":""]}),nt.lessons.length>0&&s.jsxs("span",{className:"ml-1",children:["• 🔊 ",Ar,"/",nt.lessons.length]})]})]})}),s.jsxs(Rs,{className:"pt-2 pb-4",children:[s.jsxs("div",{className:"flex gap-2 mb-4",children:[s.jsx(qe,{defaultValue:nt.title,onBlur:Ct=>{Ct.target.value!==nt.title&&Xi(nt.id,{title:Ct.target.value})},placeholder:"Titlu modul",className:"flex-1"}),s.jsxs(me,{variant:"outline",size:"sm",onClick:()=>nr(gt),disabled:ye||dt,title:"Regenerează audio pentru tot modulul",className:"shrink-0 text-xs",children:[s.jsx(wo,{size:14})," Regenerează audio ",wt]}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>Yi(nt.id),className:"text-destructive hover:text-destructive shrink-0",children:s.jsx(Xr,{size:16})})]}),s.jsxs("div",{className:"space-y-2 ml-4",children:[nt.lessons.map(Ct=>{var Wc;const qn=Ct.title.startsWith("Podcast:"),pl=((Wc=Ee.get(Ct.id))==null?void 0:Wc.label)||(qn?"Podcast":"Lecția ?");return s.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-secondary/30 border border-border/50",children:[s.jsx("span",{className:"text-xs text-muted-foreground font-mono mt-2.5 shrink-0",children:pl}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(qe,{defaultValue:Ct.title,onBlur:Ra=>{Ra.target.value!==Ct.title&&Br(Ct.id,{title:Ra.target.value})},placeholder:"Titlu lecție",className:"text-sm flex-1"}),qn&&s.jsxs(at,{variant:"outline",className:"text-xs gap-1 shrink-0",children:[s.jsx(zv,{size:10})," Podcast"]}),s.jsx(me,{variant:oe===Ct.id?"default":"outline",size:"sm",onClick:()=>ce(oe===Ct.id?null:Ct.id),title:"Preview lecție",children:s.jsx(Oi,{size:14})}),Ct.video_url?s.jsxs(s.Fragment,{children:[s.jsxs(me,{variant:"outline",size:"sm",onClick:()=>Sr(Ct.id,Ct.video_url),title:"Ascultă audio",className:"text-xs gap-1 shrink-0",children:[s.jsx(wo,{size:12})," Audio"]}),s.jsx(me,{variant:"outline",size:"sm",className:"text-xs gap-1 shrink-0",asChild:!0,children:s.jsxs("a",{href:Ct.video_url,download:!0,target:"_blank",rel:"noopener noreferrer",title:"Descarcă audio MP3",onClick:Ra=>Ra.stopPropagation(),children:[s.jsx(Wl,{size:12})," MP3"]})})]}):s.jsxs(at,{variant:"outline",className:"text-xs gap-1 shrink-0 opacity-40",children:[s.jsx(wo,{size:10})," —"]}),s.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>pr(Ct),disabled:lr===Ct.id||ye||dt,title:"Regenerează audio pentru această lecție",className:"text-xs gap-1 shrink-0",children:[lr===Ct.id?s.jsx(rt,{size:12,className:"animate-spin"}):s.jsx(wo,{size:12}),lr===Ct.id?"...":"🔄"]})]}),Ct.video_url&&s.jsx("audio",{id:`audio-${Ct.id}`,"data-src":Ct.video_url,preload:"none"}),oe===Ct.id?s.jsxs("div",{className:"space-y-4",children:[s.jsx(K0t,{lessonId:Ct.id,lessonTitle:Ct.title}),Ct.content&&s.jsx(Q0t,{lessonId:Ct.id,lessonTitle:Ct.title,lessonContent:Ct.content,topic:g[0]||"web3"},`${Ct.id}-${Bt[Ct.id]??0}`),s.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-4 rounded-lg bg-background border border-border overflow-auto max-h-[600px]",children:s.jsx(tg,{components:{img:({src:Ra,alt:ix})=>s.jsx("img",{src:Ra,alt:ix||"",className:"max-w-full h-auto rounded-lg border border-border my-4"})},children:Ct.content||"_Fără conținut_"})})]}):s.jsx(fr,{id:`lesson-content-${Ct.id}`,defaultValue:Ct.content||"",onBlur:Ra=>Br(Ct.id,{content:Ra.target.value}),placeholder:"Conținut lecție...",rows:3,className:"text-sm"}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(qe,{defaultValue:Ct.video_url||"",onBlur:Ra=>Br(Ct.id,{video_url:Ra.target.value||null}),placeholder:"URL video (opțional)",className:"text-sm flex-1"}),s.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-muted-foreground whitespace-nowrap cursor-pointer",children:[s.jsx("input",{type:"checkbox",defaultChecked:Ct.is_free_preview,onChange:Ra=>Br(Ct.id,{is_free_preview:Ra.target.checked}),className:"rounded"}),"Preview gratuit"]}),s.jsx(qe,{type:"number",defaultValue:Ct.estimated_minutes||10,onBlur:Ra=>Br(Ct.id,{estimated_minutes:Number(Ra.target.value)||10}),className:"w-16 text-sm",title:"Minute"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"min"})]})]}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>xi(Ct.id),className:"text-destructive hover:text-destructive shrink-0 mt-1",children:s.jsx(Xr,{size:14})})]},`${Ct.id}-${Ct.updated_at??"initial"}`)}),s.jsxs(me,{variant:"outline",size:"sm",onClick:()=>Vr(nt.id,nt.lessons.length),className:"w-full mt-2",children:[s.jsx(Qn,{size:14})," Adaugă lecție"]})]})]})]},nt.id)})})()})})]}),s.jsx("div",{className:"mt-6",children:s.jsx(G0t,{courseId:e,modules:ln.map(Ee=>({id:Ee.id,title:Ee.title,sort_order:Ee.sort_order}))})})]})})}function rbt(){var v,j;const{id:e}=Zl(),{user:r}=Fn(),[n,i]=w.useState(null),[a,o]=w.useState(null),{data:l,isLoading:c}=x7e(e),{data:u=[]}=eme(l==null?void 0:l.id),{data:d=[]}=rme(l==null?void 0:l.id),{data:h=[]}=nde(l==null?void 0:l.id),{data:f={}}=rde(l==null?void 0:l.id),p=u.reduce((_,C)=>_+C.lessons.length,0);d.filter(_=>_.completed).length;const m=((v=l==null?void 0:l.topics)==null?void 0:v[0])||"web3",A=w.useMemo(()=>F$(u),[u]),g=(_,C)=>{var S;const N=(S=u[_])==null?void 0:S.lessons[C];N&&i({id:N.id,title:N.title,content:N.content||"",moduleIndex:_,lessonIndex:C})},y=()=>
2167{if(!n)return;const{moduleIndex:_,lessonIndex:C}=n,N=u[_];C+1<N.lessons.length?g(_,C+1):_+1<u.length&&g(_+1,0)};if(c)return s.jsx(xr,{children:s.jsx("div",{className:"container py-20 flex justify-center",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})})});if(!l)return s.jsx(xr,{children:s.jsx("div",{className:"container py-20 text-center",children:s.jsx("h1",{className:"font-heading text-2xl font-bold mb-2",children:"Curs negăsit"})})});const x=_=>(f[_]||0)>0,b=()=>s.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/30 rounded-lg px-4 py-3 mb-6 flex items-center gap-3",children:[s.jsx(Tu,{size:18,className:"text-amber-600 dark:text-amber-400 shrink-0"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium text-amber-700 dark:text-amber-300",children:"Mod previzualizare admin — așa va arăta cursul pentru studenți"}),s.jsx("p",{className:"text-xs text-amber-600/70 dark:text-amber-400/70",children:l.isPublished?"Publicat":"Draft — nepublicat încă"})]}),s.jsx(me,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs(be,{to:`/admin/courses/${e}`,children:[s.jsx(rn,{size:14})," Editare"]})})]});if(n){const _=d.some(C=>C.lesson_id===n.id&&C.completed);return s.jsx(xr,{children:s.jsxs("div",{className:"container max-w-5xl py-8",children:[s.jsx(b,{}),s.jsxs("button",{onClick:()=>i(null),className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Înapoi la curriculum"]}),s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:((j=A.get(n.id))==null?void 0:j.label)||"Lecția ?"}),_&&s.jsx(hn,{size:16,className:"text-primary"})]}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold tracking-tight mb-6",children:n.title}),s.jsxs(Gi,{defaultValue:"video",className:"w-full",children:[s.jsxs(Ri,{className:"w-full justify-start mb-6 bg-card border border-border/50",children:[s.jsxs(Mt,{value:"video",className:"gap-2 data-[state=active]:bg-primary/10",children:[s.jsx(Pa,{size:16})," Video"]}),s.jsxs(Mt,{value:"text",className:"gap-2 data-[state=active]:bg-primary/10",children:[s.jsx(us,{size:16})," Text"]})]}),s.jsx(er,{value:"video",children:n.content?s.jsx(I$,{lessonId:n.id,lessonTitle:n.title,lessonContent:n.content,topic:m}):s.jsxs("div",{className:"glass-card rounded-xl p-12 text-center text-muted-foreground",children:[s.jsx(Pa,{size:32,className:"mx-auto mb-3 opacity-40"}),s.jsx("p",{children:"Conținutul video va fi disponibil în curând."})]})}),s.jsx(er,{value:"text",children:s.jsx("div",{className:"glass-card rounded-xl p-6 md:p-8",children:n.content?s.jsx("div",{className:"whitespace-pre-line text-foreground/85 leading-relaxed",children:n.content}):s.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Conținutul text va fi adăugat în curând."})})})]}),s.jsxs("div",{className:"flex items-center justify-between mt-8 pt-6 border-t border-border/50",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Preview — acțiunile de progres sunt dezactivate"}),s.jsxs(me,{onClick:y,className:"gap-2 ml-auto",children:["Lecția următoare ",s.jsx(hs,{size:16})]})]})]})})}return a?x(a.id)?s.jsx(xr,{children:s.jsxs("div",{className:"container max-w-3xl py-10",children:[s.jsx(b,{}),s.jsxs("button",{onClick:()=>o(null),className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Înapoi la curriculum"]}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/10 text-primary px-4 py-2 rounded-full text-sm font-bold mb-4",children:[s.jsx(pi,{size:16})," Quiz de modul"]}),s.jsxs("h2",{className:"font-heading text-2xl md:text-3xl font-bold tracking-tight mb-2",children:["Quiz – ",Gv(a.index,u.length),": ",a.title]}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Răspunde corect la toate întrebările pentru a debloca modulul următor și a câștiga Edu Coins."})]}),s.jsx(zme,{moduleId:a.id,moduleTitle:a.title,moduleIndex:a.index,onPassed:()=>o(null),previousAttempt:h.find(_=>_.moduleId===a.id)||null})]})}):(o(null),null):s.jsx(xr,{children:s.jsxs("div",{className:"container max-w-4xl py-10",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx(b,{}),r&&s.jsx(r$,{})]}),s.jsxs(Le.div,{initial:{opacity:0,y:12}
2167,animate:{opacity:1,y:0},transition:{duration:.4},children:[l.imageUrl&&s.jsx("div",{className:"rounded-xl overflow-hidden mb-8",children:s.jsx("img",{src:l.imageUrl,alt:l.title,className:"w-full h-56 md:h-72 object-cover"})}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-4",children:[l.topics.map(_=>s.jsx(Hg,{topic:_},_)),s.jsx(tb,{level:l.difficultyLevel})]}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold tracking-tight mb-4",children:l.title}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mb-6 flex-wrap",children:[p>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(yr,{size:14})," ",p," lecții"]}),l.estimatedHours&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ki,{size:14})," ",l.estimatedHours,"h estimat"]}),s.jsx("span",{className:"flex items-center gap-1",children:l.priceType==="free"?s.jsx("span",{className:"text-primary font-semibold",children:"Gratuit"}):s.jsxs("span",{className:"flex items-center gap-1 font-semibold text-accent",children:[s.jsx(Ko,{size:14})," ",l.priceAmount," ",l.currency]})})]}),s.jsx("div",{className:"glass-card rounded-xl p-6 mb-8",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"font-heading font-semibold text-lg mb-1",children:l.priceType==="free"?"Începe gratuit acum":"Cumpără acest curs"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Previzualizare — butonul este dezactivat în modul preview."})]}),s.jsxs(me,{disabled:!0,size:"lg",className:"font-heading font-semibold",children:[s.jsx(Rr,{size:16}),l.priceType==="free"?"Înrolează-te gratuit":`Cumpără – ${l.priceAmount} ${l.currency}`]})]})}),l.description&&s.jsxs("div",{className:"mb-10",children:[s.jsx("h2",{className:"font-heading text-xl font-semibold mb-4",children:"Despre curs"}),s.jsx("div",{className:"text-foreground/85 leading-relaxed whitespace-pre-line",children:l.description})]}),u.length>0&&s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-xl font-semibold mb-4",children:"Curriculum"}),s.jsx(lo,{type:"multiple",className:"space-y-2",children:u.map((_,C)=>{const N=h.some(B=>B.moduleId===_.id&&B.passed),S=h.find(B=>B.moduleId===_.id),E=x(_.id),O=Gv(C,u.length);return s.jsxs(Os,{value:_.id,className:"border border-border rounded-lg px-4 bg-card/50",children:[s.jsx(Ls,{className:"text-left hover:no-underline",children:s.jsxs("div",{className:"flex items-center gap-3 w-full",children:[N&&s.jsx(hn,{size:14,className:"text-primary shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:O}),s.jsx("span",{className:"font-heading font-medium",children:_.title}),s.jsxs("span",{className:"text-xs text-muted-foreground ml-auto mr-4",children:[_.lessons.length," lecții"]})]})}),s.jsxs(Rs,{children:[s.jsx("ul",{className:"space-y-1 py-2",children:_.lessons.map((B,T)=>{const F=d.some(V=>V.lesson_id===B.id&&V.completed),I=A.get(B.id),D=(I==null?void 0:I.isPodcast)??B.title.startsWith("Podcast:"),L=(I==null?void 0:I.displayTitle)??B.title;return s.jsx("li",{children:s.jsxs("button",{onClick:()=>g(C,T),className:"w-full flex items-center gap-3 py-2.5 px-3 rounded-lg hover:bg-primary/5 transition-colors text-left group",children:[D?s.jsx(zv,{size:16,className:"text-accent shrink-0"}):F?s.jsx(hn,{size:16,className:"text-primary shrink-0"}):s.jsx(ya,{size:16,className:"text-primary shrink-0"}),s.jsx("span",{className:`text-sm flex-1 group-hover:text-primary transition-colors ${D?"italic":""} ${F?"text-muted-foreground":""}`,children:L}),s.jsx("span",{className:"text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded flex items-center gap-1",children:D?s.jsxs(s.Fragment,{children:[s.jsx(zv,{size:10})," 🎙 Podcast"]}):s.jsxs(s.Fragment,{children:[s.jsx(Pa,{size:10})," Video"]})}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[B.estimatedMinutes," min"]}),s.jsx(hs,{size:14,className:"text-muted-foreground/40 group-hover:text-primary transition-colors"})]})},B.id)})}),E&&s.jsx("div",{className:"border-t border-border/50 mt-2 pt-3 pb-2",children:N?s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 text-sm text-primary",children:[s.jsx(hn,{size:16}
2167),s.jsx("span",{className:"font-medium",children:"Quiz trecut"}),S&&s.jsxs("span",{className:"ml-auto text-xs text-muted-foreground flex items-center gap-1",children:[s.jsx(Wi,{size:12})," +",S.eduCoinsEarned," Edu Coins"]})]}):s.jsxs("button",{onClick:()=>o({id:_.id,title:_.title,index:C}),className:"w-full flex items-center gap-3 py-2.5 px-3 rounded-lg bg-primary/5 hover:bg-primary/10 transition-colors text-left group",children:[s.jsx(ms,{size:16,className:"text-primary shrink-0"}),s.jsxs("span",{className:"text-sm font-medium text-primary flex-1",children:["Quiz ",O," – ",f[_.id]||0," întrebări"]}),s.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[s.jsx(Wi,{size:12})," Câștigă Edu Coins"]}),s.jsx(hs,{size:14,className:"text-primary/50 group-hover:text-primary transition-colors"})]})})]})]},_.id)})})]})]})]})})}const nbt={rss:dE,api:Dr,scrape:qSe},ibt=()=>({id:crypto.randomUUID(),name:"",url:"",type:"rss",trust_score:7});function abt(e){if(!e)return"—";const r=new Date(e),i=new Date().getTime()-r.getTime(),a=Math.floor(i/6e4);if(a<1)return"chiar acum";if(a<60)return`acum ${a} min`;const o=Math.floor(a/60);if(o<24)return`acum ${o}h`;const l=Math.floor(o/24);return l<7?`acum ${l}z`:r.toLocaleDateString("ro-RO",{day:"numeric",month:"short"})}function sbt(){const{toast:e}=wn(),r=Kr(),[n,i]=w.useState([]),[a,o]=w.useState(!1),{data:l,isLoading:c}=Xe({queryKey:["admin-sources"],queryFn:async()=>{const{data:g,error:y}=await G.from("sources").select("*").order("created_at",{ascending:!1});if(y)throw y;return g}}),{data:u}=Xe({queryKey:["admin-source-feed-stats"],queryFn:async()=>{const{data:g,error:y}=await G.from("posts").select("source_id, created_at").not("source_id","is",null);if(y)throw y;const x={};return(g||[]).forEach(b=>{b.source_id&&(x[b.source_id]||(x[b.source_id]={count:0,lastImport:b.created_at}),x[b.source_id].count++,b.created_at>x[b.source_id].lastImport&&(x[b.source_id].lastImport=b.created_at))}),x}}),d=An({mutationFn:async({id:g,is_active:y})=>{const{error:x}=await G.from("sources").update({is_active:y}).eq("id",g);if(x)throw x},onSuccess:()=>r.invalidateQueries({queryKey:["admin-sources"]})}),h=An({mutationFn:async g=>{const{error:y}=await G.from("sources").delete().eq("id",g);if(y)throw y},onSuccess:()=>{r.invalidateQueries({queryKey:["admin-sources"]}),e({title:"Sursă ștearsă"})}}),f=()=>i(g=>[...g,ibt()]),p=g=>i(y=>y.filter(x=>x.id!==g)),m=(g,y,x)=>{i(b=>b.map(v=>v.id===g?{...v,[y]:x}:v))},A=async()=>{const g=n.filter(y=>y.name.trim()&&y.url.trim());if(!g.length){e({title:"Completează cel puțin o sursă",variant:"destructive"});return}o(!0);try{const{error:y}=await G.from("sources").insert(g.map(x=>({name:x.name.trim(),url:x.url.trim(),type:x.type,trust_score:x.trust_score})));if(y)throw y;e({title:`${g.length} surse adăugate cu succes`}),i([]),r.invalidateQueries({queryKey:["admin-sources"]})}catch(y){e({title:"Eroare",description:y.message,variant:"destructive"})}finally{o(!1)}};return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Înapoi la dashboard"]}),s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Management Surse"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(me,{variant:"outline",onClick:f,children:[s.jsx(Qn,{size:16})," Adaugă rând"]}),n.length>0&&s.jsxs(me,{onClick:A,disabled:a,children:[a?s.jsx(rt,{className:"animate-spin",size:16}):s.jsx(Bu,{size:16}),"Salvează ",n.length," surse"]})]})]}),n.length>0&&s.jsxs("div",{className:"glass-card rounded-xl overflow-hidden mb-6",children:[s.jsx("div",{className:"p-3 border-b border-border bg-primary/5",children:s.jsxs("p",{className:"text-sm font-medium",children:["Surse noi de adăugat (",n.length,")"]})}),s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{className:"w-[25%]",children:"Nume"}),s.jsx(Me,{className:"w-[35%]",children:"URL"}),s.jsx(Me,{className:"w-[12%]",children:"Tip"}),s.jsx(Me,{className:"w-[12%]",children:"Trust"}),s.jsx(Me,{className:"w-[60px]"})]})}),s.jsx(In,{children:n.map(g=>s.jsxs(Nt,{children:[s.jsx(Oe,{children:s.jsx(qe,{value:g.name,onChange:y=>m(g.id,"name",y.target.value),placeholder:"CoinDesk",className:"h-8"})}),s.jsx(Oe,{children:s.jsx(qe,{value:g.url,onChange:y=>m(g.id,"url",y.target.value),placeholder:"https://coindesk.com/rss",className:"h-8"})}),s.jsx(Oe,{children:s.jsxs(Cn,{value:g.type,onValueChange:y=>m(g.id,"type",y),children:[s.jsx(yn,{className:"h-8",children:s.jsx(Nn,{})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"rss",children:"RSS"}),s.jsx(_t,{value:"api",children:"API"}),s.jsx(_t,{value:"scrape",children:"Scraping"})]})]})}),s.jsx(Oe,{children:s.jsx(qe,{type:"number",min:1,max:10,value:g.trust_score,onChange:y=>m(g.id,"trust_score",Number(y.target.value)),className:"h-8 w-16"})}),s.jsx(Oe,{children:s.jsx(me,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>
2167p(g.id),children:s.jsx(Xr,{size:14,className:"text-destructive"})})})]},g.id))})]})]}),c?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):!(l!=null&&l.length)&&!n.length?s.jsxs("div",{className:"glass-card rounded-xl p-12 text-center",children:[s.jsx(dE,{className:"mx-auto mb-3 text-muted-foreground",size:40}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Nu există surse. Adaugă prima sursă."}),s.jsxs(me,{onClick:f,children:[s.jsx(Qn,{size:16})," Adaugă rând"]})]}):l!=null&&l.length?s.jsx("div",{className:"glass-card rounded-xl overflow-hidden",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Nume"}),s.jsx(Me,{children:"Tip"}),s.jsx(Me,{children:"Trust"}),s.jsx(Me,{children:"Feeduri importate"}),s.jsx(Me,{children:"Ultimul import"}),s.jsx(Me,{children:"Status"}),s.jsx(Me,{className:"text-right",children:"Acțiuni"})]})}),s.jsx(In,{children:l.map(g=>{const y=nbt[g.type]||dE,x=u==null?void 0:u[g.id];return s.jsxs(Nt,{children:[s.jsx(Oe,{children:s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:g.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate max-w-[300px]",children:g.url})]})}),s.jsx(Oe,{children:s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",children:[s.jsx(y,{size:12}),g.type==="rss"?"RSS":g.type==="api"?"API":"Scraping"]})}),s.jsx(Oe,{children:s.jsxs("span",{className:`font-mono text-sm font-semibold ${g.trust_score>=7?"text-primary":g.trust_score>=4?"text-yellow-500":"text-destructive"}`,children:[g.trust_score,"/10"]})}),s.jsx(Oe,{children:s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[s.jsx(us,{size:13,className:"text-muted-foreground"}),s.jsx("span",{className:"font-semibold",children:(x==null?void 0:x.count)??0}),s.jsx("span",{className:"text-muted-foreground text-xs",children:"articole"})]})}),s.jsx(Oe,{children:s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[s.jsx(ki,{size:12}),x?abt(x.lastImport):"Niciun import"]})}),s.jsx(Oe,{children:s.jsx("button",{onClick:()=>d.mutate({id:g.id,is_active:!g.is_active}),className:"inline-flex items-center gap-1 text-xs",children:g.is_active?s.jsxs(s.Fragment,{children:[s.jsx($U,{size:18,className:"text-primary"})," Activ"]}):s.jsxs(s.Fragment,{children:[s.jsx(UU,{size:18,className:"text-muted-foreground"})," Inactiv"]})})}),s.jsx(Oe,{className:"text-right",children:s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>{confirm("Ștergi sursa?")&&h.mutate(g.id)},children:s.jsx(Xr,{size:14,className:"text-destructive"})})})]},g.id)})})]})}):null]})})}var GT="Checkbox",[obt,zUt]=rs(GT),[lbt,GQ]=obt(GT);function cbt(e){const{__scopeCheckbox:r,checked:n,children:i,defaultChecked:a,disabled:o,form:l,name:c,onCheckedChange:u,required:d,value:h="on",internal_do_not_use_render:f}=e,[p,m]=nl({prop:n,defaultProp:a??!1,onChange:u,caller:GT}),[A,g]=w.useState(null),[y,x]=w.useState(null),b=w.useRef(!1),v=A?!!l||!!A.closest("form"):!0,j={checked:p,disabled:o,setChecked:m,control:A,setControl:g,name:c,form:l,value:h,hasConsumerStoppedPropagationRef:b,required:d,defaultChecked:Jm(a)?!1:a,isFormControl:v,bubbleInput:y,setBubbleInput:x};return s.jsx(lbt,{scope:r,...j,children:ubt(f)?f(j):i})}var gve="CheckboxTrigger",xve=w.forwardRef(({__scopeCheckbox:e,onKeyDown:r,onClick:n,...i},a)=>{const{control:o,value:l,disabled:c,checked:u,required:d,setControl:h,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:A}=GQ(gve,e),g=Mr(a,h),y=w.useRef(u);return w.useEffect(()=>{const x=o==null?void 0:o.form;if(x){const b=()=>f(y.current);return x.addEventListener("reset",b),()=>x.removeEventListener("reset",b)}},[o,f]),s.jsx(Rt.button,{type:"button",role:"checkbox","aria-checked":Jm(u)?"mixed":u,"aria-required":d,"data-state":jve(u),"data-disabled":c?"":void 0,disabled:c,value:l,...i,ref:g,onKeyDown:bt(r,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:bt(n,x=>{f(b=>Jm(b)?!0:!b),A&&m&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})})});xve.displayName=gve;var XQ=w.forwardRef((e,r)=>{const{__scopeCheckbox:n,name:i,checked:a,defaultChecked:o,required:l,disabled:c,value:u,onCheckedChange:d,form:h,...f}=e;return s.jsx(cbt,{__scopeCheckbox:n,checked:a,defaultChecked:o,disabled:c,required:l,onCheckedChange:d,name:i,form:h,value:u,internal_do_not_use_render:({isFormControl:p})=>s.jsxs(s.Fragment,{children:[s.jsx(xve,{...f,ref:r,__scopeCheckbox:n}),p&&s.jsx(wve,{__scopeCheckbox:n})]})})});XQ.displayName=GT;var yve="CheckboxIndicator",vve=w.forwardRef((e,r)=>{const{__scopeCheckbox:n,forceMount:i,...a}=e,o=GQ(yve,n);return s.jsx(cl,{present:i||Jm(o.checked)||o.checked===!0,children:s.jsx(Rt.span,{"data-state":jve(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:r,style:{pointerEvents:"none",...e.style}})})});vve.displayName=yve;var bve="CheckboxBubbleInput",wve=w.forwardRef(({__scopeCheckbox:e,...r},n)=>{const{control:i,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:l,required:c,disabled:u,name:d,value:h,form:f,bubbleInput:p,setBubbleInput:m}=GQ(bve,e),A=Mr(n,m),g=$T(o),y=A4(i);w.useEffect(()=>{const b=p;if(!b)return;const v=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(v,"checked").set,C=!a.current;if(g!==o&&_){const N=new Event("click",{bubbles:C});b.indeterminate=Jm(o),_.call(b,Jm(o)?!1:o),b.dispatchEvent(N)}},[p,g,o,a]);const x=w.useRef(Jm(o)?!1:o);return s.jsx(Rt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??x.current,required:c,disabled:u,name:d,value:h,form:f,...r,tabIndex:-1,ref:A,style:{...r.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});wve.displayName=bve;function ubt(e){return typeof e=="function"}function Jm(e){return e==="indeterminate"}function jve(e){return Jm(e)?"indeterminate":e?"checked":"unchecked"}const _ve=w.forwardRef(({className:e,...r},n)=>s.jsx(XQ,{ref:n,className:it("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:s.jsx(vve,{className:it("flex items-center justify-center text-current"),children:s.jsx(Bc,{className:"h-4 w-4"})})}));_ve.displayName=XQ.displayName;var Cve="AlertDialog",[dbt,UUt]=rs(Cve,[Bye]),vf=Bye(),Nve=e=>{const{__scopeAlertDialog:r,...n}=e,i=vf(r);return s.jsx(WQ,{...i,...n,modal:!0})};Nve.displayName=Cve;var hbt="AlertDialogTrigger",Sve=w.forwardRef((e,r)=>{const{__scopeAlertDialog:n,...i}=e,a=vf(n);return s.jsx(Wye,{...a,...i,ref:r})});Sve.displayName=hbt;var fbt="AlertDialogPortal",kve=e=>{const{__scopeAlertDialog:r,...n}=e,i=vf(r);return s.jsx(qQ,{...i,...n})};kve.displayName=fbt;var mbt="AlertDialogOverlay",Eve=w.forwardRef((e,r)=>{const{__scopeAlertDialog:n,...i}=e,a=vf(n);return s.jsx(U_,{...a,...i,ref:r})});Eve.displayName=mbt;var ov="AlertDialogContent",[pbt,Abt]=dbt(ov),gbt=yoe("AlertDialogContent"),Bve=w.forwardRef((e,r)=>{const{__scopeAlertDialog:n,children:i,...a}=e,o=vf(n),l=w.useRef(null),c=Mr(r,l),u=w.useRef(null);return s.jsx(Ayt,{contentName:ov,titleName:Tve,docsSlug:"alert-dialog",children:s.jsx(pbt,{scope:n,cancelRef:u,children:s.jsxs($_,{role:"alertdialog",...o,...a,ref:c,onOpenAutoFocus:bt(a.onOpenAutoFocus,d=>{var h;d.preventDefault(),(h=u.current)==null||h.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[s.jsx(gbt,{children:i}),s.jsx(ybt,{contentRef:l})]})})})});Bve.displayName=ov;var Tve="AlertDialogTitle",Pve=w.forwardRef((e,r)=>{const{__scopeAlertDialog:n,...i}=e,a=vf(n);return s.jsx(Q_,{...a,...i,ref:r})});Pve.displayName=Tve;var Ive="AlertDialogDescription",Fve=w.forwardRef((e,r)=>{const{__scopeAlertDialog:n,...i}=e,a=vf(n);return s.jsx(H_,{...a,...i,ref:r})});Fve.displayName=Ive;var xbt="AlertDialogAction",Ove=w.forwardRef((e,r)=>{const{__scopeAlertDialog:n,...i}=e,a=vf(n);return s.jsx(V_,{...a,...i,ref:r})});Ove.displayName=xbt;var Lve="AlertDialogCancel",Rve=w.forwardRef((e,r)=>{const{__scopeAlertDialog:n,...i}=e,{cancelRef:a}=Abt(Lve,n),o=vf(n),l=Mr(r,a);return s.jsx(V_,{...o,...i,ref:l})});Rve.displayName=Lve;var ybt=({contentRef:e})=>{const r=`\`${ov}\` requires a description for the component to be accessible for screen reader users.
2168
2169You can add a description to the \`${ov}\` by passing a \`${Ive}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
2170
2171Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ov}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
2172
2173For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return w.useEffect(()=>{var i;document.getElementById((i=e.current)==null?void 0:i.getAttribute("aria-describedby"))||console.warn(r)},[r,e]),null},vbt=Nve,bbt=Sve,wbt=kve,Dve=Eve,Mve=Bve,zve=Ove,Uve=Rve,$ve=Pve,Qve=Fve;const Hve=vbt,Vve=bbt,jbt=wbt,Wve=w.forwardRef(({className:e,...r},n)=>s.jsx(Dve,{className:it("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r,ref:n}));Wve.displayName=Dve.displayName;const YQ=w.forwardRef(({className:e,...r},n)=>s.jsxs(jbt,{children:[s.jsx(Wve,{}),s.jsx(Mve,{ref:n,className:it("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r})]}));YQ.displayName=Mve.displayName;const JQ=({className:e,...r})=>s.jsx("div",{className:it("flex flex-col space-y-2 text-center sm:text-left",e),...r});JQ.displayName="AlertDialogHeader";const ZQ=({className:e,...r})=>s.jsx("div",{className:it("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});ZQ.displayName="AlertDialogFooter";const e7=w.forwardRef(({className:e,...r},n)=>s.jsx($ve,{ref:n,className:it("text-lg font-semibold",e),...r}));e7.displayName=$ve.displayName;const t7=w.forwardRef(({className:e,...r},n)=>s.jsx(Qve,{ref:n,className:it("text-sm text-muted-foreground",e),...r}));t7.displayName=Qve.displayName;const r7=w.forwardRef(({className:e,...r},n)=>s.jsx(zve,{ref:n,className:it(n$(),e),...r}));r7.displayName=zve.displayName;const n7=w.forwardRef(({className:e,...r},n)=>s.jsx(Uve,{ref:n,className:it(n$({variant:"outline"}),"mt-2 sm:mt-0",e),...r}));n7.displayName=Uve.displayName;const _bt={raw:"Raw",draft:"Draft",published:"Publicat"};function ez(e,r){const n=e?new Date(e):new Date(r),a=Math.floor((new Date().getTime()-n.getTime())/(1e3*60*60*24));return a<=1?{score:5,label:"Foarte mare",color:"text-green-500"}:a<=7?{score:4,label:"Mare",color:"text-emerald-400"}:a<=14?{score:3,label:"Mediu",color:"text-yellow-500"}:a<=30?{score:2,label:"Scăzut",color:"text-orange-400"}:{score:1,label:"Foarte scăzut",color:"text-destructive"}}function Cbt(e){return e?new Date(e).toLocaleDateString("ro-RO",{day:"numeric",month:"short",year:"numeric"}):"—"}function Nbt(e){return e.word_count>=300&&!!e.image_url&&e.source_links.length>0}function Sbt({post:e,onDelete:r,selected:n,onToggleSelect:i,onPin:a}){const o=e.word_count>=300,l=!!e.image_url,c=e.source_links.length>0,u=ez(e.original_published_at,e.created_at),d=e.status==="published",h=Nbt(e),f=e.pinned_until&&new Date(e.pinned_until)>new Date;return s.jsxs("div",{className:`glass-card rounded-lg p-4 flex items-start justify-between gap-4 group ${f?"border-l-4 border-l-primary bg-primary/5":d?"border-l-4 border-l-primary/60":""}`,children:[!d&&s.jsx("div",{className:"pt-1 shrink-0",children:s.jsx(_ve,{checked:n,disabled:!h,onCheckedChange:()=>i(e.id),title:h?"Selectează pentru publicare":"Nu îndeplinește criteriile de publicare (min. 300 cuvinte, imagine, surse)"})}),d&&s.jsxs("div",{className:"pt-1 shrink-0 flex items-center gap-1",children:[s.jsxs(at,{variant:"default",className:"text-[10px] gap-1",children:[s.jsx(Xh,{size:10})," Publicat"]}),a&&s.jsx(me,{variant:"ghost",size:"icon",className:`h-7 w-7 ${f?"text-green-500 hover:text-green-600":"text-muted-foreground hover:text-primary"}`,onClick:p=>{p.stopPropagation(),a(e.id,!f)},title:f?"Dezfixează de pe prima pagină":"Fixează pe prima pagină 24h",children:s.jsx(cle,{size:13})})]}),s.jsxs(be,{to:`/admin/posts/${e.id}`,className:"flex-1 min-w-0 hover:opacity-80 transition-opacity",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[s.jsx(at,{variant:e.type==="ai_brief"?"default":"secondary",className:"text-[10px]",children:e.type==="ai_brief"?"AI Brief":"Agregat"}),e.topics.map(p=>s.jsx(at,{variant:"outline",className:"text-[10px]",children:p},p))]}),s.jsx("h3",{className:"font-heading font-semibold text-base truncate group-hover:text-primary transition-colors",children:e.title_ro}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-1",children:e.summary_ro}),s.jsxs("div",{className:"flex items-center gap-3 mt-2 text-xs text-muted-foreground flex-wrap",children:[s.jsxs("span",{className:`flex items-center gap-1 ${o?"text-primary":"text-destructive"}`,children:[o?s.jsx(Xh,{size:10}):s.jsx(Tu,{size:10}),e.word_count," cuvinte"]}),s.jsxs("span",{className:`flex items-center gap-1 ${l?"text-primary":"text-destructive"}`,children:[s.jsx(il,{size:10}),l?"Imagine":"Lipsă imagine"]}),s.jsx("span",{className:`flex items-center gap-1 ${c?"text-primary":"text-destructive"}`,children:c?`${e.source_links.length} surse`:"Lipsă surse"}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ja,{size:10}
2173),Cbt(e.original_published_at)]}),s.jsxs("span",{className:`flex items-center gap-1 font-semibold ${u.color}`,children:[s.jsx(oa,{size:10}),u.score,"/5 — ",u.label]})]})]}),e.image_url&&s.jsx("img",{src:e.image_url,alt:"",className:"w-20 h-14 rounded object-cover shrink-0"}),s.jsxs(Hve,{children:[s.jsx(Vve,{asChild:!0,children:s.jsx(me,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:p=>p.stopPropagation(),children:s.jsx(Xr,{size:16})})}),s.jsxs(YQ,{children:[s.jsxs(JQ,{children:[s.jsx(e7,{children:"Șterge articolul?"}),s.jsx(t7,{children:"Această acțiune nu poate fi anulată. Articolul va fi șters permanent."})]}),s.jsxs(ZQ,{children:[s.jsx(n7,{children:"Anulează"}),s.jsx(r7,{onClick:()=>r(e.id),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Șterge"})]})]})]})]})}function kbt({onAdded:e}){const[r,n]=w.useState(""),[i,a]=w.useState(""),[o,l]=w.useState(""),[c,u]=w.useState(!1),d=async()=>{if(!r.trim()){ft.error("Titlul este obligatoriu");return}u(!0);const h=r.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,100)+"-"+Date.now().toString(36),{error:f}=await G.from("posts").insert({title_ro:r.trim(),slug:h,summary_ro:i.trim()||null,original_url:o.trim()||null,source_links:o.trim()?[o.trim()]:[],status:"raw",type:"aggregated",word_count:0,topics:[],ai_generated:!1,original_published_at:new Date().toISOString()});if(u(!1),f){ft.error("Eroare: "+f.message);return}ft.success("Articol adăugat"),n(""),a(""),l(""),e()};return s.jsxs(sl,{children:[s.jsx(Ab,{asChild:!0,children:s.jsxs(me,{size:"sm",className:"gap-1",children:[s.jsx(Qn,{size:14})," Adaugă manual"]})}),s.jsxs(Po,{children:[s.jsx(ol,{children:s.jsx(ll,{children:"Adaugă articol manual"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(qe,{placeholder:"Titlu *",value:r,onChange:h=>n(h.target.value)}),s.jsx(fr,{placeholder:"Rezumat (opțional)",value:i,onChange:h=>a(h.target.value),rows:3}),s.jsx(qe,{placeholder:"URL sursă (opțional)",value:o,onChange:h=>l(h.target.value)})]}),s.jsxs(gb,{children:[s.jsx($0t,{asChild:!0,children:s.jsx(me,{variant:"outline",children:"Anulează"})}),s.jsx(me,{onClick:d,disabled:c,children:c?s.jsx(rt,{className:"animate-spin",size:14}):"Adaugă"})]})]})]})}const Ebt={"date-desc":"Dată ↓ (cele mai noi)","date-asc":"Dată ↑ (cele mai vechi)","interest-desc":"Interes ↓ (cel mai mare)","interest-asc":"Interes ↑ (cel mai mic)"};function Bbt(e,r){return[...e].sort((n,i)=>{if(r==="date-desc"||r==="date-asc"){const l=new Date(n.original_published_at||n.created_at).getTime(),c=new Date(i.original_published_at||i.created_at).getTime();return r==="date-desc"?c-l:l-c}const a=ez(n.original_published_at,n.created_at).score,o=ez(i.original_published_at,i.created_at).score;return r==="interest-desc"?o-a:a-o})}function Tbt(){const e=Kr(),[r,n]=w.useState("interest-desc"),[i,a]=w.useState(""),[o,l]=w.useState(new Set),[c,u]=w.useState(!1),[d,h]=w.useState(!1),f=async()=>{if(o.size!==0){h(!0);try{const{data:C,error:N}=await G.functions.invoke("generate-ai-brief",{body:{specificPostIds:[...o]}});if(N)throw N;ft.success(`AI Brief generat: ${(C==null?void 0:C.generated)||0} articol(e) procesate`),l(new Set),e.invalidateQueries({queryKey:["admin-posts"]})}catch(C){ft.error("Eroare generare AI Brief: "+(C.message||"necunoscută"))}finally{h(!1)}}},{data:p,isLoading:m}=Xe({queryKey:["admin-posts"],queryFn:async()=>{const{data:C,error:N}=await G.from("posts").select("*").order("created_at",{ascending:!1});if(N)throw N;return C}}),A=An({mutationFn:async C=>{const{error:N}=await G.from("posts").delete().eq("id",C);if(N)throw N},onSuccess:()=>{ft.success("Articol șters"),e.invalidateQueries({queryKey:["admin-posts"]})},onError:C=>ft.error("Eroare: "+C.message)}),g=async(C,N)=>{const S=N?new Date(Date.now()+864e5).toISOString():null,{error:E}=await G.from("posts").update({pinned_until:S}).eq("id",C);if(E){ft.error("Eroare: "+E.message);return}ft.success(N?"Articol fixat pe prima pagină 24h":"Articol dezfixat"),e.invali
2173dateQueries({queryKey:["admin-posts"]}),e.invalidateQueries({queryKey:["published-posts"]})},y=C=>{l(N=>{const S=new Set(N);return S.has(C)?S.delete(C):S.add(C),S})},x=async()=>{if(o.size===0)return;u(!0);let C=0,N=[];for(const S of o){const{error:E}=await G.from("posts").update({status:"published"}).eq("id",S);E?N.push(E.message):C++}if(C>0)try{const{data:{user:S}}=await G.auth.getUser();if(S)for(const E of o){const{data:O}=await G.from("edu_coin_transactions").select("id").eq("user_id",S.id).eq("reason","article_published").eq("reference_id",E).maybeSingle();if(!O){const{data:B}=await G.from("user_edu_coins").select("*").eq("user_id",S.id).maybeSingle();B?await G.from("user_edu_coins").update({balance:B.balance+20,total_earned:B.total_earned+20}).eq("user_id",S.id):await G.from("user_edu_coins").insert({user_id:S.id,balance:20,total_earned:20}),await G.from("edu_coin_transactions").insert({user_id:S.id,amount:20,reason:"article_published",reference_id:E})}}}catch{}u(!1),C>0&&(ft.success(`${C} articol(e) publicate cu succes (+${C*20} EduCoins)`),l(new Set),e.invalidateQueries({queryKey:["admin-posts"]})),N.length>0&&ft.error(`${N.length} erori: ${N[0]}`)},b=C=>{if(!i.trim())return C;const N=i.toLowerCase();return C.filter(S=>S.title_ro.toLowerCase().includes(N)||S.summary_ro&&S.summary_ro.toLowerCase().includes(N)||S.topics.some(E=>E.toLowerCase().includes(N)))},v=C=>b(Bbt((p==null?void 0:p.filter(N=>N.status===C))??[],r)),j=()=>{const C=["interest-desc","interest-asc","date-desc","date-asc"];n(C[(C.indexOf(r)+1)%C.length])},_=[...o].filter(C=>{const N=p==null?void 0:p.find(S=>S.id===C);return N&&N.status!=="published"});return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Înapoi la dashboard"]}),s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Articole"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(me,{variant:"outline",size:"sm",className:"gap-1 text-xs",onClick:j,children:[s.jsx(Woe,{size:14})," ",Ebt[r]]}),s.jsx(kbt,{onAdded:()=>e.invalidateQueries({queryKey:["admin-posts"]})})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-6",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(ul,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută articole după titlu, rezumat sau topic...",value:i,onChange:C=>a(C.target.value),className:"pl-10"})]}),_.length>0&&s.jsxs("div",{className:"flex gap-2 shrink-0",children:[s.jsxs(me,{onClick:f,disabled:d,variant:"outline",className:"gap-1",children:[d?s.jsx(rt,{size:14,className:"animate-spin"}):s.jsx(Li,{size:14}),"Generează AI Brief (",_.length,")"]}),s.jsxs(me,{onClick:x,disabled:c,className:"gap-1",children:[c?s.jsx(rt,{size:14,className:"animate-spin"}):s.jsx(Dc,{size:14}),"Publică ",_.length," articol(e)"]})]})]}),m?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):s.jsxs(Gi,{defaultValue:"raw",children:[s.jsxs(Ri,{className:"mb-6",children:[s.jsxs(Mt,{value:"raw",children:["Raw (",v("raw").length,")"]}),s.jsxs(Mt,{value:"draft",children:["Draft (",v("draft").length,")"]}),s.jsxs(Mt,{value:"published",children:["Publicat (",v("published").length,")"]})]}),["raw","draft","published"].map(C=>s.jsx(er,{value:C,children:v(C).length===0?s.jsxs("div",{className:"glass-card rounded-xl p-12 text-center",children:[s.jsx(us,{className:"mx-auto mb-3 text-muted-foreground",size:40}),s.jsxs("p",{className:"text-muted-foreground",children:["Niciun articol ",_bt[C].toLowerCase(),"."]})]}):s.jsx("div",{className:"space-y-3",children:v(C).map(N=>s.jsx(Sbt,{post:N,onDelete:S=>A.mutate(S),selected:o.has(N.id),onToggleSelect:y,onPin:N.status==="published"?g:void 0},N.id))})},C))]})]})})}const Pbt=["web3","blockchain","nft","validare-nft","ai","digital-marketing","e-learning"];function Ibt(){var x,b,v,j;const{id:e}=Zl(),r=As(),{toast:n}=wn(),i=Kr(),{data:a,isLoading:o}=Xe({queryKey:["admin-post",e],queryFn:async()=>{const{data:_,error:C}=await G.from("posts").select("*").eq("id",e).single();if(C)throw C;return _},enabled:!!e}),{data:l=[]}=Xe({queryKey:["authors-list"],queryFn:async()=>{const{data:_,error:C}=await G.from("authors").select("id, first_name, last_name").order("last_name");if(C)throw C;return _||[]}}),[c,u]=w.useState(null),d=c||a,h=(_,C)=>{u(N=>({...N||a,[_]:C}))},f=_=>_.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").slice(0,80),p=An({mutationFn:async _=>
2173{const C=(_.body_ro||"").split(/\s+/).filter(Boolean).length;let N=_.slug_en||null;!N&&_.title_en&&(N=f(_.title_en));const{error:S}=await G.from("posts").update({title_ro:_.title_ro,summary_ro:_.summary_ro,body_ro:_.body_ro,title_en:_.title_en||null,summary_en:_.summary_en||null,body_en:_.body_en||null,meta_title:_.meta_title||null,meta_description:_.meta_description||null,meta_title_en:_.meta_title_en||null,meta_description_en:_.meta_description_en||null,image_url:_.image_url,image_alt_text:_.image_alt_text,topics:_.topics,difficulty_level:_.difficulty_level,editorial_reviewed:_.editorial_reviewed,word_count:C,author_id:_.author_id||null,slug_en:N}).eq("id",e);if(S)throw S},onSuccess:()=>{i.invalidateQueries({queryKey:["admin-post",e]}),i.invalidateQueries({queryKey:["admin-posts"]}),n({title:"Salvat cu succes"})},onError:_=>{n({title:"Eroare",description:_.message,variant:"destructive"})}}),m=An({mutationFn:async()=>{const _=((d==null?void 0:d.body_ro)||"").split(/\s+/).filter(Boolean).length,{error:C}=await G.from("posts").update({title_ro:d==null?void 0:d.title_ro,summary_ro:d==null?void 0:d.summary_ro,body_ro:d==null?void 0:d.body_ro,image_url:d==null?void 0:d.image_url,image_alt_text:d==null?void 0:d.image_alt_text,topics:d==null?void 0:d.topics,difficulty_level:d==null?void 0:d.difficulty_level,editorial_reviewed:!0,word_count:_,status:"published",author_id:(d==null?void 0:d.author_id)||null}).eq("id",e);if(C)throw C},onSuccess:()=>{i.invalidateQueries({queryKey:["admin-post",e]}),i.invalidateQueries({queryKey:["admin-posts"]}),n({title:"Articol publicat!"}),r("/admin/posts")},onError:_=>{n({title:"Eroare la publicare",description:_.message,variant:"destructive"})}});if(o)return s.jsx(xr,{children:s.jsx("div",{className:"container py-10 flex justify-center",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})})});if(!d)return s.jsx(xr,{children:s.jsx("div",{className:"container py-10 text-center",children:s.jsx("p",{className:"text-muted-foreground",children:"Articol negăsit."})})});const A=(d.body_ro||"").split(/\s+/).filter(Boolean).length,g=d.type==="editorial",y=A>=300&&d.image_url&&(g||(((x=d.source_links)==null?void 0:x.length)||0)>0);return s.jsx(xr,{children:s.jsxs("div",{className:"container max-w-4xl py-10",children:[s.jsxs(be,{to:"/admin/posts",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Înapoi la articole"]}),s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-2xl font-bold",children:"Editare articol"}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium ${d.status==="published"?"bg-primary/15 text-primary":d.status==="draft"?"bg-yellow-500/15 text-yellow-600":"bg-muted text-muted-foreground"}`,children:d.status}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[A," cuvinte"]}),d.ai_generated&&s.jsx("span",{className:"text-xs text-accent",children:"✨ AI Generated"})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(me,{variant:"outline",onClick:()=>p.mutate(d),disabled:p.isPending,children:[p.isPending?s.jsx(rt,{className:"animate-spin",size:14}):s.jsx(Bu,{size:14}),"Salvează"]}),d.status!=="published"&&s.jsxs(me,{onClick:()=>m.mutate(),disabled:m.isPending||!y,title:y?"":"Necesită: min 300 cuvinte, imagine, cel puțin o sursă",children:[m.isPending?s.jsx(rt,{className:"animate-spin",size:14}):s.jsx(Dc,{size:14}),"Publică"]})]})]}),!y&&d.status!=="published"&&s.jsxs("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg px-4 py-3 text-sm text-destructive mb-6",children:[s.jsx("strong",{children:"Nu poate fi publicat:"}),A<300&&` ${A}/300 cuvinte.`,!d.image_url&&" Lipsește imaginea.",!g&&!((b=d.source_links)!=null&&b.length)&&" Lipsesc sursele."]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Gi,{defaultValue:"ro",className:"w-full",children:[s.jsxs(Ri,{className:"mb-4",children:[s.jsx(Mt,{value:"ro",children:"🇷🇴 Română"}),s.jsxs(Mt,{value:"en",className:"gap-1",children:[s.jsx(Dr,{size:14})," English"]})]}),s.jsxs(er,{value:"ro",className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Titlu (RO)"}),s.jsx(qe,{value:d.title_ro||"",onChange:_=>h("title_ro",_.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Ge,{children:["Meta Title (RO) ",s.jsx("span",{className:"text-xs text-muted-foreground",children:"max 60 car."})]}),s.jsx(qe,{value:d.meta_title||"",onChange:_=>h("meta_title",_.target.value.slice(0,60)),maxLength:60})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Rezumat (RO)"}),s.jsx(fr,{rows:3,value:d.summary_ro||"",onChange:_=>h("summary_ro",_.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Ge,{children:["Meta Description (RO) ",s.jsx("span",{className:"text-xs text-muted-foreground",children:"max 158 car."})]}),s.jsx(fr,{rows:2,value:d.meta_description||"",onChange:_=>h("meta_description",_.target.value.slice(0,158)),maxLength:158})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Conținut (RO — Markdown)"}),s.jsx(fr,{rows:20,className:"font-mono text-sm",value:d.body_ro||"",onChange:_=>h("body_ro",_.target.value)})]})]}),s.jsxs(er,{value:"en",className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Title (EN)"}),s.jsx(qe,{value:d.title_en||"",onChange:_=>{h("title_en",_.target.value),(!d.slug_en||d._autoSlugEn)&&(h("slug_en",f(_.target.value)),h("_autoSlugEn",!0))},placeholder:"English title..."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Ge,{children:["Slug EN ",s.jsx("span",{className:"text-xs text-muted-foreground",children:"URL: /article/[slug]"})]}),s.jsx(qe,{value:d.slug_en||"",onChange:_=>{h("slug_en",_.target.value),h("_autoSlugEn",!1)},placeholder:"english-slug-here"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Ge,{children:["Meta Title (EN) ",s.jsx("span",{className:"text-xs text-muted-foreground",children:"max 60 chars"})]}),s.jsx(qe,{value:d.meta_title_en||"",onChange:_=>h("meta_title_en",_.target.value.slice(0,60)),maxLength:60,placeholder:"SEO title in English..."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Summary (EN)"}),s.jsx(fr,{rows:3,value:d.summary_en||"",onChange:_=>h("summary_en",_.target.value),placeholder:"English summary..."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Ge,{children:["Meta Description (EN) ",s.jsx("span",{className:"text-xs text-muted-foreground",children:"max 158 chars"})]}),s.jsx(fr,{rows:2,value:d.meta_description_en||"",onChange:_=>h("meta_description_en",_.target.value.slice(0,158)),maxLength:158,placeholder:"SEO description in English..."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Content (EN — Markdown)"}),s.jsx(fr,{rows:20,className:"font-mono text-sm",value:d.body_en||"",onChange:_=>h("body_en",_.target.value),placeholder:"English content..."})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"URL Imagine"}),s.jsx(qe,{value:d.image_url||"",onChange:_=>h("image_url",_.target.value),placeholder:"https://..."}),d.image_url&&s.jsx("img",{src:d.image_url,alt:"Preview",className:"mt-2 rounded-lg max-h-48 object-cover"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Alt text imagine"}),s.jsx(qe,{value:d.image_alt_text||"",onChange:_=>h("image_alt_text",_.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Topicuri"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Pbt.map(_=>{var N;const C=(N=d.topics)==null?void 0:N.includes(_);return s.jsx("button",{type:"button",onClick:()=>{const S=d.topics||[];h("topics",C?S.filter(E=>E!==_):[...S,_])},className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all ${C?"bg-primary text-primary-foreground":"bg-card border border-border text-muted-foreground hover:text-foreground"}`,children:_},_)})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Nivel de dificultate"}),s.jsxs(Cn,{value:d.difficulty_level,onValueChange:_=>h("difficulty_level",_),children:[s.jsx(yn,{className:"w-48",children:s.jsx(Nn,{})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"începător",children:"Începător"}),s.jsx(_t,{value:"intermediar",children:"Intermediar"}),s.jsx(_t,{value:"avansat",children:"Avansat"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Autor"}),s.jsxs(Cn,{value:(d==null?void 0:d.author_id)||"none",onValueChange:_=>h("author_id",_==="none"?null:_),children:[s.jsx(yn,{className:"w-64",children:s.jsx(Nn,{placeholder:"Fără autor"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"none",children:"Fără autor (EduWeb)"}),l.map(_=>s.jsxs(_t,{value:_.id,children:[_.first_name," ",_.last_name]},_.id))]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Ge,{children:["Surse (",((v=d.source_links)==null?void 0:v.length)||0,")"]}),(j=d.source_links)==null?void 0:j.map((_,C)=>s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:s.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary",children:_})},C)),d.original_url&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["URL original: ",s.jsx("a",{href:d.original_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:d.original_url})]})]})]})]})})}const Fbt=["blockchain","web3","nft","validare-nft","ai","digital-marketing","e-learning"];function Obt(e){return e?new Date(e).toLocaleDateString("ro-RO",{day:"2-digit",month:"short",year:"numeric"}):"—"}function Lbt(e){return e?new Date(e).toLocaleDateString("ro-RO",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}const S1=50;function Rbt(){const[e,r]=w.useState("all"),[n,i]=w.useState(""),[a,o]=w.useState(1),[l,c]=w.useState(null),[u,d]=w.useState(null),h=Kr(),{data:f,isLoading:p}=Xe({queryKey:["admin-published-posts"],queryFn:async()=>{const{data:b,error:v}=await G.from("posts").select("*").eq("status","published").order("published_at",{ascending:!1});if(v)throw v;return b}}),{data:m}=Xe({queryKey:["admin-view-counts"],queryFn:async()=>{const{data:b,error:v}=await G.from("post_views").select("post_id");if(v)throw v;const j={};
2173return(b||[]).forEach(_=>{j[_.post_id]=(j[_.post_id]||0)+1}),j}}),A=An({mutationFn:async b=>{const{error:v}=await G.from("posts").delete().eq("id",b);if(v)throw v},onSuccess:()=>{ft.success("Articol șters"),h.invalidateQueries({queryKey:["admin-published-posts"]}),h.invalidateQueries({queryKey:["admin-posts"]})},onError:b=>ft.error("Eroare: "+b.message)}),g=An({mutationFn:async({id:b,pin:v})=>{const j=v?new Date(Date.now()+864e5).toISOString():null,{error:_}=await G.from("posts").update({pinned_until:j}).eq("id",b);if(_)throw _},onSuccess:(b,{pin:v})=>{ft.success(v?"Articol fixat pe prima pagină 24h":"Articol dezfixat"),h.invalidateQueries({queryKey:["admin-published-posts"]}),h.invalidateQueries({queryKey:["published-posts"]})},onError:b=>ft.error("Eroare: "+b.message)}),y=async b=>{c(b);try{const{data:v,error:j}=await G.functions.invoke("generate-video-brief",{body:{post_id:b}});if(j)throw j;v!=null&&v.success?(ft.success("Video generat cu succes!"),h.invalidateQueries({queryKey:["admin-published-posts"]})):ft.error((v==null?void 0:v.error)||"Eroare la generare video")}catch(v){ft.error("Eroare: "+(v.message||"Necunoscută"))}finally{c(null)}},x=async b=>{var v;d(b);try{const{data:j,error:_}=await G.functions.invoke("update-images",{body:{post_id:b}});if(_)throw _;j!=null&&j.success&&(j==null?void 0:j.updated)>0?(ft.success("Imagine regenerată cu succes!"),h.invalidateQueries({queryKey:["admin-published-posts"]})):ft.error(((v=j==null?void 0:j.errors)==null?void 0:v[0])||"Nu s-a putut regenera imaginea")}catch(j){ft.error("Eroare: "+(j.message||"Necunoscută"))}finally{d(null)}};return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Înapoi la dashboard"]}),s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Articole publicate"}),s.jsxs(at,{variant:"secondary",className:"text-sm",children:[(f==null?void 0:f.length)??0," articole"]})]}),s.jsx("div",{className:"flex items-center gap-3 mb-6",children:s.jsxs("div",{className:"relative flex-1 max-w-sm",children:[s.jsx(ul,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută articol după titlu...",value:n,onChange:b=>{i(b.target.value),o(1)},className:"pl-9 pr-8 h-9 text-sm"}),n&&s.jsx("button",{onClick:()=>{i(""),o(1)},className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:s.jsx(Uc,{size:14})})]})}),s.jsxs("div",{className:"flex items-center gap-2 mb-6 flex-wrap",children:[s.jsx(y_,{size:14,className:"text-muted-foreground"}),s.jsx(me,{variant:e==="all"?"default":"outline",size:"sm",onClick:()=>{r("all"),o(1)},className:"text-xs h-7",children:"Toate"}),Fbt.map(b=>{const v=(f==null?void 0:f.filter(j=>j.topics.includes(b)).length)??0;return v===0?null:s.jsxs(me,{variant:e===b?"default":"outline",size:"sm",onClick:()=>{r(b),o(1)},className:"text-xs h-7 gap-1",children:[vg[b],s.jsxs("span",{className:"text-[10px] opacity-70",children:["(",v,")"]})]},b)})]}),p?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):f!=null&&f.length?(()=>{const b=e==="all"?f:f.filter(N=>N.topics.includes(e)),v=n.trim()?b.filter(N=>N.title_ro.toLowerCase().includes(n.toLowerCase())||N.title_en&&N.title_en.toLowerCase().includes(n.toLowerCase())):b;if(v.length===0)return s.jsx("p",{className:"text-muted-foreground text-center py-12",children:"Niciun articol găsit."});const j=Math.ceil(v.length/S1),_=Math.min(a,j),C=v.slice((_-1)*S1,_*S1);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"glass-card rounded-xl overflow-hidden",children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{className:"w-[50px] text-center",children:"📌"}),s.jsx(Me,{className:"min-w-[280px]",children:"Titlu"}),s.jsx(Me,{className:"min-w-[100px]",children:"Data originală"}),s.jsx(Me,{className:"min-w-[130px]",children:"Publicat"}),s.jsx(Me,{className:"min-w-[100px]",children:"Categorie"}),s.jsx(Me,{className:"min-w-[90px] text-center",children:"Video"}),s.jsx(Me,{className:"min-w-[70px] text-center",children:"Imagine"}),s.jsx(Me,{className:"min-w-[60px] text-right",children:"Vizite"}),s.jsx(Me,{className:"w-[50px]"})]})}),s.jsx(In,{children:C.map(N=>{const S=(m==null?void 0:m[N.id])??0,E=N.video_audio_url&&N.video_status==="ready",O=l===N.id,B=N.video_status==="generating",T=u===N.id,F=N.pinned_until&&new Date(N.pinned_until)>new Date;return s.jsxs(Nt,{className:`group ${F?"bg-primary/5":""}`,children:[s.jsx(Oe,{className:"text-center",children:s.jsx(me,{variant:"ghost",size:"icon",className:`h-8 w-8 ${F?"text-primary":"text-muted-foreground hover:text-primary"}`,onClick:()=>g.mutate({id:N.id,pin:!F}),title:F?"Dezfixează de pe prima pagină":"Fixează pe prima pagină 24h",children:F?s.jsx(f
2173ke,{size:14}):s.jsx(cle,{size:14})})}),s.jsxs(Oe,{children:[s.jsx(be,{to:`/admin/posts/${N.id}`,className:"font-medium text-sm hover:text-primary transition-colors line-clamp-2",children:N.title_ro}),N.original_url&&s.jsxs("a",{href:N.original_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-primary mt-0.5",children:[s.jsx(Yr,{size:9})," Sursă"]})]}),s.jsx(Oe,{className:"text-sm text-muted-foreground",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(Ja,{size:12}),Obt(N.original_published_at)]})}),s.jsx(Oe,{className:"text-sm text-muted-foreground",children:Lbt(N.published_at)}),s.jsx(Oe,{children:s.jsx("div",{className:"flex flex-wrap gap-1",children:N.topics.map(I=>s.jsx(at,{variant:"outline",className:"text-[10px]",children:vg[I]||I},I))})}),s.jsx(Oe,{className:"text-center",children:E?s.jsxs(at,{variant:"default",className:"text-[10px] gap-1",children:[s.jsx(Pa,{size:10})," Da"]}):O||B?s.jsxs("div",{className:"flex items-center justify-center gap-1 text-xs text-muted-foreground",children:[s.jsx(rt,{size:12,className:"animate-spin"}),s.jsx("span",{children:"Se generează..."})]}):s.jsxs(me,{variant:"outline",size:"sm",className:"text-[10px] h-6 gap-1 px-2",onClick:()=>y(N.id),children:[s.jsx(Pa,{size:10})," Generează"]})}),s.jsx(Oe,{className:"text-center",children:s.jsxs(me,{variant:"ghost",size:"sm",className:"text-[10px] h-6 gap-1 px-2 text-muted-foreground hover:text-primary",onClick:()=>x(N.id),disabled:T,children:[T?s.jsx(rt,{size:10,className:"animate-spin"}):s.jsx(ef,{size:10}),N.image_url?"Schimbă":"Generează"]})}),s.jsx(Oe,{className:"text-right",children:s.jsxs("span",{className:"inline-flex items-center gap-1 text-sm font-medium",children:[s.jsx(Oi,{size:13,className:"text-muted-foreground"}),S]})}),s.jsx(Oe,{children:s.jsxs(Hve,{children:[s.jsx(Vve,{asChild:!0,children:s.jsx(me,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive h-8 w-8",children:s.jsx(Xr,{size:14})})}),s.jsxs(YQ,{children:[s.jsxs(JQ,{children:[s.jsx(e7,{children:"Șterge articolul publicat?"}),s.jsx(t7,{children:"Articolul va fi șters permanent și nu va mai fi vizibil pe site."})]}),s.jsxs(ZQ,{children:[s.jsx(n7,{children:"Anulează"}),s.jsx(r7,{onClick:()=>A.mutate(N.id),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Șterge"})]})]})]})})]},N.id)})})]})})}),j>1&&s.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6",children:[s.jsx(me,{variant:"outline",size:"sm",disabled:_<=1,onClick:()=>o(_-1),children:"← Anterior"}),Array.from({length:j},(N,S)=>S+1).map(N=>s.jsx(me,{variant:N===_?"default":"outline",size:"sm",className:"min-w-[2rem]",onClick:()=>o(N),children:N},N)),s.jsx(me,{variant:"outline",size:"sm",disabled:_>=j,onClick:()=>o(_+1),children:"Următor →"}),s.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:[(_-1)*S1+1,"–",Math.min(_*S1,v.length)," din ",v.length]})]})]})})():s.jsx("p",{className:"text-muted-foreground text-center py-12",children:"Niciun articol publicat."})]})})}function Dbt(){const{toast:e}=wn(),r=Kr(),[n,i]=w.useState(null),[a,o]=w.useState(""),[l,c]=w.useState(""),{data:u,isLoading:d}=Xe({queryKey:["site-rules"],queryFn:async()=>{const{data:y,error:x}=await G.from("site_rules").select("*").order("category",{ascending:!0}).order("key",{ascending:!0});if(x)throw x;return y}}),h=An({mutationFn:async({id:y,value:x,description:b})=>{const{error:v}=await G.from("site_rules").update({value:x,description:b}).eq("id",y);if(v)throw v},onSuccess:()=>{r.invalidateQueries({queryKey:["site-rules"]}),i(null),e({title:"Regulă actualizată"})},onError:y=>e({title:"Eroare",description:y.message,variant:"destructive"})}),f=y=>{i(y.id),o(y.value),c(y.description||"")},p=()=>i(null),m=y=>{h.mutate({id:y,value:a,description:l})},A=(u||[]).reduce((y,x)=>((y[x.category]=y[x.category]||[]).push(x),y),{}),g=["Preluare RSS","Generare conținut","Publicare","Drepturi autor","Categorisire","Video"];return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-4xl",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx(be,{to:"/admin",children:s.jsx(me,{variant:"ghost",size:"icon",children:s.jsx(rn,{size:18})})}),s.jsx(ule,{className:"text-primary",size:24}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-2xl font-bold",children:"Reguli & Configurări Site"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Controlează toate regulile de preluare, procesare și publicare a conținutului."})]})]}),d?s.jsx("p",{className:"text-muted-foreground",children:"Se încarcă..."}):s.jsx("div",{className:"space-y-8",children:g.map(y=>{const x=A[y];return x!=null&&x.length?s.jsxs("div",{className:"glass-card rounded-xl p-6",children:[s.jsx("h2",{className:"font-heading text-lg font-semibold mb-4 text-primary",children:y}),s.jsx("div",{className:"space-y-4",children:x.map(b=>s.jsx("div",{className:"border border-border rounded-lg p-4",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium text-sm",children:b.label}),n===b.id?s.jsxs("div",{className:"mt-2 space-y-2",children:[s.jsx(qe,{value:a,onChange:v=>o(v.target.value),className:"text-sm"}
2173),s.jsx(fr,{value:l,onChange:v=>c(v.target.value),placeholder:"Descriere...",className:"text-sm min-h-[60px]"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(me,{size:"sm",onClick:()=>m(b.id),disabled:h.isPending,children:[s.jsx(Bc,{size:14})," Salvează"]}),s.jsxs(me,{size:"sm",variant:"ghost",onClick:p,children:[s.jsx(Uc,{size:14})," Anulează"]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-base font-semibold mt-1",children:b.value}),b.description&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:b.description}),s.jsxs("p",{className:"text-xs text-muted-foreground/60 mt-1",children:["Actualizat: ",new Date(b.updated_at).toLocaleString("ro-RO")]})]})]}),n!==b.id&&s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>f(b),className:"shrink-0",children:s.jsx(wp,{size:14})})]})},b.id))})]},y):null})})]})})}const CF={first_name:"",last_name:"",title:"",avatar_url:"",bio:"",linkedin_url:"",twitter_url:"",website_url:""};function Mbt(e){return e.toLowerCase().replace(/[^a-z0-9ăîșțâ\s-]/g,"").replace(/\s+/g,"-").slice(0,80)}function zbt(){const{toast:e}=wn(),r=Kr(),[n,i]=w.useState(!1),[a,o]=w.useState(null),[l,c]=w.useState(CF),[u,d]=w.useState(!1),[h,f]=w.useState(null),[p,m]=w.useState(""),{data:A=[],isLoading:g}=Xe({queryKey:["admin-authors"],queryFn:async()=>{const{data:S,error:E}=await G.from("authors").select("*").order("last_name");if(E)throw E;return S}}),{data:y={}}=Xe({queryKey:["author-view-counts"],queryFn:async()=>{const{data:S}=await G.from("posts").select("author_id").eq("status","published").not("author_id","is",null);if(!(S!=null&&S.length))return{};[...new Set(S.map(F=>F.author_id))];const{data:E}=await G.from("post_view_counts").select("post_id, view_count"),{data:O}=await G.from("posts").select("id, author_id").eq("status","published").not("author_id","is",null),B=new Map((E||[]).map(F=>[F.post_id,F.view_count||0])),T={};for(const F of O||[]){const I=F.author_id;I&&(T[I]=(T[I]||0)+(B.get(F.id)||0))}return T}}),{data:x={}}=Xe({queryKey:["author-article-counts"],queryFn:async()=>{const{data:S}=await G.from("posts").select("author_id").eq("status","published").not("author_id","is",null),E={};for(const O of S||[]){const B=O.author_id;B&&(E[B]=(E[B]||0)+1)}return E}}),{data:b=[],isLoading:v}=Xe({queryKey:["author-articles-views",h],enabled:!!h,queryFn:async()=>{const{data:S}=await G.from("post_view_counts").select("post_id, view_count").order("view_count",{ascending:!1});if(!(S!=null&&S.length))return[];const E=new Set,O={};let B=0;const T=1e3;for(;;){const{data:L}=await G.from("posts").select("id, title_ro, slug, published_at").eq("status","published").eq("author_id",h).range(B,B+T-1);if(!(L!=null&&L.length))break;for(const V of L)E.add(V.id),O[V.id]={title:V.title_ro||"",slug:V.slug,published_at:V.published_at};if(L.length<T)break;B+=T}const F=S.filter(L=>E.has(L.post_id)).map(L=>{var V,U,Q;return{id:L.post_id,title:((V=O[L.post_id])==null?void 0:V.title)||"",slug:((U=O[L.post_id])==null?void 0:U.slug)||"",published_at:((Q=O[L.post_id])==null?void 0:Q.published_at)||null,views:L.view_count||0}}),I=new Set(F.map(L=>L.id)),D=Object.entries(O).filter(([L])=>!I.has(L)).map(([L,V])=>({id:L,title:V.title,slug:V.slug,published_at:V.published_at,views:0})).sort((L,V)=>(V.published_at||"").localeCompare(L.published_at||"")).slice(0,50);return[...F,...D]}}),j=An({mutationFn:async()=>{const S=Mbt(`${l.first_name}-${l.last_name}`),E={first_name:l.first_name.trim(),last_name:l.last_name.trim(),title:l.title.trim()||null,slug:a?void 0:`${S}-${Date.now().toString(36)}`,avatar_url:l.avatar_url||null,bio:l.bio||null,linkedin_url:l.linkedin_url||null,twitter_url:l.twitter_url||null,website_url:l.website_url||null};if(a){const{slug:O,...B}=E,{error:T}=await G.from("authors").update(B).eq("id",a);if(T)throw T}else{const{error:O}=await G.from("authors").insert(E);if(O)throw O}},onSuccess:()=>{r.invalidateQueries({queryKey:["admin-authors"]}),e({title:a?"Autor actualizat":"Autor adăugat"}),i(!1),o(null),c(CF)},onError:S=>{e({title:"Eroare",description:S.message,variant:"destructive"})}}),_=An({mutationFn:async S=>{const{error:E}=await G.from("authors").delete().eq("id",S);if(E)throw E},onSuccess:()=>{r.invalidateQueries({queryKey:["admin-authors"]}),e({title:"Autor șters"})}}),C=S=>
2173{o(S.id),c({first_name:S.first_name,last_name:S.last_name,title:S.title||"",avatar_url:S.avatar_url||"",bio:S.bio||"",linkedin_url:S.linkedin_url||"",twitter_url:S.twitter_url||"",website_url:S.website_url||""}),i(!0)},N=()=>{o(null),c(CF),i(!0)};return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-5xl",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Admin Dashboard"]}),s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsxs("h1",{className:"font-heading text-3xl font-bold flex items-center gap-3",children:[s.jsx(Rn,{size:28,className:"text-primary"}),"Autori & Redactori"]}),s.jsxs(sl,{open:n,onOpenChange:i,children:[s.jsx(Ab,{asChild:!0,children:s.jsxs(me,{onClick:N,children:[s.jsx(Qn,{size:16})," Adaugă autor"]})}),s.jsxs(Po,{className:"max-w-lg",children:[s.jsx(ol,{children:s.jsx(ll,{children:a?"Editează autor":"Autor nou"})}),s.jsxs("div",{className:"space-y-4 mt-2",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Prenume"}),s.jsx(qe,{value:l.first_name,onChange:S=>c(E=>({...E,first_name:S.target.value}))})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Nume"}),s.jsx(qe,{value:l.last_name,onChange:S=>c(E=>({...E,last_name:S.target.value}))})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Funcție / Titlu"}),s.jsx(qe,{value:l.title,onChange:S=>c(E=>({...E,title:S.target.value})),placeholder:"ex: Fondator & CEO, EduWeb"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Poză profil"}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("label",{className:"flex items-center gap-2 px-4 py-2 rounded-lg border border-border bg-card cursor-pointer hover:bg-muted transition-colors text-sm",children:[s.jsx(h4,{size:14}),u?"Se încarcă...":"Încarcă imagine",s.jsx("input",{type:"file",accept:"image/*",className:"hidden",disabled:u,onChange:async S=>{var O;const E=(O=S.target.files)==null?void 0:O[0];if(E){d(!0);try{const B=E.name.split(".").pop(),T=`${Date.now()}.${B}`,{error:F}=await G.storage.from("author-avatars").upload(T,E,{upsert:!0});if(F)throw F;const{data:I}=G.storage.from("author-avatars").getPublicUrl(T);c(D=>({...D,avatar_url:I.publicUrl})),e({title:"Imagine încărcată"})}catch(B){e({title:"Eroare upload",description:B.message,variant:"destructive"})}finally{d(!1)}}}})]}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"sau"}),s.jsx(qe,{className:"flex-1",value:l.avatar_url,onChange:S=>c(E=>({...E,avatar_url:S.target.value})),placeholder:"https://..."})]}),l.avatar_url&&s.jsx("img",{src:l.avatar_url,alt:"Preview",className:"mt-1 rounded-full w-16 h-16 object-cover"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Descriere / Bio"}),s.jsx(fr,{rows:4,value:l.bio,onChange:S=>c(E=>({...E,bio:S.target.value})),placeholder:"Câteva cuvinte despre autor..."})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"LinkedIn URL"}),s.jsx(qe,{value:l.linkedin_url,onChange:S=>c(E=>({...E,linkedin_url:S.target.value})),placeholder:"https://linkedin.com/in/..."})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Twitter / X URL"}),s.jsx(qe,{value:l.twitter_url,onChange:S=>c(E=>({...E,twitter_url:S.target.value})),placeholder:"https://x.com/..."})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Website personal"}),s.jsx(qe,{value:l.website_url,onChange:S=>c(E=>({...E,website_url:S.target.value})),placeholder:"https://..."})]}),s.jsxs(me,{className:"w-full",onClick:()=>j.mutate(),disabled:j.isPending||!l.first_name.trim()||!l.last_name.trim(),children:[j.isPending?s.jsx(rt,{size:16,className:"animate-spin"}):null,a?"Actualizează":"Creează autor"]})]})]})]})]}),g?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):A.length===0?s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Niciun autor adăugat."}):s.jsx("div",{className:"glass-card rounded-xl overflow-hidden",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Autor"}),s.jsx(Me,{children:"Articole"}),s.jsx(Me,{children:"Vizualizări"}),s.jsx(Me,{children:"LinkedIn"}),s.jsx(Me,{className:"text-right",children:"Acțiuni"})]})}),s.jsx(In,{children:A.map(S=>s.jsxs(Nt,{children:[s.jsx(Oe,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[S.avatar_url?s.jsx("img",{src:S.avatar_url,alt:`${S.first_name} ${S.last_name}`,className:"w-9 h-9 rounded-full object-cover"}):s.jsxs("div",{className:"w-9 h-9 rounded-full bg-primary/10 flex items-center justify-center text-primary font-semibold text-sm",children:[S.first_name[0],S.last_name[0]]}),s.jsxs("div",{children:[s.jsxs(be,{to:`/autor/${S.slug}`,className:"font-medium hover:text-primary transition-colors",children:[S.first_name," ",S.last_name]}),S.title&&s.jsx("p",{className:"text-xs text-primary/70 font-medium",children:S.title}),S.bio&&s.jsx("p",{className:"text-xs text-muted-foreground truncate max-w-[200px]",children:S.bi
2173o})]})]})}),s.jsx(Oe,{className:"font-medium",children:x[S.id]||0}),s.jsx(Oe,{children:s.jsx("button",{className:"font-medium hover:text-primary hover:underline cursor-pointer transition-colors",onClick:()=>{f(S.id),m(`${S.first_name} ${S.last_name}`)},children:(y[S.id]||0).toLocaleString()})}),s.jsx(Oe,{children:S.linkedin_url&&s.jsx("a",{href:S.linkedin_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline text-sm",children:s.jsx(Yr,{size:14})})}),s.jsx(Oe,{className:"text-right",children:s.jsxs("div",{className:"flex items-center justify-end gap-1",children:[s.jsx(me,{variant:"ghost",size:"icon",asChild:!0,children:s.jsx(be,{to:`/autor/${S.slug}`,children:s.jsx(Oi,{size:16})})}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>C(S),children:s.jsx(wp,{size:16})}),s.jsx(me,{variant:"ghost",size:"icon",className:"text-destructive hover:text-destructive",onClick:()=>{confirm("Sigur vrei să ștergi acest autor?")&&_.mutate(S.id)},children:s.jsx(Xr,{size:16})})]})})]},S.id))})]})}),s.jsx(sl,{open:!!h,onOpenChange:S=>{S||f(null)},children:s.jsxs(Po,{className:"max-w-2xl max-h-[80vh] overflow-auto",children:[s.jsx(ol,{children:s.jsxs(ll,{children:["Articole — ",p]})}),v?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(rt,{className:"animate-spin text-primary",size:24})}):b.length===0?s.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Niciun articol publicat."}):s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{className:"w-[50px]",children:"#"}),s.jsx(Me,{children:"Titlu"}),s.jsx(Me,{className:"text-right",children:"Vizualizări"}),s.jsx(Me,{children:"Data"})]})}),s.jsx(In,{children:b.map((S,E)=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"text-muted-foreground font-mono text-xs",children:E+1}),s.jsx(Oe,{children:s.jsx(be,{to:`/articol/${S.slug}`,className:"text-sm hover:text-primary transition-colors line-clamp-2",children:S.title})}),s.jsx(Oe,{className:"text-right font-semibold",children:S.views.toLocaleString()}),s.jsx(Oe,{className:"text-xs text-muted-foreground whitespace-nowrap",children:S.published_at?new Date(S.published_at).toLocaleDateString("ro-RO"):"-"})]},S.id))})]})]})})]})})}function Ubt(){const{toast:e}=wn(),r=Kr(),[n,i]=w.useState(null),{data:a=[],isLoading:o}=Xe({queryKey:["editorial-posts"],queryFn:async()=>{const{data:h,error:f}=await G.from("posts").select("*").eq("type","editorial").order("created_at",{ascending:!1});if(f)throw f;return h||[]}}),{data:l=[]}=Xe({queryKey:["authors-list"],queryFn:async()=>{const{data:h,error:f}=await G.from("authors").select("id, first_name, last_name").order("last_name");if(f)throw f;return h||[]}}),c=async h=>{i(h);try{const{data:f,error:p}=await G.functions.invoke("generate-ai-brief",{body:{post_ids:[h],auto_publish:!1}});if(p)throw p;r.invalidateQueries({queryKey:["editorial-posts"]}),e({title:"Conținut generat",description:"Articolul e gata de verificare. Editează pentru a alege categoria, autorul și a publica."})}catch(f){e({title:"Eroare",description:f instanceof Error?f.message:"Eroare la generare",variant:"destructive"})}finally{i(null)}},u=An({mutationFn:async h=>{const{error:f}=await G.from("posts").delete().eq("id",h);if(f)throw f},onSuccess:()=>{r.invalidateQueries({queryKey:["editorial-posts"]}),e({title:"Șters"})}}),d=h=>h==="published"?s.jsx("span",{className:"text-xs font-medium text-primary bg-primary/10 px-2 py-1 rounded",children:"Publicat"}):h==="draft"?s.jsx("span",{className:"text-xs font-medium text-yellow-600 bg-yellow-500/10 px-2 py-1 rounded",children:"Draft — verifică și publică"}):s.jsx("span",{className:"text-xs font-medium text-muted-foreground bg-muted px-2 py-1 rounded",children:"Idee"});return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-5xl",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Admin Dashboard"]}),s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsxs("h1",{className:"font-heading text-3xl font-bold flex items-center gap-3",children:[s.jsx(Joe,{size:28,className:"text-primary"}),"Articole Editoriale"]}),s.jsx(me,{asChild:!0,children:s.jsxs(be,{to:"/admin/editorial/new",children:[s.jsx(Qn,{size:16})," Idee nouă"]})})]}),s.jsx("div",{className:"glass-card rounded-xl p-4 mb-6 bg-accent/5 border border-accent/15",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.jsx("strong",{children:"Flux:"})," 1️⃣ Adaugă o idee → 2️⃣ Generează articol cu AI → 3️⃣ Editează, alege categoria, autorul și publică."]})}),o?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):a.length===0?s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Nicio idee încă. Adaugă prima din butonul de mai sus."}):s.jsx("div",{className:"glass-card rounded-xl overflow-hidden",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Idee"}),s.jsx(Me,{children:"Cuvinte"}),s.jsx(Me,{children:"Status"}),s.jsx(Me,{className:"text-right",children:"Acțiuni"})]})}),s.jsx(In,{children:a.map(h=>{const f=l.find(p=>p.id===h.author_id);return s.jsxs(Nt,{children:[s.jsx(Oe,{children:s.jsxs("div",{children:[s.jsx(be,{to:`/admin/posts/${h.id}`,className:"font-medium hover:text-primary transition-colors line-clamp-1",children:h.title_ro}),h.summary_ro&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 mt-0.5",children:h.summary_ro}),f&&s.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["✍️ ",f.first_name," ",f.last_name]})]})}),s.jsx(Oe,{className:"text-sm",children:h.word_count||"—"}),s.jsx(Oe,{children:d(h.status)}),s.jsx(Oe,{className:"text-right",children:s.jsxs("div",{className:"flex items-center justify-end gap-1",children:[h.status==="raw"&&s.jsxs(me,{variant:"outline",size:"sm",onClick:()=>c(h.id),disabled:n===h.id,children:[n===h.id?s.jsx(rt,{size:14,className:"animate-spin"}):s.jsx(Li,{size:14}),"Generează AI"]}),s.jsx(me,{variant:"ghost",size:"icon",asChild:!0,children:s.jsx(be,{to:`/admin/posts/${h.id}`,children:s.jsx(wp,{size:16})})}),s.jsx(me,{variant:"ghost",size:"icon",className:"text-destructive hover:text-destructive",onClick:()=>{confirm("Șterge?")&&u.mutate(h.id)},children:s.jsx(Xr,{size:16})})]})})]}
2173,h.id)})})]})})]})})}const tz="editorial-new-idea-form",$bt={title:"",description:"",source_links:"",author_id:""};function Qbt(){try{const e=sessionStorage.getItem(tz);if(e)return JSON.parse(e)}catch{}return $bt}function Hbt(){const{toast:e}=wn(),r=As(),n=Kr(),[i,a]=w.useState(Qbt);w.useEffect(()=>{sessionStorage.setItem(tz,JSON.stringify(i))},[i]);const{data:o=[]}=Xe({queryKey:["authors-list"],queryFn:async()=>{const{data:c,error:u}=await G.from("authors").select("id, first_name, last_name").order("last_name");if(u)throw u;return c||[]}}),l=An({mutationFn:async()=>{const c=i.title.toLowerCase().replace(/[^a-z0-9ăîșțâ\s-]/g,"").replace(/\s+/g,"-").slice(0,80),u=i.source_links.split(`
2174`).map(h=>h.trim()).filter(Boolean),{error:d}=await G.from("posts").insert({title_ro:i.title.trim(),slug:`${c}-${Date.now().toString(36)}`,summary_ro:i.description.trim()||null,topics:[],difficulty_level:"începător",type:"editorial",status:"raw",source_links:u,author_id:i.author_id||null});if(d)throw d},onSuccess:()=>{n.invalidateQueries({queryKey:["editorial-posts"]}),e({title:"Idee adăugată"}),sessionStorage.removeItem(tz),r("/admin/editorial")},onError:c=>{e({title:"Eroare",description:c.message,variant:"destructive"})}});return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-2xl",children:[s.jsxs(be,{to:"/admin/editorial",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Plan Editorial"]}),s.jsx("h1",{className:"font-heading text-3xl font-bold mb-8",children:"Adaugă idee de articol"}),s.jsxs("div",{className:"glass-card rounded-xl p-6 space-y-5",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Titlu / Subiect"}),s.jsx(qe,{value:i.title,onChange:c=>a(u=>({...u,title:c.target.value})),placeholder:"Ex: Cum funcționează identitatea digitală în Web3"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Descriere / Brief"}),s.jsx(fr,{rows:5,value:i.description,onChange:c=>a(u=>({...u,description:c.target.value})),placeholder:"Descrie pe scurt ce ar trebui să acopere articolul, puncte cheie, unghi editorial..."})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Surse / Referințe (opțional, una per linie)"}),s.jsx(fr,{rows:3,value:i.source_links,onChange:c=>a(u=>({...u,source_links:c.target.value})),placeholder:`https://sursa1.com
2175https://sursa2.com`})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Autor"}),s.jsxs(Cn,{value:i.author_id||"none",onValueChange:c=>a(u=>({...u,author_id:c==="none"?"":c})),children:[s.jsx(yn,{children:s.jsx(Nn,{placeholder:"Selectează autorul"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"none",children:"Fără autor (EduWeb)"}),o.map(c=>s.jsxs(_t,{value:c.id,children:[c.first_name," ",c.last_name]},c.id))]})]})]}),s.jsxs(me,{className:"w-full",onClick:()=>l.mutate(),disabled:l.isPending||!i.title.trim(),children:[l.isPending?s.jsx(rt,{size:16,className:"animate-spin"}):s.jsx(Qn,{size:16}),"Adaugă idee"]})]})]})})}const BZ=[{title:"Cele mai bune exchange-uri crypto din România (2026)",path:"/cele-mai-bune-exchange-crypto-romania",description:"Pagină de comparație exchange-uri crypto, optimizată SEO și conversie afiliat.",type:"Afiliere"}];function Vbt(){return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-4xl",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Înapoi la dashboard"]}),s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx(Dr,{className:"text-primary",size:28}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Pagini Custom"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Pagini statice SEO, landing pages și pagini de afiliere"})]})]}),s.jsx("div",{className:"space-y-4",children:BZ.map(e=>s.jsxs("div",{className:"glass-card rounded-xl p-5 flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h2",{className:"font-heading text-base font-semibold text-foreground truncate",children:e.title}),s.jsx("span",{className:"shrink-0 px-2 py-0.5 rounded-md text-[10px] font-semibold bg-primary/12 text-primary border border-primary/20",children:e.type})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:e.description}),s.jsx("code",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded",children:e.path})]}),s.jsxs(be,{to:e.path,className:"shrink-0 inline-flex items-center gap-1.5 px-4 py-2 rounded-lg bg-primary text-primary-foreground font-heading font-semibold text-xs hover:brightness-110 transition-all",children:["Vizualizează",s.jsx(Yr,{size:12})]})]},e.path))}),BZ.length===0&&s.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[s.jsx(Dr,{size:40,className:"mx-auto mb-3 opacity-40"}),s.jsx("p",{children:"Nu există pagini custom încă."})]})]})})}function Wbt(){const[e,r]=w.useState(""),[n,i]=w.useState(!1),{toast:a}=wn(),{data:o=[],isLoading:l,refetch:c}=Xe({queryKey:["newsletter-subscribers"],queryFn:async()=>{const{data:x,error:b}=await G.from("newsletter_subscribers").select("*").order("created_at",{ascending:!1});if(b)throw b;return x}}),{data:u=[],isLoading:d,refetch:h}=Xe({queryKey:["newsletter-campaigns"],queryFn:async()=>{const{data:x,error:b}=await G.from("newsletter_campaigns").select("*").order("created_at",{ascending:!1});if(b)throw b;return x}}),f=o.filter(x=>{var b;return(b=x.email)==null?void 0:b.toLowerCase().includes(e.toLowerCase())}),p=o.filter(x=>!x.unsubscribed).length,m=u.reduce((x,b)=>x+(b.total_sent||0),0),A=async x=>{if(!confirm("Sigur vrei să ștergi acest abonat?"))return;const{error:b}=await G.from("newsletter_subscribers").delete().eq("id",x);b?a({title:"Eroare",description:b.message,variant:"destructive"}):(a({title:"Șters",description:"Abonatul a fost eliminat."}),c())},g=async()=>
2175{if(confirm(`Trimiți newsletterul către ${p} abonați activi?`)){i(!0);try{const{data:x,error:b}=await G.functions.invoke("send-newsletter");if(b)throw b;a({title:"✅ Newsletter trimis!",description:`${(x==null?void 0:x.total_sent)||0} emailuri trimise cu succes.`}),h()}catch(x){a({title:"Eroare",description:x.message||"Trimiterea a eșuat.",variant:"destructive"})}finally{i(!1)}}},y=()=>{const x=[["Email","Data abonării","GDPR Consent","Status"].join(","),...o.map(_=>[_.email,new Date(_.created_at).toLocaleDateString("ro-RO"),_.gdpr_consent?"Da":"Nu",_.unsubscribed?"Dezabonat":"Activ"].join(","))].join(`
2176`),b=new Blob([x],{type:"text/csv"}),v=URL.createObjectURL(b),j=document.createElement("a");j.href=v,j.download=`newsletter-subscribers-${new Date().toISOString().slice(0,10)}.csv`,j.click(),URL.revokeObjectURL(v)};return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx(be,{to:"/admin",className:"p-2 rounded-lg hover:bg-secondary transition-colors",children:s.jsx(rn,{size:20})}),s.jsx(Za,{className:"text-primary",size:24}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-2xl font-bold",children:"Newsletter"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Gestionează abonații și trimite campanii"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[s.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm mb-1",children:[s.jsx(Rn,{size:14})," Total abonați"]}),s.jsx("p",{className:"font-heading text-2xl font-bold",children:o.length})]}),s.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm mb-1",children:[s.jsx(Za,{size:14})," Activi"]}),s.jsx("p",{className:"font-heading text-2xl font-bold text-green-600",children:p})]}),s.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm mb-1",children:[s.jsx(Dc,{size:14})," Campanii trimise"]}),s.jsx("p",{className:"font-heading text-2xl font-bold text-primary",children:u.filter(x=>x.status==="sent").length})]}),s.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm mb-1",children:[s.jsx(uE,{size:14})," Total emailuri"]}),s.jsx("p",{className:"font-heading text-2xl font-bold",children:m})]})]}),s.jsxs("div",{className:"mb-6 rounded-xl border border-primary/20 bg-primary/5 p-4 flex flex-wrap items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-heading font-semibold text-foreground",children:"Trimite newsletter acum"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Generează automat conținut din articolele recente + sumar crypto, personalizat pe preferințele fiecărui abonat."})]}),s.jsxs(me,{onClick:g,disabled:n||p===0,className:"gap-2",children:[n?s.jsx(rt,{size:16,className:"animate-spin"}):s.jsx(Dc,{size:16}),n?"Se trimite...":`Trimite către ${p} abonați`]})]}),s.jsxs(Gi,{defaultValue:"subscribers",className:"space-y-4",children:[s.jsxs(Ri,{children:[s.jsx(Mt,{value:"subscribers",children:"Abonați"}),s.jsx(Mt,{value:"campaigns",children:"Campanii"})]}),s.jsxs(er,{value:"subscribers",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[s.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-xs",children:[s.jsx(ul,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută email...",value:e,onChange:x=>r(x.target.value),className:"pl-9"})]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:y,disabled:o.length===0,children:[s.jsx(Wl,{size:14})," Export CSV"]})]}),s.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:l?s.jsx("p",{className:"text-muted-foreground text-center py-12",children:"Se încarcă..."}):f.length===0?s.jsx("p",{className:"text-muted-foreground text-center py-12",children:"Niciun abonat găsit."}):s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Email"}),s.jsx(Me,{children:"Data abonării"}),s.jsx(Me,{children:"GDPR"}),s.jsx(Me,{children:"Sursă"}),s.jsx(Me,{children:"Status"}),s.jsx(Me,{className:"w-10"})]})}),s.jsx(In,{children:f.map(x=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"font-medium",children:x.email}),s.jsx(Oe,{className:"text-sm text-muted-foreground",children:new Date(x.created_at).toLocaleDateString("ro-RO",{day:"2-digit",month:"short",year:"numeric"})}),s.jsx(Oe,{children:s.jsx(at,{variant:x.gdpr_consent?"default":"destructive",className:"text-[10px]",children:x.gdpr_consent?"✓ Consimțământ":"Lipsă"})}),s.jsx(Oe,{className:"text-sm text-muted-foreground",children:x.source||"website"}),s.jsx(Oe,{children:x.unsubscribed?s.jsx(at,{variant:"secondary",className:"text-[10px]",children:"Dezabonat"}):s.jsx(at,{variant:"outline",className:"text-[10px] border-green-500 text-green-600",children:"Activ"})}),s.jsx(Oe,{children:s.jsx(me,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>A(x.id),children:s.jsx(Xr,{size:14,className:"text-destructive"})})})]},x.id))})]})})]}),s.jsx(er,{value:"campaigns",children:s.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:d?s.jsx("p",{className:"text-muted-foreground text-center py-12",children:"Se încarcă..."}):u.length===0?s.jsx("p",{className:"text-muted-foreground text-center py-12",children:"Nicio campanie încă. Trimite primul newsletter!"}):s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Subiect"}),s.jsx(Me,{children:"Status"}),s.jsx(Me,{children:"Destinatari"}),s.jsx(Me,{children:"Trimise"}),s.jsx(Me,{children:"Data"})]})}),s.jsx(In,{children:u.map(x=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"font-medium max-w-[280px] truncate",children:x.subject}),s.jsx(Oe,{children:s.jsx(at,{variant:x.status==="sent"?"default":x.status==="sending"?"secondary":"outline",className:"text-[10px]",children:x.status==="sent"?"✓ Trimis":x.status==="sending"?"⏳ Se trimite":x.status})}),s.jsx(Oe,{children:x.total_recipients}),s.jsx(Oe,{className:"font-semibold",children:x.total_sent}),s.jsx(Oe,{className:"text-sm text-muted-foreground",children:x.sent_at?new Date(x.sent_at).toLocaleDateString("ro-RO",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}):"—"})]},x.id))})]})})})]})]})})}const TZ=[{value:"analytics",label:"Google Analytics"},{value:"tag_manager",label:"Google Tag Manager"},{value:"adsense",label:"Google AdSense"},{value:"facebook_pixel",label:"Facebook Pixel"},{value:"tiktok_pixel",label:"TikTok Pixel"},{value:"custom",label:"Script Custom"}],PZ=[{value:"head",label:"Head (recomandat)"},{value:"body_start",label:"Body (început)"},{value:"body_end",label:"Body (final)"}];function qbt(){const[e,r]=w.useState([]),[n,i]=w.useState(!0),[a,o]=w.useState(null),[l,c]=w.useState({name:"",description:"",code_type:"analytics",code_id:"",script_content:"",placement:"head",is_active:!0}),[u,d]=w.useState(!1),{toast:h}=wn(),f=async()=>{const{data:b,error:v}=await G.from("tracking_codes").select("*").order("sort_order",{ascending:!0});v?h({title:"Eroare",description:v.message,variant:"destructive"}):r(b||[]),i(!1)};w.useEffect(()=>{f()},[]);const p=()=>{c({name:"",description:"",code_type:"analytics",code_id:"",script_content:"",placement:"head",is_active:!0}),o(null),d(!1)},m=b=>{c({name:b.name,description:b.description||"",code_type:b.code_type,code_id:b.code_id,script_content:b.script_content,placement:b.placement,is_active:b.is_active}),o(b.id),d(!0)},A=async()=>
2176{if(!l.name.trim()){h({title:"Eroare",description:"Numele este obligatoriu.",variant:"destructive"});return}const b={name:l.name.trim(),description:l.description.trim()||null,code_type:l.code_type,code_id:l.code_id.trim(),script_content:l.script_content.trim(),placement:l.placement,is_active:l.is_active,updated_at:new Date().toISOString()};if(a){const{error:v}=await G.from("tracking_codes").update(b).eq("id",a);if(v){h({title:"Eroare",description:v.message,variant:"destructive"});return}h({title:"Salvat",description:"Codul de tracking a fost actualizat."})}else{const{error:v}=await G.from("tracking_codes").insert({...b,sort_order:e.length});if(v){h({title:"Eroare",description:v.message,variant:"destructive"});return}h({title:"Adăugat",description:"Codul de tracking a fost creat."})}p(),f()},g=async b=>{if(!confirm("Sigur dorești să ștergi acest cod de tracking?"))return;const{error:v}=await G.from("tracking_codes").delete().eq("id",b);if(v){h({title:"Eroare",description:v.message,variant:"destructive"});return}h({title:"Șters",description:"Codul de tracking a fost eliminat."}),f()},y=async b=>{const{error:v}=await G.from("tracking_codes").update({is_active:!b.is_active,updated_at:new Date().toISOString()}).eq("id",b.id);if(v){h({title:"Eroare",description:v.message,variant:"destructive"});return}f()},x=b=>{var v;return((v=TZ.find(j=>j.value===b))==null?void 0:v.label)||b};return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-4xl",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx(be,{to:"/admin",children:s.jsx(me,{variant:"ghost",size:"icon",children:s.jsx(rn,{size:18})})}),s.jsx(qy,{className:"text-primary",size:24}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-2xl font-bold",children:"Coduri de Tracking"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Google Analytics, Tag Manager, AdSense, Pixeli etc."})]})]}),!u&&s.jsxs(me,{onClick:()=>{p(),d(!0)},className:"mb-6",children:[s.jsx(Qn,{size:16})," Adaugă cod nou"]}),u&&s.jsxs("div",{className:"glass-card rounded-xl p-6 mb-6 space-y-4",children:[s.jsxs("h2",{className:"font-semibold text-lg",children:[a?"Editează":"Adaugă"," Cod de Tracking"]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Nume *"}),s.jsx(qe,{value:l.name,onChange:b=>c(v=>({...v,name:b.target.value})),placeholder:"Ex: Google Analytics 4"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Tip"}),s.jsxs(Cn,{value:l.code_type,onValueChange:b=>c(v=>({...v,code_type:b})),children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsx(vn,{children:TZ.map(b=>s.jsx(_t,{value:b.value,children:b.label},b.value))})]})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Descriere"}),s.jsx(qe,{value:l.description,onChange:b=>c(v=>({...v,description:b.target.value})),placeholder:"Ex: Tracking principal pentru eduweb.ro"})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"ID Cod (opțional)"}),s.jsx(qe,{value:l.code_id,onChange:b=>c(v=>({...v,code_id:b.target.value})),placeholder:"Ex: G-W3MQ51JEBR sau GTM-XXXXXX"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Plasare"}),s.jsxs(Cn,{value:l.placement,onValueChange:b=>c(v=>({...v,placement:b})),children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsx(vn,{children:PZ.map(b=>s.jsx(_t,{value:b.value,children:b.label},b.value))})]})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Conținut Script"}),s.jsx(fr,{value:l.script_content,onChange:b=>c(v=>({...v,script_content:b.target.value})),placeholder:`<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"><\/script>
2177<script>
2178  ...
2179<\/script>`,rows:6,className:"font-mono text-xs"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Introdu tag-urile <script> complet, exact cum le-ai primit de la platformă."})]}),s.jsxs("div",{className:"flex items-center gap-4 pt-2",children:[s.jsxs(me,{onClick:A,children:[s.jsx(Bu,{size:16})," ",a?"Salvează":"Adaugă"]}),s.jsx(me,{variant:"ghost",onClick:p,children:"Anulează"})]})]}),s.jsxs("div",{className:"glass-card rounded-xl p-6 mb-6",children:[s.jsx("h2",{className:"font-semibold text-lg mb-3",children:"🔗 Linkuri importante"}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3",children:[{label:"robots.txt",url:"/robots.txt"},{label:"ads.txt",url:"/ads.txt"},{label:"Sitemap RO",url:"https://eduweb.ro/sitemap.xml"},{label:"Sitemap EN",url:"https://eduweb.ai/sitemap.xml"},{label:"Google Search Console",url:"https://search.google.com/search-console"},{label:"Google Analytics",url:"https://analytics.google.com"},{label:"Google Tag Manager",url:"https://tagmanager.google.com"},{label:"Google AdSense",url:"https://www.google.com/adsense"},{label:"PageSpeed RO",url:"https://pagespeed.web.dev/?url=https://eduweb.ro"},{label:"PageSpeed EN",url:"https://pagespeed.web.dev/?url=https://eduweb.ai"}].map(b=>s.jsxs("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg border border-border hover:bg-accent/50 transition-colors text-sm font-medium",children:[s.jsx(qy,{size:14,className:"text-primary shrink-0"}),b.label]},b.label))})]}),n?s.jsx("p",{className:"text-muted-foreground",children:"Se încarcă..."}):e.length===0?s.jsxs("div",{className:"glass-card rounded-xl p-8 text-center text-muted-foreground",children:[s.jsx(qy,{size:40,className:"mx-auto mb-3 opacity-40"}),s.jsx("p",{children:"Nu ai niciun cod de tracking configurat."}),s.jsx("p",{className:"text-sm mt-1",children:"Adaugă primul cod folosind butonul de mai sus."})]}):s.jsx("div",{className:"space-y-3",children:e.map(b=>{var v;return s.jsxs("div",{className:`glass-card rounded-xl p-4 flex items-start gap-4 transition-opacity ${b.is_active?"":"opacity-50"}`,children:[s.jsx("div",{className:"pt-1 text-muted-foreground cursor-grab",children:s.jsx(FU,{size:16})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"font-semibold",children:b.name}),s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-primary/10 text-primary",children:x(b.code_type)}),b.code_id&&s.jsx("code",{className:"text-xs bg-muted px-1.5 py-0.5 rounded",children:b.code_id})]}),b.description&&s.jsx("p",{className:"text-sm text-muted-foreground",children:b.description}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Plasare: ",((v=PZ.find(j=>j.value===b.placement))==null?void 0:v.label)||b.placement]})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>y(b),title:b.is_active?"Dezactivează":"Activează",children:b.is_active?s.jsx($U,{size:18,className:"text-green-500"}):s.jsx(UU,{size:18})}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>m(b),children:s.jsx(Bu,{size:16})}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>g(b.id),children:s.jsx(Xr,{size:16,className:"text-destructive"})})]})]},b.id)})})]})})}function Kbt(e){const r=new Date;switch(e){case"today":return new Date(r.getFullYear(),r.getMonth(),r.getDate()).toISOString();case"week":{const n=new Date(r);return n.setDate(n.getDate()-7),n.toISOString()}case"month":{const n=new Date(r);return n.setMonth(n.getMonth()-1),n.toISOString()}case"year":{const n=new Date(r);return n.setFullYear(n.getFullYear()-1),n.toISOString()}case"all":return null}}const Gbt={today:"Azi",week:"Ultima săptămână",month:"Ultima lună",year:"Ultimul an",all:"Tot timpul"},NF={video_brief:"Video Brief",podcast:"Podcast",lesson_video:"Video Lecție"},SF={video_brief:Pa,podcast:c4,lesson_video:Rr};function Xbt(){const[e,r]=w.useState("week"),[n,i]=w.useState("overview"),a=Kbt(e),{data:o=[],isLoading:l}=Xe({queryKey:["media-plays",e],queryFn:async()=>{let d=G.from("media_plays").select("*").order("played_at",{ascending:!1});a&&(d=d.gte("played_at",a));const{data:h,error:f}=await d;if(f)throw f;return h||[]}}),c=w.useMemo(()=>{const d={},h={},f={};o.forEach(m=>{d[m.media_type]=(d[m.media_type]||0)+1,m.topic&&(h[m.topic]=(h[m.topic]||0)+1);const A=`${m.media_type}:${m.media_id}`;f[A]||(f[A]={title:m.media_title||m.media_id,type:m.media_type,topic:m.topic,count:0}),f[A].count++});const p=Object.values(f).sort((m,A)=>A.count-m.count);return{total:o.length,byType:d,byTopic:h,topMedia:p}},[o]),{data:u}=Xe({queryKey:["video-counts"],queryFn:async()=>{const{count:d}=await G.from("posts").select("id",{count:"exact",head:!0}).eq("status","published").not("video_audio_url","is",null),{count:h}=await G.from("daily_podcasts").select("id",{count:"exact",head:!0}).eq("status","published"),{data:f}=await G.from("posts").select("topics").eq("status","published").not("video_audio_url","is",null),p={};
2179return(f||[]).forEach(m=>{(m.topics||[]).forEach(A=>{p[A]=(p[A]||0)+1})}),{videoCount:d||0,podcastCount:h||0,topicCounts:p}}});return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx(be,{to:"/admin",className:"p-2 rounded-lg hover:bg-secondary transition-colors",children:s.jsx(rn,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Eo,{className:"text-primary",size:28}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Media Analytics"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Vizualizări video & podcast-uri"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx(y_,{size:16,className:"text-muted-foreground"}),s.jsxs(Cn,{value:e,onValueChange:d=>r(d),children:[s.jsx(yn,{className:"w-[200px]",children:s.jsx(Nn,{})}),s.jsx(vn,{children:Object.entries(Gbt).map(([d,h])=>s.jsx(_t,{value:d,children:h},d))})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Oi,{size:16,className:"text-primary"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Total vizualizări"})]}),s.jsx("p",{className:"text-3xl font-heading font-bold",children:c.total})]}),["video_brief","podcast","lesson_video"].map(d=>{const h=SF[d];return s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(h,{size:16,className:"text-primary"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:NF[d]})]}),s.jsx("p",{className:"text-3xl font-heading font-bold",children:c.byType[d]||0})]},d)})]}),u&&s.jsxs("div",{className:"glass-card rounded-xl p-6 mb-8",children:[s.jsx("h3",{className:"font-heading text-lg font-semibold mb-4",children:"Media create"}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-secondary/50",children:[s.jsx(Pa,{size:20,className:"text-primary"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-bold",children:u.videoCount}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Video-uri create"})]})]}),s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-secondary/50",children:[s.jsx(c4,{size:20,className:"text-primary"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-bold",children:u.podcastCount}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Podcast-uri create"})]})]})]}),Object.keys(u.topicCounts).length>0&&s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"text-sm font-semibold mb-3",children:"Video-uri pe categorii"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(u.topicCounts).sort(([,d],[,h])=>h-d).map(([d,h])=>s.jsxs("span",{className:"px-3 py-1.5 rounded-lg bg-primary/10 text-primary text-sm font-medium",children:[d," ",s.jsx("span",{className:"font-bold ml-1",children:h})]},d))})]})]}),s.jsxs(Gi,{value:n,onValueChange:i,children:[s.jsxs(Ri,{children:[s.jsx(Mt,{value:"overview",children:"Top Media"}),s.jsx(Mt,{value:"by-topic",children:"Pe categorii"}),s.jsx(Mt,{value:"recent",children:"Vizualizări recente"})]}),s.jsx(er,{value:"overview",className:"mt-4",children:l?s.jsx("p",{className:"text-muted-foreground text-sm py-8 text-center",children:"Se încarcă..."}):c.topMedia.length===0?s.jsxs("div",{className:"text-center py-12 glass-card rounded-xl",children:[s.jsx(Oi,{size:32,className:"mx-auto text-muted-foreground/30 mb-2"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Nu există vizualizări în perioada selectată."})]}):s.jsx("div",{className:"glass-card rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border/50 text-left",children:[s.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",children:"#"}),s.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",children:"Titlu"}),s.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",children:"Tip"}),s.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",children:"Categorie"}),s.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground text-right",children:"Vizualizări"})]})}),s.jsx("tbody",{children:c.topMedia.slice(0,50).map((d,h)=>{const f=SF[d.type]||Pa;return s.jsxs("tr",{className:"border-b border-border/30 hover:bg-secondary/30",children:[s.jsx("td",{className:"px-4 py-3 text-muted-foreground",children:h+1}),s.jsx("td",{className:"px-4 py-3 font-medium max-w-xs truncate",children:d.title}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs",children:[s.jsx(f,{size:12})," ",NF[d.type]||d.type]})}),s.jsx("td",{className:"px-4 py-3",children:d.topic&&s.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-medium bg-primary/10 text-primary",children:d.topic})}),s.jsx("td",{className:"px-4 py-3 text-right font-bold",children:d.count})]},h)})})]})})}),s.jsx(er,{value:"by-topic",className:"mt-4",children:Object.keys(c.byTopic).length===0?s.jsx("div",{className:"text-center py-12 glass-card rounded-xl",children:s.jsx("p",{className:"text-muted-foreground text-sm",children:"Nu există date pe categorii."})}):s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:Object.entries(c.byTopic).sort(([,d],[,h])=>h-d).map(([d,h])=>s.jsxs("div",{className:"glass-card rounded-xl p-5 text-center",children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-1 capitalize",children:d}),s.jsx("p",{className:"text-3xl font-heading font-bold text-primary",children:h}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:"vizualizări"})]},d))})}),s.jsx(er,{value:"recent",className:"mt-4",children:s.jsxs("div",{className:"glass-card rounded-xl overflow-hidden",children:[s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border/50 text-left",children:[s.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",children:"Data"}),s.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",children:"Titlu"}),s.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",children:"Tip"}),s.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",children:"Categorie"})]})}),s.jsx("tbody",{children:o.slice(0,100).map(d=>{const h=SF[d.media_type]||Pa;return s.jsxs("tr",{className:"border-b border-border/30 hover:bg-secondary/30",children:[s.jsx("td",{className:"px-4 py-3 text-muted-foreground text-xs",children:new Date(d.played_at).toLocaleStr
2179ing("ro-RO",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}),s.jsx("td",{className:"px-4 py-3 font-medium max-w-xs truncate",children:d.media_title||d.media_id}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs",children:[s.jsx(h,{size:12})," ",NF[d.media_type]||d.media_type]})}),s.jsx("td",{className:"px-4 py-3",children:d.topic&&s.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-medium bg-primary/10 text-primary",children:d.topic})})]},d.id)})})]}),o.length===0&&s.jsx("p",{className:"text-center text-muted-foreground text-sm py-8",children:"Nicio vizualizare înregistrată."})]})})]})]})})}const IZ=[{name:"ElevenLabs",description:"Generare vocală AI pentru podcast-uri zilnice și audio lecții.",icon:uke,category:"Voce & Audio",status:"checking",secretKey:"ELEVENLABS_API_KEY",usedIn:["Podcast zilnic","Lesson TTS (Tudor Popescu)","Lesson TTS Conversation"]},{name:"Unsplash",description:"Imagini gratuite de înaltă calitate pentru articole.",icon:il,category:"Imagini",status:"checking",secretKey:"UNSPLASH_ACCESS_KEY",usedIn:["Actualizare imagini articole"]},{name:"Resend",description:"Trimitere email-uri: newsletter, notificări academie, contact.",icon:Za,category:"Email",status:"checking",secretKey:"RESEND_API_KEY",usedIn:["Newsletter","Academy Notify","Contact Form","Newsletter Confirm"]},{name:"CoinGecko",description:"Date prețuri crypto în timp real și istoric.",icon:oa,category:"Crypto Data",status:"checking",secretKey:"COINGECKO_API_KEY",usedIn:["Prețuri crypto","Sumare zilnice crypto"]},{name:"Lovable AI",description:"Modele AI pentru generare briefs, sumare crypto și video scripts.",icon:ff,category:"Inteligență Artificială",status:"checking",secretKey:"LOVABLE_API_KEY",usedIn:["AI Briefs","Crypto Summaries","Video Briefs","Member Chat"]},{name:"Lovable Cloud (Supabase)",description:"Baza de date, autentificare, storage și edge functions.",icon:E2,category:"Backend",status:"checking",secretKey:"SUPABASE_URL",usedIn:["Toată aplicația"]}],Ybt=["Backend","Inteligență Artificială","Voce & Audio","Email","Imagini","Crypto Data"],Jbt={connected:{label:"Conectat",color:"bg-green-500/10 text-green-700 dark:text-green-400 border-green-500/20",icon:hn},not_configured:{label:"Neconfigurat",color:"bg-red-500/10 text-red-700 dark:text-red-400 border-red-500/20",icon:Yh},checking:{label:"Se verifică...",color:"bg-yellow-500/10 text-yellow-700 dark:text-yellow-400 border-yellow-500/20",icon:k2}};function Zbt(){const[e,r]=w.useState(IZ);w.useEffect(()=>{(async()=>{const o=IZ.map(l=>({...l,status:"connected"}));r(o)})()},[]);const n=Ybt.map(a=>({category:a,tools:e.filter(o=>o.category===a)})).filter(a=>a.tools.length>0),i=e.filter(a=>a.status==="connected").length;return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-4xl",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6",children:[s.jsx(rn,{size:16})," Înapoi la Admin"]}),s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(pi,{className:"text-primary",size:28}),s.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Setări Proiect"})]}),s.jsx("p",{className:"text-muted-foreground mb-8",children:"Vizualizare generală a tuturor serviciilor și integrărilor conectate la EduWeb."}),s.jsxs("div",{className:"glass-card rounded-xl p-5 mb-8 flex flex-wrap items-center gap-6",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500"}),s.jsxs("span",{className:"text-sm font-medium",children:[i," servicii conectate"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"}),s.jsxs("span",{className:"text-sm font-medium",children:[e.length-i," neconfigurate"]})]}),s.jsx("div",{className:"ml-auto",children:s.jsxs(at,{variant:"outline",className:"text-xs",children:["Total: ",e.length," integrări"]})})]}),s.jsx("div",{className:"space-y-8",children:n.map(({category:a,tools:o})=>s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-lg font-semibold mb-4 text-muted-foreground uppercase tracking-wider text-xs",children:a}
2179),s.jsx("div",{className:"space-y-3",children:o.map(l=>{const c=Jbt[l.status],u=c.icon;return s.jsxs("div",{className:"glass-card rounded-xl p-5 flex items-start gap-4",children:[s.jsx("div",{className:"p-3 rounded-lg bg-primary/10 text-primary shrink-0",children:s.jsx(l.icon,{size:22})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1 flex-wrap",children:[s.jsx("h3",{className:"font-semibold text-base",children:l.name}),s.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-medium border ${c.color}`,children:[s.jsx(u,{size:12}),c.label]})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:l.description}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:l.usedIn.map(d=>s.jsx("span",{className:"inline-block px-2 py-0.5 rounded bg-muted text-muted-foreground text-xs",children:d},d))})]})]},l.name)})})]},a))}),s.jsxs("div",{className:"mt-10",children:[s.jsx("h2",{className:"font-heading text-lg font-semibold mb-4 text-muted-foreground uppercase tracking-wider text-xs",children:"Edge Functions Active"}),s.jsx("div",{className:"glass-card rounded-xl p-5",children:s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:["fetch-rss","generate-ai-brief","generate-video-brief","generate-crypto-summary","generate-daily-podcast","send-newsletter","academy-notify","send-contact-email","newsletter-confirm","crypto-prices","lesson-tts","lesson-tts-conversation","member-chat","update-images","sitemap","prerender-meta"].map(a=>s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 shrink-0"}),s.jsx("span",{className:"font-mono text-xs truncate",children:a})]},a))})})]}),s.jsxs("div",{className:"mt-8",children:[s.jsx("h2",{className:"font-heading text-lg font-semibold mb-4 text-muted-foreground uppercase tracking-wider text-xs",children:"Storage Buckets"}),s.jsx("div",{className:"glass-card rounded-xl p-5",children:s.jsx("div",{className:"flex flex-wrap gap-4",children:[{name:"video-audio",desc:"Audio pentru video briefs și podcast-uri",public:!0},{name:"author-avatars",desc:"Avatare autori și redactori",public:!0}].map(a=>s.jsxs("div",{className:"flex items-start gap-3 bg-muted/50 rounded-lg p-3 flex-1 min-w-[220px]",children:[s.jsx(Dr,{size:18,className:"text-primary mt-0.5 shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-mono text-sm font-medium",children:a.name}),s.jsx("p",{className:"text-xs text-muted-foreground",children:a.desc}),s.jsx(at,{variant:"outline",className:"mt-1 text-xs",children:a.public?"Public":"Privat"})]})]},a.name))})})]})]})})}function e1t(){const{toast:e}=wn(),r=Kr(),{data:n=[]}=Xe({queryKey:["admin-reward-rules"],queryFn:async()=>{const{data:u}=await G.from("reward_rules").select("*").order("sort_order");return u||[]}}),{data:i=[]}=Xe({queryKey:["admin-gamification-config"],queryFn:async()=>{const{data:u}=await G.from("gamification_config").select("*").order("key");return u||[]}}),a=An({mutationFn:async u=>{const{error:d}=await G.from("reward_rules").update({coins:u.coins,is_active:u.is_active,daily_cap:u.daily_cap,monthly_cap:u.monthly_cap,updated_at:new Date().toISOString()}).eq("id",u.id);if(d)throw d},onSuccess:()=>{r.invalidateQueries({queryKey:["admin-reward-rules"]}),r.invalidateQueries({queryKey:["reward-rules"]}),e({title:"Regulă actualizată"})}}),o=An({mutationFn:async({id:u,value:d})=>{const{error:h}=await G.from("gamification_config").update({value:d,updated_at:new Date().toISOString()}).eq("id",u);if(h)throw h},onSuccess:()=>{r.invalidateQueries({queryKey:["admin-gamification-config"]}),r.invalidateQueries({queryKey:["gamification-config"]}),e({title:"Configurare actualizată"})}}),l={};n.forEach(u=>{l[u.category]||(l[u.category]=[]),l[u.category].push(u)});const c={passive:"📖 Pasiv",learning:"🎓 Învățare",community:"💬 Comunitate",growth:"📣 Creștere"};return s.jsx(xr,{children:s.jsxs("div",{className:"container max-w-5xl py-8",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Dashboard Admin"]}),s.jsxs("h1",{className:"font-heading text-3xl font-bold tracking-tight mb-6 flex items-center gap-3",children:[s.jsx(lp,{size:28,className:"text-primary"})," Reguli Gamificare"]}),s.jsxs(Gi,{defaultValue:"rules",children:[s.jsxs(Ri,{className:"grid w-full grid-cols-2 max-w-sm mb-6",children:[s.jsxs(Mt,{value:"rules",children:[s.jsx(lp,{size:14,className:"mr-1"})," Reguli recompense"]}),s.jsxs(Mt,{value:"config",children:[s.jsx(Wi,{size:14,className:"mr-1"})," Configurări"]}
2179)]}),s.jsx(er,{value:"rules",children:Object.entries(l).map(([u,d])=>s.jsxs("div",{className:"mb-8",children:[s.jsx("h2",{className:"font-heading text-lg font-semibold mb-3",children:c[u]||u}),s.jsx("div",{className:"space-y-2",children:d.map(h=>s.jsx(t1t,{rule:h,onSave:f=>a.mutate(f)},h.id))})]},u))}),s.jsx(er,{value:"config",children:s.jsx("div",{className:"space-y-4",children:i.map(u=>s.jsx(r1t,{config:u,onSave:(d,h)=>o.mutate({id:d,value:h})},u.id))})})]})]})})}function t1t({rule:e,onSave:r}){var f,p,m,A;const[n,i]=w.useState(e.coins),[a,o]=w.useState(e.is_active),[l,c]=w.useState(((f=e.daily_cap)==null?void 0:f.toString())||""),[u,d]=w.useState(((p=e.monthly_cap)==null?void 0:p.toString())||""),h=n!==e.coins||a!==e.is_active||(l||null)!==(((m=e.daily_cap)==null?void 0:m.toString())||null)||(u||null)!==(((A=e.monthly_cap)==null?void 0:A.toString())||null);return s.jsxs("div",{className:"glass-card rounded-lg px-4 py-3 border border-border/30 flex flex-wrap items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[s.jsx(Pm,{checked:a,onCheckedChange:o}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:e.label}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:e.key})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("label",{className:"text-[10px] text-muted-foreground",children:"Coins:"}),s.jsx(qe,{type:"number",value:n,onChange:g=>i(Number(g.target.value)),className:"w-16 h-7 text-xs"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("label",{className:"text-[10px] text-muted-foreground",children:"Zi:"}),s.jsx(qe,{type:"number",value:l,onChange:g=>c(g.target.value),placeholder:"—",className:"w-14 h-7 text-xs"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("label",{className:"text-[10px] text-muted-foreground",children:"Lună:"}),s.jsx(qe,{type:"number",value:u,onChange:g=>d(g.target.value),placeholder:"—",className:"w-14 h-7 text-xs"})]}),h&&s.jsxs("button",{onClick:()=>r({id:e.id,coins:n,is_active:a,daily_cap:l?Number(l):null,monthly_cap:u?Number(u):null}),className:"text-xs px-2.5 py-1 rounded bg-primary text-primary-foreground hover:brightness-110 flex items-center gap-1",children:[s.jsx(Bu,{size:12})," Salvează"]})]})}function r1t({config:e,onSave:r}){const[n,i]=w.useState(JSON.stringify(e.value,null,2)),[a,o]=w.useState(""),l=n!==JSON.stringify(e.value,null,2),c=()=>{try{const u=JSON.parse(n);o(""),r(e.id,u)}catch{o("JSON invalid")}};return s.jsx(st,{className:"glass-card",children:s.jsxs(ot,{className:"pt-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-heading font-semibold text-sm",children:e.label}),s.jsx("p",{className:"text-xs text-muted-foreground",children:e.description}),s.jsx("p",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:e.key})]}),l&&s.jsxs("button",{onClick:c,className:"text-xs px-2.5 py-1 rounded bg-primary text-primary-foreground hover:brightness-110 flex items-center gap-1 shrink-0",children:[s.jsx(Bu,{size:12})," Salvează"]})]}),s.jsx("textarea",{value:n,onChange:u=>i(u.target.value),className:"w-full bg-muted/50 border border-border rounded-lg px-3 py-2 text-xs font-mono text-foreground min-h-[80px] resize-y"}),a&&s.jsx("p",{className:"text-xs text-red-500 mt-1",children:a})]})})}function FZ(e){return _p(e)}function n1t(){wn(),Kr();const[e,r]=w.useState(""),[n,i]=w.useState(null),{data:a=[],isLoading:o}=Xe({queryKey:["admin-educoins-users"],queryFn:async()=>{const{data:f}=await G.from("user_edu_coins").select("*"),{data:p}=await G.from("profiles").select("user_id, display_name"),m=new Map((p||[]).map(A=>[A.user_id,A.display_name]));return(f||[]).map(A=>({...A,display_name:m.get(A.user_id)||"—"}))}}),{data:l}=Xe({queryKey:["admin-educoins-stats"],queryFn:async()=>{const{data:f}=await G.from("user_edu_coins").select("balance, total_earned, validated_edu_score, learning_score, passive_score"),p=f||[],m=p.reduce((b,v)=>b+(v.total_earned||0),0),A=p.reduce((b,v)=>b+((v.total_earned||0)-(v.balance||0)),0),g=p.reduce((b,v)=>b+(v.balance||0),0),y={};qv.forEach(b=>{y[b.name]=0}),p.forEach(b=>{const v=FZ(b.validated_edu_score||0);y[v.name]=(y[v.name]||0)+1});const x=p.filter(b=>(b.balance||0)>50&&(b.learning_score||0)<10).length;return{totalUsers:p.length,totalMinted:m,totalSpent:A,totalInCirculation:g,levelDist:y,highWalletLowLearning:x}}}),{data:c=[]}=Xe({queryKey:["admin-user-txns",n],enabled:!!n,queryFn:async()=>{const{data:f}=await G.from("edu_coin_transactions").select("*").eq("user_id",n).order("created_at",{ascending:!1}).limit(50);return f||[]}}),u=a.filter(f=>{if(!e)return!0;const p=e.toLowerCase();return(f.display_name||"").toLowerCase().includes(p)||f.user_id.toLowerCase().includes(p)}),d=[...u].sort((f,p)=>(p.total_earned||0)-(f.total_earned||0)),h=n?a.find(f=>f.user_id===n):null;return s.jsx(xr,{children:s.jsxs("div",{className:"container max-w-6xl py-8",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Dashboard Admin"]}),s.jsxs("h1",{className:"font-heading text-3xl font-bold tracking-tight mb-6 flex items-center gap-3",children:[s.jsx(Wi,{size:28,className:"text-primary"})," EduCoins — Management"]}),s.jsxs(Gi,{defaultValue:"users",children:[s.jsxs(Ri,{className:"grid w-full grid-cols-2 max-w-sm mb-6",children:[s.jsxs(Mt,{value:"users",children:[s.jsx(Rn,{size:14,className:"mr-1"})," Utilizatori"]}),s.jsxs(Mt,{value:"analytics",children:[s.jsx(Eo,{size:14,className:"mr-1"})," Analytics"]})]}),s.jsxs(er,{value:"users",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsxs("div",{className:"relative flex-1 max-w-md",children:[s.jsx(ul,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută după nume sau ID...",value:e,onCh
2179ange:f=>r(f.target.value),className:"pl-9"})]}),s.jsxs(at,{variant:"secondary",children:[u.length," utilizatori"]})]}),s.jsx("div",{className:"rounded-xl border border-border overflow-hidden mb-6",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Utilizator"}),s.jsx(Me,{className:"text-right",children:"Balanță"}),s.jsx(Me,{className:"text-right",children:"Total câștigat"}),s.jsx(Me,{className:"text-right",children:"Scor validat"}),s.jsx(Me,{children:"Nivel"}),s.jsx(Me,{className:"text-right",children:"Streak"}),s.jsx(Me,{})]})}),s.jsx(In,{children:o?s.jsx(Nt,{children:s.jsx(Oe,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"Se încarcă..."})}):d.length===0?s.jsx(Nt,{children:s.jsx(Oe,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"Niciun utilizator găsit"})}):d.map(f=>{var A,g,y;const p=FZ(f.validated_edu_score||0),m=n===f.user_id;return s.jsxs(Nt,{className:m?"bg-primary/5":"",children:[s.jsx(Oe,{children:s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:f.display_name||"—"}),s.jsxs("p",{className:"text-[10px] text-muted-foreground font-mono",children:[f.user_id.slice(0,8),"…"]})]})}),s.jsx(Oe,{className:"text-right font-mono text-sm",children:((A=f.balance)==null?void 0:A.toLocaleString())??0}),s.jsx(Oe,{className:"text-right font-mono text-sm text-primary",children:((g=f.total_earned)==null?void 0:g.toLocaleString())??0}),s.jsx(Oe,{className:"text-right font-mono text-sm",children:((y=f.validated_edu_score)==null?void 0:y.toLocaleString())??0}),s.jsx(Oe,{children:s.jsxs(at,{variant:"outline",className:"text-xs",children:[p.icon," ",p.name]})}),s.jsxs(Oe,{className:"text-right text-sm",children:[f.login_streak??0," 🔥"]}),s.jsx(Oe,{children:s.jsx(me,{variant:"ghost",size:"sm",onClick:()=>i(m?null:f.user_id),children:m?s.jsx(i4,{size:14}):s.jsx(Vl,{size:14})})})]},f.user_id)})})]})}),h&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h3",{className:"font-heading font-semibold text-lg flex items-center gap-2",children:[s.jsx(oo,{size:18,className:"text-primary"}),"Detalii — ",h.display_name||h.user_id.slice(0,12)]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[s.jsx(qN,{label:"Learning",value:h.learning_score,color:"text-primary"}),s.jsx(qN,{label:"Community",value:h.community_score,color:"text-blue-500"}),s.jsx(qN,{label:"Pasiv",value:h.passive_score,color:"text-amber-500"}),s.jsx(qN,{label:"Growth",value:h.growth_score,color:"text-green-500"})]}),s.jsxs(st,{className:"glass-card",children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm",children:"Ultimele tranzacții"})}),s.jsx(ot,{children:c.length===0?s.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"Nicio tranzacție"}):s.jsx("div",{className:"max-h-72 overflow-y-auto space-y-1",children:c.map(f=>s.jsxs("div",{className:"flex items-center justify-between py-1.5 px-2 rounded hover:bg-muted/30 text-xs",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(i1t,{category:f.category}),s.jsx("span",{className:"font-medium",children:f.reason})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"font-mono text-primary font-semibold",children:["+",f.amount]}),s.jsx("span",{className:"text-muted-foreground",children:new Date(f.created_at).toLocaleDateString("ro-RO")})]})]},f.id))})})]})]})]}),s.jsxs(er,{value:"analytics",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-6",children:[s.jsx(WN,{label:"Utilizatori cu wallet",value:(l==null?void 0:l.totalUsers)??0}),s.jsx(WN,{label:"Total coins generate",value:(l==null?void 0:l.totalMinted)??0,color:"text-primary"}),s.jsx(WN,{label:"Total coins cheltuite",value:(l==null?void 0:l.totalSpent)??0,color:"text-amber-500"}),s.jsx(WN,{label:"Coins în circulație",value:(l==null?void 0:l.totalInCirculation)??0,color:"text-green-500"})]}),s.jsxs(st,{className:"glass-card mb-6",children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-sm flex items-center gap-2",children:[s.jsx(oa,{size:16})," Distribuție pe niveluri"]})}),s.jsx(ot,{children:s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-6 gap-3",children:qv.map(f=>{var p;return s.jsxs("div",{className:"text-center p-3 rounded-lg bg-muted/30",children:[s.jsx("p",{className:"text-2xl mb-1",children:f.icon}),s.jsx("p",{className:"text-xs font-medium",children:f.name}),s.jsx("p",{className:"text-lg font-heading font-bold",children:((p=l==null?void 0:l.levelDist)==null?void 0:p[f.name])??0})]},f.name)}
2179)})})]}),s.jsxs(st,{className:"glass-card",children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm",children:"⚠️ Indicatori anti-abuz"})}),s.jsx(ot,{children:s.jsxs("div",{className:"flex items-center justify-between py-2",children:[s.jsx("span",{className:"text-sm",children:"Utilizatori cu balanță mare + learning scăzut"}),s.jsx(at,{variant:l!=null&&l.highWalletLowLearning?"destructive":"secondary",children:(l==null?void 0:l.highWalletLowLearning)??0})]})})]})]})]})]})})}function WN({label:e,value:r,color:n}){return s.jsxs(st,{className:"glass-card",children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm",children:e})}),s.jsx(ot,{children:s.jsx("p",{className:`text-3xl font-heading font-bold ${n||""}`,children:r.toLocaleString()})})]})}function qN({label:e,value:r,color:n}){return s.jsxs("div",{className:"glass-card rounded-lg p-3 text-center border border-border/30",children:[s.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:e}),s.jsx("p",{className:`text-xl font-heading font-bold ${n}`,children:(r||0).toLocaleString()})]})}function i1t({category:e}){const r={passive:"bg-amber-500/10 text-amber-600",learning:"bg-primary/10 text-primary",community:"bg-blue-500/10 text-blue-600",growth:"bg-green-500/10 text-green-600"};return s.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-medium ${r[e]||"bg-muted text-muted-foreground"}`,children:e})}function a1t(){return Xe({queryKey:["internal-links"],queryFn:async()=>{const{data:e,error:r}=await G.from("internal_links").select("*").order("sort_order",{ascending:!0});if(r)throw r;return e},staleTime:1e3*60*10})}function s1t(){var D;const{data:e,isLoading:r}=a1t(),n=Kr(),[i,a]=w.useState(""),[o,l]=w.useState(""),[c,u]=w.useState(""),[d,h]=w.useState(!1),[f,p]=w.useState(null),[m,A]=w.useState(null),[g,y]=w.useState(""),[x,b]=w.useState(""),[v,j]=w.useState(0),C=((e==null?void 0:e.filter(L=>L.keyword.toLowerCase().includes(i.toLowerCase())||L.path.toLowerCase().includes(i.toLowerCase())))||[]).reduce((L,V)=>(L[V.path]||(L[V.path]=[]),L[V.path].push(V),L),{}),N=async()=>{if(!o.trim()||!c.trim()){ft.error("Completează keyword și path");return}const L=(e==null?void 0:e.reduce((U,Q)=>Math.max(U,Q.sort_order),0))||0,{error:V}=await G.from("internal_links").insert({keyword:o.trim(),path:c.trim(),sort_order:L+1});if(V){ft.error(V.message);return}ft.success("Link adăugat"),l(""),u(""),n.invalidateQueries({queryKey:["internal-links"]})},S=async(L,V)=>{const{error:U}=await G.from("internal_links").update({is_active:!V}).eq("id",L);if(U){ft.error(U.message);return}n.invalidateQueries({queryKey:["internal-links"]})},E=async L=>{const{error:V}=await G.from("internal_links").delete().eq("id",L);if(V){ft.error(V.message);return}ft.success("Link șters"),n.invalidateQueries({queryKey:["internal-links"]})},O=L=>{A(L.id),y(L.keyword),b(L.path),j(L.sort_order)},B=async()=>{if(!m)return;const{error:L}=await G.from("internal_links").update({keyword:g,path:x,sort_order:v,updated_at:new Date().toISOString()}).eq("id",m);if(L){ft.error(L.message);return}ft.success("Link actualizat"),A(null),n.invalidateQueries({queryKey:["internal-links"]})},T=(e==null?void 0:e.filter(L=>L.is_active).length)||0,F=new Set((e==null?void 0:e.map(L=>L.path))||[]).size,I=async L=>{h(!0),p(null);try{let V=[],U=0,Q=0,$=0,q=0;for(;;){const{data:M,error:z}=await G.functions.invoke("inject-internal-links",{body:{dry_run:L,batch_size:50,offset:U,min_links:5}});if(z)throw z;if(Q+=M.total_processed||0,$+=M.posts_updated||0,q+=M.total_links_injected||0,M.results&&(V=[...V,...M.results]),(M.total_processed||0)<50)break;U=M.next_offset}p({dry_run:L,total_processed:Q,posts_updated:$,total_links_injected:q,results:V}),ft.success(L?`Audit: ${$} articole ar primi ${q} linkuri`:`Injectat ${q} linkuri în ${$} articole`)}catch(V){ft.error("Eroare: "+(V.message||"Unknown"))}finally{h(!1)}};return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-4xl",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6",children:[s.jsx(rn,{size:16})," Înapoi la Admin"]}),s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(rle,{className:"text-primary",size:28}),s.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Linkuri Interne"})]}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Gestionează cuvintele cheie care sunt transformate automat în linkuri interne în articole."}),s.jsxs("div",{className:"glass-card rounded-xl p-4 mb-6 flex flex-wrap gap-6 items-center",children:[s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"font-semibold text-foreground",children:(e==null?void 0:e.length)||0})," ",s.jsx("span",{className:"text-muted-foreground",children:"total keywords"})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"font-semibold text-green-600",children:T})," ",s.jsx("span",{className:"text-muted-foreground",children:"active"})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"font-semibold text-foreground",children:F})," ",s.jsx("span",{className:"text-muted-foreground",children:"pagini destinație"})]})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5 mb-6 border border-primary/20",children:[s.jsx("h2",{className:"font-semibold text-sm mb-3 text-muted-foreground uppercase tracking-wider",children:"🔗 Audit Linkuri Interne — Articole Publicate"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Scanează toate articolele publicate și injectează automat linkuri interne (min. 5 per articol). Prioritate: Pillar Pages → Glosar → Alte Articole."}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs(me,{onClick:()=>I(!0),disabled:d,variant:"outline",children:[d?s.jsx(rt,{size:16,className:"mr-2 animate-spin"}):s.jsx(kV,{size:16,className:"mr-2"}),"Dry Run (doar raport)"]}),s.jsxs(me,{onClick:()=>{confirm("Ești sigur? Va modifica body_ro/body_en.")&&I(!1)},disabled:d,variant:"default",children:[d?s.jsx(rt,{size:16,className:"mr-2 animate-spin"}):s.jsx(kV,{size:16,className:"mr-2"}),"Aplică Linkuri (LIVE)"]})]}),f&&s.jsxs("div",{className:"mt-4 space-y-3",children:[s.jsxs("div",{className:"flex flex-wrap gap-4 text-sm",children:[s.jsxs(at,{variant:"outline",children:[f.total_processed," articole scanate"]}),s.jsxs(at,{variant:"outline",className:"bg-primary/10",children:[f.posts_updated," actualizate"]}),s.jsxs(at,{variant:"outline",className:"bg-primary/10",children:[f.total_links_injected," linkuri"]}),s.jsx(at,{variant:f.dry_run?"secondary":"default",children:f.dry_run?"DRY RUN":"LIVE"})]}),((D=f.results)==null?void 0:D.length)>0&&s.jsx("div",{className:"max-h-96 overflow-y-auto rounded-lg border bg-muted/30 p-3",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-left text-muted-foreground",children:[s.jsx("th",{className:"pb-2",children:"Articol"}),s.jsx("th",{className:"pb-2",children:"Înainte"}),s.jsx("th",{className:"pb-2",children:"După"}),s.jsx("th",{className:"pb-2",children:"Linkuri"})]})}),s.jsx("tbody",{children:f.results.map((L,V)=>{var U,Q;return s.jsxs("tr",{className:"border-t border-border/50",children:[s.jsx("td",{className:"py-1.5 pr-3 max-w-[200px] truncate font-medium",children:L.slug}),s.jsx("td",{className:"py-1.5 pr-3",children:L.ro_links_before}),s.jsx("td",{className:"py-1.5 pr-3",children:L.ro_links_after}),s.jsxs("td",{className:"py-1.5",children:[(U=L.injected_ro)==null?void 0:U.slice(0,3).map(($,q)=>s.jsx("span",{className:"inline-block bg-primary/10 text-primary rounded px-1.5 py-0.5 mr-1 mb-0.5",children:$},q)),(((Q=L.injected_ro)==null?void 0:Q.length)||0)>3&&s.jsxs("span",{className:"text-muted-foreground",children:["+",L.injected_ro.length-3]})]})]},V)})})]})})]})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5 mb-6",children:[s.jsx("h2",{className:"font-semibold text-sm mb-3 text-muted-foreground uppercase tracking-wider",children:"Adaugă keyword nou"}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsx(qe,{placeholder:"Keyword (ex: Bitcoin)",value:o,onChange:L=>l(L.target.value),className:"flex-1"}),s.jsx(qe,{placeholder:"Path (ex: /pret-bitcoin-btc)",value:c,onChange:L=>u(L.target.value),className:"flex-1"}),s.jsxs(me,{onClick:N,className:"shrink-0",children:[s.jsx(Qn,{size:16,className:"mr-1"})," Adaugă"]})]})]}),s.jsxs("div",{className:"relative mb-6",children:[s.jsx(ul,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută keyword sau path...",value:i,onChange:L=>a(L.target.value),className:"pl-9"})]}),r?s.jsx("div",{className:"text-center py-10 text-muted-foreground",children:"Se încarcă..."}):s.jsx("div",{className:"space-y-4",children:Object.entries(C).sort(([,L],[,V])=>L[0].sort_order-V[0].sort_order).map(([L,V])=>s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(Yr,{size:14,className:"text-primary"}),s.jsx("code",{className:"text-sm font-mono font-semibold text-primary",children:L}),s.jsxs(at,{variant:"outline",className:"text-xs ml-auto",children:[V.length," keywords"]})]}),s.jsx("div",{className:"space-y-2",children:V.map(U=>s.jsx("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg bg-muted/30 hover:bg-muted/60 transition-colors group",children:m===U.id?s.jsxs(s.Fragment,{children:[s.jsx(qe,{value:g,onChange:Q=>y(Q.target.value),className:"flex-1 h-8 text-sm"}),s.jsx(qe,{value:x,onChange:Q=>b(Q.target.value),className:"w-48 h-8 text-sm"}
2179),s.jsx(qe,{type:"number",value:v,onChange:Q=>j(Number(Q.target.value)),className:"w-20 h-8 text-sm"}),s.jsx(me,{size:"sm",variant:"ghost",onClick:B,children:s.jsx(Bu,{size:14})}),s.jsx(me,{size:"sm",variant:"ghost",onClick:()=>A(null),children:"✕"})]}):s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>S(U.id,U.is_active),className:"shrink-0",title:U.is_active?"Dezactivează":"Activează",children:U.is_active?s.jsx($U,{size:20,className:"text-green-500"}):s.jsx(UU,{size:20,className:"text-muted-foreground"})}),s.jsx("span",{className:`flex-1 text-sm cursor-pointer hover:text-primary ${U.is_active?"":"line-through text-muted-foreground"}`,onClick:()=>O(U),title:"Click pentru editare",children:U.keyword}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["#",U.sort_order]}),s.jsx("button",{onClick:()=>E(U.id),className:"opacity-0 group-hover:opacity-100 p-1 text-destructive hover:text-destructive/80 transition-opacity",title:"Șterge",children:s.jsx(Xr,{size:14})})]})},U.id))})]},L))})]})})}var o1t={},l1t=Object.defineProperty,qve=(e,r)=>{for(var n in r)l1t(e,n,{get:r[n],enumerable:!0,configurable:!0,set:i=>r[n]=()=>i})};if(typeof w.createContext!="function"){const e=['Remotion requires React.createContext, but it is "undefined".','If you are in a React Server Component, turn it into a client component by adding "use client" at the top of the file.',"","Before:",'  import {useCurrentFrame} from "remotion";',"","After:",'  "use client";','  import {useCurrentFrame} from "remotion";'];throw new Error(e.join(`
2180`))}var Gg=w.createContext(!1),rz=({children:e})=>s.jsx(Gg.Provider,{value:!0,children:e}),Kve=w.createContext({setError:()=>{},clearError:()=>{}});class c1t extends ee.Component{constructor(){super(...arguments);tr(this,"state",{hasError:!1})}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){this.props.onError(n)}componentDidUpdate(n){this.state.hasError||this.props.onClear()}render(){return this.state.hasError?null:this.props.children}}var xb=w.createContext({compositions:[],folders:[],currentCompositionMetadata:null,canvasContent:null}),XT=w.createContext({registerComposition:()=>{},unregisterComposition:()=>{},registerFolder:()=>{},unregisterFolder:()=>{},setCanvasContent:()=>{},onlyRenderComposition:null}),K_=w.createContext({getNonce:()=>0}),yk=0;try{typeof __webpack_module__<"u"&&__webpack_module__.hot&&__webpack_module__.hot.addStatusHandler(e=>{e==="idle"&&yk++})}catch{}var i7=()=>{const r=w.useContext(K_).getNonce(),n=w.useRef(r);n.current=r;const i=w.useRef([[yk,r]]),a=w.useCallback(()=>(yk!==i.current[i.current.length-1][0]&&(i.current=[...i.current,[yk,n.current]]),i.current),[i]);return w.useMemo(()=>({get:a}),[a])};function G_(e){return!!e}var u1t=w.createContext({folderName:null,parentName:null});function OZ(){return["NOD","E_EN","V"].join("")}var LZ=()=>["e","nv"].join(""),bd=()=>{const e=typeof window<"u"&&window.remotion_isPlayer,r=typeof window<"u"&&typeof window.process<"u"&&typeof window.process.env<"u"&&(window.process[LZ()][OZ()]==="test"||window.process[LZ()][OZ()]==="production"&&typeof window<"u"&&typeof window.remotion_puppeteerTimeout<"u"),n=typeof window<"u"&&window.remotion_isStudio,i=typeof window<"u"&&window.remotion_isReadOnlyStudio;return{isStudio:n,isRendering:r,isPlayer:e,isReadOnlyStudio:i,isClientSideRendering:!1}},nz="remotion-date:",iz="remotion-file:",d1t=({data:e,indent:r,staticBase:n})=>{let i=!1,a=!1,o=!1,l=!1;try{return{serializedString:JSON.stringify(e,function(u,d){const h=this[u];return h instanceof Date?(i=!0,`${nz}${h.toISOString()}`):h instanceof Map?(o=!0,d):h instanceof Set?(l=!0,d):typeof h=="string"&&n!==null&&h.startsWith(n)?(a=!0,`${iz}${h.replace(n+"/","")}`):d},r),customDateUsed:i,customFileUsed:a,mapUsed:o,setUsed:l}}catch(c){throw new Error("Could not serialize the passed input props to JSON: "+c.message)}},Gve=e=>JSON.parse(e,(r,n)=>typeof n=="string"&&n.startsWith(nz)?new Date(n.replace(nz,"")):typeof n=="string"&&n.startsWith(iz)?`${window.remotion_staticBase}/${n.replace(iz,"")}`:n),h1t=e=>Gve(d1t({data:e,indent:2,staticBase:window.remotion_staticBase}).serializedString),AA=e=>bd().isStudio?h1t(e):e,Xve=w.createContext(!1),f1t=({children:e})=>s.jsx(Xve.Provider,{value:!0,children:e}),a7=()=>w.useContext(Xve),$f=({className:e,classPrefix:r,type:n})=>{if(!e)return!1;if(n==="exact"){const i=e.split(" ");return r.some(a=>i.some(o=>o.trim()===a||o.trim().endsWith(`:${a}`)||o.trim().endsWith(`!${a}`)))}return r.some(i=>e.startsWith(i)||e.includes(` ${i}`)||e.includes(`!${i}`)||e.includes(`:${i}`))},m1t=(e,r)=>{const{style:n,...i}=e,a=w.useMemo(()=>({position:"absolute",top:$f({className:i.className,classPrefix:["top-","inset-"],type:"prefix"})?void 0:0,left:$f({className:i.className,classPrefix:["left-","inset-"],type:"prefix"})?void 0:0,right:$f({className:i.className,classPrefix:["right-","inset-"],type:"prefix"})?void 0:0,bottom:$f({className:i.className,classPrefix:["bottom-","inset-"],type:"prefix"})?void 0:0,width:$f({className:i.className,classPrefix:["w-"],type:"prefix"})?void 0:"100%",height:$f({className:i.className,classPrefix:["h-"],type:"prefix"})?void 0:"100%",display:$f({className:i.className,classPrefix:["block","inline-block","inline","flex","inline-flex","flow-root","grid","inline-grid","contents","list-item","hidden"],type:"exact"})?void 0:"flex",flexDirection:$f({className:i.className,classPrefix:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"],type:"exact"})?void 0:"column",...n}),[i.className,n]);
2180return s.jsx("div",{ref:r,style:a,...i})},yb=w.forwardRef(m1t),p1t={transform:"rotate(90deg)"},RZ=40,A1t={color:"white",fontSize:14,fontFamily:"sans-serif"},g1t={justifyContent:"center",alignItems:"center"},x1t=()=>s.jsxs(yb,{style:g1t,id:"remotion-comp-loading",children:[s.jsx("style",{type:"text/css",children:`
2181				@keyframes anim {
2182					from {
2183						opacity: 0
2184					}
2185					to {
2186						opacity: 1
2187					}
2188				}
2189				#remotion-comp-loading {
2190					animation: anim 2s;
2191					animation-fill-mode: forwards;
2192				}
2193			`}),s.jsx("svg",{width:RZ,height:RZ,viewBox:"-100 -100 400 400",style:p1t,children:s.jsx("path",{fill:"#555",stroke:"#555",strokeWidth:"100",strokeLinejoin:"round",d:"M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z"})}),s.jsxs("p",{style:A1t,children:["Resolving ","<Suspense>","..."]})]}),jl=null,az=()=>{if(!jl){if(typeof document>"u")throw new Error("Tried to call an API that only works in the browser from outside the browser");jl=document.createElement("div"),jl.style.position="absolute",jl.style.top="0px",jl.style.left="0px",jl.style.right="0px",jl.style.bottom="0px",jl.style.width="100%",jl.style.height="100%",jl.style.display="flex",jl.style.flexDirection="column";const e=document.createElement("div");e.style.position="fixed",e.style.top="-999999px",e.appendChild(jl),document.body.appendChild(e)}return jl},sz=()=>"remotion_inputPropsOverride"+window.location.origin,Yve=()=>{if(typeof localStorage>"u")return null;const e=localStorage.getItem(sz());return e?JSON.parse(e):null},y1t=e=>{if(!(typeof localStorage>"u")){if(e===null){localStorage.removeItem(sz());return}localStorage.setItem(sz(),JSON.stringify(e))}},DZ=!1,v1t=()=>{DZ||(DZ=!0,console.warn("Called `getInputProps()` on the server. This function is not available server-side and has returned an empty object."),console.warn("To hide this warning, don't call this function on the server:"),console.warn("  typeof window === 'undefined' ? {} : getInputProps()"))},b1t=()=>{if(typeof window>"u")return v1t(),{};if(bd().isPlayer)throw new Error("You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.");const e=Yve();if(e)return e;if(typeof window>"u"||typeof window.remotion_inputProps>"u")throw new Error("Cannot call `getInputProps()` - window.remotion_inputProps is not set. This API is only available if you are in the Studio, or while you are rendering server-side.");const r=window.remotion_inputProps;return r?Gve(r):{}},s7=w.createContext({props:{},updateProps:()=>{throw new Error("Not implemented")}}),w1t=ee.createRef(),Jve=({children:e})=>{const[r,n]=ee.useState({}),i=w.useCallback(({defaultProps:o,id:l,newProps:c})=>{n(u=>({...u,[l]:typeof c=="function"?c(u[l]??o):c}))},[]),a=w.useMemo(()=>({props:r,updateProps:i}),[r,i]);return s.jsx(s7.Provider,{value:a,children:e})},Zve=ee.createContext(null),Oa=()=>{const e=w.useContext(Zve),[r]=w.useState(()=>bd());return e??r};function K5(e,r,n){if(typeof e!="number")throw new Error(`The "${r}" prop ${n} must be a number, but you passed a value of type ${typeof e}`);if(isNaN(e))throw new TypeError(`The "${r}" prop ${n} must not be NaN, but is NaN.`);if(!Number.isFinite(e))throw new TypeError(`The "${r}" prop ${n} must be finite, but is ${e}.`);if(e%1!==0)throw new TypeError(`The "${r}" prop ${n} must be an integer, but is ${e}.`);if(e<=0)throw new TypeError(`The "${r}" prop ${n} must be positive, but got ${e}.`)}function YT(e,r){const{allowFloats:n,component:i}=r;if(typeof e>"u")throw new Error(`The "durationInFrames" prop ${i} is missing.`);if(typeof e!="number")throw new Error(`The "durationInFrames" prop ${i} must be a number, but you passed a value of type ${typeof e}`);if(e<=0)throw new TypeError(`The "durationInFrames" prop ${i} must be positive, but got ${e}.`);if(!n&&e%1!==0)throw new TypeError(`The "durationInFrames" prop ${i} must be an integer, but got ${e}.`);if(!Number.isFinite(e))throw new TypeError(`The "durationInFrames" prop ${i} must be finite, but got ${e}.`)}function JT(e,r,n){if(typeof e!="number")throw new Error(`"fps" must be a number, but you passed a value of type ${typeof e} ${r}`);if(!Number.isFinite(e))throw new Error(`"fps" must be a finite, but you passed ${e} ${r}`);if(isNaN(e))throw new Error(`"fps" must not be NaN, but got ${e} ${r}`);if(e<=0)throw new TypeError(`"fps" must be positive, but got ${e} ${r}`)}var ZT=w.createContext(null),j1t=w.createRef(),_1t=e=>!!e.calculateMetadata,o7=e=>{const r=w.useContext(ZT),{props:n}=w.useContext(s7),{compositions:i,canvasContent:a,currentCompositionMetadata:o}=w.useContext(xb),l=(a==null?void 0:a.type)==="composition"?a.compositionId:null,c=e??l,u=i.find(f=>f.id===c),d=w.useMemo(()=>u?n[u.id]??{}:{},[n,u]),h=Oa();return w.useMemo(()=>u?o?{type:"success",result:{...o,id:u.id,defaultProps:u.defaultProps??{}}}:_1t(u)?!r||!r[u.id]?null:r[u.id]:(YT(u.durationInFrames,{allowFloats:!1,component:`in <Composition id="${u.id}">`}),JT(u.fps,`in <Composition id="${u.id}">`),K5(u.width,"width",`in <Composition id="${u.id}">`),K5(u.height,"height",`in <Composition id="${u.id}">`),{type:"success",result:{width:u.width,height:u.height,fps:u.fps,id:u.id,durationInFrames:u.durationInFrames,defaultProps:u.defaultProps??{},props:{...u.defaultProps??{},...d??{},...typeof window>"u"||h.isPlayer||!window.remotion_inputProps?{}:b1t()??{}},defaultCodec:null,defaultOutName:null,defaultVideoImageFormat:null,defaultPixelFormat:null,defaultProResProfile:null,defaultSampleRate:null}}):null,[u,r,o,d,h.isPlayer])},e0e=e=>{const r=e.stack??"";return r.startsWith("Error:")?r:`${e.message}
2194${r}`},C1t=e=>e instanceof Error?!0:!(e===null||typeof e!="object"||!("stack"in e)||typeof e.stack!="string"||!("message"in e)||typeof e.message!="string");function l7(e,r){let n;throw C1t(r)?(n=r,n.stack||(n.stack=new Error(n.message).stack)):typeof r=="string"?n=Error(r):n=Error("Rendering was cancelled"),e&&(e.remotion_cancelledError=e0e(n)),n}function Uj(e){return l7(typeof window<"u"?window:void 0,e)}var N1t=["trace","verbose","info","warn","error"],MZ=e=>N1t.indexOf(e),e3=(e,r)=>MZ(e)<=MZ(r),X_=({args:e,logLevel:r,tag:n})=>{const i=[...e];return bd().isRendering&&!bd().isClientSideRendering&&i.unshift(Symbol.for(`__remotion_level_${r}`)),n&&bd().isRendering&&!bd().isClientSideRendering&&i.unshift(Symbol.for(`__remotion_tag_${n}`)),i},S1t=(e,...r)=>{if(e3(e.logLevel,"verbose"))return console.debug(...X_({args:r,logLevel:"verbose",tag:e.tag}))},k1t=(e,...r)=>{if(e3(e.logLevel,"trace"))return console.debug(...X_({args:r,logLevel:"trace",tag:e.tag}))},E1t=(e,...r)=>{if(e3(e.logLevel,"info"))return console.log(...X_({args:r,logLevel:"info",tag:e.tag}))},B1t=(e,...r)=>{if(e3(e.logLevel,"warn"))return console.warn(...X_({args:r,logLevel:"warn",tag:e.tag}))},T1t=(e,...r)=>console.error(...X_({args:r,logLevel:"error",tag:e.tag})),Ql={trace:k1t,verbose:S1t,info:E1t,warn:B1t,error:T1t};typeof window<"u"&&(window.remotion_renderReady=!1,window.remotion_delayRenderTimeouts||(window.remotion_delayRenderTimeouts={}),window.remotion_delayRenderHandles=[]);var P1t="The delayRender was called:",I1t="Retries left: ",F1t="- Rendering the frame will be retried.",O1t="handle was cleared after",L1t=3e4,R1t=({scope:e,environment:r,label:n,options:i})=>{var l;
2194if(typeof n!="string"&&n!==null)throw new Error("The label parameter of delayRender() must be a string or undefined, got: "+JSON.stringify(n));const a=Math.random();e.remotion_delayRenderHandles.push(a);const o=((l=Error().stack)==null?void 0:l.replace(/^Error/g,""))??"";if(r.isRendering){const c=((i==null?void 0:i.timeoutInMilliseconds)??e.remotion_puppeteerTimeout??L1t)-2e3,u=((i==null?void 0:i.retries)??0)-(e.remotion_attempt-1);e.remotion_delayRenderTimeouts[a]={label:n??null,startTime:Date.now(),timeout:setTimeout(()=>{const d=["A delayRender()",n?`"${n}"`:null,`was called but not cleared after ${c}ms. See https://remotion.dev/docs/timeout for help.`,u>0?I1t+u:null,u>0?F1t:null,P1t,o].filter(G_).join(" ");r.isClientSideRendering?e.remotion_cancelledError=e0e(Error(d)):l7(e,Error(d))},c)}}return e.remotion_renderReady=!1,a},D1t=({scope:e,handle:r,environment:n,logLevel:i})=>{if(typeof r>"u")throw new TypeError("The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.");if(typeof r!="number")throw new TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: "+JSON.stringify(r));e.remotion_delayRenderHandles=e.remotion_delayRenderHandles.filter(a=>{if(a===r){if(n.isRendering&&e!==void 0){if(!e.remotion_delayRenderTimeouts[r])return!1;const{label:o,startTime:l,timeout:c}=e.remotion_delayRenderTimeouts[r];clearTimeout(c);const u=[o?`"${o}"`:"A handle",O1t,`${Date.now()-l}ms`].filter(G_).join(" ");Ql.verbose({logLevel:i,tag:"delayRender()"},u),delete e.remotion_delayRenderTimeouts[r]}return!1}return!0}),e.remotion_delayRenderHandles.length===0&&(e.remotion_renderReady=!0)},Xg=w.createContext({logLevel:"info",mountTime:0}),Op=()=>{const{logLevel:e}=w.useContext(Xg);if(e===null)throw new Error("useLogLevel must be used within a LogLevelProvider");return e},Y_=()=>{const{mountTime:e}=w.useContext(Xg);if(e===null)throw new Error("useMountTime must be used within a LogLevelProvider");return e},t0e=w.createContext(null),Lp=()=>{const e=Oa(),r=w.useContext(t0e)??(typeof window<"u"?window:void 0),n=Op(),i=w.useCallback((l,c)=>r?R1t({scope:r,environment:e,label:l??null,options:c??{}}):Math.random(),[e,r]),a=w.useCallback(l=>{r&&D1t({scope:r,handle:l,environment:e,logLevel:n})},[e,n,r]),o=w.useCallback(l=>l7(r??(typeof window<"u"?window:void 0),l),[r]);return{delayRender:i,continueRender:a,cancelRender:o}},r0e=({compProps:e,componentName:r,noSuspense:n})=>{const i=w.useRef(null);return"component"in e&&(i.current=e.component),w.useMemo(()=>{if("component"in e){if(typeof document>"u"||n)return e.component;if(typeof e.component>"u")throw new Error(`A value of \`undefined\` was passed to the \`component\` prop. Check the value you are passing to the <${r}/> component.`);return l=>{const c=i.current;return ee.createElement(c,l)}}if("lazyComponent"in e&&typeof e.lazyComponent<"u"){if(typeof e.lazyComponent>"u")throw new Error(`A value of \`undefined\` was passed to the \`lazyComponent\` prop. Check the value you are passing to the <${r}/> component.`);return ee.lazy(e.lazyComponent)}throw new Error("You must pass either 'component' or 'lazyComponent'")},[e.lazyComponent])},t3=()=>{const{canvasContent:e,compositions:r,currentCompositionMetadata:n}=w.useContext(xb),i=r.find(o=>(e==null?void 0:e.type)==="composition"&&o.id===e.compositionId),a=o7((i==null?void 0:i.id)??null);return w.useMemo(()=>!a||a.type==="error"||a.type==="loading"||!i?null:{...a.result,defaultProps:i.defaultProps??{},id:i.id,...n??{},component:i.component},[n,a,i])},n0e=()=>/^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g,i0e=e=>e.match(n0e()),M1t=e=>{if(!i0e(e))throw new Error(`Composition id can only contain a-z, A-Z, 0-9, CJK characters and -. You passed ${e}`)},z1t=`Composition ID must match ${String(n0e())}`,U1t=(e,r,n)=>{if(e){if(typeof e!="object")throw new Error(`"${r}" must be an object, but you passed a value of type ${typeof e}`);if(Array.isArray(e))throw new Error(`"${r}" must be an object, an array was passed ${n?`for composition "${n}"`:""}`)}},$1t=()=>{const{continueRender:e,delayRender:r}=Lp();return w.useEffect(()=>{const n=r("Waiting for Root component to unsuspend");return()=>e(n)},[e,r]),null},Q1t=({width:e,height:r,fps:n,durationInFrames:i,id:a,defaultProps:o,schema:l,...c})=>{const u=w.useContext(XT),{registerComposition:d,unregisterComposition:h}=u,f=t3(),p=r0e({compProps:c,componentName:"Composition",noSuspense:!1}),m=i7(),A=a7(),g=Oa(),y=w.useContext(Gg);if(typeof window<"u"&&(window.remotion_seenCompositionIds=Array.from(new Set([...window.remotion_seenCompositionIds??[],a]))),y)throw A?new Error("<Composition>
2194 was mounted inside the `component` that was passed to the <Player>. See https://remotion.dev/docs/wrong-composition-mount for help."):new Error("<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.");const{folderName:x,parentName:b}=w.useContext(u1t),v=c.stack??null;w.useEffect(()=>{if(!a)throw new Error("No id for composition passed.");return M1t(a),U1t(o,"defaultProps",a),d({durationInFrames:i??void 0,fps:n??void 0,height:r??void 0,width:e??void 0,id:a,folderName:x,component:p,defaultProps:AA(o??{}),nonce:m.get(),parentFolderName:b,schema:l??null,calculateMetadata:c.calculateMetadata??null,stack:v}),()=>{h(a)}},[i,n,r,p,a,x,o,e,m,b,l,c.calculateMetadata,v,d,h]);const j=o7(a),{setError:_,clearError:C}=w.useContext(Kve),N=w.useCallback(E=>{_(E)},[_]),S=w.useCallback(()=>{C()},[C]);if(g.isStudio&&f&&f.component===p&&f.id===a){const E=p;return j===null||j.type!=="success"&&j.type!=="success-and-refreshing"?null:Kh.createPortal(s.jsx(rz,{children:s.jsx(c1t,{onError:N,onClear:S,children:s.jsx(w.Suspense,{fallback:s.jsx(x1t,{}),children:s.jsx(E,{...j.result.props??{}})})})}),az())}if(g.isRendering&&f&&f.component===p&&f.id===a){const E=p;return j===null||j.type!=="success"&&j.type!=="success-and-refreshing"?null:Kh.createPortal(s.jsx(rz,{children:s.jsx(w.Suspense,{fallback:s.jsx($1t,{}),children:s.jsx(E,{...j.result.props??{}})})}),az())}return null},oz=e=>{const{onlyRenderComposition:r}=w.useContext(XT);return r&&r!==e.id?null:s.jsx(Q1t,{...e})},a0e=[],H1t=()=>a0e,bf=e=>{a0e.push(e)},lw="4.0.451",V1t=()=>{if(typeof globalThis>"u")return;const e=()=>{globalThis.remotion_imported=lw,typeof window<"u"&&(window.remotion_imported=lw)},r=globalThis.remotion_imported||typeof window<"u"&&window.remotion_imported;if(r){if(r===lw)return;if(typeof r=="string"&&r.includes("webcodecs")){e();return}throw new TypeError(`🚨 Multiple versions of Remotion detected: ${[lw,typeof r=="string"?r:"an older version"].filter(G_).join(" and ")}. This will cause things to break in an unexpected way.
2195Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`)}e()},Fa=w.createContext(null),lz={};qve(lz,{useTimelineSetFrame:()=>d0e,useTimelinePosition:()=>Rp,useTimelineContext:()=>Hd,usePlayingState:()=>h0e,useAbsoluteTimelinePosition:()=>u0e,persistCurrentFrame:()=>s0e,getInitialFrameState:()=>o0e,getFrameForComposition:()=>l0e});function zZ(e){let r=e+1831565813;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296}function W1t(e){let r=0,n=0,i=0;for(r=0;r<e.length;r++)n=e.charCodeAt(r),i=(i<<5)-i+n,i|=0;return i}var Yg=(e,r)=>{if(e===null)return Math.random();if(typeof e=="string")return zZ(W1t(e));if(typeof e=="number")return zZ(e*1e10);throw new Error("random() argument must be a number or a string")},vb=w.createContext({setFrame:()=>{throw new Error("default")},setPlaying:()=>{throw new Error("default")}}),bb=w.createContext(null),c7=w.createContext(null),q1t=({children:e,frameState:r})=>{const[n,i]=w.useState(!1),a=w.useRef(!1),[o,l]=w.useState(1),c=w.useRef([]),[u]=w.useState(()=>String(Yg(null))),[d,h]=w.useState(()=>o0e()),f=r??d,{delayRender:p,continueRender:m}=Lp();typeof window<"u"&&w.useLayoutEffect(()=>{window.remotion_setFrame=(y,x,b)=>{window.remotion_attempt=b;const v=p(`Setting the current frame to ${y}`);let j=!0;h(_=>(_[x]??window.remotion_initialFrame)===y?(j=!1,_):{..._,[x]:y}),j?requestAnimationFrame(()=>m(v)):m(v)},window.remotion_isPlayer=!1},[m,p]);const A=w.useMemo(()=>({frame:f,playing:n,imperativePlaying:a,rootId:u,playbackRate:o,setPlaybackRate:l,audioAndVideoTags:c}),[f,o,n,u]),g=w.useMemo(()=>({setFrame:h,setPlaying:i}),[]);return s.jsx(c7.Provider,{value:A,children:s.jsx(bb.Provider,{value:A,children:s.jsx(vb.Provider,{value:g,children:e})})})},u7=()=>"remotion.time-all",s0e=e=>{localStorage.setItem(u7(),JSON.stringify(e))},o0e=()=>{const e=localStorage.getItem(u7())??"{}";return JSON.parse(e)},l0e=e=>{const r=localStorage.getItem(u7())??"{}",n=JSON.parse(r);return n[e]!==void 0?Number(n[e]):typeof window>"u"?0:window.remotion_initialFrame??0},c0e=e=>{const r=t3(),n=Oa();if(!r)return typeof window>"u"?0:window.remotion_initialFrame??0;const i=e.frame[r.id]??(n.isPlayer?0:l0e(r.id));return Math.min(r.durationInFrames-1,i)},Hd=()=>{const e=w.useContext(bb);
2195if(e===null)throw new Error("TimelineContext is not available. This hook must be used inside a <Player> or the Remotion Studio.");return e},Rp=()=>{const e=Hd();return c0e(e)},u0e=()=>{const e=w.useContext(c7);if(e===null)throw new Error("AbsoluteTimeContext is not available. This hook must be used inside a <Player> or the Remotion Studio.");return c0e(e)},d0e=()=>{const{setFrame:e}=w.useContext(vb);return e},h0e=()=>{const{playing:e,imperativePlaying:r}=Hd(),{setPlaying:n}=w.useContext(vb);return w.useMemo(()=>[e,n,r],[r,e,n])},Hc=()=>{const e=w.useContext(Gg),r=Oa();if(!e)throw r.isPlayer?new Error("useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples"):new Error("useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions");const n=Rp(),i=w.useContext(Fa),a=i?i.cumulatedFrom+i.relativeFrom:0;return n-a},r3=()=>{const e=w.useContext(Fa),r=(e==null?void 0:e.width)??null,n=(e==null?void 0:e.height)??null,i=(e==null?void 0:e.durationInFrames)??null,a=t3();return w.useMemo(()=>{if(!a)return null;const{id:o,durationInFrames:l,fps:c,height:u,width:d,defaultProps:h,props:f,defaultCodec:p,defaultOutName:m,defaultVideoImageFormat:A,defaultPixelFormat:g,defaultProResProfile:y,defaultSampleRate:x}=a;return{id:o,width:r??d,height:n??u,fps:c,durationInFrames:i??l,defaultProps:h,props:f,defaultCodec:p,defaultOutName:m,defaultVideoImageFormat:A,defaultPixelFormat:g,defaultProResProfile:y,defaultSampleRate:x}},[i,n,r,a])},ec=()=>{const e=r3(),r=w.useContext(Gg),n=a7();if(!e)throw typeof window<"u"&&window.remotion_isPlayer||n?new Error(["No video config found. Likely reasons:","- You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.","- You have multiple versions of Remotion installed which causes the React context to get lost."].join("-")):new Error("No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.");if(!r)throw new Error("Called useVideoConfig() outside a Remotion composition.");return e},K1t=({frame:e,children:r,active:n=!0})=>{const i=Hc(),a=ec();if(typeof e>"u")throw new Error("The <Freeze /> component requires a 'frame' prop, but none was passed.");if(typeof e!="number")throw new Error(`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof e}`);if(Number.isNaN(e))throw new Error("The 'frame' prop of <Freeze /> must be a real number, but it is NaN.");if(!Number.isFinite(e))throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${e}.`);const o=w.useMemo(()=>{if(typeof n=="boolean")return n;if(typeof n=="function")return n(i)},[n,i]),l=Hd(),c=w.useContext(Fa),u=(c==null?void 0:c.relativeFrom)??0,d=w.useMemo(()=>o?{...l,playing:!1,imperativePlaying:{current:!1},frame:{[a.id]:e+u}}:l,[o,l,a.id,e,u]),h=w.useMemo(()=>c?o?{...c,cumulatedFrom:0}:c:null,[c,o]);return s.jsx(bb.Provider,{value:d,children:s.jsx(Fa.Provider,{value:h,children:r})})},cz=w.createContext({premountFramesRemaining:0,playing:!1}),Jg=ee.createContext({registerSequence:()=>{throw new Error("SequenceManagerContext not initialized")},unregisterSequence:()=>{throw new Error("SequenceManagerContext not initialized")},sequences:[]}),J_=ee.createContext({hidden:{},setHidden:()=>{throw new Error("SequenceVisibilityToggle not initialized")}}),n3=ee.createContext({dragOverrides:{},setDragOverrides:()=>{throw new Error("VisualModeOverridesContext not initialized")},clearDragOverrides:()=>{throw new Error("VisualModeOverridesContext not initialized")},codeValues:{},setCodeValues:()=>{throw new Error("VisualModeOverridesContext not initialized")},visualModeEnabled:!1}),G1t=({children:e,visualModeEnabled:r})=>{const[n,i]=w.useState([]),[a,o]=w.useState({}),[l,c]=w.useState({}),u=w.useRef(l);u.current=l;const[d,h]=w.useState({}),f=w.useCallback((v,j,_)=>{c(C=>({...C,[v]:{...C[v],[j]:_}}))},[]),p=w.useCallback(v=>{c(j=>{if(!j[v])return j;const _={...j};return delete _[v],_})},[]),m=w.useCallback((v,j)=>{h(_=>{if(_[v]===j)return _;if(j===null){if(!(v in _))return _;const C={..._};return delete C[v],C}return{..._,[v]:j}})},[]),A=w.useCallback(v=>{i(j=>[...j,v])},[]),g=w.useCallback(v=>{i(j=>j.filter(_=>_.id!==v))},[]),y=w.useMemo(()=>({registerSequence:A,sequences:n,unregisterSequence:g}),[A,n,g]),x=w.useMemo(()=>({hidden:a,setHidden:o}),[a]),b=w.useMemo(()=>({visualModeEnabled:r,dragOverrides:l,setDragOverrides:f,clearDragOverrides:p,codeValues:d,setCodeValues:m}),[r,l,f,p,d,m]);return s.jsx(Jg.Provider,{value:y,children:s.jsx(J_.Provider,{value:x,children:s.jsx(n3.Provider,{value:b,children:e})})})},X1t=({from:e=0,durationInFrames:r=1/0,children:n,name:i,height:a,width:o,showInTimeline:l=!0,controls:c,_remotionInternalLoopDisplay:u,_remotionInternalStack:d,_remotionInternalPremountDisplay:h,_remotionInternalPostmountDisplay:f,...p},m)=>{const{layout:A="absolute-fill"}=p,[g]=w.useState(()=>String(Math.random())),y=w.useContext(Fa),{rootId:x}=Hd(),b=y?y.cumulatedFrom+y.relativeFrom:0,v=i7();if(A!=="absolute-fill"&&A!=="none")throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${A}`);if(A==="none"&&typeof p.style<"u")throw new TypeError('If layout="none", you may 
2195not pass a style.');if(typeof r!="number")throw new TypeError(`You passed to durationInFrames an argument of type ${typeof r}, but it must be a number.`);if(r<=0)throw new TypeError(`durationInFrames must be positive, but got ${r}`);if(typeof e!="number")throw new TypeError(`You passed to the "from" props of your <Sequence> an argument of type ${typeof e}, but it must be a number.`);if(!Number.isFinite(e))throw new TypeError(`The "from" prop of a sequence must be finite, but got ${e}.`);const j=Rp(),_=ec(),C=y?Math.min(y.durationInFrames-e,r):r,N=Math.max(0,Math.min(_.durationInFrames-e,C)),{registerSequence:S,unregisterSequence:E}=w.useContext(Jg),{hidden:O}=w.useContext(J_),B=w.useMemo(()=>(y==null?void 0:y.premounting)||!!p._remotionInternalIsPremounting,[p._remotionInternalIsPremounting,y==null?void 0:y.premounting]),T=w.useMemo(()=>(y==null?void 0:y.postmounting)||!!p._remotionInternalIsPostmounting,[p._remotionInternalIsPostmounting,y==null?void 0:y.postmounting]),F=w.useMemo(()=>({cumulatedFrom:b,relativeFrom:e,durationInFrames:N,parentFrom:(y==null?void 0:y.relativeFrom)??0,id:g,height:a??(y==null?void 0:y.height)??null,width:o??(y==null?void 0:y.width)??null,premounting:B,postmounting:T,premountDisplay:h??null,postmountDisplay:f??null}),[b,e,N,y,g,a,o,B,T,h,f]),I=w.useMemo(()=>i??"",[i]),D=Oa(),L=(p==null?void 0:p.stack)??null;w.useEffect(()=>{if(D.isStudio)return S({from:e,duration:N,id:g,displayName:I,parent:(y==null?void 0:y.id)??null,type:"sequence",rootId:x,showInTimeline:l,nonce:v.get(),loopDisplay:u,stack:d??L,premountDisplay:h??null,postmountDisplay:f??null,controls:c??null}),()=>{E(g)}},[r,g,i,S,I,E,y==null?void 0:y.id,N,x,e,l,v,u,d,h,f,D.isStudio,L,c]);const V=Math.ceil(b+e+r-1),U=j<b+e||j>V?null:n,Q=p.layout==="none"?void 0:p.style,$=w.useMemo(()=>({flexDirection:void 0,...o?{width:o}:{},...a?{height:a}:{},...Q??{}}),[a,Q,o]);if(m!==null&&A==="none")throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');return O[g]??!1?null:s.jsx(Fa.Provider,{value:F,children:U===null?null:p.layout==="none"?U:s.jsx(yb,{ref:m,style:$,className:p.className,children:U})})},Y1t=w.forwardRef(X1t),J1t=(e,r)=>{const n=w.useContext(cz),i=Hc()-n.premountFramesRemaining;if(e.layout==="none")throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');const{style:a,from:o=0,durationInFrames:l=1/0,premountFor:c=0,postmountFor:u=0,styleWhilePremounted:d,styleWhilePostmounted:h,...f}=e,p=Math.ceil(o+l-1),m=i<o&&i>=o-c,A=i>p&&i<=p+u,g=m?o:A?o+l-1:0,y=m||A,x=w.useMemo(()=>({...a,opacity:m||A?0:1,pointerEvents:m||A?"none":(a==null?void 0:a.pointerEvents)??void 0,...m?d:{},...A?h:{}}),[a,m,A,d,h]),{playing:b}=Hd(),v=m?o-i:0,j=w.useMemo(()=>({premountFramesRemaining:v,playing:n.playing||b}),[v,n.playing,b]);return s.jsx(cz.Provider,{value:j,children:s.jsx(K1t,{frame:g,active:y,children:s.jsx(Oc,{ref:r,from:o,durationInFrames:l,style:x,_remotionInternalPremountDisplay:c,_remotionInternalPostmountDisplay:u,_remotionInternalIsPremounting:m,_remotionInternalIsPostmounting:A,...f})})})},Z1t=w.forwardRef(J1t),ewt=(e,r)=>{const n=Oa();if(ec(),e.layout!=="none"&&!n.isRendering){const i=e.premountFor;if(i||e.postmountFor)return s.jsx(Z1t,{ref:r,...e,premountFor:i})}return s.jsx(Y1t,{...e,ref:r})},Oc=w.forwardRef(ewt),twt=(e,r,n)=>{switch(e){case"fill":return[0,0,r.width,r.height,0,0,n.width,n.height];case"contain":{const i=Math.min(n.width/r.width,n.height/r.height),a=(n.width-r.width*i)/2,o=(n.height-r.height*i)/2;return[0,0,r.width,r.height,a,o,r.width*i,r.height*i]}case"cover":{const i=Math.max(n.width/r.width,n.height/r.height),a=(n.width-r.width*i)/2,o=(n.height-r.height*i)/2;return[0,0,r.width,r.height,a,o,r.width*i,r.height*i]}default:throw new Error("Unknown fit: "+e)}},rwt=({width:e,height:r,fit:n,className:i,style:a},o)=>{const l=w.useRef(null),c=w.useCallback(u=>{var m;const d=l.current,h=e??u.displayWidth,f=r??u.displayHeight;if(!d)throw new Error("Canvas ref is not set");const p=(m=l.current)==null?void 0:m.getContext("2d");if(!p)throw new Error("Could not get 2d context");d.width=h,d.height=f,p.drawImage(u,...twt(n,{height:u.displayHeight,width:u.displayWidth},{width:h,height:f}))},[n,r,e]);return w.useImperativeHandle(o,()=>({draw:c,getCanvas:()=>
2195{if(!l.current)throw new Error("Canvas ref is not set");return l.current},clear:()=>{var d;const u=(d=l.current)==null?void 0:d.getContext("2d");if(!u)throw new Error("Could not get 2d context");u.clearRect(0,0,l.current.width,l.current.height)}}),[c]),s.jsx("canvas",{ref:l,className:i,style:a})},nwt=ee.forwardRef(rwt),iwt=5,UZ=({loopBehavior:e,durationFound:r,timeInSec:n})=>e==="loop"?r?n%r:n:Math.min(n,r||1/0),awt=async({resolvedSrc:e,signal:r,currentTime:n,initialLoopBehavior:i})=>{if(typeof ImageDecoder>"u")throw new Error("Your browser does not support the WebCodecs ImageDecoder API.");const a=await fetch(e,{signal:r}),{body:o}=a;if(!o)throw new Error("Got no body");const l=new ImageDecoder({data:o,type:a.headers.get("Content-Type")||"image/gif"});await l.completed;const{selectedTrack:c}=l.tracks;if(!c)throw new Error("No selected track");const u=[];let d=null;const h=async A=>{const g=u.find(x=>x.frameIndex===A);if(g&&g.frame)return g;const y=await l.decode({frameIndex:A,completeFramesOnly:!0});return g?g.frame=y.image:u.push({frame:y.image,frameIndex:A,timeInSeconds:y.image.timestamp/1e6}),{frame:y.image,frameIndex:A,timeInSeconds:y.image.timestamp/1e6}},f=A=>{const y=u.filter(x=>x.frame).sort((x,b)=>{const v=Math.abs(x.timeInSeconds-A),j=Math.abs(b.timeInSeconds-A);return v-j});for(let x=0;x<y.length;x++){if(x<iwt)continue;const b=y[x];b.frame=null}},p=async({timeInSec:A,loopBehavior:g})=>{const y=UZ({durationFound:d,loopBehavior:g,timeInSec:A}),b=u.filter(j=>j.timeInSeconds<=y).map(j=>j.frameIndex).reduce((j,_)=>Math.max(j,_),0);let v=b;for(;;){const j=await h(v);if(v++,!j.frame)throw new Error("No frame found");if(!j.frame.duration||(v===c.frameCount&&d===null&&(d=(j.frame.timestamp+j.frame.duration)/1e6),j.timeInSeconds>y||v===c.frameCount))break}c.frameCount-b<3&&g==="loop"&&await h(0),f(y)};return await p({timeInSec:n,loopBehavior:i}),await p({timeInSec:n,loopBehavior:i}),{getFrame:async(A,g)=>{if(d!==null&&A>d&&g==="clear-after-finish")return null;const y=UZ({loopBehavior:g,durationFound:d,timeInSec:A});await p({timeInSec:y,loopBehavior:g});const b=u.filter(v=>v.frame).reduce((v,j)=>{const _=Math.abs(v.timeInSeconds-y),C=Math.abs(j.timeInSeconds-y);return _<C?v:j});if(!b.frame)throw new Error("No frame found");return b},frameCount:c.frameCount}},swt=e=>typeof window>"u"?e:new URL(e,window.origin).href;w.forwardRef(({src:e,width:r,height:n,onError:i,loopBehavior:a="loop",playbackRate:o=1,fit:l="fill",...c},u)=>{const d=w.useRef({isMounted:!0});w.useEffect(()=>{const{current:C}=d;return C.isMounted=!0,()=>{C.isMounted=!1}},[]);const h=swt(e),[f,p]=w.useState(null),{delayRender:m,continueRender:A}=Lp(),[g]=w.useState(()=>m(`Rendering <AnimatedImage/> with src="${h}"`)),y=Hc(),{fps:x}=ec(),b=y/o/x,v=w.useRef(b);v.current=b;const j=w.useRef(null);w.useImperativeHandle(u,()=>{var N;const C=(N=j.current)==null?void 0:N.getCanvas();if(!C)throw new Error("Canvas ref is not set");return C},[]);const[_]=w.useState(()=>a);return w.useEffect(()=>{const C=new AbortController;return awt({resolvedSrc:h,signal:C.signal,currentTime:v.current,initialLoopBehavior:_}).then(N=>{p(N),A(g)}).catch(N=>{if(N.name==="AbortError"){A(g);return}i?(i==null||i(N),A(g)):Uj(N)}),()=>{C.abort()}},[h,g,i,_,A]),w.useLayoutEffect(()=>{if(!f)return;const C=m(`Rendering frame at ${b} of <AnimatedImage src="${e}"/>`);f.getFrame(b,a).then(N=>{var S,E;d.current.isMounted&&(N===null?(S=j.current)==null||S.clear():(E=j.current)==null||E.draw(N.frame)),A(C)}).catch(N=>{i?(i(N),A(C)):Uj(N)})},[b,f,a,i,e,A,m]),s.jsx(nwt,{ref:j,width:r,height:n,fit:l,...c})});var owt=e=>{if(typeof e!="string")throw new TypeError(`The "filename" must be a string, but you passed a value of type ${typeof e}`);if(e.trim()==="")throw new Error("The `filename` must not be empty");if(!e.match(/^([0-9a-zA-Z-!_.*'()/:&$@=;+,?]+)/g))throw new Error('The `filename` must match "/^([0-9a-zA-Z-!_.*\'()/:&$@=;+,?]+)/g". Use forward slashes only, even on Windows.')},lwt=e=>{if(typeof e!="string"&&!(e instanceof Uint8Array))throw new TypeError(`The "content" must be a string or Uint8Array, but you passed a value of type ${typeof e}`);if(typeof e=="string"&&e.trim()==="")throw new Error("The `content` must not be empty")},f0e=e=>{e.type==="artifact"&&(owt(e.filename),e.contentType!=="thumbnail"&&lwt(e.content))},Zg=w.createContext({registerRenderAsset:()=>{},unregisterRenderAsset:()=>{},renderAssets:[]}),cwt=({children:e,collectAssets:r})=>{const[n,i]=w.useState([]),a=w.useRef([]),o=w.useCallback(u=>{f0e(u),a.current=[...a.current,u],i(a.current)},[]);r&&w.useImperativeHandle(r,()=>({collectAssets:()=>{const u=a.current;return a.current=[],i([]),u}}),[]);const l=w.useCallback(u=>{a.current=a.current.filter(d=>d.id!==u),i(a.current)},[]);w.useLayoutEffect(()=>{typeof window<"u"&&(window.remotion_collectAssets=()=>{const u=a.current;return a.current=[],i([]),u})},[]);const c=w.useMemo(()=>({registerRenderAsset:o,unregisterRenderAsset:l,renderAssets:n}),[n,o,l]);return s.jsx(Zg.Provider,{value:c,children:e})},zd=e=>typeof window>"u"||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://")||e.startsWith("blob:")||e.startsWith("data:")?e:ne
2195w URL(e,window.origin).href,i3=({trimAfter:e,mediaDurationInFrames:r,playbackRate:n,trimBefore:i})=>{let a=r;typeof e<"u"&&(a=e),typeof i<"u"&&(a-=i);const o=a/n;return Math.floor(o)},m0e=w.createContext(null),uwt=()=>ee.useContext(m0e),a3=({durationInFrames:e,times:r=1/0,children:n,name:i,...a})=>{const o=Hc(),{durationInFrames:l}=ec();if(YT(e,{component:"of the <Loop /> component",allowFloats:!0}),typeof r!="number")throw new TypeError(`You passed to "times" an argument of type ${typeof r}, but it must be a number.`);if(r!==1/0&&r%1!==0)throw new TypeError(`The "times" prop of a loop must be an integer, but got ${r}.`);if(r<0)throw new TypeError(`The "times" prop of a loop must be at least 0, but got ${r}`);const c=Math.ceil(l/e),u=Math.min(c,r),d=a.layout==="none"?void 0:a.style,h=e*(u-1),p=Math.floor(o/e)*e,m=Math.min(p,h),A=w.useMemo(()=>({numberOfTimes:Math.min(l/e,r),startOffset:-m,durationInFrames:e}),[l,e,m,r]),g=w.useMemo(()=>({iteration:Math.floor(o/e),durationInFrames:e}),[o,e]);return s.jsx(m0e.Provider,{value:g,children:s.jsx(Oc,{durationInFrames:e,from:m,name:i??"<Loop>",_remotionInternalLoopDisplay:A,layout:a.layout,style:d,children:n})})};a3.useLoop=uwt;var no=({logLevel:e,tag:r,message:n,mountTime:i})=>{const a=[i?Date.now()-i+"ms ":null,r].filter(Boolean).join(" ");Ql.trace({logLevel:e,tag:null},`[${a}]`,n)},s3=w.createContext({}),$Z={},kF=[],p0e=({children:e})=>{const[r,n]=w.useState(()=>$Z);return w.useEffect(()=>{const i=()=>{n($Z)};return kF.push(i),()=>{kF=kF.filter(a=>a!==i)}},[]),s.jsx(s3.Provider,{value:r,children:e})},A0e=e=>{const r=e.indexOf("#");return r===-1?null:r},dwt=e=>{const r=A0e(e);return r===null?e:e.slice(0,r)},wb=e=>{const r=w.useContext(s3),n=A0e(e),i=dwt(e);return r[i]?n!==null?r[i]+e.slice(n):r[i]:e},o3=(e,r)=>{if(typeof e.volume!="number"&&typeof e.volume!="function"&&typeof e.volume<"u")throw new TypeError(`You have passed a volume of type ${typeof e.volume} to your <${r} /> component. Volume must be a number or a function with the signature '(frame: number) => number' undefined.`);if(typeof e.volume=="number"&&e.volume<0)throw new TypeError(`You have passed a volume below 0 to your <${r} /> component. Volume must be between 0 and 1`);if(typeof e.playbackRate!="number"&&typeof e.playbackRate<"u")throw new TypeError(`You have passed a playbackRate of type ${typeof e.playbackRate} to your <${r} /> component. Playback rate must a real number or undefined.`);if(typeof e.playbackRate=="number"&&(isNaN(e.playbackRate)||!Number.isFinite(e.playbackRate)||e.playbackRate<=0))throw new TypeError(`You have passed a playbackRate of ${e.playbackRate} to your <${r} /> component. Playback rate must be a real number above 0.`)},hwt=(e,r)=>{if(typeof e<"u"){if(typeof e!="number")throw new TypeError(`type of startFrom prop must be a number, instead got type ${typeof e}.`);if(isNaN(e)||e===1/0)throw new TypeError("startFrom prop can not be NaN or Infinity.");if(e<0)throw new TypeError(`startFrom must be greater than equal to 0 instead got ${e}.`)}if(typeof r<"u"){if(typeof r!="number")throw new TypeError(`type of endAt prop must be a number, instead got type ${typeof r}.`);if(isNaN(r))throw new TypeError("endAt prop can not be NaN.");if(r<=0)throw new TypeError(`endAt must be a positive number, instead got ${r}.`)}if(r<e)throw new TypeError("endAt prop must be greater than startFrom prop.")},fwt=(e,r)=>{if(typeof e<"u"){if(typeof e!="number")throw new TypeError(`type of trimBefore prop must be a number, instead got type ${typeof e}.`);if(isNaN(e)||e===1/0)throw new TypeError("trimBefore prop can not be NaN or Infinity.");if(e<0)throw new TypeError(`trimBefore must be greater than equal to 0 instead got ${e}.`)}if(typeof r<"u"){if(typeof r!="number")throw new TypeError(`type of trimAfter prop must be a number, instead got type ${typeof r}.`);if(isNaN(r))throw new TypeError("trimAfter prop can not be NaN.");if(r<=0)throw new TypeError(`trimAfter must be a positive number, instead got ${r}.`)}if(r<=e)throw new TypeError("trimAfter prop must be greater than trimBefore prop.")},l3=({startFrom:e,endAt:r,trimBefore:n,trimAfter:i})=>{if(typeof e<"u"&&typeof n<"u")throw new TypeError("Cannot use both startFrom and trimBefore props. Use trimBefore instead as startFrom is deprecated.");
2195if(typeof r<"u"&&typeof i<"u")throw new TypeError("Cannot use both endAt and trimAfter props. Use trimAfter instead as endAt is deprecated.");typeof n<"u"||typeof i<"u"?fwt(n,i):(typeof e<"u"||typeof r<"u")&&hwt(e,r)},c3=({startFrom:e,endAt:r,trimBefore:n,trimAfter:i})=>({trimBeforeValue:n??e??void 0,trimAfterValue:i??r??void 0}),mwt=(e,r)=>{switch(r.type){case"got-duration":{const n=zd(r.src);return e[n]===r.durationInSeconds?e:{...e,[n]:r.durationInSeconds}}default:return e}},d7=w.createContext({durations:{},setDurations:()=>{throw new Error("context missing")}}),g0e=({children:e})=>{const[r,n]=w.useReducer(mwt,{}),i=w.useMemo(()=>({durations:r,setDurations:n}),[r]);return s.jsx(d7.Provider,{value:i,children:e})},h7=({crossOrigin:e,requestsVideoFrame:r,isClientSideRendering:n})=>{if(e!=null)return e;if(n||r)return"anonymous"},G5=({mediaRef:e,mediaType:r,onAutoPlayError:n,logLevel:i,mountTime:a,reason:o,isPlayer:l})=>{const{current:c}=e;if(!c)return;no({logLevel:i,tag:"play",message:`Attempting to play ${c.src}. Reason: ${o}`,mountTime:a});const u=c.play();u.catch&&u.catch(d=>{if(c&&!d.message.includes("request was interrupted by a call to pause")&&!d.message.includes("The operation was aborted.")&&!d.message.includes("The fetching process for the media resource was aborted by the user agent")&&!d.message.includes("request was interrupted by a new load request")&&!d.message.includes("because the media was removed from the document")&&!(d.message.includes("user didn't interact with the document")&&c.muted)&&(console.log(`Could not play ${r} due to following error: `,d),!c.muted)){if(n){n();return}r==="video"&&l&&(Ql.info({logLevel:i,tag:"<"+r+">"},"The video will be muted and we'll retry playing it."),Ql.info({logLevel:i,tag:"<"+r+">"},"Use onAutoPlayError() to handle this error yourself."),c.muted=!0,c.play())}})},f7=({audioContext:e,ref:r})=>{let n=null,i=!1;return{attemptToConnect:()=>{if(i)throw new Error("SharedElementSourceNode has been disposed");!n&&r.current&&(n=e.createMediaElementSource(r.current))},get:()=>{if(!n)throw new Error("Audio element not connected");return n},cleanup:()=>{n&&(n.disconnect(),n=null),i=!0}}},QZ=!1,pwt=e=>{QZ||(QZ=!0,typeof window<"u"&&Ql.warn({logLevel:e,tag:null},"AudioContext is not supported in this browser"))},Awt=({logLevel:e,latencyHint:r,audioEnabled:n})=>{const i=Oa();return w.useMemo(()=>i.isRendering||!n?null:typeof AudioContext>"u"?(pwt(e),null):new AudioContext({latencyHint:r,sampleRate:48e3}),[e,r,i.isRendering,n])},HZ="data:audio/mp3;base64,/+MYxAAJcAV8AAgAABn//////+/gQ5BAMA+D4Pg+BAQBAEAwD4Pg+D4EBAEAQDAPg++hYBH///hUFQVBUFREDQNHmf///////+MYxBUGkAGIMAAAAP/29Xt6lUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxDUAAANIAAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",gwt=(e,r)=>{const n=Object.keys(e).sort(),i=Object.keys(r).sort();if(n.length!==i.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==i[a]||e[n[a]]!==r[i[a]])return!1;return!0},xwt=(e,r,n)=>e==="src"&&!n.startsWith("data:")&&!r.startsWith("data:")?new URL(n,window.origin).toString()!==new URL(r,window.origin).toString():n!==r,jb=w.createContext(null),x0e=({children:e,numberOfAudioTags:r,audioLatencyHint:n,audioEnabled:i})=>{const a=w.useRef([]),[o]=w.useState(r);if(r!==o)throw new Error("The number of shared audio tags has changed dynamically. Once you have set this property, you cannot change it afterwards.");const l=Op(),c=Awt({logLevel:l,latencyHint:n,audioEnabled:i}),u=w.useMemo(()=>({value:0}),[]),d=w.useRef({scheduledEndTime:null,mediaEndTime:null}),h=w.useMemo(()=>({node:C,mediaTimestamp:N,targetTime:S,currentTime:E,sequenceEndTime:O,sequenceStartTime:B,debugAudioScheduling:T})=>{var ce;if(!c)throw new Error("Audio context not found");const F=((ce=C.buffer)==null?void 0:ce.duration)??0,I=N+F,D=I>O,V=N<B?B-N:0,U=S<0?-S:0,Q=V+U,$=D?F-Math.max(0,I-O)-Q:F-Q,q=S+E+Q;if(Q<0)throw new Error("offset < 0: "+JSON.stringify({offset:Q,targetTime:S,currentTime:E,offsetBecauseOfTrim:V,offsetBecauseOfTooLate:U}));$>0&&C.start(q,Q,$);const M=q+$/C.playbackRate.value,z=N+Q,K=z+$,ne=c.baseLatency+c.outputLatency,ie=q-E-ne,X=d.current,de=X.scheduledEndTime!==null&&Math.abs(q-X.scheduledEndTime)>.001,oe=X.mediaEndTime!==null&&Math.abs(z-X.mediaEndTime)>.001;return T&&Ql.info({logLevel:l,tag:"audio-scheduling"},"scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s",de?"color: red; font-weight: bold":"",q.toFixed(4),"",M.toFixed(4),oe?"color: red; font-weight: bold":"",z.toFixed(4),"",K.toFixed(4),$<0||ie<0?"color: red; font-weight: bold":"color: blue; font-weight: bold",$<0?"missed "+Math.abs(Q).toFixed(2)+"s":Math.abs(ie).toFixed(2)+(ie<0?" delay":" ahead"),"","current="+E.toFixed(4),"offset="+Q.toFixed(4),"latency="+ne.toFixed(4),"state="+c.state),X.scheduledEndTime=M,X.mediaEndTime=K,$>0?{type:"started",scheduledTime:q}:{type:"not-started"}},[c,l]),f=w.useMemo(()=>new Array(r).fill(!0).map(()=>{const C=w.createRef();return{id:Math.random(),ref:C,mediaElementSourceNode:c?f7({audioContext:c,ref:C}):null}}),[c,r]);(ee.useInsertionEffect??ee.useLayoutEffect)(()=>()=>{requestAnimationFrame(()=>{f.forEach(({mediaElementSourceNode:C})=>{C==null||C.cleanup()})})},[f]);const m=w.useRef(new Array(r).fill(!1)),A=w.useCallback(()=>{f.forEach(({ref:C,id:N})=>{var O;const S=(O=a.current)==null?void 0:O.find(B=>B.id===N),{current:E}=C;if(E){if(S===void 0){E.src=HZ;return}if(!S)throw new TypeError("Expected audio data to be there");
2195Object.keys(S.props).forEach(B=>{xwt(B,S.props[B],E[B])&&(E[B]=S.props[B])})}})},[f]),g=w.useCallback(C=>{var U,Q;const{aud:N,audioId:S,premounting:E,postmounting:O}=C,B=(U=a.current)==null?void 0:U.find($=>$.audioId===S);if(B)return B;const T=m.current.findIndex($=>$===!1);if(T===-1)throw new Error(`Tried to simultaneously mount ${r+1} <Html5Audio /> tags at the same time. With the current settings, the maximum amount of <Html5Audio /> tags is limited to ${r} at the same time. Remotion pre-mounts silent audio tags to help avoid browser autoplay restrictions. See https://remotion.dev/docs/player/autoplay#using-the-numberofsharedaudiotags-prop for more information on how to increase this limit.`);const{id:F,ref:I,mediaElementSourceNode:D}=f[T],L=[...m.current];L[T]=F,m.current=L;const V={props:N,id:F,el:I,audioId:S,mediaElementSourceNode:D,premounting:E,audioMounted:!!I.current,postmounting:O,cleanupOnMediaTagUnmount:()=>{}};return(Q=a.current)==null||Q.push(V),A(),V},[r,f,A]),y=w.useCallback(C=>{var E;const N=[...m.current],S=f.findIndex(O=>O.id===C);if(S===-1)throw new TypeError("Error occured in ");N[S]=!1,m.current=N,a.current=(E=a.current)==null?void 0:E.filter(O=>O.id!==C),A()},[f,A]),x=w.useCallback(({aud:C,audioId:N,id:S,premounting:E,postmounting:O})=>{var T;let B=!1;a.current=(T=a.current)==null?void 0:T.map(F=>{const I=!!F.el.current;return F.audioMounted!==I&&(B=!0),F.id===S?gwt(C,F.props)&&F.premounting===E&&F.postmounting===O?F:(B=!0,{...F,props:C,premounting:E,postmounting:O,audioId:N,audioMounted:I}):F}),B&&A()},[A]),b=Y_(),v=Oa(),j=w.useCallback(()=>{f.forEach(C=>{const N=a.current.find(S=>S.el===C.ref);N!=null&&N.premounting||G5({mediaRef:C.ref,mediaType:"audio",onAutoPlayError:null,logLevel:l,mountTime:b,reason:"playing all audios",isPlayer:v.isPlayer})}),c==null||c.resume()},[c,l,b,f,v.isPlayer]),_=w.useMemo(()=>({registerAudio:g,unregisterAudio:y,updateAudio:x,playAllAudios:j,numberOfAudioTags:r,audioContext:c,audioSyncAnchor:u,scheduleAudioNode:h}),[r,j,g,y,x,c,u,h]);return s.jsxs(jb.Provider,{value:_,children:[f.map(({id:C,ref:N})=>s.jsx("audio",{ref:N,preload:"metadata",src:HZ},C)),e]})},ywt=({aud:e,audioId:r,premounting:n,postmounting:i})=>{const a=w.useContext(jb),[o]=w.useState(()=>{if(a&&a.numberOfAudioTags>0)return a.registerAudio({aud:e,audioId:r,premounting:n,postmounting:i});const c=ee.createRef(),u=a!=null&&a.audioContext?f7({audioContext:a.audioContext,ref:c}):null;return{el:c,id:Math.random(),props:e,audioId:r,mediaElementSourceNode:u,premounting:n,audioMounted:!!c.current,postmounting:i,cleanupOnMediaTagUnmount:()=>{u==null||u.cleanup()}}}),l=ee.useInsertionEffect??ee.useLayoutEffect;return typeof document<"u"&&(l(()=>{a&&a.numberOfAudioTags>0&&a.updateAudio({id:o.id,aud:e,audioId:r,premounting:n,postmounting:i})},[e,a,o.id,r,n,i]),l(()=>()=>{a&&a.numberOfAudioTags>0&&a.unregisterAudio(o.id)},[a,o.id])),o},vwt=1e-5,X5=(e,r)=>Math.abs(e-r)<vwt,y0e=(e,r)=>Math.round(e/r*100)/100,uz=()=>typeof window>"u"||!/AppleWebKit/.test(window.navigator.userAgent)?!1:!window.navigator.userAgent.includes("Chrome/"),u3=()=>typeof window>"u"?!1:/iP(ad|od|hone)/i.test(window.navigator.userAgent)&&uz(),bwt=e=>u3()&&e.startsWith("blob:"),dz=({actualFrom:e,fps:r})=>y0e(Math.max(0,-e),r),hz=({duration:e,fps:r})=>y0e(e,r),wwt=({actualSrc:e,actualFrom:r,duration:n,fps:i})=>{if(bwt(e)||e.startsWith("data:")||!!new URL(e,(typeof window>"u"?null:window.location.href)??"http://localhost:3000").hash||!Number.isFinite(r))return e;const o=`${e}#t=${dz({actualFrom:r,fps:i})}`;return Number.isFinite(n)?`${o},${hz({duration:n,fps:i})}`:o},jwt=({prevStartFrom:e,newStartFrom:r,prevDuration:n,newDuration:i,fps:a})=>{const o=dz({actualFrom:e,fps:a}),l=dz({actualFrom:r,fps:a}),c=hz({duration:n,fps:a}),u=hz({duration:i,fps:a});return!(l<o||u>c)},_wt=({actualSrc:e,actualFrom:r,duration:n,fps:i})=>{const a=w.useRef(r),o=w.useRef(n),l=w.useRef(e);return(!jwt({prevStartFrom:a.current,newStartFrom:r,prevDuration:o.current,newDuration:n,fps:i})||e!==l.current)&&(a.current=r,o.current=n,l.current=e),wwt({actualSrc:l.current,actualFrom:a.current,duration:o.current,fps:i})},VZ=!1,Cwt=e=>{VZ||(VZ=!0,Ql.warn({logLevel:e,tag:null},"In Safari, setting a volume and a playback rate at the same time is buggy."),Ql.warn({logLevel:e,tag:null},"In Desktop Safari, only volumes <= 1 will be applied."),Ql.warn({logLevel:e,tag:null},e,"In Mobile Safari, the volume will be ignored and set to 1 if a playbackRate is set."))},v0e=({mediaRef:e,volume:r,logLevel:n,source:i,shouldUseWebAudioApi:a})=>{var f,p,m;const o=w.useRef(null),l=w.useRef(r);l.current=r;const c=w.useContext(jb);if(!c)throw new Error("useAmplification must be used within a SharedAudioContext");const{audioContext:u}=c;if(typeof window<"u"&&w.useLayoutEffect(()=>{var g,y;if(!u||!e.current||!a)return;if(e.current.playbackRate!==1&&uz()){Cwt(n);return}if(!i)return;const A=new GainNode(u,{gain:l.current});return i.attemptToConnect(),i.get().connect(A),A.connect(u.destination),o.current={gainNode:A},Ql.trace({logLevel:n,tag:null},`Starting to amplify ${(g=e.current)==null?void 0:g.src}. Gain = ${l.current}, playbackRate = ${(y=e.current)==null?void 0:y.playbackRate}`),()=>{o.current=null,A.disconnect(),i.get().disconnect()}},[n,e,u,i,a]),o.current){const A=r;X5(o.current.gainNode.gain.value,A)||(o.current.gainNode.gain.value=A,Ql.trace({logLevel:n,tag:null},`Setting gain to ${A} for ${(f=e.current)==null?void 0:f.src}`))}return(uz()&&e.current&&((p=e.current)==null?void 0:p.playbackRate)!==1||!a)&&e.current&&!X5(r,(m=e.current)==null?void 0:m.volume)&&(e.current.volume=Math.min(r,1)),o},ex=()=>{const e=w.useContext(Fa);return Math.min(0,(e==null?void 0:e.relativeFrom)??0)},_b=e=>{const r=a3.useLoop(),n=Hc(),i=ex();return e==="repeat"||r===null?n+i:n+i+r.durationInFrames*r.iteration},Nwt=e=>{if(/data:|blob:/.test(e.substring(0,5)))return"Data URL";const r=e.split("/").map(n=>n.split("\\")).flat(1);return r[r.length-1]},Swt=({compositionDurationInFrames:e,playbackRate:r,trimBefore:n,trimAfter:i,parentSequenceDurationInFrames:a})=>{const o=i3({mediaDurationInFrames:e*r+(n??0),playbackRate:r,trimBefore:n,trimAfter:i});return a!==null?Math.floor(Math.min(a*r,o)):o},tx=({frame:e,volume:r,mediaVolume:n=1})=>{if(typeof r=="number")return r*n;if(typeof r>"u")return Number(n);const i=r(e)*n;if(typeof i!="number")throw new TypeError(`You passed in a a function to the volume prop but it did not return a number but a value of type ${typeof i} for frame ${e}`);if(Number.isNaN(i))throw new TypeError(`You passed in a function to the volume prop but it returned NaN for frame ${e}.`);if(!Number.isFinite(i))throw new TypeError(`You passed in a function to the volume prop but it returned a non-finite number for frame ${e}.`);return Math.max(0,i)},WZ={},kwt=e=>{WZ[e]||(console.warn(e),WZ[e]=!0)},m7=({volume:e,mediaVolume:r,mediaType:n,src:i,displayName:a,trimBefore:o,trimAfter:l,playbackRate:c})=>{if(!i)throw new Error("No src passed");const u=ex(),d=w.useContext(Fa),h=ec(),[f]=w.useState(()=>e),p=Swt({compositionDurationInFrames:h.durationInFrames,playbackRate:c,trimBefore:o,trimAfter:l,parentSequenceDurationInFrames:(d==null?void 0:d.durationInFrames)??null}),m=w.useMemo(()=>typeof e=="number"?e:new Array(Math.floor(Math.max(0,p+u))).fill(!0).map((b,v)=>tx({frame:v+u,volume:e,mediaVolume:r})).join(","),[p,u,e,r]);w.useEffect(()=>{typeof e=="number"&&e!==f&&kwt(`Remotion: The ${n} with src ${i} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/audio/volume`)},[f,n,i,e]);const A=typeof e=="function",g=i7(),{rootId:y}=Hd(),x=Oa();return{volumes:m,duration:p,doesVolumeChange:A,nonce:g,rootId:y,isStudio:x.isStudio,finalDisplayName:a??Nwt(i)}}
2195,Ewt=({src:e,displayName:r,id:n,stack:i,showInTimeline:a,premountDisplay:o,postmountDisplay:l,loopDisplay:c,controls:u})=>{const d=w.useContext(Fa),{registerSequence:h,unregisterSequence:f}=w.useContext(Jg),{duration:p,nonce:m,rootId:A,isStudio:g,finalDisplayName:y}=m7({volume:void 0,mediaVolume:0,mediaType:"image",src:e,displayName:r,trimAfter:void 0,trimBefore:void 0,playbackRate:1});w.useEffect(()=>{var x,b;if(!e)throw new Error("No src passed");if(!(!g&&((b=(x=window.process)==null?void 0:x.env)==null?void 0:b.NODE_ENV)!=="test")&&a)return h({type:"image",src:e,id:n,duration:p,from:0,parent:(d==null?void 0:d.id)??null,displayName:y,rootId:A,showInTimeline:!0,nonce:m.get(),loopDisplay:c,stack:i,premountDisplay:o,postmountDisplay:l,controls:u}),()=>{f(n)}},[p,n,d,e,h,f,m,i,a,o,l,g,c,A,y,u])},p7=({volume:e,mediaVolume:r,src:n,mediaType:i,playbackRate:a,displayName:o,id:l,stack:c,showInTimeline:u,premountDisplay:d,postmountDisplay:h,loopDisplay:f})=>{const p=w.useContext(Fa),m=ex(),{registerSequence:A,unregisterSequence:g}=w.useContext(Jg),{volumes:y,duration:x,doesVolumeChange:b,nonce:v,rootId:j,isStudio:_,finalDisplayName:C}=m7({volume:e,mediaVolume:r,mediaType:i,src:n,displayName:o,trimAfter:void 0,trimBefore:void 0,playbackRate:a});w.useEffect(()=>{var N,S;if(!n)throw new Error("No src passed");if(!(!_&&((S=(N=window.process)==null?void 0:N.env)==null?void 0:S.NODE_ENV)!=="test")&&u)return A({type:i,src:n,id:l,duration:x,from:0,parent:(p==null?void 0:p.id)??null,displayName:C,rootId:j,volume:y,showInTimeline:!0,nonce:v.get(),startMediaFrom:0-m,doesVolumeChange:b,loopDisplay:f,playbackRate:a,stack:c,premountDisplay:d,postmountDisplay:h,controls:null}),()=>{g(l)}},[x,l,p,n,A,g,y,b,v,i,m,a,c,u,d,h,_,f,j,C])},Bwt=(e,r)=>{const[n,i]=w.useState([]),[a,o]=w.useState([]),[l,c]=w.useState([]),d=Oa().isRendering,h=w.useRef(!1),f=w.useCallback(A=>d?{unblock:()=>{}}:(i(g=>[...g,A]),{unblock:()=>{i(g=>{const y=g.filter(x=>x!==A);return y.length===g.length?g:y})}}),[d]),p=w.useCallback(A=>(o(g=>[...g,A]),{remove:()=>{o(g=>g.filter(y=>y!==A))}}),[]),m=w.useCallback(A=>(c(g=>[...g,A]),{remove:()=>{c(g=>g.filter(y=>y!==A))}}),[]);return w.useEffect(()=>{d||n.length>0&&(a.forEach(A=>A()),no({logLevel:e,message:"Player is entering buffer state",mountTime:r,tag:"player"}))},[n]),typeof window<"u"&&w.useLayoutEffect(()=>{d||n.length===0&&(l.forEach(A=>A()),no({logLevel:e,message:"Player is exiting buffer state",mountTime:r,tag:"player"}))},[n]),w.useMemo(()=>({addBlock:f,listenForBuffering:p,listenForResume:m,buffering:h}),[f,h,p,m])},Cb=ee.createContext(null),b0e=({children:e})=>{const{logLevel:r,mountTime:n}=w.useContext(Xg),i=Bwt(r??"info",n);return s.jsx(Cb.Provider,{value:i,children:e})},w0e=e=>{const[r,n]=w.useState(e.buffering.current);return w.useEffect(()=>{const i=()=>{n(!0)},a=()=>{n(!1)};return e.listenForBuffering(i),e.listenForResume(a),()=>{e.listenForBuffering(()=>{}),e.listenForResume(()=>{})}},[e]),r},A7=()=>{const e=w.useContext(Cb),r=e?e.addBlock:null;return w.useMemo(()=>({delayPlayback:()=>{if(!r)throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");const{unblock:n}=r({id:String(Math.random())});return{unblock:n}}}),[r])},Twt=()=>/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent),Pwt=({mediaRef:e,mediaType:r,onVariableFpsVideoDetected:n,pauseWhenBuffering:i,logLevel:a,mountTime:o})=>{const l=w.useRef(!1),{delayPlayback:c}=A7(),u=w.useCallback(d=>{var A;if(r!=="video"||!i)return;const h=e.current;if(!h)return;if(h.readyState>=h.HAVE_FUTURE_DATA&&!Twt()){no({logLevel:a,message:`Not using buffer until first frame, because readyState is ${h.readyState} and is not Safari or Desktop Chrome`,mountTime:o,tag:"buffer"});return}if(!h.requestVideoFrameCallback){no({logLevel:a,message:"Not using buffer until first frame, because requestVideoFrameCallback is not supported",mountTime:o,tag:"buffer"});return}
2195l.current=!0,no({logLevel:a,message:`Buffering ${(A=e.current)==null?void 0:A.src} until the first frame is received`,mountTime:o,tag:"buffer"});const f=c(),p=()=>{f.unblock(),h.removeEventListener("ended",p,{once:!0}),h.removeEventListener("pause",p,{once:!0}),l.current=!1},m=()=>{p()};h.requestVideoFrameCallback((g,y)=>{Math.abs(y.mediaTime-d)>.5&&n(),p()}),h.addEventListener("ended",m,{once:!0}),h.addEventListener("pause",m,{once:!0}),h.addEventListener("canplay",m,{once:!0})},[c,a,e,r,o,n,i]);return w.useMemo(()=>({isBuffering:()=>l.current,bufferUntilFirstFrame:u}),[u])},Iwt=e=>{var i,a;const r=ee.useRef({time:((i=e.current)==null?void 0:i.currentTime)??0,lastUpdate:performance.now()}),n=((a=e.current)==null?void 0:a.currentTime)??null;return n!==null&&r.current.time!==n&&(r.current.time=n,r.current.lastUpdate=performance.now()),r},vk=({mediaRef:e,time:r,logLevel:n,why:i,mountTime:a})=>{const o=u3()?Number(r.toFixed(1)):r;return no({logLevel:n,tag:"seek",message:`Seeking from ${e.currentTime} to ${o}. src= ${e.src} Reason: ${i}`,mountTime:a}),e.currentTime=o,o},Fwt=({element:e,shouldBuffer:r,isPremounting:n,isPostmounting:i,logLevel:a,mountTime:o,src:l})=>{const c=A7(),[u,d]=w.useState(!1);return w.useEffect(()=>{let h=[];const{current:f}=e;if(!f||!r)return;if(n||i){if((n||i)&&f.readyState<f.HAVE_FUTURE_DATA&&!navigator.userAgent.includes("Firefox/")){no({logLevel:a,message:`Calling .load() on ${f.src} because readyState is ${f.readyState} and it is not Firefox. Element is premounted ${f.playbackRate}`,tag:"load",mountTime:o});const g=f.playbackRate;f.load(),f.playbackRate=g}return}const p=g=>{let y=!1;h.forEach(x=>{x(g),y=!0}),h=[],d(x=>(x&&(y=!0),!1)),y&&no({logLevel:a,message:`Unmarking as buffering: ${f.src}. Reason: ${g}`,tag:"buffer",mountTime:o})},m=g=>{d(!0),no({logLevel:a,message:`Marking as buffering: ${f.src}. Reason: ${g}`,tag:"buffer",mountTime:o});const{unblock:y}=c.delayPlayback(),x=()=>{p('"canplay" was fired'),A()},b=()=>{p('"error" event was occurred'),A()};f.addEventListener("canplay",x,{once:!0}),h.push(()=>{f.removeEventListener("canplay",x)}),f.addEventListener("error",b,{once:!0}),h.push(()=>{f.removeEventListener("error",b)}),h.push(v=>{no({logLevel:a,message:`Unblocking ${f.src} from buffer. Reason: ${v}`,tag:"buffer",mountTime:o}),y()})},A=()=>{if(f.readyState<f.HAVE_FUTURE_DATA){if(m(`readyState is ${f.readyState}, which is less than HAVE_FUTURE_DATA`),!navigator.userAgent.includes("Firefox/")){no({logLevel:a,message:`Calling .load() on ${l} because readyState is ${f.readyState} and it is not Firefox. ${f.playbackRate}`,tag:"load",mountTime:o});const g=f.playbackRate;f.load(),f.playbackRate=g}}else{const g=()=>{m('"waiting" event was fired')};f.addEventListener("waiting",g),h.push(()=>{f.removeEventListener("waiting",g)})}};return A(),()=>{p("element was unmounted or prop changed")}},[c,l,e,n,i,a,r,o]),u},Owt=({mediaRef:e,mediaType:r,lastSeek:n,onVariableFpsVideoDetected:i})=>{const a=w.useRef(null);return w.useEffect(()=>{const{current:o}=e;if(o)a.current={time:o.currentTime,lastUpdate:performance.now()};else{a.current=null;return}if(r!=="video"){a.current=null;return}const l=o;if(!l.requestVideoFrameCallback)return;let c=()=>{};const u=()=>{if(!l)return;const d=l.requestVideoFrameCallback((h,f)=>{if(a.current!==null){const p=Math.abs(a.current.time-f.mediaTime),m=Math.abs(n.current===null?1/0:f.mediaTime-n.current);p>.5&&m>.5&&f.mediaTime>a.current.time&&i()}a.current={time:f.mediaTime,lastUpdate:performance.now()},u()});c=()=>{l.cancelVideoFrameCallback(d),c=()=>{}}};return u(),()=>{c()}},[n,e,r,i]),a};function Lwt(e,r,n,i){const{extrapolateLeft:a,extrapolateRight:o,easing:l}=i;let c=e;const[u,d]=r,[h,f]=n;if(c<u){if(a==="identity")return c;if(a==="clamp")c=u;else if(a==="wrap"){const p=d-u;c=((c-u)%p+p)%p+u}}if(c>d){if(o==="identity")return c;if(o==="clamp")c=d;else if(o==="wrap"){const p=d-u;c=((c-u)%p+p)%p+u}}return h===f?h:(c=(c-u)/(d-u),c=l(c),c=c*(f-h)+h,c)}function Rwt(e,r){let n;for(n=1;n<r.length-1&&!(r[n]>=e);++n);return n-1}function Dwt(e){for(let r=1;r<e.length;++r)if(!(e[r]>e[r-1]))throw new Error(`inputRange must be strictly monotonically increasing but got [${e.join(",")}]`)}function qZ(e,r){if(r.length<2)throw new Error(e+" must have at least 2 elements");for(const n of r){if(typeof n!="number")throw new Error(`${e} must contain only numbers`);if(!Number.isFinite(n))throw new Error(`${e} must contain only finite numbers, but got [${r.join(",")}]`)}}function ao(e,r,n,i){if(typeof e>"u")throw new Error("input can not be undefined");if(typeof r>"u")throw new Error("inputRange can not be undefined");if(typeof n>"u")throw new Error("outputRange can not be undefined");if(r.length!==n.length)throw new Error("inputRange ("+r.length+") and outputRange ("+n.length+") must have the same length");qZ("inputRange",r),qZ("outputRange",n),Dwt(r);const a=(i==null?void 0:i.easing)??(u=>u);let o="extend";(i==null?void 0:i.extrapolateLeft)!==void 0&&(o=i.extrapolateLeft);let l="extend";if((i==null?void 0:i.extrapolateRight)!==void 0&&(l=i.extrapolateRight),typeof e!="number")throw new TypeError("Cannot interpolate an input which is not a number");const c=Rwt(e,r);return Lwt(e,[r[c],r[c+1]],[n[c],n[c+1]],{easing:a,extrapolateLeft:o,extrapolateRight:l})}var j0e=({frame:e,playbackRate:r,startFrom:n})=>ao(e,[-1,n,n+1],[-1,n,n+r]),_0e=({fps:e,frame:r,playbackRate:n,startFrom:i})=>{const a=j0e({frame:r,playbackRate:n,startFrom:i}),o=1e3/e;return a*o/1e3},KZ={},Mwt=(e,r)=>{if(e===null||e.seekable.length===0||e.seekable.length>1||KZ[e.src])return;const n={start:e.seekable.start(0),end:e.seekable.end(0)};if(n.start===0&&n.end===0){const i=[`The media ${e.src} cannot be seeked. This could be one of few reasons:`,"1) The media resource was replaced while the video is playing but it was not loaded yet.","2) The media does not support seeking.","3) The media was loaded with security headers prventing it from being included.","Please see https://remotion.dev/docs/non-seekable-media for assistance."].join(`
2196`);if(r==="console-error")console.error(i);else if(r==="console-warning")console.warn(`The media ${e.src}
2196 does not support seeking. The video will render fine, but may not play correctly in the Remotion Studio and in the <Player>. See https://remotion.dev/docs/non-seekable-media for an explanation.`);else throw new Error(i);KZ[e.src]=!0}},C0e=({mediaRef:e,src:r,mediaType:n,playbackRate:i,onlyWarnForMediaSeekingError:a,acceptableTimeshift:o,pauseWhenBuffering:l,isPremounting:c,isPostmounting:u,onAutoPlayError:d})=>{const{playbackRate:h}=Hd(),f=Hc(),p=Rp(),[m]=h0e(),A=w.useContext(Cb),{fps:g}=ec(),y=ex(),x=w.useRef(null),b=w.useRef(null),v=Op(),j=Y_();if(!A)throw new Error("useMediaPlayback must be used inside a <BufferingContext>");const _=w.useRef({}),C=w.useCallback(()=>{r&&(_.current[r]||(Ql.verbose({logLevel:v,tag:null},`Detected ${r} as a variable FPS video. Disabling buffering while seeking.`),_.current[r]=!0))},[v,r]),N=Owt({mediaRef:e,mediaType:n,lastSeek:b,onVariableFpsVideoDetected:C}),S=Iwt(e),E=_0e({frame:f,playbackRate:i,startFrom:-y,fps:g}),O=Fwt({element:e,shouldBuffer:l,isPremounting:c,isPostmounting:u,logLevel:v,mountTime:j,src:r??null}),{bufferUntilFirstFrame:B,isBuffering:T}=Pwt({mediaRef:e,mediaType:n,onVariableFpsVideoDetected:C,pauseWhenBuffering:l,logLevel:v,mountTime:j}),F=i*h,I=(()=>{var $;return($=e.current)!=null&&$.duration?Math.min(e.current.duration,o??.65):o??.65})(),D=w0e(A);w.useEffect(()=>{var Q,$,q,M,z;if((Q=e.current)!=null&&Q.paused)return;if(!m){no({logLevel:v,tag:"pause",message:`Pausing ${($=e.current)==null?void 0:$.src} because ${c?"media is premounting":u?"media is postmounting":"Player is not playing"}`,mountTime:j}),(q=e.current)==null||q.pause();return}const V=O||T();A.buffering.current&&!V&&(no({logLevel:v,tag:"pause",message:`Pausing ${(M=e.current)==null?void 0:M.src} because player is buffering but media tag is not`,mountTime:j}),(z=e.current)==null||z.pause())},[T,O,A,D,c,v,e,n,j,m,u]);const L=Oa();w.useLayoutEffect(()=>{const V=Math.max(0,F);e.current&&e.current.playbackRate!==V&&(e.current.playbackRate=V)},[e,F]),w.useEffect(()=>{var Be,Ve;const V=n==="audio"?"<Html5Audio>":"<Html5Video>";if(!e.current)throw new Error(`No ${n} ref found`);if(!r)throw new Error(`No 'src' attribute was passed to the ${V} element.`);const{duration:U}=e.current,Q=!Number.isNaN(U)&&Number.isFinite(U)?Math.min(U,E):E,$=S.current.time,q=((Be=N.current)==null?void 0:Be.time)??null,M=_.current[r],z=Math.abs(Q-$),K=q?Math.abs(Q-q):null,ne=(Ve=N.current)!=null&&Ve.lastUpdate&&N.current.time>S.current.lastUpdate?K:z,ie=K&&!M?ne:z;if(ie>I&&x.current!==Q){b.current=vk({mediaRef:e.current,time:Q,logLevel:v,why:`because time shift is too big. shouldBeTime = ${Q}, isTime = ${$}, requestVideoCallbackTime = ${q}, timeShift = ${ie}${M?", isVariableFpsVideo = true":""}, isPremounting = ${c}, isPostmounting = ${u}, pauseWhenBuffering = ${l}`,mountTime:j}),x.current=b.current,m&&(F>0&&B(Q),e.current.paused&&G5({mediaRef:e,mediaType:n,onAutoPlayError:d,logLevel:v,mountTime:j,reason:"player is playing but media tag is paused, and just seeked",isPlayer:L.isPlayer})),a||Mwt(e.current,a?"console-warning":"console-error");return}const X=m?.15:.01,de=Math.abs(e.current.currentTime-Q)>X,oe=O||T(),ce=A.buffering.current&&!oe;if(!m||ce){de&&(b.current=vk({mediaRef:e.current,time:Q,logLevel:v,why:`not playing or something else is buffering. time offset is over seek threshold (${X})`,mountTime:j}));return}if(!m||A.buffering.current)return;const ye=e.current.paused&&!e.current.ended;if(ye||p===0){const te=ye?"media tag is paused":"absolute frame is 0";de&&(b.current=vk({mediaRef:e.current,time:Q,logLevel:v,why:`is over timeshift threshold (threshold = ${X}) and ${te}`,mountTime:j})),G5({mediaRef:e,mediaType:n,onAutoPlayError:d,logLevel:v,mountTime:j,reason:`player is playing and ${te}`,isPlayer:L.isPlayer}),!M&&F>0&&B(Q)}},[p,I,B,A.buffering,N,v,E,T,O,e,n,a,F,m,r,d,c,u,l,j,S,L.isPlayer])},N0e=({mediaRef:e,id:r,mediaType:n,onAutoPlayError:i,isPremounting:a,isPostmounting:o})=>{const{audioAndVideoTags:l,imperativePlaying:c}=Hd(),u=Op(),d=Y_(),h=Oa();w.useEffect(()=>{const f={id:r,play:p=>{if(c.current&&!(a||o))return G5({mediaRef:e,mediaType:n,onAutoPlayError:i,logLevel:u,mountTime:d,reason:p,isPlayer:h.isPlayer})}};return l.current.push(f),()=>{l.current=l.current.filter(p=>p.id!==r)}},[l,r,e,n,i,c,a,o,u,d,h.isPlayer])},g7=w.createContext({mediaMuted:!1,mediaVolume:1}),x7=w.createContext({setMediaMuted:()=>{throw new Error("default")},setMediaVolume:()=>{throw new Error("default")}}),y7=()=>{const{mediaVolume:e}=w.useContext(g7),{setMediaVolume:r}=w.useContext(x7);return w.useMemo(()=>[e,r],[e,r])},v7=()=>{const{mediaMuted:e}=w.useContext(g7),{setMediaMuted:r}=w.useContext(x7);return w.useMemo(()=>[e,r],[e,r])},Nb=e=>{if(e>=100)throw new Error(`Volume was set to ${e}, but regular volume is 1, not 100. Did you forget to divide by 100? Set a volume of less than 100 to dismiss this error.`)},zwt=(e,r)=>{const[n]=w.useState(e.shouldPreMountAudioTags);if(e.shouldPreMountAudioTags!==n)throw new Error("Cannot change the behavior for pre-mounting audio tags dynamically.");const i=Op(),{volume:a,muted:o,playbackRate:l,shouldPreMountAudioTags:c,src:u,onDuration:d,acceptableTimeShiftInSeconds:h,_remotionInternalNeedsDurationCalculation:f,_remotionInternalNativeLoopPassed:
2196p,_remotionInternalStack:m,allowAmplificationDuringRender:A,name:g,pauseWhenBuffering:y,showInTimeline:x,loopVolumeCurveBehavior:b,stack:v,crossOrigin:j,delayRenderRetries:_,delayRenderTimeoutInMilliseconds:C,toneFrequency:N,useWebAudioApi:S,onError:E,onNativeError:O,audioStreamIndex:B,...T}=e,[F]=y7(),[I]=v7(),D=_b(b??"repeat"),{hidden:L}=w.useContext(J_);if(!u)throw new TypeError("No 'src' was passed to <Html5Audio>.");const V=wb(u),U=w.useContext(Fa),[Q]=w.useState(()=>String(Math.random())),$=L[Q]??!1,q=tx({frame:D,volume:a,mediaVolume:F});Nb(q);const M=h7({crossOrigin:j,requestsVideoFrame:!1,isClientSideRendering:!1}),z=w.useMemo(()=>({muted:o||I||$||q<=0,src:V,loop:p,crossOrigin:M,...T}),[p,$,I,o,T,V,q,M]),K=w.useMemo(()=>`audio-${Yg(u??"")}-${U==null?void 0:U.relativeFrom}-${U==null?void 0:U.cumulatedFrom}-${U==null?void 0:U.durationInFrames}-muted:${e.muted}-loop:${e.loop}`,[u,U==null?void 0:U.relativeFrom,U==null?void 0:U.cumulatedFrom,U==null?void 0:U.durationInFrames,e.muted,e.loop]),{el:ne,mediaElementSourceNode:ie,cleanupOnMediaTagUnmount:X}=ywt({aud:z,audioId:K,premounting:!!(U!=null&&U.premounting),postmounting:!!(U!=null&&U.postmounting)});p7({volume:a,mediaVolume:F,src:u,mediaType:"audio",playbackRate:l??1,displayName:g??null,id:Q,stack:m,showInTimeline:x,premountDisplay:(U==null?void 0:U.premountDisplay)??null,postmountDisplay:(U==null?void 0:U.postmountDisplay)??null,loopDisplay:void 0}),C0e({mediaRef:ne,src:u,mediaType:"audio",playbackRate:l??1,onlyWarnForMediaSeekingError:!1,acceptableTimeshift:h??null,isPremounting:!!(U!=null&&U.premounting),isPostmounting:!!(U!=null&&U.postmounting),pauseWhenBuffering:y,onAutoPlayError:null}),N0e({id:Q,isPostmounting:!!(U!=null&&U.postmounting),isPremounting:!!(U!=null&&U.premounting),mediaRef:ne,mediaType:"audio",onAutoPlayError:null}),v0e({logLevel:i,mediaRef:ne,source:ie,volume:q,shouldUseWebAudioApi:S??!1}),(ee.useInsertionEffect??ee.useLayoutEffect)(()=>()=>{requestAnimationFrame(()=>{X()})},[X]),w.useImperativeHandle(r,()=>ne.current,[ne]);const oe=w.useRef(d);return oe.current=d,w.useEffect(()=>{var ge;const{current:ce}=ne;if(!ce)return;if(ce.duration){(ge=oe.current)==null||ge.call(oe,ce.src,ce.duration);return}const ye=()=>{var Be;(Be=oe.current)==null||Be.call(oe,ce.src,ce.duration)};return ce.addEventListener("loadedmetadata",ye),()=>{ce.removeEventListener("loadedmetadata",ye)}},[ne,u]),n?null:s.jsx("audio",{ref:ne,preload:"metadata",crossOrigin:M,...z})},S0e=w.forwardRef(zwt),Uwt=(e,r)=>{const n=w.useRef(null),{volume:i,playbackRate:a,allowAmplificationDuringRender:o,onDuration:l,toneFrequency:c,_remotionInternalNeedsDurationCalculation:u,_remotionInternalNativeLoopPassed:d,acceptableTimeShiftInSeconds:h,name:f,onNativeError:p,delayRenderRetries:m,delayRenderTimeoutInMilliseconds:A,loopVolumeCurveBehavior:g,pauseWhenBuffering:y,audioStreamIndex:x,...b}=e,v=Rp(),j=_b(g??"repeat"),_=Hc(),C=w.useContext(Fa),{registerRenderAsset:N,unregisterRenderAsset:S}=w.useContext(Zg),{delayRender:E,continueRender:O}=Lp(),B=w.useMemo(()=>`audio-${Yg(e.src??"")}-${C==null?void 0:C.relativeFrom}-${C==null?void 0:C.cumulatedFrom}-${C==null?void 0:C.durationInFrames}`,[e.src,C==null?void 0:C.relativeFrom,C==null?void 0:C.cumulatedFrom,C==null?void 0:C.durationInFrames]),T=tx({volume:i,frame:j,mediaVolume:1});Nb(T),w.useImperativeHandle(r,()=>n.current,[]),w.useEffect(()=>{if(!e.src)throw new Error("No src passed");if(window.remotion_audioEnabled&&!e.muted&&!(T<=0))return N({type:"audio",src:zd(e.src),id:B,frame:v,volume:T,mediaFrame:_,playbackRate:e.playbackRate??1,toneFrequency:c??1,audioStartFrame:Math.max(0,-((C==null?void 0:C.relativeFrom)??0)),audioStreamIndex:x??0}),()=>S(B)},[e.muted,e.src,N,v,B,S,T,j,_,a,e.playbackRate,c,C==null?void 0:C.relativeFrom,x]);const{src:F}=e,I=r||u;return w.useLayoutEffect(()=>{var U,Q;if(((Q=(U=window.process)==null?void 0:U.env)==null?void 0:Q.NODE_ENV)==="test"||!I)return;const D=E("Loading <Html5Audio> duration with src="+F,{retries:m??void 0,timeoutInMilliseconds:A??void 0}),{current:L}=n,V=()=>{L!=null&&L.duration&&l(L.src,L.duration),O(D)};return L!=null&&L.duration?(l(L.src,L.duration),O(D)):L==null||L.addEventListener("loadedmetadata",V,{once:!0}),()=>{L==null||L.removeEventListener("loadedmetadata",V),O(D)}},[F,l,I,m,A,O,E]),I?s.jsx("audio",{ref:n,...b,onError:p}):null},$wt=w.forwardRef(Uwt),Qwt=(e,r)=>
2196{const n=w.useContext(jb),{startFrom:i,endAt:a,trimBefore:o,trimAfter:l,name:c,stack:u,pauseWhenBuffering:d,showInTimeline:h,onError:f,...p}=e,{loop:m,...A}=e,{fps:g}=ec(),y=Oa();if(y.isClientSideRendering)throw new Error("<Html5Audio> is not supported in @remotion/web-renderer. Use <Audio> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");const{durations:x,setDurations:b}=w.useContext(d7);if(typeof e.src!="string")throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(e.src)} instead.`);const v=wb(e.src),j=w.useCallback(E=>{console.log(E.currentTarget.error);const O=`Could not play audio with src ${v}: ${E.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;if(m){if(f){f(new Error(O));return}Uj(new Error(O))}else f==null||f(new Error(O)),console.warn(O)},[m,f,v]),_=w.useCallback((E,O)=>{b({type:"got-duration",durationInSeconds:O,src:E})},[b]),C=x[zd(v)]??x[zd(e.src)];l3({startFrom:i,endAt:a,trimBefore:o,trimAfter:l});const{trimBeforeValue:N,trimAfterValue:S}=c3({startFrom:i,endAt:a,trimBefore:o,trimAfter:l});if(m&&C!==void 0){if(!Number.isFinite(C))return s.jsx(Kw,{...A,ref:r,_remotionInternalNativeLoopPassed:!0});const E=C*g;return s.jsx(a3,{layout:"none",durationInFrames:i3({trimAfter:S,mediaDurationInFrames:E,playbackRate:e.playbackRate??1,trimBefore:N}),children:s.jsx(Kw,{...A,ref:r,_remotionInternalNativeLoopPassed:!0})})}return typeof N<"u"||typeof S<"u"?s.jsx(Oc,{layout:"none",from:0-(N??0),showInTimeline:!1,durationInFrames:S,name:c,children:s.jsx(Kw,{_remotionInternalNeedsDurationCalculation:!!m,pauseWhenBuffering:d??!1,...p,ref:r})}):(o3({playbackRate:e.playbackRate,volume:e.volume},"Html5Audio"),y.isRendering?s.jsx($wt,{onDuration:_,...e,ref:r,onNativeError:j,_remotionInternalNeedsDurationCalculation:!!m}):s.jsx(S0e,{_remotionInternalNativeLoopPassed:e._remotionInternalNativeLoopPassed??!1,_remotionInternalStack:u??null,shouldPreMountAudioTags:n!==null&&n.numberOfAudioTags>0,...e,ref:r,onNativeError:j,onDuration:_,pauseWhenBuffering:d??!1,_remotionInternalNeedsDurationCalculation:!!m,showInTimeline:h??!0}))},Kw=w.forwardRef(Qwt);bf(Kw);var Hwt=Kw,Vwt=({onLoad:e,onError:r,delayRenderRetries:n,delayRenderTimeoutInMilliseconds:i,...a},o)=>{const{delayRender:l,continueRender:c}=Lp(),[u]=w.useState(()=>l(`Loading <IFrame> with source ${a.src}`,{retries:n??void 0,timeoutInMilliseconds:i??void 0})),d=w.useCallback(f=>{c(u),e==null||e(f)},[u,e,c]),h=w.useCallback(f=>{c(u),r?r(f):console.error("Error loading iframe:",f,"Handle the event using the onError() prop to make this message disappear.")},[u,r,c]);return s.jsx("iframe",{referrerPolicy:"strict-origin-when-cross-origin",...a,ref:o,onError:h,onLoad:d})};w.forwardRef(Vwt);var k0e=({codeValue:e,runtimeValue:r,dragOverrideValue:n,defaultValue:i,shouldResortToDefaultValueIfUndef
2196ined:a=!1})=>n!==void 0?n:!e||!e.canUpdate?r:e.codeValue===void 0&&a?i:e.codeValue,E0e=(e,r)=>{const n=Oa(),i=w.useMemo(()=>{if(!n.isStudio||n.isReadOnlyStudio)return{controls:void 0,values:r??{}}},[n.isStudio,n.isReadOnlyStudio,r]);if(i)return i;const[a]=w.useState(()=>String(Math.random())),{visualModeEnabled:o,dragOverrides:l,codeValues:c}=w.useContext(n3),u=w.useMemo(()=>{if(o&&!(e===null||r===null))return{schema:e,currentValue:r,overrideId:a}},[e,r,a,o]);return w.useMemo(()=>{var A;if(u===void 0||r===null||e===null||!o)return{controls:void 0,values:r??{}};const d=l[a]??{},h=c[a],f=Object.keys(r),p=[...new Set(f)],m={};for(const g of p){const y=(h==null?void 0:h[g])??null;m[g]=k0e({codeValue:y,runtimeValue:r[g],dragOverrideValue:d[g],defaultValue:(A=e[g])==null?void 0:A.default,shouldResortToDefaultValueIfUndefined:!1})}return{controls:u,values:m}},[u,r,a,l,c,e,o])},GZ=(e,r)=>{const n=r.split(".");let i=e;for(const a of n){if(i==null||typeof i!="object")return;i=i[a]}return i},Wwt=(e,r,n)=>{const i={...e};for(const a of n){const o=r[a],l=a.split(".");if(l.length===1){i[a]=o;continue}let c=i;for(let u=0;u<l.length-1;u++){const d=l[u];typeof c[d]=="object"&&c[d]!==null?c[d]={...c[d]}:c[d]={},c=c[d]}c[l[l.length-1]]=o}return i},B0e=(e,r)=>{const n=Object.keys(r),i=w.forwardRef((a,o)=>{const l=Oa();if(!l.isStudio||l.isReadOnlyStudio||l.isRendering||!o1t.EXPERIMENTAL_VISUAL_MODE_ENABLED)return ee.createElement(e,{...a,controls:null,ref:o});const c=w.useMemo(()=>{const f={};for(const p of n)f[p]=GZ(a,p);return f},n.map(f=>GZ(a,f))),{controls:u,values:d}=E0e(r,c),h=Wwt(a,d,n);return ee.createElement(e,{...h,controls:u,ref:o})});return i.displayName=`wrapInSchema(${e.displayName||e.name||"Component"})`,i};function qwt(e){return 1e3*2**(e-1)}function KN(e){return e.startsWith("data:")&&e.length>100?e.slice(0,60)+"...["+e.length+" chars total]":e}var Kwt={"style.translate":{type:"translate",step:1,default:"0px 0px",description:"Position"},"style.scale":{type:"number",min:.05,max:100,step:.01,default:1,description:"Scale"},"style.rotate":{type:"rotation",step:1,default:"0deg",description:"Rotation"},"style.opacity":{type:"number",min:0,max:1,step:.01,default:1,description:"Opacity"}},Gwt=({onError:e,maxRetries:r=2,src:n,pauseWhenLoading:i,delayRenderRetries:a,delayRenderTimeoutInMilliseconds:o,onImageFrame:l,crossOrigin:c,showInTimeline:u,name:d,stack:h,ref:f,controls:p,...m})=>{const A=w.useRef(null),g=w.useRef({}),{delayPlayback:y}=A7(),x=w.useContext(Fa),[b]=w.useState(()=>String(Math.random()));if(!n)throw new Error('No "src" prop was passed to <Img>.');w.useImperativeHandle(f,()=>A.current,[]),Ewt({src:n,displayName:d??null,id:b,stack:h??null,showInTimeline:u??!0,premountDisplay:(x==null?void 0:x.premountDisplay)??null,postmountDisplay:(x==null?void 0:x.postmountDisplay)??null,loopDisplay:void 0,controls:p??null});const v=wb(n),j=w.useCallback(B=>{if(!A.current)return;const T=A.current.src;setTimeout(()=>{var I;if(!A.current)return;const F=(I=A.current)==null?void 0:I.src;F===T&&(A.current.removeAttribute("src"),A.current.setAttribute("src",F))},B)},[]),{delayRender:_,continueRender:C,cancelRender:N}=Lp(),S=w.useCallback(B=>{var T,F,I,D,L,V,U;if(g.current){if(g.current[(T=A.current)==null?void 0:T.src]=(g.current[(F=A.current)==null?void 0:F.src]??0)+1,e&&(g.current[(I=A.current)==null?void 0:I.src]??0)>r){e(B);return}if((g.current[(D=A.current)==null?void 0:D.src]??0)<=r){const Q=qwt(g.current[(L=A.current)==null?void 0:L.src]??0);console.warn(`Could not load image with source ${KN((V=A.current)==null?void 0:V.src)}, retrying again in ${Q}ms`),j(Q);return}try{N("Error loading image with src: "+KN((U=A.current)==null?void 0:U.src))}catch{}}},[N,r,e,j]);if(typeof window<"u"){const B=!!(x!=null&&x.premounting),T=!!(x!=null&&x.postmounting);w.useLayoutEffect(()=>{var U,Q;if(((Q=(U=window.process)==null?void 0:U.env)==null?void 0:Q.NODE_ENV)==="test"){A.current&&(A.current.src=v);return}const{current:F}=A;if(!F)return;const I=_("Loading <Img> with src="+KN(v),{retries:a??void 0,timeoutInMilliseconds:o??void 0}),D=i&&!B&&!T?y().unblock:()=>{};let L=!1;const V=()=>{var $,q,M;if(L){C(I);return}(g.current[($=A.current)==null?void 0:$.src]??0)>0&&(delete g.current[(q=A.current)==null?void 0:q.src],console.info(`Retry successful - ${KN((M=A.current)==null?void 0:M.src)} is now loaded`)),F&&(l==null||l(F)),D(),C(I)};if(!A.current){V();return}return F.src=v,F.decode().then(V).catch($=>
2196{console.warn($),F.complete&&F.naturalWidth>0&&F.naturalHeight>0?V():F.addEventListener("load",V)}),()=>{L=!0,F.removeEventListener("load",V),D(),C(I)}},[v,y,a,o,i,B,T,l,C,_])}const{isClientSideRendering:E}=Oa(),O=h7({crossOrigin:c,requestsVideoFrame:!1,isClientSideRendering:E});return s.jsx("img",{...m,ref:A,crossOrigin:O,onError:S,decoding:"sync"})},zh=B0e(Gwt,Kwt);bf(zh);var T0e=ee.createRef(),Xwt=({children:e,onlyRenderComposition:r,currentCompositionMetadata:n,initialCompositions:i,initialCanvasContent:a})=>{const[o,l]=w.useState([]),[c,u]=w.useState(a),[d,h]=w.useState(i),f=w.useRef(d),p=w.useCallback(v=>{h(j=>{const _=v(j);return f.current=_,_})},[]),m=w.useCallback(v=>{p(j=>{if(j.find(_=>_.id===v.id))throw new Error(`Multiple composition with id ${v.id} are registered.`);return[...j,v]})},[p]),A=w.useCallback(v=>{h(j=>j.filter(_=>_.id!==v))},[]),g=w.useCallback((v,j,_)=>{l(C=>[...C,{name:v,parent:j,nonce:_}])},[]),y=w.useCallback((v,j)=>{l(_=>_.filter(C=>!(C.name===v&&C.parent===j)))},[]);w.useImperativeHandle(T0e,()=>({getCompositions:()=>f.current}),[]);const x=w.useMemo(()=>({registerComposition:m,unregisterComposition:A,registerFolder:g,unregisterFolder:y,setCanvasContent:u,onlyRenderComposition:r}),[m,g,A,y,r]),b=w.useMemo(()=>({compositions:d,folders:o,currentCompositionMetadata:n,canvasContent:c}),[d,o,n,c]);return s.jsx(xb.Provider,{value:b,children:s.jsx(XT.Provider,{value:x,children:e})})},P0e={};qve(P0e,{makeDefaultPreviewCSS:()=>Jwt,injectCSS:()=>Ywt,OBJECTFIT_CONTAIN_CLASS_NAME:()=>$j});var GN={},Ywt=e=>{if(typeof document>"u")return()=>{};if(GN[e])return()=>{};const r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");return n.appendChild(document.createTextNode(e)),r.prepend(n),GN[e]=n,()=>{const i=GN[e];i&&(i.parentNode&&i.parentNode.removeChild(i),delete GN[e])}},$j="__remotion_objectfitcontain",Jwt=(e,r)=>e?`
2197    ${e} * {
2198      box-sizing: border-box;
2199    }
2200    ${e} *:-webkit-full-screen {
2201      width: 100%;
2202      height: 100%;
2203    }
2204    ${e} .${$j} {
2205      object-fit: contain;
2206    }
2207  `:`
2208    * {
2209      box-sizing: border-box;
2210    }
2211    body {
2212      margin: 0;
2213	    background-color: ${r};
2214    }
2215    .${$j} {
2216      object-fit: contain;
2217    }
2218    `,I0e="__remotion-studio-container",Zwt=()=>document.getElementById(I0e),e2t=ee.createContext(null),t2t=null,EF=[],r2t=()=>t2t,n2t=e=>(EF.push(e),()=>{EF=EF.filter(r=>r!==e)}),b7=w.createContext(null),i2t=()=>{const e=w.useContext(b7);return!e||e.videoEnabled===null?window.remotion_videoEnabled:e.videoEnabled},a2t=()=>{const e=w.useContext(b7);return!e||e.audioEnabled===null?window.remotion_audioEnabled:e.audioEnabled},s2t=({children:e,videoEnabled:r,audioEnabled:n})=>{const i=w.useMemo(()=>({videoEnabled:r,audioEnabled:n}),[r,n]);return s.jsx(b7.Provider,{value:i,children:e})},o2t=({children:e,numberOfAudioTags:r,logLevel:n,audioLatencyHint:i,videoEnabled:a,audioEnabled:o,frameState:l,visualModeEnabled:c})=>{const u=w.useMemo(()=>{let h=0;return{getNonce:()=>h++}},[]),d=w.useMemo(()=>({logLevel:n,mountTime:Date.now()}),[n]);return s.jsx(Xg.Provider,{value:d,children:s.jsx(K_.Provider,{value:u,children:s.jsx(q1t,{frameState:l,children:s.jsx(s2t,{videoEnabled:a,audioEnabled:o,children:s.jsx(Jve,{children:s.jsx(p0e,{children:s.jsx(G1t,{visualModeEnabled:c,children:s.jsx(x0e,{numberOfAudioTags:r,audioLatencyHint:i,audioEnabled:o,children:s.jsx(g0e,{children:s.jsx(b0e,{children:e})})})})})})})})})})},XZ=["h264","h265","vp8","vp9","av1","mp3","aac","wav","prores","h264-mkv","h264-ts","gif"];function l2t(e,r,n){if(!(typeof e>"u")){if(typeof e!="string")throw new TypeError(`The "${n}" prop ${r} must be a string, but you passed a value of type ${typeof e}.`);if(!XZ.includes(e))throw new Error(`The "${n}" prop ${r} must be one of ${XZ.join(", ")}, but you passed ${e}.`)}}var YZ=({calculated:e,compositionId:r,compositionFps:n,compositionHeight:i,compositionWidth:a,compositionDurationInFrames:o})=>{const l=`calculated by calculateMetadata() for the composition "${r}"`,c=`of the "<Composition />" component with the id "${r}"`,u=(e==null?void 0:e.width)??a??void 0;K5(u,"width",e!=null&&e.width?l:c);
2218const d=(e==null?void 0:e.height)??i??void 0;K5(d,"height",e!=null&&e.height?l:c);const h=(e==null?void 0:e.fps)??n??null;JT(h,e!=null&&e.fps?l:c);const f=(e==null?void 0:e.durationInFrames)??o??null;YT(f,{allowFloats:!1,component:`of the "<Composition />" component with the id "${r}"`});const p=e==null?void 0:e.defaultCodec;l2t(p,l,"defaultCodec");const m=e==null?void 0:e.defaultOutName,A=e==null?void 0:e.defaultVideoImageFormat,g=e==null?void 0:e.defaultPixelFormat,y=e==null?void 0:e.defaultProResProfile,x=e==null?void 0:e.defaultSampleRate;return{width:u,height:d,fps:h,durationInFrames:f,defaultCodec:p,defaultOutName:m,defaultVideoImageFormat:A,defaultPixelFormat:g,defaultProResProfile:y,defaultSampleRate:x}},F0e=({calculateMetadata:e,signal:r,defaultProps:n,inputProps:i,compositionId:a,compositionDurationInFrames:o,compositionFps:l,compositionHeight:c,compositionWidth:u})=>{const d=e?e({defaultProps:n,props:i,abortSignal:r,compositionId:a,isRendering:bd().isRendering}):null;if(d!==null&&typeof d=="object"&&"then"in d)return d.then(f=>{const{height:p,width:m,durationInFrames:A,fps:g,defaultCodec:y,defaultOutName:x,defaultVideoImageFormat:b,defaultPixelFormat:v,defaultProResProfile:j,defaultSampleRate:_}=YZ({calculated:f,compositionDurationInFrames:o,compositionFps:l,compositionHeight:c,compositionWidth:u,compositionId:a});return{width:m,height:p,fps:g,durationInFrames:A,id:a,defaultProps:AA(n),props:AA(f.props??i),defaultCodec:y??null,defaultOutName:x??null,defaultVideoImageFormat:b??null,defaultPixelFormat:v??null,defaultProResProfile:j??null,defaultSampleRate:_??null}});const h=YZ({calculated:d,compositionDurationInFrames:o,compositionFps:l,compositionHeight:c,compositionWidth:u,compositionId:a});return d===null?{...h,id:a,defaultProps:AA(n??{}),props:AA(i),defaultCodec:null,defaultOutName:null,defaultVideoImageFormat:null,defaultPixelFormat:null,defaultProResProfile:null,defaultSampleRate:null}:{...h,id:a,defaultProps:AA(n??{}),props:AA(d.props??i),defaultCodec:d.defaultCodec??null,defaultOutName:d.defaultOutName??null,defaultVideoImageFormat:d.defaultVideoImageFormat??null,defaultPixelFormat:d.defaultPixelFormat??null,defaultProResProfile:d.defaultProResProfile??null,defaultSampleRate:d.defaultSampleRate??null}},c2t=e=>{try{return{type:"success",result:F0e(e)}}catch(r){return{type:"error",error:r}}},u2t=ee.createContext(()=>{}),d2t=()=>{if(bd().isRendering){const e=window.remotion_envVariables;return e?{...JSON.parse(e),NODE_ENV:"production"}:{}}return{NODE_ENV:"production"}},h2t=()=>{const e=d2t();window.process||(window.process={}),window.process.env||(window.process.env={}),Object.keys(e).forEach(r=>{window.process.env[r]=e[r]})},f2t=ee.createContext(null),m2t=w.createContext({setSize:()=>{},size:{size:"auto",translation:{x:0,y:0}}}),p2t=({canvasSize:e,compositionHeight:r,compositionWidth:n,previewSize:i})=>{const a=e.height/r,o=e.width/n,l=Math.min(a,o);return i==="auto"?l===0?1:l:Number(i)},A2t=e=>{var i;const r=w.useContext(Fa),{dragOverrides:n}=w.useContext(n3);if(r)return(i=n[r.id])==null?void 0:i[e]},g2t=({src:e,transparent:r,currentTime:n,toneMapped:i})=>`http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(zd(e))}&time=${encodeURIComponent(Math.max(0,n))}&transparent=${String(r)}&toneMapped=${String(i)}`,x2t=({onError:e,volume:r,playbackRate:n,src:i,muted:a,allowAmplificationDuringRender:o,transparent:l,toneMapped:c,toneFrequency:u,name:d,loopVolumeCurveBehavior:h,delayRenderRetries:f,delayRenderTimeoutInMilliseconds:p,onVideoFrame:m,crossOrigin:A,audioStreamIndex:g,...y})=>{const x=Rp(),b=Hc(),v=_b(h),j=r3(),_=w.useContext(Fa),C=ex(),{registerRenderAsset:N,unregisterRenderAsset:S}=w.useContext(Zg);if(!i)throw new TypeError("No `src` was passed to <OffthreadVideo>.");const E=w.useMemo(()=>`offthreadvideo-${Yg(i)}-${_==null?void 0:_.cumulatedFrom}-${_==null?void 0:_.relativeFrom}-${_==null?void 0:_.durationInFrames}`,[i,_==null?void 0:_.cumulatedFrom,_==null?void 0:_.relativeFrom,_==null?void 0:_.durationInFrames]);if(!j)throw new Error("No video config found");const O=tx({volume:r,frame:v,mediaVolume:1});Nb(O),w.useEffect(()=>{if(!i)throw new Error("No src passed");if(window.remotion_audioEnabled&&!a&&!(O<=0))return N({type:"video",src:zd(i),id:E,frame:x,volume:O,mediaFrame:b,playbackRate:n,toneFrequency:u,audioStartFrame:Math.max(0,-((_==null?void 0:_.relativeFrom)??0)),audioStreamIndex:g}),()=>S(E)},[a,i,N,E,S,O,b,x,n,u,_==null?void 0:_.relativeFrom,g]);const B=w.useMemo(()=>j0e({frame:b,playbackRate:n||1,startFrom:-C})/j.fps,[b,C,n,j.fps]),T=w.useMemo(()=>g2t({src:i,currentTime:B,transparent:l,toneMapped:c}),[c,B,i,l]),[F,I]=w.useState(null),{delayRender:D,continueRender:L}=Lp();w.useLayoutEffect(()=>{if(!window.remotion_videoEnabled)return;const $=[];I(null);const q=new AbortController,M=D(`Fetching ${T} from server`,{retries:f??void 0,timeoutInMilliseconds:p??void 0});return(async()=>{try{const K=await fetch(T,{signal:q.signal,cache:"no-store"});if(K.status!==200){if(K.status===500){const X=await K.json();if(X.error){const de=X.error.replace(/^Error: /,"");throw new Error(de)}}throw new Error(`Server returned status ${K.status} while fetching ${T}`)}const ne=await K.blob(),ie=URL.createObjectURL(ne);$.push(()=>URL.revokeObjectURL(ie)),I({src:ie,handle:M})}catch(K){if(K.message.includes("aborted")){L(M);return}if(q.signal.aborted){L(M);return}K.message.includes("Failed to fetch")&&(K=new Error(`Failed to fetch ${T}. This could be caused by Chrome rejecting the request because the disk space is low. Consider increasing the disk size of your environment.`,{cause:K})),e?e(K):Uj(K)}})(),$.push(()=>{q.signal.aborted||q.abort()}),()=>{$.forEach(K=>K())}},[T,f,p,e,L,D]);const V=w.useCallback(()=>{e?e==null||e(new Error("Failed to load image with src "+F)):Uj("Failed to load image with src "+F)},[F,e]),U=w.useMemo(()=>[$j,y.className].filter(G_).join(" "),[y.className]),Q=w.useCallback($=>{m&&m($)},[m]);return!F||!window.remotion_videoEnabled?null:(L(F.handle),s.jsx(zh,{src:F.src,delayRenderRetries:f,delayRenderTimeoutInMilliseconds:p,onImageFrame:Q,...y,onError:V,className:U}))},y2t=({ref:e,onVideoFrame:r})=>{w.useEffect(()=>{const{current:n}=e;if(!n||!r)return;let i=0;const a=()=>{e.current&&(r(e.current),i=e.current.requestVideoFrameCallback(a))};return a(),()=>{n.cancelVideoFrameCallback(i)}},[r,e])};
2218class Fy extends Error{constructor({message:n,src:i}){super(n);tr(this,"src");this.name="MediaPlaybackError",this.src=i}}var v2t=(e,r)=>{const n=w.useContext(jb);if(!n)throw new Error("SharedAudioContext not found");const i=w.useRef(null),a=w.useMemo(()=>n.audioContext?f7({audioContext:n.audioContext,ref:i}):null,[n.audioContext]);(ee.useInsertionEffect??ee.useLayoutEffect)(()=>()=>{requestAnimationFrame(()=>{a==null||a.cleanup()})},[a]);const{volume:l,muted:c,playbackRate:u,onlyWarnForMediaSeekingError:d,src:h,onDuration:f,acceptableTimeShift:p,acceptableTimeShiftInSeconds:m,toneFrequency:A,name:g,_remotionInternalNativeLoopPassed:y,_remotionInternalStack:x,style:b,pauseWhenBuffering:v,showInTimeline:j,loopVolumeCurveBehavior:_,onError:C,onAutoPlayError:N,onVideoFrame:S,crossOrigin:E,delayRenderRetries:O,delayRenderTimeoutInMilliseconds:B,allowAmplificationDuringRender:T,useWebAudioApi:F,audioStreamIndex:I,...D}=e,L=_b(_??"repeat"),{fps:V,durationInFrames:U}=ec(),Q=w.useContext(Fa),{hidden:$}=w.useContext(J_),q=Op(),M=Y_(),[z]=w.useState(()=>String(Math.random())),K=$[z]??!1;if(typeof p<"u")throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");const[ne]=y7(),[ie]=v7(),X=tx({frame:L,volume:l,mediaVolume:ne});Nb(X),p7({volume:l,mediaVolume:ne,mediaType:"video",src:h,playbackRate:e.playbackRate??1,displayName:g??null,id:z,stack:x,showInTimeline:j,premountDisplay:(Q==null?void 0:Q.premountDisplay)??null,postmountDisplay:(Q==null?void 0:Q.postmountDisplay)??null,loopDisplay:void 0}),C0e({mediaRef:i,src:h,mediaType:"video",playbackRate:e.playbackRate??1,onlyWarnForMediaSeekingError:d,acceptableTimeshift:m??null,isPremounting:!!(Q!=null&&Q.premounting),isPostmounting:!!(Q!=null&&Q.postmounting),pauseWhenBuffering:v,onAutoPlayError:N??null}),N0e({id:z,isPostmounting:!!(Q!=null&&Q.postmounting),isPremounting:!!(Q!=null&&Q.premounting),mediaRef:i,mediaType:"video",onAutoPlayError:N??null}),v0e({logLevel:q,mediaRef:i,volume:X,source:a,shouldUseWebAudioApi:F??!1});const de=Q?Q.relativeFrom:0,oe=Q?Math.min(Q.durationInFrames,U):U,ce=wb(h),ye=_wt({actualSrc:ce,actualFrom:de,duration:oe,fps:V});w.useImperativeHandle(r,()=>i.current,[]),w.useState(()=>no({logLevel:q,message:`Mounting video with source = ${ye}, v=${lw}, user agent=${typeof navigator>"u"?"server":navigator.userAgent}`,tag:"video",mountTime:M})),w.useEffect(()=>{const{current:te}=i;if(!te)return;const xe=()=>{var We;if(te.error){if(console.error("Error occurred in video",te==null?void 0:te.error),C){const ze=new Fy({message:`Code ${te.error.code}: ${te.error.message}`,src:h});C(ze);return}throw new Fy({message:`The browser threw an error while playing the video ${h}: Code ${te.error.code} - ${(We=te==null?void 0:te.error)==null?void 0:We.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`,src:h})}else{if(C){const ze=new Fy({message:`The browser threw an error while playing the video ${h}`,src:h});C(ze);return}throw new Fy({message:"The browser threw an error while playing the video",src:h})}};return te.addEventListener("error",xe,{once:!0}),()=>{te.removeEventListener("error",xe)}},[C,h]);const ge=w.useRef(f);ge.current=f,y2t({ref:i,onVideoFrame:S}),w.useEffect(()=>{var We;const{current:te}=i;if(!te)return;if(te.duration){(We=ge.current)==null||We.call(ge,h,te.duration);return}const xe=()=>{var ze;(ze=ge.current)==null||ze.call(ge,h,te.duration)};return te.addEventListener("loadedmetadata",xe),()=>{te.removeEventListener("loadedmetadata",xe)}},[h]),w.useEffect(()=>{const{current:te}=i;te&&(u3()?te.preload="metadata":te.preload="auto")},[]);const Be=w.useMemo(()=>({...b,opacity:K?0:(b==null?void 0:b.opacity)??1}),[K,b]),Ve=h7({crossOrigin:E,requestsVideoFrame:!!S,isClientSideRendering:!1});return s.jsx("video",{ref:i,muted:c||ie||K||X<=0,playsInline:!0,src:ye,loop:y,style:Be,disableRemotePlayback:!0,crossOrigin:Ve,...D})},w7=w.forwardRef(v2t),j7=e=>{const{startFrom:r,endAt:n,trimBefore:i,trimAfter:a,name:o,pauseWhenBuffering:l,stack:c,showInTimeline:u,...d}=e,h=Oa();if(h.isClientSideRendering)throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");const f=w.useCallback(()=>{},[]);if(typeof e.src!="string")throw new TypeError(`The \`<OffthreadVideo>\` tag requires a string for \`src\`, but got ${JSON.stringify(e.src)} instead.`);l3({startFrom:r,endAt:n,trimBefore:i,trimAfter:a});const{trimBeforeValue:p,trimAfterValue:m}=c3({startFrom:r,endAt:n,trimBefore:i,trimAfter:a});if(typeof p<"u"||typeof m<"u")return s.jsx(Oc,{layout:"none",from:0-(p??0),showInTimeline:!1,durationInFrames:m,name:o,children:s.jsx(j7,{pauseWhenBuffering:l??!1,...d,trimAfter:void 0,name:void 0,showInTimeline:u,trimBefore:void 0,stack:void 0,startFrom:void 0,endAt:void 0})});if(o3(e,"Video"),h.isRendering)return s.jsx(x2t,{pauseWhenBuffering:l??!1,...d,trimAfter:void 0,name:void 0,showInTimeline:u,trimBefore:void 0,stack:void 0,startFrom:void 0,endAt:void 0});const{transparent:A,toneMapped:g,onAutoPlayError:y,onVideoFrame:x,crossOrigin:b,delayRenderRetries:v,delayRenderTimeoutInMilliseconds:j,..._}=d;return s.jsx(w7,{_remotionInternalStack:c??null,onDuration:f,onlyWarnForMediaSeekingError:!0,pauseWhenBuffering:l??!1,showInTimeline:u??!0,onAutoPlayError:y??void 0,onVideoFrame:x??null,crossOrigin:b,..._,_remotionInternalNativeLoopPassed:!1}
2218)},b2t=({src:e,acceptableTimeShiftInSeconds:r,allowAmplificationDuringRender:n,audioStreamIndex:i,className:a,crossOrigin:o,delayRenderRetries:l,delayRenderTimeoutInMilliseconds:c,id:u,loopVolumeCurveBehavior:d,muted:h,name:f,onAutoPlayError:p,onError:m,onVideoFrame:A,pauseWhenBuffering:g,playbackRate:y,showInTimeline:x,style:b,toneFrequency:v,toneMapped:j,transparent:_,trimAfter:C,trimBefore:N,useWebAudioApi:S,volume:E,_remotionInternalNativeLoopPassed:O,endAt:B,stack:T,startFrom:F,imageFormat:I})=>{if(I)throw new TypeError("The `<OffthreadVideo>` tag does no longer accept `imageFormat`. Use the `transparent` prop if you want to render a transparent video.");return s.jsx(j7,{acceptableTimeShiftInSeconds:r,allowAmplificationDuringRender:n??!0,audioStreamIndex:i??0,className:a,crossOrigin:o,delayRenderRetries:l,delayRenderTimeoutInMilliseconds:c,id:u,loopVolumeCurveBehavior:d??"repeat",muted:h??!1,name:f,onAutoPlayError:p??null,onError:m,onVideoFrame:A,pauseWhenBuffering:g??!0,playbackRate:y??1,toneFrequency:v??1,showInTimeline:x??!0,src:e,stack:T,startFrom:F,_remotionInternalNativeLoopPassed:O??!1,endAt:B,style:b,toneMapped:j??!0,transparent:_??!1,trimAfter:C,trimBefore:N,useWebAudioApi:S??!1,volume:E})};bf(b2t);var w2t="remotion_staticFilesChanged";function j2t(){const e=ee.useContext(xb),r=ee.useContext(bb),n=ee.useContext(vb),i=ee.useContext(Fa),a=ee.useContext(K_),o=ee.useContext(Gg),l=ee.useContext(s3),c=ee.useContext(ZT),u=ee.useContext(Zg),d=ee.useContext(Jg),h=ee.useContext(Cb),f=ee.useContext(Xg);return w.useMemo(()=>({compositionManagerCtx:e,timelineContext:r,setTimelineContext:n,sequenceContext:i,nonceContext:a,canUseRemotionHooksContext:o,preloadContext:l,resolveCompositionContext:c,renderAssetManagerContext:u,sequenceManagerContext:d,bufferManagerContext:h,logLevelContext:f}),[e,a,i,n,r,o,l,c,u,d,h,f])}var _2t=e=>{const{children:r,contexts:n}=e;return s.jsx(Xg.Provider,{value:n.logLevelContext,children:s.jsx(Gg.Provider,{value:n.canUseRemotionHooksContext,children:s.jsx(K_.Provider,{value:n.nonceContext,children:s.jsx(s3.Provider,{value:n.preloadContext,children:s.jsx(xb.Provider,{value:n.compositionManagerCtx,children:s.jsx(Jg.Provider,{value:n.sequenceManagerContext,children:s.jsx(Zg.Provider,{value:n.renderAssetManagerContext,children:s.jsx(ZT.Provider,{value:n.resolveCompositionContext,children:s.jsx(bb.Provider,{value:n.timelineContext,children:s.jsx(vb.Provider,{value:n.setTimelineContext,children:s.jsx(Fa.Provider,{value:n.sequenceContext,children:s.jsx(Cb.Provider,{value:n.bufferManagerContext,children:r})})})})})})})})})})})})},C2t=w.createRef(),mr={MaxMediaCacheSizeContext:e2t,useUnsafeVideoConfig:r3,useFrameForVolumeProp:_b,useTimelinePosition:Rp,useAbsoluteTimelinePosition:u0e,evaluateVolume:tx,getAbsoluteSrc:zd,Timeline:lz,validateMediaTrimProps:l3,validateMediaProps:o3,resolveTrimProps:c3,VideoForPreview:w7,CompositionManager:xb,CompositionSetters:XT,VisualModeOverridesContext:n3,SequenceManager:Jg,SequenceStackTracesUpdateContext:u2t,SequenceVisibilityToggleContext:J_,useSchema:E0e,wrapInSchema:B0e,useSequenceControlOverride:A2t,RemotionRootContexts:o2t,CompositionManagerProvider:Xwt,useVideo:t3,getRoot:r2t,useMediaVolumeState:y7,useMediaMutedState:v7,useMediaInTimeline:p7,useLazyComponent:r0e,truthy:G_,SequenceContext:Fa,PremountContext:cz,useRemotionContexts:j2t,RemotionContextProvider:_2t,CSSUtils:P0e,setupEnvVariables:h2t,MediaVolumeContext:g7,SetMediaVolumeContext:x7,getRemotionEnvironment:bd,SharedAudioContext:jb,SharedAudioContextProvider:x0e,invalidCompositionErrorMessage:z1t,calculateMediaDuration:i3,isCompositionIdValid:i0e,getPreviewDomElement:Zwt,compositionsRef:T0e,portalNode:az,waitForRoot:n2t,SetTimelineContext:vb,CanUseRemotionHooksProvider:rz,CanUseRemotionHooks:Gg,PrefetchProvider:p0e,DurationsContextProvider:g0e,IsPlayerContextProvider:f1t,useIsPlayer:a7,EditorPropsProvider:Jve,EditorPropsContext:s7,usePreload:wb,NonceContext:K_,resolveVideoConfig:F0e,resolveVideoConfigOrCatch:c2t,ResolveCompositionContext:ZT,useResolvedVideoConfig:o7,resolveCompositionsRef:j1t,REMOTION_STUDIO_CONTAINER_ELEMENT:I0e,RenderAssetManager:Zg,persistCurrentFrame:s0e,useTimelineContext:Hd,useTimelineSetFrame:d0e,isIosSafari:u3,WATCH_REMOTION_STATIC_FILES:w2t,addSequenceStackTraces:bf,useMediaStartsAt
2218:ex,BufferingProvider:b0e,BufferingContextReact:Cb,getComponentsToAddStacksTo:H1t,CurrentScaleContext:f2t,PreviewSizeContext:m2t,calculateScale:p2t,validateRenderAsset:f0e,Log:Ql,LogLevelContext:Xg,useLogLevel:Op,playbackLogging:no,timeValueRef:w1t,compositionSelectorRef:C2t,RemotionEnvironmentContext:Zve,warnAboutTooHighVolume:Nb,AudioForPreview:S0e,OBJECTFIT_CONTAIN_CLASS_NAME:$j,InnerOffthreadVideo:j7,useBasicMediaInTimeline:m7,getInputPropsOverride:Yve,setInputPropsOverride:y1t,useVideoEnabled:i2t,useAudioEnabled:a2t,useIsPlayerBuffering:w0e,TimelinePosition:lz,DelayRenderContextType:t0e,TimelineContext:bb,AbsoluteTimeContext:c7,RenderAssetManagerProvider:cwt,getEffectiveVisualModeValue:k0e,CompositionRenderErrorContext:Kve},N2t=({allowFloats:e,durationInFrames:r,frame:n})=>{if(typeof n>"u")throw new TypeError('Argument missing for parameter "frame"');if(typeof n!="number")throw new TypeError(`Argument passed for "frame" is not a number: ${n}`);if(!Number.isFinite(n))throw new RangeError(`Frame ${n} is not finite`);if(n%1!==0&&!e)throw new RangeError(`Argument for frame must be an integer, but got ${n}`);if(n<0&&n<-r)throw new RangeError(`Cannot use frame ${n}: Duration of composition is ${r}, therefore the lowest frame that can be rendered is ${-r}`);if(n>r-1)throw new RangeError(`Cannot use frame ${n}: Duration of composition is ${r}, therefore the highest frame that can be rendered is ${r-1}`)},O0e=e=>ee.Children.toArray(e).reduce((n,i)=>i.type===ee.Fragment?n.concat(O0e(i.props.children)):(n.push(i),n),[]),_7=w.createContext(!1),S2t=({children:e})=>s.jsx(_7.Provider,{value:!0,children:e}),k2t=({children:e})=>s.jsx(_7.Provider,{value:!1,children:e}),E2t=()=>{if(!ee.useContext(_7))throw new Error("This component must be inside a <Series /> component.")},B2t=({children:e},r)=>(E2t(),s.jsx(k2t,{children:e})),C7=w.forwardRef(B2t),L0e=e=>{const r=w.useMemo(()=>{let n=0;const i=O0e(e.children);return w.Children.map(i,(a,o)=>{const l=a;if(typeof l=="string"){if(l.trim()==="")return null;throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${l}"`)}if(l.type!==C7)throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${l} instead`);const c=`index = ${o}, duration = ${l.props.durationInFrames}`;if(!(l!=null&&l.props.children))throw new TypeError(`A <Series.Sequence /> component (${c}) was detected to not have any children. Delete it to fix this error.`);const u=l.props.durationInFrames,{durationInFrames:d,children:h,from:f,name:p,...m}=l.props;(o!==i.length-1||u!==1/0)&&YT(u,{component:"of a <Series.Sequence /> component",allowFloats:!0});const A=l.props.offset??0;if(Number.isNaN(A))throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${c}).`);if(!Number.isFinite(A))throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${A} (${c}).`);if(A%1!==0)throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${A} (${c}).`);const g=n+A;return n+=u+A,s.jsx(Oc,{name:p||"<Series.Sequence>",from:g,durationInFrames:u,...m,ref:l.ref,children:a})})},[e.children]);return s.jsx(S2t,{children:s.jsx(Oc,{layout:"none",name:"<Series>",...e,children:r})})};L0e.Sequence=C7;bf(L0e);bf(C7);var T2t=e=>{if(!(typeof e>"u")){if(typeof e!="number")throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof e}"`);if(Number.isNaN(e))throw new TypeError('A "duration" of a spring is NaN, which it must not be');if(!Number.isFinite(e))throw new TypeError('A "duration" of a spring must be finite, but is '+e);if(e<=0)throw new TypeError('A "duration" of a spring must be positive, but is '+e)}},P2t={damping:10,mass:1,stiffness:100,overshootClamping:!1},BF={};function I2t({animation:e,now:r,config:n}){const{toValue:i,lastTimestamp:a,current:o,velocity:l}=e,c=Math.min(r-a,64);if(n.damping<=0)throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");const u=n.damping,d=n.mass,h=n.stiffness,f=[i,a,o,l,u,d,h,r].join("-");if(BF[f])return BF[f];const p=-l,m=i-o,A=u/(2*Math.sqrt(h*d)),g=Math.sqrt(h/d),y=g*Math.sqrt(1-A**2),x=c/1e3,b=Math.sin(y*x),v=Math.cos(y*x),j=Math.exp(-A*g*x),_=j*(b*((p+A*g*m)/y)+m*v),C=i-_,
2218N=A*g*_-j*(v*(p+A*g*m)-y*m*b),S=Math.exp(-g*x),E=i-S*(m+(p+g*m)*x),O=S*(p*(x*g-1)+x*m*g*g),B={toValue:i,prevPosition:o,lastTimestamp:r,current:A<1?C:E,velocity:A<1?N:O};return BF[f]=B,B}var TF={};function R0e({frame:e,fps:r,config:n={}}){const o=[e,r,n.damping,n.mass,n.overshootClamping,n.stiffness].join("-");if(TF[o])return TF[o];let l={lastTimestamp:0,current:0,toValue:1,velocity:0,prevPosition:0};const c=Math.max(0,e),u=c%1;for(let d=0;d<=Math.floor(c);d++){d===Math.floor(c)&&(d+=u);const h=d/r*1e3;l=I2t({animation:l,now:h,config:{...P2t,...n}})}return TF[o]=l,l}var PF=new Map;function F2t({fps:e,config:r={},threshold:n=.005}){if(typeof n!="number")throw new TypeError(`threshold must be a number, got ${n} of type ${typeof n}`);if(n===0)return 1/0;if(n===1)return 0;if(isNaN(n))throw new TypeError("Threshold is NaN");if(!Number.isFinite(n))throw new TypeError("Threshold is not finite");if(n<0)throw new TypeError("Threshold is below 0");const i=[e,r.damping,r.mass,r.overshootClamping,r.stiffness,n].join("-");if(PF.has(i))return PF.get(i);JT(e,"to the measureSpring() function");let a=0,o=0;const l=()=>R0e({fps:e,frame:a,config:r});let c=l();const u=()=>Math.abs(c.current-c.toValue);let d=u();for(;d>=n;)a++,c=l(),d=u();o=a;for(let h=0;h<20;h++)a++,c=l(),d=u(),d>=n&&(h=0,o=a+1);return PF.set(i,o),o}function D0e({frame:e,fps:r,config:n={},from:i=0,to:a=1,durationInFrames:o,durationRestThreshold:l,delay:c=0,reverse:u=!1}){T2t(o),N2t({frame:e,durationInFrames:1/0,allowFloats:!0}),JT(r,"to spring()");const d=u||typeof o<"u",h=d?F2t({fps:r,config:n,threshold:l}):void 0,f=d?{get:()=>h}:{get:()=>{throw new Error("did not calculate natural duration, this is an error with Remotion. Please report")}},m=(u?(o??f.get())-e:e)+(u?c:-c),A=o===void 0?m:m/(o/f.get());if(o&&m>o)return a;const g=R0e({fps:r,frame:A,config:n}),y=n.overshootClamping?a>=i?Math.min(g.current,a):Math.max(g.current,a):g.current;return i===0&&a===1?y:ao(y,[0,1],[i,a])}var JZ=e=>Math.round(e*1e5)/1e5,IF=({element:e,desiredTime:r,logLevel:n,mountTime:i})=>{if(X5(e.currentTime,r))return{wait:Promise.resolve(r),cancel:()=>{}};vk({logLevel:n,mediaRef:e,time:r,why:"Seeking during rendering",mountTime:i});let a,o=null;const l=new Promise(u=>{a=e.requestVideoFrameCallback((d,h)=>{const f=h.expectedDisplayTime-d;if(f<=0){u(h.mediaTime);return}setTimeout(()=>{u(h.mediaTime)},f+150)})}),c=new Promise(u=>{const d=()=>{u()};e.addEventListener("seeked",d,{once:!0}),o=()=>{e.removeEventListener("seeked",d)}});return{wait:Promise.all([l,c]).then(([u])=>u),cancel:()=>{o==null||o(),e.cancelVideoFrameCallback(a)}}},O2t=({element:e,desiredTime:r,fps:n,logLevel:i,mountTime:a})=>{const o=1/n/2;let l=()=>{};return Number.isFinite(e.duration)&&e.currentTime>=e.duration&&r>=e.duration?{prom:Promise.resolve(),cancel:()=>{}}:{prom:new Promise((u,d)=>{const h=IF({element:e,desiredTime:r+o,logLevel:i,mountTime:a});h.wait.then(f=>{if(Math.abs(r-f)<=o)return u();const m=r>f?1:-1,A=IF({element:e,desiredTime:f+o*m,logLevel:i,mountTime:a});l=A.cancel,A.wait.then(g=>{const y=Math.abs(r-g);if(JZ(y)<=JZ(o))return u();const x=IF({element:e,desiredTime:r+o,logLevel:i,mountTime:a});return l=x.cancel,x.wait.then(()=>{u()}).catch(b=>{d(b)})}).catch(g=>{d(g)})}),l=h.cancel}),cancel:()=>{l()}}},L2t=({onError:e,volume:r,allowAmplificationDuringRender:n,playbackRate:i,onDuration:a,toneFrequency:o,name:l,acceptableTimeShiftInSeconds:c,delayRenderRetries:u,delayRenderTimeoutInMilliseconds:d,loopVolumeCurveBehavior:h,audioStreamIndex:f,onVideoFrame:p,...m},A)=>{const g=Rp(),y=Hc(),x=_b(h??"repeat"),b=r3(),v=w.useRef(null),j=w.useContext(Fa),_=ex(),C=Oa(),N=Op(),S=Y_(),{delayRender:E,continueRender:O}=Lp(),{registerRenderAsset:B,unregisterRenderAsset:T}=w.useContext(Zg),F=w.useMemo(()=>`video-${Yg(m.src??"")}-${j==null?void 0:j.cumulatedFrom}-${j==null?void 0:j.relativeFrom}-${j==null?void 0:j.durationInFrames}`,[m.src,j==null?void 0:j.cumulatedFrom,j==null?void 0:j.relativeFrom,j==null?void 0:j.durationInFrames]);if(!b)throw new Error("No video config found");const I=tx({volume:r,frame:x,mediaVolume:1});Nb(I),w.useEffect(()=>{if(!m.src)throw new Error("No src passed");if(!m.muted&&!(I<=0)&&window.remotion_audioEnabled)return B({type:"video",src:zd(m.src),id:F,frame:g,volume:I,mediaFrame:y,playbackRate:i??1,toneFrequency:o??1,audioStartFrame:Math.max(0,-((j==null?void 0:j.relativeFrom)??0)),audioStreamIndex:f??0}),()=>T(F)},[m.muted,m.src,B,F,T,I,y,g,i,o,j==null?void 0:j.relativeFrom,f]),w.useImperativeHandle(A,()=>v.current,[]),w.useEffect(()=>{var M,z;if(!window.remotion_videoEnabled)return;const{current:L}=v;if(!L)return;const V=_0e({frame:y,playbackRate:i||1,startFrom:-_,fps:b.fps}),U=E(`Rendering <Html5Video /> with src="${m.src}" at time ${V}`,{retries:u??void 0,timeoutInMilliseconds:d??void 0});if(((z=(M=window.process)==null?void 0:M.env)==null?void 0:z.NODE_ENV)==="test"){O(U);return}if(X5(L.currentTime,V)){if(L.readyState>=2){O(U);return}const K=()=>{O(U)};return L.addEventListener("loadeddata",K,{once:!0}),()=>{L.removeEventListener("loadeddata",K)}}const Q=()=>{O(U)},$=O2t({element:L,desiredTime:V,fps:b.fps,logLevel:N,mountTime:S});$.prom.then(()=>{O(U)}),L.addEventListener("ended",Q,{once:!0});const q=()=>{var K;if(L!=null&&L.error){if(console.error("Error occurred in video",L==null?void 0:L.error),e)return;throw new Fy({message:`The browser threw an error while playing the video ${m.src}: Code ${L.error.code} - ${(K=L==null?void 0:L.error)==null?void 0:K.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`,src:m.src})}else throw new Fy({message:"The browser threw an error",src:m.src})};return L.addEventListener("error",q,{once:!0}),()=>{$.cancel(),L.removeEventListener("ended",Q),L.removeEventListener("error",q),O(U)}},[x,m.src,i,b.fps,y,_,e,u,d,N,S,O,E]);const{src:D}=m;return C.isRendering&&w.useLayoutEffect(()=>{var Q,$;if((($=(Q=window.process)==null?void 0:Q.env)==null?void 0:$.NODE_ENV)==="test")return;const L=E("Loading <Html5Video> duration with src="+D,{retries:u??void 0,timeoutInMilliseconds:d??void 0}),{current:V}=v,U=()=>{V!=null&&V.duration&&a(D,V.duration),O(L)};return V!=null&&V.duration?(a(D,V.duration),O(L)):V==null||V.addEventListener("loadedmetadata",U,{once:!0}),()=>{V==null||V.removeEventListener("loadedmetadata",U),O(L)}},[D,a,u,d,O,E]),s.jsx("video",{ref:v,disableRemotePlayback:!0,...m})},R2t=w.forwardRef(L2t),D2t=(e,r)=>
2218{const{startFrom:n,endAt:i,trimBefore:a,trimAfter:o,name:l,pauseWhenBuffering:c,stack:u,_remotionInternalNativeLoopPassed:d,showInTimeline:h,onAutoPlayError:f,...p}=e,{loop:m,...A}=e,{fps:g}=ec(),y=Oa();if(y.isClientSideRendering)throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");const{durations:x,setDurations:b}=w.useContext(d7);if(typeof r=="string")throw new Error("string refs are not supported");if(typeof e.src!="string")throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(e.src)} instead.`);const v=wb(e.src),j=w.useCallback((E,O)=>{b({type:"got-duration",durationInSeconds:O,src:E})},[b]),_=w.useCallback(()=>{},[]),C=x[zd(v)]??x[zd(e.src)];l3({startFrom:n,endAt:i,trimBefore:a,trimAfter:o});const{trimBeforeValue:N,trimAfterValue:S}=c3({startFrom:n,endAt:i,trimBefore:a,trimAfter:o});if(m&&C!==void 0){if(!Number.isFinite(C))return s.jsx(Gw,{...A,ref:r,stack:u,_remotionInternalNativeLoopPassed:!0});const E=C*g;return s.jsx(a3,{durationInFrames:i3({trimAfter:S,mediaDurationInFrames:E,playbackRate:e.playbackRate??1,trimBefore:N}),layout:"none",name:l,children:s.jsx(Gw,{...A,ref:r,stack:u,_remotionInternalNativeLoopPassed:!0})})}return typeof N<"u"||typeof S<"u"?s.jsx(Oc,{layout:"none",from:0-(N??0),showInTimeline:!1,durationInFrames:S===void 0?void 0:S/(e.playbackRate??1),name:l,children:s.jsx(Gw,{pauseWhenBuffering:c??!1,...p,ref:r,stack:u})}):(o3({playbackRate:e.playbackRate,volume:e.volume},"Html5Video"),y.isRendering?s.jsx(R2t,{onDuration:j,onVideoFrame:_??null,...p,ref:r}):s.jsx(w7,{onlyWarnForMediaSeekingError:!1,...p,ref:r,onVideoFrame:null,pauseWhenBuffering:c??!1,onDuration:j,_remotionInternalStack:u??null,_remotionInternalNativeLoopPassed:d??!1,showInTimeline:h??!0,onAutoPlayError:f??void 0}))},Gw=w.forwardRef(D2t);bf(Gw);var M2t=Gw;
2218V1t();var z2t={},U2t=new Proxy(z2t,{get(e,r){return r==="Bundling"||r==="Rendering"||r==="Log"||r==="Puppeteer"||r==="Output"?U2t:()=>{console.warn("⚠️  The CLI configuration has been extracted from Remotion Core."),console.warn("Update the import from the config file:"),console.warn(),console.warn("- Delete:"),console.warn('import {Config} from "remotion";'),console.warn("+ Replace:"),console.warn('import {Config} from "@remotion/cli/config";'),console.warn(),console.warn("For more information, see https://www.remotion.dev/docs/4-0-migration."),process.exit(1)}}});Oc.displayName="Sequence";bf(Oc);bf(oz);function $2t(e,r,n,i){const{extrapolateLeft:a,extrapolateRight:o,easing:l}=i;let c=e;const[u,d]=r,[h,f]=n;if(c<u){if(a==="identity")return c;if(a==="clamp")c=u;else if(a==="wrap"){const p=d-u;c=((c-u)%p+p)%p+u}}if(c>d){if(o==="identity")return c;if(o==="clamp")c=d;else if(o==="wrap"){const p=d-u;c=((c-u)%p+p)%p+u}}return h===f?h:(c=(c-u)/(d-u),c=l(c),c=c*(f-h)+h,c)}function Q2t(e,r){let n;for(n=1;n<r.length-1&&!(r[n]>=e);++n);return n-1}function H2t(e){for(let r=1;r<e.length;++r)if(!(e[r]>e[r-1]))throw new Error(`inputRange must be strictly monotonically increasing but got [${e.join(",")}]`)}function ZZ(e,r){if(r.length<2)throw new Error(e+" must have at least 2 elements");for(const n of r){if(typeof n!="number")throw new Error(`${e} must contain only numbers`);if(!Number.isFinite(n))throw new Error(`${e} must contain only finite numbers, but got [${r.join(",")}]`)}}function V2t(e,r,n,i){if(typeof e>"u")throw new Error("input can not be undefined");if(typeof r>"u")throw new Error("inputRange can not be undefined");if(typeof n>"u")throw new Error("outputRange can not be undefined");if(r.length!==n.length)throw new Error("inputRange ("+r.length+") and outputRange ("+n.length+") must have the same length");ZZ("inputRange",r),ZZ("outputRange",n),H2t(r);const a=u=>u;let o="extend",l="extend";if(typeof e!="number")throw new TypeError("Cannot interpolate an input which is not a number");const c=Q2t(e,r);return $2t(e,[r[c],r[c+1]],[n[c],n[c+1]],{easing:a,extrapolateLeft:o,extrapolateRight:l})}function W2t(e){return!!e}typeof window<"u"&&(window.remotion_renderReady=!1,window.remotion_delayRenderTimeouts||(window.remotion_delayRenderTimeouts={}),window.remotion_delayRenderHandles=[]);var q2t="The delayRender was called:",K2t="Retries left: ",G2t="- Rendering the frame will be retried.",X2t="handle was cleared after",Y5="remotion-date:",J5="remotion-file:",Y2t=({data:e,indent:r,staticBase:n})=>{let i=!1,a=!1,o=!1,l=!1;try{return{serializedString:JSON.stringify(e,function(u,d){const h=this[u];return h instanceof Date?(i=!0,`${Y5}${h.toISOString()}`):h instanceof Map?(o=!0,d):h instanceof Set?(l=!0,d):typeof h=="string"&&n!==null&&h.startsWith(n)?(a=!0,`${J5}${h.replace(n+"/","")}`):d},r),customDateUsed:i,customFileUsed:a,mapUsed:o,setUsed:l}}catch(c){throw new Error("Could not serialize the passed input props to JSON: "+c.message)}},J2t=e=>JSON.parse(e,(r,n)=>typeof n=="string"&&n.startsWith(Y5)?new Date(n.replace(Y5,"")):typeof n=="string"&&n.startsWith(J5)?`${window.remotion_staticBase}/${n.replace(J5,"")}`:n),nu="[-+]?\\d*\\.?\\d+",XN=nu+"%";function YN(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var JN="(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";function k1(e){return new RegExp(e+"\\(\\s*("+JN+")\\s+("+JN+")\\s+("+JN+")(?:\\s*\\/\\s*("+JN+"))?\\s*\\)")}function Z2t(){const e={rgb:void 0,rgba:void 0,hsl:void 0,hsla:void 0,hex3:void 0,hex4:void 0,hex5:void 0,hex6:void 0,hex8:void 0,oklch:void 0,oklab:void 0,lab:void 0,lch:void 0,hwb:void 0};return e.rgb===void 0&&(e.rgb=new RegExp("rgb"+YN(nu,nu,nu)),e.rgba=new RegExp("rgba"+YN(nu,nu,nu,nu)),e.hsl=new RegExp("hsl"+YN(nu,XN,XN)),e.hsla=new RegExp("hsla"+YN(nu,XN,XN,nu)),e.hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,e.hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,e.hex6=/^#([0-9a-fA-F]{6})$/,e.hex8=/^#([0-9a-fA-F]{8})$/,e.oklch=k1("oklch"),e.oklab=k1("oklab"),e.lab=k1("lab"),e.lch=k1("lch"),e.hwb=k1("hwb")),e}function lv(e,r,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(r-e)*6*n:n<1/2?r:n<2/3?e+(r-e)*(2/3-n)*6:e}function eee(e,r,n){const i=n<.5?n*(1+r):n+r-n*r,a=2*n-i,o=lv(a,i,e
2218+1/3),l=lv(a,i,e),c=lv(a,i,e-1/3);return Math.round(o*255)<<24|Math.round(l*255)<<16|Math.round(c*255)<<8}function zx(e){const r=Number.parseInt(e,10);return r<0?0:r>255?255:r}function tee(e){return(Number.parseFloat(e)%360+360)%360/360}function ree(e){const r=Number.parseFloat(e);return r<0?0:r>1?255:Math.round(r*255)}function ZN(e){const r=Number.parseFloat(e);return r<0?0:r>100?1:r/100}function lc(e,r){return e==="none"?0:e.endsWith("%")?Number.parseFloat(e)/100*r:Number.parseFloat(e)}function FF(e){return e==="none"?0:e.endsWith("rad")?Number.parseFloat(e)*180/Math.PI:e.endsWith("grad")?Number.parseFloat(e)*.9:e.endsWith("turn")?Number.parseFloat(e)*360:Number.parseFloat(e)}function E1(e){return e===void 0||e==="none"?1:e.endsWith("%")?Math.max(0,Math.min(1,Number.parseFloat(e)/100)):Math.max(0,Math.min(1,Number.parseFloat(e)))}function cv(e){return e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055}function eS(e){return Math.max(0,Math.min(1,e))}function B1(e,r,n,i){const a=Math.round(eS(e)*255),o=Math.round(eS(r)*255),l=Math.round(eS(n)*255),c=Math.round(eS(i)*255);return(a<<24|o<<16|l<<8|c)>>>0}function nee(e,r,n){const i=e+.3963377774*r+.2158037573*n,a=e-.1055613458*r-.0638541728*n,o=e-.0894841775*r-1.291485548*n,l=i*i*i,c=a*a*a,u=o*o*o,d=4.0767416621*l-3.3077115913*c+.2309699292*u,h=-1.2684380046*l+2.6097574011*c-.3413193965*u,f=-.0041960863*l-.7034186147*c+1.707614701*u;return[cv(d),cv(h),cv(f)]}function iee(e,r,n){const i=.008856451679035631,a=24389/27,o=.95047,l=1,c=1.08883,u=(e+16)/116,d=r/500+u,h=u-n/200,f=d*d*d,p=h*h*h,m=f>i?f:(116*d-16)/a,A=e>a*i?((e+16)/116)**3:e/a,g=p>i?p:(116*h-16)/a,y=m*o,x=A*l,b=g*c,v=3.2404542*y-1.5371385*x-.4985314*b,j=-.969266*y+1.8760108*x+.041556*b,_=.0556434*y-.2040259*x+1.0572252*b;return[cv(v),cv(j),cv(_)]}function ejt(e,r,n){if(r+n>=1){const d=r/(r+n);return[d,d,d]}const i=1,a=0,o=lv(a,i,e+1/3),l=lv(a,i,e),c=lv(a,i,e-1/3),u=1-r-n;return[o*u+r,l*u+r,c*u+r]}var fz={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function tjt(e){const r=Z2t();let n;if(r.hex6&&(n=r.hex6.exec(e)))return Number.parseInt(n[1]+"ff",16)>>>0;if(fz[e]!==void 0)return fz[e];
2218if(r.rgb&&(n=r.rgb.exec(e)))return(zx(n[1])<<24|zx(n[2])<<16|zx(n[3])<<8|255)>>>0;if(r.rgba&&(n=r.rgba.exec(e)))return(zx(n[1])<<24|zx(n[2])<<16|zx(n[3])<<8|ree(n[4]))>>>0;if(r.hex3&&(n=r.hex3.exec(e)))return Number.parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0;if(r.hex8&&(n=r.hex8.exec(e)))return Number.parseInt(n[1],16)>>>0;if(r.hex4&&(n=r.hex4.exec(e)))return Number.parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0;if(r.hsl&&(n=r.hsl.exec(e)))return(eee(tee(n[1]),ZN(n[2]),ZN(n[3]))|255)>>>0;if(r.hsla&&(n=r.hsla.exec(e)))return(eee(tee(n[1]),ZN(n[2]),ZN(n[3]))|ree(n[4]))>>>0;if(r.oklch&&(n=r.oklch.exec(e))){const i=lc(n[1],1),a=lc(n[2],.4),o=FF(n[3]),l=E1(n[4]),c=o*Math.PI/180,[u,d,h]=nee(i,a*Math.cos(c),a*Math.sin(c));return B1(u,d,h,l)}if(r.oklab&&(n=r.oklab.exec(e))){const i=lc(n[1],1),a=lc(n[2],.4),o=lc(n[3],.4),l=E1(n[4]),[c,u,d]=nee(i,a,o);return B1(c,u,d,l)}if(r.lab&&(n=r.lab.exec(e))){const i=lc(n[1],100),a=lc(n[2],125),o=lc(n[3],125),l=E1(n[4]),[c,u,d]=iee(i,a,o);return B1(c,u,d,l)}if(r.lch&&(n=r.lch.exec(e))){const i=lc(n[1],100),a=lc(n[2],150),o=FF(n[3]),l=E1(n[4]),c=o*Math.PI/180,[u,d,h]=iee(i,a*Math.cos(c),a*Math.sin(c));return B1(u,d,h,l)}if(r.hwb&&(n=r.hwb.exec(e))){const i=FF(n[1]),a=lc(n[2],1),o=lc(n[3],1),l=E1(n[4]),[c,u,d]=ejt(i/360,a,o);return B1(c,u,d,l)}throw new Error(`invalid color string ${e} provided`)}function rjt(e){const r=tjt(e);return(r<<24|r>>>8)>>>0}var njt=["4444-xq","4444","hq","standard","light","proxy"],ijt=!1,ajt=({allowFloats:e,durationInFrames:r,frame:n})=>{if(typeof n>"u")throw new TypeError('Argument missing for parameter "frame"');if(typeof n!="number")throw new TypeError(`Argument passed for "frame" is not a number: ${n}`);if(!Number.isFinite(n))throw new RangeError(`Frame ${n} is not finite`);if(n%1!==0&&!e)throw new RangeError(`Argument for frame must be an integer, but got ${n}`);if(n<0&&n<-r)throw new RangeError(`Cannot use frame ${n}: Duration of composition is ${r}, therefore the lowest frame that can be rendered is ${-r}`);if(n>r-1)throw new RangeError(`Cannot use frame ${n}: Duration of composition is ${r}, therefore the highest frame that can be rendered is ${r-1}`)},aee=["h264","h265","vp8","vp9","av1","mp3","aac","wav","prores","h264-mkv","h264-ts","gif"];function sjt(e,r,n){if(!(typeof e>"u")){if(typeof e!="string")throw new TypeError(`The "${n}" prop ${r} must be a string, but you passed a value of type ${typeof e}.`);if(!aee.includes(e))throw new Error(`The "${n}" prop ${r} must be one of ${aee.join(", ")}, but you passed ${e}.`)}}var ojt=(e,r,n)=>{if(e){if(typeof e!="object")throw new Error(`"${r}" must be an object, but you passed a value of type ${typeof e}`);if(Array.isArray(e))throw new Error(`"${r}" must be an object, an array was passed ${n?`for composition "${n}"`:""}`)}};function ljt(e,r,n){if(typeof e!="number")throw new Error(`The "${r}" prop ${n} must be a number, but you passed a value of type ${typeof e}`);if(isNaN(e))throw new TypeError(`The "${r}" prop ${n} must not be NaN, but is NaN.`);if(!Number.isFinite(e))throw new TypeError(`The "${r}" prop ${n} must be finite, but is ${e}.`);if(e%1!==0)throw new TypeError(`The "${r}" prop ${n} must be an integer, but is ${e}.`);if(e<=0)throw new TypeError(`The "${r}" prop ${n} must be positive, but got ${e}.`)}function cjt(e,r){const{allowFloats:n,component:i}=r;if(typeof e>"u")throw new Error(`The "durationInFrames" prop ${i} is missing.`);if(typeof e!="number")throw new Error(`The "durationInFrames" prop ${i} must be a number, but you passed a value of type ${typeof e}`);if(e<=0)throw new TypeError(`The "durationInFrames" prop ${i} must be positive, but got ${e}.`);if(!n&&e%1!==0)throw new TypeError(`The "durationInFrames" prop ${i} must be an integer, but got ${e}.`);if(!Number.isFinite(e))throw new TypeError(`The "durationInFrames" prop ${i} must be finite, but got ${e}.`)}function ujt(e,r,n){if(typeof e!="number")throw new Error(`"fps" must be a number, but you passed a value of type ${typeof e} ${r}`);if(!Number.isFinite(e))throw new Error(`"fps" must be a finite, but you passed ${e} ${r}`);if(isNaN(e))throw new Error(`"fps" must not be NaN, but got ${e} ${r}`);if(e<=0)throw new TypeError(`"fps" must be positive, but got ${e} ${r}`);if(n&&e>50)throw new TypeError("The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif")}var djt=({frame:e,playbackRate:r,startFrom:n})=>V2t(e,[-1,n,n+1],[-1,n,n+r]),hjt=e=>typeof window>"u"||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://")||e.startsWith("blob:")||e.startsWith("data:")?e:ne
2218w URL(e,window.origin).href,fjt=({src:e,transparent:r,currentTime:n,toneMapped:i})=>`http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(hjt(e))}&time=${encodeURIComponent(Math.max(0,n))}&transparent=${String(r)}&toneMapped=${String(i)}`,d3={processColor:rjt,truthy:W2t,validateFps:ujt,validateDimension:ljt,validateDurationInFrames:cjt,validateDefaultAndInputProps:ojt,validateFrame:ajt,serializeJSONWithSpecialTypes:Y2t,bundleName:"bundle.js",bundleMapName:"bundle.js.map",deserializeJSONWithSpecialTypes:J2t,DELAY_RENDER_CALLSTACK_TOKEN:q2t,DELAY_RENDER_RETRY_TOKEN:G2t,DELAY_RENDER_CLEAR_TOKEN:X2t,DELAY_RENDER_ATTEMPT_TOKEN:K2t,getOffthreadVideoSource:fjt,getExpectedMediaFrameUncorrected:djt,ENABLE_V5_BREAKING_CHANGES:ijt,MIN_NODE_VERSION:16,MIN_BUN_VERSION:"1.0.3",colorNames:fz,DATE_TOKEN:Y5,FILE_TOKEN:J5,validateCodec:sjt,proResProfileOptions:njt},Is=25,mz=16,mjt=()=>s.jsx("svg",{width:Is,height:Is,viewBox:"0 0 25 25",fill:"none",children:s.jsx("path",{d:"M8 6.375C7.40904 8.17576 7.06921 10.2486 7.01438 12.3871C6.95955 14.5255 7.19163 16.6547 7.6875 18.5625C9.95364 18.2995 12.116 17.6164 14.009 16.5655C15.902 15.5147 17.4755 14.124 18.6088 12.5C17.5158 10.8949 15.9949 9.51103 14.1585 8.45082C12.3222 7.3906 10.2174 6.68116 8 6.375Z",fill:"white",stroke:"white",strokeWidth:"6.25",strokeLinejoin:"round"})}),pjt=()=>s.jsxs("svg",{viewBox:"0 0 100 100",width:Is,height:Is,children:[s.jsx("rect",{x:"25",y:"20",width:"20",height:"60",fill:"#fff",ry:"5",rx:"5"}),s.jsx("rect",{x:"55",y:"20",width:"20",height:"60",fill:"#fff",ry:"5",rx:"5"})]}),Ajt=({isFullscreen:e})=>{const i=e?0:3,a=e?6*1.6:6/2,o=e?6*1.6:6*2;return s.jsxs("svg",{viewBox:"0 0 32 32",height:mz,width:mz,children:[s.jsx("path",{d:`
2219				M ${i} ${o}
2220				L ${a} ${a}
2221				L ${o} ${i}
2222				`,stroke:"#fff",strokeWidth:6,fill:"none"}),s.jsx("path",{d:`
2223				M ${32-i} ${o}
2224				L ${32-a} ${a}
2225				L ${32-o} ${i}
2226				`,stroke:"#fff",strokeWidth:6,fill:"none"}),s.jsx("path",{d:`
2227				M ${i} ${32-o}
2228				L ${a} ${32-a}
2229				L ${o} ${32-i}
2230				`,stroke:"#fff",strokeWidth:6,fill:"none"}),s.jsx("path",{d:`
2231				M ${32-i} ${32-o}
2232				L ${32-a} ${32-a}
2233				L ${32-o} ${32-i}
2234				`,stroke:"#fff",strokeWidth:6,fill:"none"})]})},gjt=()=>s.jsx("svg",{width:Is,height:Is,viewBox:"0 0 24 24",children:s.jsx("path",{d:"M3.63 3.63a.996.996 0 000 1.41L7.29 8.7 7 9H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71v-4.17l4.18 4.18c-.49.37-1.02.68-1.6.91-.36.15-.58.53-.58.92 0 .72.73 1.18 1.39.91.8-.33 1.55-.77 2.22-1.31l1.34 1.34a.996.996 0 101.41-1.41L5.05 3.63c-.39-.39-1.02-.39-1.42 0zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-3.83-2.4-7.11-5.78-8.4
2234-.59-.23-1.22.23-1.22.86v.19c0 .38.25.71.61.85C17.18 6.54 19 9.06 19 12zm-8.71-6.29l-.17.17L12 7.76V6.41c0-.89-1.08-1.33-1.71-.7zM16.5 12A4.5 4.5 0 0014 7.97v1.79l2.48 2.48c.01-.08.02-.16.02-.24z",fill:"#fff"})}),xjt=()=>s.jsx("svg",{width:Is,height:Is,viewBox:"0 0 24 24",children:s.jsx("path",{d:"M3 10v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1zm13.5 2A4.5 4.5 0 0014 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 4.45v.2c0 .38.25.71.6.85C17.18 6.53 19 9.06 19 12s-1.82 5.47-4.4 6.5c-.36.14-.6.47-.6.85v.2c0 .63.63 1.07 1.21.85C18.6 19.11 21 15.84 21 12s-2.4-7.11-5.79-8.4c-.58-.23-1.21.22-1.21.85z",fill:"#fff"})}),see="__remotion_buffering_indicator",oee="__remotion_buffering_animation",yjt={width:Is,height:Is,overflow:"hidden",lineHeight:"normal",fontSize:"inherit"},vjt={width:14,height:14,overflow:"hidden",lineHeight:"normal",fontSize:"inherit"},bjt=({type:e})=>{const r=e==="player"?yjt:vjt;return s.jsxs(s.Fragment,{children:[s.jsx("style",{type:"text/css",children:`
2235				@keyframes ${oee} {
2236          0% {
2237            rotate: 0deg;
2238          }
2239          100% {
2240            rotate: 360deg;
2241          }
2242        }
2243        
2244        .${see} {
2245            animation: ${oee} 1s linear infinite;
2246        }        
2247			`}),s.jsx("div",{style:r,children:s.jsx("svg",{viewBox:e==="player"?"0 0 22 22":"0 0 18 18",style:r,className:see,children:s.jsx("path",{d:e==="player"?"M 11 4 A 7 7 0 0 1 15.1145 16.66312":"M 9 2 A 7 7 0 0 1 13.1145 14.66312",stroke:"white",strokeLinecap:"round",fill:"none",strokeWidth:3})})})]})},wjt=({currentSize:e,width:r,height:n,compositionWidth:i,compositionHeight:a})=>r!==void 0&&n===void 0?{aspectRatio:[i,a].join("/")}:n!==void 0&&r===void 0?{aspectRatio:[i,a].join("/")}:e?{width:i,height:a}:{width:i,height:a},M0e=({previewSize:e,compositionWidth:r,compositionHeight:n,canvasSize:i})=>{const a=mr.calculateScale({canvasSize:i,compositionHeight:n,compositionWidth:r,previewSize:e}),o=0-(1-a)/2,l=o*r,c=o*n,u=r*a,d=n*a,h=i.width/2-u/2,f=i.height/2-d/2;return{centerX:h,centerY:f,xCorrection:l,yCorrection:c,scale:a}},z0e=({config:e,style:r,canvasSize:n,overflowVisible:i,layout:a})=>e?{position:"relative",overflow:i?"visible":"hidden",...wjt({compositionHeight:e.height,compositionWidth:e.width,currentSize:n,height:r==null?void 0:r.height,width:r==null?void 0:r.width}),opacity:a?1:0,...r}:{},U0e=({config:e,layout:r,scale:n,overflowVisible:i})=>e?r?{position:"absolute",width:e.width,height:e.height,display:"flex",transform:`scale(${n})`,marginLeft:r.xCorrection,marginTop:r.yCorrection,overflow:i?"visible":"hidden"}:{position:"absolute",width:e.width,height:e.height,display:"flex",transform:`scale(${n})`,overflow:i?"visible":"hidden"}:{},$0e=({layout:e,scale:r,config:n,overflowVisible:i})=>{if(!n)return{};if(!e)return{width:n.width*r,height:n.height*r,display:"flex",flexDirection:"column",position:"absolute",overflow:i?"visible":"hidden"};const{centerX:a,centerY:o}=e;return{width:n.width*r,height:n.height*r,display:"flex",flexDirection:"column",position:"absolute",left:a,top:o,overflow:i?"visible":"hidden"}},Q0e=ee.createContext(void 0),H0e=ee.createContext(void 0);class jjt{constructor(){tr(this,"listeners",{ended:[],error:[],pause:[],play:[],ratechange:[],scalechange:[],seeked:[],timeupdate:[],frameupdate:[],fullscreenchange:[],volumechange:[],mutechange:[],waiting:[],resume:[]});tr(this,"dispatchSeek",r=>{this.dispatchEvent("seeked",{frame:r})});tr(this,"dispatchVolumeChange",r=>{this.dispatchEvent("volumechange",{volume:r})});tr(this,"dispatchPause",()=>{this.dispatchEvent("pause",void 0)});tr(this,"dispatchPlay",()=>{this.dispatchEvent("play",void 0)});tr(this,"dispatchEnded",()=>{this.dispatchEvent("ended",void 0)});tr(this,"dispatchRateChange",r=>{this.dispatchEvent("ratechange",{playbackRate:r})});tr(this,"dispatchScaleChange",r=>{this.dispatchEvent("scalechange",{scale:r})});tr(this,"dispatchError",r=>{this.dispatchEvent("error",{error:r})});tr(this,"dispatchTimeUpdate",r=>{this.dispatchEvent("timeupdate",r)});tr(this,"dispatchFrameUpdate",r=>{this.dispatchEvent("frameupdate",r)});tr(this,"dispatchFullscreenChange",r=>{this.dispatchEvent("fullscreenchange",r)});tr(this,"dispatchMuteChange",r=>{this.dispatchEvent("mutechange",r)});tr(this,"dispatchWaiting",r=>{this.dispatchEvent("waiting",r)});tr(this,"dispatchResume",r=>{this.dispatchEvent("resume",r)})}addEventListener(r,n){this.listeners[r].push(n)}removeEventListener(r,n){this.listeners[r]=this.listeners[r].filter(i=>i!==n)}dispatchEvent(r,n){this.listeners[r].forEach(i=>
2247{i({detail:n})})}}class _jt{constructor(){tr(this,"listeners",{error:[],waiting:[],resume:[]});tr(this,"dispatchError",r=>{this.dispatchEvent("error",{error:r})});tr(this,"dispatchWaiting",r=>{this.dispatchEvent("waiting",r)});tr(this,"dispatchResume",r=>{this.dispatchEvent("resume",r)})}addEventListener(r,n){this.listeners[r].push(n)}removeEventListener(r,n){this.listeners[r]=this.listeners[r].filter(i=>i!==n)}dispatchEvent(r,n){this.listeners[r].forEach(i=>{i({detail:n})})}}var V0e=e=>{const r=w.useContext(mr.BufferingContextReact);if(!r)throw new Error("BufferingContextReact not found");w.useLayoutEffect(()=>{const n=r.listenForBuffering(()=>{r.buffering.current=!0,e.dispatchWaiting({})}),i=r.listenForResume(()=>{r.buffering.current=!1,e.dispatchResume({})});return()=>{n.remove(),i.remove()}},[r,e])},Cjt=({children:e,currentPlaybackRate:r})=>{const[n]=w.useState(()=>new jjt);if(!w.useContext(mr.BufferingContextReact))throw new Error("BufferingContextReact not found");return w.useEffect(()=>{r&&n.dispatchRateChange(r)},[n,r]),V0e(n),s.jsx(Q0e.Provider,{value:n,children:e})},N7=(e,r)=>{const[n,i]=w.useState(!1);return w.useEffect(()=>{const{current:a}=e;if(!a)return;let o;const l=()=>{r&&(clearTimeout(o),o=setTimeout(()=>{i(!1)},r===!0?3e3:r))},c=()=>{i(!0),l()},u=()=>{i(!1),clearTimeout(o)},d=()=>{i(!0),l()};return a.addEventListener("mouseenter",c),a.addEventListener("mouseleave",u),a.addEventListener("mousemove",d),()=>{a.removeEventListener("mouseenter",c),a.removeEventListener("mouseleave",u),a.removeEventListener("mousemove",d),clearTimeout(o)}},[r,e]),n},h3=()=>{const[e,r,n]=mr.Timeline.usePlayingState(),[i,a]=w.useState(!1),o=mr.Timeline.useTimelinePosition(),l=w.useRef(o),c=mr.Timeline.useTimelineSetFrame(),u=mr.Timeline.useTimelineSetFrame(),d=w.useContext(mr.SharedAudioContext),{audioAndVideoTags:h}=mr.useTimelineContext(),f=w.useRef(o);f.current=o;const p=mr.useVideo(),m=mr.useUnsafeVideoConfig(),A=w.useContext(Q0e),g=((m==null?void 0:m.durationInFrames)??1)-1,y=o===g,x=o===0;if(!A)throw new TypeError("Expected Player event emitter context");const b=w.useContext(mr.BufferingContextReact);if(!b)throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");const{buffering:v}=b,j=w.useCallback(L=>{p!=null&&p.id&&u(V=>({...V,[p.id]:L})),f.current=L,A.dispatchSeek(L)},[A,u,p==null?void 0:p.id]),_=w.useCallback(L=>{var V;n.current||(a(!0),y&&j(0),(V=d==null?void 0:d.audioContext)==null||V.resume(),d&&d.numberOfAudioTags>0&&L&&d.playAllAudios(),h.current.forEach(U=>U.play("player play() was called and playing audio from a click")),n.current=!0,r(!0),l.current=f.current,A.dispatchPlay())},[n,y,d,r,A,j,h]),C=w.useCallback(()=>{var L;n.current&&(n.current=!1,r(!1),A.dispatchPause(),(L=d==null?void 0:d.audioContext)==null||L.suspend())},[A,n,r,d]),N=w.useCallback(()=>{n.current&&(n.current=!1,f.current=l.current,m&&(u(L=>({...L,[m.id]:l.current})),r(!1),A.dispatchPause()))},[m,A,n,r,u]),S=p==null?void 0:p.id,E=w.useCallback(L=>{if(!S)return null;n.current||c(V=>{const U=V[S]??window.remotion_initialFrame??0,Q=Math.max(0,U-L);return U===Q?V:{...V,[S]:Q}})},[n,c,S]),O=w.useCallback(L=>{if(!S)return null;n.current||c(V=>{const U=V[S]??window.remotion_initialFrame??0,Q=Math.min(g,U+L);return U===Q?V:{...V,[S]:Q}})},[S,n,g,c]),B=w.useCallback(L=>{n.current?C():_(L)},[n,C,_]),T=w.useCallback(()=>n.current,[n]),F=w.useCallback(()=>f.current,[f]),I=w.useCallback(()=>v.current,[v]);return w.useMemo(()=>({frameBack:E,frameForward:O,isLastFrame:y,emitter:A,playing:e,play:_,pause:C,seek:j,isFirstFrame:x,getCurrentFrame:F,isPlaying:T,isBuffering:I,pauseAndReturnToPlayStart:N,hasPlayed:i,toggle:B}),[A,E,O,i,x,y,F,C,N,_,e,j,B,T,I])},Njt=({browserMediaControlsBehavior:e,videoConfig:r,playbackRate:n})=>{const{playing:i,pause:a,play:o,emitter:l,getCurrentFrame:c,seek:u}=h3(),d=w.useRef(!1);w.useEffect(()=>{i&&(d.current=!0)},[i]),w.useEffect(()=>{navigator.mediaSession&&e.mode!=="do-nothing"&&(i?navigator.mediaSession.playbackState="playing":d.current&&(navigator.mediaSession.playbackState="paused"))},[e.mode,i]),w.useEffect(()=>{if(!navigator.mediaSession||e.mode==="do-nothing")return;const h=()=>{r&&navigator.mediaSession&&navigator.mediaSession.setPositionState({duration:r.durationInFrames/r.fps,playbackRate:n,position:c()/r.fps})};return l.addEventListener("timeupdate",h),()=>{l.removeEventListener("timeupdate",h)}},[e.mode,l,c,n,r]),w.useEffect(()=>{if(navigator.mediaSession&&e.mode!=="do-nothing")return navigator.mediaSession.setActionHandler("play",()=>{e.mode==="register-media-session"&&o()}),navigator.mediaSession.setActionHandler("pause",()=>{e.mode==="register-media-session"&&a()}),navigator.mediaSession.setActionHandler("seekto",h=>{e.mode==="register-media-session"&&h.seekTime!==void 0&&r&&u(Math.round(h.seekTime*r.fps))}),navigator.mediaSession.setActionHandler("seekbackward",()=>{e.mode==="register-media-session"&&r&&u(Math.max(0,Math.round((c()-10)*r.fps)))}),navigator.mediaSession.setActionHandler("seekforward",()=>{e.mode==="register-media-session"&&r&&u(Math.max(r.durationInFrames-1,Math.round((c()+10)
2247*r.fps)))}),navigator.mediaSession.setActionHandler("previoustrack",()=>{e.mode==="register-media-session"&&u(0)}),()=>{navigator.mediaSession.metadata=null,navigator.mediaSession.setActionHandler("play",null),navigator.mediaSession.setActionHandler("pause",null),navigator.mediaSession.setActionHandler("seekto",null),navigator.mediaSession.setActionHandler("seekbackward",null),navigator.mediaSession.setActionHandler("seekforward",null),navigator.mediaSession.setActionHandler("previoustrack",null)}},[e.mode,c,a,o,u,r])},Sjt=({time:e,currentFrame:r,playbackSpeed:n,fps:i,actualLastFrame:a,actualFirstFrame:o,framesAdvanced:l,shouldLoop:c})=>{const d=(n<0?Math.ceil:Math.floor)(e*n/(1e3/i))-l,h=d+r,f=r>a||r<o,p=h>a||h<o,m=!c&&p&&!f;return n>0?p?{nextFrame:o,framesToAdvance:d,hasEnded:m}:{nextFrame:h,framesToAdvance:d,hasEnded:m}:p?{nextFrame:a,framesToAdvance:d,hasEnded:m}:{nextFrame:h,framesToAdvance:d,hasEnded:m}},lee=()=>typeof document>"u"?!1:document.visibilityState==="hidden",kjt=()=>{const e=w.useRef(lee());return w.useEffect(()=>{const r=()=>{e.current=lee()};return document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r)}},[]),e},Ejt=({loop:e,playbackRate:r,moveToBeginningWhenEnded:n,inFrame:i,outFrame:a,browserMediaControlsBehavior:o,getCurrentFrame:l})=>{const c=mr.useUnsafeVideoConfig(),u=mr.Timeline.useTimelinePosition(),{playing:d,pause:h,emitter:f,isPlaying:p}=h3(),m=mr.Timeline.useTimelineSetFrame(),A=kjt(),g=w.useRef(null),y=w.useContext(mr.BufferingContextReact);if(!y)throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");Njt({browserMediaControlsBehavior:o,playbackRate:r,videoConfig:c}),w.useEffect(()=>{if(!c||!d)return;let x=!1,b=null,v=performance.now(),j=0;const _=()=>{b!==null&&(b.type==="raf"?cancelAnimationFrame(b.id):clearTimeout(b.id))},C=()=>{x=!0,_()},N=()=>{if(x||!p())return;const O=performance.now()-v,B=a??c.durationInFrames-1,T=i??0,F=l(),{nextFrame:I,framesToAdvance:D,hasEnded:L}=Sjt({time:O,currentFrame:F,playbackSpeed:r,fps:c.fps,actualFirstFrame:T,actualLastFrame:B,framesAdvanced:j,shouldLoop:e});if(j+=D,I!==l()&&(!L||n)&&m(V=>({...V,[c.id]:I})),L){C(),h(),f.dispatchEnded();return}S()},S=()=>{if(y.buffering.current){const O=y.listenForResume(()=>{O.remove(),v=performance.now(),j=0,S()});return}if(A.current){b={type:"timeout",id:setTimeout(N,1e3/c.fps)};return}b={type:"raf",id:requestAnimationFrame(N)}};S();const E=()=>{document.visibilityState!=="visible"&&(_(),N())};return window.addEventListener("visibilitychange",E),()=>{window.removeEventListener("visibilitychange",E),C()}},[c,e,h,d,m,f,r,i,a,n,A,l,y,p]),w.useEffect(()=>{const x=setInterval(()=>{g.current!==l()&&(f.dispatchTimeUpdate({frame:l()}),g.current=l())},250);return()=>clearInterval(x)},[f,l]),w.useEffect(()=>{f.dispatchFrameUpdate({frame:u})},[f,u])},OF=[],S7=(e,r)=>{const[n,i]=w.useState(()=>{if(!e.current)return null;const l=e.current.getClientRects();return l[0]?{width:l[0].width,height:l[0].height,left:l[0].x,top:l[0].y,windowSize:{height:window.innerHeight,width:window.innerWidth}}:null}),a=w.useMemo(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(l=>{const{contentRect:c,target:u}=l[0],d=u.getClientRects();if(!(d!=null&&d[0])){i(null);return}const h=c.width===0?1:d[0].width/c.width,f=r.shouldApplyCssTransforms||h===0?d[0].width:d[0].width*(1/h),p=r.shouldApplyCssTransforms||h===0?d[0].height:d[0].height*(1/h);i(m=>m&&m.width===f&&m.height===p&&m.left===d[0].x&&m.top===d[0].y&&m.windowSize.height===window.innerHeight&&m.windowSize.width===window.innerWidth?m:{width:f,height:p,left:d[0].x,top:d[0].y,windowSize:{height:window.innerHeight,width:window.innerWidth}})}),[r.shouldApplyCssTransforms]),o=w.useCallback(()=>{if(!e.current)return;const l=e.current.getClientRects();if(!l[0]){i(null);return}i(c=>c&&c.width===l[0].width&&c.height===l[0].height&&c.left===l[0].x&&c.top===l[0].y&&c.windowSize.height===window.innerHeight&&c.windowSize.width===window.innerWidth?c:{width:l[0].width,height:l[0].height,left:l[0].x,top:l[0].y,windowSize:{height:window.innerHeight,width:window.innerWidth}})},[e]);return w.useEffect(()=>{if(!a)return;const{current:l}=e;return l&&a.observe(l),()=>{l&&a.unobserve(l)}},[a,e,o]),w.useEffect(()=>{if(r.triggerOnWindowResize)return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[r.triggerOnWindowResize,o]),w.useEffect(()=>(OF.push(o),()=>{OF=OF.filter(l=>l!==o)}),[o]),w.useMemo(()=>n?{...n,refresh:o}:null,[n,o])},k7=e=>e??"__remotion-player",Bjt={display:"flex",justifyContent:"center",alignItems:"center",flex:1,height:"100%",width:"100%"};class W0e extends ee.Component{constructor(){super(...arguments);tr(this,"state",{hasError:null})}static getDerivedStateFromError(n){return{hasError:n}}componentDidCatch(n){this.props.onError(n)}render(){return this.state.hasError?s.jsx("div",{style:Bjt,children:this.props.errorFallback({error:this.state.hasError})}):this.props.children}}var Tjt=async()=>
2247{if(typeof window>"u"||typeof window.crypto>"u"||typeof window.crypto.subtle>"u")return null;try{const e=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(window.location.hostname));return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}catch{return null}},LF={backgroundColor:"red",position:"absolute",padding:12,fontFamily:"Arial"},Pjt=["28d262b44cc61fa750f1686b16ad0604dabfe193fbc263eec05c89b7ad4c2cd6","4db1b0a94be33165dfefcb3ba03d04c7a2666dd27c496d3dc9fa41858e94925e","fbc48530bbf245da790f63675e84e06bab38c3b114fab07eb350025119922bdc","7baf10a8932757b1b3a22b3fce10a048747ac2f8eaf638603487e3705b07eb83","8a6c21a598d8c667272b5207c051b85997bf5b45d5fb712378be3f27cd72c6a6","a2f7aaac9c50a9255e7fc376110c4e0bfe153722dc66ed3c5d3bf2a135f65518"],cee=!1,Ijt=()=>{const[e,r]=ee.useState(!1);return w.useEffect(()=>{cee||(cee=!0,Tjt().then(n=>{n&&Pjt.includes(n)&&r(!0)}).catch(()=>{}))},[]),w.useEffect(()=>{if(!e)return;const n=()=>{if(!document.querySelector(".warning-banner")){const o=document.createElement("div");o.className="warning-banner",Object.assign(o.style,LF,{zIndex:"9999",cssText:`${LF.cssText} !important;`}),o.innerHTML=`
2248	        <a href="https://github.com/remotion-dev/remotion/pull/4589" style="color: white;">
2249	          Remotion Unlicensed – Contact [email protected]
2250	        </a>
2251	      `,document.body.appendChild(o)}},i=new MutationObserver(()=>n());return i.observe(document.body,{childList:!0,subtree:!0}),()=>{i.disconnect()}},[e]),e?s.jsx("div",{style:LF,className:"warning-banner",children:s.jsx("a",{style:{color:"white"},href:"https://github.com/remotion-dev/remotion/pull/4589",children:"Remotion Unlicensed – Contact [email protected]"})}):null},uee=({playing:e,buffering:r})=>e&&r?s.jsx(bjt,{type:"player"}):e?s.jsx(pjt,{}):s.jsx(mjt,{}),Ux=12,dee=5,Fjt=({volume:e,isVertical:r,onBlur:n,inputRef:i,setVolume:a})=>{const o=w.useMemo(()=>{const p={paddingLeft:5,height:Is,width:FA,display:"inline-flex",alignItems:"center"};return r?{...p,position:"absolute",transform:`rotate(-90deg) translateX(${FA/2+Is/2}px)`}:{...p}},[r]),l=typeof ee.useId>"u"?"volume-slider":ee.useId(),[c]=w.useState(()=>`__remotion-volume-slider-${Yg(l)}`.replace(".","")),u=w.useCallback(f=>{a(parseFloat(f.target.value))},[a]),d=w.useMemo(()=>{const f={WebkitAppearance:"none",backgroundColor:"rgba(255, 255, 255, 0.5)",borderRadius:dee/2,cursor:"pointer",height:dee,width:FA,backgroundImage:`linear-gradient(
2252				to right,
2253				white ${e*100}%, rgba(255, 255, 255, 0) ${e*100}%
2254			)`};return r?{...f,bottom:Is+FA/2}:f},[r,e]),h=`
2255	.${c}::-webkit-slider-thumb {
2256		-webkit-appearance: none;
2257		background-color: white;
2258		border-radius: ${Ux/2}px;
2259		box-shadow: 0 0 2px black;
2260		height: ${Ux}px;
2261		width: ${Ux}px;
2262	}
2263
2264	.${c}::-moz-range-thumb {
2265		-webkit-appearance: none;
2266		background-color: white;
2267		border-radius: ${Ux/2}px;
2268		box-shadow: 0 0 2px black;
2269		height: ${Ux}px;
2270		width: ${Ux}px;
2271	}
2272`;return s.jsxs("div",{style:o,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:h}}),s.jsx("input",{ref:i,"aria-label":"Change volume",className:c,max:1,min:0,onBlur:n,onChange:u,step:.01,type:"range",value:e,style:d})]})},Ojt=e=>s.jsx(Fjt,{...e}),FA=100,Ljt=({displayVerticalVolumeSlider:e,renderMuteButton:r,renderVolumeSlider:n})=>{const[i,a]=mr.useMediaMutedState(),[o,l]=mr.useMediaVolumeState(),[c,u]=w.useState(!1),d=w.useRef(null),h=w.useRef(null),f=N7(d,!1),p=w.useCallback(()=>{setTimeout(()=>{h.current&&document.activeElement!==h.current&&u(!1)},10)},[]),m=o===0,A=w.useCallback(()=>{if(m){l(1),a(!1);return}a(j=>!j)},[m,a,l]),g=w.useMemo(()=>({display:"inline-flex",background:"none",border:"none",justifyContent:"center",alignItems:"center",touchAction:"none",...e&&{position:"relative"}}),[e]),y=w.useMemo(()=>({display:"inline",width:Is,height:Is,cursor:"pointer",appearance:"none",background:"none",border:"none",padding:0}),[]),x=w.useCallback(({muted:j,volume:_})=>{const C=j||_===0;return s.jsx("button",{"aria-label":C?"Unmute sound":"Mute sound",title:C?"Unmute sound":"Mute sound",onClick:A,onBlur:p,onFocus:()=>u(!0),style:y,type:"button",children:C?s.jsx(gjt,{}):s.jsx(xjt,{})})},[p,A,y]),b=w.useMemo(()=>r?r({muted:i,volume:o}):x({muted:i,volume:o}),[i,o,x,r]),v=w.useMemo(()=>(c||f)&&!i&&!mr.isIosSafari()?(n??Ojt)({isVertical:e,volume:o,onBlur:()=>u(!1),inputRef:h,setVolume:l}):null,[e,c,f,i,o,n,l]);return s.jsxs("div",{ref:d,style:g,children:[b,v]})};function Rjt(e){const[r,n]=w.useState(e),i=w.useRef(null);return w.useEffect(()=>{const a=o=>{i.current&&!i.current.contains(o.target)&&n(!1)};return document.addEventListener("pointerup",a,!0),()=>{document.removeEventListener("pointerup",a,!0)}},[]),{ref:i,isComponentVisible:r,setIsComponentVisible:n}}var Djt=35,Mjt=70,zjt={height:30,paddingRight:15,paddingLeft:12,display:"flex",flexDirection:"row",alignItems:"center"},Ujt={width:22,display:"flex",alignItems:"center"},$jt={width:14,height:14,color:"black"},Qjt=()=>s.jsx("svg",{viewBox:"0 0 512 512",style:$jt,children:s.jsx("path",{fill:"currentColor",d:"M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"})}),Hjt=e=>{const r=e.toString();return r.includes(".")?r:r+".0"},Vjt=({rate:e,onSelect:r,selectedRate:n,keyboardSelectedRate:i})=>{const a=w.useCallback(f=>{f.stopPropagation(),f.preventDefault(),r(e)},[r,e]),[o,l]=w.useState(!1),c=w.useCallback(()=>
2272{l(!0)},[]),u=w.useCallback(()=>{l(!1)},[]),d=i===e,h=w.useMemo(()=>({...zjt,backgroundColor:o||d?"#eee":"transparent"}),[o,d]);return s.jsxs("div",{onPointerEnter:c,onPointerLeave:u,tabIndex:0,style:h,onClick:a,children:[s.jsx("div",{style:Ujt,children:e===n?s.jsx(Qjt,{}):null}),Hjt(e),"x"]},e)},Wjt=({setIsComponentVisible:e,playbackRates:r,canvasSize:n})=>{const{setPlaybackRate:i,playbackRate:a}=mr.useTimelineContext(),[o,l]=w.useState(a);w.useEffect(()=>{const d=h=>{if(h.preventDefault(),h.key==="ArrowUp"){const f=r.findIndex(p=>p===o);if(f===0)return;l(f===-1?r[0]:r[f-1])}else if(h.key==="ArrowDown"){const f=r.findIndex(p=>p===o);if(f===r.length-1)return;l(f===-1?r[r.length-1]:r[f+1])}else h.key==="Enter"&&(i(o),e(!1))};return window.addEventListener("keydown",d),()=>{window.removeEventListener("keydown",d)}},[r,o,i,e]);const c=w.useCallback(d=>{i(d),e(!1)},[e,i]),u=w.useMemo(()=>({position:"absolute",right:0,width:125,maxHeight:n.height-Mjt-Djt,bottom:35,background:"#fff",borderRadius:4,overflow:"auto",color:"black",textAlign:"left"}),[n.height]);return s.jsx("div",{style:u,children:r.map(d=>s.jsx(Vjt,{selectedRate:a,onSelect:c,rate:d,keyboardSelectedRate:o},d))})},qjt={fontSize:13,fontWeight:"bold",color:"white",border:"2px solid white",borderRadius:20,paddingLeft:8,paddingRight:8,paddingTop:2,paddingBottom:2},pz={appearance:"none",backgroundColor:"transparent",border:"none",cursor:"pointer",paddingLeft:0,paddingRight:0,paddingTop:6,paddingBottom:6,height:37,display:"inline-flex",marginBottom:0,marginTop:0,alignItems:"center"},Kjt={...pz,position:"relative"},Gjt=({playbackRates:e,canvasSize:r})=>{const{ref:n,isComponentVisible:i,setIsComponentVisible:a}=Rjt(!1),{playbackRate:o}=mr.useTimelineContext(),l=w.useCallback(c=>{c.stopPropagation(),c.preventDefault(),a(u=>!u)},[a]);return s.jsx("div",{ref:n,children:s.jsxs("button",{type:"button","aria-label":"Change playback rate",style:Kjt,onClick:l,children:[s.jsxs("div",{style:qjt,children:[o,"x"]}),i&&s.jsx(Wjt,{canvasSize:r,playbackRates:e,setIsComponentVisible:a})]})})},hee=(e,r,n)=>Math.round(ao(e,[0,n],[0,r-1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})),Oy=5,T1=12,Az=4,Xjt={userSelect:"none",WebkitUserSelect:"none",paddingTop:Az,paddingBottom:Az,boxSizing:"border-box",cursor:"pointer",position:"relative",touchAction:"none"},Yjt={height:Oy,backgroundColor:"rgba(255, 255, 255, 0.25)",width:"100%",borderRadius:Oy/2},Jjt=e=>{let r=e;for(;r.parentElement;)r=r.parentElement;return r},Zjt=({durationInFrames:e,onSeekEnd:r,onSeekStart:n,inFrame:i,outFrame:a})=>{const o=w.useRef(null),l=N7(o,!1),c=S7(o,{triggerOnWindowResize:!0,shouldApplyCssTransforms:!0}),{seek:u,play:d,pause:h,playing:f}=h3(),p=mr.Timeline.useTimelinePosition(),[m,A]=w.useState({dragging:!1}),g=(c==null?void 0:c.width)??0,y=w.useCallback(C=>{var E;if(C.button!==0)return;const N=(E=o.current)==null?void 0:E.getBoundingClientRect().left,S=hee(C.clientX-N,e,g);h(),u(S),A({dragging:!0,wasPlaying:f}),n()},[e,g,h,u,f,n]),x=w.useCallback(C=>{var E;if(!c)throw new Error("Player has no size");if(!m.dragging)return;const N=(E=o.current)==null?void 0:E.getBoundingClientRect().left,S=hee(C.clientX-N,e,c.width);u(S)},[m.dragging,e,u,c]),b=w.useCallback(()=>{A({dragging:!1}),m.dragging&&(m.wasPlaying?d():h(),r())},[m,r,h,d]);w.useEffect(()=>{if(!m.dragging)return;const C=Jjt(o.current);return C.addEventListener("pointermove",x),C.addEventListener("pointerup",b),()=>{C.removeEventListener("pointermove",x),C.removeEventListener("pointerup",b)}},[m.dragging,x,b]);const v=w.useMemo(()=>({height:T1,width:T1,borderRadius:T1/2,position:"absolute",top:Az-T1/2+5/2,backgroundColor:"white",left:Math.max(0,p/Math.max(1,e-1)*g-T1/2),boxShadow:"0 0 2px black",opacity:Number(l||m.dragging)}),[l,m.dragging,e,p,g]),j=w.useMemo(()=>({height:Oy,backgroundColor:"rgba(255, 255, 255, 1)",width:(p-(i??0))/(e-1)*g,marginLeft:(i??0)/(e-1)*g,borderRadius:Oy/2}),[e,p,i,g]),_=w.useMemo(()=>({height:Oy,backgroundColor:"rgba(255, 255, 255, 0.25)",width:((a??e-1)-(i??0))/(e-1)*100+"%",marginLeft:(i??0)/(e-1)*100+"%",borderRadius:Oy/2,position:"absolute"}),[e,i,a]);return s.jsxs("div",{ref:o,onPointerDown:y,style:Xjt,children:[s.jsxs("div",{style:Yjt,children:[s.jsx("div",{style:_}),s.jsx("div",{style:j})]}),s.jsx("div",{style:v})]})},fee=e=>{const r=Math.floor(e/60),n=Math.floor(e-r*60);return`${String(r)}
2272:${String(n).padStart(2,"0")}`},e_t=({durationInFrames:e,maxTimeLabelWidth:r,fps:n})=>{const i=mr.Timeline.useTimelinePosition(),a=w.useMemo(()=>({color:"white",fontFamily:"sans-serif",fontSize:14,maxWidth:r===null?void 0:r,overflow:"hidden",textOverflow:"ellipsis"}),[r]),l=i===e-1?i+1:i;return s.jsxs("div",{style:a,children:[fee(l/n)," / ",fee(e/n)]})},t_t=10,gz=12,r_t=({allowFullscreen:e,playerWidth:r})=>w.useMemo(()=>{const i=Is,a=Is,o=e?mz:0,l=a+i+o+gz*2+t_t*2,c=r-l,u=Math.max(c,0),d=u-FA,f=(d<FA?u:d)+l+FA,p=r<f;return{maxTimeLabelWidth:u===0?null:u,displayVerticalVolumeSlider:p}},[e,r]),n_t=[0,.013,.049,.104,.175,.259,.352,.45,.55,.648,.741,.825,.896,.951,.987],i_t=[0,8.1,15.5,22.5,29,35.3,41.2,47.1,52.9,58.8,64.7,71,77.5,84.5,91.9],a_t=1/.7,s_t={boxSizing:"border-box",position:"absolute",bottom:0,width:"100%",paddingTop:40,paddingBottom:10,backgroundImage:`linear-gradient(to bottom,${n_t.map((e,r)=>`hsla(0, 0%, 0%, ${e}) ${i_t[r]*a_t}%`).join(", ")}, hsl(0, 0%, 0%) 100%)`,backgroundSize:"auto 145px",display:"flex",paddingRight:gz,paddingLeft:gz,flexDirection:"column",transition:"opacity 0.3s"},o_t={display:"flex",flexDirection:"row",width:"100%",alignItems:"center",justifyContent:"center",userSelect:"none",WebkitUserSelect:"none"},l_t={display:"flex",flexDirection:"row",userSelect:"none",WebkitUserSelect:"none",alignItems:"center"},P1={width:12},c_t={height:8},u_t={flex:1},d_t={},h_t=({durationInFrames:e,isFullscreen:r,fps:n,showVolumeControls:i,onFullscreenButtonClick:a,allowFullscreen:o,onExitFullscreenButtonClick:l,spaceKeyToPlayOrPause:c,onSeekEnd:u,onSeekStart:d,inFrame:h,outFrame:f,initiallyShowControls:p,canvasSize:m,renderPlayPauseButton:A,renderFullscreenButton:g,alwaysShowControls:y,showPlaybackRateControl:x,containerRef:b,buffering:v,hideControlsWhenPointerDoesntMove:j,onPointerDown:_,onDoubleClick:C,renderMuteButton:N,renderVolumeSlider:S,playing:E,toggle:O,renderCustomControls:B})=>{const T=w.useRef(null),[F,I]=w.useState(!1),D=N7(b,j),{maxTimeLabelWidth:L,displayVerticalVolumeSlider:V}=r_t({allowFullscreen:o,playerWidth:(m==null?void 0:m.width)??0}),[U,Q]=w.useState(()=>{if(typeof p=="boolean")return p;if(typeof p=="number"){if(p%1!==0)throw new Error("initiallyShowControls must be an integer or a boolean");if(Number.isNaN(p))throw new Error("initiallyShowControls must not be NaN");if(!Number.isFinite(p))throw new Error("initiallyShowControls must be finite");if(p<=0)throw new Error("initiallyShowControls must be a positive integer");return p}throw new TypeError("initiallyShowControls must be a number or a boolean")}),$=w.useMemo(()=>({...s_t,opacity:Number(D||!E||U||y)}),[D,U,E,y]);w.useEffect(()=>{T.current&&c&&T.current.focus({preventScroll:!0})},[E,c]),w.useEffect(()=>{I((typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled))??!1)},[]),w.useEffect(()=>{if(U===!1)return;const de=setTimeout(()=>{Q(!1)},U===!0?2e3:U);return()=>{clearInterval(de)}},[U]);const q=w.useMemo(()=>{if(x===!0)return[.5,.8,1,1.2,1.5,1.8,2,2.5,3];if(Array.isArray(x)){for(const X of x){if(typeof X!="number")throw new Error("Every item in showPlaybackRateControl must be a number");if(X<=0)throw new Error("Every item in showPlaybackRateControl must be positive")}return x}return null},[x]),M=B?B():null,z=w.useRef(null),K=w.useRef(null),ne=w.useCallback(X=>{(X.target===z.current||X.target===K.current)&&(_==null||_(X))},[_]),ie=w.useCallback(X=>{(X.target===z.current||X.target===K.current)&&(C==null||C(X))},[C]);return s.jsxs("div",{ref:z,style:$,onPointerDown:ne,onDoubleClick:ie,children:[s.jsxs("div",{ref:K,style:o_t,children:[s.jsxs("div",{style:l_t,children:[s.jsx("button",{ref:T,type:"button",style:pz,onClick:O,"aria-label":E?"Pause video":"Play video",title:E?"Pause video":"Play video",children:A===null?s.jsx(uee,{buffering:v,playing:E}):A({playing:E,isBuffering:v})??s.jsx(uee,{buffering:v,playing:E})}),i?s.jsxs(s.Fragment,{children:[s.jsx("div",{style:P1}),s.jsx(Ljt,{renderMuteButton:N,renderVolumeSlider:S,displayVerticalVolumeSlider:V})]}):null,s.jsx("div",{style:P1}),s.jsx(e_t,{durationInFrames:e,fps:n,maxTimeLabelWidth:L}),s.jsx("div",{style:P1})]}),s.jsx("div",{style:u_t}),M,M&&q&&m?s.jsx("div",{style:P1}):null,q&&m&&s.jsx(Gjt,{canvasSize:m,playbackRates:q}),q&&F&&o?s.jsx("div",{style:P1}
2272):null,s.jsx("div",{style:d_t,children:F&&o?s.jsx("button",{type:"button","aria-label":r?"Exit fullscreen":"Enter Fullscreen",title:r?"Exit fullscreen":"Enter Fullscreen",style:pz,onClick:r?l:a,children:g===null?s.jsx(Ajt,{isFullscreen:r}):g({isFullscreen:r})}):null})]}),s.jsx("div",{style:c_t}),s.jsx(Zjt,{onSeekEnd:u,onSeekStart:d,durationInFrames:e,inFrame:h,outFrame:f})]})},q0e=typeof document>"u",f_t=e=>{let r=!1;return{promise:new Promise((i,a)=>{e.then(o=>{if(r){a({isCanceled:r,value:o});return}i(o)}).catch(o=>{a({isCanceled:r,error:o})})}),cancel:()=>{r=!0}}},m_t=e=>new Promise(r=>setTimeout(r,e)),p_t=()=>{const e=w.useRef([]),r=w.useCallback(o=>{e.current=[...e.current,o]},[]),n=w.useCallback(o=>{e.current=e.current.filter(l=>l!==o)},[]),i=w.useCallback(()=>e.current.map(o=>o.cancel()),[]);return w.useMemo(()=>({appendPendingPromise:r,removePendingPromise:n,clearPendingPromises:i}),[r,i,n])},A_t=(e,r,n)=>{const i=p_t(),a=w.useCallback(async u=>{if(u instanceof PointerEvent?u.pointerType==="touch":u.nativeEvent.pointerType==="touch"){e(u);return}i.clearPendingPromises();const d=f_t(m_t(200));i.appendPendingPromise(d);try{await d.promise,i.removePendingPromise(d),e(u)}catch(h){const f=h;if(i.removePendingPromise(d),!f.isCanceled)throw f.error}},[i,e]),o=w.useCallback(()=>{document.addEventListener("pointerup",u=>{a(u)},{once:!0})},[a]),l=w.useCallback(()=>{i.clearPendingPromises(),r()},[i,r]);return w.useMemo(()=>n?{handlePointerDown:o,handleDoubleClick:l}:{handlePointerDown:e,handleDoubleClick:()=>{}},[n,l,o,e])},xz=ee.version.split(".")[0];if(xz==="0")throw new Error(`Version ${xz} of "react" is not supported by Remotion`);var g_t=parseInt(xz,10)>=18,x_t=({controls:e,style:r,loop:n,autoPlay:i,allowFullscreen:a,inputProps:o,clickToPlay:l,showVolumeControls:c,doubleClickToFullscreen:u,spaceKeyToPlayOrPause:d,errorFallback:h,playbackRate:f,renderLoading:p,renderPoster:m,className:A,moveToBeginningWhenEnded:g,showPosterWhenUnplayed:y,showPosterWhenEnded:x,showPosterWhenPaused:b,showPosterWhenBuffering:v,showPosterWhenBufferingAndPaused:j,inFrame:_,outFrame:C,initiallyShowControls:N,renderFullscreen:S,renderPlayPauseButton:E,renderMuteButton:O,renderVolumeSlider:B,renderCustomControls:T,alwaysShowControls:F,showPlaybackRateControl:I,posterFillMode:D,bufferStateDelayInMilliseconds:L,hideControlsWhenPointerDoesntMove:V,overflowVisible:U,browserMediaControlsBehavior:Q,overrideInternalClassName:$,noSuspense:q},M)=>{const z=mr.useUnsafeVideoConfig(),K=mr.useVideo(),ne=w.useRef(null),ie=S7(ne,{triggerOnWindowResize:!1,shouldApplyCssTransforms:!1}),[X,de]=w.useState(!1),[oe,ce]=w.useState(i),[ye,ge]=w.useState(()=>!1),[Be,Ve]=w.useState(!1),te=w.useMemo(()=>typeof document>"u"?!1:!!(document.fullscreenEnabled||document.webkitFullscreenEnabled),[]),xe=h3(),We=xe.toggle;Ejt({loop:n,playbackRate:f,moveToBeginningWhenEnded:g,inFrame:_,outFrame:C,getCurrentFrame:xe.getCurrentFrame,browserMediaControlsBehavior:Q}),w.useEffect(()=>{X&&!xe.playing&&(de(!1),xe.play())},[X,xe]),w.useEffect(()=>{const{current:Vr}=ne;if(!Vr)return;const Br=()=>{const xi=document.fullscreenElement===Vr||document.webkitFullscreenElement===Vr;ge(xi)};return document.addEventListener("fullscreenchange",Br),document.addEventListener("webkitfullscreenchange",Br),()=>{document.removeEventListener("fullscreenchange",Br),document.removeEventListener("webkitfullscreenchange",Br)}},[]);const ze=w.useCallback(Vr=>{We(Vr)},[We]),we=w.useCallback(()=>{if(!a)throw new Error("allowFullscreen is false");if(!te)throw new Error("Browser doesnt support fullscreen");if(!ne.current)throw new Error("No player ref found");ne.current.webkitRequestFullScreen?ne.current.webkitRequestFullScreen():ne.current.requestFullscreen()},[a,te]),J=w.useCallback(()=>{document.webkitExitFullscreen?document.webkitExitFullscreen():document.exitFullscreen()},[]);w.useEffect(()=>{const{current:Vr}=ne;if(!Vr)return;const Br=()=>{const xi=document.webkitFullscreenElement??document.fullscreenElement;xi&&xi===ne.current?xe.emitter.dispatchFullscreenChange({isFullscreen:!0}):xe.emitter.dispatchFullscreenChange({isFullscreen:!1})};return Vr.addEventListener("webkitfullscreenchange",Br),Vr.addEventListener("fullscreenchange",Br),()=>{Vr.removeEventListener("webkitfullscreenchange",Br),Vr.removeEventListener("fullscreenchange",Br)}},[xe.emitter]);const he=(z==null?void 0:z.durationInFrames)??1,je=w.useMemo(()=>!z||!ie?null:M0e({canvasSize:ie,compositionHeight:z.height,compositionWidth:z.
2272width,previewSize:"auto"}),[ie,z]),ve=(je==null?void 0:je.scale)??1,Pe=w.useRef(!1);w.useEffect(()=>{if(!Pe.current){Pe.current=!0;return}xe.emitter.dispatchScaleChange(ve)},[xe.emitter,ve]);const{setMediaVolume:Ie,setMediaMuted:ue}=w.useContext(mr.SetMediaVolumeContext),{mediaMuted:Se,mediaVolume:He}=w.useContext(mr.MediaVolumeContext);w.useEffect(()=>{xe.emitter.dispatchVolumeChange(He)},[xe.emitter,He]);const Qe=Se||He===0;w.useEffect(()=>{xe.emitter.dispatchMuteChange({isMuted:Qe})},[xe.emitter,Qe]);const[ct,dt]=w.useState(!1);w.useEffect(()=>{let Vr=null,Br=!1;const xi=()=>{Br=!1,requestAnimationFrame(()=>{L===0?dt(!0):Vr=setTimeout(()=>{Br||dt(!0)},L)})},La=()=>{requestAnimationFrame(()=>{Br=!0,dt(!1),Vr&&clearTimeout(Vr)})};return xe.emitter.addEventListener("waiting",xi),xe.emitter.addEventListener("resume",La),()=>{xe.emitter.removeEventListener("waiting",xi),xe.emitter.removeEventListener("resume",La),dt(!1),Vr&&clearTimeout(Vr),Br=!0}},[L,xe.emitter]),w.useImperativeHandle(M,()=>{const Vr={play:xe.play,pause:()=>{de(!1),xe.pause()},toggle:ze,getContainerNode:()=>ne.current,getCurrentFrame:xe.getCurrentFrame,isPlaying:xe.isPlaying,seekTo:Br=>{const xi=he-1,La=Math.max(0,Math.min(xi,Br));xe.isPlaying()&&(de(La!==xi||n),xe.pause()),La===xi&&!n&&xe.emitter.dispatchEnded(),xe.seek(La)},isFullscreen:()=>{const{current:Br}=ne;return Br?document.fullscreenElement===Br||document.webkitFullscreenElement===Br:!1},requestFullscreen:we,exitFullscreen:J,getVolume:()=>Se?0:He,setVolume:Br=>{if(typeof Br!="number")throw new TypeError(`setVolume() takes a number, got value of type ${typeof Br}`);if(isNaN(Br))throw new TypeError("setVolume() got a number that is NaN. Volume must be between 0 and 1.");if(Br<0||Br>1)throw new TypeError(`setVolume() got a number that is out of range. Must be between 0 and 1, got ${Br}`);Ie(Br)},isMuted:()=>Qe,mute:()=>{ue(!0)},unmute:()=>{ue(!1)},getScale:()=>ve,pauseAndReturnToPlayStart:()=>{xe.pauseAndReturnToPlayStart()}};return Object.assign(xe.emitter,Vr)},[he,J,n,Se,Qe,He,xe,we,ue,Ie,ze,ve]);const Fr=K?K.component:null,Xt=w.useMemo(()=>z0e({canvasSize:ie,config:z,style:r,overflowVisible:U,layout:je}),[ie,z,je,U,r]),Vt=w.useMemo(()=>$0e({config:z,layout:je,scale:ve,overflowVisible:U}),[z,je,U,ve]),lr=w.useMemo(()=>U0e({config:z,layout:je,scale:ve,overflowVisible:U}),[z,je,U,ve]),cr=xe.pause,Bt=xe.emitter.dispatchError,kr=w.useCallback(Vr=>{cr(),Bt(Vr)},[Bt,cr]),ar=w.useCallback(Vr=>{Vr.stopPropagation(),we()},[we]),ur=w.useCallback(Vr=>{Vr.stopPropagation(),J()},[J]),kn=w.useCallback(Vr=>{(Vr instanceof MouseEvent?Vr.button===2:Vr.nativeEvent.button)||ze(Vr)},[ze]),Sr=w.useCallback(()=>{Ve(!0)},[]),zt=w.useCallback(()=>{Ve(!1)},[]),an=w.useCallback(()=>{ye?J():we()},[J,ye,we]),{handlePointerDown:nr,handleDoubleClick:pr}=A_t(kn,an,u&&a&&te);w.useEffect(()=>{oe&&(xe.play(),ce(!1))},[oe,xe]);const Gr=w.useMemo(()=>p?p({height:Xt.height,width:Xt.width,isBuffering:ct}):null,[Xt.height,Xt.width,p,ct]),ii=w.useMemo(()=>({type:"scale",scale:ve}),[ve]);if(!z)return null;const pt=m?m({height:D==="player-size"?Xt.height:z.height,width:D==="player-size"?Xt.width:z.width,isBuffering:ct}):null;if(pt===void 0)throw new TypeError("renderPoster() must return a React element, but undefined was returned");const Di=pt&&[b&&!xe.isPlaying()&&!Be,x&&xe.isLastFrame&&!xe.isPlaying(),y&&!xe.hasPlayed&&!xe.isPlaying(),v&&ct&&xe.isPlaying(),j&&ct&&!xe.isPlaying()].some(Boolean),{left:ln,top:Yn,width:Ai,height:gi,...Xi}=Vt,Yi=s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:Vt,onPointerDown:l?nr:void 0,onDoubleClick:u?pr:void 0,children:[s.jsxs("div",{style:lr,className:k7($),children:[Fr?s.jsx(W0e,{onError:kr,errorFallback:h,children:s.jsx(mr.CurrentScaleContext.Provider,{value:ii,children:s.jsx(Fr,{...(K==null?void 0:K.props)??{},...o??{}})})}):null,Di&&D==="composition-size"?s.jsx("div",{style:{...Xi,width:z.width,height:z.height},onPointerDown:l?nr:void 0,onDoubleClick:u?pr:void 0,children:pt}):null]}),s.jsx(Ijt,{})]}),Di&&D==="player-size"?s.jsx("div",{style:Vt,onPointerDown:l?nr:void 0,onDoubleClick:u?pr:void 0,children:pt}):null,e?s.jsx(h_t,{fps:z.fps,playing:xe.playing,toggle:xe.toggle,durationInFrames:z.durationInFrames,containerRef:ne,onFullscreenButtonClick:ar,isFullscreen:ye,allowFullscreen:a,showVolumeControls:c,onExitFullscreenButtonClick:ur,spaceKeyToPlayOrPause:d,onSeekEnd:zt,onSeekStart:Sr,inFrame:_,outFrame:C,initiallyShowControls:N,canvasSize:ie,renderFullscreenButton:S,renderPlayPauseButton:E,alwaysShowControls:F,showPlaybackRateControl:I,buffering:ct,hideControlsWhenPointerDoesntMove:V,onDoubleClick:u?pr:void 0,onPointerDown:l?nr:void 0,renderMuteButton:O,renderVolumeSlider:B,renderCustomControls:T}):null]});return q||q0e&&!g_t?s.jsx("div",{ref:ne,style:Xt,className:A,children:Yi}):s.jsx("div",{ref:ne,style:Xt,className:A,children:s.jsx(w.Suspense,{fallback:Gr,children:Yi})})},y_t=w.forwardRef(x_t),K0e="remotion.volumePreference",v_t=(e,r,n)=>{if(!(typeof window>"u"))try{window.localStorage.setItem(n??K0e,String(e))}catch(i){mr.Log.error({logLevel:r,tag:null},"Could not persist volume",i)}},b_t=e=>{if(typeof window>"u")return 1;try{const r=window.localStorage.getItem(e??K0e);return r?Number(r):1}catch{return 1}},E7="player-comp",G0e=({children:e,timelineContext:r,fps:n,compositionHeight:i,compositionWidth:a,durationInFrames:o,component:l,numberOfSharedAudioTags:c,initiallyMuted:u,logLevel:d,audioLatencyHint:h,volumePersistenceKey:f,inputProps:p,audioEnabled:m})=>{const A=w.useMemo(()=>({compositions:[{component:l,durationInFrames:o,height:i,width:a,fps:n,id:E7,nonce:[[0,777]],folderName:null,parentFolder
2272Name:null,schema:null,calculateMetadata:null,stack:null}],folders:[],currentCompositionMetadata:{defaultCodec:null,defaultOutName:null,defaultPixelFormat:null,defaultProResProfile:null,defaultSampleRate:null,defaultVideoImageFormat:null,durationInFrames:o,fps:n,height:i,width:a,props:p},canvasContent:{type:"composition",compositionId:"player-comp"}}),[l,o,i,a,n,p]),[g,y]=w.useState(()=>u),[x,b]=w.useState(()=>b_t(f??null)),v=w.useMemo(()=>({mediaMuted:g,mediaVolume:x}),[g,x]),j=w.useCallback(S=>{b(S),v_t(S,d,f??null)},[d,f]),_=w.useMemo(()=>({setMediaMuted:y,setMediaVolume:j}),[j]),C=w.useMemo(()=>({logLevel:d,mountTime:Date.now()}),[d]),N=w.useMemo(()=>({isPlayer:!0,isRendering:!1,isStudio:!1,isClientSideRendering:!1,isReadOnlyStudio:!1}),[]);return s.jsx(mr.RemotionEnvironmentContext.Provider,{value:N,children:s.jsx(mr.LogLevelContext.Provider,{value:C,children:s.jsx(mr.CanUseRemotionHooksProvider,{children:s.jsx(mr.AbsoluteTimeContext.Provider,{value:r,children:s.jsx(mr.TimelineContext.Provider,{value:r,children:s.jsx(mr.CompositionManager.Provider,{value:A,children:s.jsx(mr.PrefetchProvider,{children:s.jsx(mr.DurationsContextProvider,{children:s.jsx(mr.MediaVolumeContext.Provider,{value:v,children:s.jsx(mr.SetMediaVolumeContext.Provider,{value:_,children:s.jsx(mr.SharedAudioContextProvider,{numberOfAudioTags:c,audioLatencyHint:h,audioEnabled:m,children:s.jsx(mr.BufferingProvider,{children:e})})})})})})})})})})})})},mee=!1,w_t=(e,r)=>{e||mee||(mee=!0,mr.Log.warn({logLevel:r,tag:null},"Note: Some companies are required to obtain a license to use Remotion. See: https://remotion.dev/license\nPass the `acknowledgeRemotionLicense` prop to `<Player />` function to make this message disappear."))},pee=(e,r)=>{if(typeof e>"u"||e===null)return e??null;if(typeof e!="number")throw new TypeError(`"${r}" must be a number, but is ${JSON.stringify(e)}`);if(Number.isNaN(e))throw new TypeError(`"${r}" must not be NaN, but is ${JSON.stringify(e)}`);if(!Number.isFinite(e))throw new TypeError(`"${r}" must be finite, but is ${JSON.stringify(e)}`);if(e%1!==0)throw new TypeError(`"${r}" must be an integer, but is ${JSON.stringify(e)}`);return e},j_t=({inFrame:e,durationInFrames:r,outFrame:n})=>{const i=pee(e,"inFrame"),a=pee(n,"outFrame");if(!(i===null&&a===null)){if(i!==null&&i>r-1)throw new Error("inFrame must be less than (durationInFrames - 1), but is "+i);if(a!==null&&a>r-1)throw new Error("outFrame must be less than (durationInFrames - 1), but is "+a);if(i!==null&&i<0)throw new Error("inFrame must be greater than 0, but is "+i);if(a!==null&&a<=0)throw new Error(`outFrame must be greater than 0, but is ${a}. If you want to render a single frame, use <Thumbnail /> instead.`);if(a!==null&&i!==null&&a<=i)throw new Error("outFrame must be greater than inFrame, but is "+a+" <= "+i)}},__t=({initialFrame:e,durationInFrames:r})=>{if(typeof r!="number")throw new Error(`\`durationInFrames\` must be a number, but is ${JSON.stringify(r)}`);if(!(typeof e>"u")){if(typeof e!="number")throw new Error(`\`initialFrame\` must be a number, but is ${JSON.stringify(e)}`);if(Number.isNaN(e))throw new Error("`initialFrame` must be a number, but is NaN");if(!Number.isFinite(e))throw new Error("`initialFrame` must be a number, but is Infinity");if(e%1!==0)throw new Error(`\`initialFrame\` must be an integer, but is ${JSON.stringify(e)}`);if(e>r-1)throw new Error(`\`initialFrame\` must be less or equal than \`durationInFrames - 1\`, but is ${JSON.stringify(e)}`)}},C_t=e=>{if(e!==void 0){if(e>4)throw new Error(`The highest possible playback rate is 4. You passed: ${e}`);if(e<-4)throw new Error(`The lowest possible playback rate is -4. You passed: ${e}`);if(e===0)throw new Error("A playback rate of 0 is not supported.")}},N_t=d3.validateFps,Aee=d3.validateDimension,S_t=d3.validateDurationInFrames,k_t=d3.validateDefaultAndInputProps,E_t=e=>"component"in e?e.component:null,B_t=({durationInFrames:e,compositionHeight:r,compositionWidth:n,fps:i,inputProps:a,style:o,controls:l=!1,loop:c=!1,autoPlay:u=!1,showVolumeControls:d=!0,allowFullscreen:h=!0,clickToPlay:f,doubleClickToFullscreen:p=!1,spaceKeyToPlayOrPause:m=!0,moveToBeginningWhenEnded:A=!0,numberOfSharedAudioTags:g=5,errorFallback:y=()=>"⚠️",playbackRate:x=1,renderLoading:b,className:v,showPosterWhenUnplayed:j,showPosterWhenEnded:_,showPosterWhenPaused:C,showPosterWhenBuffering:N,showPosterWhenBufferingAndPaused:S,initialFrame:E,renderPoster:O,inFrame:B,outFrame:T,initiallyShowControls:F,renderFullscreenButton:I,renderPlayPauseButton:D,renderVolumeSlider:L,renderCustomControls:V,alwaysShowControls:U=!1,initiallyMuted:Q=!1,showPlaybackRateControl:$=!1,posterFillMode:q="player-size",bufferStateDelayInMilliseconds:M,hideControlsWhenPointerDoesntMove:z=!0,overflowVisible:K=!1,renderMuteButton:ne,browserMediaControl
2272sBehavior:ie,overrideInternalClassName:X,logLevel:de="info",noSuspense:oe,acknowledgeRemotionLicense:ce,audioLatencyHint:ye="interactive",volumePersistenceKey:ge,...Be},Ve)=>{if(typeof window<"u"&&(window.remotion_isPlayer=!0),Be.defaultProps!==void 0)throw new Error("The <Player /> component does not accept `defaultProps`, but some were passed. Use `inputProps` instead.");const te=E_t(Be);if((te==null?void 0:te.type)===oz)throw new TypeError("'component' should not be an instance of <Composition/>. Pass the React component directly, and set the duration, fps and dimensions as separate props. See https://www.remotion.dev/docs/player/examples for an example.");if(te===oz)throw new TypeError("'component' must not be the 'Composition' component. Pass your own React component directly, and set the duration, fps and dimensions as separate props. See https://www.remotion.dev/docs/player/examples for an example.");w.useState(()=>w_t(!!ce,de));const xe=mr.useLazyComponent({compProps:Be,componentName:"Player",noSuspense:!!oe});__t({initialFrame:E,durationInFrames:e});const[We,ze]=w.useState(()=>({[E7]:E??0})),[we,J]=w.useState(!1),[he]=w.useState("player-comp"),je=w.useRef(null),ve=w.useRef([]),Pe=w.useRef(!1),[Ie,ue]=w.useState(x);if(typeof r!="number")throw new TypeError(`'compositionHeight' must be a number but got '${typeof r}' instead`);if(typeof n!="number")throw new TypeError(`'compositionWidth' must be a number but got '${typeof n}' instead`);if(Aee(r,"compositionHeight","of the <Player /> component"),Aee(n,"compositionWidth","of the <Player /> component"),S_t(e,{component:"of the <Player/> component",allowFloats:!1}),N_t(i,"as a prop of the <Player/> component",!1),k_t(a,"inputProps",null),j_t({durationInFrames:e,inFrame:B,outFrame:T}),typeof l!="boolean"&&typeof l<"u")throw new TypeError(`'controls' must be a boolean or undefined but got '${typeof l}' instead`);if(typeof u!="boolean"&&typeof u<"u")throw new TypeError(`'autoPlay' must be a boolean or undefined but got '${typeof u}' instead`);if(typeof c!="boolean"&&typeof c<"u")throw new TypeError(`'loop' must be a boolean or undefined but got '${typeof c}' instead`);if(typeof p!="boolean"&&typeof p<"u")throw new TypeError(`'doubleClickToFullscreen' must be a boolean or undefined but got '${typeof p}' instead`);if(typeof d!="boolean"&&typeof d<"u")throw new TypeError(`'showVolumeControls' must be a boolean or undefined but got '${typeof d}' instead`);if(typeof h!="boolean"&&typeof h<"u")throw new TypeError(`'allowFullscreen' must be a boolean or undefined but got '${typeof h}' instead`);if(typeof f!="boolean"&&typeof f<"u")throw new TypeError(`'clickToPlay' must be a boolean or undefined but got '${typeof f}' instead`);if(typeof m!="boolean"&&typeof m<"u")throw new TypeError(`'spaceKeyToPlayOrPause' must be a boolean or undefined but got '${typeof m}' instead`);if(typeof g!="number"||g%1!==0||!Number.isFinite(g)||Number.isNaN(g)||g<0)throw new TypeError(`'numberOfSharedAudioTags' must be an integer but got '${g}' instead`);C_t(Ie),w.useEffect(()=>{ue(x)},[x]),w.useImperativeHandle(Ve,()=>je.current,[]),w.useState(()=>{mr.playbackLogging({logLevel:de,message:`[player] Mounting <Player>. User agent = ${typeof navigator>"u"?"server":navigator.userAgent}`,tag:"player",mountTime:Date.now()})});const Se=w.useMemo(()=>({frame:We,playing:we,rootId:he,playbackRate:Ie,imperativePlaying:Pe,setPlaybackRate:dt=>{ue(dt)},audioAndVideoTags:ve}),[We,Ie,we,he]),He=w.useMemo(()=>({setFrame:ze,setPlaying:J}),[ze]);typeof window<"u"&&w.useLayoutEffect(()=>{mr.CSSUtils.injectCSS(mr.CSSUtils.makeDefaultPreviewCSS(`.${k7(X)}`,"#fff"))},[X]);const Qe=w.useMemo(()=>a??{},[a]),ct=w.useMemo(()=>ie??{mode:"prevent-media-session"},[ie]);return s.jsx(mr.IsPlayerContextProvider,{children:s.jsx(G0e,{timelineContext:Se,component:xe,compositionHeight:r,compositionWidth:n,durationInFrames:e,fps:i,numberOfSharedAudioTags:g,initiallyMuted:Q,logLevel:de,audioLatencyHint:ye,volumePersistenceKey:ge,inputProps:Qe,audioEnabled:!0,children:s.jsx(mr.SetTimelineContext.Provider,{value:He,children:s.jsx(Cjt,{currentPlaybackRate:Ie,children:s.jsx(y_t,{ref:je,posterFillMode:q,renderLoading:b,autoPlay:!!u,loop:!!c,controls:!!l,errorFallback:y,style:o,inputProps:Qe,allowFullscreen:!!h,moveToBeginningWhenEnded:!!A,clickToPlay:typeof f=="boolean"?f:!!l,showVolumeControls:!!d,doubleClickToFullscreen:!!p,spaceKeyToPlayOrPause:!!m,playbackRate:Ie,className:v??void 0,showPosterWhenUnplayed:!!j,showPosterWhenEnded:!!_,showPosterWhenPaused:!!C,showPosterWhenBuffering:!!N,showPosterWhenBufferingAndPaused:!!S,renderPoster:O,inFrame:B??null,outFrame:T??null,initiallyShowControls:F??!0,renderFullscreen:I??null,renderPlayPauseButton:D??null,renderMuteButton:ne??null,renderVolumeSlider:L??null,renderCustomControls:V??null,alwaysShowControls:U,showPlaybackRateControl:$,bufferStateDelayInMilliseconds:M??300,hideControlsWhenPointerDoesntMove:z,overflowVisible:K,browserMediaControl
2272sBehavior:ct,overrideInternalClassName:X??void 0,noSuspense:!!oe})})})})})},T_t=w.forwardRef,P_t=T_t(B_t),I_t=()=>{const e=w.useContext(H0e);if(!e)throw new TypeError("Expected Player event emitter context");return w.useMemo(()=>({emitter:e}),[e])},yz=ee.version.split(".")[0];if(yz==="0")throw new Error(`Version ${yz} of "react" is not supported by Remotion`);var F_t=parseInt(yz,10)>=18,O_t=({style:e,inputProps:r,errorFallback:n,renderLoading:i,className:a,overflowVisible:o,noSuspense:l,overrideInternalClassName:c},u)=>{const d=mr.useUnsafeVideoConfig(),h=mr.useVideo(),f=w.useRef(null),p=S7(f,{triggerOnWindowResize:!1,shouldApplyCssTransforms:!1}),m=w.useMemo(()=>!d||!p?null:M0e({canvasSize:p,compositionHeight:d.height,compositionWidth:d.width,previewSize:"auto"}),[p,d]),A=(m==null?void 0:m.scale)??1,g=I_t();V0e(g.emitter),w.useImperativeHandle(u,()=>{const S={getContainerNode:()=>f.current,getScale:()=>A};return Object.assign(g.emitter,S)},[A,g.emitter]);const y=h?h.component:null,x=w.useMemo(()=>z0e({config:d,style:e,canvasSize:p,overflowVisible:o,layout:m}),[p,d,m,o,e]),b=w.useMemo(()=>$0e({config:d,layout:m,scale:A,overflowVisible:o}),[d,m,o,A]),v=w.useMemo(()=>U0e({config:d,layout:m,scale:A,overflowVisible:o}),[d,m,o,A]),j=w.useCallback(S=>{g.emitter.dispatchError(S)},[g.emitter]),_=w.useMemo(()=>i?i({height:x.height,width:x.width,isBuffering:!1}):null,[x.height,x.width,i]),C=w.useMemo(()=>({type:"scale",scale:A}),[A]);if(!d)return null;const N=s.jsx("div",{style:b,children:s.jsx("div",{style:v,className:k7(c),children:y?s.jsx(W0e,{onError:j,errorFallback:n,children:s.jsx(mr.CurrentScaleContext.Provider,{value:C,children:s.jsx(y,{...(h==null?void 0:h.props)??{},...r??{}})})}):null})});return l||q0e&&!F_t?s.jsx("div",{ref:f,style:x,className:a,children:N}):s.jsx("div",{ref:f,style:x,className:a,children:s.jsx(w.Suspense,{fallback:_,children:N})})},L_t=w.forwardRef(O_t),R_t=({frameToDisplay:e,style:r,inputProps:n,compositionHeight:i,compositionWidth:a,durationInFrames:o,fps:l,className:c,errorFallback:u=()=>"⚠️",renderLoading:d,overflowVisible:h=!1,overrideInternalClassName:f,logLevel:p="info",noSuspense:m,...A},g)=>{typeof window<"u"&&w.useLayoutEffect(()=>{window.remotion_isPlayer=!0},[]);const[y]=w.useState(()=>String(Yg(null))),x=w.useRef(null),b=w.useMemo(()=>({playing:!1,frame:{[E7]:e},rootId:y,imperativePlaying:{current:!1},playbackRate:1,setPlaybackRate:()=>{throw new Error("thumbnail")},audioAndVideoTags:{current:[]}}),[e,y]);w.useImperativeHandle(g,()=>x.current,[]);const v=mr.useLazyComponent({compProps:A,componentName:"Thumbnail",noSuspense:!!m}),[j]=w.useState(()=>new _jt),_=w.useMemo(()=>n??{},[n]);return s.jsx(mr.IsPlayerContextProvider,{children:s.jsx(G0e,{timelineContext:b,component:v,compositionHeight:i,compositionWidth:a,durationInFrames:o,fps:l,numberOfSharedAudioTags:0,initiallyMuted:!0,logLevel:p,audioLatencyHint:"playback",inputProps:_,audioEnabled:!1,children:s.jsx(H0e.Provider,{value:j,children:s.jsx(L_t,{ref:x,className:c,errorFallback:u,inputProps:_,renderLoading:d,style:r,overflowVisible:h,overrideInternalClassName:f,noSuspense:!!m})})})})},D_t=w.forwardRef;D_t(R_t);const X0e="/assets/anna-portrait-BHCopTzp.png",Y0e="/assets/robert-portrait-DflMm_GF.png",M_t="/assets/anna-talking-9v71ztJu.mp4",z_t="/assets/robert-talking-D_Ch_hGb.mp4",B7="/assets/studio-bg-CPt33ggq.png",T7=({frame:e,items:r=["EduWeb News","AI & Tehnologie","Crypto & Web3","Analiză zilnică","Podcast EduWeb"]}
2272)=>{const n=r.join("   •   "),a=-(e*1.5)%(n.length*8+400);return s.jsxs("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:32,background:"linear-gradient(90deg, #1e1b4b, #312e81, #1e1b4b)",overflow:"hidden",display:"flex",alignItems:"center",borderTop:"2px solid #6366f1",zIndex:50},children:[s.jsx("div",{style:{position:"absolute",left:0,top:0,bottom:0,width:90,background:"#6366f1",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2,boxShadow:"4px 0 12px rgba(0,0,0,0.5)"},children:s.jsx("span",{style:{color:"#fff",fontSize:11,fontWeight:800,fontFamily:"Inter, system-ui, sans-serif",letterSpacing:1.5},children:"EDUWEB"})}),s.jsxs("div",{style:{whiteSpace:"nowrap",transform:`translateX(${a}px)`,marginLeft:100,color:"#c7d2fe",fontSize:12,fontWeight:600,fontFamily:"Inter, system-ui, sans-serif",letterSpacing:.5},children:[n,"   •   ",n]})]})},U_t=({name:e,role:r,accentColor:n,frame:i,fps:a})=>{const o=ao(i,[0,18],[-300,0],{extrapolateRight:"clamp"}),l=ao(i,[0,12],[0,1],{extrapolateRight:"clamp"}),c=ao(i,[10,30],[0,100],{extrapolateRight:"clamp"});return s.jsxs("div",{style:{position:"absolute",bottom:42,left:0,transform:`translateX(${o}px)`,opacity:l,zIndex:30},children:[s.jsxs("div",{style:{display:"flex",alignItems:"stretch"},children:[s.jsx("div",{style:{width:5,background:n,boxShadow:`0 0 12px ${n}`}}),s.jsxs("div",{style:{background:"rgba(15,15,30,0.92)",backdropFilter:"blur(16px)",padding:"10px 24px 10px 16px"},children:[s.jsx("div",{style:{color:"#fff",fontSize:20,fontWeight:800,fontFamily:"Inter, system-ui, sans-serif"},children:e}),s.jsx("div",{style:{color:n,fontSize:11,fontWeight:700,fontFamily:"Inter, system-ui, sans-serif",letterSpacing:2,textTransform:"uppercase",marginTop:2},children:r})]}),s.jsx("div",{style:{background:n,padding:"0 14px",display:"flex",alignItems:"center"},children:s.jsx("span",{style:{color:"#fff",fontSize:11,fontWeight:800,fontFamily:"Inter, system-ui, sans-serif",letterSpacing:1},children:"EduWeb"})})]}),s.jsx("div",{style:{height:2,background:`linear-gradient(90deg, ${n}, transparent)`,width:`${c}%`}})]})},J0e=({frame:e,headline:r})=>{const n=ao(e,[0,15],[0,1],{extrapolateRight:"clamp"});return s.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:40,opacity:n},children:[s.jsxs("div",{style:{height:50,padding:"0 16px",background:"linear-gradient(180deg, rgba(15,15,30,0.95) 0%, rgba(15,15,30,0.6) 70%, transparent 100%)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[s.jsx("div",{style:{fontSize:16,fontWeight:900,background:"linear-gradient(135deg, #6366f1, #a78bfa)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",fontFamily:"Inter, system-ui, sans-serif"},children:"EduWeb NEWS"}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[s.jsx("div",{style:{width:7,height:7,borderRadius:"50%",background:"#ef4444",boxShadow:"0 0 8px #ef4444"}}),s.jsx("span",{style:{color:"#ef4444",fontSize:10,fontWeight:800,fontFamily:"Inter, system-ui, sans-serif",letterSpacing:2},children:"LIVE"})]})]}),r&&s.jsxs("div",{style:{margin:"0 12px",padding:"8px 14px",background:"rgba(239,68,68,0.15)",border:"1px solid rgba(239,68,68,0.3)",borderRadius:6,display:"flex",alignItems:"center",gap:8},children:[s.jsx("span",{style:{background:"#ef4444",color:"#fff",padding:"2px 8px",borderRadius:3,fontSize:9,fontWeight:800,fontFamily:"Inter, system-ui, sans-serif",letterSpacing:1.5,flexShrink:0},children:"BREAKING"}),s.jsx("span",{style:{color:"#fca5a5",fontSize:11,fontWeight:600,fontFamily:"Inter, system-ui, sans-serif",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:r})]})]})},$_t=({headline:e})=>{const r=Hc(),{fps:n}=ec(),i=D0e({frame:Math.max(0,r-10),fps:n,config:{damping:12}}),a=ao(r,[0,60],[1.05,1],{extrapolateRight:"clamp"});return s.jsxs(yb,{children:[s.jsx(zh,{src:B7,style:{width:"100%",height:"100%",objectFit:"cover",transform:`scale(${a})`,filter:"brightness(0.7)"}}),s.jsx(J0e,{frame:r}),s.jsxs("div",{style:{position:"absolute",top:"22%",left:0,right:0,display:"flex",flexDirection:"column",alignItems:"center",padding:"0 20px"},children:[s.jsxs("div",{style:{display:"flex",gap:20,marginBottom:24,opacity:ao(r,[5,20],[0,1],{extrapolateRight:"clamp"}),transform:`translateY(${ao(r,[5,20],[20,0],{extrapolateRight:"clamp"})}px)`},children:[s.jsxs("div",{style:{textAlign:"center"},children:[s.jsx("div",{style:{width:100,height:100,borderRadius:"50%",overflow:"hidden",border:"3px solid #6366f1",boxShadow:"0 0 20px rgba(99,102,241,0.5)"},children:s.jsx(zh,{src:X0e,style:{width:"100%",height:"100%",objectFit:"cover"}})}),s.jsx("div",{style:{color:"#fff",fontSize:12,fontWeight:700,marginTop:6,fontFamily:"Inter, system-ui, sans-serif"},children:"Anna"})]}),s.jsxs("div",{style:{textAlign:"center"},children:[s.jsx("div",{style:{width:100,height:100,borderRadius:"50%",overflow:"hidden",border:"3px solid #10b981",boxShadow:"0 0 20px rgba(16,185,129,0.5)"},children:s.jsx(zh,{src:Y0e,style:{width:"100%",height:"100%",objectFit:"cover"}})}),s.jsx("div",{style:{color:"#fff",fontSize:12,fontWeight:700,marginTop:6,fontFamily:"Inter, system-ui, sans-serif"},children:"Robert"})]})]}),s.jsx("div",{style:{transform:`scale(${i})`,background:"rgba(15,15,30,0.85)",backdropFilter:"blur(16px)",borderRadius:12,padding:"20px 24px",border:"1px solid rgba(99,102,241,0.2)",maxWidth:"95%"},children:s.jsx("div",{style:{fontSize:32,fontWeight:900,color:"#fff",textAlign:"center",lineHeight:1.3,fontFamily:"Inter, system-ui, sans-serif"},children:e})}),s.jsx("div",{style:{marginTop:16,opacity:ao(r,[25,40],[0,.7],{extrapolateRight:"clamp"}),color:"#94a3b8",fontSize:14,fontFamily:"Inter, system-ui, sans-serif",textAlign:"center"},children:"Anna & Robert • Podcast zilnic"})]}),s.jsx(T7,{frame:r})]})},Q_t=({speaker:e,text:r,audioUrl:n})=>{const i=Hc(),{fps:a}=ec(),o=e==="anna",l=o?"Anna":"Robert",c=o?"Moderatoare":"Expert Analist",u=o?"#6366f1":"#10b981",d=o?M_t:z_t,h=r.split(" "),f=a*5,p=h.length/f,m=ao(i,[10,25],[0,1],{extrapolateRight:"clamp"}),A=ao(i,[10,25],[30,0],{extrapolateRight:"clamp"});return s.jsxs(yb,{children:[n&&s.jsx(Hwt,{src:n}),s.jsx(zh,{src:B7,style:{width:"100%",height:"100%",objectFit:"cover",filter:"brightness(0.5) blur(3px)"}}),s.jsx("div",{style:{position:"absolute",top:50,left:"50%",transform:"translateX(-50%)",width:280,height:280,borderRadius:20,overflow:"hidden",border:`3px solid ${u}`,boxShadow:`0 0 40px ${u}50, 0 20px 60px rgba(0,0,0,0.5)`},children:s.jsx(M2t,{src:d,style:{width:"100%",height:"100%",objectFit:"cover"},muted:!0}
2272)}),s.jsx("div",{style:{position:"absolute",top:345,left:"50%",transform:"translateX(-50%)",display:"flex",gap:3,alignItems:"center"},children:[...Array(15)].map((g,y)=>{const x=3+Math.abs(Math.sin((i+y*4)*.45))*16;return s.jsx("div",{style:{width:3,borderRadius:2,background:u,height:x,opacity:.6}},y)})}),s.jsx(J0e,{frame:i}),s.jsx("div",{style:{position:"absolute",bottom:80,left:14,right:14,opacity:m,transform:`translateY(${A}px)`},children:s.jsx("div",{style:{background:"rgba(10,10,25,0.88)",backdropFilter:"blur(20px)",borderRadius:10,padding:"14px 18px",border:`1px solid ${u}25`},children:s.jsx("div",{style:{fontSize:22,fontWeight:700,color:"#fff",lineHeight:1.55,fontFamily:"Inter, system-ui, sans-serif"},children:h.map((g,y)=>{const x=y<Math.floor(i*p),b=y===Math.floor(i*p);return s.jsxs("span",{style:{opacity:x?1:.1,color:b?u:x?"#fff":"#222",fontWeight:b?900:700},children:[g," "]},y)})})})}),s.jsx(U_t,{name:l,role:c,accentColor:u,frame:i,fps:a}),s.jsx(T7,{frame:i})]})},H_t=({text:e})=>{const r=Hc(),{fps:n}=ec(),i=D0e({frame:r,fps:n,config:{damping:12}}),a=ao(r,[20,35],[0,1],{extrapolateRight:"clamp"}),o=ao(r,[5,20],[0,1],{extrapolateRight:"clamp"}),l=ao(r,[35,50],[0,1],{extrapolateRight:"clamp"});return s.jsxs(yb,{children:[s.jsx(zh,{src:B7,style:{width:"100%",height:"100%",objectFit:"cover",filter:"brightness(0.3) blur(8px)"}}),s.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:40},children:[s.jsxs("div",{style:{display:"flex",gap:16,marginBottom:24,opacity:o},children:[s.jsx("div",{style:{width:80,height:80,borderRadius:"50%",overflow:"hidden",border:"2px solid #6366f1",boxShadow:"0 0 20px rgba(99,102,241,0.4)"},children:s.jsx(zh,{src:X0e,style:{width:"100%",height:"100%",objectFit:"cover"}})}),s.jsx("div",{style:{width:80,height:80,borderRadius:"50%",overflow:"hidden",border:"2px solid #10b981",boxShadow:"0 0 20px rgba(16,185,129,0.4)"},children:s.jsx(zh,{src:Y0e,style:{width:"100%",height:"100%",objectFit:"cover"}})})]}),s.jsx("div",{style:{transform:`scale(${i})`,fontSize:48,fontWeight:900,background:"linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",fontFamily:"Inter, system-ui, sans-serif",marginBottom:6},children:"EduWeb"}),s.jsx("div",{style:{color:"#64748b",fontSize:13,fontWeight:600,fontFamily:"Inter, system-ui, sans-serif",letterSpacing:2,textTransform:"uppercase",marginBottom:20,opacity:a},children:"Tech • AI • Crypto • Web3"}),s.jsx("div",{style:{opacity:a,fontSize:17,color:"#cbd5e1",textAlign:"center",maxWidth:"90%",lineHeight:1.6,fontFamily:"Inter, system-ui, sans-serif"},children:e}),s.jsx("div",{style:{marginTop:24,opacity:l,background:"linear-gradient(135deg, #6366f1, #8b5cf6)",padding:"12px 30px",borderRadius:24,fontSize:15,fontWeight:800,color:"#fff",fontFamily:"Inter, system-ui, sans-serif",boxShadow:"0 8px 30px rgba(99,102,241,0.35)"},children:"Urmărește EduWeb →"})]}),s.jsx(T7,{frame:r})]})},V_t=({headline:e,segments:r,outroText:n="Mai multe analize despre AI și tehnologie pe EduWeb"})=>s.jsxs(yb,{children:[s.jsx(Oc,{from:0,durationInFrames:75,children:s.jsx($_t,{headline:e})}),r.map((o,l)=>
2272{const c=75+r.slice(0,l).reduce((u,d)=>u+d.durationInFrames,0);return s.jsx(Oc,{from:c,durationInFrames:o.durationInFrames,children:s.jsx(Q_t,{speaker:o.speaker,text:o.text,audioUrl:o.audioUrl})},l)}),s.jsx(Oc,{from:75+r.reduce((o,l)=>o+l.durationInFrames,0),durationInFrames:105,children:s.jsx(H_t,{text:n})})]}),W_t=(e,r=30)=>75+e.reduce((o,l)=>o+l.durationInFrames,0)+105,tS=30,q_t={headline:"AI Revoluționează Industria Tech",segments:[{speaker:"anna",text:"O nouă descoperire în domeniul inteligenței artificiale schimbă regulile jocului.",durationInFrames:150},{speaker:"robert",text:"Modelele de limbaj avansate pot acum să proceseze și să genereze cod la nivel de expert, reducând timpul de dezvoltare cu peste 60%.",durationInFrames:210},{speaker:"anna",text:"Impactul se simte deja în startup-uri și companii mari din România.",durationInFrames:150},{speaker:"robert",text:"Viitorul dezvoltării software este aici, și vine mai repede decât ne așteptam.",durationInFrames:150}]},gee="heygen_setup";function K_t(){const{toast:e}=wn(),r=Kr(),[n,i]=w.useState(!1),[a,o]=w.useState(null),[l,c]=w.useState("latest"),[u,d]=w.useState(()=>{try{const q=localStorage.getItem(gee);return q?JSON.parse(q):{annaPhotoId:"",robertPhotoId:""}}catch{return{annaPhotoId:"",robertPhotoId:""}}}),[h,f]=w.useState(!1),[p,m]=w.useState(null),[A,g]=w.useState(null),[y,x]=w.useState("idle"),[b,v]=w.useState([]),[j,_]=w.useState([]),[C,N]=w.useState(null),S=w.useRef(null),E=u.annaPhotoId&&u.robertPhotoId;w.useEffect(()=>{localStorage.setItem(gee,JSON.stringify(u))},[u]),w.useEffect(()=>()=>{S.current&&clearInterval(S.current)},[]);const{data:O,isLoading:B}=Xe({queryKey:["admin-short-videos"],queryFn:async()=>{const{data:q,error:M}=await G.from("short_videos").select("*").order("created_at",{ascending:!1}).limit(50);if(M)throw M;return q}}),{data:T}=Xe({queryKey:["admin-podcasts-for-shorts"],queryFn:async()=>{const{data:q,error:M}=await G.from("daily_podcasts").select("id, title, podcast_date, status").eq("status","published").order("podcast_date",{ascending:!1}).limit(14);if(M)throw M;return q}}),F=async q=>{m(q);try{const M=q==="anna"?"anna-portrait.png":"robert-portrait.png",{data:z}=G.storage.from("author-avatars").getPublicUrl(M),{data:K,error:ne}=await G.functions.invoke("setup-heygen-avatars",{body:{image_url:z.publicUrl,name:q}});if(ne)throw ne;if(!(K!=null&&K.success))throw new Error((K==null?void 0:K.error)||"Upload failed");const ie=K.talking_photo_id;d(X=>({...X,[q==="anna"?"annaPhotoId":"robertPhotoId"]:ie})),e({title:`Avatar ${q==="anna"?"Anna":"Robert"} configurat!`,description:`Talking Photo ID: ${ie}`})}catch(M){e({title:"Eroare upload avatar",description:M instanceof Error?M.message:"Eroare necunoscută",variant:"destructive"})}finally{m(null)}},I=w.useCallback(async(q,M,z)=>{try{const{data:K,error:ne}=await G.functions.invoke("check-heygen-status",{body:{video_ids:q,podcast_id:M}});if(ne)throw ne;if(v(K.results||[]),K.status==="completed"){x("completed"),S.current&&clearInterval(S.current);const ie=K.results.filter(X=>X.storedUrl).map(X=>X.storedUrl);_(ie),await G.from("short_videos").update({status:"completed",video_urls:ie,updated_at:new Date().toISOString()}).eq("id",z),r.invalidateQueries({queryKey:["admin-short-videos"]}),e({title:"Video-uri finalizate! 🎬",description:`${ie.length} segmente video cu talking head generate cu succes.`})}else K.status==="failed"&&(x("failed"),S.current&&clearInterval(S.current),await G.from("short_videos").update({status:"failed",updated_at:new Date().toISOString()}).eq("id",z),r.invalidateQueries({queryKey:["admin-short-videos"]}),e({title:"Eroare HeyGen",description:"Unul sau mai multe segmente au eșuat.",variant:"destructive"}))}catch(K){console.error("Poll error:",K)}},[e,r]),D=async()=>{if(!E){f(!0),e({title:"Setup necesar",description:"Configurează mai întâi avatarele HeyGen.",variant:"destructive"});return}i(!0),x("idle"),v([]),_([]),g(null),N(null);try{const q={anna_photo_id:u.annaPhotoId,robert_photo_id:u.robertPhotoId};l!=="latest"&&(q.podcast_id=l);const{data:M,error:z}=await G.functions.invoke("generate-short-video",{body:q});if(z)throw z;if(!(M!=null&&M.success))throw new Error((M==null?void 0:M.error)||"Generation failed");const K=M.data;g(K);const{data:ne,error:ie}=await G.from("short_videos").insert({podcast_id:K.podcastId||null,headline:K.headline,topic:K.topic||null,segments:K.segments,heygen_video_ids:K.heygenVideoIds,status:"processing"}).select().single(),X=ie?null:ne==null?void 0:ne.id;X&&N(X),r.invalidateQueries({queryKey:["admin-short-videos"]});const de=K.segments.map(ce=>({speaker:ce.speaker,text:ce.text,audioUrl:ce.audioUrl,durationInFrames:Math.max(90,Math.round(ce.text.split(/\s+/).length/2.5)*tS)}));o({headline:K.headline,segments:de}),e({title:"Script + Audio generate! 🎙️",description:`HeyGen procesează ${K.heygenVideoIds.length} segmente video. Se verifică automat...`}),x("polling");const oe=X||"temp";S.current=setInterval(()=>{I(K.heygenVideoIds,K.podcastId,oe)},15e3),setTimeout(()=>I(K.heygenVideoIds,K.podcastId,oe),3e3)}catch(q){e({title:"Eroare",description:q instanceof Error?q.message:"Eroare la generare",variant:"destructive"})}finally{i(!1)}},L=async q=>{const{error:M}=await G.from("short_videos").delete().eq("id",q);M?e({title:"Eroare",description:M.message,variant:"destructive"}):(e({title:"Șters",description:"Video-ul a fost șters."}),r.invalidateQueries({queryKey:["admin-short-videos"]}))},V=a||q_t,U=W_t(V.segments,tS),Q=q=>{switch(q){case"completed":return s.jsx(hn,{size:14,className:"text-green-500"});case"failed":return s.jsx(k2,{size:14,className:"text-destructive"});default:return s.jsx(ki,{size:14,className:"text-yellow-500 animate-pulse"})}},$=q=>{switch(q){case"completed":return s.jsx(at,{className:"bg-green-500/10 text-green-600 border-green-500/20",children:"Finalizat"});case"failed":return s.jsx(at,{variant:"destructive",children:"Eșuat"});default:return s.jsx(at,{variant:"outline",className:"animate-pulse",children:"Procesare..."})}};return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-6xl",children:[s.jsxs(be,{to:"/admin",className:"text-sm text-muted-foreground hover:text-primary mb-4 inline-flex items-center gap-1",children:[s.jsx(rn,{size:14})," Înapoi la Dashboard"]}),s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx(Pa,{className:"text-primary",size:28}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Short Video Generator"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Generează clipuri verticale cu talking heads AI din podcastul zilnic"})]})]}),s.jsxs("div",{className:"grid lg:grid-cols-[1fr_400px] gap-8",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs(st,{className:E?"":"border-yellow-500/50",children:[s.jsx(Ot,{className:"cursor-pointer",onClick:()=>f(!h),children:s.jsxs(Ht,{className:"text-lg flex items-center gap-2",children:[s.jsx(lp,{size:18}),"Setup HeyGen Avatare",E?s.jsx(at,{variant:"secondary",className:"ml-auto bg-green-500/10 text-green-500",children:"Configurat"}):s.jsx(at,{variant:"destructive",className:"ml-auto",children:"Neconfigurat"})]})}),(h||!E)&&s.jsxs(ot,{className:"space-y-4",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Portretele Anna și Robert trebuie uploadate în HeyGen ca Talking Photos. Poți face asta automat (din Supabase Storage) sau manual cu ID-uri HeyGen."}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-sm font-medium",children:"Anna — Talking Photo ID"}),s.jsx(qe,{value:u.annaPhotoId,onChange:q=>d(M=>({...M,annaPhotoId:q.target.value})),placeholder:"ex: abc123def456",className:"mt-1"})]}),s.jsx(me,{variant:"outline",size:"sm",className:"mt-5",onClick:()=>F("anna"),disabled:p!==null,children:p==="anna"?s.jsx(rt,{className:"animate-spin",size:14}):"Auto Upload"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-sm font-medium",children:"Robert — Talking Photo ID"}),s.jsx(qe,{value:u.robertPhotoId,onChange:q=>d(M=>({...M,robertPhotoId:q.target.value})),placeholder:"ex: xyz789ghi012",className:"mt-1"})]}),s.jsx(me,{variant:"outline",size:"sm",className:"mt-5",onClick:()=>F("robert"),disabled:p!==null,children:p==="robert"?s.jsx(rt,{className:"animate-spin",size:14}):"Auto Upload"})]})]})]}),s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsx(Ht,{className:"text-lg",children:"Generează Short Video"})}),s.jsxs(ot,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Podcast sursă"}),s.jsxs(Cn,{value:l,onValueChange:c,children:[s.jsx(yn,{children:s.jsx(Nn,{placeholder:"Alege podcastul"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"latest",children:"📻 Ultimul podcast"}),T==null?void 0:T.map(q=>s.jsxs(_t,{value:q.id,children:[q.podcast_date," — ",q.title]},q.id))]})]})]}),s.jsx(me,{onClick:D,disabled:n||y==="polling",className:"w-full",size:"lg",children:n?s.jsxs(s.Fragment,{children:[s.jsx(rt,{className:"animate-spin mr-2",size:18}),"Se generează script + audio + video..."]}):s.jsxs(s.Fragment,{children:[s.jsx(ya,{size:18,className:"mr-2"}),"Generează Short Video cu Talking Heads"]})}),n&&s.jsxs("div",{className:"text-xs text-muted-foreground text-center space-y-1",children:[s.jsx("p",{children:"Pipeline: AI Script → ElevenLabs TTS → HeyGen Talking Heads"}),s.jsx("p",{children:"Durată estimată: 1-2 min (script+audio) + 2-5 min (HeyGen rendering)"})]})]})]}),y!=="idle"&&s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"text-lg flex items-center gap-2",children:[y==="polling"&&s.jsx(rt,{className:"animate-spin text-primary",size:18}),y==="completed"&&s.jsx(hn,{className:"text-green-500",size:18}),y==="failed"&&s.jsx(k2,{className:"text-destructive",size:18}),"Status HeyGen",s.jsx(at,{variant:y==="completed"?"secondary":y==="failed"?"destructive":"outline",className:"ml-auto",children:y==="polling"?"Se procesează...":y==="completed"?"Finalizat!":"Eșuat"})]})}),s.jsxs(ot,{className:"space-y-2",children:[b.map((q,M)=>s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[Q(q.status),s.jsxs("span",{className:"font-medium",children:["Segment ",M+1]}),s.jsx("span",{className:"text-muted-foreground capitalize",children:q.status}),q.error&&s.jsx("span",{className:"text-xs text-destructive",children:q.error})]},q.videoId)),y==="polling"&&s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Se verifică la fiecare 15 secunde... HeyGen procesează video-urile."}),j.length>0&&s.jsxs("div",{className:"border-t pt-3 mt-3 space-y-2",children:[s.jsx("h4",{className:"text-sm font-medium",children:"Video-uri finalizate:"}),j.map((q,M)=>s.jsxs("a",{href:q,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline block",children:["📹 Segment ",M+1," — Descarcă .mp4"]},M))]})]})]}),s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"text-lg flex items-center gap-2",children:[s.jsx(Pa,{size:18}),"Generări anterioare",O&&s.jsx(at,{variant:"secondary",className:"ml-auto",children:O.length})]})}),s.jsx(ot,{children:B?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(rt,{className:"animate-spin text-muted-foreground",size:20})}):O!=null&&O.length?s.jsx("div",{className:"space-y-3",children:O.map(q=>{var M;return s.jsxs("div",{className:"rounded-lg border p-3 space-y-2",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:q.headline}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[new Date(q.created_at).toLocaleDateString("ro-RO",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}),q.topic&&s.jsxs(s.Fragment,{children:[" · ",s.jsx("span",{className:"text-primary",children:q.topic})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[$(q.status),s.jsx(me,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:()=>L(q.id),children:s.jsx(Xr,{size:14})})]})]}),q.status==="completed"&&((M=q.video_urls)==null?void 0:M.length)>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:q.video_urls.map((z,K)=>s.jsxs("a",{href:z,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:["📹 Segment ",K+1]},K))})]},q.id)})}):s.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"Nicio generare salvată."})})]}),A&&s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsx(Ht,{className:"text-lg",children:"Detalii Clip"})}),s.jsxs(ot,{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Titlu:"}),s.jsx("span",{className:"font-medium",children:A.headline})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Topic:"}),s.jsx(at,{variant:"outline",children:A.topic})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Segmente:"}),s.jsx("span",{children:A.segments.length})]}),s.jsxs("div",{className:"border-t pt-3 mt-3",children:[s.jsx("h4",{className:"text-sm font-medium mb-2",children:"Script:"}),A.segments.map((q,M)=>s.jsxs("div",{className:"flex items-start gap-2 mb-2 text-xs",children:[s.jsxs("span",{className:`font-bold whitespace-nowrap ${q.speaker==="anna"?"text-primary":"text-green-500"}`,children:[q.speaker==="anna"?"Anna":"Robert",":"]}),s.jsx("span",{className:"text-muted-foreground",children:q.text})]},M))]})]})]}),s.jsx(st,{className:"border-dashed",children:s.jsx(ot,{className:"pt-6",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Wl,{size:20,className:"text-muted-foreground mt-0.5"}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-sm",children:"Pipeline complet"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Clipurile HeyGen cu talking heads sunt salvate automat în storage. Preview-ul Remotion arată compoziția cu branding. Video-urile individuale pot fi descărcate direct."})]})]})})})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"text-sm font-medium flex items-center gap-2",children:[s.jsx(ef,{size:14}),a?"Preview Live (Audio)":"Demo Preview"]}),s.jsx("div",{className:"rounded-xl overflow-hidden border shadow-lg bg-black",style:{aspectRatio:"9/16"},children:s.jsx(P_t,{component:V_t,inputProps:V,durationInFrames:U,fps:tS,compositionWidth:1080,compositionHeight:1920,style:{width:"100%",height:"100%"},controls:!0,autoPlay:!1}
2272)}),s.jsxs("p",{className:"text-xs text-muted-foreground text-center",children:["1080 × 1920 • 30 FPS • ~",Math.round(U/tS),"s"]})]})]})]})})}const RF=[{key:"ro",label:"eduweb.ro",file:"cloudflare-worker-eduweb-ro.js",domain:"eduweb.ro"},{key:"en",label:"eduweb.ai",file:"cloudflare-worker-eduweb-ai.js",domain:"eduweb.ai"}],DF="eduweb_cf_deployed_at";function G_t(){const[e,r]=w.useState({}),[n,i]=w.useState({}),[a,o]=w.useState(null),[l,c]=w.useState(()=>localStorage.getItem(DF));w.useEffect(()=>{RF.forEach(({key:m,file:A})=>{fetch(`/${A}`,{cache:"no-cache"}).then(async g=>{const y=await g.text(),x=g.headers.get("last-modified");r(b=>({...b,[m]:y})),x&&i(b=>({...b,[m]:new Date(x).toLocaleString("ro-RO")}))}).catch(()=>{})})},[]);const u=w.useCallback(async m=>{e[m]&&(await navigator.clipboard.writeText(e[m]),o(m),setTimeout(()=>o(null),2e3))},[e]),d=w.useCallback(()=>{const m=new Date().toLocaleString("ro-RO");localStorage.setItem(DF,m),c(m)},[]),h=w.useCallback(()=>{localStorage.removeItem(DF),c(null)},[]),f=m=>{const A=e[m];if(!A)return null;const g=A.match(/\/\/\s*Last update:\s*(.+)/i);return g?g[1].trim():null},p=f("ro")||f("en");return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-5xl",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx(pi,{className:"text-primary",size:28}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Cloudflare Workers"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Cod sursă pentru pre-render SEO, sitemap, llms.txt și rutare pe ambele domenii"})]})]}),s.jsx("div",{className:`glass-card rounded-xl p-5 mb-6 border ${l?"border-primary/30":"border-yellow-500/30"}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(hn,{size:20,className:l?"text-primary":"text-yellow-500"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:l?`Workers actualizați în Cloudflare — ${l}`:"Workers necesită actualizare în Cloudflare Dashboard"}),p&&s.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Ultima modificare cod: ",s.jsx("strong",{children:p})]})]})]}),s.jsx("div",{className:"flex gap-2",children:l?s.jsx(me,{size:"sm",variant:"ghost",onClick:h,className:"text-xs",children:"Resetează"}):s.jsxs(me,{size:"sm",onClick:d,className:"gap-1.5",children:[s.jsx(hn,{size:14}),"Done — Am actualizat"]})})]})}),s.jsxs("div",{className:"glass-card rounded-xl p-4 mb-6",children:[s.jsx("h3",{className:"font-heading font-semibold text-sm mb-2",children:"📋 Pași de deployment"}),s.jsxs("ol",{className:"text-sm text-muted-foreground space-y-1 list-decimal list-inside",children:[s.jsx("li",{children:"Copiază codul pentru fiecare worker (butoanele de mai jos)"}),s.jsx("li",{children:"Cloudflare Dashboard → Workers & Pages → Selectează worker-ul → Edit Code"}),s.jsx("li",{children:"Lipește codul → Save & Deploy"}),s.jsxs("li",{children:["Caching → Configuration → ",s.jsx("strong",{children:"Purge Everything"})]}),s.jsxs("li",{children:["Apasă ",s.jsx("strong",{children:"Done"})," mai sus"]})]})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(qy,{size:20,className:"text-primary"}),s.jsx("h3",{className:"font-heading font-semibold text-base",children:"Cod sursă Workers"})]}),s.jsxs(Gi,{defaultValue:"ro",children:[s.jsx(Ri,{children:RF.map(({key:m,label:A,domain:g})=>s.jsxs(Mt,{value:m,className:"gap-1.5",children:[s.jsx(Dr,{size:12}),A]},m))}),RF.map(({key:m,file:A,domain:g})=>{const y=f(m);return s.jsx(er,{value:m,children:s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute top-2 right-2 z-10 flex gap-2",children:s.jsxs(me,{size:"sm",variant:"outline",className:"gap-1.5 h-7 text-xs",onClick:()=>u(m),children:[a===m?s.jsx(HSe,{size:12}):s.jsx(Jh,{size:12}),a===m?"Copiat!":"Copiază tot"]})}),s.jsx("pre",{className:"bg-secondary/70 rounded-lg p-4 pt-10 overflow-auto max-h-[600px] text-xs font-mono text-foreground whitespace-pre",children:e[m]||"Se încarcă..."}),s.jsxs("div",{className:"flex items-center justify-between mt-2",children:[s.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Fișier: ",s.jsxs("code",{className:"bg-muted px-1 py-0.5 rounded",children:["public/",A]})," → ","Worker: ",s.jsx("strong",{children:g})]}),y&&s.jsxs(at,{variant:"outline",className:"text-[10px]",children:["Modificat: ",y]})]})]})},m)})]})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5 mt-6",children:[s.jsx("h3",{className:"font-heading font-semibold text-sm mb-2",children:"🔧 Ce conțin Workers"}),s.jsxs("ul",{className:"text-sm text-muted-foreground space-y-1.5",children:[s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Pre-render SEO"})," — HTML complet servit crawlerilor (Googlebot, Bingbot, ClaudeBot, etc.)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Sitemap"})," — Index + sub-sitemap-uri (pages, posts, categories, resources, courses)"]}
2272),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"llms.txt"})," — Hartă completă generată dinamic din DB via Edge Function"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"robots.txt"})," — Reguli diferențiate per domeniu"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Redirecturi"})," — EN → RO pe eduweb.ro, rutare corectă pe eduweb.ai"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Bot logging"})," — Înregistrare accesări boți în DB"]})]})]})]})})}function X_t(){const[e,r]=w.useState([]),[n,i]=w.useState(null),[a,o]=w.useState([]),[l,c]=w.useState(!0),[u,d]=w.useState(!1),[h,f]=w.useState(null),[p,m]=w.useState("all");w.useEffect(()=>{A()},[]);const A=async()=>{c(!0);const{data:C}=await G.from("seo_audit_reports").select("*").order("audit_date",{ascending:!1}).limit(20);r(C||[]),C&&C.length>0&&g(C[0].id),c(!1)},g=async C=>{i(C),f(C);const{data:N}=await G.from("seo_audit_pages").select("*").eq("report_id",C).order("status",{ascending:!0});o(N||[])},y=async()=>{d(!0),ft.info("Auditul SEO rulează... poate dura 1-2 minute.");try{const{data:C,error:N}=await G.functions.invoke("seo-weekly-audit");if(N)throw N;ft.success(`Audit complet! ${C.ok} OK, ${C.warnings} warnings, ${C.errors} errors, ${C.auto_fixed} auto-fixed`),A()}catch(C){ft.error(`Eroare: ${C.message}`)}d(!1)},x=C=>{const N={ok:"bg-green-500/10 text-green-600 border-green-500/20",warning:"bg-yellow-500/10 text-yellow-600 border-yellow-500/20",error:"bg-red-500/10 text-red-600 border-red-500/20"};return s.jsx(at,{variant:"outline",className:N[C]||"",children:C.toUpperCase()})},b=C=>C?"✅":"❌",v=p==="all"?a:a.filter(C=>C.status===p),j=C=>C.total_pages===0?0:Math.round(C.pages_ok/C.total_pages*100),_=()=>a.filter(C=>C.auto_fixed).length;return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-6xl",children:[s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(pi,{className:"text-primary",size:28}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-3xl font-bold",children:"SEO Audit Reports"}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("p",{className:"text-muted-foreground text-sm",children:"Verificare zilnică automată a pre-randării tuturor paginilor"}),s.jsxs(at,{variant:"outline",className:"text-[10px] bg-primary/5 border-primary/20 gap-1",children:[s.jsx(ki,{size:10}),"Zilnic la 01:00 AM"]})]})]})]}),s.jsxs(me,{onClick:y,disabled:u,className:"gap-2",children:[s.jsx(ef,{size:16,className:u?"animate-spin":""}),u?"Se rulează...":"Rulează Audit Acum"]})]}),s.jsxs("div",{className:"space-y-3 mb-8",children:[e.map(C=>{const N=h===C.id,S=C.changes_from_previous||[],E=j(C);return s.jsxs("div",{className:"glass-card rounded-xl border",children:[s.jsxs("button",{className:"w-full p-4 flex items-center justify-between text-left",onClick:()=>{N?f(null):g(C.id)},children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(Ja,{size:18,className:"text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:new Date(C.audit_date).toLocaleDateString("ro-RO",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}),s.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs",children:[s.jsxs("span",{className:"text-green-600 font-medium",children:[C.pages_ok," OK"]}),s.jsxs("span",{className:"text-yellow-600 font-medium",children:[C.pages_warning," warning"]}),s.jsxs("span",{className:"text-red-600 font-medium",children:[C.pages_error," erori"]}),s.jsxs("span",{className:"text-muted-foreground",children:["(",C.total_pages," total)"]}),S.length>0&&s.jsxs(at,{variant:"outline",className:"text-[10px] bg-primary/5 border-primary/20",children:[S.length," modificări"]}),C.email_sent&&s.jsx(Za,{size:12,className:"text-muted-foreground"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:`text-lg font-bold ${E>=90?"text-green-600":E>=70?"text-yellow-600":"text-red-600"}`,children:[E,"%"]}),s.jsx(ql,{value:E,className:"w-20 h-2"})]}),N?s.jsx(i4,{size:18}):s.jsx(Vl,{size:18})]})]}),N&&n===C.id&&s.jsxs("div",{className:"border-t px-4 pb-4",children:[_()>0&&s.jsxs("div",{className:"mt-4 mb-4 p-3 rounded-lg bg-blue-500/5 border border-blue-500/10",children:[s.jsxs("h3",{className:"text-sm font-semibold mb-1 flex items-center gap-2",children:[s.jsx(xle,{size:14,className:"text-blue-600"}),_()," pagini auto-remediate"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Elementele SEO lipsă au fost generate automat prin AI și aplicate la pre-randare."})]}),S.length>0&&s.jsxs("div",{className:"mt-4 mb-4 p-3 rounded-lg bg-primary/5 border border-primary/10",children:[s.jsxs("h3",{className:"text-sm font-semibold mb-2 flex items-center gap-2",children:[s.jsx(Gt,{size:14,className:"text-primary"}),"Modificări față de raportul anterior"]}),s.jsx("ul",{className:"text-sm space-y-1",children:S.map((O,B)=>{var T;return s.jsxs("li",{className:"text-muted-foreground",children:["• ",s.jsx("strong",{children:O.label})," (",O.path,") — ",O.type==="new"?"Pagină nouă în audit":O.type==="status_change"?`Status: ${O.from} → ${O.to}`:`Câmpuri: ${(T=O.fields)==null?void 0:T.join(", ")}`]},B)})})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-4 mb-3",children:[s.jsx(y_,{size:14,className:"text-muted-foreground"}),["all","ok","warning","error"].map(O=>s.jsx(me,{size:"sm",variant:p===O?"default":"outline",className:"h-7 text-xs",onClick:()=>m(O),children:O==="all"?`Toate (${a.length}
2272)`:O==="ok"?`OK (${a.filter(B=>B.status==="ok").length})`:O==="warning"?`Warning (${a.filter(B=>B.status==="warning").length})`:`Error (${a.filter(B=>B.status==="error").length})`},O))]}),s.jsx("div",{className:"overflow-auto",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Status"}),s.jsx(Me,{children:"Pagină"}),s.jsx(Me,{className:"text-center",children:"Title"}),s.jsx(Me,{className:"text-center",children:"Desc"}),s.jsx(Me,{className:"text-center",children:"OG"}),s.jsx(Me,{className:"text-center",children:"JSON-LD"}),s.jsx(Me,{className:"text-center",children:"Body"}),s.jsx(Me,{className:"text-center",children:"H1"}),s.jsx(Me,{children:"Auto-fix"}),s.jsx(Me,{children:"Probleme"})]})}),s.jsx(In,{children:v.map(O=>s.jsxs(Nt,{className:O.changed_since_last?"bg-primary/5":"",children:[s.jsx(Oe,{children:x(O.status)}),s.jsx(Oe,{children:s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:O.page_label}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:O.page_path}),O.changed_since_last&&s.jsxs("p",{className:"text-[10px] text-primary mt-0.5",children:["🔄 ",O.change_details]})]})}),s.jsx(Oe,{className:"text-center",children:b(O.has_title)}),s.jsx(Oe,{className:"text-center",children:b(O.has_description)}),s.jsx(Oe,{className:"text-center",children:b(O.has_og_tags)}),s.jsx(Oe,{className:"text-center",children:b(O.has_json_ld)}),s.jsx(Oe,{className:"text-center",children:b(O.has_body_content)}),s.jsx(Oe,{className:"text-center",children:b(O.has_h1)}),s.jsx(Oe,{children:O.auto_fixed?s.jsxs("div",{children:[s.jsx(at,{variant:"outline",className:"text-[10px] bg-blue-500/10 text-blue-600 border-blue-500/20",children:"✅ Remediat"}),O.auto_fix_details&&s.jsx("p",{className:"text-[10px] text-blue-600 mt-0.5 max-w-[200px]",children:O.auto_fix_details})]}):O.auto_fix_details?s.jsxs("div",{children:[s.jsx(at,{variant:"outline",className:"text-[10px] bg-yellow-500/10 text-yellow-600 border-yellow-500/20",children:"⏳ Pending"}),s.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 max-w-[200px]",children:O.auto_fix_details})]}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})}),s.jsx(Oe,{children:O.issues&&O.issues.length>0?s.jsx("ul",{className:"text-xs text-red-600 space-y-0.5",children:O.issues.map((B,T)=>s.jsxs("li",{children:["• ",B]},T))}):s.jsx("span",{className:"text-xs text-green-600",children:"—"})})]},O.id))})]})})]})]},C.id)}),e.length===0&&!l&&s.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[s.jsx("p",{className:"mb-2",children:"Niciun raport de audit încă."}),s.jsx("p",{className:"text-sm",children:'Apasă „Rulează Audit Acum" pentru primul raport.'})]})]})]})})}const Y_t=[{title:"Ce este Web3",slug_ro:"ce-este-web3",slug_en:"what-is-web3",type:"static"},{title:"Ce este Blockchain",slug_ro:"ce-este-blockchain",slug_en:"what-is-blockchain",type:"static"},{title:"Ce este Crypto",slug_ro:"ce-este-crypto",slug_en:"what-is-crypto",type:"static"},{title:"Ce este Bitcoin",slug_ro:"ce-este-bitcoin",slug_en:"what-is-bitcoin",type:"static"},{title:"Ce este Ethereum",slug_ro:"ce-este-ethereum",slug_en:"what-is-ethereum",type:"static"},{title:"Ce este Solana",slug_ro:"ce-este-solana",slug_en:"what-is-solana",type:"static"},{title:"Ce este BNB",slug_ro:"ce-este-bnb",slug_en:"what-is-bnb",type:"static"},{title:"Ce este XRP",slug_ro:"ce-este-xrp",slug_en:"what-is-xrp",type:"static"},{title:"Ce este Cardano",slug_ro:"ce-este-cardano",slug_en:"what-is-cardano",type:"static"},{title:"Ce este Dogecoin",slug_ro:"ce-este-dogecoin",slug_en:"what-is-dogecoin",type:"static"},{title:"Ce este Polkadot",slug_ro:"ce-este-polkadot",slug_en:"what-is-polkadot",type:"static"},{title:"Ce este Avalanche",slug_ro:"ce-este-avalanche",slug_en:"what-is-avalanche",type:"static"},{title:"Ce este Chainlink",slug_ro:"ce-este-chainlink",slug_en:"what-is-chainlink",type:"static"}];function J_t(){const[e,r]=w.useState(!1),[n,i]=w.useState(""),[a,o]=w.useState(!1),[l,c]=w.useState(!0),u=Kr(),d=async()=>
2272{await Promise.all([u.invalidateQueries({queryKey:["admin-pillar-pages"]}),u.invalidateQueries({queryKey:["published-pillar-pages"]}),u.invalidateQueries({queryKey:["pillar-page"]})])},{data:h=[],isLoading:f}=Xe({queryKey:["admin-pillar-pages"],queryFn:async()=>{const{data:y,error:x}=await G.from("pillar_pages").select("*").order("created_at",{ascending:!1});if(x)throw x;return y||[]}}),p=async()=>{if(!n.trim()){ft.error("Introdu un subiect");return}o(!0);try{const{data:y,error:x}=await G.functions.invoke("generate-pillar-page",{body:{topic:n.trim(),generate_image:l}});if(x)throw x;if(!(y!=null&&y.success))throw new Error((y==null?void 0:y.error)||"Eroare la generare");ft.success(`Pagina „Ce este ${n}?" a fost generată cu succes!`),await d(),i(""),r(!1)}catch(y){console.error("Generate error:",y),ft.error(y.message||"Eroare la generarea paginii")}finally{o(!1)}},m=async y=>{const{error:x}=await G.from("pillar_pages").update({is_published:!y.is_published}).eq("id",y.id);x?ft.error("Eroare la actualizare"):(ft.success(y.is_published?"Pagina a fost ascunsă":"Pagina a fost publicată"),await d())},A=async y=>{var b,v;if(!confirm(`Sigur vrei să ștergi pagina „${((v=(b=y.content_ro)==null?void 0:b.hero)==null?void 0:v.heading)||y.slug_ro}"?`))return;const{error:x}=await G.from("pillar_pages").delete().eq("id",y.id);x?ft.error("Eroare la ștergere"):(ft.success("Pagina a fost ștearsă"),await d())},g=async y=>{var b,v;const x=((v=(b=y.content_ro)==null?void 0:b.hero)==null?void 0:v.heading)||y.slug_ro;ft.info(`Se regenerează imaginea pentru „${x}"...`);try{const{data:j,error:_}=await G.functions.invoke("generate-pillar-page",{body:{topic:x.replace("Ce este ","").replace("?",""),generate_image:!0}});if(_)throw _;ft.success("Imagine regenerată!"),await d()}catch(j){ft.error(j.message||"Eroare la regenerarea imaginii")}};return s.jsx(xr,{children:s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(yr,{className:"h-6 w-6 text-primary"}),s.jsx("h1",{className:"text-2xl font-heading font-bold",children:'Pagini „Ce este?"'})]}),s.jsxs(sl,{open:e,onOpenChange:r,children:[s.jsx(Ab,{asChild:!0,children:s.jsxs(me,{className:"gap-2",children:[s.jsx(Qn,{className:"h-4 w-4"})," Pagină nouă"]})}),s.jsxs(Po,{className:"sm:max-w-md",children:[s.jsx(ol,{children:s.jsxs(ll,{className:"flex items-center gap-2",children:[s.jsx(Li,{className:"h-5 w-5 text-primary"}),'Generează pagină „Ce este?"']})}),s.jsxs("div",{className:"space-y-4 pt-2",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{htmlFor:"topic",children:"Subiect"}),s.jsx(qe,{id:"topic",placeholder:"ex: DeFi, NFT, Staking, Layer 2...",value:n,onChange:y=>i(y.target.value),disabled:a}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Se va genera automat: „Ce este ",n||"...",'?" (RO) + „What is ',n||"...",'?" (EN)']})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",id:"genImage",checked:l,onChange:y=>c(y.target.checked),className:"rounded border-border",disabled:a}),s.jsx(Ge,{htmlFor:"genImage",className:"text-sm",children:"Generează și imagine reprezentativă"})]}),s.jsx(me,{onClick:p,disabled:a||!n.trim(),className:"w-full gap-2",children:a?s.jsxs(s.Fragment,{children:[s.jsx(rt,{className:"h-4 w-4 animate-spin"}),"Se generează (poate dura 30-60s)..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Li,{className:"h-4 w-4"}),"Generează conținut complet"]})})]})]})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-heading font-semibold mb-3 text-muted-foreground",children:"Pagini existente (hardcoded)"}),s.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Y_t.map(y=>s.jsxs("a",{href:`/${y.slug_ro}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 rounded-lg border p-4 hover:bg-muted/50 transition-colors",children:[s.jsx(yr,{className:"h-4 w-4 text-primary shrink-0"}),s.jsx("span",{className:"font-medium flex-1",children:y.title}),s.jsx(Yr,{className:"h-3.5 w-3.5 text-muted-foreground"})]},y.slug_ro))})]}),s.jsxs("div",{children:[s.jsxs("h2",{className:"text-lg font-heading font-semibold mb-3 text-muted-foreground",children:["Pagini generate din admin (",h.length,")"]}),f?s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground py-8",children:[s.jsx(rt,{className:"h-4 w-4 animate-spin"})," Se încarcă..."]}):h.length===0?s.jsxs("div",{className:"text-center py-12 text-muted-foreground border rounded-lg border-dashed",children:[s.jsx(yr,{className:"h-10 w-10 mx-auto mb-3 opacity-50"}),s.jsx("p",{children:"Nu ai generat încă nicio pagină nouă."}),s.jsx("p",{className:"text-sm",children:'Folosește butonul „Pagină nouă" pentru a crea una.'})]}):s.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:h.map(y=>{var v,j,_;const x=((j=(v=y.content_ro)==null?void 0:v.hero)==null?void 0:j.heading)||y.slug_ro,b=((_=y.content_ro)==null?void 0:_.metaDescription)||"";return s.jsxs("div",{className:"rounded-xl border bg-card overflow-hidden",children:[y.image_url&&s.jsx("div",{className:"aspect-[16/9] overflow-hidden bg-muted",children:s.jsx("img",{src:y.image_url,alt:x,className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsx("h3",{className:"font-heading font-bold text-base",children:x}),s.jsx("span",{className:`shrink-0 text-xs px-2 py-0.5 rounded-full ${y.is_published?"bg-green-500/10 text-green-600":"bg-yellow-500/10 text-yellow-600"}`,children:y.is_published?"Publicat":"Draft"})]}),s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:b}),s.jsxs("div",{className:"text-xs text-muted-foreground space-y-0.5",children:[s.jsxs("p",{children:["RO: /",y.slug_ro]}),s.jsxs("p",{children:["EN: /",y.slug_en]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[s.jsxs(me,{variant:"outline",size:"sm",className:"gap-1.5 text-xs flex-1",onClick:()=>m(y),children:[y.is_published?s.jsx(x_,{className:"h-3.5 w-3.5"}):s.jsx(Oi,{className:"h-3.5 w-3.5"}),y.is_published?"Ascunde":"Publică"]}),s.jsx(me,{variant:"outline",size:"sm",className:"gap-1.5 text-xs",onClick:()=>g(y),title:"Regenerează imaginea",children:s.jsx(il,{className:"h-3.5 w-3.5"})}),s.jsx("a",{href:`/${y.slug_ro}`,target:"_blank",rel:"noopener noreferrer",children:s.jsx(me,{variant:"outline",size:"sm",className:"text-xs",children:s.jsx(Yr,{className:"h-3.5 w-3.5"})})}),s.jsx(me,{variant:"outline",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>A(y),children:s.jsx(Xr,{className:"h-3.5 w-3.5"})})]})]})]},y.id)})})]})]})})}function Z_t(){const[e,r]=w.useState(!1),[n,i]=w.useState(!1),a=Kr(),{data:o,isLoading:l}=Xe({queryKey:["admin-glossary-terms"],queryFn:async()=>{const{data:x,error:b}=await G.from("glossary_terms").select("id, slug, term_ro, term_en, category, source_page, is_published, created_at").order("created_at",{ascending:!1});if(b)throw b;return x}}),{data:c,isLoading:u}=Xe({queryKey:["admin-glossary-sync-logs"],queryFn:async()=>{const{data:x,error:b}=await G.from("glossary_sync_logs").select("*").order("started_at",{ascending:!1}).limit(50);if(b)throw b;return x}}),d=c==null?void 0:c[0],h=(c==null?void 0:c.reduce((x,b)=>x+(b.created||0),0))||0,f=(c==null?void 0:c.reduce((x,b)=>x+(b.errors||0),0))||0,p=async()=>{i(!0);try{const{GLOSSARY_TERMS:x}=await qw(async()=>{const{GLOSSARY_TERMS:v}=await Promise.resolve().then(()=>RSt);return{GLOSSARY_TERMS:v}},void 0);let b=0;for(const v of x){const{error:j}=await G.from("glossary_terms").upsert({slug:v.slug,category:v.category,term_ro:v.ro.term,short_def_ro:v.ro.shortDef,full_content_ro:v.ro.fullContent,meta_title_ro:v.ro.metaTitle,meta_description_ro:v.ro.metaDescription,related_slugs:v.ro.relatedSlugs,term_en:v.en.term,short_def_en:v.en.shortDef,full_content_en:v.en.fullContent,meta_title_en:v.en.metaTitle,meta_description_en:v.en.metaDescription,related_slugs_en:v.en.relatedSlugs,source_page:null,is_published:!0},{onConflict:"slug"});j||b++}ft.success(`${b} termeni existenți importați!`),a.invalidateQueries({queryKey:["admin-glossary-terms"]})}catch(x){console.error(x),ft.error("Eroare la import")}finally{i(!1)}},m=async()=>{r(!0);try{const{data:x,error:b}=await G.functions.invoke("sync-glossary-terms",{body:{trigger_type:"manual"}});if(b)throw b;ft.success(`Sincronizare completă: ${x.created} termeni noi creați!`),a.invalidateQueries({queryKey:["admin-glossary-terms"]}),a.invalidateQueries({queryKey:["admin-glossary-sync-logs"]})}catch(x){console.error(x),ft.error("Eroare la sincronizare")}finally{r(!1)}},A=x=>
2272x?new Date(x).toLocaleString("ro-RO",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}):"-",g=x=>{switch(x){case"completed":return s.jsx(at,{className:"bg-green-500/20 text-green-400 border-green-500/30",children:"✓ Complet"});case"completed_with_errors":return s.jsx(at,{className:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",children:"⚠ Cu erori"});case"running":return s.jsx(at,{className:"bg-blue-500/20 text-blue-400 border-blue-500/30 animate-pulse",children:"⟳ Rulează"});case"failed":return s.jsx(at,{className:"bg-red-500/20 text-red-400 border-red-500/30",children:"✗ Eșuat"});default:return s.jsx(at,{variant:"outline",children:x})}},y=x=>{switch(x){case"cron":return s.jsxs(at,{variant:"outline",className:"text-xs",children:[s.jsx(ki,{size:10,className:"mr-1"}),"Cron"]});case"manual":return s.jsxs(at,{variant:"outline",className:"text-xs",children:[s.jsx(ts,{size:10,className:"mr-1"}),"Manual"]});default:return s.jsx(at,{variant:"outline",className:"text-xs",children:x})}};return s.jsx(xr,{children:s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(yr,{className:"h-6 w-6 text-primary"}),s.jsx("h1",{className:"text-2xl font-heading font-bold",children:"Glosar — Dashboard"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:p,disabled:n,className:"flex items-center gap-2 px-3 py-2 text-xs rounded-lg border bg-card hover:border-primary/30 transition-all disabled:opacity-50",children:[s.jsx(E2,{size:14}),n?"Se importă...":"Import statice"]}),s.jsxs("button",{onClick:m,disabled:e,className:"flex items-center gap-2 px-3 py-2 text-xs rounded-lg border bg-primary/10 text-primary hover:bg-primary/20 transition-all disabled:opacity-50",children:[s.jsx(ef,{size:14,className:e?"animate-spin":""}),e?"Sincronizare...":"Sync manual"]})]})]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm font-medium text-muted-foreground",children:"Termeni în DB"})}),s.jsxs(ot,{children:[s.jsx("p",{className:"text-3xl font-bold",children:(o==null?void 0:o.length)||0}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[(o==null?void 0:o.filter(x=>x.is_published).length)||0," publicați"]})]})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm font-medium text-muted-foreground",children:"Total sincronizări"})}),s.jsxs(ot,{children:[s.jsx("p",{className:"text-3xl font-bold",children:(c==null?void 0:c.length)||0}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[h," termeni creați automat"]})]})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm font-medium text-muted-foreground",children:"Ultima sincronizare"})}),s.jsx(ot,{children:d?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-sm font-semibold",children:A(d.started_at)}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[g(d.status),y(d.trigger_type)]})]}):s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nicio sincronizare încă"})})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm font-medium text-muted-foreground",children:"Erori totale"})}),s.jsxs(ot,{children:[s.jsx("p",{className:`text-3xl font-bold ${f>0?"text-yellow-500":"text-green-500"}`,children:f}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:f===0?"Totul funcționează perfect":"Verifică logurile"})]})]})]}),s.jsxs(Gi,{defaultValue:"logs",className:"space-y-4",children:[s.jsxs(Ri,{children:[s.jsxs(Mt,{value:"logs",className:"gap-1.5",children:[s.jsx(Eo,{size:14}),"Istoric sincronizări"]}),s.jsxs(Mt,{value:"terms",className:"gap-1.5",children:[s.jsx(yr,{size:14}),"Termeni (",(o==null?void 0:o.length)||0,")"]})]}),s.jsx(er,{value:"logs",children:u?s.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"Se încarcă..."}):c!=null&&c.length?s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"bg-muted/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left p-3 font-medium",children:"Data"}),s.jsx("th",{className:"text-left p-3 font-medium",children:"Tip"}),s.jsx("th",{className:"text-left p-3 font-medium",children:"Status"}),s.jsx("th",{className:"text-right p-3 font-medium",children:"Existenți"}),s.jsx("th",{className:"text-right p-3 font-medium",children:"Creați"}),s.jsx("th",{className:"text-right p-3 font-medium",children:"Skipați"}),s.jsx("th",{className:"text-right p-3 font-medium",children:"Erori"}),s.jsx("th",{className:"text-left p-3 font-medium",children:"Durată"})]})}),s.jsx("tbody",{children:c.map(x=>{const b=x.finished_at&&x.started_at?Math.round((new Date(x.finished_at).getTime()-new Date(x.started_at).getTime())/1e3):null;return s.jsxs("tr",{className:"border-t hover:bg-muted/30",title:x.error_details||"",children:[s.jsx("td",{className:"p-3 text-xs",children:A(x.started_at)}),s.jsx("td",{className:"p-3",children:y(x.trigger_type)}),s.jsx("td",{className:"p-3",children:g(x.status)}),s.jsx("td",{className:"p-3 text-right font-mono",children:x.existing_before}),s.jsx("td",{className:"p-3 text-right font-mono font-semibold text-green-500",children:x.created>0?`+${x.created}`:"0"}),s.jsx("td",{className:"p-3 text-right font-mono text-muted-foreground",children:x.skipped}),s.jsx("td",{className:"p-3 text-right font-mono",children:x.errors>0?s.jsxs("span",{className:"text-yellow-500 flex items-center justify-end gap-1",children:[s.jsx(Tu,{size:12}),x.errors]}):s.jsx("span",{className:"text-green-500",children:"0"})}),s.jsx("td",{className:"p-3 text-xs text-muted-foreground",children:b!==null?`${b}s`:"-"})]},x.id)})})]})}):s.jsx(st,{children:s.jsx(ot,{className:"p-6 text-center text-muted-foreground",children:"Nicio sincronizare înregistrată. Cron-ul rulează zilnic la 06:00 UTC."})})}),s.jsx(er,{value:"terms",children:l?s.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"Se încarcă..."}):s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"bg-muted/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left p-3 font-medium",children:"Termen RO"}),s.jsx("th",{className:"text-left p-3 font-medium",children:"EN"}),s.jsx("th",{className:"text-left p-3 font-medium",children:"Categorie"}),s.jsx("th",{className:"text-left p-3 font-medium",children:"Sursă"}),s.jsx("th",{className:"text-left p-3 font-medium",children:"Creat la"}),s.jsx("th",{className:"text-left p-3 font-medium",children:"Slug"})]})}),s.jsx("tbody",{children:(o||[]).map(x=>s.jsxs("tr",{className:"border-t hover:bg-muted/30",children:[s.jsx("td",{className:"p-3 font-medium",children:x.term_ro}),s.jsx("td",{className:"p-3 text-muted-foreground",children:x.term_en||"-"}),s.jsx("td",{className:"p-3",children:s.jsx(at,{variant:"outline",className:"text-[10px] uppercase",children:x.category})}),s.jsx("td",{className:"p-3 text-muted-foreground text-xs",children:x.source_page||"manual"}),s.jsx("td",{className:"p-3 text-muted-foreground text-xs",children:A(x.created_at)}),s.jsx("td",{className:"p-3 text-muted-foreground",children:s.jsx("a",{href:`/glosar/${x.slug}`,target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary",children:x.slug})})]},x.id))})]})})})]})]})})}const eCt=[{value:"identitate-digitala",label:"Identitate Digitală"},{value:"dao-guvernanta",label:"DAO & Guvernanță"},{value:"supply-chain",label:"Supply Chain"},{value:"defi-tokenizare",label:"DeFi & Tokenizare"},{value:"gaming-metaverse",label:"Gaming & Metaverse"},{value:"social-creator",label:"Social & Creator"}
2272,{value:"infrastructura",label:"Infrastructură"},{value:"sanatate",label:"Sănătate"},{value:"educatie",label:"Educație"},{value:"energie-mediu",label:"Energie & Mediu"}];function xee(e){if(!e)return null;const r=e.split(`
2273`),n=[];let i=0;for(const a of r){const o=a.trim();if(!o){n.push(s.jsx("br",{},i++));continue}o.startsWith("## ")?n.push(s.jsx("h2",{className:"text-lg font-bold mt-4 mb-2 text-foreground",children:o.replace("## ","")},i++)):o.startsWith("### ")?n.push(s.jsx("h3",{className:"text-base font-semibold mt-3 mb-1 text-foreground",children:o.replace("### ","")},i++)):o.startsWith("- ")||o.startsWith("* ")?n.push(s.jsx("li",{className:"ml-4 text-sm text-muted-foreground",children:o.slice(2)},i++)):n.push(s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-1",children:o},i++))}return n}function tCt(){var m;const e=Kr(),[r,n]=w.useState(""),[i,a]=w.useState("all"),[o,l]=w.useState(null),{data:c,isLoading:u}=Xe({queryKey:["admin-web3-cases",i],queryFn:async()=>{let A=G.from("web3_case_studies").select("*").order("created_at",{ascending:!1});i!=="all"&&(A=A.eq("status",i));const{data:g,error:y}=await A;if(y)throw y;return g}}),d=An({mutationFn:async A=>{const{data:g,error:y}=await G.functions.invoke("generate-web3-cases",{body:{category:A||void 0,count:3}});if(y)throw y;return g},onSuccess:A=>{ft.success(`${A.count} studii de caz generate!`),e.invalidateQueries({queryKey:["admin-web3-cases"]})},onError:A=>ft.error(A.message||"Eroare la generare")}),h=async(A,g)=>{const y=g==="published"?"draft":"published",x={status:y};y==="published"&&(x.published_at=new Date().toISOString());const{error:b}=await G.from("web3_case_studies").update(x).eq("id",A);if(b){ft.error(b.message);return}ft.success(y==="published"?"Publicat!":"Trecut în draft"),e.invalidateQueries({queryKey:["admin-web3-cases"]}),(o==null?void 0:o.id)===A&&l({...o,status:y})},f=async(A,g)=>{const{error:y}=await G.from("web3_case_studies").update({is_featured:!g}).eq("id",A);if(y){ft.error(y.message);return}e.invalidateQueries({queryKey:["admin-web3-cases"]})},p=async A=>{if(!confirm("Ștergi acest studiu de caz?"))return;const{error:g}=await G.from("web3_case_studies").delete().eq("id",A);if(g){ft.error(g.message);return}
2273ft.success("Șters!"),e.invalidateQueries({queryKey:["admin-web3-cases"]})};return s.jsx(xr,{children:s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(op,{className:"h-6 w-6 text-primary"}),s.jsx("h1",{className:"text-2xl font-heading font-bold",children:"Studii de Caz Web3"})]}),s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"text-lg flex items-center gap-2",children:[s.jsx(Li,{className:"h-5 w-5"}),"Generează Studii de Caz cu AI"]})}),s.jsxs(ot,{className:"flex flex-wrap items-center gap-3",children:[s.jsxs(Cn,{value:r,onValueChange:n,children:[s.jsx(yn,{className:"w-60",children:s.jsx(Nn,{placeholder:"Categorie (sau random)"})}),s.jsx(vn,{children:eCt.map(A=>s.jsx(_t,{value:A.value,children:A.label},A.value))})]}),s.jsx(me,{onClick:()=>d.mutate(r),disabled:d.isPending,children:d.isPending?s.jsxs(s.Fragment,{children:[s.jsx(rt,{className:"h-4 w-4 mr-2 animate-spin"}),"Generez..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Li,{className:"h-4 w-4 mr-2"}),"Generează 3 studii"]})})]})]}),s.jsx("div",{className:"flex gap-2",children:["all","draft","published"].map(A=>s.jsxs(me,{variant:i===A?"default":"outline",size:"sm",onClick:()=>a(A),children:[A==="all"?"Toate":A==="draft"?"Draft":"Publicate",c&&A!=="all"&&` (${c.filter(g=>g.status===A).length})`]},A))}),u?s.jsx("div",{className:"text-center py-10 text-muted-foreground",children:"Se încarcă..."}):c!=null&&c.length?s.jsx("div",{className:"space-y-3",children:c.map(A=>s.jsxs(st,{className:"flex items-center gap-4 p-4",children:[A.image_url&&s.jsx("img",{src:A.image_url,alt:A.title,className:"h-16 w-24 object-cover rounded shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(at,{variant:A.status==="published"?"default":"secondary",className:"text-xs",children:A.status}),s.jsx(at,{variant:"outline",className:"text-xs",children:A.category}),A.is_featured&&s.jsx(cp,{className:"h-3.5 w-3.5 text-yellow-500 fill-yellow-500"})]}),s.jsx("p",{className:"font-medium truncate",children:A.title}),s.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[A.company_name&&s.jsx("span",{children:A.company_name}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ja,{className:"h-3 w-3"}),al(new Date(A.created_at),"d MMM yyyy",{locale:Md})]})]})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>l(A),title:"Previzualizare",children:s.jsx(Oi,{className:"h-4 w-4 text-primary"})}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>f(A.id,A.is_featured),title:"Featured",children:s.jsx(cp,{className:`h-4 w-4 ${A.is_featured?"text-yellow-500 fill-yellow-500":""}`})}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>h(A.id,A.status),title:A.status==="published"?"Unpublish":"Publish",children:A.status==="published"?s.jsx(x_,{className:"h-4 w-4"}):s.jsx(Oi,{className:"h-4 w-4"})}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>p(A.id),title:"Șterge",children:s.jsx(Xr,{className:"h-4 w-4 text-destructive"})})]})]},A.id))}):s.jsx("div",{className:"text-center py-10 text-muted-foreground",children:"Niciun studiu de caz. Generează primele!"}),s.jsx(sl,{open:!!o,onOpenChange:A=>!A&&l(null),children:s.jsxs(Po,{className:"max-w-2xl h-[85vh] flex flex-col overflow-hidden",children:[s.jsxs(ol,{className:"shrink-0",children:[s.jsx(ll,{className:"text-xl leading-tight",children:o==null?void 0:o.title}),(o==null?void 0:o.title_en)&&s.jsx("p",{className:"text-sm text-muted-foreground italic",children:o.title_en})]}),s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto -mx-6 px-6",children:s.jsxs("div",{className:"space-y-4 pb-4",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx(at,{variant:(o==null?void 0:o.status)==="published"?"default":"secondary",children:o==null?void 0:o.status}),s.jsx(at,{variant:"outline",children:o==null?void 0:o.category}),(o==null?void 0:o.company_name)&&s.jsx("span",{className:"text-sm font-medium",children:o.company_name}),(o==null?void 0:o.created_at)&&s.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[s.jsx(Ja,{className:"h-3 w-3"}
2273),al(new Date(o.created_at),"d MMMM yyyy, HH:mm",{locale:Md})]})]}),(o==null?void 0:o.project_url)&&s.jsxs("a",{href:o.project_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-primary hover:underline",children:[s.jsx(Yr,{className:"h-3.5 w-3.5"})," ",o.project_url]}),((m=o==null?void 0:o.tags)==null?void 0:m.length)>0&&s.jsx("div",{className:"flex flex-wrap gap-1",children:o.tags.map(A=>s.jsx(at,{variant:"outline",className:"text-xs",children:A},A))}),(o==null?void 0:o.summary_ro)&&s.jsxs("div",{className:"border-l-4 border-primary/30 pl-4 py-2",children:[s.jsx("p",{className:"text-sm font-medium mb-1",children:"Rezumat RO"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:o.summary_ro})]}),(o==null?void 0:o.body_ro)&&s.jsxs("div",{className:"mt-4",children:[s.jsx("p",{className:"text-sm font-semibold mb-2",children:"Conținut RO"}),s.jsx("div",{className:"prose prose-sm max-w-none",children:xee(o.body_ro)})]}),(o==null?void 0:o.summary_en)&&s.jsxs("div",{className:"border-l-4 border-muted pl-4 py-2 mt-6",children:[s.jsx("p",{className:"text-sm font-medium mb-1",children:"Rezumat EN"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:o.summary_en})]}),(o==null?void 0:o.body_en)&&s.jsxs("div",{className:"mt-4",children:[s.jsx("p",{className:"text-sm font-semibold mb-2",children:"Conținut EN"}),s.jsx("div",{className:"prose prose-sm max-w-none",children:xee(o.body_en)})]})]})}),s.jsxs(gb,{className:"gap-2 shrink-0",children:[s.jsx(me,{variant:"outline",onClick:()=>l(null),children:"Închide"}),(o==null?void 0:o.status)==="draft"&&s.jsxs(me,{onClick:()=>h(o.id,o.status),children:[s.jsx(Oi,{className:"h-4 w-4 mr-2"})," Publică"]})]})]})})]})})}const I1=G,MF={name:"",slug:"",short_description:"",website_url:"",logo_url:"",gmb_url:"",expertise_areas:"",eduweb_role:"",monthly_article_limit:3},rS=[{id:"identity",title:"Identitate",icon:il},{id:"presence",title:"Prezență Online",icon:Dr},{id:"role",title:"Rol în Ecosistem",icon:Rn},{id:"settings",title:"Setări",icon:Li}];function rCt(){const{toast:e}=wn(),r=Kr(),[n,i]=w.useState(!1),[a,o]=w.useState(!1),[l,c]=w.useState(null),[u,d]=w.useState(""),[h,f]=w.useState(null),[p,m]=w.useState(MF),[A,g]=w.useState(0),{data:y=[],isLoading:x}=Xe({queryKey:["admin-innovation-network"],queryFn:async()=>{const{data:B,error:T}=await I1.from("innovation_network").select("*").order("sort_order");if(T)throw T;return B||[]}}),b=An({mutationFn:async()=>{const B={name:p.name.trim(),slug:p.slug.trim()||p.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,60),short_description:p.short_description.trim()||null,website_url:p.website_url.trim()||null,logo_url:p.logo_url.trim()||null,gmb_url:p.gmb_url.trim()||null,eduweb_role:p.eduweb_role.trim()||null,expertise_areas:p.expertise_areas.split(",").map(T=>T.trim()).filter(Boolean),monthly_article_limit:p.monthly_article_limit};if(h){const{error:T}=await I1.from("innovation_network").update(B).eq("id",h);if(T)throw T}else{const{error:T}=await I1.from("innovation_network").insert(B);if(T)throw T}},onSuccess:()=>{r.invalidateQueries({queryKey:["admin-innovation-network"]}),e({title:h?"Actualizat":"Companie adăugată cu succes!"}),i(!1),m(MF),f(null),g(0)},onError:B=>e({title:"Eroare",description:B.message,variant:"destructive"})}),v=An({mutationFn:async B=>{const{error:T}=await I1.from("innovation_network").delete().eq("id",B);if(T)throw T},onSuccess:()=>{r.invalidateQueries({queryKey:["admin-innovation-network"]}),e({title:"Șters"})}}),j=An({mutationFn:async()=>{if(!l||!u.trim())throw new Error("Completează emailul");const{data:B,error:T}=await G.auth.signUp({email:u.trim(),password:crypto.randomUUID(),options:{emailRedirectTo:`${window.location.origin}/partner`,data:{display_name:u.split("@")[0]}}});if(T)throw T;if(!B.user)throw new Error("Nu s-a putut crea contul");const F=B.user.id,{error:I}=await G.from("user_roles").insert({user_id:F,role:"partner"});if(I)throw I;const{error:D}=await I1.from("innovation_network").update({user_id:F}).eq("id",l);if(D)throw D},onSuccess:()=>{r.invalidateQueries({queryKey:["admin-innovation-network"]}),e({title:"Invitație trimisă",description:"Partenerul va primi email de confirmare."}),o(!1),d(""),c(null)},onError:B=>e({title:"Eroare",description:B.message,variant:"destructive"})}),_=B=>{f(B.id),m({name:B.name,slug:B.slug,short_description:B.short_description||"",website_url:B.website_url||"",logo_url:B.logo_url||"",gmb_url:B.gmb_url||"",eduweb_role:B.eduweb_role||"",expertise_areas:(B.expertise_areas||[]).join(", "),monthly_article_limit:B.monthly_article_limit||3}),g(0),i(!0)},C=B=>{c(B),d(""),o(!0)},N=B=>{switch(B){case 0:return p.name.trim().length>0;case 1:return p.website_url.trim().length>0;case 2:return!0;case 3:return!0;default:return!0}},S=()=>{A<rS.length-1&&N(A)&&g(A+1)},E=()=>{A>0&&g(A-1)},O=()=>{switch(A){case 0:return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx("div",{className:"w-16 h-16 mx-auto rounded-2xl bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center mb-4",children:s.jsx(il,{className:"w-8 h-8 text-primary"})}),s.jsx("h3",{className:"font-heading text-lg font-semibold",children:"Identitatea companiei"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Informații de bază pe
2273ntru profilul partenerului"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Nume companie *"}),s.jsx(qe,{value:p.name,onChange:B=>m(T=>({...T,name:B.target.value})),placeholder:"Ex: SEO 365",className:"h-11"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Slug URL"}),s.jsx(qe,{value:p.slug,onChange:B=>m(T=>({...T,slug:B.target.value})),placeholder:"eduweb (generat automat dacă nu e specificat)"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["URL: /innovation-network/",p.slug||p.name.toLowerCase().replace(/[^a-z0-9]+/g,"-")||"slug"]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"URL Logo (imagine)"}),s.jsx(qe,{value:p.logo_url,onChange:B=>m(T=>({...T,logo_url:B.target.value})),placeholder:"https://example.com/logo.png"}),p.logo_url&&s.jsxs("div",{className:"mt-2 p-3 bg-muted/50 rounded-lg flex items-center gap-3",children:[s.jsx("img",{src:p.logo_url,alt:"Preview",className:"w-12 h-12 rounded-lg object-contain bg-white"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Preview logo"})]})]})]});case 1:return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx("div",{className:"w-16 h-16 mx-auto rounded-2xl bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center mb-4",children:s.jsx(Dr,{className:"w-8 h-8 text-primary"})}),s.jsx("h3",{className:"font-heading text-lg font-semibold",children:"Prezență Online"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Link-uri importante pentru validare și vizibilitate"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Website oficial *"}),s.jsx(qe,{value:p.website_url,onChange:B=>m(T=>({...T,website_url:B.target.value})),placeholder:"https://eduweb.ro",className:"h-11"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs(Ge,{className:"flex items-center gap-2",children:[s.jsx(Mg,{size:14,className:"text-primary"}),"Google My Business URL"]}),s.jsx(qe,{value:p.gmb_url,onChange:B=>m(T=>({...T,gmb_url:B.target.value})),placeholder:"https://g.page/eduweb sau link Google Maps"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Link-ul profilului Google Business pentru recenzii și încredere"})]})]});case 2:return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx("div",{className:"w-16 h-16 mx-auto rounded-2xl bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center mb-4",children:s.jsx(Rn,{className:"w-8 h-8 text-primary"})}),s.jsx("h3",{className:"font-heading text-lg font-semibold",children:"Rol în Ecosistem"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Cum contribuie compania la EduWeb"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Descriere scurtă"}),s.jsx(fr,{rows:3,value:p.short_description,onChange:B=>m(T=>({...T,short_description:B.target.value})),placeholder:"Scurtă descriere a companiei (1-2 propoziții)"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Rolul în ecosistemul EduWeb"}),s.jsx(fr,{rows:2,value:p.eduweb_role,onChange:B=>m(T=>({...T,eduweb_role:B.target.value})),placeholder:"Ex: Partener strategic pentru dezvoltare SEO și marketing digital"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Domenii de expertiză"}),s.jsx(qe,{value:p.expertise_areas,onChange:B=>m(T=>({...T,expertise_areas:B.target.value})),placeholder:"SEO, Marketing Digital, Web3 (separate prin virgulă)"}),p.expertise_areas&&s.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:p.expertise_areas.split(",").map((B,T)=>s.jsx("span",{className:"px-2 py-1 bg-primary/10 text-primary text-xs rounded-full",children:B.trim()},T))})]})]});case 3:return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx("div",{className:"w-16 h-16 mx-auto rounded-2xl bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center mb-4",children:s.jsx(Li,{className:"w-8 h-8 text-primary"})}),s.jsx("h3",{className:"font-heading text-lg font-semibold",children:"Setări finale"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Configurare limită articole"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Limită articole / lună"}),s.jsx(qe,{type:"number",min:0,value:p.monthly_article_limit,onChange:B=>m(T=>({...T,monthly_article_limit:parseInt(B.target.value)||0})),className:"h-11"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Numărul maxim de articole pe care partenerul le poate crea lunar"})]}),s.jsxs("div",{className:"mt-8 p-4 rounded-xl bg-muted/50 border border-border/50",children:[s.jsx("h4",{className:"font-medium mb-3",children:"Rezumat profil partener"}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Companie:"}),s.jsx("span",{className:"font-medium",children:p.name||"—"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Website:"}),s.jsx("span",{className:"font-medium truncate max-w-[200px]",children:p.website_url||"—"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Google Business:"}),s.jsx("span",{className:"font-medium",children:p.gmb_url?"✓":"—"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Limită articole:"}),s.jsxs("span",{className:"font-medium",children:[p.monthly_article_limit,"/lună"]})]})]})]})]});default:return null}};return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-5xl",children:[s.jsxs(be,{to:"/admin",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," Admin Dashboard"]}),s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"font-heading text-3xl font-bold flex items-center gap-3",children:[s.jsx(Rn,{size:28,className:"text-primary"}),"Innovation Network"]}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Gestionează companiile partenere din ecosistem"})]}),s.jsxs(sl,{open:n,onOpenChange:B=>{i(B),B||(f(null),m(MF),g(0))},children:[s.jsx(Ab,{asChild:!0,children:s.jsxs(me,{size:"lg",className:"gap-2",children:[s.jsx(Qn,{size:18})," Adaugă partener"]})}),s.jsxs(Po,{className:"max-w-lg max-h-[90vh] overflow-y-auto",onPointerDownOutside:B=>B.preventDefault(),children:[s.jsx(ol,{children:s.jsx(ll,{children:h?"Editează partener":"Adaugă partener nou"})}),s.jsx("div",{className:"flex items-center justify-between py-4 px-2",children:rS.map((B,T)=>s.jsxs("div",{className:"flex items-center",children:[s.jsx("button",{onClick:()=>T<=A&&g(T),className:`
2274                        w-10 h-10 rounded-full flex items-center justify-center transition-all
2275                        ${T===A?"bg-primary text-primary-foreground shadow-lg shadow-primary/20":T<A?"bg-primary/20 text-primary curs
2275or-pointer hover:bg-primary/30":"bg-muted text-muted-foreground"}
2276                      `,disabled:T>A,children:T<A?s.jsx(Bc,{size:16}):s.jsx(B.icon,{size:16})}),T<rS.length-1&&s.jsx("div",{className:`w-8 h-0.5 mx-1 ${T<A?"bg-primary/40":"bg-muted"}`})]},B.id))}),s.jsx(Fu,{mode:"wait",children:s.jsx(Le.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:"py-2",children:O()},A)}),s.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-border/50 mt-4",children:[s.jsxs(me,{variant:"ghost",onClick:E,disabled:A===0,className:"gap-1",children:[s.jsx(pg,{size:16})," Înapoi"]}),A<rS.length-1?s.jsxs(me,{onClick:S,disabled:!N(A),className:"gap-1",children:["Continuă ",s.jsx(hs,{size:16})]}):s.jsxs(me,{onClick:()=>b.mutate(),disabled:b.isPending||!p.name.trim(),className:"gap-2",children:[b.isPending?s.jsx(rt,{size:16,className:"animate-spin"}):s.jsx(Bc,{size:16}),h?"Salvează":"Finalizează"]})]})]})]})]}),s.jsx(sl,{open:a,onOpenChange:o,children:s.jsxs(Po,{className:"max-w-md",children:[s.jsx(ol,{children:s.jsx(ll,{children:"Invită partener"})}),s.jsxs("div",{className:"space-y-4 mt-2",children:[s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Partenerul va primi email de confirmare și va avea acces la panoul dedicat de la ",s.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded",children:"/partner"}),"."]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{children:"Email partener"}),s.jsx(qe,{type:"email",value:u,onChange:B=>d(B.target.value),placeholder:"[email protected]"})]}),s.jsxs(me,{className:"w-full",onClick:()=>j.mutate(),disabled:j.isPending||!u.trim(),children:[j.isPending?s.jsx(rt,{size:16,className:"animate-spin"}):s.jsx(Dc,{size:16}),"Trimite invitație"]})]})]})}),x?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):y.length===0?s.jsxs("div",{className:"text-center py-16 border-2 border-dashed border-border/50 rounded-2xl",children:[s.jsx(Rn,{size:48,className:"mx-auto text-muted-foreground mb-4"}),s.jsx("h3",{className:"font-heading text-lg font-semibold mb-2",children:"Nicio companie încă"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Adaugă primul partener în Innovation Network"}),s.jsxs(me,{onClick:()=>i(!0),children:[s.jsx(Qn,{size:16})," Adaugă partener"]})]}):s.jsx("div",{className:"glass-card rounded-xl overflow-hidden",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Companie"}),s.jsx(Me,{children:"Partener"}),s.jsx(Me,{children:"Limită art./lună"}),s.jsx(Me,{className:"text-right",children:"Acțiuni"})]})}),s.jsx(In,{children:y.map(B=>s.jsxs(Nt,{children:[s.jsx(Oe,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[B.logo_url?s.jsx("img",{src:B.logo_url,alt:"",className:"w-10 h-10 rounded-lg object-contain bg-muted"}):s.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(Dr,{size:18,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx(be,{to:`/innovation-network/${B.slug}`,className:"font-medium hover:text-primary transition-colors",children:B.name}),B.website_url&&s.jsx("p",{className:"text-xs text-muted-foreground",children:B.website_url.replace(/^https?:\/\//,"")})]})]})}),s.jsx(Oe,{children:B.user_id?s.jsx("span",{className:"text-xs font-medium text-primary bg-primary/10 px-2 py-1 rounded",children:"Conectat"}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"Fără cont"})}),s.jsx(Oe,{className:"text-sm",children:B.monthly_article_limit}),s.jsx(Oe,{className:"text-right",children:s.jsxs("div",{className:"flex items-center justify-end gap-1",children:[!B.user_id&&s.jsxs(me,{variant:"outline",size:"sm",onClick:()=>C(B.id),children:[s.jsx(Dc,{size:14})," Invită"]}),s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>_(B),children:s.jsx(wp,{size:16})}),s.jsx(me,{variant:"ghost",size:"icon",className:"text-destructive hover:text-destructive",onClick:()=>{confirm("Șterge compania?")&&v.mutate(B.id)},children:s.jsx(Xr,{size:16})})]})})]},B.id))})]})})]})})}const nCt="https://eduweb.ro",iCt="https://eduweb.ai",aCt=[{category:"Glosar",name:"Index Glosar",path:"/glosar",h1:"Glosar Crypto & Blockchain",keyword:"glosar crypto"},{category:"Ce este?",name:'Index „Ce este?"',path:"/ce-este",h1:"Ce Este? — Ghiduri Educaționale",keyword:"ce este crypto"},{category:"Ce este?",name:"Ce este Web3?",path:"/ce-este-web3",h1:"Ce Este Web3?",keyword:"ce este web3"},{category:"Ce este?",name:"Ce este Blockchain?",path:"/ce-este-blockchain",h1:"Ce Este Blockchain?",keyword:"ce este blockchain"},{category:"Ce este?",name:"Ce este Crypto?",path:"/ce-este-crypto",h1:"Ce Sunt Criptomonedele?",keyword:"ce sunt criptomonedele"},{category:"Ce este?",name:"Ce este Bitcoin?",path:"/ce-este-bitcoin",h1:"Ce Este Bitcoin?",keyword:"ce este bitcoin"},{category:"Ce este?",name:"Ce este Ethereum?",path:"/ce-este-ethereum",h1:"Ce Este Ethereum?",keyword:"ce este ethereum"},{category:"Ce este?",name:"Ce este Solana?",path:"/ce-este-solana",h1:"Ce Este Solana?",keyword:"ce este solana"},{category:"Ce este?",name:"Ce este BNB?",path:"/ce-este-bnb",h1:"Ce Este BNB?",keyword:"ce este bnb"},{category:"Ce este?",name:"Ce este XRP?",path:"/ce-este-xrp",h1:"Ce Este XRP?",keyword:"ce este xrp"},{category:"Ce este?",name:"Ce este Cardano?",path:"/ce-este-cardano",h1:"Ce Este Cardano?",keyword:"ce este cardano"},{category:"Ce este?",name:"Ce este Dogecoin?",path:"/ce-este-dogecoin",h1:"Ce Este Dogecoin?",keyword:"ce este dogecoin"},{category:"Ce este?",name:"Ce este Polkadot?",path:"/ce-este-polkadot",h1:"Ce Este Polkadot?",keyword:"ce este polkadot"},{category:"Ce este?",name:"Ce este Avalanche?",path:"/ce-este-avalanche",h1:"Ce Este Avalanche?",ke
2276yword:"ce este avalanche"},{category:"Ce este?",name:"Ce este Chainlink?",path:"/ce-este-chainlink",h1:"Ce Este Chainlink?",keyword:"ce este chainlink"},{category:"Criptomonede",name:"Hub Crypto",path:"/crypto",h1:"Crypto Hub",keyword:"crypto hub"},{category:"Criptomonede",name:"Prețuri Crypto",path:"/preturi-crypto",h1:"Prețuri Criptomonede",keyword:"prețuri criptomonede"},{category:"Criptomonede",name:"Convertor Crypto-RON",path:"/convertor-crypto-ron",h1:"Convertor Crypto → RON",keyword:"convertor crypto ron"},{category:"Criptomonede",name:"Cele mai bune exchange-uri",path:"/cele-mai-bune-exchange-crypto-romania",h1:"Cele Mai Bune Exchange-uri Crypto",keyword:"exchange crypto romania"},...fs.map(e=>({category:"Criptomonede",name:`${e.name} Preț`,path:`/${e.slug}`,h1:`${e.name} (${e.symbol}) — Preț Azi`,keyword:`${e.name.toLowerCase()} pret`})),{category:"Web3",name:"Studii de Caz Web3",path:"/web3-studii-de-caz",h1:"Studii de Caz Web3",keyword:"web3 studii de caz"},{category:"Web3",name:"Innovation Network",path:"/innovation-network",h1:"Innovation Network",keyword:"innovation network web3"},{category:"Blockchain",name:"Ce este Blockchain?",path:"/ce-este-blockchain",h1:"Ce Este Blockchain?",keyword:"blockchain"},{category:"NFT",name:"Articole NFT (Topic)",path:"/nft",h1:"NFT — Știri & Articole",keyword:"nft"},{category:"AI & Agenți AI",name:"Articole AI (Topic)",path:"/ai",h1:"AI — Știri & Articole",keyword:"inteligenta artificiala"},{category:"AI & Agenți AI",name:"Articole Agenți AI (Topic)",path:"/agenti-ai",h1:"Agenți AI — Știri & Articole",keyword:"agenti ai"},{category:"Marketing Digital",name:"Articole Marketing Digital (Topic)",path:"/marketing-digital",h1:"Marketing Digital — Știri & Articole",keyword:"marketing digital"},{category:"Academy",name:"Academy",path:"/academy",h1:"EduWeb Academy",keyword:"cursuri crypto"}],sCt=[{category:"Glossary",name:"Glossary Index",path:"/glossary",h1:"Crypto & Blockchain Glossary",keyword:"crypto glossary"},{category:"What is?",name:'"What is?" Index',path:"/what-is",h1:"What Is? — Educational Guides",keyword:"what is crypto"},{category:"What is?",name:"What is Web3?",path:"/what-is-web3",h1:"What Is Web3?",keyword:"what is web3"},{category:"What is?",name:"What is Blockchain?",path:"/what-is-blockchain",h1:"What Is Blockchain?",keyword:"what is blockchain"},{category:"What is?",name:"What is Crypto?",path:"/what-is-crypto",h1:"What Are Cryptocurrencies?",keyword:"what are cryptocurrencies"},{category:"What is?",name:"What is Bitcoin?",path:"/what-is-bitcoin",h1:"What Is Bitc
2276oin?",keyword:"what is bitcoin"},{category:"What is?",name:"What is Ethereum?",path:"/what-is-ethereum",h1:"What Is Ethereum?",keyword:"what is ethereum"},{category:"What is?",name:"What is Solana?",path:"/what-is-solana",h1:"What Is Solana?",keyword:"what is solana"},{category:"What is?",name:"What is BNB?",path:"/what-is-bnb",h1:"What Is BNB?",keyword:"what is bnb"},{category:"What is?",name:"What is XRP?",path:"/what-is-xrp",h1:"What Is XRP?",keyword:"what is xrp"},{category:"What is?",name:"What is Cardano?",path:"/what-is-cardano",h1:"What Is Cardano?",keyword:"what is cardano"},{category:"What is?",name:"What is Dogecoin?",path:"/what-is-dogecoin",h1:"What Is Dogecoin?",keyword:"what is dogecoin"},{category:"What is?",name:"What is Polkadot?",path:"/what-is-polkadot",h1:"What Is Polkadot?",keyword:"what is polkadot"},{category:"What is?",name:"What is Avalanche?",path:"/what-is-avalanche",h1:"What Is Avalanche?",keyword:"what is avalanche"},{category:"What is?",name:"What is Chainlink?",path:"/what-is-chainlink",h1:"What Is Chainlink?",keyword:"what is chainlink"},{category:"Crypto",name:"Crypto Hub",path:"/crypto",h1:"Crypto Hub",keyword:"crypto hub"},{category:"Crypto",name:"Crypto Prices",path:"/crypto-prices",h1:"Cryptocurrency Prices",keyword:"cryptocurrency prices"},{category:"Crypto",name:"Crypto Converter",path:"/crypto-converter",h1:"Crypto Converter",keyword:"crypto converter"},{category:"Crypto",name:"Best Crypto Exchanges",path:"/best-crypto-exchanges",h1:"Best Crypto Exchanges",keyword:"best crypto exchanges"},...fs.map(e=>({category:"Crypto",name:`${e.name} Price`,path:`/${e.slug}`,h1:`${e.name} (${e.symbol}) — Price Today`,keyword:`${e.name.toLowerCase()} price`})),{category:"Web3",name:"Web3 Case Studies",path:"/web3-case-studies",h1:"Web3 Case Studies",keyword:"web3 case studies"},{category:"Web3",name:"Innovation Network",path:"/innovation-network",h1:"Innovation Network",keyword:"innovation network web3"},{category:"Blockchain",name:"What is Blockchain?",path:"/what-is-blockchain",h1:"What Is Blockchain?",keyword:"blockchain"},{category:"NFT",name:"NFT Articles (Topic)",path:"/nft",h1:"NFT — News & Articles",keyword:"nft"},{category:"AI & AI Agents",name:"AI Articles (Topic)",path:"/ai",h1:"AI — News & Articles",keyword:"artificial intelligence"},{category:"AI & AI Agents",name:"AI Agents Articles (Topic)",path:"/ai-agents",h1:"AI Agents — News & Articles",keyword:"ai agents"},{category:"Digital Marketing",name:"Digital Marketing Articles (Topic)",path:"/digital-marketing",h1:"Digital Marketing — News & Articles",keyword:"digital marketing"},{category:"Academy",name:"Academy",path:"/academy",h1:"EduWeb Academy",keyword:"crypto courses"}],yee={Glosar:"bg-blue-500/10 text-blue-600 border-blue-500/20","Termen Glosar":"bg-blue-500/10 text-blue-600 border-blue-500/20","Ce este?":"bg-purple-500/10 text-purple-600 border-purple-500/20",Criptomonede:"bg-amber-500/10 text-amber-600 border-amber-500/20",Web3:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20",Blockchain:"bg-cyan-500/10 text-cyan-600 border-cyan-500/20",NFT:"bg-pink-500/10 text-pink-600 border-pink-500/20","AI & Agenți AI":"bg-indigo-500/10 text-indigo-600 border-indigo-500/20","Marketing Digital":"bg-orange-500/10 text-orange-600 border-orange-500/20",Academy:"bg-green-500/10 text-green-600 border-green-500/20",Glossary:"bg-blue-500/10 text-blue-600 border-blue-500/20","Glossary Term":"bg-blue-500/10 text-blue-600 border-blue-500/20","What is?":"bg-purple-500/10 text-purple-600 border-purple-500/20",Crypto:"bg-amber-500/10 text-amber-600 border-amber-500/20","AI & AI Agents":"bg-indigo-500/10 text-indigo-600 border-indigo-500/20","Digital Marketing":"bg-orange-500/10 text-orange-600 border-orange-500/20"};function oCt(){const[e,r]=w.useState("ro"),[n,i]=w.useState([]),[a,o]=w.useState([]),[l,c]=w.useState(!0),u=w.useRef(null);w.useEffect(()=>{async function g(){c(!0);const{data:y,error:x}=await G.from("glossary_terms").select("term_ro, term_en, slug").eq("is_published",!0).order("term_ro");!x&&y&&(i(y.map(b=>({category:"Termen Glosar",name:b.term_ro,path:`/glosar/${b.slug}`,h1:b.term_ro,keyword:b.term_ro.toLowerCase()}))),o(y.filter(b=>b.term_en).map(b=>({category:"Glossary Term",name:b.term_en,path:`/glossary/${b.slug}`,h1:b.term_en,keyword:b.term_en.toLowerCase()})))),c(!1)}g()},[]);const d=e==="ro"?[...aCt,...n]:[...sCt,...a],h=e==="ro"?nCt:iCt,f=()=>{const g="Categorie,Pagină,Path,H1,Cuvânt Cheie",y=d.map(_=>`"${_.category}","${_.name}","${_.path}","${_.h1}","${_.keyword}"`),x=[g,...y].join(`
2277`),b=new Blob(["\uFEFF"+x],{type:"text/csv;charset=utf-8;"}),v=URL.createObjectURL(b),j=document.createElement("a");j.href=v,j.download=`eduweb-${e}-seo-keywords.csv`,j.click(),URL.revokeObjectURL(v),ft.success("CSV exportat cu succes")},p=()=>{const g=d.map(v=>v.keyword).join(`
2278`),y=new Blob([g],{type:"text/plain;charset=utf-8;"}),x=URL.createObjectURL(y),b=document.createElement("a");b.href=x,b.download=`eduweb-${e}-h1-keywords.txt`,b.click(),URL.revokeObjectURL(x),ft.success("Cuvinte cheie H1 exportate")},m=g=>{var b;const y=(b=g.target.files)==null?void 0:b[0];if(!y)return;const x=new FileReader;x.onload=v=>{var j;try{const N=((j=v.target)==null?void 0:j.result).split(`
2279`).filter(S=>S.trim()).slice(1).map(S=>{var O;const E=((O=S.match(/"([^"]*)"/g))==null?void 0:O.map(B=>B.replace(/"/g,"")))||[];return{category:E[0]||"",name:E[1]||"",path:E[2]||"",h1:E[3]||"",keyword:E[4]||""}}).filter(S=>S.name&&S.path);N.length>0?ft.success(`${N.length} pagini importate`):ft.error("Fișierul nu conține date valide")}catch{ft.error("Eroare la importul fișierului")}},x.readAsText(y),u.current&&(u.current.value="")},A=[...new Set(d.map(g=>g.category))];return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-lg font-heading font-bold flex items-center gap-2",children:[s.jsx(BV,{className:"h-5 w-5 text-primary"}),"Pagini Principale & Cuvinte Cheie H1"]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:l?"Se încarcă...":`${d.length} pagini · ${A.length} categorii · ${e==="ro"?"eduweb.ro":"eduweb.ai"}`})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Gi,{value:e,onValueChange:g=>r(g),children:s.jsxs(Ri,{className:"h-8",children:[s.jsx(Mt,{value:"ro",className:"text-xs px-3 h-7",children:"🇷🇴 RO"}),s.jsx(Mt,{value:"en",className:"text-xs px-3 h-7",children:"🇬🇧 EN"})]})}),s.jsx("input",{ref:u,type:"file",accept:".csv",onChange:m,className:"hidden"}),s.jsxs(me,{variant:"outline",size:"sm",onClick:()=>{var g;return(g=u.current)==null?void 0:g.click()},children:[s.jsx(h4,{className:"h-3.5 w-3.5 mr-1.5"}),"Import CSV"]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:f,children:[s.jsx(Wl,{className:"h-3.5 w-3.5 mr-1.5"}),"Export CSV"]}),s.jsxs(me,{size:"sm",onClick:p,children:[s.jsx(BV,{className:"h-3.5 w-3.5 mr-1.5"}),"Export Keywords"]})]})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:A.map(g=>s.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium border ${yee[g]||"bg-muted text-muted-foreground"}`,children:[g,s.jsx("span",{className:"font-bold",children:d.filter(y=>y.category===g).length})]},g))}),s.jsx("div",{className:"rounded-lg border",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{className:"w-[120px]",children:"Categorie"}),s.jsx(Me,{className:"w-[200px]",children:"Pagină"}),s.jsx(Me,{className:"w-[200px]",children:"Path"}),s.jsx(Me,{children:"H1"}),s.jsx(Me,{children:"Keyword"})]})}),s.jsx(In,{children:d.map((g,y)=>s.jsxs(Nt,{children:[s.jsx(Oe,{children:s.jsx(at,{variant:"outline",className:`text-[10px] ${yee[g.category]||""}`,children:g.category})}),s.jsx(Oe,{className:"font-medium text-sm",children:s.jsxs("div",{className:"flex items-center gap-1",children:[g.name,s.jsx("a",{href:`${h}${g.path}`,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-primary",children:s.jsx(Yr,{className:"h-3 w-3"})})]})}),s.jsx(Oe,{className:"text-xs font-mono text-muted-foreground",children:g.path}),s.jsx(Oe,{className:"text-sm font-semibold",children:g.h1}),s.jsx(Oe,{children:s.jsx("code",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:g.keyword})})]},`${e}-${y}`))})]})})]})}const lCt="https://eduweb.ro",Zf=[{category:"Principal",name:"Homepage",path:"/",metaTitle:"EduWeb — Portal Educațional Web3, AI & Blockchain",metaDescription:"Portal educațional dedicat Web3, Blockchain, NFT, AI și Marketing Digital. Știri, analize și resurse.",h1:"Știri & Educație Web3, AI, Blockchain"},{category:"Știri & Analize",name:"Știri",path:"/stiri",metaTitle:"Știri Crypto, Web3 & AI — EduWeb",metaDescription:"Ultimele știri din lumea crypto, Web3, blockchain și inteligență artificială. Actualizări zilnice.",h1:"Ultimele Știri"},{category:"Știri & Analize",name:"Analize",path:"/analize",metaTitle:"Analize Crypto & Web3 — EduWeb",metaDescription:"Analize aprofundate despre piața crypto, proiecte blockchain și tendințe Web3.",h1:"Analize & Opinii"},{category:"Știri & Analize",name:"Podcast Arhivă",path:"/podcast",metaTitle:"Podcast Zilnic Crypto & Web3 — EduWeb",metaDescription:"Ascultă sumarele zilnice audio despre știrile crypto și Web3.",h1:"Podcast Zilnic"},{category:"Crypto",name:"Hub Crypto",path:"/crypto",metaTitle:"Crypto Hub — Prețuri, Știri și Educație | EduWeb",metaDescription:"Tot ce trebuie să știi despre crypto: prețuri live, știri, analize și ghiduri educaționale.",h1:"Crypto Hub"},{category:"Crypto",name:"Prețuri Crypto",path:"/preturi-crypto",metaTitle:"Prețuri Criptomonede în Timp Real — EduWeb",metaDescription:"Urmărește prețurile criptomonedelor în timp real: Bitcoin, Ethereum, Solana și altele.",h1:"Prețuri Criptomonede"},{category:"Crypto",name:"Convertor Crypto-RON",path:"/convertor-crypto-ron",metaTitle:"Convertor Crypto RON — Bitcoin, Ethereum în Lei | EduWeb",metaDescription:"Convertește criptomonede în RON. Calculator Bitcoin, Ethereum, Solana în lei românești.",h1:"Convertor Crypto → RON"},{category:"Crypto",name:"Cele mai bune exchange-uri",path:"/cele-mai-bune-exchange-crypto-romania",metaTitle:"Cele Mai Bune Exchange-uri Crypto România 2025 | EduWeb",metaDescription:"Comparație detaliată a celor mai bune platforme de exchange crypto disponibile în România.",h1:"Cele Mai Bune Exchange-uri Crypto"},{category:"Crypto",name:"Bitcoin Preț",path:"/bitcoin-pret-azi",metaTitle:"Bitcoin Preț Azi în RON — Grafic & Analiză | EduWeb",metaDescription:"Preț Bitcoin azi în lei (RON). Grafic, analiză zilnică și sumar AI.",h1:"Bitcoin (BTC) — Preț Azi"},{category:"Crypto",name:"Ethereum Preț",path:"/ethereum-pret-ron",metaTitle:"Ethereum Preț Azi în RON — Grafic & Analiză | EduWeb",metaDescription:"Preț Ethereum azi în lei (RON). Grafic, analiză zilnică și sumar AI.",h1:"Ethereum (ETH) — Preț Azi"},{category:"Crypto",name:"Solana Preț",path:"/solana-pret-azi",metaTitle:"Solana Preț Azi — Grafic & Analiză | EduWeb",metaDescription:"Preț Solana azi. Grafic, analiză zilnică și sumar AI.",h1:"Solana (SOL) — Preț Azi"},{category:"Crypto",name:"BNB Preț",path:"/bnb-pret-azi",metaTitle:"BNB Preț Azi — Grafic & Analiză | EduWeb",metaDescription:"Preț BNB azi. Grafic, analiză zilnică și sumar AI.",h1:"BNB — Preț Azi"},{category:"Crypto",name:"XRP Preț",path:"/xrp-pret-azi",metaTitle:"XRP Preț Azi — Grafic & Analiză | EduWeb",metaDescription:"Preț XRP azi. Grafic, analiză zilnică și sumar AI.",h1:"XRP — Preț Azi"},{category:"Crypto",name:"Cardano Preț",path:"/cardano-pret-azi",metaTitle:"Cardano Preț Azi — Grafic & Analiză | EduWeb",metaDescription:"Preț Cardano (ADA) azi. Grafic, analiză zilnică și sumar AI.",h1:"Cardano (ADA) — Preț Azi"},{category:"Crypto",name:"Dogecoin Preț",path:"/dogecoin-pret-azi",metaTitle:"Dogecoin Preț Azi — Grafic & Analiză | EduWeb",metaDescription:"Preț Dogecoin (DOGE) azi. Grafic, analiză zilnică și sumar AI.",h1:"Dogecoin (DOGE) — Preț Azi"},{category:"Crypto",name:"Polkadot Preț",path:"/polkadot-pret-azi",metaTitle:"Polkadot Preț Azi — Grafic & Analiză | EduWeb",metaDescription:"Preț Polkadot (DOT) azi. Grafic, analiză zilnică și sumar AI.",h1:"Polkadot (DOT) — Preț Azi"},{category:"Crypto",name:"Avalanche Preț",path:"/avalanche-pret-azi",metaTitle:"Avalanche Preț Azi — Grafic & Analiză | EduWeb",metaDescription:"Preț Avalanche (AVAX) azi. Grafic, analiză zilnică și sumar AI.",h1:"Avalanche (AVAX) — Preț Azi"},{category:"Crypto",name:"Chainlink Preț",path:"/chainlink-pret-azi",metaTitle:"Chainlink Preț Azi — Grafic & Analiză | EduWeb",metaDescription:"Preț Chainlink (LINK) azi. Grafic, analiză zilnică și sumar AI.",h1:"Chainlink (LINK) — Preț Azi"},{category:"Pillar Pages",name:'Index „Ce este?"',path:"/ce-este",metaTitle:"Ce Este? — Ghiduri Web3, Blockchain & Crypto | EduWeb",metaDescription:"Ghiduri complete despre Web3, Blockchain, Bitcoin și criptomonede. Totul explicat simplu.",h1:"Ce Este? — Ghiduri Educaționale"},{category:"Pillar Pages",name:"Ce este Web3?",path:"/ce-este-web3",metaTitle:"Ce Este Web3? Ghid Complet 2025 | EduWeb",metaDescription:"Află ce este Web3, cum funcționează și de ce este important. Ghid complet pentru începători.",h1:"Ce Este Web3?"},{category:"Pillar Pages",name:"Ce este Blockchain?",path:"/ce-este-blockchain",metaTitle:"Ce Este Blockchain? Ghid Complet 2025 | EduWeb",metaDescription:"Află ce este blockchain, cum funcționează tehnologia și aplicațiile sale practice.",h1:"Ce Este Blockchain?"},{category:"Pillar Pages",name:"Ce este Crypto?",path:"/ce-este-crypto",metaTitle:"Ce Sunt Criptomonedele? Ghid Complet 2025 | EduWeb",metaDescription:"Ghid complet despre criptomonede: ce sunt, cum funcționează și cum le poți folosi.",h1:"Ce Sunt Criptomonedele?"},{category:"Pillar Pages",name:"Ce este Bitcoin?",path:"/ce-este-bitcoin",metaTitle:"Ce Este Bitcoin? Ghid Complet 2025 | EduWeb",metaDescription:"Totul despre Bitcoin: ce este, cum funcționează, de ce este important. Ghid complet.",h1:"Ce Este Bitcoin?"},{category:"Pillar Pages",name:"Ce este Ethereum?",path:"/ce-este-ethereum",metaTitle:"Ce Este Ethereum? Ghid Complet 2025 | EduWeb",metaDescription:"Totul despre Ethereum: smart contracts, DeFi, NFT-uri. Ghid complet pentru începători.",h1:"Ce Este Ethereum?"},{category:"Pillar Pages",name:"Ce este Solana?",path:"/ce-este-solana",metaTitle:"Ce Este Solana? Ghid Complet 2025 | EduWeb",metaDescription:"Totul despre Solana: blockchain rapid, ecosistem DeFi și NFT. Ghid complet.",h1:"Ce Este Solana?"},{category:"Pillar Pages",name:"Ce este BNB?",path:"/ce-este-bnb",metaTitle:"Ce Este BNB? Ghid Complet 2025 | EduWeb",metaDescription:"Totul despre BNB și ecosistemul Binance Smart Chain. Ghid complet.",h1:"Ce Este BNB?"},{category:"Pillar Pages",name:"Ce este XRP?",path:"/ce-este-xrp",metaTitle:"Ce Este XRP? Ghid Complet 2025 | EduWeb",metaDescription:"Totul despre XRP și Ripple: plăți internaționale rapide. Ghid complet.",h1:"Ce Este XRP?"},{category:"Pillar Pages",name:"Ce este Cardano?",path:"/ce-este-cardano",metaTitle:"Ce Este Cardano? Ghid Complet 2025 | EduWeb",metaDescription:"Totul despre Cardano (ADA): blockchain bazat pe cercetare academică. Ghid complet.",h1:"Ce Este Cardano?"},{category:"Pillar Pages",name:"Ce este Dogecoin?",path:"/ce-este-dogecoin",metaTitle:"Ce Este Dogecoin? Ghid Complet 2025 | EduWeb",metaDescription:"Totul despre Dogecoin: de la meme la criptomonedă populară. Ghid complet.",h1:"Ce Este Dogecoin?"},{category:"Pillar Pages",name:"Ce este Polkadot?",path:"/ce-este-polkadot",metaTitle:"Ce Este Polkadot? Ghid Complet 2025 | EduWeb",metaDescription:"Totul despre Polkadot: interoperabilitate blockchain. Ghid complet.",h1:"Ce Este Polkadot?"},{category:"Pillar Pages",name:"Ce este Avalanche?",path:"/ce-este-avalanche",metaTitle:"Ce Este Avalanche? Ghid Complet 2025 | EduWeb",metaDescription:"Totul despre Avalanche (AVAX): blockchain rapid și scalabil. Ghid complet.",h1:"Ce Este Avalanche?"},{category:"Pillar Pages",name:"Ce este Chainlink?",path:"/ce-este-chainlink",metaTitle:"Ce 
2279Este Chainlink? Ghid Complet 2025 | EduWeb",metaDescription:"Totul despre Chainlink (LINK): oracle-uri descentralizate. Ghid complet.",h1:"Ce Este Chainlink?"},{category:"Academy",name:"Academy",path:"/academy",metaTitle:"Academy — Cursuri Web3, Blockchain & AI | EduWeb",metaDescription:"Cursuri gratuite și premium despre Web3, Blockchain, AI și Marketing Digital. Învață de la experți.",h1:"EduWeb Academy"},{category:"Academy",name:"Glosar Index",path:"/glosar",metaTitle:"Glosar Crypto & Blockchain — Termeni Explicați | EduWeb",metaDescription:"Glosar complet cu termeni din crypto, blockchain și Web3. Definiții clare și ușor de înțeles.",h1:"Glosar Crypto & Blockchain"},{category:"Web3 Case Studies",name:"Studii de Caz Web3",path:"/web3-studii-de-caz",metaTitle:"Studii de Caz Web3 — Implementări Reale | EduWeb",metaDescription:"Studii de caz despre implementări reale Web3 în business, educație și administrație publică.",h1:"Studii de Caz Web3"},{category:"Innovation Network",name:"Innovation Network",path:"/innovation-network",metaTitle:"Innovation Network — Parteneri Web3 & AI | EduWeb",metaDescription:"Rețeaua de inovare EduWeb: companii și experți care contribuie la ecosistemul Web3 și AI.",h1:"Innovation Network"},{category:"Instituțional",name:"Despre Noi",path:"/despre-noi",metaTitle:"Despre EduWeb — Cine Suntem | EduWeb",metaDescription:"Află cine suntem, misiunea și viziunea EduWeb. Portal educațional Web3, AI & Blockchain.",h1:"Despre EduWeb"},{category:"Instituțional",name:"Contact",path:"/contact",metaTitle:"Contact — EduWeb",metaDescription:"Contactează echipa EduWeb. Suntem aici să te ajutăm cu întrebări despre Web3, crypto și AI.",h1:"Contact"},{category:"Instituțional",name:"Termeni și Condiții",path:"/termeni",metaTitle:"Termeni și Condiții — EduWeb",metaDescription:"Termenii și condițiile de utilizare ale platformei EduWeb.",h1:"Termeni și Condiții"},{category:"Instituțional",name:"Politica de Confidențialitate",path:"/confidentialitate",metaTitle:"Politica de Confidențialitate — EduWeb",metaDescription:"Politica de confidențialitate și protecția datelor personale pe EduWeb.",h1:"Politica de Confidențialitate"},{category:"Dinamice",name:"Articol individual (RO)",path:"/articol/:slug",metaTitle:"[Titlu articol] | EduWeb",metaDescription:"[Meta description generat din summary_ro / primele 160 caractere]",h1:"[Titlul articolului din DB]"},{category:"Dinamice",name:"Articol individual (EN)",path:"/article/:slug",metaTitle:"[Article title] | EduWeb",metaDescription:"[Meta description from summary_en / first 160 chars]",h1:"[Article title from DB]"},{category:"Dinamice",name:"Curs individual",path:"/academy/:slug",metaTitle:"[Titlu curs] | EduWeb Academy",metaDescription:"[short_description din DB]",h1:"[Titlul cursului]"},{category:"Dinamice",name:"Termen Glosar",path:"/glosar/:slug",metaTitle:"[Termen] — Definiție & Explicație | EduWeb",metaDescription:"[short_def_ro din DB]",h1:"[term_ro din DB]"},{category:"Dinamice",name:"Autor individual",path:"/autor/:slug",metaTitle:"[Nume autor] — Autor EduWeb",metaDescription:"[Bio scurtă din DB]",h1:"[Numele autorului]"},{category:"Dinamice",name:"Studiu de Caz detaliu",path:"/web3-studii-de-caz/:slug",metaTitle:"[Titlu studiu] | EduWeb",metaDescription:"[summary_ro din DB]",h1:"[Titlul studiului]"},{category:"Dinamice",name:"Partener Innovation Network",path:"/innovation-network/:slug",metaTitle:"[Nume companie] — Innovation Network | EduWeb",metaDescription:"[short_description din DB]",h1:"[Numele companiei]"},{category:"Dinamice",name:"Pagină Topic",path:"/:topic",metaTitle:"[Topic Name] — Știri & Articole | EduWeb",metaDescription:"[Descriere generată per topic]",h1:"[Numele topicului]"}],cCt=[...new Set(Zf.map(e=>e.category))];function vee({value:e,maxLen:r}){if(e.startsWith("["))return s.jsx(at,{variant:"outline",className:"text-xs",children:"Dinamic"});const i=e.length,a=i>0&&i<=r;return s.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[a?s.jsx(hn,{className:"h-3.5 w-3.5 text-green-500"}):s.jsx(Tu,{className:"h-3.5 w-3.5 text-amber-500"}),s.jsxs("span",{className:it(a?"text-muted-foreground":"text-amber-600 font-medium"),children:[i," car."]})]})}function uCt(){const[e,r]=w.useState(""),[n,i]=w.useState("all"),a=w.useMemo(()=>{let l=Zf;if(n!=="all"&&(l=l.filter(c=>c.category===n)),e.trim()){const c=e.toLowerCase();l=l.filter(u=>u.name.toLowerCase().includes(c)||u.path.toLowerCase().includes(c)||u.metaTitle.toLowerCase().includes(c)||u.h1.toLowerCase().includes(c))}return l},[e,n]),o=w.useMemo(()=>{const l=Zf.filter(d=>!d.metaTitle.startsWith("[")).length,c=Zf.filter(d=>!d.metaTitle.startsWith("[")&&d.metaTitle.length<=60&&d.metaTitle.length>0).length,u=Zf.filter(d=>!d.metaDescription.startsWith("[")&&d.metaDescription.length<=160&&d.metaDescription.length>0).length;return{total:l,titleOk:c,descOk:u}},[]);return s.jsx(xr,{children:s.jsxs("div",{className:"p-4 md:p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-heading font-bold",children:"SEO Overview"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Sumar meta title, meta description și H1 pentru toate paginile — vizibil de Google și LLM-uri."})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[s.jsx("div",{className:"text-2xl font-bold",children:Zf.length}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Total pagini catalogate"})]}),s.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[s.jsxs("div",{className:"text-2xl font-bold text-green-600",children:[o.titleOk,"/",o.total]}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Meta Title ≤ 60 car."})]}),s.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[s.jsxs("div",{className:"text-2xl font-bold text-green-600",children:[o.descOk,"/",o.total]}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Meta Desc ≤ 160 car."})]})]}),s.jsxs("div",{className:"relative max-w-md",children:[s.jsx(ul,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută pagină, path sau meta title...",value:e,onCh
2279ange:l=>r(l.target.value),className:"pl-9"})]}),s.jsxs(Gi,{value:n,onValueChange:i,children:[s.jsxs(Ri,{className:"flex flex-wrap h-auto gap-1",children:[s.jsxs(Mt,{value:"all",className:"text-xs",children:["Toate (",Zf.length,")"]}),cCt.map(l=>s.jsxs(Mt,{value:l,className:"text-xs",children:[l," (",Zf.filter(c=>c.category===l).length,")"]},l))]}),s.jsx(er,{value:n,className:"mt-4",children:s.jsx("div",{className:"rounded-lg border",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{className:"w-[180px]",children:"Pagină"}),s.jsx(Me,{className:"w-[140px]",children:"Path"}),s.jsx(Me,{children:"Meta Title"}),s.jsx(Me,{className:"w-[60px]",children:"Len"}),s.jsx(Me,{children:"Meta Description"}),s.jsx(Me,{className:"w-[60px]",children:"Len"}),s.jsx(Me,{children:"H1"})]})}),s.jsxs(In,{children:[a.map((l,c)=>s.jsxs(Nt,{children:[s.jsxs(Oe,{className:"font-medium text-sm",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[l.name,!l.path.includes(":")&&s.jsx("a",{href:`${lCt}${l.path}`,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-primary",children:s.jsx(Yr,{className:"h-3 w-3"})})]}),s.jsx(at,{variant:"secondary",className:"text-[10px] mt-0.5",children:l.category})]}),s.jsx(Oe,{className:"text-xs font-mono text-muted-foreground",children:l.path}),s.jsx(Oe,{className:"text-xs max-w-[200px]",children:s.jsx("span",{className:"line-clamp-2",children:l.metaTitle})}),s.jsx(Oe,{children:s.jsx(vee,{value:l.metaTitle,maxLen:60})}),s.jsx(Oe,{className:"text-xs max-w-[250px]",children:s.jsx("span",{className:"line-clamp-2",children:l.metaDescription})}),s.jsx(Oe,{children:s.jsx(vee,{value:l.metaDescription,maxLen:160})}),s.jsx(Oe,{className:"text-xs font-medium",children:l.h1})]},c)),a.length===0&&s.jsx(Nt,{children:s.jsx(Oe,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"Nicio pagină găsită pentru căutarea curentă."})})]})]})})})]}),s.jsx("div",{className:"border-t pt-6",children:s.jsx(oCt,{})})]})})}function dCt(){const{toast:e}=wn(),r=Kr(),[n,i]=w.useState(""),{data:a,isLoading:o}=Xe({queryKey:["generated-media"],queryFn:async()=>{const{data:d,error:h}=await G.from("generated_media").select("*").order("created_at",{ascending:!1}).limit(200);if(h)throw h;return d}}),l=An({mutationFn:async d=>{const{error:h}=await G.from("generated_media").delete().eq("id",d);if(h)throw h},onSuccess:()=>{r.invalidateQueries({queryKey:["generated-media"]}),e({title:"Imaginea a fost ștearsă."})}}),c=d=>{navigator.clipboard.writeText(d),e({title:"URL copiat în clipboard."})},u=a==null?void 0:a.filter(d=>{var h,f;return!n||d.file_name.toLowerCase().includes(n.toLowerCase())||((h=d.prompt)==null?void 0:h.toLowerCase().includes(n.toLowerCase()))||((f=d.category)==null?void 0:f.toLowerCase().includes(n.toLowerCase()))});return s.jsx(xr,{children:s.jsxs("div",{className:"p-6 max-w-6xl",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsx("h1",{className:"font-heading text-2xl font-bold",children:"Galerie Media Generate"}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[(u==null?void 0:u.length)||0," imagini"]})]}),s.jsx(qe,{placeholder:"Caută după nume, prompt sau categorie...",value:n,onChange:d=>i(d.target.value),className:"mb-6 max-w-md"}),o?s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(rt,{className:"animate-spin h-8 w-8 text-muted-foreground"})}):u!=null&&u.length?s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:u.map(d=>s.jsxs("div",{className:"group rounded-xl border bg-card overflow-hidden hover:shadow-lg transition-shadow",children:[s.jsx("div",{className:"aspect-video bg-muted relative overflow-hidden",children:s.jsx("img",{src:d.file_url,alt:d.file_name,className:"w-full h-full object-cover",loading:"lazy"})}),s.jsxs("div",{className:"p-3",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:d.file_name}),d.prompt&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mt-1",children:d.prompt}),d.category&&d.category!=="general"&&s.jsx("span",{className:"inline-block text-xs bg-primary/10 text-primary px-2 py-0.5 rounded mt-1",children:d.category}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:new Date(d.created_at).toLocaleDateString("ro-RO")}),s.jsxs("div",{className:"flex gap-1 mt-2",children:[s.jsx(me,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>c(d.file_url),children:s.jsx(Jh,{className:"h-3 w-3"})}),s.jsx(me,{size:"sm",variant:"ghost",className:"h-7 px-2",asChild:!0,children:s.jsx("a",{href:d.file_url,target:"_blank",rel:"noopener noreferrer",download:!0,children:s.jsx(Wl,{className:"h-3 w-3"})})}),s.jsx(me,{size:"sm",variant:"ghost",className:"h-7 px-2 text-destructive hover:text-destructive",onClick:()=>l.mutate(d.id),children:s.jsx(Xr,{className:"h-3 w-3"})})]})]})]},d.id))}):s.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-muted-foreground",children:[s.jsx(il,{className:"h-12 w-12 mb-3"}),s.jsx("p",{children:"Nu există imagini generate încă."})]})]})})}const hCt=["/","/stiri","/analize","/academy","/crypto","/preturi-crypto","/convertor-crypto-ron","/cele-mai-bune-exchange-crypto-romania","/podcast","/glosar","/ce-este","/ce-este-web3","/ce-este-blockchain","/ce-este-crypto","/web3-studii-de-caz","/innovation-network","/despre-noi","/contact","/termeni","/confidentialitate"],bee=["web3","blockchain","nft","validare-nft","ai","digital-marketing","e-learning"],wee=10,jee=10;function fCt(){const{data:e,isLoading:r}=Xe({queryKey:["sitemap-posts-count"],queryFn:async()=>{const{count:x}=await G.from("posts").select("id",{count:"exact",head:!0}).eq("status","published");return x||0}}),{data:n,isLoading:i}=Xe({queryKey:["sitemap-glossary-count"],queryFn:async()=>{const{count:x}=await G.from("glossary_terms").select("id",{count:"exact",head:!0}).eq("is_published",!0);return x||0}}),{data:a,isLoading:o}=Xe({queryKey:["sitemap-courses-count"],queryFn:async()=>{const{count:x}=await G.from("courses").select("id",{count:"exact",head:!0}).eq("is_published",!0);return x||0}}),{data:l,isLoading:c}=Xe({queryKey:["sitemap-cases-count"],queryFn:async()=>{const{count:x}=await G.from("web3_case_studies").select("id",{count:"exact",head:!0}).eq("status","published");return x||0}}),{data:u,isLoading:d}=Xe({queryKey:["sitemap-partners-count"],queryFn:async()=>{const{count:x}=await G.from("innovation_network").select("id",{count:"exact",head:!0}).eq("is_published",!0);return x||0}}),{data:h,isLoading:f}=Xe({queryKey:["sitemap-authors-count"],queryFn:async()=>{const{count:x}=await G.from("authors").select("id",{count:"exact",head:!0});return x||0}}),p=bee.length+wee+jee,m=[{name:"Pagini Statice",file:"sitemap-pages.xml",icon:s.jsx(Dr,{className:"h-5 w-5"}),count:hCt.length,loading:!1,details:"Homepage, Știri, Analize, Academy, Crypto, Podcast, Glosar, Ce este?, Contact, etc."},{name:"Articole Publicate",file:"sitemap-posts.xml",icon:s.jsx(us,{className:"h-5 w-5"}),count:e??null,loading:r,details:'Toate articolele cu status „published" din baza de date. RO: /articol/[slug], EN: /article/[slug_en]'},{name:"Categorii & Pagini Preț",file:"sitemap-categories.xml",icon:s.jsx(lke,{className:"h-5 w-5"}),count:p,loading:!1,details:`${bee.length} topic-uri + ${wee} pagini preț crypto + ${jee} pagini pilon „Ce este?"`},{name:"Resurse (Glosar + Studii + Parteneri + Autori)",file:"sitemap-resources.xml",icon:s.jsx(yr,{className:"h-5 w-5"}),count:(n??0)+(l??0)+(u??0)+(h??0),loading:i||c||d||f,details:"Compus din 4 categorii de resurse:"},{name:"Cursuri Academy",file:"sitemap-courses.xml",icon:s.jsx(Rr,{className:"h-5 w-5"}),count:a??null,loading:o,details:"Cursuri publicate: /academy/[slug]"}],A=m.reduce((x,b)=>x+(b.count??0),0),g=m.some(x=>x.loading),y=[{label:"Termeni Glosar",count:n,path:"/glosar/[slug]"},{label:"Studii de Caz Web3",count:l,path:"/web3-studii-de-caz/[slug]"},{label:"Parteneri Innovation Network",count:u,path:"/innovation-network/[slug]"},{label:"Autori",count:h,path:"/autor/[slug]"}];return s.jsx(xr,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Sumar Sitemap"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Vizualizare completă a URL-urilor indexate în sitemap-urile XML pentru eduweb.ro și eduweb.ai."})]}),s.jsx(st,{className:"border-primary/20 bg-primary/5",children:s.jsx(ot,{className:"py-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Xh,{className:"h-6 w-6 text-primary"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Total URL-uri indexate per domeniu"}),s.jsx("p",{className:"text-3xl font-bold",children:g?s.jsx(Bo,{className:"h-9 w-24 inline-block"}
2279):A.toLocaleString()})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("a",{href:"https://eduweb.ro/sitemap.xml",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs px-3 py-1.5 rounded-md bg-background border border-border hover:bg-muted transition-colors",children:["eduweb.ro ",s.jsx(Yr,{className:"h-3 w-3"})]}),s.jsxs("a",{href:"https://eduweb.ai/sitemap.xml",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs px-3 py-1.5 rounded-md bg-background border border-border hover:bg-muted transition-colors",children:["eduweb.ai ",s.jsx(Yr,{className:"h-3 w-3"})]})]})]})})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:m.map(x=>{var b;return s.jsxs(st,{className:"relative overflow-hidden",children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Ht,{className:"text-base flex items-center gap-2",children:[x.icon,x.name]}),s.jsx(at,{variant:"secondary",className:"text-xs font-mono",children:x.loading?"...":(b=x.count)==null?void 0:b.toLocaleString()})]})}),s.jsxs(ot,{className:"pt-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:x.details}),x.file==="sitemap-resources.xml"&&s.jsx("div",{className:"space-y-1 mt-2 border-t border-border/50 pt-2",children:y.map(v=>s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsx("span",{className:"text-muted-foreground",children:v.label}),s.jsx("span",{className:"font-mono font-medium",children:v.count??"..."})]},v.label))}),s.jsxs("div",{className:"mt-3 flex gap-2",children:[s.jsxs("a",{href:`https://eduweb.ro/${x.file}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[10px] px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors text-muted-foreground",children:[".ro ",s.jsx(Yr,{className:"h-2.5 w-2.5"})]}),s.jsxs("a",{href:`https://eduweb.ai/${x.file}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[10px] px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors text-muted-foreground",children:[".ai ",s.jsx(Yr,{className:"h-2.5 w-2.5"})]})]})]})]},x.file)})}),s.jsx(st,{children:s.jsx(ot,{className:"py-4",children:s.jsxs("div",{className:"flex gap-3",children:[s.jsx(Tu,{className:"h-5 w-5 text-amber-500 shrink-0 mt-0.5"}),s.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Notă:"})," Numerele de mai sus reflectă datele din baza de date. Sitemap-urile sunt generate dinamic de edge function-ul ",s.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:"sitemap"}),"."]}),s.jsxs("p",{children:["După modificări în Cloudflare Workers, efectuează ",s.jsx("strong",{children:"Purge Cache"})," în Cloudflare Dashboard → Caching → Configuration → Purge Everything."]}),s.jsxs("p",{children:["Domeniile .ro și .ai au sitemap-uri separate cu URL-uri specifice fiecărui domeniu (RO: ",s.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:"/articol/"}),", EN: ",s.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:"/article/"}),")."]})]})]})})})]})})}function mCt(){const[e,r]=w.useState([]),[n,i]=w.useState(!0),[a,o]=w.useState(""),[l,c]=w.useState("all"),[u,d]=w.useState("created_at"),[h,f]=w.useState("desc");w.useEffect(()=>{p()},[]);const p=async()=>{i(!0);const[x,b,v,j]=await Promise.all([G.from("profiles").select("user_id, display_name, email, avatar_url, created_at"),G.from("user_edu_coins").select("user_id, balance, total_earned, validated_edu_score, login_streak, last_login_date, learning_score, community_score, passive_score, growth_score"),G.from("user_roles").select("user_id, role"),G.from("enrollments").select("user_id")]),_=x.data??[],C=b.data??[],N=v.data??[],S=j.data??[],E=new Map(C.map(F=>[F.user_id,F])),O=new Map;N.forEach(F=>{const I=O.get(F.user_id)??[];I.push(F.role),O.set(F.user_id,I)});const B=new Map;S.forEach(F=>
2279{B.set(F.user_id,(B.get(F.user_id)??0)+1)});const T=_.map(F=>{const I=E.get(F.user_id);return{user_id:F.user_id,display_name:F.display_name,email:F.email??null,avatar_url:F.avatar_url,created_at:F.created_at,balance:(I==null?void 0:I.balance)??0,total_earned:(I==null?void 0:I.total_earned)??0,validated_edu_score:(I==null?void 0:I.validated_edu_score)??0,login_streak:(I==null?void 0:I.login_streak)??0,last_login_date:(I==null?void 0:I.last_login_date)??null,learning_score:(I==null?void 0:I.learning_score)??0,community_score:(I==null?void 0:I.community_score)??0,passive_score:(I==null?void 0:I.passive_score)??0,growth_score:(I==null?void 0:I.growth_score)??0,enrollments_count:B.get(F.user_id)??0,roles:O.get(F.user_id)??[]}});r(T),i(!1)},m=x=>{u===x?f(b=>b==="asc"?"desc":"asc"):(d(x),f("desc"))},A=w.useMemo(()=>{let x=e;if(a){const b=a.toLowerCase();x=x.filter(v=>{var j,_;return(((j=v.display_name)==null?void 0:j.toLowerCase())??"").includes(b)||(((_=v.email)==null?void 0:_.toLowerCase())??"").includes(b)||v.user_id.toLowerCase().includes(b)})}return l!=="all"&&(l==="user"?x=x.filter(b=>b.roles.length===0):x=x.filter(b=>b.roles.includes(l))),x=[...x].sort((b,v)=>{let j=b[u],_=v[u];return u==="display_name"&&(j=(j??"").toLowerCase(),_=(_??"").toLowerCase()),j<_?h==="asc"?-1:1:j>_?h==="asc"?1:-1:0}),x},[e,a,l,u,h]),g=w.useMemo(()=>({total:e.length,admins:e.filter(x=>x.roles.includes("admin")).length,partners:e.filter(x=>x.roles.includes("partner")).length,activeToday:e.filter(x=>x.last_login_date===new Date().toISOString().split("T")[0]).length,withCoins:e.filter(x=>x.balance>0).length}),[e]),y=({field:x,label:b})=>s.jsxs(me,{variant:"ghost",size:"sm",className:"h-auto p-0 font-medium hover:bg-transparent",onClick:()=>m(x),children:[b,s.jsx(Woe,{className:`ml-1 h-3 w-3 ${u===x?"text-primary":"text-muted-foreground/50"}`})]});return s.jsx(xr,{children:s.jsxs("div",{className:"p-6 max-w-7xl",children:[s.jsxs("h1",{className:"font-heading text-2xl font-bold mb-6 flex items-center gap-2",children:[s.jsx(Rn,{className:"h-6 w-6"})," Utilizatori"]}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3 mb-6",children:[{label:"Total utilizatori",value:g.total,icon:Rn},{label:"Admini",value:g.admins,icon:Rn},{label:"Parteneri",value:g.partners,icon:Rn},{label:"Activi azi",value:g.activeToday,icon:cE},{label:"Cu EduCoins",value:g.withCoins,icon:Wi}].map(x=>s.jsxs("div",{className:"rounded-xl border bg-card p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[s.jsx(x.icon,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:x.label})]}),s.jsx("p",{className:"text-xl font-bold",children:x.value})]},x.label))}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-4",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(ul,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(qe,{placeholder:"Caută după nume, email sau ID...",value:a,onChange:x=>o(x.target.value),className:"pl-9"})]}),s.jsxs(Cn,{value:l,onValueChange:c,children:[s.jsx(yn,{className:"w-[180px]",children:s.jsx(Nn,{placeholder:"Toate rolurile"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:"Toate rolurile"}),s.jsx(_t,{value:"admin",children:"Admini"}),s.jsx(_t,{value:"partner",children:"Parteneri"}),s.jsx(_t,{value:"user",children:"Utilizatori simpli"})]})]})]}),s.jsx("div",{className:"rounded-xl border bg-card overflow-auto",children:n?s.jsx("div",{className:"p-12 text-center text-muted-foreground",children:"Se încarcă..."}):s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:s.jsx(y,{field:"display_name",label:"Utilizator"})}),s.jsx(Me,{children:"Email"}),s.jsx(Me,{children:"Rol"}),s.jsx(Me,{children:s.jsx(y,{field:"created_at",label:"Creat la"})}),s.jsx(Me,{className:"text-right",children:s.jsx(y,{field:"balance",label:"EduCoins"})}),s.jsx(Me,{className:"text-right",children:s.jsx(y,{field:"total_earned",label:"Total câștigat"})}),s.jsx(Me,{className:"text-right",children:s.jsx(y,{field:"validated_edu_score",label:"Scor validat"})}),s.jsx(Me,{className:"text-right",children:s.jsx(y,{field:"login_streak",label:"Streak"})}),s.jsx(Me,{className:"text-right",children:"Cursuri"}),s.jsx(Me,{children:"Ultimul login"})]})}),s.jsx(In,{children:A.length===0?s.jsx(Nt,{children:s.jsx(Oe,{colSpan:10,className:"text-center py-8 text-muted-foreground",children:"Niciun utilizator găsit."})}):A.map(x=>{var b,v;return s.jsxs(Nt,{children:[s.jsx(Oe,{children:s.jsxs("div",{className:"flex items-center gap-2",children:[x.avatar_url?s.jsx("img",{src:x.avatar_url,alt:"",className:"h-7 w-7 rounded-full object-cover"}):s.jsx("div",{className:"h-7 w-7 rounded-full bg-muted flex items-center justify-center text-xs font-bold text-muted-foreground",children:(b=(x.display_name??"?")[0])==null?void 0:b.toUpperCase()}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium leading-tight",children:x.display_name||((v=x.email)==null?void 0:v.split("@")[0])||"Anonim"}),s.jsxs("p",{className:"text-[10px] text-muted-foreground font-mono",children:[x.user_id.slice(0,8),"…"]})]})]})}),s.jsx(Oe,{className:"text-sm text-muted-foreground",children:x.email||"—"}),s.jsx(Oe,{children:x.roles.length>0?x.roles.map(j=>s.jsx(at,{variant:j==="admin"?"default":"secondary",className:"mr-1 text-[10px]",children:j},j)):s.jsx("span",{className:"text-xs text-muted-foreground",children:"user"})}),s.jsx(Oe,{className:"text-sm",children:s.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[s.jsx(Ja,{className:"h-3 w-3"}
2279),al(new Date(x.created_at),"dd MMM yyyy",{locale:Md})]})}),s.jsx(Oe,{className:"text-right font-medium",children:x.balance}),s.jsx(Oe,{className:"text-right text-muted-foreground",children:x.total_earned}),s.jsx(Oe,{className:"text-right",children:s.jsxs("span",{className:"flex items-center justify-end gap-1",children:[s.jsx(oa,{className:"h-3 w-3 text-primary"}),x.validated_edu_score]})}),s.jsx(Oe,{className:"text-right",children:x.login_streak>0?s.jsxs("span",{className:"flex items-center justify-end gap-1",children:[s.jsx(cE,{className:"h-3 w-3 text-orange-500"})," ",x.login_streak]}):s.jsx("span",{className:"text-muted-foreground",children:"0"})}),s.jsx(Oe,{className:"text-right",children:x.enrollments_count}),s.jsx(Oe,{className:"text-sm text-muted-foreground",children:x.last_login_date?al(new Date(x.last_login_date),"dd MMM yyyy",{locale:Md}):"—"})]},x.user_id)})})]})}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-3",children:["Se afișează ",A.length," din ",e.length," utilizatori."]})]})})}const P7=3;function pCt(e){const r=e.trim().split(/\s+/);if(r.length<5)return{hour:"--",minute:"--",raw:e};const n=r[0],i=r[1];if(i.includes("*")||i.includes("/"))return{hour:i,minute:n,raw:e};const o=(parseInt(i,10)+P7)%24;return{hour:String(o).padStart(2,"0"),minute:n.padStart(2,"0"),raw:e}}function ACt(e,r,n){const i=n.trim().split(/\s+/),a=(e-P7+24)%24;return i[0]=String(r),i[1]=String(a),i.join(" ")}const gCt={"facebook-post-morning":"📰 FB — Articol Top (dimineața)","facebook-post-afternoon":"❓ FB — Ce este? (după-amiaza)","facebook-post-evening":"🎓 FB — Educație & CTA (seara)","fetch-rss-hourly":"📡 Fetch RSS (la fiecare oră)","generate-briefs-every-2h":"🤖 Generare AI Briefs (la 2 ore)","generate-daily-podcast":"🎙️ Podcast Zilnic (+auto FB post)","sync-glossary-daily":"📖 Sincronizare Glosar","course-reminders-daily":"📚 Reminder Curs (după 7 zile)","newsletter-weekly":"📬 Newsletter Săptămânal","newsletter-monthly":"📬 Newsletter Lunar"};function xCt(){const[e,r]=w.useState([]),[n,i]=w.useState(!0),[a,o]=w.useState(null),l=async()=>{i(!0);try{const{data:f,error:p}=await G.rpc("get_cron_jobs");if(p)throw p;const m=f.map(A=>{const g=pCt(A.schedule);return{jobid:A.jobid,jobname:A.jobname,schedule:A.schedule,active:A.active,roHour:g.hour,roMinute:g.minute}});r(m)}catch(f){ft.error("Nu am putut încărca cron jobs: "+f.message)}finally{i(!1)}};w.useEffect(()=>{l()},[]);const c=f=>{const p=f.schedule.trim().split(/\s+/);return p.length>=5&&!p[1].includes("*")&&!p[1].includes("/")},u=async f=>{const p=parseInt(f.roHour,10),m=parseInt(f.roMinute,10);if(isNaN(p)||p<0||p>23||isNaN(m)||m<0||m>59){ft.error("Ora trebuie să fie între 00:00 și 23:59");return}o(f.jobid);try{const A=ACt(p,m,f.schedule),{error:g}=await G.rpc("update_cron_schedule",{p_jobid:f.jobid,p_schedule:A});if(g)throw g;ft.success(`Programare actualizată: ${f.jobname}`),await l()}catch(A){ft.error("Eroare la salvare: "+A.message)}finally{o(null)}},d=async f=>{try{const{error:p}=await G.rpc("toggle_cron_job",{p_jobid:f.jobid,p_active:!f.active});if(p)throw p;ft.success(`${f.jobname} ${f.active?"dezactivat":"activat"}`),await l()}catch(p){ft.error("Eroare: "+p.message)}},h=(f,p,m)=>{r(A=>A.map(g=>g.jobid===f?{...g,[p]:m}:g))};return s.jsx(xr,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Cron Jobs"}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Gestionează programările automate. Orele sunt afișate în fusul orar al României (UTC+",P7,")."]})]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:l,disabled:n,children:[s.jsx(ef,{className:`h-4 w-4 mr-2 ${n?"animate-spin":""}`}),"Reîncarcă"]})]}),s.jsxs("div",{className:"grid gap-4",children:[e.map(f=>{const p=c(f),m=gCt[f.jobname]||f.jobname;return s.jsx(st,{className:f.active?"":"opacity-60",children:s.jsx(ot,{className:"p-4",children:s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-4",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"font-medium text-sm truncate",children:m}),s.jsx(at,{variant:f.active?"default":"secondary",className:"text-xs shrink-0",children:f.active?"Activ":"Inactiv"})]}),s.jsxs("code",{className:"text-xs text-muted-foreground",children:[f.schedule," (UTC)"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ki,{className:"h-4 w-4 text-muted-foreground shrink-0"}),p?s.jsxs(s.Fragment,{children:[s.jsx(qe,{className:"w-16 text-center h-9",value:f.roHour,onCh
2279ange:A=>h(f.jobid,"roHour",A.target.value),maxLength:2,placeholder:"HH"}),s.jsx("span",{className:"font-bold",children:":"}),s.jsx(qe,{className:"w-16 text-center h-9",value:f.roMinute,onChange:A=>h(f.jobid,"roMinute",A.target.value),maxLength:2,placeholder:"MM"}),s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"ora RO"})]}):s.jsxs(ace,{children:[s.jsx(sce,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[s.jsx("span",{children:"Recurent"}),s.jsx(ele,{className:"h-3 w-3"})]})}),s.jsx(a8,{children:"Job recurent — programarea nu poate fi editată simplu ca oră fixă."})]})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s.jsx(Pm,{checked:f.active,onCheckedChange:()=>d(f)}),p&&s.jsxs(me,{size:"sm",onClick:()=>u(f),disabled:a===f.jobid,children:[s.jsx(Bu,{className:"h-4 w-4 mr-1"}),a===f.jobid?"...":"Salvează"]})]})]})})},f.jobid)}),!n&&e.length===0&&s.jsx("p",{className:"text-center text-muted-foreground py-8",children:"Nu există cron jobs configurate."})]})]})})}function Z5(e){return e?e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)} MB`:`${(e/1024/1024/1024).toFixed(2)} GB`:"—"}function yCt({status:e}){return e==="success"?s.jsxs(at,{variant:"default",className:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/30",children:[s.jsx(hn,{className:"mr-1 h-3 w-3"}),"Reușit"]}):e==="failed"?s.jsxs(at,{variant:"destructive",children:[s.jsx(Yh,{className:"mr-1 h-3 w-3"}),"Eșec"]}):s.jsxs(at,{variant:"secondary",children:[s.jsx(rt,{className:"mr-1 h-3 w-3 animate-spin"}),"În curs"]})}function vCt(){var g;const[e,r]=w.useState([]),[n,i]=w.useState(!0),[a,o]=w.useState(null),l=async()=>{i(!0);const{data:y,error:x}=await G.from("backup_logs").select("*").order("created_at",{ascending:!1}).limit(100);x&&ft.error("Nu s-au putut încărca logurile: "+x.message),r(y??[]),i(!1)};w.useEffect(()=>{l()},[]);const c=async y=>{o(y);const x=y==="database"?"backup-database":y==="storage"?"backup-storage":"backup-cleanup";ft.info(`Backup ${y} pornit. Poate dura câteva minute...`);try{const{data:b,error:v}=await G.functions.invoke(x,{body:{}});if(v)throw v;ft.success(`Backup ${y} reușit!`),console.log(`Backup ${y} result:`,b),await l()}catch(b){const v=b instanceof Error?b.message:String(b);ft.error(`Backup ${y} eșuat: ${v}`)}finally{o(null)}},u=async y=>{const{data:x,error:b}=await G.storage.from("database-backups").createSignedUrl(y,604800);if(b||!x){ft.error("Nu s-a putut genera link-ul: "+(b==null?void 0:b.message));return}window.open(x.signedUrl,"_blank")},d=e.find(y=>y.backup_type==="database"&&y.status==="success"),h=e.find(y=>y.backup_type==="storage"&&y.status==="success"),f=d?Date.now()-new Date(d.created_at).getTime()<48*3600*1e3?"text-emerald-500":Date.now()-new Date(d.created_at).getTime()<72*3600*1e3?"text-amber-500":"text-red-500":"text-muted-foreground",p=e.filter(y=>y.backup_type==="database"),m=e.filter(y=>y.backup_type==="storage"),A=e.filter(y=>y.backup_type==="cleanup");return s.jsxs("div",{className:"container mx-auto py-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold",children:"Backup-uri"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Gestionează backup-urile DB și Storage. Retenție: 7 zilnice + 4 săptămânale + 12 lunare."})]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:l,disabled:n,children:[s.jsx(ef,{className:`mr-2 h-4 w-4 ${n?"animate-spin":""}`}),"Reîmprospătează"]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-sm font-medium flex items-center gap-2",children:[s.jsx(E2,{className:"h-4 w-4"}),"Ultimul backup DB"]})}),s.jsx(ot,{children:d?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:`text-2xl font-bold ${f}`,children:NZ(new Date(d.created_at),{locale:Md,addSuffix:!0})}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[Z5(d.db_file_size_bytes)," • ",d.duration_seconds,"s"]})]}):s.jsx("p",{className:"text-muted-foreground",children:"Niciun backup încă"})})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-sm font-medium flex items-center gap-2",children:[s.jsx(EV,{className:"h-4 w-4"}),"Ultimul backup Storage"]})}),s.jsx(ot,{children:h?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-2xl font-bold",children:NZ(new Date(h.created_at),{locale:M
2279d,addSuffix:!0})}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[(g=h.storage_total_files)==null?void 0:g.toLocaleString()," fișiere • ",Z5(h.storage_total_size_bytes)]})]}):s.jsx("p",{className:"text-muted-foreground",children:"Niciun backup încă"})})]})]}),s.jsxs(Gi,{defaultValue:"database",children:[s.jsxs(Ri,{children:[s.jsxs(Mt,{value:"database",children:[s.jsx(E2,{className:"mr-2 h-4 w-4"}),"Database"]}),s.jsxs(Mt,{value:"storage",children:[s.jsx(EV,{className:"mr-2 h-4 w-4"}),"Storage"]}),s.jsxs(Mt,{value:"cleanup",children:[s.jsx(Xr,{className:"mr-2 h-4 w-4"}),"Cleanup"]})]}),s.jsxs(er,{value:"database",className:"space-y-4",children:[s.jsx("div",{className:"flex justify-end",children:s.jsxs(me,{onClick:()=>c("database"),disabled:a!==null,children:[a==="database"?s.jsx(rt,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ya,{className:"mr-2 h-4 w-4"}),"Generează backup acum"]})}),s.jsx(zF,{logs:p,type:"database",onDownload:u})]}),s.jsxs(er,{value:"storage",className:"space-y-4",children:[s.jsx("div",{className:"flex justify-end",children:s.jsxs(me,{onClick:()=>c("storage"),disabled:a!==null,children:[a==="storage"?s.jsx(rt,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ya,{className:"mr-2 h-4 w-4"}),"Generează backup acum"]})}),s.jsx(zF,{logs:m,type:"storage",onDownload:u})]}),s.jsxs(er,{value:"cleanup",className:"space-y-4",children:[s.jsx("div",{className:"flex justify-end",children:s.jsxs(me,{onClick:()=>c("cleanup"),disabled:a!==null,variant:"outline",children:[a==="cleanup"?s.jsx(rt,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(Xr,{className:"mr-2 h-4 w-4"}),"Rulează cleanup acum"]})}),s.jsx(zF,{logs:A,type:"cleanup",onDownload:u})]})]})]})}function zF({logs:e,type:r,onDownload:n}){return e.length===0?s.jsx(st,{children:s.jsx(ot,{className:"py-12 text-center text-muted-foreground",children:"Niciun backup înregistrat încă."})}):s.jsx(st,{children:s.jsx(ot,{className:"p-0",children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"border-b bg-muted/30",children:s.jsxs("tr",{className:"text-left",children:[s.jsx("th",{className:"p-3",children:"Data"}),s.jsx("th",{className:"p-3",children:"Status"}),s.jsx("th",{className:"p-3",children:"Mărime / Conținut"}),s.jsx("th",{className:"p-3",children:"Durată"}),s.jsx("th",{className:"p-3",children:"Trigger"}),s.jsx("th",{className:"p-3 text-right",children:"Acțiuni"})]})}),s.jsx("tbody",{children:e.map(i=>{var a;return s.jsxs("tr",{className:"border-b last:border-0 hover:bg-muted/20",children:[s.jsx("td",{className:"p-3 whitespace-nowrap",children:al(new Date(i.created_at),"dd MMM yyyy HH:mm",{locale:M
2279d})}),s.jsx("td",{className:"p-3",children:s.jsx(yCt,{status:i.status})}),s.jsxs("td",{className:"p-3",children:[r==="database"&&i.db_file_size_bytes&&s.jsxs("div",{children:[s.jsx("div",{children:Z5(i.db_file_size_bytes)}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:[Object.keys(i.table_counts??{}).length," tabele"]})]}),r==="storage"&&s.jsxs("div",{children:[s.jsxs("div",{children:[((a=i.storage_total_files)==null?void 0:a.toLocaleString())??0," fișiere"]}),s.jsx("div",{className:"text-xs text-muted-foreground",children:Z5(i.storage_total_size_bytes)})]}),r==="cleanup"&&i.table_counts&&s.jsxs("div",{className:"text-xs",children:[i.table_counts.deleted_files??0," fișiere șterse"]}),i.error_message&&s.jsx("div",{className:"text-xs text-red-500 mt-1 max-w-xs truncate",title:i.error_message,children:i.error_message})]}),s.jsx("td",{className:"p-3 whitespace-nowrap",children:i.duration_seconds?`${i.duration_seconds}s`:"—"}),s.jsx("td",{className:"p-3",children:s.jsx(at,{variant:"outline",className:"text-xs",children:i.triggered_by})}),s.jsxs("td",{className:"p-3 text-right",children:[r==="database"&&i.db_file_path&&s.jsxs(me,{size:"sm",variant:"ghost",onClick:()=>n(i.db_file_path),children:[s.jsx(Wl,{className:"mr-1 h-3 w-3"}),"ZIP"]}),r==="storage"&&i.storage_manifest_paths&&Object.entries(i.storage_manifest_paths).map(([o,l])=>s.jsxs(me,{size:"sm",variant:"ghost",onClick:()=>n(l),title:o,children:[s.jsx(Wl,{className:"mr-1 h-3 w-3"}),o.replace("_binary"," (zip)")]},o))]})]},i.id)})})]})})})})}const bCt="https://ahleagpvrcuwshrzzpkq.supabase.co",_ee="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw";function wCt(e,r){const n=new URLSearchParams({days:String(e)});return r&&n.set("domain",r),fetch(`${bCt}/functions/v1/bot-logs?${n}`,{headers:{apikey:_ee,Authorization:`Bearer ${_ee}`}}).then(i=>i.json())}function jCt(){var c,u,d,h,f,p,m,A;const[e,r]=w.useState(7),[n,i]=w.useState(null),{data:a,isLoading:o}=Xe({queryKey:["bot-logs",e,n],queryFn:()=>wCt(e,n),refetchInterval:6e4}),l=g=>g>=200&&g<300?"default":g>=300&&g<400?"secondary":g>=400&&g<500?"outline":"destructive";return s.jsx(xr,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[s.jsx(Ec,{className:"h-6 w-6"})," Bot Access Logs"]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(Cn,{value:n||"all",onValueChange:g=>i(g==="all"?null:g),children:[s.jsx(yn,{className:"w-32",children:s.jsx(Nn,{})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:"Toate"}),s.jsx(_t,{value:"ro",children:".ro"}),s.jsx(_t,{value:"en",children:".ai"})]})]}),s.jsxs(Cn,{value:String(e),onValueChange:g=>r(Number(g)),children:[s.jsx(yn,{className:"w-32",children:s.jsx(Nn,{})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"1",children:"Ultimele 24h"}),s.jsx(_t,{value:"7",children:"7 zile"}),s.jsx(_t,{value:"14",children:"14 zile"}),s.jsx(_t,{value:"30",children:"30 zile"})]})]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsx(st,{children:s.jsxs(ot,{className:"pt-4",children:[s.jsx("div",{className:"text-sm text-muted-foreground",children:"Total Requests"}),s.jsx("div",{className:"text-2xl font-bold",children:(a==null?void 0:a.total_requests)??"—"})]})}),s.jsx(st,{children:s.jsxs(ot,{className:"pt-4",children:[s.jsx("div",{className:"text-sm text-muted-foreground",children:"Boți unici"}),s.jsx("div",{className:"text-2xl font-bold",children:((c=a==null?void 0:a.bot_summary)==null?void 0:c.length)??"—"})]})}),s.jsx(st,{children:s.jsxs(ot,{className:"pt-4",children:[s.jsx("div",{className:"text-sm text-muted-foreground",children:"Domenii"}),s.jsx("div",{className:"text-2xl font-bold",children:((u=a==null?void 0:a.domain_summary)==null?void 0:u.map(g=>`${g.domain}: ${g.count}`).join(", "))||"—"})]})}),s.jsx(st,{children:s.jsxs(ot,{className:"pt-4",children:[s.jsx("div",{className:"text-sm text-muted-foreground",children:"Erori (non-200)"}),s.jsx("div",{className:"text-2xl font-bold text-destructive",children:((d=a==null?void 0:a.status_summary)==null?void 0:d.filter(g=>g.status_code>
2279=400).reduce((g,y)=>g+y.count,0))??"—"})]})})]}),s.jsxs(Gi,{defaultValue:"bots",children:[s.jsxs(Ri,{children:[s.jsx(Mt,{value:"bots",children:"Per Bot"}),s.jsx(Mt,{value:"status",children:"Status Codes"}),s.jsx(Mt,{value:"paths",children:"Top Paths"}),s.jsx(Mt,{value:"daily",children:"Daily"}),s.jsx(Mt,{value:"recent",children:"Loguri Recente"})]}),s.jsx(er,{value:"bots",children:s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"flex items-center gap-2",children:[s.jsx(Ec,{className:"h-4 w-4"})," Sumar pe bot"]})}),s.jsx(ot,{children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Bot"}),s.jsx(Me,{className:"text-right",children:"Requests"}),s.jsx(Me,{className:"text-right",children:"Success"}),s.jsx(Me,{className:"text-right",children:"Fail"}),s.jsx(Me,{className:"text-right",children:"Avg ms"})]})}),s.jsx(In,{children:(h=a==null?void 0:a.bot_summary)==null?void 0:h.map(g=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"font-medium",children:g.bot_name}),s.jsx(Oe,{className:"text-right",children:g.total_requests}),s.jsx(Oe,{className:"text-right text-green-600",children:g.success}),s.jsx(Oe,{className:"text-right text-destructive",children:g.fail}),s.jsx(Oe,{className:"text-right",children:g.avg_response_ms??"—"})]},g.bot_name))})]})})]})}),s.jsx(er,{value:"status",children:s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"flex items-center gap-2",children:[s.jsx(Voe,{className:"h-4 w-4"})," Status Codes"]})}),s.jsx(ot,{children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Status Code"}),s.jsx(Me,{className:"text-right",children:"Count"})]})}),s.jsx(In,{children:(f=a==null?void 0:a.status_summary)==null?void 0:f.map(g=>s.jsxs(Nt,{children:[s.jsx(Oe,{children:s.jsx(at,{variant:l(g.status_code),children:g.status_code})}),s.jsx(Oe,{className:"text-right",children:g.count})]},g.status_code))})]})})]})}),s.jsx(er,{value:"paths",children:s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"flex items-center gap-2",children:[s.jsx(Dr,{className:"h-4 w-4"})," Top Paths"]})}),s.jsx(ot,{children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Path"}),s.jsx(Me,{className:"text-right",children:"Hits"})]})}),s.jsx(In,{children:(p=a==null?void 0:a.top_paths)==null?void 0:p.map(g=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"font-mono text-sm",children:g.path}),s.jsx(Oe,{className:"text-right",children:g.count})]},g.path))})]})})]})}),s.jsx(er,{value:"daily",children:s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsx(Ht,{children:"Requests per day"})}),s.jsx(ot,{children:s.jsx("div",{className:"space-y-2",children:(m=a==null?void 0:a.daily_chart)==null?void 0:m.map(g=>{var y;return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"w-24 text-sm text-muted-foreground",children:g.date}),s.jsx("div",{className:"flex-1 bg-muted rounded-full h-4 overflow-hidden",children:s.jsx("div",{className:"bg-primary h-full rounded-full transition-all",style:{width:`${Math.min(100,g.count/Math.max(...((y=a==null?void 0:a.daily_chart)==null?void 0:y.map(x=>x.count))||[1])*100)}%`}})}),s.jsx("span",{className:"w-12 text-right text-sm font-medium",children:g.count})]},g.date)})})})]})}),s.jsx(er,{value:"recent",children:s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsx(Ht,{children:"Ultimele loguri"})}),s.jsx(ot,{children:s.jsx("div",{className:"max-h-[600px] overflow-auto",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Data"}),s.jsx(Me,{children:"Domain"}),s.jsx(Me,{children:"Bot"}),s.jsx(Me,{children:"Path"}),s.jsx(Me,{children:"Status"}),s.jsx(Me,{children:"ms"})]})}),s.jsx(In,{children:(A=a==null?void 0:a.recent_logs)==null?void 0:A.map(g=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"text-xs",children:new Date(g.created_at).toLocaleString("ro-RO")}),s.jsx(Oe,{children:s.jsx(at,{variant:"outline",children:g.domain})}),s.jsx(Oe,{className:"text-sm",children:g.bot_name}),s.jsx(Oe,{className:"font-mono text-xs max-w-[200px] truncate",children:g.path}),s.jsx(Oe,{children:s.jsx(at,{variant:l(g.status_code),children:g.status_code})}),s.jsx(Oe,{className:"text-right",children:g.response_time_ms??"—"})]},g.id))})]})})})]})})]})]})})}function _Ct(){const[e,r]=w.useState("all"),[n,i]=w.useState(0),a=50,{data:o,isLoading:l}=Xe({queryKey:["admin-chat-logs",e,n],queryFn:async()=>{let f=G.from("member_chat_messages").select("*",{count:"exact"}).order("created_at",{ascending:!1}).range(n*a,(n+1)*a-1);e==="authenticated"?f=f.eq("is_anonymous",!1):e==="anonymous"&&(f=f.eq("is_anonymous",!0));const{data:p,count:m,error:A}=await f;if(A)throw A;return{messages:p??[],total:m??0}}}),c=(o==null?void 0:o.messages)??[],u=(o==null?void 0:o.total)??0,d=Math.ceil(u/a);c.reduce((f,p)=>{const m=p.user_id||p.ip_address||"unknown";return f[m]||(f[m]=[]),f[m].push(p),f},{});const{data:h}=Xe({queryKey:["admin-chat-stats"],queryFn:async()=>{const f=new Date;f.setHours(0,0,0,0);const[p,m,A,g]=await Promise.all([G.from("member_chat_messages").select("*",{count:"exact",head:!0}),G.from("member_chat_messages").select("*",{count:"exact",head:!0}).gte("created_at",f.toISOString()),G.from("member_chat_messages").select("*",{count:"exact",head:!0}).eq("is_anonymous",!0),G.from("member_chat_messages").select("*",{count:"exact",head:!0}).eq("is_anonymous",!1)]);return{total:p.count??0,today:m.count??0,anonymous:A.count??0,authenticated:g.count??0}}});return s.jsx(xr,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"text-2xl font-heading font-bold flex items-center gap-2",children:[s.jsx(o4,{size:24})," Chat AI - Loguri"]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Toate întrebările și răspunsurile din chatul AI Tudor"})]})}),h&&s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[s.jsxs("div",{className:"rounded-xl border border-border p-4 bg-background",children:[s.jsx("p",{className:"text-2xl font-bold",children:h.total}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Total mesaje"})]}),s.jsxs("div",{className:"rounded-xl border border-border p-4 bg-background",children:[s.jsx("p",{className:"text-2xl font-bold",children:h.today}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Azi"})]}),s.jsxs("div",{className:"rounded-xl border border-border p-4 bg-background",children:[s.jsx("p",{className:"text-2xl font-bold",children:h.authenticated}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"De la membri"})]}),s.jsxs("div",{className:"rounded-xl border border-border p-4 bg-background",children:[s.jsx("p",{className:"text-2xl font-bold",children:h.anonymous}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Anonimi"})]})]}),s.jsx("div",{className:"flex gap-2",children:["all","authenticated","anonymous"].map(f=>s.jsxs(me,{size:"sm",variant:e===f?"default":"outline",onClick:()=>{r(f),i(0)},className:"text-xs",children:[f==="all"&&s.jsx(y_,{size:14,className:"mr-1"}),f==="authenticated"&&s.jsx(jy,{size:14,className:"mr-1"}),f==="anonymous"&&s.jsx(Dr,{size:14,className:"mr-1"}),f==="all"?"Toate":f==="authenticated"?"Membri":"Anonimi"]},f))}),s.jsx("div",{className:"space-y-2",children:l?s.jsx("p",{className:"text-sm text-muted-foreground py-8 text-center",children:"Se încarcă..."}):c.length===0?s.jsx("p",{className:"text-sm text-muted-foreground py-8 text-center",children:"Niciun mesaj găsit."}):c.map(f=>s.jsxs("div",{className:`flex gap-3 p-3 rounded-lg border border-border ${f.role==="user"?"bg-muted/30":"bg-background"}`,children:[s.jsx("div",{className:`shrink-0 w-8 h-8 rounded-full flex items-center justify-center ${f.role==="user"?"bg-primary/10":"bg-muted"}`,children:f.role==="user"?s.jsx(jy,{size:14,className:"text-primary"}):s.jsx(Ec,{size:14,className:"text-muted-foreground"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-xs font-semibold",children:f.role==="user"?"Utilizator":"Tudor (AI)"}),f.is_anonymous&&s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground",children:"Anonim"}),f.ip_address&&s.jsx("span",{className:"text-[10px] text-muted-foreground font-mono",children:f.ip_address}),s.jsx("span",{className:"text-[10px] text-muted-foreground ml-auto",children:al(new Date(f.created_at),"dd.MM.yyyy HH:mm")}
2279)]}),s.jsx("p",{className:"text-sm whitespace-pre-wrap break-words",children:f.content})]})]},f.id))}),d>1&&s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx(me,{size:"sm",variant:"outline",disabled:n===0,onClick:()=>i(f=>f-1),children:"← Anterior"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Pagina ",n+1," / ",d," (",u," mesaje)"]}),s.jsx(me,{size:"sm",variant:"outline",disabled:n>=d-1,onClick:()=>i(f=>f+1),children:"Următor →"})]})]})})}const uv=25;function CCt(){const{data:e}=Xe({queryKey:["user-analytics-overview"],queryFn:async()=>{var h;const n=new Date().toISOString().split("T")[0],[i,a,o,l]=await Promise.all([G.from("user_login_events").select("id",{count:"exact",head:!0}).gte("created_at",n),G.from("user_login_events").select("id",{count:"exact",head:!0}),G.from("user_sessions").select("id",{count:"exact",head:!0}).is("ended_at",null),G.from("user_sessions").select("duration_seconds").not("duration_seconds","is",null).limit(100).order("started_at",{ascending:!1})]),c=await G.from("user_login_events").select("id",{count:"exact",head:!0}).gte("created_at",n).eq("success",!0),u=(h=l.data)!=null&&h.length?Math.round(l.data.reduce((f,p)=>f+(p.duration_seconds||0),0)/l.data.length/60):0,d=i.count?Math.round((c.count||0)/i.count*100):100;return{loginsToday:i.count||0,loginsTotal:a.count||0,activeSessions:o.count||0,avgMinutes:u,successRate:d}}}),r=[{label:"Loginuri azi",value:(e==null?void 0:e.loginsToday)??"—",icon:a4},{label:"Sesiuni active",value:(e==null?void 0:e.activeSessions)??"—",icon:Rn},{label:"Timp mediu (min)",value:(e==null?void 0:e.avgMinutes)??"—",icon:ki},{label:"Rată succes azi",value:e?`${e.successRate}%`:"—",icon:Oi}];return s.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:r.map(n=>s.jsxs(st,{children:[s.jsxs(Ot,{className:"flex flex-row items-center justify-between pb-2",children:[s.jsx(Ht,{className:"text-sm font-medium text-muted-foreground",children:n.label}),s.jsx(n.icon,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsx(ot,{children:s.jsx("div",{className:"text-2xl font-bold",children:n.value})})]},n.label))})}function NCt(){var l;const[e,r]=w.useState(0),[n,i]=w.useState(""),{data:a,isLoading:o}=Xe({queryKey:["user-login-events",e,n],queryFn:async()=>{let c=G.from("user_login_events").select("*",{count:"exact"}).order("created_at",{ascending:!1}).range(e*uv,(e+1)*uv-1);return n&&(c=c.ilike("email",`%${n}%`)),c}});return s.jsxs("div",{className:"space-y-4",children:[s.jsx(qe,{placeholder:"Caută email...",value:n,onChange:c=>{i(c.target.value),r(0)},className:"max-w-xs"}),s.jsx("div",{className:"rounded-md border",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Data"}),s.jsx(Me,{children:"Email"}),s.jsx(Me,{children:"Metodă"}),s.jsx(Me,{children:"Status"}),s.jsx(Me,{children:"Eroare"})]})}),s.jsx(In,{children:o?s.jsx(Nt,{children:s.jsx(Oe,{colSpan:5,className:"text-center py-8",children:"Se încarcă..."})}):(l=a==null?void 0:a.data)!=null&&l.length?a.data.map(c=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"text-xs",children:al(new Date(c.created_at),"dd.MM.yyyy HH:mm")}),s.jsx(Oe,{className:"text-sm",children:c.email||"—"}),s.jsx(Oe,{children:s.jsx(at,{variant:"outline",children:c.method})}),s.jsx(Oe,{children:s.jsx(at,{variant:c.success?"default":"destructive",children:c.success?"Succes":"Eșec"})}),s.jsx(Oe,{className:"text-xs text-muted-foreground max-w-[200px] truncate",children:c.error_message||"—"})]},c.id)):s.jsx(Nt,{children:s.jsx(Oe,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"Niciun eveniment"})})})]})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-sm text-muted-foreground",children:["Total: ",(a==null?void 0:a.count)??0]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(me,{variant:"outline",size:"sm",disabled:e===0,onClick:()=>r(c=>c-1),children:s.jsx(pg,{className:"h-4 w-4"})}),s.jsx(me,{variant:"outline",size:"sm",disabled:!(a!=null&&a.data)||a.data.length<uv,onClick:()=>r(c=>c+1),children:s.jsx(hs,{className:"h-4 w-4"})})]})]})]})}function SCt(){var a;const[e,r]=w.useState(0),{data:n,isLoading:i}=Xe({queryKey:["user-sessions",e],queryFn:async()=>{var d;const o=await G.from("user_sessions").select("*",{count:"exact"}).order("started_at",{ascending:!1}).range(e*uv,(e+1)*uv-1);if(!((d=o.data)!=null&&d.length))return o;const l=[...new Set(o.data.map(h=>
2279h.user_id))],{data:c}=await G.from("profiles").select("user_id, email, display_name").in("user_id",l),u=new Map((c||[]).map(h=>[h.user_id,h]));return{...o,data:o.data.map(h=>({...h,_profile:u.get(h.user_id)}))}}});return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"rounded-md border",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Utilizator"}),s.jsx(Me,{children:"IP"}),s.jsx(Me,{children:"Început"}),s.jsx(Me,{children:"Ultima activitate"}),s.jsx(Me,{children:"Durată"}),s.jsx(Me,{children:"Status"})]})}),s.jsx(In,{children:i?s.jsx(Nt,{children:s.jsx(Oe,{colSpan:6,className:"text-center py-8",children:"Se încarcă..."})}):(a=n==null?void 0:n.data)!=null&&a.length?n.data.map(o=>{var l,c,u;return s.jsxs(Nt,{children:[s.jsx(Oe,{className:"text-xs",children:((l=o._profile)==null?void 0:l.email)||((c=o._profile)==null?void 0:c.display_name)||((u=o.user_id)==null?void 0:u.substring(0,8))+"…"}),s.jsx(Oe,{className:"text-xs font-mono",children:o.ip_address||"—"}),s.jsx(Oe,{className:"text-xs",children:al(new Date(o.started_at),"dd.MM.yyyy HH:mm")}),s.jsx(Oe,{className:"text-xs",children:al(new Date(o.last_active_at),"dd.MM.yyyy HH:mm")}),s.jsx(Oe,{className:"text-sm",children:o.duration_seconds?`${Math.round(o.duration_seconds/60)} min`:"—"}),s.jsx(Oe,{children:s.jsx(at,{variant:o.ended_at?"secondary":"default",children:o.ended_at?"Închisă":"Activă"})})]},o.id)}):s.jsx(Nt,{children:s.jsx(Oe,{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"Nicio sesiune"})})})]})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-sm text-muted-foreground",children:["Total: ",(n==null?void 0:n.count)??0]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(me,{variant:"outline",size:"sm",disabled:e===0,onClick:()=>r(o=>o-1),children:s.jsx(pg,{className:"h-4 w-4"})}),s.jsx(me,{variant:"outline",size:"sm",disabled:!(n!=null&&n.data)||n.data.length<uv,onClick:()=>r(o=>o+1),children:s.jsx(hs,{className:"h-4 w-4"})})]})]})]})}function kCt(){const{data:e,isLoading:r}=Xe({queryKey:["user-page-views-popular"],queryFn:async()=>{const{data:n}=await G.from("user_page_views").select("path").order("viewed_at",{ascending:!1}).limit(1e3);if(!n)return[];const i={};return n.forEach(a=>{i[a.path]=(i[a.path]||0)+1}),Object.entries(i).sort((a,o)=>o[1]-a[1]).slice(0,30).map(([a,o])=>({path:a,count:o}))}});return s.jsx("div",{className:"rounded-md border",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Pagină"}),s.jsx(Me,{className:"text-right",children:"Vizualizări"})]})}),s.jsx(In,{children:r?s.jsx(Nt,{children:s.jsx(Oe,{colSpan:2,className:"text-center py-8",children:"Se încarcă..."})}):e!=null&&e.length?e.map(n=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"text-sm font-mono",children:n.path}),s.jsx(Oe,{className:"text-right font-semibold",children:n.count})]},n.path)):s.jsx(Nt,{children:s.jsx(Oe,{colSpan:2,className:"text-center py-8 text-muted-foreground",children:"Nicio pagină vizitată"})})})]})})}function ECt(){return s.jsx(xr,{children:s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"User Analytics"}),s.jsxs("p",{className:"text-muted-foreground mt-1 text-sm max-w-3xl",children:["Monitorizează activitatea utilizatorilor autentificați pe platformă. Datele se colectează automat prin hook-ul ",s.jsx("code",{className:"bg-muted px-1 rounded text-xs",children:"useSessionTracking"}),": fiecare login este înregistrat (metodă, succes/eșec, erori), sesiunile sunt urmărite cu heartbeat la 60s (durată, ultima activitate), iar navigarea între pagini este logată cu timpul petrecut pe fiecare. ",s.jsx("strong",{children:"Overview"})," — statistici agregate (loginuri azi, sesiuni active, timp mediu, rată succes). ",s.jsx("strong",{children:"Loginuri"})," — istoric complet cu filtrare pe email. ",s.jsx("strong",{children:"Sesiuni"})," — lista sesiunilor cu durata și statusul. ",s.jsx("strong",{children:"Pagini populare"})," — top 30 pagini vizitate (ultimele 1000 vizualizări)."]})]}),s.jsxs(Gi,{defaultValue:"overview",children:[s.jsxs(Ri,{children:[s.jsx(Mt,{value:"overview",children:"Overview"}),s.jsx(Mt,{value:"logins",children:"Loginuri"}),s.jsx(Mt,{value:"sessions",children:"Sesiuni"}),s.jsx(Mt,{value:"pages",children:"Pagini populare"})]}),s.jsx(er,{value:"overview",children:s.jsx(CCt,{})}),s.jsx(er,{value:"logins",children:s.jsx(NCt,{})}),s.jsx(er,{value:"sessions",children:s.jsx(SCt,{})}),s.jsx(er,{value:"pages",children:s.jsx(kCt,{})})]})]})})}function BCt(){const{toast:e}=wn(),r=Kr(),[n,i]=w.useState(null),[a,o]=w.useState(""),[l,c]=w.useState(""),[u,d]=w.useState(""),[h,f]=w.useState(!1),[p,m]=w.useState(""),[A,g]=w.useState(""),[y,x]=w.useState(""),[b,v]=w.useState(""),[j,_]=w.useState(""),{data:C,isLoading:N}=Xe({queryKey:["ai-prompts"],queryFn:async()=>{const{data:F,error:I}=await G.from("ai_prompts").select("*").order("category").order("label");if(I)throw I;return F}}),S=An({mutationFn:async({id:F,prompt_text:I,label:D,description:L})=>{const{error:V}=await G.from("ai_prompts").update({prompt_text:I,label:D,description:L}).eq("id",F);if(V)throw V},onSuccess:()=>{r.invalidateQueries({queryKey:["ai-prompts"]}),i(null),e({title:"Prompt actualizat cu succes"})},onError:F=>e({title:"Eroare",description:F.message,variant:"destructive"})}),E=An({mutationFn:async()=>{const{error:F}=await G.from("ai_prompts").insert({key:p,label:A,category:y,prompt_text:b,description:j});if(F)throw F},onSuccess:()=>{r.invalidateQueries({queryKey:["ai-prompts"]}),f(!1),m(""),g(""),x(""),v(""),_(""),e({title:"Prompt creat cu succes"})},onError:F=>e({title:"Eroare",description:F.message,variant:"destructive"})}),O=An({mutationFn:async F=>{const{error:I}=await G.from("ai_prompts").delete().eq("id",F);
2279if(I)throw I},onSuccess:()=>{r.invalidateQueries({queryKey:["ai-prompts"]}),e({title:"Prompt șters"})},onError:F=>e({title:"Eroare",description:F.message,variant:"destructive"})}),B=F=>{i(F.id),o(F.prompt_text),c(F.label),d(F.description||"")},T=[...new Set((C||[]).map(F=>F.category))];return s.jsx(xr,{children:s.jsxs("div",{className:"container py-10 max-w-5xl",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx(be,{to:"/admin",children:s.jsx(me,{variant:"ghost",size:"icon",children:s.jsx(rn,{size:18})})}),s.jsx(nle,{className:"text-primary",size:24}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h1",{className:"font-heading text-2xl font-bold",children:"Prompturi AI"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Administrează toate prompturile folosite de funcțiile automate. Modificările se aplică imediat."})]}),s.jsxs(me,{onClick:()=>f(!h),variant:h?"secondary":"default",size:"sm",children:[s.jsx(Qn,{size:14})," ",h?"Anulează":"Adaugă Prompt"]})]}),h&&s.jsxs("div",{className:"glass-card rounded-xl p-6 mb-6 space-y-3",children:[s.jsx("h3",{className:"font-heading font-semibold",children:"Prompt Nou"}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(qe,{placeholder:"Cheie unică (ex: podcast_intro)",value:p,onChange:F=>m(F.target.value)}),s.jsx(qe,{placeholder:"Etichetă",value:A,onChange:F=>g(F.target.value)}),s.jsx(qe,{placeholder:"Categorie (ex: Podcast)",value:y,onChange:F=>x(F.target.value)})]}),s.jsx(qe,{placeholder:"Descriere scurtă",value:j,onChange:F=>_(F.target.value)}),s.jsx(fr,{placeholder:"Textul promptului...",value:b,onChange:F=>v(F.target.value),className:"min-h-[200px] font-mono text-sm"}),s.jsxs(me,{onClick:()=>E.mutate(),disabled:!p||!A||!b||!y||E.isPending,children:[s.jsx(Bu,{size:14})," Salvează"]})]}),N?s.jsx("p",{className:"text-muted-foreground",children:"Se încarcă..."}):s.jsxs(Gi,{defaultValue:T[0]||"all",children:[s.jsx(Ri,{className:"mb-4 flex-wrap h-auto gap-1",children:T.map(F=>s.jsx(Mt,{value:F,className:"text-xs",children:F},F))}),T.map(F=>s.jsx(er,{value:F,className:"space-y-4",children:(C||[]).filter(I=>I.category===F).map(I=>{var D,L;return s.jsx("div",{className:"glass-card rounded-xl p-5 border border-border",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("p",{className:"font-medium",children:I.label}),s.jsx(at,{variant:"outline",className:"text-xs font-mono",children:I.key})]}),n===I.id?s.jsxs("div",{className:"mt-3 space-y-3",children:[s.jsx(qe,{value:l,onChange:V=>c(V.target.value),placeholder:"Etichetă",className:"text-sm"}),s.jsx(qe,{value:u,onChange:V=>d(V.target.value),placeholder:"Descriere",className:"text-sm"}),s.jsx(fr,{value:a,onChange:V=>o(V.target.value),className:"min-h-[300px] font-mono text-sm leading-relaxed"}),((D=I.variables)==null?void 0:D.length)>0&&s.jsxs("div",{className:"flex flex-wrap gap-1",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Variabile:"}),I.variables.map(V=>s.jsx(at,{variant:"secondary",className:"text-xs font-mono",children:V},V))]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(me,{size:"sm",onClick:()=>S.mutate({id:I.id,prompt_text:a,label:l,description:u}),disabled:S.isPending,children:[s.jsx(Bc,{size:14})," Salvează"]}),s.jsxs(me,{size:"sm",variant:"ghost",onClick:()=>i(null),children:[s.jsx(Uc,{size:14})," Anulează"]})]})]}):s.jsxs(s.Fragment,{children:[I.description&&s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:I.description}),s.jsx("pre",{className:"text-xs bg-muted/50 rounded-lg p-3 overflow-x-auto whitespace-pre-wrap max-h-[200px] overflow-y-auto font-mono",children:I.prompt_text}),((L=I.variables)==null?void 0:L.length)>0&&s.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Variabile:"}),I.variables.map(V=>s.jsx(at,{variant:"secondary",className:"text-xs font-mono",children:V},V))]}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx(ki,{size:12,className:"text-muted-foreground"}
2279),s.jsxs("p",{className:"text-xs text-muted-foreground/60",children:["Actualizat: ",new Date(I.updated_at).toLocaleString("ro-RO")]})]})]})]}),n!==I.id&&s.jsxs("div",{className:"flex gap-1 shrink-0",children:[s.jsx(me,{variant:"ghost",size:"icon",onClick:()=>B(I),children:s.jsx(wp,{size:14})}),s.jsx(me,{variant:"ghost",size:"icon",className:"text-destructive",onClick:()=>{confirm("Ștergi acest prompt?")&&O.mutate(I.id)},children:s.jsx(Xr,{size:14})})]})]})},I.id)})},F))]})]})})}function TCt(){return s.jsx(xr,{children:s.jsxs("div",{className:"space-y-6 max-w-4xl",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Instrucțiuni SEO — Ghid Pre-randare"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Documentație internă privind arhitectura de pre-randare, problemele întâlnite și procedurile de prevenire."})]}),s.jsxs(st,{className:"border-l-4 border-l-destructive",children:[s.jsx(Ot,{className:"pb-3",children:s.jsxs(Ht,{className:"flex items-center gap-2 text-destructive",children:[s.jsx(Tu,{size:20}),"Problema identificată"]})}),s.jsxs(ot,{className:"space-y-3 text-sm",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Simptom:"})," Conținutul afișat de crawlere (Googlebot, ClaudeBot etc.) era ",s.jsx("strong",{children:"incomplet"})," față de cel vizibil în browser. De exemplu, pe pagina ",s.jsx("code",{children:"/ce-este-web3"}),", propoziții întregi lipseau din HTML-ul pre-randat, deși în React conținutul era complet."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Cauza rădăcină:"})," Platforma are ",s.jsx("strong",{children:"două straturi separate"})," de conținut:"]}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Stratul React (frontend)"})," — componentele React (ex: ",s.jsx("code",{children:"WhatIsWeb3Page.tsx"}),") conțin conținutul complet vizibil în browser."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Stratul de pre-randare (Edge Function)"})," — funcția ",s.jsx("code",{children:"prerender-meta"})," generează HTML static servit exclusiv boților/crawlerelor. Acest HTML era scris manual, independent de React."]})]}),s.jsxs("p",{children:["Cele două straturi nu erau sincronizate. Când conținutul React a fost actualizat sau extins, funcția de pre-randare nu a fost actualizată în paralel, rezultând ",s.jsx("strong",{children:"paragrafe trunchiate, secțiuni lipsă și răspunsuri FAQ incomplete"}),"."]})]})]}),s.jsxs(st,{className:"border-l-4 border-l-green-500",children:[s.jsx(Ot,{className:"pb-3",children:s.jsxs(Ht,{className:"flex items-center gap-2 text-green-600 dark:text-green-400",children:[s.jsx(hn,{size:20}),"Cum a fost remediată"]})}),s.jsxs(ot,{className:"space-y-3 text-sm",children:[s.jsxs("p",{children:["Am realizat un ",s.jsx("strong",{children:"audit complet"})," al funcției Edge ",s.jsx("code",{children:"prerender-meta/index.ts"})," comparând linie cu linie conținutul din React cu cel din pre-randare pentru toate paginile pilon:"]}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsxs("li",{children:[s.jsx("code",{children:"/ce-este-web3"})," — adăugate secțiuni lipsă (Tokens, Transparență, Provocări, Glosar complet, FAQ-uri detaliate)"]}),s.jsxs("li",{children:[s.jsx("code",{children:"/ce-este-blockchain"})," — adăugate mecanisme consens (DPoS, PoA, PoH), tipul Hybrid, aplicații extinse, Provocări și Viitor"]}),s.jsxs("li",{children:[s.jsx("code",{children:"/ce-este-crypto"}),' — adăugate categorii lipsă, secțiuni „Cum să începi" și „Viitorul criptomonedelor"']})]}),s.jsxs("p",{children:["După corecție, HTML-ul pre-randat este ",s.jsx("strong",{children:"100% identic"})," cu conținutul din componentele React."]})]})]}),s.jsxs(st,{className:"border-l-4 border-l-blue-500",children:[s.jsx(Ot,{className:"pb-3",children:s.jsxs(Ht,{className:"flex items-center gap-2 text-blue-600 dark:text-blue-400",children:[s.jsx(gle,{size:20}),"Arhitectura curentă"]})}),s.jsxs(ot,{className:"space-y-3 text-sm",children:[s.jsx("p",{children:"Sistemul funcționează pe două nivele:"}),s.jsxs("div",{className:"bg-muted/50 rounded-lg p-4 font-mono text-xs space-y-2",children:[s.jsxs("p",{children:["1. ",s.jsx("strong",{children:"Utilizator normal"})," → Cloudflare → React SPA → conținut din componente React"]}),s.jsxs("p",{children:["2. ",s.jsx("strong",{children:"Bot/Crawler"})," → Cloudflare Worker → Edge Function ",s.jsx("code",{children:"prerender-meta"})," → HTML static"]})]}),s.jsx("p",{className:"font-semibold text-foreground",children:"Tipuri de conținut și sincronizare:"}),s.jsxs("table",{className:"w-full text-xs border rounded-lg overflow-hidden",children:[s.jsx("thead",{className:"bg-muted",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left p-2 border-b",children:"Tip pagină"}),s.jsx("th",{className:"text-left p-2 border-b",children:"Sincronizare"}),s.jsx("th",{className:"text-left p-2 border-b",children:"Risc"})]})}),s.jsxs("tbody",{children:[s.jsxs("tr",{className:"border-b",children:[s.jsx("td",{className:"p-2",children:"Articole, Glosar, Cursuri, Monede"}),s.jsx("td",{className:"p-2 text-green-600 dark:text-green-400",children:"Automată (din DB)"}),s.jsx("td",{className:"p-2",children:"Scăzut"})]}),s.jsxs("tr",{className:"border-b",children:[s.jsx("td",{className:"p-2",children:"Pagini pilon statice (ce-este-web3, blockchain, crypto)"}
2279),s.jsx("td",{className:"p-2 text-amber-600 dark:text-amber-400",children:"Manuală"}),s.jsx("td",{className:"p-2 font-semibold text-destructive",children:"RIDICAT"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"p-2",children:"Pagini statice (About, Contact, Terms)"}),s.jsx("td",{className:"p-2 text-amber-600 dark:text-amber-400",children:"Manuală"}),s.jsx("td",{className:"p-2",children:"Mediu"})]})]})]})]})]}),s.jsxs(st,{className:"border-l-4 border-l-amber-500",children:[s.jsx(Ot,{className:"pb-3",children:s.jsxs(Ht,{className:"flex items-center gap-2 text-amber-600 dark:text-amber-400",children:[s.jsx(gke,{size:20}),"Checklist — La ce să fii atent"]})}),s.jsxs(ot,{className:"space-y-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-foreground mb-2",children:"Când modifici o pagină pilon (WhatIsWeb3Page, WhatIsBlockchainPage, etc.):"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsxs("strong",{children:["Actualizează și funcția ",s.jsx("code",{children:"prerender-meta/index.ts"})]})," — orice text adăugat, modificat sau șters în React trebuie reflectat identic în funcția Edge."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Verifică titlurile H1/H2"})," — ordinea și textul secțiunilor trebuie să fie identice."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Verifică FAQ-urile"})," — întrebările și răspunsurile din JSON-LD și din HTML trebuie să corespundă 1:1 cu cele din React."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Verifică glosarul"})," — toți termenii afișați în React trebuie să existe și în pre-randare."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Deploy + Purge"})," — după actualizarea funcției Edge, fă ",s.jsx("strong",{children:"Purge Everything"})," în Cloudflare (Caching → Configuration) pentru ambele domenii (.ro și .ai)."]})]})]}),s.jsxs("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4",children:[s.jsxs("p",{className:"font-semibold text-destructive flex items-center gap-2 mb-2",children:[s.jsx(ZSe,{size:16}),"Când ceri modificări prin AI (Lovable):"]}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsxs("li",{children:["Menționează explicit: ",s.jsx("em",{children:'„Actualizează și funcția de pre-randare pentru a reflecta aceste modificări"'})]}),s.jsxs("li",{children:["Dacă adaugi o secțiune nouă într-o pagină pilon, cere: ",s.jsx("em",{children:'„Adaugă secțiunea și în prerender-meta"'})]}),s.jsxs("li",{children:["După orice modificare, cere: ",s.jsx("em",{children:'„Verifică paritatea între React și prerender-meta pentru această pagină"'})]})]})]})]})]}),s.jsxs(st,{className:"border-l-4 border-l-primary",children:[s.jsx(Ot,{className:"pb-3",children:s.jsxs(Ht,{className:"flex items-center gap-2 text-primary",children:[s.jsx(ele,{size:20}),"Cum verifici că totul e sincronizat"]})}),s.jsx(ot,{className:"space-y-3 text-sm",children:s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Pagina Prerender Audit"})," (",s.jsx("code",{children:"/admin/prerender-audit"}),") — conține codul sursă al Cloudflare Workers și un timestamp al ultimei actualizări."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Test manual cu curl:"}),s.jsx("div",{className:"bg-muted rounded p-3 mt-1 font-mono text-xs overflow-x-auto",children:'curl -H "User-Agent: Googlebot" https://eduweb.ro/ce-este-web3'}),s.jsx("p",{className:"mt-1",children:"Compară output-ul cu ce vezi în browser pe aceeași pagină."})]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Google Search Console"}),' → URL Inspection → „View Crawled Page" pentru a vedea exact ce indexează Google.']}),s.jsxs("li",{children:[s.jsx("strong",{children:"Rich Results Test"})," (",s.jsx("code",{children:"search.google.com/test/rich-results"}),") — verifică JSON-LD (FAQ, Article schema)."]})]})})]}),s.jsx("div",{className:"text-xs text-muted-foreground pt-2 border-t",children:"Ultima actualizare: 14 martie 2026 — Audit complet pre-randare + aliniere conținut pilon RO/EN."})]})})}const PCt=["web3","blockchain","nft","validare-nft","ai","digital-marketing","e-learning"],Z0e=[{value:"începător",label:"Începător"},{value:"intermediar",label:"Intermediar"},{value:"avansat",label:"Avansat"}];function Cee(e){return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function ICt(){const{toast:e}=wn(),r=As(),n=Kr(),[i,a]=w.useState({title:"",slug:"",description:"",difficulty:"începător",topics:[],modules:[{title:"",description:"",lessons:[{title:"",content:""}],expanded:!0}]}),o=An({mutationFn:async y=>{const{data:x,error:b}=await G.from("courses").insert({title:y.title,slug:y.slug||Cee(y.title),description:y.description,difficulty_level:y.difficulty,topics:y.topics,content_origin:"manual",production_status:"planning",price_type:"free",total_lessons:y.modules.reduce((v,j)=>v+j.lessons.length,0)}).select("id").single();if(b)throw b;await G.from("course_production_config").insert({course_id:x.id});for(let v=0;v<y.modules.length;v++){const j=y.modules[v],{data:_,error:C}=await G.from("course_modules").insert({course_id:x.id,title:j.title,de
2279scription:j.description,sort_order:v}).select("id").single();if(C)throw C;for(let N=0;N<j.lessons.length;N++){const S=j.lessons[N],{error:E}=await G.from("course_lessons").insert({module_id:_.id,title:S.title,content:S.content,sort_order:N,content_status:"draft"});if(E)throw E}}return x.id},onSuccess:y=>{n.invalidateQueries({queryKey:["admin-courses"]}),e({title:"Curs creat cu succes",description:"Poți continua cu editarea și aprobarea lecțiilor."}),r(`/admin/courses/${y}`)},onError:y=>{e({title:"Eroare la creare",description:y.message,variant:"destructive"})}}),l=(y,x)=>{a(b=>({...b,[y]:x,...y==="title"?{slug:Cee(x)}:{}}))},c=(y,x)=>{a(b=>({...b,modules:b.modules.map((v,j)=>j===y?{...v,...x}:v)}))},u=()=>{a(y=>({...y,modules:[...y.modules,{title:"",description:"",lessons:[{title:"",content:""}],expanded:!0}]}))},d=y=>{i.modules.length<=1||a(x=>({...x,modules:x.modules.filter((b,v)=>v!==y)}))},h=(y,x,b)=>{a(v=>({...v,modules:v.modules.map((j,_)=>_===y?{...j,lessons:j.lessons.map((C,N)=>N===x?{...C,...b}:C)}:j)}))},f=y=>{a(x=>({...x,modules:x.modules.map((b,v)=>v===y?{...b,lessons:[...b.lessons,{title:"",content:""}]}:b)}))},p=(y,x)=>{a(b=>({...b,modules:b.modules.map((v,j)=>j===y&&v.lessons.length>1?{...v,lessons:v.lessons.filter((_,C)=>C!==x)}:v)}))},m=y=>{a(x=>({...x,topics:x.topics.includes(y)?x.topics.filter(b=>b!==y):[...x.topics,y]}))},A=i.modules.reduce((y,x)=>y+x.lessons.length,0),g=i.title.trim()&&i.modules.every(y=>y.title.trim()&&y.lessons.every(x=>x.title.trim()));return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsxs(Ht,{className:"flex items-center gap-2 text-lg",children:[s.jsx(yr,{className:"h-5 w-5"}),"Informații Curs"]})}),s.jsxs(ot,{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Titlu curs *"}),s.jsx(qe,{value:i.title,onChange:y=>l("title",y.target.value),placeholder:"Ex: Introducere în Blockchain"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Slug"}),s.jsx(qe,{value:i.slug,onChange:y=>l("slug",y.target.value),placeholder:"auto-generat din titlu"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Descriere curs"}),s.jsx(fr,{value:i.description,onChange:y=>l("description",y.target.value),placeholder:"Descrierea cursului...",rows:3})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Nivel dificultate"}),s.jsxs(Cn,{value:i.difficulty,onValueChange:y=>l("difficulty",y),children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsx(vn,{children:Z0e.map(y=>s.jsx(_t,{value:y.value,children:y.label},y.value))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Topicuri"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:PCt.map(y=>s.jsx(at,{variant:i.topics.includes(y)?"default":"outline",className:"cursor-pointer text-xs",onClick:()=>m(y),children:vg[y]},y))})]})]})]})]}),s.jsxs(st,{children:[s.jsx(Ot,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Ht,{className:"flex items-center gap-2 text-lg",children:[s.jsx(op,{className:"h-5 w-5"}),"Structură: ",i.modules.length," module, ",A," lecții"]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:u,children:[s.jsx(Qn,{className:"h-4 w-4 mr-1"})," Modul"]})]})}),s.jsx(ot,{className:"space-y-4",children:i.modules.map((y,x)=>s.jsxs("div",{className:"border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 p-3 cursor-pointer hover:bg-muted/30",onClick:()=>c(x,{expanded:!y.expanded}),children:[s.jsx(FU,{className:"h-4 w-4 text-muted-foreground"}),s.jsxs(at,{variant:"secondary",className:"text-xs",children:["M",x+1]}),s.jsx("span",{className:"flex-1 font-medium text-sm truncate",children:y.title||"Modul fără titlu"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[y.lessons.length," lecții"]}),y.expanded?s.jsx(i4,{className:"h-4 w-4"}):s.jsx(Vl,{className:"h-4 w-4"}),i.modules.length>1&&s.jsx(me,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:b=>{b.stopPropagation(),d(x)},children:s.jsx(Xr,{className:"h-3.5 w-3.5 text-destructive"})})]}),y.expanded&&s.jsxs("div",{className:"px-3 pb-3 space-y-3 border-t",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 pt-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{className:"text-xs",children:"Titlu modul *"}),s.jsx(qe,{value:y.title,onChange:b=>c(x,{title:b.target.value}),placeholder:"Ex: Fundamente Blockchain"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ge,{className:"text-xs",children:"Descriere modul"}),s.jsx(qe,{value:y.description,onChange:b=>c(x,{description:b.target.value}),placeholder:"Scurtă descriere..."})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ge,{className:"text-xs font-medium",children:"Lecții"}),s.jsxs(me,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>f(x),children:[s.jsx(Qn,{className:"h-3 w-3 mr-1"})," Lecție"]})]}),y.lessons.map((b,v)=>s.jsxs("div",{className:"flex gap-2 items-start p-2 bg-muted/20 rounded-md",children:[s.jsxs(at,{variant:"outline",className:"text-[10px] mt-2 shrink-0",children:["L",v+1]}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx(qe,{value:b.title,onChange:j=>h(x,v,{title:j.target.value}),placeholder:"Titlu lecție *",className:"h-8 text-sm"}),s.jsx(fr,{value:b.content,onChange:j=>h(x,v,{content:j.target.value}),placeholder:"Conținutul lecției (text narativ)...",rows:4,className:"text-sm"})]}),y.lessons.length>1&&s.jsx(me,{variant:"ghost",size:"icon",className:"h-7 w-7 mt-1",onClick:()=>p(x,v),children:s.jsx(Xr,{className:"h-3 w-3 text-destructive"})})]},v))]})]})]},x))})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx(me,{size:"lg",disabled:!g||o.isPending,onClick:()=>o.mutate(i),children:o.isPending?s.jsxs(s.Fragment,{children:[s.jsx(rt,{className:"h-4 w-4 mr-2 animate-spin"})," Se creează..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Gt,{className:"h-4 w-4 mr-2"})," Creează cursul și continuă"]})})})]})}function FCt(){const{toast:e}=wn(),r=As(),n=Kr(),[i,a]=w.useState({topic:"",audience:"",level:"începător",objectives:"",tone:"educational",moduleCount:"6",lessonsPerModule:"3",additionalNotes:""}),[o,l]=w.useState(!1),[c,u]=w.useState("idle"),[d,h]=w.useState({current:0,total:0,currentTitle:""}),f=(m,A)=>{a(g=>({...g,[m]:A}))},p=async()=>
2279{if(!i.topic.trim()){e({title:"Introdu un subiect",variant:"destructive"});return}l(!0),u("structure");try{const{data:m,error:A}=await G.functions.invoke("generate-course-draft",{body:{topic:i.topic,audience:i.audience,level:i.level,objectives:i.objectives,tone:i.tone,module_count:parseInt(i.moduleCount),lessons_per_module:parseInt(i.lessonsPerModule),additional_notes:i.additionalNotes}});if(A)throw A;if(!(m!=null&&m.course_id))throw new Error("Nu s-a putut crea structura cursului");const g=m.course_id,y=m.lessons_pending||[];if(e({title:`Structură creată: ${m.total_lessons} lecții`,description:"Se generează conținutul detaliat al fiecărei lecții..."}),y.length>0){u("lessons"),h({current:0,total:y.length,currentTitle:""});const{data:x}=await G.from("courses").select("title, description").eq("id",g).single();for(let b=0;b<y.length;b++){const v=y[b];h({current:b+1,total:y.length,currentTitle:v.title});try{const{error:j}=await G.functions.invoke("generate-course-draft",{body:{phase:"lesson_content",lesson_id:v.id,lesson_title:v.title,module_title:v.moduleTitle,course_title:(x==null?void 0:x.title)||i.topic,course_description:(x==null?void 0:x.description)||"",level:i.level,is_podcast:v.isPodcast}});j&&console.error(`Error generating lesson ${b+1}:`,j)}catch(j){console.error(`Failed lesson ${b+1}:`,j)}b<y.length-1&&await new Promise(j=>setTimeout(j,1500))}}n.invalidateQueries({queryKey:["admin-courses"]}),e({title:"Curs generat cu succes!",description:`${y.length} lecții generate. Revizuiește conținutul și aprobă pentru producție.`}),r(`/admin/courses/${g}`)}catch(m){e({title:"Eroare la generare",description:m.message,variant:"destructive"})}finally{l(!1),u("idle")}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(st,{children:[s.jsxs(Ot,{children:[s.jsxs(Ht,{className:"flex items-center gap-2 text-lg",children:[s.jsx(Li,{className:"h-5 w-5"}),"Descrie cursul dorit"]}),s.jsx(nj,{children:"AI-ul va genera structura completă în 2 faze: mai întâi structura (module, lecții, quiz-uri), apoi conținutul narativ al fiecărei lecții."})]}),s.jsxs(ot,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Subiect / Temă principală *"}),s.jsx(qe,{value:i.topic,onChange:m=>f("topic",m.target.value),placeholder:"Ex: Smart Contracts pe Ethereum pentru dezvoltatori"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Audiență țintă"}),s.jsx(qe,{value:i.audience,onChange:m=>f("audience",m.target.value),placeholder:"Ex: Dezvoltatori web cu experiență medie"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Nivel"}),s.jsxs(Cn,{value:i.level,onValueChange:m=>f("level",m),children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsx(vn,{children:Z0e.map(m=>s.jsx(_t,{value:m.value,children:m.label},m.value))})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Obiective de învățare"}),s.jsx(fr,{value:i.objectives,onChange:m=>f("objectives",m.target.value),placeholder:"Ce ar trebui să știe/poată face cursantul la final? (câte un obiectiv pe linie)",rows:3})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Ton / Stil"}),s.jsxs(Cn,{value:i.tone,onValueChange:m=>f("tone",m),children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"educational",children:"Educațional"}),s.jsx(_t,{value:"conversational",children:"Conversațional"}),s.jsx(_t,{value:"formal",children:"Formal / Academic"}),s.jsx(_t,{value:"practical",children:"Practic / Hands-on"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Nr. module"}),s.jsxs(Cn,{value:i.moduleCount,onValueChange:m=>f("moduleCount",m),children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsx(vn,{children:["2","3","4","5","6","8"].map(m=>s.jsxs(_t,{value:m,children:[m," module"]},m))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Lecții / modul"}),s.jsxs(Cn,{value:i.lessonsPerModule,onValueChange:m=>f("lessonsPerModule",m),children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsx(vn,{children:["2","3","4","5"].map(m=>s.jsxs(_t,{value:m,children:[m," lecții"]},m))})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{children:"Note adiționale (opțional)"}),s.jsx(fr,{value:i.additionalNotes,onChange:m=>f("additionalNotes",m.target.value),placeholder:"Instrucțiuni suplimentare, exemple dorite, subiecte de evitat...",rows:3})]})]})]}),o&&s.jsx(st,{className:"border-primary/30 bg-primary/5",children:s.jsx(ot,{className:"pt-6",children:s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(rt,{className:"h-5 w-5 animate-spin text-primary"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:c==="structure"?"Faza 1: Se generează structura cursului...":`Faza 2: Se generează conținutul lecțiilor (${d.current}/${d.total})`}),c==="lessons"&&d.currentTitle&&s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["📝 ",d.currentTitle]})]})]}),c==="lessons"&&d.total>0&&s.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:s.jsx("div",{className:"bg-primary rounded-full h-2 transition-all duration-500",style:{width:`${d.current/d.total*100}%`}})})]})})}),s.jsx("div",{className:"flex justify-end",children:s.jsx(me,{size:"lg",disabled:!i.topic.trim()||o,onClick:p,children:o?s.jsxs(s.Fragment,{children:[s.jsx(rt,{className:"h-4 w-4 mr-2 animate-spin"})," Se generează..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Li,{className:"h-4 w-4 mr-2"})," Generează cursul cu AI"]})})})]})}function OCt(){const{toast:e}=wn(),r=As(),n=Kr(),[i,a]=w.useState(null),[o,l]=w.useState(null),[c,u]=w.useState({}),[d,h]=w.useState({current:0,total:0,currentTitle:"",errors:0}),[f,p]=w.useState([]),{data:m,isLoading:A,refetch:g}=Xe({queryKey:["courses-pending-generation"],queryFn:async()=>{const{data:v,error:j}=await G.from("courses").select("id, title, slug, total_lessons, production_status, is_published").eq("content_origin","ai_generated").eq("is_published",!1).order("created_at",{ascending:!1});if(j)throw j;return v!=null&&v.length?(await Promise.all(v.map(async C=>{const{data:N}=await G.from("course_modules").select("id, title").eq("course_id",C.id);if(!(N!=null&&N.length))return null;const S=N.map(L=>L.id),{data:E}=await G.from("course_lessons").select("id, title, content_status, module_id, sort_order, qa_notes").in("module_id",S).order("sort_order"),O=(E==null?void 0:E.filter(L=>L.content_status==="pending_generation"))||[],B=(E==null?void 0:E.filter(L=>L.content_status==="draft"))||[],T=(E==null?void 0:E.filter(L=>L.content_status==="qa_passed"))||[],F=(E==null?void 0:E.filter(L=>L.content_status==="needs_review"))||[],I=(E==null?void 0:E.length)||0;if(I===0)return null;const D=O.map(L=>{const V=N.find(U=>U.id===L.module_id);return{...L,moduleTitle:(V==null?void 0:V.title)||"",isPodcast:L.title.toLowerCase().includes("podcast")||L.title.toLowerCase().includes("anna")}});return{...C,pendingLessons:D,pendingCount:O.length,draftCount:B.length,qaPassedCount:T.length,needsReviewCount:F.length,totalLessons:I,needsReviewLessons:F}}
2279))).filter(Boolean):[]}}),y=async v=>{if(v.is_published){e({title:"Cursul este publicat",description:"Nu poți modifica un curs publicat.",variant:"destructive"});return}a(v.id),h({current:0,total:v.pendingLessons.length,currentTitle:"",errors:0}),p([]);const{data:j}=await G.from("courses").select("title, description, difficulty_level").eq("id",v.id).single();let _=0;for(let N=0;N<v.pendingLessons.length;N++){const S=v.pendingLessons[N];h(E=>({...E,current:N+1,currentTitle:S.title}));try{const{data:E,error:O}=await G.functions.invoke("generate-course-draft",{body:{phase:"lesson_content",lesson_id:S.id,lesson_title:S.title,module_title:S.moduleTitle,course_title:(j==null?void 0:j.title)||v.title,course_description:(j==null?void 0:j.description)||"",level:(j==null?void 0:j.difficulty_level)||"începător",is_podcast:S.isPodcast}});O?(console.error(`Error generating lesson ${N+1}:`,O),_++,h(B=>({...B,errors:_}))):p(B=>[...B,S.id])}catch(E){console.error(`Failed lesson ${N+1}:`,E),_++,h(O=>({...O,errors:_}))}N<v.pendingLessons.length-1&&await new Promise(E=>setTimeout(E,2e3))}a(null),n.invalidateQueries({queryKey:["courses-pending-generation"]}),n.invalidateQueries({queryKey:["admin-courses"]});const C=v.pendingLessons.length-_;e({title:"Generare finalizată!",description:`${C} lecții generate cu succes${_>0?`, ${_} erori`:""}. Mergi la curs pentru a revizui.`,variant:_>0?"destructive":"default"}),g()},x=async v=>{l(v);try{const{data:j,error:_}=await G.functions.invoke("generate-course-draft",{body:{phase:"qa_verify",course_id:v}});if(_)throw _;u(C=>({...C,[v]:j})),n.invalidateQueries({queryKey:["courses-pending-generation"]}),e({title:"Verificare QA finalizată",description:`${j.passed} lecții OK, ${j.failed} necesită revizie`,variant:j.failed>0?"destructive":"default"}),g()}catch(j){e({title:"Eroare QA",description:j.message,variant:"destructive"})}finally{l(null)}},b=async v=>{if(v.is_published){e({title:"Cursul este publicat",description:"Nu poți modifica un curs publicat.",variant:"destructive"});return}if(!confirm(`Regenerezi TOATE lecțiile non-podcast din "${v.title}"? Conținutul actual va fi suprascris.`))return;const{data:j}=await G.from("course_modules").select("id, title").eq("course_id",v.id);if(!(j!=null&&j.length))return;const _=j.map(S=>S.id),{data:C}=await G.from("course_lessons").select("id, title, module_id").in("module_id",_);if(!(C!=null&&C.length))return;const N=C.filter(S=>!S.title.toLowerCase().includes("podcast")&&!S.title.toLowerCase().includes("anna"));for(const S of N)await G.from("course_lessons").update({content_status:"pending_generation",qa_notes:null}).eq("id",S.id);e({title:`${N.length} lecții resetate`,description:'Apasă "Generează lecții rămase" pentru a le regenera cu noul prompt.'}),g()};return A?s.jsx(st,{children:s.jsxs(ot,{className:"pt-6 flex items-center justify-center py-8",children:[s.jsx(rt,{className:"h-5 w-5 animate-spin mr-2"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Se verifică cursurile existente..."})]})}):m!=null&&m.length?s.jsx("div",{className:"space-y-4",children:m.map(v=>{var j,_;return s.jsxs(st,{className:"border-amber-500/30 bg-amber-500/5",children:[s.jsx(Ot,{className:"pb-3",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx(Ht,{className:"text-base",children:v.title}),s.jsxs(nj,{className:"mt-1",children:[v.qaPassedCount>0&&s.jsxs("span",{className:"text-green-600",children:[v.qaPassedCount," QA OK"]}),v.qaPassedCount>0&&" • ",v.draftCount>0&&s.jsxs("span",{children:[v.draftCount," draft"]}),v.draftCount>0&&" • ",v.needsReviewCount>0&&s.jsxs("span",{className:"text-red-600 font-medium",children:[v.needsReviewCount," necesită revizie"]}),v.needsReviewCount>0&&" • ",v.pendingCount>0&&s.jsxs("span",{className:"text-amber-600 font-medium",children:[v.pendingCount," în așteptare"]}),v.pendingCount>0&&" • ",v.totalLessons," total"]})]}),s.jsxs(at,{variant:"outline",className:"text-amber-600 border-amber-500/50",children:[Math.round((v.totalLessons-v.pendingCount)/v.totalLessons*100),"% completat"]})]})}),s.jsx(ot,{children:i===v.id?s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(rt,{className:"h-5 w-5 animate-spin text-primary"}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("p",{className:"text-sm font-medium",children:["Se generează lecția ",d.current,"/",d.total,d.errors>0&&s.jsxs("span",{className:"text-destructive ml-2",children:["(",d.errors," erori)"]})]}),d.currentTitle&&s.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["📝 ",d.currentTitle]})]})]}),s.jsx(ql,{value:d.current/d.total*100,className:"h-2"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Estimare: ~",Math.ceil((d.total-d.current)*.5)," minute rămase"]})]}):s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[v.pendingCount>0&&s.jsxs(me,{onClick:()=>y(v),className:"gap-2",children:[s.jsx(ya,{className:"h-4 w-4"}
2279),"Generează ",v.pendingCount," lecții rămase"]}),(v.draftCount>0||v.needsReviewCount>0)&&s.jsx(me,{variant:"outline",onClick:()=>x(v.id),disabled:o===v.id,className:"gap-2",children:o===v.id?s.jsxs(s.Fragment,{children:[s.jsx(rt,{className:"h-4 w-4 animate-spin"})," Se verifică..."]}):s.jsxs(s.Fragment,{children:[s.jsx(hn,{className:"h-4 w-4"})," Verificare QA"]})}),s.jsx(me,{variant:"outline",size:"sm",onClick:()=>r(`/admin/courses/${v.id}`),children:"Vizualizează cursul"}),s.jsxs(me,{variant:"destructive",size:"sm",onClick:()=>b(v),className:"gap-2",children:[s.jsx(Li,{className:"h-4 w-4"}),"Regenerează toate lecțiile"]})]}),c[v.id]&&s.jsxs("div",{className:"mt-3 p-3 rounded-lg bg-muted/50 space-y-2",children:[s.jsxs("p",{className:"text-sm font-medium",children:["Rezultate QA: ",c[v.id].passed," ✅ | ",c[v.id].failed," ❌"]}),(j=c[v.id].results)==null?void 0:j.filter(C=>C.issues.length>0).map(C=>s.jsxs("div",{className:"text-xs border-l-2 border-destructive pl-2",children:[s.jsx("span",{className:"font-medium",children:C.title}),s.jsx("ul",{className:"text-muted-foreground mt-0.5",children:C.issues.map((N,S)=>s.jsxs("li",{children:["• ",N]},S))})]},C.id))]}),((_=v.needsReviewLessons)==null?void 0:_.length)>0&&!c[v.id]&&s.jsxs("div",{className:"mt-2 p-3 rounded-lg bg-red-500/5 border border-red-500/20 space-y-1",children:[s.jsxs("p",{className:"text-xs font-medium text-red-600 flex items-center gap-1",children:[s.jsx(k2,{className:"h-3.5 w-3.5"})," Lecții cu probleme QA:"]}),v.needsReviewLessons.map(C=>s.jsxs("div",{className:"text-xs",children:[s.jsx("span",{className:"font-medium",children:C.title}),C.qa_notes&&s.jsxs("span",{className:"text-muted-foreground ml-1",children:["— ",C.qa_notes]})]},C.id))]})]})})]},v.id)})}):s.jsx(st,{children:s.jsxs(ot,{className:"pt-6 text-center py-8",children:[s.jsx(hn,{className:"h-8 w-8 text-green-500 mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Toate cursurile AI au conținutul generat și verificat. Creează un curs nou din tab-urile de mai sus."})]})})}function LCt(){return s.jsx(xr,{children:s.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Course Prompting"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Creează un curs nou — manual sau cu ajutorul AI — și pregătește-l pentru pipeline-ul de producție."})]}),s.jsx(OCt,{}),s.jsxs(Gi,{defaultValue:"manual",className:"w-full",children:[s.jsxs(Ri,{className:"grid w-full grid-cols-2",children:[s.jsxs(Mt,{value:"manual",className:"flex items-center gap-2",children:[s.jsx(us,{className:"h-4 w-4"}),"Mod 1: Manual"]}),s.jsxs(Mt,{value:"ai",className:"flex items-center gap-2",children:[s.jsx(Li,{className:"h-4 w-4"}),"Mod 2: Generare AI"]})]}),s.jsx(er,{value:"manual",className:"mt-6",children:s.jsx(ICt,{})}),s.jsx(er,{value:"ai",className:"mt-6",children:s.jsx(FCt,{})})]})]})})}const nS=[{key:"signup",label:"Confirmare Email (Signup)",description:"Trimis la înregistrare pentru confirmarea adresei de email."},{key:"recovery",label:"Resetare Parolă (Recovery)",description:"Trimis când utilizatorul solicită resetarea parolei."},{key:"magiclink",label:"Magic Link",description:"Trimis pentru autentificare fără parolă."},{key:"invite",label:"Invitație",description:"Trimis când un admin invită un utilizator nou."},{key:"email_change",label:"Schimbare Email",description:"Trimis pentru confirmarea noii adrese de email."},{key:"reauthentication",label:"Re-autentificare (OTP)",description:"Trimis cu un cod de verificare pentru acțiuni sensibile."}];function RCt(){var D;const[e,r]=w.useState({}),[n,i]=w.useState(!0),[a,o]=w.useState(null),[l,c]=w.useState(null),[u,d]=w.useState(!1),[h,f]=w.useState(null),[p,m]=w.useState(""),[A,g]=w.useState("ro"),[y,x]=w.useState(!1),[b,v]=w.useState(""),[j,_]=w.useState([]),[C,N]=w.useState(!0);w.useEffect(()=>{S(),E()},[]);const S=async()=>{i(!0);const{data:L}=await G.from("email_template_overrides").select("*"),V={};L==null||L.forEach(U=>{V[U.template_key]=U}),r(V),i(!1)},E=async()=>{N(!0);try{const{data:{session:L}}=await G.auth.getSession();if(!(L!=null&&L.access_token))throw new Error("Nu ești autentificat");const{data:V,error:U}=await G.functions.invoke("preview-transactional-email",{method:"POST",body:{}});if(U)throw U;_((V.templates||[]).map(Q=>({key:Q.templateName,displayName:Q.displayName||Q.templateName,subject:Q.subject||""})))}catch(L){console.error("Failed to fetch transactional templates:",L)}N(!1)},O=L=>{const V=e[L];c(V||{template_key:L,subject_ro:null,subject_en:null,heading_ro:null,heading_en:null,button_text_ro:null,button_text_en:null,footer_ro:null,footer_en:null}),o(L)},B=async()=>
2279{if(!l||!a)return;d(!0);const L={template_key:a,subject_ro:l.subject_ro||null,subject_en:l.subject_en||null,heading_ro:l.heading_ro||null,heading_en:l.heading_en||null,button_text_ro:l.button_text_ro||null,button_text_en:l.button_text_en||null,footer_ro:l.footer_ro||null,footer_en:l.footer_en||null};let V;l.id?{error:V}=await G.from("email_template_overrides").update(L).eq("id",l.id):{error:V}=await G.from("email_template_overrides").insert(L),d(!1),V?ft.error("Eroare la salvare: "+V.message):(ft.success("Template salvat cu succes"),o(null),S())},T=async(L,V)=>{const U=nS.find(Q=>Q.key===L);v(`${(U==null?void 0:U.label)||L} (${V.toUpperCase()})`),f(L),g(V),x(!0),m("");try{const{data:Q,error:$}=await G.functions.invoke("auth-email-hook/preview",{method:"POST",body:{type:L,lang:V}});if($)throw $;const q=typeof Q=="string"?Q:(Q==null?void 0:Q.html)||"";m(q)}catch(Q){ft.error("Preview indisponibil: "+Q.message),m('<p style="padding:20px;color:red;">Eroare la încărcarea preview-ului.</p>')}x(!1)},F=async(L,V)=>{v(V),f(L),x(!0),m("");try{const{data:U,error:Q}=await G.functions.invoke("preview-transactional-email",{method:"POST",body:{}});if(Q)throw Q;const $=(U.templates||[]).find(q=>q.templateName===L);$!=null&&$.html?m($.html):m('<p style="padding:20px;color:red;">Template-ul nu a putut fi randat.</p>')}catch(U){ft.error("Preview indisponibil: "+U.message),m('<p style="padding:20px;color:red;">Eroare la încărcarea preview-ului.</p>')}x(!1)},I=L=>
2279!!e[L];return s.jsx(xr,{children:s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[s.jsx(Za,{className:"h-6 w-6"})," Email Templates"]}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Vizualizează și editează template-urile de email. Modificările se aplică automat la trimitere."})]}),s.jsxs("div",{children:[s.jsxs("h2",{className:"text-lg font-semibold mb-3 flex items-center gap-2",children:[s.jsx(Za,{className:"h-5 w-5"})," Template-uri Autentificare (",nS.length,")"]}),n?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"h-6 w-6 animate-spin"})}):s.jsx("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:nS.map(L=>s.jsxs(st,{children:[s.jsxs(Ot,{className:"pb-3",children:[s.jsxs(Ht,{className:"text-base flex items-center justify-between",children:[L.label,I(L.key)&&s.jsx("span",{className:"text-xs bg-primary/10 text-primary px-2 py-0.5 rounded-full",children:"Customizat"})]}),s.jsx(nj,{className:"text-xs",children:L.description})]}),s.jsxs(ot,{className:"flex flex-wrap gap-2",children:[s.jsxs(me,{size:"sm",variant:"outline",onClick:()=>T(L.key,"ro"),children:[s.jsx(Oi,{className:"h-3.5 w-3.5 mr-1"})," Preview RO"]}),s.jsxs(me,{size:"sm",variant:"outline",onClick:()=>T(L.key,"en"),children:[s.jsx(Oi,{className:"h-3.5 w-3.5 mr-1"})," Preview EN"]}),s.jsxs(me,{size:"sm",variant:"secondary",onClick:()=>O(L.key),children:[s.jsx(wp,{className:"h-3.5 w-3.5 mr-1"})," Editează"]})]})]},L.key))})]}),s.jsxs("div",{children:[s.jsxs("h2",{className:"text-lg font-semibold mb-3 flex items-center gap-2",children:[s.jsx(Dc,{className:"h-5 w-5"})," Template-uri Tranzacționale (",j.length,")"]}),s.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Email-uri automate trimise la acțiuni specifice (welcome, înscriere curs etc.). Template-urile noi sunt detectate automat."}),C?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(rt,{className:"h-6 w-6 animate-spin"})}):j.length===0?s.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"Nu există template-uri tranzacționale configurate."}):s.jsx("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:j.map(L=>s.jsxs(st,{children:[s.jsxs(Ot,{className:"pb-3",children:[s.jsx(Ht,{className:"text-base",children:L.displayName}),s.jsxs(nj,{className:"text-xs",children:["Subject: ",L.subject]})]}),s.jsx(ot,{className:"flex flex-wrap gap-2",children:s.jsxs(me,{size:"sm",variant:"outline",onClick:()=>F(L.key,L.displayName),children:[s.jsx(Oi,{className:"h-3.5 w-3.5 mr-1"})," Preview"]})})]},L.key))})]}),s.jsx(sl,{open:!!h,onOpenChange:()=>f(null),children:s.jsxs(Po,{className:"max-w-2xl max-h-[85vh] overflow-hidden flex flex-col",children:[s.jsx(ol,{children:s.jsxs(ll,{children:["Preview: ",b]})}),y?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"h-6 w-6 animate-spin"})}):s.jsx("iframe",{srcDoc:p,className:"w-full flex-1 min-h-[400px] border rounded-md bg-white",title:"Email Preview",sandbox:"allow-same-origin"})]})}),s.jsx(sl,{open:!!a,onOpenChange:()=>o(null),children:s.jsxs(Po,{className:"max-w-xl max-h-[85vh] overflow-y-auto",children:[s.jsx(ol,{children:s.jsxs(ll,{children:["Editează: ",(D=nS.find(L=>L.key===a))==null?void 0:D.label]})}),l&&s.jsxs(Gi,{defaultValue:"ro",children:[s.jsxs(Ri,{className:"mb-4",children:[s.jsx(Mt,{value:"ro",children:"Română"}),s.jsx(Mt,{value:"en",children:"English"})]}),s.jsxs(er,{value:"ro",className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Ge,{children:"Subject (RO)"}),s.jsx(qe,{value:l.subject_ro||"",onChange:L=>c({...l,subject_ro:L.target.value}),placeholder:"Ex: Confirmă adresa de email"})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Heading (RO)"}),s.jsx(qe,{value:l.heading_ro||"",onChange:L=>c({...l,heading_ro:L.target.value}),placeholder:"Titlu din email"})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Text buton (RO)"}),s.jsx(qe,{value:l.button_text_ro||"",onChange:L=>c({...l,button_text_ro:L.target.value}),placeholder:"Ex: Confirmă emailul"})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Footer (RO)"}),s.jsx(fr,{value:l.footer_ro||"",onChange:L=>c({...l,footer_ro:L.target.value}),placeholder:"Text footer",rows:2})]})]}),s.jsxs(er,{value:"en",className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Ge,{children:"Subject (EN)"}),s.jsx(qe,{value:l.subject_en||"",onChange:L=>c({...l,subject_en:L.target.value}),placeholder:"Ex: Confirm your email"})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Heading (EN)"}),s.jsx(qe,{value:l.heading_en||"",onChange:L=>c({...l,heading_en:L.target.value}),placeholder:"Email heading"})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Button text (EN)"}),s.jsx(qe,{value:l.button_text_en||"",onChange:L=>c({...l,button_text_en:L.target.value}),placeholder:"Ex: Confirm email"})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Footer (EN)"}),s.jsx(fr,{value:l.footer_en||"",onChange:L=>c({...l,footer_en:L.target.value}),placeholder:"Footer text",rows:2})]})]})]}),s.jsxs(gb,{children:[s.jsx(me,{variant:"outline",onClick:()=>o(null),children:"Anulează"}),s.jsxs(me,{onClick:B,disabled:u,children:[u&&s.jsx(rt,{className:"h-4 w-4 mr-1 animate-spin"}),"Salvează"]})]})]})})]})})}const Nee={sent:"bg-green-500/10 text-green-700 border-green-500/20",pending:"bg-yellow-500/10 text-yellow-700 border-yellow-500/20",failed:"bg-red-500/10 text-red-700 border-red-500/20",dlq:"bg-red-500/10 text-red-700 border-red-500/20",suppressed:"bg-orange-500/10 text-orange-700 border-orange-500/20",bounced:"bg-red-500/10 text-red-700 border-red-500/20",complained:"bg-red-500/10 text-red-700 border-red-500/20"};function DCt(e){const r=new Date;
2279return e==="24h"?r.setHours(r.getHours()-24):e==="7d"?r.setDate(r.getDate()-7):r.setDate(r.getDate()-30),r.toISOString()}function MCt(){const[e,r]=w.useState([]),[n,i]=w.useState({total:0,sent:0,failed:0,suppressed:0}),[a,o]=w.useState([]),[l,c]=w.useState("7d"),[u,d]=w.useState("all"),[h,f]=w.useState("all"),[p,m]=w.useState(!0),[A,g]=w.useState(0),[y,x]=w.useState(null),[b,v]=w.useState(null),[j,_]=w.useState(!1),C=50,N=async()=>{m(!0);const T=DCt(l),{data:F}=await G.from("email_send_log").select("template_name").gte("created_at",T).order("template_name"),I=[...new Set((F||[]).map(M=>M.template_name))];o(I);let D=G.from("email_send_log").select("*").gte("created_at",T).order("created_at",{ascending:!1}).range(A*C,(A+1)*C-1);u!=="all"&&(D=D.eq("template_name",u)),h!=="all"&&(D=D.eq("status",h));const{data:L}=await D,V=new Map;for(const M of L||[]){const z=M.message_id||M.id,K=V.get(z);K?M.body_html&&!K.body_html&&V.set(z,M):V.set(z,M)}const U=Array.from(V.values());r(U);const{data:Q}=await G.from("email_send_log").select("message_id, status, id").gte("created_at",T),$=new Map;for(const M of Q||[]){const z=M.message_id||M.id;$.set(z,M.status)}const q=Array.from($.values());i({total:q.length,sent:q.filter(M=>M==="sent").length,failed:q.filter(M=>["failed","dlq"].includes(M)).length,suppressed:q.filter(M=>M==="suppressed").length}),m(!1)},S=["signup","invite","recovery","magic_link","email_change","reauthentication","auth_emails"],E=async T=>{var F;if(x(T),T.body_html){v(T.body_html);return}_(!0);try{const{data:{session:I}}=await G.auth.getSession(),D=I==null?void 0:I.access_token;if(!D){ft.error("Trebuie să fii autentificat"),_(!1);return}const L="ahleagpvrcuwshrzzpkq";if(S.includes(T.template_name)){const U=await fetch(`https://${L}.supabase.co/functions/v1/auth-email-hook/preview`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${D}`},body:JSON.stringify({type:T.template_name})});U.ok?v(await U.text()):v(O(T.template_name))}else{const U=await fetch(`https://${L}.supabase.co/functions/v1/preview-transactional-email`,{method:"GET",headers:{Authorization:`Bearer ${D}`}});if(U.ok){const $=(F=(await U.json()).templates)==null?void 0:F.find(q=>q.templateName===T.template_name);$!=null&&$.html?v($.html):v(O(T.template_name))}else v(O(T.template_name))}}catch{v(`<div style="padding:40px;font-family:sans-serif;color:#666;text-align:center;">
2280        <p>Nu s-a putut genera previzualizarea.</p>
2281      </div>`)}finally{_(!1)}},O=T=>`<div style="padding:40px;font-family:sans-serif;color:#666;text-align:center;">
2282    <p>Conținutul emailului nu a fost salvat și șablonul „${T}" nu poate fi previzualizat.</p>
2283    <p style="font-size:13px;margin-top:12px;">Emailurile trimise de acum vor fi arhivate automat cu conținut complet.</p>
2284  </div>`,B=()=>{x(null),v(null)};return w.useEffect(()=>{g(0),N()},[l,u,h]),w.useEffect(()=>{N()},[A]),s.jsx(xr,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-2xl font-heading font-bold flex items-center gap-2",children:[s.jsx(Za,{className:"w-6 h-6 text-primary"}),"Arhivă Emailuri"]}),s.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Monitorizare emailuri trimise din sistem — click pe un rând pentru previzualizare"})]}),s.jsxs(me,{variant:"outline",size:"sm",onClick:N,disabled:p,children:[s.jsx(ef,{className:`w-4 h-4 mr-2 ${p?"animate-spin":""}`}),"Reîmprospătare"]})]}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsx("div",{className:"flex gap-1",children:["24h","7d","30d"].map(T=>s.jsx(me,{size:"sm",variant:l===T?"default":"outline",onClick:()=>c(T),children:T==="24h"?"24 ore":T==="7d"?"7 zile":"30 zile"},T))}),s.jsxs(Cn,{value:u,onValueChange:d,children:[s.jsx(yn,{className:"w-[200px]",children:s.jsx(Nn,{placeholder:"Tip email"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:"Toate tipurile"}),a.map(T=>s.jsx(_t,{value:T,children:T},T))]})]}),s.jsxs(Cn,{value:h,onValueChange:f,children:[s.jsx(yn,{className:"w-[160px]",children:s.jsx(Nn,{placeholder:"Status"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:"Toate"}),s.jsx(_t,{value:"sent",children:"Trimise"}),s.jsx(_t,{value:"failed",children:"Eșuate"}),s.jsx(_t,{value:"dlq",children:"DLQ"}),s.jsx(_t,{value:"suppressed",children:"Supprimate"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-sm text-muted-foreground flex items-center gap-1.5",children:[s.jsx(Za,{className:"w-4 h-4"})," Total"]})}),s.jsx(ot,{children:s.jsx("p",{className:"text-2xl font-bold",children:n.total})})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-sm text-muted-foreground flex items-center gap-1.5",children:[s.jsx(hn,{className:"w-4 h-4 text-green-600"})," Trimise"]})}),s.jsx(ot,{children:s.jsx("p",{className:"text-2xl font-bold text-green-600",children:n.sent})})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-sm text-muted-foreground flex items-center gap-1.5",children:[s.jsx(Yh,{className:"w-4 h-4 text-red-600"})," Eșuate"]})}),s.jsx(ot,{children:s.jsx("p",{className:"text-2xl font-bold text-red-600",children:n.failed})})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsxs(Ht,{className:"text-sm text-muted-foreground flex items-center gap-1.5",children:[s.jsx(Tu,{className:"w-4 h-4 text-orange-600"})," Supprimate"]})}),s.jsx(ot,{children:s.jsx("p",{className:"text-2xl font-bold text-orange-600",children:n.suppressed})})]})]}),s.jsx(st,{children:s.jsx(ot,{className:"p-0",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Tip"}),s.jsx(Me,{children:"Subiect"}),s.jsx(Me,{children:"Destinatar"}),s.jsx(Me,{children:"Status"}),s.jsx(Me,{children:"Data"}),s.jsx(Me,{children:"Eroare"})]})}),s.jsx(In,{children:e.length===0?s.jsx(Nt,{children:s.jsx(Oe,{colSpan:6,className:"text-center py-12 text-muted-foreground",children:p?"Se încarcă...":"Niciun email găsit în perioada selectată"})}):e.map(T=>s.jsxs(Nt,{className:"cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>E(T),children:[s.jsx(Oe,{className:"font-mono text-xs",children:T.template_name}),s.jsx(Oe,{className:"text-sm max-w-[200px] truncate",children:T.subject||"—"}),s.jsx(Oe,{className:"text-sm",children:T.recipient_email}),s.jsx(Oe,{children:s.jsx(at,{variant:"outline",className:Nee[T.status]||"",children:T.status})}),s.jsx(Oe,{className:"text-xs text-muted-foreground whitespace-nowrap",children:new Date(T.created_at).toLocaleStr
2284ing("ro-RO")}),s.jsx(Oe,{className:"text-xs text-red-600 max-w-[200px] truncate",children:T.error_message||"—"})]},T.id))})]})})}),e.length>=C&&s.jsxs("div",{className:"flex justify-center gap-2",children:[s.jsx(me,{variant:"outline",size:"sm",disabled:A===0,onClick:()=>g(T=>T-1),children:"← Anterior"}),s.jsxs("span",{className:"text-sm text-muted-foreground py-2",children:["Pagina ",A+1]}),s.jsx(me,{variant:"outline",size:"sm",onClick:()=>g(T=>T+1),children:"Următor →"})]}),s.jsx(sl,{open:!!y,onOpenChange:T=>!T&&B(),children:s.jsxs(Po,{className:"max-w-3xl max-h-[85vh] flex flex-col",children:[s.jsxs(ol,{children:[s.jsxs(ll,{className:"flex items-center gap-2 text-base",children:[s.jsx(Za,{className:"w-4 h-4"}),(y==null?void 0:y.subject)||(y==null?void 0:y.template_name)||"Previzualizare email"]}),s.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground pt-1",children:[s.jsxs("span",{children:["Către: ",s.jsx("strong",{children:y==null?void 0:y.recipient_email})]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Tip: ",s.jsx("strong",{children:y==null?void 0:y.template_name})]}),s.jsx("span",{children:"•"}),s.jsx("span",{children:(y==null?void 0:y.created_at)&&new Date(y.created_at).toLocaleString("ro-RO")}),s.jsx("span",{children:"•"}),s.jsx(at,{variant:"outline",className:Nee[y==null?void 0:y.status]||"",children:y==null?void 0:y.status})]})]}),s.jsx("div",{className:"flex-1 min-h-0 overflow-hidden rounded border bg-white",children:j?s.jsxs("div",{className:"flex items-center justify-center h-[60vh] text-muted-foreground",children:[s.jsx(ef,{className:"w-5 h-5 animate-spin mr-2"}),"Se generează previzualizarea..."]}):b?s.jsx("iframe",{srcDoc:b,className:"w-full h-[60vh] border-0",sandbox:"allow-same-origin allow-popups allow-popups-to-navigate",title:"Email preview"}):null})]})})]})})}function zCt(e,r){var o,l;const n=[],i=e.split(/^## /m),a=(o=i[0])==null?void 0:o.trim();if(a){const c=a.match(/!\[([^\]]*)\]\(([^)]+)\)/);n.push({title:r,content:a.replace(/!\[[^\]]*\]\([^)]+\)/g,"").trim(),imageUrl:c==null?void 0:c[2]})}for(let c=1;c<i.length;c++){const d=i[c].split(`
2285`),h=((l=d[0])==null?void 0:l.trim())||`Slide ${c+1}`,f=d.slice(1).join(`
2286`).trim(),p=f.match(/!\[([^\]]*)\]\(([^)]+)\)/);n.push({title:h,content:f.replace(/!\[[^\]]*\]\([^)]+\)/g,"").trim(),imageUrl:p==null?void 0:p[2]})}return n.length>0?n:[{title:r,content:e}]}function UCt(e){const r=e.split(`
2287`).filter(o=>o.trim()),n=[];let i=[];const a=()=>{i.length>0&&(n.push(s.jsx("ul",{className:"space-y-1.5 my-3",children:i.map((o,l)=>s.jsxs("li",{className:"flex gap-2 text-sm leading-relaxed",children:[s.jsx("span",{className:"text-primary mt-0.5 shrink-0",children:"•"}),s.jsx("span",{dangerouslySetInnerHTML:{__html:See(o)}})]},l))},`list-${n.length}`)),i=[])};for(const o of r){const l=o.trim(),c=l.match(/^(?:\d+\.\s+|[-*]\s+)(.+)/);if(c){i.push(c[1]);continue}a(),n.push(s.jsx("p",{className:"text-sm leading-relaxed my-1.5",dangerouslySetInnerHTML:{__html:See(l)}},`p-${n.length}`))}return a(),s.jsx(s.Fragment,{children:n})}function See(e){return e.replace(/\*\*(.+?)\*\*/g,'<strong class="text-foreground font-semibold">$1</strong>').replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/`(.+?)`/g,'<code class="px-1 py-0.5 rounded bg-muted text-xs font-mono">$1</code>')}function $Ct({lessonContent:e,lessonTitle:r,currentTime:n,duration:i,isPlaying:a,onSeek:o,slideImages:l}){const c=l&&l.length>0,u=w.useMemo(()=>zCt(e,r),[e,r]),d=c?l.length:u.length,[h,f]=w.useState(0),[p,m]=w.useState(!1),A=c&&l.some(b=>b.timestamp_start!=null),g=i>0?i/d:0;w.useEffect(()=>{if(!a||p||i<=0)return;let b=-1;if(A&&c){for(let v=l.length-1;v>=0;v--){const j=l[v].timestamp_start;if(j!=null&&n>=j){b=v;break}}b===-1&&(b=0)}else b=Math.min(Math.floor(n/g),d-1);b>=0&&b!==h&&f(b)},[n,a,p,g,d,i,h,A,c,l]),w.useEffect(()=>{if(!p||!a)return;const b=setTimeout(()=>m(!1),5e3);return()=>clearTimeout(b)},[p,a]);const y=w.useCallback(b=>{var v;f(b),m(!0),o&&i>0&&(A&&c&&((v=l[b])==null?void 0:v.timestamp_start)!=null?o(l[b].timestamp_start):o(b*g))},[o,i,g,A,c,l]);if(c){const b=l[h];return s.jsxs("div",{className:"relative w-full h-full flex flex-col",children:[s.jsxs("div",{className:"flex-1 relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 animate-fade-in",children:s.jsx("img",{src:b==null?void 0:b.image_url,alt:`Slide ${h+1}`,className:"w-full h-full object-contain bg-white"})},h),h>0&&s.jsx("button",{onClick:()=>y(h-1),className:"absolute left-2 top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-background/80 backdrop-blur border border-border/50 hover:bg-accent transition-colors z-10",children:s.jsx(pg,{size:18})}),h<d-1&&s.jsx("button",{onClick:()=>y(h+1),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-background/80 backdrop-blur border border-border/50 hover:bg-accent transition-colors z-10",children:s.jsx(hs,{size:18})}),s.jsxs("span",{className:"absolute top-3 left-3 px-2.5 py-0.5 rounded-full bg-black/60 text-white text-xs font-medium z-10",children:[h+1," / ",d]})]}),s.jsx("div",{className:"flex items-center justify-center gap-1.5 py-2.5 bg-card/50 backdrop-blur shrink-0",children:l.map((v,j)=>s.jsx("button",{onClick:()=>y(j),className:`h-1.5 rounded-full transition-all duration-300 ${j===h?"w-6 bg-primary":j<h?"w-1.5 bg-primary/40":"w-1.5 bg-muted-foreground
2287/20"}`},j))})]})}const x=u[h];return s.jsxs("div",{className:"relative w-full h-full flex flex-col",children:[s.jsxs("div",{className:"flex-1 relative overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0 flex animate-fade-in",children:[s.jsx("div",{className:`flex-1 flex flex-col justify-center p-6 md:p-10 overflow-y-auto ${x!=null&&x.imageUrl?"md:w-3/5":"w-full"}`,children:s.jsxs("div",{className:"max-w-2xl mx-auto w-full",children:[s.jsxs("span",{className:"inline-block px-2.5 py-0.5 rounded-full bg-primary/10 text-primary text-xs font-medium mb-3",children:[h+1," / ",u.length]}),s.jsx("h2",{className:"text-lg md:text-2xl font-bold text-foreground mb-4 leading-tight",children:x==null?void 0:x.title}),s.jsx("div",{className:"text-muted-foreground",children:x&&UCt(x.content)})]})}),(x==null?void 0:x.imageUrl)&&s.jsx("div",{className:"hidden md:flex w-2/5 items-center justify-center p-6 bg-muted/30",children:s.jsx("img",{src:x.imageUrl,alt:x.title,className:"max-w-full max-h-full object-contain rounded-lg"})})]},h),h>0&&s.jsx("button",{onClick:()=>y(h-1),className:"absolute left-2 top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-background/80 backdrop-blur border border-border/50 hover:bg-accent transition-colors z-10",children:s.jsx(pg,{size:18})}),h<u.length-1&&s.jsx("button",{onClick:()=>y(h+1),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-background/80 backdrop-blur border border-border/50 hover:bg-accent transition-colors z-10",children:s.jsx(hs,{size:18})})]}),s.jsx("div",{className:"flex items-center justify-center gap-1.5 py-2.5 bg-card/50 backdrop-blur shrink-0",children:u.map((b,v)=>s.jsx("button",{onClick:()=>y(v),className:`h-1.5 rounded-full transition-all duration-300 ${v===h?"w-6 bg-primary":v<h?"w-1.5 bg-primary/40":"w-1.5 bg-muted-foreground/20"}`},v))})]})}function QCt({lessonId:e,lessonTitle:r,lessonContent:n,topic:i="web3"}){Pt();const{awardCoins:a}=Cp(),[o,l]=w.useState(null),[c,u]=w.useState("idle"),[d,h]=w.useState(0),[f,p]=w.useState(0),[m,A]=w.useState(0),[g,y]=w.useState(!1),[x,b]=w.useState(!1),v=w.useRef(null),j=w.useRef(null),{data:_}=Xe({queryKey:["lesson-slides",e],queryFn:async()=>{const{data:F,error:I}=await G.from("lesson_slides").select("*").eq("lesson_id",e).order("sort_order");if(I)throw I;return F||[]}}),C=n.includes("**Moderatoare (Ana):**")||n.includes("**Brian:**"),N=F=>{const I=Math.floor(F/60),D=Math.floor(F%60);return`${I}:${D.toString().padStart(2,"0")}`},S=async()=>{u("loading");try{let F=o;if(!F){const{data:D}=await G.from("course_lessons").select("video_url, estimated_minutes").eq("id",e).single();if(D!=null&&D.video_url)F=await J4(e,D.video_url),F.startsWith("lesson-audio:")||(F=Oh(F));else{const V=await fetch(`https://ahleagpvrcuwshrzzpkq.supabase.co/functions/v1/${C?"lesson-tts-conversation":"lesson-tts"}`,{method:"POST",headers:{"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw"},body:JSON.stringify({lessonId:e})});if(!V.ok)throw new Error("Generarea audio a eșuat.");const U=await V.json();F=Oh(U.audioUrl)}l(F)}const I=new Audio(Oh(F));I.muted=g,v.current=I,I.addEventListener("loadedmetadata",()=>{I.duration&&isFinite(I.duration)&&p(I.duration)}),I.addEventListener("timeupdate",()=>{A(I.currentTime),I.duration&&isFinite(I.duration)&&h(I.currentTime/I.duration*100)}),I.addEventListener("ended",()=>{u("paused"),h(100)}),I.preload="auto",u("ready"),G.from("media_plays").insert({media_type:"lesson_presentation",media_id:e,media_title:r,topic:i}).then(()=>{}),a(1,"lesson_video_play",e)}catch(F){console.error("Audio load error:",F),u("error")}},E=async()=>{const F=v.current;if(!F){await S();return}if(c==="playing")F.pause(),u("paused");else try{await F.play(),u("playing")}catch{}},O=async()=>{v.current?E():(await S(),setTimeout(async()=>
2287{if(v.current)try{await v.current.play(),u("playing")}catch{}},500))},B=()=>{y(F=>!F),v.current&&(v.current.muted=!g)},T=()=>{j.current&&(document.fullscreenElement?document.exitFullscreen().then(()=>b(!1)).catch(()=>{}):j.current.requestFullscreen().then(()=>b(!0)).catch(()=>{}))};return w.useEffect(()=>{const F=()=>b(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",F),()=>document.removeEventListener("fullscreenchange",F)},[]),w.useEffect(()=>()=>{var F;(F=v.current)==null||F.pause()},[]),s.jsxs("div",{ref:j,className:`rounded-xl overflow-hidden border border-border/50 shadow-2xl bg-card ${x?"fixed inset-0 z-50 rounded-none border-none flex flex-col":""}`,children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-border/50 bg-card shrink-0",children:[s.jsx(tR,{size:16,className:"text-primary"}),s.jsxs("span",{className:"text-sm font-medium truncate",children:["📊 Prezentare — ",r]})]}),s.jsx("div",{className:`relative bg-muted ${x?"flex-1":"aspect-[16/10]"}`,children:s.jsx($Ct,{lessonContent:n,lessonTitle:r,currentTime:m,duration:f,isPlaying:c==="playing",slideImages:_,onSeek:F=>{v.current&&(v.current.currentTime=F)}})}),s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 bg-card border-t border-border/50 shrink-0",children:[s.jsx("button",{onClick:O,className:"p-2 rounded-full bg-primary text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:c==="loading",title:c==="playing"?"Pauză narație":"Pornește narația audio",children:c==="loading"?s.jsx(rt,{size:16,className:"animate-spin"}):c==="playing"?s.jsx(Fd,{size:16}):s.jsx(ya,{size:16,className:"ml-0.5"})}),s.jsxs("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:["🎙️ ",c==="loading"?"Se încarcă narația...":c==="playing"?"Narația rulează":"Narație AI"]}),s.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden cursor-pointer",onClick:F=>{const I=v.current;if(!I||!f)return;const D=F.currentTarget.getBoundingClientRect(),L=(F.clientX-D.left)/D.width;I.currentTime=L*f},children:s.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-100",style:{width:`${d}%`}})}),s.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums whitespace-nowrap",children:[N(m)," / ",N(f)]}),s.jsx("button",{onClick:B,className:"p-1.5 rounded-md hover:bg-accent transition-colors",children:g?s.jsx(zg,{size:16}):s.jsx(wo,{size:16})}),s.jsx("button",{onClick:T,className:"p-1.5 rounded-md hover:bg-accent transition-colors",children:x?s.jsx(MU,{size:16}):s.jsx(RU,{size:16})})]})]})}const HCt=`Bun venit la prima noastră lecție din cursul „Introducere în Blockchain"! Suntem încântați să începem această călătorie împreună și să explorăm lumea fascinantă a tehnologiei blockchain. Nu vă faceți griji dacă sunteți la început de drum, vom merge pas cu pas și vom explica totul într-un limbaj clar și accesibil.
2288
2289## Ce este, de fapt, Blockchain?
2290
2291Haideți să începem cu esențialul: Ce este blockchain? Imaginați-vă un registru. Nu un registru oarecare, ci unul foarte special. Este ca un jurnal digital, o carte mare în care se înregistrează absolut toate tranzacțiile sau informațiile. Dar ce îl face atât de special?
2292
2293În mod normal, când vorbim despre registre, ne gândim la o carte fizică sau la o bază de date centralizată, controlată de o singură entitate (de exemplu, o bancă ține evidența conturilor tale). Blockchain este diferit. Este un registru digital care **nu este controlat de nimeni în mod centralizat**. În schimb, este distribuit pe o rețea de computere.
2294
2295**Gândiți-vă la el ca la un lanț de blocuri.** Fiecare „bloc" este o pagină în acest registru și conține un set de tranzacții sau informații. Odată ce o pagină (un bloc) este plină, este sigilată și adăugată la lanț. După ce a fost adăugată, **nu mai poate fi modificată**. Este permanentă și imutabilă. Acesta este un concept cheie!
2296
2297![O reprezentare vizuală a unui lanț de blocuri](https://ahleagpvrcuwshrzzpkq.supabase.co/storage/v1/object/public/course-graphics/edu-graphics/e60085d8-007a-49a8-81df-245bd1fa2a27/1773586978701-o-reprezentare-vizuala-a-unui-lant-de-blocuri-fiec.svg)
2298
2299Deci, pe scurt, **Blockchain este o bază de date distribuită, imutabilă și securizată, care înregistrează tranzacții în blocuri legate criptografic.**
2300
2301Acest concept de „distribuit" înseamnă că nu există o singură copie a registrului. Fiecare computer din rețea are o copie identică. Dacă cineva încearcă să modifice o tranzacție pe copia sa, celelalte computere vor observa discrepanța și vor respinge acea modificare. Acest lucru face blockchain-ul incredibil de sigur și rezistent la fraudă.
2302
2303## De ce avem nevoie de Blockchain?
2304
2305Pentru a înțelege mai bine valoarea blockchain-ului, să ne gândim la modul în care funcționează majoritatea sistemelor noastre financiare și de înregistrare azi. Când faci un transfer bancar, te bazezi pe bancă să înregistreze corect tranzacția. Când cumperi o proprietate, te bazezi pe un registru funciar centralizat. Aceste sisteme au un „punct central de eșec", adică dacă entitatea centrală este compromisă, sistemul întreg poate fi afectat.
2306
2307Blockchain elimină necesitatea unei astfel de entități centrale. Creează **încredere** într-un sistem distribuit, fără a fi nevoie să ai încredere într-o singură persoană sau organizație. Acest lucru este revoluționar!
2308
2309## O scurtă istorie a Blockchain-ului
2310
2311Istoria blockchain-ului este mai veche decât ați crede, dar a devenit cu adevărat populară relativ recent.
2312
23131.  **1991: Primele idei de „lanțuri" securizate.** Conceptul de lanț de blocuri securizat criptografic a fost descris pentru prima dată de Stuart Haber și W. Scott Stornetta. Ei au vrut să creeze un sistem în care documentele digitale nu puteau fi modificate retroactiv sau falsificate.
2314
23152.  **2008: Nașterea Bitcoin.** Momentul de cotitură a venit în 2008, când o persoană sau un grup anonim cunoscut sub pseudonimul **Satoshi Nakamoto** a publicat o lucrare (whitepaper) intitulată „Bitcoin: A Peer-to-Peer Electronic Cash System".
2316
23173.  **2009: Primul bloc (Blocul Geneză) și primele tranzacții.** Pe 3 ianuarie 2009, a fost minat primul bloc al rețelei Bitcoin, cunoscut sub numele de „Blocul Geneză".
2318
23194.  **După 2009: Evoluția și diversificarea.** Au apărut noi protocoale blockchain, cum ar fi **Ethereum** (lansat în 2015), care a introdus conceptul de „contracte inteligente" (smart contracts).
2320
2321![Cronologie simplă: 1991 (Idee) -> 2008 (Whitepaper Bitcoin) -> 2009 (Lansare Bitcoin) -> 2015 (Lansare Ethereum) -> Prezent (DeFi, NFT, Web3)](https://ahleagpvrcuwshrzzpkq.supabase.co/storage/v1/object/public/course-graphics/edu-graphics/e60085d8-007a-49a8-81df-245bd1fa2a27/1773586990707-cronologie-simpla-1991-idee-2008-whitepaper-bitcoi.svg)
2322
2323## Pe scurt, de reținut:
2324
2325*   **Blockchain** este un registru digital, distribuit, securizat și imutabil.
2326*   Este un **lanț de blocuri** de informații, conectate criptografic.
2327*   **Nu este controlat de o singură entitate**, ci de o rețea de computere.
2328*   A fost popularizat de **Bitcoin** în 2008-2009, ca soluție pentru problema dublei cheltuieli.
2329*   A evoluat rapid, cu platforme precum **Ethereum** extinzând utilizările la contracte inteligente și alte aplicații.
2330
2331Aceasta a fost o primă introducere rapidă în lumea blockchain. În lecțiile următoare, vom aprofunda fiecare dintre aceste concepte.`;function VCt(){return s.jsx(xr,{children:s.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"📊 Demo Prezentare Gamma + Narație AI"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:'Lecția 1.1 din cursul „Introducere în Blockchain" — prezentare Gamma.app cu narație TTS sincronizată'})]}),s.jsx(QCt,{lessonId:"3cc2c7a7-37af-4982-b582-9c47ff2d8f81",lessonTitle:"Lecția 1.1: Definiția și istoria pe scurt",lessonContent:HCt,topic:"blockchain"}),s.jsxs("div",{className:"rounded-lg border border-border p-4 bg-card text-sm space-y-2",children:[s.jsx("p",{className:"font-medium",children:"ℹ️ Cum funcționează:"}),s.jsxs("ul",{className:"list-disc pl-5 space-y-1 text-muted-foreground",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Prezentare Gamma.app"})," — generată automat din conținutul lecției, cu imagini AI, iconuri și layout profesional"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Narație audio TTS"})," — vocea lui Tudor Popescu (ElevenLabs), rulează separat de prezentare"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Navigare"})," — scrollezi prin prezentarea Gamma în timp ce asculți narația"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Fullscreen"})," — pentru experiență imersivă"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Caching"})," — prezentarea și audio-ul sunt generate o singură dată și stocate în baza de date"]})]})]})]})})}function WCt(e){const r=new Date;if(e==="today")return new Date(r.getFullYear(),r.getMonth(),r.getDate()).toISOString();if(e==="7d"){const n=new Date(r);return n.setDate(n.getDate()-7),n.toISOString()}if(e==="30d"){const n=new Date(r);return n.setDate(n.getDate()-30),n.toISOString()}return new Date(0).toISOString()}function qCt(){const[e,r]=w.useState("today"),[n,i]=w.useState([]),[a,o]=w.useState(!0),[l,c]=w.useState({total:0,unique:0,logged:0,anon:0}),u=async()=>{o(!0);const m=WCt(e),{data:A,error:g}=await G.from("site_visits").select("*").gte("visited_at",m).order("visited_at",{ascending:!1}).limit(1e3);if(!g&&A){i(A);const y=new Set(A.map(b=>b.session_fingerprint||b.ip_address)),x=A.filter(b=>b.user_id).length;c({total:A.length,unique:y.size,logged:x,anon:A.length-x})}o(!1)};w.useEffect(()=>{u()},[e]);const d=Object.entries(n.reduce((m,A)=>(m[A.path]||(m[A.path]={total:0,unique:new Set,totalTime:0,timeCount:0}),m[A.path].total++,m[A.path].unique.add(A.session_fingerprint||A.ip_address),A.time_on_page_seconds&&A.time_on_page_seconds>0&&(m[A.path].totalTime+=A.time_on_page_seconds,m[A.path].timeCount++),m),{})).map(([m,A])=>({path:m,total:A.total,unique:A.unique.size,avgTime:A.timeCount>0?Math.round(A.totalTime/A.timeCount):0})).sort((m,A)=>A.total-m.total).slice(0,50),h=Object.entries(n.reduce((m,A)=>{const g=A.user_email||A.session_fingerprint||A.ip_address||"unknown";return m[g]||(m[g]={pages:0,lastVisit:A.visited_at,device:A.device_type,isLogged:!!A.user_id}),m[g].pages++,A.visited_at>m[g].lastVisit&&(m[g].lastVisit=A.visited_at),m},{})).map(([m,A])=>({key:m,...A})).sort((m,A)=>A.pages-m.pages).slice(0,50),f=Object.entries(n.filter(m=>m.referrer&&m.referrer.length>0).reduce((m,A)=>{const g=A.referrer;try{const y=new URL(g).hostname;m[y]=(m[y]||0)+1}catch{m[g]=(m[g]||0)+1}return m},{})).sort((m,A)=>A[1]-m[1]).slice(0,20),p=({type:m})=>m==="mobile"?s.jsx(d4,{className:"h-4 w-4"}):s.jsx(ale,{className:"h-4 w-4"});return s.jsx(xr,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Site Analytics"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Cn,{value:e,onValueChange:r,children:[s.jsx(yn,{className:"w-32",children:s.jsx(Nn,{})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"today",children:"Azi"}),s.jsx(_t,{value:"7d",children:"7 zile"}),s.jsx(_t,{value:"30d",children:"30 zile"}),s.jsx(_t,{value:"all",children:"Tot"})]})]}),s.jsx(me,{variant:"outline",size:"icon",onClick:u,disabled:a,children:s.jsx(ef,{className:`h-4 w-4 ${a?"animate-spin":""}`})})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm font-medium text-muted-foreground",children:"Total Vizite"})}),s.jsx(ot,{children:s.jsxs("div",{className:"text-2xl font-bold flex items-center gap-2",children:[s.jsx(Oi,{className:"h-5 w-5 text-primary"}),l.total]})})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm font-medium text-muted-foreground",children:"Vizitatori Unici"})}),s.jsx(ot,{children:s.jsxs("div",{className:"text-2xl font-bold flex items-center gap-2",children:[s.jsx(Rn,{className:"h-5 w-5 text-primary"}),l.unique]})})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm font-medium text-muted-foreground",children:"Utilizatori Logați"})}),s.jsx(ot,{children:s.jsx("div",{className:"text-2xl font-bold text-green-600",children:l.logged})})]}),s.jsxs(st,{children:[s.jsx(Ot,{className:"pb-2",children:s.jsx(Ht,{className:"text-sm font-medium text-muted-foreground",children:"Anonimi"})}),s.jsx(ot,{children:s.jsx("div",{className:"text-2xl font-bold text-orange-500",children:l.anon})})]})]}),s.jsxs(Gi,{defaultValue:"live",className:"space-y-4",children:[s.jsxs(Ri,{children:[s.jsx(Mt,{value:"live",children:"Live Feed"}),s.jsx(Mt,{value:"pages",children:"Top Pagini"}),s.jsx(Mt,{value:"users",children:"Utilizatori"}),s.jsx(Mt,{value:"referrers",children:"Referrers"})]}),s.jsx(er,{value:"live",children:s.jsx(st,{children:s.jsx(ot,{className:"p-0",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Pagină"}),s.jsx(Me,{children:"Utilizator"}),s.jsx(Me,{children:"Device"}),s.jsx(Me,{children:"IP"}),s.jsx(Me,{children:"Timp"}),s.jsx(Me,{children:"Data"})]})}),s.jsxs(In,{children:[n.slice(0,50).map(m=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"max-w-[200px] truncate font-mono text-xs",children:m.path}),s.jsx(Oe,{children:m.user_email?s.jsx(at,{variant:"default",className:"text-xs",children:m.user_email}):s.jsx(at,{variant:"secondary",className:"text-xs",children:"Anonim"})}),s.jsx(Oe,{children:s.jsx(p,{type:m.device_type})}),s.jsx(Oe,{className:"text-xs text-muted-foreground",children:m.ip_address||"-"}),s.jsx(Oe,{className:"text-xs",children:m.time_on_page_seconds?`${m.time_on_page_seconds}s`:"-"}),s.jsx(Oe,{className:"text-xs text-muted-foreground",children:al(new Date(m.visited_at),"dd/MM HH:mm:ss")})]},m.id)),n.length===0&&s.jsx(Nt,{children:s.jsx(Oe,{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"Nicio vizită în această perioadă"})})]})]})})})}),s.jsx(er,{value:"pages",children:s.jsx(st,{children:s.jsx(ot,{className:"p-0",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Pagină"}),s.jsx(Me,{className:"text-right",children:"Vizite"}),s.jsx(Me,{className:"text-right",children:"Unice"}),s.jsx(Me,{className:"text-right",children:"Avg Timp"})]})}),s.jsx(In,{children:d.map(m=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"max-w-[300px] truncate font-mono text-xs",children:m.path}),s.jsx(Oe,{className:"text-right font-semibold",children:m.total}),s.jsx(Oe,{className:"text-right",children:m.unique}),s.jsx(Oe,{className:"text-right text-muted-foreground",children:m.avgTime>0?`${m.avgTime}s`:"-"})]},m.path))})]})})})}),s.jsx(er,{value:"users",children:s.jsx(st,{children:s.jsx(ot,{className:"p-0",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Utilizator"}),s.jsx(Me,{children:"Tip"}),s.jsx(Me,{children:"Device"}),s.jsx(Me,{className:"text-right",children:"Pagini"}),s.jsx(Me,{children:"Ultima vizită"})]})}),s.jsx(In,{children:h.map(m=>s.jsxs(Nt,{children:[s.jsx(Oe,{className:"max-w-[200px] truncate text-xs",children:m.key}),s.jsx(Oe,{children:m.isLogged?s.jsx(at,{variant:"default",className:"text-xs",children:"Logat"}):s.jsx(at,{variant:"secondary",className:"text-xs",children:"Anonim"})}),s.jsx(Oe,{children:s.jsx(p,{type:m.device})}),s.jsx(Oe,{className:"text-right font-semibold",children:m.pages}),s.jsx(Oe,{className:"text-xs text-muted-foreground",children:al(new Date(m.lastVisit),"dd/MM HH:mm")}
2331)]},m.key))})]})})})}),s.jsx(er,{value:"referrers",children:s.jsx(st,{children:s.jsx(ot,{className:"p-0",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{children:[s.jsx(Me,{children:"Sursă"}),s.jsx(Me,{className:"text-right",children:"Vizite"})]})}),s.jsxs(In,{children:[f.map(([m,A])=>s.jsxs(Nt,{children:[s.jsxs(Oe,{className:"flex items-center gap-2",children:[s.jsx(Dr,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm",children:m})]}),s.jsx(Oe,{className:"text-right font-semibold",children:A})]},m)),f.length===0&&s.jsx(Nt,{children:s.jsx(Oe,{colSpan:2,className:"text-center py-8 text-muted-foreground",children:"Niciun referrer în această perioadă"})})]})]})})})})]})]})})}const KCt=["AI","Crypto","Web3","Blockchain","Digital Marketing"],GCt={slug:"",slug_en:"",title:"",title_en:"",summary:"",summary_en:"",description:"",description_en:"",start_date:"",end_date:"",city:"",country:"",country_code:"",venue:"",format:"onsite",categories:[],organizer:"",official_url:"",cover_image_url:"",is_free:!1,is_published:!1,is_featured:!1,currency:"USD",faq_ro:[],faq_en:[],highlights_ro:[],highlights_en:[],agenda_summary_ro:"",agenda_summary_en:"",who_should_attend_ro:"",who_should_attend_en:"",how_to_get_there_ro:"",how_to_get_there_en:"",gallery_image_urls:[],gallery_image_credits:[]};function XCt(){const e=Kr(),{data:r}=Xe({queryKey:["events","admin"],queryFn:async()=>{const{data:m,error:A}=await G.from("events").select("*").order("start_date",{ascending:!1});if(A)throw A;return m??[]}}),[n,i]=w.useState(null),[a,o]=w.useState([]),l=()=>{i({...GCt}),o([])},c=async m=>{i(m);const{data:A}=await G.from("event_testimonials").select("*").eq("event_id",m.id).order("sort_order");o(A??[])},u=An({mutationFn:async m=>{const{id:A,...g}=m;let y=A;const x=g;if(A){const{error:v}=await G.from("events").update(x).eq("id",A);if(v)throw v}else{const{data:v,error:j}=await G.from("events").insert(x).select("id").single();if(j)throw j;y=v.id}await G.from("event_testimonials").delete().eq("event_id",y);const b=a.filter(v=>v.quote&&v.quote.trim()).map((v,j)=>({event_id:y,quote:v.quote,quote_en:v.quote_en||null,author_name:v.author_name||null,author_role:v.author_role||null,source_name:v.source_name||null,source_url:v.source_url||null,rating:v.rating?Number(v.rating):null,sort_order:j}));if(b.length){const{error:v}=await G.from("event_testimonials").insert(b);if(v)throw v}},onSuccess:()=>{ft.success("Salvat"),e.invalidateQueries({queryKey:["events"]}),i(null)},onError:m=>ft.error(m.message)}),d=An({mutationFn:async m=>{const{error:A}=await G.from("events").delete().eq("id",m);if(A)throw A},onSuccess:()=>{ft.success("Șters"),e.invalidateQueries({queryKey:["events"]})},onError:m=>ft.error(m.message)}),h=An({mutationFn:async m=>{const{error:A}=await G.from("events").update({is_published:!m.is_published}).eq("id",m.id);if(A)throw A},onSuccess:()=>e.invalidateQueries({queryKey:["events"]})}),f=(m,A)=>i(g=>({...g,[m]:A})),p=m=>{i(A=>{const g=(A==null?void 0:A.categories)||[];return{...A,categories:g.includes(m)?g.filter(y=>y!==m):[...g,m]}})};return s.jsxs(xr,{children:[s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Evenimente"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Conferințe AI, Crypto, Web3, Blockchain, Digital Marketing"})]}),s.jsxs(me,{onClick:l,children:[s.jsx(Qn,{className:"w-4 h-4 mr-2"})," Adaugă"]})]}),s.jsx("div",{className:"bg-card border border-border rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"bg-muted/50 text-xs uppercase text-muted-foreground",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left p-3",children:"Titlu"}),s.jsx("th",{className:"text-left p-3",children:"Dată"}),s.jsx("th",{className:"text-left p-3",children:"Țară"}),s.jsx("th",{className:"text-left p-3",children:"Categorii"}),s.jsx("th",{className:"text-left p-3",children:"Rating"}),s.jsx("th",{className:"text-left p-3",children:"Status"}),s.jsx("th",{className:"text-right p-3",children:"Acțiuni"})]})}),s.jsxs("tbody",{children:[r==null?void 0:r.map(m=>s.jsxs("tr",{className:"border-t border-border hover:bg-muted/20",children:[s.jsx("td",{className:"p-3 font-medium",children:m.title}),s.jsx("td",{className:"p-3 text-muted-foreground",children:m.start_date}),s.jsx("td",{className:"p-3 text-muted-foreground",children:m.country||"—"}),s.jsx("td",{className:"p-3",children:s.jsx("div",{className:"flex flex-wrap gap-1",children:m.categories.map(A=>s.jsx(at,{variant:"outline",className:"text-[10px]",children:A},A))})}),s.jsx("td",{className:"p-3",children:m.rating_score?s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",children:[s.jsx(cp,{className:"w-3 h-3 fill-yellow-400 text-yellow-400"}),Number(m.rating_score).toFixed(1)]}):"—"}),s.jsx("td",{className:"p-3",children:s.jsx(Pm,{checked:m.is_published,onCheckedChange:()=>h.mutate(m)})}),s.jsx("td",{className:"p-3 text-right",children:s.jsxs("div",{className:"flex gap-1 justify-end",children:[s.jsx(me,{size:"sm",variant:"ghost",asChild:!0,children:s.jsx("a",{href:`/evenimente/${m.slug}`,target:"_blank",rel:"noreferrer",children:s.jsx(Yr,{className:"w-3.5 h-3.5"})})}),s.jsx(me,{size:"sm",variant:"ghost",onClick:()=>c(m),children:s.jsx(yke,{className:"w-3.5 h-3.5"})}),s.jsx(me,{size:"sm",variant:"ghost",onClick:()=>{confirm(`Ștergi „${m.title}”?`)&&d.mutate(m.id)},children:s.jsx(Xr,{className:"w-3.5 h-3.5 text-destructive"})})]})})]},m.id)),(r==null?void 0:r.length)===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"p-8 text-center text-muted-foreground",children:"Niciun eveniment. Apasă „Adaugă”."})})]})]})})]}),s.jsx(sl,{open:!!n,onOpenChange:m=>{m||i(null)},children:s.jsxs(Po,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[s.jsx(ol,{children:s.jsx(ll,{children:n!=null&&n.id?"Editează eveniment":"Eveniment nou"})}),n&&s.jsxs(Gi,{defaultValue:"general",children:[s.jsxs(Ri,{className:"w-full grid grid-cols-7",children:[s.jsx(Mt,{value:"general",children:"General"}),s.jsx(Mt,{value:"loc",children:"Locație"}),s.jsx(Mt,{value:"media",children:"Media"}),s.jsx(Mt,{value:"rich",children:"Conținut bogat"}),s.jsx(Mt,{value:"faq",children:"FAQ"}),s.jsx(Mt,{value:"rating",children:"Rating"}),s.jsx(Mt,{value:"seo",children:"SEO"})]}),s.jsxs(er,{value:"general",className:"space-y-3 pt-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ge,{children:"Titlu RO"}),s.jsx(qe,{value:n.title||"",onChange:m=>f("title",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Title EN"}),s.jsx(qe,{value:n.title_en||"",onChange:m=>f("title_en",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Slug RO"}),s.jsx(qe,{value:n.slug||"",onChange:m=>f("slug",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Slug EN"}),s.jsx(qe,{value:n.slug_en||"",onChange:m=>f("slug_en",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Data start"}),s.jsx(qe,{type:"date",value:n.start_date||"",onChange:m=>f("start_date",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Data end"}),s.jsx(qe,{type:"date",value:n.end_date||"",onChange:m=>f("end_date",m.target.value||null)})]})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Rezumat RO"}),s.jsx(fr,{rows:2,value:n.summary||"",onChange:m=>f("summary",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Summary EN"}),s.jsx(fr,{rows:2,value:n.summary_en||"",onChange:m=>f("summary_en",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Descriere RO"}),s.jsx(fr,{rows:5,value:n.description||"",onChange:m=>f("description",m.target.value)})]}
2331),s.jsxs("div",{children:[s.jsx(Ge,{children:"Description EN"}),s.jsx(fr,{rows:5,value:n.description_en||"",onChange:m=>f("description_en",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Categorii"}),s.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:KCt.map(m=>{const A=(n.categories||[]).includes(m);return s.jsx("button",{type:"button",onClick:()=>p(m),className:`px-3 py-1 rounded-md text-xs border ${A?"bg-primary text-primary-foreground border-primary":"border-border"}`,children:m},m)})})]}),s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Pm,{checked:!!n.is_published,onCheckedChange:m=>f("is_published",m)}),"Publicat"]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Pm,{checked:!!n.is_featured,onCheckedChange:m=>f("is_featured",m)}),"Featured"]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Pm,{checked:!!n.is_free,onCheckedChange:m=>f("is_free",m)}),"Gratuit"]})]})]}),s.jsx(er,{value:"loc",className:"space-y-3 pt-3",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ge,{children:"Oraș"}),s.jsx(qe,{value:n.city||"",onChange:m=>f("city",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Țară"}),s.jsx(qe,{value:n.country||"",onChange:m=>f("country",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Cod țară (ISO-2)"}),s.jsx(qe,{value:n.country_code||"",onChange:m=>f("country_code",m.target.value.toUpperCase().slice(0,2))})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Venue"}),s.jsx(qe,{value:n.venue||"",onChange:m=>f("venue",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Lat"}),s.jsx(qe,{type:"number",step:"0.0001",value:n.lat??"",onChange:m=>f("lat",m.target.value?Number(m.target.value):null)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Lng"}),s.jsx(qe,{type:"number",step:"0.0001",value:n.lng??"",onChange:m=>f("lng",m.target.value?Number(m.target.value):null)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Format"}),s.jsxs(Cn,{value:n.format||"onsite",onValueChange:m=>f("format",m),children:[s.jsx(yn,{children:s.jsx(Nn,{})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"onsite",children:"Onsite"}),s.jsx(_t,{value:"online",children:"Online"}),s.jsx(_t,{value:"hybrid",children:"Hybrid"})]})]})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Organizator"}),s.jsx(qe,{value:n.organizer||"",onChange:m=>f("organizer",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Participanți estimați"}),s.jsx(qe,{type:"number",value:n.expected_attendees??"",onChange:m=>f("expected_attendees",m.target.value?Number(m.target.value):null)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Preț de la"}),s.jsx(qe,{type:"number",value:n.price_from??"",onChange:m=>f("price_from",m.target.value?Number(m.target.value):null)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Monedă"}),s.jsx(qe,{value:n.currency||"USD",onChange:m=>f("currency",m.target.value)})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(Ge,{children:"URL oficial"}),s.jsx(qe,{value:n.official_url||"",onChange:m=>f("official_url",m.target.value)})]})]})}),s.jsxs(er,{value:"media",className:"space-y-3 pt-3",children:[s.jsxs("div",{children:[s.jsx(Ge,{children:"Cover image URL (foto reală — NU AI)"}),s.jsx(qe,{value:n.cover_image_url||"",onChange:m=>f("cover_image_url",m.target.value),placeholder:"https://... (press kit / Wikimedia)"})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Logo URL"}),s.jsx(qe,{value:n.logo_url||"",onChange:m=>f("logo_url",m.target.value)})]}),n.cover_image_url&&s.jsx("img",{src:n.cover_image_url,alt:"",className:"w-full max-h-60 object-cover rounded-lg"}),s.jsxs("div",{className:"border-t border-border pt-3",children:[s.jsx(Ge,{children:"Galerie poze reale (un URL pe linie — doar surse oficiale / Wikimedia, nu AI)"}),s.jsx(fr,{rows:4,placeholder:`https://media.organizator.com/poza1.jpg
2332https://upload.wikimedia.org/poza2.jpg`,value:(n.gallery_image_urls||[]).join(`
2333`),onChange:m=>f("gallery_image_urls",m.target.value.split(`
2334`).map(A=>
2334A.trim()).filter(Boolean))})]}),s.jsxs("div",{children:[s.jsxs(Ge,{children:["Credit/atribuire poze (JSON: ",s.jsxs("code",{children:["[",'{"url":"...","credit":"© Organizator","source_url":"..."}',"]"]}),")"]}),s.jsx(fr,{rows:4,placeholder:'[{"url":"https://...","credit":"© Web Summit / Sam Barnes","source_url":"https://flickr.com/..."}]',value:JSON.stringify(n.gallery_image_credits||[],null,2),onChange:m=>{try{const A=JSON.parse(m.target.value||"[]");f("gallery_image_credits",A)}catch{}}})]})]}),s.jsx(er,{value:"rich",className:"space-y-3 pt-3",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ge,{children:"Highlights RO (un punct pe linie)"}),s.jsx(fr,{rows:5,value:(n.highlights_ro||[]).join(`
2335`),onChange:m=>f("highlights_ro",m.target.value.split(`
2336`).map(A=>A.trim()).filter(Boolean))})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Highlights EN (one bullet per line)"}),s.jsx(fr,{rows:5,value:(n.highlights_en||[]).join(`
2337`),onChange:m=>f("highlights_en",m.target.value.split(`
2338`).map(A=>A.trim()).filter(Boolean))})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Agendă (RO)"}),s.jsx(fr,{rows:3,value:n.agenda_summary_ro||"",onChange:m=>f("agenda_summary_ro",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Agenda (EN)"}),s.jsx(fr,{rows:3,value:n.agenda_summary_en||"",onChange:m=>f("agenda_summary_en",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Cui i se adresează (RO)"}),s.jsx(fr,{rows:3,value:n.who_should_attend_ro||"",onChange:m=>f("who_should_attend_ro",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Who should attend (EN)"}),s.jsx(fr,{rows:3,value:n.who_should_attend_en||"",onChange:m=>f("who_should_attend_en",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Cum ajungi (RO)"}),s.jsx(fr,{rows:3,value:n.how_to_get_there_ro||"",onChange:m=>f("how_to_get_there_ro",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"How to get there (EN)"}),s.jsx(fr,{rows:3,value:n.how_to_get_there_en||"",onChange:m=>f("how_to_get_there_en",m.target.value)})]})]})}),s.jsxs(er,{value:"faq",className:"space-y-3 pt-3",children:[s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Format JSON: ",s.jsx("code",{children:'[{"question":"...","answer":"..."}]'})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"FAQ RO (JSON)"}),s.jsx(fr,{rows:10,value:JSON.stringify(n.faq_ro||[],null,2),onChange:m=>{try{f("faq_ro",JSON.parse(m.target.value||"[]"))}catch{}}})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"FAQ EN (JSON)"}),s.jsx(fr,{rows:10,value:JSON.stringify(n.faq_en||[],null,2),onChange:m=>{try{f("faq_en",JSON.parse(m.target.value||"[]"))}catch{}}})]})]}),s.jsxs(er,{value:"rating",className:"space-y-3 pt-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ge,{children:"Scor (1-5)"}),s.jsx(qe,{type:"number",step:"0.1",min:"1",max:"5",value:n.rating_score??"",onChange:m=>f("rating_score",m.target.value?Number(m.target.value):null)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Nr recenzii"}),s.jsx(qe,{type:"number",value:n.rating_count??"",onChange:m=>f("rating_count",m.target.value?Number(m.target.value):null)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"Sursă (ex. Google Maps)"}),s.jsx(qe,{value:n.rating_source||"",onChange:m=>f("rating_source",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"URL sursă"}),s.jsx(qe,{value:n.rating_source_url||"",onChange:m=>f("rating_source_url",m.target.value)})]})]}),s.jsxs("div",{className:"border-t border-border pt-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx(Ge,{children:"Citate / păreri participanți"}),s.jsxs(me,{type:"button",size:"sm",variant:"outline",onClick:()=>o(m=>[...m,{quote:""}]),children:[s.jsx(Qn,{className:"w-3 h-3 mr-1"})," Adaugă"]})]}),a.map((m,A)=>s.jsxs("div",{className:"border border-border rounded-lg p-3 mb-2 space-y-2",children:[s.jsx(fr,{placeholder:"Citat (RO)",rows:2,value:m.quote||"",onChange:g=>o(y=>y.map((x,b)=>b===A?{...x,quote:g.target.value}:x))}),s.jsx(fr,{placeholder:"Quote (EN)",rows:2,value:m.quote_en||"",onChange:g=>o(y=>y.map((x,b)=>b===A?{...x,quote_en:g.target.value}:x))}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx(qe,{placeholder:"Autor",value:m.author_name||"",onChange:g=>o(y=>y.map((x,b)=>b===A?{...x,author_name:g.target.value}:x))}),s.jsx(qe,{placeholder:"Rol",value:m.author_role||"",onChange:g=>o(y=>y.map((x,b)=>b===A?{...x,author_role:g.target.value}:x))}),s.jsx(qe,{placeholder:"Nume sursă",value:m.source_name||"",onChange:g=>o(y=>y.map((x,b)=>b===A?{...x,source_name:g.target.value}:x))}),s.jsx(qe,{placeholder:"URL sursă",value:m.source_url||"",onChange:g=>o(y=>y.map((x,b)=>b===A?{...x,source_url:g.target.value}:x))}),s.jsx(qe,{placeholder:"Rating (1-5)",type:"number",step:"0.1",min:"1",max:"5",value:m.rating??"",onChange:g=>o(y=>y.map((x,b)=>b===A?{...x,rating:g.target.value?Number(g.target.value):null}:x))})]}),s.jsx(me,{type:"button",size:"sm",variant:"ghost",onClick:()=>o(g=>g.filter((y,x)=>x!==A)),children:s.jsx(Xr,{className:"w-3 h-3 text-destructive"})})]},A))]})]}),s.jsxs(er,{value:"seo",className:"space-y-3 pt-3",children:[s.jsxs("div",{children:[s.jsx(Ge,{children:"SEO Title RO (max 60)"}),s.jsx(qe,{maxLength:60,value:n.seo_title||"",onChange:m=>f("seo_title",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"SEO Title EN (max 60)"}),s.jsx(qe,{maxLength:60,value:n.seo_title_en||"",onChange:m=>f("seo_title_en",m.target.value)})]}),s.jsxs("div",{children:[s.jsx(Ge,{children:"SEO Description RO (max 158)"}),s.jsx(fr,{rows:2,maxLength:158,value:n.seo_description||"",onChange:m=>f("seo_description",m.target.value)})]}
2338),s.jsxs("div",{children:[s.jsx(Ge,{children:"SEO Description EN (max 158)"}),s.jsx(fr,{rows:2,maxLength:158,value:n.seo_description_en||"",onChange:m=>f("seo_description_en",m.target.value)})]})]})]}),s.jsxs(gb,{children:[s.jsx(me,{variant:"ghost",onClick:()=>i(null),children:"Anulează"}),s.jsx(me,{onClick:()=>n&&u.mutate(n),disabled:u.isPending,children:u.isPending?"Salvez…":"Salvează"})]})]})})]})}const YCt=["AI","Crypto","Web3","Blockchain","Digital Marketing"],JCt=["onsite","online","hybrid"];function ZCt({ev:e,lang:r}){const n=r==="en"?e.title_en:e.title,i=r==="en"?e.summary_en:e.summary,a=r==="en"?e.slug_en:e.slug,o=r==="en"?"/events":"/evenimente",l=new Date(e.start_date);return s.jsxs(be,{to:`${o}/${a}`,className:"group flex flex-col bg-card border border-border rounded-xl overflow-hidden hover:border-primary/50 transition-all hover:shadow-lg hover:shadow-primary/5",children:[s.jsxs("div",{className:"relative h-44 bg-muted overflow-hidden",children:[e.cover_image_url?s.jsx("img",{src:e.cover_image_url,alt:n,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):s.jsx("div",{className:"w-full h-full bg-gradient-to-br from-primary/20 to-accent/20 flex items-center justify-center",children:s.jsx(mg,{className:"w-12 h-12 text-primary/50"})}),s.jsxs("div",{className:"absolute top-3 left-3 bg-background/95 backdrop-blur rounded-lg px-3 py-1.5 text-center shadow-md",children:[s.jsx("div",{className:"text-[10px] font-medium uppercase text-muted-foreground leading-none",children:l.toLocaleDateString(r==="ro"?"ro-RO":"en-US",{month:"short"})}),s.jsx("div",{className:"text-xl font-bold leading-tight text-foreground",children:l.getDate()}),s.jsx("div",{className:"text-[10px] text-muted-foreground leading-none",children:l.getFullYear()})]}),s.jsx(at,{className:"absolute top-3 right-3 capitalize",variant:"secondary",children:e.format})]}),s.jsxs("div",{className:"flex-1 p-4 flex flex-col",children:[s.jsx("h3",{className:"font-heading font-semibold text-base leading-snug mb-2 line-clamp-2 group-hover:text-primary transition-colors",children:n}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[s.jsx(Mg,{className:"w-3 h-3"}),s.jsx("span",{className:"truncate",children:[e.city,e.country].filter(Boolean).join(", ")||(e.format==="online"?"Online":"—")})]}),i&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-3",children:i}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-auto mb-3",children:e.categories.slice(0,3).map(c=>s.jsx(at,{variant:"outline",className:"text-[10px]",children:c},c))}),e.rating_score&&s.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground border-t border-border pt-2",children:[s.jsx(cp,{className:"w-3 h-3 fill-yellow-400 text-yellow-400"}),s.jsx("span",{className:"font-semibold text-foreground",children:Number(e.rating_score).toFixed(1)}),e.rating_count&&s.jsxs("span",{children:["(",e.rating_count,")"]}),e.rating_source&&s.jsx("span",{className:"ml-auto truncate",children:e.rating_source})]})]})]})}function kee(){const{lang:e}=Pt(),{data:r,isLoading:n}=Pfe(),[i,a]=w.useState([]),[o,l]=w.useState("all"),[c,u]=w.useState("all"),[d,h]=w.useState("all");w.useEffect(()=>{const C=new URLSearchParams(window.location.search),N=C.get("cat");N&&a(N.split(","));const S=C.get("year");S&&l(S);const E=C.get("format");E&&u(E);const O=C.get("country");O&&h(O)},[]);const f=w.useMemo(()=>{const C=new Set;return r==null||r.forEach(N=>C.add(String(new Date(N.start_date).getFullYear()))),Array.from(C).sort()},[r]),p=w.useMemo(()=>{const C=new Map;return r==null||r.forEach(N=>{N.country_code&&N.country&&C.set(N.country_code,N.country)}),Array.from(C.entries()).sort((N,S)=>N[1].localeCompare(S[1]))},[r]),m=w.useMemo(()=>r?r.filter(C=>!(i.length&&!i.some(N=>C.categories.includes(N))||o!=="all"&&String(new Date(C.start_date).getFullYear())!==o||c!=="all"&&C.format!==c||d!=="all"&&C.country_code!==d)).sort((C,N)=>C.start_date.localeCompare(N.start_date)):[],[r,i,o,c,d]),A=C=>a(N=>N.includes(C)?N.filter(S=>S!==C):[...N,C]),g=e==="ro"?"Evenimente Web3, AI și Crypto 2026":"Web3, AI & 
2338Crypto Events 2026",y=e==="ro"?"Cele mai importante conferințe internaționale din AI, blockchain, Web3, crypto și digital marketing — sortate cronologic, cu detalii, ratinguri și păreri ale participanților.":"The biggest international conferences in AI, blockchain, Web3, crypto and digital marketing — sorted chronologically, with details, ratings and attendee reviews.",x=e==="ro"?"Evenimente Web3, AI, Crypto & Blockchain 2026 | EduWeb":"Web3, AI, Crypto & Blockchain Events 2026 | EduWeb",b=e==="ro"?"Calendar complet al evenimentelor majore Web3, AI, blockchain și crypto din 2026 — date, locații, ratinguri și păreri reale ale participanților.":"Complete calendar of major Web3, AI, blockchain and crypto events in 2026 — dates, locations, ratings and real attendee reviews.",v=e==="ro"?"https://eduweb.ro":"https://eduweb.ai",j=e==="ro"?"/evenimente":"/events",_={"@context":"https://schema.org","@type":"ItemList",itemListElement:m.slice(0,30).map((C,N)=>({"@type":"ListItem",position:N+1,url:`${v}${j}/${e==="en"?C.slug_en:C.slug}`,name:e==="en"?C.title_en:C.title}))};return s.jsxs(Ft,{children:[s.jsxs(goe,{children:[s.jsx("title",{children:x}),s.jsx("meta",{name:"description",content:b}),s.jsx("link",{rel:"canonical",href:`${v}${j}`}),s.jsx("link",{rel:"alternate",hrefLang:"ro",href:"https://eduweb.ro/evenimente"}),s.jsx("link",{rel:"alternate",hrefLang:"en",href:"https://eduweb.ai/events"}),s.jsx("meta",{property:"og:title",content:x}),s.jsx("meta",{property:"og:description",content:b}),s.jsx("meta",{property:"og:type",content:"website"}),s.jsx("script",{type:"application/ld+json",children:JSON.stringify(_)})]}),s.jsxs("div",{className:"container mx-auto px-4 md:px-6 py-8 md:py-12",children:[s.jsxs("header",{className:"mb-8 max-w-3xl",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 text-xs font-medium text-primary bg-primary/10 px-3 py-1 rounded-full mb-3",children:[s.jsx(mg,{className:"w-3 h-3"}),e==="ro"?"Calendar evenimente":"Events calendar"]}),s.jsx("h1",{className:"text-3xl md:text-5xl font-heading font-bold mb-3 leading-tight",children:g}),s.jsx("p",{className:"text-muted-foreground text-base md:text-lg",children:y})]}),s.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 mb-8 space-y-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2 uppercase tracking-wide",children:e==="ro"?"Categorie":"Category"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:YCt.map(C=>{const N=i.includes(C);return s.jsx("button",{onClick:()=>A(C),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all ${N?"bg-primary text-primary-foreground":"bg-background border border-border text-muted-foreground hover:text-foreground hover:border-foreground
2338/30"}`,children:C},C)})})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:[s.jsxs(Cn,{value:o,onValueChange:l,children:[s.jsx(yn,{children:s.jsx(Nn,{placeholder:e==="ro"?"An":"Year"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:e==="ro"?"Toți anii":"All years"}),f.map(C=>s.jsx(_t,{value:C,children:C},C))]})]}),s.jsxs(Cn,{value:c,onValueChange:u,children:[s.jsx(yn,{children:s.jsx(Nn,{placeholder:"Format"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:e==="ro"?"Toate formatele":"All formats"}),JCt.map(C=>s.jsx(_t,{value:C,className:"capitalize",children:C},C))]})]}),s.jsxs(Cn,{value:d,onValueChange:h,children:[s.jsx(yn,{children:s.jsx(Nn,{placeholder:e==="ro"?"Țară":"Country"})}),s.jsxs(vn,{children:[s.jsx(_t,{value:"all",children:e==="ro"?"Toate țările":"All countries"}),p.map(([C,N])=>s.jsx(_t,{value:C,children:N},C))]})]})]}),(i.length>0||o!=="all"||c!=="all"||d!=="all")&&s.jsx(me,{variant:"ghost",size:"sm",onClick:()=>{a([]),l("all"),u("all"),h("all")},children:e==="ro"?"Resetează filtrele":"Reset filters"})]}),s.jsx("div",{className:"text-sm text-muted-foreground mb-4",children:e==="ro"?`${m.length} evenimente`:`${m.length} events`}),n?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:Array.from({length:6}).map((C,N)=>s.jsx("div",{className:"h-80 bg-muted/30 rounded-xl animate-pulse"},N))}):m.length===0?s.jsx("div",{className:"text-center py-16 text-muted-foreground",children:e==="ro"?"Niciun eveniment nu corespunde filtrelor.":"No events match the filters."}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:m.map(C=>s.jsx(ZCt,{ev:C,lang:e},C.id))})]})]})}function Eee({score:e}){const r=Math.round(e);return s.jsx("div",{className:"flex items-center gap-0.5",children:Array.from({length:5}).map((n,i)=>s.jsx(cp,{className:`w-4 h-4 ${i<r?"fill-yellow-400 text-yellow-400":"text-muted-foreground/30"}`},i))})}function Bee(){var I;const{slug:e}=Zl(),{lang:r}=Pt(),{data:n,isLoading:i}=mQe(e);if(i)return s.jsx(Ft,{children:s.jsx("div",{className:"container mx-auto px-4 py-16 text-center text-muted-foreground",children:"…"})});if(!n)return s.jsx(xd,{to:r==="en"?"/events":"/evenimente",replace:!0});const{event:a,testimonials:o}=n,l=r==="en"?a.title_en:a.title,c=(r==="en"?a.description_en:a.description)||(r==="en"?a.summary_en:a.summary)||"",u=r==="en"?a.summary_en:a.summary,d=r==="en"?"/events":"/evenimente",h=r==="en"?a.slug_en:a.slug,f=r==="ro"?"https://eduweb.ro":"https://eduweb.ai",p=`${f}${d}/${h}`,m=r==="en"?a.highlights_en:a.highlights_ro,A=r==="en"?a.agenda_summary_en:a.agenda_summary_ro,g=r==="en"?a.who_should_attend_en:a.who_should_attend_ro,y=r==="en"?a.how_to_get_there_en:a.how_to_get_there_ro,x=(r==="en"?a.faq_en:a.faq_ro)||[],b=a.gallery_image_urls||[],v=a.gallery_image_credits||[],j=D=>v.find(L=>L.url===D),_=new Date(a.start_date),C=a.end_date?new Date(a.end_date):null,N=r==="ro"?"ro-RO":"en-US",S=C&&a.end_date!==a.start_date?`${_.toLocaleDateString(N,{day:"numeric",month:"long",year:"numeric"})} – ${C.toLocaleDateString(N,{day:"numeric",month:"long",year:"numeric"})}`:_.toLocaleDateString(N,{day:"numeric",month:"long",year:"numeric"}),E=((r==="en"?a.seo_title_en:a.seo_title)||l).slice(0,60),O=((r==="en"?a.seo_description_en:a.seo_description)||u||l).slice(0,158),B={"@context":"https://schema.org","@type":"Event",name:l,startDate:a.start_date,endDate:a.end_date||a.start_date,eventAttendanceMode:a.format==="online"?"https://schema.org/OnlineEventAttendanceMode":a.format==="hybrid"?"https://schema.org/MixedEventAttendanceMode":"https://schema.org/OfflineEventAttendanceMode",eventStatus:"https://schema.org/EventScheduled",location:a.format==="online"?{"@type":"VirtualLocation",url:a.official_url||p}:{"@type":"Place",name:a.venue||a.city,address:{"@type":"PostalAddress",addressLocality:a.city,addressCountry:a.country_code}},description:O,image:a.cover_image_url||(b[0]??void 0),url:p,organizer:a.organizer?{"@type":"Organization",name:a.organizer}:void 0,offers:a.official_url?{"@type":"Offer",url:a.official_url,price:a.price_from??void 0,priceCurrency:a.currency??void 0,availability:"https://schema.org/InStock"}:void 0};a.rating_score&&a.rating_count&&(B.aggregateRating={"@type":"AggregateRating",ratingValue:Number(a.rating_score),reviewCount:a.rating_count});const T={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:r==="ro"?"Acasă":"Home",item:f},{"@type":"ListItem",position:2,name:r==="ro"?"Evenimente":"Events",item:`${f}${d}`},{"@type":"ListItem",position:3,name:l,item:p}]},F=x.length>0?{"@context":"https://schema.org","@type":"FAQPage",mainEntity:x.map(D=>
2338({"@type":"Question",name:D.question,acceptedAnswer:{"@type":"Answer",text:D.answer}}))}:null;return s.jsxs(Ft,{children:[s.jsxs(goe,{children:[s.jsx("title",{children:E}),s.jsx("meta",{name:"description",content:O}),s.jsx("link",{rel:"canonical",href:p}),s.jsx("link",{rel:"alternate",hrefLang:"ro",href:`https://eduweb.ro/evenimente/${a.slug}`}),s.jsx("link",{rel:"alternate",hrefLang:"en",href:`https://eduweb.ai/events/${a.slug_en}`}),s.jsx("meta",{property:"og:title",content:l}),s.jsx("meta",{property:"og:description",content:O}),s.jsx("meta",{property:"og:type",content:"article"}),s.jsx("meta",{property:"og:url",content:p}),(a.cover_image_url||b[0])&&s.jsx("meta",{property:"og:image",content:a.cover_image_url||b[0]}),s.jsx("script",{type:"application/ld+json",children:JSON.stringify(B)}),s.jsx("script",{type:"application/ld+json",children:JSON.stringify(T)}),F&&s.jsx("script",{type:"application/ld+json",children:JSON.stringify(F)})]}),s.jsxs("article",{className:"container mx-auto px-4 md:px-6 py-8 md:py-12 max-w-5xl",children:[s.jsxs(be,{to:d,className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-6",children:[s.jsx(rn,{className:"w-4 h-4"})," ",r==="ro"?"Toate evenimentele":"All events"]}),a.cover_image_url?s.jsx("div",{className:"rounded-2xl overflow-hidden mb-6 aspect-[21/9] bg-muted",children:s.jsx("img",{src:a.cover_image_url,alt:l,className:"w-full h-full object-cover"})}):s.jsx("div",{className:"rounded-2xl overflow-hidden mb-6 aspect-[21/9] bg-gradient-to-br from-primary/20 via-primary/5 to-accent/20 flex items-center justify-center",children:s.jsx(mg,{className:"w-20 h-20 text-primary/40"})}),s.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[s.jsx(at,{variant:"secondary",className:"capitalize",children:a.format}),a.categories.map(D=>s.jsx(at,{variant:"outline",children:D},D)),a.is_free&&s.jsx(at,{className:"bg-green-500/15 text-green-700 dark:text-green-400 border-0",children:"Free"})]}),s.jsx("h1",{className:"text-3xl md:text-5xl font-heading font-bold leading-tight mb-4",children:l}),u&&s.jsx("p",{className:"text-lg text-muted-foreground mb-6",children:u}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-8",children:[s.jsxs("div",{className:"bg-card border border-border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground uppercase mb-1",children:[s.jsx(mg,{className:"w-3.5 h-3.5"})," ",r==="ro"?"Dată":"Date"]}),s.jsx("div",{className:"font-semibold text-sm",children:S})]}),s.jsxs("div",{className:"bg-card border border-border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground uppercase mb-1",children:[s.jsx(Mg,{className:"w-3.5 h-3.5"})," ",r==="ro"?"Locație":"Location"]}),s.jsxs("div",{className:"font-semibold text-sm",children:[a.venue&&s.jsx("div",{children:a.venue}),s.jsx("div",{className:"text-muted-foreground font-normal",children:[a.city,a.country].filter(Boolean).join(", ")||(a.format==="online"?"Online":"—")})]})]}),s.jsxs("div",{className:"bg-card border border-border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground uppercase mb-1",children:[s.jsx(bke,{className:"w-3.5 h-3.5"})," ",r==="ro"?"Preț":"Price"]}),s.jsx("div",{className:"font-semibold text-sm",children:a.is_free?r==="ro"?"Gratuit":"Free":a.price_from?`${r==="ro"?"De la":"From"} ${a.price_from} ${a.currency||""}`:r==="ro"?"Vezi site oficial":"See official site"})]}),a.organizer&&s.jsxs("div",{className:"bg-card border border-border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground uppercase mb-1",children:[s.jsx(L0,{className:"w-3.5 h-3.5"})," ",r==="ro"?"Organizator":"Organizer"]}),s.jsx("div",{className:"font-semibold text-sm",children:a.organizer})]}),a.expected_attendees&&s.jsxs("div",{className:"bg-card border border-border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground uppercase mb-1",children:[s.jsx(Rn,{className:"w-3.5 h-3.5"})," ",r==="ro"?"Participanți":"Attendees"]}),s.jsxs("div",{className:"font-semibold text-sm",children:[a.expected_attendees.toLocaleStr
2338ing(),"+"]})]}),a.official_url&&s.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 flex flex-col justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground uppercase mb-2",children:[s.jsx(Dr,{className:"w-3.5 h-3.5"})," ",r==="ro"?"Site oficial":"Official site"]}),s.jsx(me,{size:"sm",asChild:!0,className:"w-full",children:s.jsxs("a",{href:a.official_url,target:"_blank",rel:"noopener noreferrer nofollow",children:[r==="ro"?"Vizitează":"Visit"," ",s.jsx(Yr,{className:"w-3 h-3 ml-1"})]})})]})]}),c&&s.jsxs("section",{className:"mb-10",children:[s.jsx("h2",{className:"text-2xl font-heading font-semibold mb-3",children:r==="ro"?"Despre eveniment":"About the event"}),s.jsx("div",{className:"prose prose-sm md:prose-base dark:prose-invert max-w-none",children:c.split(`
2339
2340`).map((D,L)=>s.jsx("p",{children:D},L))})]}),b.length>0&&s.jsxs("section",{className:"mb-10",children:[s.jsx("h2",{className:"text-2xl font-heading font-semibold mb-3",children:r==="ro"?"Galerie de la edițiile anterioare":"Photos from past editions"}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:b.map(D=>{const L=j(D);return s.jsxs("figure",{className:"rounded-lg overflow-hidden border border-border bg-muted",children:[s.jsx("img",{src:D,alt:l,loading:"lazy",className:"w-full aspect-[4/3] object-cover"}),(L==null?void 0:L.credit)&&s.jsx("figcaption",{className:"text-[10px] text-muted-foreground px-2 py-1",children:L.source_url?s.jsx("a",{href:L.source_url,target:"_blank",rel:"noopener noreferrer nofollow",className:"hover:underline",children:L.credit}):L.credit})]},D)})})]}),m&&m.length>0&&s.jsxs("section",{className:"mb-10",children:[s.jsxs("h2",{className:"text-2xl font-heading font-semibold mb-3 flex items-center gap-2",children:[s.jsx(Li,{className:"w-5 h-5 text-primary"}),r==="ro"?"De ce să participi":"Why attend"]}),s.jsx("ul",{className:"space-y-2",children:m.map((D,L)=>s.jsxs("li",{className:"flex gap-2 text-sm md:text-base",children:[s.jsx(hn,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),s.jsx("span",{children:D})]},L))})]}),g&&s.jsxs("section",{className:"mb-10",children:[s.jsx("h2",{className:"text-2xl font-heading font-semibold mb-3",children:r==="ro"?"Cui i se adresează":"Who should attend"}),s.jsx("p",{className:"text-sm md:text-base text-muted-foreground",children:g})]}),A&&s.jsxs("section",{className:"mb-10",children:[s.jsx("h2",{className:"text-2xl font-heading font-semibold mb-3",children:r==="ro"?"Agendă și teme principale":"Agenda and main topics"}),s.jsx("p",{className:"text-sm md:text-base text-muted-foreground",children:A})]}),(y||a.lat&&a.lng)&&s.jsxs("section",{className:"mb-10",children:[s.jsxs("h2",{className:"text-2xl font-heading font-semibold mb-3 flex items-center gap-2",children:[s.jsx(pke,{className:"w-5 h-5 text-primary"}),r==="ro"?"Locație și cum ajungi":"Location and how to get there"]}),y&&s.jsx("p",{className:"text-sm md:text-base text-muted-foreground mb-4",children:y}),a.lat&&a.lng&&s.jsx("div",{className:"rounded-xl overflow-hidden border border-border aspect-video",children:s.jsx("iframe",{title:`Map ${l}`,src:`https://www.google.com/maps?q=${a.lat},${a.lng}&z=14&output=embed`,className:"w-full h-full",loading:"lazy"})})]}),(a.rating_score||o.length>0)&&s.jsxs("section",{className:"bg-card border border-border rounded-2xl p-6 mb-10",children:[s.jsx("h2",{className:"text-2xl font-heading font-semibold mb-4",children:r==="ro"?"Părerile participanților":"Attendee reviews"}),a.rating_score&&s.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[s.jsx("div",{className:"text-4xl font-bold",children:Number(a.rating_score).toFixed(1)}),s.jsxs("div",{children:[s.jsx(Eee,{score:Number(a.rating_score)}),s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[(I=a.rating_count)==null?void 0:I.toLocaleString()," ",r==="ro"?"recenzii":"reviews"," ·"," ",a.rating_source_url?s.jsx("a",{href:a.rating_source_url,target:"_blank",rel:"noopener noreferrer nofollow",className:"underline",children:a.rating_source}):a.rating_source]})]})]}),o.length>0&&s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:o.map(D=>{const L=r==="en"&&D.quote_en?D.quote_en:D.quote;return s.jsxs("figure",{className:"border-l-4 border-primary/40 bg-background/50 rounded-r-lg p-4",children:[D.rating&&s.jsx(Eee,{score:Number(D.rating)}),s.jsxs("blockquote",{className:"text-sm italic my-2",children:["„",L,"”"]}
2340),s.jsxs("figcaption",{className:"text-xs text-muted-foreground",children:[D.author_name&&s.jsx("span",{className:"font-medium text-foreground",children:D.author_name}),D.author_role&&s.jsxs("span",{children:[" · ",D.author_role]}),D.source_url&&D.source_name&&s.jsxs(s.Fragment,{children:[" · ",s.jsx("a",{href:D.source_url,target:"_blank",rel:"noopener noreferrer nofollow",className:"underline",children:D.source_name})]})]})]},D.id)})})]}),x.length>0&&s.jsxs("section",{className:"mb-10",children:[s.jsxs("h2",{className:"text-2xl font-heading font-semibold mb-3 flex items-center gap-2",children:[s.jsx(ms,{className:"w-5 h-5 text-primary"}),r==="ro"?"Întrebări frecvente":"Frequently asked questions"]}),s.jsx(lo,{type:"single",collapsible:!0,className:"w-full",children:x.map((D,L)=>s.jsxs(Os,{value:`faq-${L}`,children:[s.jsx(Ls,{className:"text-left",children:D.question}),s.jsx(Rs,{className:"text-muted-foreground",children:D.answer})]},L))})]}),a.official_url&&s.jsx("div",{className:"text-center py-6 border-t border-border",children:s.jsx(me,{asChild:!0,size:"lg",children:s.jsxs("a",{href:a.official_url,target:"_blank",rel:"noopener noreferrer nofollow",children:[r==="ro"?"Vezi detalii și înregistrare":"See details & register",s.jsx(Yr,{className:"w-4 h-4 ml-2"})]})})})]})]})}const UF={"identitate-digitala":{label:"Identitate Digitală",labelEn:"Digital Identity",icon:pi,color:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},"dao-guvernanta":{label:"DAO & Guvernanță",labelEn:"DAO & Governance",icon:Ale,color:"bg-purple-500/10 text-purple-600 dark:text-purple-400"},"supply-chain":{label:"Supply Chain",labelEn:"Supply Chain",icon:mle,color:"bg-orange-500/10 text-orange-600 dark:text-orange-400"},"defi-tokenizare":{label:"DeFi & Tokenizare",labelEn:"DeFi & Tokenization",icon:Wi,color:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400"},"gaming-metaverse":{label:"Gaming & Metaverse",labelEn:"Gaming & Metaverse",icon:Eu,color:"bg-pink-500/10 text-pink-600 dark:text-pink-400"},"social-creator":{label:"Social & Creator",labelEn:"Social & Creator",icon:Rn,color:"bg-cyan-500/10 text-cyan-600 dark:text-cyan-400"},infrastructura:{label:"Infrastructură",labelEn:"Infrastructure",icon:op,color:"bg-slate-500/10 text-slate-600 dark:text-slate-400"},sanatate:{label:"Sănătate",labelEn:"Healthcare",icon:OU,color:"bg-red-500/10 text-red-600 dark:text-red-400"},educatie:{label:"Educație",labelEn:"Education",icon:Rr,color:"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400"},"energie-mediu":{label:"Energie & Mediu",labelEn:"Energy & Environment",icon:tle,color:"bg-green-500/10 text-green-600 dark:text-green-400"}};function Tee(){const{lang:e}=Pt(),r=e==="ro",[n,i]=w.useState(null);Zr({title:r?"Studii de Caz Web3 – Proiecte Reale":"Web3 Case Studies – Real Projects",description:r?"Descoperă studii de caz reale despre proiecte Web3: identitate digitală, DAO, supply chain, DeFi și multe altele.":"Discover real Web3 case studies: digital identity, DAO, supply chain, DeFi and more."});const{data:a,isLoading:o}=Xe({queryKey:["web3-case-studies",n],queryFn:async()=>{let l=G.from("web3_case_studies").select("*").eq("status","published").order("is_featured",{ascending:!1}).order("published_at",{ascending:!1});n&&(l=l.eq("category",n));const{data:c,error:u}=await l;if(u)throw u;return c}});return s.jsx(Ft,{children:s.jsxs("div",{className:"container mx-auto px-4 py-10 max-w-6xl",children:[s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center mb-12",children:[s.jsx("h1",{className:"text-3xl md:text-4xl font-heading font-bold mb-4",children:r?"Studii de Caz Web3":"Web3 Case Studies"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:r?"Proiecte reale care demonstrează cum tehnologia Web3 transformă industriile – de la identitate digitală la energie verde.":"Real projects demonstrating how Web3 technology transforms industries – from digital identity to green energy."})]}),s.jsxs("div",{className:"flex flex-wrap gap-2 justify-center mb-10",children:[s.jsx("button",{onClick:()=>i(null),className:`px-4 py-2 rounded-full text-sm font-medium transition-colors ${n?"bg-muted hover:bg-muted/80 text-muted-foreground":"bg-primary text-primary-foreground"}`,children:r?"Toate":"All"}),Object.entries(UF).map(([l,c])=>{const u=c.icon;return s.jsxs("button",{onClick:()=>i(l===n?null:l),className:`px-4 py-2 rounded-full text-sm font-medium transition-colors flex items-center gap-1.5 ${n===l?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80 text-muted-foreground"}`,children:[s.jsx(u,{className:"h-3.5 w-3.5"}),r?c.label:c.labelEn]},l)})]}),o?s.jsx("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:[1,2,3].map(l=>s.jsxs(st,{className:"animate-pulse",children:[s.jsx(Ot,{children:s.jsx("div",{className:"h-6 bg-muted rounded w-3/4"})}),s.jsx(ot,{children:s.jsx("div",{className:"h-16 bg-muted rounded"})})]},l))}):a!=null&&a.length?s.jsx("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:a.map((l,c)=>
2340{const u=UF[l.category]||UF.infrastructura,d=u.icon,h=`${r?"/web3-studii-de-caz":"/web3-case-studies"}/${l.slug}`;return s.jsx(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:c*.05},children:s.jsx(be,{to:h,className:"block h-full",children:s.jsxs(st,{className:`h-full flex flex-col transition-shadow hover:shadow-lg ${l.is_featured?"ring-2 ring-primary/30":""}`,children:[s.jsx("div",{className:"h-40 flex items-center justify-center bg-muted/50",children:s.jsx(d,{className:"h-12 w-12 text-muted-foreground/20"})}),s.jsxs(Ot,{className:"pb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs font-medium ${u.color}`,children:[s.jsx(d,{className:"h-3 w-3"}),r?u.label:u.labelEn]}),l.is_featured&&s.jsx(at,{variant:"secondary",className:"text-xs",children:"⭐ Featured"})]}),s.jsx(Ht,{className:"text-lg leading-snug",children:r?l.title:l.title_en||l.title}),l.company_name&&s.jsx("p",{className:"text-sm text-muted-foreground font-medium mt-1",children:l.company_name})]}),s.jsxs(ot,{className:"flex-1 flex flex-col",children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-3",children:r?l.summary_ro:l.summary_en||l.summary_ro}),s.jsxs("div",{className:"mt-auto pt-3 flex items-center justify-between",children:[s.jsx("div",{className:"flex flex-wrap gap-1",children:(l.tags||[]).slice(0,3).map(f=>s.jsx(at,{variant:"outline",className:"text-xs",children:f},f))}),s.jsxs("span",{className:"text-primary text-xs font-medium flex items-center gap-1",children:[r?"Citește":"Read"," →"]})]})]})]})})},l.id)})}):s.jsxs("div",{className:"text-center py-20 text-muted-foreground",children:[s.jsx(op,{className:"h-12 w-12 mx-auto mb-4 opacity-30"}),s.jsx("p",{className:"text-lg",children:r?"Nu sunt încă studii de caz publicate.":"No case studies published yet."}),s.jsx("p",{className:"text-sm mt-2",children:r?"Revino în curând!":"Come back soon!"})]})]})})}const iS={"identitate-digitala":{label:"Identitate Digitală",labelEn:"Digital Identity",icon:pi,color:"text-blue-600 dark:text-blue-400",colorBg:"bg-blue-500/10"},"dao-guvernanta":{label:"DAO & Guvernanță",labelEn:"DAO & Governance",icon:Ale,color:"text-purple-600 dark:text-purple-400",colorBg:"bg-purple-500/10"},"supply-chain":{label:"Supply Chain",labelEn:"Supply Chain",icon:mle,color:"text-orange-600 dark:text-orange-400",colorBg:"bg-orange-500/10"},"defi-tokenizare":{label:"DeFi & Tokenizare",labelEn:"DeFi & Tokenization",icon:Wi,color:"text-emerald-600 dark:text-emerald-400",colorBg:"bg-emerald-500/10"},"gaming-metaverse":{label:"Gaming & Metaverse",labelEn:"Gaming & Metaverse",icon:Eu,color:"text-pink-600 dark:text-pink-400",colorBg:"bg-pink-500/10"},"social-creator":{label:"Social & Creator",labelEn:"Social & Creator",icon:Rn,color:"text-cyan-600 dark:text-cyan-400",colorBg:"bg-cyan-500/10"},infrastructura:{label:"Infrastructură",labelEn:"Infrastructure",icon:op,color:"text-slate-600 dark:text-slate-400",colorBg:"bg-slate-500/10"},sanatate:{label:"Sănătate",labelEn:"Healthcare",icon:OU,color:"text-red-600 dark:text-red-400",colorBg:"bg-red-500/10"},educatie:{label:"Educație",labelEn:"Education",icon:Rr,color:"text-indigo-600 dark:text-indigo-400",colorBg:"bg-indigo-500/10"},"energie-mediu":{label:"Energie & Mediu",labelEn:"Energy & Environment",icon:tle,color:"text-green-600 dark:text-green-400",colorBg:"bg-green-500/10"}};function Qf(e){const r=/\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*/g;let n=0,i;const a=[];let o=0;for(;(i=r.exec(e))!==null;){if(i.index>n&&a.push(s.jsx("span",{children:e.slice(n,i.index)},o++)),i[1]!==void 0&&i[2]!==void 0){const l=i[2];l.startsWith("/")?a.push(s.jsx(be,{to:l,className:"text-primary hover:underline font-medium",children:i[1]},o++)):a.push(s.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:i[1]},o++))}else i[3]!==void 0&&a.push(s.jsx("strong",{className:"font-semibold text-foreground",children:i[3]},o++));n=i.index+i[0].length}return n<e.length&&a.push(s.jsx("span",{children:e.slice(n)},o++)),a.length>0?a:e}function eNt(e){return/\b(USD|EUR|RON|\$|€|billion|miliarde|million|milioane|CAGR|%)\b/i.test(e)&&e.length<120&&(e.startsWith("**")||/^\d/.test(e.trim()))}function tNt({text:e}){const r=e.replace(/\*\*/g,"");return s.jsx("div",{className:"my-6 rounded-xl border border-primary/20 bg-primary/5 px-6 py-5",children:s.jsx("p",{className:"font-heading text-lg md:text-xl font-bold text-foreground leading-snug",children:r})})}function Pee(){const{slug:e}=Zl(),{lang:r}=Pt(),n=r==="ro",i=Kr(),[a,o]=w.useState(!1),{data:l,isLoading:c}=Xe({queryKey:["web3-case-study",e],queryFn:async()=>{const{data:C,error:N}=await G.from("web3_case_studies").select("*").eq("slug",e).eq("status","published").single();if(N)throw N;return C},enabled:!!e}),{data:u}=Xe({queryKey:["web3-related",l==null?void 0:l.category,l==null?void 0:l.id],queryFn:async()=>{const{data:C}=await G.from("web3_case_studies").select("id, title, title_en, slug, category, company_name, summary_ro, summary_en").eq("status","published").eq("category",l.category).neq("id",l.id).limit(3);return C||[]},enabled:!!l}),d=w.useCallback(async()=>
2340{if(l){o(!0);try{const{data:C,error:N}=await G.functions.invoke("generate-casestudy-video",{body:{case_study_id:l.id,lang:n?"ro":"en"}});if(N)throw N;if(!(C!=null&&C.success))throw new Error((C==null?void 0:C.error)||"Generation failed");ft.success(n?"Video generat cu succes!":"Video generated successfully!"),i.invalidateQueries({queryKey:["web3-case-study",e]})}catch(C){ft.error(C.message||"Eroare la generare video")}finally{o(!1)}}},[l,n,e,i]),h=n?"/web3-studii-de-caz":"/web3-case-studies";if(Zr({title:l?`${n?l.title:l.title_en||l.title}`:"Web3 Case Study",description:l&&(n?l.summary_ro:l.summary_en||l.summary_ro)||"",type:"article"}),c)return s.jsx(Ft,{children:s.jsx("div",{className:"container py-20 flex justify-center",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})})});if(!l)return s.jsx(Ft,{children:s.jsxs("div",{className:"container py-20 text-center",children:[s.jsx("h1",{className:"font-heading text-2xl font-bold mb-2",children:n?"Studiul de caz nu a fost găsit":"Case study not found"}),s.jsxs(be,{to:h,className:"text-primary text-sm hover:underline",children:["← ",n?"Înapoi la studii de caz":"Back to case studies"]})]})});const f=iS[l.category]||iS.infrastructura,p=f.icon,m=n?l.title:l.title_en||l.title,A=n?l.summary_ro:l.summary_en||l.summary_ro,g=n?l.body_ro:l.body_en||l.body_ro,y=l.tags||[],x=l.video_status==="ready"&&l.video_audio_url,b=x?(()=>{try{return JSON.parse(l.video_script)}catch{return null}})():null,v=g?Math.max(2,Math.ceil(g.split(/\s+/).filter(Boolean).length/200)):3,j={hook:m,section1:A||"",section2:g?g.slice(0,250):"",section3:"",closing:n?"Descoperă mai multe studii de caz pe EduWeb":"Discover more case studies on EduWeb"},_=typeof window<"u"?window.location.href:"";return s.jsx(Ft,{children:s.jsx("article",{className:"px-4 md:px-6",children:s.jsx("div",{className:"mx-auto max-w-[720px] pt-8 pb-16",children:s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.5},children:[s.jsxs(be,{to:h,className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-6 transition-colors",children:[s.jsx(rn,{size:14})," ",n?"Înapoi la studii de caz":"Back to case studies"]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-4",children:[s.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold ${f.colorBg} ${f.color}`,children:[s.jsx(p,{className:"h-3 w-3"}),n?f.label:f.labelEn]}),l.company_name&&s.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs font-medium bg-secondary text-secondary-foreground",children:[s.jsx(L0,{className:"h-3 w-3"}),l.company_name]})]}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl lg:text-[2.75rem] font-bold leading-[1.15] mb-5 tracking-tight text-foreground",children:m}),s.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground mb-6 flex-wrap",children:[l.published_at&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ja,{size:14}),al(new Date(l.published_at),"d MMMM yyyy",{locale:n?Md:KQ})]}),s.jsx("span",{className:"text-border",children:"·"}),s.jsxs("span",{children:[v," min ",n?"citire":"read"]}),l.project_url&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-border",children:"·"}),s.jsxs("a",{href:l.project_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-primary hover:underline font-medium",children:[s.jsx(Dr,{size:14}),(()=>{try{return new URL(l.project_url).hostname.replace("www.","")}catch{return l.project_url}})(),s.jsx(Yr,{size:12})]})]})]}),A&&s.jsx("div",{className:"mb-8 pl-4 border-l-[3px] border-primary/40",children:s.jsx("p",{className:"text-lg md:text-xl text-foreground/80 leading-relaxed font-[450]",children:A})}),x&&b?s.jsx("div",{className:"mb-8",children:s.jsx(fp,{script:b,audioUrl:l.video_audio_url,duration:l.video_duration_seconds||60,topic:l.category==="defi-tokenizare"?"blockchain":l.category==="gaming-metaverse"?"nft":"web3",postId:l.id,postTitle:m})}):s.jsx("div",{className:"mb-8",children:s.jsx(fp,{script:j,audioUrl:"",duration:60,topic:l.category==="defi-tokenizare"?"blockchain":l.category==="gaming-metaverse"?"nft":"web3",postTitle:m,onDemandGenerate:d,isGenerating:a})}),s.jsx("div",{className:"prose-eduweb",children:(()=>
2340{if(!g)return s.jsx("p",{className:"text-muted-foreground",children:n?"Conținut indisponibil.":"Content unavailable."});let C=g;C=C.replace(/\\[\*\-]\s+/g,"- "),C=C.replace(/([^\n])(\n?)(#{2,3}\s)/g,`$1
2341$3`),C=C.replace(/([.!?:;,])(\s*)(#{2,3}\s)/g,`$1
2342$3`);const N=C.split(`
2343`);let S=0;return N.map((E,O)=>{if(/^#{1,6}\s*$/.test(E.trim()))return null;if(eNt(E))return s.jsx(tNt,{text:E},O);if(E.startsWith("# ")&&!E.startsWith("## "))return s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold mt-12 mb-5 text-foreground tracking-tight",children:Qf(E.replace("# ",""))},O);if(E.startsWith("#### "))return s.jsx("h4",{className:"font-heading text-base font-semibold mt-6 mb-2 text-foreground",children:Qf(E.replace("#### ",""))},O);if(E.startsWith("### "))return s.jsx("h3",{className:"font-heading text-lg font-semibold mt-8 mb-3 text-foreground",children:Qf(E.replace("### ",""))},O);if(E.startsWith("## "))return s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-semibold mt-12 mb-4 text-foreground tracking-tight border-b border-border/50 pb-2",children:Qf(E.replace("## ",""))},O);if(E.startsWith("- ")||E.startsWith("• ")||/^\*\s+/.test(E)){const F=E.replace(/^[\*\-•]\s+/,""),I=F.match(/^(.*?)\s*(#{2,3}\s.+)$/);if(I){const D=[];I[1].trim()&&D.push(s.jsx("li",{className:"mb-2 text-[1.0625rem] text-foreground/85 leading-[1.8] ml-5 list-disc",children:bu(I[1].trim())},`${O}-li`));const L=I[2];return L.startsWith("### ")?D.push(s.jsx("h3",{className:"font-heading text-lg font-semibold mt-8 mb-3 text-foreground",children:Qf(L.replace("### ",""))},`${O}-h`)):L.startsWith("## ")&&D.push(s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-semibold mt-12 mb-4 text-foreground tracking-tight border-b border-border/50 pb-2",children:Qf(L.replace("## ",""))},`${O}-h`)),s.jsx(ee.Fragment,{children:D},O)}return s.jsx("li",{className:"mb-2 text-[1.0625rem] text-foreground/85 leading-[1.8] ml-5 list-disc",children:bu(F)},O)}if(E.startsWith("---"))return s.jsx("hr",{className:"my-10 border-border/50"},O);if(E.startsWith("*")&&E.endsWith("*")&&!E.startsWith("**"))return s.jsx("p",{className:"mb-5 text-sm italic text-muted-foreground",children:E.replace(/\*/g,"")},O);if(E.startsWith("**")&&E.endsWith("**"))return s.jsx("p",{className:"mb-4 text-lg font-semibold text-foreground",children:E.replace(/\*\*/g,"")},O);if(E.startsWith("> "))return s.jsx("div",{className:"my-5 rounded-xl border-l-4 border-primary bg-primary/5 p-4 md:p-5",children:s.jsx("p",{className:"text-[1.0625rem] text-foreground/90 leading-relaxed italic",children:Qf(E.replace(/^>\s*/,""))})},O);if(E.trim()==="")return null;S++;const B=S===1,T=Qf(E);return s.jsx("p",{className:"mb-5 text-[1.0625rem] text-foreground/85 leading-[1.85]",children:typeof T=="string"?bu(T,B):T},O)})})()}),y.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Mj,{className:"my-10"}),s.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[s.jsx(vke,{size:14,className:"text-muted-foreground shrink-0"}),y.map(C=>s.jsx(at,{variant:"outline",className:"text-sm px-3 py-1.5",children:C},C))]})]}),l.project_url&&s.jsx("div",{className:"my-8 p-5 rounded-xl border border-primary/20 bg-primary/5",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(p,{className:`h-5 w-5 ${f.color} shrink-0`}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:n?`Explorează ${l.company_name||"proiectul"}`:`Explore ${l.company_name||"the project"}`}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:n?"Vizitează site-ul oficial":"Visit the official website"})]}),s.jsxs("a",{href:l.project_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:brightness-110 transition-all shrink-0",children:[n?"Vizitează":"Visit",s.jsx(Yr,{size:12})]})]})}),s.jsxs("div",{className:"mt-6 pt-4 border-t border-border",children:[s.jsxs("p",{className:"text-sm font-medium text-muted-foreground mb-3 flex items-center gap-2",children:[s.jsx(zU,{size:14}),n?"Distribuie studiul de caz":"Share this case study"]}),s.jsx("div",{className:"flex gap-2 flex-wrap",children:[{name:"X",icon:"𝕏",url:`https://twitter.com/intent/tweet?text=${encodeURIComponent(m)}&url=${encodeURIComponent(_)}`},{name:"Facebook",icon:"f",url:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(_)}`},{name:"LinkedIn",icon:"in",url:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(_)}`},{name:"WhatsApp",icon:"💬",url:`https://wa.me/?text=${encodeURIComponent(m+" "+_)}`}].map(C=>s.jsxs("button",{onClick:()=>window.open(C.url,"_blank","width=600,height=400"),className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-border bg-card hover:bg-primary/5 hover:border-primary/30 transition-colors",children:[s.jsx("span",{children:C.icon})," ",C.name]},C.name))})]}),u&&u.length>0&&s.jsxs("div",{className:"mt-12",children:[s.jsxs("h2",{className:"font-heading text-xl font-bold mb-5 flex items-center gap-2",children:[s.jsx(oa,{size:20,className:"text-primary"}),n?"Studii de caz similare":"Related case studies"]}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:u.map(C=>
2343{const N=iS[C.category]||iS.infrastructura,S=N.icon;return s.jsxs(be,{to:`${h}/${C.slug}`,className:"group rounded-xl border border-border bg-card hover:border-primary/30 transition-all p-4",children:[s.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[s.jsx(S,{className:`h-3.5 w-3.5 ${N.color}`}),s.jsx("span",{className:`text-xs font-medium ${N.color}`,children:n?N.label:N.labelEn})]}),s.jsx("h3",{className:"font-heading text-sm font-semibold line-clamp-2 group-hover:text-primary transition-colors mb-1",children:n?C.title:C.title_en||C.title}),C.company_name&&s.jsx("p",{className:"text-xs text-muted-foreground",children:C.company_name})]},C.id)})})]}),s.jsxs("section",{className:"mt-14 rounded-xl border border-primary/20 bg-gradient-to-br from-primary/5 to-primary/10 p-8 text-center",children:[s.jsx(Rr,{size:32,className:"text-primary mx-auto mb-3"}),s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-bold mb-2 text-foreground",children:n?"Continuă să înveți":"Continue Learning"}),s.jsx("p",{className:"text-muted-foreground text-sm md:text-base mb-5 max-w-md mx-auto",children:n?"Descoperă mai multe despre tehnologie, automatizare și Web3 în EduWeb Academy.":"Explore more insights about technology, automation, and Web3 in the EduWeb Academy."}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-lg font-semibold hover:brightness-110 transition-all",children:[n?"Explorează Academy":"Explore Academy",s.jsx(Gt,{size:16})]})]})]})})})})}const rNt=G,Iee={title:"",summary:"",body:"",topics:""};function nNt(){const{user:e}=Fn(),{toast:r}=wn(),n=Kr(),[i,a]=w.useState(!1),[o,l]=w.useState(Iee),{data:c,isLoading:u}=Xe({queryKey:["partner-company",e==null?void 0:e.id],queryFn:async()=>{const{data:x,error:b}=await rNt.from("innovation_network").select("*").eq("user_id",e.id).single();if(b)throw b;return x},enabled:!!e}),{data:d=[],isLoading:h}=Xe({queryKey:["partner-articles",e==null?void 0:e.id],queryFn:async()=>{const{data:x,error:b}=await G.from("posts").select("*").eq("created_by",e.id).order("created_at",{ascending:!1});if(b)throw b;return x||[]},enabled:!!e}),f=d.filter(x=>{const b=new Date(x.created_at),v=new Date;return b.getMonth()===v.getMonth()&&b.getFullYear()===v.getFullYear()}).length,p=(c==null?void 0:c.monthly_article_limit)||3,m=f<p,A=d.filter(x=>x.status==="published").length,g=An({mutationFn:async()=>{if(!m)throw new Error(`Ai atins limita de ${p} articole/lună.`);const x=o.title.toLowerCase().replace(/[^a-z0-9ăîșțâ\s-]/g,"").replace(/\s+/g,"-").slice(0,80),b=(o.body||"").split(/\s+/).filter(Boolean).length,{error:v}=await G.from("posts").insert({title_ro:o.title.trim(),slug:`${x}-${Date.now().toString(36)}`,summary_ro:o.summary.trim()||null,body_ro:o.body.trim()||null,topics:o.topics.split(",").map(j=>j.trim()).filter(Boolean),difficulty_level:"începător",type:"editorial",status:"draft",source_links:[],created_by:e.id,word_count:b});if(v)throw v},onSuccess:()=>{n.invalidateQueries({queryKey:["partner-articles"]}),r({title:"Articol creat",description:"Articolul a fost trimis spre aprobare."}),a(!1),l(Iee)},onError:x=>r({title:"Eroare",description:x.message,variant:"destructive"})}),y=x=>x==="published"?s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-emerald-600 bg-emerald-500/10 px-2.5 py-1 rounded-full",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"})," Publicat"]}):x==="draft"?s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-amber-600 bg-amber-500/10 px-2.5 py-1 rounded-full",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-500"})," În așteptare"]}):s.jsx("span",{className:"text-xs font-medium text-muted-foreground bg-muted px-2.5 py-1 rounded-full",children:"Draft"});return u?s.jsx(Ft,{children:s.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})})}):s.jsxs(Ft,{children:[s.jsxs("section",{className:"relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 via-background to-accent/5"}),s.jsx("div",{className:"absolute inset-0 opacity-30",style:{backgroundImage:"radial-gradient(circle at 1px 1px, hsl(var(--border)) 1px, transparent 0)",backgroundSize:"40px 40px"}}),s.jsx("div",{className:"container relative max-w-6xl py-12 md:py-16",children:s.jsxs(Le.div,{initial:{opacity:0,y:20}
2343,animate:{opacity:1,y:0},className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[s.jsxs("div",{className:"relative",children:[c!=null&&c.logo_url?s.jsx("img",{src:c.logo_url,alt:c==null?void 0:c.name,className:"w-24 h-24 md:w-28 md:h-28 rounded-2xl object-contain bg-card shadow-xl border border-border/50 p-2"}):s.jsx("div",{className:"w-24 h-24 md:w-28 md:h-28 rounded-2xl bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center shadow-xl border border-border/50",children:s.jsx(L0,{className:"w-12 h-12 text-primary"})}),s.jsx("div",{className:"absolute -bottom-2 -right-2 w-8 h-8 rounded-full bg-primary flex items-center justify-center shadow-lg",children:s.jsx(pi,{className:"w-4 h-4 text-primary-foreground"})})]}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-primary/10 text-primary text-xs font-semibold",children:[s.jsx(cp,{className:"w-3 h-3"})," Partener Verificat"]}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"EduWeb Innovation Network"})]}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-2",children:(c==null?void 0:c.name)||"Panou Partener"}),(c==null?void 0:c.eduweb_role)&&s.jsx("p",{className:"text-muted-foreground",children:c.eduweb_role}),(c==null?void 0:c.website_url)&&s.jsxs("a",{href:c.website_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm text-primary hover:underline mt-2",children:[s.jsx(Dr,{size:14})," ",c.website_url.replace(/^https?:\/\//,""),s.jsx(Yr,{size:12})]})]}),s.jsxs(sl,{open:i,onOpenChange:a,children:[s.jsx(Ab,{asChild:!0,children:s.jsxs(me,{size:"lg",disabled:!m,className:"gap-2 shadow-lg",children:[s.jsx(Qn,{size:18})," Articol nou"]})}),s.jsxs(Po,{className:"max-w-lg max-h-[90vh] overflow-y-auto",onPointerDownOutside:x=>x.preventDefault(),children:[s.jsx(ol,{children:s.jsxs(ll,{className:"flex items-center gap-2",children:[s.jsx(us,{className:"text-primary",size:20}),"Creează articol"]})}),s.jsxs("div",{className:"space-y-4 mt-2",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Titlu"}),s.jsx(qe,{value:o.title,onChange:x=>l(b=>({...b,title:x.target.value})),placeholder:"Titlul articolului"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Rezumat"}),s.jsx(fr,{rows:2,value:o.summary,onChange:x=>l(b=>({...b,summary:x.target.value})),placeholder:"O scurtă descriere a articolului..."})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Conținut"}),s.jsx(fr,{rows:10,value:o.body,onChange:x=>l(b=>({...b,body:x.target.value})),placeholder:"Scrie conținutul articolului (markdown suportat)...",className:"font-mono text-sm"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{children:"Topicuri (separate prin virgulă)"}),s.jsx(qe,{value:o.topics,onChange:x=>l(b=>({...b,topics:x.target.value})),placeholder:"SEO, Marketing Digital, Web3"})]}),s.jsxs("div",{className:"rounded-xl bg-gradient-to-r from-primary/5 to-accent/5 border border-primary/10 p-4 text-sm",children:[s.jsxs("p",{className:"flex items-center gap-2 text-muted-foreground mb-2",children:[s.jsx(Li,{size:14,className:"text-primary"}),"Articolele create vor fi trimise spre aprobare editorială."]}),s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Articole luna aceasta:"}),s.jsxs("span",{className:"font-semibold text-primary",children:[f," / ",p]})]})]}),s.jsxs(me,{className:"w-full h-11",onClick:()=>g.mutate(),disabled:g.isPending||!o.title.trim()||!o.body.trim(),children:[g.isPending?s.jsx(rt,{size:16,className:"animate-spin"}):s.jsx(Qn,{size:16}),"Trimite articol"]})]})]})]})]})})]}),s.jsx("section",{className:"container max-w-6xl py-8",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"relative overflow-hidden rounded-2xl border border-border/50 bg-card p-6",children:[s.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-gradient-to-bl from-primary/10 to-transparent roun
2343ded-bl-full"}),s.jsx("div",{className:"flex items-center gap-3 mb-3",children:s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:s.jsx(Ja,{className:"w-5 h-5 text-primary"})})}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Articole luna aceasta"}),s.jsxs("div",{className:"flex items-baseline gap-1",children:[s.jsx("span",{className:"text-3xl font-bold",children:f}),s.jsxs("span",{className:"text-lg text-muted-foreground",children:["/ ",p]})]}),s.jsx("div",{className:"mt-3 h-1.5 rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-primary to-primary/60 transition-all",style:{width:`${Math.min(f/p*100,100)}%`}})})]}),s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"relative overflow-hidden rounded-2xl border border-border/50 bg-card p-6",children:[s.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-gradient-to-bl from-emerald-500/10 to-transparent rounded-bl-full"}),s.jsx("div",{className:"flex items-center gap-3 mb-3",children:s.jsx("div",{className:"w-10 h-10 rounded-xl bg-emerald-500/10 flex items-center justify-center",children:s.jsx(oa,{className:"w-5 h-5 text-emerald-500"})})}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Articole publicate"}),s.jsx("span",{className:"text-3xl font-bold",children:A})]}),s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"relative overflow-hidden rounded-2xl border border-border/50 bg-card p-6",children:[s.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-gradient-to-bl from-amber-500/10 to-transparent rounded-bl-full"}),s.jsx("div",{className:"flex items-center gap-3 mb-3",children:s.jsx("div",{className:"w-10 h-10 rounded-xl bg-amber-500/10 flex items-center justify-center",children:s.jsx(us,{className:"w-5 h-5 text-amber-500"})})}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Total articole"}),s.jsx("span",{className:"text-3xl font-bold",children:d.length})]}),s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"relative overflow-hidden rounded-2xl border border-border/50 bg-card p-6",children:[s.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-gradient-to-bl from-violet-500/10 to-transparent rounded-bl-full"}),s.jsx("div",{className:"flex items-center gap-3 mb-3",children:s.jsx("div",{className:"w-10 h-10 rounded-xl bg-violet-500/10 flex items-center justify-center",children:s.jsx(oo,{className:"w-5 h-5 text-violet-500"})})}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Status partener"}),s.jsx("span",{className:"text-lg font-semibold text-primary",children:"Activ"})]})]})}),s.jsxs("section",{className:"container max-w-6xl pb-16",children:[s.jsx("div",{className:"flex items-center justify-between mb-6",children:s.jsxs("h2",{className:"font-heading text-2xl font-bold flex items-center gap-2",children:[s.jsx(us,{size:24,className:"text-primary"})," Articolele tale"]})}),h?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(rt,{className:"animate-spin text-primary",size:28})}):d.length===0?s.jsxs(Le.div,{initial:{opacity:0}
2343,animate:{opacity:1},className:"text-center py-16 rounded-2xl border-2 border-dashed border-border/50 bg-muted/20",children:[s.jsx(us,{size:48,className:"mx-auto text-muted-foreground mb-4"}),s.jsx("h3",{className:"font-heading text-lg font-semibold mb-2",children:"Nu ai creat încă niciun articol"}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-md mx-auto",children:"Împărtășește expertiza companiei tale cu comunitatea EduWeb. Articolele tale vor ajunge la mii de cititori."}),s.jsxs(me,{onClick:()=>a(!0),size:"lg",className:"gap-2",children:[s.jsx(Qn,{size:18})," Creează primul articol"]})]}):s.jsx("div",{className:"rounded-2xl border border-border/50 overflow-hidden bg-card",children:s.jsxs(Tn,{children:[s.jsx(Pn,{children:s.jsxs(Nt,{className:"bg-muted/30",children:[s.jsx(Me,{className:"font-semibold",children:"Titlu"}),s.jsx(Me,{className:"font-semibold",children:"Cuvinte"}),s.jsx(Me,{className:"font-semibold",children:"Status"}),s.jsx(Me,{className:"font-semibold",children:"Data"})]})}),s.jsx(In,{children:d.map(x=>s.jsxs(Nt,{className:"hover:bg-muted/20",children:[s.jsx(Oe,{children:s.jsx("span",{className:"font-medium line-clamp-1",children:x.title_ro})}),s.jsx(Oe,{className:"text-sm text-muted-foreground",children:x.word_count||0}),s.jsx(Oe,{children:y(x.status)}),s.jsx(Oe,{className:"text-sm text-muted-foreground",children:new Date(x.created_at).toLocaleDateString("ro-RO",{day:"numeric",month:"short",year:"numeric"})})]},x.id))})]})})]}),c&&s.jsx("section",{className:"container max-w-6xl pb-16",children:s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"relative overflow-hidden rounded-2xl bg-gradient-to-br from-primary/10 via-primary/5 to-transparent border border-primary/20 p-8",children:[s.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-primary/5 rounded-full -translate-y-1/2 translate-x-1/2"}),s.jsxs("div",{className:"relative flex flex-col md:flex-row items-start md:items-center justify-between gap-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-heading text-xl font-bold mb-2",children:"Pagina ta în Innovation Network"}),s.jsx("p",{className:"text-muted-foreground max-w-lg",children:"Vizitatorii pot descoperi profilul companiei tale, domeniile de expertiză și contribuția la ecosistemul EduWeb."})]}),s.jsx(me,{asChild:!0,variant:"outline",size:"lg",className:"gap-2 shrink-0",children:s.jsxs(be,{to:`/innovation-network/${c.slug}`,children:[s.jsx(Oi,{size:16})," Vezi pagina publică",s.jsx(hs,{size:16})]})})]})]})})]})}function iNt(){const[e,r]=w.useState(!1);return w.useEffect(()=>{if(e)return;const n=setTimeout(async()=>{try{const{data:i}=await G.from("tracking_codes").select("id, script_content, placement, is_active").eq("is_active",!0).order("sort_order",{ascending:!0});if(!(i!=null&&i.length)||document.querySelector("[data-tracking-injected]"))return;const a=document.createElement("meta");a.setAttribute("data-tracking-injected","true"),document.head.appendChild(a),i.forEac
2343h(o=>{if(!o.script_content.trim()||document.querySelector(`[data-tracking-id="${o.id}"]`))return;const l=document.createElement("div");l.innerHTML=o.script_content;const c=o.placement==="body_end"?document.body:document.head;Array.from(l.childNodes).forEach(u=>{if(u instanceof HTMLScriptElement){const d=document.createElement("script");Array.from(u.attributes).forEach(h=>d.setAttribute(h.name,h.value)),d.textContent=u.textContent,d.dataset.trackingId=o.id,c.appendChild(d)}else u instanceof HTMLElement&&(u.dataset.trackingId=o.id,c.appendChild(u))})}),r(!0)}catch(i){console.error("TrackingCodeInjector error:",i)}},3e3);return()=>clearTimeout(n)},[e]),null}const $F=10;function aNt(e){const r=e.split(`
2344
2345`).map(n=>n.trim()).filter(Boolean);return r.length<=1?{intro:e,sections:[]}:{intro:r[0],sections:r.slice(1)}}const Fee=[$Se,yr,Li,Rr],Oee=["Activitate profesională","Proiecte editoriale","Viziune & Misiune","Perspectivă"];function sNt(){const{slug:e}=Zl(),[r]=H0(),n=Math.max(1,parseInt(r.get("page")||"1",10)||1),{data:i,isLoading:a}=Xe({queryKey:["author",e],queryFn:async()=>{const{data:h,error:f}=await G.from("authors").select("*").eq("slug",e).single();if(f)throw f;return h},enabled:!!e}),{lang:o}=Pt(),{data:l=[],isLoading:c}=Xe({queryKey:["author-articles",i==null?void 0:i.id,o],queryFn:async()=>{const{data:h,error:f}=await G.from("posts").select("*").eq("author_id",i.id).eq("status","published").order("published_at",{ascending:!1});if(f)throw f;return(h||[]).map(p=>P_(p,o))},enabled:!!(i!=null&&i.id)}),u=o==="en"&&(i!=null&&i.bio_en)?i.bio_en:(i==null?void 0:i.bio)||"",d=u?aNt(u):null;return Zr(i?{title:`${i.first_name} ${i.last_name} - Autor EduWeb`,description:(d==null?void 0:d.intro)||`Articole scrise de ${i.first_name} ${i.last_name}`}:void 0),a?s.jsx(Ft,{children:s.jsx("div",{className:"container py-20 flex justify-center",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})})}):i?s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-4xl py-10",children:[s.jsxs(be,{to:"/stiri",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary mb-8 transition-colors",children:[s.jsx(rn,{size:14})," ",o==="en"?"Back to news":"Înapoi la știri"]}),s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.5},className:"rounded-2xl overflow-hidden border border-border bg-card mb-10",children:[s.jsx("div",{className:"h-24 bg-gradient-to-r from-primary/20 via-accent/10 to-primary/5"}),s.jsxs("div",{className:"px-8 pb-8 -mt-14",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row items-center sm:items-end gap-5",children:[i.avatar_url?s.jsx("img",{src:i.avatar_url,alt:`${i.first_name} ${i.last_name}`,className:"w-28 h-28 rounded-2xl object-cover border-4 border-background shadow-xl"}):s.jsxs("div",{className:"w-28 h-28 rounded-2xl bg-primary/10 flex items-center justify-center text-primary font-bold text-3xl border-4 border-background shadow-xl",children:[i.first_name[0],i.last_name[0]]}),s.jsxs("div",{className:"flex-1 text-center sm:text-left pt-2",children:[s.jsxs("h1",{className:"font-heading text-3xl font-bold text-foreground",children:[i.first_name," ",i.last_name]}),i.title&&s.jsx("p",{className:"text-primary font-medium mt-1",children:i.title})]}),s.jsx("div",{className:"flex gap-4 mt-2 sm:mt-0",children:s.jsxs("div",{className:"text-center px-5 py-3 rounded-xl bg-primary/5 border border-primary/10",children:[s.jsx("div",{className:"text-2xl font-bold text-primary",children:l.length}),s.jsx("div",{className:"text-[11px] text-muted-foreground uppercase tracking-wider",children:o==="en"?"Articles":"Articole"})]})})]}),(i.linkedin_url||i.twitter_url||i.website_url)&&s.jsxs("div",{className:"flex items-center gap-3 mt-5 pt-5 border-t border-border justify-center sm:justify-start",children:[i.linkedin_url&&s.jsxs("a",{href:i.linkedin_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-sm px-3 py-1.5 rounded-lg bg-muted/50 text-muted-foreground hover:text-primary hover:bg-primary/5 transition-all",children:[s.jsx(LU,{size:15})," LinkedIn"]}),i.twitter_url&&s.jsxs("a",{href:i.twitter_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-sm px-3 py-1.5 rounded-lg bg-muted/50 text-muted-foreground hover:text-primary hover:bg-primary/5 transition-all",children:[s.jsx(wke,{size:15})," Twitter"]}),i.website_url&&s.jsxs("a",{href:i.website_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-sm px-3 py-1.5 rounded-lg bg-muted/50 text-muted-foreground hover:text-primary hover:bg-primary/5 transition-all",children:[s.jsx(Dr,{size:15})," Website"]})]})]})]}),d&&s.jsxs(Le.div,{initial:{opacity:0,y:12}
2345,animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"mb-12 space-y-6",children:[s.jsx("div",{className:"pl-4 border-l-[3px] border-primary/40",children:s.jsx("p",{className:"text-lg text-foreground/85 leading-relaxed font-[450]",children:d.intro})}),d.sections.length>0&&s.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:d.sections.map((h,f)=>{const p=Fee[f%Fee.length],m=Oee[f%Oee.length];return s.jsxs(Le.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.4,delay:.15+f*.08},className:"rounded-xl border border-border bg-card p-5 hover:border-primary/20 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(p,{size:16,className:"text-primary"})}),s.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:m})]}),s.jsx("p",{className:"text-sm text-foreground/80 leading-relaxed",children:h})]},f)})})]}),s.jsxs(Le.div,{initial:{opacity:0}
2345,animate:{opacity:1},transition:{duration:.5,delay:.3},children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-1 h-8 rounded-full bg-primary"}),s.jsx("h2",{className:"font-heading text-2xl font-semibold",children:o==="en"?"Published Articles":"Articole publicate"})]}),c?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(rt,{className:"animate-spin text-primary",size:24})}):l.length===0?s.jsx("p",{className:"text-muted-foreground text-center py-8",children:o==="en"?"No published articles yet.":"Niciun articol publicat încă."}):(()=>{const h=Math.ceil(l.length/$F),f=l.slice((n-1)*$F,n*$F);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:f.map(p=>s.jsx(W4,{article:p},p.id))}),s.jsx(q4,{currentPage:n,totalPages:h,basePath:`/autor/${e}`})]})})()]})]})}):s.jsx(Ft,{children:s.jsxs("div",{className:"container py-20 text-center",children:[s.jsx("h1",{className:"font-heading text-2xl font-bold mb-2",children:"Autor negăsit"}),s.jsx(be,{to:"/stiri",className:"text-primary text-sm hover:underline",children:"← Înapoi la știri"})]})})}const Lee=[{name:"Binance",slug:"binance",description:"Cea mai mare bursă crypto din lume, cu peste 350 de monede listate și comisioane printre cele mai mici din industrie.",fee:"0.1% (spot)",ronDeposit:"Da – card, transfer bancar",bestFor:"Tranzacționare activă, varietate monede",ctaUrl:"https://www.binance.com/activity/referral-entry/CPA?ref=CPA_00KR00ENVV",advantages:["Cele mai mici comisioane din industrie (0.1% spot)","Peste 350+ criptomonede disponibile","Lichiditate ridicată și execuție rapidă"],disadvantages:["Interfața poate fi complexă pentru începători","Unele funcții restricționate în UE"],suitableFor:"Traderi activi, utilizatori experimentați care caută varietate de monede și comisioane reduse.",h2:"Binance – cea mai populară platformă crypto în România"},{name:"Bybit",slug:"bybit",description:"Platformă rapidă, populară pentru derivate și copy trading, cu interfață modernă.",fee:"0.1% (spot)",ronDeposit:"Da – card (via terți)",bestFor:"Derivate, copy trading",ctaUrl:"https://www.bybit.com/",advantages:["Interfață modernă și intuitivă","Funcționalitate avansată de copy trading","Lichiditate bună pe piețele de derivate"],disadvantages:["Depunerea în RON necesită terți","Mai puține monede listate decât Binance"],suitableFor:"Traderi interesați de futures/derivate și cei care vor să copieze strategii ale altor traderi.",h2:"Bybit – platformă rapidă pentru derivate și copy trading"},{name:"Kraken",slug:"kraken",description:"Exchange reglementat, cu accent pe securitate și transparență, operat din 2011.",fee:"0.16% maker / 0.26% taker",ronDeposit:"Nu direct – EUR disponibil",bestFor:"Securitate, reglementare",ctaUrl:"https://www.kraken.com/",advantages:["Reglementat în multiple jurisdicții, operează din 2011","Securitate de nivel instituțional, fără incidente majore","Suport excelent pentru clienți"],disadvantages:["Nu suportă depuneri directe în RON","Comisioane ușor mai mari decât concurența"],suitableFor:"Investitori pe termen lung care prioritizează securitatea și conformitatea regulamentară.",h2:"Kraken – cel mai sigur exchange pentru investitori prudenți"},{name:"OKX",slug:"okx",description:"Platformă completă cu ecosistem DeFi integrat, wallet Web3 și NFT marketplace.",fee:"0.08% maker / 0.1% taker",ronDeposit:"Da – card (via terți)",bestFor:"DeFi, Web3, NFT",ctaUrl:"https://www.okx.com/",advantages:["Ecosistem complet: exchange + wallet Web3 + NFT","Comisioane competitive (0.08% maker)","Interfață prietenoasă cu funcții avansate"],disadvantages:["Depunerea RON nu este directă","Mai puțin cunoscut în România decât Binance"],suitableFor:"Utilizatori care vor acces la DeFi, NFT-uri și un ecosistem Web3 complet, nu doar trading.",h2:"OKX – ecosistem complet cu DeFi și Web3 integrat"}],ebe=[{question:"Care este cel mai sigur exchange crypto în România?",answer:"Kraken și Binance sunt considerate cele mai sigure platforme, datorită practicilor avansate de securitate, auditurilor Proof of Reserves și istoricului solid. Kraken operează din 2011 fără incidente majore de securitate, iar Binance investește masiv în protecția fondurilor utilizatorilor prin SAFU (Secure Asset Fund for Users)."},{question:"Pot cumpăra Bitcoin cu card în România?",answer:"Da, poți cumpăra Bitcoin cu card bancar românesc pe Binance, Bybit și OKX. Procesul este simplu: creezi cont, verifici i
2345dentitatea (KYC), adaugi cardul și cumperi BTC direct. Comisioanele pentru achiziția cu card sunt de obicei între 1-2%."},{question:"Ce taxe plătesc la crypto în România?",answer:"În România, câștigurile din criptomonede sunt impozitate cu 10% pe venitul net (diferența dintre prețul de vânzare și cel de achiziție). Trebuie să declari veniturile din crypto în declarația unică (D212). Este recomandat să păstrezi un registru al tranzacțiilor pentru calculul corect al impozitului."},{question:"Este legal să investesc în crypto în România?",answer:"Da, tranzacționarea criptomonedelor este legală în România. Începând cu 2024, platformele crypto trebuie să se înregistreze la ANAF și să respecte reglementările europene (MiCA). Utilizatorii trebuie să declare veniturile obținute și să plătească impozitele aferente."}];function oNt(){const e={"@context":"https://schema.org","@type":"FAQPage",mainEntity:ebe.map(r=>({"@type":"Question",name:r.question,acceptedAnswer:{"@type":"Answer",text:r.answer}}))};return s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}})}function lNt(){const e={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Acasă",item:window.location.origin},{"@type":"ListItem",position:2,name:"Crypto",item:`${window.location.origin}/crypto`},{"@type":"ListItem",position:3,name:"Cele mai bune exchange-uri crypto din România"}]};return s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}})}function cNt({exchange:e}){return s.jsxs("a",{href:e.ctaUrl,target:"_blank",rel:"noopener noreferrer nofollow",className:"inline-flex items-center gap-2 px-6 py-3 rounded-lg bg-primary text-primary-foreground font-heading font-semibold text-sm hover:brightness-110 transition-all shadow-md hover:shadow-lg",children:["Deschide cont pe ",e.name,s.jsx(Yr,{size:14})]})}function uNt(){return Zr({title:"Cele mai bune exchange-uri crypto din România (2026)",description:"Compară cele mai bune exchange crypto din România. Ghid complet despre platforme bitcoin, comisioane, securitate și depunere RON.",type:"website"}),s.jsxs(Ft,{children:[s.jsx(oNt,{}),s.jsx(lNt,{}),s.jsx("article",{className:"container max-w-4xl py-10",children:s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.5},children:[s.jsxs("nav",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-8",children:[s.jsx(be,{to:"/",className:"hover:text-primary transition-colors",children:"Acasă"}),s.jsx("span",{children:"/"}),s.jsx(be,{to:"/crypto",className:"hover:text-primary transition-colors",children:"Crypto"}),s.jsx("span",{children:"/"}),s.jsx("span",{className:"text-foreground",children:"Exchange-uri"})]}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl lg:text-5xl font-bold leading-tight mb-8 tracking-tight text-foreground",children:"Cele mai bune exchange-uri crypto din România (2026)"}),s.jsxs("section",{className:"mb-12",children:[s.jsxs("p",{className:"text-lg text-foreground/85 leading-[1.85] mb-5",children:["Alegerea unui ",s.jsx("strong",{children:"exchange crypto în România"})," este primul pas pentru oricine vrea să investească în Bitcoin sau alte criptomonede. Nu toate platformele sunt create egale — diferențele de comisioane, metode de depunere în RON, securitate și reglementare pot influența semnificativ experiența ta."]}),s.jsxs("p",{className:"text-lg text-foreground/85 leading-[1.85] mb-5",children:["Un exchange cu comisioane mici poate economisi sute de lei pe an dacă tranzacționezi activ. La fel de important este să alegi o ",s.jsx("strong",{children:"platformă bitcoin din România"})," care oferă suport pentru depunere în lei românești, verificare KYC rapidă și protecție a fondurilor."]}),s.jsxs("p",{className:"text-lg text-foreground/85 leading-[1.85] mb-5",children:["În acest ghid complet comparam cele mai populare platforme pentru ",s.jsx("strong",{children:"cumpărare bitcoin în România"}),", analizând comisioanele, securitatea, funcționalitățile și potrivirea pentru diferite tipuri de investitori. Toate informațiile sunt actualizate pentru 2026 și reflectă cadrul regulamentar european (MiCA)."]}
2345),s.jsx("p",{className:"text-lg text-foreground/85 leading-[1.85]",children:"Fie că ești la primul tău Bitcoin, fie că tranzacționezi zilnic, vei găsi platforma potrivită nevoilor tale mai jos."})]}),s.jsxs("section",{className:"mb-14",children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-semibold mb-6 text-foreground",children:"Comparație exchange-uri crypto 2026"}),s.jsx("div",{className:"overflow-x-auto -mx-4 px-4",children:s.jsxs("table",{className:"w-full border-collapse text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b-2 border-primary/30",children:[s.jsx("th",{className:"text-left py-3 px-4 font-heading font-semibold text-foreground",children:"Platformă"}),s.jsx("th",{className:"text-left py-3 px-4 font-heading font-semibold text-foreground",children:"Comision"}),s.jsx("th",{className:"text-left py-3 px-4 font-heading font-semibold text-foreground",children:"Depunere RON"}),s.jsx("th",{className:"text-left py-3 px-4 font-heading font-semibold text-foreground",children:"Potrivit pentru"}),s.jsx("th",{className:"text-center py-3 px-4 font-heading font-semibold text-foreground",children:"Acțiune"})]})}),s.jsx("tbody",{children:Lee.map((e,r)=>s.jsxs("tr",{className:`border-b border-border ${r%2===0?"bg-muted/30":""}`,children:[s.jsx("td",{className:"py-4 px-4 font-heading font-semibold text-foreground",children:e.name}),s.jsx("td",{className:"py-4 px-4 text-muted-foreground",children:e.fee}),s.jsx("td",{className:"py-4 px-4 text-muted-foreground",children:e.ronDeposit}),s.jsx("td",{className:"py-4 px-4 text-muted-foreground",children:e.bestFor}),s.jsx("td",{className:"py-4 px-4 text-center",children:s.jsxs("a",{href:e.ctaUrl,target:"_blank",rel:"noopener noreferrer nofollow",className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-lg bg-primary text-primary-foreground font-heading font-semibold text-xs hover:brightness-110 transition-all shadow-sm whitespace-nowrap",children:["Deschide cont",s.jsx(Yr,{size:12})]})})]},e.slug))})]})})]}),Lee.map(e=>s.jsxs("section",{className:"mb-14 pb-10 border-b border-border last:border-0",children:[s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-semibold mb-4 text-foreground",children:e.h2}),s.jsx("p",{className:"text-lg text-foreground/85 leading-[1.85] mb-6",children:e.description}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-6",children:[s.jsxs("div",{className:"rounded-xl border border-border bg-card/50 p-5",children:[s.jsxs("h3",{className:"font-heading font-semibold text-sm mb-3 flex items-center gap-2 text-foreground",children:[s.jsx(Xh,{size:16,className:"text-green-500"})," Avantaje"]}),s.jsx("ul",{className:"space-y-2",children:e.advantages.map((r,n)=>s.jsxs("li",{className:"text-sm text-foreground/80 flex items-start gap-2",children:[s.jsx("span",{className:"text-green-500 mt-1 shrink-0",children:"•"})," ",r]},n))})]}),s.jsxs("div",{className:"rounded-xl border border-border bg-card/50 p-5",children:[s.jsxs("h3",{className:"font-heading font-semibold text-sm mb-3 flex items-center gap-2 text-foreground",children:[s.jsx(Yh,{size:16,className:"text-red-400"})," Dezavantaje"]}),s.jsx("ul",{className:"space-y-2",children:e.disadvantages.map((r,n)=>s.jsxs("li",{className:"text-sm text-foreground/80 flex items-start gap-2",children:[s.jsx("span",{className:"text-red-400 mt-1 shrink-0",children:"•"})," ",r]},n))})]})]}),s.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-5 mb-6",children:[s.jsxs("h3",{className:"font-heading font-semibold text-sm mb-2 flex items-center gap-2 text-foreground",children:[s.jsx(ts,{size:14,className:"text-primary"})," Pentru cine este potrivit?"]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e.suitableFor})]}),s.jsx(cNt,{exchange:e})]},e.slug)),s.jsxs("section",{className:"mb-14",children:[s.jsxs("h2",{className:"font-heading text-xl md:text-2xl font-semibold mb-6 text-foreground flex items-center gap-2",children:[s.jsx(pi,{size:20,className:"text-primary"}),"Cum alegi un exchange crypto în România?"]}),s.jsx("ul",{className:"space-y-4",children:[{icon:s.jsx(QU,{size:16}),title:"Comisioane",desc:"Compară comisioanele de tranzacționare spot și de retragere. O diferență de 0.05% se adună rapid la tranzacții frecvente."},{icon:s.jsx(pi,{size:16}),title:"Securitate",desc:"Alege platforme cu autentificare 2FA, cold storage și audituri publice ale rezervelor (Proof of Reserves)."},{icon:s.jsx(ts,{size:16}),title:"Suport RON",desc:"Verifică dacă poți depune și retrage lei românești direct, fără c
2345onversii suplimentare costisitoare."},{icon:s.jsx(Yr,{size:16}),title:"Metode de depunere",desc:"Card bancar, transfer SEPA sau servicii terțe — fiecare metodă are comisioane și timpi diferiți."},{icon:s.jsx(Tu,{size:16}),title:"Reglementare",desc:"Preferă exchange-uri înregistrate în UE care respectă regulamentul MiCA și sunt conforme cu cerințele ANAF."}].map((e,r)=>s.jsxs("li",{className:"flex items-start gap-3 p-4 rounded-xl border border-border bg-card/50",children:[s.jsx("span",{className:"text-primary mt-0.5 shrink-0",children:e.icon}),s.jsxs("div",{children:[s.jsx("strong",{className:"font-heading text-sm text-foreground",children:e.title}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e.desc})]})]},r))})]}),s.jsxs("section",{className:"mb-14",children:[s.jsxs("h2",{className:"font-heading text-xl md:text-2xl font-semibold mb-6 flex items-center gap-2 text-foreground",children:[s.jsx(ms,{size:20,className:"text-primary"}),"Întrebări frecvente"]}),s.jsx(lo,{type:"single",collapsible:!0,className:"space-y-2",children:ebe.map((e,r)=>s.jsxs(Os,{value:`faq-${r}`,className:"border border-border rounded-lg px-4 bg-card/50",children:[s.jsx(Ls,{className:"text-left text-base font-medium hover:no-underline",children:e.question}),s.jsx(Rs,{className:"text-muted-foreground text-base leading-relaxed",children:e.answer})]},r))})]}),s.jsxs("section",{className:"mb-10 p-6 rounded-xl border border-border bg-muted/30",children:[s.jsx("h3",{className:"font-heading font-semibold text-sm mb-3 text-foreground",children:"Resurse utile"}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsx(be,{to:"/bitcoin-pret-azi",className:"text-sm text-primary hover:underline font-medium",children:"Bitcoin preț azi →"}),s.jsx(be,{to:"/crypto",className:"text-sm text-primary hover:underline font-medium",children:"Hub Crypto →"}),s.jsx(be,{to:"/convertor-crypto-ron",className:"text-sm text-primary hover:underline font-medium",children:"Convertor Crypto RON →"})]})]}),s.jsx("footer",{className:"pt-6 border-t border-border",children:s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Informațiile prezentate au scop educativ și nu reprezintă sfat financiar sau recomandare de investiție. Investițiile în criptomonede implică riscuri semnificative, inclusiv pierderea totală a capitalului investit. Unele link-uri de pe această pagină sunt link-uri de afiliere — nu implică costuri suplimentare pentru tine."})})]})})]})}var Z_=e=>e.type==="checkbox",OA=e=>e instanceof Date,bo=e=>e==null;const tbe=e=>typeof e=="object";var ga=e=>!bo(e)&&!Array.isArray(e)&&tbe(e)&&!OA(e),dNt=e=>ga(e)&&e.target?Z_(e.target)?e.target.checked:e.target.value:e,hNt=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,fNt=(e,r)=>e.has(hNt(r)),mNt=e=>{const r=e.constructor&&e.constructor.prototype;return ga(r)&&r.hasOwnProperty("isPrototypeOf")},I7=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function is(e){let r;const n=Array.isArray(e),i=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(I7&&(e instanceof Blob||i))&&(n||ga(e)))if(r=n?[]:{},!n&&!mNt(e))r=e;else for(const a in e)e.hasOwnProperty(a)&&(r[a]=is(e[a]));else return e;return r}var f3=e=>/^\w*$/.test(e),Ea=e=>e===void 0,F7=e=>Array.isArray(e)?e.filter(Boolean):[],O7=e=>F7(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ut=(e,r,n)=>{if(!r||!ga(e))return n;const i=(f3(r)?[r]:O7(r)).reduce((a,o)=>bo(a)?a:a[o],e);return Ea(i)||i===e?Ea(e[r])?n:e[r]:i},sd=e=>typeof e=="boolean",ei=(e,r,n)=>{let i=-1;const a=f3(r)?[r]:O7(r),o=a.length,l=o-1;for(;++i<o;){const c=a[i];let u=n;if(i!==l){const d=e[c];u=ga(d)||Array.isArray(d)?d:isNaN(+a[i+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const Ree={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xu={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ch={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},pNt=ee.createContext(null);pNt.displayName="HookFormContext";var ANt=(e,r,n,i=!0)=>{const a={defaultValues:r._defaultValues};for(const o in e)Object.defineProperty(a,o,{get:()=>{const l=o;return r._proxyFormState[l]!==xu.all&&(r._proxyFormState[l]=!i||xu.all),e[l]}});return a};const gNt=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;var wd=e=>typeof e=="string",xNt=(e,r,n,i,a)=>wd(e)?(i&&r.watch.add(e),Ut(n,e,a)):Array.isArray(e)?e.map(o=>(i&&r.watch.add(o),Ut(n,o))):(i&&(r.watchAll=!0),n),vz=e=>bo(e)||!tbe(e);function fm(e,r,n=new WeakSet){if(vz(e)||vz(r))return e===r;if(OA(e)&&OA(r))return e.getTime()===r.getTime();const i=Object.keys(e),a=Object.keys(r);if(i.length!==a.length)return!1;if(n.has(e)||n.has(r))return!0;n.add(e),n.add(r);for(const o of i){const l=e[o];if(!a.includes(o))return!1;if(o!=="ref"){const c=r[o];if(OA(l)&&OA(c)||ga(l)&&ga(c)||Array.isArray(l)&&Array.isArray(c)?!fm(l,c,n):l!==c)return!1}}return!0}var rbe=(e,r,n,i,a)=>r?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:a||!0}}:{},Xw=e=>Array.isArray(e)?e:[e],Dee=()=>{let e=[];return{get observers(){return e},next:a=>{for(const o of e)o.next&&o.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(o=>o!==a)}}),unsubscribe:()=>{e=[]}}},Qo=e=>ga(e)&&!Object.keys(e).length,L7=e=>e.type==="file",yu=e=>typeof e=="function",eB=e=>{if(!I7)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},nbe=e=>e.type==="select-multiple",R7=e=>e.type==="radio",yNt=e=>R7(e)||Z_(e),QF=e=>eB(e)&&e.isConnected;function vNt(e,r){const n=r.slice(0,-1).length;let i=0;for(;i<n;)e=Ea(e)?i++:e[r[i++]];return e}function bNt(e){for(const r in e)if(e.hasOwnProperty(r)&&!Ea(e[r]))return!1;return!0}function _a(e,r){const n=Array.isArray(r)?r:f3(r)?[r]:O7(r),i=n.length===1?e:vNt(e,n),a=n.length-1,o=n[a];return i&&delete i[o],a!==0&&(ga(i)&&Qo(i)||Array.isArray(i)&&bNt(i))&&_a(e,n.slice(0,-1)),e}var ibe=e=>{for(const r in e)if(yu(e[r]))return!0;return!1};function tB(e,r={}){const n=Array.isArray(e);if(ga(e)||n)for(const i in e)Array.isArray(e[i])||ga(e[i])&&!ibe(e[i])?(r[i]=Array.isArray(e[i])?[]:{},tB(e[i],r[i])):bo(e[i])||(r[i]=!0);return r}function abe(e,r,n){const i=Array.isArray(e);if(ga(e)||i)for(const a in e)Array.isArray(e[a])||ga(e[a])&&!ibe(e[a])?Ea(r)||vz(n[a])?n[a]=Array.isArray(e[a])?tB(e[a],[]):{...tB(e[a])}:abe(e[a],bo(r)?{}:r[a],n[a]):n[a]=!fm(e[a],r[a]);return n}var F1=(e,r)=>abe(e,r,tB(r));const Mee={value:!1,isValid:!1},zee={value:!0,isValid:!0};var sbe=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ea(e[0].attributes.value)?Ea(e[0].value)||e[0].value===""?zee:{value:e[0].value,isValid:!0}:zee:Mee}return Mee},obe=(e,{valueAsNumber:r,valueAsDate:n,setValueAs:i})=>Ea(e)?e:r?e===""?NaN:e&&+e:n&&wd(e)?new Date(e):i?i(e):e;const Uee={isValid:!1,value:null};var lbe=e=>Array.isArray(e)?e.reduce((r,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:r,Uee):Uee;function $ee(e){const r=e.ref;return L7(r)?r.files:R7(r)?lbe(e.refs).value:nbe(r)?[...r.selectedOptions].map(({value:n})=>n):Z_(r)?sbe(e.refs).value:obe(Ea(r.value)?e.ref.value:r.value,e)}var wNt=(e,r,n,i)=>{const a={};for(const o of e){const l=Ut(r,o);l&&ei(a,o,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:i}},rB=e=>e instanceof RegExp,O1=e=>Ea(e)?e:rB(e)?e.source:ga(e)?rB(e.value)?e.value.source:e.value:e,Qee=e=>({isOnSubmit:!e||e===xu.onSubmit,isOnBlur:e===xu.onBlur,isOnChange:e===xu.onChange,isOnAll:e===xu.all,isOnTouch:e===xu.onTouched});const Hee="AsyncFunction";var jNt=e=>!!e&&!!e.validate&&!!(yu(e.validate)&&e.validate.constructor.name===Hee||ga(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Hee)),_Nt=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Vee=(e,r,n)=>!n&&(r.watchAll||r.watch.has(e)||[...r.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const Yw=(e,r,n,i)=>{for(const a of n||Object.keys(e)){const o=Ut(e,a);if(o){const{_f:l,...c}=o;if(l){if(l.refs&&l.refs[0]&&r(l.refs[0],a)&&!i)return!0;
vendor: 4,128 bytes, line 2345
2345if(l.ref&&r(l.ref,l.name)&&!i)return!0;if(Yw(c,r))break}else if(ga(c)&&Yw(c,r))break}}};function Wee(e,r,n){const i=Ut(e,n);if(i||f3(n))return{error:i,name:n};const a=n.split(".");for(;a.length;){const o=a.join("."),l=Ut(r,o),c=Ut(e,o);if(l&&!Array.isArray(l)&&n!==o)return{name:n};if(c&&c.type)return{name:o,error:c};if(c&&c.root&&c.root.type)return{name:`${o}.root`,error:c.root};a.pop()}return{name:n}}var CNt=(e,r,n,i)=>{n(e);const{name:a,...o}=e;return Qo(o)||Object.keys(o).length>=Object.keys(r).length||Object.keys(o).find(l=>r[l]===(!i||xu.all))},NNt=(e,r,n)=>!e||!r||e===r||Xw(e).some(i=>i&&(n?i===r:i.startsWith(r)||r.startsWith(i))),SNt=(e,r,n,i,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(r||e):(n?i.isOnBlur:a.isOnBlur)?!e:(n?i.isOnChange:a.isOnChange)?e:!0,kNt=(e,r)=>!F7(Ut(e,r)).length&&_a(e,r),ENt=(e,r,n)=>{const i=Xw(Ut(e,n));return ei(i,"root",r[n]),ei(e,n,i),e},bk=e=>wd(e);function qee(e,r,n="validate"){if(bk(e)||Array.isArray(e)&&e.every(bk)||sd(e)&&!e)return{type:n,message:bk(e)?e:"",ref:r}}var $x=e=>ga(e)&&!rB(e)?e:{value:e,message:""},Kee=async(e,r,n,i,a,o)=>{const{ref:l,refs:c,required:u,maxLength:d,minLength:h,min:f,max:p,pattern:m,validate:A,name:g,valueAsNumber:y,mount:x}=e._f,b=Ut(n,g);if(!x||r.has(g))return{};const v=c?c[0]:l,j=T=>{a&&v.reportValidity&&(v.setCustomValidity(sd(T)?"":T||""),v.reportValidity())},_={},C=R7(l),N=Z_(l),S=C||N,E=(y||L7(l))&&Ea(l.value)&&Ea(b)||eB(l)&&l.value===""||b===""||Array.isArray(b)&&!b.length,O=rbe.bind(null,g,i,_),B=(T,F,I,D=ch.maxLength,L=ch.minLength)=>{const V=T?F:I;_[g]={type:T?D:L,message:V,ref:l,...O(T?D:L,V)}};if(o?!Array.isArray(b)||!b.length:u&&(!S&&(E||bo(b))||sd(b)&&!b||N&&!sbe(c).isValid||C&&!lbe(c).isValid)){const{value:T,message:F}=bk(u)?{value:!!u,message:u}:$x(u);if(T&&(_[g]={type:ch.required,message:F,ref:v,...O(ch.required,F)},!i))return j(F),_}if(!E&&(!bo(f)||!bo(p))){let T,F;const I=$x(p),D=$x(f);if(!bo(b)&&!isNaN(b)){const L=l.valueAsNumber||b&&+b;bo(I.value)||(T=L>I.value),bo(D.value)||(F=L<D.value)}else{const L=l.valueAsDate||new Date(b),V=$=>new Date(new Date().toDateString()+" "+$),U=l.type=="time",Q=l.type=="week";wd(I.value)&&b&&(T=U?V(b)>V(I.value):Q?b>I.value:L>new Date(I.value)),wd(D.value)&&b&&(F=U?V(b)<V(D.value):Q?b<D.value:L<new Date(D.value))}if((T||F)&&(B(!!T,I.message,D.message,ch.max,ch.min),!i))return j(_[g].message),_}if((d||h)&&!E&&(wd(b)||o&&Array.isArray(b))){const T=$x(d),F=$x(h),I=!bo(T.value)&&b.length>+T.value,D=!bo(F.value)&&b.length<+F.value;if((I||D)&&(B(I,T.message,F.message),!i))return j(_[g].message),_}if(m&&!E&&wd(b)){const{value:T,message:F}=$x(m);if(rB(T)&&!b.match(T)&&(_[g]={type:ch.pattern,message:F,ref:l,...O(ch.pattern,F)},!i))return j(F),_}if(A){if(yu(A)){const T=await A(b,n),F=qee(T,v);if(F&&(_[g]={...F,...O(ch.validate,F.message)},!i))return j(F.message),_}else if(ga(A)){let T={};for(const F in A){if(!Qo(T)&&!i)break;const I=qee(await A[F](b,n),v,F);I&&(T={...I,...O(F,I.message)},j(I.message),i&&(_[g]=T))}if(!Qo(T)&&(_[g]={ref:v,...T},!i))return _}}return j(!0),_};const BNt={mode:xu.onSubmit,reValidateMode:xu.onChange,shouldFocusError:!0};function TNt(e={}){let r={...BNt,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:yu(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},i={},a=ga(r.defaultValues)||ga(r.values)?is(r.defaultValues||r.values)||{}:{},o=r.shouldUnregister?{}:is(a),l={action:!1,mount:!1,watch:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...h};const p={array:Dee(),state:Dee()},m=r.criteriaMode===xu.all,A=J=>he=>{clearTimeout(d),d=setTimeout(J,he)},g=async J=>{if(!r.disabled&&(h.isValid||f.isValid||J)){const he=r.resolver?Qo((await N()).errors):await E(i,!0);he!==n.isValid&&p.state.next({isValid:he})}},y=(J,he)=>{!r.disabled&&(h.isValidating||h.validatingFields||f.isValidating||f.validatingFields)&&((J||Array.from(c.mount)).forEac
vendor: 12,616 bytes, line 2345
2345h(je=>{je&&(he?ei(n.validatingFields,je,he):_a(n.validatingFields,je))}),p.state.next({validatingFields:n.validatingFields,isValidating:!Qo(n.validatingFields)}))},x=(J,he=[],je,ve,Pe=!0,Ie=!0)=>{if(ve&&je&&!r.disabled){if(l.action=!0,Ie&&Array.isArray(Ut(i,J))){const ue=je(Ut(i,J),ve.argA,ve.argB);Pe&&ei(i,J,ue)}if(Ie&&Array.isArray(Ut(n.errors,J))){const ue=je(Ut(n.errors,J),ve.argA,ve.argB);Pe&&ei(n.errors,J,ue),kNt(n.errors,J)}if((h.touchedFields||f.touchedFields)&&Ie&&Array.isArray(Ut(n.touchedFields,J))){const ue=je(Ut(n.touchedFields,J),ve.argA,ve.argB);Pe&&ei(n.touchedFields,J,ue)}(h.dirtyFields||f.dirtyFields)&&(n.dirtyFields=F1(a,o)),p.state.next({name:J,isDirty:B(J,he),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ei(o,J,he)},b=(J,he)=>{ei(n.errors,J,he),p.state.next({errors:n.errors})},v=J=>{n.errors=J,p.state.next({errors:n.errors,isValid:!1})},j=(J,he,je,ve)=>{const Pe=Ut(i,J);if(Pe){const Ie=Ut(o,J,Ea(je)?Ut(a,J):je);Ea(Ie)||ve&&ve.defaultChecked||he?ei(o,J,he?Ie:$ee(Pe._f)):I(J,Ie),l.mount&&g()}},_=(J,he,je,ve,Pe)=>{let Ie=!1,ue=!1;const Se={name:J};if(!r.disabled){if(!je||ve){(h.isDirty||f.isDirty)&&(ue=n.isDirty,n.isDirty=Se.isDirty=B(),Ie=ue!==Se.isDirty);const He=fm(Ut(a,J),he);ue=!!Ut(n.dirtyFields,J),He?_a(n.dirtyFields,J):ei(n.dirtyFields,J,!0),Se.dirtyFields=n.dirtyFields,Ie=Ie||(h.dirtyFields||f.dirtyFields)&&ue!==!He}if(je){const He=Ut(n.touchedFields,J);He||(ei(n.touchedFields,J,je),Se.touchedFields=n.touchedFields,Ie=Ie||(h.touchedFields||f.touchedFields)&&He!==je)}Ie&&Pe&&p.state.next(Se)}return Ie?Se:{}},C=(J,he,je,ve)=>{const Pe=Ut(n.errors,J),Ie=(h.isValid||f.isValid)&&sd(he)&&n.isValid!==he;if(r.delayError&&je?(u=A(()=>b(J,je)),u(r.delayError)):(clearTimeout(d),u=null,je?ei(n.errors,J,je):_a(n.errors,J)),(je?!fm(Pe,je):Pe)||!Qo(ve)||Ie){const ue={...ve,...Ie&&sd(he)?{isValid:he}:{},errors:n.errors,name:J};n={...n,...ue},p.state.next(ue)}},N=async J=>{y(J,!0);const he=await r.resolver(o,r.context,wNt(J||c.mount,i,r.criteriaMode,r.shouldUseNativeValidation));return y(J),he},S=async J=>{const{errors:he}=await N(J);if(J)for(const je of J){const ve=Ut(he,je);ve?ei(n.errors,je,ve):_a(n.errors,je)}else n.errors=he;return he},E=async(J,he,je={valid:!0})=>{for(const ve in J){const Pe=J[ve];if(Pe){const{_f:Ie,...ue}=Pe;if(Ie){const Se=c.array.has(Ie.name),He=Pe._f&&jNt(Pe._f);He&&h.validatingFields&&y([ve],!0);const Qe=await Kee(Pe,c.disabled,o,m,r.shouldUseNativeValidation&&!he,Se);if(He&&h.validatingFields&&y([ve]),Qe[Ie.name]&&(je.valid=!1,he))break;!he&&(Ut(Qe,Ie.name)?Se?ENt(n.errors,Qe,Ie.name):ei(n.errors,Ie.name,Qe[Ie.name]):_a(n.errors,Ie.name))}!Qo(ue)&&await E(ue,he,je)}}return je.valid},O=()=>{for(const J of c.unMount){const he=Ut(i,J);he&&(he._f.refs?he._f.refs.every(je=>!QF(je)):!QF(he._f.ref))&&X(J)}c.unMount=new Set},B=(J,he)=>!r.disabled&&(J&&he&&ei(o,J,he),!fm($(),a)),T=(J,he,je)=>xNt(J,c,{...l.mount?o:Ea(he)?a:wd(J)?{[J]:he}:he},je,he),F=J=>F7(Ut(l.mount?o:a,J,r.shouldUnregister?Ut(a,J,[]):[])),I=(J,he,je={})=>{const ve=Ut(i,J);let Pe=he;if(ve){const Ie=ve._f;Ie&&(!Ie.disabled&&ei(o,J,obe(he,Ie)),Pe=eB(Ie.ref)&&bo(he)?"":he,nbe(Ie.ref)?[...Ie.ref.options].forEach(ue=>ue.selected=Pe.includes(ue.value)):Ie.refs?Z_(Ie.ref)?Ie.refs.forEach(ue=>{(!ue.defaultChecked||!ue.disabled)&&(Array.isArray(Pe)?ue.checked=!!Pe.find(Se=>Se===ue.value):ue.checked=Pe===ue.value||!!Pe)}):Ie.refs.forEach(ue=>ue.checked=ue.value===Pe):L7(Ie.ref)?Ie.ref.value="":(Ie.ref.value=Pe,Ie.ref.type||p.state.next({name:J,values:is(o)})))}(je.shouldDirty||je.shouldTouch)&&_(J,Pe,je.shouldTouch,je.shouldDirty,!0),je.shouldValidate&&Q(J)},D=(J,he,je)=>{for(const ve in he){if(!he.hasOwnProperty(ve))return;const Pe=he[ve],Ie=J+"."+ve,ue=Ut(i,Ie);(c.array.has(J)||ga(Pe)||ue&&!ue._f)&&!OA(Pe)?D(Ie,Pe,je):I(Ie,Pe,je)}},L=(J,he,je={})=>{const ve=Ut(i,J),Pe=c.array.has(J),Ie=is(he);ei(o,J,Ie),Pe?(p.array.next({name:J,values:is(o)}),(h.isDirty||h.dirtyFields||f.isDirty||f.dirtyFields)&&je.shouldDirty&&p.state.next({name:J,dirtyFields:F1(a,o),isDirty:B(J,Ie)})):ve&&!ve._f&&!bo(Ie)?D(J,Ie,je):I(J,Ie,je),Vee(J,c)&&p.state.next({...n,name:J}),p.state.next({name:l.mount?J:void 0,values:is(o)})},V=async J=>{l.mount=!0;const he=J.target;let je=he.name,ve=!0;const Pe=Ut(i,je),Ie=He=>{ve=Number.isNaN(He)||OA(He)&&isNaN(He.getTime())||fm(He,Ut(o,je,He))},ue=Qee(r.mode),Se=Qee(r.reValidateMode);if(Pe){let He,Qe;const ct=he.type?$ee(Pe._f):dNt(J),dt=J.type===Ree.BLUR||J.type===Ree.FOCUS_OUT,Fr=!_Nt(Pe._f)&&!r.resolver&&!Ut(n.errors,je)&&!Pe._f.deps||SNt(dt,Ut(n.touchedFields,je),n.isSubmitted,Se,ue),Xt=Vee(je,c,dt);ei(o,je,ct),dt?(Pe._f.onBlur&&Pe._f.onBlur(J),u&&u(0)):Pe._f.onChange&&Pe._f.onChange(J);const Vt=_(je,ct,dt),lr=!Qo(Vt)||Xt;if(!dt&&p.state.next({name:je,type:J.type,values:is(o)}),Fr)return(h.isValid||f.isValid)&&(r.mode==="onBlur"?dt&&g():dt||g()),lr&&p.state.next({name:je,...Xt?{}:Vt});if(!dt&&Xt&&p.state.next({...n}),r.resolver){const{errors:cr}=await N([je]);if(Ie(ct),ve){const Bt=Wee(n.errors,i,je),kr=Wee(cr,i,Bt.name||je);He=kr.error,je=kr.name,Qe=Qo(cr)}}else y([je],!0),He=(await Kee(Pe,c.disabled,o,m,r.shouldUseNativeValidation))[je],y([je]),Ie(ct),ve&&(He?Qe=!1:(h.isValid||f.isValid)&&(Qe=await E(i,!0)));ve&&(Pe._f.deps&&Q(Pe._f.deps),C(je,Qe,He,Vt))}},U=(J,he)=>{if(Ut(n.errors,he)&&J.focus)return J.focus(),1},Q=async(J,he={})=>{let je,ve;const Pe=Xw(J);if(r.resolver){const Ie=await S(Ea(J)?J:Pe);je=Qo(Ie),ve=J?!Pe.some(ue=>Ut(Ie,ue)):je}else J?(ve=(await Promise.all(Pe.map(async Ie=>{const ue=Ut(i,Ie);return await E(ue&&ue._f?{[Ie]:ue}:ue)}))).every(Boolean),!(!ve&&!n.isValid)&&g()):ve=je=await E(i);return p.state.next({...!wd(J)||(h.isValid||f.isValid)&&je!==n.isValid?{}:{name:J},...r.resolver||!J?{isValid:je}:{},errors:n.errors}),he.shouldFocus&&!ve&&Yw(i,U,J?Pe:c.mount),ve},$=J=>{const he={...l.mount?o:a};return Ea(J)?he:wd(J)?Ut(he,J):J.map(je=>Ut(he,je))},q=(J,he)=>({invalid:!!Ut((he||n).errors,J),isDirty:!!Ut((he||n).dirtyFields,J),error:Ut((he||n).errors,J),isValidating:!!Ut(n.validatingFields,J),isTouched:!!Ut((he||n).touchedFields,J)}),M=J=>{J&&Xw(J).forEach(he=>_a(n.errors,he)),p.state.next({errors:J?n.errors:{}})},z=(J,he,je)=>{const ve=(Ut(i,J,{_f:{}})._f||{}).ref,Pe=Ut(n.errors,J)||{},{ref:Ie,message:ue,type:Se,...He}=Pe;ei(n.errors,J,{...He,...he,ref:ve}),p.state.next({name:J,errors:n.errors,isValid:!1}),je&&je.shouldFocus&&ve&&ve.focus&&ve.focus()},K=(J,he)=>yu(J)?p.state.subscribe({next:je=>"values"in je&&J(T(void 0,he),je)}):T(J,he,!0),ne=J=>p.state.subscribe({next:he=>{NNt(J.name,he.name,J.exact)&&CNt(he,J.formState||h,We,J.reRenderRoot)&&J.callback({values:{...o},...n,...he,defaultValues:a})}}).unsubscribe,ie=J=>(l.mount=!0,f={...f,...J.formState},ne({...J,formState:f})),X=(J,he={})=>{for(const je of J?Xw(J):c.mount)c.mount.delete(je),c.array.delete(je),he.keepValue||(_a(i,je),_a(o,je)),!he.keepError&&_a(n.errors,je),!he.keepDirty&&_a(n.dirtyFields,je),!he.keepTouched&&_a(n.touchedFields,je),!he.keepIsValidating&&_a(n.validatingFields,je),!r.shouldUnregister&&!he.keepDefaultValue&&_a(a,je);p.state.next({values:is(o)}),p.state.next({...n,...he.keepDirty?{isDirty:B()}:{}}),!he.keepIsValid&&g()},de=({disabled:J,name:he})=>{(sd(J)&&l.mount||J||c.disabled.has(he))&&(J?c.disabled.add(he):c.disabled.delete(he))},oe=(J,he={})=>{let je=Ut(i,J);const ve=sd(he.disabled)||sd(r.disabled);return ei(i,J,{...je||{},_f:{...je&&je._f?je._f:{ref:{name:J}},name:J,mount:!0,...he}}),c.mount.add(J),je?de({disabled:sd(he.disabled)?he.disabled:r.disabled,name:J}):j(J,!0,he.value),{...ve?{disabled:he.disabled||r.disabled}:{},...r.progressive?{required:!!he.required,min:O1(he.min),max:O1(he.max),minLength:O1(he.minLength),maxLength:O1(he.maxLength),pattern:O1(he.pattern)}:{},name:J,onChange:V,onBlur:V,ref:Pe=>{if(Pe){oe(J,he),je=Ut(i,J);const Ie=Ea(Pe.value)&&Pe.querySelectorAll&&Pe.querySelectorAll("input,select,textarea")[0]||Pe,ue=yNt(Ie),Se=je._f.refs||[];if(ue?Se.find(He=>He===Ie):Ie===je._f.ref)return;ei(i,J,{_f:{...je._f,...ue?{refs:[...Se.filter(QF),Ie,...Array.isArray(Ut(a,J))?[{}]:[]],ref:{type:Ie.type,name:J}}:{ref:Ie}}}),j(J,!1,void 0,Ie)}else je=Ut(i,J,{}),je._f&&(je._f.mount=!1),(r.shouldUnregister||he.shouldUnregister)&&!(fNt(c.array,J)&&l.action)&&c.unMount.add(J)}}},ce=()=>r.shouldFocusError&&Yw(i,U,c.mount),ye=J=>{sd(J)&&(p.state.next({disabled:J}),Yw(i,(he,je)=>{const ve=Ut(i,je);ve&&(he.disabled=ve._f.disabled||J,Array.isArray(ve._f.refs)&&ve._f.refs.forEach(Pe=>{Pe.disabled=ve._f.disabled||J}))},0,!1))},ge=(J,he)=>async je=>{let ve;je&&(je.preventDefault&&je.preventDefault(),je.persist&&je.persist());let Pe=is(o);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:Ie,values:ue}=await N();n.errors=Ie,Pe=is(ue)}else await E(i);if(c.disabled.size)for(const Ie of c.disabled)_a(Pe,Ie);if(_a(n.errors,"root"),Qo(n.errors)){p.state.next({errors:{}});try{await J(Pe,je)}catch(Ie){ve=Ie}}else he&&await he({...n.errors},je),ce(),setTimeout(ce);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Qo(n.errors)&&!ve,submitCount:n.submitCount+1,errors:n.errors}),ve)throw ve},Be=(J,he={})=>{Ut(i,J)&&(Ea(he.defaultValue)?L(J,is(Ut(a,J))):(L(J,he.defaultValue),ei(a,J,is(he.defaultValue))),he.keepTouched||_a(n.touchedFields,J),he.keepDirty||(_a(n.dirtyFields,J),n.isDirty=he.defaultValue?B(J,is(Ut(a,J))):B()),he.keepError||(_a(n.errors,J),h.isValid&&g()),p.state.next({...n}))},Ve=(J,he={})=>{const je=J?is(J):a,ve=is(je),Pe=Qo(J),Ie=Pe?a:ve;if(he.keepDefaultValues||(a=je),!he.keepValues){if(he.keepDirtyValues){const ue=new Set([...c.mount,...Object.keys(F1(a,o))]);for(const Se of Array.from(ue))Ut(n.dirtyFields,Se)?ei(Ie,Se,Ut(o,Se)):L(Se,Ut(Ie,Se))}else{if(I7&&Ea(J))for(const ue of c.mount){const Se=Ut(i,ue);if(Se&&Se._f){const He=Array.isArray(Se._f.refs)?Se._f.refs[0]:Se._f.ref;if(eB(He)){const Qe=He.closest("form");if(Qe){Qe.reset();break}}}}if(he.keepFieldsRef)for(const ue of c.mount)L(ue,Ut(Ie,ue));else i={}}o=r.shouldUnregister?he.keepDefaultValues?is(a):{}:is(Ie),p.array.next({values:{...Ie}}),p.state.next({values:{...Ie}})}c={mount:he.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!h.isValid||!!he.keepIsValid||!!he.keepDirtyValues,l.watch=!!r.shouldUnregister,p.state.next({submitCount:he.keepSubmitCount?n.submitCount:0,isDirty:Pe?!1:he.keepDirty?n.isDirty:!!(he.keepDefaultValues&&!fm(J,a)),isSubmitted:he.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Pe?{}:he.keepDirtyValues?he.keepDefaultValues&&o?F1(a,o):n.dirtyFields:he.keepDefaultValues&&J?F1(a,J):he.keepDirty?n.dirtyFields:{},touchedFields:he.keepTouched?n.touchedFields:{},errors:he.keepErrors?n.errors:{},isSubmitSuccessful:he.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},te=(J,he)=>Ve(yu(J)?J(o):J,he),xe=(J,he={})=>{const je=Ut(i,J),ve=je&&je._f;if(ve){const Pe=ve.refs?ve.refs[0]:ve.ref;Pe.focus&&(Pe.focus(),he.shouldSelect&&yu(Pe.select)&&Pe.select())}},We=J=>{n={...n,...J}},we={control:{register:oe,unregister:X,getFieldState:q,handleSubmit:ge,setError:z,_subscribe:ne,_runSchema:N,_focusError:ce,_getWatch:T,_getDirty:B,_setValid:g,_setFieldArray:x,_setDisabledField:de,_setErrors:v,_getFieldArray:F,_reset:Ve,_resetDefaultValues:()=>yu(r.defaultValues)&&r.defaultValues().then(J=>{te(J,r.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:O,_disableForm:ye,_subjects:p,_proxyFormState:h,get _fields(){return i},get _formValues(){return o},get _state(){return l},set _state(J){l=J},get _defaultValues(){return a},get _names(){return c},set _names(J){c=J},get _formState(){return n},get _options(){return r},set _options(J){r={...r,...J}}},subscribe:ie,trigger:Q,register:oe,handleSubmit:ge,watch:K,setValue:L,getValues:$,reset:te,resetField:Be,clearErrors:M,unregister:X,setError:z,setFocus:xe,getFieldState:q};return{...we,formControl:we}}function PNt(e={}){const r=ee.useRef(void 0),n=ee.useRef(void 0),[i,a]=ee.useState({isDirty:!1,isValidating:!1,isLoading:yu(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:yu(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:i},e.defaultValues&&!yu(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=TNt(e);r.current={...c,formState:i}}const o=r.current.control;return o._options=e,gNt(()=>{const l=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState}
2345),reRenderRoot:!0});return a(c=>({...c,isReady:!0})),o._formState.isReady=!0,l},[o]),ee.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),ee.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),ee.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),ee.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),ee.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==i.isDirty&&o._subjects.state.next({isDirty:l})}},[o,i.isDirty]),ee.useEffect(()=>{e.values&&!fm(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),n.current=e.values,a(l=>({...l}))):o._resetDefaultValues()},[o,e.values]),ee.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),r.current.formState=ANt(i,o),r.current}var _n;(function(e){e.assertEqual=a=>{};function r(a){}e.assertIs=r;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const o={};for(const l of a)o[l]=l;return o},e.getValidEnumValues=a=>{const o=e.objectKeys(a).filter(c=>typeof a[a[c]]!="number"),l={};for(const c of o)l[c]=a[c];return e.objectValues(l)},e.objectValues=a=>e.objectKeys(a).map(function(o){return a[o]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const o=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&o.push(l);return o},e.find=(a,o)=>{for(const l of a)if(o(l))return l},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function i(a,o=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(o)}e.joinValues=i,e.jsonStringifyReplacer=(a,o)=>typeof o=="bigint"?o.toString():o})(_n||(_n={}));var Gee;(function(e){e.mergeShapes=(r,n)=>({...r,...n})})(Gee||(Gee={}));const Kt=_n.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),sm=e=>{switch(typeof e){case"undefined":return Kt.undefined;case"string":return Kt.string;case"number":return Number.isNaN(e)?Kt.nan:Kt.number;case"boolean":return Kt.boolean;case"function":return Kt.function;case"bigint":return Kt.bigint;case"symbol":return Kt.symbol;case"object":return Array.isArray(e)?Kt.array:e===null?Kt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Kt.promise:typeof Map<"u"&&e instanceof Map?Kt.map:typeof Set<"u"&&e instanceof Set?Kt.set:typeof Date<"u"&&e instanceof Date?Kt.date:Kt.object;default:return Kt.unknown}}
vendor: 6,933 bytes, line 2345
2345,yt=_n.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class cf extends Error{get errors(){return this.issues}constructor(r){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=r}format(r){const n=r||function(o){return o.message},i={_errors:[]},a=o=>{for(const l of o.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)i._errors.push(n(l));else{let c=i,u=0;for(;u<l.path.length;){const d=l.path[u];u===l.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(n(l))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}};return a(this),i}static assert(r){if(!(r instanceof cf))throw new Error(`Not a ZodError: ${r}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,_n.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(r=n=>n.message){const n={},i=[];for(const a of this.issues)if(a.path.length>0){const o=a.path[0];n[o]=n[o]||[],n[o].push(r(a))}else i.push(r(a));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}cf.create=e=>new cf(e);const bz=(e,r)=>{let n;switch(e.code){case yt.invalid_type:e.received===Kt.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case yt.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,_n.jsonStringifyReplacer)}`;break;case yt.unrecognized_keys:n=`Unrecognized key(s) in object: ${_n.joinValues(e.keys,", ")}`;break;case yt.invalid_union:n="Invalid input";break;case yt.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${_n.joinValues(e.options)}`;break;case yt.invalid_enum_value:n=`Invalid enum value. Expected ${_n.joinValues(e.options)}, received '${e.received}'`;break;case yt.invalid_arguments:n="Invalid function arguments";break;case yt.invalid_return_type:n="Invalid function return type";break;case yt.invalid_date:n="Invalid date";break;case yt.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:_n.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case yt.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case yt.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case yt.custom:n="Invalid input";break;case yt.invalid_intersection_types:n="Intersection results could not be merged";break;case yt.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case yt.not_finite:n="Number must be finite";break;default:n=r.defaultError,_n.assertNever(e)}return{message:n}};let INt=bz;function FNt(){return INt}const ONt=e=>{const{data:r,path:n,errorMaps:i,issueData:a}=e,o=[...n,...a.path||[]],l={...a,path:o};if(a.message!==void 0)return{...a,path:o,message:a.message};let c="";const u=i.filter(d=>!!d).slice().reverse();for(const d of u)c=d(l,{data:r,defaultError:c}).message;return{...a,path:o,message:c}};function Et(e,r){const n=FNt(),i=ONt({issueData:r,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===bz?void 0:bz].filter(a=>!!a)});e.common.issues.push(i)}class Gl{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(r,n){const i=[];for(const a of n){if(a.status==="aborted")return Pr;a.status==="dirty"&&r.dirty(),i.push(a.value)}return{status:r.value,value:i}}static async mergeObjectAsync(r,n){const i=[];for(const a of n){const o=await a.key,l=await a.value;i.push({key:o,value:l})}return Gl.mergeObjectSync(r,i)}static mergeObjectSync(r,n){const i={};for(const a of n){const{key:o,value:l}=a;if(o.status==="aborted"||l.status==="aborted")return Pr;o.status==="dirty"&&r.dirty(),l.status==="dirty"&&r.dirty(),o.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(i[o.value]=l.value)}return{status:r.value,value:i}}}const Pr=Object.freeze({status:"aborted"}),cw=e=>({status:"dirty",value:e}),Vc=e=>({status:"valid",value:e}),Xee=e=>e.status==="aborted",Yee=e=>e.status==="dirty",y0=e=>e.status==="valid",nB=e=>typeof Promise<"u"&&e instanceof Promise;var Zt;(function(e){e.errToObj=r=>typeof r=="string"?{message:r}:r||{},e.toString=r=>typeof r=="string"?r:r==null?void 0:r.message})(Zt||(Zt={}));class pp{constructor(r,n,i,a){this._cachedPath=[],this.parent=r,this.data=n,this._path=i,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Jee=(e,r)=>{if(y0(r))return{success:!0,data:r.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new cf(e.common.issues);return this._error=n,this._error}}};function Jr(e){if(!e)return{};
vendor: 4,380 bytes, line 2345
2345const{errorMap:r,invalid_type_error:n,required_error:i,description:a}=e;if(r&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return r?{errorMap:r,description:a}:{errorMap:(l,c)=>{const{message:u}=e;return l.code==="invalid_enum_value"?{message:u??c.defaultError}:typeof c.data>"u"?{message:u??i??c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:u??n??c.defaultError}},description:a}}class jn{get description(){return this._def.description}_getType(r){return sm(r.data)}_getOrReturnCtx(r,n){return n||{common:r.parent.common,data:r.data,parsedType:sm(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}_processInputParams(r){return{status:new Gl,ctx:{common:r.parent.common,data:r.data,parsedType:sm(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}}_parseSync(r){const n=this._parse(r);if(nB(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(r){const n=this._parse(r);return Promise.resolve(n)}parse(r,n){const i=this.safeParse(r,n);if(i.success)return i.data;throw i.error}safeParse(r,n){const i={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:sm(r)},a=this._parseSync({data:r,path:i.path,parent:i});return Jee(i,a)}"~validate"(r){var i,a;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:sm(r)};if(!this["~standard"].async)try{const o=this._parseSync({data:r,path:[],parent:n});return y0(o)?{value:o.value}:{issues:n.common.issues}}catch(o){(a=(i=o==null?void 0:o.message)==null?void 0:i.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:r,path:[],parent:n}).then(o=>y0(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(r,n){const i=await this.safeParseAsync(r,n);if(i.success)return i.data;throw i.error}async safeParseAsync(r,n){const i={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:sm(r)},a=this._parse({data:r,path:i.path,parent:i}),o=await(nB(a)?a:Promise.resolve(a));return Jee(i,o)}refine(r,n){const i=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,o)=>{const l=r(a),c=()=>o.addIssue({code:yt.custom,...i(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(u=>u?!0:(c(),!1)):l?!0:(c(),!1)})}refinement(r,n){return this._refinement((i,a)=>r(i)?!0:(a.addIssue(typeof n=="function"?n(i,a):n),!1))}_refinement(r){return new b0({schema:this,typeName:Ir.ZodEffects,effect:{type:"refinement",refinement:r}})}superRefine(r){return this._refinement(r)}constructor(r){this.spa=this.safeParseAsync,this._def=r,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Zm.create(this,this._def)}nullable(){return w0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Td.create(this)}promise(){return oB.create(this,this._def)}or(r){return aB.create([this,r],this._def)}and(r){return sB.create(this,r,this._def)}transform(r){return new b0({...Jr(this._def),schema:this,typeName:Ir.ZodEffects,effect:{type:"transform",transform:r}}
vendor: 4,338 bytes, line 2345
2345)}default(r){const n=typeof r=="function"?r:()=>r;return new jz({...Jr(this._def),innerType:this,defaultValue:n,typeName:Ir.ZodDefault})}brand(){return new iSt({typeName:Ir.ZodBranded,type:this,...Jr(this._def)})}catch(r){const n=typeof r=="function"?r:()=>r;return new _z({...Jr(this._def),innerType:this,catchValue:n,typeName:Ir.ZodCatch})}describe(r){const n=this.constructor;return new n({...this._def,description:r})}pipe(r){return D7.create(this,r)}readonly(){return Cz.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const LNt=/^c[^\s-]{8,}$/i,RNt=/^[0-9a-z]+$/,DNt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,MNt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zNt=/^[a-z0-9_-]{21}$/i,UNt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$Nt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,QNt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,HNt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let HF;const VNt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,WNt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,qNt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,KNt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,GNt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,XNt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,cbe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",YNt=new RegExp(`^${cbe}$`);function ube(e){let r="[0-5]\\d";e.precision?r=`${r}\\.\\d{${e.precision}}`:e.precision==null&&(r=`${r}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${r})${n}`}function JNt(e){return new RegExp(`^${ube(e)}$`)}function ZNt(e){let r=`${cbe}T${ube(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),r=`${r}(${n.join("|")})`,new RegExp(`^${r}$`)}function eSt(e,r){return!!((r==="v4"||!r)&&VNt.test(e)||(r==="v6"||!r)&&qNt.test(e))}function tSt(e,r){if(!UNt.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(i));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||r&&a.alg!==r)}catch{return!1}}function rSt(e,r){return!!((r==="v4"||!r)&&WNt.test(e)||(r==="v6"||!r)&&KNt.test(e))}class Im extends jn{_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==Kt.string){const o=this._getOrReturnCtx(r);
vendor: 17,150 bytes, line 2345
2345return Et(o,{code:yt.invalid_type,expected:Kt.string,received:o.parsedType}),Pr}const i=new Gl;let a;for(const o of this._def.checks)if(o.kind==="min")r.data.length<o.value&&(a=this._getOrReturnCtx(r,a),Et(a,{code:yt.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")r.data.length>o.value&&(a=this._getOrReturnCtx(r,a),Et(a,{code:yt.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){const l=r.data.length>o.value,c=r.data.length<o.value;(l||c)&&(a=this._getOrReturnCtx(r,a),l?Et(a,{code:yt.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):c&&Et(a,{code:yt.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if(o.kind==="email")QNt.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"email",code:yt.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")HF||(HF=new RegExp(HNt,"u")),HF.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"emoji",code:yt.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")MNt.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"uuid",code:yt.invalid_string,message:o.message}),i.dirty());else if(o.kind==="nanoid")zNt.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"nanoid",code:yt.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")LNt.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"cuid",code:yt.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")RNt.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"cuid2",code:yt.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")DNt.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"ulid",code:yt.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(r.data)}catch{a=this._getOrReturnCtx(r,a),Et(a,{validation:"url",code:yt.invalid_string,message:o.message}),i.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"regex",code:yt.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?r.data=r.data.trim():o.kind==="includes"?r.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(r,a),Et(a,{code:yt.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?r.data=r.data.toLowerCase():o.kind==="toUpperCase"?r.data=r.data.toUpperCase():o.kind==="startsWith"?r.data.startsWith(o.value)||(a=this._getOrReturnCtx(r,a),Et(a,{code:yt.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?r.data.endsWith(o.value)||(a=this._getOrReturnCtx(r,a),Et(a,{code:yt.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?ZNt(o).test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{code:yt.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="date"?YNt.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{code:yt.invalid_string,validation:"date",message:o.message}),i.dirty()):o.kind==="time"?JNt(o).test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{code:yt.invalid_string,validation:"time",message:o.message}),i.dirty()):o.kind==="duration"?$Nt.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"duration",code:yt.invalid_string,message:o.message}),i.dirty()):o.kind==="ip"?eSt(r.data,o.version)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"ip",code:yt.invalid_string,message:o.message}),i.dirty()):o.kind==="jwt"?tSt(r.data,o.alg)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"jwt",code:yt.invalid_string,message:o.message}),i.dirty()):o.kind==="cidr"?rSt(r.data,o.version)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"cidr",code:yt.invalid_string,message:o.message}),i.dirty()):o.kind==="base64"?GNt.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"base64",code:yt.invalid_string,message:o.message}),i.dirty()):o.kind==="base64url"?XNt.test(r.data)||(a=this._getOrReturnCtx(r,a),Et(a,{validation:"base64url",code:yt.invalid_string,message:o.message}),i.dirty()):_n.assertNever(o);return{status:i.value,value:r.data}}_regex(r,n,i){return this.refinement(a=>r.test(a),{validation:n,code:yt.invalid_string,...Zt.errToObj(i)})}_addCheck(r){return new Im({...this._def,checks:[...this._def.checks,r]})}email(r){return this._addCheck({kind:"email",...Zt.errToObj(r)})}url(r){return this._addCheck({kind:"url",...Zt.errToObj(r)})}emoji(r){return this._addCheck({kind:"emoji",...Zt.errToObj(r)})}uuid(r){return this._addCheck({kind:"uuid",...Zt.errToObj(r)})}nanoid(r){return this._addCheck({kind:"nanoid",...Zt.errToObj(r)})}cuid(r){return this._addCheck({kind:"cuid",...Zt.errToObj(r)})}cuid2(r){return this._addCheck({kind:"cuid2",...Zt.errToObj(r)})}ulid(r){return this._addCheck({kind:"ulid",...Zt.errToObj(r)})}base64(r){return this._addCheck({kind:"base64",...Zt.errToObj(r)})}base64url(r){return this._addCheck({kind:"base64url",...Zt.errToObj(r)})}jwt(r){return this._addCheck({kind:"jwt",...Zt.errToObj(r)})}ip(r){return this._addCheck({kind:"ip",...Zt.errToObj(r)})}cidr(r){return this._addCheck({kind:"cidr",...Zt.errToObj(r)})}datetime(r){return typeof r=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:r}):this._addCheck({kind:"datetime",precision:typeof(r==null?void 0:r.precision)>"u"?null:r==null?void 0:r.precision,offset:(r==null?void 0:r.offset)??!1,local:(r==null?void 0:r.local)??!1,...Zt.errToObj(r==null?void 0:r.message)})}date(r){return this._addCheck({kind:"date",message:r})}time(r){return typeof r=="string"?this._addCheck({kind:"time",precision:null,message:r}):this._addCheck({kind:"time",precision:typeof(r==null?void 0:r.precision)>"u"?null:r==null?void 0:r.precision,...Zt.errToObj(r==null?void 0:r.message)})}duration(r){return this._addCheck({kind:"duration",...Zt.errToObj(r)})}regex(r,n){return this._addCheck({kind:"regex",regex:r,...Zt.errToObj(n)})}includes(r,n){return this._addCheck({kind:"includes",value:r,position:n==null?void 0:n.position,...Zt.errToObj(n==null?void 0:n.message)})}startsWith(r,n){return this._addCheck({kind:"startsWith",value:r,...Zt.errToObj(n)})}endsWith(r,n){return this._addCheck({kind:"endsWith",value:r,...Zt.errToObj(n)})}min(r,n){return this._addCheck({kind:"min",value:r,...Zt.errToObj(n)})}max(r,n){return this._addCheck({kind:"max",value:r,...Zt.errToObj(n)})}length(r,n){return this._addCheck({kind:"length",value:r,...Zt.errToObj(n)})}nonempty(r){return this.min(1,Zt.errToObj(r))}trim(){return new Im({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Im({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Im({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(r=>r.kind==="datetime")}get isDate(){return!!this._def.checks.find(r=>r.kind==="date")}get isTime(){return!!this._def.checks.find(r=>r.kind==="time")}get isDuration(){return!!this._def.checks.find(r=>r.kind==="duration")}get isEmail(){return!!this._def.checks.find(r=>r.kind==="email")}get isURL(){return!!this._def.checks.find(r=>r.kind==="url")}get isEmoji(){return!!this._def.checks.find(r=>r.kind==="emoji")}get isUUID(){return!!this._def.checks.find(r=>r.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(r=>r.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(r=>r.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(r=>r.kind==="cuid2")}get isULID(){return!!this._def.checks.find(r=>r.kind==="ulid")}get isIP(){return!!this._def.checks.find(r=>r.kind==="ip")}get isCIDR(){return!!this._def.checks.find(r=>r.kind==="cidr")}get isBase64(){return!!this._def.checks.find(r=>r.kind==="base64")}get isBase64url(){return!!this._def.checks.find(r=>r.kind==="base64url")}get minLength(){let r=null;for(const n of this._def.checks)n.kind==="min"&&(r===null||n.value>r)&&(r=n.value);return r}get maxLength(){let r=null;for(const n of this._def.checks)n.kind==="max"&&(r===null||n.value<r)&&(r=n.value);return r}}Im.create=e=>new Im({checks:[],typeName:Ir.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Jr(e)});function nSt(e,r){const n=(e.toString().split(".")[1]||"").length,i=(r.toString().split(".")[1]||"").length,a=n>i?n:i,o=Number.parseInt(e.toFixed(a).replace(".","")),l=Number.parseInt(r.toFixed(a).replace(".",""));return o%l/10**a}class Qj extends jn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(r){if(this._def.coerce&&(r.data=Number(r.data)),this._getType(r)!==Kt.number){const o=this._getOrReturnCtx(r);return Et(o,{code:yt.invalid_type,expected:Kt.number,received:o.parsedType}),Pr}let i;const a=new Gl;for(const o of this._def.checks)o.kind==="int"?_n.isInteger(r.data)||(i=this._getOrReturnCtx(r,i),Et(i,{code:yt.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?r.data<o.value:r.data<=o.value)&&(i=this._getOrReturnCtx(r,i),Et(i,{code:yt.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?r.data>o.value:r.data>=o.value)&&(i=this._getOrReturnCtx(r,i),Et(i,{code:yt.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?nSt(r.data,o.value)!==0&&(i=this._getOrReturnCtx(r,i),Et(i,{code:yt.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(r.data)||(i=this._getOrReturnCtx(r,i),Et(i,{code:yt.not_finite,message:o.message}),a.dirty()):_n.assertNever(o);return{status:a.value,value:r.data}}gte(r,n){return this.setLimit("min",r,!0,Zt.toString(n))}gt(r,n){return this.setLimit("min",r,!1,Zt.toString(n))}lte(r,n){return this.setLimit("max",r,!0,Zt.toString(n))}lt(r,n){return this.setLimit("max",r,!1,Zt.toString(n))}setLimit(r,n,i,a){return new Qj({...this._def,checks:[...this._def.checks,{kind:r,value:n,inclusive:i,message:Zt.toString(a)}]})}_addCheck(r){return new Qj({...this._def,checks:[...this._def.checks,r]})}int(r){return this._addCheck({kind:"int",message:Zt.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Zt.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Zt.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Zt.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Zt.toString(r)})}multipleOf(r,n){return this._addCheck({kind:"multipleOf",value:r,message:Zt.toString(n)})}finite(r){return this._addCheck({kind:"finite",message:Zt.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Zt.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Zt.toString(r)})}get minValue(){let r=null;for(const n of this._def.checks)n.kind==="min"&&(r===null||n.value>r)&&(r=n.value);return r}get maxValue(){let r=null;for(const n of this._def.checks)n.kind==="max"&&(r===null||n.value<r)&&(r=n.value);return r}get isInt(){return!!this._def.checks.find(r=>r.kind==="int"||r.kind==="multipleOf"&&_n.isInteger(r.value))}get isFinite(){let r=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(r===null||i.value<r)&&(r=i.value)}return Number.isFinite(n)&&Number.isFinite(r)}}Qj.create=e=>new Qj({checks:[],typeName:Ir.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Jr(e)});class Hj extends jn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(r){if(this._def.coerce)try{r.data=BigInt(r.data)}catch{return this._getInvalidInput(r)}if(this._getType(r)!==Kt.bigint)return this._getInvalidInput(r);let i;const a=new Gl;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?r.data<o.value:r.data<=o.value)&&(i=this._getOrReturnCtx(r,i),Et(i,{code:yt.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?r.data>o.value:r.data>=o.value)&&(i=this._getOrReturnCtx(r,i),Et(i,{code:yt.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="multipleOf"?r.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(r,i),Et(i,{code:yt.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):_n.assertNever(o);return{status:a.value,value:r.data}}_getInvalidInput(r){const n=this._getOrReturnCtx(r);return Et(n,{code:yt.invalid_type,expected:Kt.bigint,received:n.parsedType}),Pr}gte(r,n){return this.setLimit("min",r,!0,Zt.toString(n))}gt(r,n){return this.setLimit("min",r,!1,Zt.toString(n))}lte(r,n){return this.setLimit("max",r,!0,Zt.toString(n))}lt(r,n){return this.setLimit("max",r,!1,Zt.toString(n))}setLimit(r,n,i,a){return new Hj({...this._def,checks:[...this._def.checks,{kind:r,value:n,inclusive:i,message:Zt.toString(a)}]})}_addCheck(r){return new Hj({...this._def,checks:[...this._def.checks,r]})}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Zt.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Zt.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Zt.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Zt.toString(r)})}multipleOf(r,n){return this._addCheck({kind:"multipleOf",value:r,message:Zt.toString(n)})}get minValue(){let r=null;for(const n of this._def.checks)n.kind==="min"&&(r===null||n.value>r)&&(r=n.value);return r}get maxValue(){let r=null;for(const n of this._def.checks)n.kind==="max"&&(r===null||n.value<r)&&(r=n.value);return r}}Hj.create=e=>new Hj({checks:[],typeName:Ir.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Jr(e)});class Zee extends jn{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==Kt.boolean){const i=this._getOrReturnCtx(r);return Et(i,{code:yt.invalid_type,expected:Kt.boolean,received:i.parsedType}),Pr}return Vc(r.data)}}Zee.create=e=>new Zee({typeName:Ir.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Jr(e)});class iB extends jn{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==Kt.date){const o=this._getOrReturnCtx(r);return Et(o,{code:yt.invalid_type,expected:Kt.date,received:o.parsedType}),Pr}if(Number.isNaN(r.data.getTime())){const o=this._getOrReturnCtx(r);return Et(o,{code:yt.invalid_date}),Pr}const i=new Gl;let a;for(const o of this._def.checks)o.kind==="min"?r.data.getTime()<o.value&&(a=this._getOrReturnCtx(r,a),Et(a,{code:yt.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?r.data.getTime()>o.value&&(a=this._getOrReturnCtx(r,a),Et(a,{code:yt.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):_n.assertNever(o);return{status:i.value,value:new Date(r.data.getTime())}}_addCheck(r){return new iB({...this._def,checks:[...this._def.checks,r]})}min(r,n){return this._addCheck({kind:"min",value:r.getTime(),message:Zt.toString(n)})}max(r,n){return this._addCheck({kind:"max",value:r.getTime(),message:Zt.toString(n)})}get minDate(){let r=null;for(const n of this._def.checks)n.kind==="min"&&(r===null||n.value>r)&&(r=n.value);return r!=null?new Date(r):null}get maxDate(){let r=null;for(const n of this._def.checks)n.kind==="max"&&(r===null||n.value<r)&&(r=n.value);return r!=null?new Date(r):null}}iB.create=e=>new iB({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ir.ZodDate,...Jr(e)});class ete extends jn{_parse(r){if(this._getType(r)!==Kt.symbol){const i=this._getOrReturnCtx(r);return Et(i,{code:yt.invalid_type,expected:Kt.symbol,received:i.parsedType}),Pr}return Vc(r.data)}}ete.create=e=>new ete({typeName:Ir.ZodSymbol,...Jr(e)});class tte extends jn{_parse(r){if(this._getType(r)!==Kt.undefined){const i=this._getOrReturnCtx(r);return Et(i,{code:yt.invalid_type,expected:Kt.undefined,received:i.parsedType}),Pr}return Vc(r.data)}}tte.create=e=>new tte({typeName:Ir.ZodUndefined,...Jr(e)});class rte extends jn{_parse(r){if(this._getType(r)!==Kt.null){const i=this._getOrReturnCtx(r);return Et(i,{code:yt.invalid_type,expected:Kt.null,received:i.parsedType}),Pr}return Vc(r.data)}}rte.create=e=>new rte({typeName:Ir.ZodNull,...Jr(e)});class nte extends jn{constructor(){super(...arguments),this._any=!0}_parse(r){return Vc(r.data)}}nte.create=e=>new nte({typeName:Ir.ZodAny,...Jr(e)});class ite extends jn{constructor(){super(...arguments),this._unknown=!0}_parse(r){return Vc(r.data)}}ite.create=e=>new ite({typeName:Ir.ZodUnknown,...Jr(e)});class Ap extends jn{_parse(r){const n=this._getOrReturnCtx(r);return Et(n,{code:yt.invalid_type,expected:Kt.never,received:n.parsedType}),Pr}}Ap.create=e=>new Ap({typeName:Ir.ZodNever,...Jr(e)});class ate extends jn{_parse(r){if(this._getType(r)!==Kt.undefined){const i=this._getOrReturnCtx(r);
vendor: 5,189 bytes, line 2345
2345return Et(i,{code:yt.invalid_type,expected:Kt.void,received:i.parsedType}),Pr}return Vc(r.data)}}ate.create=e=>new ate({typeName:Ir.ZodVoid,...Jr(e)});class Td extends jn{_parse(r){const{ctx:n,status:i}=this._processInputParams(r),a=this._def;if(n.parsedType!==Kt.array)return Et(n,{code:yt.invalid_type,expected:Kt.array,received:n.parsedType}),Pr;if(a.exactLength!==null){const l=n.data.length>a.exactLength.value,c=n.data.length<a.exactLength.value;(l||c)&&(Et(n,{code:l?yt.too_big:yt.too_small,minimum:c?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),i.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(Et(n,{code:yt.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),i.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(Et(n,{code:yt.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((l,c)=>a.type._parseAsync(new pp(n,l,n.path,c)))).then(l=>Gl.mergeArray(i,l));const o=[...n.data].map((l,c)=>a.type._parseSync(new pp(n,l,n.path,c)));return Gl.mergeArray(i,o)}get element(){return this._def.type}min(r,n){return new Td({...this._def,minLength:{value:r,message:Zt.toString(n)}})}max(r,n){return new Td({...this._def,maxLength:{value:r,message:Zt.toString(n)}})}length(r,n){return new Td({...this._def,exactLength:{value:r,message:Zt.toString(n)}})}nonempty(r){return this.min(1,r)}}Td.create=(e,r)=>new Td({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ir.ZodArray,...Jr(r)});function sy(e){if(e instanceof ia){const r={};for(const n in e.shape){const i=e.shape[n];r[n]=Zm.create(sy(i))}return new ia({...e._def,shape:()=>r})}else return e instanceof Td?new Td({...e._def,type:sy(e.element)}):e instanceof Zm?Zm.create(sy(e.unwrap())):e instanceof w0?w0.create(sy(e.unwrap())):e instanceof Tg?Tg.create(e.items.map(r=>sy(r))):e}class ia extends jn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const r=this._def.shape(),n=_n.objectKeys(r);return this._cached={shape:r,keys:n},this._cached}_parse(r){if(this._getType(r)!==Kt.object){const d=this._getOrReturnCtx(r);return Et(d,{code:yt.invalid_type,expected:Kt.object,received:d.parsedType}),Pr}const{status:i,ctx:a}=this._processInputParams(r),{shape:o,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof Ap&&this._def.unknownKeys==="strip"))for(const d in a.data)l.includes(d)||c.push(d);const u=[];for(const d of l){const h=o[d],f=a.data[d];u.push({key:{status:"valid",value:d},value:h._parse(new pp(a,f,a.path,d)),alwaysSet:d in a.data})}if(this._def.catchall instanceof Ap){const d=this._def.unknownKeys;if(d==="passthrough")for(const h of c)u.push({key:{status:"valid",value:h},value:{status:"valid",value:a.data[h]}});else if(d==="strict")c.length>0&&(Et(a,{code:yt.unrecognized_keys,keys:c}),i.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const h of c){const f=a.data[h];u.push({key:{status:"valid",value:h},value:d._parse(new pp(a,f,a.path,h)),alwaysSet:h in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const d=[];for(const h of u){const f=await h.key,p=await h.value;d.push({key:f,value:p,alwaysSet:h.alwaysSet})}return d}).then(d=>Gl.mergeObjectSync(i,d)):Gl.mergeObjectSync(i,u)}get shape(){return this._def.shape()}strict(r){return Zt.errToObj,new ia({...this._def,unknownKeys:"strict",...r!==void 0?{errorMap:(n,i)=>{var o,l;const a=((l=(o=this._def).errorMap)==null?void 0:l.call(o,n,i).message)??i.defaultError;return n.code==="unrecognized_keys"?{message:Zt.errToObj(r).message??a}:{message:a}}}:{}})}strip(){return new ia({...this._def,unknownKeys:"strip"})}passthrough(){return new ia({...this._def,unknownKeys:"passthrough"})}extend(r){return new ia({...this._def,shape:()=>({...this._def.shape(),...r})})}merge(r){return new ia({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>({...this._def.shape(),...r._def.shape()}),typeName:Ir.ZodObject})}setKey(r,n){return this.augment({[r]:n})}catchall(r){return new ia({...this._def,catchall:r})}pick(r){const n={};for(const i of _n.objectKeys(r))r[i]&&this.shape[i]&&(n[i]=this.shape[i]);return new ia({...this._def,shape:()=>n})}omit(r){const n={};for(const i of _n.objectKeys(this.shape))r[i]||(n[i]=this.shape[i]);return new ia({...this._def,shape:()=>n})}deepPartial(){return sy(this)}partial(r){const n={};for(const i of _n.objectKeys(this.shape)){const a=this.shape[i];r&&!r[i]?n[i]=a:n[i]=a.optional()}return new ia({...this._def,shape:()=>n})}required(r){const n={};for(const i of _n.objectKeys(this.shape))if(r&&!r[i])n[i]=this.shape[i];else{let o=this.shape[i];for(;o instanceof Zm;)o=o._def.innerType;n[i]=o}return new ia({...this._def,shape:()=>n})}keyof(){return dbe(_n.objectKeys(this.shape))}}ia.create=(e,r)=>new ia({shape:()=>e,unknownKeys:"strip",catchall:Ap.create(),typeName:Ir.ZodObject,...Jr(r)});
vendor: 4,674 bytes, line 2345
2345ia.strictCreate=(e,r)=>new ia({shape:()=>e,unknownKeys:"strict",catchall:Ap.create(),typeName:Ir.ZodObject,...Jr(r)});ia.lazycreate=(e,r)=>new ia({shape:e,unknownKeys:"strip",catchall:Ap.create(),typeName:Ir.ZodObject,...Jr(r)});class aB extends jn{_parse(r){const{ctx:n}=this._processInputParams(r),i=this._def.options;function a(o){for(const c of o)if(c.result.status==="valid")return c.result;for(const c of o)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;const l=o.map(c=>new cf(c.ctx.common.issues));return Et(n,{code:yt.invalid_union,unionErrors:l}),Pr}if(n.common.async)return Promise.all(i.map(async o=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(a);{let o;const l=[];for(const u of i){const d={...n,common:{...n.common,issues:[]},parent:null},h=u._parseSync({data:n.data,path:n.path,parent:d});if(h.status==="valid")return h;h.status==="dirty"&&!o&&(o={result:h,ctx:d}),d.common.issues.length&&l.push(d.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const c=l.map(u=>new cf(u));return Et(n,{code:yt.invalid_union,unionErrors:c}),Pr}}get options(){return this._def.options}}aB.create=(e,r)=>new aB({options:e,typeName:Ir.ZodUnion,...Jr(r)});function wz(e,r){const n=sm(e),i=sm(r);if(e===r)return{valid:!0,data:e};if(n===Kt.object&&i===Kt.object){const a=_n.objectKeys(r),o=_n.objectKeys(e).filter(c=>a.indexOf(c)!==-1),l={...e,...r};for(const c of o){const u=wz(e[c],r[c]);if(!u.valid)return{valid:!1};l[c]=u.data}return{valid:!0,data:l}}else if(n===Kt.array&&i===Kt.array){if(e.length!==r.length)return{valid:!1};const a=[];for(let o=0;o<e.length;o++){const l=e[o],c=r[o],u=wz(l,c);if(!u.valid)return{valid:!1};a.push(u.data)}return{valid:!0,data:a}}else return n===Kt.date&&i===Kt.date&&+e==+r?{valid:!0,data:e}:{valid:!1}}class sB extends jn{_parse(r){const{status:n,ctx:i}=this._processInputParams(r),a=(o,l)=>{if(Xee(o)||Xee(l))return Pr;const c=wz(o.value,l.value);return c.valid?((Yee(o)||Yee(l))&&n.dirty(),{status:n.value,value:c.data}):(Et(i,{code:yt.invalid_intersection_types}),Pr)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,l])=>a(o,l)):a(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}sB.create=(e,r,n)=>new sB({left:e,right:r,typeName:Ir.ZodIntersection,...Jr(n)});class Tg extends jn{_parse(r){const{status:n,ctx:i}=this._processInputParams(r);if(i.parsedType!==Kt.array)return Et(i,{code:yt.invalid_type,expected:Kt.array,received:i.parsedType}),Pr;if(i.data.length<this._def.items.length)return Et(i,{code:yt.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Pr;!this._def.rest&&i.data.length>this._def.items.length&&(Et(i,{code:yt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...i.data].map((l,c)=>{const u=this._def.items[c]||this._def.rest;return u?u._parse(new pp(i,l,i.path,c)):null}).filter(l=>!!l);return i.common.async?Promise.all(o).then(l=>Gl.mergeArray(n,l)):Gl.mergeArray(n,o)}get items(){return this._def.items}rest(r){return new Tg({...this._def,rest:r})}}Tg.create=(e,r)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Tg({items:e,typeName:Ir.ZodTuple,rest:null,...Jr(r)})};class ste extends jn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:n,ctx:i}=this._processInputParams(r);if(i.parsedType!==Kt.map)return Et(i,{code:yt.invalid_type,expected:Kt.map,received:i.parsedType}),Pr;const a=this._def.keyType,o=this._def.valueType,l=[...i.data.entries()].map(([c,u],d)=>({key:a._parse(new pp(i,c,i.path,[d,"key"])),value:o._parse(new pp(i,u,i.path,[d,"value"]))}));if(i.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const u of l){const d=await u.key,h=await u.value;if(d.status==="aborted"||h.status==="aborted")return Pr;(d.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(d.value,h.value)}return{status:n.value,value:c}})}else{const c=new Map;for(const u of l){const d=u.key,h=u.value;if(d.status==="aborted"||h.status==="aborted")return Pr;(d.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(d.value,h.value)}return{status:n.value,value:c}}}}ste.create=(e,r,n)=>new ste({valueType:r,keyType:e,typeName:Ir.ZodMap,...Jr(n)});class Vj extends jn{_parse(r){const{status:n,ctx:i}=this._processInputParams(r);
vendor: 5,704 bytes, line 2345
2345if(i.parsedType!==Kt.set)return Et(i,{code:yt.invalid_type,expected:Kt.set,received:i.parsedType}),Pr;const a=this._def;a.minSize!==null&&i.data.size<a.minSize.value&&(Et(i,{code:yt.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&i.data.size>a.maxSize.value&&(Et(i,{code:yt.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const o=this._def.valueType;function l(u){const d=new Set;for(const h of u){if(h.status==="aborted")return Pr;h.status==="dirty"&&n.dirty(),d.add(h.value)}return{status:n.value,value:d}}const c=[...i.data.values()].map((u,d)=>o._parse(new pp(i,u,i.path,d)));return i.common.async?Promise.all(c).then(u=>l(u)):l(c)}min(r,n){return new Vj({...this._def,minSize:{value:r,message:Zt.toString(n)}})}max(r,n){return new Vj({...this._def,maxSize:{value:r,message:Zt.toString(n)}})}size(r,n){return this.min(r,n).max(r,n)}nonempty(r){return this.min(1,r)}}Vj.create=(e,r)=>new Vj({valueType:e,minSize:null,maxSize:null,typeName:Ir.ZodSet,...Jr(r)});class ote extends jn{get schema(){return this._def.getter()}_parse(r){const{ctx:n}=this._processInputParams(r);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ote.create=(e,r)=>new ote({getter:e,typeName:Ir.ZodLazy,...Jr(r)});class lte extends jn{_parse(r){if(r.data!==this._def.value){const n=this._getOrReturnCtx(r);return Et(n,{received:n.data,code:yt.invalid_literal,expected:this._def.value}),Pr}return{status:"valid",value:r.data}}get value(){return this._def.value}}lte.create=(e,r)=>new lte({value:e,typeName:Ir.ZodLiteral,...Jr(r)});function dbe(e,r){return new v0({values:e,typeName:Ir.ZodEnum,...Jr(r)})}class v0 extends jn{_parse(r){if(typeof r.data!="string"){const n=this._getOrReturnCtx(r),i=this._def.values;return Et(n,{expected:_n.joinValues(i),received:n.parsedType,code:yt.invalid_type}),Pr}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(r.data)){const n=this._getOrReturnCtx(r),i=this._def.values;return Et(n,{received:n.data,code:yt.invalid_enum_value,options:i}),Pr}return Vc(r.data)}get options(){return this._def.values}get enum(){const r={};for(const n of this._def.values)r[n]=n;return r}get Values(){const r={};for(const n of this._def.values)r[n]=n;return r}get Enum(){const r={};for(const n of this._def.values)r[n]=n;return r}extract(r,n=this._def){return v0.create(r,{...this._def,...n})}exclude(r,n=this._def){return v0.create(this.options.filter(i=>!r.includes(i)),{...this._def,...n})}}v0.create=dbe;class cte extends jn{_parse(r){const n=_n.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(r);if(i.parsedType!==Kt.string&&i.parsedType!==Kt.number){const a=_n.objectValues(n);return Et(i,{expected:_n.joinValues(a),received:i.parsedType,code:yt.invalid_type}),Pr}if(this._cache||(this._cache=new Set(_n.getValidEnumValues(this._def.values))),!this._cache.has(r.data)){const a=_n.objectValues(n);return Et(i,{received:i.data,code:yt.invalid_enum_value,options:a}),Pr}return Vc(r.data)}get enum(){return this._def.values}}cte.create=(e,r)=>new cte({values:e,typeName:Ir.ZodNativeEnum,...Jr(r)});class oB extends jn{unwrap(){return this._def.type}_parse(r){const{ctx:n}=this._processInputParams(r);if(n.parsedType!==Kt.promise&&n.common.async===!1)return Et(n,{code:yt.invalid_type,expected:Kt.promise,received:n.parsedType}),Pr;const i=n.parsedType===Kt.promise?n.data:Promise.resolve(n.data);return Vc(i.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}oB.create=(e,r)=>new oB({type:e,typeName:Ir.ZodPromise,...Jr(r)});class b0 extends jn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ir.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){const{status:n,ctx:i}=this._processInputParams(r),a=this._def.effect||null,o={addIssue:l=>{Et(i,l),l.fatal?n.abort():n.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),a.type==="preprocess"){const l=a.transform(i.data,o);if(i.common.async)return Promise.resolve(l).then(async c=>{if(n.value==="aborted")return Pr;const u=await this._def.schema._parseAsync({data:c,path:i.path,parent:i});return u.status==="aborted"?Pr:u.status==="dirty"||n.value==="dirty"?cw(u.value):u});{if(n.value==="aborted")return Pr;const c=this._def.schema._parseSync({data:l,path:i.path,parent:i});return c.status==="aborted"?Pr:c.status==="dirty"||n.value==="dirty"?cw(c.value):c}}if(a.type==="refinement"){const l=c=>{const u=a.refinement(c,o);if(i.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(i.common.async===!1){const c=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return c.status==="aborted"?Pr:(c.status==="dirty"&&n.dirty(),l(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(c=>c.status==="aborted"?Pr:(c.status==="dirty"&&n.dirty(),l(c.value).then(()=>({status:n.value,value:c.value}))))}if(a.type==="transform")if(i.common.async===!1){const l=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!y0(l))return Pr;const c=a.transform(l.value,o);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(l=>y0(l)?Promise.resolve(a.transform(l.value,o)).then(c=>({status:n.value,value:c})):Pr);_n.assertNever(a)}}b0.create=(e,r,n)=>
vendor: 4,239 bytes, line 2345
2345new b0({schema:e,typeName:Ir.ZodEffects,effect:r,...Jr(n)});b0.createWithPreprocess=(e,r,n)=>new b0({schema:r,effect:{type:"preprocess",transform:e},typeName:Ir.ZodEffects,...Jr(n)});class Zm extends jn{_parse(r){return this._getType(r)===Kt.undefined?Vc(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}Zm.create=(e,r)=>new Zm({innerType:e,typeName:Ir.ZodOptional,...Jr(r)});class w0 extends jn{_parse(r){return this._getType(r)===Kt.null?Vc(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}w0.create=(e,r)=>new w0({innerType:e,typeName:Ir.ZodNullable,...Jr(r)});class jz extends jn{_parse(r){const{ctx:n}=this._processInputParams(r);let i=n.data;return n.parsedType===Kt.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}jz.create=(e,r)=>new jz({innerType:e,typeName:Ir.ZodDefault,defaultValue:typeof r.default=="function"?r.default:()=>r.default,...Jr(r)});class _z extends jn{_parse(r){const{ctx:n}=this._processInputParams(r),i={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return nB(a)?a.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new cf(i.common.issues)},input:i.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new cf(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}_z.create=(e,r)=>new _z({innerType:e,typeName:Ir.ZodCatch,catchValue:typeof r.catch=="function"?r.catch:()=>r.catch,...Jr(r)});class ute extends jn{_parse(r){if(this._getType(r)!==Kt.nan){const i=this._getOrReturnCtx(r);return Et(i,{code:yt.invalid_type,expected:Kt.nan,received:i.parsedType}),Pr}return{status:"valid",value:r.data}}}ute.create=e=>new ute({typeName:Ir.ZodNaN,...Jr(e)});class iSt extends jn{_parse(r){const{ctx:n}=this._processInputParams(r),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class D7 extends jn{_parse(r){const{status:n,ctx:i}=this._processInputParams(r);if(i.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?Pr:o.status==="dirty"?(n.dirty(),cw(o.value)):this._def.out._parseAsync({data:o.value,path:i.path,parent:i})})();{const a=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?Pr:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:i.path,parent:i})}}static create(r,n){return new D7({in:r,out:n,typeName:Ir.ZodPipeline})}}class Cz extends jn{_parse(r){const n=this._def.innerType._parse(r),i=a=>(y0(a)&&(a.value=Object.freeze(a.value)),a);return nB(n)?n.then(a=>i(a)):i(n)}unwrap(){return this._def.innerType}}Cz.create=(e,r)=>new Cz({innerType:e,typeName:Ir.ZodReadonly,...Jr(r)});ia.lazycreate;var Ir;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ir||(Ir={}));const dv=Im.create;Ap.create;Td.create;const hbe=ia.create;ia.strictCreate;aB.create;sB.create;Tg.create;const aSt=v0.create;oB.create;Zm.create;w0.create;const dte=(e,r,n)=>{if(e&&"reportValidity"in e){const i=Ut(n,r);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},fbe=(e,r)=>{for(const n in r.fields){const i=r.fields[n];
2345i&&i.ref&&"reportValidity"in i.ref?dte(i.ref,n,e):i.refs&&i.refs.forEach(a=>dte(a,n,e))}},sSt=(e,r)=>{r.shouldUseNativeValidation&&fbe(e,r);const n={};for(const i in e){const a=Ut(r.fields,i),o=Object.assign(e[i]||{},{ref:a&&a.ref});if(oSt(r.names||Object.keys(e),i)){const l=Object.assign({},Ut(n,i));ei(l,"root",o),ei(n,i,l)}else ei(n,i,o)}return n},oSt=(e,r)=>e.some(n=>n.startsWith(r+"."));var lSt=function(e,r){for(var n={};e.length;){var i=e[0],a=i.code,o=i.message,l=i.path.join(".");if(!n[l])if("unionErrors"in i){var c=i.unionErrors[0].errors[0];n[l]={message:c.message,type:c.code}}else n[l]={message:o,type:a};if("unionErrors"in i&&i.unionErrors.forEach(function(h){return h.errors.forEach(function(f){return e.push(f)})}),r){var u=n[l].types,d=u&&u[i.code];n[l]=rbe(l,r,n,a,d?[].concat(d,i.message):i.message)}e.shift()}return n},cSt=function(e,r,n){return n===void 0&&(n={}),function(i,a,o){try{return Promise.resolve(function(l,c){try{var u=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](i,r)).then(function(d){return o.shouldUseNativeValidation&&fbe({},o),{errors:{},values:n.raw?i:d}})}catch(d){return c(d)}return u&&u.then?u.then(void 0,c):u}(0,function(l){if(function(c){return Array.isArray(c==null?void 0:c.errors)}(l))return{values:{},errors:sSt(lSt(l.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}}},M7="Radio",[uSt,mbe]=rs(M7),[dSt,hSt]=uSt(M7),pbe=w.forwardRef((e,r)=>{const{__scopeRadio:n,name:i,checked:a=!1,required:o,disabled:l,value:c="on",onCheck:u,form:d,...h}=e,[f,p]=w.useState(null),m=Mr(r,y=>p(y)),A=w.useRef(!1),g=f?d||!!f.closest("form"):!0;return s.jsxs(dSt,{scope:n,checked:a,disabled:l,children:[s.jsx(Rt.button,{type:"button",role:"radio","aria-checked":a,"data-state":ybe(a),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:m,onClick:bt(e.onClick,y=>{a||u==null||u(),g&&(A.current=y.isPropagationStopped(),A.current||y.stopPropagation())})}),g&&s.jsx(xbe,{control:f,bubbles:!A.current,name:i,value:c,checked:a,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});pbe.displayName=M7;var Abe="RadioIndicator",gbe=w.forwardRef((e,r)=>{const{__scopeRadio:n,forceMount:i,...a}=e,o=hSt(Abe,n);return s.jsx(cl,{present:i||o.checked,children:s.jsx(Rt.span,{"data-state":ybe(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:r})})});gbe.displayName=Abe;var fSt="RadioBubbleInput",xbe=w.forwardRef(({__scopeRadio:e,control:r,checked:n,bubbles:i=!0,...a},o)=>{const l=w.useRef(null),c=Mr(l,o),u=$T(n),d=A4(r);return w.useEffect(()=>{const h=l.current;if(!h)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&m){const A=new Event("click",{bubbles:i});m.call(h,n),h.dispatchEvent(A)}},[u,n,i]),s.jsx(Rt.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});xbe.displayName=fSt;function ybe(e){return e?"checked":"unchecked"}var mSt=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],m3="RadioGroup",[pSt,$Ut]=rs(m3,[K0,mbe]),vbe=K0(),bbe=mbe(),[ASt,gSt]=pSt(m3),wbe=w.forwardRef((e,r)=>{const{__scopeRadioGroup:n,name:i,defaultValue:a,value:o,required:l=!1,disabled:c=!1,orientation:u,dir:d,loop:h=!0,onValueChange:f,...p}=e,m=vbe(n),A=q0(d),[g,y]=nl({prop:o,defaultProp:a??null,onChange:f,caller:m3});return s.jsx(ASt,{scope:n,name:i,required:l,disabled:c,value:g,onValueChange:y,children:s.jsx(p8,{asChild:!0,...m,orientation:u,dir:A,loop:h,children:s.jsx(Rt.div,{role:"radiogroup","aria-required":l,"aria-orientation":u,"data-disabled":c?"":void 0,dir:A,...p,ref:r})})})});wbe.displayName=m3;var jbe="RadioGroupItem",_be=w.forwardRef((e,r)=>{const{__scopeRadioGroup:n,disabled:i,...a}=e,o=gSt(jbe,n),l=o.disabled||i,c=vbe(n),u=bbe(n),d=w.useRef(null),h=Mr(r,d),f=o.value===a.value,p=w.useRef(!1);return w.useEffect(()=>{const m=g=>{mSt.includes(g.key)&&(p.current=!0)},A=()=>p.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",A),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",A)}},[]),s.jsx(A8,{asChild:!0,...c,focusable:!l,active:f,children:s.jsx(pbe,{disabled:l,required:o.required,
2345checked:f,...u,...a,name:o.name,ref:h,onCheck:()=>o.onValueChange(a.value),onKeyDown:bt(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:bt(a.onFocus,()=>{var m;p.current&&((m=d.current)==null||m.click())})})})});_be.displayName=jbe;var xSt="RadioGroupIndicator",Cbe=w.forwardRef((e,r)=>{const{__scopeRadioGroup:n,...i}=e,a=bbe(n);return s.jsx(gbe,{...a,...i,ref:r})});Cbe.displayName=xSt;var Nbe=wbe,Sbe=_be,ySt=Cbe;const kbe=w.forwardRef(({className:e,...r},n)=>s.jsx(Nbe,{className:it("grid gap-2",e),...r,ref:n}));kbe.displayName=Nbe.displayName;const Ebe=w.forwardRef(({className:e,...r},n)=>s.jsx(Sbe,{ref:n,className:it("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:s.jsx(ySt,{className:"flex items-center justify-center",children:s.jsx(Goe,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Ebe.displayName=Sbe.displayName;const vSt="/assets/favicon-icon-CmTuuYAk.png",bSt=hbe({name:dv().trim().min(2,"Min 2 characters").max(100),email:dv().trim().email("Invalid email").max(255),reason:aSt(["colaborare-cursuri","promovare","altele"],{required_error:"Select a reason"}),message:dv().trim().min(10,"Min 10 characters").max(2e3)});function wSt(){const[e,r]=w.useState(!1),{lang:n}=Pt();Zr({title:"Contact – EduWeb",description:n==="en"?"Contact the EduWeb team for collaborations, promotions or any other request.":"Contactează echipa EduWeb pentru colaborări, promovare sau orice altă solicitare."});const{register:i,handleSubmit:a,setValue:o,watch:l,formState:{errors:c,isSubmitting:u}}=PNt({resolver:cSt(bSt),defaultValues:{reason:void 0}}),d=l("reason"),h=async m=>{try{const{data:A,error:g}=await G.functions.invoke("send-contact-email",{body:m});if(g)throw g;r(!0),Ho({title:n==="en"?"Message sent!":"Mesaj trimis!",description:n==="en"?"Thank you, we will contact you soon.":"Îți mulțumim, te vom contacta în curând."})}catch(A){console.error("Contact form error:",A),Ho({title:n==="en"?"Error":"Eroare",description:n==="en"?"Could not send the message. Please try again.":"Nu am putut trimite mesajul. Te rugăm încearcă din nou.",variant:"destructive"})}},f={title:"Contact",subtitle:n==="en"?"Have a question, a collaboration proposal or want to promote your brand? Write to us!":"Ai o întrebare, o propunere de colaborare sau vrei să îți promovezi brandul? Scrie-ne!",sendMessage:n==="en"?"Send us a message":"Trimite-ne un mesaj",name:n==="en"?"Name":"Nume",namePlaceholder:n==="en"?"Your name":"Numele tău",email:"Email",emailPlaceholder:n==="en"?"[email protected]":"[email protected]",whyContact:n==="en"?"Why are you contacting us?":"De ce ne contactezi?",message:n==="en"?"Message":"Mesaj",messagePlaceholder:n==="en"?"Write your message here...":"Scrie mesajul tău aici...",submit:n==="en"?"Send message":"Trimite mesajul",submitting:n==="en"?"Sending...":"Se trimite...",successTitle:n==="en"?"Message sent successfully!":"Mesaj trimis cu succes!",successDesc:n==="en"?"Thank you for your message. We will contact you as soon as possible.":"Îți mulțumim pentru mesaj. Te vom contacta în cel mai scurt timp.",sendAnother:n==="en"?"Send another message":"Trimite alt mesaj"},p=[{value:"colaborare-cursuri",label:n==="en"?"Course collaboration":"Colaborare cursuri"},{value:"promovare",label:n==="en"?"Promotion on site":"Promovare pe site"},{value:"altele",label:n==="en"?"Other":"Altele"}];return s.jsx(Ft,{children:s.jsxs("div",{className:"container py-12 max-w-6xl",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[s.jsx("img",{src:vSt,alt:"",className:"h-10 w-10"}),s.jsx("h1",{className:"text-3xl md:text-4xl font-heading font-bold text-foreground",children:f.title})]}),s.jsx("p",{className:"text-muted-foreground max-w-xl mx-auto",children:f.subtitle})]}),s.jsxs("div",{className:"grid lg:grid-cols-5 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[s.jsx(st,{className:"border-border/50",children:s.jsxs(ot,{className:"p-6 space-y-5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(L0,{className:"h-5 w-5 text-primary shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-foreground",children:"Comitnet SRL"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"CUI: RO30915242"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n==="en"?"Share capital: 50,000 lei":"Capital social: 50.000 lei"})]})]}),s.jsx("div",{className:"h-px bg-border"}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Mg,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[s.jsx("p",{children:"Aleea Calin Nemes 1"}),s.jsxs("p",{children:["Cluj-Napoca, ",n==="en"?"Romania":"România"]})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Za,{className:"h-5 w-5 text-primary shrink-0"}),s.jsx("a",{href:"mailto:[email protected]",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"[email protected]"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ole,{className:"h-5 w-5 text-primary shrink-0"}),s.jsx("a",{href:"tel:+40752110109",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"0752 110 109"})]})]})}),s.jsx("div",{className:"rounded-lg overflow-hidden border border-border/50 aspect-[4/3]",children:s.jsx("iframe",{title:n==="en"?"EduWeb Location":"Locație EduWeb",src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2732.8!2d23.573!3d46.77!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zQWxlZWEgQ2FsaW4gTmVtZXMgMSwgQ2x1ai1OYXBvY2E!5e0!3m2!1sro!2sro!4v1700000000000",width:"100%",height:"100%",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",className:"w-full h-full"})})]}),s.jsx("div",{className:"lg:col-span-3",children:s.jsx(st,{className:"border-border/50",children:s.jsx(ot,{className:"p-6 md:p-8",children:e?s.jsxs("div",{className:"text-center py-12 space-y-4",children:[s.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(Dc,{className:"h-7 w-7 text-primary"})}),s.jsx("h2",{className:"text-xl font-heading font-semibold text-foreground",children:f.successTitle}),s.jsx("p",{className:"text-muted-foreground",children:f.successDesc}),s.jsx(me,{variant:"outline",onClick:()=>r(!1),children:f.sendAnother})]}):s.jsxs("form",{onSubmit:a(h),className:"space-y-6",children:[s.jsx("h2",{className:"text-xl font-heading font-semibold text-foreground mb-2",children:f.sendMessage}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{htmlFor:"name",children:f.name}),s.jsx(qe,{id:"name",placeholder:f.namePlaceholder,...i("name")}
2345),c.name&&s.jsx("p",{className:"text-xs text-destructive",children:c.name.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{htmlFor:"email",children:f.email}),s.jsx(qe,{id:"email",type:"email",placeholder:f.emailPlaceholder,...i("email")}),c.email&&s.jsx("p",{className:"text-xs text-destructive",children:c.email.message})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ge,{children:f.whyContact}),s.jsx(kbe,{value:d,onValueChange:m=>o("reason",m,{shouldValidate:!0}),className:"grid sm:grid-cols-3 gap-3",children:p.map(m=>s.jsxs("label",{className:`flex items-center gap-2 p-3 rounded-lg border cursor-pointer transition-colors ${d===m.value?"border-primary bg-primary/5 text-foreground":"border-border hover:border-primary/50 text-muted-foreground"}`,children:[s.jsx(Ebe,{value:m.value}),s.jsx("span",{className:"text-sm font-medium",children:m.label})]},m.value))}),c.reason&&s.jsx("p",{className:"text-xs text-destructive",children:c.reason.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{htmlFor:"message",children:f.message}),s.jsx(fr,{id:"message",rows:5,placeholder:f.messagePlaceholder,...i("message")}),c.message&&s.jsx("p",{className:"text-xs text-destructive",children:c.message.message})]}),s.jsxs(me,{type:"submit",className:"w-full sm:w-auto",disabled:u,children:[s.jsx(Dc,{className:"h-4 w-4 mr-2"}),u?f.submitting:f.submit]})]})})})})]})]})})}function hte(e){const r=Math.floor(e/60),n=Math.floor(e%60);return`${r}:${n.toString().padStart(2,"0")}`}function jSt(e){return`${Math.floor(e/60)} min`}function _St({podcast:e,isActive:r,onPlay:n}){const{lang:i}=Pt(),a=i==="en"?"en-US":"ro-RO",o=i==="en"&&e.title_en?e.title_en:e.title,l=i==="en"&&e.duration_seconds_en||e.duration_seconds,u=new Date(e.podcast_date+"T00:00:00").toLocaleDateString(a,{weekday:"long",day:"numeric",month:"long",year:"numeric"});return s.jsx(Le.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:`news-card p-5 transition-all ${r?"ring-1 ring-primary/40":""}`,children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("button",{onClick:n,className:"shrink-0 w-12 h-12 rounded-full bg-primary text-primary-foreground flex items-center justify-center hover:brightness-110 transition-all shadow-lg shadow-primary/20 mt-1",children:r?s.jsx(Fd,{size:20}):s.jsx(ya,{size:20,className:"ml-0.5"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[s.jsx(Ja,{size:12,className:"text-muted-foreground"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),s.jsx("h3",{className:"font-heading text-base md:text-lg font-bold text-foreground leading-snug mb-2 line-clamp-2",children:o}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[l&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ki,{size:12})," ",jSt(l)]}),e.posts_count&&e.posts_count>0&&s.jsxs("span",{children:[e.posts_count," ",i==="ro"?"știri acoperite":"stories covered"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(eR,{size:12,className:"text-primary"}),i==="ro"?"Ana & Robert":"Sarah & James"]})]})]})]})})}function CSt(){const{lang:e,t:r}=Pt(),[n,i]=w.useState(null),[a,o]=w.useState(!1),[l,c]=w.useState(0),[u,d]=w.useState(0),[h,f]=w.useState(!1),p=w.useRef(null),m=w.useRef();Zr({title:r("podcast.archive_title"),description:r("podcast.archive_desc")});const{data:A=[],isLoading:g}=Xe({queryKey:["podcast-archive"],queryFn:async()=>{const{data:N,error:S}=await G.from("daily_podcasts").select("*").eq("status","published").order("podcast_date",{ascending:!1});if(S)throw S;return N},staleTime:5*6e4});w.useEffect(()=>()=>{m.current&&clearInterval(m.current),p.current&&(p.current.pause(),p.current=null)},[]);const y=N=>{const S=e==="en"&&N.audio_url_en||N.audio_url;return S?`${S}?v=${new Date(N.updated_at).getTime()}`:null},x=N=>{const S=y(N);if(!S)return;if(n===N.id&&p.current){a?(p.current.pause(),m.current&&clearInterval(m.current)):(p.current.play(),m.current=window.setInterval(()=>{p.current&&c(p.current.currentTime)},200)),o(!a);return}p.current&&(p.current.pause(),m.current&&clearInterval(m.current));const E=new Audio(S);p.current=E,i(N.id),c(0);const O=e==="en"&&N.duration_seconds_en||N.duration_seconds;E.addEventListener("loadedmetadata",()=>{d(E.duration||O||0)}),E.addEventListener("ended",()=>{o(!1),c(0),m.current&&clearInterval(m.current)}),E.play(),o(!0),m.current=window.setInterval(()=>{p.current&&c(p.current.currentTime)},200)},b=N=>{if(!p.current||!u)return;const S=N.currentTarget.getBoundingClientRect(),E=(N.clientX-S.left)/S.width;p.current.currentTime=E*u,c(E*u)},v=()=>{p.current&&(p.current.muted=!h),f(!h)},j=u>0?l/u*100:0,_=A.find(N=>N.id===n),C=_?e==="en"&&_.title_en?_.title_en:_.title:"";return s.jsx(Ft,{children:s.jsxs("div",{className:"w-full px-4 md:px-6 lg:px-8 py-8",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(zv,{size:22,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-heading text-2xl md:text-3xl font-bold tracking-tight text-foreground",children:r("podcast.archive_title")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:r("podcast.archive_desc")})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[s.jsx(c4,{size:14,className:"text-primary"}),s.jsx("span",{className:"text-xs font-mono font-bold uppercase tracking-widest text-primary",children:"EduWeb Daily"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"·"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[A.length," ",e==="ro"?"episoade":"episodes"]})]})]}),s.jsx(Fu,{children:n&&_&&s.jsx(Le.div,{initial:{opacity:0,y:-10}
2345,animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"sticky top-16 z-30 mb-6 rounded-xl border border-primary/20 bg-card/95 backdrop-blur-md p-4 shadow-lg",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:()=>x(_),className:"shrink-0 w-9 h-9 rounded-full bg-primary text-primary-foreground flex items-center justify-center hover:brightness-110 transition-all",children:a?s.jsx(Fd,{size:16}):s.jsx(ya,{size:16,className:"ml-0.5"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-heading font-semibold text-foreground truncate",children:C}),s.jsx("div",{className:"mt-1.5 h-1 bg-border/50 rounded-full cursor-pointer group",onClick:b,children:s.jsx("div",{className:"h-full bg-primary rounded-full relative transition-all",style:{width:`${j}%`},children:s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-2.5 h-2.5 bg-primary rounded-full opacity-0 group-hover:opacity-100 transition-opacity"})})})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s.jsx("button",{onClick:v,className:"p-1.5 rounded-lg hover:bg-secondary/50 transition-colors text-muted-foreground",children:h?s.jsx(zg,{size:14}):s.jsx(wo,{size:14})}),s.jsxs("span",{className:"text-[11px] font-mono text-muted-foreground w-16 text-right",children:[hte(l)," / ",hte(u)]})]})]})})}),s.jsx("div",{className:"max-w-3xl mb-8",children:s.jsx("a",{href:"https://eduweb.ro",target:"_blank",rel:"noopener noreferrer",className:"block rounded-xl border border-primary/20 bg-gradient-to-r from-primary/5 via-card to-accent/5 p-5 hover:border-primary/40 transition-all group/sponsor",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"shrink-0 w-12 h-12 rounded-xl bg-gradient-to-br from-primary/20 to-accent/20 flex items-center justify-center text-primary font-bold text-sm tracking-tight",children:"365"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground font-mono mb-1",children:e==="ro"?"Podcast susținut de":"Podcast powered by"}),s.jsxs("p",{className:"text-base font-heading font-bold text-foreground group-hover/sponsor:text-primary transition-colors",children:["SEO 365 — ",e==="ro"?"Agenția de SEO":"SEO Agency"]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 leading-relaxed",children:e==="ro"?"Vrei să apari în primele rezultate Google și să fii recomandat de ChatGPT sau Gemini? Echipa SEO 365 te ajută cu strategii dovedite.":"Want to rank at the top of Google and get recommended by ChatGPT or Gemini? SEO 365 helps with proven strategies."})]}),s.jsx(Yr,{size:16,className:"shrink-0 text-muted-foreground group-hover/sponsor:text-primary transition-colors"})]})})}),g?s.jsx("p",{className:"text-muted-foreground text-center py-16",children:r("common.loading")}):A.length===0?s.jsx("p",{className:"text-muted-foreground text-center py-16",children:e==="ro"?"Nu există episoade încă.":"No episodes yet."}):s.jsx("div",{className:"grid grid-cols-1 gap-4 max-w-3xl",children:A.map(N=>s.jsx(_St,{podcast:N,isActive:n===N.id&&a,onPlay:()=>x(N)},N.id))})]})})}function NSt(){const{lang:e}=Pt(),r=e==="en";return Zr({title:r?"Terms of Service — EduWeb":"Termeni și Condiții — EduWeb",description:r?"Terms of Service for EduWeb educational portal.":"Termenii și condițiile de utilizare a portalului educațional EduWeb."}),r?s.jsx(Ft,{children:s.jsxs("div",{className:"container py-12 max-w-3xl prose prose-sm dark:prose-invert",children:[s.jsx("h1",{children:"Terms of Service"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Last updated: March 7, 2026"}),s.jsx("h2",{children:"1. Operator"}),s.jsxs("p",{children:["EduWeb is operated by ",s.jsx("strong",{children:"Comitnet SRL"}),", a company registered in Romania (CUI: RO30915242), headquartered at Aleea Calin Nemes 1, Cluj-Napoca, Romania. Contact: ",s.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"}),", tel. ",s.jsx("a",{href:"tel:+40752110109",children:"0752 110 109"}),"."]}),s.jsx("h2",{children:"2. Acceptance of Terms"}),s.jsx("p",{children:"By accessing and using EduWeb (eduweb.ro / eduweb.ai), you agree to these Terms of Service. If you do not agree, please discontinue use of the platform."}),s.jsx("h2",{children:"3. Services"}),s.jsx("p",{children:"EduWeb provides educational content about Web3, Blockchain, Artificial Intelligence, NFTs, and Digital Marketing. Services include news aggregation from verified sources, AI-generated educational analyses reviewed by our editorial team, original articles written by our own editorial staff, online courses (EduWeb Academy), a gamification system (EduCoins), and cryptocurrency market data."}),s.jsx("h2",{children:"4. User Accounts"}),s.jsx("p",{children:"Some features require a registered account. You are responsible for maintaining the confidentiality of your credentials. You must provide accurate information and be at least 16 years old to create an account."}),s.jsx("h2",{children:"5. Intellectual Property"}),s.jsx("p",{children:"All original content, branding, and design on EduWeb are the property of Comitnet SRL. Aggregated news articles include links to original sources and respect c
2345opyright by publishing only short excerpts (max 2–3 paragraphs) and summaries."}),s.jsx("h2",{children:"6. EduCoins & Gamification"}),s.jsx("p",{children:"EduCoins are virtual tokens with no monetary value. They may be used to unlock platform features and rewards. Comitnet SRL reserves the right to modify the EduCoins system at any time."}),s.jsx("h2",{children:"7. Cryptocurrency Disclaimer"}),s.jsx("p",{children:"Market data and analyses provided on EduWeb are for educational purposes only and do not constitute financial advice. We are not responsible for any investment decisions made based on our content."}),s.jsx("h2",{children:"8. Limitation of Liability"}),s.jsx("p",{children:'EduWeb is provided "as is" without warranties of any kind. Comitnet SRL shall not be liable for any indirect, incidental, or consequential damages arising from use of the platform.'}),s.jsx("h2",{children:"9. Modifications"}),s.jsx("p",{children:"We reserve the right to update these Terms at any time. Continued use of the platform after changes constitutes acceptance of the updated Terms."}),s.jsx("h2",{children:"10. Governing Law"}),s.jsx("p",{children:"These Terms are governed by the laws of Romania. Any disputes shall be resolved by the competent courts in Cluj-Napoca, Romania."})]})}):s.jsx(Ft,{children:s.jsxs("div",{className:"container py-12 max-w-3xl prose prose-sm dark:prose-invert",children:[s.jsx("h1",{children:"Termeni și Condiții"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Ultima actualizare: 7 martie 2026"}),s.jsx("h2",{children:"1. Operatorul"}),s.jsxs("p",{children:["EduWeb este operat de ",s.jsx("strong",{children:"Comitnet SRL"}),", societate înregistrată în România (CUI: RO30915242), cu sediul în Aleea Calin Nemes 1, Cluj-Napoca, România. Contact: ",s.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"}),", tel. ",s.jsx("a",{href:"tel:+40752110109",children:"0752 110 109"}),"."]}),s.jsx("h2",{children:"2. Acceptarea termenilor"}),s.jsx("p",{children:"Prin accesarea și utilizarea EduWeb (eduweb.ro / eduweb.ai), sunteți de acord cu acești Termeni și Condiții. Dacă nu sunteți de acord, vă rugăm să încetați utilizarea platformei."}),s.jsx("h2",{children:"3. Serviciile"}),s.jsx("p",{children:"EduWeb oferă conținut educațional despre Web3, Blockchain, Inteligență Artificială, NFT-uri și Marketing Digital. Serviciile includ agregare de știri din surse verificate, analize educaționale generate cu AI și revizuite editorial, articole originale scrise de propria redacție EduWeb, cursuri online (EduWeb Academy), un sistem de gamificare (EduCoins) și date despre piața crypto."}),s.jsx("h2",{children:"4. Contul de utilizator"}),s.jsx("p",{children:"Unele funcționalități necesită un cont înregistrat. Sunteți responsabil pentru păstrarea confidențialității datelor de autentificare. Trebuie să furnizați informații corecte și să aveți cel puțin 16 ani pentru a crea un cont."}),s.jsx("h2",{children:"5. Proprietatea intelectuală"}),s.jsx("p",{children:"Tot conținutul original, brandingul și designul de pe EduWeb sunt proprietatea Comitnet SRL. Articolele agregate includ linkuri către sursele originale și respectă drepturile de autor, publicând doar fragmente scurte (max 2–3 paragrafe) și rezumate."}),s.jsx("h2",{children:"6. EduCoins și Gamificare"}),s.jsx("p",{children:"EduCoins sunt jetoane virtuale fără valoare monetară. Pot fi utilizate pentru a debloca funcționalități și recompense pe platformă. Comitnet SRL își rezervă dreptul de a modifica sistemul EduCoins în orice moment."}),s.jsx("h2",{children:"7. Disclaimer Criptomonede"}),s.jsx("p",{children:"Datele de piață și analizele oferite pe EduWeb au scop exclusiv educațional și nu constituie sfaturi financiare. Nu suntem responsabili pentru deciziile de investiții luate pe baza conținutului nostru."}),s.jsx("h2",{children:"8. Limitarea răspunderii"}),s.jsx("p",{children:'EduWeb este oferit „ca atare", fără garanții de niciun fel. Comitnet SRL nu va fi responsabil pentru daune indirecte, incidentale sau consecvente rezultate din utilizarea platformei.'}),s.jsx("h2",{children:"9. Modificări"}),s.jsx("p",{children:"Ne rezervăm dreptul de a actualiza acești Termeni în orice moment. Continuarea utilizării platformei după modificări constituie acceptarea Termenilor actualizați."}),s.jsx("h2",{children:"10. Legea aplicabilă"}),s.jsx("p",{children:"Acești Termeni sunt guvernați de legislația din România. Orice dispută va fi soluționată de instanțele competente din Cluj-Napoca, România."})]})})}function SSt(){const{lang:e}=Pt(),r=e==="en";return Zr({title:r?"Privacy Policy — EduWeb":"Politica de Confidențialitate — EduWeb",description:r?"Privacy Policy for EduWeb educational portal. How we collect and use your data.":"Politica de confidențialitate a portalului educațional EduWeb. Cum colectăm și utilizăm datele dvs."}),r?s.jsx(Ft,{children:s.jsxs("div",{className:"container py-12 max-w-3xl prose prose-sm dark:prose-invert",children:[s.jsx("h1",{children:"Privacy Policy"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Last updated: March 7, 2026"}),s.jsx("h2",{children:"1. Data Controller"}),s.jsxs("p",{children:[s.jsx("strong",{children:"Comitnet SRL"})," (CUI: RO30915242), Aleea Calin Nemes 1, Cluj-Napoca, Romania. Contact: ",s.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}),s.jsx("h2",{children:"2. Data We Collect"}),s.jsxs("ul",{children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Account data:"})," email address, display name, avatar (when you register)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Usage data:"})," pages visited, articles read, course progress, quiz results."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Technical data:"})," IP address, browser type, device information, collected via cookies and analytics."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Newsletter:"})," email address and preferences (with explicit GDPR consent)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Contact form:"})," name, email, and message content."]})]}),s.jsx("h2",{children:"3. How We Use Your Data"}),s.jsxs("ul",{children:[s.jsx("li",{children:"To provide and improve our educational services."}),s.jsx("li",{children:"To manage your account, course enrollments, and EduCoins balance."}),s.jsx("li",{children:"To send newsletters (only with your explicit consent)."}
2345),s.jsx("li",{children:"To analyze platform usage and improve content."}),s.jsx("li",{children:"To comply with legal obligations."})]}),s.jsx("h2",{children:"4. Legal Basis (GDPR)"}),s.jsx("p",{children:"We process your data based on: (a) your consent (newsletters, cookies), (b) contract performance (account services), (c) legitimate interest (analytics, security), and (d) legal obligations."}),s.jsx("h2",{children:"5. Cookies & Tracking"}),s.jsx("p",{children:'We use Google Consent Mode v2. By default, analytics and advertising cookies are set to "denied." They are only activated after your explicit consent via our cookie banner. You can withdraw consent at any time.'}),s.jsx("h2",{children:"6. Data Sharing"}),s.jsx("p",{children:"We do not sell your personal data. We may share data with: hosting providers, analytics services (Google Analytics), email services (for newsletters), and payment processors (for paid courses). All third parties comply with GDPR."}),s.jsx("h2",{children:"7. Data Retention"}),s.jsx("p",{children:"Account data is retained as long as your account is active. Usage analytics are anonymized after 26 months. Newsletter data is retained until you unsubscribe. Contact form messages are retained for 12 months."}),s.jsx("h2",{children:"8. Your Rights"}),s.jsx("p",{children:"Under GDPR, you have the right to:"}),s.jsxs("ul",{children:[s.jsx("li",{children:"Access your personal data."}),s.jsx("li",{children:"Rectify inaccurate data."}),s.jsx("li",{children:'Request erasure ("right to be forgotten").'}),s.jsx("li",{children:"Restrict or object to processing."}),s.jsx("li",{children:"Data portability."}),s.jsx("li",{children:"Withdraw consent at any time."})]}),s.jsxs("p",{children:["To exercise these rights, contact us at"," ",s.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}),s.jsx("h2",{children:"9. Security"}),s.jsx("p",{children:"We implement industry-standard security measures including encryption, access controls, and regular security audits to protect your data."}),s.jsx("h2",{children:"10. Changes"}),s.jsx("p",{children:"We may update this Privacy Policy periodically. We will notify registered users of significant changes via email."})]})}):s.jsx(Ft,{children:s.jsxs("div",{className:"container py-12 max-w-3xl prose prose-sm dark:prose-invert",children:[s.jsx("h1",{children:"Politica de Confidențialitate"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Ultima actualizare: 7 martie 2026"}),s.jsx("h2",{children:"1. Operatorul de date"}),s.jsxs("p",{children:[s.jsx("strong",{children:"Comitnet SRL"})," (CUI: RO30915242), Aleea Calin Nemes 1, Cluj-Napoca, România. Contact: ",s.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}),s.jsx("h2",{children:"2. Datele pe care le colectăm"}),s.jsxs("ul",{children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Date de cont:"})," adresă de email, nume afișat, avatar (la înregistrare)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Date de utilizare:"})," pagini vizitate, articole citite, progres cursuri, rezultate quiz-uri."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Date tehnice:"})," adresă IP, tip browser, informații dispozitiv, colectate prin cookie-uri și analytics."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Newsletter:"})," adresă email și preferințe (cu consimțământ GDPR explicit)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Formular contact:"})," nume, email și conținutul mesajului."]})]}),s.jsx("h2",{children:"3. Cum utilizăm datele dvs."}),s.jsxs("ul",{children:[s.jsx("li",{children:"Pentru a furniza și îmbunătăți serviciile educaționale."}),s.jsx("li",{children:"Pentru a gestiona contul, înscrierile la cursuri și soldul EduCoins."}),s.jsx("li",{children:"Pentru a trimite newsletter-ul (doar cu consimțământul dvs. explicit)."}),s.jsx("li",{children:"Pentru a analiza utilizarea platformei și a îmbunătăți conținutul."}),s.jsx("li",{children:"Pentru a respecta obligațiile legale."})]}),s.jsx("h2",{children:"4. Baza legală (GDPR)"}
2345),s.jsx("p",{children:"Prelucrăm datele dvs. pe baza: (a) consimțământului (newsletter, cookie-uri), (b) executării contractului (servicii de cont), (c) interesului legitim (analytics, securitate) și (d) obligațiilor legale."}),s.jsx("h2",{children:"5. Cookie-uri și Tracking"}),s.jsx("p",{children:'Utilizăm Google Consent Mode v2. Implicit, cookie-urile de analytics și publicitate sunt setate pe „denied". Acestea sunt activate doar după consimțământul dvs. explicit prin bannerul de cookie-uri. Puteți retrage consimțământul oricând.'}),s.jsx("h2",{children:"6. Partajarea datelor"}),s.jsx("p",{children:"Nu vindem datele dvs. personale. Putem partaja date cu: furnizori de hosting, servicii de analytics (Google Analytics), servicii de email (pentru newsletter) și procesatori de plăți (pentru cursuri plătite). Toți terții respectă GDPR."}),s.jsx("h2",{children:"7. Retenția datelor"}),s.jsx("p",{children:"Datele de cont sunt păstrate cât timp contul este activ. Datele de analytics sunt anonimizate după 26 de luni. Datele de newsletter sunt păstrate până la dezabonare. Mesajele din formularul de contact sunt păstrate 12 luni."}),s.jsx("h2",{children:"8. Drepturile dvs."}),s.jsx("p",{children:"Conform GDPR, aveți dreptul de a:"}),s.jsxs("ul",{children:[s.jsx("li",{children:"Accesa datele dvs. personale."}),s.jsx("li",{children:"Rectifica datele inexacte."}),s.jsx("li",{children:'Solicita ștergerea („dreptul de a fi uitat").'}),s.jsx("li",{children:"Restricționa sau obiecta la prelucrare."}),s.jsx("li",{children:"Portabilitatea datelor."}),s.jsx("li",{children:"Retrage consimțământul oricând."})]}),s.jsxs("p",{children:["Pentru a exercita aceste drepturi, contactați-ne la"," ",s.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}),s.jsx("h2",{children:"9. Securitate"}),s.jsx("p",{children:"Implementăm măsuri de securitate standard în industrie, inclusiv criptare, controale de acces și audituri de securitate regulate pentru a proteja datele dvs."}),s.jsx("h2",{children:"10. Modificări"}),s.jsx("p",{children:"Putem actualiza periodic această Politică de Confidențialitate. Vom notifica utilizatorii înregistrați despre modificările semnificative prin email."})]})})}const Nz="/assets/ce-este-web3-DhO5D9th.jpg";function p3(){const{data:e}=Xe({queryKey:["glossary-terms-slugs"],queryFn:async()=>{const{data:n}=await G.from("glossary_terms").select("term_ro, term_en, slug").eq("is_published",!0);return n||[]},staleTime:6e5});return w.useMemo(()=>{const n=new Map;if(!e)return n;for(const i of e)n.set(i.term_ro.toLowerCase(),i.slug),i.term_en&&n.set(i.term_en.toLowerCase(),i.slug);return n},[e])}const fte={ro:{title:"Ce este Web3? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este Web3? Ghid Complet — Definiție, Tehnologii & Viitor",metaDescription:"Află ce este Web3, cum funcționează internetul descentralizat, care sunt tehnologiile cheie (blockchain, smart contracts, DApps) și de ce contează pentru viitorul digital.",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Web3?",subheading:"Ghid complet pentru internetul descentralizat",intro:"Web3 reprezintă a treia generație a internetului, construită pe tehnologia blockchain. Spre deosebire de Web2, unde datele sunt controlate de companii mari (Google, Meta, Amazon), Web3 pune utilizatorii în control asupra propriilor date, identități digitale și active."},sections:[{icon:"globe",title:"Evoluția Internetului: de la Web1 la Web3",content:`**Web1 (1990–2004)** — Internetul static. Paginile web erau doar pentru citit, fără interactivitate. Utilizatorii consumau conținut creat de un număr mic de creatori.
2346
2347**Web2 (2004–prezent)** — Internetul social. Platforme ca Facebook, YouTube și Twitter au permis oricui să creeze conținut. Problema: companiile dețin și monetizează datele utilizatorilor.
2348
2349**Web3 (din 2020+)** — Internetul descentralizat. Utilizatorii dețin proprietatea asupra datelor și activelor lor digitale prin blockchain, smart contracts și aplicații descentralizate (DApps).`},{icon:"blocks",title:"Tehnologiile Cheie ale Web3",content:`**Blockchain** — O bază de date distribuită și imuabilă care stochează tranzacții verificabile. Este fundamentul pe care se construiește întreaga infrastru
2349ctură Web3.
2350
2351**Smart Contracts** — Programe auto-executabile stocate pe blockchain care se activează automat când anumite condiții sunt îndeplinite. Eliminarea intermediarilor.
2352
2353**Tokenuri și Criptomonede** — Active digitale (precum Bitcoin, Ethereum) care permit tranzacții peer-to-peer fără bănci sau intermediari tradiționali.
2354
2355**NFT-uri (Non-Fungible Tokens)** — Certificale digitale unice de proprietate pentru artă, muzică, documente și alte active digitale sau fizice.
2356
2357**DApps (Aplicații Descentralizate)** — Aplicații care rulează pe blockchain în loc de servere centralizate, oferind rezistență la cenzură și transparență.
2358
2359**Identitate Descentralizată (DID)** — Sisteme care permit utilizatorilor să-și controleze identitatea digitală fără a depinde de o autoritate centrală.`},{icon:"shield",title:"De ce este important Web3?",content:`**Proprietate digitală reală** — În Web2, nu deții cu adevărat nimic: conturile tale pot fi șterse, iar conținutul poate fi eliminat. Web3 oferă proprietate verificabilă pe blockchain.
2360
2361**Confidențialitate îmbunătățită** — Datele tale nu mai sunt colectate și vândute de platforme. Tu decizi ce informații partajezi și cu cine.
2362
2363**Rezistență la cenzură** — Conținutul stocat pe blockchain nu poate fi modificat sau șters de o singură entitate.
2364
2365**Incluziune financiară** — DeFi (Finanțe Descentralizate) oferă acces la servicii financiare pentru cei 1.4 miliarde de oameni nebancarizați din lume.
2366
2367**Transparență** — Toate tranzacțiile sunt publice și verificabile, reducând frauda și corupția.`}
2367,{icon:"users",title:"Cazuri de Utilizare Web3 în Practică",content:`**DeFi (Finanțe Descentralizate)** — Împrumuturi, schimburi valutare și investiții fără bănci. Platforme precum Aave și Uniswap gestionează miliarde de dolari.
2368
2369**NFT-uri și Artă Digitală** — Artiștii vând direct cumpărătorilor, păstrând un procent din revânzări prin smart contracts.
2370
2371**DAO-uri (Organizații Autonome Descentralizate)** — Companii guvernate democratic de membrii lor prin votul pe blockchain.
2372
2373**Gaming și Metavers** — Jucătorii dețin cu adevărat obiectele virtuale din jocuri și le pot tranzacționa liber.
2374
2375**Certificare și Educație** — Diplomele și certificatele emise pe blockchain sunt verificabile instant și imposibil de falsificat.
2376
2377**Identitate Digitală** — Pașapoarte digitale și sisteme de verificare a identității fără intermediari.`},{icon:"zap",title:"Provocări și Limitări ale Web3",content:`**Scalabilitate** — Blockchain-urile încă nu pot procesa la fel de multe tranzacții pe secundă ca sistemele centralizate. Soluțiile Layer 2 (Polygon, Arbitrum) și noi protocoale (Solana) adresează această provocare.
2378
2379**Experiența utilizatorului** — Wallet-urile crypto și seed phrases sunt încă complicate pentru utilizatorul mediu. Proiecte precum Account Abstraction simplifică experiența.
2380
2381**Reglementare** — Cadrul legal variază semnificativ între țări. Uniunea Europeană a adoptat regulamentul MiCA, stabilind reguli clare pentru cripto-active.
2382
2383**Consum energetic** — Deși Ethereum a redus consumul cu 99.95% prin trecerea la Proof of Stake, unele blockchain-uri încă folosesc Proof of Work.
2384
2385**Riscuri de securitate** — Smart contracts-urile pot conține vulnerabilități. Audit-urile de securitate și educația utilizatorilor sunt esențiale.`}],glossary:{title:"Glosar de Termeni Web3",terms:[{term:"Blockchain",def:"Registru digital distribuit, imuabil și transparent, partajat între participanții unei rețele."},{term:"Smart Contract",def:"Program auto-executabil stocat pe blockchain care se activează când condițiile predefinite sunt îndeplinite."},{term:"DApp",def:"Aplicație descentralizată care rulează pe blockchain, fără un server central."},{term:"DeFi",def:"Finanțe Descentralizate — servicii financiare construite pe blockchain, fără intermediari tradiționali."},{term:"NFT",def:"Token Non-Fungibil — activ digital unic care certifică proprietatea asupra unui obiect digital sau fizic."},{term:"DAO",def:"Organizație Autonomă Descentralizată — entitate guvernată de membrii săi prin vot pe blockchain."},{term:"Wallet",def:"Portofel digital care stochează cheile criptografice necesare pentru a accesa și gestiona active blockchain."},{term:"Layer 2",def:"Protocol construit peste un blockchain existent (Layer 1) pentru a îmbunătăți viteza și a reduce costurile."},{term:"Gas Fee",def:"Comisionul plătit pentru a procesa o tranzacție pe blockchain (ex: rețeaua Ethereum)."},{term:"Seed Phrase",def:"Secvența de 12-24 cuvinte care permite recuperarea unui portofel crypto. Trebuie păstrată în siguranță."}]},faqs:[{q:"Ce este Web3 pe scurt?",a:"Web3 este a treia generație a internetului, bazată pe blockchain, care oferă utilizatorilor control direct asupra datelor, identității și activelor lor digitale, fără a depinde de companii centralizate."},{q:"Care este diferența dintre Web2 și Web3?",a:"Web2 este internetul actual, unde platforme ca Google și Facebook controlează datele utilizatorilor. Web3 folosește blockchain pentru a da proprietatea și controlul înapoi utilizatorilor, eliminând intermediarii."},{q:"Am nevoie de criptomonede pentru a folosi Web3?",a:"Nu neapărat. Deși multe aplicații Web3 folosesc tokenuri, există și aplicații care nu necesită criptomonede. Totuși, un wallet crypto este util pentru a interacționa cu majoritatea serviciilor Web3."},{q:"Este Web3 sigur?",a:"Tehnologia blockchain este foarte sigură prin design (criptografie, descentralizare). Riscurile principale vin din vulnerabilități în smart contracts, phishing și pierderea cheilor private. Educația și prudența sunt esențiale."},{q:"Web3 va înlocui internetul actual?",a:"Web3 nu va înlocui complet Web2, ci va coexista și îl va extinde. Multe servicii Web2 vor integra treptat funcționalități Web3, precum autentificarea descentralizată și tokenizarea activelor."}],cta:{title:"Continuă să înveți despre Web3",description:"Explorează cursurile noastre gratuite din EduWeb Academy și articolele despre Web3, blockchain și tehnologiile descentralizate.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Web3",path:"/web3"},{label:"Ce este Web3",path:"/ce-este-web3"}]},en:{title:"What is Web3? Complete Beginner's Guide (2025)",metaTitle:"What is Web3? Complete Guide — Definition, Technologies & Future",metaDescription:"Learn what Web3 is, how the decentralized internet works, key technologies (blockchain, smart contracts, DApps) and why it matters for the digital future.",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Web3?",subheading:"Complete guide to the decentralized internet",intro:"Web3 represents the third generation of the internet, built on blockchain technology. Unlike Web2, where data is controlled by large corporations (Google, Meta, Amazon), Web3 puts users in control of their own data, digital identities, and assets."},sections:[{icon:"globe",title:"The Evolution of the Internet: from Web1 to Web3",content:`**Web1 (1990–2004)** — The static internet. Web pages were read-only, with no interactivity. Users consumed content created by a small number of creators.
2386
2387**Web2 (2004–present)** — The social internet. Platforms like Facebook, YouTube, and Twitter enabled anyone to create content. The problem: companies own and monetize user data.
2388
2389**Web3 (2020+)** — The decentralized internet. Users own their data and digital assets through blockchain, smart contracts, and decentralized applications (DApps).`},{icon:"blocks",title:"Key Technologies of Web3",content:`**Blockchain** — A distributed, immutable database that stores verifiable transactions. It is the foundation upon which the entire Web3 infrastru
2389cture is built.
2390
2391**Smart Contracts** — Self-executing programs stored on blockchain that automatically activate when certain conditions are met. Eliminating intermediaries.
2392
2393**Tokens and Cryptocurrencies** — Digital assets (like Bitcoin, Ethereum) that enable peer-to-peer transactions without banks or traditional intermediaries.
2394
2395**NFTs (Non-Fungible Tokens)** — Unique digital certificates of ownership for art, music, documents, and other digital or physical assets.
2396
2397**DApps (Decentralized Applications)** — Applications that run on blockchain instead of centralized servers, providing censorship resistance and transparency.
2398
2399**Decentralized Identity (DID)** — Systems that allow users to control their digital identity without depending on a central authority.`},{icon:"shield",title:"Why is Web3 Important?",content:`**True digital ownership** — In Web2, you don't truly own anything: your accounts can be deleted, and content can be removed. Web3 offers verifiable ownership on blockchain.
2400
2401**Improved privacy** — Your data is no longer collected and sold by platforms. You decide what information you share and with whom.
2402
2403**Censorship resistance** — Content stored on blockchain cannot be modified or deleted by a single entity.
2404
2405**Financial inclusion** — DeFi (Decentralized Finance) provides access to financial services for the 1.4 billion unbanked people worldwide.
2406
2407**Transparency** — All transactions are public and verifiable, reducing fraud and corruption.`}
2407,{icon:"users",title:"Web3 Use Cases in Practice",content:`**DeFi (Decentralized Finance)** — Loans, currency exchanges, and investments without banks. Platforms like Aave and Uniswap manage billions of dollars.
2408
2409**NFTs and Digital Art** — Artists sell directly to buyers, keeping a percentage of resales through smart contracts.
2410
2411**DAOs (Decentralized Autonomous Organizations)** — Companies governed democratically by their members through blockchain voting.
2412
2413**Gaming and Metaverse** — Players truly own virtual items in games and can trade them freely.
2414
2415**Certification and Education** — Diplomas and certificates issued on blockchain are instantly verifiable and impossible to forge.
2416
2417**Digital Identity** — Digital passports and identity verification systems without intermediaries.`},{icon:"zap",title:"Challenges and Limitations of Web3",content:`**Scalability** — Blockchains still can't process as many transactions per second as centralized systems. Layer 2 solutions (Polygon, Arbitrum) and new protocols (Solana) address this challenge.
2418
2419**User Experience** — Crypto wallets and seed phrases are still complicated for the average user. Projects like Account Abstraction simplify the experience.
2420
2421**Regulation** — The legal framework varies significantly between countries. The European Union adopted the MiCA regulation, establishing clear rules for crypto-assets.
2422
2423**Energy Consumption** — Although Ethereum reduced consumption by 99.95% through the switch to Proof of Stake, some blockchains still use Proof of Work.
2424
2425**Security Risks** — Smart contracts may contain vulnerabilities. Security audits and user education are essential.`}],glossary:{title:"Web3 Glossary",terms:[{term:"Blockchain",def:"A distributed, immutable, and transparent digital ledger shared among participants in a network."},{term:"Smart Contract",def:"A self-executing program stored on blockchain that activates when predefined conditions are met."},{term:"DApp",def:"A decentralized application that runs on blockchain, without a central server."},{term:"DeFi",def:"Decentralized Finance — financial services built on blockchain, without traditional intermediaries."},{term:"NFT",def:"Non-Fungible Token — a unique digital asset that certifies ownership of a digital or physical object."},{term:"DAO",def:"Decentralized Autonomous Organization — an entity governed by its members through blockchain voting."},{term:"Wallet",def:"A digital wallet that stores the cryptographic keys needed to access and manage blockchain assets."},{term:"Layer 2",def:"A protocol built on top of an existing blockchain (Layer 1) to improve speed and reduce costs."},{term:"Gas Fee",def:"The fee paid to process a transaction on blockchain (e.g., the Ethereum network)."},{term:"Seed Phrase",def:"A sequence of 12-24 words that allows recovery of a crypto wallet. Must be kept secure."}]},faqs:[{q:"What is Web3 in simple terms?",a:"Web3 is the third generation of the internet, based on blockchain, that gives users direct control over their data, identity, and digital assets, without relying on centralized companies."},{q:"What is the difference between Web2 and Web3?",a:"Web2 is the current internet, where platforms like Google and Facebook control user data. Web3 uses blockchain to give ownership and control back to users, eliminating intermediaries."},{q:"Do I need cryptocurrency to use Web3?",a:"Not necessarily. While many Web3 applications use tokens, some don't require cryptocurrency. However, a crypto wallet is useful for interacting with most Web3 services."},{q:"Is Web3 safe?",a:"Blockchain technology is very secure by design (cryptography, decentralization). The main risks come from vulnerabilities in smart contracts, phishing, and loss of private keys. Education and caution are essential."},{q:"Will Web3 replace the current internet?",a:"Web3 won't completely replace Web2 but will coexist and extend it. Many Web2 services will gradually integrate Web3 features, such as decentralized authentication and asset tokenization."}],cta:{title:"Continue Learning About Web3",description:"Explore our free courses at EduWeb Academy and articles about Web3, blockchain, and decentralized technologies.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Web3",path:"/web3"},{label:"What is Web3",path:"/what-is-web3"}]}},kSt={globe:s.jsx(Dr,{size:24}),blocks:s.jsx(es,{size:24}),shield:s.jsx(pi,{size:24}),users:s.jsx(Rn,{size:24}),zap:s.jsx(ts,{size:24})};function ESt(e){return e.split(`
2426
2427`).filter(Boolean).map((r,n)=>{const i=r.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>");return s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4 last:mb-0",dangerouslySetInnerHTML:{__html:i}},n)})}function mte(){const{lang:e}=Pt(),r=p3(),n=fte[e]||fte.ro;Zr({title:n.metaTitle,description:n.metaDescription});const i={"@context":"https://schema.org","@type":"Article",headline:n.title,description:n.metaDescription,author:{"@type":"Organization",name:"EduWeb",url:e==="en"?"https://eduweb.ai":"https://eduweb.ro"},publisher:{"@type":"Organization",name:"EduWeb",logo:{"@type":"ImageObject",url:`${e==="en"?"https://eduweb.ai":"https://eduweb.ro"}/favicon.png`}},mainEntityOfPage:{"@type":"WebPage","@id":`${e==="en"?"https://eduweb.ai/what-is-web3":"https://eduweb.ro/ce-este-web3"}`},datePublished:"2025-03-08",dateModified:"2025-03-08",inLanguage:e==="en"?"en":"ro"},a={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.faqs.map(l=>({"@type":"Question",name:l.q,acceptedAnswer:{"@type":"Answer",text:l.a}}))},o={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:n.breadcrumbs.map((l,c)=>({"@type":"ListItem",position:c+1,name:l.label,item:`${e==="en"?"https://eduweb.ai":"https://eduweb.ro"}${l.path}`}))};return s.jsxs(Ft,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(i)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(a)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(o)}}),s.jsx("div",{className:"container pt-6 pb-2",children:s.jsx("nav",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:n.breadcrumbs.map((l,c)=>s.jsxs("span",{className:"flex items-center gap-1.5",children:[c>0&&s.jsx("span",{children:"/"}),c<n.breadcrumbs.length-1?s.jsx(be,{to:l.path,className:"hover:text-primary transition-colors",children:l.label}):s.jsx("span",{className:"text-foreground font-medium",children:l.label})]},l.path))})}),s.jsxs("div",{className:"cat-web3 relative overflow-hidden border-b border-border/30",children:[s.jsx("div",{className:"absolute inset-0 hero-gradient"}),s.jsx("div",{className:"absolute inset-0 grid-bg opacity-[0.04]"}),s.jsx("div",{className:"container relative z-10 py-14 md:py-20",children:s.jsxs("div",{className:"flex items-center gap-8 lg:gap-12",children:[s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"max-w-3xl flex-1",children:[s.jsx("span",{className:"inline-block px-3 py-1 rounded-full bg-primary/10 text-primary text-xs font-semibold tracking-widest mb-4",children:n.hero.badge}),s.jsx("h1",{className:"font-heading text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight mb-4 text-foreground",children:n.hero.heading}),s.jsx("p",{className:"text-xl md:text-2xl text-muted-foreground font-medium mb-6",children:n.hero.subheading}),s.jsx("p",{className:"text-lg text-foreground/80 leading-relaxed max-w-2xl",children:bu(n.hero.intro)})]}),s.jsx(Le.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.7,delay:.2},className:"hidden lg:block w-64 xl:w-80 shrink-0",children:s.jsx("img",{src:Nz,alt:n.hero.heading,className:"w-full rounded-2xl shadow-2xl",loading:"eager"})})]})})]}),s.jsx("article",{className:"container py-12 md:py-16",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] gap-12",children:[s.jsxs("div",{className:"space-y-12",children:[n.sections.map((l,c)=>s.jsxs(Le.section,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.5,delay:c*.05},children:[s.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center text-primary shrink-0 mt-0.5",children:kSt[l.icon]}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:l.title})]}),s.jsx("div",{className:"ml-16",children:ESt(l.content)})]},c)),s.jsxs(Le.section,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center text-primary shrink-0",children:s.jsx(yr,{size:24})}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:n.glossary.title})]}),s.jsx("div",{className:"ml-16 grid grid-cols-1 sm:grid-cols-2 gap-4",children:n.glossary.terms.map(l
2427=>{const c=r.get(l.term.toLowerCase());return s.jsxs("div",{className:"glass-card rounded-xl p-4",children:[s.jsx("dt",{className:"font-heading font-bold text-sm text-primary mb-1",children:c?s.jsx(be,{to:`/glosar/${c}`,className:"hover:underline",children:l.term}):l.term}),s.jsx("dd",{className:"text-sm text-muted-foreground leading-relaxed",children:l.def})]},l.term)})})]}),s.jsxs(Le.section,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground mb-6",children:e==="en"?"Frequently Asked Questions":"Întrebări Frecvente"}),s.jsx(lo,{type:"single",collapsible:!0,className:"space-y-2",children:n.faqs.map((l,c)=>s.jsxs(Os,{value:`faq-${c}`,className:"glass-card rounded-xl px-5 border-none",children:[s.jsx(Ls,{className:"text-left font-heading font-semibold text-foreground hover:text-primary py-4",children:l.q}),s.jsx(Rs,{className:"text-muted-foreground leading-relaxed pb-4",children:l.a})]},c))})]}),s.jsxs(Le.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"glass-card rounded-2xl p-8 text-center",children:[s.jsx("h3",{className:"font-heading text-2xl font-bold text-foreground mb-3",children:n.cta.title}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-lg mx-auto",children:n.cta.description}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 px-6 py-3 rounded-xl bg-primary text-primary-foreground font-semibold hover:bg-primary/90 transition-colors",children:[n.cta.button," ",s.jsx(Gt,{size:18})]})]}),s.jsx(Kv,{topics:["web3","blockchain"]})]}),s.jsx("aside",{className:"hidden lg:block space-y-6",children:s.jsxs("div",{className:"sticky top-24 space-y-6",children:[s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:e==="en"?"Table of Contents":"Cuprins"}),s.jsxs("nav",{className:"space-y-2",children:[n.sections.map((l,c)=>s.jsx("a",{href:`#section-${c}`,className:"block text-sm text-muted-foreground hover:text-primary transition-colors leading-snug",children:l.title},c)),s.jsx("a",{href:"#glossary",className:"block text-sm text-muted-foreground hover:text-primary transition-colors",children:n.glossary.title}),s.jsx("a",{href:"#faqs",className:"block text-sm text-muted-foreground hover:text-primary transition-colors",children:e==="en"?"FAQs":"Întrebări Frecvente"})]})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:e==="en"?"Related Topics":"Tematici Conexe"}),s.jsx("div",{className:"space-y-2",children:[{label:"Blockchain",path:"/blockchain",icon:s.jsx(es,{size:14})},{label:"NFT",path:"/nft",icon:s.jsx(pi,{size:14})},{label:"AI & AI Agents",path:"/ai",icon:s.jsx(ts,{size:14})}].map(l=>s.jsxs(be,{to:l.path,className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:[s.jsx("span",{className:"text-primary",children:l.icon}),l.label,s.jsx(Yr,{size:12,className:"ml-auto opacity-50"})]},l.path))})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:e==="en"?"Crypto Prices":"Prețuri Crypto"}),s.jsxs("div",{className:"space-y-1",children:[[{label:"Bitcoin (BTC)",path:"/bitcoin-pret-azi"},{label:"Ethereum (ETH)",path:"/ethereum-pret-ron"},{label:"Solana (SOL)",path:"/solana-pret-azi"}].map(l=>s.jsx(be,{to:l.path,className:"block px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:l.label},l.path)),s.jsx(be,{to:"/crypto",className:"block px-3 py-2 rounded-lg text-sm text-primary hover:underline font-medium",children:e==="en"?"View All →":"Vezi toate →"})]})]})]})})]})})]})}const Sz="/assets/ce-este-blockchain-BuL9nZ6b.jpg",pte={ro:{title:"Ce este Blockchain? Ghid Complet pentru Începători (2025)",metaTitle:"Ce este Blockchain? Ghid Complet — Tehnologie, Tipuri & Aplicații",metaDescription:"Află ce este blockchain, cum funcționează, care sunt tipurile de blockchain (public, privat, consortium) și aplicațiile practice în finanțe, supply chain și identitate digitală.",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Blockchain?",subheading:"Ghid complet pentru tehnologia registrului distribuit",intro:'Blockchain este o tehnologie de registru distribuit (DLT) care permite stocarea și transmiterea informațiilor într-un mod transparent, securizat și de
2427scentralizat. Fiecare „bloc" conține un set de tranzacții verificate, iar blocurile sunt legate între ele criptografic, formând un „lanț" imuabil.'},sections:[{icon:"blocks",title:"Cum Funcționează Blockchain?",content:`**1. Tranzacția** — Un utilizator inițiază o tranzacție (ex: trimite Bitcoin). Aceasta este transmisă rețelei de noduri (calculatoare) distribuite în toată lumea.
2428
2429**2. Validarea** — Nodurile verifică tranzacția folosind reguli de consens (Proof of Work, Proof of Stake sau alte mecanisme). Tranzacțiile invalide sunt respinse automat.
2430
2431**3. Blocul** — Tranzacțiile validate sunt grupate într-un bloc nou. Fiecare bloc conține un hash criptografic al blocului anterior, timestamp-ul și datele tranzacțiilor.
2432
2433**4. Lanțul** — Blocul nou este adăugat la lanțul existent. Odată înregistrat, conținutul nu mai poate fi modificat fără a invalida toate blocurile ulterioare — aceasta este proprietatea de imuabilitate.
2434
2435**5. Distribuția** — Copia actualizată a blockchain-ului este sincronizată pe toate nodurile din rețea, asigurând transparență și rezistență la atacuri.`},{icon:"shield",title:"Proprietățile Fundamentale ale Blockchain",content:`**Descentralizare** — Nu există o autoritate centrală care controlează rețeaua. Puterea de decizie este distribuită între toți participanții, eliminând punctele unice de eșec.
2436
2437**Imuabilitate** — Odată ce datele sunt înregistrate într-un bloc confirmat, ele nu pot fi modificate sau șterse. Aceasta asigură integritatea istoricului complet al tranzacțiilor.
2438
2439**Transparență** — Toate tranzacțiile sunt vizibile public (pe blockchain-urile publice). Oricine poate verifica și audita înregistrările.
2440
2441**Securitate criptografică** — Fiecare bloc este legat de cel anterior prin funcții hash criptografice (SHA-256 pentru Bitcoin). Modificarea unui bloc ar necesita recalcularea tuturor blocurilor ulterioare.
2442
2443**Consens** — Rețeaua funcționează prin mecanisme de consens care asigură că toți participanții sunt de acord asupra stării curente a registrului.`},{icon:"pickaxe",title:"Mecanisme de Consens: PoW vs PoS",content:`**Proof of Work (PoW)** — Mecanismul original folosit de Bitcoin. Minerii rezolvă probleme matematice complexe pentru a valida tranzacțiile și a crea blocuri noi. Este extrem de sigur, dar consumă multă energie.
2444
2445**Proof of Stake (PoS)** — Alternativa eficientă energetic, adoptată de Ethereum în 2022. Validatorii „pun în joc" (staking) propriile monede ca garanție. Consumă cu 99.95% mai puțină energie decât PoW.
2446
2447**Delegated Proof of Stake (DPoS)** — Varianta democratică unde deținătorii de tokenuri votează pentru un număr limitat de validatori. Folosit de EOS și Tron.
2448
2449**Proof of Authority (PoA)** — Utilizat în blockchain-urile private, unde validatorii sunt entități de încredere preaprobate. Rapid și eficient, dar mai centralizat.
2450
2451**Proof of History (PoH)** — Mecanismul inovator al Solana, care adaugă un timestamp criptografic verificabil, permițând procesarea a zeci de mii de tranzacții pe secundă.`},{icon:"cpu",title:"Tipuri de Blockchain",content:`**Blockchain Public** — Deschis oricui (Bitcoin, Ethereum). Oricine poate citi, scrie și participa la validare. Cel mai descentralizat și transparent, dar mai lent.
2452
2453**Blockchain Privat** — Controlat de o singură organizație (Hyperledger Fabric). Accesul este restricționat. Folosit în medii corporative pentru eficiență și confidențialitate.
2454
2455**Blockchain Consortium** — Guvernat de un grup de organizații (R3 Corda, Quorum). Combină transparența parțială cu controlul de acces. Popular în sectorul bancar și logistic.
2456
2457**Blockchain Hibrid** — Combină elemente publice și private. Unele date sunt publice, altele restricționate. Oferă flexibilitate maximă pentru aplicații enterprise.`},{icon:"building",title:"Aplicații Practice ale Blockchain",content:`**Criptomonede și Plăți** — Bitcoin, Ethereum și mii de alte monede digitale permit transferuri de valoare peer-to-peer fără intermediari bancari.
2458
2459**Finanțe Descentralizate (DeFi)** — Împrumuturi, schimburi valutare, asigurări și yield farming — toate fără bănci tradiționale. Piața DeFi gestionează peste 50 miliarde USD.
2460
2461**Supply Chain** — Urmărirea produselor de la producător la consumator. Walmart, Maersk și Nestlé folosesc blockchain pentru trasabilitate alimentară.
2462
2463**Identitate Digitală** — Sisteme de identitate auto-suverană care permit utilizatorilor să controleze propriile date personale fără intermediari.
2464
2465**Sănătate** — Stocarea securizată a dosarelor medicale, verificabilă de orice spital, cu controlul pacientului asupra accesului.
2466
2467**Votul Electronic** — Sisteme de vot transparente și verificabile, imposibil de manipulat, testate deja în Estonia și alte țări.
2468
2469**Proprietate Intelectuală** — Înregistrarea și protejarea drepturilor de autor, brevetelor și licențelor pe blockchain.`},{icon:"zap",title:"Provocări și Viitorul Blockchain",content:`**Scalabilitate** — Blockchain-urile publice procesează mai puține tranzacții decât sistemele centralizate. Soluțiile Layer 2 (Lightning Network, Polygon, Arbitrum) și sharding-ul adresează această limitare.
2470
2471**Interoperabilitate** — Diferitele blockchain-uri nu comunică nativ între ele. Proiecte precum Polkadot, C
2471osmos și Chainlink CCIP construiesc poduri cross-chain.
2472
2473**Reglementare** — Cadrul legal evoluează rapid. Regulamentul MiCA al UE oferă primele reguli clare și armonizate pentru cripto-active în Europa.
2474
2475**Adopție Enterprise** — Companiile mari (JPMorgan, Microsoft, IBM) integrează blockchain în operațiunile lor. Tokenizarea activelor reale (RWA) este trendul major din 2024-2025.
2476
2477**Sustenabilitate** — Trecerea de la Proof of Work la Proof of Stake și surse de energie regenerabilă reduce impactul ecologic al blockchain.
2478
2479**Inteligență Artificială + Blockchain** — Convergența AI și blockchain promite verificabilitatea datelor de antrenament AI, piețe descentralizate de modele și identitate digitală verificabilă.`}],glossary:{title:"Glosar de Termeni Blockchain",terms:[{term:"Bloc",def:"Unitate de date care conține un set de tranzacții validate, un timestamp și hash-ul blocului anterior."},{term:"Hash",def:"Amprentă digitală unică generată printr-o funcție criptografică. Orice modificare a datelor produce un hash complet diferit."},{term:"Nod",def:"Calculator care rulează software-ul blockchain și menține o copie a întregului registru distribuit."},{term:"Miner/Validator",def:"Participant care verifică tranzacțiile și adaugă blocuri noi la lanț, primind recompense pentru acest lucru."},{term:"Consens",def:"Procesul prin care nodurile rețelei ajung la un acord asupra stării curente a blockchain-ului."},{term:"Smart Contract",def:"Program auto-executabil stocat pe blockchain care se activează automat când condițiile predefinite sunt îndeplinite."},{term:"Fork",def:"Bifurcație a blockchain-ului. Hard fork: schimbare incompatibilă. Soft fork: actualizare compatibilă înapoi."},{term:"Layer 1",def:"Blockchain-ul de bază (Bitcoin, Ethereum). Layer 2 sunt protocoale construite deasupra pentru a îmbunătăți performanța."},{term:"Gas Fee",def:"Comisionul plătit pentru procesarea unei tranzacții pe blockchain, variabil în funcție de congestionarea rețelei."},{term:"Token",def:"Activ digital creat pe un blockchain existent. Poate fi fungibil (ERC-20) sau non-fungibil (NFT, ERC-721)."}]},faqs:[{q:"Ce este blockchain pe scurt?",a:"Blockchain este un registru digital distribuit, transparent și imuabil care stochează tranzacții în blocuri legate criptografic. Permite transferul de valoare și informații fără intermediari centrali."},{q:"Care este diferența dintre blockchain și Bitcoin?",a:"Bitcoin este o criptomonedă (aplicație), iar blockchain este tehnologia pe care funcționează. Blockchain poate fi folosit pentru mult mai mult decât criptomonede — supply chain, identitate digitală, vot electronic etc."},{q:"Este blockchain sigur?",a:"Da, blockchain este extrem de sigur datorită criptografiei, descentralizării și mecanismelor de consens. Pentru a compromite un blockchain public, un atacator ar avea nevoie de controlul a peste 51% din rețea — practic imposibil pentru rețele mari."},{q:"Cât de mult energie consumă blockchain?",a:"Depinde de mecanismul de consens. Proof of Work (Bitcoin) consumă multă energie, dar Proof of Stake (Ethereum post-Merge) consumă cu 99.95% mai puțină energie. Tendința generală este spre sustenabilitate."},{q:"Poate fi modificat conținutul unui blockchain?",a:"Nu, aceasta este proprietatea de imuabilitate. Odată ce un bloc este confirmat și adăugat la lanț, conținutul său nu poate fi modificat fără a invalida toate blocurile ulterioare, ceea ce ar necesita consensul majorității rețelei."}],cta:{title:"Continuă să înveți despre Blockchain",description:"Explorează cursurile noastre din EduWeb Academy și articolele despre blockchain, smart contracts și aplicații descentralizate.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Blockchain",path:"/blockchain"},{label:"Ce este Blockchain",path:"/ce-este-blockchain"}]},en:{title:"What is Blockchain? Complete Beginner's Guide (2025)",metaTitle:"What is Blockchain? Complete Guide — Technology, Types & Applications",metaDescription:"Learn what blockchain is, how it works, blockchain types (public, private, consortium) and practical applications in finance, supply chain and digital identity.",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Blockchain?",subheading:"Complete guide to distributed ledger technology",intro:'Blockchain is a distributed ledger technology (DLT) that enables the storage and transmission of information in a transparent, secure, and decentralized way. Each "block" contains a set of verified transactions, and blocks are cryptographically linked together, forming an immutable "chain."'},sections:[{icon:"blocks",title:"How Does Blockchain Work?",content:`**1. The Transaction** — A user initiates a transaction (e.g., sends Bitcoin). It is broadcast to the network of nodes (computers) distributed worldwide.
2480
2481**2. Validation** — Nodes verify the transaction using consensus rules (Proof of Work, Proof of Stake, or other mechanisms). Invalid transactions are automatically rejected.
2482
2483**3. The Block** — Validated transactions are grouped into a new block. Each block contains a cryptographic hash of the previous block, a t
2483imestamp, and transaction data.
2484
2485**4. The Chain** — The new block is added to the existing chain. Once recorded, the content cannot be modified without invalidating all subsequent blocks — this is the immutability property.
2486
2487**5. Distribution** — The updated copy of the blockchain is synchronized across all nodes in the network, ensuring transparency and attack resistance.`},{icon:"shield",title:"Fundamental Properties of Blockchain",content:`**Decentralization** — There is no central authority controlling the network. Decision-making power is distributed among all participants, eliminating single points of failure.
2488
2489**Immutability** — Once data is recorded in a confirmed block, it cannot be modified or deleted. This ensures the integrity of the complete transaction history.
2490
2491**Transparency** — All transactions are publicly visible (on public blockchains). Anyone can verify and audit the records.
2492
2493**Cryptographic Security** — Each block is linked to the previous one through cryptographic hash functions (SHA-256 for Bitcoin). Modifying a block would require recalculating all subsequent blocks.
2494
2495**Consensus** — The network operates through consensus mechanisms that ensure all participants agree on the current state of the ledger.`},{icon:"pickaxe",title:"Consensus Mechanisms: PoW vs PoS",content:`**Proof of Work (PoW)** — The original mechanism used by Bitcoin. Miners solve complex mathematical problems to validate transactions and create new blocks. Extremely secure but energy-intensive.
2496
2497**Proof of Stake (PoS)** — The energy-efficient alternative, adopted by Ethereum in 2022. Validators "stake" their own coins as collateral. Consumes 99.95% less energy than PoW.
2498
2499**Delegated Proof of Stake (DPoS)** — A democratic variant where token holders vote for a limited number of validators. Used by EOS and Tron.
2500
2501**Proof of Authority (PoA)** — Used in private blockchains, where validators are pre-approved trusted entities. Fast and efficient, but more centralized.
2502
2503**Proof of History (PoH)** — Solana's innovative mechanism that adds a verifiable cryptographic timestamp, enabling processing of tens of thousands of transactions per second.`},{icon:"cpu",title:"Types of Blockchain",content:`**Public Blockchain** — Open to anyone (Bitcoin, Ethereum). Anyone can read, write, and participate in validation. Most decentralized and transparent, but slower.
2504
2505**Private Blockchain** — Controlled by a single organization (Hyperledger Fabric). Access is restricted. Used in corporate environments for efficiency and confidentiality.
2506
2507**Consortium Blockchain** — Governed by a group of organizations (R3 Corda, Quorum). Combines partial transparency with access control. Popular in banking and logistics.
2508
2509**Hybrid Blockchain** — Combines public and private elements. Some data is public, other data is restricted. Offers maximum flexibility for enterprise applications.`},{icon:"building",title:"Practical Applications of Blockchain",content:`**Cryptocurrencies and Payments** — Bitcoin, Ethereum, and thousands of other digital currencies enable peer-to-peer value transfers without banking intermediaries.
2510
2511**Decentralized Finance (DeFi)** — Loans, currency exchanges, insurance, and yield farming — all without traditional banks. The DeFi market manages over $50 billion.
2512
2513**Supply Chain** — Tracking products from manufacturer to consumer. Walmart, Maersk, and Nestlé use blockchain for food traceability.
2514
2515**Digital Identity** — Self-sovereign identity systems that allow users to control their own personal data without intermediaries.
2516
2517**Healthcare** — Secure storage of medical records, verifiable by any hospital, with patient control over access.
2518
2519**Electronic Voting** — Transparent and verifiable voting systems, impossible to manipulate, already tested in Estonia and other countries.
2520
2521**Intellectual Property** — Registration and protection of copyrights, patents, and licenses on blockchain.`},{icon:"zap",title:"Challenges and the Future of Blockchain",content:`**Scalability** — Public blockchains process fewer transactions than centralized systems. Layer 2 solutions (Lightning Network, Polygon, Arbitrum) and sharding address this limitation.
2522
2523**Interoperability** — Different blockchains don't natively communicate with each other. Projects like Polkadot, C
2523osmos, and Chainlink CCIP are building cross-chain bridges.
2524
2525**Regulation** — The legal framework is evolving rapidly. The EU's MiCA regulation provides the first clear and harmonized rules for crypto-assets in Europe.
2526
2527**Enterprise Adoption** — Major companies (JPMorgan, Microsoft, IBM) are integrating blockchain into their operations. Tokenization of real-world assets (RWA) is the major trend in 2024-2025.
2528
2529**Sustainability** — The shift from Proof of Work to Proof of Stake and renewable energy sources reduces blockchain's ecological impact.
2530
2531**AI + Blockchain** — The convergence of AI and blockchain promises verifiability of AI training data, decentralized model marketplaces, and verifiable digital identity.`}],glossary:{title:"Blockchain Glossary",terms:[{term:"Block",def:"A unit of data containing a set of validated transactions, a timestamp, and the hash of the previous block."},{term:"Hash",def:"A unique digital fingerprint generated through a cryptographic function. Any data modification produces a completely different hash."},{term:"Node",def:"A computer running blockchain software and maintaining a copy of the entire distributed ledger."},{term:"Miner/Validator",def:"A participant who verifies transactions and adds new blocks to the chain, receiving rewards for doing so."},{term:"Consensus",def:"The process by which network nodes reach agreement on the current state of the blockchain."},{term:"Smart Contract",def:"A self-executing program stored on blockchain that automatically activates when predefined conditions are met."},{term:"Fork",def:"A blockchain split. Hard fork: incompatible change. Soft fork: backward-compatible update."},{term:"Layer 1",def:"The base blockchain (Bitcoin, Ethereum). Layer 2 protocols are built on top to improve performance."},{term:"Gas Fee",def:"The fee paid for processing a transaction on blockchain, variable based on network congestion."},{term:"Token",def:"A digital asset created on an existing blockchain. Can be fungible (ERC-20) or non-fungible (NFT, ERC-721)."}]},faqs:[{q:"What is blockchain in simple terms?",a:"Blockchain is a distributed, transparent, and immutable digital ledger that stores transactions in cryptographically linked blocks. It enables the transfer of value and information without central intermediaries."},{q:"What is the difference between blockchain and Bitcoin?",a:"Bitcoin is a cryptocurrency (application), and blockchain is the technology it runs on. Blockchain can be used for much more than cryptocurrencies — supply chain, digital identity, electronic voting, etc."},{q:"Is blockchain secure?",a:"Yes, blockchain is extremely secure due to cryptography, decentralization, and consensus mechanisms. To compromise a public blockchain, an attacker would need control of over 51% of the network — practically impossible for large networks."},{q:"How much energy does blockchain consume?",a:"It depends on the consensus mechanism. Proof of Work (Bitcoin) consumes a lot of energy, but Proof of Stake (Ethereum post-Merge) consumes 99.95% less energy. The general trend is toward sustainability."},{q:"Can blockchain content be modified?",a:"No, this is the immutability property. Once a block is confirmed and added to the chain, its content cannot be modified without invalidating all subsequent blocks, which would require consensus from the network majority."}],cta:{title:"Continue Learning About Blockchain",description:"Explore our courses at EduWeb Academy and articles about blockchain, smart contracts, and decentralized applications.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Blockchain",path:"/blockchain"},{label:"What is Blockchain",path:"/what-is-blockchain"}]}},BSt={blocks:s.jsx(es,{size:24}),shield:s.jsx(pi,{size:24}),pickaxe:s.jsx(lle,{size:24}),cpu:s.jsx(Mv,{size:24}),building:s.jsx(L0,{size:24}),zap:s.jsx(ts,{size:24})};function TSt(e){return e.split(`
2532
2533`).filter(Boolean).map((r,n)=>{const i=r.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>");return s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4 last:mb-0",dangerouslySetInnerHTML:{__html:i}},n)})}function Ate(){const{lang:e}=Pt(),r=p3(),n=pte[e]||pte.ro;
2533Zr({title:n.metaTitle,description:n.metaDescription});const i=e==="en"?"https://eduweb.ai":"https://eduweb.ro",a=e==="en"?"/what-is-blockchain":"/ce-este-blockchain",o={"@context":"https://schema.org","@type":"Article",headline:n.title,description:n.metaDescription,author:{"@type":"Organization",name:"EduWeb",url:i},publisher:{"@type":"Organization",name:"EduWeb",logo:{"@type":"ImageObject",url:`${i}/favicon.png`}},mainEntityOfPage:{"@type":"WebPage","@id":`${i}${a}`},datePublished:"2025-03-08",dateModified:"2025-03-08",inLanguage:e==="en"?"en":"ro"},l={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.faqs.map(u=>({"@type":"Question",name:u.q,acceptedAnswer:{"@type":"Answer",text:u.a}}))},c={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:n.breadcrumbs.map((u,d)=>({"@type":"ListItem",position:d+1,name:u.label,item:`${i}${u.path}`}))};return s.jsxs(Ft,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(o)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(c)}}),s.jsx("div",{className:"container pt-6 pb-2",children:s.jsx("nav",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:n.breadcrumbs.map((u,d)=>s.jsxs("span",{className:"flex items-center gap-1.5",children:[d>0&&s.jsx("span",{children:"/"}),d<n.breadcrumbs.length-1?s.jsx(be,{to:u.path,className:"hover:text-primary transition-colors",children:u.label}):s.jsx("span",{className:"text-foreground font-medium",children:u.label})]},u.path))})}),s.jsxs("div",{className:"cat-blockchain relative overflow-hidden border-b border-border/30",children:[s.jsx("div",{className:"absolute inset-0 hero-gradient"}),s.jsx("div",{className:"absolute inset-0 grid-bg opacity-[0.04]"}),s.jsx("div",{className:"container relative z-10 py-14 md:py-20",children:s.jsxs("div",{className:"flex items-center gap-8 lg:gap-12",children:[s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"max-w-3xl flex-1",children:[s.jsx("span",{className:"inline-block px-3 py-1 rounded-full bg-primary/10 text-primary text-xs font-semibold tracking-widest mb-4",children:n.hero.badge}),s.jsx("h1",{className:"font-heading text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight mb-4 text-foreground",children:n.hero.heading}),s.jsx("p",{className:"text-xl md:text-2xl text-muted-foreground font-medium mb-6",children:n.hero.subheading}),s.jsx("p",{className:"text-lg text-foreground/80 leading-relaxed max-w-2xl",children:bu(n.hero.intro)})]}),s.jsx(Le.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.7,delay:.2},className:"hidden lg:block w-64 xl:w-80 shrink-0",children:s.jsx("img",{src:Sz,alt:n.hero.heading,className:"w-full rounded-2xl shadow-2xl",loading:"eager"})})]})})]}),s.jsx("article",{className:"container py-12 md:py-16",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] gap-12",children:[s.jsxs("div",{className:"space-y-12",children:[n.sections.map((u,d)=>s.jsxs(Le.section,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.5,delay:d*.05},children:[s.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center text-primary shrink-0 mt-0.5",children:BSt[u.icon]}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:u.title})]}),s.jsx("div",{className:"ml-16",children:TSt(u.content)})]},d)),s.jsxs(Le.section,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center text-primary shrink-0",children:s.jsx(yr,{size:24})}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:n.glossary.title})]}),s.jsx("div",{className:"ml-16 grid grid-cols-1 sm:grid-cols-2 gap-4",children:n.glossary.terms.map(u=>{const d=r.get(u.term.toLowerCase());return s.jsxs("div",{className:"glass-card rounded-xl p-4",children:[s.jsx("dt",{className:"font-heading font-bold text-sm text-primary mb-1",children:d?s.jsx(be,{to:`/glosar/${d}`,className:"hover:underline",children:u.term}):u.term}),s.jsx("dd",{className:"text-sm text-muted-foreground leading-relaxed",children:u.def})]},u.term)})})]}),s.jsxs(Le.section,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground mb-6",children:e==="en"?"Frequently Asked Questions":"Întrebăr
2533i Frecvente"}),s.jsx(lo,{type:"single",collapsible:!0,className:"space-y-2",children:n.faqs.map((u,d)=>s.jsxs(Os,{value:`faq-${d}`,className:"glass-card rounded-xl px-5 border-none",children:[s.jsx(Ls,{className:"text-left font-heading font-semibold text-foreground hover:text-primary py-4",children:u.q}),s.jsx(Rs,{className:"text-muted-foreground leading-relaxed pb-4",children:u.a})]},d))})]}),s.jsxs(Le.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"glass-card rounded-2xl p-8 text-center",children:[s.jsx("h3",{className:"font-heading text-2xl font-bold text-foreground mb-3",children:n.cta.title}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-lg mx-auto",children:n.cta.description}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 px-6 py-3 rounded-xl bg-primary text-primary-foreground font-semibold hover:bg-primary/90 transition-colors",children:[n.cta.button," ",s.jsx(Gt,{size:18})]})]}),s.jsx(Kv,{topics:["blockchain","web3"]})]}),s.jsx("aside",{className:"hidden lg:block space-y-6",children:s.jsxs("div",{className:"sticky top-24 space-y-6",children:[s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:e==="en"?"Table of Contents":"Cuprins"}),s.jsxs("nav",{className:"space-y-2",children:[n.sections.map((u,d)=>s.jsx("a",{href:`#section-${d}`,className:"block text-sm text-muted-foreground hover:text-primary transition-colors leading-snug",children:u.title},d)),s.jsx("a",{href:"#glossary",className:"block text-sm text-muted-foreground hover:text-primary transition-colors",children:n.glossary.title}),s.jsx("a",{href:"#faqs",className:"block text-sm text-muted-foreground hover:text-primary transition-colors",children:e==="en"?"FAQs":"Întrebări Frecvente"})]})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:e==="en"?"Related Topics":"Tematici Conexe"}),s.jsx("div",{className:"space-y-2",children:[{label:"Web3",path:"/web3",icon:s.jsx(Dr,{size:14})},{label:"NFT",path:"/nft",icon:s.jsx(pi,{size:14})},{label:e==="en"?"What is Web3":"Ce este Web3",path:e==="en"?"/what-is-web3":"/ce-este-web3",icon:s.jsx(Dr,{size:14})}].map(u=>s.jsxs(be,{to:u.path,className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:[s.jsx("span",{className:"text-primary",children:u.icon}),u.label,s.jsx(Yr,{size:12,className:"ml-auto opacity-50"})]},u.path))})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:e==="en"?"Crypto Prices":"Prețuri Crypto"}),s.jsxs("div",{className:"space-y-1",children:[[{label:"Bitcoin (BTC)",path:"/bitcoin-pret-azi"},{label:"Ethereum (ETH)",path:"/ethereum-pret-ron"},{label:"Solana (SOL)",path:"/solana-pret-azi"}].map(u=>s.jsx(be,{to:u.path,className:"block px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:u.label},u.path)),s.jsx(be,{to:"/crypto",className:"block px-3 py-2 rounded-lg text-sm text-primary hover:underline font-medium",children:e==="en"?"View All →":"Vezi toate →"})]})]})]})})]})})]})}const PSt={globe:s.jsx(Dr,{size:24}),blocks:s.jsx(es,{size:24}),shield:s.jsx(pi,{size:24}),users:s.jsx(Rn,{size:24}),zap:s.jsx(ts,{size:24}),cpu:s.jsx(Mv,{size:24}),building:s.jsx(L0,{size:24}),pickaxe:s.jsx(lle,{size:24}),trending:s.jsx(oa,{size:24}),coins:s.jsx(Wi,{size:24}),network:s.jsx(l4,{size:24}),lock:s.jsx(JA,{size:24}),layers:s.jsx(op,{size:24}),dollar:s.jsx(VSe,{size:24}),gauge:s.jsx(tke,{size:24}),database:s.jsx(E2,{size:24}),link:s.jsx(ake,{size:24}),workflow:s.jsx(gle,{size:24}),bot:s.jsx(Ec,{size:24}),chart:s.jsx(Eo,{size:24}),landmark:s.jsx(Zh,{size:24}),scale:s.jsx(Ake,{size:24}),heart:s.jsx(OU,{size:24}),rocket:s.jsx(uE,{size:24}),award:s.jsx(oo,{size:24}),target:s.jsx(Uv,{size:24}),filecheck:s.jsx(JSe,{size:24}),shieldcheck:s.jsx(u4,{size:24})};function ISt(e){return e.split(`
2534
2535`).filter(Boolean).map((r,n)=>{const i=r.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>");return s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4 last:mb-0",dangerouslySetInnerHTML:{__html:i}},n)})}function Bbe({content:e,canonicalPathRo:r,canonicalPathEn:n,heroImage:i}){var C,N,S,E,O,B,T,F,I,D,L,V,U;const{lang:a}=Pt(),o=e[a]||e.ro,l=Kr(),[c,u]=w.useState(!1),d=r.replace(/^\//,"");Zr({title:o.metaTitle,description:o.metaDescription});const h=a==="en"?"https://eduweb.ai":"https://eduweb.ro",f=a==="en"?n:r,p=`pillar-${d}`,{data:m}=Xe({queryKey:["pillar-audio",p,a],queryFn:async()=>{const{data:Q,error:$}=await G.from("glossary_audio").select("*").eq("slug",p).eq("lang",a).single();return $?null:Q}}),A=(m==null?void 0:m.status)==="ready"&&(m==null?void 0:m.audio_url),g=A&&(m!=null&&m.script_json)?m.script_json:{hook:o.hero.heading,section1:((N=(C=o.sections[0])==null?void 0:C.content.split(`
2536
2537`)[0])==null?void 0:N.replace(/\*\*(.*?)\*\*/g,"$1").slice(0,200))||"",section2:((E=(S=o.sections[1])==null?void 0:S.content.split(`
2538
2539`)[0])==null?void 0:E.replace(/\*\*(.*?)\*\*/g,"$1").slice(0,200))||"",section3:((B=(O=o.sections[2])==null?void 0:O.content.split(`
2540
2541`)[0])==null?void 0:B.replace(/\*\*(.*?)\*\*/g,"$1").slice(0,200))||"",closing:a==="en"?"Learn more on EduWeb":"Află mai mult pe EduWeb"},y=w.useCallback(async()=>{var Q,$,q,M,z,K;u(!0);try{const ne=[o.hero.heading+". "+o.hero.subheading+".",(($=(Q=o.sections[0])==null?void 0:Q.content.split(`
2542
2543`)[0])==null?void 0:$.replace(/\*\*(.*?)\*\*/g,"$1"))||"",((M=(q=o.sections[1])==null?void 0:q.content.split(`
2544
2545`)[0])==null?void 0:M.replace(/\*\*(.*?)\*\*/g,"$1"))||"",((K=(z=o.sections[2])==null?void 0:z.content.split(`
2546
2547`)[0])==null?void 0:K.replace(/\*\*(.*?)\*\*/g,"$1"))||"",a==="en"?"Learn more on EduWeb.":"Află mai mult pe EduWeb."].join(" "),{data:ie,error:X}=await G.functions.invoke("generate-glossary-audio",{body:{slug:p,lang:a,term:o.hero.heading,short_def:o.hero.subheading,full_content:ne}});if(X)throw X;if(!(ie!=null&&ie.success))throw new Error((ie==null?void 0:ie.error)||"Generation failed");l.invalidateQueries({queryKey:["pillar-audio",p,a]}),ft.success(a==="en"?"Audio generated!":"Audio generat!")}catch(ne){console.error("Pillar audio generation error:",ne),ft.error(a==="en"?"Failed to generate audio":"Eroare la generarea audio")}finally{u(!1)}},[o,p,a,l]),x={"@context":"https://schema.org","@type":"Article",headline:o.title,de
2547scription:o.metaDescription,author:{"@type":"Organization",name:"EduWeb",url:h},publisher:{"@type":"Organization",name:"EduWeb",logo:{"@type":"ImageObject",url:`${h}/favicon.png`}},mainEntityOfPage:{"@type":"WebPage","@id":`${h}${f}`},datePublished:"2025-03-08",dateModified:"2026-03-08",inLanguage:a==="en"?"en":"ro"},b={"@context":"https://schema.org","@type":"FAQPage",mainEntity:o.faqs.map(Q=>({"@type":"Question",name:Q.q,acceptedAnswer:{"@type":"Answer",text:Q.a}}))},v={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:o.breadcrumbs.map((Q,$)=>({"@type":"ListItem",position:$+1,name:Q.label,item:`${h}${Q.path}`}))},j=p3(),_=o.relatedTopics||[{label:"Blockchain",path:"/blockchain"},{label:"Web3",path:"/web3"},{label:"AI & AI Agents",path:"/ai"}];return s.jsxs(Ft,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(x)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(b)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(v)}}),s.jsx("div",{className:"container pt-6 pb-2",children:s.jsx("nav",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:o.breadcrumbs.map((Q,$)=>s.jsxs("span",{className:"flex items-center gap-1.5",children:[$>0&&s.jsx("span",{children:"/"}),$<o.breadcrumbs.length-1?s.jsx(be,{to:Q.path,className:"hover:text-primary transition-colors",children:Q.label}):s.jsx("span",{className:"text-foreground font-medium",children:Q.label})]},Q.path))})}),s.jsxs("div",{className:`${o.heroClass||"cat-blockchain"} relative overflow-hidden border-b border-border/30`,children:[s.jsx("div",{className:"absolute inset-0 hero-gradient"}),s.jsx("div",{className:"absolute inset-0 grid-bg opacity-[0.04]"}),s.jsx("div",{className:"container relative z-10 py-14 md:py-20",children:s.jsxs("div",{className:"flex items-center gap-8 lg:gap-12",children:[s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"max-w-3xl flex-1",children:[s.jsx("span",{className:"inline-block px-3 py-1 rounded-full bg-primary/10 text-primary text-xs font-semibold tracking-widest mb-4",children:o.hero.badge}),s.jsx("h1",{className:"font-heading text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight mb-4 text-foreground",children:o.hero.heading}),s.jsx("p",{className:"text-xl md:text-2xl text-muted-foreground font-medium mb-6",children:o.hero.subheading}),s.jsx("p",{className:"text-lg text-foreground/80 leading-relaxed max-w-2xl",children:bu(o.hero.intro)})]}),i&&s.jsx(Le.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.7,delay:.2},className:"hidden lg:block w-64 xl:w-80 shrink-0",children:s.jsx("img",{src:i,alt:o.hero.heading,className:"w-full rounded-2xl shadow-2xl",loading:"eager"})})]})})]}),s.jsx("article",{className:"container py-12 md:py-16",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] gap-12",children:[s.jsxs("div",{className:"space-y-12",children:[s.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4},children:s.jsx(fp,{script:g,audioUrl:A?m.audio_url:"",duration:A&&m.duration_seconds||60,topic:((T=o.courseTopics)==null?void 0:T[0])||"blockchain",postId:p,postTitle:o.title,onDemandGenerate:A?void 0:y,isGenerating:c,sectionLabels:a==="en"?["",((F=o.sections[0])==null?void 0:F.title)||"Overview",((I=o.sections[1])==null?void 0:I.title)||"How it works",((D=o.sections[2])==null?void 0:D.title)||"Why it matters"]:["",((L=o.sections[0])==null?void 0:L.title)||"Prezentare",((V=o.sections[1])==null?void 0:V.title)||"Cum funcționează",((U=o.sections[2])==null?void 0:U.title)||"De ce contează"]})}),o.sections.map((Q,$)=>s.jsxs(Le.section,{id:`section-${$}`,initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.5,delay:$*.05},children:[s.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center text-primary shrink-0 mt-0.5",children:PSt[Q.icon]||s.jsx(es,{size:24})}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:Q.title})]}),s.jsx("div",{className:"ml-16",children:ISt(Q.content)})]},$)),s.jsxs(Le.section,{id:"glossary",initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center text-primary shrink-0",children:s.jsx(yr,{size:24})}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:o.glossary.title})]}),s.jsx("div",{className:"ml-16 grid grid-cols-1 sm:grid-cols-2 gap-4",children:o.glossary.terms.map(Q=>{const $=j.get(Q.term.toLowerCase());return s.jsxs("div",{className:"glass-card rounded-xl p-4",children:[s.jsx("dt",{className:"font-heading font-bold text-sm text-primary mb-1",children:$?s.jsx(be,{to:`/glosar/${$}`,className:"hover:underline",children:Q.term}):Q.term}),s.jsx("dd",{className:"text-sm text-muted-foreground leading-relaxed",children:Q.def})]},Q.term)})})]}),s.jsxs(Le.section,{id:"faqs",initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground mb-6",children:a==="en"?"Frequently Asked Questions":"Întrebăr
2547i Frecvente"}),s.jsx(lo,{type:"single",collapsible:!0,className:"space-y-2",children:o.faqs.map((Q,$)=>s.jsxs(Os,{value:`faq-${$}`,className:"glass-card rounded-xl px-5 border-none",children:[s.jsx(Ls,{className:"text-left font-heading font-semibold text-foreground hover:text-primary py-4",children:Q.q}),s.jsx(Rs,{className:"text-muted-foreground leading-relaxed pb-4",children:Q.a})]},$))})]}),s.jsxs(Le.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"glass-card rounded-2xl p-8 text-center",children:[s.jsx("h3",{className:"font-heading text-2xl font-bold text-foreground mb-3",children:o.cta.title}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-lg mx-auto",children:o.cta.description}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 px-6 py-3 rounded-xl bg-primary text-primary-foreground font-semibold hover:bg-primary/90 transition-colors",children:[o.cta.button," ",s.jsx(Gt,{size:18})]})]}),s.jsx(Kv,{topics:o.courseTopics||["blockchain","web3"]})]}),s.jsx("aside",{className:"hidden lg:block space-y-6",children:s.jsxs("div",{className:"sticky top-24 space-y-6",children:[s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:a==="en"?"Table of Contents":"Cuprins"}),s.jsxs("nav",{className:"space-y-2",children:[o.sections.map((Q,$)=>s.jsx("a",{href:`#section-${$}`,className:"block text-sm text-muted-foreground hover:text-primary transition-colors leading-snug",children:Q.title},$)),s.jsx("a",{href:"#glossary",className:"block text-sm text-muted-foreground hover:text-primary transition-colors",children:o.glossary.title}),s.jsx("a",{href:"#faqs",className:"block text-sm text-muted-foreground hover:text-primary transition-colors",children:a==="en"?"FAQs":"Întrebări Frecvente"})]})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:a==="en"?"Related Topics":"Tematici Conexe"}),s.jsx("div",{className:"space-y-2",children:_.map(Q=>s.jsxs(be,{to:Q.path,className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:[s.jsx("span",{className:"text-primary",children:s.jsx(es,{size:14})}),Q.label,s.jsx(Yr,{size:12,className:"ml-auto opacity-50"})]},Q.path))})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:a==="en"?"Crypto Prices":"Prețuri Crypto"}),s.jsxs("div",{className:"space-y-1",children:[[{label:"Bitcoin (BTC)",path:"/bitcoin-pret-azi"},{label:"Ethereum (ETH)",path:"/ethereum-pret-ron"},{label:"Solana (SOL)",path:"/solana-pret-azi"}].map(Q=>s.jsx(be,{to:Q.path,className:"block px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:Q.label},Q.path)),s.jsx(be,{to:"/crypto",className:"block px-3 py-2 rounded-lg text-sm text-primary hover:underline font-medium",children:a==="en"?"View All →":"Vezi toate →"})]})]})]})})]})})]})}const Tbe="/assets/ce-este-bitcoin-BMfKh4rg.jpg",Pbe="/assets/ce-este-ethereum-Dt_X6hmd.jpg",Ibe="/assets/ce-este-solana-BZ-loUtL.jpg",Fbe="/assets/ce-este-bnb-DzyUFwoW.jpg",Obe="/assets/ce-este-xrp-BnhXxnOC.jpg",Lbe="/assets/ce-este-cardano-B7k5Lk-5.jpg",Rbe="/assets/ce-este-dogecoin-D6ncNM29.jpg",Dbe="/assets/ce-este-polkadot-DiYSNCn-.jpg",Mbe="/assets/ce-este-avalanche-ChBXo4K9.jpg",zbe="/assets/ce-este-chainlink-U8y0JpyX.jpg",FSt={"ce-este-bitcoin":Tbe,"ce-este-ethereum":Pbe,"ce-este-solana":Ibe,"ce-este-bnb":Fbe,"ce-este-xrp":Obe,"ce-este-cardano":Lbe,"ce-este-dogecoin":Rbe,"ce-este-polkadot":Dbe,"ce-este-avalanche":Mbe,"ce-este-chainlink":zbe};function ja(){const{pathname:e}=ps(),r=e.replace(/^\//,""),n=sQe(r);return n?s.jsx(Bbe,{content:n.content,canonicalPathRo:`/${n.slugRo}`,canonicalPathEn:`/${n.slugEn}`,heroImage:FSt[n.slugRo]}):s.jsx(xd,{to:"/crypto",replace:!0})}const kz="/assets/ce-este-crypto-4u2vXrme.jpg",gte={ro:{title:"Ce este Crypto? Ghid Complet despre Criptomonede (2025)",metaTitle:"Ce este Crypto? Ghid Complet — Definiție, Tipuri & Cum Funcționează",metaDescription:"Află ce sunt criptomonedele, cum funcționează, care sunt tipurile principale (Bitcoin, Ethereum, stablecoins) și cum poți începe să le folosești în siguranță.",hero:{badge:"GHID EDUCAȚIONAL",heading:"Ce este Crypto?",subheading:"Ghid complet despre criptomonede pentru începători",intro:"Criptomonedele (crypto) sunt active digitale bazate pe tehnologia blockchain, concepute pentru a funcționa ca mijloc de schimb, rezervă de valoare sau instrument de acces la aplicații descentralizate. Spre deosebire de monedele tradiționale emise de bănci centrale, criptomonedele sunt descentralizate și securizate prin criptografie."},sections:[{icon:"landmark",title:"Ce Sunt Criptomonedele?",content:`**Definiție simplă** — O criptomonedă este o monedă digitală care folosește criptografia pentru a securiza tranzacțiile și a controla crearea de noi unități. Funcționează pe o rețea descentralizată (blockchain), fără a necesita o autoritate centrală precum o bancă sau un guvern.
2548
2549**Prima criptomonedă** — Bitcoin (BTC) a fost lansată în 2009 de Satoshi Nakamoto, un creator anonim. De atunci, au apărut mii de alte criptomonede, fiecare cu scopuri și mecanisme diferite.
2550
2551**Diferența față de banii tradiționali** — Monedele fiat (RON, EUR, USD) sunt emise și controlate de bănci centrale. Criptomonedele sunt create prin algoritmi matematici și gestionate de rețele distribuite de calculatoare din întreaga lume.`},{icon:"blocks",title:"Cum Funcționează Criptomonedele?",content:`**Blockchain** — Fiecare criptomonedă funcționează pe un blockchain — un registru digital distribuit care înregistrează toate tranzacțiile într-un mod transparent și imuabil.
2552
2553**Wallet-uri (Portofele digitale)** — Pentru a deține și trimite criptomonede, ai nevoie de un portofel digital. Acesta conține cheile criptografice (publică și privată) care îți permit să accesezi fondurile.
2554
2555**Mining și Staking** — Noile monede sunt create prin mining (Proof of Work — rezolvarea de probleme matematice complexe) sau staking (Proof of Stake — blocarea monedelor existente ca garanție).
2556
2557**Tranzacțiile** — Când trimiți crypto, tranzacția este transmisă rețelei, verificată de noduri și adăugată permanent pe blockchain. Nu poate fi anulată sau modificată.
2558
2559**Oferta limitată** — Multe criptomonede au o ofertă maximă predefinită (ex: Bitcoin are doar 21 milioane de monede), ceea ce le diferențiază de monedele fiat care pot fi tipărite fără limită.`},{icon:"trending",title:"Tipuri de Criptomonede",content:`**Bitcoin (BTC)** — Prima și cea mai cunoscută criptomonedă, folosită ca rezervă de valoare și „aur digital". Are o ofertă maximă de 21 milioane de monede.
2560
2561**Ethereum (ETH)** — A doua ca mărime, permite rularea de smart contracts și aplicații descentralizate (DApps). Este baza ecosistemului DeFi și NFT.
2562
2563**Stablecoins** — Criptomonede ancorate la monede fiat (ex: USDT, USDC sunt legate de dolarul american). Oferă stabilitate de preț și sunt folosite frecvent în tranzacții și DeFi.
2564
2565**Altcoins** — Toate criptomonedele în afară de Bitcoin. Include proiecte ca Solana (viteză), Cardano (cercetare academică), Polkadot (interoperabilitate) și Chainlink (oracole de date).
2566
2567**Meme coins** — Criptomonede create inițial ca glume (Dogecoin, Shiba Inu), dar care au căpătat comunități mari. Au volatilitate ridicată și risc speculativ.
2568
2569**Utility tokens** — Tokenuri care oferă acces la servicii specifice într-un ecosistem (ex: BNB pentru reduceri pe Binance, LINK pentru servicii Chainlink).`},{icon:"shield",title:"Securitate și Riscuri",content:`**Volatilitate** — Prețurile criptomonedelor pot fluctua dramatic în perioade scurte. Bitcoin a variat de la $69.000 la $16.000 și înapoi la peste $100.000 în câțiva ani.
2570
2571**Securitatea portofelului** — Cheia privată este singura modalitate de a accesa fondurile. Dacă o pierzi, pierzi accesul permanent. Niciodată nu partaja seed phrase-ul cu nimeni.
2572
2573**Scam-uri și fraude** — Schemele Ponzi, rug pull-uri (abandonarea unui proiect după atragerea fondurilor) și phishing-ul sunt riscuri reale. Verifică întotdeauna legitimitatea unui proiect.
2574
2575**Reglementare** — Cadrul legal variază pe glob. UE a adoptat MiCA (Markets in Crypto-Assets), România urmând regulile europene. Tranzacțiile crypto sunt impozabile.
2576
2577**Custodie** — Poți păstra crypto pe un exchange centralizat (mai ușor, dar depinzi de platformă) sau într-un wallet personal (mai sigur, dar responsabilitate totală).`},{icon:"wallet",title:"Cum Poți Începe cu Criptomonedele",content:`**1. Educă-te** — Înainte de a investi, înțelege tehnologia, riscurile și mecanismele din spatele criptomonedelor. Resurse gratuite precum EduWeb Academy sunt un punct excelent de start.
2578
2579**2. Alege un exchange** — Platformele de schimb (Binance, Kraken, Coinbase) îți permit să cumperi criptomonede cu monedă fiat (RON, EUR). Verifică-le reputația și reglementarea.
2580
2581**3. Creează un wallet** — Pentru sume mici, wallet-ul exchange-ului este suficient. Pentru sume mai mari, folosește un hardware wallet (Ledger, Trezor) pentru securitate maximă.
2582
2583**4. Începe mic** — Nu investi mai mult decât îți permiți să pierzi. Strategia DCA (Dollar Cost Averaging) — cumpărarea regulată de sume mici — reduce riscul de timing.
2584
2585**5. Verifică sursele** — Urmează știrile din surse de încredere, nu influenceri pe social media. Fii sceptic față de promisiunile de câștiguri garantate.`},{icon:"zap",title:"Viitorul Criptomonedelor",content:`**Adopție instituțională** — Companii mari (BlackRock, Fidelity) au lansat ETF-uri pe Bitcoin. Băncile explorează integrarea crypto în serviciile lor tradiționale.
2586
2587**CBDC-uri** — Băncile centrale dezvoltă propriile monede digitale (euro digital, yuan digital). Acestea nu sunt criptomonede descentralizate, dar folosesc tehnologie similară.
2588
2589**DeFi și Real World Assets** — Tokenizarea activelor reale (imobiliare, acțiuni, obligațiuni) pe blockchain promite să democratizeze accesul la investiții.
2590
2591**Scalabilitate** — Soluțiile Layer 2 și noile protocoale fac tranzacțiile mai rapide și mai ieftine, apropiindu-se de experiența plăților tradiționale.
2592
2593**Reglementare globală** — Cadrul regulamentar devine mai clar, oferind protecție investitorilor și legitimitate industriei, dar și provocări pentru proiectele care operează la limita legii.`}],glossary:{title:"Glosar Crypto Esențial",terms:[{term:"Bitcoin (BTC)",def:'Prima criptomonedă descentralizată, creată în 2009 de Satoshi Nakamoto. Funcționează ca „aur digital".'},{term:"Altcoin",def:"Orice criptomonedă în afara Bitcoin-ului. Include Ethereum, Solana, Cardano etc."},{term:"Wallet",def:"Portofel digital care stochează cheile criptografice necesare pentru a accesa criptomonedele."},{term:"Mining",def:"Procesul de validare a tranzacțiilor și creare de noi monede prin rezolvarea de probleme matematice complexe."},{term:"Staking",def:"Blocarea criptomonedelor ca garanție pentru a participa la validarea tranzacțiilor și a primi recompense."},{term:"DeFi",def:"Finanțe Descentralizate — servicii financiare (împrumuturi, schimburi) construite pe blockchain, fără intermediari."},{term:"Stablecoin",def:"Criptomonedă al cărei preț este ancorat la un activ stabil, precum dolarul american (ex: USDT, USDC)."},{term:"Gas Fee",def:"Comisionul plătit pentru procesarea unei tranzacții pe un blockchain (cel mai cunoscut pe Ethereum)."},{term:"Seed Phrase",def:"Secvență de 12-24 cuvinte care permite recuperarea unui portofel crypto. Trebuie păstrată în siguranță absolută."},{term:"HODL",def:"Termen din comunitatea crypto care înseamnă a păstra criptomonedele pe termen lung, indiferent de fluctuațiile de preț."}]},faqs:[{q:"Ce este crypto pe scurt?",a:"Crypto (criptomonedele) sunt active digitale bazate pe blockchain care funcționează ca mijloc de schimb descentralizat, fără a necesita bănci sau intermediari. Sunt securizate prin criptografie și pot fi folosite pentru plăți, investiții sau acces la aplicații descentralizate."},{q:"Sunt criptomonedele legale în România?",a:"Da, criptomonedele sunt legale în România și în Uniunea Europeană. Regulamentul MiCA stabilește cadrul legal pentru crypto-active. Câștigurile din tranzacții crypto sunt impozabile conform legislației fiscale române (10% impozit pe venit)."},{q:"Câți bani am nevoie ca să încep cu crypto?",a:"Poți începe cu sume foarte mici — chiar și cu 10-50 lei. Majoritatea exchange-urilor permit achiziții fracționale de criptomonede. Important: nu investi mai mult decât îți permiți să pierzi."},{q:"Care este diferența dintre Bitcoin și alte criptomonede?",a:"Bitcoin este prima și cea mai valoroasă criptomonedă, folosită preponderent ca rezervă de valoare. Alte criptomonede (altcoins) au funcționalități diverse: Ethereum permite smart contracts, Solana oferă viteză, iar stablecoins oferă stabilitate de preț."},{q:"Pot să pierd toți banii investiți în crypto?",a:"Da, investițiile în criptomonede implică risc semnificativ. Prețurile sunt volatile, proiectele pot eșua, iar scam-urile sunt frecvente. Educația, diversificarea și investirea doar a sumelor pe care le poți pierde sunt esențiale pentru gestionarea riscului."}],cta:{title:"Continuă să înveți despre criptomonede",description:"Explorează cursurile noastre gratuite din EduWeb Academy și ghidurile detaliate despre fiecare criptomonedă majoră.",button:"Explorează Academy"},breadcrumbs:[{label:"Acasă",path:"/"},{label:"Crypto",path:"/crypto"},{label:"Ce este Crypto",path:"/ce-este-crypto"}]},en:{title:"What is Crypto? Complete Guide to Cryptocurrencies (2025)",metaTitle:"What is Crypto? Complete Guide — Definition, Types & How It Works",metaDescription:"Learn what cryptocurrencies are, how they work, the main types (Bitcoin, Ethereum, stablecoins) and how to start using them safely.",hero:{badge:"EDUCATIONAL GUIDE",heading:"What is Crypto?",subheading:"Complete guide to cryptocurrencies for beginners",intro:"Cryptocurrencies (crypto) are digital assets based on blockchain technology, designed to function as a medium of exchange, store of value, or tool for accessing decentralized applications. Unlike traditional currencies issued by central banks, cryptocurrencies are decentralized and secured through cryptography."},sections:[{icon:"landmark",title:"What Are Cryptocurrencies?",content:`**Simple definition** — A cryptocurrency is a digital currency that uses cryptography to secure transactions and control the creation of new units. It operates on a decentralized network (blockchain), without requiring a central authority like a bank or government.
2594
2595**The first cryptocurrency** — Bitcoin (BTC) was launched in 2009 by Satoshi Nakamoto, an anonymous creator. Since then, thousands of other cryptocurrencies have emerged, each with different purposes and mechanisms.
2596
2597**Difference from traditional money** — Fiat currencies (EUR, USD, GBP) are issued and controlled by central banks. Cryptocurrencies are created through mathematical algorithms and managed by distributed networks of computers worldwide.`},{icon:"blocks",title:"How Do Cryptocurrencies Work?",content:`**Blockchain** — Every cryptocurrency operates on a blockchain — a distributed digital ledger that records all transactions in a transparent and immutable manner.
2598
2599**Wallets** — To hold and send cryptocurrencies, you need a digital wallet. It contains cryptographic keys (public and private) that allow you to access your funds.
2600
2601**Mining and Staking** — New coins are created through mining (Proof of Work — solving complex mathematical problems) or staking (Proof of Stake — locking existing coins as collateral).
2602
2603**Transactions** — When you send crypto, the transaction is broadcast to the network, verified by nodes, and permanently added to the blockchain. It cannot be reversed or modified.
2604
2605**Limited supply** — Many cryptocurrencies have a predefined maximum supply (e.g., Bitcoin has only 21 million coins), which differentiates them from fiat currencies that can be printed without limit.`},{icon:"trending",title:"Types of Cryptocurrencies",content:`**Bitcoin (BTC)** — The first and most well-known cryptocurrency, used as a store of value and "digital gold." Has a maximum supply of 21 million coins.
2606
2607**Ethereum (ETH)** — The second largest, enables running smart contracts and decentralized applications (DApps). It's the foundation of the DeFi and NFT ecosystem.
2608
2609**Stablecoins** — Cryptocurrencies pegged to fiat currencies (e.g., USDT, USDC are linked to the US dollar). They offer price stability and are frequently used in transactions and DeFi.
2610
2611**Altcoins** — All cryptocurrencies other than Bitcoin. Includes projects like Solana (speed), Cardano (academic research), Polkadot (interoperability), and Chainlink (data oracles).
2612
2613**Meme coins** — Cryptocurrencies originally created as jokes (Dogecoin, Shiba Inu) but which have gained large communities. They have high volatility and speculative risk.
2614
2615**Utility tokens** — Tokens that provide access to specific services within an ecosystem (e.g., BNB for discounts on Binance, LINK for Chainlink services).`},{icon:"shield",title:"Security and Risks",content:`**Volatility** — Cryptocurrency prices can fluctuate dramatically in short periods. Bitcoin has ranged from $69,000 to $16,000 and back above $100,000 within a few years.
2616
2617**Wallet security** — The private key is the only way to access your funds. If you lose it, you permanently lose access. Never share your seed phrase with anyone.
2618
2619**Scams and fraud** — Ponzi schemes, rug pulls (abandoning a project after attracting funds), and phishing are real risks. Always verify the legitimacy of a project.
2620
2621**Regulation** — The legal framework varies globally. The EU adopted MiCA (Markets in Crypto-Assets), establishing clear rules for crypto-assets. Crypto transactions are taxable.
2622
2623**Custody** — You can keep crypto on a centralized exchange (easier but platform-dependent) or in a personal wallet (more secure but full responsibility).`},{icon:"wallet",title:"How to Get Started with Cryptocurrencies",content:`**1. Educate yourself** — Before investing, understand the technology, risks, and mechanisms behind cryptocurrencies. Free resources like EduWeb Academy are an excellent starting point.
2624
2625**2. Choose an exchange** — Exchange platforms (Binance, Kraken, Coinbase) allow you to buy cryptocurrencies with fiat currency. Check their reputation and regulation.
2626
2627**3. Create a wallet** — For small amounts, the exchange wallet is sufficient. For larger amounts, use a hardware wallet (Ledger, Trezor) for maximum security.
2628
2629**4. Start small** — Don't invest more than you can afford to lose. The DCA (Dollar Cost Averaging) strategy — regularly buying small amounts — reduces timing risk.
2630
2631**5. Verify sources** — Follow news from trusted sources, not social media influencers. Be skeptical of guaranteed profit promises.`},{icon:"zap",title:"The Future of Cryptocurrencies",content:`**Institutional adoption** — Major companies (BlackRock, Fidelity) have launched Bitcoin ETFs. Banks are exploring integrating crypto into their traditional services.
2632
2633**CBDCs** — Central banks are developing their own digital currencies (digital euro, digital yuan). These are not decentralized cryptocurrencies but use similar technology.
2634
2635**DeFi and Real World Assets** — Tokenizing real assets (real estate, stocks, bonds) on blockchain promises to democratize access to investments.
2636
2637**Scalability** — Layer 2 solutions and new protocols make transactions faster and cheaper, approaching the experience of traditional payments.
2638
2639**Global regulation** — The regulatory framework is becoming clearer, offering investor protection and industry legitimacy, but also challenges for projects operating at the edge of the law.`}],glossary:{title:"Essential Crypto Glossary",terms:[{term:"Bitcoin (BTC)",def:'The first decentralized cryptocurrency, created in 2009 by Satoshi Nakamoto. Functions as "digital gold."'},{term:"Altcoin",def:"Any cryptocurrency other than Bitcoin. Includes Ethereum, Solana, Cardano, etc."},{term:"Wallet",def:"A digital wallet that stores the cryptographic keys needed to access cryptocurrencies."},{term:"Mining",def:"The process of validating transactions and creating new coins by solving complex mathematical problems."},{term:"Staking",def:"Locking cryptocurrencies as collateral to participate in transaction validation and receive rewards."},{term:"DeFi",def:"Decentralized Finance — financial services (loans, exch
2639anges) built on blockchain, without intermediaries."},{term:"Stablecoin",def:"A cryptocurrency whose price is pegged to a stable asset, such as the US dollar (e.g., USDT, USDC)."},{term:"Gas Fee",def:"The fee paid for processing a transaction on a blockchain (most commonly on Ethereum)."},{term:"Seed Phrase",def:"A sequence of 12-24 words that allows recovery of a crypto wallet. Must be kept absolutely secure."},{term:"HODL",def:"A crypto community term meaning to hold cryptocurrencies long-term, regardless of price fluctuations."}]},faqs:[{q:"What is crypto in simple terms?",a:"Crypto (cryptocurrencies) are digital assets based on blockchain that function as a decentralized medium of exchange, without requiring banks or intermediaries. They are secured through cryptography and can be used for payments, investments, or accessing decentralized applications."},{q:"Are cryptocurrencies legal?",a:"Yes, cryptocurrencies are legal in most countries, including the EU. The MiCA regulation establishes the legal framework for crypto-assets. Gains from crypto transactions are taxable according to local tax legislation."},{q:"How much money do I need to start with crypto?",a:"You can start with very small amounts — even $10-50. Most exchanges allow fractional cryptocurrency purchases. Important: don't invest more than you can afford to lose."},{q:"What is the difference between Bitcoin and other cryptocurrencies?",a:"Bitcoin is the first and most valuable cryptocurrency, primarily used as a store of value. Other cryptocurrencies (altcoins) have diverse functionalities: Ethereum enables smart contracts, Solana offers speed, and stablecoins offer price stability."},{q:"Can I lose all the money I invest in crypto?",a:"Yes, cryptocurrency investments involve significant risk. Prices are volatile, projects can fail, and scams are common. Education, diversification, and only investing money you can afford to lose are essential for risk management."}],cta:{title:"Continue Learning About Cryptocurrencies",description:"Explore our free courses at EduWeb Academy and detailed guides about each major cryptocurrency.",button:"Explore Academy"},breadcrumbs:[{label:"Home",path:"/"},{label:"Crypto",path:"/crypto"},{label:"What is Crypto",path:"/what-is-crypto"}]}},OSt={landmark:s.jsx(Zh,{size:24}),blocks:s.jsx(es,{size:24}),shield:s.jsx(pi,{size:24}),trending:s.jsx(oa,{size:24}),wallet:s.jsx(QU,{size:24}),zap:s.jsx(ts,{size:24})};function LSt(e){return e.split(`
2640
2641`).filter(Boolean).map((r,n)=>{const i=r.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>");return s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4 last:mb-0",dangerouslySetInnerHTML:{__html:i}},n)})}function xte(){const{lang:e}=Pt(),r=p3(),n=gte[e]||gte.ro;Zr({title:n.metaTitle,description:n.metaDescription});const i=e==="en"?"https://eduweb.ai":"https://eduweb.ro",a={"@context":"https://schema.org","@type":"Article",headline:n.title,description:n.metaDescription,author:{"@type":"Organization",name:"EduWeb",url:i},publisher:{"@type":"Organization",name:"EduWeb",logo:{"@type":"ImageObject",url:`${i}/favicon.png`}},mainEntityOfPage:{"@type":"WebPage","@id":`${i}${e==="en"?"/what-is-crypto":"/ce-este-crypto"}`},datePublished:"2025-03-08",dateModified:"2025-03-08",inLanguage:e==="en"?"en":"ro"},o={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.faqs.map(c=>
2641({"@type":"Question",name:c.q,acceptedAnswer:{"@type":"Answer",text:c.a}}))},l={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:n.breadcrumbs.map((c,u)=>({"@type":"ListItem",position:u+1,name:c.label,item:`${i}${c.path}`}))};return s.jsxs(Ft,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(a)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(o)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}}),s.jsx("div",{className:"container pt-6 pb-2",children:s.jsx("nav",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:n.breadcrumbs.map((c,u)=>s.jsxs("span",{className:"flex items-center gap-1.5",children:[u>0&&s.jsx("span",{children:"/"}),u<n.breadcrumbs.length-1?s.jsx(be,{to:c.path,className:"hover:text-primary transition-colors",children:c.label}):s.jsx("span",{className:"text-foreground font-medium",children:c.label})]},c.path))})}),s.jsxs("div",{className:"cat-blockchain relative overflow-hidden border-b border-border/30",children:[s.jsx("div",{className:"absolute inset-0 hero-gradient"}),s.jsx("div",{className:"absolute inset-0 grid-bg opacity-[0.04]"}),s.jsx("div",{className:"container relative z-10 py-14 md:py-20",children:s.jsxs("div",{className:"flex items-center gap-8 lg:gap-12",children:[s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"max-w-3xl flex-1",children:[s.jsx("span",{className:"inline-block px-3 py-1 rounded-full bg-primary/10 text-primary text-xs font-semibold tracking-widest mb-4",children:n.hero.badge}),s.jsx("h1",{className:"font-heading text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight mb-4 text-foreground",children:n.hero.heading}),s.jsx("p",{className:"text-xl md:text-2xl text-muted-foreground font-medium mb-6",children:n.hero.subheading}),s.jsx("p",{className:"text-lg text-foreground/80 leading-relaxed max-w-2xl",children:bu(n.hero.intro)})]}),s.jsx(Le.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.7,delay:.2},className:"hidden lg:block w-64 xl:w-80 shrink-0",children:s.jsx("img",{src:kz,alt:n.hero.heading,className:"w-full rounded-2xl shadow-2xl",loading:"eager"})})]})})]}),s.jsx("article",{className:"container py-12 md:py-16",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] gap-12",children:[s.jsxs("div",{className:"space-y-12",children:[n.sections.map((c,u)=>s.jsxs(Le.section,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.5,delay:u*.05},children:[s.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center text-primary shrink-0 mt-0.5",children:OSt[c.icon]}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:c.title})]}),s.jsx("div",{className:"ml-16",children:LSt(c.content)})]},u)),s.jsxs(Le.section,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center text-primary shrink-0",children:s.jsx(yr,{size:24})}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:n.glossary.title})]}),s.jsx("div",{className:"ml-16 grid grid-cols-1 sm:grid-cols-2 gap-4",children:n.glossary.terms.map(c=>{const u=r.get(c.term.toLowerCase());return s.jsxs("div",{className:"glass-card rounded-xl p-4",children:[s.jsx("dt",{className:"font-heading font-bold text-sm text-primary mb-1",children:u?s.jsx(be,{to:`/glosar/${u}`,className:"hover:underline",children:c.term}):c.term}),s.jsx("dd",{className:"text-sm text-muted-foreground leading-relaxed",children:c.def})]},c.term)})})]}),s.jsxs(Le.section,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground mb-6",children:e==="en"?"Frequently Asked Questions":"Întrebăr
2641i Frecvente"}),s.jsx(lo,{type:"single",collapsible:!0,className:"space-y-2",children:n.faqs.map((c,u)=>s.jsxs(Os,{value:`faq-${u}`,className:"glass-card rounded-xl px-5 border-none",children:[s.jsx(Ls,{className:"text-left font-heading font-semibold text-foreground hover:text-primary py-4",children:c.q}),s.jsx(Rs,{className:"text-muted-foreground leading-relaxed pb-4",children:c.a})]},u))})]}),s.jsxs(Le.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"glass-card rounded-2xl p-8 text-center",children:[s.jsx("h3",{className:"font-heading text-2xl font-bold text-foreground mb-3",children:n.cta.title}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-lg mx-auto",children:n.cta.description}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 px-6 py-3 rounded-xl bg-primary text-primary-foreground font-semibold hover:bg-primary/90 transition-colors",children:[n.cta.button," ",s.jsx(Gt,{size:18})]})]}),s.jsxs("div",{className:"glass-card rounded-2xl p-8",children:[s.jsx("h3",{className:"font-heading text-xl font-bold text-foreground mb-4",children:e==="en"?"Explore Each Cryptocurrency":"Explorează Fiecare Criptomonedă"}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:[{label:"Bitcoin",pathRo:"/ce-este-bitcoin",pathEn:"/what-is-bitcoin"},{label:"Ethereum",pathRo:"/ce-este-ethereum",pathEn:"/what-is-ethereum"},{label:"Solana",pathRo:"/ce-este-solana",pathEn:"/what-is-solana"},{label:"BNB",pathRo:"/ce-este-bnb",pathEn:"/what-is-bnb"},{label:"XRP",pathRo:"/ce-este-xrp",pathEn:"/what-is-xrp"},{label:"Cardano",pathRo:"/ce-este-cardano",pathEn:"/what-is-cardano"},{label:"Dogecoin",pathRo:"/ce-este-dogecoin",pathEn:"/what-is-dogecoin"},{label:"Polkadot",pathRo:"/ce-este-polkadot",pathEn:"/what-is-polkadot"},{label:"Avalanche",pathRo:"/ce-este-avalanche",pathEn:"/what-is-avalanche"},{label:"Chainlink",pathRo:"/ce-este-chainlink",pathEn:"/what-is-chainlink"}].map(c=>s.jsxs(be,{to:e==="en"?c.pathEn:c.pathRo,className:"flex items-center gap-2 px-4 py-3 rounded-xl border border-border/50 hover:bg-secondary transition-colors text-sm font-medium text-foreground",children:[s.jsx(Zh,{size:14,className:"text-primary shrink-0"}),c.label,s.jsx(Gt,{size:12,className:"ml-auto opacity-40"})]},c.label))})]}),s.jsx(Kv,{topics:["blockchain"]})]}),s.jsx("aside",{className:"hidden lg:block space-y-6",children:s.jsxs("div",{className:"sticky top-24 space-y-6",children:[s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:e==="en"?"Table of Contents":"Cuprins"}),s.jsxs("nav",{className:"space-y-2",children:[n.sections.map((c,u)=>s.jsx("a",{href:`#section-${u}`,className:"block text-sm text-muted-foreground hover:text-primary transition-colors leading-snug",children:c.title},u)),s.jsx("a",{href:"#glossary",className:"block text-sm text-muted-foreground hover:text-primary transition-colors",children:n.glossary.title}),s.jsx("a",{href:"#faqs",className:"block text-sm text-muted-foreground hover:text-primary transition-colors",children:e==="en"?"FAQs":"Întrebări Frecvente"})]})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:e==="en"?"Related Topics":"Tematici Conexe"}),s.jsx("div",{className:"space-y-2",children:[{label:e==="en"?"What is Web3?":"Ce este Web3?",path:e==="en"?"/what-is-web3":"/ce-este-web3",icon:s.jsx(Dr,{size:14})},{label:e==="en"?"What is Blockchain?":"Ce este Blockchain?",path:e==="en"?"/what-is-blockchain":"/ce-este-blockchain",icon:s.jsx(es,{size:14})},{label:e==="en"?"Crypto Prices":"Prețuri Crypto",path:"/crypto",icon:s.jsx(oa,{size:14})}].map(c=>s.jsxs(be,{to:c.path,className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:[s.jsx("span",{className:"text-primary",children:c.icon}),c.label,s.jsx(Yr,{size:12,className:"ml-auto opacity-50"})]},c.path))})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:e==="en"?"Crypto Prices":"Prețuri Crypto"}),s.jsxs("div",{className:"space-y-1",children:[[{label:"Bitcoin (BTC)",path:"/bitcoin-pret-azi"},{label:"Ethereum (ETH)",path:"/ethereum-pret-ron"},{label:"Solana (SOL)",path:"/solana-pret-azi"}].map(c=>s.jsx(be,{to:c.path,className:"block px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:c.label},c.path)),s.jsx(be,{to:"/crypto",className:"block px-3 py-2 rounded-lg text-sm text-primary hover:underline font-medium",children:e==="en"?"View All →":"Vezi toate →"})]})]})]})})]})})]})}const Sb=[{slug:"blockchain",category:"both",ro:{term:"Blockchain",shortDef:"Registru digital distribuit, imuabil și transparent, partajat între participanții unei rețele.",fullContent:`**Blockchain** este o tehnologie de registru distribuit (DLT — Distributed Ledger Technology) care permite stocarea datelor 
2641într-un mod transparent, securizat și descentralizat.
2642
2643**Cum funcționează:** Informațiile sunt grupate în „blocuri" care conțin tranzacții validate, un timestamp și hash-ul criptografic al blocului anterior. Aceste blocuri sunt legate secvențial, formând un „lanț" — de unde și numele blockchain.
2644
2645**De ce este important:** Blockchain elimină nevoia unui intermediar de încredere (bancă, notar, guvern) pentru a valida tranzacțiile. Rețeaua de noduri asigură colectiv integritatea datelor prin mecanisme de consens precum Proof of Work sau Proof of Stake.
2646
2647**Exemple practice:** Bitcoin folosește blockchain pentru transferuri de valoare peer-to-peer. Ethereum extinde conceptul cu smart contracts. Supply chain-ul folosește blockchain pentru trasabilitate (Walmart, Maersk). Guverne precum Estonia folosesc blockchain pentru identitate digitală și vot electronic.
2648
2649**Caracteristici cheie:**
2650- **Imuabilitate** — datele odată înregistrate nu pot fi modificate
2651- **Descentralizare** — niciun punct unic de control sau eșec
2652- **Transparență** — tranzacțiile sunt publice și verificabile
2653- **Securitate** — protejat prin criptografie avansată`,metaTitle:"Ce este Blockchain? Definiție & Explicație Completă | Glosar EduWeb",metaDescription:"Blockchain este un registru digital distribuit și imuabil. Află cum funcționează, de ce este important și care sunt aplicațiile practice ale tehnologiei blockchain.",relatedSlugs:["hash","nod","consens","smart-contract","layer-1"]},en:{term:"Blockchain",shortDef:"A distributed, immutable, and transparent digital ledger shared among network participants.",fullContent:`**Blockchain** is a distributed ledger technology (DLT) that enables data storage in a transparent, secure, and decentralized way.
2654
2655**How it works:** Information is grouped into "blocks" containing validated transactions, a timestamp, and the cryptographic hash of the previous block. These blocks are sequentially linked, forming a "chain" — hence the name blockchain.
2656
2657**Why it matters:** Blockchain eliminates the need for a trusted intermediary (bank, notary, government) to validate transactions. The network of nodes collectively ensures data integrity through consensus mechanisms like Proof of Work or Proof of Stake.
2658
2659**Practical examples:** Bitcoin uses blockchain for peer-to-peer value transfers. Ethereum extends the concept with smart contracts. Supply chains use blockchain for traceability (Walmart, Maersk). Governments like Estonia use blockchain for digital identity and electronic voting.
2660
2661**Key characteristics:**
2662- **Immutability** — once recorded, data cannot be modified
2663- **Decentralization** — no single point of control or failure
2664- **Transparency** — transactions are public and verifiable
2665- **Security** — protected by advanced cryptography`,metaTitle:"What is Blockchain? Definition & Complete Explanation | EduWeb Glossary",metaDescription:"Blockchain is a distributed and immutable digital ledger. Learn how it works, why it matters, and the practical applications of blockchain technology.",relatedSlugs:["hash","node","consensus","smart-contract","layer-1"]}},{slug:"smart-contract",category:"both",ro:{term:"Smart Contract",shortDef:"Program auto-executabil stocat pe blockchain care se activează când condițiile predefinite sunt îndeplinite.",fullContent:`**Smart Contract** (contract inteligent) este un program informatic stocat pe blockchain care se execută automat atunci când anumite condiții predefinite sunt îndeplinite, fără a necesita un intermediar.
2666
2667**Cum funcționează:** Un smart contract conține reguli codificate de tipul „dacă X se întâmplă, atunci execută Y". Odată implementat pe blockchain, codul este imuabil și transparent — oricine poate verifica regulile.
2668
2669**Exemple practice:**
2670- **DeFi:** Protocoalele de împrumut (Aave) folosesc smart contracts pentru a gestiona automat colateralele și dobânzile
2671- **NFT-uri:** Smart contracts gestionează proprietatea, transferul și royalties-urile pentru creatori
2672- **Asigurări:** Plata automată a daunelor când condițiile sunt confirmate (ex: întârziere de zbor)
2673- **Imobiliare:** Transfer automat de proprietate la confirmarea plății
2674
2675**Limbaje de programare:** Solidity (Ethereum), Rust (Solana), Move (Sui/Aptos), Plutus (Cardano).
2676
2677**Riscuri:** Smart contracts pot conține vulnerabilități (bugs). Odată implementate, nu pot fi modificate. Audit-urile de securitate sunt esențiale înainte de implementare.`,metaTitle:"Ce este un Smart Contract? Definiție & Exemple | Glosar EduWeb",metaDescription:"Smart Contract este un program auto-executabil pe blockchain. Află cum funcționează contractele inteligente, exemple practice și limbajele de programare utilizate.",relatedSlugs:["blockchain","defi","nft","gas-fee","dapp"]}
2677,en:{term:"Smart Contract",shortDef:"A self-executing program stored on blockchain that activates when predefined conditions are met.",fullContent:`**Smart Contract** is a computer program stored on blockchain that automatically executes when certain predefined conditions are met, without requiring an intermediary.
2678
2679**How it works:** A smart contract contains coded rules like "if X happens, then execute Y." Once deployed on blockchain, the code is immutable and transparent — anyone can verify the rules.
2680
2681**Practical examples:**
2682- **DeFi:** Lending protocols (Aave) use smart contracts to automatically manage collateral and interest rates
2683- **NFTs:** Smart contracts manage ownership, transfers, and royalties for creators
2684- **Insurance:** Automatic damage payment when conditions are confirmed (e.g., flight delay)
2685- **Real Estate:** Automatic property transfer upon payment confirmation
2686
2687**Programming languages:** Solidity (Ethereum), Rust (Solana), Move (Sui/Aptos), Plutus (Cardano).
2688
2689**Risks:** Smart contracts may contain vulnerabilities (bugs). Once deployed, they cannot be modified. Security audits are essential before deployment.`,metaTitle:"What is a Smart Contract? Definition & Examples | EduWeb Glossary",metaDescription:"A Smart Contract is a self-executing program on blockchain. Learn how smart contracts work, practical examples, and programming languages used.",relatedSlugs:["blockchain","defi","nft","gas-fee","dapp"]}},{slug:"dapp",category:"web3",ro:{term:"DApp (Aplicație Descentralizată)",shortDef:"Aplicație descentralizată care rulează pe blockchain, fără un server central.",fullContent:`**DApp** (Decentralized Application) este o aplicație care rulează pe o rețea blockchain descentralizată, spre deosebire de aplicațiile tradiționale care depind de servere centralizate.
2690
2691**Cum funcționează:** Frontend-ul (interfața) este similar cu o aplicație web normală, dar backend-ul folosește smart contracts pe blockchain. Datele sunt stocate distribuit, nu pe un singur server.
2692
2693**Avantaje:**
2694- **Rezistență la cenzură** — nicio entitate nu poate opri aplicația
2695- **Transparență** — codul sursă și logica sunt publice
2696- **Proprietate** — utilizatorii dețin datele și activele lor
2697- **Disponibilitate** — funcționează atâta timp cât blockchain-ul există
2698
2699**Exemple populare:**
2700- **Uniswap** — exchange descentralizat (DEX) pentru schimburi de tokenuri
2701- **Aave** — platformă de împrumuturi descentralizate
2702- **OpenSea** — marketplace pentru NFT-uri
2703- **Lens Protocol** — rețea socială descentralizată
2704
2705**Limitări:** Viteză mai mică, costuri de gas, experiență de utilizator mai complexă față de aplicațiile tradiționale.`,metaTitle:"Ce este o DApp? Definiție & Exemple | Glosar EduWeb",metaDescription:"DApp (Decentralized Application) este o aplicație care rulează pe blockchain fără server central. Află cum funcționează, avantaje și exemple populare.",relatedSlugs:["smart-contract","blockchain","defi","wallet"]},en:{term:"DApp (Decentralized Application)",shortDef:"A decentralized application that runs on blockchain, without a central server.",fullContent:`**DApp** (Decentralized Application) is an application that runs on a decentralized blockchain network, unlike traditional applications that depend on centralized servers.
2706
2707**How it works:** The frontend (interface) is similar to a normal web app, but the backend uses smart contracts on blockchain. Data is stored in a distributed manner, not on a single server.
2708
2709**Advantages:**
2710- **Censorship resistance** — no entity can shut down the application
2711- **Transparency** — source code and logic are public
2712- **Ownership** — users own their data and assets
2713- **Availability** — functions as long as the blockchain exists
2714
2715**Popular examples:**
2716- **Uniswap** — decentralized exchange (DEX) for token swaps
2717- **Aave** — decentralized lending platform
2718- **OpenSea** — NFT marketplace
2719- **Lens Protocol** — decentralized social network
2720
2721**Limitations:** Slower speed, gas costs, more complex user experience compared to traditional apps.`,metaTitle:"What is a DApp? Definition & Examples | EduWeb Glossary",metaDescription:"DApp (Decentralized Application) is an app that runs on blockchain without a central server. Learn how it works, advantages, and popular examples.",relatedSlugs:["smart-contract","blockchain","defi","wallet"]}},{slug:"defi",category:"both",ro:{term:"DeFi (Finanțe Descentralizate)",shortDef:"Servicii financiare construite pe blockchain, fără intermediari tradiționali.",fullContent:`**DeFi** (Decentralized Finance) reprezintă un ecosistem de aplicații financiare construite pe blockchain care oferă servicii tradițional bancare — fără bănci.
2722
2723**Cum funcționează:** Protocoalele DeFi folosesc smart contracts pentru a automatiza servicii financiare: împrumuturi, schimburi valutare, asigurări, economii cu dobândă. Utilizatorii interacționează direct cu protocolul prin wallet-uri crypto.
2724
2725**Servicii DeFi principale:**
2726- **Lending/Borrowing** — Împrumuturi cu colateral crypto (Aave, Compound)
2727- **DEX (Decentralized Exchanges)** — Schimburi de tokenuri fără intermediar (Uniswap, SushiSwap)
2728- **Yield Farming** — Câștiguri din furnizarea de lichiditate protocoalelor
2729- **Stablecoins** — Monede cu valoare stabilă ancorată la USD (USDC, DAI)
2730- **Staking** — Blocarea tokenurilor pentru recompense și securizarea rețelei
2731
2732**Avantaje:** Acces global 24/7, fără KYC pentru funcții de bază, transparență totală, componabilitate (protocoalele se pot combina).
2733
2734**Riscuri:** Vulnerabilități în smart contracts, pierdere impermanentă, volatilitate extremă, lipsa protecției consumatorului.`,metaTitle:"Ce este DeFi? Definiție & Ghid Complet | Glosar EduWeb",metaDescription:"DeFi (Finanțe Descentralizate) sunt servicii financiare pe blockchain fără bănci. Află ce este DeFi, cum funcționează și care sunt principalele protocoale.",relatedSlugs:["smart-contract","dapp","wallet","token","gas-fee"]},en:{term:"DeFi (Decentralized Finance)",shortDef:"Financial services built on blockchain, without traditional intermediaries.",fullContent:`**DeFi** (Decentralized Finance) represents an ecosystem of financial applications built on blockchain that offer traditionally banking services — without banks.
2735
2736**How it works:** DeFi protocols use smart contracts to automate financial services: lending, currency exchange, insurance, interest-bearing savings. Users interact directly with protocols through crypto wallets.
2737
2738**Main DeFi services:**
2739- **Lending/Borrowing** — Loans with crypto collateral (Aave, Compound)
2740- **DEX (Decentralized Exchanges)** — Token swaps without intermediaries (Uniswap, SushiSwap)
2741- **Yield Farming** — Earnings from providing liquidity to protocols
2742- **Stablecoins** — Stable-value coins pegged to USD (USDC, DAI)
2743- **Staking** — Locking tokens for rewards and network security
2744
2745**Advantages:** Global 24/7 access, no KYC for basic functions, total transparency, composability (protocols can be combined).
2746
2747**Risks:** Smart contract vulnerabilities, impermanent loss, extreme volatility, lack of consumer protection.`,metaTitle:"What is DeFi? Definition & Complete Guide | EduWeb Glossary",metaDescription:"DeFi (Decentralized Finance) are financial services on blockchain without banks. Learn what DeFi is, how it works, and the main protocols.",relatedSlugs:["smart-contract","dapp","wallet","token","gas-fee"]}},{slug:"nft",category:"web3",ro:{term:"NFT (Token Non-Fungibil)",shortDef:"Activ digital unic care certifică proprietatea asupra unui obiect digital sau fizic.",fullContent:`**NFT** (Non-Fungible Token) este un activ digital unic, înregistrat pe blockchain, care certifică proprietatea și autenticitatea unui obiect — digital sau fizic.
2748
2749**Ce înseamnă „non-fungibil":** Spre deosebire de Bitcoin sau bani (fungibili — un leu este identic cu alt leu), fiecare NFT este unic și nu poate fi înlocuit cu altul identic.
2750
2751**Cum funcționează:** NFT-urile sunt create (minted) prin smart contracts pe blockchain-uri precum Ethereum, Solana sau Polygon. Fiecare NFT are un identificator unic și metadate care pot include imagini, video, muzică sau documente.
2752
2753**Cazuri de utilizare:**
2754- **Artă digitală** — Artiștii vând opere direct, cu royalties automate la revânzare
2755- **Colecționabile** — Carduri digitale, avataruri (CryptoPunks, Bored Ape Yacht Club)
2756- **Gaming** — Obiecte virtuale deținute real de jucători
2757- **Muzică** — Albumuri și drepturi distribuite direct fanilor
2758- **Certificări** — Diplome și certificare verificabile pe blockchain
2759- **Imobiliare** — Tokenizarea proprietăților imobiliare
2760
2761**Standarde:** ERC-721 (Ethereum, unic), ERC-1155 (semi-fungibil), SPL (Solana).`,metaTitle:"Ce este un NFT? Definiție & Explicație Completă | Glosar EduWeb",metaDescription:"NFT (Non-Fungible Token) este un activ digital unic pe blockchain. Află ce sunt NFT-urile, cum funcționează, cazuri de utilizare și standarde tehnice.",relatedSlugs:["smart-contract","blockchain","wallet","token","gas-fee"]},en:{term:"NFT (Non-Fungible Token)",shortDef:"A unique digital asset that certifies ownership of a digital or physical object.",fullContent:`**NFT** (Non-Fungible Token) is a unique digital asset, recorded on blockchain, that certifies the ownership and authenticity of an object — digital or physical.
2762
2763**What "non-fungible" means:** Unlike Bitcoin or money (fungible — one dollar is identical to another dollar), each NFT is unique and cannot be replaced with an identical one.
2764
2765**How it works:** NFTs are created (minted) through smart contracts on blockchains like Ethereum, Solana, or Polygon. Each NFT has a unique identifier and metadata that can include images, video, music, or documents.
2766
2767**Use cases:**
2768- **Digital art** — Artists sell works directly, with automatic royalties on resale
2769- **Collectibles** — Digital cards, avatars (CryptoPunks, Bored Ape Yacht Club)
2770- **Gaming** — Virtual items truly owned by players
2771- **Music** — Albums and rights distributed directly to fans
2772- **Certifications** — Verifiable diplomas and certificates on blockchain
2773- **Real Estate** — Tokenization of real estate properties
2774
2775**Standards:** ERC-721 (Ethereum, unique), ERC-1155 (semi-fungible), SPL (Solana).`,metaTitle:"What is an NFT? Definition & Complete Explanation | EduWeb Glossary",metaDescription:"NFT (Non-Fungible Token) is a unique digital asset on blockchain. Learn what NFTs are, how they work, use cases, and technical standards.",relatedSlugs:["smart-contract","blockchain","wallet","token","gas-fee"]}},{slug:"dao",category:"web3",ro:{term:"DAO (Organizație Autonomă Descentralizată)",shortDef:"Entitate guvernată de membrii săi prin vot pe blockchain.",fullContent:`**DAO** (Decentralized Autonomous Organization) este o organizație guvernată colectiv de membrii săi prin vot pe blockchain, fără o conducere centralizată tradițională.
2776
2777**Cum funcționează:** Regulile organizației sunt codificate în smart contracts. Membrii dețin tokenuri de guvernanță care le conferă drept de vot. Deciziile sunt luate prin propuneri și voturi transparente pe blockchain.
2778
2779**Exemple de decizii DAO:**
2780- Alocarea bugetului de trezorerie
2781- Modificări ale protocolului
2782- Parteneriate și investiții
2783- Angajări și recompense
2784
2785**DAO-uri notabile:**
2786- **MakerDAO** — Guvernează protocolul stablecoin DAI
2787- **Uniswap DAO** — Gestionează cel mai mare DEX
2788- **Aave DAO** — Guvernează protocolul de lending
2789- **ConstitutionDAO** — A strâns 47M$ pentru a cumpăra o copie a Constituției SUA
2790
2791**Avantaje:** Transparență totală, rezistență la corupție, acces global, automatizare prin smart contracts.
2792
2793**Provocări:** Participare scăzută la vot, atacuri de guvernanță, cadru legal incert, decizii lente.`,metaTitle:"Ce este un DAO? Definiție & Exemple | Glosar EduWeb",metaDescription:"DAO (Decentralized Autonomous Organization) este o organizație guvernată prin vot pe blockchain. Află cum funcționează, exemple notabile și avantaje.",relatedSlugs:["smart-contract","token","blockchain","defi"]},en:{term:"DAO (Decentralized Autonomous Organization)",shortDef:"An entity governed by its members through blockchain voting.",fullContent:`**DAO** (Decentralized Autonomous Organization) is an organization collectively governed by its members through blockchain voting, without traditional centralized leadership.
2794
2795**How it works:** Organization rules are codified in smart contracts. Members hold governance tokens that give them voting rights. Decisions are made through proposals and transparent votes on blockchain.
2796
2797**Example DAO decisions:**
2798- Treasury budget allocation
2799- Protocol modifications
2800- Partnerships and investments
2801- Hiring and rewards
2802
2803**Notable DAOs:**
2804- **MakerDAO** — Governs the DAI stablecoin protocol
2805- **Uniswap DAO** — Manages the largest DEX
2806- **Aave DAO** — Governs the lending protocol
2807- **ConstitutionDAO** — Raised $47M to buy a copy of the US Constitution
2808
2809**Advantages:** Total transparency, corruption resistance, global access, automation through smart contracts.
2810
2811**Challenges:** Low voter participation, governance attacks, uncertain legal framework, slow decisions.`,metaTitle:"What is a DAO? Definition & Examples | EduWeb Glossary",metaDescription:"DAO (Decentralized Autonomous Organization) is an organization governed through blockchain voting. Learn how it works, notable examples, and advantages.",relatedSlugs:["smart-contract","token","blockchain","defi"]}},{slug:"wallet",category:"web3",ro:{term:"Wallet (Portofel Crypto)",shortDef:"Portofel digital care stochează cheile criptografice necesare pentru a accesa și gestiona active blockchain.",fullContent:`**Wallet** (portofel crypto) este un instrument digital care stochează cheile criptografice (publică și privată) necesare pentru a accesa, gestiona și transfera active pe blockchain.
2812
2813**Important:** Wallet-ul nu stochează efectiv criptomonedele — acestea „trăiesc" pe blockchain. Wallet-ul stochează doar cheile care dovedesc proprietatea.
2814
2815**Tipuri de wallet-uri:**
2816- **Hot Wallet** — Conectat la internet (MetaMask, Trust Wallet). Convenabil dar mai vulnerabil
2817- **Cold Wallet** — Offline, hardware (Ledger, Trezor). Cel mai sigur pentru sume mari
2818- **Custodial** — Cheia privată este deținută de o terță parte (exchange). Simplu dar nu ai control total
2819- **Non-custodial** — Tu deții cheia privată. Control total dar responsabilitate completă
2820
2821**Wallet-uri populare:**
2822- **MetaMask** — Cel mai popular pentru Ethereum și EVM chains
2823- **Phantom** — Principal pentru Solana
2824- **Ledger** — Cel mai utilizat hardware wallet
2825- **Rabby** — Multi-chain cu securitate îmbunătățită
2826
2827**Securitate:** Nu partaja niciodată seed phrase-ul. Folosește 2FA. Verifică URL-urile. Testează cu sume mici.`,metaTitle:"Ce este un Wallet Crypto? Definiție & Tipuri | Glosar EduWeb",metaDescription:"Wallet crypto este un portofel digital pentru gestionarea activelor blockchain. Află ce tipuri de wallet-uri există, cum funcționează și cum te protejezi.",relatedSlugs:["seed-phrase","blockchain","defi","dapp","gas-fee"]},en:{term:"Wallet (Crypto Wallet)",shortDef:"A digital wallet that stores cryptographic keys needed to access and manage blockchain assets.",fullContent:`**Wallet** (crypto wallet) is a digital tool that stores the cryptographic keys (public and private) needed to access, manage, and transfer assets on blockchain.
2828
2829**Important:** The wallet doesn't actually store cryptocurrencies — they "live" on the blockchain. The wallet only stores the keys that prove ownership.
2830
2831**Types of wallets:**
2832- **Hot Wallet** — Connected to the internet (MetaMask, Trust Wallet). Convenient but more vulnerable
2833- **Cold Wallet** — Offline, hardware (Ledger, Trezor). Most secure for large amounts
2834- **Custodial** — Private key held by a third party (exchange). Simple but no full control
2835- **Non-custodial** — You hold the private key. Full control but complete responsibility
2836
2837**Popular wallets:**
2838- **MetaMask** — Most popular for Ethereum and EVM chains
2839- **Phantom** — Main wallet for Solana
2840- **Ledger** — Most used hardware wallet
2841- **Rabby** — Multi-chain with enhanced security
2842
2843**Security:** Never share your seed phrase. Use 2FA. Verify URLs. Test with small amounts.`,metaTitle:"What is a Crypto Wallet? Definition & Types | EduWeb Glossary",metaDescription:"A crypto wallet is a digital wallet for managing blockchain assets. Learn what wallet types exist, how they work, and how to protect yourself.",relatedSlugs:["seed-phrase","blockchain","defi","dapp","gas-fee"]}},{slug:"gas-fee",category:"both",ro:{term:"Gas Fee",shortDef:"Comisionul plătit pentru a procesa o tranzacție pe blockchain.",fullContent:`**Gas Fee** este comisionul plătit de utilizatori pentru a compensa efortul computațional necesar procesării și validării tranzacțiilor pe blockchain.
2844
2845**De unde vine termenul:** Conceptul de „gas" a fost introdus de Ethereum. Ca și combustibilul pentru o mașină, gas-ul „alimentează" tranzacțiile pe blockchain.
2846
2847**Cum se calculează:** Gas Fee = Gas Units × Gas Price. Gas Units depind de complexitatea operațiunii (un transfer simplu consumă mai puțin gas decât interacțiunea cu un smart contract complex). Gas Price fluctuează în funcție de cererea din rețea.
2848
2849**Factori care influențează prețul:**
2850- **Congestionarea rețelei** — Mai mulți utilizatori = prețuri mai mari
2851- **Complexitatea tranzacției** — Interacțiunile cu smart contracts costă mai mult
2852- **Blockchain-ul folosit** — Ethereum L1 este scump; Polygon, Arbitrum sunt mai ieftine
2853- **Ora din zi** — Rețeaua este mai aglomerată în orele de vârf (ora SUA)
2854
2855**Cum reduci gas fees:** Folosește Layer 2 (Polygon, Arbitrum, Optimism), alege ore cu trafic redus, setează un gas limit rezonabil.
2856
2857**EIP-1559:** Din august 2021, Ethereum folosește un model cu base fee (ars) + priority fee (tip pentru validatori).`,metaTitle:"Ce este Gas Fee? Definiție & Cum Funcționează | Glosar EduWeb",metaDescription:"Gas Fee este comisionul pentru tranzacții pe blockchain. Află cum se calculează, ce influențează prețul și cum poți reduce costurile de gas.",relatedSlugs:["blockchain","smart-contract","layer-2","layer-1","token"]},en:{term:"Gas Fee",shortDef:"The fee paid to process a transaction on blockchain.",fullContent:`**Gas Fee** is the fee paid by users to compensate for the computational effort required to process and validate transactions on blockchain.
2858
2859**Where the term comes from:** The concept of "gas" was introduced by Ethereum. Like fuel for a car, gas "powers" transactions on blockchain.
2860
2861**How it's calculated:** Gas Fee = Gas Units × Gas Price. Gas Units depend on operation complexity (a simple transfer uses less gas than interacting with a complex smart contract). Gas Price fluctuates based on network demand.
2862
2863**Factors that influence the price:**
2864- **Network congestion** — More users = higher prices
2865- **Transaction complexity** — Smart contract interactions cost more
2866- **Blockchain used** — Ethereum L1 is expensive; Polygon, Arbitrum are cheaper
2867- **Time of day** — Network is busier during peak hours (US time)
2868
2869**How to reduce gas fees:** Use Layer 2 (Polygon, Arbitrum, Optimism), choose low-traffic hours, set a reasonable gas limit.
2870
2871**EIP-1559:** Since August 2021, Ethereum uses a model with base fee (burned) + priority fee (tip for validators).`,metaTitle:"What is a Gas Fee? Definition & How It Works | EduWeb Glossary",metaDescription:"Gas Fee is the fee for transactions on blockchain. Learn how it's calculated, what influences the price, and how to reduce gas costs.",relatedSlugs:["blockchain","smart-contract","layer-2","layer-1","token"]}},{slug:"seed-phrase",category:"web3",ro:{term:"Seed Phrase",shortDef:"Secvența de 12-24 cuvinte care permite recuperarea unui portofel crypto.",fullContent:`**Seed Phrase** (frază de recuperare sau frază mnemonică) este o secvență de 12 sau 24 cuvinte generate aleator care servesc drept backup pentru un portofel crypto.
2872
2873**Cum funcționează:** Când creezi un wallet, acesta generează o seed phrase din care derivă toate cheile private și adresele tale. Această frază este singura modalitate de a recupera wallet-ul dacă pierzi dispozitivul.
2874
2875**De ce este critică:**
2876- **Cine are seed phrase-ul, are crypto-ul** — dacă cineva obține fraza ta, poate accesa toate fondurile
2877- **Nu poate fi resetată** — nu există „am uitat parola" în crypto
2878- **Irecuperabilă** — dacă o pierzi și pierzi dispozitivul, fondurile sunt pierdute permanent
2879
2880**Reguli de securitate:**
2881- **Scrie-o pe hârtie** — nu digital (nu screenshot, nu cloud, nu email)
2882- **Stochează în locuri sigure** — seif, locație separată de dispozitiv
2883- **Nu o partaja NICIODATĂ** — niciun serviciu legitim nu va cere seed phrase-ul
2884- **Consideră plăci metalice** — rezistente la foc și apă (Cryptosteel, Billfodl)
2885
2886**Standard:** BIP-39 definește lista de 2048 cuvinte din care se generează seed phrase-urile.`,metaTitle:"Ce este Seed Phrase? Definiție & Securitate | Glosar EduWeb",metaDescription:"Seed Phrase este secvența de 12-24 cuvinte pentru recuperarea wallet-ului crypto. Află cum funcționează, de ce este critică și regulile esențiale de securitate.",relatedSlugs:["wallet","blockchain"]},en:{term:"Seed Phrase",shortDef:"A sequence of 12-24 words that allows recovery of a crypto wallet.",fullContent:`**Seed Phrase** (recovery phrase or mnemonic phrase) is a sequence of 12 or 24 randomly generated words that serve as a backup for a crypto wallet.
2887
2888**How it works:** When you create a wallet, it generates a seed phrase from which all your private keys and addresses are derived. This phrase is the only way to recover the wallet if you lose your device.
2889
2890**Why it's critical:**
2891- **Whoever has the seed phrase has the crypto** — if someone obtains your phrase, they can access all funds
2892- **Cannot be reset** — there's no "forgot password" in crypto
2893- **Irrecoverable** — if you lose it and lose the device, funds are permanently lost
2894
2895**Security rules:**
2896- **Write it on paper** — not digitally (no screenshots, no cloud, no email)
2897- **Store in safe places** — safe, separate location from the device
2898- **NEVER share it** — no legitimate service will ask for your seed phrase
2899- **Consider metal plates** — fire and water resistant (Cryptosteel, Billfodl)
2900
2901**Standard:** BIP-39 defines the list of 2048 words from which seed phrases are generated.`,metaTitle:"What is a Seed Phrase? Definition & Security | EduWeb Glossary",metaDescription:"Seed Phrase is the 12-24 word sequence for crypto wallet recovery. Learn how it works, why it's critical, and essential security rules.",relatedSlugs:["wallet","blockchain"]}},{slug:"layer-2",category:"both",ro:{term:"Layer 2",shortDef:"Protocol construit peste un blockchain existent (Layer 1) pentru a îmbunătăți viteza și a reduce costurile.",fullContent:`**Layer 2** (L2) este un protocol sau o rețea construită deasupra unui blockchain de bază (Layer 1, ex: Ethereum) pentru a îmbunătăți scalabilitatea — mai multe tranzacții, mai rapide, mai ieftine.
2902
2903**De ce este nevoie:** Ethereum procesează ~15-30 tranzacții/secundă. În perioadele aglomerate, gas fees pot ajunge la zeci de dolari. Layer 2 rezolvă această problemă procesând tranzacțiile off-chain și raportând rezultatele pe L1.
2904
2905**Tipuri de Layer 2:**
2906- **Rollups Optimiste** (Optimism, Arbitrum) — Presupun că tranzacțiile sunt valide, cu o perioadă de contestare
2907- **ZK-Rollups** (zkSync, StarkNet, Polygon zkEVM) — Folosesc dovezi criptografice (zero-knowledge proofs) pentru validare instantanee
2908- **State Channels** (Lightning Network pentru Bitcoin) — Tranzacții off-chain între doi participanți
2909- **Sidechains** (Polygon PoS) — Blockchain-uri separate conectate la lanțul principal
2910
2911**Layer 2 populare:**
2912- **Arbitrum** — Cel mai mare L2 ca TVL (Total Value Locked)
2913- **Optimism** — Cunoscut pentru ecosistemul OP Stack
2914- **Base** — L2-ul Coinbase, creștere rapidă
2915- **zkSync** — Lider în tehnologia ZK
2916
2917**Impact:** Gas fees reduse cu 10-100x, tranzacții în 1-2 secunde, aceeași securitate ca Ethereum.`,metaTitle:"Ce este Layer 2? Definiție & Tipuri de Soluții L2 | Glosar EduWeb",metaDescription:"Layer 2 sunt protocoale construite peste blockchain-ul de bază pentru scalabilitate. Află ce tipuri de L2 există (Rollups, ZK, State Channels) și care sunt cele mai populare.",relatedSlugs:["layer-1","blockchain","gas-fee","smart-contract"]},en:{term:"Layer 2",shortDef:"A protocol built on top of an existing blockchain (Layer 1) to improve speed and reduce costs.",fullContent:`**Layer 2** (L2) is a protocol or network built on top of a base blockchain (Layer 1, e.g., Ethereum) to improve scalability — more transactions, faster, cheaper.
2918
2919**Why it's needed:** Ethereum processes ~15-30 transactions/second. During busy periods, gas fees can reach tens of dollars. Layer 2 solves this by processing transactions off-chain and reporting results to L1.
2920
2921**Types of Layer 2:**
2922- **Optimistic Rollups** (Optimism, Arbitrum) — Assume transactions are valid, with a challenge period
2923- **ZK-Rollups** (zkSync, StarkNet, Polygon zkEVM) — Use cryptographic proofs (zero-knowledge proofs) for instant validation
2924- **State Channels** (Lightning Network for Bitcoin) — Off-chain transactions between two participants
2925- **Sidechains** (Polygon PoS) — Separate blockchains connected to the main chain
2926
2927**Popular Layer 2s:**
2928- **Arbitrum** — Largest L2 by TVL (Total Value Locked)
2929- **Optimism** — Known for the OP Stack ecosystem
2930- **Base** — Coinbase's L2, rapid growth
2931- **zkSync** — Leader in ZK technology
2932
2933**Impact:** Gas fees reduced by 10-100x, transactions in 1-2 seconds, same security as Ethereum.`,metaTitle:"What is Layer 2? Definition & Types of L2 Solutions | EduWeb Glossary",metaDescription:"Layer 2 are protocols built on top of base blockchains for scalability. Learn what L2 types exist (Rollups, ZK, State Channels) and the most popular ones.",relatedSlugs:["layer-1","blockchain","gas-fee","smart-contract"]}},{slug:"hash",category:"blockchain",ro:{term:"Hash",shortDef:"Amprentă digitală unică generată printr-o funcție criptografică.",fullContent:`**Hash** este un șir de caractere de lungime fixă, generat printr-o funcție criptografică din orice cantitate de date de intrare. Este ca o „amprentă digitală" unică a datelor.
2934
2935**Proprietăți esențiale:**
2936- **Deterministic** — aceeași intrare produce mereu același hash
2937- **Ireversibil** — nu poți reconstrui datele originale din hash
2938- **Efect de avalanșă** — o schimbare minimă în intrare produce un hash complet diferit
2939- **Lungime fixă** — indiferent de dimensiunea datelor, hash-ul are aceeași lungime
2940
2941**Funcții hash populare:**
2942- **SHA-256** — Folosit de Bitcoin, produce un hash de 256 biți (64 caractere hex)
2943- **Keccak-256** — Folosit de Ethereum
2944- **RIPEMD-160** — Folosit pentru adresele Bitcoin
2945
2946**Exemplu SHA-256:**
2947- Input: "EduWeb" → Hash: 7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069
2948- Input: "Eduweb" (o literă diferită) → Hash complet diferit
2949
2950**Utilizări în blockchain:** Legarea blocurilor între ele, verificarea integrității datelor, generarea adreselor wallet, mining (Proof of Work), arbori Merkle.`,metaTitle:"Ce este un Hash? Definiție & Funcții Criptografice | Glosar EduWeb",metaDescription:"Hash este o amprentă digitală unică generată criptografic. Află cum funcționează funcțiile hash (SHA-256), proprietățile lor și rolul în blockchain.",relatedSlugs:["blockchain","consens","nod"]},en:{term:"Hash",shortDef:"A unique digital fingerprint generated through a cryptographic function.",fullContent:`**Hash** is a fixed-length string of characters generated through a cryptographic function from any amount of input data. It's like a unique "digital fingerprint" of the data.
2951
2952**Essential properties:**
2953- **Deterministic** — the same input always produces the same hash
2954- **Irreversible** — you cannot reconstruct the original data from the hash
2955- **Avalanche effect** — a minimal change in input produces a completely different hash
2956- **Fixed length** — regardless of data size, the hash has the same length
2957
2958**Popular hash functions:**
2959- **SHA-256** — Used by Bitcoin, produces a 256-bit hash (64 hex characters)
2960- **Keccak-256** — Used by Ethereum
2961- **RIPEMD-160** — Used for Bitcoin addresses
2962
2963**SHA-256 example:**
2964- Input: "EduWeb" → Hash: 7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069
2965- Input: "Eduweb" (one different letter) → Completely different hash
2966
2967**Uses in blockchain:** Linking blocks together, data integrity verification, wallet address generation, mining (Proof of Work
2967), Merkle trees.`,metaTitle:"What is a Hash? Definition & Cryptographic Functions | EduWeb Glossary",metaDescription:"A hash is a unique digital fingerprint generated cryptographically. Learn how hash functions (SHA-256) work, their properties, and their role in blockchain.",relatedSlugs:["blockchain","consensus","node"]}},{slug:"nod",category:"blockchain",ro:{term:"Nod (Node)",shortDef:"Calculator care rulează software-ul blockchain și menține o copie a registrului distribuit.",fullContent:`**Nod** (node) este un calculator conectat la rețeaua blockchain care rulează software-ul protocolului și menține o copie a registrului distribuit.
2968
2969**Tipuri de noduri:**
2970- **Full Node** — Stochează întregul istoric al blockchain-ului și validează toate tranzacțiile independent. Esențial pentru securitate
2971- **Light Node** — Stochează doar antetele blocurilor. Mai rapid și ușor, dar depinde de full nodes pentru verificare
2972- **Archive Node** — Stochează toate stările istorice ale blockchain-ului. Necesar pentru aplicații care interogează date vechi
2973- **Validator/Miner Node** — Participă activ la crearea de blocuri noi și primește recompense
2974
2975**De ce contează nodurile:**
2976- **Descentralizare** — Cu cât sunt mai multe noduri, cu atât rețeaua este mai rezistentă
2977- **Securitate** — Nodurile verifică independent fiecare tranzacție
2978- **Rezistență la cenzură** — Niciun nod individual nu poate bloca o tranzacție validă
2979
2980**Rularea unui nod:** Oricine poate rula un full node Bitcoin sau Ethereum. Necesită un computer cu spațiu de stocare suficient (Bitcoin: ~500GB, Ethereum: ~1TB+) și conexiune la internet constantă.
2981
2982**Noduri în rețea:** Bitcoin are ~15.000 noduri publice, Ethereum ~6.000 noduri. Mii de altele sunt private.`,metaTitle:"Ce este un Nod (Node) Blockchain? Definiție & Tipuri | Glosar EduWeb",metaDescription:"Un nod blockchain este un calculator care menține rețeaua. Află tipurile de noduri (full, light, archive, validator), de ce contează și cum poți rula unul.",relatedSlugs:["blockchain","consens","hash"]},en:{term:"Node",shortDef:"A computer running blockchain software and maintaining a copy of the distributed ledger.",fullContent:`**Node** is a computer connected to the blockchain network that runs the protocol software and maintains a copy of the distributed ledger.
2983
2984**Types of nodes:**
2985- **Full Node** — Stores the entire blockchain history and validates all transactions independently. Essential for security
2986- **Light Node** — Stores only block headers. Faster and lighter, but depends on full nodes for verification
2987- **Archive Node** — Stores all historical states of the blockchain. Needed for applications querying old data
2988- **Validator/Miner Node** — Actively participates in creating new blocks and receives rewards
2989
2990**Why nodes matter:**
2991- **Decentralization** — The more nodes, the more resilient the network
2992- **Security** — Nodes independently verify each transaction
2993- **Censorship resistance** — No individual node can block a valid transaction
2994
2995**Running a node:** Anyone can run a Bitcoin or Ethereum full node. Requires a computer with sufficient storage (Bitcoin: ~500GB, Ethereum: ~1TB+) and constant internet connection.
2996
2997**Nodes in the network:** Bitcoin has ~15,000 public nodes, Ethereum ~6,000 nodes. Thousands more are private.`,metaTitle:"What is a Blockchain Node? Definition & Types | EduWeb Glossary",metaDescription:"A blockchain node is a computer that maintains the network. Learn node types (full, light, archive, validator), why they matter, and how to run one.",relatedSlugs:["blockchain","consensus","hash"]}},{slug:"consens",category:"blockchain",ro:{term:"Consens (Consensus)",shortDef:"Procesul prin care nodurile rețelei ajung la un acord asupra stării blockchain-ului.",fullContent:`**Consens** (consensus) este mecanismul prin care toate nodurile unei rețele blockchain ajung la un acord comun asupra stării curente a registrului, fără a necesita o autoritate centrală.
2998
2999**De ce este necesar:** Într-o rețea descentralizată, fără o autoritate centrală, trebuie să existe o metodă prin care toți participanții să fie de acord care tranzacții sunt valide și în ce ordine au avut loc.
3000
3001**Mecanisme principale:**
3002- **Proof of Work (PoW)** — Minerii rezolvă puzzle-uri computaționale. Primul care rezolvă adaugă blocul. Sigur dar energivore (Bitcoin)
3003- **Proof of Stake (PoS)** — Validatorii sunt selectați proporțional cu suma blocată (staked). Eficient energetic (Ethereum)
3004- **Delegated PoS** — Deținătorii votează delegați care validează (EOS, Tron)
3005- **Proof of Authority** — Validatori preaprobați, rapid dar centralizat (rețele private)
3006- **Byzantine Fault Tolerance (BFT)** — Tolerează până la 1/3 noduri malițioase (Tendermint/Cosmos)
3007
3008**Problema generalilor bizantini:** Mecanismele de consens rezolvă această problemă clasică din informatică — cum pot părți dis
3008persate să ajungă la un acord când unele pot fi corupte?
3009
3010**Finalitate:** Timpul necesar ca o tranzacție să fie considerată ireversibilă variază: Bitcoin ~60 min (6 confirmări), Ethereum ~15 min, Solana ~0.4 secunde.`,metaTitle:"Ce este Consensul Blockchain? Definiție & Mecanisme | Glosar EduWeb",metaDescription:"Consensul blockchain este procesul prin care nodurile ajung la un acord. Află despre PoW, PoS, DPoS, BFT și problema generalilor bizantini.",relatedSlugs:["blockchain","nod","hash","layer-1"]},en:{term:"Consensus",shortDef:"The process by which network nodes reach agreement on the state of the blockchain.",fullContent:`**Consensus** is the mechanism by which all nodes in a blockchain network reach a common agreement on the current state of the ledger, without requiring a central authority.
3011
3012**Why it's needed:** In a decentralized network, without a central authority, there must be a method for all participants to agree on which transactions are valid and in what order they occurred.
3013
3014**Main mechanisms:**
3015- **Proof of Work (PoW)** — Miners solve computational puzzles. The first to solve adds the block. Secure but energy-intensive (Bitcoin)
3016- **Proof of Stake (PoS)** — Validators are selected proportionally to the amount staked. Energy efficient (Ethereum)
3017- **Delegated PoS** — Holders vote for delegates who validate (EOS, Tron)
3018- **Proof of Authority** — Pre-approved validators, fast but centralized (private networks)
3019- **Byzantine Fault Tolerance (BFT)** — Tolerates up to 1/3 malicious nodes (Tendermint/Cosmos)
3020
3021**The Byzantine Generals Problem:** Consensus mechanisms solve this classic computer science problem — how can dispersed parties reach agreement when some may be corrupt?
3022
3023**Finality:** The time needed for a transaction to be considered irreversible varies: Bitcoin ~60 min (6 confirmations), Ethereum ~15 min, Solana ~0.4 seconds.`,metaTitle:"What is Blockchain Consensus? Definition & Mechanisms | EduWeb Glossary",metaDescription:"Blockchain consensus is the process by which nodes reach agreement. Learn about PoW, PoS, DPoS, BFT, and the Byzantine Generals Problem.",relatedSlugs:["blockchain","node","hash","layer-1"]}},{slug:"fork",category:"blockchain",ro:{term:"Fork",shortDef:"Bifurcație a blockchain-ului. Hard fork: schimbare incompatibilă. Soft fork: actualizare compatibilă.",fullContent:`**Fork** este o bifurcație sau ramificație a unui blockchain, care apare când protocolul suferă o modificare. Poate fi planificat (upgrade) sau controversat (dispută în comunitate).
3024
3025**Tipuri de fork-uri:**
3026
3027**Soft Fork** — Actualizare compatibilă înapoi. Nodurile vechi pot funcționa în continuare, dar nu vor beneficia de noile funcționalități. Exemplu: SegWit pe Bitcoin (2017).
3028
3029**Hard Fork** — Schimbare incompatibilă care creează două lanțuri separate. Nodurile vechi nu recunosc noile reguli. Exemplu: Ethereum → Ethereum Classic (2016, după hack-ul DAO).
3030
3031**Fork-uri celebre:**
3032- **Bitcoin Cash (2017)** — Fork din Bitcoin pentru blocuri mai mari (8MB vs 1MB)
3033- **Ethereum Classic (2016)** — Fork din Ethereum după hack-ul DAO de 60M$
3034- **The Merge (2022)** — Ethereum a trecut de la PoW la PoS (un upgrade, nu un fork controversat)
3035
3036**De ce apar fork-urile:**
3037- Dezacorduri în comunitate privind direcția proiectului
3038- Necesitatea de a corecta un hack sau o vulnerabilitate
3039- Implementarea de noi funcționalități sau îmbunătățiri
3040
3041**Impact:** Într-un hard fork, deținătorii de monede primesc echivalentul pe ambele lanțuri. Piața decide care lanț are mai multă valoare.`,metaTitle:"Ce este un Fork Blockchain? Definiție & Exemple | Glosar EduWeb",metaDescription:"Fork blockchain este o bifurcație a lanțului. Află diferența dintre hard fork și soft fork, exemple celebre (Bitcoin Cash, Ethereum Classic) și de ce apar.",relatedSlugs:["blockchain","consens","nod"]},en:{term:"Fork",shortDef:"A blockchain split. Hard fork: incompatible change. Soft fork: backward-compatible update.",fullContent:`**Fork** is a branching or splitting of a blockchain that occurs when the protocol undergoes a modification. It can be planned (upgrade) or controversial (community dispute).
3042
3043**Types of forks:**
3044
3045**Soft Fork** — Backward-compatible update. Old nodes can still function but won't benefit from new features. Example: SegWit on Bitc
3045oin (2017).
3046
3047**Hard Fork** — Incompatible change that creates two separate chains. Old nodes don't recognize the new rules. Example: Ethereum → Ethereum Classic (2016, after the DAO hack).
3048
3049**Famous forks:**
3050- **Bitcoin Cash (2017)** — Fork from Bitcoin for larger blocks (8MB vs 1MB)
3051- **Ethereum Classic (2016)** — Fork from Ethereum after the $60M DAO hack
3052- **The Merge (2022)** — Ethereum transitioned from PoW to PoS (an upgrade, not a controversial fork)
3053
3054**Why forks happen:**
3055- Community disagreements about project direction
3056- Need to fix a hack or vulnerability
3057- Implementation of new features or improvements
3058
3059**Impact:** In a hard fork, coin holders receive the equivalent on both chains. The market decides which chain has more value.`,metaTitle:"What is a Blockchain Fork? Definition & Examples | EduWeb Glossary",metaDescription:"A blockchain fork is a chain split. Learn the difference between hard fork and soft fork, famous examples (Bitcoin Cash, Ethereum Classic), and why they happen.",relatedSlugs:["blockchain","consensus","node"]}},{slug:"layer-1",category:"blockchain",ro:{term:"Layer 1",shortDef:"Blockchain-ul de bază (Bitcoin, Ethereum). Fundația pe care se construiesc protocoalele Layer 2.",fullContent:`**Layer 1** (L1) se referă la blockchain-ul de bază — protocolul fundamental care procesează și finalizează tranzacțiile pe propriul lanț. Este fundația pe care se construiesc soluțiile Layer 2.
3060
3061**Layer 1 principale:**
3062- **Bitcoin** — Primul L1, optimizat pentru transferuri de valoare și stocare de valoare
3063- **Ethereum** — Cel mai mare L1 pentru smart contracts și DeFi
3064- **Solana** — L1 de înaltă performanță (65.000 TPS)
3065- **Cardano** — L1 bazat pe cercetare academică peer-reviewed
3066- **Avalanche** — L1 cu subnets personalizabile
3067- **BNB Chain** — L1 al ecosistemului Binance
3068
3069**Trilema blockchain-ului:** Fiecare L1 face compromisuri între trei proprietăți:
3070- **Securitate** — Rezistența la atacuri
3071- **Descentralizare** — Numărul și distribuția nodurilor
3072- **Scalabilitate** — Numărul de tranzacții procesate pe secundă
3073
3074Niciun L1 nu excelează la toate trei simultan. Bitcoin prioritizează securitatea și descentralizarea. Solana prioritizează scalabilitatea.
3075
3076**Soluții de scalare L1:** Sharding (Ethereum), paralelism (Solana), subnets (Avalanche).
3077
3078**Relația L1-L2:** Layer 2 moștenește securitatea Layer 1, procesând tranzacțiile off-chain și raportând dovezile pe L1.`,metaTitle:"Ce este Layer 1? Definiție & Blockchain-uri L1 | Glosar EduWeb",metaDescription:"Layer 1 este blockchain-ul de bază (Bitcoin, Ethereum, Solana). Află ce sunt L1-urile, trilema blockchain și cum se compară principalele protocoale.",relatedSlugs:["layer-2","blockchain","consens","gas-fee"]},en:{term:"Layer 1",shortDef:"The base blockchain (Bitcoin, Ethereum). The foundation upon which Layer 2 protocols are built.",fullContent:`**Layer 1** (L1) refers to the base blockchain — the fundamental protocol that processes and finalizes transactions on its own chain. It's the foundation upon which Layer 2 solutions are built.
3079
3080**Main Layer 1s:**
3081- **Bitcoin** — The first L1, optimized for value transfers and store of value
3082- **Ethereum** — The largest L1 for smart contracts and DeFi
3083- **Solana** — High-performance L1 (65,000 TPS)
3084- **Cardano** — L1 based on peer-reviewed academic research
3085- **Avalanche** — L1 with customizable subnets
3086- **BNB Chain** — L1 of the Binance ecosystem
3087
3088**The blockchain trilemma:** Each L1 makes tradeoffs between three properties:
3089- **Security** — Resistance to attacks
3090- **Decentralization** — Number and distribution of nodes
3091- **Scalability** — Number of transactions processed per second
3092
3093No L1 excels at all three simultaneously. Bitcoin prioritizes security and decentralization. Solana prioritizes scalability.
3094
3095**L1 scaling solutions:** Sharding (Ethereum), parallelism (Solana), subnets (Avalanche).
3096
3097**L1-L2 relationship:** Layer 2 inherits Layer 1's security, processing transactions off-chain and reporting proofs to L1.`,metaTitle:"What is Layer 1? Definition & L1 Blockchains | EduWeb Glossary",metaDescription:"Layer 1 is the base blockchain (Bitcoin, Ethereum, Solana). Learn what L1s are, the blockchain trilemma, and how major protocols compare.",relatedSlugs:["layer-2","blockchain","consensus","gas-fee"]}},{slug:"token",category:"blockchain",ro:{term:"Token",shortDef:"Activ digital creat pe un blockchain existent. Poate fi fungibil (ERC-20) sau non-fungibil (NFT).",fullContent:`**Token** este un activ digital creat și gestionat pe un blockchain existent, spre deosebire de o „coin" (monedă) care are propriul blockchain.
3098
3099**Coin vs Token:**
3100- **Coin** — Are propriul blockchain (BTC pe Bitcoin, ETH pe Ethereum, SOL pe Solana)
3101- **Token** — Creat pe un blockchain existent (USDC, UNI, SHIB pe Ethereum)
3102
3103**Tipuri de tokenuri:**
3104- **Utility Tokens** — Oferă acces la servicii (UNI pentru guvernanță Uniswap, LINK pentru servicii oracle)
3105- **Security Tokens** — Reprezintă active financiare (acțiuni tokenizate, obligațiuni)
3106- **Governance Tokens** — Drept de vot în protocoale descentralizate (AAVE, COMP)
3107- **Stablecoins** — Valoare stabilă ancorată la fiat (USDC, USDT, DAI)
3108- **Meme Tokens** — Create în jurul culturii internet (DOGE, SHIB, PEPE)
3109- **NFT (Non-Fungible Tokens)** — Tokenuri unice, neinterschimbabile
3110
3111**Standarde tehnice:**
3112- **ERC-20** — Standard Ethereum pentru tokenuri fungibile
3113- **ERC-721** — Standard pentru NFT-uri (unice)
3114- **ERC-1155** — Standard multi-token (fungibile + non-fungibile)
3115- **SPL** — Standard Solana pentru tokenuri
3116
3117**Tokenomics:** Studiul economiei tokenurilor — supply total, distribuție, inflație, mecanism de ardere (burn), utilitate.`,metaTitle:"Ce este un Token Crypto? Definiție & Tipuri | Glosar EduWeb",metaDescription:"Un token este un activ digital creat pe un blockchain existent. Află diferența coin vs token, tipurile de tokenuri (utility, security, governance) și standardele tehnice.",relatedSlugs:["blockchain","smart-contract","nft","defi"]},en:{term:"Token",shortDef:"A digital asset created on an existing blockchain. Can be fungible (ERC-20) or non-fungible (NFT).",fullContent:`**Token** is a digital asset created and managed on an existing blockchain, as opposed to a "coin" which has its own blockchain.
3118
3119**Coin vs Token:**
3120- **Coin** — Has its own blockchain (BTC on Bitcoin, ETH on Ethereum, SOL on Solana)
3121- **Token** — Created on an existing blockchain (USDC, UNI, SHIB on Ethereum)
3122
3123**Types of tokens:**
3124- **Utility Tokens** — Provide access to services (UNI for Uniswap governance, LINK for oracle services)
3125- **Security Tokens** — Represent financial assets (tokenized stocks, bonds)
3126- **Governance Tokens** — Voting rights in decentralized protocols (AAVE, COMP)
3127- **Stablecoins** — Stable value pegged to fiat (USDC, USDT, DAI)
3128- **Meme Tokens** — Created around internet culture (DOGE, SHIB, PEPE)
3129- **NFT (Non-Fungible Tokens)** — Unique, non-interchangeable tokens
3130
3131**Technical standards:**
3132- **ERC-20** — Ethereum standard for fungible tokens
3133- **ERC-721** — Standard for NFTs (unique)
3134- **ERC-1155** — Multi-token standard (fungible + non-fungible)
3135- **SPL** — Solana standard for tokens
3136
3137**Tokenomics:** The study of token economics — total supply, distribution, inflation, burn mechanism, utility.`,metaTitle:"What is a Crypto Token? Definition & Types | EduWeb Glossary",metaDescription:"A token is a digital asset created on an existing blockchain. Learn the difference between coin and token, token types (utility, security, governance), and technical standards.",relatedSlugs:["blockchain","smart-contract","nft","defi"]}}];Sb.map(e=>e.slug);const RSt=Object.freeze(Object.defineProperty({__proto__:null,GLOSSARY_TERMS:Sb},Symbol.toStringTag,{value:"Module"}));function Ube(e){return{slug:e.slug,category:e.category,ro:{term:e.term_ro,shortDef:e.short_def_ro,fullContent:e.full_content_ro,metaTitle:e.meta_title_ro||`${e.term_ro} | Glosar EduWeb`,metaDescription:e.meta_description_ro||e.short_def_ro,relatedSlugs:e.related_slugs||[],faq:Array.isArray(e.faq_ro)?e.faq_ro:[]},en:{term:e.term_en||e.term_ro,shortDef:e.short_def_en||e.short_def_ro,fullContent:e.full_content_en||e.full_content_ro,metaTitle:e.meta_title_en||`${e.term_en||e.term_ro} | EduWeb Glossary`,metaDescription:e.meta_description_en||e.short_def_en||e.short_def_ro,relatedSlugs:e.related_slugs_en||e.related_slugs||[],faq:Array.isArray(e.faq_en)?e.faq_en:[]}}}function $be(){return Xe({queryKey:["glossary-terms-all"],queryFn:async()=>{const{data:e,error:r}=await G.from("glossary_terms").select("*").eq("is_published",!0).order("term_ro",{ascending:!0});return r||!e||e.length===0?Sb:e.map(Ube)},staleTime:5*60*1e3})}function DSt(e){return Xe({queryKey:["glossary-term",e],queryFn:async()=>
3137{if(!e)return null;const{data:r,error:n}=await G.from("glossary_terms").select("*").eq("slug",e).eq("is_published",!0).single();return!n&&r?Ube(r):Sb.find(i=>i.slug===e)||null},enabled:!!e,staleTime:5*60*1e3})}function yte(e){return e.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>")}function MSt(){const{lang:e}=Pt(),r=As(),[n,i]=w.useState(""),[a,o]=w.useState(!1),l=w.useRef(null),{data:c}=$be(),u=c||Sb,d=w.useMemo(()=>{if(!n.trim())return[];const p=n.trim().toLowerCase();return u.filter(m=>{const A=m[e]||m.ro;return m.slug.includes(p)||A.term.toLowerCase().includes(p)||A.shortDef.toLowerCase().includes(p)}).slice(0,8)},[n,e,u,u]);w.useEffect(()=>{const p=m=>{l.current&&!l.current.contains(m.target)&&o(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),Zr({title:e==="en"?"Blockchain & Web3 Glossary — Key Terms Explained":"Glosar Blockchain & Web3 — Termeni Cheie Explicați",description:e==="en"?"Complete glossary of blockchain and Web3 terms. Clear definitions for blockchain, smart contracts, DeFi, NFT, DAO, wallet, Layer 2, and more.":"Glosar complet de termeni blockchain și Web3. Definiții clare pentru blockchain, smart contracts, DeFi, NFT, DAO, wallet, Layer 2 și altele."});const h=e==="en"?"https://eduweb.ai":"https://eduweb.ro",f={"@context":"https://schema.org","@type":"DefinedTermSet",name:e==="en"?"EduWeb Blockchain & Web3 Glossary":"Glosar Blockchain & Web3 EduWeb",description:e==="en"?"Complete glossary of blockchain and Web3 terms with detailed explanations.":"Glosar complet de termeni blockchain și Web3 cu explicații detaliate.",url:`${h}/glosar`,hasDefinedTerm:u.map(p=>{var m,A;return{"@type":"DefinedTerm",name:((m=p[e])==null?void 0:m.term)||p.ro.term,description:((A=p[e])==null?void 0:A.shortDef)||p.ro.shortDef,url:`${h}/glosar/${p.slug}`}})};return u.filter(p=>p.category==="blockchain"||p.category==="both"),u.filter(p=>p.category==="web3"||p.category==="both"),s.jsxs(Ft,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(f)}}),s.jsx("div",{className:"container pt-6 pb-2",children:s.jsxs("nav",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[s.jsx(be,{to:"/",className:"hover:text-primary transition-colors",children:e==="en"?"Home":"Acasă"}),s.jsx("span",{children:"/"}),s.jsx("span",{className:"text-foreground font-medium",children:e==="en"?"Glossary":"Glosar"})]})}),s.jsxs("div",{className:"relative border-b border-border/30",children:[s.jsx("div",{className:"absolute inset-0 hero-gradient"}),s.jsx("div",{className:"absolute inset-0 grid-bg opacity-[0.04]"}),s.jsx("div",{className:"container relative z-10 py-14 md:py-20",children:s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"max-w-3xl",children:[s.jsx("span",{className:"inline-block px-3 py-1 rounded-full bg-primary/10 text-primary text-xs font-semibold tracking-widest mb-4",children:e==="en"?"EDUCATIONAL RESOURCE":"RESURSĂ EDUCAȚIONALĂ"}),s.jsx("h1",{className:"font-heading text-4xl md:text-5xl font-bold tracking-tight mb-4 text-foreground",children:e==="en"?"Blockchain & Web3 Glossary":"Glosar Blockchain & Web3"}),s.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed max-w-2xl",children:e==="en"?`${u.length} essential terms explained in detail. From blockchain fundamentals to advanced Web3 concepts.`:`${u.length} termeni esențiali explicați în detaliu. De la fundamentele blockchain la concepte avansate Web3.`})]})})]}),s.jsx("div",{className:"container relative z-[100] -mt-7 mb-8",children:s.jsxs("div",{ref:l,className:"relative max-w-xl mx-auto",children:[s.jsxs("div",{className:"relative",children:[s.jsx(ul,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground"}),s.jsx("input",{type:"text",value:n,onChange:p=>{i(p.target.value),o(!0)},onFocus:()=>o(!0),placeholder:e==="en"?"Search glossary terms...":"Caută termeni în glosar...",className:"w-full h-14 pl-12 pr-12 rounded-2xl border-2 border-primary/30 bg-background/90 backdrop-blur-md text-base text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary/60 transition-all shadow-lg"}),n&&s.jsx("button",{onClick:()=>{i(""),o(!1)},className:"absolute right-4 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",children:s.jsx(Uc,{className:"h-5 w-5"})})]}),a&&d.length>0&&s.jsx("div",{className:"absolute z-[100] top-full mt-2 w-full rounded-2xl border border-border bg-popover shadow-xl overflow-hidden",children:d.map(p=>{const m=p[e]||p.ro;return s.jsxs("button",{onClick:()=>{r(`/glosar/${p.slug}`),o(!1),i("")},className:"w-full text-left px-5 py-3.5 hover:bg-accent/50 transition-colors border-b border-border/30 last:border-b-0 flex items-start gap-3",children:[s.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-primary/10 text-primary shrink-0 mt-1 font-semibold uppercase tracking-wider",children:p.category==="both"?"B&W3":p.category==="blockchain"?"BC":"W3"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"font-semibold text-sm text-foreground",children:m.term}),s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 mt-0.5",dangerouslySetInnerHTML:{__html:yte(m.shortDef)}})]})]},p.slug)})}),a&&n.trim()&&d.length===0&&s.jsx("div",{className:"absolute z-[100] top-full mt-2 w-full rounded-2xl border border-border bg-popover shadow-xl p-5 text-center text-sm text-muted-foreground",children:e==="en"?"No terms found":"Niciun termen găsit"})]})}),s.jsxs("div",{className:"container py-12 md:py-16 space-y-12",children:[s.jsxs("section",{children:[s.jsxs("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 flex items-center gap-3",children:[s.jsx(yr,{size:24,className:"text-primary"}),e==="en"?"All Terms":"Toți Termenii",s.jsxs("span",{className:"text-sm font-normal text-muted-foreground",children:["(",u.length,")"]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:u.map((p,m)=>{const A=p[e]||p.ro;return s.jsx(Le.div,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.3,delay:m*.03},children:s.jsxs(be,{to:`/glosar/${p.slug}`,className:"glass-card rounded-xl p-5 block h-full group hover:border-primary/30 transition-all",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[s.jsx("h3",{className:"font-heading font-bold text-foreground group-hover:text-primary transition-colors",children:A.term}),s.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-secondary text-secondary-foreground shrink-0 mt-0.5",children:p.category==="both"?"B & W3":p.category==="blockchain"?"BC":"W3"})]}),s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-3",dangerouslySetInnerHTML:{__html:yte(A.shortDef)}}),s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-primary font-medium mt
3137-3 group-hover:gap-2 transition-all",children:[e==="en"?"Read more":"Citește mai mult"," ",s.jsx(Gt,{size:12})]})]})},p.slug)})})]}),s.jsxs("div",{className:"glass-card rounded-2xl p-8 text-center",children:[s.jsx("h3",{className:"font-heading text-2xl font-bold text-foreground mb-3",children:e==="en"?"Want the Full Picture?":"Vrei Imaginea Completă?"}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-lg mx-auto",children:e==="en"?"Read our comprehensive educational guides on Web3 and Blockchain.":"Citește ghidurile noastre educaționale complete despre Web3 și Blockchain."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[s.jsxs(be,{to:e==="en"?"/what-is-web3":"/ce-este-web3",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl bg-primary text-primary-foreground font-semibold text-sm hover:bg-primary/90 transition-colors",children:[e==="en"?"What is Web3?":"Ce este Web3?"," ",s.jsx(Gt,{size:16})]}),s.jsxs(be,{to:e==="en"?"/what-is-blockchain":"/ce-este-blockchain",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl border border-primary text-primary font-semibold text-sm hover:bg-primary/10 transition-colors",children:[e==="en"?"What is Blockchain?":"Ce este Blockchain?"," ",s.jsx(Gt,{size:16})]})]})]})]})]})}const Ez=()=>{const e=ps();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),s.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),s.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})};function lB(e){return e.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>")}function L1(e,r,n,i){const a=e;return s.jsx(a,{className:n,dangerouslySetInnerHTML:{__html:lB(r)}},i)}function zSt(e){const r=e.split(`
3138`),n=[];let i=[],a=[],o=0;function l(){if(i.length>0){const u=i.join(" ").trim();if(u){const d=u.match(/^\*\*(.+?)\*\*$/);d?n.push(L1("h3",d[1],"font-heading text-lg font-semibold text-foreground mt-5 mb-2",o++)):n.push(s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4 last:mb-0",dangerouslySetInnerHTML:{__html:lB(u)}},o++))}i=[]}}function c(){a.length>0&&(n.push(s.jsx("ul",{className:"list-disc pl-6 space-y-2 mb-4 text-foreground/90",children:a.map((u,d)=>s.jsx("li",{dangerouslySetInnerHTML:{__html:lB(u)}},d))},o++)),a=[])}for(const u of r){const d=u.trim();if(!d){l(),c();continue}const h=d.match(/^####\s+(.+)$/);if(h){l(),c(),n.push(L1("h4",h[1],"font-heading text-base font-semibold text-foreground mt-4 mb-2",o++));continue}const f=d.match(/^###\s+(.+)$/);if(f){l(),c(),n.push(L1("h3",f[1],"font-heading text-lg font-semibold text-foreground mt-5 mb-2",o++));continue}const p=d.match(/^##\s+(.+)$/);if(p){l(),c(),n.push(L1("h2",p[1],"font-heading text-xl font-bold text-foreground mt-6 mb-3",o++));continue}const m=d.match(/^#\s+(.+)$/);if(m){l(),c(),n.push(L1("h1",m[1],"font-heading text-2xl font-bold text-foreground mt-6 mb-3",o++));continue}const A=d.match(/^[\*\-•]\s+(.+)$/);if(A){l(),a.push(A[1]);continue}const g=d.match(/^\d+\.\s+(.+)$/);if(g){l(),a.push(g[1]);continue}c(),i.push(d)}return l(),c(),n}function USt(){var O,B;const{slug:e}=Zl(),{lang:r}=Pt(),n=Kr(),[i,a]=w.useState(!1),{data:o,isLoading:l}=DSt(e),{data:c}=$be(),u=o||void 0,d=u?u[r]||u.ro:null,h=c||Sb;Zr({title:(d==null?void 0:d.metaTitle)||"Glosar",description:(d==null?void 0:d.metaDescription)||""});const{data:f}=Xe({queryKey:["glossary-audio",e,r],queryFn:async()=>{const{data:T,error:F}=await G.from("glossary_audio").select("*").eq("slug",e).eq("lang",r).single();return F?null:T},enabled:!!e}),p=(f==null?void 0:f.status)==="ready"&&(f==null?void 0:f.audio_url),m=w.useCallback(async()=>{if(!(!u||!d||!e)){a(!0);try{const{data:T,error:F}=await G.functions.invoke("generate-glossary-audio",{body:{slug:e,lang:r,term:d.term,short_def:d.shortDef,full_content:d.fullContent}});if(F)throw F;if(!(T!=null&&T.success))throw new Error((T==null?void 0:T.error)||"Generation failed");n.invalidateQueries({queryKey:["glossary-audio",e,r]}),ft.success(r==="en"?"Audio generated!":"Audio generat!")}catch(T){console.error("Audio generation error:",T),ft.error(r==="en"?"Failed to generate audio":"Eroare la generarea audio")}finally{a(!1)}}},[u,d,e,r,n]);if(l)return s.jsx(Ft,{children:s.jsx("div",{className:"flex min-h-[60vh] items-center justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})});if(!u||!d)return s.jsx(Ez,{});const A=r==="en"?"https://eduweb.ai":"https://eduweb.ro",g=d.faq&&d.faq.length>0?d.faq:[],y={"@context":"https://schema.org","@type":"DefinedTerm",name:d.term,description:d.shortDef,inDefinedTermSet:{"@type":"DefinedTermSet",name:r==="en"?"EduWeb Blockchain & Web3 Glossary":"Glosar Blockchain & Web3 EduWeb",url:`${A}/glosar`},url:`${A}/glosar/${u.slug}`},x={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:r==="en"?"Home":"Acasă",item:A},{"@type":"ListItem",position:2,name:r==="en"?"Glossary":"Glosar",item:`${A}/glosar`},{"@type":"ListItem",position:3,name:d.term,item:`${A}/glosar/${u.slug}`}]},b=g.length>0?{"@context":"https://schema.org","@type":"FAQPage",mainEntity:g.map(T=>
3138({"@type":"Question",name:T.question,acceptedAnswer:{"@type":"Answer",text:T.answer}}))}:null,v=d.relatedSlugs.map(T=>h.find(F=>F.slug===T)).filter(Boolean),j=h.findIndex(T=>T.slug===u.slug),_=j>0?h[j-1]:null,C=j<h.length-1?h[j+1]:null;let N=null,S="",E=45;if(p&&f){S=f.audio_url,E=f.duration_seconds||45;const T=f.script_json;T!=null&&T.hook&&(N=T)}return s.jsxs(Ft,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(y)}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(x)}}),b&&s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(b)}}),s.jsx("div",{className:"container pt-6 pb-2",children:s.jsxs("nav",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[s.jsx(be,{to:"/",className:"hover:text-primary transition-colors",children:r==="en"?"Home":"Acasă"}),s.jsx("span",{children:"/"}),s.jsx(be,{to:"/glosar",className:"hover:text-primary transition-colors",children:r==="en"?"Glossary":"Glosar"}),s.jsx("span",{children:"/"}),s.jsx("span",{className:"text-foreground font-medium",children:d.term})]})}),s.jsxs("div",{className:"relative overflow-hidden border-b border-border/30",children:[s.jsx("div",{className:"absolute inset-0 hero-gradient"}),s.jsx("div",{className:"absolute inset-0 grid-bg opacity-[0.04]"}),s.jsx("div",{className:"container relative z-10 py-12 md:py-16",children:s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"max-w-3xl",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("span",{className:"inline-block px-3 py-1 rounded-full bg-primary/10 text-primary text-xs font-semibold tracking-widest",children:r==="en"?"GLOSSARY":"GLOSAR"}),s.jsx("span",{className:"inline-block px-2.5 py-0.5 rounded-full bg-secondary text-secondary-foreground text-xs font-medium",children:u.category==="both"?"Blockchain & Web3":u.category==="blockchain"?"Blockchain":"Web3"})]}),s.jsx("h1",{className:"font-heading text-4xl md:text-5xl font-bold tracking-tight mb-4 text-foreground",children:d.term}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground leading-relaxed",dangerouslySetInnerHTML:{__html:lB(d.shortDef)}})]})})]}),s.jsx("article",{className:"container py-12 md:py-16",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] gap-12",children:[s.jsxs("div",{className:"space-y-10",children:[s.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4},children:N?s.jsx(fp,{script:N,audioUrl:S,duration:E,topic:u.category==="blockchain"?"blockchain":"web3",postId:`glossary-${e}`,postTitle:d.term,sectionLabels:r==="en"?["","Definition","Example","Why it matters"]:["","Definiție","Exemplu practic","De ce contează"]}):s.jsx(fp,{script:{hook:d.term,section1:d.shortDef,section2:"",section3:"",closing:r==="en"?"Explore more terms in the EduWeb glossary":"Explorează mai mulți termeni în glosarul EduWeb"},audioUrl:"",duration:45,topic:u.category==="blockchain"?"blockchain":"web3",postId:`glossary-${e}`,postTitle:d.term,onDemandGenerate:m,isGenerating:i,sectionLabels:r==="en"?["","Definition","Example","Why it matters"]:["","Definiție","Exemplu practic","De ce contează"]})}),s.jsx(Le.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.5},className:"prose-custom",children:zSt(d.fullContent)}),g.length>0&&s.jsxs(Le.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"space-y-4",children:[s.jsx("h2",{className:"font-heading text-xl font-bold text-foreground",children:r==="en"?"Frequently Asked Questions":"Întrebări frecvente"}),s.jsx("div",{className:"space-y-3",children:g.map((T,F)=>s.jsxs("details",{className:"glass-card rounded-xl group",children:[s.jsxs("summary",{className:"flex items-center justify-between cursor-pointer px-5 py-4 text-foreground font-medium text-sm hover:text-primary transition-colors list-none",children:[s.jsx("span",{children:T.question}),s.jsx(Gt,{size:14,className:"shrink-0 ml-2 transition-transform group-open:rotate-90"})]}),s.jsx("div",{className:"px-5 pb-4 text-sm text-muted-foreground leading-relaxed",children:T.answer})]},F))})]}),s.jsxs("div",{className:"flex items-center justify-between pt-6 border-t border-border/50",children:[_?s.jsxs(be,{to:`/glosar/${_.slug}`,className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-primary transition-colors",children:[s.jsx(rn,{size:16}),s.jsx("span",{children:((O=_[r])==null?void 0:O.term)||_.ro.term})]}):s.jsx("div",{}),C?s.jsxs(be,{to:`/glosar/${C.slug}`,className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-primary transition-colors",children:[s.jsx("span",{children:((B=C[r])==null?void 0:B.term)||C.ro.term}),s.jsx(Gt,{size:16})]}):s.jsx("div",{})]}),s.jsxs("div",{className:"glass-card rounded-2xl p-8 text-center",children:[s.jsx("h3",{className:"font-heading text-xl font-bold text-foreground mb-3",children:r==="en"?"Learn More in EduWeb Academy":"Află mai mult în EduWeb Academy"}),s.jsx("p",{className:"text-muted-foreground mb-5 max-w-md mx-auto text-sm",children:r==="en"?"Explore our free courses on blockchain, Web3, and decentralized technologies.":"Explorează cursurile noastre gratuite despre blockchain, Web3 și tehnologii descentralizate."}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl bg-primary text-primary-foreground font-semibold text-sm hover:bg-primary/90 transition-colors",children:[r==="en"?"Explore Academy":"Explorează Academy"," ",s.jsx(Gt,{size:16})]})]})]}),s.jsx("aside",{className:"hidden lg:block space-y-6",children:s.jsxs("div",{className:"sticky top-24 space-y-6",children:[v.length>0&&s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:r==="en"?"Related Terms":"Termeni Înrudiți"}),s.jsx("div",{className:"space-y-1.5",children:v.map(T=>{var F;return T&&s.jsxs(be,{to:`/glosar/${T.slug}`,className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:[s.jsx(yr,{size:13,className:"text-primary shrink-0"}),((F=T[r])==null?void 0:F.term)||T.ro.term,s.jsx(Yr,{size:11,className:"ml-auto opacity-40"})]},T.slug)})})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:r==="en"?"All Glossary Terms":"Toți Termenii"}),s.jsx("div",{className:"space-y-1 max-h-80 overflow-y-auto",children:h.map(T=>{var F;return s.jsx(be,{to:`/glosar/${T.slug}`,className:`block px-3 py-1.5 rounded-lg text-sm transition-colors ${T.slug===u.slug?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:text-foreground hover:bg-secondary"}`,children:((F=T[r])==null?void 0:F.term)||T.ro.term},T.slug)})})]}),s.jsxs("div",{className:"glass-card rounded-xl p-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm text-foreground mb-3",children:r==="en"?"Educational Guides":"Ghiduri Educaționale"}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(be,{to:r==="en"?"/what-is-web3":"/ce-este-web3",className:"block px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:r==="en"?"What is Web3?":"Ce este Web3?"}),s.jsx(be,{to:r==="en"?"/what-is-blockchain":"/ce-este-blockchain",className:"block px-3 py-2 rounded-lg hover:bg-secondary transition-colors text-sm text-muted-foreground hover:text-foreground",children:r==="en"?"What is Blockchain?":"Ce este Blockchain?"})]})]})]})})]})})]})}function $St(){const{lang:e}=Pt();return Xe({queryKey:["knowledge-graph",e],queryFn:async()=>{var l,c;const r=[],n=[],i=new Set,{data:a}=await G.from("glossary_terms").select("slug, term_ro, term_en, short_def_ro, short_def_en, c
3138ategory, related_slugs, related_slugs_en").eq("is_published",!0);if(a){for(const u of a){const d=`glossary-${u.slug}`;i.add(d),r.push({id:d,label:e==="en"&&u.term_en||u.term_ro,shortDef:e==="en"&&u.short_def_en||u.short_def_ro,type:"glossary",category:u.category||"both",url:`/glosar/${u.slug}`,connections:0})}for(const u of a){const d=e==="en"&&(l=u.related_slugs_en)!=null&&l.length?u.related_slugs_en:u.related_slugs;if(d)for(const h of d){const f=`glossary-${u.slug}`,p=`glossary-${h}`;if(i.has(p)&&f!==p){const m=[f,p].sort().join("|");n.some(A=>[A.source,A.target].sort().join("|")===m)||n.push({source:f,target:p})}}}}const{data:o}=await G.from("courses").select("slug, title, title_en, short_description, short_description_en, topics").eq("is_published",!0);if(o)for(const u of o){const d=`course-${u.slug}`;if(i.add(d),r.push({id:d,label:e==="en"&&u.title_en||u.title,shortDef:e==="en"?u.short_description_en||u.short_description||"":u.short_description||"",type:"course",category:((c=u.topics)==null?void 0:c[0])||"general",url:`/academy/${u.slug}`,connections:0}),u.topics)for(const h of u.topics){const f=h.toLowerCase();for(const p of r)if(p.type==="glossary"&&p.category.toLowerCase()===f){const m=[d,p.id].sort().join("|");n.some(A=>[A.source,A.target].sort().join("|")===m)||n.push({source:d,target:p.id})}}}for(const u of n){const d=r.find(f=>f.id===u.source),h=r.find(f=>f.id===u.target);d&&d.connections++,h&&h.connections++}return{nodes:r,links:n}},staleTime:30*60*1e3})}function QSt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function HSt(e,r,n){return r=JSt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function vte(e,r){return qSt(e)||QSt(e,r)||Qbe(e,r)||XSt()}function VSt(e){return WSt(e)||KSt(e)||Qbe(e)||GSt()}function WSt(e){if(Array.isArray(e))return Bz(e)}function qSt(e){if(Array.isArray(e))return e}function KSt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qbe(e,r){if(e){if(typeof e=="string")return Bz(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bz(e,r)}}function Bz(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function GSt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3139In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XSt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3140In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YSt(e,r){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function JSt(e){var r=YSt(e,"string");return typeof r=="symbol"?r:String(r)}var ZSt=function(r,n){var i=new Set(n);return Object.assign.apply(Object,[{}].concat(VSt(Object.entries(r).filter(function(a){var o=vte(a,1),l=o[0];return!i.has(l)}).map(function(a){var o=vte(a,2),l=o[0],c=o[1];return HSt({},l,c)}))))};function Tz(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=Array(r);n<r;n++)i[n]=e[n];return i}function ekt(e){if(Array.isArray(e))return e}function tkt(e){if(Array.isArray(e))return Tz(e)}function rkt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nkt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;
3140!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function ikt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3141In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function akt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3142In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function skt(e,r){return ekt(e)||nkt(e,r)||Hbe(e,r)||ikt()}function bte(e){return tkt(e)||rkt(e)||Hbe(e)||akt()}function Hbe(e,r){if(e){if(typeof e=="string")return Tz(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tz(e,r):void 0}}function okt(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.wrapperElementType,i=n===void 0?"div":n,a=r.nodeMapper,o=a===void 0?function(h){return h}:a,l=r.methodNames,c=l===void 0?[]:l,u=r.initPropNames,d=u===void 0?[]:u;return w.forwardRef(function(h,f){var p=w.useRef(),m=w.useMemo(function(){var y=Object.fromEntries(d.filter(function(x){return h.hasOwnProperty(x)}).map(function(x){return[x,h[x]]}));return e(y)},[]);wte(function(){m(o(p.current))},w.useLayoutEffect),wte(function(){return m._destructor instanceof Function?m._destructor:void 0});var A=w.useCallback(function(y){for(var x=arguments.length,b=new Array(x>1?x-1:0),v=1;v<x;v++)b[v-1]=arguments[v];return m[y]instanceof Function?m[y].apply(m,b):void 0},[m]),g=w.useRef({});return Object.keys(ZSt(h,[].concat(bte(c),bte(d)))).filter(function(y){return g.current[y]!==h[y]}).forEach(function(y){return A(y,h[y])}),g.current=h,w.useImperativeHandle(f,function(){return Object.fromEntries(c.map(function(y){return[y,function(){for(var x=arguments.length,b=new Array(x),v=0;v<x;v++)b[v]=arguments[v];return A.apply(void 0,[y].concat(b))}]}))},[A]),ee.createElement(i,{ref:p})})}function wte(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w.useEffect,n=w.useRef(),i=w.useRef(!1),a=w.useRef(!1),o=w.useState(0),l=skt(o,2);l[0];var c=l[1];i.current&&(a.current=!0),r(function(){return i.current||(n.current=e(),i.current=!0),c(function(u){return u+1}),function(){a.current&&n.current&&n.current()}},[])}var Pz="http://www.w3.org/1999/xhtml";const jte={svg:"http://www.w3.org/2000/svg",xhtml:Pz,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function A3(e){var r=e+="",n=r.indexOf(":");return n>=0&&(r=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),jte.hasOwnProperty(r)?{space:jte[r],local:e}:e}function lkt(e){return function(){var r=this.ownerDocument,n=this.namespaceURI;return n===Pz&&r.documentElement.namespaceURI===Pz?r.createElement(e):r.createElementNS(n,e)}}function ckt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Vbe(e){var r=A3(e);return(r.local?ckt:lkt)(r)}function ukt(){}function z7(e){return e==null?ukt:function(){return this.querySelector(e)}}function dkt(e){typeof e!="function"&&(e=z7(e));for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a)for(var o=r[a],l=o.length,c=i[a]=new Array(l),u,d,h=0;h<l;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),c[h]=d);return new Xl(i,this._parents)}function hkt(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function fkt(){return[]}function Wbe(e){return e==null?fkt:function(){return this.querySelectorAll(e)}}function mkt(e){return function(){return hkt(e.apply(this,arguments))}}function pkt(e){typeof e=="function"?e=mkt(e):e=Wbe(e);for(var r=this._groups,n=r.length,i=[],a=[],o=0;o<n;++o)for(var l=r[o],c=l.length,u,d=0;d<c;++d)(u=l[d])&&(i.push(e.call(u,u.__data__,d,l)),a.push(u));return new Xl(i,a)}function qbe(e){return function(){return this.matches(e)}}function Kbe(e){return function(r){return r.matches(e)}}var Akt=Array.prototype.find;function gkt(e){return function(){return Akt.call(this.children,e)}}function xkt(){return this.firstElementChild}function ykt(e){return this.select(e==null?xkt:gkt(typeof e=="function"?e:Kbe(e)))}var vkt=Array.prototype.filter;function bkt(){return Array.from(this.children)}function wkt(e){return function(){return vkt.call(this.children,e)}}function jkt(e){return this.selectAll(e==null?bkt:wkt(typeof e=="function"?e:Kbe(e)))}function _kt(e){typeof e!="function"&&(e=qbe(e));for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a)for(var o=r[a],l=o.length,c=i[a]=[],u,d=0;d<l;++d)(u=o[d])&&e.call(u,u.__data__,d,o)&&c.push(u);return new Xl(i,this._parents)}function Gbe(e){return new Array(e.length)}function Ckt(){return new Xl(this._enter||this._groups.map(Gbe),this._parents)}function cB(e,r){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=r}cB.prototype={constructor:cB,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,r){return this._parent.insertBefore(e,r)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Nkt(e){return function(){return e}}function Skt(e,r,n,i,a,o){for(var l=0,c,u=r.length,d=o.length;l<d;++l)(c=r[l])?(c.__data__=o[l],i[l]=c):n[l]=new cB(e,o[l]);for(;l<u;++l)(c=r[l])&&(a[l]=c)}function kkt(e,r,n,i,a,o,l){var c,u,d=new Map,h=r.length,f=o.length,p=new Array(h),m;for(c=0;c<h;++c)(u=r[c])&&(p[c]=m=l.call(u,u.__data__,c,r)+"",d.has(m)?a[c]=u:d.set(m,u));for(c=0;c<f;++c)m=l.call(e,o[c],c,o)+"",(u=d.get(m))?(i[c]=u,u.__data__=o[c],d.delete(m)):n[c]=new cB(e,o[c]);for(c=0;c<h;++c)(u=r[c])&&d.get(p[c])===u&&(a[c]=u)}function Ekt(e){return e.__data__}function Bkt(e,r){if(!arguments.length)return Array.from(this,Ekt);var n=r?kkt:Skt,i=this._parents,a=this._groups;typeof e!="function"&&(e=Nkt(e));for(var o=a.length,l=new Array(o),c=new Array(o),u=new Array(o),d=0;d<o;++d){var h=i[d],f=a[d],p=f.length,m=Tkt(e.call(h,h&&h.__data__,d,i)),A=m.length,g=c[d]=new Array(A),y=l[d]=new Array(A),x=u[d]=new Array(p);n(h,f,g,y,x,m,r);for(var b=0,v=0,j,_;b<A;++b)if(j=g[b]){for(b>=v&&(v=b+1);!(_=y[v])&&++v<A;);j._next=_||null}}return l=new Xl(l,i),l._enter=c,l._exit=u,l}function Tkt(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Pkt(){return new Xl(this._exit||this._groups.map(Gbe),this._parents)}function Ikt(e,r,n){var i=this.enter(),a=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),r!=null&&(a=r(a),a&&(a=a.selection())),n==null?o.remove():n(o),i&&a?i.merge(a).order():a}function Fkt(e){for(var r=e.selection?e.selection():e,n=this._groups,i=r._groups,a=n.length,o=i.length,l=Math.min(a,o),c=new Array(a),u=0;u<l;++u)for(var d=n[u],h=i[u],f=d.length,p=c[u]=new Array(f),m,A=0;A<f;++A)(m=d[A]||h[A])&&(p[A]=m);for(;u<a;++u)c[u]=n[u];return new Xl(c,this._parents)}function Okt(){for(var e=this._groups,r=-1,n=e.length;++r<n;)for(var i=e[r],a=i.length-1,o=i[a],l;--a>=0;)(l=i[a])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function Lkt(e){e||(e=Rkt);function r(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var n=this._groups,i=n.length,a=new Array(i),o=0;o<i;++o){for(var l=n[o],c=l.length,u=a[o]=new Array(c),d,h=0;h<c;++h)(d=l[h])&&(u[h]=d);u.sort(r)}return new Xl(a,this._parents).order()}function Rkt(e,r){return e<r?-1:e>r?1:e>=r?0:NaN}function Dkt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Mkt(){return Array.from(this)}function zkt(){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],a=0,o=i.length;a<o;++a){var l=i[a];if(l)return l}return null}function Ukt(){let e=0;for(const r of this)++e;return e}function $kt(){return!this.node()}function Qkt(e){for(var r=this._groups,n=0,i=r.length;n<i;++n)for(var a=r[n],o=0,l=a.length,c;o<l;++o)(c=a[o])&&e.call(c,c.__data__,o,a);return this}function Hkt(e){return function(){this.removeAttribute(e)}}function Vkt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wkt(e,r){return function(){this.setAttribute(e,r)}}function qkt(e,r){return function(){this.setAttributeNS(e.space,e.local,r)}}function Kkt(e,r){return function(){var n=r.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Gkt(e,r){return function(){var n=r.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Xkt(e,r){var n=A3(e);
vendor: 5,868 bytes, line 3142
3142if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((r==null?n.local?Vkt:Hkt:typeof r=="function"?n.local?Gkt:Kkt:n.local?qkt:Wkt)(n,r))}function Xbe(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ykt(e){return function(){this.style.removeProperty(e)}}function Jkt(e,r,n){return function(){this.style.setProperty(e,r,n)}}function Zkt(e,r,n){return function(){var i=r.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function eEt(e,r,n){return arguments.length>1?this.each((r==null?Ykt:typeof r=="function"?Zkt:Jkt)(e,r,n??"")):j0(this.node(),e)}function j0(e,r){return e.style.getPropertyValue(r)||Xbe(e).getComputedStyle(e,null).getPropertyValue(r)}function tEt(e){return function(){delete this[e]}}function rEt(e,r){return function(){this[e]=r}}function nEt(e,r){return function(){var n=r.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function iEt(e,r){return arguments.length>1?this.each((r==null?tEt:typeof r=="function"?nEt:rEt)(e,r)):this.node()[e]}function Ybe(e){return e.trim().split(/^|\s+/)}function U7(e){return e.classList||new Jbe(e)}function Jbe(e){this._node=e,this._names=Ybe(e.getAttribute("class")||"")}Jbe.prototype={add:function(e){var r=this._names.indexOf(e);r<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var r=this._names.indexOf(e);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Zbe(e,r){for(var n=U7(e),i=-1,a=r.length;++i<a;)n.add(r[i])}function e1e(e,r){for(var n=U7(e),i=-1,a=r.length;++i<a;)n.remove(r[i])}function aEt(e){return function(){Zbe(this,e)}}function sEt(e){return function(){e1e(this,e)}}function oEt(e,r){return function(){(r.apply(this,arguments)?Zbe:e1e)(this,e)}}function lEt(e,r){var n=Ybe(e+"");if(arguments.length<2){for(var i=U7(this.node()),a=-1,o=n.length;++a<o;)if(!i.contains(n[a]))return!1;return!0}return this.each((typeof r=="function"?oEt:r?aEt:sEt)(n,r))}function cEt(){this.textContent=""}function uEt(e){return function(){this.textContent=e}}function dEt(e){return function(){var r=e.apply(this,arguments);this.textContent=r??""}}function hEt(e){return arguments.length?this.each(e==null?cEt:(typeof e=="function"?dEt:uEt)(e)):this.node().textContent}function fEt(){this.innerHTML=""}function mEt(e){return function(){this.innerHTML=e}}function pEt(e){return function(){var r=e.apply(this,arguments);this.innerHTML=r??""}}function AEt(e){return arguments.length?this.each(e==null?fEt:(typeof e=="function"?pEt:mEt)(e)):this.node().innerHTML}function gEt(){this.nextSibling&&this.parentNode.appendChild(this)}function xEt(){return this.each(gEt)}function yEt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vEt(){return this.each(yEt)}function bEt(e){var r=typeof e=="function"?e:Vbe(e);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function wEt(){return null}function jEt(e,r){var n=typeof e=="function"?e:Vbe(e),i=r==null?wEt:typeof r=="function"?r:z7(r);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function _Et(){var e=this.parentNode;e&&e.removeChild(this)}function CEt(){return this.each(_Et)}function NEt(){var e=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function SEt(){var e=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function kEt(e){return this.select(e?SEt:NEt)}function EEt(e){return arguments.length?this.property("__data__",e):this.node().__data__}function BEt(e){return function(r){e.call(this,r,this.__data__)}}function TEt(e){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");return i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),{type:r,name:n}})}function PEt(e){return function(){var r=this.__on;if(r){for(var n=0,i=-1,a=r.length,o;n<a;++n)o=r[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):r[++i]=o;++i?r.length=i:delete this.__on}}}function IEt(e,r,n){return function(){var i=this.__on,a,o=BEt(r);if(i){for(var l=0,c=i.length;l<c;++l)if((a=i[l]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=n),a.value=r;return}}this.addEventListener(e.type,o,n),a={type:e.type,name:e.name,value:r,listener:o,options:n},i?i.push(a):this.__on=[a]}}function FEt(e,r,n){var i=TEt(e+""),a,o=i.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var u=0,d=c.length,h;u<d;++u)for(a=0,h=c[u];a<o;++a)if((l=i[a]).type===h.type&&l.name===h.name)return h.value}return}for(c=r?IEt:PEt,a=0;a<o;++a)this.each(c(i[a],r,n));return this}function t1e(e,r,n){var i=Xbe(e),a=i.CustomEvent;typeof a=="function"?a=new a(r,n):(a=i.document.createEvent("Event"),n?(a.initEvent(r,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(r,!1,!1)),e.dispatchEvent(a)}function OEt(e,r){return function(){return t1e(this,e,r)}}function LEt(e,r){return function(){return t1e(this,e,r.apply(this,arguments))}}function REt(e,r){return this.each((typeof r=="function"?LEt:OEt)(e,r))}function*DEt(){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],a=0,o=i.length,l;a<o;++a)(l=i[a])&&(yield l)}var r1e=[null];function Xl(e,r){this._groups=e,this._parents=r}function eC(){return new Xl([[document.documentElement]],r1e)}function MEt(){return this}Xl.prototype=eC.prototype={constructor:Xl,select:dkt,selectAll:pkt,selectChild:ykt,selectChildren:jkt,filter:_kt,data:Bkt,enter:Ckt,exit:Pkt,join:Ikt,merge:Fkt,selection:MEt,order:Okt,sort:Lkt,call:Dkt,nodes:Mkt,node:zkt,size:Ukt,empty:$kt,each:
vendor: 14,387 bytes, line 3142
3142Qkt,attr:Xkt,style:eEt,property:iEt,classed:lEt,text:hEt,html:AEt,raise:xEt,lower:vEt,append:bEt,insert:jEt,remove:CEt,clone:kEt,datum:EEt,on:FEt,dispatch:REt,[Symbol.iterator]:DEt};function vc(e){return typeof e=="string"?new Xl([[document.querySelector(e)]],[document.documentElement]):new Xl([[e]],r1e)}function zEt(e){let r;for(;r=e.sourceEvent;)e=r;return e}function od(e,r){if(e=zEt(e),r===void 0&&(r=e.currentTarget),r){var n=r.ownerSVGElement||r;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(r.getScreenCTM().inverse()),[i.x,i.y]}if(r.getBoundingClientRect){var a=r.getBoundingClientRect();return[e.clientX-a.left-r.clientLeft,e.clientY-a.top-r.clientTop]}}return[e.pageX,e.pageY]}var UEt={value:()=>{}};function tC(){for(var e=0,r=arguments.length,n={},i;e<r;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new wk(n)}function wk(e){this._=e}function $Et(e,r){return e.trim().split(/^|\s+/).map(function(n){var i="",a=n.indexOf(".");if(a>=0&&(i=n.slice(a+1),n=n.slice(0,a)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}wk.prototype=tC.prototype={constructor:wk,on:function(e,r){var n=this._,i=$Et(e+"",n),a,o=-1,l=i.length;if(arguments.length<2){for(;++o<l;)if((a=(e=i[o]).type)&&(a=QEt(n[a],e.name)))return a;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++o<l;)if(a=(e=i[o]).type)n[a]=_te(n[a],e.name,r);else if(r==null)for(a in n)n[a]=_te(n[a],e.name,null);return this},copy:function(){var e={},r=this._;for(var n in r)e[n]=r[n].slice();return new wk(e)},call:function(e,r){if((a=arguments.length-2)>0)for(var n=new Array(a),i=0,a,o;i<a;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(r,n)},apply:function(e,r,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,o=i.length;a<o;++a)i[a].value.apply(r,n)}};function QEt(e,r){for(var n=0,i=e.length,a;n<i;++n)if((a=e[n]).name===r)return a.value}function _te(e,r,n){for(var i=0,a=e.length;i<a;++i)if(e[i].name===r){e[i]=UEt,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:r,value:n}),e}const HEt={passive:!1},Wj={capture:!0,passive:!1};function VF(e){e.stopImmediatePropagation()}function hv(e){e.preventDefault(),e.stopImmediatePropagation()}function n1e(e){var r=e.document.documentElement,n=vc(e).on("dragstart.drag",hv,Wj);"onselectstart"in r?n.on("selectstart.drag",hv,Wj):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function i1e(e,r){var n=e.document.documentElement,i=vc(e).on("dragstart.drag",null);r&&(i.on("click.drag",hv,Wj),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const aS=e=>()=>e;function Iz(e,{sourceEvent:r,subject:n,target:i,identifier:a,active:o,x:l,y:c,dx:u,dy:d,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:h}})}Iz.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function VEt(e){return!e.ctrlKey&&!e.button}function WEt(){return this.parentNode}function qEt(e,r){return r??{x:e.x,y:e.y}}function KEt(){return navigator.maxTouchPoints||"ontouchstart"in this}function GEt(){var e=VEt,r=WEt,n=qEt,i=KEt,a={},o=tC("start","drag","end"),l=0,c,u,d,h,f=0;function p(j){j.on("mousedown.drag",m).filter(i).on("touchstart.drag",y).on("touchmove.drag",x,HEt).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(j,_){if(!(h||!e.call(this,j,_))){var C=v(this,r.call(this,j,_),j,_,"mouse");C&&(vc(j.view).on("mousemove.drag",A,Wj).on("mouseup.drag",g,Wj),n1e(j.view),VF(j),d=!1,c=j.clientX,u=j.clientY,C("start",j))}}function A(j){if(hv(j),!d){var _=j.clientX-c,C=j.clientY-u;d=_*_+C*C>f}a.mouse("drag",j)}function g(j){vc(j.view).on("mousemove.drag mouseup.drag",null),i1e(j.view,d),hv(j),a.mouse("end",j)}function y(j,_){if(e.call(this,j,_)){var C=j.changedTouches,N=r.call(this,j,_),S=C.length,E,O;for(E=0;E<S;++E)(O=v(this,N,j,_,C[E].identifier,C[E]))&&(VF(j),O("start",j,C[E]))}}function x(j){var _=j.changedTouches,C=_.length,N,S;for(N=0;N<C;++N)(S=a[_[N].identifier])&&(hv(j),S("drag",j,_[N]))}function b(j){var _=j.changedTouches,C=_.length,N,S;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),N=0;N<C;++N)(S=a[_[N].identifier])&&(VF(j),S("end",j,_[N]))}function v(j,_,C,N,S,E){var O=o.copy(),B=od(E||C,_),T,F,I;if((I=n.call(j,new Iz("beforestart",{sourceEvent:C,target:p,identifier:S,active:l,x:B[0],y:B[1],dx:0,dy:0,dispatch:O}),N))!=null)return T=I.x-B[0]||0,F=I.y-B[1]||0,function D(L,V,U){var Q=B,$;switch(L){case"start":a[S]=D,$=l++;break;case"end":delete a[S],--l;case"drag":B=od(U||V,_),$=l;break}O.call(L,j,new Iz(L,{sourceEvent:V,subject:I,target:p,identifier:S,active:$,x:B[0]+T,y:B[1]+F,dx:B[0]-Q[0],dy:B[1]-Q[1],dispatch:O}),N)}}return p.filter=function(j){return arguments.length?(e=typeof j=="function"?j:aS(!!j),p):e},p.container=function(j){return arguments.length?(r=typeof j=="function"?j:aS(j),p):r},p.subject=function(j){return arguments.length?(n=typeof j=="function"?j:aS(j),p):n},p.touchable=function(j){return arguments.length?(i=typeof j=="function"?j:aS(!!j),p):i},p.on=function(){var j=o.on.apply(o,arguments);return j===o?p:j},p.clickDistance=function(j){return arguments.length?(f=(j=+j)*j,p):Math.sqrt(f)},p}var _0=0,uw=0,R1=0,a1e=1e3,uB,dw,dB=0,Pg=0,g3=0,qj=typeof performance=="object"&&performance.now?performance:Date,s1e=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function $7(){return Pg||(s1e(XEt),Pg=qj.now()+g3)}function XEt(){Pg=0}function hB(){this._call=this._time=this._next=null}hB.prototype=Q7.prototype={constructor:hB,restart:function(e,r,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?$7():+n)+(r==null?0:+r),!this._next&&dw!==this&&(dw?dw._next=this:uB=this,dw=this),this._call=e,this._time=n,Fz()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fz())}};function Q7(e,r,n){var i=new hB;return i.restart(e,r,n),i}function YEt(){$7(),++_0;for(var e=uB,r;e;)(r=Pg-e._time)>=0&&e._call.call(void 0,r),e=e._next;--_0}function Cte(){Pg=(dB=qj.now())+g3,_0=uw=0;try{YEt()}finally{_0=0,ZEt(),Pg=0}}function JEt(){var e=qj.now(),r=e-dB;r>a1e&&(g3-=r,dB=e)}function ZEt(){for(var e,r=uB,n,i=1/0;r;)r._call?(i>r._time&&(i=r._time),e=r,r=r._next):(n=r._next,r._next=null,r=e?e._next=n:uB=n);dw=e,Fz(i)}function Fz(e){if(!_0){uw&&(uw=clearTimeout(uw));var r=e-Pg;r>24?(e<1/0&&(uw=setTimeout(Cte,e-qj.now()-g3)),R1&&(R1=clearInterval(R1))):(R1||(dB=qj.now(),R1=setInterval(JEt,a1e)),_0=1,s1e(Cte))}}function Nte(e,r,n){var i=new hB;return r=r==null?0:+r,i.restart(a=>{i.stop(),e(a+r)},r,n),i}var e5t=tC("start","end","cancel","interrupt"),t5t=[],o1e=0,Ste=1,Oz=2,jk=3,kte=4,Lz=5,_k=6;function x3(e,r,n,i,a,o){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;r5t(e,n,{name:r,index:i,group:a,on:e5t,tween:t5t,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:o1e})}function H7(e,r){var n=Mu(e,r);if(n.state>o1e)throw new Error("too late; already scheduled");return n}function Vd(e,r){var n=Mu(e,r);if(n.state>jk)throw new Error("too late; already running");return n}function Mu(e,r){var n=e.__transition;if(!n||!(n=n[r]))throw new Error("transition not found");return n}function r5t(e,r,n){var i=e.__transition,a;i[r]=n,n.timer=Q7(o,0,n.time);function o(d){n.state=Ste,n.timer.restart(l,n.delay,n.time),n.delay<=d&&l(d-n.delay)}function l(d){var h,f,p,m;if(n.state!==Ste)return u();for(h in i)if(m=i[h],m.name===n.name){if(m.state===jk)return Nte(l);m.state===kte?(m.state=_k,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete i[h]):+h<r&&(m.state=_k,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete i[h])}if(Nte(function(){n.state===jk&&(n.state=kte,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=Oz,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Oz){for(n.state=jk,a=new Array(p=n.tween.length),h=0,f=-1;h<p;++h)(m=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(a[++f]=m);a.length=f+1}}function c(d){for(var h=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(u),n.state=Lz,1),f=-1,p=a.length;++f<p;)a[f].call(e,h);n.state===Lz&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=_k,n.timer.stop(),delete i[r];for(var d in i)return;delete e.__transition}}function Ck(e,r){var n=e.__transition,i,a,o=!0,l;if(n){r=r==null?null:r+"";for(l in n){if((i=n[l]).name!==r){o=!1;continue}a=i.state>Oz&&i.state<Lz,i.state=_k,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[l]}o&&delete e.__transition}}function n5t(e){return this.each(function(){Ck(this,e)})}function i5t(e,r){var n,i;return function(){var a=Vd(this,e),o=a.tween;if(o!==n){i=n=o;for(var l=0,c=i.length;l<c;++l)if(i[l].name===r){i=i.slice(),i.splice(l,1);break}}a.tween=i}}function a5t(e,r,n){var i,a;if(typeof n!="function")throw new Error;return function(){var o=Vd(this,e),l=o.tween;if(l!==i){a=(i=l).slice();for(var c={name:r,value:n},u=0,d=a.length;u<d;++u)if(a[u].name===r){a[u]=c;break}u===d&&a.push(c)}o.tween=a}}function s5t(e,r){var n=this._id;if(e+="",arguments.length<2){for(var i=Mu(this.node(),n).tween,a=0,o=i.length,l;a<o;++a)if((l=i[a]).name===e)return l.value;return null}return this.each((r==null?i5t:a5t)(n,e,r))}function V7(e,r,n){var i=e._id;return e.each(function(){var a=Vd(this,i);(a.value||(a.value={}))[r]=n.apply(this,arguments)}),function(a){return Mu(a,i).value[r]}}function l1e(e,r){var n;return(typeof r=="number"?Au:r instanceof _g?d5:(n=_g(r))?(r=n,d5):mAe)(e,r)}function o5t(e){return function(){this.removeAttribute(e)}}function l5t(e){return function(){this.removeAttributeNS(e.space,e.local)}}function c5t(e,r,n){var i,a=n+"",o;return function(){var l=this.getAttribute(e);return l===a?null:l===i?o:o=r(i=l,n)}}function u5t(e,r,n){var i,a=n+"",o;return function(){var l=this.getAttributeNS(e.space,e.local);return l===a?null:l===i?o:o=r(i=l,n)}}function d5t(e,r,n){var i,a,o;return function(){var l,c=n(this),u;return c==null?void this.removeAttribute(e):(l=this.getAttribute(e),u=c+"",l===u?null:l===i&&u===a?o:(a=u,o=r(i=l,c)))}}function h5t(e,r,n){var i,a,o;return function(){var l,c=n(this),u;return c==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),u=c+"",l===u?null:l===i&&u===a?o:(a=u,o=r(i=l,c)))}}function f5t(e,r){var n=A3(e),i=n==="transform"?wat:l1e;return this.attrTween(e,typeof r=="function"?(n.local?h5t:d5t)(n,i,V7(this,"attr."+e,r)):r==null?(n.local?l5t:o5t)(n):(n.local?u5t:c5t)(n,i,r))}function m5t(e,r){return function(n){this.setAttribute(e,r.call(this,n))}}function p5t(e,r){return function(n){this.setAttributeNS(e.space,e.local,r.call(this,n))}}function A5t(e,r){var n,i;function a(){var o=r.apply(this,arguments);return o!==i&&(n=(i=o)&&p5t(e,o)),n}return a._value=r,a}function g5t(e,r){var n,i;function a(){var o=r.apply(this,arguments);return o!==i&&(n=(i=o)&&m5t(e,o)),n}return a._value=r,a}function x5t(e,r){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(r==null)return this.tween(n,null);if(typeof r!="function")throw new Error;var i=A3(e);return this.tween(n,(i.local?A5t:g5t)(i,r))}function y5t(e,r){return function(){H7(this,e).delay=+r.apply(this,arguments)}}function v5t(e,r){return r=+r,function(){H7(this,e).delay=r}}function b5t(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?y5t:v5t)(r,e)):Mu(this.node(),r).delay}function w5t(e,r){return function(){Vd(this,e).duration=+r.apply(this,arguments)}}function j5t(e,r){return r=+r,function(){Vd(this,e).duration=r}}function _5t(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?w5t:j5t)(r,e)):Mu(this.node(),r).duration}function C5t(e,r){if(typeof r!="function")throw new Error;return function(){Vd(this,e).ease=r}}function N5t(e){var r=this._id;return arguments.length?this.each(C5t(r,e)):Mu(this.node(),r).ease}function S5t(e,r){return function(){var n=r.apply(this,arguments);if(typeof n!="function")throw new Error;Vd(this,e).ease=n}}function k5t(e){if(typeof e!="function")throw new Error;return this.each(S5t(this._id,e))}function E5t(e){typeof e!="function"&&(e=qbe(e));for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a)for(var o=r[a],l=o.length,c=i[a]=[],u,d=0;d<l;++d)(u=o[d])&&e.call(u,u.__data__,d,o)&&c.push(u);return new uf(i,this._parents,this._name,this._id)}function B5t(e){if(e._id!==this._id)throw new Error;for(var r=this._groups,n=e._groups,i=r.length,a=n.length,o=Math.min(i,a),l=new Array(i),c=0;c<o;++c)for(var u=r[c],d=n[c],h=u.length,f=l[c]=new Array(h),p,m=0;m<h;++m)(p=u[m]||d[m])&&(f[m]=p);for(;c<i;++c)l[c]=r[c];return new uf(l,this._parents,this._name,this._id)}function T5t(e){return(e+"").trim().split(/^|\s+/).every(function(r){var n=r.indexOf(".");return n>=0&&(r=r.slice(0,n)),!r||r==="start"})}function P5t(e,r,n){var i,a,o=T5t(r)?H7:Vd;return function(){var l=o(this,e),c=l.on;c!==i&&(a=(i=c).copy()).on(r,n),l.on=a}}function I5t(e,r){var n=this._id;return arguments.length<2?Mu(this.node(),n).on.on(e):this.each(P5t(n,e,r))}function F5t(e){return function(){var r=this.parentNode;for(var n in this.__transition)if(+n!==e)return;r&&r.removeChild(this)}}function O5t(){return this.on("end.remove",F5t(this._id))}function L5t(e){var r=this._name,n=this._id;typeof e!="function"&&(e=z7(e));for(var i=this._groups,a=i.length,o=new Array(a),l=0;l<a;++l)for(var c=i[l],u=c.length,d=o[l]=new Array(u),h,f,p=0;p<u;++p)(h=c[p])&&(f=e.call(h,h.__data__,p,c))&&("__data__"in h&&(f.__data__=h.__data__),d[p]=f,x3(d[p],r,n,p,d,Mu(h,n)));
vendor: 4,152 bytes, line 3142
3142return new uf(o,this._parents,r,n)}function R5t(e){var r=this._name,n=this._id;typeof e!="function"&&(e=Wbe(e));for(var i=this._groups,a=i.length,o=[],l=[],c=0;c<a;++c)for(var u=i[c],d=u.length,h,f=0;f<d;++f)if(h=u[f]){for(var p=e.call(h,h.__data__,f,u),m,A=Mu(h,n),g=0,y=p.length;g<y;++g)(m=p[g])&&x3(m,r,n,g,p,A);o.push(p),l.push(h)}return new uf(o,l,r,n)}var D5t=eC.prototype.constructor;function M5t(){return new D5t(this._groups,this._parents)}function z5t(e,r){var n,i,a;return function(){var o=j0(this,e),l=(this.style.removeProperty(e),j0(this,e));return o===l?null:o===n&&l===i?a:a=r(n=o,i=l)}}function c1e(e){return function(){this.style.removeProperty(e)}}function U5t(e,r,n){var i,a=n+"",o;return function(){var l=j0(this,e);return l===a?null:l===i?o:o=r(i=l,n)}}function $5t(e,r,n){var i,a,o;return function(){var l=j0(this,e),c=n(this),u=c+"";return c==null&&(u=c=(this.style.removeProperty(e),j0(this,e))),l===u?null:l===i&&u===a?o:(a=u,o=r(i=l,c))}}function Q5t(e,r){var n,i,a,o="style."+r,l="end."+o,c;return function(){var u=Vd(this,e),d=u.on,h=u.value[o]==null?c||(c=c1e(r)):void 0;(d!==n||a!==h)&&(i=(n=d).copy()).on(l,a=h),u.on=i}}function H5t(e,r,n){var i=(e+="")=="transform"?bat:l1e;return r==null?this.styleTween(e,z5t(e,i)).on("end.style."+e,c1e(e)):typeof r=="function"?this.styleTween(e,$5t(e,i,V7(this,"style."+e,r))).each(Q5t(this._id,e)):this.styleTween(e,U5t(e,i,r),n).on("end.style."+e,null)}function V5t(e,r,n){return function(i){this.style.setProperty(e,r.call(this,i),n)}}function W5t(e,r,n){var i,a;function o(){var l=r.apply(this,arguments);return l!==a&&(i=(a=l)&&V5t(e,l,n)),i}return o._value=r,o}function q5t(e,r,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(r==null)return this.tween(i,null);if(typeof r!="function")throw new Error;return this.tween(i,W5t(e,r,n??""))}function K5t(e){return function(){this.textContent=e}}function G5t(e){return function(){var r=e(this);this.textContent=r??""}}function X5t(e){return this.tween("text",typeof e=="function"?G5t(V7(this,"text",e)):K5t(e==null?"":e+""))}function Y5t(e){return function(r){this.textContent=e.call(this,r)}}function J5t(e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&Y5t(a)),r}return i._value=e,i}function Z5t(e){var r="text";if(arguments.length<1)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,J5t(e))}function eBt(){for(var e=this._name,r=this._id,n=u1e(),i=this._groups,a=i.length,o=0;o<a;++o)for(var l=i[o],c=l.length,u,d=0;d<c;++d)if(u=l[d]){var h=Mu(u,r);x3(u,e,n,d,l,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new uf(i,this._parents,e,n)}function tBt(){var e,r,n=this,i=n._id,a=n.size();return new Promise(function(o,l){var c={value:l},u={value:function(){--a===0&&o()}};n.each(function(){var d=Vd(this,i),h=d.on;h!==e&&(r=(e=h).copy(),r._.cancel.push(c),r._.interrupt.push(c),r._.end.push(u)),d.on=r}),a===0&&o()})}var rBt=0;function uf(e,r,n,i){this._groups=e,this._parents=r,this._name=n,this._id=i}function u1e(){return++rBt}var uh=eC.prototype;uf.prototype={constructor:uf,select:L5t,selectAll:R5t,selectChild:uh.selectChild,selectChildren:uh.selectChildren,filter:E5t,merge:B5t,selection:M5t,transition:eBt,call:uh.call,nodes:uh.nodes,node:uh.node,size:uh.size,empty:uh.empty,each:uh.each,on:I5t,attr:f5t,attrTween:x5t,style:H5t,styleTween:q5t,text:X5t,textTween:Z5t,remove:O5t,tween:s5t,delay:b5t,duration:_5t,ease:N5t,easeVarying:k5t,end:tBt,[Symbol.iterator]:uh[Symbol.iterator]};function nBt(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var iBt={time:null,delay:0,duration:250,ease:nBt};function aBt(e,r){for(var n;!(n=e.__transition)||!(n=n[r]);)if(!(e=e.parentNode))throw new Error(`transition ${r} not found`);return n}function sBt(e){var r,n;e instanceof uf?(r=e._id,e=e._name):(r=u1e(),(n=iBt).time=$7(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,o=0;o<a;++o)for(var l=i[o],c=l.length,u,d=0;d<c;++d)(u=l[d])&&x3(u,e,r,d,l,n||aBt(u,r));return new uf(i,this._parents,e,r)}eC.prototype.interrupt=n5t;eC.prototype.transition=sBt;
vendor: 8,617 bytes, line 3142
3142const sS=e=>()=>e;function oBt(e,{sourceEvent:r,target:n,transform:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Ph(e,r,n){this.k=e,this.x=r,this.y=n}Ph.prototype={constructor:Ph,scale:function(e){return e===1?this:new Ph(this.k*e,this.x,this.y)},translate:function(e,r){return e===0&r===0?this:new Ph(this.k,this.x+this.k*e,this.y+this.k*r)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var W7=new Ph(1,0,0);id.prototype=Ph.prototype;function id(e){for(;!e.__zoom;)if(!(e=e.parentNode))return W7;return e.__zoom}function WF(e){e.stopImmediatePropagation()}function D1(e){e.preventDefault(),e.stopImmediatePropagation()}function lBt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function cBt(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Ete(){return this.__zoom||W7}function uBt(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function dBt(){return navigator.maxTouchPoints||"ontouchstart"in this}function hBt(e,r,n){var i=e.invertX(r[0][0])-n[0][0],a=e.invertX(r[1][0])-n[1][0],o=e.invertY(r[0][1])-n[0][1],l=e.invertY(r[1][1])-n[1][1];return e.translate(a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a),l>o?(o+l)/2:Math.min(0,o)||Math.max(0,l))}function fBt(){var e=lBt,r=cBt,n=hBt,i=uBt,a=dBt,o=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,u=Nat,d=tC("start","zoom","end"),h,f,p,m=500,A=150,g=0,y=10;function x(I){I.property("__zoom",Ete).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",O).filter(a).on("touchstart.zoom",B).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(I,D,L,V){var U=I.selection?I.selection():I;U.property("__zoom",Ete),I!==U?_(I,D,L,V):U.interrupt().each(function(){C(this,arguments).event(V).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},x.scaleBy=function(I,D,L,V){x.scaleTo(I,function(){var U=this.__zoom.k,Q=typeof D=="function"?D.apply(this,arguments):D;return U*Q},L,V)},x.scaleTo=function(I,D,L,V){x.transform(I,function(){var U=r.apply(this,arguments),Q=this.__zoom,$=L==null?j(U):typeof L=="function"?L.apply(this,arguments):L,q=Q.invert($),M=typeof D=="function"?D.apply(this,arguments):D;return n(v(b(Q,M),$,q),U,l)},L,V)},x.translateBy=function(I,D,L,V){x.transform(I,function(){return n(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof L=="function"?L.apply(this,arguments):L),r.apply(this,arguments),l)},null,V)},x.translateTo=function(I,D,L,V,U){x.transform(I,function(){var Q=r.apply(this,arguments),$=this.__zoom,q=V==null?j(Q):typeof V=="function"?V.apply(this,arguments):V;return n(W7.translate(q[0],q[1]).scale($.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof L=="function"?-L.apply(this,arguments):-L),Q,l)},V,U)};function b(I,D){return D=Math.max(o[0],Math.min(o[1],D)),D===I.k?I:new Ph(D,I.x,I.y)}function v(I,D,L){var V=D[0]-L[0]*I.k,U=D[1]-L[1]*I.k;return V===I.x&&U===I.y?I:new Ph(I.k,V,U)}function j(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function _(I,D,L,V){I.on("start.zoom",function(){C(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(V).end()}).tween("zoom",function(){var U=this,Q=arguments,$=C(U,Q).event(V),q=r.apply(U,Q),M=L==null?j(q):typeof L=="function"?L.apply(U,Q):L,z=Math.max(q[1][0]-q[0][0],q[1][1]-q[0][1]),K=U.__zoom,ne=typeof D=="function"?D.apply(U,Q):D,ie=u(K.invert(M).concat(z/K.k),ne.invert(M).concat(z/ne.k));return function(X){if(X===1)X=ne;else{var de=ie(X),oe=z/de[2];X=new Ph(oe,M[0]-de[0]*oe,M[1]-de[1]*oe)}$.zoom(null,X)}})}function C(I,D,L){return!L&&I.__zooming||new N(I,D)}function N(I,D){this.that=I,this.args=D,this.active=0,this.sourceEvent=null,this.extent=r.apply(I,D),this.taps=0}N.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,D){return this.mouse&&I!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var D=vc(this.that).datum();d.call(I,this.that,new oBt(I,{sourceEvent:this.sourceEvent,target:x,type:I,transform:this.that.__zoom,dispatch:d}),D)}};function S(I,...D){if(!e.apply(this,arguments))return;var L=C(this,D).event(I),V=this.__zoom,U=Math.max(o[0],Math.min(o[1],V.k*Math.pow(2,i.apply(this,arguments)))),Q=od(I);if(L.wheel)(L.mouse[0][0]!==Q[0]||L.mouse[0][1]!==Q[1])&&(L.mouse[1]=V.invert(L.mouse[0]=Q)),clearTimeout(L.wheel);else{if(V.k===U)return;L.mouse=[Q,V.invert(Q)],Ck(this),L.start()}D1(I),L.wheel=setTimeout($,A),L.zoom("mouse",n(v(b(V,U),L.mouse[0],L.mouse[1]),L.extent,l));function $(){L.wheel=null,L.end()}}function E(I,...D){if(p||!e.apply(this,arguments))return;var L=I.currentTarget,V=C(this,D,!0).event(I),U=vc(I.view).on("mousemove.zoom",M,!0).on("mouseup.zoom",z,!0),Q=od(I,L),$=I.clientX,q=I.clientY;n1e(I.view),WF(I),V.mouse=[Q,this.__zoom.invert(Q)],Ck(this),V.start();function M(K){if(D1(K),!V.moved){var ne=K.clientX-$,ie=K.clientY-q;V.moved=ne*ne+ie*ie>g}V.event(K).zoom("mouse",n(v(V.that.__zoom,V.mouse[0]=od(K,L),V.mouse[1]),V.extent,l))}function z(K){U.on("mousemove.zoom mouseup.zoom",null),i1e(K.view,V.moved),D1(K),V.event(K).end()}}function O(I,...D){if(e.apply(this,arguments)){var L=this.__zoom,V=od(I.changedTouches?I.changedTouches[0]:I,this),U=L.invert(V),Q=L.k*(I.shiftKey?.5:2),$=n(v(b(L,Q),V,U),r.apply(this,D),l);D1(I),c>0?vc(this).transition().duration(c).call(_,$,V,I):vc(this).call(x.transform,$,V,I)}}function B(I,...D){if(e.apply(this,arguments)){var L=I.touches,V=L.length,U=C(this,D,I.changedTouches.length===V).event(I),Q,$,q,M;for(WF(I),$=0;$<V;++$)q=L[$],M=od(q,this),M=[M,this.__zoom.invert(M),q.identifier],U.touch0?!U.touch1&&U.touch0[2]!==M[2]&&(U.touch1=M,U.taps=0):(U.touch0=M,Q=!0,U.taps=1+!!h);h&&(h=clearTimeout(h)),Q&&(U.taps<2&&(f=M[0],h=setTimeout(function(){h=null},m)),Ck(this),U.start())}}function T(I,...D){if(this.__zooming){var L=C(this,D).event(I),V=I.changedTouches,U=V.length,Q,$,q,M;for(D1(I),Q=0;Q<U;++Q)$=V[Q],q=od($,this),L.touch0&&L.touch0[2]===$.identifier?L.touch0[0]=q:L.touch1&&L.touch1[2]===$.identifier&&(L.touch1[0]=q);if($=L.that.__zoom,L.touch1){var z=L.touch0[0],K=L.touch0[1],ne=L.touch1[0],ie=L.touch1[1],X=(X=ne[0]-z[0])*X+(X=ne[1]-z[1])*X,de=(de=ie[0]-K[0])*de+(de=ie[1]-K[1])*de;$=b($,Math.sqrt(X/de)),q=[(z[0]+ne[0])/2,(z[1]+ne[1])/2],M=[(K[0]+ie[0])/2,(K[1]+ie[1])/2]}else if(L.touch0)q=L.touch0[0],M=L.touch0[1];else return;L.zoom("touch",n(v($,q,M),L.extent,l))}}function F(I,...D){if(this.__zooming){var L=C(this,D).event(I),V=I.changedTouches,U=V.length,Q,$;for(WF(I),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),Q=0;Q<U;++Q)$=V[Q],L.touch0&&L.touch0[2]===$.identifier?delete L.touch0:L.touch1&&L.touch1[2]===$.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2&&($=od($,this),Math.hypot(f[0]-$[0],f[1]-$[1])<y)){var q=vc(this).on("dblclick.zoom");q&&q.apply(this,arguments)}}}return x.wheelDelta=function(I){return arguments.length?(i=typeof I=="function"?I:sS(+I),x):i},x.filter=function(I){return arguments.length?(e=typeof I=="function"?I:sS(!!I),x):e},x.touchable=function(I){return arguments.length?(a=typeof I=="function"?I:sS(!!I),x):a},x.extent=function(I){return arguments.length?(r=typeof I=="function"?I:sS([[+
3142I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),x):r},x.scaleExtent=function(I){return arguments.length?(o[0]=+I[0],o[1]=+I[1],x):[o[0],o[1]]},x.translateExtent=function(I){return arguments.length?(l[0][0]=+I[0][0],l[1][0]=+I[1][0],l[0][1]=+I[0][1],l[1][1]=+I[1][1],x):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},x.constrain=function(I){return arguments.length?(n=I,x):n},x.duration=function(I){return arguments.length?(c=+I,x):c},x.interpolate=function(I){return arguments.length?(u=I,x):u},x.on=function(){var I=d.on.apply(d,arguments);return I===d?x:I},x.clickDistance=function(I){return arguments.length?(g=(I=+I)*I,x):Math.sqrt(g)},x.tapDistance=function(I){return arguments.length?(y=+I,x):y},x}var mBt=typeof global=="object"&&global&&global.Object===Object&&global,pBt=typeof self=="object"&&self&&self.Object===Object&&self,d1e=mBt||pBt||Function("return this")(),fB=d1e.Symbol,h1e=Object.prototype,ABt=h1e.hasOwnProperty,gBt=h1e.toString,M1=fB?fB.toStringTag:void 0;function xBt(e){var r=ABt.call(e,M1),n=e[M1];try{e[M1]=void 0;var i=!0}catch{}var a=gBt.call(e);return i&&(r?e[M1]=n:delete e[M1]),a}var yBt=Object.prototype,vBt=yBt.toString;function bBt(e){return vBt.call(e)}var wBt="[object Null]",jBt="[object Undefined]",Bte=fB?fB.toStringTag:void 0;function _Bt(e){return e==null?e===void 0?jBt:wBt:Bte&&Bte in Object(e)?xBt(e):bBt(e)}function CBt(e){return e!=null&&typeof e=="object"}var NBt="[object Symbol]";function SBt(e){return typeof e=="symbol"||CBt(e)&&_Bt(e)==NBt}var kBt=/\s/;function EBt(e){for(var r=e.length;r--&&kBt.test(e.charAt(r)););return r}var BBt=/^\s+/;function TBt(e){return e&&e.slice(0,EBt(e)+1).replace(BBt,"")}function mB(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var Tte=NaN,PBt=/^[-+]0x[0-9a-f]+$/i,IBt=/^0b[01]+$/i,FBt=/^0o[0-7]+$/i,OBt=parseInt;function Pte(e){if(typeof e=="number")return e;if(SBt(e))return Tte;if(mB(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=mB(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=TBt(e);var n=IBt.test(e);return n||FBt.test(e)?OBt(e.slice(2),n?2:8):PBt.test(e)?Tte:+e}var qF=function(){return d1e.Date.now()},LBt="Expected a function",RBt=Math.max,DBt=Math.min;function f1e(e,r,n){var i,a,o,l,c,u,d=0,h=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(LBt);r=Pte(r)||0,mB(n)&&(h=!!n.leading,f="maxWait"in n,o=f?RBt(Pte(n.maxWait)||0,r):o,p="trailing"in n?!!n.trailing:p);function m(C){var N=i,S=a;return i=a=void 0,d=C,l=e.apply(S,N),l}function A(C){return d=C,c=setTimeout(x,r),h?m(C):l}function g(C){var N=C-u,S=C-d,E=r-N;return f?DBt(E,o-S):E}function y(C){var N=C-u,S=C-d;return u===void 0||N>=r||N<0||f&&S>=o}function x(){var C=qF();if(y(C))return b(C);c=setTimeout(x,g(C))}function b(C){return c=void 0,p&&i?m(C):(i=a=void 0,l)}function v(){c!==void 0&&clearTimeout(c),d=0,i=u=a=c=void 0}function j(){return c===void 0?l:b(qF())}function _(){var C=qF(),N=y(C);if(i=arguments,a=this,u=C,N){if(c===void 0)return A(u);if(f)return clearTimeout(c),c=setTimeout(x,r),m(u)}return c===void 0&&(c=setTimeout(x,r)),l}return _.cancel=v,_.flush=j,_}var MBt="Expected a function";function zBt(e,r,n){var i=!0,a=!0;if(typeof e!="function")throw new TypeError(MBt);return mB(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),f1e(e,r,{leading:i,maxWait:r,trailing:a})}var ig=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var r=1.70158;return e===1?1:e*e*((r+1)*e-r)},Out:function(e){var r=1.70158;return e===0?0:--e*e*((r+1)*e+r)+1}
3142,InOut:function(e){var r=2.5949095;return(e*=2)<1?.5*(e*e*((r+1)*e-r)):.5*((e-=2)*e*((r+1)*e+r)+2)}}),Bounce:Object.freeze({In:function(e){return 1-ig.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?ig.Bounce.In(e*2)*.5:ig.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(r){return Math.pow(r,e)},Out:function(r){return 1-Math.pow(1-r,e)},InOut:function(r){return r<.5?Math.pow(r*2,e)/2:(1-Math.pow(2-r*2,e))/2+.5}}}}),hw=function(){return performance.now()},m1e=function(){function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,r)}return e.prototype.getAll=function(){var r=this;return Object.keys(this._tweens).map(function(n){return r._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var a=0,o=n;a<o.length;a++){var l=o[a];(r=l._group)===null||r===void 0||r.remove(l),l._group=this,this._tweens[l.getId()]=l,this._tweensAddedDuringUpdate[l.getId()]=l}},e.prototype.remove=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var i=0,a=r;i<a.length;i++){var o=a[i];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(r){return!r.isPlaying()})},e.prototype.update=function(r,n){r===void 0&&(r=hw()),n===void 0&&(n=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<i.length;a++){var o=this._tweens[i[a]],l=!n;o&&o.update(r,l)===!1&&!n&&this.remove(o)}i=Object.keys(this._tweensAddedDuringUpdate)}},e}(),Ly={Linear:function(e,r){var n=e.length-1,i=n*r,a=Math.floor(i),o=Ly.Utils.Linear;return r<0?o(e[0],e[1],i):r>1?o(e[n],e[n-1],n-i):o(e[a],e[a+1>n?n:a+1],i-a)},Bezier:function(e,r){for(var n=0,i=e.length-1,a=Math.pow,o=Ly.Utils.Bernstein,l=0;l<=i;l++)n+=a(1-r,i-l)*a(r,l)*e[l]*o(i,l);return n},CatmullRom:function(e,r){var n=e.length-1,i=n*r,a=Math.floor(i),o=Ly.Utils.CatmullRom;return e[0]===e[n]?(r<0&&(a=Math.floor(i=n*(1+r))),o(e[(a-1+n)%n],e[a],e[(a+1)%n],e[(a+2)%n],i-a)):r<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):r>1?e[n]-(o(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):o(e[a?a-1:0],e[a],e[n<a+1?n:a+1],e[n<a+2?n:a+2],i-a)},Utils:{Linear:function(e,r,n){return(r-e)*n+e},Bernstein:function(e,r){var n=Ly.Utils.Factorial;return n(e)/n(r)/n(e-r)},Factorial:function(){var e=[1];return function(r){var n=1;if(e[r])return e[r];for(var i=r;i>1;i--)n*=i;return e[r]=n,n}}(),CatmullRom:function(e,r,n,i,a){var o=(n-e)*.5,l=(i-r)*.5,c=a*a,u=a*c;return(2*r-2*n+o+l)*u+(-3*r+3*n-2*o-l)*c+o*a+r}}},UBt=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),Rz=new m1e,Ite=function(){function e(r,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=ig.Linear.None,this._interpolationFunction=Ly.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=UBt.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=r,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=Rz,Rz.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(r,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=r,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(r){return r===void 0&&(r=1e3),this._duration=r<0?0:r,this},e.prototype.dynamic=function(r){return r===void 0&&(r=!1),this._isDynamic=r,this},e.prototype.start=function(r,n){if(r===void 0&&(r=hw()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=r,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var o in this._valuesEnd)a[o]=this._valuesEnd[o];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(r){return this.start(r,!0)},e.prototype._setupProperties=function(r,n,i,a,o){for(var l in i){var c=r[l],u=Array.isArray(c),d=u?"array":typeof c,h=!u&&Array.isArray(i[l]);if(!(d==="undefined"||d==="function")){if(h){var f=i[l];if(f.length===0)continue;for(var p=[c],m=0,A=f.length;m<A;m+=1){var g=this._handleRelativeValue(c,f[m]);if(isNaN(g)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}p.push(g)}h&&(i[l]=p)}if((d==="object"||u)&&c&&!h){n[l]=u?[]:{};var y=c;for(var x in y)n[l][x]=y[x];a[l]=u?[]:{};var f=i[l];if(!this._isDynamic){var b={};for(var x in f)b[x]=f[x];i[l]=f=b}this._setupProperties(y,n[l],f,a[l],o)}else(typeof n[l]>"u"||o)&&(n[l]=c),u||(n[l]*=1),h?a[l]=i[l].slice().reverse():a[l]=n[l]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(r){return r===void 0&&(r=hw()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=r,this)},e.prototype.resume=function(r){return r===void 0&&(r=hw()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=r-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var r=0,n=this._chainedTweens.length;r<n;r++)this._chainedTweens[r].stop();return this},e.prototype.group=function(r){return r?(r.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var r;return(r=this._group)===null||r===void 0||r.remove(this),this},e.prototype.delay=function(r){return r===void 0&&(r=0),this._delayTime=r,this},e.prototype.repeat=function(r){return r===void 0&&(r=0),this._initialRepeat=r,this._repeat=r,this},e.prototype.repeatDelay=function(r){return this._repeatDelayTime=r,this},e.prototype.yoyo=function(r){return r===void 0&&(r=!1),this._yoyo=r,this},e.prototype.easing=function(r){return r===void 0&&(r=ig.Linear.None),this._easingFunction=r,this},e.prototype.interpolation=function(r){return r===void 0&&(r=Ly.Linear),this._interpolationFunction=r,this},e.prototype.chain=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return this._chainedTweens=r,this},e.prototype.onStart=function(r){return this._onStartCallback=r,this},e.prototype.onEveryStart=function(r){return this._onEveryStartCallback=r,this},e.prototype.onUpdate=function(r){return this._onUpdateCallback=r,this},e.prototype.onRepeat=function(r){return this._onRepeatCallback=r,this},e.prototype.onComplete=function(r){return this._onCompleteCallback=r,this},e.prototype.onStop=function(r){return this._onStopCallback=r,this},e.prototype.update=function(r,n){var i=this,a;if(r===void 0&&(r=hw()),n===void 0&&(n=e.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(r,!0);else return!1;if(this._goToEnd=!1,r<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var l=r-this._startTime,c=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),u=this._duration+this._repeat*c,d=function(){if(i._duration===0||l>u)return 1;var g=Math.trunc(l/c),y=l-g*c,x=Math.min(y/i._duration,1);return x===0&&l===i._duration?1:x},h=d(),f=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,f),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||l>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((l-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var m=0,A=this._chainedTweens.length;m<A;m++)this._chainedTweens[m].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(r,n,i,a){for(var o in i)if(n[o]!==void 0){var l=n[o]||0,c=i[o],u=Array.isArray(r[o]),d=Array.isArray(c),h=!u&&d;h?r[o]=this._interpolationFunction(c,a):typeof c=="object"&&c?this._updateProperties(r[o],l,c,a):(c=this._handleRelativeValue(l,c),typeof c=="number"&&(r[o]=l+(c-l)*a))}},e.prototype._handleRelativeValue=function(r,n){return typeof n!="str
3142ing"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?r+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(r){var n=this._valuesStartRepeat[r],i=this._valuesEnd[r];typeof i=="string"?this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(i):this._valuesStartRepeat[r]=this._valuesEnd[r],this._valuesEnd[r]=n},e.autoStartOnUpdate=!1,e}(),Ud=Rz;Ud.getAll.bind(Ud);Ud.removeAll.bind(Ud);Ud.add.bind(Ud);Ud.remove.bind(Ud);Ud.update.bind(Ud);function Fte(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=Array(r);n<r;n++)i[n]=e[n];return i}function $Bt(e){if(Array.isArray(e))return e}function QBt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function HBt(e,r,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function VBt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function WBt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3143In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qBt(e,r){return $Bt(e)||VBt(e,r)||KBt(e,r)||WBt()}function KBt(e,r){if(e){if(typeof e=="string")return Fte(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fte(e,r):void 0}}var GBt=HBt(function e(r,n){var i=n.default,a=i===void 0?null:i,o=n.triggerUpdate,l=o===void 0?!0:o,c=n.onChange,u=c===void 0?function(d,h){}:c;QBt(this,e),this.name=r,this.defaultVal=a,this.triggerUpdate=l,this.onChange=u});function q7(e){var r=e.stateInit,n=r===void 0?function(){return{}}:r,i=e.props,a=i===void 0?{}:i,o=e.methods,l=o===void 0?{}:o,c=e.aliases,u=c===void 0?{}:c,d=e.init,h=d===void 0?function(){}:d,f=e.update,p=f===void 0?function(){}:f,m=Object.keys(a).map(function(A){return new GBt(A,a[A])});return function A(){for(var g=arguments.length,y=new Array(g),x=0;x<g;x++)y[x]=arguments[x];var b=!!(this instanceof A&&this.constructor),v=b?y.shift():void 0,j=y[0],_=j===void 0?{}:j,C=Object.assign({},n instanceof Function?n(_):n,{initialised:!1}),N={};function S(B){return E(B,_),O(),S}var E=function(T,F){h.call(S,T,C,F),C.initialised=!0},O=f1e(function(){C.initialised&&(p.call(S,C,N),N={})},1);return m.forEach(function(B){S[B.name]=T(B);function T(F){var I=F.name,D=F.triggerUpdate,L=D===void 0?!1:D,V=F.onChange,U=V===void 0?function(q,M){}:V,Q=F.defaultVal,$=Q===void 0?null:Q;return function(q){var M=C[I];if(!arguments.length)return M;var z=q===void 0?$:q;return C[I]=z,U.call(S,z,C,M),!N.hasOwnProperty(I)&&(N[I]=M),L&&O(),S}}}),Object.keys(l).forEach(function(B){S[B]=function(){for(var T,F=arguments.length,I=new Array(F),D=0;D<F;D++)I[D]=arguments[D];return(T=l[B]).call.apply(T,[S,C].concat(I))}}),Object.entries(u).forEach(function(B){var T=qBt(B,2),F=T[0],I=T[1];return S[F]=S[I]}),S.resetProps=function(){return m.forEach(function(B){S[B.name](B.defaultVal)}),S},S.resetProps(),C._rerender=O,b&&v&&S(v),S}}var Ln=function(e){return typeof e=="function"?e:typeof e=="string"?function(r){return r[e]}:function(r){return e}};function pB(e){"@babel/helpers - typeof";return pB=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},pB(e)}var XBt=/^\s+/,YBt=/\s+$/;function or(e,r){if(e=e||"",r=r||{},e instanceof or)return e;if(!(this instanceof or))return new or(e,r);var n=JBt(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||n.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}or.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),n,i,a,o,l,c;return n=r.r/255,i=r.g/255,a=r.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),i<=.03928?l=i/12.92:l=Math.pow((i+.055)/1.055,2.4),a<=.03928?c=a/12.92:c=Math.pow((a+.055)/1.055,2.4),.2126*o+.7152*l+.0722*c},setAlpha:function(r){return this._a=p1e(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=Lte(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=Lte(this._r,this._g,this._b),n=Math.round(r.h*360),i=Math.round(r.
vendor: 8,378 bytes, line 3143
3143s*100),a=Math.round(r.v*100);return this._a==1?"hsv("+n+", "+i+"%, "+a+"%)":"hsva("+n+", "+i+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var r=Ote(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=Ote(this._r,this._g,this._b),n=Math.round(r.h*360),i=Math.round(r.s*100),a=Math.round(r.l*100);return this._a==1?"hsl("+n+", "+i+"%, "+a+"%)":"hsla("+n+", "+i+"%, "+a+"%, "+this._roundA+")"},toHex:function(r){return Rte(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return r4t(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Ti(this._r,255)*100)+"%",g:Math.round(Ti(this._g,255)*100)+"%",b:Math.round(Ti(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Ti(this._r,255)*100)+"%, "+Math.round(Ti(this._g,255)*100)+"%, "+Math.round(Ti(this._b,255)*100)+"%)":"rgba("+Math.round(Ti(this._r,255)*100)+"%, "+Math.round(Ti(this._g,255)*100)+"%, "+Math.round(Ti(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:m4t[Rte(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var n="#"+Dte(this._r,this._g,this._b,this._a),i=n,a=this._gradientType?"GradientType = 1, ":"";if(r){var o=or(r);i="#"+Dte(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+n+",endColorstr="+i+")"},toString:function(r){var n=!!r;r=r||this._format;var i=!1,a=this._a<1&&this._a>=0,o=!n&&a&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return o?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(i=this.toRgbString()),r==="prgb"&&(i=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(i=this.toHexString()),r==="hex3"&&(i=this.toHexString(!0)),r==="hex4"&&(i=this.toHex8String(!0)),r==="hex8"&&(i=this.toHex8String()),r==="name"&&(i=this.toName()),r==="hsl"&&(i=this.toHslString()),r==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return or(this.toString())},_applyModification:function(r,n){var i=r.apply(null,[this].concat([].slice.call(n)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(s4t,arguments)},brighten:function(){return this._applyModification(o4t,arguments)},darken:function(){return this._applyModification(l4t,arguments)},desaturate:function(){return this._applyModification(n4t,arguments)},saturate:function(){return this._applyModification(i4t,arguments)},greyscale:function(){return this._applyModification(a4t,arguments)},spin:function(){return this._applyModification(c4t,arguments)},_applyCombination:function(r,n){return r.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(h4t,arguments)},complement:function(){return this._applyCombination(u4t,arguments)},monochromatic:function(){return this._applyCombination(f4t,arguments)},splitcomplement:function(){return this._applyCombination(d4t,arguments)},triad:function(){return this._applyCombination(Mte,[3])},tetrad:function(){return this._applyCombination(Mte,[4])}};or.fromRatio=function(e,r){if(pB(e)=="object"){var n={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?n[i]=e[i]:n[i]=fw(e[i]));e=n}return or(e,r)};function JBt(e){var r={r:0,g:0,b:0},n=1,i=null,a=null,o=null,l=!1,c=!1;return typeof e=="string"&&(e=x4t(e)),pB(e)=="object"&&(dh(e.r)&&dh(e.g)&&dh(e.b)?(r=ZBt(e.r,e.g,e.b),l=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):dh(e.h)&&dh(e.s)&&dh(e.v)?(i=fw(e.s),a=fw(e.v),r=t4t(e.h,i,a),l=!0,c="hsv"):dh(e.h)&&dh(e.s)&&dh(e.l)&&(i=fw(e.s),o=fw(e.l),r=e4t(e.h,i,o),l=!0,c="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=p1e(n),{ok:l,format:e.format||c,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:n}}function ZBt(e,r,n){return{r:Ti(e,255)*255,g:Ti(r,255)*255,b:Ti(n,255)*255}}function Ote(e,r,n){e=Ti(e,255),r=Ti(r,255),n=Ti(n,255);var i=Math.max(e,r,n),a=Math.min(e,r,n),o,l,c=(i+a)/2;if(i==a)o=l=0;else{var u=i-a;switch(l=c>.5?u/(2-i-a):u/(i+a),i){case e:o=(r-n)/u+(r<n?6:0);break;case r:o=(n-e)/u+2;break;case n:o=(e-r)/u+4;break}o/=6}return{h:o,s:l,l:c}}function e4t(e,r,n){var i,a,o;e=Ti(e,360),r=Ti(r,100),n=Ti(n,100);function l(d,h,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?d+(h-d)*6*f:f<1/2?h:f<2/3?d+(h-d)*(2/3-f)*6:d}if(r===0)i=a=o=n;else{var c=n<.5?n*(1+r):n+r-n*r,u=2*n-c;i=l(u,c,e+1/3),a=l(u,c,e),o=l(u,c,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function Lte(e,r,n){e=Ti(e,255),r=Ti(r,255),n=Ti(n,255);var i=Math.max(e,r,n),a=Math.min(e,r,n),o,l,c=i,u=i-a;if(l=i===0?0:u/i,i==a)o=0;else{switch(i){case e:o=(r-n)/u+(r<n?6:0);break;case r:o=(n-e)/u+2;break;case n:o=(e-r)/u+4;break}o/=6}return{h:o,s:l,v:c}}function t4t(e,r,n){e=Ti(e,360)*6,r=Ti(r,100),n=Ti(n,100);var i=Math.floor(e),a=e-i,o=n*(1-r),l=n*(1-a*r),c=n*(1-(1-a)*r),u=i%6,d=[n,l,o,o,c,n][u],h=[c,n,n,l,o,o][u],f=[o,o,c,n,n,l][u];return{r:d*255,g:h*255,b:f*255}}function Rte(e,r,n,i){var a=[ju(Math.round(e).toString(16)),ju(Math.round(r).toString(16)),ju(Math.round(n).toString(16))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function r4t(e,r,n,i,a){var o=[ju(Math.round(e).toString(16)),ju(Math.round(r).toString(16)),ju(Math.round(n).toString(16)),ju(A1e(i))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Dte(e,r,n,i){var a=[ju(A1e(i)),ju(Math.round(e).toString(16)),ju(Math.round(r).toString(16)),ju(Math.round(n).toString(16))];return a.join("")}or.equals=function(e,r){return!e||!r?!1:or(e).toRgbString()==or(r).toRgbString()};or.random=function(){return or.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function n4t(e,r){r=r===0?0:r||10;var n=or(e).toHsl();return n.s-=r/100,n.s=y3(n.s),or(n)}function i4t(e,r){r=r===0?0:r||10;var n=or(e).toHsl();return n.s+=r/100,n.s=y3(n.s),or(n)}function a4t(e){return or(e).desaturate(100)}function s4t(e,r){r=r===0?0:r||10;var n=or(e).toHsl();return n.l+=r/100,n.l=y3(n.l),or(n)}function o4t(e,r){r=r===0?0:r||10;var n=or(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(r/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(r/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(r/100)))),or(n)}function l4t(e,r){r=r===0?0:r||10;var n=or(e).toHsl();return n.l-=r/100,n.l=y3(n.l),or(n)}function c4t(e,r){var n=or(e).toHsl(),i=(n.h+r)%360;return n.h=i<0?360+i:i,or(n)}function u4t(e){var r=or(e).toHsl();return r.h=(r.h+180)%360,or(r)}function Mte(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var n=or(e).toHsl(),i=[or(e)],a=360/r,o=1;o<r;o++)i.push(or({h:(n.h+o*a)%360,s:n.s,l:n.l}));return i}function d4t(e){var r=or(e).toHsl(),n=r.h;return[or(e),or({h:(n+72)%360,s:r.s,l:r.l}),or({h:(n+216)%360,s:r.s,l:r.l})]}function h4t(e,r,n){r=r||6,n=n||30;var i=or(e).toHsl(),a=360/n,o=[or(e)];for(i.h=(i.h-(a*r>>1)+720)%360;--r;)i.h=(i.h+a)%360,o.push(or(i));return o}function f4t(e,r){r=r||6;for(var n=or(e).toHsv(),i=n.h,a=n.s,o=n.v,l=[],c=1/r;r--;)l.push(or({h:i,s:a,v:o})),o=(o+c)%1;return l}or.mix=function(e,r,n){n=n===0?0:n||50;var i=or(e).toRgb(),a=or(r).toRgb(),o=n/100,l={r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a};return or(l)};or.readability=function(e,r){var n=or(e),i=or(r);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)};or.isReadable=function(e,r,n){var i=or.readability(e,r),a,o;switch(o=!1,a=y4t(n),a.level+a.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7;break}return o};or.mostReadable=function(e,r,n){var i=null,a=0,o,l,c,u;n=n||{},l=n.includeFallbackColors,c=n.level,u=n.size;
3143for(var d=0;d<r.length;d++)o=or.readability(e,r[d]),o>a&&(a=o,i=or(r[d]));return or.isReadable(e,i,{level:c,size:u})||!l?i:(n.includeFallbackColors=!1,or.mostReadable(e,["#fff","#000"],n))};var Dz=or.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
31430",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},m4t=or.hexNames=p4t(Dz);function p4t(e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[e[n]]=n);return r}function p1e(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ti(e,r){A4t(e)&&(e="100%");var n=g4t(e);return e=Math.min(r,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function y3(e){return Math.min(1,Math.max(0,e))}function Sl(e){return parseInt(e,16)}function A4t(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function g4t(e){return typeof e=="string"&&e.indexOf("%")!=-1}function ju(e){return e.length==1?"0"+e:""+e}function fw(e){return e<=1&&(e=e*100+"%"),e}function A1e(e){return Math.round(parseFloat(e)*255).toString(16)}function zte(e){return Sl(e)/255}var iu=function(){var e="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",n="(?:"+r+")|(?:"+e+")",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",a="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"
3143+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function dh(e){return!!iu.CSS_UNIT.exec(e)}function x4t(e){e=e.replace(XBt,"").replace(YBt,"").toLowerCase();var r=!1;if(Dz[e])e=Dz[e],r=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=iu.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=iu.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=iu.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=iu.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=iu.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=iu.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=iu.hex8.exec(e))?{r:Sl(n[1]),g:Sl(n[2]),b:Sl(n[3]),a:zte(n[4]),format:r?"name":"hex8"}:(n=iu.hex6.exec(e))?{r:Sl(n[1]),g:Sl(n[2]),b:Sl(n[3]),format:r?"name":"hex"}:(n=iu.hex4.exec(e))?{r:Sl(n[1]+""+n[1]),g:Sl(n[2]+""+n[2]),b:Sl(n[3]+""+n[3]),a:zte(n[4]+""+n[4]),format:r?"name":"hex8"}:(n=iu.hex3.exec(e))?{r:Sl(n[1]+""+n[1]),g:Sl(n[2]+""+n[2]),b:Sl(n[3]+""+n[3]),format:r?"name":"hex"}:!1}function y4t(e){var r,n;return e=e||{level:"AA",size:"small"},r=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:r,size:n}}function Mz(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=Array(r);n<r;n++)i[n]=e[n];return i}function v4t(e){if(Array.isArray(e))return Mz(e)}function g1e(e,r,n){if(typeof e=="function"?e===r:e.has(r))return arguments.length<3?r:n;throw new TypeError("Private element is not present on this object")}function b4t(e,r){if(r.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w4t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function cc(e,r){return e.get(g1e(e,r))}function Ute(e,r,n){b4t(e,r),r.set(e,n)}function $te(e,r,n){return e.set(g1e(e,r),n),n}function j4t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,E4t(i.key),i)}}function _4t(e,r,n){return r&&j4t(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function C4t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function N4t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3144In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S4t(e){return v4t(e)||C4t(e)||B4t(e)||N4t()}function k4t(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function E4t(e){var r=k4t(e,"string");return typeof r=="symbol"?r:r+""}function B4t(e,r){if(e){if(typeof e=="string")return Mz(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mz(e,r):void 0}}var T4t=123,P4t=function(r){return"#".concat(Math.min(r,Math.pow(2,24)).toString(16).padStart(6,"0"))},x1e=function(r,n,i){return(r<<16)+(n<<8)+i},I4t=function(r){var n=or(r).toRgb(),i=n.r,a=n.g,o=n.b;return x1e(i,a,o)},Qte=function(r,n){return r*T4t%Math.pow(2,n)},aA=new WeakMap,hh=new WeakMap,F4t=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;w4t(this,e),Ute(this,aA,void 0),Ute(this,hh,void 0),$te(hh,this,r),this.reset()}return _4t(e,[{key:"reset",value:function(){$te(aA,this,["__reserved for background__"])}},{key:"register",value:function(n){if(cc(aA,this).length>=Math.pow(2,24-cc(hh,this)))return null;var i=cc(aA,this).length,a=Qte(i,cc(hh,this)),o=P4t(i+(a<<24-cc(hh,this)));return cc(aA,this).push(n),o}},{key:"lookup",value:function(n){if(!n)return null;var i=typeof n=="string"?I4t(n):x1e.apply(void 0,S4t(n));if(!i)return null;var a=i&Math.pow(2,24-cc(hh,this))-1,o=i>>24-cc(hh,this)&Math.pow(2,cc(hh,this))-1;return Qte(a,cc(hh,this))!==o||a>=cc(aA,this).length?null:cc(aA,this)[a]}}])}(),rC,Fi,y1e,v1e,om,Hte,b1e,w1e,KF,Nk,Jw,j1e,K7,zz,Uz,AB={},gB=[],O4t=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v3=Array.isArray;
vendor: 10,485 bytes, line 3144
3144function jd(e,r){for(var n in r)e[n]=r[n];return e}function G7(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function L4t(e,r,n){var i,a,o,l={};for(o in r)o=="key"?i=r[o]:o=="ref"?a=r[o]:l[o]=r[o];if(arguments.length>2&&(l.children=arguments.length>3?rC.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)l[o]===void 0&&(l[o]=e.defaultProps[o]);return Zw(e,l,i,a,null)}function Zw(e,r,n,i,a){var o={type:e,props:r,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++y1e,__i:-1,__u:0};return a==null&&Fi.vnode!=null&&Fi.vnode(o),o}function b3(e){return e.children}function Sk(e,r){this.props=e,this.context=r}function C0(e,r){if(r==null)return e.__?C0(e.__,e.__i+1):null;for(var n;r<e.__k.length;r++)if((n=e.__k[r])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?C0(e):null}function R4t(e){if(e.__P&&e.__d){var r=e.__v,n=r.__e,i=[],a=[],o=jd({},r);o.__v=r.__v+1,Fi.vnode&&Fi.vnode(o),X7(e.__P,o,r,e.__n,e.__P.namespaceURI,32&r.__u?[n]:null,i,n??C0(r),!!(32&r.__u),a),o.__v=r.__v,o.__.__k[o.__i]=o,S1e(i,o,a),r.__e=r.__=null,o.__e!=n&&_1e(o)}}function _1e(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(r){if(r!=null&&r.__e!=null)return e.__e=e.__c.base=r.__e}),_1e(e)}function Vte(e){(!e.__d&&(e.__d=!0)&&om.push(e)&&!xB.__r++||Hte!=Fi.debounceRendering)&&((Hte=Fi.debounceRendering)||b1e)(xB)}function xB(){try{for(var e,r=1;om.length;)om.length>r&&om.sort(w1e),e=om.shift(),r=om.length,R4t(e)}finally{om.length=xB.__r=0}}function C1e(e,r,n,i,a,o,l,c,u,d,h){var f,p,m,A,g,y,x,b=i&&i.__k||gB,v=r.length;for(u=D4t(n,r,b,u,v),f=0;f<v;f++)(m=n.__k[f])!=null&&(p=m.__i!=-1&&b[m.__i]||AB,m.__i=f,y=X7(e,m,p,a,o,l,c,u,d,h),A=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&Y7(p.ref,null,m),h.push(m.ref,m.__c||A,m)),g==null&&A!=null&&(g=A),(x=!!(4&m.__u))||p.__k===m.__k?(u=N1e(m,u,e,x),x&&p.__e&&(p.__e=null)):typeof m.type=="function"&&y!==void 0?u=y:A&&(u=A.nextSibling),m.__u&=-7);return n.__e=g,u}function D4t(e,r,n,i,a){var o,l,c,u,d,h=n.length,f=h,p=0;for(e.__k=new Array(a),o=0;o<a;o++)(l=r[o])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[o]=Zw(null,l,null,null,null):v3(l)?l=e.__k[o]=Zw(b3,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[o]=Zw(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[o]=l,u=o+p,l.__=e,l.__b=e.__b+1,c=null,(d=l.__i=M4t(l,n,u,f))!=-1&&(f--,(c=n[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(a>h?p--:a<h&&p++),typeof l.type!="function"&&(l.__u|=4)):d!=u&&(d==u-1?p--:d==u+1?p++:(d>u?p--:p++,l.__u|=4))):e.__k[o]=null;if(f)for(o=0;o<h;o++)(c=n[o])!=null&&!(2&c.__u)&&(c.__e==i&&(i=C0(c)),E1e(c,c));return i}function N1e(e,r,n,i){var a,o;if(typeof e.type=="function"){for(a=e.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=e,r=N1e(a[o],r,n,i));return r}e.__e!=r&&(i&&(r&&e.type&&!r.parentNode&&(r=C0(e)),n.insertBefore(e.__e,r||null)),r=e.__e);do r=r&&r.nextSibling;while(r!=null&&r.nodeType==8);return r}function M4t(e,r,n,i){var a,o,l,c=e.key,u=e.type,d=r[n],h=d!=null&&(2&d.__u)==0;if(d===null&&c==null||h&&c==d.key&&u==d.type)return n;if(i>(h?1:0)){for(a=n-1,o=n+1;a>=0||o<r.length;)if((d=r[l=a>=0?a--:o++])!=null&&!(2&d.__u)&&c==d.key&&u==d.type)return l}return-1}function Wte(e,r,n){r[0]=="-"?e.setProperty(r,n??""):e[r]=n==null?"":typeof n!="number"||O4t.test(r)?n:n+"px"}function oS(e,r,n,i,a){var o,l;e:if(r=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(r in i)n&&r in n||Wte(e.style,r,"");if(n)for(r in n)i&&n[r]==i[r]||Wte(e.style,r,n[r])}else if(r[0]=="o"&&r[1]=="n")o=r!=(r=r.replace(j1e,"$1")),l=r.toLowerCase(),r=l in e||r=="onFocusOut"||r=="onFocusIn"?l.slice(2):r.slice(2),e.l||(e.l={}),e.l[r+o]=n,n?i?n[Jw]=i[Jw]:(n[Jw]=K7,e.addEventListener(r,o?Uz:zz,o)):e.removeEventListener(r,o?Uz:zz,o);else{if(a=="http://www.w3.org/2000/svg")r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(r!="width"&&r!="height"&&r!="href"&&r!="list"&&r!="form"&&r!="tabIndex"&&r!="download"&&r!="rowSpan"&&r!="colSpan"&&r!="role"&&r!="popover"&&r in e)try{e[r]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&r[4]!="-"?e.removeAttribute(r):e.setAttribute(r,r=="popover"&&n==1?"":n))}}function qte(e){return function(r){if(this.l){var n=this.l[r.type+e];if(r[Nk]==null)r[Nk]=K7++;else if(r[Nk]<n[Jw])return;return n(Fi.event?Fi.event(r):r)}}}function X7(e,r,n,i,a,o,l,c,u,d){var h,f,p,m,A,g,y,x,b,v,j,_,C,N,S,E=r.type;if(r.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),o=[c=r.__e=n.__e]),(h=Fi.__b)&&h(r);e:if(typeof E=="function")try{if(x=r.props,b=E.prototype&&E.prototype.render,v=(h=E.contextType)&&i[h.__c],j=h?v?v.props.value:h.__:i,n.__c?y=(f=r.__c=n.__c).__=f.__E:(b?r.__c=f=new E(x,j):(r.__c=f=new Sk(x,j),f.constructor=E,f.render=U4t),v&&v.sub(f),f.state||(f.state={}),f.__n=i,p=f.__d=!0,f.__h=[],f._sb=[]),b&&f.__s==null&&(f.__s=f.state),b&&E.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=jd({},f.__s)),jd(f.__s,E.getDerivedStateFromProps(x,f.__s))),m=f.props,A=f.state,f.__v=r,p)b&&E.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),b&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(b&&E.getDerivedStateFromProps==null&&x!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(x,j),r.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(x,f.__s,j)===!1){r.__v!=n.__v&&(f.props=x,f.state=f.__s,f.__d=!1),r.__e=n.__e,r.__k=n.__k,r.__k.some(function(O){O&&(O.__=r)}),gB.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&l.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(x,f.__s,j),b&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,A,g)})}if(f.context=j,f.props=x,f.__P=e,f.__e=!1,_=Fi.__r,C=0,b)f.state=f.__s,f.__d=!1,_&&_(r),h=f.render(f.props,f.state,f.context),gB.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,_&&_(r),h=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++C<25);f.state=f.__s,f.getChildContext!=null&&(i=jd(jd({},i),f.getChildContext())),b&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,A)),N=h!=null&&h.type===b3&&h.key==null?k1e(h.props.children):h,c=C1e(e,v3(N)?N:[N],r,n,i,a,o,l,c,u,d),f.base=r.__e,r.__u&=-161,f.__h.length&&l.push(f),y&&(f.__E=f.__=null)}catch(O){if(r.__v=null,u||o!=null)if(O.then){for(r.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,r.__e=c}else{for(S=o.length;S--;)G7(o[S]);$z(r)}else r.__e=n.__e,r.__k=n.__k,O.then||$z(r);Fi.__e(O,r,n)}else o==null&&r.__v==n.__v?(r.__k=n.__k,r.__e=n.__e):c=r.__e=z4t(n.__e,r,n,i,a,o,l,u,d);return(h=Fi.diffed)&&h(r),128&r.__u?void 0:c}function $z(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some($z))}function S1e(e,r,n){for(var i=0;i<n.length;i++)Y7(n[i],n[++i],n[++i]);Fi.__c&&Fi.__c(r,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(o){o.call(a)})}catch(o){Fi.__e(o,a.__v)}})}function k1e(e){return typeof e!="object"||e==null||e.__b>0?e:v3(e)?e.map(k1e):jd({},e)}function z4t(e,r,n,i,a,o,l,c,u){var d,h,f,p,m,A,g,y=n.props||AB,x=r.props,b=r.type;if(b=="svg"?a="http://www.w3.org/2000/svg":b=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((m=o[d])&&"setAttribute"in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,o[d]=null;break}}if(e==null){if(b==null)return document.createTextNode(x);e=document.createElementNS(a,b,x.is&&x),c&&(Fi.__m&&Fi.__m(r,o),c=!1),o=null}if(b==null)y===x||c&&e.data==x||(e.data=x);else{if(o=o&&rC.call(e.childNodes),!c&&o!=null)for(y={},d=0;d<e.attributes.length;d++)y[(m=e.attributes[d]).name]=m.value;for(d in y)m=y[d],d=="dangerouslySetInnerHTML"?f=m:d=="children"||d in x||d=="value"&&"defaultValue"in x||d=="checked"&&"defaultChecked"in x||oS(e,d,null,m,a);for(d in x)m=x[d],d=="children"?p=m:d=="dangerouslySetInnerHTML"?h=m:d=="value"?A=m:d=="checked"?g=m:c&&typeof m!="function"||y[d]===m||oS(e,d,m,y[d],a);if(h)c||f&&(h.__html==f.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),r.__k=[];else if(f&&(e.innerHTML=""),C1e(r.type=="template"?e.content:e,v3(p)?p:[p],r,n,i,b=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,l,o?o[0]:n.__k&&C0(n,0),c,u),o!=null)for(d=o.length;d--;)G7(o[d]);c||(d="value",b=="progress"&&A==null?e.removeAttribute("value"):A!=null&&(A!==e[d]||b=="progress"&&!A||b=="option"&&A!=y[d])&&oS(e,d,A,y[d],a),d="checked",g!=null&&g!=e[d]&&oS(e,d,g,y[d],a))}return e}function Y7(e,r,n){try{if(typeof e=="function"){var i=typeof e.__u=="function";i&&e.__u(),i&&r==null||(e.__u=e(r))}else e.current=r}catch(a){Fi.__e(a,n)}}function E1e(e,r,n){var i,a;if(Fi.unmount&&Fi.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||Y7(i,null,r)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(o){Fi.__e(o,r)}i.base=i.__P=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&E1e(i[a],r,n||typeof e.type!="function");n||G7(e.__e),e.__c=e.__=e.__e=void 0}function U4t(e,r,n){return this.constructor(e,n)}function $4t(e,r,n){var i,a,o,l;r==document&&(r=document.documentElement),Fi.__&&Fi.__(e,r),a=(i=typeof n=="function")?null:r.__k,o=[],l=[],X7(r,e=(!i&&n||r).__k=L4t(b3,null,[e]),a||AB,AB,r.namespaceURI,!i&&n?[n]:a?null:r.firstChild?rC.call(r.childNodes):null,o,!i&&n?n:a?a.__e:r.firstChild,i,l),S1e(o,e,l)}function B1e(e,r,n){var i,a,o,l,c=jd({},e.props);for(o in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),r)o=="key"?i=r[o]:o=="ref"?a=r[o]:c[o]=r[o]===void 0&&l!=null?l[o]:r[o];return arguments.length>2&&(c.children=arguments.length>3?rC.call(arguments,2):n),Zw(e.type,c,i||e.key,a||e.ref,null)}rC=gB.slice,Fi={__e:function(e,r,n,i){for(var a,o,l;r=r.__;)if((a=r.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(e)),l=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,i||{}),l=a.__d),l)return a.__E=a}catch(c){e=c}throw e}},y1e=0,v1e=function(e){return e!=null&&e.constructor===void 0},Sk.prototype.setState=function(e,r){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=jd({},this.state),typeof e=="function"&&(e=e(jd({},n),this.props)),e&&jd(n,e),e!=null&&this.__v&&(r&&this._sb.push(r),Vte(this))},Sk.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Vte(this))},Sk.prototype.render=b3,om=[],b1e=typeof Promise=="function"?Promise.prototype.then.bind(Prom
3144ise.resolve()):setTimeout,w1e=function(e,r){return e.__v.__b-r.__v.__b},xB.__r=0,KF=Math.random().toString(8),Nk="__d"+KF,Jw="__a"+KF,j1e=/(PointerCapture)$|Capture$/i,K7=0,zz=qte(!1),Uz=qte(!0);function Kte(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=Array(r);n<r;n++)i[n]=e[n];return i}function Q4t(e){if(Array.isArray(e))return e}function H4t(e,r,n){return(r=X4t(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function V4t(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function W4t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3145In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gte(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function q4t(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Gte(Object(n),!0).forEach(function(i){H4t(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gte(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function K4t(e,r){return Q4t(e)||V4t(e,r)||Y4t(e,r)||W4t()}function G4t(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function X4t(e){var r=G4t(e,"string");return typeof r=="symbol"?r:r+""}function yB(e){"@babel/helpers - typeof";return yB=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},yB(e)}function Y4t(e,r){if(e){if(typeof e=="string")return Kte(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kte(e,r):void 0}}var Qz=function(r){if(yB(r)!=="object")return r;var n=B1e(r);if(n.props){var i;n.props=q4t({},n.props),n!=null&&(i=n.props)!==null&&i!==void 0&&i.children&&(n.props.children=Array.isArray(n.props.children)?n.props.children.map(Qz):Qz(n.props.children))}return n},J4t=function(r){return v1e(B1e(r))},Z4t=function(r,n){delete n.__k,$4t(Qz(r),n)};function eTt(e,r){r===void 0&&(r={});var n=r.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",n==="top"&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var tTt=`.float-tooltip-kap {
3146  position: absolute;
3147  width: max-content; /* prevent shrinking near right edge */
3148  max-width: max(50%, 150px);
3149  padding: 3px 5px;
3150  border-radius: 3px;
3151  font: 12px sans-serif;
3152  color: #eee;
3153  background: rgba(0,0,0,0.6);
3154  pointer-events: none;
3155}
3156`;eTt(tTt);var rTt=q7({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.style,o=a===void 0?{}:a,l=!!r&&yB(r)==="object"&&!!r.node&&typeof r.node=="function",c=vc(l?r.node():r);c.style("position")==="static"&&c.style("position","relative"),n.tooltipEl=c.append("div").attr("class","float-tooltip-kap"),Object.entries(o).forEach(function(d){var h=K4t(d,2),f=h[0],p=h[1];return n.tooltipEl.style(f,p)}),n.tooltipEl.style("left","-10000px").style("display","none");var u="tooltip-".concat(Math.round(Math.random()*1e12));n.mouseInside=!1,c.on("mousemove.".concat(u),function(d){n.mouseInside=!0;var h=od(d),f=c.node(),p=f.offsetWidth,m=f.offsetHeight,A=[n.offsetX===null||n.offsetX===void 0?"-".concat(h[0]/p*100,"%"):typeof n.offsetX=="number"?"calc(-50% + ".concat(n.offsetX,"px)"):n.offsetX,n.offsetY===null||n.offsetY===void 0?m>130&&m-h[1]<100?"calc(-100% - 6px)":"21px":typeof n.offsetY=="number"?n.offsetY<0?"calc(-100% - ".concat(Math.abs(n.offsetY),"px)"):"".concat(n.offsetY,"px"):n.offsetY];n.tooltipEl.style("left",h[0]+"px").style("top",h[1]+"px").style("transform","translate(".concat(A.join(","),")")),n.content&&n.tooltipEl.style("display","inline")}
3156),c.on("mouseover.".concat(u),function(){n.mouseInside=!0,n.content&&n.tooltipEl.style("display","inline")}),c.on("mouseout.".concat(u),function(){n.mouseInside=!1,n.tooltipEl.style("display","none")})},update:function(r){r.tooltipEl.style("display",r.content&&r.mouseInside?"inline":"none"),r.content?r.content instanceof HTMLElement?(r.tooltipEl.text(""),r.tooltipEl.append(function(){return r.content})):typeof r.content=="string"?r.tooltipEl.html(r.content):J4t(r.content)?(r.tooltipEl.text(""),Z4t(r.content,r.tooltipEl.node())):(r.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",r.content,r.content.toString())):r.tooltipEl.text("")}});function nTt(e,r,n){var i,a=1;e==null&&(e=0),r==null&&(r=0),n==null&&(n=0);function o(){var l,c=i.length,u,d=0,h=0,f=0;for(l=0;l<c;++l)u=i[l],d+=u.x||0,h+=u.y||0,f+=u.z||0;for(d=(d/c-e)*a,h=(h/c-r)*a,f=(f/c-n)*a,l=0;l<c;++l)u=i[l],d&&(u.x-=d),h&&(u.y-=h),f&&(u.z-=f)}return o.initialize=function(l){i=l},o.x=function(l){return arguments.length?(e=+l,o):e},o.y=function(l){return arguments.length?(r=+l,o):r},o.z=function(l){return arguments.length?(n=+l,o):n},o.strength=function(l){return arguments.length?(a=+l,o):a},o}function iTt(e){const r=+this._x.call(null,e);return T1e(this.cover(r),r,e)}function T1e(e,r,n){if(isNaN(r))return e;var i,a=e._root,o={data:n},l=e._x0,c=e._x1,u,d,h,f,p;if(!a)return e._root=o,e;for(;a.length;)if((h=r>=(u=(l+c)/2))?l=u:c=u,i=a,!(a=a[f=+h]))return i[f]=o,e;if(d=+e._x.call(null,a.data),r===d)return o.next=a,i?i[f]=o:e._root=o,e;do i=i?i[f]=new Array(2):e._root=new Array(2),(h=r>=(u=(l+c)/2))?l=u:c=u;while((f=+h)==(p=+(d>=u)));return i[p]=a,i[f]=o,e}function aTt(e){Array.isArray(e)||(e=Array.from(e));const r=e.length,n=new Float64Array(r);let i=1/0,a=-1/0;for(let o=0,l;o<r;++o)isNaN(l=+this._x.call(null,e[o]))||(n[o]=l,l<i&&(i=l),l>a&&(a=l));if(i>a)return this;this.cover(i).cover(a);for(let o=0;o<r;++o)T1e(this,n[o],e[o]);return this}function sTt(e){if(isNaN(e=+e))return this;var r=this._x0,n=this._x1;if(isNaN(r))n=(r=Math.floor(e))+1;else{for(var i=n-r||1,a=this._root,o,l;r>e||e>=n;)switch(l=+(e<r),o=new Array(2),o[l]=a,a=o,i*=2,l){case 0:n=r+i;break;case 1:r=n-i;break}this._root&&this._root.length&&(this._root=a)}return this._x0=r,this._x1=n,this}function oTt(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function lTt(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Uh(e,r,n){this.node=e,this.x0=r,this.x1=n}function cTt(e,r){var n,i=this._x0,a,o,l=this._x1,c=[],u=this._root,d,h;for(u&&c.push(new Uh(u,i,l)),r==null?r=1/0:(i=e-r,l=e+r);d=c.pop();)if(!(!(u=d.node)||(a=d.x0)>l||(o=d.x1)<i))if(u.length){var f=(a+o)/2;c.push(new Uh(u[1],f,o),new Uh(u[0],a,f)),(h=+(e>=f))&&(d=c[c.length-1],c[c.length-1]=c[c.length-1-h],c[c.length-1-h]=d)}else{var p=Math.abs(e-+this._x.call(null,u.data));p<r&&(r=p,i=e-p,l=e+p,n=u.data)}return n}function uTt(e){if(isNaN(u=+this._x.call(null,e)))return this;var r,n=this._root,i,a,o,l=this._x0,c=this._x1,u,d,h,f,p;if(!n)return this;if(n.length)for(;;){if((h=u>=(d=(l+c)/2))?l=d:c=d,r=n,!(n=n[f=+h]))return this;if(!n.length)break;r[f+1&1]&&(i=r,p=f)}for(;n.data!==e;)if(a=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,a?(o?a.next=o:delete a.next,this):r?(o?r[f]=o:delete r[f],(n=r[0]||r[1])&&n===(r[1]||r[0])&&!n.length&&(i?i[p]=n:this._root=n),this):(this._root=o,this)}function dTt(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function hTt(){return this._root}function fTt(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function mTt(e){var r=[],n,i=this._root,a,o,l;for(i&&r.push(new Uh(i,this._x0,this._x1));n=r.pop();)if(!e(i=n.node,o=n.x0,l=n.x1)&&i.length){var c=(o+l)/2;(a=i[1])&&r.push(new Uh(a,c,l)),(a=i[0])&&r.push(new Uh(a,o,c))}return this}function pTt(e){var r=[],n=[],i;for(this._root&&r.push(new Uh(this._root,this._x0,this._x1));i=r.pop();){var a=i.node;if(a.length){var o,l=i.x0,c=i.x1,u=(l+c)/2;
vendor: 7,120 bytes, line 3156
3156(o=a[0])&&r.push(new Uh(o,l,u)),(o=a[1])&&r.push(new Uh(o,u,c))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.x1);return this}function ATt(e){return e[0]}function gTt(e){return arguments.length?(this._x=e,this):this._x}function P1e(e,r){var n=new J7(r??ATt,NaN,NaN);return e==null?n:n.addAll(e)}function J7(e,r,n){this._x=e,this._x0=r,this._x1=n,this._root=void 0}function Xte(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var fl=P1e.prototype=J7.prototype;fl.copy=function(){var e=new J7(this._x,this._x0,this._x1),r=this._root,n,i;if(!r)return e;if(!r.length)return e._root=Xte(r),e;for(n=[{source:r,target:e._root=new Array(2)}];r=n.pop();)for(var a=0;a<2;++a)(i=r.source[a])&&(i.length?n.push({source:i,target:r.target[a]=new Array(2)}):r.target[a]=Xte(i));return e};fl.add=iTt;fl.addAll=aTt;fl.cover=sTt;fl.data=oTt;fl.extent=lTt;fl.find=cTt;fl.remove=uTt;fl.removeAll=dTt;fl.root=hTt;fl.size=fTt;fl.visit=mTt;fl.visitAfter=pTt;fl.x=gTt;function xTt(e){const r=+this._x.call(null,e),n=+this._y.call(null,e);return I1e(this.cover(r,n),r,n,e)}function I1e(e,r,n,i){if(isNaN(r)||isNaN(n))return e;var a,o=e._root,l={data:i},c=e._x0,u=e._y0,d=e._x1,h=e._y1,f,p,m,A,g,y,x,b;if(!o)return e._root=l,e;for(;o.length;)if((g=r>=(f=(c+d)/2))?c=f:d=f,(y=n>=(p=(u+h)/2))?u=p:h=p,a=o,!(o=o[x=y<<1|g]))return a[x]=l,e;if(m=+e._x.call(null,o.data),A=+e._y.call(null,o.data),r===m&&n===A)return l.next=o,a?a[x]=l:e._root=l,e;do a=a?a[x]=new Array(4):e._root=new Array(4),(g=r>=(f=(c+d)/2))?c=f:d=f,(y=n>=(p=(u+h)/2))?u=p:h=p;while((x=y<<1|g)===(b=(A>=p)<<1|m>=f));return a[b]=o,a[x]=l,e}function yTt(e){var r,n,i=e.length,a,o,l=new Array(i),c=new Array(i),u=1/0,d=1/0,h=-1/0,f=-1/0;for(n=0;n<i;++n)isNaN(a=+this._x.call(null,r=e[n]))||isNaN(o=+this._y.call(null,r))||(l[n]=a,c[n]=o,a<u&&(u=a),a>h&&(h=a),o<d&&(d=o),o>f&&(f=o));if(u>h||d>f)return this;for(this.cover(u,d).cover(h,f),n=0;n<i;++n)I1e(this,l[n],c[n],e[n]);return this}function vTt(e,r){if(isNaN(e=+e)||isNaN(r=+r))return this;var n=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(n))a=(n=Math.floor(e))+1,o=(i=Math.floor(r))+1;else{for(var l=a-n||1,c=this._root,u,d;n>e||e>=a||i>r||r>=o;)switch(d=(r<i)<<1|e<n,u=new Array(4),u[d]=c,c=u,l*=2,d){case 0:a=n+l,o=i+l;break;case 1:n=a-l,o=i+l;break;case 2:a=n+l,i=o-l;break;case 3:n=a-l,i=o-l;break}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=i,this._x1=a,this._y1=o,this}function bTt(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function wTt(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function jo(e,r,n,i,a){this.node=e,this.x0=r,this.y0=n,this.x1=i,this.y1=a}function jTt(e,r,n){var i,a=this._x0,o=this._y0,l,c,u,d,h=this._x1,f=this._y1,p=[],m=this._root,A,g;for(m&&p.push(new jo(m,a,o,h,f)),n==null?n=1/0:(a=e-n,o=r-n,h=e+n,f=r+n,n*=n);A=p.pop();)if(!(!(m=A.node)||(l=A.x0)>h||(c=A.y0)>f||(u=A.x1)<a||(d=A.y1)<o))if(m.length){var y=(l+u)/2,x=(c+d)/2;p.push(new jo(m[3],y,x,u,d),new jo(m[2],l,x,y,d),new jo(m[1],y,c,u,x),new jo(m[0],l,c,y,x)),(g=(r>=x)<<1|e>=y)&&(A=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=A)}else{var b=e-+this._x.call(null,m.data),v=r-+this._y.call(null,m.data),j=b*b+v*v;if(j<n){var _=Math.sqrt(n=j);a=e-_,o=r-_,h=e+_,f=r+_,i=m.data}}return i}function _Tt(e){if(isNaN(h=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var r,n=this._root,i,a,o,l=this._x0,c=this._y0,u=this._x1,d=this._y1,h,f,p,m,A,g,y,x;if(!n)return this;if(n.length)for(;;){if((A=h>=(p=(l+u)/2))?l=p:u=p,(g=f>=(m=(c+d)/2))?c=m:d=m,r=n,!(n=n[y=g<<1|A]))return this;if(!n.length)break;(r[y+1&3]||r[y+2&3]||r[y+3&3])&&(i=r,x=y)}for(;n.data!==e;)if(a=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,a?(o?a.next=o:delete a.next,this):r?(o?r[y]=o:delete r[y],(n=r[0]||r[1]||r[2]||r[3])&&n===(r[3]||r[2]||r[1]||r[0])&&!n.length&&(i?i[x]=n:this._root=n),this):(this._root=o,this)}function CTt(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function NTt(){return this._root}function STt(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function kTt(e){var r=[],n,i=this._root,a,o,l,c,u;for(i&&r.push(new jo(i,this._x0,this._y0,this._x1,this._y1));n=r.pop();)if(!e(i=n.node,o=n.x0,l=n.y0,c=n.x1,u=n.y1)&&i.length){var d=(o+c)/2,h=(l+u)/2;(a=i[3])&&r.push(new jo(a,d,h,c,u)),(a=i[2])&&r.push(new jo(a,o,h,d,u)),(a=i[1])&&r.push(new jo(a,d,l,c,h)),(a=i[0])&&r.push(new jo(a,o,l,d,h))}return this}function ETt(e){var r=[],n=[],i;for(this._root&&r.push(new jo(this._root,this._x0,this._y0,this._x1,this._y1));i=r.pop();){var a=i.node;if(a.length){var o,l=i.x0,c=i.y0,u=i.x1,d=i.y1,h=(l+u)/2,f=(c+d)/2;(o=a[0])&&r.push(new jo(o,l,c,h,f)),(o=a[1])&&r.push(new jo(o,h,c,u,f)),(o=a[2])&&r.push(new jo(o,l,f,h,d)),(o=a[3])&&r.push(new jo(o,h,f,u,d))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function BTt(e){return e[0]}function TTt(e){return arguments.length?(this._x=e,this):this._x}function PTt(e){return e[1]}function ITt(e){return arguments.length?(this._y=e,this):this._y}function F1e(e,r,n){var i=new Z7(r??BTt,n??PTt,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Z7(e,r,n,i,a,o){this._x=e,this._y=r,this._x0=n,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function Yte(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var Lo=F1e.prototype=Z7.prototype;Lo.copy=function(){var e=new Z7(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root,n,i;if(!r)return e;if(!r.length)return e._root=Yte(r),e;for(n=[{source:r,target:e._root=new Array(4)}];r=n.pop();)for(var a=0;a<4;++a)(i=r.source[a])&&(i.length?n.push({source:i,target:r.target[a]=new Array(4)}):r.target[a]=Yte(i));return e};Lo.add=xTt;Lo.addAll=yTt;Lo.cover=vTt;Lo.data=bTt;Lo.extent=wTt;Lo.find=jTt;Lo.remove=_Tt;Lo.removeAll=CTt;Lo.root=NTt;Lo.size=STt;Lo.visit=kTt;Lo.visitAfter=ETt;Lo.x=TTt;Lo.y=ITt;function FTt(e){const r=+this._x.call(null,e),n=+this._y.call(null,e),i=+this._z.call(null,e);return O1e(this.cover(r,n,i),r,n,i,e)}function O1e(e,r,n,i,a){if(isNaN(r)||isNaN(n)||isNaN(i))return e;var o,l=e._root,c={data:a},u=e._x0,d=e._y0,h=e._z0,f=e._x1,p=e._y1,m=e._z1,A,g,y,x,b,v,j,_,C,N,S;if(!l)return e._root=c,e;for(;l.length;)if((j=r>=(A=(u+f)/2))?u=A:f=A,(_=n>=(g=(d+p)/2))?d=g:p=g,(C=i>=(y=(h+m)/2))?h=y:m=y,o=l,!(l=l[N=C<<2|_<<1|j]))return o[N]=c,e;if(x=+e._x.call(null,l.data),b=+e._y.call(null,l.data),v=+e._z.call(null,l.data),r===x&&n===b&&i===v)return c.next=l,o?o[N]=c:e._root=c,e;do o=o?o[N]=new Array(8):e._root=new Array(8),(j=r>=(A=(u+f)/2))?u=A:f=A,(_=n>=(g=(d+p)/2))?d=g:p=g,(C=i>=(y=(h+m)/2))?h=y:m=y;while((N=C<<2|_<<1|j)===(S=(v>=y)<<2|(b>=g)<<1|x>=A));return o[S]=l,o[N]=c,e}function OTt(e){Array.isArray(e)||(e=Array.from(e));const r=e.length,n=new Float64Array(r),i=new Float64Array(r),a=new Float64Array(r);let o=1/0,l=1/0,c=1/0,u=-1/0,d=-1/0,h=-1/0;for(let f=0,p,m,A,g;f<r;++f)isNaN(m=+this._x.call(null,p=e[f]))||isNaN(A=+this._y.call(null,p))||isNaN(g=+this._z.call(null,p))||
vendor: 4,336 bytes, line 3156
3156(n[f]=m,i[f]=A,a[f]=g,m<o&&(o=m),m>u&&(u=m),A<l&&(l=A),A>d&&(d=A),g<c&&(c=g),g>h&&(h=g));if(o>u||l>d||c>h)return this;this.cover(o,l,c).cover(u,d,h);for(let f=0;f<r;++f)O1e(this,n[f],i[f],a[f],e[f]);return this}function LTt(e,r,n){if(isNaN(e=+e)||isNaN(r=+r)||isNaN(n=+n))return this;var i=this._x0,a=this._y0,o=this._z0,l=this._x1,c=this._y1,u=this._z1;if(isNaN(i))l=(i=Math.floor(e))+1,c=(a=Math.floor(r))+1,u=(o=Math.floor(n))+1;else{for(var d=l-i||1,h=this._root,f,p;i>e||e>=l||a>r||r>=c||o>n||n>=u;)switch(p=(n<o)<<2|(r<a)<<1|e<i,f=new Array(8),f[p]=h,h=f,d*=2,p){case 0:l=i+d,c=a+d,u=o+d;break;case 1:i=l-d,c=a+d,u=o+d;break;case 2:l=i+d,a=c-d,u=o+d;break;case 3:i=l-d,a=c-d,u=o+d;break;case 4:l=i+d,c=a+d,o=u-d;break;case 5:i=l-d,c=a+d,o=u-d;break;case 6:l=i+d,a=c-d,o=u-d;break;case 7:i=l-d,a=c-d,o=u-d;break}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=a,this._z0=o,this._x1=l,this._y1=c,this._z1=u,this}function RTt(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function DTt(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function ri(e,r,n,i,a,o,l){this.node=e,this.x0=r,this.y0=n,this.z0=i,this.x1=a,this.y1=o,this.z1=l}function MTt(e,r,n,i){var a,o=this._x0,l=this._y0,c=this._z0,u,d,h,f,p,m,A=this._x1,g=this._y1,y=this._z1,x=[],b=this._root,v,j;for(b&&x.push(new ri(b,o,l,c,A,g,y)),i==null?i=1/0:(o=e-i,l=r-i,c=n-i,A=e+i,g=r+i,y=n+i,i*=i);v=x.pop();)if(!(!(b=v.node)||(u=v.x0)>A||(d=v.y0)>g||(h=v.z0)>y||(f=v.x1)<o||(p=v.y1)<l||(m=v.z1)<c))if(b.length){var _=(u+f)/2,C=(d+p)/2,N=(h+m)/2;x.push(new ri(b[7],_,C,N,f,p,m),new ri(b[6],u,C,N,_,p,m),new ri(b[5],_,d,N,f,C,m),new ri(b[4],u,d,N,_,C,m),new ri(b[3],_,C,h,f,p,N),new ri(b[2],u,C,h,_,p,N),new ri(b[1],_,d,h,f,C,N),new ri(b[0],u,d,h,_,C,N)),(j=(n>=N)<<2|(r>=C)<<1|e>=_)&&(v=x[x.length-1],x[x.length-1]=x[x.length-1-j],x[x.length-1-j]=v)}else{var S=e-+this._x.call(null,b.data),E=r-+this._y.call(null,b.data),O=n-+this._z.call(null,b.data),B=S*S+E*E+O*O;if(B<i){var T=Math.sqrt(i=B);o=e-T,l=r-T,c=n-T,A=e+T,g=r+T,y=n+T,a=b.data}}return a}const zTt=(e,r,n,i,a,o)=>Math.sqrt((e-i)**2+(r-a)**2+(n-o)**2);function UTt(e,r,n,i){const a=[],o=e-i,l=r-i,c=n-i,u=e+i,d=r+i,h=n+i;return this.visit((f,p,m,A,g,y,x)=>{if(!f.length)do{const b=f.data;zTt(e,r,n,this._x(b),this._y(b),this._z(b))<=i&&a.push(b)}while(f=f.next);return p>u||m>d||A>h||g<o||y<l||x<c}),a}function $Tt(e){if(isNaN(p=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e))||isNaN(A=+this._z.call(null,e)))return this;var r,n=this._root,i,a,o,l=this._x0,c=this._y0,u=this._z0,d=this._x1,h=this._y1,f=this._z1,p,m,A,g,y,x,b,v,j,_,C;if(!n)return this;if(n.length)for(;;){if((b=p>=(g=(l+d)/2))?l=g:d=g,(v=m>=(y=(c+h)/2))?c=y:h=y,(j=A>=(x=(u+f)/2))?u=x:f=x,r=n,!(n=n[_=j<<2|v<<1|b]))return this;if(!n.length)break;(r[_+1&7]||r[_+2&7]||r[_+3&7]||r[_+4&7]||r[_+5&7]||r[_+6&7]||r[_+7&7])&&(i=r,C=_)}for(;n.data!==e;)if(a=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,a?(o?a.next=o:delete a.next,this):r?(o?r[_]=o:delete r[_],(n=r[0]||r[1]||r[2]||r[3]||r[4]||r[5]||r[6]||r[7])&&n===(r[7]||r[6]||r[5]||r[4]||r[3]||r[2]||r[1]||r[0])&&!n.length&&(i?i[C]=n:this._root=n),this):(this._root=o,this)}function QTt(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function HTt(){return this._root}function VTt(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function WTt(e){var r=[],n,i=this._root,a,o,l,c,u,d,h;for(i&&r.push(new ri(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=r.pop();)if(!e(i=n.node,o=n.x0,l=n.y0,c=n.z0,u=n.x1,d=n.y1,h=n.z1)&&i.length){var f=(o+u)/2,p=(l+d)/2,m=(c+h)/2;(a=i[7])&&r.push(new ri(a,f,p,m,u,d,h)),(a=i[6])&&r.push(new ri(a,o,p,m,f,d,h)),(a=i[5])&&r.push(new ri(a,f,l,m,u,p,h)),(a=i[4])&&r.push(new ri(a,o,l,m,f,p,h)),(a=i[3])&&r.push(new ri(a,f,p,c,u,d,m)),(a=i[2])&&r.push(new ri(a,o,p,c,f,d,m)),(a=i[1])&&r.push(new ri(a,f,l,c,u,p,m)),(a=i[0])&&r.push(new ri(a,o,l,c,f,p,m))}return this}function qTt(e){var r=[],n=[],i;for(this._root&&r.push(new ri(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=r.pop();){var a=i.node;if(a.length){var o,l=i.x0,c=i.y0,u=i.z0,d=i.x1,h=i.y1,f=i.z1,p=(l+d)
3156/2,m=(c+h)/2,A=(u+f)/2;(o=a[0])&&r.push(new ri(o,l,c,u,p,m,A)),(o=a[1])&&r.push(new ri(o,p,c,u,d,m,A)),(o=a[2])&&r.push(new ri(o,l,m,u,p,h,A)),(o=a[3])&&r.push(new ri(o,p,m,u,d,h,A)),(o=a[4])&&r.push(new ri(o,l,c,A,p,m,f)),(o=a[5])&&r.push(new ri(o,p,c,A,d,m,f)),(o=a[6])&&r.push(new ri(o,l,m,A,p,h,f)),(o=a[7])&&r.push(new ri(o,p,m,A,d,h,f))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.y0,i.z0,i.x1,i.y1,i.z1);return this}function KTt(e){return e[0]}function GTt(e){return arguments.length?(this._x=e,this):this._x}function XTt(e){return e[1]}function YTt(e){return arguments.length?(this._y=e,this):this._y}function JTt(e){return e[2]}function ZTt(e){return arguments.length?(this._z=e,this):this._z}function L1e(e,r,n,i){var a=new eH(r??KTt,n??XTt,i??JTt,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?a:a.addAll(e)}function eH(e,r,n,i,a,o,l,c,u){this._x=e,this._y=r,this._z=n,this._x0=i,this._y0=a,this._z0=o,this._x1=l,this._y1=c,this._z1=u,this._root=void 0}function Jte(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var Ds=L1e.prototype=eH.prototype;Ds.copy=function(){var e=new eH(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root,n,i;if(!r)return e;if(!r.length)return e._root=Jte(r),e;for(n=[{source:r,target:e._root=new Array(8)}];r=n.pop();)for(var a=0;a<8;++a)(i=r.source[a])&&(i.length?n.push({source:i,target:r.target[a]=new Array(8)}):r.target[a]=Jte(i));return e};Ds.add=FTt;Ds.addAll=OTt;Ds.cover=LTt;Ds.data=RTt;Ds.extent=DTt;Ds.find=MTt;Ds.findAllWithinRadius=UTt;Ds.remove=$Tt;Ds.removeAll=QTt;Ds.root=HTt;Ds.size=VTt;Ds.visit=WTt;Ds.visitAfter=qTt;Ds.x=GTt;Ds.y=YTt;Ds.z=ZTt;function Ih(e){return function(){return e}}function wh(e){return(e()-.5)*1e-6}function e3t(e){return e.index}function Zte(e,r){var n=e.get(r);if(!n)throw new Error("node not found: "+r);return n}function t3t(e){var r=e3t,n=p,i,a=Ih(30),o,l,c,u,d,h,f=1;e==null&&(e=[]);function p(x){return 1/Math.min(u[x.source.index],u[x.target.index])}function m(x){for(var b=0,v=e.length;b<f;++b)for(var j=0,_,C,N,S=0,E=0,O=0,B,T;j<v;++j)_=e[j],C=_.source,N=_.target,S=N.x+N.vx-C.x-C.vx||wh(h),c>1&&(E=N.y+N.vy-C.y-C.vy||wh(h)),c>2&&(O=N.z+N.vz-C.z-C.vz||wh(h)),B=Math.sqrt(S*S+E*E+O*O),B=(B-o[j])/B*x*i[j],S*=B,E*=B,O*=B,N.vx-=S*(T=d[j]),c>1&&(N.vy-=E*T),c>2&&(N.vz-=O*T),C.vx+=S*(T=1-T),c>1&&(C.vy+=E*T),c>2&&(C.vz+=O*T)}function A(){if(l){var x,b=l.length,v=e.length,j=new Map(l.map((C,N)=>[r(C,N,l),C])),_;for(x=0,u=new Array(b);x<v;++x)_=e[x],_.index=x,typeof _.source!="object"&&(_.source=Zte(j,_.source)),typeof _.target!="object"&&(_.target=Zte(j,_.target)),u[_.source.index]=(u[_.source.index]||0)+1,u[_.target.index]=(u[_.target.index]||0)+1;for(x=0,d=new Array(v);x<v;++x)_=e[x],d[x]=u[_.source.index]/(u[_.source.index]+u[_.target.index]);i=new Array(v),g(),o=new Array(v),y()}}function g(){if(l)for(var x=0,b=e.length;x<b;++x)i[x]=+n(e[x],x,e)}function y(){if(l)for(var x=0,b=e.length;x<b;++x)o[x]=+a(e[x],x,e)}return m.initialize=function(x,...b){l=x,h=b.find(v=>typeof v=="function")||Math.random,c=b.find(v=>[1,2,3].includes(v))||2,A()},m.links=function(x){return arguments.length?(e=x,A(),m):e},m.id=function(x){return arguments.length?(r=x,m):r},m.iterations=function(x){return arguments.length?(f=+x,m):f},m.strength=function(x){return arguments.length?(n=typeof x=="function"?x:Ih(+x),g(),m):n},m.distance=function(x){return arguments.length?(a=typeof x=="function"?x:Ih(+x),y(),m):a},m}const r3t=1664525,n3t=1013904223,ere=4294967296;function i3t(){let e=1;return()=>(e=(r3t*e+n3t)%ere)/ere}var tre=3;function GF(e){return e.x}function rre(e){return e.y}function a3t(e){return e.z}var s3t=10,o3t=Math.PI*(3-Math.sqrt(5)),l3t=Math.PI*20/(9+Math.sqrt(221));function c3t(e,r){r=r||2;var n=Math.min(tre,Math.max(1,Math.round(r))),i,a=1,o=.001,l=1-Math.pow(o,1/300),c=0,u=.6,d=new Map,h=Q7(m),f=tC("tick","end"),p=i3t();e==null&&(e=[]);function m(){A(),f.call("tick",i),a<o&&(h.stop(),f.call("end",i))}function A(x){var b,v=e.length,j;x===void 0&&(x=1);for(var _=0;_<x;++_)for(a+=(c-a)*l,d.forEach(function(C){C(a)}),b=0;b<v;++b)j=e[b],j.fx==null?j.x+=j.vx*=u:(j.x=j.fx,j.vx=0),n>1&&(j.fy==null?j.y+=j.vy*=u:(j.y=j.fy,j.vy=0)),n>2&&(j.fz==null?j.z+=j.vz*=u:(j.z=j.fz,j.vz=0));return i}function g(){for(var x=0,b=e.length,v;x<b;
3156++x){if(v=e[x],v.index=x,v.fx!=null&&(v.x=v.fx),v.fy!=null&&(v.y=v.fy),v.fz!=null&&(v.z=v.fz),isNaN(v.x)||n>1&&isNaN(v.y)||n>2&&isNaN(v.z)){var j=s3t*(n>2?Math.cbrt(.5+x):n>1?Math.sqrt(.5+x):x),_=x*o3t,C=x*l3t;n===1?v.x=j:n===2?(v.x=j*Math.cos(_),v.y=j*Math.sin(_)):(v.x=j*Math.sin(_)*Math.cos(C),v.y=j*Math.cos(_),v.z=j*Math.sin(_)*Math.sin(C))}(isNaN(v.vx)||n>1&&isNaN(v.vy)||n>2&&isNaN(v.vz))&&(v.vx=0,n>1&&(v.vy=0),n>2&&(v.vz=0))}}function y(x){return x.initialize&&x.initialize(e,p,n),x}return g(),i={tick:A,restart:function(){return h.restart(m),i},stop:function(){return h.stop(),i},numDimensions:function(x){return arguments.length?(n=Math.min(tre,Math.max(1,Math.round(x))),d.forEach(y),i):n},nodes:function(x){return arguments.length?(e=x,g(),d.forEach(y),i):e},alpha:function(x){return arguments.length?(a=+x,i):a},alphaMin:function(x){return arguments.length?(o=+x,i):o},alphaDecay:function(x){return arguments.length?(l=+x,i):+l},alphaTarget:function(x){return arguments.length?(c=+x,i):c},velocityDecay:function(x){return arguments.length?(u=1-x,i):1-u},randomSource:function(x){return arguments.length?(p=x,d.forEach(y),i):p},force:function(x,b){return arguments.length>1?(b==null?d.delete(x):d.set(x,y(b)),i):d.get(x)},find:function(){var x=Array.prototype.slice.call(arguments),b=x.shift()||0,v=(n>1?x.shift():null)||0,j=(n>2?x.shift():null)||0,_=x.shift()||1/0,C=0,N=e.length,S,E,O,B,T,F;for(_*=_,C=0;C<N;++C)T=e[C],S=b-T.x,E=v-(T.y||0),O=j-(T.z||0),B=S*S+E*E+O*O,B<_&&(F=T,_=B);return F},on:function(x,b){return arguments.length>1?(f.on(x,b),i):f.on(x)}}}function u3t(){var e,r,n,i,a,o=Ih(-30),l,c=1,u=1/0,d=.81;function h(A){var g,y=e.length,x=(r===1?P1e(e,GF):r===2?F1e(e,GF,rre):r===3?L1e(e,GF,rre,a3t):null).visitAfter(p);for(a=A,g=0;g<y;++g)n=e[g],x.visit(m)}function f(){if(e){var A,g=e.length,y;for(l=new Array(g),A=0;A<g;++A)y=e[A],l[y.index]=+o(y,A,e)}}function p(A){var g=0,y,x,b=0,v,j,_,C,N=A.length;if(N){for(v=j=_=C=0;C<N;++C)(y=A[C])&&(x=Math.abs(y.value))&&(g+=y.value,b+=x,v+=x*(y.x||0),j+=x*(y.y||0),_+=x*(y.z||0));g*=Math.sqrt(4/N),A.x=v/b,r>1&&(A.y=j/b),r>2&&(A.z=_/b)}else{y=A,y.x=y.data.x,r>1&&(y.y=y.data.y),r>2&&(y.z=y.data.z);do g+=l[y.data.index];while(y=y.next)}A.value=g}function m(A,g,y,x,b){if(!A.value)return!0;var v=[y,x,b][r-1],j=A.x-n.x,_=r>1?A.y-n.y:0,C=r>2?A.z-n.z:0,N=v-g,S=j*j+_*_+C*C;if(N*N/d<S)return S<u&&(j===0&&(j=wh(i),S+=j*j),r>1&&_===0&&(_=wh(i),S+=_*_),r>2&&C===0&&(C=wh(i),S+=C*C),S<c&&(S=Math.sqrt(c*S)),n.vx+=j*A.value*a/S,r>1&&(n.vy+=_*A.value*a/S),r>2&&(n.vz+=C*A.value*a/S)),!0;if(A.length||S>=u)return;(A.data!==n||A.next)&&(j===0&&(j=wh(i),S+=j*j),r>1&&_===0&&(_=wh(i),S+=_*_),r>2&&C===0&&(C=wh(i),S+=C*C),S<c&&(S=Math.sqrt(c*S)));do A.data!==n&&(N=l[A.data.index]*a/S,n.vx+=j*N,r>1&&(n.vy+=_*N),r>2&&(n.vz+=C*N));while(A=A.next)}return h.initialize=function(A,...g){e=A,i=g.find(y=>typeof y=="function")||Math.random,r=g.find(y=>[1,2,3].includes(y))||2,f()},h.strength=function(A){return arguments.length?(o=typeof A=="function"?A:Ih(+A),f(),h):o},h.distanceMin=function(A){return arguments.length?(c=A*A,h):Math.sqrt(c)},h.distanceMax=function(A){return arguments.length?(u=A*A,h):Math.sqrt(u)},h.theta=function(A){return arguments.length?(d=A*A,h):Math.sqrt(d)},h}function d3t(e,r,n,i){var a,o,l=Ih(.1),c,u;typeof e!="function"&&(e=Ih(+e)),r==null&&(r=0),n==null&&(n=0),i==null&&(i=0);function d(f){for(var p=0,m=a.length;p<m;++p){var A=a[p],g=A.x-r||1e-6,y=(A.y||0)-n||1e-6,x=(A.z||0)-i||1e-6,b=Math.sqrt(g*g+y*y+x*x),v=(u[p]-b)*c[p]*f/b;A.vx+=g*v,o>1&&(A.vy+=y*v),o>2&&(A.vz+=x*v)}}function h(){if(a){var f,p=a.length;for(c=new Array(p),u=new Array(p),f=0;f<p;++f)u[f]=+e(a[f],f,a),c[f]=isNaN(u[f])?0:+l(a[f],f,a)}}return d.initialize=function(f,...p){a=f,o=p.find(m=>[1,2,3].includes(m))||2,h()},d.strength=function(f){return arguments.length?(l=typeof f=="function"?f:Ih(+f),h(),d):l},d.radius=function(f){return arguments.length?(e=typeof f=="function"?f:Ih(+f),h(),d):e},d.x=function(f){return arguments.length?(r=+f,d):r},d.y=function(f){return arguments.length?(n=+f,d):n},d.z=function(f){return arguments.length?(i=+f,d):i},d}const{abs:z1,cos:fh,sin:Qx,acos:h3t,atan2:U1,sqrt:Hf,pow:uc}=Math;function $1(e){return e<0?-uc(-e,1/3):uc(e,1/3)}const R1e=Math.PI,lS=2*R1e,Vf=R1e/2,f3t=1e-6,XF=Number.MAX_SAFE_INTEGER||9007199254740991,YF=Number.MIN_SAFE_INTEGER||-9007199254740991,m3t={x:0,y:0,z:0},xt={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.1216
31567047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,r){const n=r(e);let i=n.x*n.x+n.y*n.y;return typeof n.z<"u"&&(i+=n.z*n.z),Hf(i)},compute:function(e,r,n){if(e===0)return r[0].t=0,r[0];const i=r.length-1;if(e===1)return r[i].t=1,r[i];const a=1-e;let o=r;if(i===0)return r[0].t=e,r[0];if(i===1){const c={x:a*o[0].x+e*o[1].x,y:a*o[0].y+e*o[1].y,t:e};return n&&(c.z=a*o[0].z+e*o[1].z),c}if(i<4){let c=a*a,u=e*e,d,h,f,p=0;i===2?(o=[o[0],o[1],o[2],m3t],d=c,h=a*e*2,f=u):i===3&&(d=c*a,h=c*e*3,f=a*u*3,p=e*u);const m={x:d*o[0].x+h*o[1].x+f*o[2].x+p*o[3].x,y:d*o[0].y+h*o[1].y+f*o[2].y+p*o[3].y,t:e};return n&&(m.z=d*o[0].z+h*o[1].z+f*o[2].z+p*o[3].z),m}const l=JSON.parse(JSON.stringify(r));for(;l.length>1;){for(let c=0;c<l.length-1;c++)l[c]={x:l[c].x+(l[c+1].x-l[c].x)*e,y:l[c].y+(l[c+1].y-l[c].y)*e},typeof l[c].z<"u"&&(l[c].z=l[c].z+(l[c+1].z-l[c].z)*e);l.splice(l.length-1,1)}return l[0].t=e,l[0]},computeWithRatios:function(e,r,n,i){const a=1-e,o=n,l=r;let c=o[0],u=o[1],d=o[2],h=o[3],f;if(c*=a,u*=e,l.length===2)return f=c+u,{x:(c*l[0].x+u*l[1].x)/f,y:(c*l[0].y+u*l[1].y)/f,z:i?(c*l[0].z+u*l[1].z)/f:!1,t:e};if(c*=a,u*=2*a,d*=e*e,l.length===3)return f=c+u+d,{x:(c*l[0].x+u*l[1].x+d*l[2].x)/f,y:(c*l[0].y+u*l[1].y+d*l[2].y)/f,z:i?(c*l[0].z+u*l[1].z+d*l[2].z)/f:!1,t:e};if(c*=a,u*=1.5*a,d*=3*a,h*=e*e*e,l.length===4)return f=c+u+d+h,{x:(c*l[0].x+u*l[1].x+d*l[2].x+h*l[3].x)/f,y:(c*l[0].y+u*l[1].y+d*l[2].y+h*l[3].y)/f,z:i?(c*l[0].z+u*l[1].z+d*l[2].z+h*l[3].z)/f:!1,t:e}},derive:function(e,r){const n=[];for(let i=e,a=i.length,o=a-1;a>1;a--,o--){const l=[];for(let c=0,u;c<o;c++)u={x:o*(i[c+1].x-i[c].x),y:o*(i[c+1].y-i[c].y)},r&&(u.z=o*(i[c+1].z-i[c].z)),l.push(u);n.push(l),i=l}return n},between:function(e,r,n){return r<=e&&e<=n||xt.approximately(e,r)||xt.approximately(e,n)},approximately:function(e,r,n){return z1(e-r)<=(n||f3t)},length:function(e){const n=xt.Tvalues.length;let i=0;for(let a=0,o;a<n;a++)o=.5*xt.Tvalues[a]+.5,i+=xt.Cvalues[a]*xt.arcfn(o,e);return .5*i},map:function(e,r,n,i,a){const o=n-r,l=a-i,c=e-r,u=c/o;return i+l*u},lerp:function(e,r,n){const i={x:r.x+e*(n.x-r.x),y:r.y+e*(n.y-r.y)};return r.z!==void 0&&n.z!==void 0&&(i.z=r.z+e*(n.z-r.z)),i},pointToString:function(e){let r=e.x+"/"+e.y;return typeof e.z<"u"&&(r+="/"+e.z),r},pointsToString:function(e){return"["+e.map(xt.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,r,n){const i=r.x-e.x,a=r.y-e.y,o=n.x-e.x,l=n.y-e.y,c=i*l-a*o,u=i*o+a*l;return U1(c,u)},round:function(e,r){const n=""+e,i=n.indexOf(".");return parseFloat(n.substring(0,i+1+r))},dist:function(e,r){const n=e.x-r.x,i=e.y-r.y;return Hf(n*n+i*i)},closest:function(e,r){let n=uc(2,63),i,a;return e.forEach(function(o,l){a=xt.dist(r,o),a<n&&(n=a,i=l)}),{mdist:n,mpos:i}},abcratio:function(e,r){if(r!==2&&r!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const n=uc(e,r)+uc(1-e,r),i=n-1;return z1(i/n)},projectionratio:function(e,r){if(r!==2&&r!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const n=uc(1-e,r),i=uc(e,r)+n;return n/i},lli8:function(e,r,n,i,a,o,l,c){const u=(e*i-r*n)*(a-l)-(e-n)*(a*c-o*l),d=(e*i-r*n)*(o-c)-(r-i)*(a*c-o*l),h=(e-n)*(o-c)-(r-i)*(a-l);return h==0?!1:{x:u/h,y:d/h}},lli4:function(e,r,n,i){const a=e.x,o=e.y,l=r.x,c=r.y,u=n.x,d=n.y,h=i.x,f=i.y;return xt.lli8(a,o,l,c,u,d,h,f)},lli:function(e,r){return xt.lli4(e,e.c,r,r.c)},makeline:function(e,r){return new ji(e.x,e.y,(e.x+r.x)/2,(e.y+r.y)/2,r.x,r.y)},findbbox:function(e){let r=XF,n=XF,i=YF,a=YF;return e.forEach(function(o){const l=o.bbox();r>l.x.min&&(r=l.x.min),n>l.y.min&&(n=l.y.min),i<l.x.max&&(i=l.x.max),a<l.y.max&&(a=l.y.max)}),{x:{min:r,mid:(r+i)/2,max:i,size:i-r},y:{min:n,mid:(n+a)/2,max:a,size:a-n}}},shapeintersections:function(e,r,n,i,a){if(!xt.bboxoverlap(r,i))return[];const o=[],l=[e.startcap,e.forward,e.back,e.endcap],c=[n.startcap,n.forward,n.back,n.endcap];
vendor: 10,830 bytes, line 3156
3156return l.forEach(function(u){u.virtual||c.forEach(function(d){if(d.virtual)return;const h=u.intersects(d,a);h.length>0&&(h.c1=u,h.c2=d,h.s1=e,h.s2=n,o.push(h))})}),o},makeshape:function(e,r,n){const i=r.points.length,a=e.points.length,o=xt.makeline(r.points[i-1],e.points[0]),l=xt.makeline(e.points[a-1],r.points[0]),c={startcap:o,forward:e,back:r,endcap:l,bbox:xt.findbbox([o,e,r,l])};return c.intersections=function(u){return xt.shapeintersections(c,c.bbox,u,u.bbox,n)},c},getminmax:function(e,r,n){if(!n)return{min:0,max:0};let i=XF,a=YF,o,l;n.indexOf(0)===-1&&(n=[0].concat(n)),n.indexOf(1)===-1&&n.push(1);for(let c=0,u=n.length;c<u;c++)o=n[c],l=e.get(o),l[r]<i&&(i=l[r]),l[r]>a&&(a=l[r]);return{min:i,mid:(i+a)/2,max:a,size:a-i}},align:function(e,r){const n=r.p1.x,i=r.p1.y,a=-U1(r.p2.y-i,r.p2.x-n),o=function(l){return{x:(l.x-n)*fh(a)-(l.y-i)*Qx(a),y:(l.x-n)*Qx(a)+(l.y-i)*fh(a)}};return e.map(o)},roots:function(e,r){r=r||{p1:{x:0,y:0},p2:{x:1,y:0}};const n=e.length-1,i=xt.align(e,r),a=function(N){return 0<=N&&N<=1};if(n===2){const N=i[0].y,S=i[1].y,E=i[2].y,O=N-2*S+E;if(O!==0){const B=-Hf(S*S-N*E),T=-N+S,F=-(B+T)/O,I=-(-B+T)/O;return[F,I].filter(a)}else if(S!==E&&O===0)return[(2*S-E)/(2*S-2*E)].filter(a);return[]}const o=i[0].y,l=i[1].y,c=i[2].y,u=i[3].y;let d=-o+3*l-3*c+u,h=3*o-6*l+3*c,f=-3*o+3*l,p=o;if(xt.approximately(d,0)){if(xt.approximately(h,0))return xt.approximately(f,0)?[]:[-p/f].filter(a);const N=Hf(f*f-4*h*p),S=2*h;return[(N-f)/S,(-f-N)/S].filter(a)}h/=d,f/=d,p/=d;const m=(3*f-h*h)/3,A=m/3,g=(2*h*h*h-9*h*f+27*p)/27,y=g/2,x=y*y+A*A*A;let b,v,j,_,C;if(x<0){const N=-m/3,S=N*N*N,E=Hf(S),O=-g/(2*E),B=O<-1?-1:O>1?1:O,T=h3t(B),F=$1(E),I=2*F;return j=I*fh(T/3)-h/3,_=I*fh((T+lS)/3)-h/3,C=I*fh((T+2*lS)/3)-h/3,[j,_,C].filter(a)}else{if(x===0)return b=y<0?$1(-y):-$1(y),j=2*b-h/3,_=-b-h/3,[j,_].filter(a);{const N=Hf(x);return b=$1(-y+N),v=$1(y+N),[b-v-h/3].filter(a)}}},droots:function(e){if(e.length===3){const r=e[0],n=e[1],i=e[2],a=r-2*n+i;if(a!==0){const o=-Hf(n*n-r*i),l=-r+n,c=-(o+l)/a,u=-(-o+l)/a;return[c,u]}else if(n!==i&&a===0)return[(2*n-i)/(2*(n-i))];return[]}if(e.length===2){const r=e[0],n=e[1];return r!==n?[r/(r-n)]:[]}return[]},curvature:function(e,r,n,i,a){let o,l,c,u,d=0,h=0;const f=xt.compute(e,r),p=xt.compute(e,n),m=f.x*f.x+f.y*f.y;if(i?(o=Hf(uc(f.y*p.z-p.y*f.z,2)+uc(f.z*p.x-p.z*f.x,2)+uc(f.x*p.y-p.x*f.y,2)),l=uc(m+f.z*f.z,3/2)):(o=f.x*p.y-f.y*p.x,l=uc(m,3/2)),o===0||l===0)return{k:0,r:0};if(d=o/l,h=l/o,!a){const A=xt.curvature(e-.001,r,n,i,!0).k,g=xt.curvature(e+.001,r,n,i,!0).k;u=(g-d+(d-A))/2,c=(z1(g-d)+z1(d-A))/2}return{k:d,r:h,dk:u,adk:c}},inflections:function(e){if(e.length<4)return[];const r=xt.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=r[2].x*r[1].y,i=r[3].x*r[1].y,a=r[1].x*r[2].y,o=r[3].x*r[2].y,l=18*(-3*n+2*i+3*a-o),c=18*(3*n-i-3*a),u=18*(a-n);if(xt.approximately(l,0)){if(!xt.approximately(c,0)){let p=-u/c;if(0<=p&&p<=1)return[p]}return[]}const d=2*l;if(xt.approximately(d,0))return[];const h=c*c-4*l*u;if(h<0)return[];const f=Math.sqrt(h);return[(f-c)/d,-(c+f)/d].filter(function(p){return 0<=p&&p<=1})},bboxoverlap:function(e,r){const n=["x","y"],i=n.length;for(let a=0,o,l,c,u;a<i;a++)if(o=n[a],l=e[o].mid,c=r[o].mid,u=(e[o].size+r[o].size)/2,z1(l-c)>=u)return!1;return!0},expandbox:function(e,r){r.x.min<e.x.min&&(e.x.min=r.x.min),r.y.min<e.y.min&&(e.y.min=r.y.min),r.z&&r.z.min<e.z.min&&(e.z.min=r.z.min),r.x.max>e.x.max&&(e.x.max=r.x.max),r.y.max>e.y.max&&(e.y.max=r.y.max),r.z&&r.z.max>e.z.max&&(e.z.max=r.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,r,n){const i=e.bbox(),a=r.bbox(),o=1e5,l=n||.5;if(i.x.size+i.y.size<l&&a.x.size+a.y.size<l)return[(o*(e._t1+e._t2)/2|0)/o+"/"+(o*(r._t1+r._t2)/2|0)/o];let c=e.split(.5),u=r.split(.5),d=[{left:c.left,right:u.left},{left:c.left,right:u.right},{left:c.right,right:u.right},{left:c.right,right:u.left}];d=d.filter(function(f){return xt.bboxoverlap(f.left.bbox(),f.right.bbox())});let h=[];return d.length===0||(d.forEach(function(f){h=h.concat(xt.pairiteration(f.left,f.right,l))}),h=h.filter(function(f,p){return h.indexOf(f)===p})),h},getccenter:function(e,r,n){const i=r.x-e.x,a=r.y-e.y,o=n.x-r.x,l=n.y-r.y,c=i*fh(Vf)-a*Qx(Vf),u=i*Qx(Vf)+a*fh(Vf),d=o*fh(Vf)-l*Qx(Vf),h=o*Qx(Vf)+l*fh(Vf),f=(e.x+r.x)/2,p=(e.y+r.y)/2,m=(r.x+n.x)/2,A=(r.y+n.y)/2,g=f+c,y=p+u,x=m+d,b=A+h,v=xt.lli8(f,p,g,y,m,A,x,b),j=xt.dist(v,e);let _=U1(e.y-v.y,e.x-v.x),C=U1(r.y-v.y,r.x-v.x),N=U1(n.y-v.y,n.x-v.x),S;return _<N?((_>C||C>N)&&(_+=lS),_>N&&(S=N,N=_,_=S)):N<C&&C<_?(S=N,N=_,_=S):N+=lS,v.s=_,v.e=N,v.r=j,v},numberSort:function(e,r){return e-r}};class e2{constructor(r){this.curves=[],this._3d=!1,r&&(this.curves=r,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(r){return xt.pointsToString(r.points)}).join(", ")+"]"}addCurve(r){this.curves.push(r),this._3d=this._3d||r._3d}length(){return this.curves.map(function(r){return r.length()}).reduce(function(r,n){return r+n})}curve(r){return this.curves[r]}bbox(){const r=this.curves;for(var n=r[0].bbox(),i=1;i<r.length;i++)xt.expandbox(n,r[i].bbox());return n}offset(r){const n=[];return this.curves.forEach(function(i){n.push(...i.offset(r))}),new e2(n)}}const{abs:Q1,min:nre,max:ire,cos:p3t,sin:A3t,acos:g3t,sqrt:H1}=Math,x3t=Math.PI;class ji{constructor(r){let n=r&&r.forEach?r:Array.from(arguments).slice(),i=!1;if(typeof n[0]=="object"){i=n.length;const m=[];n.forEach(function(A){["x","y","z"].forEach(function(g){typeof A[g]<"u"&&m.push(A[g])})}),n=m}let a=!1;const o=n.length;if(i){if(i>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");a=!0}}else if(o!==6&&o!==8&&o!==9&&o!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const l=this._3d=!a&&(o===9||o===12)||r&&r[0]&&typeof r[0].z<"u",c=this.points=[];for(let m=0,A=l?3:2;m<o;m+=A){var u={x:n[m],y:n[m+1]};l&&(u.z=n[m+2]),c.push(u)}const d=this.order=c.length-1,h=this.dims=["x","y"];l&&h.push("z"),this.dimlen=h.length;const f=xt.align(c,{p1:c[0],p2:c[d]}),p=xt.dist(c[0],c[d]);this._linear=f.reduce((m,A)=>m+Q1(A.y),0)<p/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(r,n,i,a){if(typeof a>"u"&&(a=.5),a===0)return new ji(n,n,i);if(a===1)return new ji(r,n,n);const o=ji.getABC(2,r,n,i,a);return new ji(r,o.A,i)}static cubicFromPoints(r,n,i,a,o){typeof a>"u"&&(a=.5);const l=ji.getABC(3,r,n,i,a);typeof o>"u"&&(o=xt.dist(n,l.C));const c=o*(1-a)/a,u=xt.dist(r,i),d=(i.x-r.x)/u,h=(i.y-r.y)/u,f=o*d,p=o*h,m=c*d,A=c*h,g={x:n.x-f,y:n.y-p},y={x:n.x+m,y:n.y+A},x=l.A,b={x:x.x+(g.x-x.x)/(1-a),y:x.y+(g.y-x.y)/(1-a)},v={x:x.x+(y.x-x.x)/a,y:x.y+(y.y-x.y)/a},j={x:r.x+(b.x-r.x)/a,y:r.y+(b.y-r.y)/a},_={x:i.x+(v.x-i.x)/(1-a),y:i.y+(v.y-i.y)/(1-a)};return new ji(r,j,_,i)}static getUtils(){return xt}getUtils(){return ji.getUtils()}static get PolyBezier(){return e2}valueOf(){return this.toString()}toString(){return xt.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const r=this.points,n=r[0].x,i=r[0].y,a=["M",n,i,this.order===2?"Q":"C"];for(let o=1,l=r.length;o<l;o++)a.push(r[o].x),a.push(r[o].y);return a.join(" ")}setRatios(r){if(r.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=r,this._lut=[]}verify(){const r=this.coordDigest();r!==this._print&&(this._print=r,this.update())}coordDigest(){return this.points.map(function(r,n){return""+n+r.x+r.y+(r.z?r.z:0)}).join("")}update(){this._lut=[],this.dpoints=xt.derive(this.points,this._3d),this.computedirection()}computedirection(){const r=this.points,n=xt.angle(r[0],r[this.order],r[1]);this.clockwise=n>0}length(){return xt.length(this.derivative.bind(this))}static getABC(r=2,n,i,a,o=.5){const l=xt.projectionratio(o,r),c=1-l,u={x:l*n.x+c*a.x,y:l*n.y+c*a.y},d=xt.abcratio(o,r);return{A:{x:i.x+(i.x-u.x)/d,y:i.y+(i.y-u.y)/d},B:i,C:u,S:n,E:a}}getABC(r,n){n=n||this.get(r);let i=this.points[0],a=this.points[this.order];return ji.getABC(this.order,i,n,a,r)}getLUT(r){if(this.verify(),r=r||100,this._lut.length===r+1)return this._lut;this._lut=[],r++,this._lut=[];for(let n=0,i,a;n<r;n++)a=n/(r-1),i=this.compute(a),i.t=a,this._lut.push(i);return this._lut}on(r,n){n=n||5;const i=this.getLUT(),a=[];for(let o=0,l,c=0;o<i.length;o++)l=i[o],xt.dist(l,r)<n&&(a.push(l),c+=o/i.length);return a.length?t/=a.length:!1}project(r){const n=this.getLUT(),i=n.length-1,a=xt.closest(n,r),o=a.mpos,l=(o-1)/i,c=(o+1)/i,u=.1/i;let d=a.mdist,h=l,f=h,p;d+=1;for(let m;h<c+u;h+=u)p=this.compute(h),m=xt.dist(r,p),m<d&&(d=m,f=h);return f=f<0?0:f>1?1:f,p=this.compute(f),p.t=f,p.d=d,p}get(r){return this.compute(r)}point(r){return this.points[r]}compute(r){return this.ratios?xt.computeWithRatios(r,this.points,this.ratios,this._3d):xt.compute(r,this.points,this._3d,this.ratios)}raise(){const r=this.points,n=[r[0]],i=r.length;for(let a=1,o,l;a<i;a++)o=r[a],l=r[a-1],n[a]={x:(i-a)/i*o.x+a/i*l.x,y:(i-a)/i*o.y+a/i*l.y};return n[i]=r[i-1],new ji(n)}derivative(r){return xt.compute(r,this.dpoints[0],this._3d)}dderivative(r){return xt.compute(r,this.dpoints[1],this._3d)}align(){let r=this.points;return new ji(xt.align(r,{p1:r[0],p2:r[r.length-1]}))}curvature(r){return xt.curvature(r,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return xt.inflections(this.points)}normal(r){return this._3d?this.__normal3(r):this.__normal2(r)}__normal2(r){const n=this.derivative(r),i=H1(n.x*n.x+n.y*n.y);return{t:r,x:-n.y/i,y:n.x/i}}__normal3(r){const n=this.derivative(r),i=this.derivative(r+.01),a=H1(n.x*n.x+n.y*n.y+n.z*n.z),o=H1(i.x*i.x+i.y*i.y+i.z*i.z);n.x/=a,n.y/=a,n.z/=a,i.x/=o,i.y/=o,i.z/=o;const l={x:i.y*n.z-i.z*n.y,y:i.z*n.x-i.x*n.z,z:i.x*n.y-i.y*n.x},c=H1(l.x*l.x+l.y*l.y+l.z*l.z);l.x/=c,l.y/=c,l.z/=c;const u=[l.x*l.x,l.x*l.y-l.z,l.x*l.z+l.y,l.x*l.y+l.z,l.y*l.y,l.y*l.z-l.x,l.x*l.z-l.y,l.y*l.z+l.x,l.z*l.z];return{t:r,x:u[0]*n.x+u[1]*n.y+u[2]*n.z,y:u[3]*n.x+u[4]*n.y+u[5]*n.z,z:u[6]*n.x+u[7]*n.y+u[8]*n.z}}hull(r){let n=this.points,i=[],a=[],o=0;for(a[o++]=n[0],a[o++]=n[1],a[o++]=n[2],this.order===3&&(a[o++]=n[3]);n.length>1;){i=[];for(let l=0,c,u=n.length-1;l<u;l++)c=xt.lerp(r,n[l],n[l+1]),a[o++]=c,i.push(c);n=i}return a}split(r,n){if(r===0&&n)return this.split(n).left;if(n===1)return this.split(r).right;const i=this.hull(r),a={left:this.order===2?new ji([i[0],i[3],i[5]]):new ji([i[0],i[4],i[7],i[9]]),right:this.order===2?new ji([i[5],i[4],i[2]]):new ji([i[9],i[8],i[6],i[3]]),span:i};return a.left._t1=xt.map(0,0,1,this._t1,this._t2),a.left._t2=xt.map(r,0,1,this._t1,this._t2),a.right._t1=xt.map(r,0,1,this._t1,this._t2),a.right._t2=xt.map(1,0,1,this._t1,this._t2),n?(n=xt.map(n,r,1,0,1),a.right.split(n).left):a}extrema(){const r={};let n=[];
vendor: 4,699 bytes, line 3156
3156return this.dims.forEach((function(i){let a=function(l){return l[i]},o=this.dpoints[0].map(a);r[i]=xt.droots(o),this.order===3&&(o=this.dpoints[1].map(a),r[i]=r[i].concat(xt.droots(o))),r[i]=r[i].filter(function(l){return l>=0&&l<=1}),n=n.concat(r[i].sort(xt.numberSort))}).bind(this)),r.values=n.sort(xt.numberSort).filter(function(i,a){return n.indexOf(i)===a}),r}bbox(){const r=this.extrema(),n={};return this.dims.forEach((function(i){n[i]=xt.getminmax(this,i,r[i])}).bind(this)),n}overlaps(r){const n=this.bbox(),i=r.bbox();return xt.bboxoverlap(n,i)}offset(r,n){if(typeof n<"u"){const i=this.get(r),a=this.normal(r),o={c:i,n:a,x:i.x+a.x*n,y:i.y+a.y*n};return this._3d&&(o.z=i.z+a.z*n),o}if(this._linear){const i=this.normal(0),a=this.points.map(function(o){const l={x:o.x+r*i.x,y:o.y+r*i.y};return o.z&&i.z&&(l.z=o.z+r*i.z),l});return[new ji(a)]}return this.reduce().map(function(i){return i._linear?i.offset(r)[0]:i.scale(r)})}simple(){if(this.order===3){const a=xt.angle(this.points[0],this.points[3],this.points[1]),o=xt.angle(this.points[0],this.points[3],this.points[2]);if(a>0&&o<0||a<0&&o>0)return!1}const r=this.normal(0),n=this.normal(1);let i=r.x*n.x+r.y*n.y;return this._3d&&(i+=r.z*n.z),Q1(g3t(i))<x3t/3}reduce(){let r,n=0,i=0,a=.01,o,l=[],c=[],u=this.extrema().values;for(u.indexOf(0)===-1&&(u=[0].concat(u)),u.indexOf(1)===-1&&u.push(1),n=u[0],r=1;r<u.length;r++)i=u[r],o=this.split(n,i),o._t1=n,o._t2=i,l.push(o),n=i;return l.forEach(function(d){for(n=0,i=0;i<=1;)for(i=n+a;i<=1+a;i+=a)if(o=d.split(n,i),!o.simple()){if(i-=a,Q1(n-i)<a)return[];o=d.split(n,i),o._t1=xt.map(n,0,1,d._t1,d._t2),o._t2=xt.map(i,0,1,d._t1,d._t2),c.push(o),n=i;break}n<1&&(o=d.split(n,1),o._t1=xt.map(n,0,1,d._t1,d._t2),o._t2=d._t2,c.push(o))}),c}translate(r,n,i){i=typeof i=="number"?i:n;const a=this.order;let o=this.points.map((l,c)=>(1-c/a)*n+c/a*i);return new ji(this.points.map((l,c)=>({x:l.x+r.x*o[c],y:l.y+r.y*o[c]})))}scale(r){const n=this.order;let i=!1;if(typeof r=="function"&&(i=r),i&&n===2)return this.raise().scale(i);const a=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):r,i?i(1):r);const l=i?i(0):r,c=i?i(1):r,u=[this.offset(0,10),this.offset(1,10)],d=[],h=xt.lli4(u[0],u[0].c,u[1],u[1].c);if(!h)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(f){const p=d[f*n]=xt.copy(o[f*n]);p.x+=(f?c:l)*u[f].n.x,p.y+=(f?c:l)*u[f].n.y}),i?([0,1].forEach(function(f){if(!(n===2&&f)){var p=o[f+1],m={x:p.x-h.x,y:p.y-h.y},A=i?i((f+1)/n):r;i&&!a&&(A=-A);var g=H1(m.x*m.x+m.y*m.y);m.x/=g,m.y/=g,d[f+1]={x:p.x+A*m.x,y:p.y+A*m.y}}}),new ji(d)):([0,1].forEach(f=>{if(n===2&&f)return;const p=d[f*n],m=this.derivative(f),A={x:p.x+m.x,y:p.y+m.y};d[f+1]=xt.lli4(p,A,h,o[f+1])}),new ji(d))}outline(r,n,i,a){if(n=n===void 0?r:n,this._linear){const _=this.normal(0),C=this.points[0],N=this.points[this.points.length-1];let S,E,O;i===void 0&&(i=r,a=n),S={x:C.x+_.x*r,y:C.y+_.y*r},O={x:N.x+_.x*i,y:N.y+_.y*i},E={x:(S.x+O.x)/2,y:(S.y+O.y)/2};const B=[S,E,O];S={x:C.x-_.x*n,y:C.y-_.y*n},O={x:N.x-_.x*a,y:N.y-_.y*a},E={x:(S.x+O.x)/2,y:(S.y+O.y)/2};const T=[O,E,S],F=xt.makeline(T[2],B[0]),I=xt.makeline(B[2],T[0]),D=[F,new ji(B),I,new ji(T)];return new e2(D)}const o=this.reduce(),l=o.length,c=[];let u=[],d,h=0,f=this.length();const p=typeof i<"u"&&typeof a<"u";function m(_,C,N,S,E){return function(O){const B=S/N,T=(S+E)/N,F=C-_;return xt.map(O,0,1,_+B*F,_+T*F)}}o.forEach(function(_){const C=_.length();p?(c.push(_.scale(m(r,i,f,h,C))),u.push(_.scale(m(-n,-a,f,h,C)))):(c.push(_.scale(r)),u.push(_.scale(-n))),h+=C}),u=u.map(function(_){return d=_.points,d[3]?_.points=[d[3],d[2],d[1],d[0]]:_.points=[d[2],d[1],d[0]],_}).reverse();const A=c[0].points[0],g=c[l-1].points[c[l-1].points.length-1],y=u[l-1].points[u[l-1].points.length-1],x=u[0].points[0],b=xt.makeline(y,A),v=xt.makeline(g,x),j=[b].concat(c).concat([v]).concat(u);return new e2(j)}outlineshapes(r,n,i){n=n||r;const a=this.outline(r,n).curves,o=[];for(let l=1,c=a.length;l<c/2;l++){const u=xt.makeshape(a[l],a[c-l],i);u.startcap.virtual=l>1,u.endcap.virtual=l<c/2-1,o.push(u)}return o}intersects(r,n){return r?r.p1&&r.p2?this.lineIntersects(r):(r instanceof ji&&(r=r.reduce()),this.curveintersects(this.reduce(),r,n)):this.selfintersects(n)}lineIntersects(r){const n=nre(r.p1.x,r.p2.x),i=nre(r.p1.y,r.p2.y),a=ire(r.p1.x,r.p2.x),o=ire(r.p1.y,r.p2.y);return xt.roots(this.points,r).filter(l=>{var c=this.get(l);return xt.between(c.x,n,a)&&xt.between(c.y,i,o)})}selfintersects(r){const n=this.reduce(),i=n.length-2,a=[];for(let o=0,l,c,u;o<i;o++)c=n.slice(o,o+1),u=n.slice(o+2),l=this.curveintersects(c,u,r),a.push(...l);return a}curveintersects(r,n,i){const a=[];
3156r.forEach(function(l){n.forEach(function(c){l.overlaps(c)&&a.push({left:l,right:c})})});let o=[];return a.forEach(function(l){const c=xt.pairiteration(l.left,l.right,i);c.length>0&&(o=o.concat(c))}),o}arcs(r){return r=r||.5,this._iterate(r,[])}_error(r,n,i,a){const o=(a-i)/4,l=this.get(i+o),c=this.get(a-o),u=xt.dist(r,n),d=xt.dist(r,l),h=xt.dist(r,c);return Q1(d-u)+Q1(h-u)}_iterate(r,n){let i=0,a=1,o;do{o=0,a=1;let l=this.get(i),c,u,d,h,f=!1,p=!1,m,A=a,g=1;do if(p=f,h=d,A=(i+a)/2,c=this.get(A),u=this.get(a),d=xt.getccenter(l,c,u),d.interval={start:i,end:a},f=this._error(d,l,i,a)<=r,m=p&&!f,m||(g=a),f){if(a>=1){if(d.interval.end=g=1,h=d,a>1){let x={x:d.x+d.r*p3t(d.e),y:d.y+d.r*A3t(d.e)};d.e+=xt.angle({x:d.x,y:d.y},x,this.get(1))}break}a=a+(a-i)/2}else a=A;while(!m&&o++<100);if(o>=100)break;h=h||d,n.push(h),i=g}while(a<1);return n}}function Hz(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=Array(r);n<r;n++)i[n]=e[n];return i}function y3t(e){if(Array.isArray(e))return e}function v3t(e){if(Array.isArray(e))return Hz(e)}function b3t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function w3t(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function j3t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3157In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _3t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3158In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C3t(e,r){if(e==null)return{};var n,i,a=N3t(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],r.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function N3t(e,r){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(r.includes(i))continue;n[i]=e[i]}return n}function S3t(e,r){return y3t(e)||w3t(e,r)||D1e(e,r)||j3t()}function k3t(e){return v3t(e)||b3t(e)||D1e(e)||_3t()}function E3t(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function B3t(e){var r=E3t(e,"string");return typeof r=="symbol"?r:r+""}function D1e(e,r){if(e){if(typeof e=="string")return Hz(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hz(e,r):void 0}}var T3t=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=(r instanceof Array?r.length?r:[void 0]:[r]).map(function(c){return{keyAccessor:c,isProp:!(c instanceof Function)}}),o=e.reduce(function(c,u){var d=c,h=u;return a.forEach(function(f,p){var m=f.keyAccessor,A=f.isProp,g;if(A){var y=h,x=y[m],b=C3t(y,[m].map(B3t));g=x,h=b}else g=m(h,p);p+1<a.length?(d.hasOwnProperty(g)||(d[g]={}),d=d[g]):n?(d.hasOwnProperty(g)||(d[g]=[]),d[g].push(h)):d[g]=h}),c},{});n instanceof Function&&function c(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;d===a.length?Object.keys(u).forEach(function(h){return u[h]=n(u[h])}):Object.values(u).forEach(function(h){return c(h,d+1)})}(o);var l=o;return i&&(l=[],function c(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];d.length===a.length?l.push({keys:d,vals:u}):Object.entries(u).forEach(function(h){var f=S3t(h,2),p=f[0],m=f[1];return c(m,[].concat(k3t(d),[p]))})}(o),r instanceof Array&&r.length===0&&l.length===1&&(l[0].keys=[])),l};function P3t(e){for(var r=e.length/6|0,n=new Array(r),i=0;i<r;)n[i]="#"+e.slice(i*6,++i*6);return n}const I3t=P3t("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function F3t(e,r){r===void 0&&(r={});var n=r.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",n==="top"&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var O3t=`.force-graph-container canvas {
3159  display: block;
3160  user-select: none;
3161  outline: none;
3162  -webkit-tap-highlight-color: transparent;
3163}
3164
3165.force-graph-container .clickable {
3166  cursor: pointer;
3167}
3168
3169.force-graph-container .grabbable {
3170  cursor: move;
3171  cursor: grab;
3172  cursor: -moz-grab;
3173  cursor: -webkit-grab;
3174}
3175
3176.force-graph-container .grabbable:active {
3177  cursor: grabbing;
3178  cursor: -moz-grabbing;
3179  cursor: -webkit-grabbing;
3180}
3181`;F3t(O3t);function Vz(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=Array(r);n<r;n++)i[n]=e[n];return i}function L3t(e){if(Array.isArray(e))return e}function R3t(e){if(Array.isArray(e))return Vz(e)}function are(e,r,n){if(M1e())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,r);var a=new(e.bind.apply(e,i));return a}function Kj(e,r,n){return(r=Q3t(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function M1e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M1e=function(){return!!e})()}function D3t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function M3t(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;
3181!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function z3t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3182In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U3t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3183In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sre(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function Hx(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?sre(Object(n),!0).forEach(function(i){Kj(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sre(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function t2(e,r){return L3t(e)||M3t(e,r)||z1e(e,r)||z3t()}function bc(e){return R3t(e)||D3t(e)||z1e(e)||U3t()}function $3t(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Q3t(e){var r=$3t(e,"string");return typeof r=="symbol"?r:r+""}function Wz(e){"@babel/helpers - typeof";return Wz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wz(e)}function z1e(e,r){if(e){if(typeof e=="string")return Vz(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vz(e,r):void 0}}var H3t=bT(I3t);function ore(e,r,n){!r||typeof n!="string"||e.filter(function(i){return!i[n]}).forEach(function(i){i[n]=H3t(r(i))})}function V3t(e,r){var n=e.nodes,i=e.links,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.nodeFilter,l=o===void 0?function(){return!0}:o,c=a.onLoopError,u=c===void 0?function(m){throw"Invalid DAG structure! Found cycle in node path: ".concat(m.join(" -> "),".")}:c,d={};n.forEach(function(m){return d[r(m)]={data:m,out:[],depth:-1,skip:!l(m)}}
3183),i.forEach(function(m){var A=m.source,g=m.target,y=j(A),x=j(g);if(!d.hasOwnProperty(y))throw"Missing source node with id: ".concat(y);if(!d.hasOwnProperty(x))throw"Missing target node with id: ".concat(x);var b=d[y],v=d[x];b.out.push(v);function j(_){return Wz(_)==="object"?r(_):_}});var h=[];p(Object.values(d));var f=Object.assign.apply(Object,[{}].concat(bc(Object.entries(d).filter(function(m){var A=t2(m,2),g=A[1];return!g.skip}).map(function(m){var A=t2(m,2),g=A[0],y=A[1];return Kj({},g,y.depth)}))));return f;function p(m){for(var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,y=function(){var j=m[x];if(A.indexOf(j)!==-1){var _=[].concat(bc(A.slice(A.indexOf(j))),[j]).map(function(C){return r(C.data)});return h.some(function(C){return C.length===_.length&&C.every(function(N,S){return N===_[S]})})||(h.push(_),u(_)),1}g>j.depth&&(j.depth=g,p(j.out,[].concat(bc(A),[j]),g+(j.skip?0:1)))},x=0,b=m.length;x<b;x++)y()}}var W3t=2,Vs=function(r,n){return n.onNeedsRedraw&&n.onNeedsRedraw()},lre=function(r,n){if(!n.isShadow){var i=Ln(n.linkDirectionalParticles);n.graphData.links.forEach(function(a){var o=Math.round(Math.abs(i(a)));o?a.__photons=bc(Array(o)).map(function(){return{}}):delete a.__photons})}},vB=q7({props:{graphData:{default:{nodes:[],links:[]},onChange:function(r,n){n.engineRunning=!1,lre(r,n)}},dagMode:{onChange:function(r,n){!r&&(n.graphData.nodes||[]).forEach(function(i){return i.fx=i.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(r){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Vs},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Vs},nodeColor:{default:"color",triggerUpdate:!1,onChange:Vs},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Vs},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Vs},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Vs},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Vs},linkColor:{default:"color",triggerUpdate:!1,onChange:Vs},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Vs},linkWidth:{default:1,triggerUpdate:!1,onChange:Vs},linkCurvature:{default:0,triggerUpdate:!1,onChange:Vs},linkCanvasObject:{triggerUpdate:!1,onChange:Vs},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Vs},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Vs},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Vs},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Vs},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:lre},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.alphaDecay(r)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.alphaTarget(r)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.velocityDecay(r)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(r,n,i){return i===void 0?r.forceLayout.force(n):(r.forceLayout.force(n,i),this)},d3ReheatSimulation:function(r){return r.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(r){return r.cntTicks=0,r.startTickTime=new Date,r.engineRunning=!0,this},isEngineRunning:function(r){return!!r.engineRunning},tickFrame:function(r){return!r.isShadow&&n(),a(),!r.isShadow&&o(),!r.isShadow&&l(),i(),this;function n(){r.engineRunning&&(++r.cntTicks>r.cooldownTicks||new Date-r.startTickTime>r.cooldownTime||r.d3AlphaMin>0&&r.forceLayout.alpha()<r.d3AlphaMin?(r.engineRunning=!1,r.onEngineStop()):(r.forceLayout.tick(),r.onEngineTick()))}
3183function i(){var c=Ln(r.nodeVisibility),u=Ln(r.nodeVal),d=Ln(r.nodeColor),h=Ln(r.nodeCanvasObjectMode),f=r.ctx,p=r.isShadow/r.globalScale,m=r.graphData.nodes.filter(c);f.save(),m.forEach(function(A){var g=h(A);if(r.nodeCanvasObject&&(g==="before"||g==="replace")&&(r.nodeCanvasObject(A,f,r.globalScale),g==="replace")){f.restore();return}var y=Math.sqrt(Math.max(0,u(A)||1))*r.nodeRelSize+p;f.beginPath(),f.arc(A.x,A.y,y,0,2*Math.PI,!1),f.fillStyle=d(A)||"rgba(31, 120, 180, 0.92)",f.fill(),r.nodeCanvasObject&&g==="after"&&r.nodeCanvasObject(A,r.ctx,r.globalScale)}),f.restore()}function a(){var c=Ln(r.linkVisibility),u=Ln(r.linkColor),d=Ln(r.linkWidth),h=Ln(r.linkLineDash),f=Ln(r.linkCurvature),p=Ln(r.linkCanvasObjectMode),m=r.ctx,A=r.isShadow*2,g=r.graphData.links.filter(c);g.forEach(C);var y=[],x=[],b=g;if(r.linkCanvasObject){var v=[],j=[];g.forEach(function(N){return({before:y,after:x,replace:v}[p(N)]||j).push(N)}),b=[].concat(bc(y),x,j),y=y.concat(v)}m.save(),y.forEach(function(N){return r.linkCanvasObject(N,m,r.globalScale)}),m.restore();var _=T3t(b,[u,d,h]);m.save(),Object.entries(_).forEach(function(N){var S=t2(N,2),E=S[0],O=S[1],B=!E||E==="undefined"?"rgba(0,0,0,0.15)":E;Object.entries(O).forEach(function(T){var F=t2(T,2),I=F[0],D=F[1],L=(I||1)/r.globalScale+A;Object.entries(D).forEach(function(V){var U=t2(V,2);U[0];var Q=U[1],$=h(Q[0]);m.beginPath(),Q.forEach(function(q){var M=q.source,z=q.target;if(!(!M||!z||!M.hasOwnProperty("x")||!z.hasOwnProperty("x"))){m.moveTo(M.x,M.y);var K=q.__controlPoints;K?m[K.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(m,bc(K).concat([z.x,z.y])):m.lineTo(z.x,z.y)}}),m.strokeStyle=B,m.lineWidth=L,m.setLineDash($||[]),m.stroke()})})}),m.restore(),m.save(),x.forEach(function(N){return r.linkCanvasObject(N,m,r.globalScale)}),m.restore();function C(N){var S=f(N);if(!S){N.__controlPoints=null;return}var E=N.source,O=N.target;if(!(!E||!O||!E.hasOwnProperty("x")||!O.hasOwnProperty("x"))){var B=Math.sqrt(Math.pow(O.x-E.x,2)+Math.pow(O.y-E.y,2));if(B>0){var T=Math.atan2(O.y-E.y,O.x-E.x),F=B*S,I={x:(E.x+O.x)/2+F*Math.cos(T-Math.PI/2),y:(E.y+O.y)/2+F*Math.sin(T-Math.PI/2)};N.__controlPoints=[I.x,I.y]}else{var D=S*70;N.__controlPoints=[O.x,O.y-D,O.x+D,O.y]}}}}function o(){var c=1.6,u=.2,d=Ln(r.linkDirectionalArrowLength),h=Ln(r.linkDirectionalArrowRelPos),f=Ln(r.linkVisibility),p=Ln(r.linkDirectionalArrowColor||r.linkColor),m=Ln(r.no
3183deVal),A=r.ctx;A.save(),r.graphData.links.filter(f).forEach(function(g){var y=d(g);if(!(!y||y<0)){var x=g.source,b=g.target;if(!(!x||!b||!x.hasOwnProperty("x")||!b.hasOwnProperty("x"))){var v=Math.sqrt(Math.max(0,m(x)||1))*r.nodeRelSize,j=Math.sqrt(Math.max(0,m(b)||1))*r.nodeRelSize,_=Math.min(1,Math.max(0,h(g))),C=p(g)||"rgba(0,0,0,0.28)",N=y/c/2,S=g.__controlPoints&&are(ji,[x.x,x.y].concat(bc(g.__controlPoints),[b.x,b.y])),E=S?function(L){return S.get(L)}:function(L){return{x:x.x+(b.x-x.x)*L||0,y:x.y+(b.y-x.y)*L||0}},O=S?S.length():Math.sqrt(Math.pow(b.x-x.x,2)+Math.pow(b.y-x.y,2)),B=v+y+(O-v-j-y)*_,T=E(B/O),F=E((B-y)/O),I=E((B-y*(1-u))/O),D=Math.atan2(T.y-F.y,T.x-F.x)-Math.PI/2;A.beginPath(),A.moveTo(T.x,T.y),A.lineTo(F.x+N*Math.cos(D),F.y+N*Math.sin(D)),A.lineTo(I.x,I.y),A.lineTo(F.x-N*Math.cos(D),F.y-N*Math.sin(D)),A.fillStyle=C,A.fill()}}}),A.restore()}function l(){var c=Ln(r.linkDirectionalParticles),u=Ln(r.linkDirectionalParticleSpeed),d=Ln(r.linkDirectionalParticleOffset),h=Ln(r.linkDirectionalParticleWidth),f=Ln(r.linkVisibility),p=Ln(r.linkDirectionalParticleColor||r.linkColor),m=r.ctx;m.save(),r.graphData.links.filter(f).forEach(function(A){var g=c(A);if(!(!A.hasOwnProperty("__photons")||!A.__photons.length)){var y=A.source,x=A.target;if(!(!y||!x||!y.hasOwnProperty("x")||!x.hasOwnProperty("x"))){var b=u(A),v=Math.abs(d(A)),j=A.__photons||[],_=Math.max(0,h(A)/2)/Math.sqrt(r.globalScale),C=p(A)||"rgba(0,0,0,0.28)";m.fillStyle=C;var N=A.__controlPoints?are(ji,[y.x,y.y].concat(bc(A.__controlPoints),[x.x,x.y])):null,S=0,E=!1;j.forEach(function(O){var B=!!O.__singleHop;if(O.hasOwnProperty("__progressRatio")||(O.__progressRatio=B?b<0?1:0:(S+v)/g),!B&&S++,O.__progressRatio+=b,O.__progressRatio>=1||O.__progressRatio<0)if(!B)O.__progressRatio=O.__progressRatio%1,O.__progressRatio<0&&O.__progressRatio++;else{E=!0;return}var T=O.__progressRatio,F=N?N.get(T):{x:y.x+(x.x-y.x)*T||0,y:y.y+(x.y-y.y)*T||0};r.linkDirectionalParticleCanvasObject?r.linkDirectionalParticleCanvasObject(F.x,F.y,A,m,r.globalScale):(m.beginPath(),m.arc(F.x,F.y,_,0,2*Math.PI,!1),m.fill())}),E&&(A.__photons=A.__photons.filter(function(O){return!O.__singleHop||O.__progressRatio<=1&&O.__progressRatio>=0}))}}}),m.restore()}},emitParticle:function(r,n){return n&&(!n.__photons&&(n.__photons=[]),n.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:c3t().force("link",t3t()).force("charge",u3t()).force("center",nTt()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(r,n){n.ctx=r},update:function(r,n){r.engineRunning=!1,r.onUpdate(),r.nodeAutoColorBy!==null&&ore(r.graphData.nodes,Ln(r.nodeAutoColorBy),r.nodeColor),r.linkAutoColorBy!==null&&ore(r.graphData.links,Ln(r.linkAutoColorBy),r.linkColor),r.graphData.links.forEach(function(p){p.source=p[r.linkSource],p.target=p[r.linkTarget]}),r.forceLayout.stop().alpha(1).nodes(r.graphData.nodes);var i=r.forceLayout.force("link");i&&i.id(function(p){return p[r.nodeId]}).links(r.graphData.links);var a=r.dagMode&&V3t(r.graphData,function(p){return p[r.nodeId]},{nodeFilter:r.dagNodeFilter,onLoopError:r.onDagError||void 0}),o=Math.max.apply(Math,bc(Object.values(a||[]))),l=r.dagLevelDistance||r.graphData.nodes.length/(o||1)*W3t*(["radialin","radialout"].indexOf(r.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(n.dagMode)){var c=["lr","rl"].includes(n.dagMode)?"fx":"fy";r.graphData.nodes.filter(r.dagNodeFilter).forEach(function(p){return delete p[c]})}if(["lr","rl","td","bu"].includes(r.dagMode)){var u=["rl","bu"].includes(r.dagMode),d=function(m){return(a[m[r.nodeId]]-o/2)*l*(u?-1:1)},h=["lr","rl"].includes(r.dagMode)?"fx":"fy";r.graphData.nodes.filter(r.dagNodeFilter).forEach(function(p){return p[h]=d(p)})}r.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(r.dagMode)!==-1?d3t(function(p){var m=a[p[r.nodeId]]||-1;return(r.dagMode==="radialin"?o-m:m)*l}).strength(function(p){return r.dagNodeFilter(p)?1:0}):null);for(var f=0;f<r.warmupTicks&&!(r.d3AlphaMin>0&&r.forceLayout.alpha()<r.d3AlphaMin);f++)r.forceLayout.tick();this.resetCountdown(),r.onFinishUpdate()}});function U1e(e,r){var n=e instanceof Array?e:[e],i=new r;return i._destructor&&i._destructor(),{linkProp:function(o){return{default:i[o](),onChange:function(c,u){n.forEac
vendor: 4,283 bytes, line 3183
3183h(function(d){return u[d][o](c)})},triggerUpdate:!1}},linkMethod:function(o){return function(l){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];var h=[];return n.forEach(function(f){var p=l[f],m=p[o].apply(p,u);m!==p&&h.push(m)}),h.length?h[0]:this}}}}var q3t=800,K3t=4,G3t=5,$1e=U1e("forceGraph",vB),X3t=U1e(["forceGraph","shadowGraph"],vB),Y3t=Object.assign.apply(Object,bc(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return Kj({},e,$1e.linkProp(e))})).concat(bc(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return Kj({},e,X3t.linkProp(e))})))),J3t=Object.assign.apply(Object,bc(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return Kj({},e,$1e.linkMethod(e))})));function JF(e){if(e.canvas){var r=e.canvas.width,n=e.canvas.height;r===300&&n===150&&(r=n=0);var i=window.devicePixelRatio;r/=i,n/=i,[e.canvas,e.shadowCanvas].forEach(function(o){o.style.width="".concat(e.width,"px"),o.style.height="".concat(e.height,"px"),o.width=e.width*i,o.height=e.height*i,!r&&!n&&o.getContext("2d").scale(i,i)});var a=id(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-r)/2/a,(e.height-n)/2/a),e.needsRedraw=!0}}function Q1e(e){var r=window.devicePixelRatio;e.setTransform(r,0,0,r,0,0)}function cre(e,r,n){e.save(),Q1e(e),e.clearRect(0,0,r,n),e.restore()}var Z3t=q7({props:Hx({width:{default:window.innerWidth,onChange:function(r,n){return JF(n)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(r,n){return JF(n)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(r,n){[r.nodes,r.links].every(function(a){return(a||[]).every(function(o){return!o.hasOwnProperty("__indexColor")})})&&n.colorTracker.reset(),[{type:"Node",objs:r.nodes},{type:"Link",objs:r.links}].forEach(i),n.forceGraph.graphData(r),n.shadowGraph.graphData(r);function i(a){var o=a.type,l=a.objs;l.filter(function(c){if(!c.hasOwnProperty("__indexColor"))return!0;var u=n.colorTracker.lookup(c.__indexColor);return!u||!u.hasOwnProperty("d")||u.d!==c}).forEach(function(c){c.__indexColor=n.colorTracker.register({type:o,d:c})})}},triggerUpdate:!1},backgroundColor:{onChange:function(r,n){n.canvas&&r&&(n.canvas.style.background=r)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(r,n){n.shadowGraph.nodeCanvasObject(r?function(i,a,o){return r(i,i.__indexColor,a,o)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(r,n){n.shadowGraph.linkCanvasObject(r?function(i,a,o){return r(i,i.__indexColor,a,o)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(r,n){n.zoom.scaleExtent([r,n.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(r,n){n.zoom.scaleExtent([n.zoom.scaleExtent()[0],r])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(r,n){n.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1}
3183,onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},Y3t),aliases:{stopAnimation:"pauseAnimation"},methods:Hx({graph2ScreenCoords:function(r,n,i){var a=id(r.canvas);return{x:n*a.k+a.x,y:i*a.k+a.y}},screen2GraphCoords:function(r,n,i){var a=id(r.canvas);return{x:(n-a.x)/a.k,y:(i-a.y)/a.k}},centerAt:function(r,n,i,a){if(!r.canvas)return null;if(n!==void 0||i!==void 0){var o=Object.assign({},n!==void 0?{x:n}:{},i!==void 0?{y:i}:{});return a?r.tweenGroup.add(new Ite(l()).to(o,a).easing(ig.Quadratic.Out).onUpdate(c).onComplete(function(){r.tweenGroup.remove(this)}).start()):c(o),this}return l();function l(){var u=id(r.canvas);return{x:(r.width/2-u.x)/u.k,y:(r.height/2-u.y)/u.k}}function c(u){var d=u.x,h=u.y;r.zoom.translateTo(r.zoom.__baseElem,d===void 0?l().x:d,h===void 0?l().y:h),r.needsRedraw=!0}},zoom:function(r,n,i){if(!r.canvas)return null;if(n!==void 0)return i?r.tweenGroup.add(new Ite({k:a()}).to({k:n},i).easing(ig.Quadratic.Out).onUpdate(function(l){var c=l.k;return o(c)}).onComplete(function(){r.tweenGroup.remove(this)}).start()):o(n),this;return a();function a(){return id(r.canvas).k}function o(l){r.zoom.scaleTo(r.zoom.__baseElem,l),r.needsRedraw=!0}},zoomToFit:function(r){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length,o=new Array(a>3?a-3:0),l=3;l<a;l++)o[l-3]=arguments[l];var c=this.getGraphBbox.apply(this,o);if(c){var u={x:(c.x[0]+c.x[1])/2,y:(c.y[0]+c.y[1])/2},d=Math.max(1e-12,Math.min(1e12,(r.width-i*2)/(c.x[1]-c.x[0]),(r.height-i*2)/(c.y[1]-c.y[0])));this.centerAt(u.x,u.y,n),this.zoom(d,n)}return this},getGraphBbox:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},i=Ln(r.nodeVal),a=function(c){return Math.sqrt(Math.max(0,i(c)||1))*r.nodeRelSize},o=r.graphData.nodes.filter(n).map(function(l){return{x:l.x,y:l.y,r:a(l)}});return o.length?{x:[l5(o,function(l){return l.x-l.r}),o5(o,function(l){return l.x+l.r})],y:[l5(o,function(l){return l.y-l.r}),o5(o,function(l){return l.y+l.r})]}:null},pauseAnimation:function(r){return r.animationFrameRequestId&&(cancelAnimationFrame(r.animationFrameRequestId),r.animationFrameRequestId=null),this},resumeAnimation:function(r){return r.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},J3t),stateInit:function(){return{lastSetZoom:1,zoom:fBt(),forceGraph:new vB,shadowGraph:new vB().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new F4t,tweenGroup:new m1e}},init:function(r,n){var i=this;r.innerHTML="";var a=document.createElement("div");a.classList.add("force-graph-container"),a.style.position="relative",r.appendChild(a),n.canvas=document.createElement("canvas"),n.backgroundColor&&(n.canvas.style.background=n.backgroundColor),a.appendChild(n.canvas),n.shadowCanvas=document.createElement("canvas");var o=n.canvas.getContext("2d"),l=n.shadowCanvas.getContext("2d",{willReadFrequently:!0}),c={x:-1e12,y:-1e12},u=function(){var f=null,p=window.devicePixelRatio,m=c.x>0&&c.y>0?l.getImageData(c.x*p,c.y*p,1,1):null;return m&&(f=n.colorTracker.lookup(m.data)),f};vc(n.canvas).call(GEt().subject(function(){if(!n.enableNodeDrag)return null;var h=u();return h&&h.type==="Node"?h.d:null}).on("start",function(h){var f=h.subject;f.__initialDragPos={x:f.x,y:f.y,fx:f.fx,fy:f.fy},h.active||(f.fx=f.x,f.fy=f.y),n.canvas.classList.add("grabbable")}).on("drag",function(h){var f=h.subject,p=f.__initialDragPos,m=h,A=id(n.canvas).k,g={x:p.x+(m.x-p.x)/A-f.x,y:p.y+(m.y-p.y)/A-f.y};["x","y"].forEach(function(y){return f["f".concat(y)]=f[y]=p[y]+(m[y]-p[y])/A}),!(!f.__dragged&&G3t>=Math.sqrt(Xit(["x","y"].map(function(y){return Math.pow(h[y]-p[y],2)}))))&&(n.forceGraph.d3AlphaTarget(.3).resetCountdown(),n.isPointerDragging=!0,f.__dragged=!0,n.onNodeDrag(f,g))}).on("end",function(h){var f=h.subject,p=f.__initialDragPos,m={x:f.x-p.x,y:f.y-p.y};p.fx===void 0&&(f.fx=void 0),p.fy===void 0&&(f.fy=void 0),delete f.__initialDragPos,n.forceGraph.d3AlphaTarget()&&n.forceGraph.d3AlphaTarget(0).resetCountdown(),n.canvas.classList.remove("grabbable"),n.isPointerDragging=!1,f.__dragged&&(delete f.__dragged,n.onNodeDragEnd(f,m))})),n.zoom(n.zoom.__baseElem=vc(n.canvas)),n.zoom.__baseElem.on("dblclick.zoom",null),n.zoom.filter(function(h){return!h.button&&n.enableZoomPanInteraction&&(h.type!=="wheel"||Ln(n.enableZoomInteraction)(h))&&(h.type==="wheel"||Ln(n.enablePanInteraction)(h))}).on("zoom",function(h){var f=h.transform;[o,l].forEach(function(p){Q1e(p),p.translate(f.x,f.y),p.scale(f.k,f.k)}),n.isPointerDragging=!0,n.onZoom&&n.onZoom(Hx(Hx({},f),i.centerAt())),n.needsRedraw=!0}).on("end",function(h){n.isPointerDragging=!1,n.onZoomEnd&&n.onZoomEnd(Hx(Hx({},h.transform),i.centerAt()))}),JF(n),n.forceGraph.onNeedsRedraw(function(){return n.needsRedraw=!0}).onFinishUpdate(function(){id(n.canvas).k===n.lastSetZoom&&n.graphData.nodes.length&&(n.zoom.scaleTo(n.zoom.__baseElem,n.lastSetZoom=K3t/Math.cbrt(n.graphData.nodes.length)),n.needsRedraw=!0)}),n.tooltip=new rTt(a),["pointermove","pointerdown"].forEach(function(h){return a.addEventListener(h,function(f){h==="pointerdown"&&(n.isPointerPressed=!0,n.pointerDownEvent=f),!n.isPointerDragging&&f.type==="pointermove"&&n.onBackgroun
3183dClick&&(f.pressure>0||n.isPointerPressed)&&(f.pointerType==="mouse"||f.movementX===void 0||[f.movementX,f.movementY].some(function(A){return Math.abs(A)>1}))&&(n.isPointerDragging=!0);var p=m(a);c.x=f.pageX-p.left,c.y=f.pageY-p.top;function m(A){var g=A.getBoundingClientRect(),y=window.pageXOffset||document.documentElement.scrollLeft,x=window.pageYOffset||document.documentElement.scrollTop;return{top:g.top+x,left:g.left+y}}},{passive:!0})}),a.addEventListener("pointerup",function(h){if(n.isPointerPressed){if(n.isPointerPressed=!1,n.isPointerDragging){n.isPointerDragging=!1;return}var f=[h,n.pointerDownEvent];requestAnimationFrame(function(){if(h.button===0)if(n.hoverObj){var p=n["on".concat(n.hoverObj.type,"Click")];p&&p.apply(void 0,[n.hoverObj.d].concat(f))}else n.onBackgroundClick&&n.onBackgroundClick.apply(n,f);if(h.button===2)if(n.hoverObj){var m=n["on".concat(n.hoverObj.type,"RightClick")];m&&m.apply(void 0,[n.hoverObj.d].concat(f))}else n.onBackgroundRightClick&&n.onBackgroundRightClick.apply(n,f)})}},{passive:!0}),a.addEventListener("contextmenu",function(h){return!n.onBackgroundRightClick&&!n.onNodeRightClick&&!n.onLinkRightClick?!0:(h.preventDefault(),!1)}),n.forceGraph(o),n.shadowGraph(l);var d=zBt(function(){cre(l,n.width,n.height),n.shadowGraph.linkWidth(function(f){return Ln(n.linkWidth)(f)+n.linkHoverPrecision});var h=id(n.canvas);n.shadowGraph.globalScale(h.k).tickFrame()},q3t);n.flushShadowCanvas=d.flush,(this._animationCycle=function h(){var f=!n.autoPauseRedraw||!!n.needsRedraw||n.forceGraph.isEngineRunning()||n.graphData.links.some(function(v){return v.__photons&&v.__photons.length});if(n.needsRedraw=!1,n.enablePointerInteraction){var p=n.isPointerDragging?null:u();if(p!==n.hoverObj){var m=n.hoverObj,A=m?m.type:null,g=p?p.type:null;if(A&&A!==g){var y=n["on".concat(A,"Hover")];y&&y(null,m.d)}if(g){var x=n["on".concat(g,"Hover")];x&&x(p.d,A===g?m.d:null)}n.tooltip.content(p&&Ln(n["".concat(p.type.toLowerCase(),"Label")])(p.d)||null),n.canvas.classList[(p&&n["on".concat(g,"Click")]||!p&&n.onBackgroundClick)&&Ln(n.showPointerCursor)(p==null?void 0:p.d)?"add":"remove"]("clickable"),n.hoverObj=p}f&&d()}if(f){cre(o,n.width,n.height);var b=id(n.canvas).k;n.onRenderFramePre&&n.onRenderFramePre(o,b),n.forceGraph.globalScale(b).tickFrame(),n.onRenderFramePost&&n.onRenderFramePost(o,b)}n.tweenGroup.update(),n.animationFrameRequestId=requestAnimationFrame(h)})()},update:function(r){}});const w3={width:_e.number,height:_e.number,graphData:_e.shape({nodes:_e.arrayOf(_e.object).isRequired,links:_e.arrayOf(_e.object).isRequired}),backgroundColor:_e.string,nodeRelSize:_e.number,nodeId:_e.string,nodeLabel:_e.oneOfType([_e.string,_e.func]),nodeVal:_e.oneOfType([_e.number,_e.string,_e.func]),nodeVisibility:_e.oneOfType([_e.bool,_e.string,_e.func]),nodeColor:_e.oneOfType([_e.string,_e.func]),nodeAutoColorBy:_e.oneOfType([_e.string,_e.func]),onNodeHover:_e.func,onNodeClick:_e.func,linkSource:_e.string,linkTarget:_e.string,linkLabel:_e.oneOfType([_e.string,_e.func]),linkVisibility:_e.oneOfType([_e.bool,_e.string,_e.func]),linkColor:_e.oneOfType([_e.string,_e.func]),linkAutoColorBy:_e.oneOfType([_e.string,_e.func]),linkWidth:_e.oneOfType([_e.number,_e.string,_e.func]),linkCurvature:_e.oneOfType([_e.number,_e.string,_e.func]),linkDirectionalArrowLength:_e.oneOfType([_e.number,_e.string,_e.func]),linkDirectionalArrowColor:_e.oneOfType([_e.string,_e.func]),linkDirectionalArrowRelPos:_e.oneOfType([_e.number,_e.string,_e.func]),linkDirectionalParticles:_e.oneOfType([_e.number,_e.string,_e.func]),linkDirectionalParticleSpeed:_e.oneOfType([_e.number,_e.string,_e.func]),linkDirectionalParticleOffset:_e.oneOfType([_e.number,_e.string,_e.func]),linkDirectionalParticleWidth:_e.oneOfType([_e.number,_e.string,_e.func]),linkDirectionalParticleColor:_e.oneOfType([_e.string,_e.func]),onLinkHover:_e.func,onLinkClick:_e.func,dagMode:_e.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:_e.number,dagNodeFilter:_e.func,onDagError:_e.func,d3AlphaMin:_e.number,d3AlphaDecay:_e.number,d3VelocityDecay:_e.number,warmupTicks:_e.number,cooldownTicks:_e.number,cooldownTime:_e.number,onEngineTick:_e.func,onEngineStop:_e.func,getGraphBbox:_e.func},H1e={zoomToFit:_e.func,onNodeRightClick:_e.func,onNodeDrag:_e.func,onNodeDragEnd:_e.func,onLinkRightClick:_e.func,linkHoverPrecision:_e.number,onBackgroun
3183dClick:_e.func,onBackgroundRightClick:_e.func,showPointerCursor:_e.oneOfType([_e.bool,_e.func]),enablePointerInteraction:_e.bool,enableNodeDrag:_e.bool},tH={showNavInfo:_e.bool,nodeOpacity:_e.number,nodeResolution:_e.number,nodeThreeObject:_e.oneOfType([_e.object,_e.string,_e.func]),nodeThreeObjectExtend:_e.oneOfType([_e.bool,_e.string,_e.func]),nodePositionUpdate:_e.func,linkOpacity:_e.number,linkResolution:_e.number,linkCurveRotation:_e.oneOfType([_e.number,_e.string,_e.func]),linkMaterial:_e.oneOfType([_e.object,_e.string,_e.func]),linkThreeObject:_e.oneOfType([_e.object,_e.string,_e.func]),linkThreeObjectExtend:_e.oneOfType([_e.bool,_e.string,_e.func]),linkPositionUpdate:_e.func,linkDirectionalArrowResolution:_e.number,linkDirectionalParticleResolution:_e.number,linkDirectionalParticleThreeObject:_e.oneOfType([_e.object,_e.string,_e.func]),forceEngine:_e.oneOf(["d3","ngraph"]),ngraphPhysics:_e.object,numDimensions:_e.oneOf([1,2,3])},ePt=Object.assign({},w3,H1e,{linkLineDash:_e.oneOfType([_e.arrayOf(_e.number),_e.string,_e.func]),nodeCanvasObjectMode:_e.oneOfType([_e.string,_e.func]),nodeCanvasObject:_e.func,nodePointerAreaPaint:_e.func,linkCanvasObjectMode:_e.oneOfType([_e.string,_e.func]),linkCanvasObject:_e.func,linkPointerAreaPaint:_e.func,linkDirectionalParticleCanvasObject:_e.func,autoPauseRedraw:_e.bool,minZoom:_e.number,maxZoom:_e.number,enableZoomInteraction:_e.oneOfType([_e.bool,_e.func]),enablePanInteraction:_e.oneOfType([_e.bool,_e.func]),onZoom:_e.func,onZoomEnd:_e.func,onRenderFramePre:_e.func,onRenderFramePost:_e.func});Object.assign({},w3,H1e,tH,{enableNavigationControls:_e.bool,controlType:_e.oneOf(["trackball","orbit","fly"]),rendererConfig:_e.object,extraRenderers:_e.arrayOf(_e.shape({render:_e.func.isRequired}))});Object.assign({},w3,tH,{nodeDesc:_e.oneOfType([_e.string,_e.func]),linkDesc:_e.oneOfType([_e.string,_e.func])});Object.assign({},w3,tH,{markerAttrs:_e.object,yOffset:_e.number,glScale:_e.number});const rH=okt(Z3t,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});rH.displayName="ForceGraph2D";rH.propTypes=ePt;const ure={glossary:"#3b82f6",course:"#10b981"};function tPt(){const{data:e,isLoading:r}=$St(),{lang:n}=Pt(),i=As(),a=w.useRef(null),o=w.useRef(null),[l,c]=w.useState(""),[u,d]=w.useState("all"),[h,f]=w.useState("all"),[p,m]=w.useState(null),[A,g]=w.useState({x:0,y:0}),[y,x]=w.useState({width:800,height:500});w.useEffect(()=>{const S=()=>{o.current&&x({width:o.current.clientWidth,height:Math.max(400,window.innerHeight-280)})};return S(),window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)},[]);const b=w.useMemo(()=>{if(!e)return[];const S=new Set(e.nodes.map(E=>E.category));return Array.from(S).sort()},[e]),v=w.useMemo(()=>{if(!e)return{nodes:[],links:[]};const S=l.toLowerCase(),E=e.nodes.filter(T=>!(u!=="all"&&T.type!==u||h!=="all"&&T.category!==h||l&&!T.label.toLowerCase().includes(S))),O=new Set(E.map(T=>T.id)),B=e.links.filter(T=>O.has(T.source)&&O.has(T.target));return{nodes:E,links:B}},[e,u,h,l]),j=w.useCallback(S=>{const E=e==null?void 0:e.nodes.find(O=>O.id===S.id);E&&i(E.url)},[e,i]),_=w.useCallback((S,E)=>{if(S){const O=e==null?void 0:e.nodes.find(B=>B.id===S.id);m(O||null),g({x:S.x||0,y:S.y||0})}else m(null)},[e]),C=w.useCallback((S,E)=>{const O=e==null?void 0:e.nodes.find(I=>I.id===S.id);if(!O)return;const B=4+Math.min(O.connections*1.5,12),T=ure[O.type]||"#888",F=l&&O.label.toLowerCase().includes(l.toLowerCase());E.beginPath(),E.arc(S.x,S.y,B,0,2*Math.PI),E.fillStyle=T,E.fill(),F&&(E.strokeStyle="#f59e0b",E.lineWidth=2,E.stroke()),(B>6||F)&&(E.font=`${Math.max(3,B*.7)}px sans-serif`,E.textAlign="center",E.fillStyle="#e2e8f0",E.fillText(O.label,S.x,S.y+B+5))},[e,l]),N=n==="ro";return s.jsx(Ft,{children:s.jsxs("div",{className:"container py-6",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("h1",{className:"text-2xl md:text-3xl font-heading font-bold text-foreground",children:"🧠 Knowledge Map"}),s.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:N?"Explorează vizual conexiunile între conceptele din glosar și cursuri":"Visually explore connections between glossary concepts and courses"})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[s.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-xs",children:[s.jsx(ul,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}
3183),s.jsx(qe,{value:l,onChange:S=>c(S.target.value),placeholder:N?"Caută concept...":"Search concept...",className:"pl-9 h-9"}),l&&s.jsx("button",{onClick:()=>c(""),className:"absolute right-2 top-1/2 -translate-y-1/2",children:s.jsx(Uc,{className:"h-4 w-4 text-muted-foreground"})})]}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx(me,{size:"sm",variant:u==="all"?"default":"outline",onClick:()=>d("all"),className:"h-8 text-xs",children:N?"Toate":"All"}),s.jsxs(me,{size:"sm",variant:u==="glossary"?"default":"outline",onClick:()=>d("glossary"),className:"h-8 text-xs gap-1",children:[s.jsx(yr,{className:"h-3 w-3"}),N?"Glosar":"Glossary"]}),s.jsxs(me,{size:"sm",variant:u==="course"?"default":"outline",onClick:()=>d("course"),className:"h-8 text-xs gap-1",children:[s.jsx(Rr,{className:"h-3 w-3"}),N?"Cursuri":"Courses"]})]}),s.jsxs("div",{className:"flex gap-1 ml-auto",children:[s.jsx(me,{size:"sm",variant:"outline",className:"h-8 w-8 p-0",onClick:()=>{var S;return(S=a.current)==null?void 0:S.zoomIn()},children:s.jsx(jke,{className:"h-4 w-4"})}),s.jsx(me,{size:"sm",variant:"outline",className:"h-8 w-8 p-0",onClick:()=>{var S;return(S=a.current)==null?void 0:S.zoomOut()},children:s.jsx(_ke,{className:"h-4 w-4"})})]})]}),b.length>0&&s.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-4",children:[s.jsx(at,{variant:h==="all"?"default":"outline",className:"cursor-pointer text-xs",onClick:()=>f("all"),children:N?"Toate categoriile":"All categories"}),b.map(S=>s.jsx(at,{variant:h===S?"default":"outline",className:"cursor-pointer text-xs capitalize",onClick:()=>f(S),children:S},S))]}),s.jsxs("div",{className:"flex gap-4 mb-4 text-xs text-muted-foreground",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-blue-500 inline-block"}),N?"Glosar":"Glossary",": ",v.nodes.filter(S=>S.type==="glossary").length]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500 inline-block"}),N?"Cursuri":"Courses",": ",v.nodes.filter(S=>S.type==="course").length]}),s.jsxs("span",{children:[N?"Conexiuni":"Links",": ",v.links.length]})]}),s.jsx("div",{ref:o,className:"relative rounded-xl border border-border bg-background overflow-hidden",children:r?s.jsx("div",{className:"flex items-center justify-center",style:{height:y.height},children:s.jsxs("div",{className:"text-center space-y-3",children:[s.jsx(Bo,{className:"h-8 w-48 mx-auto"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:N?"Se încarcă graful...":"Loading graph..."})]})}):s.jsxs(s.Fragment,{children:[s.jsx(rH,{ref:a,graphData:v,width:y.width,height:y.height,backgroundColor:"transparent",nodeCanvasObject:C,onNodeClick:j,onNodeHover:_,linkColor:()=>"rgba(148, 163, 184, 0.2)",linkWidth:.5,nodeRelSize:5,cooldownTicks:100,d3AlphaDecay:.02,d3VelocityDecay:.3,enableZoomInteraction:!0,enablePanInteraction:!0}),p&&s.jsxs("div",{className:"absolute top-4 left-4 z-10 max-w-xs bg-card border border-border rounded-lg p-3 shadow-lg pointer-events-none",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"w-2.5 h-2.5 rounded-full inline-block",style:{backgroundColor:ure[p.type]}}),s.jsx("span",{className:"font-semibold text-sm text-foreground",children:p.label})]}),s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:p.shortDef}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsx(at,{variant:"outline",className:"text-[10px] capitalize",children:p.category}),s.jsxs(at,{variant:"outline",className:"text-[10px]",children:[p.connections," ",N?"conexiuni":"links"]})]})]})]})}),s.jsx("p",{className:"text-xs text-muted-foreground mt-3 text-center",children:N?"Click pe un nod pentru a naviga. Zoom cu scroll. Drag pentru a muta.":"Click a node to navigate. Scroll to zoom. Drag to move."})]})})}const js={hidden:{opacity:0,y:24},visible:e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:[.25,.46,.45,.94]}})};function dre(){var g;const{lang:e,t:r}=Pt(),n=e==="en",[i,a]=w.useState(null),[o,l]=w.useState(!1),c=n?{hook:"EduWeb is Romania's first educational platform dedicated to Web3, blockchain, AI and emerging technologies.",section1:"We combine AI-powered content processing with rigorous editorial standards to deliver accurate, structured, and accessible information about the technologies shaping our future.",section2:"Through structured courses, gamified learning with EduCoins, and a comprehensive glossary, we make complex technologies accessible to everyone — from beginners to advanced professionals.",section3:"We are building an ecosystem where companies, experts and organizations can collaborate, share expertise, and contribute to a community connected to global technological developments.",closing:"Learn more on EduWeb"}:{hook:"EduWeb este prima platformă educațională din România dedicată Web3, blockchain, AI și tehnologiilor emergente.",section1:"Combinăm procesarea conținutului prin inteligență artificială cu standarde editoriale riguroase pentru a oferi informații precise, structurate și accesibile despre tehnologiile care ne modelează viitorul.",section2:"Prin cursuri structurate, învățare gamificată cu EduCoins și un glosar complet, facem tehnologiile complexe accesibile tuturor — de la începători la profesioniști avansați.",section3:"Construim un ecosistem în care companii, experți și organizații pot colabora, își pot împărtăși expertiza și pot contribui la o comunitate conectată la evoluțiile tehnologice globale.",closing:"Află mai multe pe EduWeb"},u=n?["","Our Platform","Learning Experience","The Ecosystem"]:["","Platforma Noastră","Experiența de Învățare","Ecosistemul"],d=async()=>
3183{l(!0);try{const y=`${c.hook} ${c.section1} ${c.section2} ${c.section3} ${c.closing}`,{data:x,error:b}=await G.functions.invoke("lesson-tts",{body:{text:y,lang:n?"en":"ro"}});if(b)throw b;x!=null&&x.audioUrl&&a(x.audioUrl)}catch(y){ft.error(n?"Could not generate audio":"Nu s-a putut genera audio-ul"),console.error("About video TTS error:",y)}finally{l(!1)}};Zr({title:n?"About EduWeb – Web3 & AI Education Platform":"Despre EduWeb – Platformă Educațională Web3 & AI",description:n?"EduWeb is Romania's first educational platform dedicated to Web3, blockchain, AI and emerging technologies. Founded in 2026 in Cluj-Napoca.":"EduWeb este prima platformă educațională din România dedicată Web3, blockchain, AI și tehnologiilor emergente. Fondată în 2026 în Cluj-Napoca."});const{data:h}=Xe({queryKey:["about-stats"],queryFn:async()=>{const[y,x,b]=await Promise.all([G.from("posts").select("id",{count:"exact",head:!0}).eq("status","published"),G.from("courses").select("id",{count:"exact",head:!0}).eq("is_published",!0),G.from("newsletter_subscribers").select("id",{count:"exact",head:!0}).eq("confirmed",!0).eq("unsubscribed",!1)]);return{articles:y.count||0,courses:x.count||0,subscribers:b.count||0}},staleTime:6e4}),{data:f}=Xe({queryKey:["founder-author"],queryFn:async()=>{const{data:y}=await G.from("authors").select("*").eq("first_name","Attila").eq("last_name","Kiraly").single();return y}});w.useEffect(()=>{const y=document.createElement("script");return y.type="application/ld+json",y.id="org-jsonld",y.textContent=JSON.stringify({"@context":"https://schema.org","@type":"Organization",name:"EduWeb",alternateName:"EduWeb Romania",url:"https://eduweb.ro",logo:"https://eduweb.ro/favicon.png",description:"Prima platformă educațională din România dedicată Web3, blockchain, AI și tehnologiilor emergente.",foundingDate:"2026",founder:{"@type":"Person",name:"Attila Kiraly",jobTitle:"Strateg AI & Educator",url:"https://eduweb.ro/autor/attila-kiraly-mm92zq2r"},address:{"@type":"PostalAddress",streetAddress:"Aleea Calin Nemes 1",addressLocality:"Cluj-Napoca",addressCountry:"RO"},contactPoint:{"@type":"ContactPoint",email:"[email protected]",telephone:"+40752110109",contactType:"customer service"},sameAs:["https://www.linkedin.com/in/attila-kiraly-seo/"]}),document.head.appendChild(y),()=>{var x;(x=document.getElementById("org-jsonld"))==null||x.remove()}},[]);const p=n?[{icon:op,title:"Aggregation",desc:"We monitor trusted international sources in real-time to deliver relevant and up-to-date information."},{icon:Mv,title:"AI Processing",desc:"Articles are synthesized, translated and structured by AI models trained for editorial accuracy."},{icon:Oi,title:"Editorial Review",desc:"Every piece is reviewed by our editorial team before publishing."},{icon:pi,title:"Trust Signals",desc:"Sources are linked, difficulty levels assigned, and content is structured for clarity."}]:[{icon:op,title:"Agregare",desc:"Monitorizăm surse internaționale de încredere în timp real pentru a oferi informații relevante și actualizateii relevante și actualizate."},{icon:Mv,title:"Procesare AI",desc:"Articolele sunt sintetizate, traduse și structurate de modele AI antrenate pentru acuratețe editorială."},{icon:Oi,title:"Revizuire Editorială",desc:"Fiecare material trece prin verificarea echipei editoriale înainte de publicare."},{icon:pi,title:"Semnale de Încredere",desc:"Sursele sunt linkuite, nivelurile de dificultate atribuite, iar conținutul este structurat pentru claritate."}],m=n?[{icon:Uv,title:"Accuracy",desc:"We prioritize factual, verified information over sensationalism."},{icon:yr,title:"Education",desc:"We make complex technologies accessible through structured learning paths."},{icon:Ag,title:"Innovation",desc:"We use AI responsibly to enhance content quality and accessibility."},{icon:Rn,title:"Community",desc:"We build tools that reward learning and foster a knowledge-driven community."}]:[{icon:Uv,title:"Acuratețe",desc:"Prioritizăm informația verificată și factuală, nu senzaționalismul."},{icon:yr,title:"Educație",desc:"Facem tehnologiile complexe accesibile prin parcursuri de învățare structurate."},{icon:Ag,title:"Inovație",desc:"Folosim AI responsabil pentru a îmbunătăți calitatea și accesibilitatea conținutului."},{icon:Rn,title:"Comunitate",desc:"Construim instrumente care recompensează învățarea și cultivă o comunitate bazată pe cunoaștere."}],A=n?[{q:"What is EduWeb?",a:"EduWeb is Romania's first educational platform dedicated to Web3, blockchain, AI and emerging technologies. We combine AI-powered content processing with rigorous editorial standards to deliver accurate, structured, and accessible information."},{q:"Who is EduWeb for?",a:"EduWeb is designed for anyone interested in understanding emerging technologies — from beginners exploring blockchain and AI for the first time, to professionals seeking in-depth analysis and structured courses."}
3183,{q:"How is EduWeb content created?",a:"Our content goes through a 4-step editorial pipeline: aggregation from trusted international sources, AI-powered processing and structuring, editorial review by our team, and enrichment with trust signals like source links and difficulty levels."},{q:"What are EduCoins?",a:"EduCoins are our gamification reward system. You earn them by completing courses, quizzes, daily logins, and other learning activities. They track your progress and can be used within the platform."},{q:"Is EduWeb free?",a:"Yes, most of our content — including news, analysis, glossary, and educational articles — is freely accessible. Some advanced academy courses may have premium options in the future."},{q:"How can companies join the EduWeb ecosystem?",a:"We are building an ecosystem where companies, experts, and organizations active in AI, blockchain, Web3, and digital marketing can actively participate and share their expertise. Contact us at [email protected] for partnership opportunities."}]:[{q:"Ce este EduWeb?",a:"EduWeb este prima platformă educațională din România dedicată Web3, blockchain, AI și tehnologiilor emergente. Combinăm procesarea conținutului prin AI cu standarde editoriale riguroase pentru a oferi informații precise, structurate și accesibile."},{q:"Cui se adresează EduWeb?",a:"EduWeb se adresează oricui este interesat de înțelegerea tehnologiilor emergente — de la începători care explorează blockchain și AI pentru prima dată, până la profesioniști care caută analize aprofundate și cursuri structurate."},{q:"Cum este creat conținutul EduWeb?",a:"Conținutul nostru trece printr-un proces editorial în 4 pași: agregare din surse internaționale de încredere, procesare și structurare prin AI, revizuire editorială de echipa noastră, și îmbogățire cu semnale de încredere precum link-uri către surse și niveluri de dificultate."},{q:"Ce sunt EduCoins?",a:"EduCoins sunt sistemul nostru de recompense gamificate. Le câștigi prin completarea cursurilor, quiz-urilor, login-uri zilnice și alte activități de învățare. Acestea urmăresc progresul tău și pot fi folosite în cadrul platformei."},{q:"EduWeb este gratuit?",a:"Da, cea mai mare parte a conținutului nostru — inclusiv știri, analize, glosar și articole educaționale — este liber accesibilă. Unele cursuri avansate din academie pot avea opțiuni premium în viitor."},{q:"Cum pot companiile să se alăture ecosistemului EduWeb?",a:"Construim un ecosistem în care companii, experți și organizații active în AI, blockchain, Web3 și marketing digital pot participa activ și își pot împărtăși expertiza. Contactează-ne la [email protected] pentru oportunități de parteneriat."}];return s.jsxs(Ft,{children:[s.jsxs("section",{className:"relative overflow-hidden border-b border-border",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-accent/5"}),s.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0)",backgroundSize:"32px 32px"}}),s.jsx("div",{className:"container relative py-20 md:py-28",children:s.jsxs(Le.div,{initial:"hidden",animate:"visible",variants:js,custom:0,className:"max-w-3xl",children:[s.jsxs("span",{className:"inline-flex items-center gap-2 text-xs font-mono uppercase tracking-widest text-primary mb-4",children:[s.jsx(oo,{size:14}),n?"About Us":"Despre Noi"]}),s.jsx("h1",{className:"font-heading text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight text-foreground mb-6",children:n?s.jsxs(s.Fragment,{children:["Building the ecosystem for the ",s.jsx("span",{className:"text-primary",children:"decentralized future"})]}):s.jsxs(s.Fragment,{children:["Construim ecosistemul pentru ",s.jsx("span",{className:"text-primary",children:"viitorul descentralizat"})]})}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground leading-relaxed max-w-2xl",children:n?"EduWeb is Romania's first educational platform dedicated to Web3, blockchain, AI and emerging technologies. We combine AI-powered content processing with rigorous editorial standards.":"EduWeb este prima platformă educațională din România dedicată Web3, blockchain, AI și tehnologiilor emergente. Combinăm procesarea conținutului prin AI cu standarde editoriale riguroase."})]})})]}),s.jsx("section",{className:"border-b border-border bg-muted/30",children:s.jsx("div",{className:"container py-12",children:s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8",children:[{value:(h==null?void 0:h.articles)||"—",label:n?"Published Articles":"Articole Publicate",icon:ZA},{value:(h==null?void 0:h.courses)||"—",label:n?"Academy Courses":"Cursuri Academy",icon:Rr},{value:(h==null?void 0:h.subscribers)||"—",label:n?"Newsletter Subscribers":"Abonați Newsletter",icon:Rn},{value:"2026",label:n?"Founded":"Fondat",icon:oo}].map((y,x)=>
3183s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:x,className:"text-center",children:[s.jsx(y.icon,{className:"h-5 w-5 mx-auto mb-2 text-primary"}),s.jsx("p",{className:"font-heading text-3xl md:text-4xl font-bold text-foreground",children:typeof y.value=="number"?y.value.toLocaleString():y.value}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:y.label})]},y.label))})})}),s.jsx("section",{className:"container py-16 md:py-24",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-12 md:gap-16",children:[s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:0,children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold mb-4 text-foreground",children:n?"Our Mission":"Misiunea Noastră"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:n?"We democratize access to knowledge about emerging technologies. In a space dominated by speculation and hype, EduWeb offers a structured, verified, and educational approach to blockchain, Web3, artificial intelligence, and digital transformation.":"Democratizăm accesul la cunoaștere despre tehnologiile emergente. Într-un spațiu dominat de speculație și hype, EduWeb oferă o abordare structurată, verificată și educativă a blockchain, Web3, inteligenței artificiale și transformării digitale."}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n?"We believe education is the foundation of responsible adoption. Every article, course, and glossary term is designed to build real understanding, not generate clicks.":"Credem că educația este fundația adopției responsabile. Fiecare articol, curs și termen din glosar este conceput pentru a construi înțelegere reală, nu pentru a genera click-uri."})]}),s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:1,children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold mb-4 text-foreground",children:n?"Our Vision":"Viziunea Noastră"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:n?"To become the most trusted educational ecosystem for emerging technologies in Central and Eastern Europe.":"Să devenim cel mai de încredere ecosistem educațional pentru tehnologii emergente din Europa Centrală și de Est."}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n?"EduWeb is more than a news portal — it's a learning platform that combines real-time industry coverage with structured educational content, gamified progress tracking (EduCoins), and AI-powered tools that enhance the learning experience.":"EduWeb este mai mult decât un portal de știri — este o platformă de învățare care combină acoperirea industriei în timp real cu conținut educațional structurat, progres gamificat (EduCoins) și instrumente AI care îmbunătățesc experiența de învățare."})]})]})}),s.jsx("section",{className:"border-y border-border bg-muted/20",children:s.jsxs("div",{className:"container py-16 md:py-24",children:[s.jsx(Le.h2,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:0,className:"font-heading text-2xl md:text-3xl font-bold text-center mb-12 text-foreground",children:n?"Our Values":"Valorile Noastre"}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:m.map((y,x)=>s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:x,className:"bg-card rounded-xl border border-border/50 p-6 hover:border-primary/30 transition-colors",children:[s.jsx(y.icon,{className:"h-8 w-8 text-primary mb-4"}),s.jsx("h3",{className:"font-heading font-semibold text-foreground mb-2",children:y.title}),s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:y.desc})]},y.title))})]})}),s.jsxs("section",{className:"container py-16 md:py-24",children:[s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:0,className:"text-center mb-12",children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground mb-3",children:n?"Editorial Methodology":"Metodologia Editorială"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:n?"Our content goes through a rigorous 4-step pipeline that c
3183ombines AI efficiency with human editorial judgment.":"Conținutul nostru trece printr-un proces riguros în 4 pași care combină eficiența AI cu raționamentul editorial uman."})]}),s.jsx("div",{className:"grid md:grid-cols-4 gap-6",children:p.map((y,x)=>s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:x,className:"relative",children:[s.jsxs("div",{className:"bg-card rounded-xl border border-border/50 p-6 h-full",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx("span",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-primary/10 text-primary text-sm font-bold",children:x+1}),s.jsx(y.icon,{className:"h-5 w-5 text-primary"})]}),s.jsx("h3",{className:"font-heading font-semibold text-foreground mb-2",children:y.title}),s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:y.desc})]}),x<3&&s.jsx(Gt,{className:"hidden md:block absolute -right-3 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground/30 z-10"})]},y.title))})]}),f&&s.jsx("section",{className:"border-y border-border bg-muted/20",children:s.jsx("div",{className:"container py-16 md:py-24",children:s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:0,className:"grid md:grid-cols-[280px_1fr] gap-10 items-start",children:[s.jsxs("div",{className:"text-center md:text-left",children:[f.avatar_url&&s.jsx("img",{src:f.avatar_url,alt:`${f.first_name} ${f.last_name}`,className:"w-40 h-40 md:w-56 md:h-56 rounded-2xl object-cover mx-auto md:mx-0 border-2 border-border shadow-lg"}),s.jsxs("h3",{className:"font-heading text-xl font-bold mt-4 text-foreground",children:[f.first_name," ",f.last_name]}),f.title&&s.jsx("p",{className:"text-sm text-primary font-medium",children:f.title}),s.jsxs("div",{className:"flex items-center justify-center md:justify-start gap-3 mt-3",children:[f.linkedin_url&&s.jsx("a",{href:f.linkedin_url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-primary transition-colors",children:s.jsx(LU,{size:18})}),f.website_url&&s.jsx("a",{href:f.website_url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-primary transition-colors",children:s.jsx(Dr,{size:18})}),s.jsx(be,{to:`/autor/${f.slug}`,className:"text-xs text-primary hover:underline",children:n?"Full profile →":"Profil complet →"})]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-xs font-mono uppercase tracking-widest text-primary mb-2 block",children:n?"Founder":"Fondator"}),s.jsx("div",{className:"space-y-4 text-muted-foreground leading-relaxed",children:(g=n&&f.bio_en||f.bio)==null?void 0:g.split(`
3184
3185`).map((y,x)=>s.jsx("p",{children:y},x))})]})]})})}),s.jsx("section",{className:"container py-16 md:py-24",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-12 md:gap-16",children:[s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:0,className:"space-y-4",children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:n?"Why It Matters":"De Ce Contează"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n?"The world is undergoing a profou
3185nd transformation driven by artificial intelligence, blockchain, and Web3. How we adapt to this change will depend on how well-informed we are and on our ability to learn and evolve continuously.":"Lumea trece printr-o transformare profundă generată de inteligența artificială, blockchain și Web3. Modul în care ne vom adapta la această schimbare va depinde de cât de bine suntem informați și de capacitatea noastră de a învăța și evolua continuu."}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n?"Web3 will not merely represent a technological shift or a simple internet upgrade. It will also bring a change in mindset. It is, in essence, a paradigm shift that will influence the way we think, work, and build digital ecosystems in the future.":"Web3 nu va reprezenta doar o schimbare tehnologică sau un simplu upgrade al internetului. Va aduce și o schimbare de mentalitate. Este, în esență, o schimbare de paradigmă care ne va influența modul de a gândi, de a lucra și de a construi ecosisteme digitale în viitor."})]}),s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:1,className:"space-y-4",children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:n?"The EduWeb Ecosystem":"Ecosistemul EduWeb"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n?"Through EduWeb, we aim to develop an ecosystem of companies, experts, and organizations active in fields such as AI, blockchain, Web3, digital marketing, and technology. The purpose of this ecosystem is to connect innovative companies with a community interested in education, technology, and the digital future.":"Prin EduWeb dorim să dezvoltăm un ecosistem de companii, experți și organizații active în domenii precum AI, blockchain, Web3, marketing digital și tehnologie. Scopul acestui ecosistem este să conecteze companii inovatoare cu o comunitate interesată de educație, tehnologie și viitorul digital."}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n?"Partner companies will be able to actively participate in the platform, sharing their expertise and contributing to the development of an informed community connected to global technological developments.":"Companiile partenere vor putea participa activ în platformă, împărtășindu-și expertiza și contribuind la dezvoltarea unei comunități informate și conectate la evoluțiile tehnologice globale."}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n?"Education has always been a priority for us. Over the years, more than 500 students from across the country have completed internships within our agency. We have collaborated with numerous universities and faculties in Romania, both for internship programs and for research projects in marketing and digital technologies.":"Educația a fost întotdeauna o prioritate pentru noi. De-a lungul anilor, peste 500 de studenți din întreaga țară au finalizat stagii de practică în cadrul agenției noastre. Am colaborat cu numeroase universități și facultăți din România, atât pentru programe de practică, cât și pentru proiecte de cercetare în domeniul marketingului și al tehnologiilor digitale."})]})]})}),s.jsxs("section",{className:"container py-16 md:py-24",children:[s.jsx(Le.h2,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:0,className:"font-heading text-2xl md:text-3xl font-bold text-center mb-12 text-foreground",children:n?"What We Cover":"Ce Acoperim"}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{icon:us,title:n?"News & Analysis":"Știri & Analize",desc:n?"Daily coverage of Web3, blockchain, crypto, AI and digital marketing — aggregated from trusted sources and enhanced with AI-powered briefs.":"Acoperire zilnică a Web3, blockchain, crypto, AI și marketing digital — agregată din surse de încredere și îmbunătățită cu rezumate generate de AI.",link:"/stiri",cta:n?"Read News":"Citește Știrile"},{icon:Rr,title:"EduWeb Academy",desc:n?"Structured courses with modules, quizzes, certificates and EduCoins rewards. From beginner to advanced, learn at your own pace.":"Cursuri structurate cu module, quiz-uri, certificate și re
3185compense EduCoins. De la începător la avansat, învață în ritmul tău.",link:"/academy",cta:n?"Explore Academy":"Explorează Academy"},{icon:yr,title:n?"Glossary & Education":"Glosar & Educație",desc:n?"A comprehensive glossary of blockchain and Web3 terms with audio explanations, plus SEO-optimized educational landing pages.":"Un glosar complet de termeni blockchain și Web3 cu explicații audio, plus pagini educaționale optimizate SEO.",link:"/glosar",cta:n?"Browse Glossary":"Răsfoiește Glosarul"}].map((y,x)=>s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:x,className:"bg-card rounded-xl border border-border/50 p-6 flex flex-col",children:[s.jsx(y.icon,{className:"h-8 w-8 text-primary mb-4"}),s.jsx("h3",{className:"font-heading font-semibold text-foreground mb-2",children:y.title}),s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed flex-1 mb-4",children:y.desc}),s.jsxs(be,{to:y.link,className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:[y.cta," ",s.jsx(Gt,{size:14})]})]},y.title))})]}),s.jsx("section",{className:"border-y border-border bg-muted/20",children:s.jsxs("div",{className:"container py-16 md:py-24",children:[s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:0,className:"text-center mb-10",children:[s.jsxs("span",{className:"inline-flex items-center gap-2 text-xs font-mono uppercase tracking-widest text-primary mb-3",children:[s.jsx(ya,{size:12}),n?"Watch":"Vizionează"]}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:n?"Discover EduWeb":"Descoperă EduWeb"})]}),s.jsx(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:1,className:"max-w-3xl mx-auto",children:s.jsx(fp,{script:c,audioUrl:i||"",duration:60,topic:"ai",postId:"about-eduweb",postTitle:"Despre EduWeb",onDemandGenerate:i?void 0:d,isGenerating:o,sectionLabels:u})})]})}),s.jsxs("section",{className:"container py-16 md:py-24",children:[s.jsxs(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:0,className:"text-center mb-10",children:[s.jsxs("span",{className:"inline-flex items-center gap-2 text-xs font-mono uppercase tracking-widest text-primary mb-3",children:[s.jsx(ms,{size:14}),"FAQ"]}),s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:n?"Frequently Asked Questions":"Întrebări Frecvente"})]}),s.jsx(Le.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:js,custom:1,className:"max-w-3xl mx-auto",children:s.jsx(lo,{type:"single",collapsible:!0,className:"space-y-3",children:A.map((y,x)=>s.jsxs(Os,{value:`faq-${x}`,className:"bg-card rounded-xl border border-border/50 px-6 data-[state=open]:border-primary/30 transition-colors",children:[s.jsx(Ls,{className:"text-left font-heading font-semibold text-foreground hover:no-underline",children:y.q}),s.jsx(Rs,{className:"text-muted-foreground leading-relaxed",children:y.a})]},x))})})]}),s.jsx("section",{className:"border-t border-border bg-muted/30",children:s.jsx("div",{className:"container py-12",children:s.jsxs("div",{className:"grid md:grid-cols-3 gap-8 text-sm text-muted-foreground",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-heading font-semibold text-foreground mb-2",children:n?"Legal Operator":"Operator Legal"}),s.jsx("p",{children:"Comitnet SRL"}),s.jsx("p",{children:"CUI: RO30915242"}),s.jsx("p",{children:"Aleea Calin Nemes 1, Cluj-Napoca, România"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-heading font-semibold text-foreground mb-2",children:"Contact"}),s.jsx("p",{children:s.jsx("a",{href:"mailto:[email protected]",className:"hover:text-foreground transition-colors",children:"[email protected]"})}),s.jsx("p",{children:s.jsx("a",{href:"tel:+40752110109",className:"hover:text-foreground transition-colors",children:"0752 110 109"})})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-heading font-semibold text-foreground mb-2",children:"Legal"}),s.jsx("p",{children:s.jsx(be,{to:"/termeni",className:"hover:text-foreground transition-colors",children:n?"Terms & Conditions":"Termeni și Condiții"})}),s.jsx("p",{children:s.jsx(be,{to:"/confidentialitate",className:"hover:text-foreground transition-colors",children:n?"Privacy Policy":"Politica de Confidențialitate"})})]})]})})})]})}const rPt={"ce-este-bitcoin":Tbe,"ce-este-ethereum":Pbe,"ce-este-solana":Ibe,"ce-este-bnb":Fbe,"ce-este-xrp":Obe,"ce-este-cardano":Lbe,"ce-este-dogecoin":Rbe,"ce-este-polkadot":Dbe,"ce-este-avalanche":Mbe,"ce-este-chainlink":zbe},nPt={ro:[{title:"Ce este Web3?",description:"Internetul descentralizat – cum funcționează și de ce contează.",path:"/ce-este-web3",icon:Dr,image:Nz},{title:"Ce este Blockchain?",description:"Tehnologia din spatele criptomonedelor și aplicațiilor descentralizate.",path:"/ce-este-blockchain",icon:es,image:Sz},{title:"Ce este Crypto?",description:"Ghid complet despre criptomonede: ce sunt, cum funcționează și la ce se folosesc.",path:"/ce-este-crypto",icon:Zh,image:kz}],en:[{title:"What is Web3?",description:"The decentralized internet – how it works and why it matters.",path:"/what-is-web3",icon:Dr,image:Nz},{title:"What is Blockchain?",description:"The technology behind cryptocurrencies and decentralized applications.",path:"/what-is-blockchain",icon:es,image:Sz},{title:"What is Crypto?",description:"Complete guide to cryptocurrencies: what they are, how they work, and what they're used for.",path:"/what-is-crypto",icon:Zh,image:kz}]};function hre(){const{lang:e}=Pt(),r=e==="ro",{data:n=[]}=Xe({queryKey:["published-pillar-pages"],queryFn:async()=>{const{data:a}=await G.from("pillar_pages").select("slug_ro, slug_en, content_ro, content_en, image_url").eq("is_published",!0).order("created_at",{ascending:!0});return a||[]},staleTime:5*60*1e3});Zr({title:r?"Ce este? – Ghiduri Educaționale":"What is? – Educational Guides",description:r?"Descoperă ghiduri complete despre Web3, Blockchain, Bitcoin, Ethereum și alte criptomonede. Învață bazele într-un limbaj simplu.":"Discover complete guides about Web3, Blockchain, Bitcoin, Ethereum and other cryptocurrencies. Learn the basics in simple language."});const i=nPt[e];return s.jsx(Ft,{children:s.jsxs("div",{className:"container mx-auto px-4 py-10 max-w-5xl",children:[s.jsxs(Le.div,{initial:{opacity:0,y:20}
3185,animate:{opacity:1,y:0},className:"text-center mb-14",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:[s.jsx(ms,{size:16}),r?"Ghiduri educaționale":"Educational guides"]}),s.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-heading font-bold mb-4",children:r?"Ce este…?":"What is…?"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:r?"Ghiduri complete scrise pe înțelesul tuturor. Alege un subiect și începe să înveți.":"Complete guides written for everyone. Pick a topic and start learning."})]}),s.jsxs("section",{className:"mb-14",children:[s.jsxs("h2",{className:"text-xl font-heading font-bold mb-6 flex items-center gap-2",children:[s.jsx(es,{size:20,className:"text-primary"}),r?"Concepte fundamentale":"Core Concepts"]}),s.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:i.map((a,o)=>{const l=a.icon;return s.jsx(Le.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:o*.05},children:s.jsxs(be,{to:a.path,className:"group flex flex-col h-full rounded-xl border bg-card overflow-hidden hover:shadow-lg hover:border-primary/30 transition-all",children:[s.jsx("div",{className:"aspect-[16/9] overflow-hidden",children:s.jsx("img",{src:a.image,alt:a.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"})}),s.jsxs("div",{className:"p-6 flex flex-col flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx("div",{className:"p-2.5 rounded-lg bg-primary/10 group-hover:bg-primary/20 transition-colors",children:s.jsx(l,{size:20,className:"text-primary"})}),s.jsx("h3",{className:"font-heading font-bold text-lg",children:a.title})]}),s.jsx("p",{className:"text-sm text-muted-foreground flex-1",children:a.description}),s.jsxs("span",{className:"mt-4 inline-flex items-center gap-1.5 text-sm font-medium text-primary group-hover:underline",children:[r?"Citește ghidul":"Read the guide"," ",s.jsx(Gt,{size:14})]})]})]})},a.path)})})]}),s.jsxs("section",{children:[s.jsxs("h2",{className:"text-xl font-heading font-bold mb-6 flex items-center gap-2",children:[s.jsx(Koe,{size:20,className:"text-primary"}),r?"Criptomonede populare":"Popular Cryptocurrencies"]}),s.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:eb.map((a,o)=>{const l=r?a.content.ro:a.content.en,c=l.title.split("?")[0]+"?",u=l.metaDescription,d=r?`/${a.slugRo}`:`/${a.slugEn}`,h=rPt[a.slugRo];return s.jsx(Le.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.15+o*.04},children:s.jsxs(be,{to:d,className:"group flex flex-col h-full rounded-xl border bg-card overflow-hidden hover:shadow-lg hover:border-primary/30 transition-all",children:[h&&s.jsx("div",{className:"aspect-[16/9] overflow-hidden",children:s.jsx("img",{src:h,alt:c,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"})}),s.jsxs("div",{className:"p-6 flex flex-col flex-1",children:[s.jsx("h3",{className:"font-heading font-bold text-lg mb-2 group-hover:text-primary transition-colors",children:c}),s.jsx("p",{className:"text-sm text-muted-foreground flex-1 line-clamp-2",children:u}),s.jsxs("span",{className:"mt-4 inline-flex items-center gap-1.5 text-sm font-medium text-primary group-hover:underline",children:[r?"Citește ghidul":"Read the guide"," ",s.jsx(Gt,{size:14})]})]})]})},a.slugRo)})})]}),n.length>0&&s.jsxs("section",{children:[s.jsxs("h2",{className:"text-xl font-heading font-bold mb-6 flex items-center gap-2",children:[s.jsx(ms,{size:20,className:"text-primary"}),r?"Mai multe ghiduri":"More Guides"]}),s.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:n.map((a,o)=>{const l=r?a.content_ro:a.content_en,c=((l==null?void 0:l.title)||"").split("?")[0]+"?",u=(l==null?void 0:l.metaDescription)||"",d=r?`/${a.slug_ro}`:`/${a.slug_en}`;return s.jsx(Le.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.3+o*.04},children:s.jsxs(be,{to:d,className:"group flex flex-col h-full rounded-xl border bg-card overflow-hidden hover:shadow-lg hover:border-primary/30 transition-all",children:[a.image_url&&s.jsx("div",{className:"aspect-[16/9] overflow-hidden",children:s.jsx("img",{src:a.image_url,alt:c,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"})}),s.jsxs("div",{className:"p-6 flex flex-col flex-1",children:[s.jsx("h3",{className:"font-heading font-bold text-lg mb-2 group-hover:text-primary transition-colors",children:c}),s.jsx("p",{className:"text-sm text-muted-foreground flex-1 line-clamp-2",children:u}),s.jsxs("span",{className:"mt-4 inline-flex items-center gap-1.5 text-sm font-medium text-primary group-hover:underline",children:[r?"Citește ghidul":"Read the guide"," ",s.jsx(Gt,{size:14})]})]})]})},a.slug_ro)})})]})]})})}function iPt(){Zr({title:"EduWeb Innovation Network — Ecosistemul de companii și organizații",description:"Descoperă companiile și organizațiile care contribuie la dezvoltarea ecosistemului EduWeb în domeniul educației, tehnologiei, Web3 și AI."});const{data:e=[],isLoading:r}=Xe({queryKey:["innovation-network"],queryFn:async()=>{const{data:n,error:i}=await G.from("innovation_network").select("*").eq("is_published",!0).order("sort_order");if(i)throw i;return n||[]}});return s.jsxs(Ft,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"CollectionPage",name:"EduWeb Innovation Network",description:"Companiile și organizațiile din ecosistemul EduWeb.",url:"https://eduweb.ro/innovation-network"})}}),s.jsxs("section",{className:"relative overflow-hidden py-16 md:py-24",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 via-trans
3185parent to-accent/5"}),s.jsx("div",{className:"container relative max-w-5xl text-center",children:s.jsxs(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[s.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"Ecosistem"}),s.jsx("h1",{className:"font-heading text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:"EduWeb Innovation Network"}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto",children:"Companiile și organizațiile care contribuie la dezvoltarea ecosistemului EduWeb în educație, tehnologie, Web3 și inteligență artificială."})]})})]}),s.jsx("section",{className:"container max-w-6xl pb-20",children:r?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3].map(n=>s.jsx("div",{className:"h-64 rounded-2xl bg-muted animate-pulse"},n))}):e.length===0?s.jsx("p",{className:"text-center text-muted-foreground py-12",children:"Nicio companie încă în rețea."}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map((n,i)=>{var a;return s.jsx(Le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:i*.1},children:s.jsxs(be,{to:`/innovation-network/${n.slug}`,className:"group block h-full rounded-2xl border border-border/50 bg-card p-6 hover:border-primary/30 hover:shadow-lg transition-all duration-300",children:[s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[n.logo_url?s.jsx("img",{src:n.logo_url,alt:`${n.name} logo`,className:"w-14 h-14 rounded-xl object-contain bg-muted p-1"}):s.jsx("div",{className:"w-14 h-14 rounded-xl bg-primary/10 flex items-center justify-center shrink-0",children:s.jsx(Dr,{className:"w-7 h-7 text-primary"})}),s.jsx("h2",{className:"font-heading text-xl font-bold group-hover:text-primary transition-colors",children:n.name})]}),n.short_description&&s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-3 mb-4",children:n.short_description}),((a=n.expertise_areas)==null?void 0:a.length)>0&&s.jsx("div",{className:"flex flex-wrap gap-1.5 mb-4",children:n.expertise_areas.slice(0,4).map(o=>s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-muted text-muted-foreground",children:o},o))}),s.jsxs("div",{className:"flex items-center gap-1 text-sm text-primary font-medium mt-auto",children:["Descoperă ",s.jsx(Gt,{size:14,className:"group-hover:translate-x-1 transition-transform"})]})]})},n.id)})})})]})}function aPt({company:e}){return s.jsxs("section",{className:"relative overflow-hidden min-h-[60vh] flex items-end",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/8 via-background to-background"}),s.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}}),s.jsx(Le.div,{className:"absolute top-20 right-[20%] w-[500px] h-[500px] rounded-full bg-primary/5 blur-[120px]",animate:{scale:[1,1.2,1],opacity:[.3,.5,.3]},transition:{duration:8,repeat:1/0,ease:"easeInOut"}}),s.jsx(Le.div,{className:"absolute top-40 left-[10%] w-[300px] h-[300px] rounded-full bg-accent/5 blur-[100px]",animate:{scale:[1.2,1,1.2],opacity:[.2,.4,.2]},transition:{duration:10,repeat:1/0,ease:"easeInOut"}}),s.jsxs("div",{className:"container relative max-w-6xl w-full pb-16 pt-32",children:[s.jsx(Le.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.4},className:"mb-10",children:s.jsxs(be,{to:"/innovation-network",className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-primary transition-colors group",children:[s.jsx(rn,{size:14,className:"group-hover:-translate-x-1 transition-transform"}),s.jsx("span",{children:"EduWeb Innovation Network"})]})}),s.jsxs("div",{className:"flex flex-col lg:flex-row items-start gap-10",children:[s.jsx(Le.div,{initial:{opacity:0,scale:.8}
3185,animate:{opacity:1,scale:1},transition:{duration:.6,type:"spring"},className:"relative shrink-0",children:s.jsxs("div",{className:"relative group",children:[e.logo_url?s.jsx("img",{src:e.logo_url,alt:`${e.name} logo`,className:"w-32 h-32 md:w-40 md:h-40 rounded-[2rem] object-contain bg-card shadow-2xl border-2 border-border/30 p-4 group-hover:border-primary/30 transition-colors"}):s.jsx("div",{className:"w-32 h-32 md:w-40 md:h-40 rounded-[2rem] bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center shadow-2xl border-2 border-border/30",children:s.jsx(Dr,{className:"w-16 h-16 text-primary"})}),s.jsx(Le.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.5,type:"spring",stiffness:200},className:"absolute -bottom-3 -right-3 w-12 h-12 rounded-full bg-gradient-to-br from-primary to-primary/80 flex items-center justify-center shadow-lg ring-4 ring-background",children:s.jsx(pi,{className:"w-6 h-6 text-primary-foreground"})})]})}),s.jsxs(Le.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"flex-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-5",children:[s.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-primary/10 text-primary text-xs font-bold uppercase tracking-wider",children:[s.jsx(cp,{className:"w-3 h-3"})," Partener Verificat"]}),s.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-accent/10 text-accent text-xs font-bold uppercase tracking-wider",children:[s.jsx(oo,{className:"w-3 h-3"})," Innovation Network"]}),s.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-card text-muted-foreground text-xs font-medium border border-border/50",children:[s.jsx(hn,{className:"w-3 h-3 text-primary"})," Identitate verificată"]})]}),s.jsx("h1",{className:"font-heading text-4xl md:text-5xl lg:text-6xl font-extrabold mb-4 tracking-tight leading-[1.1]",children:e.name}),e.eduweb_role&&s.jsx("p",{className:"text-xl md:text-2xl text-primary/90 font-semibold mb-5",children:e.eduweb_role}),e.short_description&&s.jsx("p",{className:"text-lg text-muted-foreground mb-8 max-w-2xl leading-relaxed",children:e.short_description}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.website_url&&s.jsx(me,{asChild:!0,size:"lg",className:"gap-2 shadow-lg text-base px-6 h-12",children:s.jsxs("a",{href:e.website_url,target:"_blank",rel:"noopener noreferrer",children:[s.jsx(Dr,{size:18})," Vizitează website-ul oficial",s.jsx(Yr,{size:14,className:"ml-1 opacity-60"})]})}),e.gmb_url&&s.jsx(me,{asChild:!0,variant:"outline",size:"lg",className:"gap-2 text-base px-6 h-12",children:s.jsxs("a",{href:e.gmb_url,target:"_blank",rel:"noopener noreferrer",children:[s.jsx(Mg,{size:18})," Google Business Profile",s.jsx(Yr,{size:14,className:"ml-1 opacity-60"})]})}),s.jsx(me,{variant:"ghost",size:"lg",className:"gap-2 text-base h-12",asChild:!0,children:s.jsx("a",{href:"#contact-partner",children:"Contactează partenerul"})})]})]})]})]})]})}const sPt={hidden:{},show:{transition:{staggerChildren:.1}}},oPt={hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:{duration:.5}}};function lPt({company:e,articlesCount:r}){var i;const n=[{icon:pi,label:"Status",value:"Partener Verificat",color:"text-primary",bg:"bg-primary/10"},{icon:Zoe,label:"Membru din",value:new Date(e.created_at).toLocaleDateString("ro-RO",{month:"long",year:"numeric"}),color:"text-accent",bg:"bg-accent/10"},{icon:YSe,label:"Articole contribuite",value:r>0?`${r} articole`:"Conținut în pregătire",color:"text-primary",bg:"bg-primary/10"},{icon:oa,label:"Domenii",value:`${((i=e.expertise_areas)==null?void 0:i.length)||0} specializări`,color:"text-accent",bg:"bg-accent/10"}];return s.jsx("section",{className:"container max-w-6xl -mt-8 relative z-10",children:s.jsx(Le.div,{variants:sPt,initial:"hidden",animate:"show",className:"grid grid-cols-2 lg:grid-cols-4 gap-3 md:gap-4",children:n.map(a=>s.jsxs(Le.div,{variants:oPt,className:"group rounded-2xl border border-border/50 bg-card/80 backdrop-blur-sm p-5 hover:border-primary/30 hover:shadow-lg transition-all",children:[s.jsx("div",{className:`w-10 h-10 rounded-xl ${a.bg} flex items-center justify-center mb-3`,children:s.jsx(a.icon,{className:`w-5 h-5 ${a.color}`})}),s.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider mb-1",children:a.label}),s.jsx("p",{className:"text-sm font-bold text-foreground",children:a.value})]},a.label))})})}const cPt={"inteligență artificială":Mv,blockchain:pi,cloud:WSe,analytics:Eo,development:qy,digital:Dr};function uPt(e){const r=e.toLowerCase();for(const[n,i]of Object.entries(cPt))if(r.includes(n))return i;return Ag}function dPt({areas:e}){return e!=null&&e.length?s.jsx("section",{className:"container max-w-6xl py-16",children:s.jsxs(Le.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:s.jsx(Li,{className:"w-5 h-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-2xl font-bold",children:"Domenii de expertiză"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Competențele principale ale partenerului"})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map((r,n)=>{const i=uPt(r);return s.jsxs(Le.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:n*.08},className:"group flex items-center gap-4 p-5 rounded-2xl border border-border/50 bg-card/50 hover:bg-card hover:border-primary/20 hover:shadow-md transition-all",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-primary/15 to-primary/5 flex items-center justify-center shrink-0 group-hover:from-primary/25 group-hover:to-primary/10 transition-colors",children:s.jsx(i,{className:"w-6 h-6 text-primary"})}),s.jsx("span",{className:"font-semibold text-foreground",children:r})]},r)})})]})}):null}const hPt={viziune:{icon:Oi,accent:"from-blue-500/20 to-cyan-500/20"},misiune:{icon:Uv,accent:"from-violet-500/20 to-purple-500/20"},parteneriat:{icon:Zoe,accent:"from-emerald-500/20 to-teal-500/20"}
3185,realizări:{icon:Ky,accent:"from-amber-500/20 to-yellow-500/20"},realizari:{icon:Ky,accent:"from-amber-500/20 to-yellow-500/20"},notabile:{icon:Ky,accent:"from-amber-500/20 to-yellow-500/20"},despre:{icon:Ag,accent:"from-primary/20 to-accent/20"},inovație:{icon:uE,accent:"from-rose-500/20 to-pink-500/20"},inovatie:{icon:uE,accent:"from-rose-500/20 to-pink-500/20"}};function fre(e){const r=e.toLowerCase();for(const[n,i]of Object.entries(hPt))if(r.includes(n))return i;return{icon:yr,accent:"from-primary/20 to-accent/20"}}function fPt(e){const r=e.split(`
3186`),n=[];let i="",a=[];for(const o of r){const l=o.match(/^#{1,3}\s+(.+)/);if(l){if(i&&a.length>0){const{icon:c,accent:u}=fre(i);n.push({title:i,content:a.join(`
3187`).trim(),icon:c,accent:u})}i=l[1].trim(),a=[]}else a.push(o)}if(i&&a.length>0){const{icon:o,accent:l}=fre(i);n.push({title:i,content:a.join(`
3188`).trim(),icon:o,accent:l})}return n.length===0&&e.trim()&&n.push({title:"",content:e.trim(),icon:yr,accent:"from-primary/20 to-accent/20"}),n}function mPt(e){if(e.length===0)return{intro:null,rest:[]};const r=e[0];return r.title.toLowerCase().includes("despre")||r.title===""?{intro:r.content,rest:e.slice(1)}:{intro:null,rest:e}}const pPt={hidden:{opacity:0,y:24},visible:e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}})};function APt({description:e,companyName:r}){const n=w.useMemo(()=>fPt(e||""),[e]),{intro:i,rest:a}=w.useMemo(()=>mPt(n),[n]);return e?s.jsxs("section",{className:"container max-w-6xl py-12",children:[s.jsxs(Le.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"flex items-center gap-3 mb-10",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-accent/10 flex items-center justify-center",children:s.jsx(yr,{className:"w-5 h-5 text-accent"})}),s.jsxs("div",{children:[s.jsxs("h2",{className:"font-heading text-2xl font-bold",children:["Despre ",r]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Prezentare detaliată a partenerului"})]})]}),i&&s.jsx(Le.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"relative mb-10",children:s.jsxs("div",{className:"rounded-2xl border border-border/50 bg-gradient-to-br from-card via-card to-accent/5 p-8 md:p-10",children:[s.jsx("div",{className:"absolute top-6 left-6 w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(Ag,{className:"w-6 h-6 text-primary"})}),s.jsx("div",{className:"md:pl-16 prose prose-lg dark:prose-invert max-w-none prose-p:leading-relaxed prose-p:text-muted-foreground prose-strong:text-foreground prose-li:text-muted-foreground",children:s.jsx(tg,{children:i})})]})}),a.length>0&&s.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:a.map((o,l)=>{const c=o.icon;return s.jsxs(Le.div,{custom:l,initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:pPt,className:"group relative rounded-2xl border border-border/50 bg-card overflow-hidden hover:border-primary/30 transition-colors duration-300",children:[s.jsx("div",{className:`h-1 w-full bg-gradient-to-r ${o.accent}`}),s.jsxs("div",{className:"p-6 md:p-8",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:`w-9 h-9 rounded-lg bg-gradient-to-br ${o.accent} flex items-center justify-center`,children:s.jsx(c,{className:"w-4.5 h-4.5 text-foreground"})}),s.jsx("h3",{className:"font-heading text-lg font-semibold",children:o.title})]}),s.jsx("div",{className:"prose dark:prose-invert max-w-none prose-p:text-sm prose-p:leading-relaxed prose-p:text-muted-foreground prose-strong:text-foreground prose-li:text-sm prose-li:text-muted-foreground prose-ul:space-y-1",children:s.jsx(tg,{children:o.content})})]})]},l)})}),a.length===0&&!i&&s.jsx(Le.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"rounded-2xl border border-border/50 bg-card p-8 md:p-10",children:s.jsx("div",{className:"prose prose-lg dark:prose-invert max-w-none prose-p:leading-relaxed prose-p:text-muted-foreground prose-strong:text-foreground",children:s.jsx(tg,{children:e})})}),s.jsxs(Le.div,{initial:{opacity:0}
3188,whileInView:{opacity:1},viewport:{once:!0},transition:{delay:.3},className:"mt-8 flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(Li,{size:14,className:"text-primary"})}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Analiză informativă generată cu AI și verificată editorial de echipa EduWeb."})]})]}):null}function gPt({articles:e,companyName:r}){return e.length?s.jsx("section",{className:"container max-w-6xl py-16",children:s.jsxs(Le.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:s.jsx(us,{className:"w-5 h-5 text-primary"})}),s.jsxs("div",{children:[s.jsxs("h2",{className:"font-heading text-2xl font-bold",children:["Conținut contribuit de ",r]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Articole publicate în cadrul parteneriatului EduWeb"})]})]}),s.jsx("div",{className:"grid gap-4",children:e.map((n,i)=>{var a;return s.jsx(Le.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{delay:i*.1},children:s.jsxs(be,{to:`/${n.slug}`,className:"group flex items-center gap-5 p-6 rounded-2xl border border-border/50 bg-card/50 hover:bg-card hover:border-primary/30 hover:shadow-xl transition-all",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center shrink-0 group-hover:bg-primary/20 transition-colors",children:s.jsx(us,{className:"w-5 h-5 text-primary"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"font-semibold group-hover:text-primary transition-colors mb-1.5 line-clamp-1",children:n.title_ro}),((a=n.topics)==null?void 0:a.length)>0&&s.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.topics.slice(0,3).map(o=>s.jsx("span",{className:"text-xs px-2.5 py-0.5 rounded-full bg-muted text-muted-foreground",children:o},o))})]}),s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[s.jsx("span",{className:"text-xs text-muted-foreground hidden sm:block",children:new Date(n.published_at).toLocaleDateString("ro-RO",{day:"numeric",month:"short",year:"numeric"})}),s.jsx(Gt,{size:16,className:"text-muted-foreground group-hover:text-primary group-hover:translate-x-1 transition-all"})]})]})},n.id)})})]})}):null}function xPt({companyName:e}){const r=[{q:`Ce înseamnă că ${e} este parte din EduWeb Innovation Network?`,a:`Fiind parte din EduWeb Innovation Network, ${e} a trecut printr-un proces de verificare și validare. Aceasta confirmă angajamentul companiei față de inovație, educație digitală și contribuția activă la ecosistemul tehnologic din România. Partenerii verificați beneficiază de vizibilitate pe platforma EduWeb și pot publica conținut educațional relevant.`},{q:"Cum pot colabora cu acest partener?",a:`Puteți contacta ${e} prin intermediul formularului de pe această pagină sau accesând direct website-ul oficial. De asemenea, puteți explora articolele publicate de partener pe platforma EduWeb pentru a înțelege mai bine expertiza și serviciile oferite.`},{q:"Ce tip de conținut publică partenerii pe EduWeb?",a:"Partenerii din Innovation Network publică articole educaționale, analize de piață, studii de caz și ghiduri practice în domeniile lor de expertiză. Tot conținutul este revizuit editorial pentru a asigura calitatea și relevanța informațiilor."},{q:"Cum pot deveni și eu parte din Innovation Network?",a:"Companiile și organizațiile interesate pot aplica pentru parteneriat prin pagina de contact EduWeb. Procesul include evaluarea compatibilității cu misiunea platformei, verificarea identității companiei și stabilirea termenilor de colaborare."},{q:"Ce beneficii primesc partenerii Innovation Network?",a:"Partenerii beneficiază de: profil premium pe platforma EduWeb, posibilitatea de a publica conținut educațional, vizibilitate în fața audie
3188nței EduWeb, badge de partener verificat, acces la analytics și rapoarte de performanță, și participare la evenimentele comunității."}],n={"@context":"https://schema.org","@type":"FAQPage",mainEntity:r.map(i=>({"@type":"Question",name:i.q,acceptedAnswer:{"@type":"Answer",text:i.a}}))};return s.jsxs(s.Fragment,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(n)}}),s.jsx("section",{className:"container max-w-6xl py-16",children:s.jsxs(Le.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-accent/10 flex items-center justify-center",children:s.jsx(ms,{className:"w-5 h-5 text-accent"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-2xl font-bold",children:"Întrebări frecvente"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Informații utile despre acest parteneriat"})]})]}),s.jsx("div",{className:"rounded-2xl border border-border/50 bg-card/50 overflow-hidden",children:s.jsx(lo,{type:"single",collapsible:!0,className:"divide-y divide-border/30",children:r.map((i,a)=>s.jsxs(Os,{value:`faq-${a}`,className:"border-none px-6 md:px-8",children:[s.jsx(Ls,{className:"text-left font-semibold py-5 hover:no-underline hover:text-primary transition-colors text-base",children:i.q}),s.jsx(Rs,{className:"text-muted-foreground leading-relaxed pb-6 text-[0.95rem]",children:i.a})]},a))})})]})})]})}const yPt=hbe({name:dv().trim().min(2,"Numele trebuie să aibă cel puțin 2 caractere").max(100),email:dv().trim().email("Adresă de email invalidă").max(255),message:dv().trim().min(10,"Mesajul trebuie să aibă cel puțin 10 caractere").max(2e3)});function vPt({companyName:e,companySlug:r}){const[n,i]=w.useState(""),[a,o]=w.useState(""),[l,c]=w.useState(""),[u,d]=w.useState(!1),h=async f=>{f.preventDefault();const p=yPt.safeParse({name:n,email:a,message:l});if(!p.success){ft.error(p.error.errors[0].message);return}d(!0);try{const{error:m}=await G.functions.invoke("send-contact-email",{body:{name:p.data.name,email:p.data.email,message:p.data.message,subject:`[Innovation Network] Mesaj pentru ${e}`,partner_slug:r}});if(m)throw m;ft.success("Mesajul a fost trimis cu succes!"),i(""),o(""),c("")}catch{ft.error("Eroare la trimiterea mesajului. Încercați din nou.")}finally{d(!1)}};return s.jsx("section",{id:"contact-partner",className:"container max-w-6xl py-16",children:s.jsx(Le.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:s.jsxs("div",{className:"grid lg:grid-cols-5 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 flex flex-col justify-center",children:[s.jsx("div",{className:"w-14 h-14 rounded-2xl bg-primary/10 flex items-center justify-center mb-6",children:s.jsx(ile,{className:"w-7 h-7 text-primary"})}),s.jsxs("h2",{className:"font-heading text-3xl font-bold mb-4",children:["Contactează ",s.jsx("span",{className:"text-primary",children:e})]}),s.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:"Ai o întrebare sau o propunere de colaborare? Completează formularul și echipa EduWeb va facilita comunicarea cu partenerul."}),s.jsxs("div",{className:"space-y-3 text-sm text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-primary"}),s.jsx("span",{children:"Răspuns în maxim 48 de ore lucrătoare"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-primary"}),s.jsx("span",{children:"Comunicare facilitată de echipa EduWeb"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-primary"}),s.jsx("span",{children:"Datele tale sunt protejate conform GDPR"})]})]})]}),s.jsx("div",{className:"lg:col-span-3",children:s.jsxs("form",{onSubmit:h,className:"rounded-2xl border border-border/50 bg-card p-8 md:p-10 space-y-5",children:[s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block text-foreground",children:"Numele tău *"}),s.jsx(qe,{placeholder:"Ion Popescu",value:n,onChange:f=>i(f.target.value),required:!0,maxLength:100,className:"h-12"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block text-foreground",children:"Email *"}),s.jsx(qe,{type:"email",placeholder:"[email protected]",value:a,onChange:f=>o(f.target.value),required:!0,maxLength:255,className:"h-12"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium mb-2 block text-foreground",children:"Mesajul tău *"}),s.jsx(fr,{placeholder:`Scrie mesajul tău pentru ${e}
3188...`,value:l,onChange:f=>c(f.target.value),required:!0,maxLength:2e3,rows:5,className:"resize-none"}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1.5",children:[l.length,"/2000 caractere"]})]}),s.jsxs(me,{type:"submit",size:"lg",disabled:u,className:"w-full h-12 gap-2 text-base font-semibold",children:[s.jsx(Dc,{size:16}),u?"Se trimite...":"Trimite mesajul"]}),s.jsxs("p",{className:"text-xs text-muted-foreground text-center",children:["Prin trimiterea formularului ești de acord cu ",s.jsx("a",{href:"/politica-de-confidentialitate",className:"underline hover:text-foreground",children:"Politica de confidențialitate"}),"."]})]})})]})})})}function bPt(){const e=[{icon:Dr,text:"Profil premium pe platforma EduWeb"},{icon:yr,text:"Publicare articole educaționale"},{icon:ts,text:"Vizibilitate în ecosistemul tech"}];return s.jsx("section",{className:"container max-w-6xl py-16 pb-24",children:s.jsxs(Le.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"relative overflow-hidden rounded-[2rem] border border-primary/20",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 via-card to-accent/5"}),s.jsx("div",{className:"absolute top-0 right-0 w-[600px] h-[600px] bg-primary/5 rounded-full -translate-y-1/2 translate-x-1/3 blur-3xl"}),s.jsx("div",{className:"absolute bottom-0 left-0 w-[400px] h-[400px] bg-accent/5 rounded-full translate-y-1/2 -translate-x-1/3 blur-3xl"}),s.jsx("div",{className:"relative p-10 md:p-16",children:s.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[s.jsx(Le.div,{initial:{scale:.8,opacity:0}
3188,whileInView:{scale:1,opacity:1},viewport:{once:!0},transition:{delay:.2},className:"w-20 h-20 mx-auto rounded-3xl bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center mb-8 ring-1 ring-primary/20",children:s.jsx(Rn,{className:"w-10 h-10 text-primary"})}),s.jsxs("h3",{className:"font-heading text-3xl md:text-4xl font-bold mb-4",children:["Dorești să faci parte din ",s.jsx("span",{className:"text-primary",children:"Innovation Network"}),"?"]}),s.jsx("p",{className:"text-lg text-muted-foreground mb-10 max-w-xl mx-auto",children:"Alătură-te companiilor care modelează viitorul educației digitale din România."}),s.jsx("div",{className:"flex flex-wrap justify-center gap-6 mb-10",children:e.map((r,n)=>s.jsxs(Le.div,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.3+n*.1},className:"flex items-center gap-2.5 text-sm text-muted-foreground",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(r.icon,{className:"w-4 h-4 text-primary"})}),s.jsx("span",{className:"font-medium",children:r.text})]},n))}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[s.jsx(me,{asChild:!0,size:"lg",className:"h-13 px-8 text-base gap-2 shadow-lg",children:s.jsxs(be,{to:"/contact",children:["Aplică pentru parteneriat",s.jsx(Gt,{size:16})]})}),s.jsx(me,{asChild:!0,variant:"ghost",size:"lg",className:"h-13 px-8 text-base gap-2",children:s.jsx(be,{to:"/innovation-network",children:"Vezi toți partenerii"})})]})]})})]})})}function wPt(){const{slug:e}=Zl(),{data:r,isLoading:n}=Xe({queryKey:["innovation-network",e],queryFn:async()=>{const{data:a,error:o}=await G.from("innovation_network").select("*").eq("slug",e).eq("is_published",!0).single();if(o)throw o;return a},enabled:!!e}),{data:i=[]}=Xe({queryKey:["partner-published-articles",r==null?void 0:r.user_id],queryFn:async()=>{if(!(r!=null&&r.user_id))return[];const{data:a,error:o}=await G.from("posts").select("id, title_ro, slug, published_at, topics").eq("created_by",r.user_id).eq("status","published").order("published_at",{ascending:!1}).limit(10);if(o)throw o;return a||[]},enabled:!!(r!=null&&r.user_id)});return Zr({title:(r==null?void 0:r.meta_title)||`${(r==null?void 0:r.name)||""} — EduWeb Innovation Network`,description:(r==null?void 0:r.meta_description)||(r==null?void 0:r.short_description)||""}),n?s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-6xl py-20",children:[s.jsx("div",{className:"h-8 w-48 bg-muted rounded animate-pulse mb-6"}),s.jsx("div",{className:"h-14 w-[70%] bg-muted rounded animate-pulse mb-4"}),s.jsx("div",{className:"h-6 w-[50%] bg-muted rounded animate-pulse mb-8"}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[...Array(4)].map((a,o)=>s.jsx("div",{className:"h-28 bg-muted rounded-2xl animate-pulse"},o))})]})}):r?s.jsxs(Ft,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Organization",name:r.name,url:r.website_url||void 0,description:r.short_description||void 0,logo:r.logo_url||void 0,memberOf:{"@type":"Organization",name:"EduWeb Innovation Network",url:"https://eduweb.ro/innovation-network"}})}}),s.jsx(aPt,{company:r}),s.jsx(lPt,{company:r,articlesCount:i.length}),s.jsx(dPt,{areas:r.expertise_areas}),s.jsx(APt,{description:r.full_description,companyName:r.name}),s.jsx(gPt,{articles:i,companyName:r.name}),s.jsx(xPt,{companyName:r.name}),s.jsx(vPt,{companyName:r.name,companySlug:r.slug}),s.jsx(bPt,{})]}):s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-4xl py-20 text-center",children:[s.jsx("h1",{className:"font-heading text-3xl font-bold mb-4",children:"Companie negăsită"}),s.jsx(be,{to:"/innovation-network",className:"text-primary hover:underline",children:"← Înapoi la Innovation Network"})]})})}function mre(){const{pathname:e}=ps(),r=e.replace(/^\//,""),{data:n,isLoading:i,error:a}=Xe({queryKey:["pillar-page",r],queryFn:async()=>{const{data:l}=await G.from("pillar_pages").select("*").eq("slug_ro",r).eq("is_published",!0).maybeSingle();if(l)return l;const{data:c}=await G.from("pillar_pages").select("*").eq("slug_en",r).eq("is_published",!0).maybeSingle();return c||null},staleTime:10*60*1e3});if(i)return s.jsx(Ft,{children:s.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:s.jsx(rt,{className:"h-8 w-8 animate-spin text-primary"})})});if(!n)return s.jsx(xd,{to:"/ce-este",replace:!0});const o={ro:n.content_ro,en:n.content_en};return s.jsx(Bbe,{content:o,canonicalPathRo:`/${n.slug_ro}`,canonicalPathEn:`/${n.slug_en}`,heroImage:n.image_url||void 0})}const sA=[{id:"wallet-setup",slug:"wallet-setup",title:{ro:"Creează un Portofel Crypto",en:"Create a Crypto Wallet"},shortDescription:{ro:"Învață cum funcționează un portofel digital: seed phrase, cheie publică, backup.",en:"Learn how a digital wallet works: seed phrase, public key, backup."},difficulty:"beginner",icon:"👛",estimatedMinutes:5,reward:15,steps:[{id:"ws-1",title:{ro:"Ce este un portofel crypto?",en:"What is a crypto wallet?"},description:{ro:"Un portofel crypto nu stochează monede fizice — el păstrează cheile private care îți permit accesul la activele tale pe blockchain. Gândește-te la el ca la o aplicație bancară, dar fără bancă.",en:"A crypto wallet doesn't store physical coins — it keeps private keys that allow access to your assets on the blockchain. Think of it like a banking app, but without the bank."},type:"info"},{id:"ws-2",title:{ro:"Generează Seed Phrase",en:"Generate Seed Phrase"},description:{ro:"Sistemul generează acum un set de 12 cuvinte (seed phrase). Acestea sunt cheia ta de recuperare. NICIODATĂ nu le partaja cu nimeni! Câte cuvinte conține un seed phrase standard?",en:"The system now generates a set of 12 words (seed phrase). These are your recovery key. NEVER share them with anyone! How many words does a standard seed phrase contain?"}
3188,type:"choice",options:[{label:{ro:"6 cuvinte",en:"6 words"},correct:!1},{label:{ro:"12 cuvinte",en:"12 words"},correct:!0},{label:{ro:"20 cuvinte",en:"20 words"},correct:!1},{label:{ro:"4 cuvinte",en:"4 words"},correct:!1}],hint:{ro:"Standardul BIP-39 folosește de obicei 12 sau 24 de cuvinte.",en:"The BIP-39 standard typically uses 12 or 24 words."}},{id:"ws-3",title:{ro:"Backup-ul Seed Phrase",en:"Seed Phrase Backup"},description:{ro:"Unde este cel mai sigur loc să stochezi seed phrase-ul? Alege opțiunea corectă.",en:"Where is the safest place to store your seed phrase? Choose the correct option."},type:"choice",options:[{label:{ro:"Într-un fișier pe desktop",en:"In a file on desktop"},correct:!1},{label:{ro:"Pe o hârtie într-un loc sigur",en:"On paper in a safe place"},correct:!0},{label:{ro:"Într-un mesaj pe WhatsApp",en:"In a WhatsApp message"},correct:!1},{label:{ro:"Ca screenshot în telefon",en:"As a phone screenshot"},correct:!1}],hint:{ro:"Orice metodă digitală poate fi hackuită. Hârtia offline este cea mai sigură.",en:"Any digital method can be hacked. Offline paper is the safest."}},{id:"ws-4",title:{ro:"Adresa Publică",en:"Public Address"},description:{ro:"Portofelul tău a fost creat! Adresa ta publică este ca un IBAN — o poți partaja oricui pentru a primi fonduri. Adresa ta publică simulată: 0x7a3B...f9E2. Poți partaja adresa publică cu alții?",en:"Your wallet has been created! Your public address is like an IBAN — you can share it with anyone to receive funds. Your simulated public address: 0x7a3B...f9E2. Can you share your public address with others?"},type:"choice",options:[{label:{ro:"Da, este sigur",en:"Yes, it's safe"},correct:!0},{label:{ro:"Nu, niciodată",en:"No, never"},correct:!1}],walletEffect:{balanceChange:1.5,addTx:{type:"receive",description:{ro:"Fonduri de test primite",en:"Test funds received"},amount:"1.5 ETH"}}},{id:"ws-5",title:{ro:"Felicitări! 🎉",en:"Congratulations! 🎉"},description:{ro:"Ai creat cu succes un portofel crypto simulat! Ai învățat despre seed phrase, backup securizat și adresa publică. Portofelul tău virtual are acum 1.5 ETH de test.",en:"You've successfully created a simulated crypto wallet! You learned about seed phrases, secure backup, and public addresses. Your virtual wallet now has 1.5 test ETH."},type:"info"}]},{id:"first-transaction",slug:"first-transaction",title:{ro:"Prima Tranzacție",en:"First Transaction"},shortDescription:{ro:"Trimite ETH virtual, înțelege gas fees și confirmările pe blockchain.",en:"Send virtual ETH, understand gas fees and blockchain confirmations."},difficulty:"beginner",icon:"💸",estimatedMinutes:7,reward:15,steps:[{id:"ft-1",title:{ro:"Verifică Balanța",en:"Check Balance"},description:{ro:'Portofelul tău virtual are 1.5 ETH. Pentru a trimite o tranzacție, ai nevoie de ETH pentru valoare + gas fees (comision de rețea). Ce reprezintă "gas" într-o tranzacție Ethereum?',en:'Your virtual wallet has 1.5 ETH. To send a transaction, you need ETH for value + gas fees (network fee). What does "gas" represent in an Ethereum transaction?'},type:"choice",options:[{label:{ro:"Combustibil real",en:"Real fuel"},correct:!1},{label:{ro:"Comisionul de procesare al rețelei",en:"Network processing fee"},correct:!0},{label:{ro:"Un tip de token",en:"A type of token"},correct:!1}],hint:{ro:"Gas-ul este unitatea de măsură pentru efortul computațional necesar procesării tranzacției.",en:"Gas is the unit measuring the computational effort needed to process the transaction."}},{id:"ft-2",title:{ro:"Setează Tranzacția",en:"Set Up Transaction"},description:{ro:"Vrei să trimiți 0.1 ETH la adresa 0x4B2...c8D1. Gas fee estimat: 0.002 ETH. Cât ETH vei cheltui în total?",en:"You want to send 0.1 ETH to address 0x4B2...c8D1. Estimated gas fee: 0.002 ETH. How much ETH will you spend in total?"},type:"choice",options:[{label:{ro:"0.1 ETH",en:"0.1 ETH"},correct:!1},{label:{ro:"0.102 ETH",en:"0.102 ETH"},correct:!0},{label:{ro:"0.2 ETH",en:"0.2 ETH"},correct:!1}],hint:{ro:"Totalul = valoare trimisă + gas fee.",en:"Total = value sent + gas fee."}}
3188,{id:"ft-3",title:{ro:"Confirmă Tranzacția",en:"Confirm Transaction"},description:{ro:`Revizuiește tranzacția:
3189• Destinatar: 0x4B2...c8D1
3190• Sumă: 0.1 ETH
3191• Gas fee: 0.002 ETH
3192• Total: 0.102 ETH
3193
3194Confirmă tranzacția pentru a o trimite în rețea.`,en:`Review the transaction:
3195• Recipient: 0x4B2...c8D1
3196• Amount: 0.1 ETH
3197• Gas fee: 0.002 ETH
3198• Total: 0.102 ETH
3199
3200Confirm the transaction to send it to the network.`},type:"confirm",walletEffect:{balanceChange:-.102,addTx:{type:"send",description:{ro:"Trimis la 0x4B2...c8D1",en:"Sent to 0x4B2...c8D1"},amount:"0.102 ETH"}}},{id:"ft-4",title:{ro:"Confirmări pe Blockchain",en:"Blockchain Confirmations"},description:{ro:"Tranzacția ta a fost trimisă! ⏳ Aceasta trebuie confirmată de mineri/validatori. De câte confirmări ai nevoie de obicei pentru a considera o tranzacție sigură?",en:"Your transaction has been sent! ⏳ It needs to be confirmed by miners/validators. How many confirmations do you typically need to consider a transaction safe?"},type:"choice",options:[{label:{ro:"1 confirmare",en:"1 confirmation"},correct:!1},{label:{ro:"12+ confirmări",en:"12+ confirmations"},correct:!0},{label:{ro:"100 confirmări",en:"100 confirmations"},correct:!1}]},{id:"ft-5",title:{ro:"Tranzacție Reușită! ✅",en:"Transaction Successful! ✅"},description:{ro:"Tranzacția ta a primit 12 confirmări și este acum finalizată! Balanța ta este acum 1.398 ETH. Ai învățat cum funcționează tranzacțiile pe Ethereum.",en:"Your transaction received 12 confirmations and is now finalized! Your balance is now 1.398 ETH. You learned how Ethereum transactions work."},type:"info"}]},{id:"dex-swap",slug:"dex-swap",title:{ro:"Token Swap pe DEX",en:"Token Swap on DEX"},shortDescription:{ro:"Simulează un swap de tokeni pe un exchange descentralizat cu slippage și liquidity pools.",en:"Simulate a token swap on a decentralized exchange with slippage and liquidity pools."},difficulty:"intermediate",icon:"🔄",estimatedMinutes:8,reward:15,steps:[{id:"ds-1",title:{ro:"Ce este un DEX?",en:"What is a DEX?"},description:{ro:"Un DEX (Decentralized Exchange) îți permite să faci swap între tokeni direct din portofel, fără intermediari. Exemplu: Uniswap, SushiSwap. Care este diferența principală între un DEX și un exchange centralizat (CEX)?",en:"A DEX (Decentralized Exchange) allows you to swap tokens directly from your wallet, without intermediaries. Example: Uniswap, SushiSwap. What is the main difference between a DEX and a centralized exchange (CEX)?"},type:"choice",options:[{label:{ro:"DEX necesită KYC",en:"DEX requires KYC"},correct:!1},{label:{ro:"DEX nu deține fondurile tale",en:"DEX doesn't hold your funds"},correct:!0},{label:{ro:"DEX e mai rapid",en:"DEX is faster"},correct:!1}],hint:{ro:'"Not your keys, not your crypto" — pe un DEX, tu controlezi mereu cheile.',en:'"Not your keys, not your crypto" — on a DEX, you always control the keys.'}},{id:"ds-2",title:{ro:"Liquidity Pools",en:"Liquidity Pools"},description:{ro:"Un DEX folosește liquidity pools — fonduri blocate de utilizatori care permit schimburile. Furnizorii de lichiditate câștigă comisioane din fiecare swap. Cine furnizează lichiditatea pe un DEX?",en:"A DEX uses liquidity pools — funds locked by users that enable swaps. Liquidity providers earn fees from each swap. Who provides liquidity on a DEX?"},type:"choice",options:[{label:{ro:"Banca centrală",en:"The central bank"},correct:!1},{label:{ro:"Utilizatorii obișnuiți",en:"Regular users"},correct:!0},{label:{ro:"Guvernul",en:"The government"},correct:!1}]},{id:"ds-3",title:{ro:"Setează Swap-ul",en:"Set Up the Swap"},description:{ro:"Vrei să faci swap 0.5 ETH → USDC. Rata curentă: 1 ETH = 2,500 USDC. Slippage setat: 0.5%. Cât USDC vei primi aproximativ?",en:"You want to swap 0.5 ETH → USDC. Current rate: 1 ETH = 2,500 USDC. Slippage set: 0.5%. How much USDC will you approximately receive?"},type:"choice",options:[{label:{ro:"~1,250 USDC",en:"~1,250 USDC"},correct:!0},{label:{ro:"~2,500 USDC",en:"~2,500 USDC"},correct:!1},{label:{ro:"~500 USDC",en:"~500 USDC"},correct:!1}],hint:{ro:"0.5 × 2,500 = 1,250 USDC (minus slippage minim).",en:"0.5 × 2,500 = 1,250 USDC (minus minimal slippage)."}},{id:"ds-4",title:{ro:"Ce este Slippage?",en:"What is Slippage?"},description:{ro:"Slippage-ul este diferența dintre prețul așteptat și prețul real al swap-ului. Un slippage de 0.5% înseamnă că accepți o variație de maxim 0.5% față de preț. Ce se întâmplă dacă slippage-ul depășește limita setată?",en:"Slippage is the difference between the expected and actual swap price. A 0.5% slippage means you accept a maximum 0.5% price variation. What happens if slippage exceeds the set limit?"}
3200,type:"choice",options:[{label:{ro:"Tranzacția se execută oricum",en:"Transaction executes anyway"},correct:!1},{label:{ro:"Tranzacția eșuează automat",en:"Transaction fails automatically"},correct:!0},{label:{ro:"Primești mai mulți tokeni",en:"You receive more tokens"},correct:!1}]},{id:"ds-5",title:{ro:"Execută Swap-ul",en:"Execute the Swap"},description:{ro:`Revizuiește swap-ul:
3201• Trimiți: 0.5 ETH
3202• Primești: ~1,243.75 USDC
3203• Slippage: 0.5%
3204• Gas fee: 0.003 ETH
3205
3206Confirmă swap-ul.`,en:`Review the swap:
3207• Send: 0.5 ETH
3208• Receive: ~1,243.75 USDC
3209• Slippage: 0.5%
3210• Gas fee: 0.003 ETH
3211
3212Confirm the swap.`},type:"confirm",walletEffect:{balanceChange:-.503,tokenChange:{symbol:"USDC",amount:1243.75},addTx:{type:"swap",description:{ro:"Swap 0.5 ETH → 1,243.75 USDC",en:"Swap 0.5 ETH → 1,243.75 USDC"},amount:"0.503 ETH"}}},{id:"ds-6",title:{ro:"Swap Reușit! 🎉",en:"Swap Successful! 🎉"},description:{ro:"Ai realizat cu succes un token swap pe un DEX! Ai învățat despre liquidity pools, slippage și cum funcționează exchange-urile descentralizate.",en:"You've successfully completed a token swap on a DEX! You learned about liquidity pools, slippage, and how decentralized exchanges work."},type:"info"}]}];function jPt({simulation:e,completed:r,onSelect:n}){const{lang:i}=Pt();return s.jsxs("button",{onClick:n,className:"group relative w-full text-left rounded-xl border border-border bg-card p-5 hover:border-primary/50 hover:shadow-lg transition-all duration-200",children:[r&&s.jsx("div",{className:"absolute top-3 right-3",children:s.jsx(hn,{className:"h-5 w-5 text-green-500"})}),s.jsx("div",{className:"text-3xl mb-3",children:e.icon}),s.jsx("h3",{className:"font-heading font-bold text-foreground mb-1.5 group-hover:text-primary transition-colors",children:e.title[i]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2",children:e.shortDescription[i]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[s.jsx(at,{variant:"outline",className:"text-[10px]",children:e.difficulty}),s.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[s.jsx(ki,{className:"h-3 w-3"}),e.estimatedMinutes," min"]}),s.jsxs(at,{variant:"secondary",className:"text-[10px]",children:["+",e.reward," EduCoins"]})]}),s.jsx(hs,{className:"absolute right-4 bottom-5 h-4 w-4 text-muted-foreground group-hover:text-primary transition-colors"})]})}function _Pt({balance:e,tokens:r=[],transactions:n,address:i="0x7a3B...f9E2"}){const{lang:a}=Pt(),o=a==="ro",l=c=>{switch(c){case"send":return s.jsx(qoe,{className:"h-3.5 w-3.5 text-red-400"});case"receive":return s.jsx(zSe,{className:"h-3.5 w-3.5 text-green-400"});case"swap":return s.jsx(Gh,{className:"h-3.5 w-3.5 text-blue-400"})}};return s.jsxs("div",{className:"rounded-xl border border-border bg-card p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[s.jsx(QU,{className:"h-4 w-4 text-primary"}),s.jsx("span",{children:o?"Portofel Virtual":"Virtual Wallet"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("p",{className:"text-2xl font-bold font-heading text-foreground",children:[e.toFixed(4)," ETH"]}),s.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:i})]}),r.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(c=>s.jsxs("span",{className:"text-xs bg-muted px-2 py-1 rounded-md font-medium",children:[c.amount.toLocaleString()," ",c.symbol]},c.symbol))}),n.length>0&&s.jsxs("div",{className:"border-t border-border pt-2 space-y-1.5",children:[s.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:o?"Tranzacții":"Transactions"}),n.map((c,u)=>s.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[l(c.type),s.jsx("span",{className:"text-foreground",children:c.description[a]}),s.jsx("span",{className:"ml-auto text-muted-foreground",children:c.amount})]},u))]})]})}function CPt({simulation:e,onComplete:r,onBack:n}){const{lang:i}=Pt(),{user:a}=Fn(),{awardCoins:o}=Cp(),l=i==="ro",[c,u]=w.useState(0),[d,h]=w.useState(null),[f,p]=w.useState(null),[m,A]=w.useState(!1),[g,y]=w.useState(!1),[x,b]=w.useState(!1),[v,j]=w.useState(1.5),[_,C]=w.useState([]),[N,S]=w.useState([]),E=e.steps[c],O=c===e.steps.length-1,B=(c+1)/e.steps.length*100,T=w.useCallback(D=>{if(!D.walletEffect)return;const L=D.walletEffect;L.balanceChange&&j(V=>Math.max(0,+(V+L.balanceChange).toFixed(4))),L.tokenChange&&C(V=>V.find(Q=>Q.symbol===L.tokenChange.symbol)?V.map(Q=>Q.symbol===L.tokenChange.symbol?{...Q,amount:Q.amount+L.tokenChange.amount}:Q):[...V,L.tokenChange]),L.addTx&&S(V=>[...V,L.addTx])},[]),F=w.useCallback(()=>
3212{if(!(E.type==="choice"&&d===null)){if(E.type==="choice"){if(!E.options[d].correct){p("wrong");return}p("correct"),T(E),setTimeout(()=>{p(null),h(null),A(!1),I()},800);return}E.type==="confirm"&&T(E),I()}},[c,d,E]),I=async()=>{if(O){if(localStorage.setItem(`sim_${e.id}`,"true"),y(!0),a){const D=await o(e.reward,"simulation_complete");D.success?(localStorage.setItem(`sim_rewarded_${e.id}`,"true"),b(!0),ft.success(l?`+${D.coinsAwarded||e.reward} EduCoins creditați!`:`+${D.coinsAwarded||e.reward} EduCoins credited!`)):D.reason==="duplicate"||D.reason==="client_dedup"?(localStorage.setItem(`sim_rewarded_${e.id}`,"true"),b(!0),ft.info(l?"Simulare deja recompensată!":"Simulation already rewarded!")):D.reason==="daily_cap"?ft.warning(l?"Limita zilnică de EduCoins atinsă. Revino mâine!":"Daily EduCoins limit reached. Come back tomorrow!"):(ft.error(l?"Simulare completată, dar recompensa nu a putut fi creditată.":"Simulation completed, but reward could not be credited."),console.warn("EduCoins award failed:",D.reason))}else ft.info(l?"Simulare completată! Autentifică-te pentru EduCoins.":"Simulation completed! Sign in to earn EduCoins.");r()}else u(D=>D+1),h(null),p(null),A(!1)};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[s.jsxs(me,{variant:"ghost",size:"sm",onClick:n,children:[s.jsx(rn,{className:"h-4 w-4 mr-1"}),l?"Înapoi":"Back"]}),s.jsx("h2",{className:"font-heading font-bold text-lg text-foreground flex-1",children:e.title[i]}),s.jsx(Le.div,{animate:g?{scale:[1,1.2,1]}:{},transition:{duration:.5},children:s.jsxs(at,{className:`flex items-center gap-1.5 ${x?"bg-green-500/20 text-green-600 border-green-500/30":"bg-accent/10 text-accent border-accent/20"}`,children:[s.jsx(Wi,{className:"h-3.5 w-3.5"}),"+",e.reward," EduCoins"]})})]}),s.jsx(ql,{value:B,className:"h-2"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:l?`Pasul ${c+1} din ${e.steps.length}`:`Step ${c+1} of ${e.steps.length}`}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx("div",{className:"md:col-span-2 space-y-4",children:s.jsxs("div",{className:"rounded-xl border border-border bg-card p-5 space-y-4",children:[s.jsx("h3",{className:"font-heading font-bold text-foreground",children:E.title[i]}),s.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line leading-relaxed",children:E.description[i]}),E.type==="choice"&&E.options&&s.jsx("div",{className:"space-y-2",children:E.options.map((D,L)=>s.jsx("button",{onClick:()=>{h(L),p(null)},className:`w-full text-left p-3 rounded-lg border text-sm transition-all ${d===L?f==="wrong"?"border-red-500 bg-red-500/10":f==="correct"?"border-green-500 bg-green-500/10":"border-primary bg-primary/10":"border-border hover:border-muted-foreground/50"}`,children:D.label[i]},L))}),f==="wrong"&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-red-500",children:[s.jsx(Yh,{className:"h-4 w-4"}),l?"Răspuns greșit. Încearcă din nou!":"Wrong answer. Try again!"]}),f==="correct"&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-500",children:[s.jsx(hn,{className:"h-4 w-4"}),l?"Corect!":"Correct!"]}),E.hint&&!m&&f==="wrong"&&s.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>A(!0),className:"text-xs",children:[s.jsx(Ag,{className:"h-3.5 w-3.5 mr-1"}),l?"Arată indiciu":"Show hint"]}),m&&E.hint&&s.jsxs("div",{className:"text-xs bg-muted/50 p-3 rounded-lg text-muted-foreground border border-border",children:["💡 ",E.hint[i]]}),s.jsx("div",{className:"pt-2",children:s.jsxs(me,{onClick:F,className:"gap-2",children:[E.type==="confirm"?l?"✅ Confirmă":"✅ Confirm":O?l?"🎉 Finalizează":"🎉 Finish":l?"Continuă":"Continue",s.jsx(Gt,{className:"h-4 w-4"})]})})]})}),s.jsx("div",{className:"md:col-span-1",children:s.jsx(_Pt,{balance:v,tokens:_,transactions:N})})]})]})}function NPt(){const{lang:e}=Pt(),r=e==="ro",[n,i]=w.useState(null),{user:a}=Fn(),{data:o}=ide();Zr({title:r?"Simulări Interactive Web3 | EduWeb":"Interactive Web3 Simulations | EduWeb",description:r?"Exersează concepte Web3 fără risc: portofel virtual, tranzacții simulate, swap pe DEX.":"Practice Web3 concepts risk-free: virtual wallet, simulated transactions, DEX swaps."});const l=p=>localStorage.getItem(`sim_${p}`)==="true",c=p=>localStorage.getItem(`sim_rewarded_${p}`)==="true",u=sA.find(p=>p.id===n),d=sA.filter(p=>l(p.id)).length;sA.filter(p=>c(p.id)).length;
3212const h=sA.filter(p=>c(p.id)).reduce((p,m)=>p+m.reward,0),f=o?_p(o.validatedEduScore??o.totalEarned??0):null;return s.jsx(Ft,{children:s.jsx("div",{className:"container py-10 max-w-5xl",children:u?s.jsx(CPt,{simulation:u,onComplete:()=>i(null),onBack:()=>i(null)}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-center mb-8 space-y-3",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/10 text-primary rounded-full px-4 py-1.5 text-sm font-medium mb-2",children:[s.jsx(Eu,{className:"h-4 w-4"}),r?"Sandbox Educațional":"Educational Sandbox"]}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold text-foreground",children:r?"Simulări Interactive Web3":"Interactive Web3 Simulations"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:r?"Exersează concepte blockchain și crypto într-un mediu sigur, fără risc real. Câștigă EduCoins la fiecare simulare completată!":"Practice blockchain and crypto concepts in a safe environment, with no real risk. Earn EduCoins for each completed simulation!"}),a&&o?s.jsxs(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"inline-flex items-center gap-3 bg-accent/10 border border-accent/20 rounded-full px-5 py-2 mt-2",children:[s.jsx(Wi,{className:"h-5 w-5 text-accent"}),s.jsxs("span",{className:"font-bold text-accent",children:[o.balance," EduCoins"]}),f&&s.jsxs("span",{className:"text-xs opacity-70",children:[f.icon," ",f.name]}),s.jsx(be,{to:"/edu-coins",className:"text-xs text-primary underline underline-offset-2 hover:text-primary/80",children:r?"Vezi detalii":"View details"})]}):a?null:s.jsxs(be,{to:"/autentificare",className:"inline-flex items-center gap-2 text-sm text-primary hover:text-primary/80 mt-2 underline underline-offset-2",children:[s.jsx(a4,{className:"h-4 w-4"}),r?"Autentifică-te pentru a câștiga EduCoins":"Sign in to earn EduCoins"]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:sA.map(p=>s.jsx(jPt,{simulation:p,completed:l(p.id),onSelect:()=>i(p.id)},p.id))}),s.jsxs(Le.div,{initial:{opacity:0}
3212,animate:{opacity:1},transition:{delay:.3},className:"mt-6 text-center text-sm text-muted-foreground flex items-center justify-center gap-2",children:[s.jsx(hn,{className:"h-4 w-4 text-primary"}),r?`${d}/${sA.length} simulări completate · ${h} EduCoins creditați`:`${d}/${sA.length} simulations completed · ${h} EduCoins credited`]})]})})})}const SPt=()=>{const{lang:e}=Pt(),[r,n]=w.useState(null),[i,a]=w.useState(!1),[o,l]=w.useState("desktop");w.useEffect(()=>{const d=navigator.userAgent;/iPad|iPhone|iPod/.test(d)?l("ios"):/Android/.test(d)?l("android"):l("desktop"),window.matchMedia("(display-mode: standalone)").matches&&a(!0);const h=f=>{f.preventDefault(),n(f)};return window.addEventListener("beforeinstallprompt",h),()=>window.removeEventListener("beforeinstallprompt",h)},[]);const c=async()=>{if(!r)return;await r.prompt();const{outcome:d}=await r.userChoice;d==="accepted"&&a(!0),n(null)},u=e==="ro";return i?s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-2xl mx-auto py-16 px-4 text-center",children:[s.jsx(hn,{className:"w-16 h-16 text-green-500 mx-auto mb-6"}),s.jsx("h1",{className:"text-3xl font-bold mb-4",children:u?"Aplicația este instalată!":"App is installed!"}),s.jsx("p",{className:"text-muted-foreground text-lg",children:u?"Poți deschide EduWeb direct de pe ecranul principal al telefonului.":"You can open EduWeb directly from your home screen."})]})}):s.jsx(Ft,{children:s.jsxs("div",{className:"container max-w-2xl mx-auto py-12 px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx(d4,{className:"w-14 h-14 text-primary mx-auto mb-4"}),s.jsx("h1",{className:"text-3xl font-bold mb-3",children:u?"Instalează aplicația EduWeb":"Install the EduWeb App"}),s.jsx("p",{className:"text-muted-foreground text-lg",children:u?"Accesează EduWeb ca o aplicație nativă, direct de pe ecranul principal. Fără App Store, fără descărcare.":"Access EduWeb as a native app, right from your home screen. No App Store, no download needed."})]}),r&&s.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 mb-8 text-center",children:[s.jsx(Wl,{className:"w-10 h-10 text-primary mx-auto mb-4"}),s.jsx("h2",{className:"text-xl font-semibold mb-3",children:u?"Instalare rapidă":"Quick Install"}),s.jsxs(me,{size:"lg",onClick:c,className:"gap-2",children:[s.jsx(Wl,{className:"w-5 h-5"}),u?"Instalează EduWeb":"Install EduWeb"]})]}),o==="ios"&&s.jsx(pre,{isRo:u}),o==="android"&&!r&&s.jsx(Are,{isRo:u}),o==="desktop"&&!r&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 mb-6 text-center",children:[s.jsx(ale,{className:"w-10 h-10 text-muted-foreground mx-auto mb-4"}),s.jsx("h2",{className:"text-xl font-semibold mb-3",children:u?"Deschide pe telefon pentru instalare":"Open on your phone to install"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:u?"Scanează QR-ul sau deschide eduweb.ro/instaleaza pe telefon. Mai jos vezi instrucțiunile pentru fiecare platformă.":"Open eduweb.ai/install on your phone. Below you can see instructions for each platform."})]}),s.jsx(pre,{isRo:u}),s.jsx(Are,{isRo:u})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 mt-8",children:[{emoji:"⚡",title:u?"Acces instant":"Instant access",desc:u?"Fără App Store sau descărcare":"No App Store or download"},{emoji:"🔄",title:u?"Mereu actualizat":"Always updated",desc:u?"Conținut în timp real":"Real-time content"},{emoji:"📱",title:u?"Experiență nativă":"Native experience",desc:u?"Ecran complet, fără bară browser":"Full screen, no browser bar"}].map(d=>s.jsxs("div",{className:"bg-card border border-border rounded-lg p-4 text-center",children:[s.jsx("span",{className:"text-2xl mb-2 block",children:d.emoji}),s.jsx("h3",{className:"font-semibold mb-1",children:d.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:d.desc})]},d.title))})]})})},pre=({isRo:e})=>s.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("span",{className:"text-2xl",children:"🍎"}),s.jsx("h2",{className:"text-xl font-semibold",children:e?"Instrucțiuni pentru iPhone / iPad":"Instructions for iPhone / iPad"})]}
3212),s.jsx(Fm,{number:1,title:e?"Deschide în Safari":"Open in Safari",description:e?"Aplicația se poate instala DOAR din Safari. Dacă ești în Chrome sau alt browser, copiază linkul și deschide-l în Safari.":"The app can ONLY be installed from Safari. If you're in Chrome or another browser, copy the link and open it in Safari.",children:s.jsxs("div",{className:"bg-secondary/50 rounded-lg p-3 flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500 flex items-center justify-center flex-shrink-0",children:s.jsx("span",{className:"text-white text-lg font-bold",children:"S"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:e?"Caută iconița Safari":"Look for the Safari icon"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:e?"Busola albastră de pe ecranul principal":"The blue compass on your home screen"})]})]})}),s.jsx(Fm,{number:2,title:e?"Apasă pe butonul Share (Partajare)":"Tap the Share button",description:e?"Caută iconița de partajare în bara de jos a Safari-ului. Este un pătrat cu o săgeată care iese în sus.":"Find the share icon in Safari's bottom bar. It's a square with an arrow pointing up.",children:s.jsxs("div",{className:"bg-secondary/50 rounded-lg p-4 flex flex-col items-center gap-2",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-14 h-14 rounded-xl border-2 border-primary/50 bg-primary/10 flex items-center justify-center",children:s.jsx(TV,{className:"w-7 h-7 text-primary"})}),s.jsx("div",{className:"absolute -bottom-1 -right-1 w-5 h-5 rounded-full bg-red-500 flex items-center justify-center",children:s.jsx(Dv,{className:"w-3 h-3 text-white rotate-180"})})]}),s.jsx("p",{className:"text-xs text-muted-foreground text-center mt-1",children:e?"↑ Această iconiță, în bara de jos":"↑ This icon, in the bottom bar"}),s.jsx("div",{className:"w-full mt-2 bg-muted/50 rounded-lg p-2",children:s.jsxs("div",{className:"flex items-center justify-around",children:[s.jsxs("div",{className:"flex flex-col items-center gap-1 opacity-40",children:[s.jsx("div",{className:"w-8 h-8 rounded bg-muted"}),s.jsx("span",{className:"text-[10px]",children:"←"})]}),s.jsxs("div",{className:"flex flex-col items-center gap-1 opacity-40",children:[s.jsx("div",{className:"w-8 h-8 rounded bg-muted"}),s.jsx("span",{className:"text-[10px]",children:"→"})]}),s.jsxs("div",{className:"flex flex-col items-center gap-1",children:[s.jsx("div",{className:"w-8 h-8 rounded bg-primary/20 flex items-center justify-center ring-2 ring-primary",children:s.jsx(TV,{className:"w-4 h-4 text-primary"})}),s.jsx("span",{className:"text-[10px] text-primary font-bold",children:"Share"})]}),s.jsxs("div",{className:"flex flex-col items-center gap-1 opacity-40",children:[s.jsx("div",{className:"w-8 h-8 rounded bg-muted"}),s.jsx("span",{className:"text-[10px]",children:"📑"})]}),s.jsxs("div",{className:"flex flex-col items-center gap-1 opacity-40",children:[s.jsx("div",{className:"w-8 h-8 rounded bg-muted"}),s.jsx("span",{className:"text-[10px]",children:"⊞"})]})]})})]})}),s.jsx(Fm,{number:3,title:e?'Selectează "Adaugă pe ecranul principal"':'Select "Add to Home Screen"',description:e?"Derulează în jos în meniul de partajare până găsești opțiunea. Are iconița unui pătrat cu semnul plus (+).":"Scroll down in the share menu until you find this option. It has a square icon with a plus (+) sign.",children:s.jsxs("div",{className:"bg-secondary/50 rounded-lg p-3 space-y-2",children:[s.jsx(ZF,{icon:"📋",label:e?"Copiază":"Copy",faded:!0}),s.jsx(ZF,{icon:"🖨️",label:e?"Printează":"Print",faded:!0}),s.jsxs("div",{className:"flex items-center gap-3 p-2.5 rounded-lg bg-primary/10 border border-primary/30",children:[s.jsx("div",{className:"w-8 h-8 rounded bg-primary/20 flex items-center justify-center flex-shrink-0",children:s.jsx(Qn,{className:"w-5 h-5 text-primary"})}),s.jsx("div",{children:s.jsx("p",{className:"text-sm font-semibold text-primary",children:e?"Adaugă pe ecranul principal":"Add to Home Screen"})}),s.jsx(Dv,{className:"w-4 h-4 text-primary ml-auto -rotate-90"})]}),s.jsx(ZF,{icon:"📌",label:e?"Adaugă la favorite":"Add to Favorites",faded:!0})]})}),s.jsx(Fm,{number:4,title:e?'Apasă "Adaugă" și gata!':'Tap "Add" and done!',description:e?'Apasă butonul "Adaugă" din colțul din dreapta sus. EduWeb va apărea ca aplicație pe ecranul tău principal!':'Tap the "Add" button in the top-right corner. EduWeb will appear as an app on your home screen!',isLast:!0,children:s.jsxs("div",{className:"bg-secondary/50 rounded-lg p-4 flex flex-col items-center gap-3",children:[s.jsxs("div",{className:"w-full flex items-center justify-between px-2",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:e?"Anulează":"Cancel"}),s.jsx("span",{className:"text-sm font-semibold",children:e?"Adaugă pe ecran":"Add to Home"}),s.jsx("span",{className:"text-sm font-bold text-primary px-3 py-1 rounded-lg bg-primary/10 ring-2 ring-primary",children:e?"Adaugă":"Add"})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/20 flex items-center justify-center",children:s.jsx("span",{className:"text-lg font-bold text-primary",children:"E"})}),s.jsx("span",{className:"font-medium",children:"EduWeb"})]})]})})]}),Are=({isRo:e})=>s.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("span",{className:"text-2xl",children:"🤖"}),s.jsx("h2",{className:"text-xl font-semibold",children:e?"Instrucțiuni pentru Android":"Instructions for Android"})]}
3212),s.jsx(Fm,{number:1,title:e?"Deschide în Chrome":"Open in Chrome",description:e?"Deschide site-ul eduweb.ro în browserul Chrome. Funcționează și din Samsung Internet sau alte browsere Chromium.":"Open eduweb.ai in Chrome browser. Also works from Samsung Internet or other Chromium browsers.",children:s.jsxs("div",{className:"bg-secondary/50 rounded-lg p-3 flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-full bg-green-500/20 flex items-center justify-center flex-shrink-0",children:s.jsx("span",{className:"text-lg",children:"🌐"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Chrome / Samsung Internet"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:e?"Cel mai bun cu Chrome":"Works best with Chrome"})]})]})}),s.jsx(Fm,{number:2,title:e?"Apasă pe cele 3 puncte (⋮)":"Tap the 3 dots (⋮)",description:e?"Caută cele 3 puncte verticale în colțul din DREAPTA SUS al ecranului. Aceasta deschide meniul Chrome.":"Find the 3 vertical dots in the TOP RIGHT corner of the screen. This opens the Chrome menu.",children:s.jsxs("div",{className:"bg-secondary/50 rounded-lg p-4 flex flex-col items-center gap-3",children:[s.jsxs("div",{className:"w-full bg-muted/80 rounded-lg p-3 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-5 h-5 rounded bg-muted"}),s.jsx("div",{className:"w-32 h-4 rounded bg-muted"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-6 h-6 rounded bg-muted"}),s.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/20 flex items-center justify-center ring-2 ring-primary",children:s.jsx(Xoe,{className:"w-5 h-5 text-primary"})})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground text-center",children:e?"↑ Cele 3 puncte verticale, colțul dreapta sus":"↑ The 3 vertical dots, top-right corner"})]})}),s.jsx(Fm,{number:3,title:e?'Selectează "Instalează aplicația"':'Select "Install app"',description:e?'În meniul care apare, caută opțiunea "Instalează aplicația" sau "Adaugă pe ecranul principal". Poate fi nevoie să derulezi puțin în jos.':'In the menu that appears, look for "Install app" or "Add to Home Screen". You may need to scroll down a bit.',children:s.jsxs("div",{className:"bg-secondary/50 rounded-lg p-3 space-y-1.5",children:[s.jsx(cS,{label:e?"Tab nou":"New tab",faded:!0}),s.jsx(cS,{label:e?"Tab incognito nou":"New incognito tab",faded:!0}),s.jsx(cS,{label:e?"Marcaje":"Bookmarks",faded:!0}),s.jsxs("div",{className:"flex items-center gap-3 p-2.5 rounded-lg bg-primary/10 border border-primary/30",children:[s.jsx("div",{className:"w-7 h-7 rounded bg-primary/20 flex items-center justify-center flex-shrink-0",children:s.jsx(Wl,{className:"w-4 h-4 text-primary"})}),s.jsx("p",{className:"text-sm font-semibold text-primary",children:e?"Instalează aplicația":"Install app"})]}),s.jsx(cS,{label:e?"Setări":"Settings",faded:!0})]})}),s.jsx(Fm,{number:4,title:e?"Confirmă instalarea":"Confirm installation",description:e?'Apasă "Instalează" în dialogul de confirmare. EduWeb va apărea ca aplicație pe ecranul tău principal!':'Tap "Install" in the confirmation dialog. EduWeb will appear as an app on your home screen!',isLast:!0,children:s.jsx("div",{className:"bg-secondary/50 rounded-lg p-4",children:s.jsxs("div",{className:"border border-border rounded-xl p-4 bg-background",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/20 flex items-center justify-center",children:s.jsx("span",{className:"text-lg font-bold text-primary",children:"E"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-sm",children:"EduWeb"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"eduweb.ro"})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("button",{className:"flex-1 py-2 rounded-lg border border-border text-sm text-muted-foreground",children:e?"Anulează":"Cancel"}),s.jsx("button",{className:"flex-1 py-2 rounded-lg bg-primary text-primary-foreground text-sm font-semibold ring-2 ring-primary/50",children:e?"Instalează":"Install"})]})]})})})]}
3212),Fm=({number:e,title:r,description:n,children:i,isLast:a=!1})=>s.jsxs("div",{className:`relative ${a?"pb-2":"pb-8"}`,children:[!a&&s.jsx("div",{className:"absolute left-5 top-12 bottom-0 w-0.5 bg-primary/20"}),s.jsxs("div",{className:"flex gap-4 items-start mb-3",children:[s.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-primary text-primary-foreground flex items-center justify-center font-bold text-lg z-10",children:e}),s.jsxs("div",{className:"pt-1.5",children:[s.jsx("h3",{className:"font-semibold text-base",children:r}),s.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:n})]})]}),s.jsx("div",{className:"ml-14",children:i})]}),ZF=({icon:e,label:r,faded:n})=>s.jsxs("div",{className:`flex items-center gap-3 p-2 rounded-lg ${n?"opacity-40":""}`,children:[s.jsx("span",{className:"text-base",children:e}),s.jsx("span",{className:"text-sm",children:r})]}),cS=({label:e,faded:r})=>s.jsxs("div",{className:`flex items-center gap-3 p-2 rounded-lg ${r?"opacity-40":""}`,children:[s.jsx("div",{className:"w-5 h-5 rounded bg-muted flex-shrink-0"}),s.jsx("span",{className:"text-sm",children:e})]});function kPt(){Zr({title:"Resetare Parolă – EduWeb",noIndex:!0});const{toast:e}=wn(),r=As(),[n,i]=w.useState(""),[a,o]=w.useState(""),[l,c]=w.useState(!1),[u,d]=w.useState(!1),[h,f]=w.useState(!1);w.useEffect(()=>{const{data:{subscription:m}}=G.auth.onAuthStateChange(g=>{g==="PASSWORD_RECOVERY"&&f(!0)});return window.location.hash.includes("type=recovery")&&f(!0),()=>m.unsubscribe()},[]);const p=async m=>{if(m.preventDefault(),n.length<6){e({title:"Parolă prea scurtă",description:"Minim 6 caractere.",variant:"destructive"});return}if(n!==a){e({title:"Parolele nu coincid",variant:"destructive"});return}c(!0);const{error:A}=await G.auth.updateUser({password:n});c(!1),A?e({title:"Eroare",description:A.message,variant:"destructive"}):(d(!0),e({title:"Parolă actualizată cu succes!"}),setTimeout(()=>r("/membru"),2e3))};return u?s.jsx(Ft,{children:s.jsx("div",{className:"container max-w-md py-16 text-center",children:s.jsxs("div",{className:"glass-card rounded-xl p-8",children:[s.jsx(Xh,{size:48,className:"mx-auto text-emerald-500 mb-4"}),s.jsx("h1",{className:"font-heading text-xl font-bold mb-2",children:"Parolă actualizată!"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Vei fi redirecționat automat..."})]})})}):s.jsx(Ft,{children:s.jsx("div",{className:"container max-w-md py-16",children:s.jsxs("div",{className:"glass-card rounded-xl p-8",children:[s.jsxs("h1",{className:"font-heading text-2xl font-bold mb-2 text-center flex items-center justify-center gap-2",children:[s.jsx(JA,{size:22,className:"text-primary"})," Resetare Parolă"]}),s.jsx("p",{className:"text-sm text-muted-foreground text-center mb-6",children:h?"Introdu noua ta parolă.":"Această pagină funcționează doar dacă ai accesat link-ul din email."}),s.jsxs("form",{onSubmit:p,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{htmlFor:"new-password",children:"Parolă nouă"}),s.jsx(qe,{id:"new-password",type:"password",value:n,onChange:m=>i(m.target.value),placeholder:"••••••••",required:!0,minLength:6})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ge,{htmlFor:"confirm-password",children:"Confirmă parola"}),s.jsx(qe,{id:"confirm-password",type:"password",value:a,onChange:m=>o(m.target.value),placeholder:"••••••••",required:!0,minLength:6})]}),s.jsx(me,{type:"submit",className:"w-full",disabled:l,children:l?s.jsx(rt,{className:"animate-spin",size:16}):"Salvează parola nouă"})]})]})})})}function EPt(){const[e,r]=w.useState("loading"),[n,i]=w.useState(!1),o=new URLSearchParams(window.location.search).get("token");w.useEffect(()=>{if(!o){r("invalid");return}l()},[o]);const l=async()=>{try{const f=await(await fetch(`https://ahleagpvrcuwshrzzpkq.supabase.co/functions/v1/handle-email-unsubscribe?token=${o}`,{headers:{apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFobGVhZ3B2cmN1d3Nocnp6cGtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzODYxNTAsImV4cCI6MjA4Nzk2MjE1MH0.bfIaWjZ6DWihO23zccW5pFAvZ4L3FktJ00zwQbJ9guw"}})).json();f.valid===!1&&f.reason==="already_unsubscribed"?r("already"):f.valid?r("valid"):r("invalid")}catch{r("invalid")}},c=async()=>{i(!0);try{const{data:u,error:d}=await G.functions.invoke("handle-email-unsubscribe",{body:{token:o}});if(d)throw d;
3212u!=null&&u.success?r("success"):(u==null?void 0:u.reason)==="already_unsubscribed"?r("already"):r("error")}catch{r("error")}i(!1)};return s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:s.jsx(st,{className:"w-full max-w-md",children:s.jsxs(ot,{className:"pt-8 pb-8 text-center space-y-4",children:[e==="loading"&&s.jsxs(s.Fragment,{children:[s.jsx(rt,{className:"h-10 w-10 animate-spin mx-auto text-muted-foreground"}),s.jsx("p",{className:"text-muted-foreground",children:"Se verifică solicitarea..."})]}),e==="valid"&&s.jsxs(s.Fragment,{children:[s.jsx(oke,{className:"h-12 w-12 mx-auto text-orange-500"}),s.jsx("h1",{className:"text-xl font-bold",children:"Dezabonare email-uri"}),s.jsx("p",{className:"text-muted-foreground",children:"Ești sigur că dorești să te dezabonezi de la email-urile noastre? Nu vei mai primi notificări de la EduWeb."}),s.jsxs(me,{onClick:c,disabled:n,variant:"destructive",children:[n?s.jsx(rt,{className:"h-4 w-4 animate-spin mr-2"}):null,"Confirmă dezabonarea"]})]}),e==="success"&&s.jsxs(s.Fragment,{children:[s.jsx(hn,{className:"h-12 w-12 mx-auto text-green-500"}),s.jsx("h1",{className:"text-xl font-bold",children:"Te-ai dezabonat cu succes"}),s.jsx("p",{className:"text-muted-foreground",children:"Nu vei mai primi email-uri de la EduWeb. Dacă te răzgândești, ne poți contacta oricând."})]}),e==="already"&&s.jsxs(s.Fragment,{children:[s.jsx(hn,{className:"h-12 w-12 mx-auto text-muted-foreground"}),s.jsx("h1",{className:"text-xl font-bold",children:"Deja dezabonat"}),s.jsx("p",{className:"text-muted-foreground",children:"Această adresă de email a fost deja dezabonată."})]}),e==="invalid"&&s.jsxs(s.Fragment,{children:[s.jsx(Yh,{className:"h-12 w-12 mx-auto text-red-500"}),s.jsx("h1",{className:"text-xl font-bold",children:"Link invali
3212d"}),s.jsx("p",{className:"text-muted-foreground",children:"Acest link de dezabonare este invalid sau a expirat."})]}),e==="error"&&s.jsxs(s.Fragment,{children:[s.jsx(Yh,{className:"h-12 w-12 mx-auto text-red-500"}),s.jsx("h1",{className:"text-xl font-bold",children:"Eroare"}),s.jsx("p",{className:"text-muted-foreground",children:"A apărut o eroare. Te rugăm să încerci din nou mai târziu."})]})]})})})}function BPt(){const{lang:e}=Pt(),r=e==="en",{user:n,loading:i,signIn:a,signUp:o}=Fn(),{isSubscribed:l,startCheckout:c,openPortal:u,monthlyEnrollments:d,monthlyLimit:h}=G4(),{toast:f}=wn(),p=As();Zr({title:e==="en"?"EduWeb Academy Subscription":"Abonament EduWeb Academy",description:e==="en"?"Subscribe to EduWeb Academy for 199 RON/month. Access all courses, earn diplomas, and learn at your own pace.":"Abonează-te la EduWeb Academy cu 199 RON/lună. Acces la toate cursurile, diplome oficiale și învățare în ritmul tău."});const[m,A]=w.useState(!1),[g,y]=w.useState(""),[x,b]=w.useState(""),[v,j]=w.useState(""),[_,C]=w.useState(""),[N,S]=w.useState(!1),[E,O]=w.useState(!1),[B,T]=w.useState(!1),[F,I]=w.useState("monthly");w.useEffect(()=>{ime()},[]),w.useEffect(()=>{n&&ame(n.id)},[n]),w.useEffect(()=>{n&&!i&&!l&&B&&(T(!1),c(F))},[n,i,l,B]);const D=async $=>{if($.preventDefault(),!m&&x!==v){f({title:e==="en"?"Passwords do not match":"Parolele nu coincid",variant:"destructive"});return}if(S(!0),r||T(!0),m){const{error:q}=await a(g,x);q&&(f({title:e==="en"?"Login error":"Eroare la autentificare",description:q.message,variant:"destructive"}),T(!1))}else{const{error:q}=await o(g,x,_);q?(f({title:e==="en"?"Signup error":"Eroare la înregistrare",description:q.message,variant:"destructive"}),T(!1)):(f({title:e==="en"?"Account created!":"Cont creat!",description:e==="en"?"Check your email for confirmation.":"Verifică-ți emailul pentru confirmare."}),T(!1))}S(!1)},L=async()=>{O(!0),r||T(!0);try{const $=await lme.auth.signInWithOAuth("google",{redirect_uri:"https://eduweb-romania-flux.lovable.app"});$!=null&&$.error&&(f({title:"Eroare Google Sign-In",description:String($.error),variant:"destructive"}),T(!1))}catch($){f({title:"Eroare",description:$ instanceof Error?$.message:"Eroare",variant:"destructive"}),T(!1)}finally{O(!1)}},V=e==="en"?[{icon:yr,title:"Access to all courses",desc:"Learn any topic from our constantly growing library"},{icon:ts,title:"Up to 3 courses / month",desc:"New enrollments every month, learn at your own pace"},{icon:oo,title:"Official diploma",desc:"Get a verified diploma for each completed course"},{icon:Ko,title:"Priority access",desc:"First access to new courses and exclusive content"}]:[{icon:yr,title:"Acces la toate cursurile",desc:"Învață orice subiect din biblioteca noastră în continuă creștere"},{icon:ts,title:"Max 3 cursuri / lună",desc:"Înrolări noi în fiecare lună, la ritmul tău"},{icon:oo,title:"Diplomă oficială",desc:"Primești o diplomă verificabilă la finalizarea fiecărui curs"},{icon:Ko,title:"Acces prioritar",desc:"Primul acces la cursuri noi și conținut exclusiv"}],U=e==="en"?[{num:"1",title:"Create account",desc:"Register with email or Google in seconds"},{num:"2",title:"Choose a course",desc:"Browse our course catalog and enroll"},{num:"3",title:"Learn & get certified",desc:"Complete lessons, pass quizzes, earn your diploma"}]:[{num:"1",title:"Creează cont",desc:"Înregistrează-te cu email sau Google în câteva secunde"},{num:"2",title:"Alege un curs",desc:"Navighează catalogul de cursuri și înrolează-te"},{num:"3",title:"Învață & certifică-te",desc:"Finalizează lecțiile, treci quiz-urile, obține diploma"}],Q=e==="en"?[{q:"What does the subscription include?",a:"Access to all published courses, up to 3 enrollments per month, official diplomas, and priority access to new content."},{q:"Can I cancel anytime?",a:"Yes, you can cancel your subscription at any time. You keep access until the end of the paid period."},{q:"What happens to my diplomas if I cancel?",a:"Your diplomas, EduCoins, and course progress are permanently saved, even after cancellation."},{q:"Can I buy individual courses without subscribing?",a:"Yes, each course can also be purchased individually at a one-time price."}]:[{q:"Ce include abonamentul?",a:"Acces la toate cursurile publicate, până la 3 înrolări pe lună, diplome oficiale și acces prioritar la conținut nou."},{q:"Pot anula oricând?",a:"Da, poți anula abonamentul oricând. Păstrezi accesul până la sfârșitul perioadei plătite."},{q:"Ce se întâmplă cu diplomele mele dacă anulez?",a:"Diplomele, EduCoins și progresul la cursuri sunt salvate permanent, chiar și după anulare."},{q:"Pot cumpăra cursuri individuale fără abonament?",a:"Da, fiecare curs poate fi achiziționat individual la un preț unic."}];return s.jsx(Ft,{children:s.jsxs("div",{className:"min-h-screen",children:[s.jsx("section",{className:"bg-gradient-to-br from-amber-500/10 via-yellow-500/5 to-primary/10 border-b border-amber-500/20",children:s.jsx("div",{className:"container py-12 md:py-20",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-10 items-center",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-primary/15 text-primary text-sm font-bold",children:[s.jsx(Ko,{size:16}),"EduWeb Academy"]}),s.jsx("h1",{className:"font-heading text-3xl md:text-4xl lg:text-5xl font-bold text-foreground leading-tight",children:r?"Join EduWeb Academy":"Învață fără limite"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-lg",children:r?"Create your free account to get notified when our courses become available in English. Be the first to learn blockchain, crypto & Web3.":"Un singur abonament, toate cursurile. Certifică-te și avansează-ți cariera în blockchain, crypto & Web3."}),!r&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 p-1 rounded-lg bg-muted/50 border border-border w-fit",children:[s.jsx("button",{onClick:()=>I("monthly"),className:`px-4 py-2 rounded-md text-sm font-semibold transition-all ${F==="monthly"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:"Lunar"}),s.jsxs("button",{onClick:()=>I("yearly"),className:`px-4 py-2 rounded-md text-sm font-semibold transition-all relative ${F==="yearly"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:["Anual",s.jsx("span",{className:"absolute -top-2.5 -right-2.5 px-1.5 py-0.5 rounded-full bg-green-600 text-white text-[10px] font-bold leading-none",children:"-37%"})]})]}),F==="monthly"?s.jsxs("div",{className:"flex items-baseline gap-3",children:[s.jsx("span",{className:"font-heading text-4xl md:text-5xl font-bold text-primary",children:"199 RON"}),s.jsx("span",{className:"text-muted-foreground",children:"/ lună"})]}):s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-baseline gap-3",children:[s.jsx("span",{className:"text-muted-foreground line-through text-lg",children:"2.388 RON"}),s.jsx("span",{className:"font-heading text-4xl md:text-5xl font-bold text-primary",children:"1.499 RON"}),s.jsx("span",{className:"text-muted-foreground",children:"/ an"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"≈ 125 RON/lună • Toate prețurile includ TVA"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Toate prețurile includ TVA"})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 pt-2",children:V.map(($,q)=>s.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-card/50 border border-border/50",children:[s.jsx($.icon,{size:20,className:"text-primary shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-sm text-foreground",children:$.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:$.desc})]})]},q))})]}),s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"w-full max-w-sm",children:i?s.jsx("div",{className:"flex items-center justify-center py-16",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):n?r?s.jsxs("div",{className:"glass-card rounded-xl p-8 space-y-6 text-center",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-green-500/15 text-green-600 mx-auto",children:s.jsx(Xh,{size:32})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-xl font-bold text-foreground",children:"Welcome to EduWeb!"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Your account is ready. We'll notify you when courses become available in English."})]}),s.jsxs(me,{onClick:()=>p("/academy"),className:"w-full",children:[s.jsx(yr,{size:16}),"Explore Academy"]})]}):l?s.jsxs("div",{className:"glass-card rounded-xl p-8 space-y-6 text-center",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-green-500/15 text-green-600 mx-auto",children:s.jsx(Xh,{size:32})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-xl font-bold text-foreground",children:"Abonament Activ"}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[d,"/",h," cursuri luna aceasta"]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs(me,{onClick:()=>p("/academy"),className:"w-full",children:[s.jsx(yr,{size:16}),"Explorează cursurile"]}),s.jsxs(me,{onClick:u,variant:"outline",className:"w-full",children:[s.jsx(lp,{size:16}),"Gestionează abonamentul"]})]})]}):s.jsxs("div",{className:"glass-card rounded-xl p-8 space-y-6 text-center",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/15 text-primary mx-auto",children:s.jsx(Ko,{size:32})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-xl font-bold text-foreground",children:"Gata să te abonezi?"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Ești autentificat. Începe abonamentul acum."})]}),s.jsxs("div",{className:"flex items-center gap-2 p-1 rounded-lg bg-muted/50 border border-border w-fit mx-auto",children:[s.jsx("button",{onClick:()=>I("monthly"),className:`px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${F==="monthly"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground"}`,children:"Lunar"}),s.jsx("button",{onClick:()=>I("yearly"),className:`px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${F==="yearly"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground"}`,children:"Anual -37%"})]}),s.jsxs(me,{onClick:()=>c(F),size:"lg",className:"w-full font-heading font-semibold",children:[s.jsx(Ko,{size:16}),F==="monthly"?"Abonează-te – 199 RON/lună":"Abonează-te – 1.499 RON/an"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Toate prețurile includ TVA"})]}):s.jsxs("div",{className:"glass-card rounded-xl p-8",children:[s.jsx("h2",{className:"font-heading text-xl font-bold mb-1 text-center",children:m?e==="en"?"Log in":"Autentificare":e==="en"?"Create your account":"Creează-ți contul"}),s.jsx("p",{className:"text-xs text-muted-foreground text-center mb-5",children:m?e==="en"?"Log in to access your subscription":"Conectează-te pentru a accesa abonamentul":e==="en"?"Sign up and start learning today":"Înregistrează-te și începe să înveți azi"}),s.jsxs("form",{onSubmit:D,className:"space-y-3",children:[!m&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{htmlFor:"displayName",className:"text-xs",children:e==="en"?"Name":"Nume"}
3212),s.jsx(qe,{id:"displayName",value:_,onChange:$=>C($.target.value),placeholder:e==="en"?"Your name":"Numele tău",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{htmlFor:"sub-email",className:"text-xs",children:"Email"}),s.jsx(qe,{id:"sub-email",type:"email",value:g,onChange:$=>y($.target.value),placeholder:"[email protected]",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{htmlFor:"sub-password",className:"text-xs",children:e==="en"?"Password":"Parolă"}),s.jsx(qe,{id:"sub-password",type:"password",value:x,onChange:$=>b($.target.value),placeholder:"••••••••",required:!0,minLength:6}),m&&s.jsx("button",{type:"button",onClick:async()=>{if(!g){f({title:e==="en"?"Enter your email first":"Introdu emailul mai întâi",variant:"destructive"});return}const{error:$}=await G.auth.resetPasswordForEmail(g,{redirectTo:`${window.location.origin}/reset-password`});f($?{title:"Eroare",description:$.message,variant:"destructive"}:{title:e==="en"?"Email sent!":"Email trimis!",description:e==="en"?"Check your inbox for the reset link.":"Verifică-ți inbox-ul pentru link-ul de resetare."})},className:"text-xs text-primary hover:underline",children:e==="en"?"Forgot password?":"Ai uitat parola?"})]}),!m&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ge,{htmlFor:"sub-confirm-password",className:"text-xs",children:e==="en"?"Confirm password":"Confirmă parola"}),s.jsx(qe,{id:"sub-confirm-password",type:"password",value:v,onChange:$=>j($.target.value),placeholder:"••••••••",required:!0,minLength:6})]}),s.jsx(me,{type:"submit",className:"w-full",disabled:N,children:N?s.jsx(rt,{className:"animate-spin",size:16}):m?s.jsxs(s.Fragment,{children:[s.jsx(a4,{size:16})," ",e==="en"?"Log in":"Conectare"]}):s.jsxs(s.Fragment,{children:[s.jsx(ple,{size:16})," ",e==="en"?"Create account":"Creare cont"]})})]}),s.jsxs("div",{className:"relative my-5",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("span",{className:"w-full border-t border-border"})}),s.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:s.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:e==="en"?"or":"sau"})})]}),s.jsxs(me,{type:"button",variant:"outline",className:"w-full",onClick:L,disabled:E,children:[E?s.jsx(rt,{className:"animate-spin",size:16}):s.jsxs("svg",{className:"w-4 h-4 mr-2",viewBox:"0 0 24 24",children:[s.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),s.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),s.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),s.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),e==="en"?"Continue with Google":"Continuă cu Google"]}),s.jsx("button",{onClick:()=>A(!m),className:"w-full text-center text-sm text-muted-foreground mt-4 hover:text-primary transition-colors",children:m?e==="en"?"Don't have an account? Create one":"Nu ai cont? Creează unul":e==="en"?"Already have an account? Log in":"Ai deja cont? Conectează-te"})]})})})]})})}),s.jsxs("section",{className:"container py-12 md:py-16",children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-center mb-10",children:e==="en"?"How it works":"Cum funcționează"}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-3xl mx-auto",children:U.map(($,q)=>s.jsxs("div",{className:"text-center space-y-3",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-primary/15 text-primary font-heading font-bold text-xl mx-auto",children:$.num}),s.jsx("h3",{className:"font-heading font-semibold text-foreground",children:$.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:$.desc})]},q))})]}),s.jsx("section",{className:"bg-muted/30 border-t border-border",children:s.jsxs("div",{className:"container py-12 md:py-16",children:[s.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-center mb-10",children:e==="en"?"Frequently Asked Questions":"Întrebăr
3212i frecvente"}),s.jsx("div",{className:"max-w-2xl mx-auto space-y-4",children:Q.map(($,q)=>s.jsx("div",{className:"p-5 rounded-lg bg-card border border-border",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(ms,{size:18,className:"text-primary shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground text-sm",children:$.q}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1.5",children:$.a})]})]})},q))})]})})]})})}/*!
3213 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
3214 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
3215 * Released under MIT License
3216 *//*! *****************************************************************************
3217Copyright (c) Microsoft Corporation.
3218
3219Permission to use, copy, modify, and/or distribute this software for any
3220purpose with or without fee is hereby granted.
3221
3222THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
3223REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3224AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
3225INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
3226LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
3227OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3228PERFORMANCE OF THIS SOFTWARE.
3229***************************************************************************** */var qz=function(e,r){return qz=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},qz(e,r)};function zu(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");qz(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}var Kz=function(){return Kz=Object.assign||function(r){for(var n,i=1,a=arguments.length;i<a;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r},Kz.apply(this,arguments)};function xo(e,r,n,i){function a(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function c(h){try{d(i.next(h))}catch(f){l(f)}}function u(h){try{d(i.throw(h))}catch(f){l(f)}}function d(h){h.done?o(h.value):a(h.value).then(c,u)}d((i=i.apply(e,[])).next())})}function Ys(e,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,a,o,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(d){return function(h){return u([d,h])}}function u(d){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(o=d[0]&2?a.return:d[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,d[1])).done)return o;switch(a=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,a=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=r.call(e,n)}catch(h){d=[6,h],a=0}finally{i=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function uS(e,r,n){if(arguments.length===2)for(var i=0,a=r.length,o;i<a;
vendor: 4,020 bytes, line 3229
3229i++)(o||!(i in r))&&(o||(o=Array.prototype.slice.call(r,0,i)),o[i]=r[i]);return e.concat(o||r)}var df=function(){function e(r,n,i,a){this.left=r,this.top=n,this.width=i,this.height=a}return e.prototype.add=function(r,n,i,a){return new e(this.left+r,this.top+n,this.width+i,this.height+a)},e.fromClientRect=function(r,n){return new e(n.left+r.windowBounds.left,n.top+r.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(r,n){var i=Array.from(n).find(function(a){return a.width!==0});return i?new e(i.left+r.windowBounds.left,i.top+r.windowBounds.top,i.width,i.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),j3=function(e,r){return df.fromClientRect(e,r.getBoundingClientRect())},TPt=function(e){var r=e.body,n=e.documentElement;if(!r||!n)throw new Error("Unable to get document size");var i=Math.max(Math.max(r.scrollWidth,n.scrollWidth),Math.max(r.offsetWidth,n.offsetWidth),Math.max(r.clientWidth,n.clientWidth)),a=Math.max(Math.max(r.scrollHeight,n.scrollHeight),Math.max(r.offsetHeight,n.offsetHeight),Math.max(r.clientHeight,n.clientHeight));return new df(0,0,i,a)},_3=function(e){for(var r=[],n=0,i=e.length;n<i;){var a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<i){var o=e.charCodeAt(n++);(o&64512)===56320?r.push(((a&1023)<<10)+(o&1023)+65536):(r.push(a),n--)}else r.push(a)}return r},ha=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var i=[],a=-1,o="";++a<n;){var l=e[a];l<=65535?i.push(l):(l-=65536,i.push((l>>10)+55296,l%1024+56320)),(a+1===n||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},gre="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",PPt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var dS=0;dS<gre.length;dS++)PPt[gre.charCodeAt(dS)]=dS;var xre="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mw=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var hS=0;hS<xre.length;hS++)mw[xre.charCodeAt(hS)]=hS;var IPt=function(e){var r=e.length*.75,n=e.length,i,a=0,o,l,c,u;e[e.length-1]==="="&&(r--,e[e.length-2]==="="&&r--);var d=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(r):new Array(r),h=Array.isArray(d)?d:new Uint8Array(d);for(i=0;i<n;i+=4)o=mw[e.charCodeAt(i)],l=mw[e.charCodeAt(i+1)],c=mw[e.charCodeAt(i+2)],u=mw[e.charCodeAt(i+3)],h[a++]=o<<2|l>>4,h[a++]=(l&15)<<4|c>>2,h[a++]=(c&3)<<6|u&63;return d},FPt=function(e){for(var r=e.length,n=[],i=0;i<r;i+=2)n.push(e[i+1]<<8|e[i]);return n},OPt=function(e){for(var r=e.length,n=[],i=0;i<r;i+=4)n.push(e[i+3]<<24|e[i+2]<<16|e[i+1]<<8|e[i]);return n},ag=5,nH=11,eO=2,LPt=nH-ag,V1e=65536>>ag,RPt=1<<ag,tO=RPt-1,DPt=1024>>ag,MPt=V1e+DPt,zPt=MPt,UPt=32,$Pt=zPt+UPt,QPt=65536>>nH,HPt=1<<LPt,VPt=HPt-1,yre=function(e,r,n){return e.slice?e.slice(r,n):new Uint16Array(Array.prototype.slice.call(e,r,n))},WPt=function(e,r,n){return e.slice?e.slice(r,n):new Uint32Array(Array.prototype.slice.call(e,r,n))},qPt=function(e,r){var n=IPt(e),i=Array.isArray(n)?OPt(n):new Uint32Array(n),a=Array.isArray(n)?FPt(n):new Uint16Array(n),o=24,l=yre(a,o/2,i[4]/2),c=i[5]===2?yre(a,(o+i[4])/2):WPt(i,Math.ceil((o+i[4])/4));return new KPt(i[0],i[1],i[2],i[3],l,c)},KPt=function(){function e(r,n,i,a,o,l){this.initialValue=r,this.errorValue=n,this.highStart=i,this.highValueIndex=a,this.index=o,this.data=l}return e.prototype.get=function(r){var n;if(r>=0){if(r<55296||r>56319&&r<=65535)return n=this.index[r>>ag],n=(n<<eO)+(r&tO),this.data[n];if(r<=65535)return n=this.index[V1e+(r-55296>>ag)],n=(n<<eO)+(r&tO),this.data[n];if(r<this.highStart)return n=$Pt-QPt+(r>>nH),n=this.index[n],n+=r>>ag&VPt,n=this.index[n],n=(n<<eO)+(r&tO),this.data[n];if(r<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),vre="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",GPt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var fS=0;fS<vre.length;fS++)GPt[vre.charCodeAt(fS)]=fS;var XPt="
vendor: 5,502 bytes, line 3229
3229KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCI
vendor: 47,388 bytes, line 3229
3229IIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",
vendor: 3,615 bytes, line 3229
3229bre=50,YPt=1,W1e=2,q1e=3,JPt=4,ZPt=5,wre=7,K1e=8,jre=9,Om=10,Gz=11,_re=12,Xz=13,eIt=14,pw=15,Yz=16,mS=17,V1=18,tIt=19,Cre=20,Jz=21,W1=22,rO=23,Vx=24,kl=25,Aw=26,gw=27,Wx=28,rIt=29,bA=30,nIt=31,pS=32,AS=33,Zz=34,e6=35,t6=36,Gj=37,r6=38,kk=39,Ek=40,nO=41,G1e=42,iIt=43,aIt=[9001,65288],X1e="!",sn="×",gS="÷",n6=qPt(XPt),mh=[bA,t6],i6=[YPt,W1e,q1e,ZPt],Y1e=[Om,K1e],Nre=[gw,Aw],sIt=i6.concat(Y1e),Sre=[r6,kk,Ek,Zz,e6],oIt=[pw,Xz],lIt=function(e,r){r===void 0&&(r="strict");var n=[],i=[],a=[];return e.forEach(function(o,l){var c=n6.get(o);if(c>bre?(a.push(!0),c-=bre):a.push(!1),["normal","auto","loose"].indexOf(r)!==-1&&[8208,8211,12316,12448].indexOf(o)!==-1)return i.push(l),n.push(Yz);if(c===JPt||c===Gz){if(l===0)return i.push(l),n.push(bA);var u=n[l-1];return sIt.indexOf(u)===-1?(i.push(i[l-1]),n.push(u)):(i.push(l),n.push(bA))}if(i.push(l),c===nIt)return n.push(r==="strict"?Jz:Gj);if(c===G1e||c===rIt)return n.push(bA);if(c===iIt)return o>=131072&&o<=196605||o>=196608&&o<=262141?n.push(Gj):n.push(bA);n.push(c)}),[i,n,a]},iO=function(e,r,n,i){var a=i[n];if(Array.isArray(e)?e.indexOf(a)!==-1:e===a)for(var o=n;o<=i.length;){o++;var l=i[o];if(l===r)return!0;if(l!==Om)break}if(a===Om)for(var o=n;o>0;){o--;var c=i[o];if(Array.isArray(e)?e.indexOf(c)!==-1:e===c)for(var u=n;u<=i.length;){u++;var l=i[u];if(l===r)return!0;if(l!==Om)break}if(c!==Om)break}return!1},kre=function(e,r){for(var n=e;n>=0;){var i=r[n];if(i===Om)n--;else return i}return 0},cIt=function(e,r,n,i,a){if(n[i]===0)return sn;var o=i-1;if(Array.isArray(a)&&a[o]===!0)return sn;var l=o-1,c=o+1,u=r[o],d=l>=0?r[l]:0,h=r[c];if(u===W1e&&h===q1e)return sn;if(i6.indexOf(u)!==-1)return X1e;if(i6.indexOf(h)!==-1||Y1e.indexOf(h)!==-1)return sn;if(kre(o,r)===K1e)return gS;if(n6.get(e[o])===Gz||(u===pS||u===AS)&&n6.get(e[c])===Gz||u===wre||h===wre||u===jre||[Om,Xz,pw].indexOf(u)===-1&&h===jre||[mS,V1,tIt,Vx,Wx].indexOf(h)!==-1||kre(o,r)===W1||iO(rO,W1,o,r)||iO([mS,V1],Jz,o,r)||iO(_re,_re,o,r))return sn;if(u===Om)return gS;if(u===rO||h===rO)return sn;if(h===Yz||u===Yz)return gS;if([Xz,pw,Jz].indexOf(h)!==-1||u===eIt||d===t6&&oIt.indexOf(u)!==-1||u===Wx&&h===t6||h===Cre||mh.indexOf(h)!==-1&&u===kl||mh.indexOf(u)!==-1&&h===kl||u===gw&&[Gj,pS,AS].indexOf(h)!==-1||[Gj,pS,AS].indexOf(u)!==-1&&h===Aw||mh.indexOf(u)!==-1&&Nre.indexOf(h)!==-1||Nre.indexOf(u)!==-1&&mh.indexOf(h)!==-1||[gw,Aw].indexOf(u)!==-1&&(h===kl||[W1,pw].indexOf(h)!==-1&&r[c+1]===kl)||[W1,pw].indexOf(u)!==-1&&h===kl||u===kl&&[kl,Wx,Vx].indexOf(h)!==-1)return sn;if([kl,Wx,Vx,mS,V1].indexOf(h)!==-1)for(var f=o;f>=0;){var p=r[f];if(p===kl)return sn;if([Wx,Vx].indexOf(p)!==-1)f--;else break}if([gw,Aw].indexOf(h)!==-1)for(var f=[mS,V1].indexOf(u)!==-1?l:o;f>=0;){var p=r[f];if(p===kl)return sn;if([Wx,Vx].indexOf(p)!==-1)f--;else break}if(r6===u&&[r6,kk,Zz,e6].indexOf(h)!==-1||[kk,Zz].indexOf(u)!==-1&&[kk,Ek].indexOf(h)!==-1||[Ek,e6].indexOf(u)!==-1&&h===Ek||Sre.indexOf(u)!==-1&&[Cre,Aw].indexOf(h)!==-1||Sre.indexOf(h)!==-1&&u===gw||mh.indexOf(u)!==-1&&mh.indexOf(h)!==-1||u===Vx&&mh.indexOf(h)!==-1||mh.concat(kl).indexOf(u)!==-1&&h===W1&&aIt.indexOf(e[c])===-1||mh.concat(kl).indexOf(h)!==-1&&u===V1)return sn;if(u===nO&&h===nO){for(var m=n[o],A=1;m>0&&(m--,r[m]===nO);)A++;if(A%2!==0)return sn}return u===pS&&h===AS?sn:gS},uIt=function(e,r){r||(r={lineBreak:"normal",wordBreak:"normal"});var n=lIt(e,r.lineBreak),i=n[0],a=n[1],o=n[2];(r.wordBreak==="break-all"||r.wordBreak==="break-word")&&(a=a.map(function(c){return[kl,bA,G1e].indexOf(c)!==-1?Gj:c}));var l=r.wordBreak==="keep-all"?o.map(function(c,u){return c&&e[u]>=19968&&e[u]<=40959}):void 0;return[i,a,l]}
vendor: 11,457 bytes, line 3229
3229,dIt=function(){function e(r,n,i,a){this.codePoints=r,this.required=n===X1e,this.start=i,this.end=a}return e.prototype.slice=function(){return ha.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),hIt=function(e,r){var n=_3(e),i=uIt(n,r),a=i[0],o=i[1],l=i[2],c=n.length,u=0,d=0;return{next:function(){if(d>=c)return{done:!0,value:null};for(var h=sn;d<c&&(h=cIt(n,o,a,++d,l))===sn;);if(h!==sn||d===c){var f=new dIt(n,h,u,d);return u=d,{value:f,done:!1}}return{done:!0,value:null}}}},fIt=1,mIt=2,nC=4,Ere=8,bB=10,Bre=47,r2=92,pIt=9,AIt=32,xS=34,q1=61,gIt=35,xIt=36,yIt=37,yS=39,vS=40,K1=41,vIt=95,Wo=45,bIt=33,wIt=60,jIt=62,_It=64,CIt=91,NIt=93,SIt=61,kIt=123,bS=63,EIt=125,Tre=124,BIt=126,TIt=128,Pre=65533,aO=42,LA=43,PIt=44,IIt=58,FIt=59,Xj=46,OIt=0,LIt=8,RIt=11,DIt=14,MIt=31,zIt=127,Ju=-1,J1e=48,Z1e=97,ewe=101,UIt=102,$It=117,QIt=122,twe=65,rwe=69,nwe=70,HIt=85,VIt=90,Zs=function(e){return e>=J1e&&e<=57},WIt=function(e){return e>=55296&&e<=57343},qx=function(e){return Zs(e)||e>=twe&&e<=nwe||e>=Z1e&&e<=UIt},qIt=function(e){return e>=Z1e&&e<=QIt},KIt=function(e){return e>=twe&&e<=VIt},GIt=function(e){return qIt(e)||KIt(e)},XIt=function(e){return e>=TIt},wS=function(e){return e===bB||e===pIt||e===AIt},wB=function(e){return GIt(e)||XIt(e)||e===vIt},Ire=function(e){return wB(e)||Zs(e)||e===Wo},YIt=function(e){return e>=OIt&&e<=LIt||e===RIt||e>=DIt&&e<=MIt||e===zIt},lm=function(e,r){return e!==r2?!1:r!==bB},jS=function(e,r,n){return e===Wo?wB(r)||lm(r,n):wB(e)?!0:!!(e===r2&&lm(e,r))},sO=function(e,r,n){return e===LA||e===Wo?Zs(r)?!0:r===Xj&&Zs(n):Zs(e===Xj?r:e)},JIt=function(e){var r=0,n=1;(e[r]===LA||e[r]===Wo)&&(e[r]===Wo&&(n=-1),r++);for(var i=[];Zs(e[r]);)i.push(e[r++]);var a=i.length?parseInt(ha.apply(void 0,i),10):0;e[r]===Xj&&r++;for(var o=[];Zs(e[r]);)o.push(e[r++]);var l=o.length,c=l?parseInt(ha.apply(void 0,o),10):0;(e[r]===rwe||e[r]===ewe)&&r++;var u=1;(e[r]===LA||e[r]===Wo)&&(e[r]===Wo&&(u=-1),r++);for(var d=[];Zs(e[r]);)d.push(e[r++]);var h=d.length?parseInt(ha.apply(void 0,d),10):0;return n*(a+c*Math.pow(10,-l))*Math.pow(10,u*h)},ZIt={type:2},eFt={type:3},tFt={type:4},rFt={type:13},nFt={type:8},iFt={type:21},aFt={type:9},sFt={type:10},oFt={type:11},lFt={type:12},cFt={type:14},_S={type:23},uFt={type:1},dFt={type:25},hFt={type:24},fFt={type:26},mFt={type:27},pFt={type:28},AFt={type:29},gFt={type:31},a6={type:32},iwe=function(){function e(){this._value=[]}return e.prototype.write=function(r){this._value=this._value.concat(_3(r))},e.prototype.read=function(){for(var r=[],n=this.consumeToken();n!==a6;)r.push(n),n=this.consumeToken();return r},e.prototype.consumeToken=function(){var r=this.consumeCodePoint();switch(r){case xS:return this.consumeStringToken(xS);case gIt:var n=this.peekCodePoint(0),i=this.peekCodePoint(1),a=this.peekCodePoint(2);if(Ire(n)||lm(i,a)){var o=jS(n,i,a)?mIt:fIt,l=this.consumeName();return{type:5,value:l,flags:o}}break;case xIt:if(this.peekCodePoint(0)===q1)return this.consumeCodePoint(),rFt;break;case yS:return this.consumeStringToken(yS);case vS:return ZIt;case K1:return eFt;case aO:if(this.peekCodePoint(0)===q1)return this.consumeCodePoint(),cFt;break;case LA:if(sO(r,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(r),this.consumeNumericToken();break;case PIt:return tFt;case Wo:var c=r,u=this.peekCodePoint(0),d=this.peekCodePoint(1);if(sO(c,u,d))return this.reconsumeCodePoint(r),this.consumeNumericToken();if(jS(c,u,d))return this.reconsumeCodePoint(r),this.consumeIdentLikeToken();if(u===Wo&&d===jIt)return this.consumeCodePoint(),this.consumeCodePoint(),hFt;break;case Xj:if(sO(r,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(r),this.consumeNumericToken();break;case Bre:if(this.peekCodePoint(0)===aO)for(this.consumeCodePoint();;){var h=this.consumeCodePoint();if(h===aO&&(h=this.consumeCodePoint(),h===Bre))return this.consumeToken();if(h===Ju)return this.consumeToken()}break;case IIt:return fFt;case FIt:return mFt;case wIt:if(this.peekCodePoint(0)===bIt&&this.peekCodePoint(1)===Wo&&this.peekCodePoint(2)===Wo)return this.consumeCodePoint(),this.consumeCodePoint(),dFt;break;case _It:var f=this.peekCodePoint(0),p=this.peekCodePoint(1),m=this.peekCodePoint(2);if(jS(f,p,m)){var l=this.consumeName();return{type:7,value:l}}break;case CIt:return pFt;case r2:if(lm(r,this.peekCodePoint(0)))return this.reconsumeCodePoint(r),this.consumeIdentLikeToken();break;case NIt:return AFt;case SIt:if(this.peekCodePoint(0)===q1)return this.consumeCodePoint(),nFt;break;case kIt:return oFt;case EIt:return lFt;case $It:case HIt:var A=this.peekCodePoint(0),g=this.peekCodePoint(1);return A===LA&&(qx(g)||g===bS)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(r),this.consumeIdentLikeToken();case Tre:if(this.peekCodePoint(0)===q1)return this.consumeCodePoint(),aFt;if(this.peekCodePoint(0)===Tre)return this.consumeCodePoint(),iFt;break;case BIt:if(this.peekCodePoint(0)===q1)return this.consumeCodePoint(),sFt;break;case Ju:return a6}return wS(r)?(this.consumeWhiteSpace(),gFt):Zs(r)?(this.reconsumeCodePoint(r),this.consumeNumericToken()):wB(r)?(this.reconsumeCodePoint(r),this.consumeIdentLikeToken()):{type:6,value:ha(r)}},e.prototype.consumeCodePoint=function(){var r=this._value.shift();return typeof r>"u"?-1:r},e.prototype.reconsumeCodePoint=function(r){this._value.unshift(r)},e.prototype.peekCodePoint=function(r){return r>=this._value.length?-1:this._value[r]},e.prototype.consumeUnicodeRangeToken=function(){for(var r=[],n=this.consumeCodePoint();qx(n)&&r.length<6;)r.push(n),n=this.consumeCodePoint();for(var i=!1;n===bS&&r.length<6;)r.push(n),n=this.consumeCodePoint(),i=!0;if(i){var a=parseInt(ha.apply(void 0,r.map(function(u){return u===bS?J1e:u})),16),o=parseInt(ha.apply(void 0,r.map(function(u){return u===bS?nwe:u})),16);return{type:30,start:a,end:o}}var l=parseInt(ha.apply(void 0,r),16);if(this.peekCodePoint(0)===Wo&&qx(this.peekCodePoint(1))){this.consumeCodePoint(),n=this.consumeCodePoint();for(var c=[];qx(n)&&c.length<6;)c.push(n),n=this.consumeCodePoint();var o=parseInt(ha.apply(void 0,c),16);return{type:30,start:l,end:o}}else return{type:30,start:l,end:l}},e.prototype.consumeIdentLikeToken=function(){var r=this.consumeName();return r.toLowerCase()==="url"&&this.peekCodePoint(0)===vS?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===vS?(this.consumeCodePoint(),{type:19,value:r}):{type:20,value:r}},e.prototype.consumeUrlToken=function(){var r=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ju)return{type:22,value:""};var n=this.peekCodePoint(0);if(n===yS||n===xS){var i=this.consumeStringToken(this.consumeCodePoint());return i.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ju||this.peekCodePoint(0)===K1)?(this.consumeCodePoint(),{type:22,value:i.value}):(this.consumeBadUrlRemnants(),_S)}for(;;){var a=this.consumeCodePoint();if(a===Ju||a===K1)return{type:22,value:ha.apply(void 0,r)};if(wS(a))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ju||this.peekCodePoint(0)===K1?(this.consumeCodePoint(),{type:22,value:ha.apply(void 0,r)}):(this.consumeBadUrlRemnants(),_S);if(a===xS||a===yS||a===vS||YIt(a))return this.consumeBadUrlRemnants(),_S;if(a===r2)if(lm(a,this.peekCodePoint(0)))r.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),_S;else r.push(a)}},e.prototype.consumeWhiteSpace=function(){for(;wS(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var r=this.consumeCodePoint();if(r===K1||r===Ju)return;lm(r,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(r){for(var n=5e4,i="";r>0;){var a=Math.min(n,r);i+=ha.apply(void 0,this._value.splice(0,a)),r-=a}return this._value.shift(),i},e.prototype.consumeStringToken=function(r){var n="",i=0;do{var a=this._value[i];if(a===Ju||a===void 0||a===r)return n+=this.consumeStringSlice(i),{type:0,value:n};if(a===bB)return this._value.splice(0,i),uFt;if(a===r2){var o=this._value[i+1];o!==Ju&&o!==void 0&&(o===bB?(n+=this.consumeStringSlice(i),i=-1,this._value.shift()):lm(a,o)&&(n+=this.consumeStringSlice(i),n+=ha(this.consumeEscapedCodePoint()),i=-1))}i++}while(!0)},e.prototype.consumeNumber=function(){var r=[],n=nC,i=this.peekCodePoint(0);for((i===LA||i===Wo)&&r.push(this.consumeCodePoint());Zs(this.peekCodePoint(0));)r.push(this.consumeCodePoint());i=this.peekCodePoint(0);var a=this.peekCodePoint(1);if(i===Xj&&Zs(a))for(r.push(this.consumeCodePoint(),this.consumeCodePoint()),n=Ere;Zs(this.peekCodePoint(0));)r.push(this.consumeCodePoint());i=this.peekCodePoint(0),a=this.peekCodePoint(1);var o=this.peekCodePoint(2);if((i===rwe||i===ewe)&&((a===LA||a===Wo)&&Zs(o)||Zs(a)))for(r.push(this.consumeCodePoint(),this.consumeCodePoint()),n=Ere;Zs(this.peekCodePoint(0));)r.push(this.consumeCodePoint());return[JIt(r),n]},e.prototype.consumeNumericToken=function(){var r=this.consumeNumber(),n=r[0],i=r[1],a=this.peekCodePoint(0),o=this.peekCodePoint(1),l=this.peekCodePoint(2);if(jS(a,o,l)){var c=this.consumeName();return{type:15,number:n,flags:i,unit:c}}return a===yIt?(this.consumeCodePoint(),{type:16,number:n,flags:i}):{type:17,number:n,flags:i}},e.prototype.consumeEscapedCodePoint=function(){var r=this.consumeCodePoint();if(qx(r)){for(var n=ha(r);qx(this.peekCodePoint(0))&&n.length<6;)n+=ha(this.consumeCodePoint());wS(this.peekCodePoint(0))&&this.consumeCodePoint();var i=parseInt(n,16);return i===0||WIt(i)||i>1114111?Pre:i}return r===Ju?Pre:r},e.prototype.consumeName=function(){for(var r="";;){var n=this.consumeCodePoint();if(Ire(n))r+=ha(n);else if(lm(n,this.peekCodePoint(0)))r+=ha(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(n),r}},e}(),awe=function(){function e(r){this._tokens=r}return e.create=function(r){var n=new iwe;return n.write(r),new e(n.read())},e.parseValue=function(r){return e.create(r).parseComponentValue()},e.parseValues=function(r){return e.create(r).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var r=this.consumeToken();r.type===31;)r=this.consumeToken();if(r.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(r);var n=this.consumeComponentValue();do r=this.consumeToken();while(r.type===31);if(r.type===32)return n;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var r=[];;){var n=this.consumeComponentValue();if(n.type===32)return r;r.push(n),r.push()}},e.prototype.consumeComponentValue=function(){var r=this.consumeToken();switch(r.type){case 11:case 28:case 2:return this.consumeSimpleBlock(r.type);case 19:return this.consumeFunction(r)}return r},e.prototype.consumeSimpleBlock=function(r){for(var n={type:r,values:[]},i=this.consumeToken();;){if(i.type===32||yFt(i,r))return n;this.reconsumeToken(i),n.values.push(this.consumeComponentValue()),i=this.consumeToken()}},e.prototype.consumeFunction=function(r){for(var n={name:r.value,values:[],type:18};;){var i=this.consumeToken();if(i.type===32||i.type===3)return n;this.reconsumeToken(i),n.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var r=this._tokens.shift();return typeof r>"u"?a6:r},e.prototype.reconsumeToken=function(r){this._tokens.unshift(r)},e}(),iC=function(e){return e.type===15},kb=function(e){return e.type===17},Xn=function(e){return e.type===20}
vendor: 4,196 bytes, line 3229
3229,xFt=function(e){return e.type===0},s6=function(e,r){return Xn(e)&&e.value===r},swe=function(e){return e.type!==31},N0=function(e){return e.type!==31&&e.type!==4},Wd=function(e){var r=[],n=[];return e.forEach(function(i){if(i.type===4){if(n.length===0)throw new Error("Error parsing function args, zero tokens for arg");r.push(n),n=[];return}i.type!==31&&n.push(i)}),n.length&&r.push(n),r},yFt=function(e,r){return r===11&&e.type===12||r===28&&e.type===29?!0:r===2&&e.type===3},gp=function(e){return e.type===17||e.type===15},Ba=function(e){return e.type===16||gp(e)},owe=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},Ts={type:17,number:0,flags:nC},iH={type:16,number:50,flags:nC},Lm={type:16,number:100,flags:nC},xw=function(e,r,n){var i=e[0],a=e[1];return[di(i,r),di(typeof a<"u"?a:i,n)]},di=function(e,r){if(e.type===16)return e.number/100*r;if(iC(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},lwe="deg",cwe="grad",uwe="rad",dwe="turn",C3={name:"angle",parse:function(e,r){if(r.type===15)switch(r.unit){case lwe:return Math.PI*r.number/180;case cwe:return Math.PI/200*r.number;case uwe:return r.number;case dwe:return Math.PI*2*r.number}throw new Error("Unsupported angle type")}},hwe=function(e){return e.type===15&&(e.unit===lwe||e.unit===cwe||e.unit===uwe||e.unit===dwe)},fwe=function(e){var r=e.filter(Xn).map(function(n){return n.value}).join(" ");switch(r){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ts,Ts];case"to top":case"bottom":return Nc(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ts,Lm];case"to right":case"left":return Nc(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Lm,Lm];case"to bottom":case"top":return Nc(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Lm,Ts];case"to left":case"right":return Nc(270)}return 0},Nc=function(e){return Math.PI*e/180},ep={name:"color",parse:function(e,r){if(r.type===18){var n=vFt[r.name];if(typeof n>"u")throw new Error('Attempting to parse an unsupported color function "'+r.name+'"');return n(e,r.values)}if(r.type===5){if(r.value.length===3){var i=r.value.substring(0,1),a=r.value.substring(1,2),o=r.value.substring(2,3);return Rm(parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16),1)}if(r.value.length===4){var i=r.value.substring(0,1),a=r.value.substring(1,2),o=r.value.substring(2,3),l=r.value.substring(3,4);return Rm(parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16),parseInt(l+l,16)/255)}if(r.value.length===6){var i=r.value.substring(0,2),a=r.value.substring(2,4),o=r.value.substring(4,6);return Rm(parseInt(i,16),parseInt(a,16),parseInt(o,16),1)}if(r.value.length===8){var i=r.value.substring(0,2),a=r.value.substring(2,4),o=r.value.substring(4,6),l=r.value.substring(6,8);return Rm(parseInt(i,16),parseInt(a,16),parseInt(o,16),parseInt(l,16)/255)}}if(r.type===20){var c=$h[r.value.toUpperCase()];if(typeof c<"u")return c}return $h.TRANSPARENT}},tp=function(e){return(255&e)===0},as=function(e){var r=255&e,n=255&e>>8,i=255&e>>16,a=255&e>>24;return r<255?"rgba("+a+","+i+","+n+","+r/255+")":"rgb("+a+","+i+","+n+")"},Rm=function(e,r,n,i){return(e<<24|r<<16|n<<8|Math.round(i*255)<<0)>>>0},Fre=function(e,r){if(e.type===17)return e.number;if(e.type===16){var n=r===3?1:255;return r===3?e.number/100*n:Math.round(e.number/100*n)}return 0},Ore=function(e,r){var n=r.filter(N0);if(n.length===3){var i=n.map(Fre),a=i[0],o=i[1],l=i[2];return Rm(a,o,l,1)}if(n.length===4){var c=n.map(Fre),a=c[0],o=c[1],l=c[2],u=c[3];return Rm(a,o,l,u)}return 0};function oO(e,r,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(r-e)*n*6+e:n<1/2?r:n<2/3?(r-e)*6*(2/3-n)+e:e}var Lre=function(e,r){var n=r.filter(N0),i=n[0],a=n[1],o=n[2],l=n[3],c=(i.type===17?Nc(i.number):C3.parse(e,i))/(Math.PI*2),u=Ba(a)?a.number/100:0,d=Ba(o)?o.number/100:0,h=typeof l<"u"&&Ba(l)?di(l,1):1;if(u===0)return Rm(d*255,d*255,d*255,1);var f=d<=.5?d*(u+1):d+u-d*u,p=d*2-f,m=oO(p,f,c+1/3),A=oO(p,f,c),g=oO(p,f,c-1/3);return Rm(m*255,A*255,g*255,h)},vFt={hsl:Lre,hsla:Lre,rgb:Ore,rgba:Ore},n2=function(e,r){return ep.parse(e,awe.create(r).parseComponentValue())},$h
vendor: 3,054 bytes, line 3229
3229={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},
vendor: 7,649 bytes, line 3229
3229bFt={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,r){return r.map(function(n){if(Xn(n))switch(n.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},wFt={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},N3=function(e,r){var n=ep.parse(e,r[0]),i=r[1];return i&&Ba(i)?{color:n,stop:i}:{color:n,stop:null}},Rre=function(e,r){var n=e[0],i=e[e.length-1];n.stop===null&&(n.stop=Ts),i.stop===null&&(i.stop=Lm);for(var a=[],o=0,l=0;l<e.length;l++){var c=e[l].stop;if(c!==null){var u=di(c,r);u>o?a.push(u):a.push(o),o=u}else a.push(null)}for(var d=null,l=0;l<a.length;l++){var h=a[l];if(h===null)d===null&&(d=l);else if(d!==null){for(var f=l-d,p=a[d-1],m=(h-p)/(f+1),A=1;A<=f;A++)a[d+A-1]=m*A;d=null}}return e.map(function(g,y){var x=g.color;return{color:x,stop:Math.max(Math.min(1,a[y]/r),0)}})},jFt=function(e,r,n){var i=r/2,a=n/2,o=di(e[0],r)-i,l=a-di(e[1],n);return(Math.atan2(l,o)+Math.PI*2)%(Math.PI*2)},_Ft=function(e,r,n){var i=typeof e=="number"?e:jFt(e,r,n),a=Math.abs(r*Math.sin(i))+Math.abs(n*Math.cos(i)),o=r/2,l=n/2,c=a/2,u=Math.sin(i-Math.PI/2)*c,d=Math.cos(i-Math.PI/2)*c;return[a,o-d,o+d,l-u,l+u]},au=function(e,r){return Math.sqrt(e*e+r*r)},Dre=function(e,r,n,i,a){var o=[[0,0],[0,r],[e,0],[e,r]];return o.reduce(function(l,c){var u=c[0],d=c[1],h=au(n-u,i-d);return(a?h<l.optimumDistance:h>l.optimumDistance)?{optimumCorner:c,optimumDistance:h}:l},{optimumDistance:a?1/0:-1/0,optimumCorner:null}).optimumCorner},CFt=function(e,r,n,i,a){var o=0,l=0;switch(e.size){case 0:e.shape===0?o=l=Math.min(Math.abs(r),Math.abs(r-i),Math.abs(n),Math.abs(n-a)):e.shape===1&&(o=Math.min(Math.abs(r),Math.abs(r-i)),l=Math.min(Math.abs(n),Math.abs(n-a)));break;case 2:if(e.shape===0)o=l=Math.min(au(r,n),au(r,n-a),au(r-i,n),au(r-i,n-a));else if(e.shape===1){var c=Math.min(Math.abs(n),Math.abs(n-a))/Math.min(Math.abs(r),Math.abs(r-i)),u=Dre(i,a,r,n,!0),d=u[0],h=u[1];o=au(d-r,(h-n)/c),l=c*o}break;case 1:e.shape===0?o=l=Math.max(Math.abs(r),Math.abs(r-i),Math.abs(n),Math.abs(n-a)):e.shape===1&&(o=Math.max(Math.abs(r),Math.abs(r-i)),l=Math.max(Math.abs(n),Math.abs(n-a)));break;case 3:if(e.shape===0)o=l=Math.max(au(r,n),au(r,n-a),au(r-i,n),au(r-i,n-a));else if(e.shape===1){var c=Math.max(Math.abs(n),Math.abs(n-a))/Math.max(Math.abs(r),Math.abs(r-i)),f=Dre(i,a,r,n,!1),d=f[0],h=f[1];o=au(d-r,(h-n)/c),l=c*o}break}return Array.isArray(e.size)&&(o=di(e.size[0],i),l=e.size.length===2?di(e.size[1],a):o),[o,l]},NFt=function(e,r){var n=Nc(180),i=[];return Wd(r).forEach(function(a,o){if(o===0){var l=a[0];if(l.type===20&&l.value==="to"){n=fwe(a);return}else if(hwe(l)){n=C3.parse(e,l);return}}var c=N3(e,a);i.push(c)}),{angle:n,stops:i,type:1}},CS=function(e,r){var n=Nc(180),i=[];return Wd(r).forEach(function(a,o){if(o===0){var l=a[0];if(l.type===20&&["top","left","right","bottom"].indexOf(l.value)!==-1){n=fwe(a);return}else if(hwe(l)){n=(C3.parse(e,l)+Nc(270))%Nc(360);return}}var c=N3(e,a);i.push(c)}),{angle:n,stops:i,type:1}},SFt=function(e,r){var n=Nc(180),i=[],a=1,o=0,l=3,c=[];return Wd(r).forEach(function(u,d){var h=u[0];if(d===0){if(Xn(h)&&h.value==="linear"){a=1;return}else if(Xn(h)&&h.value==="radial"){a=2;return}}if(h.type===18){if(h.name==="from"){var f=ep.parse(e,h.values[0]);i.push({stop:Ts,color:f})}else if(h.name==="to"){var f=ep.parse(e,h.values[0]);i.push({stop:Lm,color:f})}else if(h.name==="color-stop"){var p=h.values.filter(N0);if(p.length===2){var f=ep.parse(e,p[1]),m=p[0];kb(m)&&i.push({stop:{type:16,number:m.number*100,flags:m.flags},color:f})}}}}),a===1?{angle:(n+Nc(180))%Nc(360),stops:i,type:a}:{size:l,shape:o,stops:i,position:c,type:a}},mwe="closest-side",pwe="farthest-side",Awe="closest-corner",gwe="farthest-corner",xwe="circle",ywe="ellipse",vwe="cover",bwe="contain",kFt=function(e,r){var n=0,i=3,a=[],o=[];return Wd(r).forEach(function(l,c){var u=!0;if(c===0){var d=!1;u=l.reduce(function(f,p){if(d)if(Xn(p))switch(p.value){case"center":return o.push(iH),f;case"top":case"left":return o.push(Ts),f;case"right":case"bottom":return o.push(Lm),f}else(Ba(p)||gp(p))&&o.push(p);else if(Xn(p))switch(p.value){case xwe:return n=0,!1;case ywe:return n=1,!1;case"at":return d=!0,!1;case mwe:return i=0,!1;case vwe:case pwe:return i=1,!1;case bwe:case Awe:return i=2,!1;case gwe:return i=3,!1}else if(gp(p)||Ba(p))return Array.isArray(i)||(i=[]),i.push(p),!1;return f},u)}if(u){var h=N3(e,l);a.push(h)}}),{size:i,shape:n,stops:a,position:o,type:2}},NS=function(e,r){var n=0,i=3,a=[],o=[];return Wd(r).forEach(function(l,c){var u=!0;if(c===0?u=l.reduce(function(h,f){if(Xn(f))switch(f.value){case"center":return o.push(iH),!1;case"top":case"left":return o.push(Ts),!1;case"right":case"bottom":return o.push(Lm),!1}else if(Ba(f)||gp(f))return o.push(f),!1;return h},u):c===1&&(u=l.reduce(function(h,f){if(Xn(f))switch(f.value){case xwe:return n=0,!1;case ywe:return n=1,!1;case bwe:case mwe:return i=0,!1;case pwe:return i=1,!1;case Awe:return i=2,!1;case vwe:case gwe:return i=3,!1}else if(gp(f)||Ba(f))return Array.isArray(i)||(i=[]),i.push(f),!1;return h},u)),u){var d=N3(e,l);a.push(d)}}),{size:i,shape:n,stops:a,position:o,type:2}},EFt=function(e){return e.type===1},BFt=function(e){return e.type===2},aH={name:"image",parse:function(e,r){if(r.type===22){var n={url:r.value,type:0};return e.cache.addImage(r.value),n}if(r.type===18){var i=wwe[r.name];if(typeof i>"u")throw new Error('Attempting to parse an unsupported image function "'+r.name+'"');return i(e,r.values)}throw new Error("Unsupported image type "+r.type)}};function TFt(e){return!(e.type===20&&e.value==="none")&&(e.type!==18||!!wwe[e.name])}var wwe={"linear-gradient":NFt,"-moz-linear-gradient":CS,"-ms-linear-gradient":CS,"-o-linear-gradient":CS,"-webkit-linear-gradient":CS,"radial-gradient":kFt,"-moz-radial-gradient":NS,"-ms-radial-gradient":NS,"-o-radial-gradient":NS,"-webkit-radial-gradient":NS,"-webkit-gradient":SFt},PFt={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,r){if(r.length===0)return[];var n=r[0];return n.type===20&&n.value==="none"?[]:r.filter(function(i){return N0(i)&&TFt(i)}).map(function(i){return aH.parse(e,i)})}},IFt={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,r){return r.map(function(n){if(Xn(n))switch(n.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},FFt={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,r){return Wd(r).map(function(n){return n.filter(Ba)}).map(owe)}},OFt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,r){return Wd(r).map(function(n){return n.filter(Xn).map(function(i){return i.value}).join(" ")}).map(LFt)}},LFt=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},fv;(function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"})(fv||(fv={}));var RFt={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,r){return Wd(r).map(function(n){return n.filter(DFt)})}},DFt=function(e){return Xn(e)||Ba(e)},S3=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},MFt=S3("top"),zFt=S3("right"),UFt=S3("bottom"),$Ft=S3("left"),k3=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(r,n){return owe(n.filter(Ba))}}},QFt=k3("top-left"),HFt=k3("top-right"),VFt=k3("bottom-right"),WFt=k3("bottom-left"),E3=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(r,n){
vendor: 16,763 bytes, line 3229
3229switch(n){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},qFt=E3("top"),KFt=E3("right"),GFt=E3("bottom"),XFt=E3("left"),B3=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(r,n){return iC(n)?n.number:0}}},YFt=B3("top"),JFt=B3("right"),ZFt=B3("bottom"),eOt=B3("left"),tOt={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},rOt={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,r){switch(r){case"rtl":return 1;case"ltr":default:return 0}}},nOt={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,r){return r.filter(Xn).reduce(function(n,i){return n|iOt(i.value)},0)}},iOt=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},aOt={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,r){switch(r){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},sOt={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,r){return r.type===20&&r.value==="normal"?0:r.type===17||r.type===15?r.number:0}},jB;(function(e){e.NORMAL="normal",e.STRICT="strict"})(jB||(jB={}));var oOt={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,r){switch(r){case"strict":return jB.STRICT;case"normal":default:return jB.NORMAL}}},lOt={name:"line-height",initialValue:"normal",prefix:!1,type:4},Mre=function(e,r){return Xn(e)&&e.value==="normal"?1.2*r:e.type===17?r*e.number:Ba(e)?di(e,r):r},cOt={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,r){return r.type===20&&r.value==="none"?null:aH.parse(e,r)}},uOt={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,r){switch(r){case"inside":return 0;case"outside":default:return 1}}},o6={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,r){switch(r){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},T3=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},dOt=T3("top"),hOt=T3("right"),fOt=T3("bottom"),mOt=T3("left"),pOt={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,r){return r.filter(Xn).map(function(n){switch(n.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},AOt={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,r){switch(r){case"break-word":return"break-word";case"normal":default:return"normal"}}},P3=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},gOt=P3("top"),xOt=P3("right"),yOt=P3("bottom"),vOt=P3("left"),bOt={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,r){switch(r){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},wOt={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,r){switch(r){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},jOt={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,r){return r.length===1&&s6(r[0],"none")?[]:Wd(r).map(function(n){for(var i={color:$h.TRANSPARENT,offsetX:Ts,offsetY:Ts,blur:Ts},a=0,o=0;o<n.length;o++){var l=n[o];gp(l)?(a===0?i.offsetX=l:a===1?i.offsetY=l:i.blur=l,a++):i.color=ep.parse(e,l)}return i})}},_Ot={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,r){switch(r){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},COt={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,r){if(r.type===20&&r.value==="none")return null;if(r.type===18){var n=kOt[r.name];if(typeof n>"u")throw new Error('Attempting to parse an unsupported transform function "'+r.name+'"');return n(r.values)}return null}},NOt=function(e){var r=e.filter(function(n){return n.type===17}).map(function(n){return n.number});return r.length===6?r:null},SOt=function(e){var r=e.filter(function(u){return u.type===17}).map(function(u){return u.number}),n=r[0],i=r[1];r[2],r[3];var a=r[4],o=r[5];r[6],r[7],r[8],r[9],r[10],r[11];var l=r[12],c=r[13];return r[14],r[15],r.length===16?[n,i,a,o,l,c]:null},kOt={matrix:NOt,matrix3d:SOt},zre={type:16,number:50,flags:nC},EOt=[zre,zre],BOt={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,r){var n=r.filter(Ba);return n.length!==2?EOt:[n[0],n[1]]}},TOt={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,r){switch(r){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},i2;(function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"})(i2||(i2={}));var POt={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,r){switch(r){case"break-all":return i2.BREAK_ALL;case"keep-all":return i2.KEEP_ALL;case"normal":default:return i2.NORMAL}}},IOt={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,r){if(r.type===20)return{auto:!0,order:0};if(kb(r))return{auto:!1,order:r.number};throw new Error("Invalid z-index number parsed")}},jwe={name:"time",parse:function(e,r){if(r.type===15)switch(r.unit.toLowerCase()){case"s":return 1e3*r.number;case"ms":return r.number}throw new Error("Unsupported time type")}},FOt={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,r){return kb(r)?r.number:1}},OOt={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},LOt={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,r){return r.filter(Xn).map(function(n){switch(n.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(n){return n!==0})}},ROt={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,r){var n=[],i=[];return r.forEach(function(a){switch(a.type){case 20:case 0:n.push(a.value);break;case 17:n.push(a.number.toString());break;case 4:i.push(n.join(" ")),n.length=0;break}}),n.length&&i.push(n.join(" ")),i.map(function(a){return a.indexOf(" ")===-1?a:"'"+a+"'"})}},DOt={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},MOt={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,r){if(kb(r))return r.number;if(Xn(r))switch(r.value){case"bold":return 700;case"normal":default:return 400}return 400}},zOt={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,r){return r.filter(Xn).map(function(n){return n.value})}},UOt={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,r){switch(r){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Ga=function(e,r){return(e&r)!==0},$Ot={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,r){if(r.length===0)return[];var n=r[0];return n.type===20&&n.value==="none"?[]:r}},QOt={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,r){if(r.length===0)return null;var n=r[0];if(n.type===20&&n.value==="none")return null;for(var i=[],a=r.filter(swe),o=0;o<a.length;o++){var l=a[o],c=a[o+1];if(l.type===20){var u=c&&kb(c)?c.number:1;i.push({counter:l.value,increment:u})}}return i}},HOt={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,r){if(r.length===0)return[];for(var n=[],i=r.filter(swe),a=0;a<i.length;a++){var o=i[a],l=i[a+1];if(Xn(o)&&o.value!=="none"){var c=l&&kb(l)?l.number:0;n.push({counter:o.value,reset:c})}}return n}},VOt={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,r){return r.filter(iC).map(function(n){return jwe.parse(e,n)})}},WOt={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,r){if(r.length===0)return null;var n=r[0];if(n.type===20&&n.value==="none")return null;var i=[],a=r.filter(xFt);if(a.length%2!==0)return null;for(var o=0;o<a.length;o+=2){var l=a[o].value,c=a[o+1].value;i.push({open:l,close:c})}return i}},Ure=function(e,r,n){if(!e)return"";var i=e[Math.min(r,e.length-1)];return i?n?i.open:i.close:""},qOt={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,r){return r.length===1&&s6(r[0],"none")?[]:Wd(r).map(function(n){for(var i={color:255,offsetX:Ts,offsetY:Ts,blur:Ts,spread:Ts,inset:!1},a=0,o=0;o<n.length;o++){var l=n[o];s6(l,"inset")?i.inset=!0:gp(l)?(a===0?i.offsetX=l:a===1?i.offsetY=l:a===2?i.blur=l:i.spread=l,a++):i.color=ep.parse(e,l)}return i})}},KOt={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,r){var n=[0,1,2],i=[];return r.filter(Xn).forEach(function(a){switch(a.value){case"stroke":i.push(1);break;case"fill":i.push(0);break;case"markers":i.push(2);break}}),n.forEach(function(a){i.indexOf(a)===-1&&i.push(a)}),i}},GOt={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},XOt={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,r){return iC(r)?r.number:0}},YOt=function(){function e(r,n){var i,a;this.animationDuration=Tt(r,VOt,n.animationDuration),this.backgroundClip=Tt(r,bFt,n.backgroundClip),this.backgroundColor=Tt(r,wFt,n.backgroundColor),this.backgroundImage=Tt(r,PFt,n.backgroundImage),this.backgroundOrigin=Tt(r,IFt,n.backgroundOrigin),this.backgroundPosition=Tt(r,FFt,n.backgroundPosition),this.backgroundRepeat=Tt(r,OFt,n.backgroundRepeat),this.backgroundSize=Tt(r,RFt,n.backgroundSize),this.borderTopColor=Tt(r,MFt,n.borderTopColor),this.borderRightColor=Tt(r,zFt,n.borderRightColor),this.borderBottomColor=Tt(r,UFt,n.borderBottomColor),this.borderLeftColor=Tt(r,$Ft,n.borderLeftColor),this.borderTopLeftRadius=Tt(r,QFt,n.borderTopLeftRadius),this.borderTopRightRadius=Tt(r,HFt,n.borderTopRightRadius),this.borderBottomRightRadius=Tt(r,VFt,n.borderBottomRightRadius),this.borderBottomLeftRadius=Tt(r,WFt,n.borderBottomLeftRadius),this.borderTopStyle=Tt(r,qFt,n.borderTopStyle),this.borderRightStyle=Tt(r,KFt,n.borderRightStyle),this.borderBottomStyle=Tt(r,GFt,n.borderBottomStyle),this.borderLeftStyle=Tt(r,XFt,n.borderLeftStyle),this.borderTopWidth=Tt(r,YFt,n.borderTopWidth),this.borderRightWidth=Tt(r,JFt,n.borderRightWidth),this.borderBottomWidth=Tt(r,ZFt,n.borderBottomWidth),this.borderLeftWidth=Tt(r,eOt,n.borderLeftWidth),this.boxShadow=Tt(r,qOt,n.boxShadow),this.color=Tt(r,tOt,n.color),this.direction=Tt(r,rOt,n.direction),this.display=Tt(r,nOt,n.display),this.float=Tt(r,aOt,n.cssFloat),this.fontFamily=Tt(r,ROt,n.fontFamily),this.fontSize=Tt(r,DOt,n.fontSize),this.fontStyle=Tt(r,UOt,n.fontStyle),this.fontVariant=Tt(r,zOt,n.fontVariant),this.fontWeight=Tt(r,MOt,n.fontWeight),this.letterSpacing=Tt(r,sOt,n.letterSpacing),this.lineBreak=Tt(r,oOt,n.lineBreak),this.lineHeight=Tt(r,lOt,n.lineHeight),this.listStyleImage=Tt(r,cOt,n.listStyleImage),this.listStylePosition=Tt(r,uOt,n.listStylePosition),this.listStyleType=Tt(r,o6,n.listStyleType),this.marginTop=Tt(r,dOt,n.marginTop),this.marginRight=Tt(r,hOt,n.marginRight),this.marginBottom=Tt(r,fOt,n.marginBottom),this.marginLeft=Tt(r,mOt,n.marginLeft),this.opacity=Tt(r,FOt,n.opacity);var o=Tt(r,pOt,n.overflow);this.overflowX=o[0],this.overflowY=o[o.length>1?1:0],this.overflowWrap=Tt(r,AOt,n.overflowWrap),this.paddingTop=Tt(r,gOt,n.paddingTop),this.paddingRight=Tt(r,xOt,n.paddingRight),this.paddingBottom=Tt(r,yOt,n.paddingBottom),this.paddingLeft=Tt(r,vOt,n.paddingLeft),this.paintOrder=Tt(r,KOt,n.paintOrder),this.position=Tt(r,wOt,n.position),this.textAlign=Tt(r,bOt,n.textAlign),this.textDecorationColor=Tt(r,OOt,(i=n.textDecorationColor)!==null&&i!==void 0?i:n.color),this.textDecorationLine=Tt(r,LOt,(a=n.textDecorationLine)!==null&&a!==void 0?a:n.textDecoration),this.textShadow=Tt(r,jOt,n.textShadow),this.textTransform=Tt(r,_Ot,n.textTransform),this.transform=Tt(r,COt,n.transform),this.transformOrigin=Tt(r,BOt,n.transformOrigin),this.visibility=Tt(r,TOt,n.visibility),this.webkitTextStrokeColor=Tt(r,GOt,n.webkitTextStrokeColor),this.webkitTextStrokeWidth=Tt(r,XOt,n.webkitTextStrokeWidth),this.wordBreak=Tt(r,POt,n.wordBreak),this.zIndex=Tt(r,IOt,n.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return tp(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return Ga(this.display,4)||Ga(this.display,33554432)||Ga(this.display,268435456)||Ga(this.display,536870912)||Ga(this.display,67108864)||Ga(this.display,134217728)},e}(),JOt=function(){function e(r,n){this.content=Tt(r,$Ot,n.content),this.quotes=Tt(r,WOt,n.quotes)}return e}(),$re=function(){function e(r,n){this.counterIncrement=Tt(r,QOt,n.counterIncrement),this.counterReset=Tt(r,HOt,n.counterReset)}return e}(),Tt=function(e,r,n){var i=new iwe,a=n!==null&&typeof n<"u"?n.toString():r.initialValue;i.write(a);var o=new awe(i.read());switch(r.type){case 2:var l=o.parseComponentValue();return r.parse(e,Xn(l)?l.value:r.initialValue);case 0:return r.parse(e,o.parseComponentValue());case 1:return r.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(r.format){case"angle":return C3.parse(e,o.parseComponentValue());case"color":return ep.parse(e,o.parseComponentValue());case"image":return aH.parse(e,o.parseComponentValue());case"length":var c=o.parseComponentValue();return gp(c)?c:Ts;case"length-percentage":var u=o.parseComponentValue();return Ba(u)?u:Ts;case"time":return jwe.parse(e,o.parseComponentValue())}break}},ZOt="data-html2canvas-debug",eLt=function(e){var r=e.getAttribute(ZOt);switch(r){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},l6=function(e,r){var n=eLt(e);return n===1||r===n},qd=function(){function e(r,n){if(this.context=r,this.textNodes=[],this.elements=[],this.flags=0,l6(n,3))debugger;this.styles=new YOt(r,window.getComputedStyle(n,null)),d6(n)&&(this.styles.animationDuration.some(function(i){return i>0})&&(n.style.animationDuration="0s"),this.styles.transform!==null&&(n.style.transform="none")),this.bounds=j3(this.context,n),l6(n,4)&&(this.flags|=16)}return e}(),tLt=
vendor: 26,159 bytes, line 3229
3229"AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",
3229Qre="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 15,724 bytes, line 3229
3229+/",yw=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var SS=0;SS<Qre.length;SS++)yw[Qre.charCodeAt(SS)]=SS;var rLt=function(e){var r=e.length*.75,n=e.length,i,a=0,o,l,c,u;e[e.length-1]==="="&&(r--,e[e.length-2]==="="&&r--);var d=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(r):new Array(r),h=Array.isArray(d)?d:new Uint8Array(d);for(i=0;i<n;i+=4)o=yw[e.charCodeAt(i)],l=yw[e.charCodeAt(i+1)],c=yw[e.charCodeAt(i+2)],u=yw[e.charCodeAt(i+3)],h[a++]=o<<2|l>>4,h[a++]=(l&15)<<4|c>>2,h[a++]=(c&3)<<6|u&63;return d},nLt=function(e){for(var r=e.length,n=[],i=0;i<r;i+=2)n.push(e[i+1]<<8|e[i]);return n},iLt=function(e){for(var r=e.length,n=[],i=0;i<r;i+=4)n.push(e[i+3]<<24|e[i+2]<<16|e[i+1]<<8|e[i]);return n},sg=5,sH=11,lO=2,aLt=sH-sg,_we=65536>>sg,sLt=1<<sg,cO=sLt-1,oLt=1024>>sg,lLt=_we+oLt,cLt=lLt,uLt=32,dLt=cLt+uLt,hLt=65536>>sH,fLt=1<<aLt,mLt=fLt-1,Hre=function(e,r,n){return e.slice?e.slice(r,n):new Uint16Array(Array.prototype.slice.call(e,r,n))},pLt=function(e,r,n){return e.slice?e.slice(r,n):new Uint32Array(Array.prototype.slice.call(e,r,n))},ALt=function(e,r){var n=rLt(e),i=Array.isArray(n)?iLt(n):new Uint32Array(n),a=Array.isArray(n)?nLt(n):new Uint16Array(n),o=24,l=Hre(a,o/2,i[4]/2),c=i[5]===2?Hre(a,(o+i[4])/2):pLt(i,Math.ceil((o+i[4])/4));return new gLt(i[0],i[1],i[2],i[3],l,c)},gLt=function(){function e(r,n,i,a,o,l){this.initialValue=r,this.errorValue=n,this.highStart=i,this.highValueIndex=a,this.index=o,this.data=l}return e.prototype.get=function(r){var n;if(r>=0){if(r<55296||r>56319&&r<=65535)return n=this.index[r>>sg],n=(n<<lO)+(r&cO),this.data[n];if(r<=65535)return n=this.index[_we+(r-55296>>sg)],n=(n<<lO)+(r&cO),this.data[n];if(r<this.highStart)return n=dLt-hLt+(r>>sH),n=this.index[n],n+=r>>sg&mLt,n=this.index[n],n=(n<<lO)+(r&cO),this.data[n];if(r<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Vre="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xLt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var kS=0;kS<Vre.length;kS++)xLt[Vre.charCodeAt(kS)]=kS;var yLt=1,uO=2,dO=3,Wre=4,qre=5,vLt=7,Kre=8,hO=9,fO=10,Gre=11,Xre=12,Yre=13,Jre=14,mO=15,bLt=function(e){for(var r=[],n=0,i=e.length;n<i;){var a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<i){var o=e.charCodeAt(n++);(o&64512)===56320?r.push(((a&1023)<<10)+(o&1023)+65536):(r.push(a),n--)}else r.push(a)}return r},wLt=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var i=[],a=-1,o="";++a<n;){var l=e[a];l<=65535?i.push(l):(l-=65536,i.push((l>>10)+55296,l%1024+56320)),(a+1===n||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},jLt=ALt(tLt),hc="×",pO="÷",_Lt=function(e){return jLt.get(e)},CLt=function(e,r,n){var i=n-2,a=r[i],o=r[n-1],l=r[n];if(o===uO&&l===dO)return hc;if(o===uO||o===dO||o===Wre||l===uO||l===dO||l===Wre)return pO;if(o===Kre&&[Kre,hO,Gre,Xre].indexOf(l)!==-1||(o===Gre||o===hO)&&(l===hO||l===fO)||(o===Xre||o===fO)&&l===fO||l===Yre||l===qre||l===vLt||o===yLt)return hc;if(o===Yre&&l===Jre){for(;a===qre;)a=r[--i];if(a===Jre)return hc}if(o===mO&&l===mO){for(var c=0;a===mO;)c++,a=r[--i];if(c%2===0)return hc}return pO},NLt=function(e){var r=bLt(e),n=r.length,i=0,a=0,o=r.map(_Lt);return{next:function(){if(i>=n)return{done:!0,value:null};for(var l=hc;i<n&&(l=CLt(r,o,++i))===hc;);if(l!==hc||i===n){var c=wLt.apply(null,r.slice(a,i));return a=i,{value:c,done:!1}}return{done:!0,value:null}}}},SLt=function(e){for(var r=NLt(e),n=[],i;!(i=r.next()).done;)i.value&&n.push(i.value.slice());return n},kLt=function(e){var r=123;if(e.createRange){var n=e.createRange();if(n.getBoundingClientRect){var i=e.createElement("boundtest");i.style.height=r+"px",i.style.display="block",e.body.appendChild(i),n.selectNode(i);var a=n.getBoundingClientRect(),o=Math.round(a.height);if(e.body.removeChild(i),o===r)return!0}}return!1},ELt=function(e){var r=e.createElement("boundtest");r.style.width="50px",r.style.display="block",r.style.fontSize="12px",r.style.letterSpacing="0px",r.style.wordSpacing="0px",e.body.appendChild(r);var n=e.createRange();r.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var i=r.firstChild,a=_3(i.data).map(function(u){return ha(u)}),o=0,l={},c=a.every(function(u,d){n.setStart(i,o),n.setEnd(i,o+u.length);var h=n.getBoundingClientRect();o+=u.length;var f=h.x>l.x||h.y>l.y;return l=h,d===0?!0:f});return e.body.removeChild(r),c},BLt=function(){return typeof new Image().crossOrigin<"u"},TLt=function(){return typeof new XMLHttpRequest().responseType=="string"},PLt=function(e){var r=new Image,n=e.createElement("canvas"),i=n.getContext("2d");if(!i)return!1;r.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(r,0,0),n.toDataURL()}catch{return!1}return!0},Zre=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},ILt=function(e){var r=e.createElement("canvas"),n=100;r.width=n,r.height=n;var i=r.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,n,n);var a=new Image,o=r.toDataURL();a.src=o;var l=c6(n,n,0,0,a);return i.fillStyle="red",i.fillRect(0,0,n,n),ene(l).then(function(c){i.drawImage(c,0,0);var u=i.getImageData(0,0,n,n).data;i.fillStyle="red",i.fillRect(0,0,n,n);var d=e.createElement("div");return d.style.backgroundImage="url("+o+")",d.style.height=n+"px",Zre(u)?ene(c6(n,n,0,0,d)):Promise.reject(!1)}).then(function(c){return i.drawImage(c,0,0),Zre(i.getImageData(0,0,n,n).data)}).catch(function(){return!1})},c6=function(e,r,n,i,a){var o="http://www.w3.org/2000/svg",l=document.createElementNS(o,"svg"),c=document.createElementNS(o,"foreignObject");return l.setAttributeNS(null,"width",e.toString()),l.setAttributeNS(null,"height",r.toString()),c.setAttributeNS(null,"width","100%"),c.setAttributeNS(null,"height","100%"),c.setAttributeNS(null,"x",n.toString()),c.setAttributeNS(null,"y",i.toString()),c.setAttributeNS(null,"externalResourcesRequired","true"),l.appendChild(c),c.appendChild(a),l},ene=function(e){return new Promise(function(r,n){var i=new Image;i.onload=function(){return r(i)},i.onerror=n,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},Es={get SUPPORT_RANGE_BOUNDS(){var e=kLt(document);return Object.defineProperty(Es,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Es.SUPPORT_RANGE_BOUNDS&&ELt(document);return Object.defineProperty(Es,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=PLt(document);return Object.defineProperty(Es,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from=="function"&&typeof window.fetch=="function"?ILt(document):Promise.resolve(!1);return Object.defineProperty(Es,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=BLt();return Object.defineProperty(Es,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=TLt();return Object.defineProperty(Es,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Es,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Es,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},a2=function(){function e(r,n){this.text=r,this.bounds=n}return e}(),FLt=function(e,r,n,i){var a=RLt(r,n),o=[],l=0;return a.forEach(function(c){if(n.textDecorationLine.length||c.trim().length>0)if(Es.SUPPORT_RANGE_BOUNDS){var u=tne(i,l,c.length).getClientRects();if(u.length>1){var d=oH(c),h=0;d.forEach(function(p){o.push(new a2(p,df.fromDOMRectList(e,tne(i,h+l,p.length).getClientRects()))),h+=p.length})}else o.push(new a2(c,df.fromDOMRectList(e,u)))}else{var f=i.splitText(c.length);o.push(new a2(c,OLt(e,i))),i=f}else Es.SUPPORT_RANGE_BOUNDS||(i=i.splitText(c.length));l+=c.length}),o},OLt=function(e,r){var n=r.ownerDocument;if(n){var i=n.createElement("html2canvaswrapper");i.appendChild(r.cloneNode(!0));var a=r.parentNode;if(a){a.replaceChild(i,r);var o=j3(e,i);return i.firstChild&&a.replaceChild(i.firstChild,i),o}}return df.EMPTY},tne=function(e,r,n){var i=e.ownerDocument;if(!i)throw new Error("Node has no owner document");var a=i.createRange();return a.setStart(e,r),a.setEnd(e,r+n),a},oH=function(e){if(Es.SUPPORT_NATIVE_TEXT_SEGMENTATION){var r=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(r.segment(e)).map(function(n){return n.segment})}return SLt(e)},LLt=function(e,r){if(Es.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(e)).map(function(i){return i.segment})}return MLt(e,r)},RLt=function(e,r){return r.letterSpacing!==0?oH(e):LLt(e,r)},DLt=[32,160,4961,65792,65793,4153,4241],MLt=function(e,r){for(var n=hIt(e,{lineBreak:r.lineBreak,wordBreak:r.overflowWrap==="break-word"?"break-word":r.wordBreak}),i=[],a,o=function(){if(a.value){var l=a.value.slice(),c=_3(l),u="";c.forEach(function(d){DLt.indexOf(d)===-1?u+=ha(d):(u.length&&i.push(u),i.push(ha(d)),u="")}),u.length&&i.push(u)}};!(a=n.next()).done;)o();return i},zLt=function(){function e(r,n,i){this.text=ULt(n.data,i.textTransform),this.textBounds=FLt(r,this.text,i,n)}return e}(),ULt=function(e,r){switch(r){case 1:return e.toLowerCase();case 3:return e.replace($Lt,QLt);case 2:return e.toUpperCase();default:return e}},$Lt=/(^|\s|:|-|\(|\))([a-z])/g,QLt=function(e,r,n){return e.length>0?r+n.toUpperCase():e},Cwe=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this;return a.src=i.currentSrc||i.src,a.intrinsicWidth=i.naturalWidth,a.intrinsicHeight=i.naturalHeight,a.context.cache.addImage(a.src),a}return r}(qd),Nwe=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this;return a.canvas=i,a.intrinsicWidth=i.width,a.intrinsicHeight=i.height,a}return r}(qd),Swe=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this,o=new XMLSerializer,l=j3(n,i);return i.setAttribute("width",l.width+"px"),i.setAttribute("height",l.height+"px"),a.svg="data:image/svg+xml,"+encodeURIComponent(o.serializeToString(i)),a.intrinsicWidth=i.width.baseVal.value,a.intrinsicHeight=i.height.baseVal.value,a.context.cache.addImage(a.svg),a}return r}(qd),kwe=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this;return a.value=i.value,a}return r}(qd),u6=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this;return a.start=i.start,a.reversed=typeof i.reversed=="boolean"&&i.reversed===!0,a}return r}(qd),HLt=[{type:15,flags:0,unit:"px",number:3}],VLt=[{type:16,flags:0,number:50}],WLt=function(e){return e.width>e.height?new df(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new df(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e},qLt=function(e){var r=e.type===KLt?new Array(e.value.length+1).join("•"):e.value;return r.length===0?e.placeholder||"":r},_B="checkbox",CB="radio",KLt="password",rne=707406591,lH=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this;switch(a.type=i.type.toLowerCase(),a.checked=i.checked,a.value=qLt(i),(a.type===_B||a.type===CB)&&(a.styles.backgroundColor=3739148031,a.styles.borderTopColor=a.styles.borderRightColor=a.styles.borderBottomColor=a.styles.borderLeftColor=2779096575,a.styles.borderTopWidth=a.styles.borderRightWidth=a.styles.borderBottomWidth=a.styles.borderLeftWidth=1,a.styles.borderTopStyle=a.styles.borderRightStyle=a.styles.borderBottomStyle=a.styles.borderLeftStyle=1,a.styles.backgroundClip=[0],a.styles.backgroundOrigin=[0],a.bounds=WLt(a.bounds)),a.type){case _B:a.styles.borderTopRightRadius=a.styles.borderTopLeftRadius=a.styles.borderBottomRightRadius=a.styles.borderBottomLeftRadius=HLt;break;case CB:a.styles.borderTopRightRadius=a.styles.borderTopLeftRadius=a.styles.borderBottomRightRadius=a.styles.borderBottomLeftRadius=VLt;break}return a}return r}(qd),Ewe=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this,o=i.options[i.selectedIndex||0];return a.value=o&&o.text||"",a}return r}(qd),Bwe=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this;return a.value=i.value,a}return r}(qd),Twe=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this;a.src=i.src,a.width=parseInt(i.width,10)||0,a.height=parseInt(i.height,10)||0,a.backgroundColor=a.styles.backgroundColor;try{if(i.contentWindow&&i.contentWindow.document&&i.contentWindow.document.documentElement){a.tree=Iwe(n,i.contentWindow.document.documentElement);var o=i.contentWindow.document.documentElement?n2(n,getComputedStyle(i.contentWindow.document.documentElement).backgroundColor):$h.TRANSPARENT,l=i.contentWindow.document.body?n2(n,getComputedStyle(i.contentWindow.document.body).backgroundColor):$h.TRANSPARENT;a.backgroundColor=tp(o)?tp(l)?a.styles.backgroundColor:l:o}}catch{}return a}return r}(qd),GLt=["OL","UL","MENU"],Bk=function(e,r,n,i){for(var a=r.firstChild,o=void 0;a;a=o)if(o=a.nextSibling,Fwe(a)&&a.data.trim().length>0)n.textNodes.push(new zLt(e,a,n.styles));else if(Ry(a))if(Dwe(a)&&a.assignedNodes)a.assignedNodes().forEach(function(c){return Bk(e,c,n,i)});else{var l=Pwe(e,a);l.styles.isVisible()&&(XLt(a,l,i)?l.flags|=4:YLt(l.styles)&&(l.flags|=2),GLt.indexOf(a.tagName)!==-1&&(l.flags|=8),n.elements.push(l),a.slot,a.shadowRoot?Bk(e,a.shadowRoot,l,i):!NB(a)&&!Owe(a)&&!SB(a)&&Bk(e,a,l,i))}},Pwe=function(e,r){return h6(r)?new Cwe(e,r):Lwe(r)?new Nwe(e,r):Owe(r)?new Swe(e,r):JLt(r)?new kwe(e,r):ZLt(r)?new u6(e,r):eRt(r)?new lH(e,r):SB(r)?new Ewe(e,r):NB(r)?new Bwe(e,r):Rwe(r)?new Twe(e,r):new qd(e,r)},Iwe=function(e,r){var n=Pwe(e,r);return n.flags|=4,Bk(e,r,n,n),n},XLt=function(e,r,n){return r.styles.isPositionedWithZIndex()||r.styles.opacity<1||r.styles.isTransformed()||cH(e)&&n.styles.isTransparent()},YLt=function(e){return e.isPositioned()||e.isFloating()},Fwe=function(e){return e.nodeType===Node.TEXT_NODE},Ry=function(e){return e.nodeType===Node.ELEMENT_NODE},d6=function(e){return Ry(e)&&typeof e.style<"u"&&!Tk(e)},Tk=function(e){return typeof e.className=="object"},JLt=function(e){return e.tagName==="LI"},ZLt=function(e){return e.tagName==="OL"},eRt=function(e){return e.tagName==="INPUT"},tRt=function(e){return e.tagName==="HTML"},Owe=function(e){return e.tagName==="svg"},cH=function(e){return e.tagName==="BODY"},Lwe=function(e){return e.tagName==="CANVAS"},nne=function(e){return e.tagName==="VIDEO"},h6=function(e){return e.tagName==="IMG"},Rwe=function(e){return e.tagName==="IFRAME"},ine=function(e){return e.tagName==="STYLE"},rRt=function(e){return e.tagName==="SCRIPT"},NB=function(e){return e.tagName==="TEXTAREA"},SB=function(e){return e.tagName==="SELECT"},Dwe=function(e){return e.tagName==="SLOT"},ane=function(e){return e.tagName.indexOf("-")>0},nRt=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(r){var n=this.counters[r];return n&&n.length?n[n.length-1]:1},e.prototype.getCounterValues=function(r){var n=this.counters[r];return n||[]},e.prototype.pop=function(r){var n=this;r.forEach(function(i){return n.counters[i].pop()})},e.prototype.parse=function(r){var n=this,i=r.counterIncrement,a=r.counterReset,o=!0;i!==null&&i.forEach(function(c){var u=n.counters[c.counter];u&&c.increment!==0&&(o=!1,u.length||u.push(1),u[Math.max(0,u.length-1)]+=c.increment)});var l=[];return o&&a.forEach(function(c){var u=n.counters[c.counter];l.push(c.counter),u||(u=n.counters[c.counter]=[]),u.push(c.reset)}),l},e}(),sne={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},one={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,9
vendor: 4,966 bytes, line 3229
32290,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},iRt={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},aRt={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Kx=function(e,r,n,i,a,o){return e<r||e>n?Yj(e,a,o.length>0):i.integers.reduce(function(l,c,u){for(;e>=c;)e-=c,l+=i.values[u];return l},"")+o},Mwe=function(e,r,n,i){var a="";do n||e--,a=i(e)+a,e/=r;while(e*r>=r);return a},da=function(e,r,n,i,a){var o=n-r+1;return(e<0?"-":"")+(Mwe(Math.abs(e),o,i,function(l){return ha(Math.floor(l%o)+r)})+a)},oA=function(e,r,n){n===void 0&&(n=". ");var i=r.length;return Mwe(Math.abs(e),i,!1,function(a){return r[Math.floor(a%i)]})+n},oy=1,em=2,tm=4,vw=8,ph=function(e,r,n,i,a,o){if(e<-9999||e>9999)return Yj(e,4,a.length>0);var l=Math.abs(e),c=a;if(l===0)return r[0]+c;for(var u=0;l>0&&u<=4;u++){var d=l%10;d===0&&Ga(o,oy)&&c!==""?c=r[d]+c:d>1||d===1&&u===0||d===1&&u===1&&Ga(o,em)||d===1&&u===1&&Ga(o,tm)&&e>100||d===1&&u>1&&Ga(o,vw)?c=r[d]+(u>0?n[u-1]:"")+c:d===1&&u>0&&(c=n[u-1]+c),l=Math.floor(l/10)}return(e<0?i:"")+c},lne="十百千萬",cne="拾佰仟萬",une="マイナス",AO="마이너스",Yj=function(e,r,n){var i=n?". ":"",a=n?"、":"",o=n?", ":"",l=n?" ":"";switch(r){case 0:return"•"+l;case 1:return"◦"+l;case 2:return"◾"+l;case 5:var c=da(e,48,57,!0,i);return c.length<4?"0"+c:c;case 4:return oA(e,"〇一二三四五六七八九",a);case 6:return Kx(e,1,3999,sne,3,i).toLowerCase();case 7:return Kx(e,1,3999,sne,3,i);case 8:return da(e,945,969,!1,i);case 9:return da(e,97,122,!1,i);case 10:return da(e,65,90,!1,i);case 11:return da(e,1632,1641,!0,i);case 12:case 49:return Kx(e,1,9999,one,3,i);case 35:return Kx(e,1,9999,one,3,i).toLowerCase();case 13:return da(e,2534,2543,!0,i);case 14:case 30:return da(e,6112,6121,!0,i);case 15:return oA(e,"子丑寅卯辰巳午未申酉戌亥",a);case 16:return oA(e,"甲乙丙丁戊己庚辛壬癸",a);case 17:case 48:return ph(e,"零一二三四五六七八九",lne,"負",a,em|tm|vw);case 47:return ph(e,"零壹貳參肆伍陸柒捌玖",cne,"負",a,oy|em|tm|vw);case 42:return ph(e,"零一二三四五六七八九",lne,"负",a,em|tm|vw);case 41:return ph(e,"零壹贰叁肆伍陆柒捌玖",cne,"负",a,oy|em|tm|vw);case 26:return ph(e,"〇一二三四五六七八九","十百千万",une,a,0);case 25:return ph(e,"零壱弐参四伍六七八九","拾百千万",une,a,oy|em|tm);case 31:return ph(e,"영일이삼사오육칠팔구","십백천만",AO,o,oy|em|tm);case 33:return ph(e,"零一二三四五六七八九","十百千萬",AO,o,0);case 32:return ph(e,"零壹貳參四五六七八九","拾百千",AO,o,oy|em|tm);case 18:return da(e,2406,2415,!0,i);case 20:return Kx(e,1,19999,aRt,3,i);case 21:return da(e,2790,2799,!0,i);case 22:return da(e,2662,2671,!0,i);case 22:return Kx(e,1,10999,iRt,3,i);case 23:return oA(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return oA(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return da(e,3302,3311,!0,i);case 28:return oA(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",a);case 29:return oA(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",a);case 34:return da(e,3792,3801,!0,i);case 37:return da(e,6160,6169,!0,i);case 38:return da(e,4160,4169,!0,i);case 39:return da(e,2918,2927,!0,i);case 40:return da(e,1776,1785,!0,i);case 43:return da(e,3046,3055,!0,i);case 44:return da(e,3174,3183,!0,i);case 45:return da(e,3664,3673,!0,i);case 46:return da(e,3872,3881,!0,i);case 3:default:return da(e,48,57,!0,i)}},zwe="data-html2canvas-ignore",dne=function(){function e(r,n,i){if(this.context=r,this.options=i,this.scrolledElements=[],this.referenceElement=n,this.counters=new nRt,this.quoteDepth=0,!n.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(n.ownerDocument.documentElement,!1)}
vendor: 9,348 bytes, lines 3229-3233
3229return e.prototype.toIFrame=function(r,n){var i=this,a=sRt(r,n);if(!a.contentWindow)return Promise.reject("Unable to find iframe window");var o=r.defaultView.pageXOffset,l=r.defaultView.pageYOffset,c=a.contentWindow,u=c.document,d=cRt(a).then(function(){return xo(i,void 0,void 0,function(){var h,f;return Ys(this,function(p){switch(p.label){case 0:return this.scrolledElements.forEach(fRt),c&&(c.scrollTo(n.left,n.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(c.scrollY!==n.top||c.scrollX!==n.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(c.scrollX-n.left,c.scrollY-n.top,0,0))),h=this.options.onclone,f=this.clonedReferenceElement,typeof f>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:u.fonts&&u.fonts.ready?[4,u.fonts.ready]:[3,2];case 1:p.sent(),p.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,lRt(u)]:[3,4];case 3:p.sent(),p.label=4;case 4:return typeof h=="function"?[2,Promise.resolve().then(function(){return h(u,f)}).then(function(){return a})]:[2,a]}})})});return u.open(),u.write(dRt(document.doctype)+"<html></html>"),hRt(this.referenceElement.ownerDocument,o,l),u.replaceChild(u.adoptNode(this.documentElement),u.documentElement),u.close(),d},e.prototype.createElementClone=function(r){if(l6(r,2))debugger;if(Lwe(r))return this.createCanvasClone(r);if(nne(r))return this.createVideoClone(r);if(ine(r))return this.createStyleClone(r);var n=r.cloneNode(!1);return h6(n)&&(h6(r)&&r.currentSrc&&r.currentSrc!==r.src&&(n.src=r.currentSrc,n.srcset=""),n.loading==="lazy"&&(n.loading="eager")),ane(n)?this.createCustomElementClone(n):n},e.prototype.createCustomElementClone=function(r){var n=document.createElement("html2canvascustomelement");return gO(r.style,n),n},e.prototype.createStyleClone=function(r){try{var n=r.sheet;if(n&&n.cssRules){var i=[].slice.call(n.cssRules,0).reduce(function(o,l){return l&&typeof l.cssText=="string"?o+l.cssText:o},""),a=r.cloneNode(!1);return a.textContent=i,a}}catch(o){if(this.context.logger.error("Unable to access cssRules property",o),o.name!=="SecurityError")throw o}return r.cloneNode(!1)},e.prototype.createCanvasClone=function(r){var n;if(this.options.inlineImages&&r.ownerDocument){var i=r.ownerDocument.createElement("img");try{return i.src=r.toDataURL(),i}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",r)}}var a=r.cloneNode(!1);try{a.width=r.width,a.height=r.height;var o=r.getContext("2d"),l=a.getContext("2d");if(l)if(!this.options.allowTaint&&o)l.putImageData(o.getImageData(0,0,r.width,r.height),0,0);else{var c=(n=r.getContext("webgl2"))!==null&&n!==void 0?n:r.getContext("webgl");if(c){var u=c.getContextAttributes();(u==null?void 0:u.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",r)}l.drawImage(r,0,0)}return a}catch{this.context.logger.info("Unable to clone canvas as it is tainted",r)}return a},e.prototype.createVideoClone=function(r){var n=r.ownerDocument.createElement("canvas");n.width=r.offsetWidth,n.height=r.offsetHeight;var i=n.getContext("2d");try{return i&&(i.drawImage(r,0,0,n.width,n.height),this.options.allowTaint||i.getImageData(0,0,n.width,n.height)),n}catch{this.context.logger.info("Unable to clone video as it is tainted",r)}var a=r.ownerDocument.createElement("canvas");return a.width=r.offsetWidth,a.height=r.offsetHeight,a},e.prototype.appendChildNode=function(r,n,i){(!Ry(n)||!rRt(n)&&!n.hasAttribute(zwe)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(n)))&&(!this.options.copyStyles||!Ry(n)||!ine(n))&&r.appendChild(this.cloneNode(n,i))},e.prototype.cloneChildNodes=function(r,n,i){for(var a=this,o=r.shadowRoot?r.shadowRoot.firstChild:r.firstChild;o;o=o.nextSibling)if(Ry(o)&&Dwe(o)&&typeof o.assignedNodes=="function"){var l=o.assignedNodes();l.length&&l.forEach(function(c){return a.appendChildNode(n,c,i)})}else this.appendChildNode(n,o,i)},e.prototype.cloneNode=function(r,n){if(Fwe(r))return document.createTextNode(r.data);if(!r.ownerDocument)return r.cloneNode(!1);var i=r.ownerDocument.defaultView;if(i&&Ry(r)&&(d6(r)||Tk(r))){var a=this.createElementClone(r);a.style.transitionProperty="none";var o=i.getComputedStyle(r),l=i.getComputedStyle(r,":before"),c=i.getComputedStyle(r,":after");this.referenceElement===r&&d6(a)&&(this.clonedReferenceElement=a),cH(a)&&ARt(a);var u=this.counters.parse(new $re(this.context,o)),d=this.resolvePseudoContent(r,a,l,s2.BEFORE);ane(r)&&(n=!0),nne(r)||this.cloneChildNodes(r,a,n),d&&a.insertBefore(d,a.firstChild);var h=this.resolvePseudoContent(r,a,c,s2.AFTER);return h&&a.appendChild(h),this.counters.pop(u),(o&&(this.options.copyStyles||Tk(r))&&!Rwe(r)||n)&&gO(o,a),(r.scrollTop!==0||r.scrollLeft!==0)&&this.scrolledElements.push([a,r.scrollLeft,r.scrollTop]),(NB(r)||SB(r))&&(NB(a)||SB(a))&&(a.value=r.value),a}return r.cloneNode(!1)},e.prototype.resolvePseudoContent=function(r,n,i,a){var o=this;if(i){var l=i.content,c=n.ownerDocument;if(!(!c||!l||l==="none"||l==="-moz-alt-content"||i.display==="none")){this.counters.parse(new $re(this.context,i));var u=new JOt(this.context,i),d=c.createElement("html2canvaspseudoelement");gO(i,d),u.content.forEach(function(f){if(f.type===0)d.appendChild(c.createTextNode(f.value));else if(f.type===22){var p=c.createElement("img");p.src=f.value,p.style.opacity="1",d.appendChild(p)}else if(f.type===18){if(f.name==="attr"){var m=f.values.filter(Xn);m.length&&d.appendChild(c.createTextNode(r.getAttribute(m[0].value)||""))}else if(f.name==="counter"){var A=f.values.filter(N0),g=A[0],y=A[1];if(g&&Xn(g)){var x=o.counters.getCounterValue(g.value),b=y&&Xn(y)?o6.parse(o.context,y.value):3;d.appendChild(c.createTextNode(Yj(x,b,!1)))}}else if(f.name==="counters"){var v=f.values.filter(N0),g=v[0],j=v[1],y=v[2];if(g&&Xn(g)){var _=o.counters.getCounterValues(g.value),C=y&&Xn(y)?o6.parse(o.context,y.value):3,N=j&&j.type===0?j.value:"",S=_.map(function(B){return Yj(B,C,!1)}).join(N);d.appendChild(c.createTextNode(S))}}}else if(f.type===20)switch(f.value){case"open-quote":d.appendChild(c.createTextNode(Ure(u.quotes,o.quoteDepth++,!0)));break;case"close-quote":d.appendChild(c.createTextNode(Ure(u.quotes,--o.quoteDepth,!1)));break;default:d.appendChild(c.createTextNode(f.value))}}),d.className=f6+" "+m6;var h=a===s2.BEFORE?" "+f6:" "+m6;return Tk(n)?n.className.baseValue+=h:n.className+=h,d}}},e.destroy=function(r){return r.parentNode?(r.parentNode.removeChild(r),!0):!1},e}(),s2;(function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"})(s2||(s2={}));var sRt=function(e,r){var n=e.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=r.width.toString(),n.height=r.height.toString(),n.scrolling="no",n.setAttribute(zwe,"true"),e.body.appendChild(n),n},oRt=function(e){return new Promise(function(r){if(e.complete){r();return}if(!e.src){r();return}e.onload=r,e.onerror=r})},lRt=function(e){return Promise.all([].slice.call(e.images,0).map(oRt))},cRt=function(e){return new Promise(function(r,n){var i=e.contentWindow;if(!i)return n("No window assigned for iframe");var a=i.document;i.onload=e.onload=function(){i.onload=e.onload=null;var o=setInterval(function(){a.body.childNodes.length>0&&a.readyState==="complete"&&(clearInterval(o),r(e))},50)}})},uRt=["all","d","content"],gO=function(e,r){for(var n=e.length-1;n>=0;n--){var i=e.item(n);uRt.indexOf(i)===-1&&r.style.setProperty(i,e.getPropertyValue(i))}return r},dRt=function(e){var r="";return e&&(r+="<!DOCTYPE ",e.name&&(r+=e.name),e.internalSubset&&(r+=e.internalSubset),e.publicId&&(r+='"'+e.publicId+'"'),e.systemId&&(r+='"'+e.systemId+'"'),r+=">"),r},hRt=function(e,r,n){e&&e.defaultView&&(r!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(r,n)},fRt=function(e){var r=e[0],n=e[1],i=e[2];r.scrollLeft=n,r.scrollTop=i},mRt=":before",pRt=":after",f6="___html2canvas___pseudoelement_before",m6="___html2canvas___pseudoelement_after",hne=`{
3230    content: "" !important;
3231    display: none !important;
3232}`,ARt=function(e){gRt(e,"."+f6+mRt+hne+`
3233         .`+m6+pRt+hne)},gRt=function(e,r){var n=e.ownerDocument;if(n){var i=n.createElement("style");i.textContent=r,e.appendChild(i)}},Uwe=function(){function e(){}return e.getOrigin=function(r){var n=e._link;return n?(n.href=r,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(r){return e.getOrigin(r)===e._origin},e.setContext=function(r){e._link=r.document.createElement("a"),e._origin=e.getOrigin(r.location.href)},e._origin="about:blank",e}(),xRt=function(){function e(r,n){this.context=r,this._options=n,this._cache={}}return e.prototype.addImage=function(r){var n=Promise.resolve();return this.has(r)||(yO(r)||wRt(r))&&(this._cache[r]=this.loadImage(r)).catch(function(){}),n},e.prototype.match=function(r){return this._cache[r]},e.prototype.loadImage=function(r){return xo(this,void 0,void 0,function(){var n,i,a,o,l=this;return Ys(this,function(c){switch(c.label){case 0:return n=Uwe.isSameOrigin(r),i=!xO(r)&&this._options.useCORS===!0&&Es.SUPPORT_CORS_IMAGES&&!n,a=!xO(r)&&!n&&!yO(r)&&typeof this._options.proxy=="str
3233ing"&&Es.SUPPORT_CORS_XHR&&!i,!n&&this._options.allowTaint===!1&&!xO(r)&&!yO(r)&&!a&&!i?[2]:(o=r,a?[4,this.proxy(o)]:[3,2]);case 1:o=c.sent(),c.label=2;case 2:return this.context.logger.debug("Added image "+r.substring(0,256)),[4,new Promise(function(u,d){var h=new Image;h.onload=function(){return u(h)},h.onerror=d,(jRt(o)||i)&&(h.crossOrigin="anonymous"),h.src=o,h.complete===!0&&setTimeout(function(){return u(h)},500),l._options.imageTimeout>0&&setTimeout(function(){return d("Timed out ("+l._options.imageTimeout+"ms) loading image")},l._options.imageTimeout)})];case 3:return[2,c.sent()]}})})},e.prototype.has=function(r){return typeof this._cache[r]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(r){var n=this,i=this._options.proxy;if(!i)throw new Error("No proxy defined");var a=r.substring(0,256);return new Promise(function(o,l){var c=Es.SUPPORT_RESPONSE_TYPE?"blob":"text",u=new XMLHttpRequest;u.onload=function(){if(u.status===200)if(c==="text")o(u.response);else{var f=new FileReader;f.addEventListener("load",function(){return o(f.result)},!1),f.addEventListener("error",function(p){return l(p)},!1),f.readAsDataURL(u.response)}else l("Failed to proxy resource "+a+" with status code "+u.status)},u.onerror=l;var d=i.indexOf("?")>-1?"&":"?";if(u.open("GET",""+i+d+"url="+encodeURIComponent(r)+"&responseType="+c),c!=="text"&&u instanceof XMLHttpRequest&&(u.responseType=c),n._options.imageTimeout){var h=n._options.imageTimeout;u.timeout=h,u.ontimeout=function(){return l("Timed out ("+h+"ms) proxying "+a)}}u.send()})},e}(),yRt=/^data:image\/svg\+xml/i,vRt=/^data:image\/.*;base64,/i,bRt=/^data:image\/.*/i,wRt=function(e){return Es.SUPPORT_SVG_DRAWING||!_Rt(e)},xO=function(e){return bRt.test(e)},jRt=function(e){return vRt.test(e)},yO=function(e){return e.substr(0,4)==="blob"},_Rt=function(e){return e.substr(-3).toLowerCase()==="svg"||yRt.test(e)},St=function(){function e(r,n){this.type=0,this.x=r,this.y=n}return e.prototype.add=function(r,n){return new e(this.x+r,this.y+n)},e}(),Gx=function(e,r,n){return new St(e.x+(r.x-e.x)*n,e.y+(r.y-e.y)*n)},ES=function(){function e(r,n,i,a){this.type=1,this.start=r,this.startControl=n,this.endControl=i,this.end=a}return e.prototype.subdivide=function(r,n){var i=Gx(this.start,this.startControl,r),a=Gx(this.startControl,this.endControl,r),o=Gx(this.endControl,this.end,r),l=Gx(i,a,r),c=Gx(a,o,r),u=Gx(l,c,r);return n?new e(this.start,i,l,u):new e(u,c,o,this.end)},e.prototype.add=function(r,n){return new e(this.start.add(r,n),this.startControl.add(r,n),this.endControl.add(r,n),this.end.add(r,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),yc=function(e){return e.type===1},CRt=function(){function e(r){var n=r.styles,i=r.bounds,a=xw(n.borderTopLeftRadius,i.width,i.height),o=a[0],l=a[1],c=xw(n.borderTopRightRadius,i.width,i.height),u=c[0],d=c[1],h=xw(n.borderBottomRightRadius,i.width,i.height),f=h[0],p=h[1],m=xw(n.borderBottomLeftRadius,i.width,i.height),A=m[0],g=m[1],y=[];y.push((o+u)/i.width),y.push((A+f)/i.width),y.push((l+g)/i.height),y.push((d+p)/i.height);var x=Math.max.apply(Math,y);x>1&&(o/=x,l/=x,u/=x,d/=x,f/=x,p/=x,A/=x,g/=x);var b=i.width-u,v=i.height-p,j=i.width-f,_=i.height-g,C=n.borderTopWidth,N=n.borderRightWidth,S=n.borderBottomWidth,E=n.borderLeftWidth,O=di(n.paddingTop,r.bounds.width),B=di(n.paddingRight,r.bounds.width),T=di(n.paddingBottom,r.bounds.width),F=di(n.paddingLeft,r.bounds.width);this.topLeftBorderDoubleOuterBox=o>0||l>0?Ei(i.left+E/3,i.top+C/3,o-E/3,l-C/3,On.TOP_LEFT):new St(i.left+E/3,i.top+C/3),this.topRightBorderDoubleOuterBox=o>0||l>0?Ei(i.left+b,i.top+C/3,u-N/3,d-C/3,On.TOP_RIGHT):new St(i.left+i.width-N/3,i.top+C/3),this.bottomRightBorderDoubleOuterBox=f>0||p>0?Ei(i.left+j,i.top+v,f-N/3,p-S/3,On.BOTTOM_RIGHT):new St(i.left+i.width-N/3,i.top+i.height-S/3),this.bottomLeftBorderDoubleOuterBox=A>0||g>0?Ei(i.left+E/3,i.top+_,A-E/3,g-S/3,On.BOTTOM_LEFT):new St(i.left+E/3,i.top+i.height-S/3),this.topLeftBorderDoubleInnerBox=o>0||l>0?Ei(i.left+E*2/3,i.top+C*2/3,o-E*2/3,l-C*2/3,On.TOP_LEFT):new St(i.left+E*2/3,i.top+C*2/3),this.topRightBorderDoubleInnerBox=o>0||l>0?Ei(i.left+b,i.top+C*2/3,u-N*2/3,d-C*2/3,On.TOP_RIGHT):new St(i.left+i.width-N*2/3,i.top+C*2/3),this.bottomRightBorderDoubleInnerBox=f>0||p>0?Ei(i.left+j,i.top+v,f-N*2/3,p-S*2/3,On.BOTTOM_RIGHT):new St(i.left+i.width-N*2/3,i.top+i.height-S*2/3),this.bottomLeftBorderDoubleInnerBox=A>0||g>0?Ei(i.left+E*2/3,i.top+_,A-E*2/3,g-S*2/3,On.BOTTOM_LEFT):new St(i.left+E*2/3,i.top+i.height-S*2/3),this.topLeftBorderStroke=o>0||l>0?Ei(i.left+E/2,i.top+C/2,o-E/2,l-C/2,On.TOP_LEFT):new St(i.left+E/2,i.top+C/2),this.topRightBorderStroke=o>0||l>0?Ei(i.left+b,i.top+C/2,u-N/2,d-C/2,On.TOP_RIGHT):new St(i.left+i.width-N/2,i.top+C/2),this.bottomRightBorderStroke=f>0||p>0?Ei(i.left+j,i.top+v,f-N/2,p-S/2,On.BOTTOM_RIGHT):new St(i.left+i.width-N/2,i.top+i.height-S/2),this.bottomLeftBorderStroke=A>0||g>0?Ei(i.left+E/2,i.top+_,A-E/2,g-S/2,On.BOTTOM_LEFT):new St(i.left+E/2,i.top+i.height-S/2),this.topLeftBorderBox=o>0||l>0?Ei(i.left,i.top,o,l,On.TOP_LEFT):new St(i.left,i.top),this.topRightBorderBox=u>0||d>0?Ei(i.left+b,i.top,u,d,On.TOP_RIGHT):new St(i.left+i.width,i.top),this.bottomRightBorderBox=f>0||p>0?Ei(i.left+j,i.top+v,f,p,On.BOTTOM_RIGHT):new St(i.left+i.width,i.top+i.height),this.bottomLeftBorderBox=A>0||g>0?Ei(i.left,i.top+_,A,g,On.BOTTOM_LEFT):new St(i.left,i.top+i.height),this.topLeftPaddingBox=o>0||l>0?Ei(i.left+E,i.top+C,Math.max(0,o-E),Math.max(0,l-C),On.TOP_LEFT):new St(i.left+E,i.top+C),this.topRightPaddingBox=u>0||d>0?Ei(i.left+Math.min(b,i.width-N),i.top+C,b>i.width+N?0:Math.max(0,u-N),Math.max(0,d-C),On.TOP_RIGHT):new St(i.left+i.width-N,i.top+C),this.bottomRightPaddingBox=f>0||p>0?Ei(i.left+Math.min(j,i.width-E),i.top+Math.min(v,i.height-S),Math.max(0,f-N),Math.max(0,p-S),On.BOTTOM_RIGHT):new St(i.left+i.width-N,i.top+i.height-S),this.bottomLeftPaddingBox=A>0||g>0?Ei(i.left+E,i.top+Math.min(_,i.height-S),Math.max(0,A-E),Math.max(0,g-S),On.BOTTOM_LEFT):new St(i.left+E,i.top+i.height-S),this.topLeftContentBox=o>0||l>0?Ei(i.left+E+F,i.top+C+O,Math.max(0,o-(E+F)),Math.max(0,l-(C+O)),On.TOP_LEFT):new St(i.left+E+F,i.top+C+O),this.topRightContentBox=u>0||d>0?Ei(i.left+Math.min(b,i.width+E+F),i.top+C+O,b>i.width+E+F?0:u-E+F,d-(C+O),On.TOP_RIGHT):new St(i.left+i.width-(N+B),i.top+C+O),this.bottomRightContentBox=f>0||p>0?Ei(i.left+Math.min(j,i.width-(E+F)),i.top+Math.min(v,i.height+C+O),Math.max(0,f-(N+B)),p-(S+T),On.BOTTOM_RIGHT):new St(i.left+i.width-(N+B),i.top+i.height-(S+T)),this.bottomLeftContentBox=A>0||g>0?Ei(i.left+E+F,i.top+_,Math.max(0,A-(E+F)),g-(S+T),On.BOTTOM_LEFT):new St(i.left+E+F,i.top+i.height-(S+T))}return e}(),On;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(On||(On={}));var Ei=function(e,r,n,i,a){var o=4*((Math.sqrt(2)-1)/3),l=n*o,c=i*o,u=e+n,d=r+i;switch(a){case On.TOP_LEFT:return new ES(new St(e,d),new St(e,d-c),new St(u-l,r),new St(u,r));case On.TOP_RIGHT:return new ES(new St(e,r),new St(e+l,r),new St(u,d-c),new St(u,d));case On.BOTTOM_RIGHT:return new ES(new St(u,r),new St(u,r+c),new St(e+l,d),new St(e,d));case On.BOTTOM_LEFT:default:return new ES(new St(u,d),new St(u-l,d),new St(e,r+c),new St(e,r))}},kB=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},NRt=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},EB=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},SRt=function(){function e(r,n,i){this.offsetX=r,this.offsetY=n,this.matrix=i,this.type=0,this.target=6}return e}(),BS=function(){function e(r,n){this.path=r,this.target=n,this.type=1}return e}(),kRt=function(){function e(r){this.opacity=r,this.type=2,this.target=6}return e}(),ERt=function(e){return e.type===0},$we=function(e){return e.type===1},BRt=function(e){return e.type===2},fne=function(e,r){return e.length===r.length?e.some(function(n,i){return n===r[i]}):!1},TRt=function(e,r,n,i,a){return e.map(function(o,l){switch(l){case 0:return o.add(r,n);case 1:return o.add(r+i,n);case 2:return o.add(r+i,n+a);case 3:return o.add(r,n+a)}return o}
vendor: 15,296 bytes, line 3233
3233)},Qwe=function(){function e(r){this.element=r,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),Hwe=function(){function e(r,n){if(this.container=r,this.parent=n,this.effects=[],this.curves=new CRt(this.container),this.container.styles.opacity<1&&this.effects.push(new kRt(this.container.styles.opacity)),this.container.styles.transform!==null){var i=this.container.bounds.left+this.container.styles.transformOrigin[0].number,a=this.container.bounds.top+this.container.styles.transformOrigin[1].number,o=this.container.styles.transform;this.effects.push(new SRt(i,a,o))}if(this.container.styles.overflowX!==0){var l=kB(this.curves),c=EB(this.curves);fne(l,c)?this.effects.push(new BS(l,6)):(this.effects.push(new BS(l,2)),this.effects.push(new BS(c,4)))}}return e.prototype.getEffects=function(r){for(var n=[2,3].indexOf(this.container.styles.position)===-1,i=this.parent,a=this.effects.slice(0);i;){var o=i.effects.filter(function(u){return!$we(u)});if(n||i.container.styles.position!==0||!i.parent){if(a.unshift.apply(a,o),n=[2,3].indexOf(i.container.styles.position)===-1,i.container.styles.overflowX!==0){var l=kB(i.curves),c=EB(i.curves);fne(l,c)||a.unshift(new BS(c,6))}}else a.unshift.apply(a,o);i=i.parent}return a.filter(function(u){return Ga(u.target,r)})},e}(),p6=function(e,r,n,i){e.container.elements.forEach(function(a){var o=Ga(a.flags,4),l=Ga(a.flags,2),c=new Hwe(a,e);Ga(a.styles.display,2048)&&i.push(c);var u=Ga(a.flags,8)?[]:i;if(o||l){var d=o||a.styles.isPositioned()?n:r,h=new Qwe(c);if(a.styles.isPositioned()||a.styles.opacity<1||a.styles.isTransformed()){var f=a.styles.zIndex.order;if(f<0){var p=0;d.negativeZIndex.some(function(A,g){return f>A.element.container.styles.zIndex.order?(p=g,!1):p>0}),d.negativeZIndex.splice(p,0,h)}else if(f>0){var m=0;d.positiveZIndex.some(function(A,g){return f>=A.element.container.styles.zIndex.order?(m=g+1,!1):m>0}),d.positiveZIndex.splice(m,0,h)}else d.zeroOrAutoZIndexOrTransformedOrOpacity.push(h)}else a.styles.isFloating()?d.nonPositionedFloats.push(h):d.nonPositionedInlineLevel.push(h);p6(c,h,o?h:n,u)}else a.styles.isInlineLevel()?r.inlineLevel.push(c):r.nonInlineLevel.push(c),p6(c,r,n,u);Ga(a.flags,8)&&Vwe(a,u)})},Vwe=function(e,r){for(var n=e instanceof u6?e.start:1,i=e instanceof u6?e.reversed:!1,a=0;a<r.length;a++){var o=r[a];o.container instanceof kwe&&typeof o.container.value=="number"&&o.container.value!==0&&(n=o.container.value),o.listValue=Yj(n,o.container.styles.listStyleType,!0),n+=i?-1:1}},PRt=function(e){var r=new Hwe(e,null),n=new Qwe(r),i=[];return p6(r,n,n,i),Vwe(r.container,i),n},mne=function(e,r){switch(r){case 0:return Sc(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return Sc(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return Sc(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return Sc(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},IRt=function(e,r){switch(r){case 0:return Sc(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return Sc(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return Sc(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return Sc(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},FRt=function(e,r){switch(r){case 0:return Sc(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return Sc(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return Sc(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return Sc(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},ORt=function(e,r){switch(r){case 0:return TS(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return TS(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return TS(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return TS(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},TS=function(e,r){var n=[];return yc(e)?n.push(e.subdivide(.5,!1)):n.push(e),yc(r)?n.push(r.subdivide(.5,!0)):n.push(r),n},Sc=function(e,r,n,i){var a=[];return yc(e)?a.push(e.subdivide(.5,!1)):a.push(e),yc(n)?a.push(n.subdivide(.5,!0)):a.push(n),yc(i)?a.push(i.subdivide(.5,!0).reverse()):a.push(i),yc(r)?a.push(r.subdivide(.5,!1).reverse()):a.push(r),a},Wwe=function(e){var r=e.bounds,n=e.styles;return r.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},BB=function(e){var r=e.styles,n=e.bounds,i=di(r.paddingLeft,n.width),a=di(r.paddingRight,n.width),o=di(r.paddingTop,n.width),l=di(r.paddingBottom,n.width);return n.add(i+r.borderLeftWidth,o+r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth+i+a),-(r.borderTopWidth+r.borderBottomWidth+o+l))},LRt=function(e,r){return e===0?r.bounds:e===2?BB(r):Wwe(r)},RRt=function(e,r){return e===0?r.bounds:e===2?BB(r):Wwe(r)},vO=function(e,r,n){var i=LRt(ly(e.styles.backgroundOrigin,r),e),a=RRt(ly(e.styles.backgroundClip,r),e),o=DRt(ly(e.styles.backgroundSize,r),n,i),l=o[0],c=o[1],u=xw(ly(e.styles.backgroundPosition,r),i.width-l,i.height-c),d=MRt(ly(e.styles.backgroundRepeat,r),u,o,i,a),h=Math.round(i.left+u[0]),f=Math.round(i.top+u[1]);return[d,h,f,l,c]},Xx=function(e){return Xn(e)&&e.value===fv.AUTO},PS=function(e){return typeof e=="number"},DRt=function(e,r,n){var i=r[0],a=r[1],o=r[2],l=e[0],c=e[1];if(!l)return[0,0];if(Ba(l)&&c&&Ba(c))return[di(l,n.width),di(c,n.height)];var u=PS(o);if(Xn(l)&&(l.value===fv.CONTAIN||l.value===fv.COVER)){if(PS(o)){var d=n.width/n.height;return d<o!=(l.value===fv.COVER)?[n.width,n.width/o]:[n.height*o,n.height]}return[n.width,n.height]}var h=PS(i),f=PS(a),p=h||f;if(Xx(l)&&(!c||Xx(c))){if(h&&f)return[i,a];if(!u&&!p)return[n.width,n.height];if(p&&u){var m=h?i:a*o,A=f?a:i/o;return[m,A]}var g=h?i:n.width,y=f?a:n.height;return[g,y]}if(u){var x=0,b=0;return Ba(l)?x=di(l,n.width):Ba(c)&&(b=di(c,n.height)),Xx(l)?x=b*o:(!c||Xx(c))&&(b=x/o),[x,b]}var v=null,j=null;if(Ba(l)?v=di(l,n.width):c&&Ba(c)&&(j=di(c,n.height)),v!==null&&(!c||Xx(c))&&(j=h&&f?v/i*a:n.height),j!==null&&Xx(l)&&(v=h&&f?j/a*i:n.width),v!==null&&j!==null)return[v,j];throw new Error("Unable to calculate background-size for element")},ly=function(e,r){var n=e[r];return typeof n>"u"?e[0]:n},MRt=function(e,r,n,i,a){var o=r[0],l=r[1],c=n[0],u=n[1];switch(e){case 2:return[new St(Math.round(i.left),Math.round(i.top+l)),new St(Math.round(i.left+i.width),Math.round(i.top+l)),new St(Math.round(i.left+i.width),Math.round(u+i.top+l)),new St(Math.round(i.left),Math.round(u+i.top+l))];case 3:return[new St(Math.round(i.left+o),Math.round(i.top)),new St(Math.round(i.left+o+c),Math.round(i.top)),new St(Math.round(i.left+o+c),Math.round(i.height+i.top)),new St(Math.round(i.left+o),Math.round(i.height+i.top))];case 1:return[new St(Math.round(i.left+o),Math.round(i.top+l)),new St(Math.round(i.left+o+c),Math.round(i.top+l)),new St(Math.round(i.left+o+c),Math.round(i.top+l+u)),new St(Math.round(i.left+o),Math.round(i.top+l+u))];default:return[new St(Math.round(a.left),Math.round(a.top)),new St(Math.round(a.left+a.width),Math.round(a.top)),new St(Math.round(a.left+a.width),Math.round(a.height+a.top)),new St(Math.round(a.left),Math.round(a.height+a.top))]}},zRt="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",pne="Hidden Text",URt=function(){function e(r){this._data={},this._document=r}return e.prototype.parseMetrics=function(r,n){var i=this._document.createElement("div"),a=this._document.createElement("img"),o=this._document.createElement("span"),l=this._document.body;i.style.visibility="hidden",i.style.fontFamily=r,i.style.fontSize=n,i.style.margin="0",i.style.padding="0",i.style.whiteSpace="nowrap",l.appendChild(i),a.src=zRt,a.width=1,a.height=1,a.style.margin="0",a.style.padding="0",a.style.verticalAlign="baseline",o.style.fontFamily=r,o.style.fontSize=n,o.style.margin="0",o.style.padding="0",o.appendChild(this._document.createTextNode(pne)),i.appendChild(o),i.appendChild(a);var c=a.offsetTop-o.offsetTop+2;i.removeChild(o),i.appendChild(this._document.createTextNode(pne)),i.style.lineHeight="normal",a.style.verticalAlign="super";var u=a.offsetTop-i.offsetTop+2;return l.removeChild(i),{baseline:c,middle:u}},e.prototype.getMetrics=function(r,n){var i=r+" "+n;return typeof this._data[i]>"u"&&(this._data[i]=this.parseMetrics(r,n)),this._data[i]},e}(),qwe=function(){function e(r,n){this.context=r,this.options=n}return e}(),$Rt=1e4,QRt=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this;return a._activeEffects=[],a.canvas=i.canvas?i.canvas:document.createElement("canvas"),a.ctx=a.canvas.getContext("2d"),i.canvas||(a.canvas.width=Math.floor(i.width*i.scale),a.canvas.height=Math.floor(i.height*i.scale),a.canvas.style.width=i.width+"px",a.canvas.style.height=i.height+"px"),a.fontMetrics=new URt(document),a.ctx.scale(a.options.scale,a.options.scale),a.ctx.translate(-i.x,-i.y),a.ctx.textBaseline="bottom",a._activeEffects=[],a.context.logger.debug("Canvas renderer initialized ("+i.width+"x"+i.height+") with scale "+i.scale),a}return r.prototype.applyEffects=function(n){for(var i=this;this._activeEffects.length;)this.popEffect();n.forEach(function(a){return i.applyEffect(a)})},r.prototype.applyEffect=function(n){this.ctx.save(),BRt(n)&&(this.ctx.globalAlpha=n.opacity),ERt(n)&&(this.ctx.translate(n.offsetX,n.offsetY),this.ctx.transform(n.matrix[0],n.matrix[1],n.matrix[2],n.matrix[3],n.matrix[4],n.matrix[5]),this.ctx.translate(-n.offsetX,-n.offsetY)),$we(n)&&(this.path(n.path),this.ctx.clip()),this._activeEffects.push(n)},r.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},r.prototype.renderStack=function(n){return xo(this,void 0,void 0,function(){var i;return Ys(this,function(a){switch(a.label){case 0:return i=n.element.container.styles,i.isVisible()?[4,this.renderStackContent(n)]:[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}})})},r.prototype.renderNode=function(n){return xo(this,void 0,void 0,function(){return Ys(this,function(i){switch(i.label){case 0:if(Ga(n.container.flags,16))debugger;return n.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(n)]:[3,3];case 1:return i.sent(),[4,this.renderNodeContent(n)];case 2:i.sent(),i.label=3;case 3:return[2]}})})},r.prototype.renderTextWithLetterSpacing=function(n,i,a){var o=this;if(i===0)this.ctx.fillText(n.text,n.bounds.left,n.bounds.top+a);else{var l=oH(n.text);l.reduce(function(c,u){return o.ctx.fillText(u,c,n.bounds.top+a),c+o.ctx.measureText(u).width},n.bounds.left)}},r.prototype.createFontStyle=function(n){var i=n.fontVariant.filter(function(l){return l==="normal"||l==="small-caps"}).join(""),a=KRt(n.fontFamily).join(", "),o=iC(n.fontSize)?""+n.fontSize.number+n.fontSize.unit:n.fontSize.number+"px";return[[n.fontStyle,i,n.fontWeight,o,a].join(" "),a,o]},r.prototype.renderTextNode=function(n,i){return xo(this,void 0,void 0,function(){var a,o,l,c,u,d,h,f,p=this;return Ys(this,function(m){return a=this.createFontStyle(i),o=a[0],l=a[1],c=a[2],this.ctx.font=o,this.ctx.direction=i.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",u=this.fontMetrics.getMetrics(l,c),d=u.baseline,h=u.middle,f=i.paintOrder,n.textBounds.forEach(function(A){f.forEach(function(g){switch(g){case 0:p.ctx.fillStyle=as(i.color),p.renderTextWithLetterSpacing(A,i.letterSpacing,d);var y=i.textShadow;y.length&&A.text.trim().length&&(y.slice(0).reverse().forEach(function(x){p.ctx.shadowColor=as(x.color),p.ctx.shadowOffsetX=x.offsetX.number*p.options.scale,p.ctx.shadowOffsetY=x.offsetY.number*p.options.scale,p.ctx.shadowBlur=x.blur.number,p.renderTextWithLetterSpacing(A,i.letterSpacing,d)}),p.ctx.shadowColor="",p.ctx.shadowOffsetX=0,p.ctx.shadowOffsetY=0,p.ctx.shadowBlur=0),i.textDecorationLine.length&&(p.ctx.fillStyle=as(i.textDecorationColor||i.color),i.textDecorationLine.forEach(function(x){switch(x){case 1:p.ctx.fillRect(A.bounds.left,Math.round(A.bounds.top+d),A.bounds.width,1);break;case 2:p.ctx.fillRect(A.bounds.left,Math.round(A.bounds.top),A.bounds.width,1);break;case 3:p.ctx.fillRect(A.bounds.left,Math.ceil(A.bounds.top+h),A.bounds.width,1);break}}));break;case 1:i.webkitTextStrokeWidth&&A.text.trim().length&&(p.ctx.strokeStyle=as(i.webkitTextStrokeColor),p.ctx.lineWidth=i.webkitTextStrokeWidth,p.ctx.lineJoin=window.chrome?"miter":"round",p.ctx.strokeText(A.text,A.bounds.left,A.bounds.top+d)),p.ctx.strokeStyle="",p.ctx.lineWidth=0,p.ctx.lineJoin="miter";break}})}),[2]})})},r.prototype.renderReplacedElement=function(n,i,a){if(a&&n.intrinsicWidth>0&&n.intrinsicHeight>0){var o=BB(n),l=EB(i);this.path(l),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(a,0,0,n.intrinsicWidth,n.intrinsicHeight,o.left,o.top,o.width,o.height),this.ctx.restore()}},r.prototype.renderNodeContent=function(n){return xo(this,void 0,void 0,function(){var i,a,o,l,c,u,b,b,d,h,f,p,j,m,A,_,g,y,x,b,v,j,_;return Ys(this,function(C){switch(C.label){case 0:this.applyEffects(n.getEffects(4)),i=n.container,a=n.curves,o=i.styles,l=0,c=i.textNodes,C.label=1;case 1:return l<c.length?(u=c[l],[4,this.renderTextNode(u,o)]):[3,4];case 2:C.sent(),C.label=3;case 3:return l++,[3,1];case 4:if(!(i instanceof Cwe))return[3,8];C.label=5;case 5:return C.trys.push([5,7,,8]),[4,this.context.cache.match(i.src)];case 6:return b=C.sent(),this.renderReplacedElement(i,a,b),[3,8];case 7:return C.sent(),this.context.logger.error("Error loading image "+i.src),[3,8];case 8:if(i instanceof Nwe&&this.renderReplacedElement(i,a,i.canvas),!(i instanceof Swe))return[3,12];C.label=9;case 9:return C.trys.push([9,11,,12]),[4,this.context.cache.match(i.svg)];case 10:return b=C.sent(),this.renderReplacedElement(i,a,b),[3,12];case 11:return C.sent(),this.context.logger.error("Error loading svg "+i.svg.substring(0,255)),[3,12];case 12:return i instanceof Twe&&i.tree?(d=new r(this.context,{scale:this.options.scale,backgroundColor:i.backgroundColor,x:0,y:0,width:i.width,height:i.height}),[4,d.render(i.tree)]):[3,14];case 13:h=C.sent(),i.width&&i.height&&this.ctx.drawImage(h,0,0,i.width,i.height,i.bounds.left,i.bounds.top,i.bounds.width,i.bounds.height),C.label=14;case 14:if(i instanceof lH&&(f=Math.min(i.bounds.width,i.bounds.height),i.type===_B?i.checked&&(this.ctx.save(),this.path([new St(i.bounds.left+f*.39363,i.bounds.top+f*.79),new St(i.bounds.left+f*.16,i.bounds.top+f*.5549),new St(i.bounds.left+f*.27347,i.bounds.top+f*.44071),new St(i.bounds.left+f*.39694,i.bounds.top+f*.5649),new St(i.bounds.left+f*.72983,i.bounds.top+f*.23),new St(i.bounds.left+f*.84,i.bounds.top+f*.34085),new St(i.bounds.left+f*.39363,i.bounds.top+f*.79)]),this.ctx.fillStyle=as(rne),this.ctx.fill(),this.ctx.restore(
vendor: 2,832 bytes, line 3233
3233)):i.type===CB&&i.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(i.bounds.left+f/2,i.bounds.top+f/2,f/4,0,Math.PI*2,!0),this.ctx.fillStyle=as(rne),this.ctx.fill(),this.ctx.restore())),HRt(i)&&i.value.length){switch(p=this.createFontStyle(o),j=p[0],m=p[1],A=this.fontMetrics.getMetrics(j,m).baseline,this.ctx.font=j,this.ctx.fillStyle=as(o.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=WRt(i.styles.textAlign),_=BB(i),g=0,i.styles.textAlign){case 1:g+=_.width/2;break;case 2:g+=_.width;break}y=_.add(g,0,0,-_.height/2+1),this.ctx.save(),this.path([new St(_.left,_.top),new St(_.left+_.width,_.top),new St(_.left+_.width,_.top+_.height),new St(_.left,_.top+_.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new a2(i.value,y),o.letterSpacing,A),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ga(i.styles.display,2048))return[3,20];if(i.styles.listStyleImage===null)return[3,19];if(x=i.styles.listStyleImage,x.type!==0)return[3,18];b=void 0,v=x.url,C.label=15;case 15:return C.trys.push([15,17,,18]),[4,this.context.cache.match(v)];case 16:return b=C.sent(),this.ctx.drawImage(b,i.bounds.left-(b.width+10),i.bounds.top),[3,18];case 17:return C.sent(),this.context.logger.error("Error loading list-style-image "+v),[3,18];case 18:return[3,20];case 19:n.listValue&&i.styles.listStyleType!==-1&&(j=this.createFontStyle(o)[0],this.ctx.font=j,this.ctx.fillStyle=as(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",_=new df(i.bounds.left,i.bounds.top+di(i.styles.paddingTop,i.bounds.width),i.bounds.width,Mre(o.lineHeight,o.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new a2(n.listValue,_),o.letterSpacing,Mre(o.lineHeight,o.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),C.label=20;case 20:return[2]}})})},r.prototype.renderStackContent=function(n){return xo(this,void 0,void 0,function(){var i,a,x,o,l,x,c,u,x,d,h,x,f,p,x,m,A,x,g,y,x;return Ys(this,function(b){switch(b.label){case 0:if(Ga(n.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(n.element)];case 1:b.sent(),i=0,a=n.negativeZIndex,b.label=2;case 2:return i<a.length?(x=a[i],[4,this.renderStack(x)]):[3,5];case 3:b.sent(),b.label=4;case 4:return i++,[3,2];case 5:return[4,this.renderNodeContent(n.element)];case 6:b.sent(),o=0,l=n.nonInlineLevel,b.label=7;case 7:return o<l.length?(x=l[o],[4,this.renderNode(x)]):[3,10];case 8:b.sent(),b.label=9;case 9:return o++,[3,7];case 10:c=0,u=n.nonPositionedFloats,b.label=11;case 11:return c<u.length?(x=u[c],[4,this.renderStack(x)]):[3,14];case 12:b.sent(),b.label=13;case 13:return c++,[3,11];case 14:d=0,h=n.nonPositionedInlineLevel,b.label=15;case 15:return d<h.length?(x=h[d],[4,this.renderStack(x)]):[3,18];case 16:b.sent(),b.label=17;case 17:return d++,[3,15];
vendor: 4,153 bytes, line 3233
3233case 18:f=0,p=n.inlineLevel,b.label=19;case 19:return f<p.length?(x=p[f],[4,this.renderNode(x)]):[3,22];case 20:b.sent(),b.label=21;case 21:return f++,[3,19];case 22:m=0,A=n.zeroOrAutoZIndexOrTransformedOrOpacity,b.label=23;case 23:return m<A.length?(x=A[m],[4,this.renderStack(x)]):[3,26];case 24:b.sent(),b.label=25;case 25:return m++,[3,23];case 26:g=0,y=n.positiveZIndex,b.label=27;case 27:return g<y.length?(x=y[g],[4,this.renderStack(x)]):[3,30];case 28:b.sent(),b.label=29;case 29:return g++,[3,27];case 30:return[2]}})})},r.prototype.mask=function(n){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(n.slice(0).reverse()),this.ctx.closePath()},r.prototype.path=function(n){this.ctx.beginPath(),this.formatPath(n),this.ctx.closePath()},r.prototype.formatPath=function(n){var i=this;n.forEach(function(a,o){var l=yc(a)?a.start:a;o===0?i.ctx.moveTo(l.x,l.y):i.ctx.lineTo(l.x,l.y),yc(a)&&i.ctx.bezierCurveTo(a.startControl.x,a.startControl.y,a.endControl.x,a.endControl.y,a.end.x,a.end.y)})},r.prototype.renderRepeat=function(n,i,a,o){this.path(n),this.ctx.fillStyle=i,this.ctx.translate(a,o),this.ctx.fill(),this.ctx.translate(-a,-o)},r.prototype.resizeImage=function(n,i,a){var o;if(n.width===i&&n.height===a)return n;var l=(o=this.canvas.ownerDocument)!==null&&o!==void 0?o:document,c=l.createElement("canvas");c.width=Math.max(1,i),c.height=Math.max(1,a);var u=c.getContext("2d");return u.drawImage(n,0,0,n.width,n.height,0,0,i,a),c},r.prototype.renderBackgroundImage=function(n){return xo(this,void 0,void 0,function(){var i,a,o,l,c,u;return Ys(this,function(d){switch(d.label){case 0:i=n.styles.backgroundImage.length-1,a=function(h){var f,p,m,O,L,V,F,I,S,A,O,L,V,F,I,g,y,x,b,v,j,_,C,N,S,E,O,B,T,F,I,D,L,V,U,Q,$,q,M,z,K,ne;return Ys(this,function(ie){switch(ie.label){case 0:if(h.type!==0)return[3,5];f=void 0,p=h.url,ie.label=1;case 1:return ie.trys.push([1,3,,4]),[4,o.context.cache.match(p)];case 2:return f=ie.sent(),[3,4];case 3:return ie.sent(),o.context.logger.error("Error loading background-image "+p),[3,4];case 4:return f&&(m=vO(n,i,[f.width,f.height,f.width/f.height]),O=m[0],L=m[1],V=m[2],F=m[3],I=m[4],S=o.ctx.createPattern(o.resizeImage(f,F,I),"repeat"),o.renderRepeat(O,S,L,V)),[3,6];case 5:EFt(h)?(A=vO(n,i,[null,null,null]),O=A[0],L=A[1],V=A[2],F=A[3],I=A[4],g=_Ft(h.angle,F,I),y=g[0],x=g[1],b=g[2],v=g[3],j=g[4],_=document.createElement("canvas"),_.width=F,_.height=I,C=_.getContext("2d"),N=C.createLinearGradient(x,v,b,j),Rre(h.stops,y).forEach(function(X){return N.addColorStop(X.stop,as(X.color))}),C.fillStyle=N,C.fillRect(0,0,F,I),F>0&&I>0&&(S=o.ctx.createPattern(_,"repeat"),o.renderRepeat(O,S,L,V))):BFt(h)&&(E=vO(n,i,[null,null,null]),O=E[0],B=E[1],T=E[2],F=E[3],I=E[4],D=h.position.length===0?[iH]:h.position,L=di(D[0],F),V=di(D[D.length-1],I),U=CFt(h,L,V,F,I),Q=U[0],$=U[1],Q>0&&$>0&&(q=o.ctx.createRadialGradient(B+L,T+V,0,B+L,T+V,Q),Rre(h.stops,Q*2).forEach(function(X){return q.addColorStop(X.stop,as(X.color))}),o.path(O),o.ctx.fillStyle=q,Q!==$?(M=n.bounds.left+.5*n.bounds.width,z=n.bounds.top+.5*n.bounds.height,K=$/Q,ne=1/K,o.ctx.save(),o.ctx.translate(M,z),o.ctx.transform(1,0,0,K,0,0),o.ctx.translate(-M,-z),o.ctx.fillRect(B,ne*(T-z)+z,F,I*ne),o.ctx.restore()):o.ctx.fill())),ie.label=6;case 6:return i--,[2]}})},o=this,l=0,c=n.styles.backgroundImage.slice(0).reverse(),d.label=1;case 1:return l<c.length?(u=c[l],[5,a(u)]):[3,4];case 2:d.sent(),d.label=3;case 3:return l++,[3,1];case 4:return[2]}})})},r.prototype.renderSolidBorder=function(n,i,a){return xo(this,void 0,void 0,function(){return Ys(this,function(o){return this.path(mne(a,i)),this.ctx.fillStyle=as(n),this.ctx.fill(),[2]})})},r.prototype.renderDoubleBorder=function(n,i,a,o){return xo(this,void 0,void 0,function(){var l,c;return Ys(this,function(u){switch(u.label){case 0:return i<3?[4,this.renderSolidBorder(n,a,o)]:[3,2];case 1:return u.sent(),[2];case 2:return l=IRt(o,a),this.path(l),this.ctx.fillStyle=as(n),this.ctx.fill(),c=FRt(o,a),this.path(c),this.ctx.fill(),[2]}})})}
vendor: 24,957 bytes, lines 3233-3234
3233,r.prototype.renderNodeBackgroundAndBorders=function(n){return xo(this,void 0,void 0,function(){var i,a,o,l,c,u,d,h,f=this;return Ys(this,function(p){switch(p.label){case 0:return this.applyEffects(n.getEffects(2)),i=n.container.styles,a=!tp(i.backgroundColor)||i.backgroundImage.length,o=[{style:i.borderTopStyle,color:i.borderTopColor,width:i.borderTopWidth},{style:i.borderRightStyle,color:i.borderRightColor,width:i.borderRightWidth},{style:i.borderBottomStyle,color:i.borderBottomColor,width:i.borderBottomWidth},{style:i.borderLeftStyle,color:i.borderLeftColor,width:i.borderLeftWidth}],l=VRt(ly(i.backgroundClip,0),n.curves),a||i.boxShadow.length?(this.ctx.save(),this.path(l),this.ctx.clip(),tp(i.backgroundColor)||(this.ctx.fillStyle=as(i.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(n.container)]):[3,2];case 1:p.sent(),this.ctx.restore(),i.boxShadow.slice(0).reverse().forEach(function(m){f.ctx.save();var A=kB(n.curves),g=m.inset?0:$Rt,y=TRt(A,-g+(m.inset?1:-1)*m.spread.number,(m.inset?1:-1)*m.spread.number,m.spread.number*(m.inset?-2:2),m.spread.number*(m.inset?-2:2));m.inset?(f.path(A),f.ctx.clip(),f.mask(y)):(f.mask(A),f.ctx.clip(),f.path(y)),f.ctx.shadowOffsetX=m.offsetX.number+g,f.ctx.shadowOffsetY=m.offsetY.number,f.ctx.shadowColor=as(m.color),f.ctx.shadowBlur=m.blur.number,f.ctx.fillStyle=m.inset?as(m.color):"rgba(0,0,0,1)",f.ctx.fill(),f.ctx.restore()}),p.label=2;case 2:c=0,u=0,d=o,p.label=3;case 3:return u<d.length?(h=d[u],h.style!==0&&!tp(h.color)&&h.width>0?h.style!==2?[3,5]:[4,this.renderDashedDottedBorder(h.color,h.width,c,n.curves,2)]:[3,11]):[3,13];case 4:return p.sent(),[3,11];case 5:return h.style!==3?[3,7]:[4,this.renderDashedDottedBorder(h.color,h.width,c,n.curves,3)];case 6:return p.sent(),[3,11];case 7:return h.style!==4?[3,9]:[4,this.renderDoubleBorder(h.color,h.width,c,n.curves)];case 8:return p.sent(),[3,11];case 9:return[4,this.renderSolidBorder(h.color,c,n.curves)];case 10:p.sent(),p.label=11;case 11:c++,p.label=12;case 12:return u++,[3,3];case 13:return[2]}})})},r.prototype.renderDashedDottedBorder=function(n,i,a,o,l){return xo(this,void 0,void 0,function(){var c,u,d,h,f,p,m,A,g,y,x,b,v,j,_,C,_,C;return Ys(this,function(N){return this.ctx.save(),c=ORt(o,a),u=mne(o,a),l===2&&(this.path(u),this.ctx.clip()),yc(u[0])?(d=u[0].start.x,h=u[0].start.y):(d=u[0].x,h=u[0].y),yc(u[1])?(f=u[1].end.x,p=u[1].end.y):(f=u[1].x,p=u[1].y),a===0||a===2?m=Math.abs(d-f):m=Math.abs(h-p),this.ctx.beginPath(),l===3?this.formatPath(c):this.formatPath(u.slice(0,2)),A=i<3?i*3:i*2,g=i<3?i*2:i,l===3&&(A=i,g=i),y=!0,m<=A*2?y=!1:m<=A*2+g?(x=m/(2*A+g),A*=x,g*=x):(b=Math.floor((m+g)/(A+g)),v=(m-b*A)/(b-1),j=(m-(b+1)*A)/b,g=j<=0||Math.abs(g-v)<Math.abs(g-j)?v:j),y&&(l===3?this.ctx.setLineDash([0,A+g]):this.ctx.setLineDash([A,g])),l===3?(this.ctx.lineCap="round",this.ctx.lineWidth=i):this.ctx.lineWidth=i*2+1.1,this.ctx.strokeStyle=as(n),this.ctx.stroke(),this.ctx.setLineDash([]),l===2&&(yc(u[0])&&(_=u[3],C=u[0],this.ctx.beginPath(),this.formatPath([new St(_.end.x,_.end.y),new St(C.start.x,C.start.y)]),this.ctx.stroke()),yc(u[1])&&(_=u[1],C=u[2],this.ctx.beginPath(),this.formatPath([new St(_.end.x,_.end.y),new St(C.start.x,C.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},r.prototype.render=function(n){return xo(this,void 0,void 0,function(){var i;return Ys(this,function(a){switch(a.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=as(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),i=PRt(n),[4,this.renderStack(i)];case 1:return a.sent(),this.applyEffects([]),[2,this.canvas]}})})},r}(qwe),HRt=function(e){return e instanceof Bwe||e instanceof Ewe?!0:e instanceof lH&&e.type!==CB&&e.type!==_B},VRt=function(e,r){switch(e){case 0:return kB(r);case 2:return NRt(r);case 1:default:return EB(r)}},WRt=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},qRt=["-apple-system","system-ui"],KRt=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(r){return qRt.indexOf(r)===-1}):e},GRt=function(e){zu(r,e);function r(n,i){var a=e.call(this,n,i)||this;return a.canvas=i.canvas?i.canvas:document.createElement("canvas"),a.ctx=a.canvas.getContext("2d"),a.options=i,a.canvas.width=Math.floor(i.width*i.scale),a.canvas.height=Math.floor(i.height*i.scale),a.canvas.style.width=i.width+"px",a.canvas.style.height=i.height+"px",a.ctx.scale(a.options.scale,a.options.scale),a.ctx.translate(-i.x,-i.y),a.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+i.width+"x"+i.height+" at "+i.x+","+i.y+") with scale "+i.scale),a}return r.prototype.render=function(n){return xo(this,void 0,void 0,function(){var i,a;return Ys(this,function(o){switch(o.label){case 0:return i=c6(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,n),[4,XRt(i)];case 1:return a=o.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=as(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(a,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},r}(qwe),XRt=function(e){return new Promise(function(r,n){var i=new Image;i.onload=function(){r(i)},i.onerror=n,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},YRt=function(){function e(r){var n=r.id,i=r.enabled;this.id=n,this.enabled=i,this.start=Date.now()}return e.prototype.debug=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,uS([this.id,this.getTime()+"ms"],r)):this.info.apply(this,r))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,uS([this.id,this.getTime()+"ms"],r))},e.prototype.warn=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,uS([this.id,this.getTime()+"ms"],r)):this.info.apply(this,r))},e.prototype.error=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,uS([this.id,this.getTime()+"ms"],r)):this.info.apply(this,r))},e.instances={},e}(),JRt=function(){function e(r,n){var i;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new YRt({id:this.instanceName,enabled:r.logging}),this.cache=(i=r.cache)!==null&&i!==void 0?i:new xRt(this,r)}return e.instanceCount=1,e}(),Kwe=function(e,r){return r===void 0&&(r={}),ZRt(e,r)};typeof window<"u"&&Uwe.setContext(window);var ZRt=function(e,r){return xo(void 0,void 0,void 0,function(){var n,i,a,o,l,c,u,d,h,f,p,m,A,g,y,x,b,v,j,_,N,C,N,S,E,O,B,T,F,I,D,L,V,U,Q,$,q,M,z,K;return Ys(this,function(ne){switch(ne.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(n=e.ownerDocument,!n)throw new Error("Element is not attached to a Document");if(i=n.defaultView,!i)throw new Error("Document is not attached to a Window");return a={allowTaint:(S=r.allowTaint)!==null&&S!==void 0?S:!1,imageTimeout:(E=r.imageTimeout)!==null&&E!==void 0?E:15e3,proxy:r.proxy,useCORS:(O=r.useCORS)!==null&&O!==void 0?O:!1},o=Kz({logging:(B=r.logging)!==null&&B!==void 0?B:!0,cache:r.cache},a),l={windowWidth:(T=r.windowWidth)!==null&&T!==void 0?T:i.innerWidth,windowHeight:(F=r.windowHeight)!==null&&F!==void 0?F:i.innerHeight,scrollX:(I=r.scrollX)!==null&&I!==void 0?I:i.pageXOffset,scrollY:(D=r.scrollY)!==null&&D!==void 0?D:i.pageYOffset},c=new df(l.scrollX,l.scrollY,l.windowWidth,l.windowHeight),u=new JRt(o,c),d=(L=r.foreignObjectRendering)!==null&&L!==void 0?L:!1,h={allowTaint:(V=r.allowTaint)!==null&&V!==void 0?V:!1,onclone:r.onclone,ignoreElements:r.ignoreElements,inlineImages:d,copyStyles:d},u.logger.debug("Starting document clone with size "+c.width+"x"+c.height+" scrolled to "+-c.left+","+-c.top),f=new dne(u,e,h),p=f.clonedReferenceElement,p?[4,f.toIFrame(n,c)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return m=ne.sent(),A=cH(p)||tRt(p)?TPt(p.ownerDocument):j3(u,p),g=A.width,y=A.height,x=A.left,b=A.top,v=eDt(u,p,r.backgroundColor),j={canvas:r.canvas,backgroundColor:v,scale:(Q=(U=r.scale)!==null&&U!==void 0?U:i.devicePixelRatio)!==null&&Q!==void 0?Q:1,x:(($=r.x)!==null&&$!==void 0?$:0)+x,y:((q=r.y)!==null&&q!==void 0?q:0)+b,width:(M=r.width)!==null&&M!==void 0?M:Math.ceil(g),height:(z=r.height)!==null&&z!==void 0?z:Math.ceil(y)},d?(u.logger.debug("Document cloned, using foreign object rendering"),N=new GRt(u,j),[4,N.render(p)]):[3,3];case 2:return _=ne.sent(),[3,5];case 3:return u.logger.debug("Document cloned, element located at "+x+","+b+" with size "+g+"x"+y+" using computed rendering"),u.logger.debug("Starting DOM parsing"),C=Iwe(u,p),v===C.styles.backgroundColor&&(C.styles.backgroundColor=$h.TRANSPARENT),u.logger.debug("Starting renderer for element at "+j.x+","+j.y+" with size "+j.width+"x"+j.height),N=new QRt(u,j),[4,N.render(C)];case 4:_=ne.sent(),ne.label=5;case 5:return(!((K=r.removeContainer)!==null&&K!==void 0)||K)&&(dne.destroy(m)||u.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),u.logger.debug("Finished rendering"),[2,_]}})})},eDt=function(e,r,n){var i=r.ownerDocument,a=i.documentElement?n2(e,getComputedStyle(i.documentElement).backgroundColor):$h.TRANSPARENT,o=i.body?n2(e,getComputedStyle(i.body).backgroundColor):$h.TRANSPARENT,l=typeof n=="string"?n2(e,n):n===null?$h.TRANSPARENT:4294967295;return r===i.documentElement?tp(a)?tp(o)?l:o:a:l};const tDt=Object.freeze(Object.defineProperty({__proto__:null,default:Kwe},Symbol.toStringTag,{value:"Module"}));function $n(e){"@babel/helpers - typeof";return $n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$n(e)}var Ou=Uint8Array,Dl=Uint16Array,uH=Int32Array,dH=new Ou([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),hH=new Ou([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ane=new Ou([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Gwe=function(e,r){for(var n=new Dl(31),i=0;i<31;++i)n[i]=r+=1<<e[i-1];for(var a=new uH(n[30]),i=1;i<30;++i)for(var o=n[i];o<n[i+1];++o)a[o]=o-n[i]<<5|i;return{b:n,r:a}},Xwe=Gwe(dH,2),rDt=Xwe.b,A6=Xwe.r;rDt[28]=258,A6[258]=28;var nDt=Gwe(hH,0),gne=nDt.r,g6=new Dl(32768);for(var Ni=0;Ni<32768;++Ni){var Wf=(Ni&43690)>>1|(Ni&21845)<<1;Wf=(Wf&52428)>>2|(Wf&13107)<<2,Wf=(Wf&61680)>>4|(Wf&3855)<<4,g6[Ni]=((Wf&65280)>>8|(Wf&255)<<8)>>1}var o2=function(e,r,n){for(var i=e.length,a=0,o=new Dl(r);a<i;++a)e[a]&&++o[e[a]-1];var l=new Dl(r);for(a=1;a<r;++a)l[a]=l[a-1]+o[a-1]<<1;var c;if(n){c=new Dl(1<<r);var u=15-r;for(a=0;a<i;++a)if(e[a])for(var d=a<<4|e[a],h=r-e[a],f=l[e[a]-1]++<<h,p=f|(1<<h)-1;f<=p;++f)c[g6[f]>>u]=d}else for(c=new Dl(i),a=0;a<i;++a)e[a]&&(c[a]=g6[l[e[a]-1]++]>>15-e[a]);return c},Ig=new Ou(288);for(var Ni=0;Ni<144;++Ni)Ig[Ni]=8;for(var Ni=144;Ni<256;++Ni)Ig[Ni]=9;for(var Ni=256;Ni<280;++Ni)Ig[Ni]=7;for(var Ni=280;Ni<288;++Ni)Ig[Ni]=8;var TB=new Ou(32);for(var Ni=0;Ni<32;++Ni)TB[Ni]=5;var iDt=o2(Ig,9,0),aDt=o2(TB,5,0),Ywe=function(e){return(e+7)/8|0},sDt=function(e,r,n){return(n==null||n>e.length)&&(n=e.length),new Ou(e.subarray(r,n))},Ah=function(e,r,n){n<<=r&7;var i=r/8|0;e[i]|=n,e[i+1]|=n>>8},G1=function(e,r,n){n<<=r&7;var i=r/8|0;e[i]|=n,e[i+1]|=n>>8,e[i+2]|=n>>16},bO=function(e,r){for(var n=[],i=0;i<e.length;++i)e[i]&&n.push({s:i,f:e[i]});var a=n.length,o=n.slice();if(!a)return{t:Zwe,l:0};if(a==1){var l=new Ou(n[0].s+1);return l[n[0].s]=1,{t:l,l:1}}n.sort(function(_,C){return _.f-C.f}),n.push({s:-1,f:25001});var c=n[0],u=n[1],d=0,h=1,f=2;for(n[0]={s:-1,f:c.f+u.f,l:c,r:u};h!=a-1;)c=n[n[d].f<n[f].f?d++:f++],u=n[d!=h&&n[d].f<n[f].f?d++:f++],n[h++]={s:-1,f:c.f+u.f,l:c,r:u};for(var p=o[0].s,i=1;i<a;++i)o[i].s>p&&(p=o[i].s);var m=new Dl(p+1),A=x6(n[h-1],m,0);if(A>r){var i=0,g=0,y=A-r,x=1<<y;for(o.sort(function(C,N){return m[N.s]-m[C.s]||C.f-N.f});i<a;++i){var b=o[i].s;if(m[b]>r)g+=x-(1<<A-m[b]),m[b]=r;else break}for(g>>=y;g>0;){var v=o[i].s;m[v]<r?g-=1<<r-m[v]++-1:++i}for(;i>=0&&g;--i){var j=o[i].s;m[j]==r&&(--m[j],++g)}A=r}return{t:new Ou(m),l:A}},x6=function(e,r,n){return e.s==-1?Math.max(x6(e.l,r,n+1),x6(e.r,r,n+1)):r[e.s]=n},xne=function(e){for(var r=e.length;r&&!e[--r];);for(var n=new Dl(++r),i=0,a=e[0],o=1,l=function(u){n[i++]=u},c=1;c<=r;++c)if(e[c]==a&&c!=r)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[c]}return{c:n.subarray(0,i),n:r}},X1=function(e,r){for(var n=0,i=0;i<r.length;++i)n+=e[i]*r[i];return n},Jwe=function(e,r,n){var i=n.length,a=Ywe(r+2);e[a]=i&255,e[a+1]=i>>8,e[a+2]=e[a]^255,e[a+3]=e[a+1]^255;for(var o=0;o<i;++o)e[a+o+4]=n[o];return(a+4+i)*8},yne=function(e,r,n,i,a,o,l,c,u,d,h){Ah(r,h++,n),++a[256];for(var f=bO(a,15),p=f.t,m=f.l,A=bO(o,15),g=A.t,y=A.l,x=xne(p),b=x.c,v=x.n,j=xne(g),_=j.c,C=j.n,N=new Dl(19),S=0;S<b.length;++S)++N[b[S]&31];for(var S=0;S<_.length;++S)++N[_[S]&31];for(var E=bO(N,7),O=E.t,B=E.l,T=19;T>4&&!O[Ane[T-1]];--T);var F=d+5<<3,I=X1(a,Ig)+X1(o,TB)+l,D=X1(a,p)+X1(o,g)+l+14+3*T+X1(N,O)+2*N[16]+3*N[17]+7*N[18];if(u>=0&&F<=I&&F<=D)return Jwe(r,h,e.subarray(u,u+d));var L,V,U,Q;if(Ah(r,h,1+(D<I)),h+=2,D<I){L=o2(p,m,0),V=p,U=o2(g,y,0),Q=g;var $=o2(O,B,0);Ah(r,h,v-257),Ah(r,h+5,C-1),Ah(r,h+10,T-4),h+=14;for(var S=0;S<T;++S)Ah(r,h+3*S,O[Ane[S]]);h+=3*T;for(var q=[b,_],M=0;M<2;++M)for(var z=q[M],S=0;S<z.length;++S){var K=z[S]&31;Ah(r,h,$[K]),h+=O[K],K>15&&(Ah(r,h,z[S]>>5&127),h+=z[S]>>12)}}else L=iDt,V=Ig,U=aDt,Q=TB;for(var S=0;S<c;++S){var ne=i[S];if(ne>255){var K=ne>>18&31;G1(r,h,L[K+257]),h+=V[K+257],K>7&&(Ah(r,h,ne>>23&31),h+=dH[K]);var ie=ne&31;G1(r,h,U[ie]),h+=Q[ie],ie>3&&(G1(r,h,ne>>5&8191),h+=hH[ie])}else G1(r,h,L[ne]),h+=V[ne]}return G1(r,h,L[256]),h+V[256]},oDt=new uH([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Zwe=new Ou(0),lDt=function(e,r,n,i,a,o){var l=o.z||e.length,c=new Ou(i+l+5*(1+Math.ceil(l/7e3))+a),u=c.subarray(i,c.length-a),d=o.l,h=(o.r||0)&7;if(r){h&&(u[0]=o.r>>3);for(var f=oDt[r-1],p=f>>13,m=f&8191,A=(1<<n)-1,g=o.p||new Dl(32768),y=o.h||new Dl(A+1),x=Math.ceil(n/3),b=2*x,v=function(Ve){return(e[Ve]^e[Ve+1]<<x^e[Ve+2]<<b)&A},j=new uH(25e3),_=new Dl(288),C=new Dl(32),N=0,S=0,E=o.i||0,O=0,B=o.w||0,T=0;E+2<l;++E){var F=v(E),I=E&32767,D=y[F];if(g[I]=D,y[F]=I,B<=E){var L=l-E;if((N>7e3||O>24576)&&(L>423||!d)){h=yne(e,u,0,j,_,C,S,O,T,E-T,h),O=N=S=0,T=E;for(var V=0;V<286;++V)_[V]=0;for(var V=0;V<30;++V)C[V]=0}var U=2,Q=0,$=m,q=I-D&32767;if(L>2&&F==v(E-q))for(var M=Math.min(p,L)-1,z=Math.min(32767,E),K=Math.min(258,L);q<=z&&--$&&I!=D;){if(e[E+U]==e[E+U-q]){for(var ne=0;ne<K&&e[E+ne]==e[E+ne-q];++ne);if(ne>U){if(U=ne,Q=q,ne>M)break;for(var ie=Math.min(q,ne-2),X=0,V=0;V<ie;++V){var de=E-q+V&32767,oe=g[de],ce=de-oe&32767;ce>X&&(X=ce,D=de)}}}I=D,D=g[I],q+=I-D&32767}if(Q){j[O++]=268435456|A6[U]<<18|gne[Q];var ye=A6[U]&31,ge=gne[Q]&31;S+=dH[ye]+hH[ge],++_[257+ye],++C[ge],B=E+U,++N}else j[O++]=e[E],++_[e[E]]}}for(E=Math.max(E,B);E<l;++E)j[O++]=e[E],++_[e[E]];h=yne(e,u,d,j,_,C,S,O,T,E-T,h),d||(o.r=h&7|u[h/8|0]<<3,h-=7,o.h=y,o.p=g,o.i=E,o.w=B)}else{for(var E=o.w||0;E<l+d;E+=65535){var Be=E+65535;Be>=l&&(u[h/8|0]=d,Be=l),h=Jwe(u,h+1,e.subarray(E,Be))}o.i=l}return sDt(c,0,i+Ywe(h)+a)},e2e=function(){var e=1,r=0;return{p:function(n){for(var i=e,a=r,o=n.length|0,l=0;l!=o;){for(var c=Math.min(l+2655,o);l<c;++l)a+=i+=n[l];i=(i&65535)+15*(i>>16),a=(a&65535)+15*(a>>16)}e=i,r=a},d:function(){return e%=65521,r%=65521,(e&255)<<24|(e&65280)<<8|(r&255)<<8|r>>8}}},cDt=function(e,r,n,i,a){if(!a&&(a={l:1},r.dictionary)){var o=r.dictionary.subarray(-32768),l=new Ou(o.length+e.length);l.set(o),l.set(e,o.length),e=l,a.w=o.length}return lDt(e,r.level==null?6:r.level,r.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+r.mem,n,i,a)},t2e=function(e,r,n){for(;n;++r)e[r]=n,n>>>=8},uDt=function(e,r){var n=r.level,i=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=i<<6|(r.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,r.dictionary){var a=e2e();a.p(r.dictionary),t2e(e,2,a.d())}};function y6(e,r){r||(r={});var n=e2e();n.p(e);var i=cDt(e,r,r.dictionary?6:2,4);return uDt(i,r),t2e(i,i.length-4,n.d()),i}var dDt=typeof TextDecoder<"u"&&new TextDecoder,hDt=0;try{dDt.decode(Zwe,{stream:!0}),hDt=1}catch{}function fDt(e){if(Array.isArray(e))return e}function mDt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,o,l,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(u=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);u=!0);}catch(h){d=!0,a=h}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function vne(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=Array(r);n<r;n++)i[n]=e[n];return i}function pDt(e,r){if(e){if(typeof e=="string")return vne(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vne(e,r):void 0}}function ADt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3234In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bne(e,r){return fDt(e)||mDt(e,r)||pDt(e,r)||ADt()}function wne(e,r="utf8"){return new TextDecoder(r).decode(e)}const gDt=new TextEncoder;function xDt(e){return gDt.encode(e)}const yDt=1024*8,vDt=(()=>{const e=new Uint8Array(4),r=new Uint32Array(e.buffer);return!((r[0]=1)&e[0])})(),wO={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class fH{constructor(r=yDt,n={}){tr(this,"buffer");tr(this,"byteLength");tr(this,"byteOffset");tr(this,"length");tr(this,"offset");tr(this,"lastWrittenByte");tr(this,"littleEndian");tr(this,"_data");tr(this,"_mark");tr(this,"_marks");let i=!1;typeof r=="number"?r=new ArrayBuffer(r):(i=!0,this.lastWrittenByte=r.byteLength);const a=n.offset?n.offset>>>0:0,o=r.byteLength-a;let l=a;(ArrayBuffer.isView(r)||r instanceof fH)&&(r.byteLength!==r.buffer.byteLength&&(l=r.byteOffset+a),r=r.buffer),i?this.lastWrittenByte=o:this.lastWrittenByte=0,this.buffer=r,this.length=o,this.byteLength=o,this.byteOffset=l,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,l,o),this._mark=0,this._marks=[]}available(r=1){return this.offset+r<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(r=1){return this.offset+=r,this}back(r=1){return this.offset-=r,this}seek(r){return this.offset=r,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const r=this._marks.pop();if(r===void 0)throw new Error("Mark stack empty");return this.seek(r),this}rewind(){return this.offset=0,this}ensureAvailable(r=1){if(!this.available(r)){const i=(this.offset+r)*2,a=new Uint8Array(i);a.set(new Uint8Array(this.buffer)),this.buffer=a.buffer,this.length=i,this.byteLength=i,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(r=1){return this.readArray(r,"uint8")}readArray(r,n){const i=wO[n].BYTES_PER_ELEMENT*r,a=this.byteOffset+this.offset,o=this.buffer.slice(a,a+i);if(this.littleEndian===vDt&&n!=="uint8"&&n!=="int8"){const c=new Uint8Array(this.buffer.slice(a,a+i));c.reverse();const u=new wO[n](c.buffer);return this.offset+=i,u.reverse(),u}const l=new wO[n](o);return this.offset+=i,l}readInt16(){const r=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,r}readUint16(){const r=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,r}readInt32(){const r=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,r}readUint32(){const r=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,r}readFloat32(){const r=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,r}readFloat64(){const r=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,r}readBigInt64(){const r=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,r}readBigUint64(){const r=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,r}readChar(){return String.fromCharCode(this.readInt8())}readChars(r=1){let n="";for(let i=0;i<r;i++)n+=this.readChar();return n}readUtf8(r=1){return wne(this.readBytes(r))}decodeText(r=1,n="utf8"){return wne(this.readBytes(r),n)}writeBoolean(r){return this.writeUint8(r?255:0),this}writeInt8(r){return this.ensureAvailable(1),this._data.setInt8(this.offset++,r),this._updateLastWrittenByte(),this}writeUint8(r){return this.ensureAvailable(1),this._data.setUint8(this.offset++,r),this._updateLastWrittenByte(),this}writeByte(r){return this.writeUint8(r)}writeBytes(r){this.ensureAvailable(r.length);for(let n=0;n<r.length;n++)this._data.setUint8(this.offset++,r[n]);return this._updateLastWrittenByte(),this}writeInt16(r){return this.ensureAvailable(2),this._data.setInt16(this.offset,r,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(r){return this.ensureAvailable(2),this._data.setUint16(this.offset,r,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(r){return this.ensureAvailable(4),this._data.setInt32(this.offset,r,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(r){return this.ensureAvailable(4),this._data.setUint32(this.offset,r,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(r){return this.ensureAvailable(4),this._data.setFloat32(this.offset,r,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(r){return this.ensureAvailable(8),this._data.setFloat64(this.offset,r,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(r){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,r,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(r){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,r,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(r){return this.writeUint8(r.charCodeAt(0))}writeChars(r){for(let n=0;n<r.length;n++)this.writeUint8(r.charCodeAt(n));return this}writeUtf8(r){return this.writeBytes(xDt(r))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const bDt=4,jne=0,_ne=1,wDt=2;function Eb(e){let r=e.length;for(;--r>=0;)e[r]=0}const jDt=0,r2e=1,_Dt=2,CDt=3,NDt=258,mH=29,aC=256,Jj=aC+1+mH,mv=30,pH=19,n2e=2*Jj+1,RA=15,jO=16,SDt=7,AH=256,i2e=16,a2e=17,s2e=18,v6=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Pk=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),kDt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),o2e=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),EDt=512,jh=new Array((Jj+2)*2);Eb(jh);const l2=new Array(mv*2);Eb(l2);const Zj=new Array(EDt);Eb(Zj);const e_=new Array(NDt-CDt+1);Eb(e_);const gH=new Array(mH);Eb(gH);const PB=new Array(mv);Eb(PB);function _O(e,r,n,i,a){this.static_tree=e,this.extra_bits=r,this.extra_base=n,this.elems=i,this.max_length=a,this.has_stree=e&&e.length}let l2e,c2e,u2e;function CO(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}const d2e=e=>e<256?Zj[e]:Zj[256+(e>>>7)],t_=(e,r)=>{e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255},Jo=(e,r,n)=>{e.bi_valid>jO-n?(e.bi_buf|=r<<e.bi_valid&65535,t_(e,e.bi_buf),e.bi_buf=r>>
vendor: 45,855 bytes, line 3234
3234jO-e.bi_valid,e.bi_valid+=n-jO):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=n)},Ad=(e,r,n)=>{Jo(e,n[r*2],n[r*2+1])},h2e=(e,r)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--r>0);return n>>>1},BDt=e=>{e.bi_valid===16?(t_(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},TDt=(e,r)=>{const n=r.dyn_tree,i=r.max_code,a=r.stat_desc.static_tree,o=r.stat_desc.has_stree,l=r.stat_desc.extra_bits,c=r.stat_desc.extra_base,u=r.stat_desc.max_length;let d,h,f,p,m,A,g=0;for(p=0;p<=RA;p++)e.bl_count[p]=0;for(n[e.heap[e.heap_max]*2+1]=0,d=e.heap_max+1;d<n2e;d++)h=e.heap[d],p=n[n[h*2+1]*2+1]+1,p>u&&(p=u,g++),n[h*2+1]=p,!(h>i)&&(e.bl_count[p]++,m=0,h>=c&&(m=l[h-c]),A=n[h*2],e.opt_len+=A*(p+m),o&&(e.static_len+=A*(a[h*2+1]+m)));if(g!==0){do{for(p=u-1;e.bl_count[p]===0;)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[u]--,g-=2}while(g>0);for(p=u;p!==0;p--)for(h=e.bl_count[p];h!==0;)f=e.heap[--d],!(f>i)&&(n[f*2+1]!==p&&(e.opt_len+=(p-n[f*2+1])*n[f*2],n[f*2+1]=p),h--)}},f2e=(e,r,n)=>{const i=new Array(RA+1);let a=0,o,l;for(o=1;o<=RA;o++)a=a+n[o-1]<<1,i[o]=a;for(l=0;l<=r;l++){let c=e[l*2+1];c!==0&&(e[l*2]=h2e(i[c]++,c))}},PDt=()=>{let e,r,n,i,a;const o=new Array(RA+1);for(n=0,i=0;i<mH-1;i++)for(gH[i]=n,e=0;e<1<<v6[i];e++)e_[n++]=i;for(e_[n-1]=i,a=0,i=0;i<16;i++)for(PB[i]=a,e=0;e<1<<Pk[i];e++)Zj[a++]=i;for(a>>=7;i<mv;i++)for(PB[i]=a<<7,e=0;e<1<<Pk[i]-7;e++)Zj[256+a++]=i;for(r=0;r<=RA;r++)o[r]=0;for(e=0;e<=143;)jh[e*2+1]=8,e++,o[8]++;for(;e<=255;)jh[e*2+1]=9,e++,o[9]++;for(;e<=279;)jh[e*2+1]=7,e++,o[7]++;for(;e<=287;)jh[e*2+1]=8,e++,o[8]++;for(f2e(jh,Jj+1,o),e=0;e<mv;e++)l2[e*2+1]=5,l2[e*2]=h2e(e,5);l2e=new _O(jh,v6,aC+1,Jj,RA),c2e=new _O(l2,Pk,0,mv,RA),u2e=new _O(new Array(0),kDt,0,pH,SDt)},m2e=e=>{let r;for(r=0;r<Jj;r++)e.dyn_ltree[r*2]=0;for(r=0;r<mv;r++)e.dyn_dtree[r*2]=0;for(r=0;r<pH;r++)e.bl_tree[r*2]=0;e.dyn_ltree[AH*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},p2e=e=>{e.bi_valid>8?t_(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Cne=(e,r,n,i)=>{const a=r*2,o=n*2;return e[a]<e[o]||e[a]===e[o]&&i[r]<=i[n]},NO=(e,r,n)=>{const i=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a<e.heap_len&&Cne(r,e.heap[a+1],e.heap[a],e.depth)&&a++,!Cne(r,i,e.heap[a],e.depth));)e.heap[n]=e.heap[a],n=a,a<<=1;e.heap[n]=i},Nne=(e,r,n)=>{let i,a,o=0,l,c;if(e.sym_next!==0)do i=e.pending_buf[e.sym_buf+o++]&255,i+=(e.pending_buf[e.sym_buf+o++]&255)<<8,a=e.pending_buf[e.sym_buf+o++],i===0?Ad(e,a,r):(l=e_[a],Ad(e,l+aC+1,r),c=v6[l],c!==0&&(a-=gH[l],Jo(e,a,c)),i--,l=d2e(i),Ad(e,l,n),c=Pk[l],c!==0&&(i-=PB[l],Jo(e,i,c)));while(o<e.sym_next);Ad(e,AH,r)},b6=(e,r)=>{const n=r.dyn_tree,i=r.stat_desc.static_tree,a=r.stat_desc.has_stree,o=r.stat_desc.elems;let l,c,u=-1,d;for(e.heap_len=0,e.heap_max=n2e,l=0;l<o;l++)n[l*2]!==0?(e.heap[++e.heap_len]=u=l,e.depth[l]=0):n[l*2+1]=0;for(;e.heap_len<2;)d=e.heap[++e.heap_len]=u<2?++u:0,n[d*2]=1,e.depth[d]=0,e.opt_len--,a&&(e.static_len-=i[d*2+1]);for(r.max_code=u,l=e.heap_len>>1;l>=1;l--)NO(e,n,l);d=o;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],NO(e,n,1),c=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=c,n[d*2]=n[l*2]+n[c*2],e.depth[d]=(e.depth[l]>=e.depth[c]?e.depth[l]:e.depth[c])+1,n[l*2+1]=n[c*2+1]=d,e.heap[1]=d++,NO(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],TDt(e,r),f2e(n,u,e.bl_count)},Sne=(e,r,n)=>{let i,a=-1,o,l=r[0*2+1],c=0,u=7,d=4;for(l===0&&(u=138,d=3),r[(n+1)*2+1]=65535,i=0;i<=n;i++)o=l,l=r[(i+1)*2+1],!(++c<u&&o===l)&&(c<d?e.bl_tree[o*2]+=c:o!==0?(o!==a&&e.bl_tree[o*2]++,e.bl_tree[i2e*2]++):c<=10?e.bl_tree[a2e*2]++:e.bl_tree[s2e*2]++,c=0,a=o,l===0?(u=138,d=3):o===l?(u=6,d=3):(u=7,d=4))},kne=(e,r,n)=>{let i,a=-1,o,l=r[0*2+1],c=0,u=7,d=4;for(l===0&&(u=138,d=3),i=0;i<=n;i++)if(o=l,l=r[(i+1)*2+1],!(++c<u&&o===l)){if(c<d)do Ad(e,o,e.bl_tree);while(--c!==0);else o!==0?(o!==a&&(Ad(e,o,e.bl_tree),c--),Ad(e,i2e,e.bl_tree),Jo(e,c-3,2)):c<=10?(Ad(e,a2e,e.bl_tree),Jo(e,c-3,3)):(Ad(e,s2e,e.bl_tree),Jo(e,c-11,7));c=0,a=o,l===0?(u=138,d=3):o===l?(u=6,d=3):(u=7,d=4)}},IDt=e=>{let r;for(Sne(e,e.dyn_ltree,e.l_desc.max_code),Sne(e,e.dyn_dtree,e.d_desc.max_code),b6(e,e.bl_desc),r=pH-1;r>=3&&e.bl_tree[o2e[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r},FDt=(e,r,n,i)=>{let a;for(Jo(e,r-257,5),Jo(e,n-1,5),Jo(e,i-4,4),a=0;a<i;a++)Jo(e,e.bl_tree[o2e[a]*2+1],3);kne(e,e.dyn_ltree,r-1),kne(e,e.dyn_dtree,n-1)},ODt=e=>{let r=4093624447,n;for(n=0;n<=31;n++,r>>>=1)if(r&1&&e.dyn_ltree[n*2]!==0)return jne;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return _ne;for(n=32;n<aC;n++)if(e.dyn_ltree[n*2]!==0)return _ne;return jne};let Ene=!1;const LDt=e=>{Ene||(PDt(),Ene=!0),e.l_desc=new CO(e.dyn_ltree,l2e),e.d_desc=new CO(e.dyn_dtree,c2e),e.bl_desc=new CO(e.bl_tree,u2e),e.bi_buf=0,e.bi_valid=0,m2e(e)},A2e=(e,r,n,i)=>{Jo(e,(jDt<<1)+(i?1:0),3),p2e(e),t_(e,n),t_(e,~n),n&&e.pending_buf.set(e.window.subarray(r,r+n),e.pending),e.pending+=n},RDt=e=>{Jo(e,r2e<<1,3),Ad(e,AH,jh),BDt(e)},DDt=(e,r,n,i)=>{let a,o,l=0;e.level>0?(e.strm.data_type===wDt&&(e.strm.data_type=ODt(e)),b6(e,e.l_desc),b6(e,e.d_desc),l=IDt(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=n+5,n+4<=a&&r!==-1?A2e(e,r,n,i):e.strategy===bDt||o===a?(Jo(e,(r2e<<1)+(i?1:0),3),Nne(e,jh,l2)):(Jo(e,(_Dt<<1)+(i?1:0),3),FDt(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),Nne(e,e.dyn_ltree,e.dyn_dtree)),m2e(e),i&&p2e(e)},MDt=(e,r,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=r,e.pending_buf[e.sym_buf+e.sym_next++]=r>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,r===0?e.dyn_ltree[n*2]++:(e.matches++,r--,e.dyn_ltree[(e_[n]+aC+1)*2]++,e.dyn_dtree[d2e(r)*2]++),e.sym_next===e.sym_end);var zDt=LDt,UDt=A2e,$Dt=DDt,QDt=MDt,HDt=RDt,VDt={_tr_init:zDt,_tr_stored_block:UDt,_tr_flush_block:$Dt,_tr_tally:QDt,_tr_align:HDt};const WDt=(e,r,n,i)=>{let a=e&65535|0,o=e>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do a=a+r[i++]|0,o=o+a|0;while(--l);a%=65521,o%=65521}return a|o<<16|0};var r_=WDt;const qDt=()=>{let e,r=[];for(var n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[n]=e}return r},KDt=new Uint32Array(qDt()),GDt=(e,r,n,i)=>{const a=KDt,o=i+n;e^=-1;for(let l=i;l<o;l++)e=e>>>8^a[(e^r[l])&255];return e^-1};var ss=GDt,S0={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},sC={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:XDt,_tr_stored_block:w6,_tr_flush_block:YDt,_tr_tally:rp,_tr_align:JDt}=VDt,{Z_NO_FLUSH:np,Z_PARTIAL_FLUSH:ZDt,Z_FULL_FLUSH:eMt,Z_FINISH:wc,Z_BLOCK:Bne,Z_OK:Ss,Z_STREAM_END:Tne,Z_STREAM_ERROR:Pd,Z_DATA_ERROR:tMt,Z_BUF_ERROR:SO,Z_DEFAULT_COMPRESSION:rMt,Z_FILTERED:nMt,Z_HUFFMAN_ONLY:IS,Z_RLE:iMt,Z_FIXED:aMt,Z_DEFAULT_STRATEGY:sMt,Z_UNKNOWN:oMt,Z_DEFLATED:I3}=sC,lMt=9,cMt=15,uMt=8,dMt=29,hMt=256,j6=hMt+1+dMt,fMt=30,mMt=19,pMt=2*j6+1,AMt=15,dn=3,Dm=258,Id=Dm+dn+1,gMt=32,k0=42,xH=57,_6=69,C6=73,N6=91,S6=103,DA=113,bw=666,So=1,Bb=2,Fg=3,Tb=4,xMt=3,MA=(e,r)=>(e.msg=S0[r],r),Pne=e=>e*2-(e>4?9:0),mm=e=>{let r=e.length;for(;--r>=0;)e[r]=0},yMt=e=>{let r,n,i,a=e.w_size;r=e.hash_size,i=r;do n=e.head[--i],e.head[i]=n>=a?n-a:0;while(--r);r=a,i=r;do n=e.prev[--i],e.prev[i]=n>=a?n-a:0;while(--r)};let vMt=(e,r,n)=>(r<<e.hash_shift^n)&e.hash_mask,ip=vMt;const Bl=e=>{const r=e.state;let n=r.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(r.pending_buf.subarray(r.pending_out,r.pending_out+n),e.next_out),e.next_out+=n,r.pending_out+=n,e.total_out+=n,e.avail_out-=n,r.pending-=n,r.pending===0&&(r.pending_out=0))},Ml=(e,r)=>{YDt(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Bl(e.strm)},En=(e,r)=>{e.pending_buf[e.pending++]=r},Y1=(e,r)=>{e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255},k6=(e,r,n,i)=>{let a=e.avail_in;return a>i&&(a=i),a===0?0:(e.avail_in-=a,r.set(e.input.subarray(e.next_in,e.next_in+a),n),e.state.wrap===1?e.adler=r_(e.adler,r,a,n):e.state.wrap===2&&(e.adler=ss(e.adler,r,a,n)),e.next_in+=a,e.total_in+=a,a)},g2e=(e,r)=>{let n=e.max_chain_length,i=e.strstart,a,o,l=e.prev_length,c=e.nice_match;const u=e.strstart>e.w_size-Id?e.strstart-(e.w_size-Id):0,d=e.window,h=e.w_mask,f=e.prev,p=e.strstart+Dm;let m=d[i+l-1],A=d[i+l];e.prev_length>=e.good_match&&(n>>=2),c>e.lookahead&&(c=e.lookahead);do if(a=r,!(d[a+l]!==A||d[a+l-1]!==m||d[a]!==d[i]||d[++a]!==d[i+1])){i+=2,a++;do;while(d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&i<p);if(o=Dm-(p-i),i=p-Dm,o>l){if(e.match_start=r,l=o,o>=c)break;m=d[i+l-1],A=d[i+l]}}while((r=f[r&h])>u&&--n!==0);return l<=e.lookahead?l:e.lookahead},E0=e=>{const r=e.w_size;let n,i,a;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-Id)&&(e.window.set(e.window.subarray(r,r+r-i),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.insert>e.strstart&&(e.insert=e.strstart),yMt(e),i+=r),e.strm.avail_in===0)break;if(n=k6(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=dn)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=ip(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=ip(e,e.ins_h,e.window[a+dn-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<dn)););}while(e.lookahead<Id&&e.strm.avail_in!==0)},x2e=(e,r)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,i,a,o,l=0,c=e.strm.avail_in;do{if(i=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o||(o=e.strm.avail_out-o,a=e.strstart-e.block_start,i>a+e.strm.avail_in&&(i=a+e.strm.avail_in),i>o&&(i=o),i<n&&(i===0&&r!==wc||r===np||i!==a+e.strm.avail_in)))break;l=r===wc&&i===a+e.strm.avail_in?1:0,w6(e,0,0,l),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,Bl(e.strm),a&&(a>i&&(a=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+a),e.strm.next_out),e.strm.next_out+=a,e.strm.avail_out-=a,e.strm.total_out+=a,e.block_start+=a,i-=a),i&&(k6(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(l===0);return c-=e.strm.avail_in,c&&(c>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=c&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-c,e.strm.next_in),e.strstart),e.strstart+=c,e.insert+=c>e.w_size-e.insert?e.w_size-e.insert:c),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),l?Tb:r!==np&&r!==wc&&e.strm.avail_in===0&&e.strstart===e.block_start?Bb:(o=e.window_size-e.strstart,e.strm.avail_in>o&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(k6(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,a=e.strstart-e.block_start,(a>=n||(a||r===wc)&&r!==np&&e.strm.avail_in===0&&a<=o)&&(i=a>o?o:a,l=r===wc&&e.strm.avail_in===0&&i===a?1:0,w6(e,e.block_start,i,l),e.block_start+=i,Bl(e.strm)),l?Fg:So)},kO=(e,r)=>{let n,i;for(;;){if(e.lookahead<Id){if(E0(e),e.lookahead<Id&&r===np)return So;if(e.lookahead===0)break}if(n=0,e.lookahead>=dn&&(e.ins_h=ip(e,e.ins_h,e.window[e.strstart+dn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Id&&(e.match_length=g2e(e,n)),e.match_length>=dn)if(i=rp(e,e.strstart-e.match_start,e.match_length-dn),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=dn){e.match_length--;do e.strstart++,e.ins_h=ip(e,e.ins_h,e.window[e.strstart+dn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=ip(e,e.ins_h,e.window[e.strstart+1]);else i=rp(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(Ml(e,!1),e.strm.avail_out===0))return So}return e.insert=e.strstart<dn-1?e.strstart:dn-1,r===wc?(Ml(e,!0),e.strm.avail_out===0?Fg:Tb):e.sym_next&&(Ml(e,!1),e.strm.avail_out===0)?So:Bb},Yx=(e,r)=>{let n,i,a;for(;;){if(e.lookahead<Id){if(E0(e),e.lookahead<Id&&r===np)return So;if(e.lookahead===0)break}if(n=0,e.lookahead>=dn&&(e.ins_h=ip(e,e.ins_h,e.window[e.strstart+dn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=dn-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Id&&(e.match_length=g2e(e,n),e.match_length<=5&&(e.strategy===nMt||e.match_length===dn&&e.strstart-e.match_start>4096)&&(e.match_length=dn-1)),e.prev_length>=dn&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-dn,i=rp(e,e.strstart-1-e.prev_match,e.prev_length-dn),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=ip(e,e.ins_h,e.window[e.strstart+dn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=dn-1,e.strstart++,i&&(Ml(e,!1),e.strm.avail_out===0))return So}else if(e.match_available){if(i=rp(e,0,e.window[e.strstart-1]),i&&Ml(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return So}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=rp(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<dn-1?e.strstart:dn-1,r===wc?(Ml(e,!0),e.strm.avail_out===0?Fg:Tb):e.sym_next&&(Ml(e,!1),e.strm.avail_out===0)?So:Bb},bMt=(e,r)=>{let n,i,a,o;const l=e.window;for(;;){if(e.lookahead<=Dm){if(E0(e),e.lookahead<=Dm&&r===np)return So;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=dn&&e.strstart>0&&(a=e.strstart-1,i=l[a],i===l[++a]&&i===l[++a]&&i===l[++a])){o=e.strstart+Dm;do;while(i===l[++a]&&i===l[++a]&&i===l[++a]&&i===l[++a]&&i===l[++a]&&i===l[++a]&&i===l[++a]&&i===l[++a]&&a<o);e.match_length=Dm-(o-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=dn?(n=rp(e,1,e.match_length-dn),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=rp(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ml(e,!1),e.strm.avail_out===0))return So}return e.insert=0,r===wc?(Ml(e,!0),e.strm.avail_out===0?Fg:Tb):e.sym_next&&(Ml(e,!1),e.strm.avail_out===0)?So:Bb},wMt=(e,r)=>{let n;for(;;){if(e.lookahead===0&&(E0(e),e.lookahead===0)){if(r===np)return So;break}if(e.match_length=0,n=rp(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ml(e,!1),e.strm.avail_out===0))return So}return e.insert=0,r===wc?(Ml(e,!0),e.strm.avail_out===0?Fg:Tb):e.sym_next&&(Ml(e,!1),e.strm.avail_out===0)?So:Bb};function Zu(e,r,n,i,a){this.good_length=e,this.max_lazy=r,this.nice_length=n,this.max_chain=i,this.func=a}const ww=[new Zu(0,0,0,0,x2e),new Zu(4,4,8,4,kO),new Zu(4,5,16,8,kO),new Zu(4,6,32,32,kO),new Zu(4,4,16,16,Yx),new Zu(8,16,32,32,Yx),new Zu(8,16,128,128,Yx),new Zu(8,32,128,256,Yx),new Zu(32,128,258,1024,Yx),new Zu(32,258,258,4096,Yx)],jMt=e=>{e.window_size=2*e.w_size,mm(e.head),e.max_lazy_match=ww[e.level].max_lazy,e.good_match=ww[e.level].good_length,e.nice_match=ww[e.level].nice_length,e.max_chain_length=ww[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=dn-1,e.match_available=0,e.ins_h=0};function _Mt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=I3,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(pMt*2),this.dyn_dtree=new Uint16Array((2*fMt+1)*2),this.bl_tree=new Uint16Array((2*mMt+1)*2),mm(this.dyn_ltree),mm(this.dyn_dtree),mm(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(AMt+1),this.heap=new Uint16Array(2*j6+1),mm(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*j6+1),mm(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const oC=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.status!==k0&&r.status!==xH&&r.status!==_6&&r.status!==C6&&r.status!==N6&&r.status!==S6&&r.status!==DA&&r.status!==bw?1:0},y2e=e=>{if(oC(e))return MA(e,Pd);e.total_in=e.total_out=0,e.data_type=oMt;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap===2?xH:r.wrap?k0:DA,e.adler=r.wrap===2?0:1,r.last_flush=-2,XDt(r),Ss},v2e=e=>{const r=y2e(e);return r===Ss&&jMt(e.state),r},CMt=(e,r)=>oC(e)||e.state.wrap!==2?Pd:(e.state.gzhead=r,Ss),b2e=(e,r,n,i,a,o)=>{if(!e)return Pd;let l=1;if(r===rMt&&(r=6),i<0?(l=0,i=-i):i>15&&(l=2,i-=16),a<1||a>lMt||n!==I3||i<8||i>15||r<0||r>9||o<0||o>aMt||i===8&&l!==1)return MA(e,Pd);i===8&&(i=9);const c=new _Mt;return e.state=c,c.strm=e,c.status=k0,c.wrap=l,c.gzhead=null,c.w_bits=i,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=a+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+dn-1)/dn),c.window=new Uint8Array(c.w_size*2),c.head=new Uint16Array(c.hash_size),c.prev=new Uint16Array(c.w_size),c.lit_bufsize=1<<a+6,c.pending_buf_size=c.lit_bufsize*4,c.pending_buf=new Uint8Array(c.pending_buf_size),c.sym_buf=c.lit_bufsize,c.sym_end=(c.lit_bufsize-1)*3,c.level=r,c.strategy=o,c.method=n,v2e(e)},NMt=(e,r)=>b2e(e,r,I3,cMt,uMt,sMt),SMt=(e,r)=>{if(oC(e)||r>Bne||r<0)return e?MA(e,Pd):Pd;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===bw&&r!==wc)return MA(e,e.avail_out===0?SO:Pd);const i=n.last_flush;if(n.last_flush=r,n.pending!==0){if(Bl(e),e.avail_out===0)return n.last_flush=-1,Ss}else if(e.avail_in===0&&Pne(r)<=Pne(i)&&r!==wc)return MA(e,SO);if(n.status===bw&&e.avail_in!==0)return MA(e,SO);if(n.status===k0&&n.wrap===0&&(n.status=DA),n.status===k0){let a=I3+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=IS||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,a|=o<<6,n.strstart!==0&&(a|=gMt),a+=31-a%31,Y1(n,a),n.strstart!==0&&(Y1(n,e.adler>>>16),Y1(n,e.adler&65535)),e.adler=1,n.status=DA,Bl(e),n.pending!==0)return n.last_flush=-1,Ss}if(n.status===xH){if(e.adler=0,En(n,31),En(n,139),En(n,8),n.gzhead)En(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),En(n,n.gzhead.time&255),En(n,n.gzhead.time>>8&255),En(n,n.gzhead.time>>16&255),En(n,n.gzhead.time>>24&255),En(n,n.level===9?2:n.strategy>=IS||n.level<2?4:0),En(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(En(n,n.gzhead.extra.length&255),En(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=ss(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=_6;else if(En(n,0),En(n,0),En(n,0),En(n,0),En(n,0),En(n,n.level===9?2:n.strategy>=IS||n.level<2?4:0),En(n,xMt),n.status=DA,Bl(e),n.pending!==0)return n.last_flush=-1,Ss}if(n.status===_6){if(n.gzhead.extra){let a=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let c=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+c),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>a&&(e.adler=ss(e.adler,n.pending_buf,n.pending-a,a)),n.gzindex+=c,Bl(e),n.pending!==0)return n.last_flush=-1,Ss;a=0,o-=c}let l=new Uint8Array(n.gzhead.extra);n.pending_buf.set(l.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>a&&(e.adler=ss(e.adler,n.pending_buf,n.pending-a,a)),n.gzindex=0}n.status=C6}if(n.status===C6){if(n.gzhead.name){let a=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>a&&(e.adler=ss(e.adler,n.pending_buf,n.pending-a,a)),Bl(e),n.pending!==0)return n.last_flush=-1,Ss;a=0}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,En(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>a&&(e.adler=ss(e.adler,n.pending_buf,n.pending-a,a)),n.gzindex=0}n.status=N6}if(n.status===N6){if(n.gzhead.comment){let a=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>a&&(e.adler=ss(e.adler,n.pending_buf,n.pending-a,a)),Bl(e),n.pending!==0)return n.last_flush=-1,Ss;a=0}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,En(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>a&&(e.adler=ss(e.adler,n.pending_buf,n.pending-a,a))}n.status=S6}if(n.status===S6){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Bl(e),n.pending!==0))return n.last_flush=-1,Ss;En(n,e.adler&255),En(n,e.adler>>8&255),e.adler=0}if(n.status=DA,Bl(e),n.pending!==0)return n.last_flush=-1,Ss}if(e.avail_in!==0||n.lookahead!==0||r!==np&&n.status!==bw){let a=n.level===0?x2e(n,r):n.strategy===IS?wMt(n,r):n.strategy===iMt?bMt(n,r):ww[n.level].func(n,r);if((a===Fg||a===Tb)&&(n.status=bw),a===So||a===Fg)return e.avail_out===0&&(n.last_flush=-1),Ss;if(a===Bb&&(r===ZDt?JDt(n):r!==Bne&&(w6(n,0,0,!1),r===eMt&&(mm(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Bl(e),e.avail_out===0))return n.last_flush=-1,Ss}return r!==wc?Ss:n.wrap<=0?Tne:(n.wrap===2?(En(n,e.adler&255),En(n,e.adler>>8&255),En(n,e.adler>>16&255),En(n,e.adler>>24&255),En(n,e.total_in&255),En(n,e.total_in>>8&255),En(n,e.total_in>>16&255),En(n,e.total_in>>24&255)):(Y1(n,e.adler>>>16),Y1(n,e.adler&65535)),Bl(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ss:Tne)},kMt=e=>{if(oC(e))return Pd;const r=e.state.status;return e.state=null,r===DA?MA(e,tMt):Ss},EMt=(e,r)=>{let n=r.length;if(oC(e))return Pd;const i=e.state,a=i.wrap;if(a===2||a===1&&i.status!==k0||i.lookahead)return Pd;if(a===1&&(e.adler=r_(e.adler,r,n,0)),i.wrap=0,n>=i.w_size){a===0&&(mm(i.head),i.strstart=0,i.block_start=0,i.insert=0);let u=new Uint8Array(i.w_size);u.set(r.subarray(n-i.w_size,n),0),r=u,n=i.w_size}const o=e.avail_in,l=e.next_in,c=e.input;for(e.avail_in=n,e.next_in=0,e.input=r,E0(i);i.lookahead>=dn;){let u=i.strstart,d=i.lookahead-(dn-1);do i.ins_h=ip(i,i.ins_h,i.window[u+dn-1]),i.prev[u&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=u,u++;while(--d);i.strstart=u,i.lookahead=dn-1,E0(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=dn-1,i.match_available=0,e.next_in=l,e.input=c,e.avail_in=o,i.wrap=a,Ss};var BMt=NMt,TMt=b2e,PMt=v2e,IMt=y2e,FMt=CMt,OMt=SMt,LMt=kMt,RMt=EMt,DMt="pako deflate (from Nodeca project)",c2={deflateInit:BMt,deflateInit2:TMt,deflateReset:PMt,deflateResetKeep:IMt,deflateSetHeader:FMt,deflate:OMt,deflateEnd:LMt,deflateSetDictionary:RMt,deflateInfo:DMt};const MMt=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var zMt=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const i in n)MMt(n,i)&&(e[i]=n[i])}}return e},UMt=e=>{let r=0;for(let i=0,a=e.length;i<a;i++)r+=e[i].length;const n=new Uint8Array(r);for(let i=0,a=0,o=e.length;i<o;i++){let l=e[i];n.set(l,a),a+=l.length}return n},F3={assign:zMt,flattenChunks:UMt};let w2e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{w2e=!1}const n_=new Uint8Array(256);for(let e=0;e<256;e++)n_[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;n_[254]=n_[254]=1;var $Mt=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let r,n,i,a,o,l=e.length,c=0;for(a=0;a<l;a++)n=e.charCodeAt(a),(n&64512)===55296&&a+1<l&&(i=e.charCodeAt(a+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),a++)),c+=n<128?1:n<2048?2:n<65536?3:4;for(r=new Uint8Array(c),o=0,a=0;o<c;a++)n=e.charCodeAt(a),(n&64512)===55296&&a+1<l&&(i=e.charCodeAt(a+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),a++)),n<128?r[o++]=n:n<2048?(r[o++]=192|n>>>6,r[o++]=128|n&63):n<65536?(r[o++]=224|n>>>12,r[o++]=128|n>>>6&63,r[o++]=128|n&63):(r[o++]=240|n>>>18,r[o++]=128|n>>>12&63,r[o++]=128|n>>>6&63,r[o++]=128|n&63);return r};const QMt=(e,r)=>{if(r<65534&&e.subarray&&w2e)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let i=0;i<r;i++)n+=String.fromCharCode(e[i]);return n};var HMt=(e,r)=>{const n=r||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,r));let i,a;const o=new Array(n*2);for(a=0,i=0;i<n;){let l=e[i++];if(l<128){o[a++]=l;continue}let c=n_[l];if(c>4){o[a++]=65533,i+=c-1;continue}for(l&=c===2?31:c===3?15:7;c>1&&i<n;)l=l<<6|e[i++]&63,c--;if(c>1){o[a++]=65533;continue}l<65536?o[a++]=l:(l-=65536,o[a++]=55296|l>>10&1023,o[a++]=56320|l&1023)}return QMt(o,a)},VMt=(e,r)=>{r=r||e.length,r>e.length&&(r=e.length);let n=r-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?r:n+n_[e[n]]>r?n:r},i_={string2buf:$Mt,buf2string:HMt,utf8border:VMt};function WMt(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var j2e=WMt;const _2e=Object.prototype.toString,{Z_NO_FLUSH:qMt,Z_SYNC_FLUSH:KMt,Z_FULL_FLUSH:GMt,Z_FINISH:XMt,Z_OK:IB,Z_STREAM_END:YMt,Z_DEFAULT_COMPRESSION:JMt,Z_DEFAULT_STRATEGY:ZMt,Z_DEFLATED:ezt}=sC;function yH(e){this.options=F3.assign({level:JMt,method:ezt,chunkSize:16384,windowBits:15,memLevel:8,strategy:ZMt},e||{});let r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new j2e,this.strm.avail_out=0;let n=c2.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(n!==IB)throw new Error(S0[n]);if(r.header&&c2.deflateSetHeader(this.strm,r.header),r.dictionary){let i;if(typeof r.dictionary=="string"?i=i_.string2buf(r.dictionary):_2e.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,n=c2.deflateSetDictionary(this.strm,i),n!==IB)throw new Error(S0[n]);this._dict_set=!0}}yH.prototype.push=function(e,r){const n=this.strm,i=this.options.chunkSize;let a,o;if(this.ended)return!1;for(r===~~r?o=r:o=r===!0?XMt:qMt,typeof e=="string"?n.input=i_.string2buf(e):_2e.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),(o===KMt||o===GMt)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(a=c2.deflate(n,o),a===YMt)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=c2.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===IB;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};yH.prototype.onData=function(e){this.chunks.push(e)};yH.prototype.onEnd=function(e){e===IB&&(this.result=F3.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const FS=16209,tzt=16191;var rzt=function(r,n){let i,a,o,l,c,u,d,h,f,p,m,A,g,y,x,b,v,j,_,C,N,S,E,O;const B=r.state;i=r.next_in,E=r.input,a=i+(r.avail_in-5),o=r.next_out,O=r.output,l=o-(n-r.avail_out),c=o+(r.avail_out-257),u=B.dmax,d=B.wsize,h=B.whave,f=B.wnext,p=B.window,m=B.hold,A=B.bits,g=B.lencode,y=B.distcode,x=(1<<B.lenbits)-1,b=(1<<B.distbits)-1;e:do{A<15&&(m+=E[i++]<<A,A+=8,m+=E[i++]<<A,A+=8),v=g[m&x];t:for(;;){if(j=v>>>24,m>>>=j,A-=j,j=v>>>16&255,j===0)O[o++]=v&65535;else if(j&16){_=v&65535,j&=15,j&&(A<j&&(m+=E[i++]<<A,A+=8),_+=m&(1<<j)-1,m>>>=j,A-=j),A<15&&(m+=E[i++]<<A,A+=8,m+=E[i++]<<A,A+=8),v=y[m&b];r:for(;;){if(j=v>>>24,m>>>=j,A-=j,j=v>>>16&255,j&16){if(C=v&65535,j&=15,A<j&&(m+=E[i++]<<A,A+=8,A<j&&(m+=E[i++]<<A,A+=8)),C+=m&(1<<j)-1,C>u){r.msg="invalid distance too far back",B.mode=FS;break e}if(m>>>=j,A-=j,j=o-l,C>j){if(j=C-j,j>h&&B.sane){r.msg="invalid distance too far back",B.mode=FS;break e}if(N=0,S=p,f===0){if(N+=d-j,j<_){_-=j;do O[o++]=p[N++];while(--j);N=o-C,S=O}}else if(f<j){if(N+=d+f-j,j-=f,j<_){_-=j;do O[o++]=p[N++];while(--j);if(N=0,f<_){j=f,_-=j;do O[o++]=p[N++];while(--j);N=o-C,S=O}}}else if(N+=f-j,j<_){_-=j;do O[o++]=p[N++];while(--j);N=o-C,S=O}for(;_>2;)O[o++]=S[N++],O[o++]=S[N++],O[o++]=S[N++],_-=3;_&&(O[o++]=S[N++],_>1&&(O[o++]=S[N++]))}else{N=o-C;do O[o++]=O[N++],O[o++]=O[N++],O[o++]=O[N++],_-=3;while(_>2);_&&(O[o++]=O[N++],_>1&&(O[o++]=O[N++]))}}else if(j&64){r.msg="invalid distance code",B.mode=FS;break e}else{v=y[(v&65535)+(m&(1<<j)-1)];continue r}break}}else if(j&64)if(j&32){B.mode=tzt;break e}else{r.msg="invalid literal/length code",B.mode=FS;break e}else{v=g[(v&65535)+(m&(1<<j)-1)];continue t}break}}while(i<a&&o<c);_=A>>3,i-=_,A-=_<<3,m&=(1<<A)-1,r.next_in=i,r.next_out=o,r.avail_in=i<a?5+(a-i):5-(i-a),r.avail_out=o<c?257+(c-o):257-(o-c),B.hold=m,B.bits=A};const Jx=15,Ine=852,Fne=592,One=0,EO=1,Lne=2,nzt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),izt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),azt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),szt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),ozt=(e,r,n,i,a,o,l,c)=>{const u=c.bits;let d=0,h=0,f=0,p=0,m=0,A=0,g=0,y=0,x=0,b=0,v,j,_,C,N,S=null,E;const O=new Uint16Array(Jx+1),B=new Uint16Array(Jx+1);let T=null,F,I,D;for(d=0;d<=Jx;d++)O[d]=0;for(h=0;h<i;h++)O[r[n+h]]++;for(m=u,p=Jx;p>=1&&O[p]===0;p--);if(m>p&&(m=p),p===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,c.bits=1,0;for(f=1;f<p&&O[f]===0;f++);for(m<f&&(m=f),y=1,d=1;d<=Jx;d++)if(y<<=1,y-=O[d],y<0)return-1;if(y>0&&(e===One||p!==1))return-1;for(B[1]=0,d=1;d<Jx;d++)B[d+1]=B[d]+O[d];for(h=0;h<i;h++)r[n+h]!==0&&(l[B[r[n+h]]++]=h);if(e===One?(S=T=l,E=20):e===EO?(S=nzt,T=izt,E=257):(S=azt,T=szt,E=0),b=0,h=0,d=f,N=o,A=m,g=0,_=-1,x=1<<m,C=x-1,e===EO&&x>Ine||e===Lne&&x>Fne)return 1;for(;;){F=d-g,l[h]+1<E?(I=0,D=l[h]):l[h]>=E?(I=T[l[h]-E],D=S[l[h]-E]):(I=96,D=0),v=1<<d-g,j=1<<A,f=j;do j-=v,a[N+(b>>g)+j]=F<<24|I<<16|D|0;while(j!==0);for(v=1<<d-1;b&v;)v>>=1;if(v!==0?(b&=v-1,b+=v):b=0,h++,--O[d]===0){if(d===p)break;d=r[n+l[h]]}if(d>m&&(b&C)!==_){for(g===0&&(g=m),N+=f,A=d-g,y=1<<A;A+g<p&&(y-=O[A+g],!(y<=0));)A++,y<<=1;if(x+=1<<A,e===EO&&x>Ine||e===Lne&&x>Fne)return 1;_=b&C,a[_]=m<<24|A<<16|N-o|0}}return b!==0&&(a[N+b]=d-g<<24|64<<16|0),c.bits=m,0};var u2=ozt;const lzt=0,C2e=1,N2e=2,{Z_FINISH:Rne,Z_BLOCK:czt,Z_TREES:OS,Z_OK:Og,Z_STREAM_END:uzt,Z_NEED_DICT:dzt,Z_STREAM_ERROR:zc,Z_DATA_ERROR:S2e,Z_MEM_ERROR:k2e,Z_BUF_ERROR:hzt,Z_DEFLATED:Dne}=sC,O3=16180,Mne=16181,zne=16182,Une=16183,$ne=16184,Qne=16185,Hne=16186,Vne=16187,Wne=16188,qne=16189,FB=16190,gh=16191,BO=16192,Kne=16193,TO=16194,Gne=16195,Xne=16196,Yne=16197,Jne=16198,LS=16199,RS=16200,Zne=16201,eie=16202,tie=16203,rie=16204,nie=16205,PO=16206,iie=16207,aie=16208,Bi=16209,E2e=16210,B2e=16211,fzt=852,mzt=592,pzt=15,Azt=pzt,sie=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function gzt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const rx=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.mode<O3||r.mode>B2e?1:0},T2e=e=>{if(rx(e))return zc;const r=e.state;return e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=O3,r.last=0,r.havedict=0,r.flags=-1,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Int32Array(fzt),r.distcode=r.distdyn=new Int32Array(mzt),r.sane=1,r.back=-1,Og},P2e=e=>{if(rx(e))return zc;const r=e.state;return r.wsize=0,r.whave=0,r.wnext=0,T2e(e)},I2e=(e,r)=>{let n;if(rx(e))return zc;const i=e.state;return r<0?(n=0,r=-r):(n=(r>>4)+5,r<48&&(r&=15)),r&&(r<8||r>15)?zc:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=n,i.wbits=r,P2e(e))},F2e=(e,r)=>{if(!e)return zc;const n=new gzt;e.state=n,n.strm=e,n.window=null,n.mode=O3;const i=I2e(e,r);return i!==Og&&(e.state=null),i},xzt=e=>F2e(e,Azt);let oie=!0,IO,FO;const yzt=e=>{if(oie){IO=new Int32Array(512),FO=new Int32Array(32);let r=0;for(;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(u2(C2e,e.lens,0,288,IO,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;u2(N2e,e.lens,0,32,FO,0,e.work,{bits:5}),oie=!1}e.lencode=IO,e.lenbits=9,e.distcode=FO,e.distbits=5},O2e=(e,r,n,i)=>{let a;const o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),i>=o.wsize?(o.window.set(r.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>i&&(a=i),o.window.set(r.subarray(n-i,n-i+a),o.wnext),i-=a,i?(o.window.set(r.subarray(n-i,n),0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0},vzt=(e,r)=>{let n,i,a,o,l,c,u,d,h,f,p,m,A,g,y=0,x,b,v,j,_,C,N,S;const E=new Uint8Array(4);let O,B;const T=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(rx(e)||!e.output||!e.input&&e.avail_in!==0)return zc;n=e.state,n.mode===gh&&(n.mode=BO),l=e.next_out,a=e.output,u=e.avail_out,o=e.next_in,i=e.input,c=e.avail_in,d=n.hold,h=n.bits,f=c,p=u,S=Og;e:for(;;)switch(n.mode){case O3:if(n.wrap===0){n.mode=BO;break}for(;h<16;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}if(n.wrap&2&&d===35615){n.wbits===0&&(n.wbits=15),n.check=0,E[0]=d&255,E[1]=d>>>8&255,n.check=ss(n.check,E,2,0),d=0,h=0,n.mode=Mne;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((d&255)<<8)+(d>>8))%31){e.msg="incorrect header check",n.mode=Bi;break}if((d&15)!==Dne){e.msg="unknown compression method",n.mode=Bi;break}if(d>>>=4,h-=4,N=(d&15)+8,n.wbits===0&&(n.wbits=N),N>15||N>n.wbits){e.msg="invalid window size",n.mode=Bi;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=d&512?qne:gh,d=0,h=0;break;case Mne:for(;h<16;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}if(n.flags=d,(n.flags&255)!==Dne){e.msg="unknown compression method",n.mode=Bi;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Bi;break}n.head&&(n.head.text=d>>8&1),n.flags&512&&n.wrap&4&&(E[0]=d&255,E[1]=d>>>8&255,n.check=ss(n.check,E,2,0)),d=0,h=0,n.mode=zne;case zne:for(;h<32;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}n.head&&(n.head.time=d),n.flags&512&&n.wrap&4&&(E[0]=d&255,E[1]=d>>>8&255,E[2]=d>>>16&255,E[3]=d>>>24&255,n.check=ss(n.check,E,4,0)),d=0,h=0,n.mode=Une;case Une:for(;h<16;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}n.head&&(n.head.xflags=d&255,n.head.os=d>>8),n.flags&512&&n.wrap&4&&(E[0]=d&255,E[1]=d>>>8&255,n.check=ss(n.check,E,2,0)),d=0,h=0,n.mode=$ne;case $ne:if(n.flags&1024){for(;h<16;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}n.length=d,n.head&&(n.head.extra_len=d),n.flags&512&&n.wrap&4&&(E[0]=d&255,E[1]=d>>>8&255,n.check=ss(n.check,E,2,0)),d=0,h=0}else n.head&&(n.head.extra=null);n.mode=Qne;case Qne:if(n.flags&1024&&(m=n.length,m>c&&(m=c),m&&(n.head&&(N=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(i.subarray(o,o+m),N)),n.flags&512&&n.wrap&4&&(n.check=ss(n.check,i,m,o)),c-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=Hne;case Hne:if(n.flags&2048){if(c===0)break e;m=0;do N=i[o+m++],n.head&&N&&n.length<65536&&(n.head.name+=String.fromCharCode(N));while(N&&m<c);if(n.flags&512&&n.wrap&4&&(n.check=ss(n.check,i,m,o)),c-=m,o+=m,N)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Vne;case Vne:if(n.flags&4096){if(c===0)break e;m=0;do N=i[o+m++],n.head&&N&&n.length<65536&&(n.head.comment+=String.fromCharCode(N));while(N&&m<c);if(n.flags&512&&n.wrap&4&&(n.check=ss(n.check,i,m,o)),c-=m,o+=m,N)break e}else n.head&&(n.head.comment=null);n.mode=Wne;case Wne:if(n.flags&512){for(;h<16;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}if(n.wrap&4&&d!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Bi;break}d=0,h=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=gh;break;case qne:for(;h<32;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}e.adler=n.check=sie(d),d=0,h=0,n.mode=FB;case FB:if(n.havedict===0)return e.next_out=l,e.avail_out=u,e.next_in=o,e.avail_in=c,n.hold=d,n.bits=h,dzt;e.adler=n.check=1,n.mode=gh;case gh:if(r===czt||r===OS)break e;case BO:if(n.last){d>>>=h&7,h-=h&7,n.mode=PO;break}for(;h<3;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}switch(n.last=d&1,d>>>=1,h-=1,d&3){case 0:n.mode=Kne;break;case 1:if(yzt(n),n.mode=LS,r===OS){d>>>=2,h-=2;break e}break;case 2:n.mode=Xne;break;case 3:e.msg="invalid block type",n.mode=Bi}d>>>=2,h-=2;break;case Kne:for(d>>>=h&7,h-=h&7;h<32;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}if((d&65535)!==(d>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Bi;break}if(n.length=d&65535,d=0,h=0,n.mode=TO,r===OS)break e;case TO:n.mode=Gne;case Gne:if(m=n.length,m){if(m>c&&(m=c),m>u&&(m=u),m===0)break e;a.set(i.subarray(o,o+m),l),c-=m,o+=m,u-=m,l+=m,n.length-=m;break}n.mode=gh;break;case Xne:for(;h<14;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}if(n.nlen=(d&31)+257,d>>>=5,h-=5,n.ndist=(d&31)+1,d>>>=5,h-=5,n.ncode=(d&15)+4,d>>>=4,h-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Bi;break}n.have=0,n.mode=Yne;case Yne:for(;n.have<n.ncode;){for(;h<3;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}n.lens[T[n.have++]]=d&7,d>>>=3,h-=3}for(;n.have<19;)n.lens[T[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,O={bits:n.lenbits},S=u2(lzt,n.lens,0,19,n.lencode,0,n.work,O),n.lenbits=O.bits,S){e.msg="invalid code lengths set",n.mode=Bi;break}n.have=0,n.mode=Jne;case Jne:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[d&(1<<n.lenbits)-1],x=y>>>24,b=y>>>16&255,v=y&65535,!(x<=h);){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}if(v<16)d>>>=x,h-=x,n.lens[n.have++]=v;else{if(v===16){for(B=x+2;h<B;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}if(d>>>=x,h-=x,n.have===0){e.msg="invalid bit length repeat",n.mode=Bi;break}N=n.lens[n.have-1],m=3+(d&3),d>>>=2,h-=2}else if(v===17){for(B=x+3;h<B;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}d>>>=x,h-=x,N=0,m=3+(d&7),d>>>=3,h-=3}else{for(B=x+7;h<B;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}d>>>=x,h-=x,N=0,m=11+(d&127),d>>>=7,h-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Bi;break}for(;m--;)n.lens[n.have++]=N}}if(n.mode===Bi)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Bi;break}if(n.lenbits=9,O={bits:n.lenbits},S=u2(C2e,n.lens,0,n.nlen,n.lencode,0,n.work,O),n.lenbits=O.bits,S){e.msg="invalid literal/lengths set",n.mode=Bi;break}if(n.distbits=6,n.distcode=n.distdyn,O={bits:n.distbits},S=u2(N2e,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,O),n.distbits=O.bits,S){e.msg="invalid distances set",n.mode=Bi;break}if(n.mode=LS,r===OS)break e;case LS:n.mode=RS;case RS:if(c>=6&&u>=258){e.next_out=l,e.avail_out=u,e.next_in=o,e.avail_in=c,n.hold=d,n.bits=h,rzt(e,p),l=e.next_out,a=e.output,u=e.avail_out,o=e.next_in,i=e.input,c=e.avail_in,d=n.hold,h=n.bits,n.mode===gh&&(n.back=-1);break}for(n.back=0;y=n.lencode[d&(1<<n.lenbits)-1],x=y>>>24,b=y>>>16&255,v=y&65535,!(x<=h);){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}if(b&&!(b&240)){for(j=x,_=b,C=v;y=n.lencode[C+((d&(1<<j+_)-1)>>j)],x=y>>>24,b=y>>>16&255,v=y&65535,!(j+x<=h);){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}d>>>=j,h-=j,n.back+=j}if(d>>>=x,h-=x,n.back+=x,n.length=v,b===0){n.mode=nie;break}if(b&32){n.back=-1,n.mode=gh;break}if(b&64){e.msg="invalid literal/length code",n.mode=Bi;break}n.extra=b&15,n.mode=Zne;case Zne:if(n.extra){for(B=n.extra;h<B;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}n.length+=d&(1<<n.extra)-1,d>>>=n.extra,h-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=eie;case eie:for(;y=n.distcode[d&(1<<n.distbits)-1],x=y>>>24,b=y>>>16&255,v=y&65535,!(x<=h);){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}if(!(b&240)){for(j=x,_=b,C=v;y=n.distcode[C+((d&(1<<j+_)-1)>>j)],x=y>>>24,b=y>>>16&255,v=y&65535,!(j+x<=h);){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}d>>>=j,h-=j,n.back+=j}if(d>>>=x,h-=x,n.back+=x,b&64){e.msg="invalid distance code",n.mode=Bi;break}n.offset=v,n.extra=b&15,n.mode=tie;case tie:if(n.extra){for(B=n.extra;h<B;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}n.offset+=d&(1<<n.extra)-1,d>>>=n.extra,h-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Bi;break}n.mode=rie;case rie:if(u===0)break e;if(m=p-u,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Bi;break}m>n.wnext?(m-=n.wnext,A=n.wsize-m):A=n.wnext-m,m>n.length&&(m=n.length),g=n.window}else g=a,A=l-n.offset,m=n.length;m>u&&(m=u),u-=m,n.length-=m;do a[l++]=g[A++];while(--m);n.length===0&&(n.mode=RS);break;case nie:if(u===0)break e;a[l++]=n.length,u--,n.mode=RS;break;case PO:if(n.wrap){for(;h<32;){if(c===0)break e;c--,d|=i[o++]<<h,h+=8}if(p-=u,e.total_out+=p,n.total+=p,n.wrap&4&&p&&(e.adler=n.check=n.flags?ss(n.check,a,p,l-p):r_(n.check,a,p,l-p)),p=u,n.wrap&4&&(n.flags?d:sie(d))!==n.check){e.msg="incorrect data check",n.mode=Bi;break}d=0,h=0}n.mode=iie;case iie:if(n.wrap&&n.flags){for(;h<32;){if(c===0)break e;c--,d+=i[o++]<<h,h+=8}if(n.wrap&4&&d!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Bi;break}d=0,h=0}n.mode=aie;case aie:S=uzt;break e;case Bi:S=S2e;break e;case E2e:return k2e;case B2e:default:return zc}return e.next_out=l,e.avail_out=u,e.next_in=o,e.avail_in=c,n.hold=d,n.bits=h,(n.wsize||p!==e.avail_out&&n.mode<Bi&&(n.mode<PO||r!==Rne))&&O2e(e,e.output,e.next_out,p-e.avail_out),f-=e.avail_in,p-=e.avail_out,e.total_in+=f,e.total_out+=p,n.total+=p,n.wrap&4&&p&&(e.adler=n.check=n.flags?ss(n.check,a,p,e.next_out-p):r_(n.check,a,p,e.next_out-p)),e.data_type=n.bits+(n.last?64:0)+(n.mode===gh?128:0)+(n.mode===LS||n.mode===TO?256:0),(f===0&&p===0||r===Rne)&&S===Og&&(S=hzt),S},bzt=e=>{if(rx(e))return zc;let r=e.state;return r.window&&(r.window=null),e.state=null,Og},wzt=(e,r)=>{if(rx(e))return zc;const n=e.state;return n.wrap&2?(n.head=r,r.done=!1,Og):zc},jzt=(e,r)=>{const n=r.length;let i,a,o;return rx(e)||(i=e.state,i.wrap!==0&&i.mode!==FB)?zc:i.mode===FB&&(a=1,a=r_(a,r,n,0),a!==i.check)?S2e:(o=O2e(e,r,n,n),o?(i.mode=E2e,k2e):(i.havedict=1,Og))};var _zt=P2e,Czt=I2e,Nzt=T2e,Szt=xzt,kzt=F2e,Ezt=vzt,Bzt=bzt,Tzt=wzt,Pzt=jzt,Izt="pako inflate (from Nodeca project)",_h={inflateReset:_zt,inflateReset2:Czt,inflateResetKeep:Nzt,inflateInit:Szt,inflateInit2:kzt,inflate:Ezt,inflateEnd:Bzt,inflateGetHeader:Tzt,inflateSetDictionary:Pzt,inflateInfo:Izt};function Fzt(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Ozt=Fzt;const L2e=Object.prototype.toString,{Z_NO_FLUSH:Lzt,Z_FINISH:Rzt,Z_OK:a_,Z_STREAM_END:OO,Z_NEED_DICT:LO,Z_STREAM_ERROR:Dzt,Z_DATA_ERROR:lie,Z_MEM_ERROR:Mzt}=sC;function lC(e){this.options=F3.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new j2e,this.strm.avail_out=0;let n=_h.inflateInit2(this.strm,r.windowBits);if(n!==a_)throw new Error(S0[n]);if(this.header=new Ozt,_h.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=i_.string2buf(r.dictionary):L2e.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(n=_h.inflateSetDictionary(this.strm,r.dictionary),n!==a_)))throw new Error(S0[n])}lC.prototype.push=function(e,r){const n=this.strm,i=this.options.chunkSize,a=this.options.dictionary;let o,l,c;if(this.ended)return!1;for(r===~~r?l=r:l=r===!0?Rzt:Lzt,L2e.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),o=_h.inflate(n,l),o===LO&&a&&(o=_h.inflateSetDictionary(n,a),o===a_?o=_h.inflate(n,l):o===lie&&(o=LO));n.avail_in>0&&o===OO&&n.state.wrap>0&&e[n.next_in]!==0;)_h.inflateReset(n),o=_h.inflate(n,l);switch(o){case Dzt:case lie:case LO:case Mzt:return this.onEnd(o),this.ended=!0,!1}if(c=n.avail_out,n.next_out&&(n.avail_out===0||o===OO))if(this.options.to==="string"){let u=i_.utf8border(n.output,n.next_out),d=n.next_out-u,h=i_.buf2
vendor: 9,610 bytes, line 3234
3234string(n.output,u);n.next_out=d,n.avail_out=i-d,d&&n.output.set(n.output.subarray(u,u+d),0),this.onData(h)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===a_&&c===0)){if(o===OO)return o=_h.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};lC.prototype.onData=function(e){this.chunks.push(e)};lC.prototype.onEnd=function(e){e===a_&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=F3.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function vH(e,r){const n=new lC(r);if(n.push(e),n.err)throw n.msg||S0[n.err];return n.result}function zzt(e,r){return r=r||{},r.raw=!0,vH(e,r)}var Uzt=lC,$zt=vH,Qzt=zzt,Hzt=vH,Vzt=sC,Wzt={Inflate:Uzt,inflate:$zt,inflateRaw:Qzt,ungzip:Hzt,constants:Vzt};const{Inflate:qzt,inflate:Kzt,inflateRaw:QUt,ungzip:HUt}=Wzt;var cie=qzt,Gzt=Kzt;const R2e=[];for(let e=0;e<256;e++){let r=e;for(let n=0;n<8;n++)r&1?r=3988292384^r>>>1:r=r>>>1;R2e[e]=r}const uie=4294967295;function Xzt(e,r,n){let i=e;for(let a=0;a<n;a++)i=R2e[(i^r[a])&255]^i>>>8;return i}function Yzt(e,r){return(Xzt(uie,e,r)^uie)>>>0}function die(e,r,n){const i=e.readUint32(),a=Yzt(new Uint8Array(e.buffer,e.byteOffset+e.offset-r-4,r),r);if(a!==i)throw new Error(`CRC mismatch for chunk ${n}. Expected ${i}, found ${a}`)}function D2e(e,r,n){for(let i=0;i<n;i++)r[i]=e[i]}function M2e(e,r,n,i){let a=0;for(;a<i;a++)r[a]=e[a];for(;a<n;a++)r[a]=e[a]+r[a-i]&255}function z2e(e,r,n,i){let a=0;if(n.length===0)for(;a<i;a++)r[a]=e[a];else for(;a<i;a++)r[a]=e[a]+n[a]&255}function U2e(e,r,n,i,a){let o=0;if(n.length===0){for(;o<a;o++)r[o]=e[o];for(;o<i;o++)r[o]=e[o]+(r[o-a]>>1)&255}else{for(;o<a;o++)r[o]=e[o]+(n[o]>>1)&255;for(;o<i;o++)r[o]=e[o]+(r[o-a]+n[o]>>1)&255}}function $2e(e,r,n,i,a){let o=0;if(n.length===0){for(;o<a;o++)r[o]=e[o];for(;o<i;o++)r[o]=e[o]+r[o-a]&255}else{for(;o<a;o++)r[o]=e[o]+n[o]&255;for(;o<i;o++)r[o]=e[o]+Jzt(r[o-a],n[o],n[o-a])&255}}function Jzt(e,r,n){const i=e+r-n,a=Math.abs(i-e),o=Math.abs(i-r),l=Math.abs(i-n);return a<=o&&a<=l?e:o<=l?r:n}function Zzt(e,r,n,i,a,o){switch(e){case 0:D2e(r,n,a);break;case 1:M2e(r,n,a,o);break;case 2:z2e(r,n,i,a);break;case 3:U2e(r,n,i,a,o);break;case 4:$2e(r,n,i,a,o);break;default:throw new Error(`Unsupported filter: ${e}`)}}const e6t=new Uint16Array([255]),t6t=new Uint8Array(e6t.buffer),r6t=t6t[0]===255;function n6t(e){const{data:r,width:n,height:i,channels:a,depth:o}=e,l=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],c=Math.ceil(o/8)*a,u=new Uint8Array(i*n*c);let d=0;for(let h=0;h<7;h++){const f=l[h],p=Math.ceil((n-f.x)/f.xStep),m=Math.ceil((i-f.y)/f.yStep);if(p<=0||m<=0)continue;const A=p*c,g=new Uint8Array(A);for(let y=0;y<m;y++){const x=r[d++],b=r.subarray(d,d+A);d+=A;const v=new Uint8Array(A);Zzt(x,b,v,g,A,c),g.set(v);for(let j=0;j<p;j++){const _=f.x+j*f.xStep,C=f.y+y*f.yStep;if(!(_>=n||C>=i))for(let N=0;N<c;N++)u[(C*n+_)*c+N]=v[j*c+N]}}}if(o===16){const h=new Uint16Array(u.buffer);if(r6t)for(let f=0;f<h.length;f++)h[f]=i6t(h[f]);return h}else return u}function i6t(e){return(e&255)<<8|e>>8&255}const a6t=new Uint16Array([255]),s6t=new Uint8Array(a6t.buffer),o6t=s6t[0]===255,l6t=new Uint8Array(0);function hie(e){const{data:r,width:n,height:i,channels:a,depth:o}=e,l=Math.ceil(o/8)*a,c=Math.ceil(o/8*a*n),u=new Uint8Array(i*c);let d=l6t,h=0,f,p;for(let m=0;m<i;m++){switch(f=r.subarray(h+1,h+1+c),p=u.subarray(m*c,(m+1)*c),r[h]){case 0:D2e(f,p,c);break;case 1:M2e(f,p,c,l);break;case 2:z2e(f,p,d,c);break;case 3:U2e(f,p,d,c,l);break;case 4:$2e(f,p,d,c,l);break;default:throw new Error(`Unsupported filter: ${r[h]}`)}d=p,h+=c+1}if(o===16){const m=new Uint16Array(u.buffer);if(o6t)for(let A=0;A<m.length;A++)m[A]=c6t(m[A]);return m}else return u}function c6t(e){return(e&255)<<8|e>>8&255}const Ik=Uint8Array.of(137,80,78,71,13,10,26,10);function fie(e){if(!u6t(e.readBytes(Ik.length)))throw new Error("wrong PNG signature")}function u6t(e){if(e.length<Ik.length)return!1;for(let r=0;r<Ik.length;r++)if(e[r]!==Ik[r])return!1;return!0}const d6t="tEXt",h6t=0,Q2e=new TextDecoder("latin1");function f6t(e){if(p6t(e),e.length===0||e.length>79)throw new Error("keyword length must be between 1 and 79")}const m6t=/^[\u0000-\u00FF]*$/;function p6t(e){if(!m6t.test(e))throw new Error("invalid latin1 text")}function A6t(e,r,n){const i=H2e(r);e[i]=g6t(r,n-i.length-1)}function H2e(e){for(e.mark();e.readByte()!==h6t;);const r=e.offset;e.reset();const n=Q2e.decode(e.readBytes(r-e.offset-1));return e.skip(1),f6t(n),n}function g6t(e,r){return Q2e.decode(e.readBytes(r))}const _l={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},RO={UNKNOWN:-1,DEFLATE:0},mie={UNKNOWN:-1,ADAPTIVE:0},DO={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},DS={NONE:0,BACKGROUND:1,PREVIOUS:2},MO={SOURCE:0,OVER:1};class x6t extends fH{constructor(n,i={}){super(n);tr(this,"_checkCrc");tr(this,"_inflator");tr(this,"_png");tr(this,"_apng");tr(this,"_end");tr(this,"_hasPalette");tr(this,"_palette");tr(this,"_hasTransparency");tr(this,"_transparency");tr(this,"_compressionMethod");tr(this,"_filterMethod");tr(this,"_interlaceMethod");tr(this,"_colorType");tr(this,"_isAnimated");tr(this,"_numberOfFrames");tr(this,"_numberOfPlays");tr(this,"_frames");tr(this,"_writingDataChunks");const{checkCrc:a=!1}=i;this._checkCrc=a,this._inflator=new cie,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=RO.UNKNOWN,this._filterMethod=mie.UNKNOWN,this._interlaceMethod=DO.UNKNOWN,this._colorType=_l.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(fie(this);!this._end;){const n=this.readUint32(),i=this.readChars(4);this.decodeChunk(n,i)}return this.decodeImage(),this._png}decodeApng(){for(fie(this);!this._end;){const n=this.readUint32(),i=this.readChars(4);this.decodeApngChunk(n,i)}return this.decodeApngImage(),this._apng}decodeChunk(n,i){const a=this.offset;switch(i){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case d6t:A6t(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-a!==n)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?die(this,n+4,i):this.skip(4)}decodeApngChunk(n,i){const a=this.offset;switch(i!=="fdAT"&&i!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),i){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,i),this.offset=a+n;break}if(this.offset-a!==n)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?die(this,n+4,i):this.skip(4)}decodeIHDR(){const n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=y6t(this.readUint8());const i=this.readUint8();this._colorType=i;let a;switch(i){case _l.GREYSCALE:a=1;break;case _l.TRUECOLOUR:a=3;break;case _l.INDEXED_COLOUR:a=1;break;case _l.GREYSCALE_ALPHA:a=2;break;case _l.TRUECOLOUR_ALPHA:a=4;break;case _l.UNKNOWN:default:throw new Error(`Unknown color type: ${i}`)}if(this._png.channels=a,this._compressionMethod=this.readUint8(),this._compressionMethod!==RO.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const n={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);const i=n/3;this._hasPalette=!0;const a=[];this._palette=a;for(let o=0;o<i;o++)a.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(n){this._writingDataChunks=!0;const i=n,a=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,a,i)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodeFDAT(n){this._writingDataChunks=!0;let i=n,a=this.offset+this.byteOffset;if(a+=4,i-=4,this._inflator.push(new Uint8Array(this.buffer,a,i)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodetRNS(n){switch(this._colorType){case _l.GREYSCALE:case _l.TRUECOLOUR:{if(n%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${n}`);if(n/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let i=0;i<n/2;i++)this._transparency[i]=this.readUint16();break}case _l.INDEXED_COLOUR:{if(n>this._palette.length)throw new Error(`tRNS chunk contains more alph
3234a values than there are palette colors (${n} vs ${this._palette.length})`);let i=0;for(;i<n;i++){const a=this.readByte();this._palette[i].push(a)}for(;i<this._palette.length;i++)this._palette[i].push(255);break}case _l.UNKNOWN:case _l.GREYSCALE_ALPHA:case _l.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(n){const i=H2e(this),a=this.readUint8();if(a!==RO.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${a}`);const o=this.readBytes(n-i.length-2);this._png.iccEmbeddedProfile={name:i,profile:Gzt(o)}}decodepHYs(){const n=this.readUint32(),i=this.readUint32(),a=this.readByte();this._png.resolution={x:n,y:i,unit:a}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let n=0;n<this._numberOfFrames;n++){const i={sequenceNumber:this._frames[n].sequenceNumber,delayNumber:this._frames[n].delayNumber,delayDenominator:this._frames[n].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},a=this._frames.at(n);if(a){if(a.data=hie({data:a.data,width:a.width,height:a.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),n===0||a.xOffset===0&&a.yOffset===0&&a.width===this._png.width&&a.height===this._png.height)i.data=a.data;else{const o=this._apng.frames.at(n-1);this.disposeFrame(a,o,i),this.addFrameDataToCanvas(i,a)}this._apng.frames.push(i)}}return this._apng}disposeFrame(n,i,a){switch(n.disposeOp){case DS.NONE:break;case DS.BACKGROUND:for(let o=0;o<this._png.height;o++)for(let l=0;l<this._png.width;l++){const c=(o*n.width+l)*this._png.channels;for(let u=0;u<this._png.channels;u++)a.data[c+u]=0}break;case DS.PREVIOUS:a.data.set(i.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(n,i){const a=1<<this._png.depth,o=(l,c)=>{const u=((l+i.yOffset)*this._png.width+i.xOffset+c)*this._png.channels,d=(l*i.width+c)*this._png.channels;return{index:u,frameIndex:d}};switch(i.blendOp){case MO.SOURCE:for(let l=0;l<i.height;l++)for(let c=0;c<i.width;c++){const{index:u,frameIndex:d}=o(l,c);for(let h=0;h<this._png.channels;h++)n.data[u+h]=i.data[d+h]}break;case MO.OVER:for(let l=0;l<i.height;l++)for(let c=0;c<i.width;c++){const{index:u,frameIndex:d}=o(l,c);for(let h=0;h<this._png.channels;h++){const f=i.data[d+this._png.channels-1]/a,p=h%(this._png.channels-1)===0?1:i.data[d+h],m=Math.floor(f*p+(1-f)*n.data[u+h]);n.data[u+h]+=m}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var i;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const n=this._isAnimated?((i=this._frames)==null?void 0:i.at(0)).data:this._inflator.result;if(this._filterMethod!==mie.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===DO.NO_INTERLACE)this._png.data=hie({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===DO.ADAM7)this._png.data=n6t({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const n=this._inflator.result,i=this._frames.at(-1);i?i.data=n:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:DS.NONE,blendOp:MO.SOURCE,data:n}),this._inflator=new cie,this._writingDataChunks=!1}}function y6t(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw new Error(`invalid bit depth: ${e}`);return e}var pie;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"})(pie||(pie={}));function v6t(e,r){return new x6t(e,r).decode()}var Cr=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function zO(){Cr.console&&typeof Cr.console.log=="function"&&Cr.console.log.apply(Cr.console,arguments)}var ti={log:zO,warn:function(e){Cr.console&&(typeof Cr.console.warn=="function"?Cr.console.warn.apply(Cr.console,arguments):zO.call(null,arguments))},error:function(e){Cr.console&&(typeof Cr.console.error=="function"?Cr.console.error.apply(Cr.console,arguments):zO(e))}};function UO(e,r,n){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){gA(i.response,r,n)},i.onerror=function(){ti.error("could not download file")},i.send()}function Aie(e){var r=new XMLHttpRequest;r.open("HEAD",e,!1);try{r.send()}catch{}return r.status>=200&&r.status<=299}function MS(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var r=document.createEvent("MouseEvents");
vendor: 3,410 bytes, lines 3234-3239
3234r.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(r)}}var gA=Cr.saveAs||((typeof window>"u"?"undefined":$n(window))!=="object"||window!==Cr?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,r,n){var i=Cr.URL||Cr.webkitURL,a=document.createElement("a");r=r||e.name||"download",a.download=r,a.rel="noopener",typeof e=="string"?(a.href=e,a.origin!==location.origin?Aie(a.href)?UO(e,r,n):MS(a,a.target="_blank"):MS(a)):(a.href=i.createObjectURL(e),setTimeout(function(){i.revokeObjectURL(a.href)},4e4),setTimeout(function(){MS(a)},0))}:"msSaveOrOpenBlob"in navigator?function(e,r,n){if(r=r||e.name||"download",typeof e=="string")if(Aie(e))UO(e,r,n);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout(function(){MS(i)})}else navigator.msSaveOrOpenBlob(function(a,o){return o===void 0?o={autoBom:!1}:$n(o)!=="object"&&(ti.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}(e,n),r)}:function(e,r,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof e=="string")return UO(e,r,n);var a=e.type==="application/octet-stream",o=/constructor/i.test(Cr.HTMLElement)||Cr.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&o)&&(typeof FileReader>"u"?"undefined":$n(FileReader))==="object"){var c=new FileReader;c.onloadend=function(){var h=c.result;h=l?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=h:location=h,i=null},c.readAsDataURL(e)}else{var u=Cr.URL||Cr.webkitURL,d=u.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout(function(){u.revokeObjectURL(d)},4e4)}});/**
3235 * A class to parse color values
3236 * @author Stoyan Stefanov <[email protected]>
3237 * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
3238 * @license Use it if you like it
3239 */function V2e(e){var r;e=e||"",this.ok=!1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee9
32390",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(c){return[parseInt(c[1]),parseInt(c[2]),parseInt(c[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(c){return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(c){return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]}}],i=0;i<n.length;i++){var a=n[i].re,o=n[i].process,l=a.exec(e);l&&(r=o(l),this.r=r[0],this.g=r[1],this.b=r[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var c=this.r.toString(16),u=this.g.toString(16),d=this.b.toString(16);return c.length==1&&(c="0"+c),u.length==1&&(u="0"+u),d.length==1&&(d="0"+d),"#"+c+u+d}}var Fk=Cr.atob.bind(Cr),gie=Cr.btoa.bind(Cr);/**
3240 * @license
3241 * Joseph Myers does not specify a particular license for his work.
3242 *
3243 * Author: Joseph Myers
3244 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
3245 *
3246 * Modified by: Owen Leong
3247 */function $O(e,r){var n=e[0],i=e[1],a=e[2],o=e[3];n=Ws(n,i,a,o,r[0],7,-680876936),o=Ws(o,n,i,a,r[1],12,-389564586),a=Ws(a,o,n,i,r[2],17,606105819),i=Ws(i,a,o,n,r[3],22,-1044525330),n=Ws(n,i,a,o,r[4],7,-176418897),o=Ws(o,n,i,a,r[5],12,1200080426),a=Ws(a,o,n,i,r[6],17,-1473231341),i=Ws(i,a,o,n,r[7],22,-45705983),n=Ws(n,i,a,o,r[8],7,1770035416),o=Ws(o,n,i,a,r[9],12,-1958414417),a=Ws(a,o,n,i,r[10],17,-42063),i=Ws(i,a,o,n,r[11],22,-1990404162),n=Ws(n,i,a,o,r[12],7,1804603682),o=Ws(o,n,i,a,r[13],12,-40341101),a=Ws(a,o,n,i,r[14],17,-1502002290),n=qs(n,i=Ws(i,a,o,n,r[15],22,1236535329),a,o,r[1],5,-165796510),o=qs(o,n,i,a,r[6],9,-1069501632),a=qs(a,o,n,i,r[11],14,643717713),i=qs(i,a,o,n,r[0],20,-373897302),n=qs(n,i,a,o,r[5],5,-701558691),o=qs(o,n,i,a,r[10],9,38016083),a=qs(a,o,n,i,r[15],14,-660478335),i=qs(i,a,o,n,r[4],20,-405537848),n=qs(n,i,a,o,r[9],5,568446438),o=qs(o,n,i,a,r[14],9,-1019803690),a=qs(a,o,n,i,r[3],14,-187363961),i=qs(i,a,o,n,r[8],20,1163531501),n=qs(n,i,a,o,r[13],5,-1444681467),o=qs(o,n,i,a,r[2],9,-51403784),a=qs(a,o,n,i,r[7],14,1735328473),n=Ks(n,i=qs(i,a,o,n,r[12],20,-1926607734),a,o,r[5],4,-378558),o=Ks(o,n,i,a,r[8],11,-2022574463),a=Ks(a,o,n,i,r[11],16,1839030562),i=Ks(i,a,o,n,r[14],23,-35309556),n=Ks(n,i,a,o,r[1],4,-1530992060),o=Ks(o,n,i,a,r[4],11,1272893353),a=Ks(a,o,n,i,r[7],16,-155497632),i=Ks(i,a,o,n,r[10],23,-1094730640),n=Ks(n,i,a,o,r[13],4,681279174),o=Ks(o,n,i,a,r[0],11,-358537222),a=Ks(a,o,n,i,r[3],16,-722521979),i=Ks(i,a,o,n,r[6],23,76029189),n=Ks(n,i,a,o,r[9],4,-640364487),o=Ks(o,n,i,a,r[12],11,-421815835),a=Ks(a,o,n,i,r[15],16,530742520),n=Gs(n,i=Ks(i,a,o,n,r[2],23,-995338651),a,o,r[0],6,-198630844),o=Gs(o,n,i,a,r[7],10,1126891415),a=Gs(a,o,n,i,r[14],15,-1416354905),i=Gs(i,a,o,n,r[5],21,-57434055),n=Gs(n,i,a,o,r[12],6,1700485571),o=Gs(o,n,i,a,r[3],10,-1894986606),a=Gs(a,o,n,i,r[10],15,-1051523),i=Gs(i,a,o,n,r[1],21,-2054922799),n=Gs(n,i,a,o,r[8],6,1873313359),o=Gs(o,n,i,a,r[15],10,-30611744),a=Gs(a,o,n,i,r[6],15,-1560198380),i=Gs(i,a,o,n,r[13],21,1309151649),n=Gs(n,i,a,o,r[4],6,-145523070),o=Gs(o,n,i,a,r[11],10,-1120210379),a=Gs(a,o,n,i,r[2],15,718787259),i=Gs(i,a,o,n,r[9],21,-343485551),e[0]=Mm(n,e[0]),e[1]=Mm(i,e[1]),e[2]=Mm(a,e[2]),e[3]=Mm(o,e[3])}function L3(e,r,n,i,a,o){return r=Mm(Mm(r,e),Mm(i,o)),Mm(r<<a|r>>>32-a,n)}function Ws(e,r,n,i,a,o,l){return L3(r&n|~r&i,e,r,a,o,l)}function qs(e,r,n,i,a,o,l){return L3(r&i|n&~i,e,r,a,o,l)}function Ks(e,r,n,i,a,o,l){return L3(r^n^i,e,r,a,o,l)}function Gs(e,r,n,i,a,o,l){return L3(n^(r|~i),e,r,a,o,l)}function W2e(e){var r,n=e.length,i=[1732584193,-271733879,-1732584194,271733878];for(r=64;r<=e.length;r+=64)$O(i,b6t(e.substring(r-64,r)));e=e.substring(r-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(r=0;r<e.length;r++)a[r>>2]|=e.charCodeAt(r)<<(r%4<<3);if(a[r>>2]|=128<<(r%4<<3),r>55)for($O(i,a),r=0;r<16;r++)a[r]=0;return a[14]=8*n,$O(i,a),i}function b6t(e){var r,n=[];for(r=0;r<64;r+=4)n[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return n}var xie="0123456789abcdef".split("");function w6t(e){for(var r="",n=0;n<4;n++)r+=xie[e>>8*n+4&15]+xie[e>>8*n&15];return r}function j6t(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function E6(e){return W2e(e).map(j6t).join("")}var _6t=function(e){for(var r=0;r<e.length;r++)e[r]=w6t(e[r]);return e.join("")}(W2e("hello"))!="5d41402abc4b2a76b9719d911017c592";function Mm(e,r){if(_6t){var n=(65535&e)+(65535&r);return(e>>16)+(r>>16)+(n>>16)<<16|65535&n}return e+r&4294967295}/**
3248 * @license
3249 * FPDF is released under a permissive license: there is no usage restriction.
3250 * You may embed it freely in your application (commercial or not), with or
3251 * without modifications.
3252 *
3253 * Reference: http://www.fpdf.org/en/script/script37.php
3254 */function B6(e,r){var n,i,a,o;if(e!==n){for(var l=(a=e,o=1+(256/e.length|0),new Array(o+1).join(a)),c=[],u=0;u<256;u++)c[u]=u;var d=0;for(u=0;
vendor: 5,786 bytes, lines 3254-3264
3254u<256;u++){var h=c[u];d=(d+h+l.charCodeAt(u))%256,c[u]=c[d],c[d]=h}n=e,i=c}else c=i;var f=r.length,p=0,m=0,A="";for(u=0;u<f;u++)m=(m+(h=c[p=(p+1)%256]))%256,c[p]=c[m],c[m]=h,l=c[(c[p]+c[m])%256],A+=String.fromCharCode(r.charCodeAt(u)^l);return A}/**
3255 * @license
3256 * Licensed under the MIT License.
3257 * http://opensource.org/licenses/mit-license
3258 * Author: Owen Leong (@owenl131)
3259 * Date: 15 Oct 2020
3260 * References:
3261 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
3262 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
3263 * http://www.fpdf.org/en/script/script37.php
3264 */var yie={print:4,modify:8,copy:16,"annot-forms":32};function cy(e,r,n,i){this.v=1,this.r=2;var a=192;e.forEach(function(c){if(yie.perm!==void 0)throw new Error("Invalid permission: "+c);a+=yie[c]}),this.padding="(¿N^NuŠAd\0NVÿú�\b..\0¶Ðh>€/\f©þdSiz";var o=(r+this.padding).substr(0,32),l=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,l),this.P=-(1+(255^a)),this.encryptionKey=E6(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=B6(this.encryptionKey,this.padding)}function uy(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var r="",n=e.length,i=0;i<n;i++){var a=e.charCodeAt(i);r+=a<33||a===35||a===37||a===40||a===41||a===47||a===60||a===62||a===91||a===93||a===123||a===125||a>126?"#"+("0"+a.toString(16)).slice(-2):e[i]}return r}function vie(e){if($n(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var r={};this.subscribe=function(n,i,a){if(a=a||!1,typeof n!="string"||typeof i!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");r.hasOwnProperty(n)||(r[n]={});var o=Math.random().toString(35);return r[n][o]=[i,!!a],o},this.unsubscribe=function(n){for(var i in r)if(r[i][n])return delete r[i][n],Object.keys(r[i]).length===0&&delete r[i],!0;return!1},this.publish=function(n){if(r.hasOwnProperty(n)){var i=Array.prototype.slice.call(arguments,1),a=[];for(var o in r[n]){var l=r[n][o];try{l[0].apply(e,i)}catch(c){Cr.console&&ti.error("jsPDF PubSub Error",c.message,c)}l[1]&&a.push(o)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return r}}function OB(e){if(!(this instanceof OB))return new OB(e);var r="opacity,stroke-opacity".split(",");for(var n in e)e.hasOwnProperty(n)&&r.indexOf(n)>=0&&(this[n]=e[n]);this.id="",this.objectNumber=-1}function q2e(e,r){this.gState=e,this.matrix=r,this.id="",this.objectNumber=-1}function wA(e,r,n,i,a){if(!(this instanceof wA))return new wA(e,r,n,i,a);this.type=e==="axial"?2:3,this.coords=r,this.colors=n,q2e.call(this,i,a)}function Dy(e,r,n,i,a){if(!(this instanceof Dy))return new Dy(e,r,n,i,a);this.boundingBox=e,this.xStep=r,this.yStep=n,this.stream="",this.cloneIndex=0,q2e.call(this,i,a)}function sr(e){var r,n=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],a=arguments[2],o=arguments[3],l=[],c=1,u=16,d="S",h=null;$n(e=e||{})==="object"&&(n=e.orientation,i=e.unit||i,a=e.format||a,o=e.compress||e.compressPdf||o,(h=e.encryption||null)!==null&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),c=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(r=e.precision),e.floatPrecision!==void 0&&(u=e.floatPrecision),d=e.defaultPathOperation||"S"),l=e.filters||(o===!0?["FlateEncode"]:l),i=i||"mm",n=(""+(n||"P")).toLowerCase();var f=e.putOnlyUsedFonts||!1,p={},m={internal:{},__private__:{}};m.__private__.PubSub=vie;var A="1.3",g=m.__private__.getPdfVersion=function(){return A};m.__private__.setPdfVersion=function(R){A=R};var y={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};m.__private__.getPageFormats=function(){return y};var x=m.__private__.getPageFormat=function(R){return y[R]};a=a||"a4";var b="compat",v="advanced",j=b;function _(){this.saveGraphicsState(),te(new pt(ct,0,0,-ct,0,zp()*ct).toString()+" cm"),this.setFontSize(this.getFontSize()/ct),d="n",j=v}function C(){this.restoreGraphicsState(),d="S",j=b}var N=m.__private__.combineFontStyleAndFontWeight=function(R,Y){if(R=="bold"&&Y=="normal"||R=="bold"&&Y==400||R=="normal"&&Y=="italic"||R=="bold"&&Y=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return Y&&(R=Y==400||Y==="normal"?R==="italic"?"italic":"normal":Y!=700&&Y!=="bold"||R!=="normal"?(Y==700?"bold":Y)+""+R:"bold"),R};m.advancedAPI=function(R){var Y=j===b;return Y&&_.call(this),typeof R!="function"||(R(this),Y&&C.call(this)),this},m.compatAPI=function(R){var Y=j===v;return Y&&C.call(this),typeof R!="function"||(R(this),Y&&_.call(this)),this},m.isAdvancedAPI=function(){return j===v};var S,E=function(R){if(j!==v)throw new Error(R+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},O=m.roundToPrecision=m.__private__.roundToPrecision=function(R,Y){var fe=r||Y;if(isNaN(R)||isNaN(fe))throw new Error("Invalid argument passed to 
3264jsPDF.roundToPrecision");return R.toFixed(fe).replace(/0+$/,"")};S=m.hpf=m.__private__.hpf=typeof u=="number"?function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.hpf");return O(R,u)}:u==="smart"?function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.hpf");return O(R,R>-1&&R<1?16:5)}:function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.hpf");return O(R,16)};var B=m.f2=m.__private__.f2=function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.f2");return O(R,2)},T=m.__private__.f3=function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.f3");return O(R,3)},F=m.scale=m.__private__.scale=function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.scale");return j===b?R*ct:j===v?R:void 0},I=function(R){return F(function(Y){return j===b?zp()-Y:j===v?Y:void 0}(R))};m.__private__.setPrecision=m.setPrecision=function(R){typeof parseInt(R,10)=="number"&&(r=parseInt(R,10))};var D,L="00000000000000000000000000000000",V=m.__private__.getFileId=function(){return L},U=m.__private__.setFileId=function(R){return L=R!==void 0&&/^[a-fA-F0-9]{32}$/.test(R)?R.toUpperCase():L.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),h!==null&&(xs=new cy(h.userPermissions,h.userPassword,h.ownerPassword,L)),L};m.setFileId=function(R){return U(R),this},m.getFileId=function(){return V()};var Q=m.__private__.convertDateToPDFDate=function(R){var Y=R.getTimezoneOffset(),fe=Y<0?"+":"-",Ce=Math.floor(Math.abs(Y/60)),Fe=Math.abs(Y%60),Ye=[fe,K(Ce),"'",K(Fe),"'"].join("");return["D:",R.getFullYear(),K(R.getMonth()+1),K(R.getDate()),K(R.getHours()),K(R.getMinutes()),K(R.getSeconds()),Ye].join("")},$=m.__private__.convertPDFDateToDate=function(R){var Y=parseInt(R.substr(2,4),10),fe=parseInt(R.substr(6,2),10)-1,Ce=parseInt(R.substr(8,2),10),Fe=parseInt(R.substr(10,2),10),Ye=parseInt(R.substr(12,2),10),lt=parseInt(R.substr(14,2),10);return new Date(Y,fe,Ce,Fe,Ye,lt,0)},q=m.__private__.setCreationDate=function(R){var Y;if(R===void 0&&(R=new Date),R instanceof Date)Y=Q(R);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(R))throw new Error("Invalid argument passed to jsPDF.setCreationDate");Y=R}return D=Y},M=m.__private__.getCreationDate=function(R){var Y=D;return R==="jsDate"&&(Y=$(D)),Y};m.setCreationDate=function(R){return q(R),this},m.getCreationDate=function(R){return M(R)};var z,K=m.__private__.padd2=function(R){return("0"+parseInt(R)).slice(-2)},ne=m.__private__.padd2Hex=function(R){return("00"+(R=R.toString())).substr(R.length)},ie=0,X=[],de=[],oe=0,ce=[],ye=[],ge=!1,Be=de;m.__private__.setCustomOutputDestination=function(R){ge=!0,Be=R};var Ve=function(R){ge||(Be=R)};m.__private__.resetCustomOutputDestination=function(){ge=!1,Be=de};var te=m.__private__.out=function(R){return R=R.toString(),oe+=R.length+1,Be.push(R),Be},xe=m.__private__.write=function(R){return te(arguments.length===1?R.toString():Array.prototype.join.call(arguments," "))},We=m.__private__.getArrayBuffer=function(R){for(var Y=R.length,fe=new ArrayBuffer(Y),Ce=new Uint8Array(fe);Y--;)Ce[Y]=R.charCodeAt(Y);return fe},ze=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];m.__private__.getStandardFonts=function(){return ze};var we=e.fontSize||16;m.__private__.setFontSize=m.setFontSize=function(R){return we=j===v?R/ct:R,this};var J,he=m.__private__.getFontSize=m.getFontSize=function(){return j===b?we:we*ct},je=e.R2L||!1;m.__private__.setR2L=m.setR2L=function(R){return je=R,this},m.__private__.getR2L=m.getR2L=function(){return je};var ve,Pe=m.__private__.setZoomMode=function(R){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(R))J=R;else if(isNaN(R)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(R)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+R+'" is not recognized.');J=R}else J=parseInt(R,10)};m.__private__.getZoomMode=function(){return J};var Ie,ue=m.__private__.setPageMode=function(R){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(R)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+R+'" is not recognized.');ve=R};m.__private__.getPageMode=function(){return ve};var Se=m.__private__.setLayoutMode=function(R){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(R)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+R+'" is not recognized.');Ie=R};m.__private__.getLayoutMode=function(){return Ie},m.__private__.setDisplayMode=m.setDisplayMode=function(R,Y,fe){return Pe(R),Se(Y),ue(fe),this};var He={title:"",subject:"",author:"",keywords:"",creator:""};m.__private__.getDocumentProperty=function(R){if(Object.keys(He).indexOf(R)===-1)throw new Error("Invalid argument passed to 
3264jsPDF.getDocumentProperty");return He[R]},m.__private__.getDocumentProperties=function(){return He},m.__private__.setDocumentProperties=m.setProperties=m.setDocumentProperties=function(R){for(var Y in He)He.hasOwnProperty(Y)&&R[Y]&&(He[Y]=R[Y]);return this},m.__private__.setDocumentProperty=function(R,Y){if(Object.keys(He).indexOf(R)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return He[R]=Y};var Qe,ct,dt,Fr,Xt,Vt={},lr={},cr=[],Bt={},kr={},ar={},ur={},kn=null,Sr=0,zt=[],an=new vie(m),nr=e.hotfixes||[],pr={},Gr={},ii=[],pt=function R(Y,fe,Ce,Fe,Ye,lt){if(!(this instanceof R))return new R(Y,fe,Ce,Fe,Ye,lt);isNaN(Y)&&(Y=1),isNaN(fe)&&(fe=0),isNaN(Ce)&&(Ce=0),isNaN(Fe)&&(Fe=1),isNaN(Ye)&&(Ye=0),isNaN(lt)&&(lt=0),this._matrix=[Y,fe,Ce,Fe,Ye,lt]};Object.defineProperty(pt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(R){this._matrix[0]=R}}),Object.defineProperty(pt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(R){this._matrix[1]=R}}),Object.defineProperty(pt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(R){this._matrix[2]=R}}),Object.defineProperty(pt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(R){this._matrix[3]=R}}),Object.defineProperty(pt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(R){this._matrix[4]=R}}),Object.defineProperty(pt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(R){this._matrix[5]=R}}),Object.defineProperty(pt.prototype,"a",{get:function(){return this._matrix[0]},set:function(R){this._matrix[0]=R}}),Object.defineProperty(pt.prototype,"b",{get:function(){return this._matrix[1]},set:function(R){this._matrix[1]=R}}),Object.defineProperty(pt.prototype,"c",{get:function(){return this._matrix[2]},set:function(R){this._matrix[2]=R}}),Object.defineProperty(pt.prototype,"d",{get:function(){return this._matrix[3]},set:function(R){this._matrix[3]=R}}),Object.defineProperty(pt.prototype,"e",{get:function(){return this._matrix[4]},set:function(R){this._matrix[4]=R}}),Object.defineProperty(pt.prototype,"f",{get:function(){return this._matrix[5]},set:function(R){this._matrix[5]=R}}),Object.defineProperty(pt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(pt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(pt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(pt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),pt.prototype.join=function(R){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(S).join(R)},pt.prototype.multiply=function(R){var Y=R.sx*this.sx+R.shy*this.shx,fe=R.sx*this.shy+R.shy*this.sy,Ce=R.shx*this.sx+R.sy*this.shx,Fe=R.shx*this.shy+R.sy*this.sy,Ye=R.tx*this.sx+R.ty*this.shx+this.tx,lt=R.tx*this.shy+R.ty*this.sy+this.ty;return new pt(Y,fe,Ce,Fe,Ye,lt)},pt.prototype.decompose=function(){var R=this.sx,Y=this.shy,fe=this.shx,Ce=this.sy,Fe=this.tx,Ye=this.ty,lt=Math.sqrt(R*R+Y*Y),qt=(R/=lt)*fe+(Y/=lt)*Ce;fe-=R*qt,Ce-=Y*qt;var Wt=Math.sqrt(fe*fe+Ce*Ce);return qt/=Wt,R*(Ce/=Wt)<Y*(fe/=Wt)&&(R=-R,Y=-Y,qt=-qt,lt=-lt),{scale:new pt(lt,0,0,Wt,0,0),translate:new pt(1,0,0,1,Fe,Ye),rotate:new pt(R,Y,-Y,R,0,0),skew:new pt(1,0,qt,1,0,0)}},pt.prototype.toString=function(R){return this.join(" ")},pt.prototype.inversed=function(){var R=this.sx,Y=this.shy,fe=this.shx,Ce=this.sy,Fe=this.tx,Ye=this.ty,lt=1/(R*Ce-Y*fe),qt=Ce*lt,Wt=-Y*lt,Er=-fe*lt,Or=R*lt;return new pt(qt,Wt,Er,Or,-qt*Fe-Er*Ye,-Wt*Fe-Or*Ye)},pt.prototype.applyToPoint=function(R){var Y=R.x*this.sx+R.y*this.shx+this.tx,fe=R.x*this.shy+R.y*this.sy+this.ty;return new Mp(Y,fe)},pt.prototype.applyToRectangle=function(R){var Y=this.applyToPoint(R),fe=this.applyToPoint(new Mp(R.x+R.w,R.y+R.h));return new Mb(Y.x,Y.y,fe.x-Y.x,fe.y-Y.y)},pt.prototype.clone=function(){var R=this.sx,Y=this.shy,fe=this.shx,Ce=this.sy,Fe=this.tx,Ye=this.ty;return new pt(R,Y,fe,Ce,Fe,Ye)},m.Matrix=pt;var Di=m.matrixMult=function(R,Y){return Y.multiply(R)},ln=new pt(1,0,0,1,0,0);m.unitMatrix=m.identityMatrix=ln;var Yn=function(R,Y){if(!kr[R]){var fe=(Y instanceof wA?"Sh":"P")+(Object.keys(Bt).length+1).toString(10);Y.id=fe,kr[R]=fe,Bt[fe]=Y,an.publish("addPattern",Y)}};m.ShadingPattern=wA,m.TilingPattern=Dy,m.addShadingPattern=function(R,Y){return E("addShadingPattern()"),Yn(R,Y),this},m.beginTilingPattern=function(R){E("beginTilingPattern()"),zb(R.boundingBox[0],R.boundingBox[1],R.boundingBox[2]-R.boundingBox[0],R.boundingBox[3]-R.boundingBox[1],R.matrix
vendor: 14,486 bytes, lines 3264-3268
3264)},m.endTilingPattern=function(R,Y){E("endTilingPattern()"),Y.stream=ye[z].join(`
3265`),Yn(R,Y),an.publish("endTilingPattern",Y),ii.pop().restore()};var Ai,gi=m.__private__.newObject=function(){var R=Xi();return Yi(R,!0),R},Xi=m.__private__.newObjectDeferred=function(){return ie++,X[ie]=function(){return oe},ie},Yi=function(R,Y){return Y=typeof Y=="boolean"&&Y,X[R]=oe,Y&&te(R+" 0 obj"),R},Vr=m.__private__.newAdditionalObject=function(){var R={objId:Xi(),content:""};return ce.push(R),R},Br=Xi(),xi=Xi(),La=m.__private__.decodeColorString=function(R){var Y=R.split(" ");if(Y.length!==2||Y[1]!=="g"&&Y[1]!=="G")Y.length!==5||Y[4]!=="k"&&Y[4]!=="K"||(Y=[(1-Y[0])*(1-Y[3]),(1-Y[1])*(1-Y[3]),(1-Y[2])*(1-Y[3]),"r"]);else{var fe=parseFloat(Y[0]);Y=[fe,fe,fe,"r"]}for(var Ce="#",Fe=0;Fe<3;Fe++)Ce+=("0"+Math.floor(255*parseFloat(Y[Fe])).toString(16)).slice(-2);return Ce},Ee=m.__private__.encodeColorString=function(R){var Y;typeof R=="string"&&(R={ch1:R});var fe=R.ch1,Ce=R.ch2,Fe=R.ch3,Ye=R.ch4,lt=R.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof fe=="string"&&fe.charAt(0)!=="#"){var qt=new V2e(fe);if(qt.ok)fe=qt.toHex();else if(!/^\d*\.?\d*$/.test(fe))throw new Error('Invalid color "'+fe+'" passed to jsPDF.encodeColorString.')}if(typeof fe=="string"&&/^#[0-9A-Fa-f]{3}$/.test(fe)&&(fe="#"+fe[1]+fe[1]+fe[2]+fe[2]+fe[3]+fe[3]),typeof fe=="string"&&/^#[0-9A-Fa-f]{6}$/.test(fe)){var Wt=parseInt(fe.substr(1),16);fe=Wt>>16&255,Ce=Wt>>8&255,Fe=255&Wt}if(Ce===void 0||Ye===void 0&&fe===Ce&&Ce===Fe)Y=typeof fe=="string"?fe+" "+lt[0]:R.precision===2?B(fe/255)+" "+lt[0]:T(fe/255)+" "+lt[0];else if(Ye===void 0||$n(Ye)==="object"){if(Ye&&!isNaN(Ye.a)&&Ye.a===0)return["1.","1.","1.",lt[1]].join(" ");Y=typeof fe=="string"?[fe,Ce,Fe,lt[1]].join(" "):R.precision===2?[B(fe/255),B(Ce/255),B(Fe/255),lt[1]].join(" "):[T(fe/255),T(Ce/255),T(Fe/255),lt[1]].join(" ")}else Y=typeof fe=="string"?[fe,Ce,Fe,Ye,lt[2]].join(" "):R.precision===2?[B(fe),B(Ce),B(Fe),B(Ye),lt[2]].join(" "):[T(fe),T(Ce),T(Fe),T(Ye),lt[2]].join(" ");return Y},nt=m.__private__.getFilters=function(){return l},gt=m.__private__.putStream=function(R){var Y=(R=R||{}).data||"",fe=R.filters||nt(),Ce=R.alreadyAppliedFilters||[],Fe=R.addLength1||!1,Ye=Y.length,lt=R.objectId,qt=function(yi){return yi};if(h!==null&&lt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");h!==null&&(qt=xs.encryptor(lt,0));var Wt={};fe===!0&&(fe=["FlateEncode"]);var Er=R.additionalKeyValues||[],Or=(Wt=sr.API.processDataByFilters!==void 0?sr.API.processDataByFilters(Y,fe):{data:Y,reverseChain:[]}).reverseChain+(Array.isArray(Ce)?Ce.join(" "):Ce.toString());if(Wt.data.length!==0&&(Er.push({key:"Length",value:Wt.data.length}),Fe===!0&&Er.push({key:"Length1",value:Ye})),Or.length!=0)if(Or.split("/").length-1==1)Er.push({key:"Filter",value:Or});else{Er.push({key:"Filter",value:"["+Or+"]"});for(var mn=0;mn<Er.length;mn+=1)if(Er[mn].key==="DecodeParms"){for(var ba=[],Jn=0;Jn<Wt.reverseChain.split("/").length-1;Jn+=1)ba.push("null");ba.push(Er[mn].value),Er[mn].value="["+ba.join(" ")+"]"}}te("<<");for(var Kn=0;Kn<Er.length;Kn++)te("/"+Er[Kn].key+" "+Er[Kn].value);te(">>"),Wt.data.length!==0&&(te("stream"),te(qt(Wt.data)),te("endstream"))},wt=m.__private__.putPage=function(R){var Y=R.number,fe=R.data,Ce=R.objId,Fe=R.contentsObjId;Yi(Ce,!0),te("<</Type /Page"),te("/Parent "+R.rootDictionaryObjId+" 0 R"),te("/Resources "+R.resourceDictionaryObjId+" 0 R"),te("/MediaBox ["+parseFloat(S(R.mediaBox.bottomLeftX))+" "+parseFloat(S(R.mediaBox.bottomLeftY))+" "+S(R.mediaBox.topRightX)+" "+S(R.mediaBox.topRightY)+"]"),R.cropBox!==null&&te("/CropBox ["+S(R.cropBox.bottomLeftX)+" "+S(R.cropBox.bottomLeftY)+" "+S(R.cropBox.topRightX)+" "+S(R.cropBox.topRightY)+"]"),R.bleedBox!==null&&te("/BleedBox ["+S(R.bleedBox.bottomLeftX)+" "+S(R.bleedBox.bottomLeftY)+" "+S(R.bleedBox.topRightX)+" "+S(R.bleedBox.topRightY)+"]"),R.trimBox!==null&&te("/TrimBox ["+S(R.trimBox.bottomLeftX)+" "+S(R.trimBox.bottomLeftY)+" "+S(R.trimBox.topRightX)+" "+S(R.trimBox.topRightY)+"]"),R.artBox!==null&&te("/ArtBox ["+S(R.artBox.bottomLeftX)+" "+S(R.artBox.bottomLeftY)+" "+S(R.artBox.topRightX)+" "+S(R.artBox.topRightY)+"]"),typeof R.userUnit=="number"&&R.userUnit!==1&&te("/UserUnit "+R.userUnit),an.publish("putPage",{objId:Ce,pageContext:zt[Y],pageNumber:Y,page:fe}),te("/Contents "+Fe+" 0 R"),te(">>"),te("endobj");var Ye=fe.join(`
3266`);return j===v&&(Ye+=`
3267Q`),Yi(Fe,!0),gt({data:Ye,filters:nt(),objectId:Fe}),te("endobj"),Ce},dr=m.__private__.putPages=function(){var R,Y,fe=[];for(R=1;R<=Sr;R++)zt[R].objId=Xi(),zt[R].contentsObjId=Xi();for(R=1;R<=Sr;R++)fe.push(wt({number:R,data:ye[R],objId:zt[R].objId,contentsObjId:zt[R].contentsObjId,mediaBox:zt[R].mediaBox,cropBox:zt[R].cropBox,bleedBox:zt[R].bleedBox,trimBox:zt[R].trimBox,artBox:zt[R].artBox,userUnit:zt[R].userUnit,rootDictionaryObjId:Br,resourceDictionaryObjId:xi}));Yi(Br,!0),te("<</Type /Pages");var Ce="/Kids [";for(Y=0;Y<Sr;Y++)Ce+=fe[Y]+" 0 R ";te(Ce+"]"),te("/Count "+Sr),te(">>"),te("endobj"),an.publish("postPutPages")},jr=function(R){an.publish("putFont",{font:R,out:te,newObject:gi,putStream:gt}),R.isAlreadyPutted!==!0&&(R.objectNumber=gi(),te("<<"),te("/Type /Font"),te("/BaseFont /"+uy(R.postScriptName)),te("/Subtype /Type1"),typeof R.encoding=="string"&&te("/Encoding /"+R.encoding),te("/FirstChar 32"),te("/LastChar 255"),te(">>"),te("endobj"))},Ar=function(R){R.objectNumber=gi();var Y=[];Y.push({key:"Type",value:"/XObject"}),Y.push({key:"Subtype",value:"/Form"}),Y.push({key:"BBox",value:"["+[S(R.x),S(R.y),S(R.x+R.width),S(R.y+R.height)].join(" ")+"]"}),Y.push({key:"Matrix",value:"["+R.matrix.toString()+"]"});var fe=R.pages[1].join(`
3268`);gt({data:fe,additionalKeyValues:Y,objectId:R.objectNumber}),te("endobj")},Ct=function(R,Y){Y||(Y=21);var fe=gi(),Ce=function(lt,qt){var Wt,Er=[],Or=1/(qt-1);for(Wt=0;Wt<1;Wt+=Or)Er.push(Wt);if(Er.push(1),lt[0].offset!=0){var mn={offset:0,color:lt[0].color};lt.unshift(mn)}if(lt[lt.length-1].offset!=1){var ba={offset:1,color:lt[lt.length-1].color};lt.push(ba)}for(var Jn="",Kn=0,yi=0;yi<Er.length;yi++){for(Wt=Er[yi];Wt>lt[Kn+1].offset;)Kn++;var Mi=lt[Kn].offset,zi=(Wt-Mi)/(lt[Kn+1].offset-Mi),Ms=lt[Kn].color,eh=lt[Kn+1].color;Jn+=ne(Math.round((1-zi)*Ms[0]+zi*eh[0]).toString(16))+ne(Math.round((1-zi)*Ms[1]+zi*eh[1]).toString(16))+ne(Math.round((1-zi)*Ms[2]+zi*eh[2]).toString(16))}return Jn.trim()}(R.colors,Y),Fe=[];Fe.push({key:"FunctionType",value:"0"}),Fe.push({key:"Domain",value:"[0.0 1.0]"}),Fe.push({key:"Size",value:"["+Y+"]"}),Fe.push({key:"BitsPerSample",value:"8"}),Fe.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Fe.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),gt({data:Ce,additionalKeyValues:Fe,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:fe}),te("endobj"),R.objectNumber=gi(),te("<< /ShadingType "+R.type),te("/ColorSpace /DeviceRGB");var Ye="/Coords ["+S(parseFloat(R.coords[0]))+" "+S(parseFloat(R.coords[1]))+" ";R.type===2?Ye+=S(parseFloat(R.coords[2]))+" "+S(parseFloat(R.coords[3])):Ye+=S(parseFloat(R.coords[2]))+" "+S(parseFloat(R.coords[3]))+" "+S(parseFloat(R.coords[4]))+" "+S(parseFloat(R.coords[5])),te(Ye+="]"),R.matrix&&te("/Matrix ["+R.matrix.toString()+"]"),te("/Function "+fe+" 0 R"),te("/Extend [true true]"),te(">>"),te("endobj")},qn=function(R,Y){var fe=Xi(),Ce=gi();Y.push({resourcesOid:fe,objectOid:Ce}),R.objectNumber=Ce;var Fe=[];Fe.push({key:"Type",value:"/Pattern"}),Fe.push({key:"PatternType",value:"1"}),Fe.push({key:"PaintType",value:"1"}),Fe.push({key:"TilingType",value:"1"}),Fe.push({key:"BBox",value:"["+R.boundingBox.map(S).join(" ")+"]"}),Fe.push({key:"XStep",value:S(R.xStep)}),Fe.push({key:"YStep",value:S(R.yStep)}),Fe.push({key:"Resources",value:fe+" 0 R"}),R.matrix&&Fe.push({key:"Matrix",value:"["+R.matrix.toString()+"]"}),gt({data:R.stream,additionalKeyValues:Fe,objectId:R.objectNumber}),te("endobj")},pl=function(R){for(var Y in R.objectNumber=gi(),te("<<"),R)switch(Y){case"opacity":te("/ca "+B(R[Y]));break;case"stroke-opacity":te("/CA "+B(R[Y]))}te(">>"),te("endobj")},Wc=function(R){Yi(R.resourcesOid,!0),te("<<"),te("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var Y in te("/Font <<"),Vt)Vt.hasOwnProperty(Y)&&(f===!1||f===!0&&p.hasOwnProperty(Y))&&te("/"+Y+" "+Vt[Y].objectNumber+" 0 R");te(">>")}(),function(){if(Object.keys(Bt).length>0){for(var Y in te("/Shading <<"),Bt)Bt.hasOwnProperty(Y)&&Bt[Y]instanceof wA&&Bt[Y].objectNumber>=0&&te("/"+Y+" "+Bt[Y].objectNumber+" 0 R");an.publish("putShadingPatternDict"),te(">>")}}(),function(Y){if(Object.keys(Bt).length>0){for(var fe in te("/Pattern <<"),Bt)Bt.hasOwnProperty(fe)&&Bt[fe]instanceof m.TilingPattern&&Bt[fe].objectNumber>=0&&Bt[fe].objectNumber<Y&&te("/"+fe+" "+Bt[fe].objectNumber+" 0 R");an.publish("putTilingPatternDict"),te(">>")}}(R.objectOid),function(){if(Object.keys(ar).length>0){var Y;for(Y in te("/ExtGState <<"),ar)ar.hasOwnProperty(Y)&&ar[Y].objectNumber>=0&&te("/"+Y+" "+ar[Y].objectNumber+" 0 R");an.publish("putGStateDict"),te(">>")}}(),function(){for(var Y in te("/XObject <<"),pr)pr.hasOwnProperty(Y)&&pr[Y].objectNumber>=0&&te("/"+Y+" "+pr[Y].objectNumber+" 0 R");an.publish("putXobjectDict"),te(">>")}(),te(">>"),te("endobj")},Ra=function(R){lr[R.fontName]=lr[R.fontName]||{},lr[R.fontName][R.fontStyle]=R.id},ix=function(R,Y,fe,Ce,Fe){var Ye={id:"F"+(Object.keys(Vt).length+1).toString(10),postScriptName:R,fontName:Y,fontStyle:fe,encoding:Ce,isStandardFont:Fe||!1,metadata:{}};return an.publish("addFont",{font:Ye,instance:this}),Vt[Ye.id]=Ye,Ra(Ye),Ye.id},tc=m.__private__.pdfEscape=m.pdfEscape=function(R,Y){return function(fe,Ce){var Fe,Ye,lt,qt,Wt,Er,Or,mn,ba;if(lt=(Ce=Ce||{}).sourceEncoding||"Unicode",Wt=Ce.outputEncoding,(Ce.autoencode||Wt)&&Vt[Qe].metadata&&Vt[Qe].metadata[lt]&&Vt[Qe].metadata[lt].encoding&&(qt=Vt[Qe].metadata[lt].encoding,!Wt&&Vt[Qe].encoding&&(Wt=Vt[Qe].encoding),!Wt&&qt.codePages&&(Wt=qt.codePages[0]),typeof Wt=="string"&&(Wt=qt[Wt]),Wt)){for(Or=!1,Er=[],Fe=0,Ye=fe.length;Fe<Ye;Fe++)(mn=Wt[fe.charCodeAt(Fe)])?Er.push(String.fromCharCode(mn)):Er.push(fe[Fe]),Er[Fe].charCodeAt(0)>>8&&(Or=!0);fe=Er.join("")}for(Fe=fe.length;Or===void 0&&Fe!==0;)fe.charCodeAt(Fe-1)>>8&&(Or=!0),Fe--;if(!Or)return fe;for(Er=Ce.noBOM?[]:[254,255],Fe=0,Ye=fe.length;Fe<Ye;Fe++){if((ba=(mn=fe.charCodeAt(Fe))>>8)>>8)throw new Error("Character at position "+Fe+" of string '"+fe+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Er.push(ba),Er.push(mn-(ba<<8))}return String.fromCharCode.apply(void 0,Er)}(R,Y).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Pb=m.__private__.beginPage=function(R){ye[++Sr]=[],zt[Sr]={objId:0,contentsObjId:0,userUnit:Number(c),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(R[0]),topRightY:Number(R[1])}},uC(Sr),Ve(ye[z])},cC=function(R,Y){var fe,Ce,Fe;switch(n=Y||n,typeof R=="string"&&(fe=x(R.toLowerCase()),Array.isArray(fe)&&(Ce=fe[0],Fe=fe[1])),Array.isArray(R)&&(Ce=R[0]*ct,Fe=R[1]*ct),isNaN(Ce)&&(Ce=a[0],Fe=a[1]),(Ce>14400||Fe>14400)&&(ti.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),Ce=Math.min(14400,Ce),Fe=Math.min(14400,Fe)),a=[Ce,Fe],n.substr(0,1)){case"l":Fe>Ce&&(a=[Fe,Ce]);break;case"p":Ce>Fe&&(a=[Fe,Ce])}Pb(a),W3(_r),te(ux),Rb!==0&&te(Rb+" J"),_f!==0&&te(_f+" j"),an.publish("addPage",{pageNumber:Sr})},Ib=function(R){R>0&&R<=Sr&&(ye.splice(R,1),zt.splice(R,1),Sr--,z>Sr&&(z=Sr),this.setPage(z))},uC=function(R){R>0&&R<=Sr&&(z=R)},dC=m.__private__.getNumberOfPages=m.getNumberOfPages=function(){return ye.length-1},hC=function(R,Y,fe){var Ce,Fe=void 0;return fe=fe||{},R=R!==void 0?R:Vt[Qe].fontName,Y=Y!==void 0?Y:Vt[Qe].fontStyle,Ce=R.toLowerCase(),lr[Ce]!==void 0&&lr[Ce][Y]!==void 0?Fe=lr[Ce][Y]:lr[R]!==void 0&&lr[R][Y]!==void 0?Fe=lr[R][Y]:fe.disableWarning===!1&&ti.warn("Unable to look up font label for font '"+R+"', '"+Y+"'. Refer to getFontList() for available fonts."),Fe||fe.noFallback||(Fe=lr.times[Y])==null&&(Fe=lr.times.normal),Fe},Qu=m.__private__.putInfo=function(){var R=gi(),Y=function(Ce){return Ce};for(var fe in h!==null&&(Y=xs.encryptor(R,0)),te("<<"),te("/Producer ("+tc(Y("jsPDF "+sr.version))+")"),He)He.hasOwnProperty(fe)&&He[fe]&&te("/"+fe.substr(0,1).toUpperCase()+fe.substr(1)+" ("+tc(Y(He[fe]))+")");te("/CreationDate ("+tc(Y(D))+")"),te(">>"),te("endobj")},ax=m.__private__.putCatalog=function(R){var Y=(R=R||{}).rootDictionaryObjId||Br;switch(gi(),te("<<"),te("/Type /Catalog"),te("/Pages "+Y+" 0 R"),J||(J="fullwidth"),J){case"fullwidth":te("/OpenAction [3 0 R /FitH null]");break;case"fullheight":te("/OpenAction [3 0 R /FitV null]");break;case"fullpage":te("/OpenAction [3 0 R /Fit]");break;case"original":te("/OpenAction [3 0 R /XYZ null null 1]");break;default:var fe=""+J;fe.substr(fe.length-1)==="%"&&(J=parseInt(J)/100),typeof J=="number"&&te("/OpenAction [3 0 R /XYZ null null "+B(J)+"]")}switch(Ie||(Ie="continuous"),Ie){case"continuous":te("/PageLayout /OneColumn");break;case"single":te("/PageLayout /SinglePage");break;case"two":case"twoleft":te("/PageLayout /TwoColumnLeft");break;case"tworight":te("/PageLayout /TwoColumnRight")}ve&&te("/PageMode /"+ve),an.publish("putCatalog"),te(">>"),te("endobj")},R3=m.__private__.putTrailer=function(){te("trailer"),te("<<"),te("/Size "+(ie+1)),te("/Root "+ie+" 0 R"),te("/Info "+(ie-1)+" 0 R"),h!==null&&te("/Encrypt "+xs.oid+" 0 R"),te("/ID [ <"+L+"> <"+L+"> ]"),te(">>")},va=m.__private__.putHeader=function(){te("%PDF-"+A),te("%ºß¬à")},fC=m.__private__.putXRef=function(){var R="0000000000";te("xref"),te("0 "+(ie+1)),te("0000000000 65535 f ");for(var Y=1;Y<=ie;Y++)typeof X[Y]=="function"?te((R+X[Y]()).slice(-10)+" 00000 n "):X[Y]!==void 0?te((R+X[Y]).slice(-10)+" 00000 n "):te("0000000000 00000 n ")},Hu=m.__private__.buildDocument=function(){var R;ie=0,oe=0,de=[],X=[],ce=[],Br=Xi(),xi=Xi(),Ve(de),an.publish("buildDocument"),va(),dr(),function(){an.publish("putAdditionalObjects");for(var fe=0;fe<ce.length;fe++){var Ce=ce[fe];Yi(Ce.objId,!0),te(Ce.content),te("endobj")}an.publish("postPutAdditionalObjects")}(),R=[],function(){for(var fe in Vt)Vt.hasOwnProperty(fe)&&(f===!1||f===!0&&p.hasOwnProperty(fe))&&jr(Vt[fe])}(),function(){var fe;for(fe in ar)ar.hasOwnProperty(fe)&&pl(ar[fe])}(),function(){for(var fe in pr)pr.hasOwnProperty(fe)&&Ar(pr[fe])}(),function(fe){var Ce;for(Ce in Bt)Bt.hasOwnProperty(Ce)&&(Bt[Ce]instanceof wA?Ct(Bt[Ce]):Bt[Ce]instanceof Dy&&qn(Bt[Ce],fe))}
3268(R),an.publish("putResources"),R.forEach(Wc),Wc({resourcesOid:xi,objectOid:Number.MAX_SAFE_INTEGER}),an.publish("postPutResources"),h!==null&&(xs.oid=gi(),te("<<"),te("/Filter /Standard"),te("/V "+xs.v),te("/R "+xs.r),te("/U <"+xs.toHexString(xs.U)+">"),te("/O <"+xs.toHexString(xs.O)+">"),te("/P "+xs.P),te(">>"),te("endobj")),Qu(),ax();var Y=oe;return fC(),R3(),te("startxref"),te(""+Y),te("%%EOF"),Ve(ye[z]),de.join(`
3269`)},sx=m.__private__.getBlob=function(R){return new Blob([We(R)],{type:"application/pdf"})},Fb=function(R){for(;R.firstChild;)R.removeChild(R.firstChild)},Al=function(R){var Y,fe=R.document,Ce=fe.documentElement,Fe=fe.head,Ye=fe.body;return Fe||(Fe=fe.createElement("head"),Ce.appendChild(Fe)),Ye||(Ye=fe.createElement("body"),Ce.appendChild(Ye)),Fb(Fe),Fb(Ye),(Y=fe.createElement("style")).appendChild(fe.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),Fe.appendChild(Y),{document:fe,body:Ye}},ox=m.output=m.__private__.output=(Ai=function(R,Y){switch(typeof(Y=Y||{})=="string"?Y={filename:Y}:Y.filename=Y.filename||"generated.pdf",R){case void 0:return Hu();case"save":m.save(Y.filename);break;case"arraybuffer":return We(Hu());case"blob":return sx(Hu());case"bloburi":case"bloburl":if(Cr.URL!==void 0&&typeof Cr.URL.createObjectURL=="function")return Cr.URL&&Cr.URL.createObjectURL(sx(Hu()))||void 0;ti.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var fe="",Ce=Hu();try{fe=gie(Ce)}catch{fe=gie(unescape(encodeURIComponent(Ce)))}return"data:application/pdf;filename="+encodeURIComponent(Y.filename)+";base64,"+fe;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Cr)==="[object Window]"){var Fe="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Ye=!Y.pdfObjectUrl;Ye||(Fe=Y.pdfObjectUrl);var lt=Cr.open();if(lt!==null){var qt=Al(lt),Wt=qt.document.createElement("script"),Er=this;Wt.src=Fe,Ye&&(Wt.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",Wt.crossOrigin="anonymous"),Wt.onload=function(){lt.PDFObject.embed(Er.output("dataurlstring"),Y)},qt.body.appendChild(Wt)}return lt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Cr)==="[object Window]"){var Or=Y.pdfJsUrl||"examples/PDF.js/web/viewer.html",mn=Cr.open();if(mn!==null){var ba=Al(mn),Jn=ba.document.createElement("iframe"),Kn=Or.indexOf("?")===-1?"?":"&";Er=this,Jn.id="pdfViewer",Jn.width="500px",Jn.height="400px",Jn.src=Or+Kn+"file=&downloadName="+encodeURIComponent(Y.filename),Jn.onload=function(){mn.document.title=Y.filename,Jn.contentWindow.PDFViewerApplication.open(Er.output("bloburl"))},ba.body.appendChild(Jn)}return mn}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Cr)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var yi=Cr.open();if(yi!==null){var Mi=Al(yi),zi=Mi.document.createElement("iframe");zi.src=this.output("datauristring",Y),Mi.body.appendChild(zi),yi.document.title=Y.filename}if(yi||typeof safari>"u")return yi;break;case"datauri":case"dataurl":return Cr.document.location.href=this.output("datauristring",Y);default:return null}},Ai.foo=function(){try{return Ai.apply(this,arguments)}catch(fe){var R=fe.stack||"";~R.indexOf(" at ")&&(R=R.split(" at ")[1]);var Y="Error in function "+R.split(`
3270`)[0].split("<")[0]+": "+fe.message;if(!Cr.console)throw new Error(Y);Cr.console.error(Y,fe),Cr.alert&&alert(Y)}},Ai.foo.bar=Ai,Ai.foo),Gd=function(R){return Array.isArray(nr)===!0&&nr.indexOf(R)>-1};switch(i){case"pt":ct=1;break;case"mm":ct=72/25.4;break;case"cm":ct=72/2.54;break;case"in":ct=72;break;case"px":ct=Gd("px_scaling")==1?.75:96/72;break;case"pc":case"em":ct=12;break;case"ex":ct=6;break;default:if(typeof i!="number")throw new Error("Invalid unit: "+i);ct=i}var xs=null;q(),U();var mC=m.__private__.getPageInfo=m.getPageInfo=function(R){if(isNaN(R)||R%1!=0)throw new Error("Invalid argument passed to 
3270jsPDF.getPageInfo");return{objId:zt[R].objId,pageNumber:R,pageContext:zt[R]}},D3=m.__private__.getPageInfoByObjId=function(R){if(isNaN(R)||R%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var Y in zt)if(zt[Y].objId===R)break;return mC(Y)},M3=m.__private__.getCurrentPageInfo=m.getCurrentPageInfo=function(){return{objId:zt[z].objId,pageNumber:z,pageContext:zt[z]}};m.addPage=function(){return cC.apply(this,arguments),this},m.setPage=function(){return uC.apply(this,arguments),Ve.call(this,ye[z]),this},m.insertPage=function(R){return this.addPage(),this.movePage(z,R),this},m.movePage=function(R,Y){var fe,Ce;if(R>Y){fe=ye[R],Ce=zt[R];for(var Fe=R;Fe>Y;Fe--)ye[Fe]=ye[Fe-1],zt[Fe]=zt[Fe-1];ye[Y]=fe,zt[Y]=Ce,this.setPage(Y)}else if(R<Y){fe=ye[R],Ce=zt[R];for(var Ye=R;Ye<Y;Ye++)ye[Ye]=ye[Ye+1],zt[Ye]=zt[Ye+1];ye[Y]=fe,zt[Y]=Ce,this.setPage(Y)}return this},m.deletePage=function(){return Ib.apply(this,arguments),this},m.__private__.text=m.text=function(R,Y,fe,Ce,Fe){var Ye,lt,qt,Wt,Er,Or,mn,ba,Jn,Kn=(Ce=Ce||{}).scope||this;if(typeof R=="number"&&typeof Y=="number"&&(typeof fe=="string"||Array.isArray(fe))){var yi=fe;fe=Y,Y=R,R=yi}if(arguments[3]instanceof pt==0?(qt=arguments[4],Wt=arguments[5],$n(mn=arguments[3])==="object"&&mn!==null||(typeof qt=="string"&&(Wt=qt,qt=null),typeof mn=="string"&&(Wt=mn,mn=null),typeof mn=="number"&&(qt=mn,mn=null),Ce={flags:mn,angle:qt,align:Wt})):(E("The transform parameter of text() with a Matrix value"),Jn=Fe),isNaN(Y)||isNaN(fe)||R==null)throw new Error("Invalid arguments passed to jsPDF.text");if(R.length===0)return Kn;var Mi,zi="",Ms=typeof Ce.lineHeightFactor=="number"?Ce.lineHeightFactor:Dp,eh=Kn.internal.scaleFactor;function Ub(ai){return ai=ai.split("	").join(Array(Ce.TabLen||9).join(" ")),tc(ai,mn)}function Up(ai){for(var si,la=ai.concat(),Da=[],rh=la.length;rh--;)typeof(si=la.shift())=="string"?Da.push(si):Array.isArray(ai)&&(si.length===1||si[1]===void 0&&si[2]===void 0)?Da.push(si[0]):Da.push([si[0],si[1],si[2]]);return Da}function $p(ai,si){var la;if(typeof ai=="string")la=si(ai)[0];
vendor: 9,636 bytes, lines 3270-3284
3270else if(Array.isArray(ai)){for(var Da,rh,qb=ai.concat(),wx=[],_C=qb.length;_C--;)typeof(Da=qb.shift())=="string"?wx.push(si(Da)[0]):Array.isArray(Da)&&typeof Da[0]=="string"&&(rh=si(Da[0],Da[1],Da[2]),wx.push([rh[0],rh[1],rh[2]]));la=wx}return la}var Cf=!1,Qp=!0;if(typeof R=="string")Cf=!0;else if(Array.isArray(R)){var mx=R.concat();lt=[];for(var px,zs=mx.length;zs--;)(typeof(px=mx.shift())!="string"||Array.isArray(px)&&typeof px[0]!="string")&&(Qp=!1);Cf=Qp}if(Cf===!1)throw new Error('Type of text must be string or Array. "'+R+'" is not recognized.');typeof R=="string"&&(R=R.match(/[\r?\n]/)?R.split(/\r\n|\r|\n/g):[R]);var Hp=we/Kn.internal.scaleFactor,Vp=Hp*(Ms-1);switch(Ce.baseline){case"bottom":fe-=Vp;break;case"top":fe+=Hp-Vp;break;case"hanging":fe+=Hp-2*Vp;break;case"middle":fe+=Hp/2-Vp}if((Or=Ce.maxWidth||0)>0&&(typeof R=="string"?R=Kn.splitTextToSize(R,Or):Object.prototype.toString.call(R)==="[object Array]"&&(R=R.reduce(function(ai,si){return ai.concat(Kn.splitTextToSize(si,Or))},[]))),Ye={text:R,x:Y,y:fe,options:Ce,mutex:{pdfEscape:tc,activeFontKey:Qe,fonts:Vt,activeFontSize:we}},an.publish("preProcessText",Ye),R=Ye.text,qt=(Ce=Ye.options).angle,Jn instanceof pt==0&&qt&&typeof qt=="number"){qt*=Math.PI/180,Ce.rotationDirection===0&&(qt=-qt),j===v&&(qt=-qt);var $b=Math.cos(qt),qu=Math.sin(qt);Jn=new pt($b,qu,-qu,$b,0,0)}else qt&&qt instanceof pt&&(Jn=qt);j!==v||Jn||(Jn=ln),(Er=Ce.charSpace||dx)!==void 0&&(zi+=S(F(Er))+` Tc
3271`,this.setCharSpace(this.getCharSpace()||0)),(ba=Ce.horizontalScale)!==void 0&&(zi+=S(100*ba)+` Tz
3272`),Ce.lang;var uo=-1,wC=Ce.renderingMode!==void 0?Ce.renderingMode:Ce.stroke,Ax=Kn.internal.getCurrentPageInfo().pageContext;switch(wC){case 0:case!1:case"fill":uo=0;break;case 1:case!0:case"stroke":uo=1;break;case 2:case"fillThenStroke":uo=2;break;case 3:case"invisible":uo=3;break;case 4:case"fillAndAddForClipping":uo=4;break;case 5:case"strokeAndAddPathForClipping":uo=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":uo=6;break;case 7:case"addToPathForClipping":uo=7}var jC=Ax.usedRenderingMode!==void 0?Ax.usedRenderingMode:-1;uo!==-1?zi+=uo+` Tr
3273`:jC!==-1&&(zi+=`0 Tr
3274`),uo!==-1&&(Ax.usedRenderingMode=uo),Wt=Ce.align||"left";var rc,Wp=we*Ms,Qb=Kn.internal.pageSize.getWidth(),gx=Vt[Qe];Er=Ce.charSpace||dx,Or=Ce.maxWidth||0,mn=Object.assign({autoencode:!0,noBOM:!0},Ce.flags);var qp=[],Hb=function(ai){return Kn.getStringUnitWidth(ai,{font:gx,charSpace:Er,fontSize:we,doKerning:!1})*we/eh};if(Object.prototype.toString.call(R)==="[object Array]"){var ho;lt=Up(R),Wt!=="left"&&(rc=lt.map(Hb));var Ro,xx=0;if(Wt==="right"){Y-=rc[0],R=[],zs=lt.length;for(var Nf=0;Nf<zs;Nf++)Nf===0?(Ro=Xd(Y),ho=Yd(fe)):(Ro=F(xx-rc[Nf]),ho=-Wp),R.push([lt[Nf],Ro,ho]),xx=rc[Nf]}else if(Wt==="center"){Y-=rc[0]/2,R=[],zs=lt.length;for(var Sf=0;Sf<zs;Sf++)Sf===0?(Ro=Xd(Y),ho=Yd(fe)):(Ro=F((xx-rc[Sf])/2),ho=-Wp),R.push([lt[Sf],Ro,ho]),xx=rc[Sf]}else if(Wt==="left"){R=[],zs=lt.length;for(var yx=0;yx<zs;yx++)R.push(lt[yx])}else if(Wt==="justify"&&gx.encoding==="Identity-H"){R=[],zs=lt.length,Or=Or!==0?Or:Qb;for(var Kp=0,wa=0;wa<zs;wa++)if(ho=wa===0?Yd(fe):-Wp,Ro=wa===0?Xd(Y):Kp,wa<zs-1){var eP=F((Or-rc[wa])/(lt[wa].split(" ").length-1)),Ku=lt[wa].split(" ");R.push([Ku[0]+" ",Ro,ho]),Kp=0;for(var qc=1;qc<Ku.length;qc++){var Gp=(Hb(Ku[qc-1]+" "+Ku[qc])-Hb(Ku[qc]))*eh+eP;qc==Ku.length-1?R.push([Ku[qc],Gp,0]):R.push([Ku[qc]+" ",Gp,0]),Kp-=Gp}}else R.push([lt[wa],Ro,ho]);R.push(["",Kp,0])}else{if(Wt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(R=[],zs=lt.length,Or=Or!==0?Or:Qb,wa=0;wa<zs;wa++){ho=wa===0?Yd(fe):-Wp,Ro=wa===0?Xd(Y):0;var Vb=lt[wa].split(" ").length-1,Wb=Vb>0?(Or-rc[wa])/Vb:0;wa<zs-1?qp.push(S(F(Wb))):qp.push(0),R.push([lt[wa],Ro,ho])}}}(typeof Ce.R2L=="boolean"?Ce.R2L:je)===!0&&(R=$p(R,function(ai,si,la){return[ai.split("").reverse().join(""),si,la]})),Ye={text:R,x:Y,y:fe,options:Ce,mutex:{pdfEscape:tc,activeFontKey:Qe,fonts:Vt,activeFontSize:we}},an.publish("postProcessText",Ye),R=Ye.text,Mi=Ye.mutex.isHex||!1;var vx=Vt[Qe].encoding;vx!=="WinAnsiEncoding"&&vx!=="StandardEncoding"||(R=$p(R,function(ai,si,la){return[Ub(ai),si,la]})),lt=Up(R),R=[];for(var Xp,Yp,kf,th=Array.isArray(lt[0])?1:0,Ef="",bx=function(ai,si,la){var Da="";return la instanceof pt?(la=typeof Ce.angle=="number"?Di(la,new pt(1,0,0,1,ai,si)):Di(new pt(1,0,0,1,ai,si),la),j===v&&(la=Di(new pt(1,0,0,-1,0,0),la)),Da=la.join(" ")+` Tm
3275`):Da=S(ai)+" "+S(si)+` Td
3276`,Da},Us=0;Us<lt.length;Us++){switch(Ef="",th){case 1:kf=(Mi?"<":"(")+lt[Us][0]+(Mi?">":")"),Xp=parseFloat(lt[Us][1]),Yp=parseFloat(lt[Us][2]);break;case 0:kf=(Mi?"<":"(")+lt[Us]+(Mi?">":")"),Xp=Xd(Y),Yp=Yd(fe)}qp!==void 0&&qp[Us]!==void 0&&(Ef=qp[Us]+` Tw
3277`),Us===0?R.push(Ef+bx(Xp,Yp,Jn)+kf):th===0?R.push(Ef+kf):th===1&&R.push(Ef+bx(Xp,Yp,Jn)+kf)}R=th===0?R.join(` Tj
3278T* `):R.join(` Tj
3279`),R+=` Tj
3280`;var Gu=`BT
3281/`;return Gu+=Qe+" "+we+` Tf
3282`,Gu+=S(we*Ms)+` TL
3283`,Gu+=Wu+`
3284`,Gu+=zi,Gu+=R,te(Gu+="ET"),p[Qe]=!0,Kn};var z3=m.__private__.clip=m.clip=function(R){return te(R==="evenodd"?"W*":"W"),this};m.clipEvenOdd=function(){return z3("evenodd")},m.__private__.discardPath=m.discardPath=function(){return te("n"),this};var Vu=m.__private__.isValidStyle=function(R){var Y=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(R)!==-1&&(Y=!0),Y};m.__private__.setDefaultPathOperation=m.setDefaultPathOperation=function(R){return Vu(R)&&(d=R),this};var pC=m.__private__.getStyle=m.getStyle=function(R){var Y=d;switch(R){case"D":case"S":Y="S";break;case"F":Y="f";break;case"FD":case"DF":Y="B";break;case"f":case"f*":case"B":case"B*":Y=R}return Y},lx=m.close=function(){return te("h"),this};m.stroke=function(){return te("S"),this},m.fill=function(R){return cx("f",R),this},m.fillEvenOdd=function(R){return cx("f*",R),this},m.fillStroke=function(R){return cx("B",R),this},m.fillStrokeEvenOdd=function(R){return cx("B*",R),this};var cx=function(R,Y){$n(Y)==="object"?$3(Y,R):te(R)},Ob=function(R){R===null||j===v&&R===void 0||(R=pC(R),te(R))};function U3(R,Y,fe,Ce,Fe){var Ye=new Dy(Y||this.boundingBox,fe||this.xStep,Ce||this.yStep,this.gState,Fe||this.matrix);Ye.stream=this.stream;var lt=R+"$$"+this.cloneIndex+++"$$";return Yn(lt,Ye),Ye}var $3=function(R,Y){var fe=kr[R.key],Ce=Bt[fe];if(Ce instanceof wA)te("q"),te(Q3(Y)),Ce.gState&&m.setGState(Ce.gState),te(R.matrix.toString()+" cm"),te("/"+fe+" sh"),te("Q");else if(Ce instanceof Dy){var Fe=new pt(1,0,0,-1,0,zp());R.matrix&&(Fe=Fe.multiply(R.matrix||ln),fe=U3.call(Ce,R.key,R.boundingBox,R.xStep,R.yStep,Fe).id),te("q"),te("/Pattern cs"),te("/"+fe+" scn"),Ce.gState&&m.setGState(Ce.gState),te(Y),te("Q")}},Q3=function(R){switch(R){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},wf=m.moveTo=function(R,Y){return te(S(F(R))+" "+S(I(Y))+" m"),this},AC=m.lineTo=function(R,Y){return te(S(F(R))+" "+S(I(Y))+" l"),this},jf=m.curveTo=function(R,Y,fe,Ce,Fe,Ye){return te([S(F(R)),S(I(Y)),S(F(fe)),S(I(Ce)),S(F(Fe)),S(I(Ye)),"c"].join(" ")),this};m.__private__.line=m.line=function(R,Y,fe,Ce,Fe){if(isNaN(R)||isNaN(Y)||isNaN(fe)||isNaN(Ce)||!Vu(Fe))throw new Error("Invalid arguments passed to jsPDF.line");return j===b?this.lines([[fe-R,Ce-Y]],R,Y,[1,1],Fe||"S"):this.lines([[fe-R,Ce-Y]],R,Y,[1,1]).stroke()},m.__private__.lines=m.lines=function(R,Y,fe,Ce,Fe,Ye){var lt,qt,Wt,Er,Or,mn,ba,Jn,Kn,yi,Mi,zi;if(typeof R=="number"&&(zi=fe,fe=Y,Y=R,R=zi),Ce=Ce||[1,1],Ye=Ye||!1,isNaN(Y)||isNaN(fe)||!Array.isArray(R)||!Array.isArray(Ce)||!Vu(Fe)||typeof Ye!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(wf(Y,fe),lt=Ce[0],qt=Ce[1],Er=R.length,yi=Y,Mi=fe,Wt=0;Wt<Er;Wt++)(Or=R[Wt]).length===2?(yi=Or[0]*lt+yi,Mi=Or[1]*qt+Mi,AC(yi,Mi)):(mn=Or[0]*lt+yi,ba=Or[1]*qt+Mi,Jn=Or[2]*lt+yi,Kn=Or[3]*qt+Mi,yi=Or[4]*lt+yi,Mi=Or[5]*qt+Mi,jf(mn,ba,Jn,Kn,yi,Mi));return Ye&&lx(),Ob(Fe),this},m.path=function(R){for(var Y=0;Y<R.length;Y++){var fe=R[Y],Ce=fe.c;switch(fe.op){case"m":wf(Ce[0],Ce[1]);break;case"l":AC(Ce[0],Ce[1]);break;case"c":jf.apply(this,Ce);break;case"h":lx()}}return this},m.__private__.rect=m.rect=function(R,Y,fe,Ce,Fe){if(isNaN(R)||isNaN(Y)||isNaN(fe)||isNaN(Ce)||!Vu(Fe))throw new Error("Invalid arguments passed to jsPDF.rect");return j===b&&(Ce=-Ce),te([S(F(R)),S(I(Y)),S(F(fe)),S(F(Ce)),"re"].join(" ")),Ob(Fe),this},m.__private__.triangle=m.triangle=function(R,Y,fe,Ce,Fe,Ye,lt){if(isNaN(R)||isNaN(Y)||isNaN(fe)||isNaN(Ce)||isNaN(Fe)||isNaN(Ye)||!Vu(lt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[fe-R,Ce-Y],[Fe-fe,Ye-Ce],[R-Fe,Y-Ye]],R,Y,[1,1],lt,!0),this},m.__private__.roundedRect=m.roundedRect=function(R,Y,fe,Ce,Fe,Ye,lt){if(isNaN(R)||isNaN(Y)||isNaN(fe)||isNaN(Ce)||isNaN(Fe)||isNaN(Ye)||!Vu(lt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var qt=4/3*(Math.SQRT2-1);return Fe=Math.min(Fe,.5*fe),Ye=Math.min(Ye,.5*Ce),this.lines([[fe-2*Fe,0],[Fe*qt,0,Fe,Ye-Ye*qt,Fe,Ye],[0,Ce-2*Ye],[0,Ye*qt,-Fe*qt,Ye,-Fe,Ye],[2*Fe-fe,0],[-Fe*qt,0,-Fe,-Ye*qt,-Fe,-Ye],[0,2*Ye-Ce],[0,-Ye*qt,Fe*qt,-Ye,Fe,-Ye]],R+Fe,Y,[1,1],lt,!0),this},m.__private__.ellipse=m.ellipse=function(R,Y,fe,Ce,Fe){if(isNaN(R)||isNaN(Y)||isNaN(fe)||isNaN(Ce)||!Vu(Fe))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Ye=4/3*(Math.SQRT2-1)*fe,lt=4/3*(Math.SQRT2-1)*Ce;return wf(R+fe,Y),jf(R+fe,Y-lt,R+Ye,Y-Ce,R,Y-Ce),jf(R-Ye,Y-Ce,R-fe,Y-lt,R-fe,Y),jf(R-fe,Y+lt,R-Ye,Y+Ce,R,Y+Ce),jf(R+Ye,Y+Ce,R+fe,Y+lt,R+fe,Y),Ob(Fe),this},m.__private__.circle=m.circle=function(R,Y,fe,Ce){if(isNaN(R)||isNaN(Y)||isNaN(fe)||!Vu(Ce))throw new Error("Invalid arguments passed to 
3284jsPDF.circle");return this.ellipse(R,Y,fe,fe,Ce)},m.setFont=function(R,Y,fe){return fe&&(Y=N(Y,fe)),Qe=hC(R,Y,{disableWarning:!1}),this};var H3=m.__private__.getFont=m.getFont=function(){return Vt[hC.apply(m,arguments)]};m.__private__.getFontList=m.getFontList=function(){var R,Y,fe={};for(R in lr)if(lr.hasOwnProperty(R))for(Y in fe[R]=[],lr[R])lr[R].hasOwnProperty(Y)&&fe[R].push(Y);return fe},m.addFont=function(R,Y,fe,Ce,Fe){var Ye=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Ye.indexOf(arguments[3])!==-1?Fe=arguments[3]:arguments[3]&&Ye.indexOf(arguments[3])==-1&&(fe=N(fe,Ce)),ix.call(this,R,Y,fe,Fe=Fe||"Identity-H")};var Dp,_r=e.lineWidth||.200025,V3=m.__private__.getLineWidth=m.getLineWidth=function(){return _r},W3=m.__private__.setLineWidth=m.setLineWidth=function(R){return _r=R,te(S(F(R))+" w"),this};m.__private__.setLineDash=sr.API.setLineDash=sr.API.setLineDashPattern=function(R,Y){if(R=R||[],Y=Y||0,isNaN(Y)||!Array.isArray(R))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return R=R.map(function(fe){return S(F(fe))}).join(" "),Y=S(F(Y)),te("["+R+"] "+Y+" d"),this};var q3=m.__private__.getLineHeight=m.getLineHeight=function(){return we*Dp};m.__private__.getLineHeight=m.getLineHeight=function(){return we*Dp};var K3=m.__private__.setLineHeightFactor=m.setLineHeightFactor=function(R){return typeof(R=R||1.15)=="number"&&(Dp=R),this},G3=m.__private__.getLineHeightFactor=m.getLineHeightFactor=function(){return Dp};K3(e.lineHeight);var Xd=m.__private__.getHorizontalCoordinate=function(R){return F(R)},Yd=m.__private__.getVerticalCoordinate=function(R){return j===v?R:zt[z].mediaBox.topRightY-zt[z].mediaBox.bottomLeftY-F(R)},X3=m.__private__.getHorizontalCoordinateString=m.getHorizontalCoordinateString=function(R){return S(Xd(R))},Y3=m.__private__.getVerticalCoordinateString=m.getVerticalCoordinateString=function(R){return S(Yd(R))},ux=e.strokeColor||"0 G";m.__private__.getStrokeColor=m.getDrawColor=function(){return La(ux)},m.__private__.setStrokeColor=m.setDrawColor=function(R,Y,fe,Ce){return ux=Ee({ch1:R,ch2:Y,ch3:fe,ch4:Ce,pdfColorType:"draw",precision:2}),te(ux),this};var Lb=e.fillColor||"0 g";m.__private__.getFillColor=m.getFillColor=function(){return La(Lb)},m.__private__.setFillColor=m.setFillColor=function(R,Y,fe,Ce){return Lb=Ee({ch1:R,ch2:Y,ch3:fe,ch4:Ce,pdfColorType:"fill",precision:2}),te(Lb),this};var Wu=e.textColor||"0 g",J3=m.__private__.getTextColor=m.getTextColor=function(){return La(Wu)};m.__private__.setTextColor=m.setTextColor=function(R,Y,fe,Ce){return Wu=Ee({ch1:R,ch2:Y,ch3:fe,ch4:Ce,pdfColorType:"text",precision:3}),this};var dx=e.charSpace,Z3=m.__private__.getCharSpace=m.getCharSpace=function(){return parseFloat(dx||0)};m.__private__.setCharSpace=m.setCharSpace=function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return dx=R,this};var Rb=0;m.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},m.__private__.setLineCap=m.setLineCap=function(R){var Y=m.CapJoinStyles[R];if(Y===void 0)throw new Error("Line cap style of '"+R+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Rb=Y,te(Y+" J"),this};var _f=0;m.__private__.setLineJoin=m.setLineJoin=function(R){var Y=m.CapJoinStyles[R];if(Y===void 0)throw new Error("Line join style of '"+R+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return _f=Y,te(Y+" j"),this},m.__private__.setLineMiterLimit=m.__private__.setMiterLimit=m.setLineMiterLimit=m.setMiterLimit=function(R){if(R=R||0,isNaN(R))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return te(S(F(R))+" M"),this},m.GState=OB,m.setGState=function(R){(R=typeof R=="string"?ar[ur[R]]:Db(null,R)).equals(kn)||(te("/"+R.id+" gs"),kn=R)};var Db=function(R,Y){if(!R||!ur[R]){var fe=!1;for(var Ce in ar)if(ar.hasOwnProperty(Ce)&&ar[Ce].equals(Y)){fe=!0;break}if(fe)Y=ar[Ce];else{var Fe="GS"+(Object.keys(ar).length+1).toString(10);ar[Fe]=Y,Y.id=Fe}return R&&(ur[R]=Y.id),an.publish("addGState",Y),Y}};m.addGState=function(R,Y){return Db(R,Y),this},m.saveGraphicsState=function(){return te("q"),cr.push({key:Qe,size:we,color:Wu}),this},m.restoreGraphicsState=function(){te("Q");var R=cr.pop();return Qe=R.key,we=R.size,Wu=R.color,kn=null,this},m.setCurrentTransformationMatrix=function(R){return te(R.toString()+" cm"),this},m.comment=function(R){return te("#"+R),this};var Mp=function(R,Y){var fe=R||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return fe},set:function(Ye){isNaN(Ye)||(fe=parseFloat(Ye))}});var Ce=Y||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return Ce},set:function(Ye){isNaN(Ye)||(Ce=parseFloat(Ye))}});var Fe="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Fe},set:function(Ye){Fe=Ye.toString()}}),this},Mb=function(R,Y,fe,Ce){Mp.call(this,R,Y),this.type="rect";var Fe=fe||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Fe},set:function(lt){isNaN(lt)||(Fe=parseFloat(lt))}});var Ye=Ce||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Ye},set:function(lt){isNaN(lt)||(Ye=parseFloat(lt))}}),this},hx=function(){this.page=Sr,this.currentPage=z,this.pages=ye.slice(0),this.pagesContext=zt.slice(0),this.x=dt,this.y=Fr,this.matrix=Xt,this.width=gC(z),this.height=Zd(z),this.outputDestination=Be,this.id="",this.objectNumber=-1};hx.prototype.restore=function(){Sr=this.page,z=this.currentPage,zt=this.pagesContext,ye=this.pages,dt=this.x,Fr=this.y,Xt=this.matrix,Jd(z,this.width),xC(z,this.height),Be=this.outputDestination};var zb=function(R,Y,fe,Ce,Fe){ii.push(new hx),Sr=z=0,ye=[],dt=R,Fr=Y,Xt=Fe,Pb([fe,Ce])};for(var fx in m.beginFormObject=function(R,Y,fe,Ce,Fe){return zb(R,Y,fe,Ce,Fe),this},m.endFormObject=function(R){return function(Y){if(Gr[Y])ii.pop().restore(
vendor: 7,072 bytes, lines 3284-3286
3284);else{var fe=new hx,Ce="Xo"+(Object.keys(pr).length+1).toString(10);fe.id=Ce,Gr[Y]=Ce,pr[Ce]=fe,an.publish("addFormObject",fe),ii.pop().restore()}}(R),this},m.doFormObject=function(R,Y){var fe=pr[Gr[R]];return te("q"),te(Y.toString()+" cm"),te("/"+fe.id+" Do"),te("Q"),this},m.getFormObject=function(R){var Y=pr[Gr[R]];return{x:Y.x,y:Y.y,width:Y.width,height:Y.height,matrix:Y.matrix}},m.save=function(R,Y){return R=R||"generated.pdf",(Y=Y||{}).returnPromise=Y.returnPromise||!1,Y.returnPromise===!1?(gA(sx(Hu()),R),typeof gA.unload=="function"&&Cr.setTimeout&&setTimeout(gA.unload,911),this):new Promise(function(fe,Ce){try{var Fe=gA(sx(Hu()),R);typeof gA.unload=="function"&&Cr.setTimeout&&setTimeout(gA.unload,911),fe(Fe)}catch(Ye){Ce(Ye.message)}})},sr.API)sr.API.hasOwnProperty(fx)&&(fx==="events"&&sr.API.events.length?function(R,Y){var fe,Ce,Fe;for(Fe=Y.length-1;Fe!==-1;Fe--)fe=Y[Fe][0],Ce=Y[Fe][1],R.subscribe.apply(R,[fe].concat(typeof Ce=="function"?[Ce]:Ce))}(an,sr.API.events):m[fx]=sr.API[fx]);function gC(R){return zt[R].mediaBox.topRightX-zt[R].mediaBox.bottomLeftX}function Jd(R,Y){zt[R].mediaBox.topRightX=Y+zt[R].mediaBox.bottomLeftX}function Zd(R){return zt[R].mediaBox.topRightY-zt[R].mediaBox.bottomLeftY}function xC(R,Y){zt[R].mediaBox.topRightY=Y+zt[R].mediaBox.bottomLeftY}var yC=m.getPageWidth=function(R){return gC(R=R||z)/ct},vC=m.setPageWidth=function(R,Y){Jd(R,Y*ct)},zp=m.getPageHeight=function(R){return Zd(R=R||z)/ct},bC=m.setPageHeight=function(R,Y){xC(R,Y*ct)};return m.internal={pdfEscape:tc,getStyle:pC,getFont:H3,getFontSize:he,getCharSpace:Z3,getTextColor:J3,getLineHeight:q3,getLineHeightFactor:G3,getLineWidth:V3,write:xe,getHorizontalCoordinate:Xd,getVerticalCoordinate:Yd,getCoordinateString:X3,getVerticalCoordinateString:Y3,collections:{},newObject:gi,newAdditionalObject:Vr,newObjectDeferred:Xi,newObjectDeferredBegin:Yi,getFilters:nt,putStream:gt,events:an,scaleFactor:ct,pageSize:{getWidth:function(){return yC(z)},setWidth:function(R){vC(z,R)},getHeight:function(){return zp(z)},setHeight:function(R){bC(z,R)}},encryptionOptions:h,encryption:xs,getEncryptor:function(R){return h!==null?xs.encryptor(R,0):function(Y){return Y}},output:ox,getNumberOfPages:dC,get pages(){return ye},out:te,f2:B,f3:T,getPageInfo:mC,getPageInfoByObjId:D3,getCurrentPageInfo:M3,getPDFVersion:g,Point:Mp,Rectangle:Mb,Matrix:pt,hasHotfix:Gd},Object.defineProperty(m.internal.pageSize,"width",{get:function(){return yC(z)},set:function(R){vC(z,R)},enumerable:!0,configurable:!0}),Object.defineProperty(m.internal.pageSize,"height",{get:function(){return zp(z)},set:function(R){bC(z,R)},enumerable:!0,configurable:!0}),(function(R){for(var Y=0,fe=ze.length;Y<fe;Y++){var Ce=ix.call(this,R[Y][0],R[Y][1],R[Y][2],ze[Y][3],!0);f===!1&&(p[Ce]=!0);var Fe=R[Y][0].split("-");Ra({id:Ce,fontName:Fe[0],fontStyle:Fe[1]||""})}an.publish("addFonts",{fonts:Vt,dictionary:lr})}).call(m,ze),Qe="F1",cC(a,n),an.publish("initialized"),m}cy.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},cy.prototype.toHexString=function(e){return e.split("").map(function(r){return("0"+(255&r.charCodeAt(0)).toString(16)).slice(-2)}).join("")},cy.prototype.hexToBytes=function(e){for(var r=[],n=0;n<e.length;n+=2)r.push(String.fromCharCode(parseInt(e.substr(n,2),16)));return r.join("")},cy.prototype.processOwnerPassword=function(e,r){return B6(E6(r).substr(0,5),e)},cy.prototype.encryptor=function(e,r){var n=E6(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&r,r>>8&255)).substr(0,10);return function(i){return B6(n,i)}},OB.prototype.equals=function(e){var r,n="id,objectNumber,equals";if(!e||$n(e)!==$n(this))return!1;var i=0;for(r in this)if(!(n.indexOf(r)>=0)){if(this.hasOwnProperty(r)&&!e.hasOwnProperty(r)||this[r]!==e[r])return!1;i++}for(r in e)e.hasOwnProperty(r)&&n.indexOf(r)<0&&i--;return i===0},sr.API={events:[]},sr.version="4.2.1";var ra=sr.API,bH=1,nx=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Zx=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Lg=function(e){return e.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(r){var n=r.charCodeAt(0).toString(16).toUpperCase();return"#"+(n.length===1?"0"+n:n)})},Tr=function(e){return e.toFixed(2)},qf=function(e){return e.toFixed(5)};ra.__acroform__={};var ml=function(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e},bie=function(e){return e*bH},ed=function(e){var r=new G2e,n=Qt.internal.getHeight(e)||0,i=Qt.internal.getWidth(e)||0;return r.BBox=[0,0,Number(Tr(i)),Number(Tr(n))],r},C6t=ra.__acroform__.setBit=function(e,r){if(e=e||0,r=r||0,isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<r},N6t=ra.__acroform__.clearBit=function(e,r){if(e=e||0,r=r||0,isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<r)},S6t=ra.__acroform__.getBit=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<r?1:0},ma=ra.__acroform__.getBitForPdf=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return S6t(e,r-1)},pa=ra.__acroform__.setBitForPdf=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return C6t(e,r-1)},Aa=ra.__acroform__.clearBitForPdf=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return N6t(e,r-1)},k6t=ra.__acroform__.calculateCoordinates=function(e,r){var n=r.internal.getHorizontalCoordinate,i=r.internal.getVerticalCoordinate,a=e[0],o=e[1],l=e[2],c=e[3],u={};return u.lowerLeft_X=n(a)||0,u.lowerLeft_Y=i(o+c)||0,u.upperRight_X=n(a+l)||0,u.upperRight_Y=i(o)||0,[Number(Tr(u.lowerLeft_X)),Number(Tr(u.lowerLeft_Y)),Number(Tr(u.upperRight_X)),Number(Tr(u.upperRight_Y))]},E6t=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var r=[],n=e._V||e.DV,i=T6(e,n),a=e.scope.internal.getFont(e.fontName,e.fontStyle).id;r.push("/Tx BMC"),r.push("q"),r.push("BT"),r.push(e.scope.__private__.encodeColorString(e.color)),r.push("/"+a+" "+Tr(i.fontSize)+" Tf"),r.push("1 0 0 1 0 0 Tm"),r.push(i.text),r.push("ET"),r.push("Q"),r.push("EMC");var o=ed(e);return o.scope=e.scope,o.stream=r.join(`
3285`),o}},T6=function(e,r){var n=e.fontSize===0?e.maxFontSize:e.fontSize,i={text:"",fontSize:""},a=(r=(r=r.substr(0,1)=="("?r.substr(1):r).substr(r.length-1)==")"?r.substr(0,r.length-1):r).split(" ");a=e.multiline?a.map(function(B){return B.split(`
3286`)}):a.map(function(B){return[B]});var o=n,l=Qt.internal.getHeight(e)||0;l=l<0?-l:l;var c=Qt.internal.getWidth(e)||0;c=c<0?-c:c;var u=function(B,T,F){if(B+1<a.length){var I=T+" "+a[B+1][0];return zS(I,e,F).width<=c-4}return!1};o++;e:for(;o>0;){r="",o--;var d,h,f=zS("3",e,o).height,p=e.multiline?l-o:(l-f)/2,m=p+=2,A=0,g=0,y=0;if(o<=0){r=`(...) Tj
3287`,r+="% Width of Text: "+zS(r,e,o=12).width+", FieldWidth:"+c+`
3288`;break}for(var x="",b=0,v=0;v<a.length;v++)if(a.hasOwnProperty(v)){var j=!1;if(a[v].length!==1&&y!==a[v].length-1){if((f+2)*(b+2)+2>l)continue e;x+=a[v][y],j=!0,g=v,v--}else{x=(x+=a[v][y]+" ").substr(x.length-1)==" "?x.substr(0,x.length-1):x;var _=parseInt(v),C=u(_,x,o),N=v>=a.length-1;if(C&&!N){x+=" ",y=0;continue}if(C||N){if(N)g=_;else if(e.multiline&&(f+2)*(b+2)+2>l)continue e}else{if(!e.multiline||(f+2)*(b+2)+2>l)continue e;g=_}}for(var S="",E=A;E<=g;E++){var O=a[E];if(e.multiline){if(E===g){S+=O[y]+" ",y=(y+1)%O.length;continue}if(E===A){S+=O[O.length-1]+" ";continue}}S+=O[0]+" "}switch(S=S.substr(S.length-1)==" "?S.substr(0,S.length-1):S,h=zS(S,e,o).width,e.textAlign){case"right":d=c-h-2;break;case"center":d=(c-h)/2;break;default:d=2}r+=Tr(d)+" "+Tr(m)+` Td
3289`,r+="("+nx(S)+`) Tj
3290`,r+=-Tr(d)+` 0 Td
3291`,m=-(o+2),h=0,A=j?g:g+1,b++,x=""}break}return i.text=r,i.fontSize=o,i},zS=function(e,r,n){var i=r.scope.internal.getFont(r.fontName,r.fontStyle),a=r.scope.getStringUnitWidth(e,{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:r.scope.getStringUnitWidth("3",{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:a}},B6t={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},T6t=function(e,r){var n={type:"reference",object:e};r.internal.getPageInfo(e.page).pageContext.annotations.find(function(i){return i.type===n.type&&i.object===n.object})===void 0&&r.internal.getPageInfo(e.page).pageContext.annotations.push(n)},P6t=function(e,r){if(r.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if(Uu.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(B6t)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");bH=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new X2e,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(n){n.internal.events.unsubscribe(n.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete n.internal.acroformPlugin.acroFormDictionaryRoot._eventID,n.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(n){n.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var i=n.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var a in i)if(i.hasOwnProperty(a)){var o=i[a];o.objId=void 0,o.hasAnnotation&&T6t(o,n)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(n){if(n.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");n.internal.write("/AcroForm "+n.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(n){(function(i,a){var o=!i;for(var l in i||(a.internal.newObjectDeferredBegin(a.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),a.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),i=i||a.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(i.hasOwnProperty(l)){var c=i[l],u=[],d=c.Rect;if(c.Rect&&(c.Rect=k6t(c.Rect,a)),a.internal.newObjectDeferredBegin(c.objId,!0),c.DA=Qt.createDefaultAppearanceStream(c),$n(c)==="object"&&typeof c.getKeyValueListForStream=="function"&&(u=c.getKeyValueListForStream()),c.Rect=d,c.hasAppearanceStream&&!c.appearanceStreamContent){var h=E6t(c);u.push({key:"AP",value:"<</N "+h+">>"}),a.internal.acroformPlugin.xForms.push(h)}if(c.appearanceStreamContent){var f="";for(var p in c.appearanceStreamContent)if(c.appearanceStreamContent.hasOwnProperty(p)){var m=c.appearanceStreamContent[p];if(f+="/"+p+" ",f+="<<",Object.keys(m).length>=1||Array.isArray(m)){for(var l in m)if(m.hasOwnProperty(l)){var A=m[l];typeof A=="function"&&(A=A.call(a,c)),f+="/"+l+" "+A+" ",a.internal.acroformPlugin.xForms.indexOf(A)>=0||a.internal.acroformPlugin.xForms.push(A)}}else typeof(A=m)=="function"&&(A=A.call(a,c)),f+="/"+l+" "+A,a.internal.acroformPlugin.xForms.indexOf(A)>=0||a.internal.acroformPlugin.xForms.push(A);f+=">>"}u.push({key:"AP",value:`<<
3292`+f+">>"})}a.internal.putStream({additionalKeyValues:u,objectId:c.objId}),a.internal.out("endobj")}o&&function(g,y){for(var x in g)if(g.hasOwnProperty(x)){var b=x,v=g[x];y.internal.newObjectDeferredBegin(v.objId,!0),$n(v)==="object"&&typeof v.putStream=="function"&&v.putStream(),delete g[b]}}(a.internal.acroformPlugin.xForms,a)})(n,e)}),e.internal.acroformPlugin.isInitialized=!0}},K2e=ra.__acroform__.arrayToPdfArray=function(e,r,n){var i=function(l){return l};if(Array.isArray(e)){for(var a="[",o=0;o<e.length;o++)switch(o!==0&&(a+=" "),$n(e[o])){case"boolean":case"number":case"object":a+=e[o].toString();break;case"string":e[o].substr(0,1)==="/"?a+="/"+Lg(e[o].substr(1)):(r!==void 0&&n&&(i=n.internal.getEncryptor(r)),a+="("+nx(i(e[o].toString()))+")")}return a+"]"}
vendor: 21,879 bytes, lines 3292-3303
3292throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},QO=function(e,r,n){var i=function(a){return a};return r!==void 0&&n&&(i=n.internal.getEncryptor(r)),(e=e||"").toString(),"("+nx(i(e))+")"},_d=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};_d.prototype.toString=function(){return this.objId+" 0 R"},_d.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},_d.prototype.getKeyValueListForStream=function(){var e=[],r=Object.getOwnPropertyNames(this).filter(function(o){return o!="content"&&o!="appearanceStreamContent"&&o!="scope"&&o!="objId"&&o.substring(0,1)!="_"});for(var n in r)if(Object.getOwnPropertyDescriptor(this,r[n]).configurable===!1){var i=r[n],a=this[i];a&&(Array.isArray(a)?e.push({key:i,value:K2e(a,this.objId,this.scope)}):a instanceof _d?(a.scope=this.scope,e.push({key:i,value:a.objId+" 0 R"})):typeof a!="function"&&e.push({key:i,value:a}))}return e};var G2e=function(){_d.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,r=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return r},set:function(n){r=n}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(n){e=n.trim()},get:function(){return e||null}})};ml(G2e,_d);var X2e=function(){_d.call(this);var e,r=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return r.length>0?r:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return r}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var n=function(i){return i};return this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),"("+nx(n(e))+")"}},set:function(n){e=n}})};ml(X2e,_d);var Uu=function e(){_d.call(this);var r=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return r},set:function(x){if(isNaN(x))throw new Error('Invalid value "'+x+'" for attribute F supplied.');r=x}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!ma(r,3)},set:function(x){x?this.F=pa(r,3):this.F=Aa(r,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(x){if(isNaN(x))throw new Error('Invalid value "'+x+'" for attribute Ff supplied.');n=x}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(i.length!==0)return i},set:function(x){i=x!==void 0?x:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:i[0]},set:function(x){i[0]=x}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:i[1]},set:function(x){i[1]=x}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:i[2]},set:function(x){i[2]=x}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:i[3]},set:function(x){i[3]=x}});var a="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return a},set:function(x){switch(x){case"/Btn":case"/Tx":case"/Ch":case"/Sig":a=x;break;default:throw new Error('Invalid value "'+x+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof LB)return;o="FieldObject"+e.FieldNum++}var x=function(b){return b};return this.scope&&(x=this.scope.internal.getEncryptor(this.objId)),"("+nx(x(o))+")"},set:function(x){o=x.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(x){o=x}});var l="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return l},set:function(x){l=x}});var c="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return c},set:function(x){c=x}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(x){u=x}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/bH:d},set:function(x){d=x}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(x){h=x}});var f="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!f||this instanceof LB||this instanceof og))return QO(f,this.objId,this.scope)},set:function(x){x=x.toString(),f=x}});var p=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof cs==0?QO(p,this.objId,this.scope):p},set:function(x){x=x.toString(),p=this instanceof cs==0?x.substr(0,1)==="("?Zx(x.substr(1,x.length-2)):Zx(x):x}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof cs==1?Zx(p.substr(1,p.length-1)):p},set:function(x){x=x.toString(),p=this instanceof cs==1?"/"+Lg(x):x}});var m=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(m)return m},set:function(x){this.V=x}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(m)return this instanceof cs==0?QO(m,this.objId,this.scope):m},set:function(x){x=x.toString(),m=this instanceof cs==0?x.substr(0,1)==="("?Zx(x.substr(1,x.length-2)):Zx(x):x}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof cs==1?Zx(m.substr(1,m.length-1)):m},set:function(x){x=x.toString(),m=this instanceof cs==1?"/"+Lg(x):x}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var A,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(x){x=!!x,g=x}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(A)return A},set:function(x){A=x}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,1)},set:function(x){x?this.Ff=pa(this.Ff,1):this.Ff=Aa(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,2)},set:function(x){x?this.Ff=pa(this.Ff,2):this.Ff=Aa(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,3)},set:function(x){x?this.Ff=pa(this.Ff,3):this.Ff=Aa(this.Ff,3)}});var y=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(y!==null)return y},set:function(x){if([0,1,2].indexOf(x)===-1)throw new Error('Invalid value "'+x+'" for attribute Q supplied.');y=x}}),Object.defineProperty(this,"textAlign",{get:function(){var x;switch(y){case 0:default:x="left";break;case 1:x="center";break;case 2:x="right"}return x},configurable:!0,enumerable:!0,set:function(x){switch(x){case"right":case 2:y=2;break;case"center":case 1:y=1;break;default:y=0}}})};ml(Uu,_d);var pv=function(){Uu.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(n){e=n}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(n){e=n}});var r=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return K2e(r,this.objId,this.scope)},set:function(n){var i,a;a=[],typeof(i=n)=="string"&&(a=function(o,l,c){c||(c=1);for(var u,d=[];u=l.exec(o);)d.push(u[c]);return d}(i,/\((.*?)\)/g)),r=a}}),this.getOptions=function(){return r},this.setOptions=function(n){r=n,this.sort&&r.sort()},this.addOption=function(n){n=(n=n||"").toString(),r.push(n),this.sort&&r.sort()},this.removeOption=function(n,i){for(i=i||!1,n=(n=n||"").toString();r.indexOf(n)!==-1&&(r.splice(r.indexOf(n),1),i!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,18)},set:function(n){n?this.Ff=pa(this.Ff,18):this.Ff=Aa(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,19)},set:function(n){this.combo===!0&&(n?this.Ff=pa(this.Ff,19):this.Ff=Aa(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,20)},set:function(n){n?(this.Ff=pa(this.Ff,20),r.sort()):this.Ff=Aa(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,22)},set:function(n){n?this.Ff=pa(this.Ff,22):this.Ff=Aa(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,23)},set:function(n){n?this.Ff=pa(this.Ff,23):this.Ff=Aa(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,27)},set:function(n){n?this.Ff=pa(this.Ff,27):this.Ff=Aa(this.Ff,27)}}),this.hasAppearanceStream=!1};ml(pv,Uu);var Av=function(){pv.call(this),this.fontName="helvetica",this.combo=!1};ml(Av,pv);var gv=function(){Av.call(this),this.combo=!0};ml(gv,Av);var Ok=function(){gv.call(this),this.edit=!0};ml(Ok,gv);var cs=function(){Uu.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,15)},set:function(n){n?this.Ff=pa(this.Ff,15):this.Ff=Aa(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,16)},set:function(n){n?this.Ff=pa(this.Ff,16):this.Ff=Aa(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,17)},set:function(n){n?this.Ff=pa(this.Ff,17):this.Ff=Aa(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,26)},set:function(n){n?this.Ff=pa(this.Ff,26):this.Ff=Aa(this.Ff,26)}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(o){return o};if(this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),Object.keys(r).length!==0){var i,a=[];for(i in a.push("<<"),r)a.push("/"+i+" ("+nx(n(r[i]))+")");return a.push(">>"),a.join(`
3293`)}},set:function(n){$n(n)==="object"&&(r=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(n){typeof n=="string"&&(r.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(n){var i=n==null?"":n.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),e="/"+Lg(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(n){e="/"+Lg(n)}})};ml(cs,Uu);var Lk=function(){cs.call(this),this.pushButton=!0};ml(Lk,cs);var xv=function(){cs.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(r){e=r!==void 0?r:[]}})};ml(xv,cs);var LB=function(){var e,r;Uu.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(a){e=a}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return r},set:function(a){r=a}});var n,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var a=function(c){return c};this.scope&&(a=this.scope.internal.getEncryptor(this.objId));var o,l=[];for(o in l.push("<<"),i)l.push("/"+o+" ("+nx(a(i[o]))+")");return l.push(">>"),l.join(`
3294`)},set:function(a){$n(a)==="object"&&(i=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(a){typeof a=="string"&&(i.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(a){var o=a==null?"":a.toString();o.substr(0,1)==="/"&&(o=o.substr(1)),n="/"+Lg(o)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(a){var o=a==null?"":a.toString();o.substr(0,1)==="/"&&(o=o.substr(1)),n="/"+Lg(o)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Qt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};ml(LB,Uu),xv.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var r in this.Kids)if(this.Kids.hasOwnProperty(r)){var n=this.Kids[r];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},xv.prototype.createOption=function(e){var r=new LB;return r.Parent=this,r.optionName=e,this.Kids.push(r),I6t.call(this.scope,r),r};var Rk=function(){cs.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Qt.CheckBox.createAppearanceStream()};ml(Rk,cs);var og=function(){Uu.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,13)},set:function(r){r?this.Ff=pa(this.Ff,13):this.Ff=Aa(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,21)},set:function(r){r?this.Ff=pa(this.Ff,21):this.Ff=Aa(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,23)},set:function(r){r?this.Ff=pa(this.Ff,23):this.Ff=Aa(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,24)},set:function(r){r?this.Ff=pa(this.Ff,24):this.Ff=Aa(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,25)},set:function(r){r?this.Ff=pa(this.Ff,25):this.Ff=Aa(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,26)},set:function(r){r?this.Ff=pa(this.Ff,26):this.Ff=Aa(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(r){Number.isInteger(r)&&(e=r)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};ml(og,Uu);var Dk=function(){og.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!ma(this.Ff,14)},set:function(e){e?this.Ff=pa(this.Ff,14):this.Ff=Aa(this.Ff,14)}}),this.password=!0};ml(Dk,og);var Qt={CheckBox:{createAppearanceStream:function(){return{N:{On:Qt.CheckBox.YesNormal},D:{On:Qt.CheckBox.YesPushDown,Off:Qt.CheckBox.OffPushDown}}},YesPushDown:function(e){var r=ed(e);r.scope=e.scope;var n=[],i=e.scope.internal.getFont(e.fontName,e.fontStyle).id,a=e.scope.__private__.encodeColorString(e.color),o=T6(e,e.caption);return n.push("0.749023 g"),n.push("0 0 "+Tr(Qt.internal.getWidth(e))+" "+Tr(Qt.internal.getHeight(e))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+i+" "+Tr(o.fontSize)+" Tf "+a),n.push("BT"),n.push(o.text),n.push("ET"),n.push("Q"),n.push("EMC"),r.stream=n.join(`
3295`),r},YesNormal:function(e){var r=ed(e);r.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),a=[],o=Qt.internal.getHeight(e),l=Qt.internal.getWidth(e),c=T6(e,e.caption);return a.push("1 g"),a.push("0 0 "+Tr(l)+" "+Tr(o)+" re"),a.push("f"),a.push("q"),a.push("0 0 1 rg"),a.push("0 0 "+Tr(l-1)+" "+Tr(o-1)+" re"),a.push("W"),a.push("n"),a.push("0 g"),a.push("BT"),a.push("/"+n+" "+Tr(c.fontSize)+" Tf "+i),a.push(c.text),a.push("ET"),a.push("Q"),r.stream=a.join(`
3296`),r},OffPushDown:function(e){var r=ed(e);r.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Tr(Qt.internal.getWidth(e))+" "+Tr(Qt.internal.getHeight(e))+" re"),n.push("f"),r.stream=n.join(`
3297`),r}},RadioButton:{Circle:{createAppearanceStream:function(e){var r={D:{Off:Qt.RadioButton.Circle.OffPushDown},N:{}};return r.N[e]=Qt.RadioButton.Circle.YesNormal,r.D[e]=Qt.RadioButton.Circle.YesPushDown,r},getCA:function(){return"l"},YesNormal:function(e){var r=ed(e);r.scope=e.scope;var n=[],i=Qt.internal.getWidth(e)<=Qt.internal.getHeight(e)?Qt.internal.getWidth(e)/4:Qt.internal.getHeight(e)/4;i=Number((.9*i).toFixed(5));var a=Qt.internal.Bezier_C,o=Number((i*a).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+qf(Qt.internal.getWidth(e)/2)+" "+qf(Qt.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),r.stream=n.join(`
3298`),r},YesPushDown:function(e){var r=ed(e);r.scope=e.scope;var n=[],i=Qt.internal.getWidth(e)<=Qt.internal.getHeight(e)?Qt.internal.getWidth(e)/4:Qt.internal.getHeight(e)/4;i=Number((.9*i).toFixed(5));var a=Number((2*i).toFixed(5)),o=Number((a*Qt.internal.Bezier_C).toFixed(5)),l=Number((i*Qt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+qf(Qt.internal.getWidth(e)/2)+" "+qf(Qt.internal.getHeight(e)/2)+" cm"),n.push(a+" 0 m"),n.push(a+" "+o+" "+o+" "+a+" 0 "+a+" c"),n.push("-"+o+" "+a+" -"+a+" "+o+" -"+a+" 0 c"),n.push("-"+a+" -"+o+" -"+o+" -"+a+" 0 -"+a+" c"),n.push(o+" -"+a+" "+a+" -"+o+" "+a+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+qf(Qt.internal.getWidth(e)/2)+" "+qf(Qt.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+l+" "+l+" "+i+" 0 "+i+" c"),n.push("-"+l+" "+i+" -"+i+" "+l+" -"+i+" 0 c"),n.push("-"+i+" -"+l+" -"+l+" -"+i+" 0 -"+i+" c"),n.push(l+" -"+i+" "+i+" -"+l+" "+i+" 0 c"),n.push("f"),n.push("Q"),r.stream=n.join(`
3299`),r},OffPushDown:function(e){var r=ed(e);r.scope=e.scope;var n=[],i=Qt.internal.getWidth(e)<=Qt.internal.getHeight(e)?Qt.internal.getWidth(e)/4:Qt.internal.getHeight(e)/4;i=Number((.9*i).toFixed(5));var a=Number((2*i).toFixed(5)),o=Number((a*Qt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+qf(Qt.internal.getWidth(e)/2)+" "+qf(Qt.internal.getHeight(e)/2)+" cm"),n.push(a+" 0 m"),n.push(a+" "+o+" "+o+" "+a+" 0 "+a+" c"),n.push("-"+o+" "+a+" -"+a+" "+o+" -"+a+" 0 c"),n.push("-"+a+" -"+o+" -"+o+" -"+a+" 0 -"+a+" c"),n.push(o+" -"+a+" "+a+" -"+o+" "+a+" 0 c"),n.push("f"),n.push("Q"),r.stream=n.join(`
3300`),r}},Cross:{createAppearanceStream:function(e){var r={D:{Off:Qt.RadioButton.Cross.OffPushDown},N:{}};return r.N[e]=Qt.RadioButton.Cross.YesNormal,r.D[e]=Qt.RadioButton.Cross.YesPushDown,r},getCA:function(){return"8"},YesNormal:function(e){var r=ed(e);r.scope=e.scope;var n=[],i=Qt.internal.calculateCross(e);return n.push("q"),n.push("1 1 "+Tr(Qt.internal.getWidth(e)-2)+" "+Tr(Qt.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(Tr(i.x1.x)+" "+Tr(i.x1.y)+" m"),n.push(Tr(i.x2.x)+" "+Tr(i.x2.y)+" l"),n.push(Tr(i.x4.x)+" "+Tr(i.x4.y)+" m"),n.push(Tr(i.x3.x)+" "+Tr(i.x3.y)+" l"),n.push("s"),n.push("Q"),r.stream=n.join(`
3301`),r},YesPushDown:function(e){var r=ed(e);r.scope=e.scope;var n=Qt.internal.calculateCross(e),i=[];return i.push("0.749023 g"),i.push("0 0 "+Tr(Qt.internal.getWidth(e))+" "+Tr(Qt.internal.getHeight(e))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+Tr(Qt.internal.getWidth(e)-2)+" "+Tr(Qt.internal.getHeight(e)-2)+" re"),i.push("W"),i.push("n"),i.push(Tr(n.x1.x)+" "+Tr(n.x1.y)+" m"),i.push(Tr(n.x2.x)+" "+Tr(n.x2.y)+" l"),i.push(Tr(n.x4.x)+" "+Tr(n.x4.y)+" m"),i.push(Tr(n.x3.x)+" "+Tr(n.x3.y)+" l"),i.push("s"),i.push("Q"),r.stream=i.join(`
3302`),r},OffPushDown:function(e){var r=ed(e);r.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Tr(Qt.internal.getWidth(e))+" "+Tr(Qt.internal.getHeight(e))+" re"),n.push("f"),r.stream=n.join(`
3303`),r}}},createDefaultAppearanceStream:function(e){var r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return"/"+r+" "+e.fontSize+" Tf "+n}};Qt.internal={Bezier_C:.551915024494,calculateCross:function(e){var r=Qt.internal.getWidth(e),n=Qt.internal.getHeight(e),i=Math.min(r,n);return{x1:{x:(r-i)/2,y:(n-i)/2+i},x2:{x:(r-i)/2+i,y:(n-i)/2},x3:{x:(r-i)/2,y:(n-i)/2},x4:{x:(r-i)/2+i,y:(n-i)/2+i}}}},Qt.internal.getWidth=function(e){var r=0;return $n(e)==="object"&&(r=bie(e.Rect[2])),r},Qt.internal.getHeight=function(e){var r=0;return $n(e)==="object"&&(r=bie(e.Rect[3])),r};var I6t=ra.addField=function(e){if(P6t(this,e),!(e instanceof Uu))throw new Error("Invalid argument passed to 
3303jsPDF.addField.");var r;return(r=e).scope.internal.acroformPlugin.printedOut&&(r.scope.internal.acroformPlugin.printedOut=!1,r.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),r.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(r),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};ra.AcroFormChoiceField=pv,ra.AcroFormListBox=Av,ra.AcroFormComboBox=gv,ra.AcroFormEditBox=Ok,ra.AcroFormButton=cs,ra.AcroFormPushButton=Lk,ra.AcroFormRadioButton=xv,ra.AcroFormCheckBox=Rk,ra.AcroFormTextField=og,ra.AcroFormPasswordField=Dk,ra.AcroFormAppearance=Qt,ra.AcroForm={ChoiceField:pv,ListBox:Av,ComboBox:gv,EditBox:Ok,Button:cs,PushButton:Lk,RadioButton:xv,CheckBox:Rk,TextField:og,PasswordField:Dk,Appearance:Qt},sr.AcroForm={ChoiceField:pv,ListBox:Av,ComboBox:gv,EditBox:Ok,Button:cs,PushButton:Lk,RadioButton:xv,CheckBox:Rk,TextField:og,PasswordField:Dk,Appearance:Qt};function Y2e(e){return e.reduce(function(r,n,i){return r[n]=i,r},{})}(function(e){var r="addImage_";e.__addimage__={};var n="UNKNOWN",i={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},a=e.__addimage__.getImageFileTypeByImageData=function(B,T){var F,I,D,L,V,U=n;if((T=T||n)==="RGBA"||B.data!==void 0&&B.data instanceof Uint8ClampedArray&&"height"in B&&"width"in B)return"RGBA";if(C(B))for(V in i)for(D=i[V],F=0;F<D.length;F+=1){for(L=!0,I=0;I<D[F].length;I+=1)if(D[F][I]!==void 0&&D[F][I]!==B[I]){L=!1;break}if(L===!0){U=V;break}}else for(V in i)for(D=i[V],F=0;F<D.length;F+=1){for(L=!0,I=0;I<D[F].length;I+=1)if(D[F][I]!==void 0&&D[F][I]!==B.charCodeAt(I)){L=!1;break}if(L===!0){U=V;break}}return U===n&&T!==n&&(U=T),U},o=function B(T){for(var F=this.internal.write,I=this.internal.putStream,D=(0,this.internal.getFilters)();D.indexOf("FlateEncode")!==-1;)D.splice(D.indexOf("FlateEncode"),1);T.objectId=this.internal.newObject();var L=[];if(L.push({key:"Type",value:"/XObject"}),L.push({key:"Subtype",value:"/Image"}),L.push({key:"Width",value:T.width}),L.push({key:"Height",value:T.height}),T.colorSpace===x.INDEXED?L.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(T.palette.length/3-1)+" "+("sMask"in T&&T.sMask!==void 0?T.objectId+2:T.objectId+1)+" 0 R]"}):(L.push({key:"ColorSpace",value:"/"+T.colorSpace}),T.colorSpace===x.DEVICE_CMYK&&L.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),L.push({key:"BitsPerComponent",value:T.bitsPerComponent}),"decodeParameters"in T&&T.decodeParameters!==void 0&&L.push({key:"DecodeParms",value:"<<"+T.decodeParameters+">>"}),"transparency"in T&&Array.isArray(T.transparency)&&T.transparency.length>0){for(var V="",U=0,Q=T.transparency.length;U<Q;U++)V+=T.transparency[U]+" "+T.transparency[U]+" ";L.push({key:"Mask",value:"["+V+"]"})}T.sMask!==void 0&&L.push({key:"SMask",value:T.objectId+1+" 0 R"});var $=T.filter!==void 0?["/"+T.filter]:void 0;if(I({data:T.data,additionalKeyValues:L,alreadyAppliedFilters:$,objectId:T.objectId}),F("endobj"),"sMask"in T&&T.sMask!==void 0){var q,M=(q=T.sMaskBitsPerComponent)!==null&&q!==void 0?q:T.bitsPerComponent,z={width:T.width,height:T.height,colorSpace:"DeviceGray",bitsPerComponent:M,data:T.sMask};"filter"in T&&(z.decodeParameters="/Predictor ".concat(T.predictor," /Colors 1 /BitsPerComponent ").concat(M," /Columns ").concat(T.width),z.filter=T.filter),B.call(this,z)}if(T.colorSpace===x.INDEXED){var K=this.internal.newObject();I({data:S(new Uint8Array(T.palette)),objectId:K}),F("endobj")}},l=function(){var B=this.internal.collections[r+"images"];for(var T in B)o.call(this,B[T])},c=function(){var B,T=this.internal.collections[r+"images"],F=this.internal.write;for(var I in T)F("/I"+(B=T[I]).index,B.objectId,"0","R")},u=function(){this.internal.collections[r+"images"]||(this.internal.collections[r+"images"]={},this.internal.events.subscribe("putResources",l),this.internal.events.subscribe("putXobjectDict",c))},d=function(){var B=this.internal.collections[r+"images"];return u.call(this),B},h=function(){return Object.keys(this.internal.collections[r+"images"]).length},f=function(B){return typeof e["process"+B.toUpperCase()]=="function"},p=function(B){return $n(B)==="object"&&B.nodeType===1},m=function(B,T){if(B.nodeName==="IMG"&&B.hasAttribute("src")){var F=""+B.getAttribute("src");if(F.indexOf("data:image/")===0)return Fk(unescape(F).split("base64,").pop());var I=e.loadFile(F,!0);if(I!==void 0)return I}if(B.nodeName==="CANVAS"){if(B.width===0||B.height===0)throw new Error("Given canvas must have data. Canvas width: "+B.width+", height: "+B.height);var D;switch(T){case"PNG":D="image/png";break;case"WEBP":D="image/webp";break;default:D="image/jpeg"}return Fk(B.toDataURL(D,1).split("base64,").pop())}},A=function(B){var T=this.internal.collections[r+"images"];if(T){for(var F in T)if(B===T[F].alias)return T[F]}},g=function(B,T,F){return B||T||(B=-96,T=-96),B<0&&(B=-1*F.width*72/B/this.internal.scaleFactor),T<0&&(T=-1*F.height*72/T/this.internal.scaleFactor),B===0&&(B=T*F.width/F.height),T===0&&(T=B*F.height/F.width),[B,T]},y=function(B,T,F,I,D,L){var V=g.call(this,F,I,D),U=this.internal.getCoordinateString,Q=this.internal.getVerticalCoordinateString,$=d.call(this);if(F=V[0],I=V[1],$[D.index]=D,L){L*=Math.PI/180;var q=Math.cos(L),M=Math.sin(L),z=function(ne){return ne.toFixed(4)},K=[z(q),z(M),z(-1*M),z(q),0,0,"cm"]}this.internal.write("q"),L?(this.internal.write([1,"0","0",1,U(B),Q(T+I),"cm"].join(" ")),this.internal.write(K.join(" ")),this.internal.write([U(F),"0","0",U(I),"0","0","cm"].join(" "))):this.internal.write([U(F),"0","0",U(I),U(B),Q(T+I),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+D.index+" Do"),this.internal.write("Q")},x=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var b=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},v=e.__addimage__.sHashCode=function(B){var T,F,I=0;
vendor: 7,405 bytes, line 3303
3303if(typeof B=="string")for(F=B.length,T=0;T<F;T++)I=(I<<5)-I+B.charCodeAt(T),I|=0;else if(C(B))for(F=B.byteLength/2,T=0;T<F;T++)I=(I<<5)-I+B[T],I|=0;return I},j=e.__addimage__.validateStringAsBase64=function(B){(B=B||"").toString().trim();var T=!0;return B.length===0&&(T=!1),B.length%4!=0&&(T=!1),/^[A-Za-z0-9+/]+$/.test(B.substr(0,B.length-2))===!1&&(T=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(B.substr(-2))===!1&&(T=!1),T},_=e.__addimage__.extractImageFromDataUrl=function(B){if(B==null||!(B=B.trim()).startsWith("data:"))return null;var T=B.indexOf(",");return T<0?null:B.substring(0,T).trim().endsWith("base64")?B.substring(T+1):null};e.__addimage__.isArrayBuffer=function(B){return B instanceof ArrayBuffer};var C=e.__addimage__.isArrayBufferView=function(B){return B instanceof Int8Array||B instanceof Uint8Array||B instanceof Uint8ClampedArray||B instanceof Int16Array||B instanceof Uint16Array||B instanceof Int32Array||B instanceof Uint32Array||B instanceof Float32Array||B instanceof Float64Array},N=e.__addimage__.binaryStringToUint8Array=function(B){for(var T=B.length,F=new Uint8Array(T),I=0;I<T;I++)F[I]=B.charCodeAt(I);return F},S=e.__addimage__.arrayBufferToBinaryString=function(B){for(var T="",F=C(B)?B:new Uint8Array(B),I=0;I<F.length;I+=8192)T+=String.fromCharCode.apply(null,F.subarray(I,I+8192));return T};e.addImage=function(){var B,T,F,I,D,L,V,U,Q;if(typeof arguments[1]=="number"?(T=n,F=arguments[1],I=arguments[2],D=arguments[3],L=arguments[4],V=arguments[5],U=arguments[6],Q=arguments[7]):(T=arguments[1],F=arguments[2],I=arguments[3],D=arguments[4],L=arguments[5],V=arguments[6],U=arguments[7],Q=arguments[8]),$n(B=arguments[0])==="object"&&!p(B)&&"imageData"in B){var $=B;B=$.imageData,T=$.format||T||n,F=$.x||F||0,I=$.y||I||0,D=$.w||$.width||D,L=$.h||$.height||L,V=$.alias||V,U=$.compression||U,Q=$.rotation||$.angle||Q}var q=this.internal.getFilters();if(U===void 0&&q.indexOf("FlateEncode")!==-1&&(U="SLOW"),isNaN(F)||isNaN(I))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var M=E.call(this,B,T,V,U);return y.call(this,F,I,D,L,M,Q),this};var E=function(B,T,F,I){var D,L,V;if(typeof B=="string"&&a(B)===n){B=unescape(B);var U=O(B,!1);(U!==""||(U=e.loadFile(B,!0))!==void 0)&&(B=U)}if(p(B)&&(B=m(B,T)),T=a(B,T),!f(T))throw new Error("addImage does not support files of type '"+T+"', please ensure that a plugin for '"+T+"' support is added.");if(((V=F)==null||V.length===0)&&(F=function(Q){return typeof Q=="string"||C(Q)?v(Q):C(Q.data)?v(Q.data):null}(B)),(D=A.call(this,F))||(B instanceof Uint8Array||T==="RGBA"||(L=B,B=N(B)),D=this["process"+T.toUpperCase()](B,h.call(this),F,function(Q){return Q&&typeof Q=="string"&&(Q=Q.toUpperCase()),Q in e.image_compression?Q:b.NONE}(I),L)),!D)throw new Error("An unknown error occurred whilst processing the image.");return D},O=e.__addimage__.convertBase64ToBinaryString=function(B,T){T=typeof T!="boolean"||T;var F,I="";if(typeof B=="string"){var D;F=(D=_(B))!==null&&D!==void 0?D:B;try{I=Fk(F)}catch(L){if(T)throw j(F)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+L.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return I};e.getImageProperties=function(B){var T,F,I="";if(p(B)&&(B=m(B)),typeof B=="string"&&a(B)===n&&((I=O(B,!1))===""&&(I=e.loadFile(B)||""),B=I),F=a(B),!f(F))throw new Error("addImage does not support files of type '"+F+"', please ensure that a plugin for '"+F+"' support is added.");if(B instanceof Uint8Array||(B=N(B)),!(T=this["process"+F.toUpperCase()](B)))throw new Error("An unknown error occurred whilst processing the image");return T.fileType=F,T}})(sr.API),function(e){var r=function(n){if(n!==void 0&&n!="")return!0};sr.API.events.push(["addPage",function(n){this.internal.getPageInfo(n.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(n){for(var i,a,o,l=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString,u=this.internal.getPageInfoByObjId(n.objId),d=n.pageContext.annotations,h=!1,f=0;f<d.length&&!h;f++)switch((i=d[f]).type){case"link":(r(i.options.url)||r(i.options.pageNumber))&&(h=!0);break;case"reference":case"text":case"freetext":h=!0}if(h!=0){this.internal.write("/Annots [");for(var p=0;p<d.length;p++){i=d[p];var m=this.internal.pdfEscape,A=this.internal.getEncryptor(n.objId);switch(i.type){case"reference":this.internal.write(" "+i.object.objId+" 0 R ");break;case"text":var g=this.internal.newAdditionalObject(),y=this.internal.newAdditionalObject(),x=this.internal.getEncryptor(g.objId),b=i.title||"Note";o="<</Type /Annot /Subtype /Text "+(a="/Rect ["+l(i.bounds.x)+" "+c(i.bounds.y+i.bounds.h)+" "+l(i.bounds.x+i.bounds.w)+" "+c(i.bounds.y)+"] ")+"/Contents ("+m(x(i.contents))+")",o+=" /Popup "+y.objId+" 0 R",o+=" /P "+u.objId+" 0 R",o+=" /T ("+m(x(b))+") >>",g.content=o;var v=g.objId+" 0 R";o="<</Type /Annot /Subtype /Popup "+(a="/Rect ["+l(i.bounds.x+30)+" "+c(i.bounds.y+i.bounds.h)+" "+l(i.bounds.x+i.bounds.w+30)+" "+c(i.bounds.y)+"] ")+" /Parent "+v,i.open&&(o+=" /Open true"),o+=" >>",y.content=o,this.internal.write(g.objId,"0 R",y.objId,"0 R");break;case"freetext":a="/Rect ["+l(i.bounds.x)+" "+c(i.bounds.y)+" "+l(i.bounds.x+i.bounds.w)+" "+c(i.bounds.y+i.bounds.h)+"] ";var j="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(i.color||"#000000");o="<</Type /Annot /Subtype /FreeText "+a+"/Contents ("+m(A(i.contents))+")",o+=" /DS("+m(A(j))+")",o+=" /Border [0 0 0]",o+=" >>",this.internal.write(o);break;case"link":if(i.options.name){var _=this.annotations._nameMap[i.options.name];i.options.pageNumber=_.page,i.options.top=_.y}else i.options.top||(i.options.top=0);if(a="/Rect ["+i.finalBounds.x+" "+i.finalBounds.y+" "+i.finalBounds.w+" "+i.finalBounds.h+"] ",o="",i.options.url)o="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /A <</S /URI /URI ("+m(A(i.options.url))+") >>";else if(i.options.pageNumber)switch(o="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(i.options.pageNumber).objId+" 0 R",i.options.magFactor=i.options.magFactor||"XYZ",i.options.magFactor){case"Fit":o+=" /Fit]";break;case"FitH":o+=" /FitH "+i.options.top+"]";break;case"FitV":i.options.left=i.options.left||0,o+=" /FitV "+i.options.left+"]";break;default:var C=c(i.options.top);i.options.left=i.options.left||0,i.options.zoom===void 0&&(i.options.zoom=0),o+=" /XYZ "+i.options.left+" "+C+" "+i.options.zoom+"]"}o!=""&&(o+=" >>",this.internal.write(o))}}this.internal.write("]")}}]),e.createAnnotation=function(n){var i=this.internal.getCurrentPageInfo();switch(n.type){case"link":this.link(n.bounds.x,n.bounds.y,n.bounds.w,n.bounds.h,n);break;case"text":case"freetext":i.pageContext.annotations.push(n)}},e.link=function(n,i,a,o,l){var c=this.internal.getCurrentPageInfo(),u=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString;c.pageContext.annotations.push({finalBounds:{x:u(n),y:d(i),w:u(n+a),h:d(i+o)},options:l,type:"link"})},e.textWithLink=function(n,i,a,o){var l,c,u=this.getTextWidth(n),d=this.internal.getLineHeight()/this.internal.scaleFactor;if(o.maxWidth!==void 0){c=o.maxWidth;var h=this.splitTextToSize(n,c).length;l=Math.ceil(d*h)}else c=u,l=d;return this.text(n,i,a,o),a+=.2*d,o.align==="center"&&(i-=u/2),o.align==="right"&&(i-=u),this.link(i,a-d,c,l,o),u},e.getTextWidth=function(n){var i=this.internal.getFontSize();
3303return this.getStringUnitWidth(n)*i/this.internal.scaleFactor}}(sr.API),function(e){var r={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,6437
vendor: 53,447 bytes, lines 3303-3340
33037],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},i={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},a=[1570,1571,1573,1575];e.__arabicParser__={};var o=e.__arabicParser__.isInArabicSubstitutionA=function(g){return r[g.charCodeAt(0)]!==void 0},l=e.__arabicParser__.isArabicLetter=function(g){return typeof g=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(g)},c=e.__arabicParser__.isArabicEndLetter=function(g){return l(g)&&o(g)&&r[g.charCodeAt(0)].length<=2},u=e.__arabicParser__.isArabicAlfLetter=function(g){return l(g)&&a.indexOf(g.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(g){return l(g)&&o(g)&&r[g.charCodeAt(0)].length>=1};var d=e.__arabicParser__.arabicLetterHasFinalForm=function(g){return l(g)&&o(g)&&r[g.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(g){return l(g)&&o(g)&&r[g.charCodeAt(0)].length>=3};var h=e.__arabicParser__.arabicLetterHasMedialForm=function(g){return l(g)&&o(g)&&r[g.charCodeAt(0)].length==4},f=e.__arabicParser__.resolveLigatures=function(g){var y=0,x=n,b="",v=0;for(y=0;y<g.length;y+=1)x[g.charCodeAt(y)]!==void 0?(v++,typeof(x=x[g.charCodeAt(y)])=="number"&&(b+=String.fromCharCode(x),x=n,v=0),y===g.length-1&&(x=n,b+=g.charAt(y-(v-1)),y-=v-1,v=0)):(x=n,b+=g.charAt(y-v),y-=v,v=0);return b};e.__arabicParser__.isArabicDiacritic=function(g){return g!==void 0&&i[g.charCodeAt(0)]!==void 0};var p=e.__arabicParser__.getCorrectForm=function(g,y,x){return l(g)?o(g)===!1?-1:!d(g)||!l(y)&&!l(x)||!l(x)&&c(y)||c(g)&&!l(y)||c(g)&&u(y)||c(g)&&c(y)?0:h(g)&&l(y)&&!c(y)&&l(x)&&d(x)?3:c(g)||!l(x)?1:2:-1},m=function(g){var y=0,x=0,b=0,v="",j="",_="",C=(g=g||"").split("\\s+"),N=[];for(y=0;y<C.length;y+=1){for(N.push(""),x=0;x<C[y].length;x+=1)v=C[y][x],j=C[y][x-1],_=C[y][x+1],l(v)?(b=p(v,j,_),N[y]+=b!==-1?String.fromCharCode(r[v.charCodeAt(0)][b]):v):N[y]+=v;N[y]=f(N[y])}return N.join(" ")},A=e.__arabicParser__.processArabic=e.processArabic=function(){var g,y=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,x=[];if(Array.isArray(y)){var b=0;for(x=[],b=0;b<y.length;b+=1)Array.isArray(y[b])?x.push([m(y[b][0]),y[b][1],y[b][2]]):x.push([m(y[b])]);g=x}else g=m(y);return typeof arguments[0]=="string"?g:(arguments[0].text=g,arguments[0])};e.events.push(["preProcessText",A])}(sr.API),sr.API.autoPrint=function(e){var r;return(e=e||{}).variant=e.variant||"non-conform",e.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){r=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+r+" 0 R")})),this},function(e){var r=function(){var n=void 0;Object.defineProperty(this,"pdf",{get:function(){return n},set:function(c){n=c}});var i=150;Object.defineProperty(this,"width",{get:function(){return i},set:function(c){i=isNaN(c)||Number.isInteger(c)===!1||c<0?150:c,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=i+1)}});var a=300;Object.defineProperty(this,"height",{get:function(){return a},set:function(c){a=isNaN(c)||Number.isInteger(c)===!1||c<0?300:c,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=a+1)}});var o=[];Object.defineProperty(this,"childNodes",{get:function(){return o},set:function(c){o=c}});var l={};Object.defineProperty(this,"style",{get:function(){return l},set:function(c){l=c}}),Object.defineProperty(this,"parentNode",{})};r.prototype.getContext=function(n,i){var a;if((n=n||"2d")!=="2d")return null;for(a in i)this.pdf.context2d.hasOwnProperty(a)&&(this.pdf.context2d[a]=i[a]);return this.pdf.context2d._canvas=this,this.pdf.context2d},r.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new r,this.canvas.pdf=this}])}(sr.API),function(e){var r={left:0,top:0,bottom:0,right:0},n=!1,i=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},r),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new o,this.internal.__cell__.pages=1},o=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(g){u=g}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(g){d=g}});var h=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return h},set:function(g){h=g}});var f=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return f},set:function(g){f=g}});var p=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return p},set:function(g){p=g}});var m=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return m},set:function(g){m=g}});var A=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return A},set:function(g){A=g}}),this};o.prototype.clone=function(){return new o(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},o.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(u){return i.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},e.getTextDimensions=function(u,d){i.call(this);var h=(d=d||{}).fontSize||this.getFontSize(),f=d.font||this.getFont(),p=d.scaleFactor||this.internal.scaleFactor,m=0,A=0,g=0,y=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");u=String(u)}var x=d.maxWidth;x>0?typeof u=="string"?u=this.splitTextToSize(u,x):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(v,j){return v.concat(y.splitTextToSize(j,x))},[])):u=Array.isArray(u)?u:[u];for(var b=0;b<u.length;b++)m<(g=this.getStringUnitWidth(u[b],{font:f})*h)&&(m=g);return m!==0&&(A=u.length),{w:m/=p,h:Math.max((A*h*this.getLineHeightFactor()-h*(this.getLineHeightFactor()-1))/p,0)}},e.cellAddPage=function(){i.call(this),this.addPage();var u=this.internal.__cell__.margins||r;return this.internal.__cell__.lastCell=new o(u.left,u.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var l=e.cell=function(){var u;u=arguments[0]instanceof o?arguments[0]:new o(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),i.call(this);var d=this.internal.__cell__.lastCell,h=this.internal.__cell__.padding,f=this.internal.__cell__.margins||r,p=this.internal.__cell__.tableHeaderRow,m=this.internal.__cell__.printHeaders;return d.lineNumber!==void 0&&(d.lineNumber===u.lineNumber?(u.x=(d.x||0)+(d.width||0),u.y=d.y||0):d.y+d.height+u.height+f.bottom>this.getPageHeight()?(this.cellAddPage(),u.y=f.top,m&&p&&(this.printHeaderRow(u.lineNumber,!0),u.y+=p[0].height)):u.y=d.y+d.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,n===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-h,u.y+h,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+h,{align:"center",baseline:"top",maxWidth:u.width-h-h}):this.text(u.text,u.x+h,u.y+h,{align:"left",baseline:"top",maxWidth:u.width-h-h})),this.internal.__cell__.lastCell=u,this};e.table=function(u,d,h,f,p){if(i.call(this),!h)throw new Error("No data for PDF table.");var m,A,g,y,x=[],b=[],v=[],j={},_={},C=[],N=[],S=(p=p||{}).autoSize||!1,E=p.printHeaders!==!1,O=p.css&&p.css["font-size"]!==void 0?16*p.css["font-size"]:p.fontSize||12,B=p.margins||Object.assign({width:this.getPageWidth()},r),T=typeof p.padding=="number"?p.padding:3,F=p.headerBackgroundColor||"#c8c8c8",I=p.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=E,this.internal.__cell__.margins=B,this.internal.__cell__.table_font_size=O,this.internal.__cell__.padding=T,this.internal.__cell__.headerBackgroundColor=F,this.internal.__cell__.headerTextColor=I,this.setFontSize(O),f==null)b=x=Object.keys(h[0]),v=x.map(function(){return"left"});else if(Array.isArray(f)&&$n(f[0])==="object")for(x=f.map(function($){return $.name}),b=f.map(function($){return $.prompt||$.name||""}),v=f.map(function($){return $.align||"left"}),m=0;m<f.length;m+=1)_[f[m].name]=.7499990551181103*f[m].width;else Array.isArray(f)&&typeof f[0]=="string"&&(b=x=f,v=x.map(function(){return"left"}));if(S||Array.isArray(f)&&typeof f[0]=="string")for(m=0;m<x.length;m+=1){for(j[y=x[m]]=h.map(function($){return $[y]}),this.setFont(void 0,"bold"),C.push(this.getTextDimensions(b[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),A=j[y],this.setFont(void 0,"normal"),g=0;g<A.length;g+=1)C.push(this.getTextDimensions(A[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);_[y]=Math.max.apply(null,C)+T+T,C=[]}if(E){var D={};for(m=0;m<x.length;m+=1)D[x[m]]={},D[x[m]].text=b[m],D[x[m]].align=v[m];var L=c.call(this,D,_);N=x.map(function($){return new o(u,d,_[$],L,D[$].text,void 0,D[$].align)}),this.setTableHeaderRow(N),this.printHeaderRow(1,!1)}var V=f.reduce(function($,q){return $[q.name]=q.align,$},{});for(m=0;m<h.length;m+=1){"rowStart"in p&&p.rowStart instanceof Function&&p.rowStart({row:m,data:h[m]},this);var U=c.call(this,h[m],_);for(g=0;g<x.length;g+=1){var Q=h[m][x[g]];"cellStart"in p&&p.cellStart instanceof Function&&p.cellStart({row:m,col:g,data:Q},this),l.call(this,new o(u,d,_[x[g]],U,Q,m+2,V[x[g]]))}}return this.internal.__cell__.table_x=u,this.internal.__cell__.table_y=d,this};var c=function(u,d){var h=this.internal.__cell__.padding,f=this.internal.__cell__.table_font_size,p=this.internal.scaleFactor;return Object.keys(u).map(function(m){var A=u[m];return this.splitTextToSize(A.hasOwnProperty("text")?A.text:A,d[m]-h-h)},this).map(function(m){return this.getLineHeightFactor()*m.length*f/p+h+h},this).reduce(function(m,A){return Math.max(m,A)},0)};e.setTableHeaderRow=function(u){i.call(this),this.internal.__cell__.tableHeaderRow=u},e.printHeaderRow=function(u,d){if(i.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var h;if(n=!0,typeof this.internal.__cell__.headerFunction=="function"){var f=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new o(f[0],f[1],f[2],f[3],void 0,-1)}this.setFont(void 0,"bold");for(var p=[],m=0;m<this.internal.__cell__.tableHeaderRow.length;m+=1){h=this.internal.__cell__.tableHeaderRow[m].clone(),d&&(h.y=this.internal.__cell__.margins.top||0,p.push(h)),h.lineNumber=u;var A=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),l.call(this,h),this.setTextColor(A)}p.length>0&&this.setTableHeaderRow(p),this.setFont(void 0,"normal"),n=!1}}(sr.API);var J2e={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Z2e=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],P6=Y2e(Z2e),eje=[100,200,300,400,500,600,700,800,900],F6t=Y2e(eje);function HO(e){var r=e.family.replace(/"|'/g,"").toLowerCase(),n=function(o){return J2e[o=o||"normal"]?o:"normal"}(e.style),i=function(o){return o?typeof o=="number"?o>=100&&o<=900&&o%100==0?o:400:/^\d00$/.test(o)?parseInt(o):o==="bold"?700:400:400}(e.weight),a=function(o){return typeof P6[o=o||"normal"]=="number"?o:"normal"}(e.stretch);return{family:r,style:n,weight:i,stretch:a,src:e.src||[],ref:e.ref||{name:r,style:[a,n,i].join(" ")}}}function wie(e,r,n,i){var a;for(a=n;a>=0&&a<r.length;a+=i)if(e[r[a]])return e[r[a]];for(a=n;a>=0&&a<r.length;a-=i)if(e[r[a]])return e[r[a]]}var O6t={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},jie={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function _ie(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function Cie(e){return e.trimLeft()}function L6t(e,r){for(var n=0;n<e.length;){if(e.charAt(n)===r)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function R6t(e){var r=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return r===null?null:[r[0],e.substring(r[0].length)]}var ey,US,Nie,Sie,kie,VO=["times"];function Eie(e,r,n,i,a){var o=4,l=Tie;switch(a){case sr.API.image_compression.FAST:o=1,l=Bie;break;case sr.API.image_compression.MEDIUM:o=6,l=Pie;break;case sr.API.image_compression.SLOW:o=9,l=Iie}e=function(u,d,h,f){for(var p,m=u.length/d,A=new Uint8Array(u.length+m),g=[D6t,Bie,Tie,Pie,Iie],y=0;y<m;y+=1){var x=y*d,b=u.subarray(x,x+d);if(f)A.set(f(b,h,p),x+y);else{for(var v=g.length,j=[],_=0;_<v;_+=1)j[_]=g[_](b,h,p);var C=z6t(j.concat());A.set(j[C],x+y)}p=b}return A}(e,r,Math.ceil(n*i/8),l);var c=y6(e,{level:o});return sr.API.__addimage__.arrayBufferToBinaryString(c)}function D6t(e){var r=Array.apply([],e);return r.unshift(0),r}function Bie(e,r){var n=e.length,i=[];i[0]=1;for(var a=0;a<n;a+=1){var o=e[a-r]||0;i[a+1]=e[a]-o+256&255}return i}function Tie(e,r,n){var i=e.length,a=[];a[0]=2;for(var o=0;o<i;o+=1){var l=n&&n[o]||0;a[o+1]=e[o]-l+256&255}return a}function Pie(e,r,n){var i=e.length,a=[];a[0]=3;for(var o=0;o<i;o+=1){var l=e[o-r]||0,c=n&&n[o]||0;a[o+1]=e[o]+256-(l+c>>>1)&255}return a}function Iie(e,r,n){var i=e.length,a=[];a[0]=4;for(var o=0;o<i;o+=1){var l=M6t(e[o-r]||0,n&&n[o]||0,n&&n[o-r]||0);a[o+1]=e[o]-l+256&255}return a}function M6t(e,r,n){if(e===r&&r===n)return e;var i=Math.abs(r-n),a=Math.abs(e-n),o=Math.abs(e+r-n-n);return i<=a&&i<=o?e:a<=o?r:n}function z6t(e){var r=e.map(function(n){return n.reduce(function(i,a){return i+Math.abs(a)},0)});return r.indexOf(Math.min.apply(null,r))}function WO(e,r,n){var i=r*n,a=Math.floor(i/8),o=16-(i-8*a+n),l=(1<<n)-1;return tje(e,a)>>o&l}function Fie(e,r,n,i){var a=n*i,o=Math.floor(a/8),l=16-(a-8*o+i),c=(1<<i)-1,u=(r&c)<<l;(function(d,h,f){if(h+1<d.byteLength)d.setUint16(h,f,!1);else{var p=f>>8&255;d.setUint8(h,p)}})(e,o,tje(e,o)&~(c<<l)&65535|u)}function tje(e,r){return r+1<e.byteLength?e.getUint16(r,!1):e.getUint8(r)<<8}function U6t(e){var r=0;if(e[r++]!==71||e[r++]!==73||e[r++]!==70||e[r++]!==56||(e[r++]+1&253)!=56||e[r++]!==97)throw new Error("Invalid GIF 87a/89a header.");var n=e[r++]|e[r++]<<8,i=e[r++]|e[r++]<<8,a=e[r++],o=a>>7,l=1<<1+(7&a);e[r++],e[r++];var c=null,u=null;o&&(c=r,u=l,r+=3*l);var d=!0,h=[],f=0,p=null,m=0,A=null;for(this.width=n,this.height=i;d&&r<e.length;)switch(e[r++]){case 33:switch(e[r++]){case 255:if(e[r]!==11||e[r+1]==78&&e[r+2]==69&&e[r+3]==84&&e[r+4]==83&&e[r+5]==67&&e[r+6]==65&&e[r+7]==80&&e[r+8]==69&&e[r+9]==50&&e[r+10]==46&&e[r+11]==48&&e[r+12]==3&&e[r+13]==1&&e[r+16]==0)r+=14,A=e[r++]|e[r++]<<8,r++;else for(r+=12;;){if(!((B=e[r++])>=0))throw Error("Invalid block size");if(B===0)break;r+=B}break;case 249:if(e[r++]!==4||e[r+4]!==0)throw new Error("Invalid graphics extension block.");var g=e[r++];f=e[r++]|e[r++]<<8,p=e[r++],1&g||(p=null),m=g>>2&7,r++;break;case 254:for(;;){if(!((B=e[r++])>=0))throw Error("Invalid block size");if(B===0)break;r+=B}break;default:throw new Error("Unknown graphic control label: 0x"+e[r-1].toString(16))}break;case 44:var y=e[r++]|e[r++]<<8,x=e[r++]|e[r++]<<8,b=e[r++]|e[r++]<<8,v=e[r++]|e[r++]<<8,j=e[r++],_=j>>6&1,C=1<<1+(7&j),N=c,S=u,E=!1;j>>7&&(E=!0,N=r,S=C,r+=3*C);var O=r;for(r++;;){var B;if(!((B=e[r++])>=0))throw Error("Invalid block size");if(B===0)break;r+=B}h.push({x:y,y:x,width:b,height:v,has_local_palette:E,palette_offset:N,palette_size:S,data_offset:O,data_length:r-O,transparent_index:p,interlaced:!!_,delay:f,disposal:m});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+e[r-1].toString(16))}this.numFrames=function(){return h.length},this.loopCount=function(){return A},this.frameInfo=function(T){if(T<0||T>=h.length)throw new Error("Frame index out of range.");return h[T]},this.decodeAndBlitFrameBGRA=function(T,F){var I=this.frameInfo(T),D=I.width*I.height;if(D>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var L=new Uint8Array(D);Oie(e,I.data_offset,L,D);var V=I.palette_offset,U=I.transparent_index;U===null&&(U=256);var Q=I.width,$=n-Q,q=Q,M=4*(I.y*n+I.x),z=4*((I.y+I.height)*n+I.x),K=M,ne=4*$;I.interlaced===!0&&(ne+=4*n*7);for(var ie=8,X=0,de=L.length;X<de;++X){var oe=L[X];if(q===0&&(q=Q,(K+=ne)>=z&&(ne=4*$+4*n*(ie-1),K=M+(Q+$)*(ie<<1),ie>>=1)),oe===U)K+=4;else{var ce=e[V+3*oe],ye=e[V+3*oe+1],ge=e[V+3*oe+2];F[K++]=ge,F[K++]=ye,F[K++]=ce,F[K++]=255}--q}},this.decodeAndBlitFrameRGBA=function(T,F){var I=this.frameInfo(T),D=I.width*I.height;if(D>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var L=new Uint8Array(D);Oie(e,I.data_offset,L,D);var V=I.palette_offset,U=I.transparent_index;U===null&&(U=256);var Q=I.width,$=n-Q,q=Q,M=4*(I.y*n+I.x),z=4*((I.y+I.height)*n+I.x),K=M,ne=4*$;I.interlaced===!0&&(ne+=4*n*7);for(var ie=8,X=0,de=L.length;X<de;++X){var oe=L[X];if(q===0&&(q=Q,(K+=ne)>=z&&(ne=4*$+4*n*(ie-1),K=M+(Q+$)*(ie<<1),ie>>=1)),oe===U)K+=4;else{var ce=e[V+3*oe],ye=e[V+3*oe+1],ge=e[V+3*oe+2];F[K++]=ce,F[K++]=ye,F[K++]=ge,F[K++]=255}--q}}}function Oie(e,r,n,i){for(var a=e[r++],o=1<<a,l=o+1,c=l+1,u=a+1,d=(1<<u)-1,h=0,f=0,p=0,m=e[r++],A=new Int32Array(4096),g=null;;){for(;h<16&&m!==0;)f|=e[r++]<<h,h+=8,m===1?m=e[r++]:--m;if(h<u)break;var y=f&d;if(f>>=u,h-=u,y!==o){if(y===l)break;for(var x=y<c?y:g,b=0,v=x;v>o;)v=A[v]>>8,++b;var j=v;if(p+b+(x!==y?1:0)>i)return void ti.log("Warning, gif stream longer than expected.");n[p++]=j;var _=p+=b;for(x!==y&&(n[p++]=j),v=x;b--;)v=A[v],n[--_]=255&v,v>>=8;g!==null&&c<4096&&(A[c++]=g<<8|j,c>=d+1&&u<12&&(++u,d=d<<1|1)),g=y}else c=l+1,d=(1<<(u=a+1))-1,g=null}return p!==i&&ti.log("Warning, gif stream shorter than expected."),n}/**
3304 * @license
3305  Copyright (c) 2008, Adobe Systems Incorporated
3306  All rights reserved.
3307
3308  Redistribution and use in source and binary forms, with or without 
3309  modification, are permitted provided that the following conditions are
3310  met:
3311
3312  * Redistributions of source code must retain the above copyright notice, 
3313    this list of conditions and the following disclaimer.
3314  
3315  * Redistributions in binary form must reproduce the above copyright
3316    notice, this list of conditions and the following disclaimer in the 
3317    documentation and/or other materials provided with the distribution.
3318  
3319  * Neither the name of Adobe Systems Incorporated nor the names of its 
3320    contributors may be used to endorse or promote products derived from 
3321    this software without specific prior written permission.
3322
3323  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
3324  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
3325  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
3326  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
3327  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
3328  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
3329  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
3330  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
3331  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
3332  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3333  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3334*/function qO(e){var r,n,i,a,o,l=Math.floor,c=new Array(64),u=new Array(64),d=new Array(64),h=new Array(64),f=new Array(65535),p=new Array(65535),m=new Array(64),A=new Array(64),g=[],y=0,x=7,b=new Array(64),v=new Array(64),j=new Array(64),_=new Array(256),C=new Array(2048),N=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],S=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],E=[0,1,2,3,4,5,6,7,8,9,10,11],O=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],B=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],T=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],F=[0,1,2,3,4,5,6,7,8,9,10,11],I=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],D=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function L(M,z){for(var K=0,ne=0,ie=new Array,X=1;X<=16;X++){for(var de=1;de<=M[X];de++)ie[z[ne]]=[],ie[z[ne]][0]=K,ie[z[ne]][1]=X,ne++,K++;K*=2}return ie}function V(M){for(var z=M[0],K=M[1]-1;K>=0;)z&1<<K&&(y|=1<<x),K--,--x<0&&(y==255?(U(255),U(0)):U(y),x=7,y=0)}function U(M){g.push(M)}function Q(M){U(M>>8&255),U(255&M)}function $(M,z,K,ne,ie){for(var X,de=ie[0],oe=ie[240],ce=function(we,J){var he,je,ve,Pe,Ie,ue,Se,He,Qe,ct,dt=0;for(Qe=0;Qe<8;++Qe){he=we[dt],je=we[dt+1],ve=we[dt+2],Pe=we[dt+3],Ie=we[dt+4],ue=we[dt+5],Se=we[dt+6];var Fr=he+(He=we[dt+7]),Xt=he-He,Vt=je+Se,lr=je-Se,cr=ve+ue,Bt=ve-ue,kr=Pe+Ie,ar=Pe-Ie,ur=Fr+kr,kn=Fr-kr,Sr=Vt+cr,zt=Vt-cr;we[dt]=ur+Sr,we[dt+4]=ur-Sr;var an=.707106781*(zt+kn);we[dt+2]=kn+an,we[dt+6]=kn-an;var nr=.382683433*((ur=ar+Bt)-(zt=lr+Xt)),pr=.5411961*ur+nr,Gr=1.306562965*zt+nr,ii=.707106781*(Sr=Bt+lr),pt=Xt+ii,Di=Xt-ii;we[dt+5]=Di+pr,we[dt+3]=Di-pr,we[dt+1]=pt+Gr,we[dt+7]=pt-Gr,dt+=8}for(dt=0,Qe=0;Qe<8;++Qe){he=we[dt],je=we[dt+8],ve=we[dt+16],Pe=we[dt+24],Ie=we[dt+32],ue=we[dt+40],Se=we[dt+48];var ln=he+(He=we[dt+56]),Yn=he-He,Ai=je+Se,gi=je-Se,Xi=ve+ue,Yi=ve-ue,Vr=Pe+Ie,Br=Pe-Ie,xi=ln+Vr,La=ln-Vr,Ee=Ai+Xi,nt=Ai-Xi;we[dt]=xi+Ee,we[dt+32]=xi-Ee;var gt=.707106781*(nt+La);we[dt+16]=La+gt,we[dt+48]=La-gt;var wt=.382683433*((xi=Br+Yi)-(nt=gi+Yn)),dr=.5411961*xi+wt,jr=1.306562965*nt+wt,Ar=.707106781*(Ee=Yi+gi),Ct=Yn+Ar,qn=Yn-Ar;we[dt+40]=qn+dr,we[dt+24]=qn-dr,we[dt+8]=Ct+jr,we[dt+56]=Ct-jr,dt++}for(Qe=0;Qe<64;++Qe)ct=we[Qe]*J[Qe],m[Qe]=ct>0?ct+.5|0:ct-.5|0;return m}(M,z),ye=0;ye<64;++ye)A[N[ye]]=ce[ye];var ge=A[0]-K;K=A[0],ge==0?V(ne[0]):(V(ne[p[X=32767+ge]]),V(f[X]));for(var Be=63;Be>0&&A[Be]==0;)Be--;if(Be==0)return V(de),K;for(var Ve,te=1;te<=Be;){for(var xe=te;A[te]==0&&te<=Be;)++te;var We=te-xe;if(We>=16){Ve=We>>4;for(var ze=1;ze<=Ve;++ze)V(oe);We&=15}X=32767+A[te],V(ie[(We<<4)+p[X]]),V(f[X]),te++}return Be!=63&&V(de),K}function q(M){M=Math.min(Math.max(M,1),100),o!=M&&(function(z){for(var K=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],ne=0;ne<64;ne++){var ie=l((K[ne]*z+50)/100);ie=Math.min(Math.max(ie,1),255),c[N[ne]]=ie}for(var X=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],de=0;de<64;de++){var oe=l((X[de]*z+50)/100);oe=Math.min(Math.max(oe,1),255),u[N[de]]=oe}for(var ce=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],ye=0,ge=0;ge<8;ge++)for(var Be=0;Be<8;Be++)d[ye]=1/(c[N[ye]]*ce[ge]*ce[Be]*8),h[ye]=1/(u[N[ye]]*ce[ge]*ce[Be]*8),ye++}(M<50?Math.floor(5e3/M):Math.floor(200-2*M)),o=M)}this.encode=function(M,z){z&&q(z),g=new Array,y=0,x=7,Q(65496),Q(65504),Q(16),U(74),U(70),U(73),U(70),U(0),U(1),U(1),U(0),Q(1),Q(1),U(0),U(0),function(){Q(65499),Q(132),U(0);for(var je=0;je<64;je++)U(c[je]);U(1);for(var ve=0;ve<64;ve++)U(u[ve])}(),function(je,ve){Q(65472),Q(17),U(8),Q(ve),Q(je),U(3),U(1),U(17),U(0),U(2),U(17),U(1),U(3),U(17),U(1)}(M.width,M.height),function(){Q(65476),Q(418),U(0);for(var je=0;je<16;je++)U(S[je+1]);for(var ve=0;ve<=11;ve++)U(E[ve]);U(16);for(var Pe=0;Pe<16;Pe++)U(O[Pe+1]);for(var Ie=0;Ie<=161;Ie++)U(B[Ie]);U(1);for(var ue=0;ue<16;ue++)U(T[ue+1]);for(var Se=0;Se<=11;Se++)U(F[Se]);U(17);for(var He=0;He<16;He++)U(I[He+1]);for(var Qe=0;Qe<=161;Qe++)U(D[Qe])}(),Q(65498),Q(12),U(3),U(1),U(0),U(2),U(17),U(3),U(17),U(0),U(63),U(0);var K=0,ne=0,ie=0;y=0,x=7,this.encode.displayName="_encode_";for(var X,de,oe,ce,ye,ge,Be,Ve,te,xe=M.data,We=M.width,ze=M.height,we=4*We,J=0;J<ze;){for(X=0;X<we;){for(ye=we*J+X,Be=-1,Ve=0,te=0;te<64;te++)ge=ye+(Ve=te>>3)*we+(Be=4*(7&te)),J+Ve>=ze&&(ge-=we*(J+1+Ve-ze)),X+Be>=we&&(ge-=X+Be-we+4),de=xe[ge++],oe=xe[ge++],ce=xe[ge++],b[te]=(C[de]+C[oe+256|0]+C[ce+512|0]>>16)-128,v[te]=(C[de+768|0]+C[oe+1024|0]+C[ce+1280|0]>>16)-128,j[te]=(C[de+1280|0]+C[oe+1536|0]+C[ce+1792|0]>>16)-128;K=$(b,d,K,r,i),ne=$(v,h,ne,n,a),ie=$(j,h,ie,n,a),X+=32}J+=8}if(x>=0){var he=[];he[1]=x+1,he[0]=(1<<x+1)-1,V(he)}return Q(65497),new Uint8Array(g)},e=e||50,function(){for(var M=String.fromCharCode,z=0;z<256;z++)_[z]=M(z)}(),r=L(S,E),n=L(T,F),i=L(O,B),a=L(I,D),function(){for(var M=1,z=2,K=1;K<=15;K++){for(var ne=M;ne<z;ne++)p[32767+ne]=K,f[32767+ne]=[],f[32767+ne][1]=K,f[32767+ne][0]=ne;for(var ie=-(z-1);ie<=-M;ie++)p[32767+ie]=K,f[32767+ie]=[],f[32767+ie][1]=K,f[32767+ie][0]=z-1+ie;M<<=1,z<<=1}}(),function(){for(var M=0;M<256;M++)C[M]=19595*M,C[M+256|0]=38470*M,C[M+512|0]=7471*M+32768,C[M+768|0]=-11059*M,C[M+1024|0]=-21709*M,C[M+1280|0]=32768*M+8421375,C[M+1536|0]=-27439*M,C[M+1792|0]=-5329*M}(),q(e)}/**
3335 * @license
3336 * Copyright (c) 2017 Aras Abbasi
3337 *
3338 * Licensed under the MIT License.
3339 * http://opensource.org/licenses/mit-license
3340 */function tu(e,r){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!r,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Lie(e){function r(E){if(!E)throw Error("assert :P")}function n(E,O,B){for(var T=0;4>T;T++)if(E[O+T]!=B.charCodeAt(T))return!0;return!1}function i(E,O,B,T,F){for(var I=0;I<F;I++)E[O+I]=B[T+I]}function a(E,O,B,T){for(var F=0;F<T;F++)E[O+F]=B}function o(E){return new Int32Array(E)}function l(E,O){for(var B=[],T=0;T<E;T++)B.push(new O);return B}function c(E,O){var B=[];return function T(F,I,D){for(var L=D[I],V=0;V<L&&(F.push(D.length>I+1?[]:new O),!(D.length<I+1));V++)T(F[V],I+1,D)}(B,0,E),B}var u=function(){var E=this;function O(k,P){for(var H=1<<P-1>>>0;k&H;)H>>>=1;return H?(k&H-1)+H:k}function B(k,P,H,W,Z){r(!(W%H));do k[P+(W-=H)]=Z;while(0<W)}function T(k,P,H,W,Z){if(r(2328>=Z),512>=Z)var re=o(512);else if((re=o(Z))==null)return 0;return function(ae,se,le,pe,ke,$e){var Ae,Te,De=se,Je=1<<le,Ue=o(16),et=o(16);for(r(ke!=0),r(pe!=null),r(ae!=null),r(0<le),Te=0;Te<ke;++Te){if(15<pe[Te])return 0;++Ue[pe[Te]]}if(Ue[0]==ke)return 0;for(et[1]=0,Ae=1;15>Ae;++Ae){if(Ue[Ae]>1<<Ae)return 0;et[Ae+1]=et[Ae]+Ue[Ae]}for(Te=0;Te<ke;++Te)Ae=pe[Te],0<pe[Te]&&($e[et[Ae]++]=Te);if(et[15]==1)return(pe=new F).g=0,pe.value=$e[0],B(ae,De,1,Je,pe),Je;var tt,ht=-1,ut=Je-1,ir=0,Dt=1,zr=1,Yt=1<<le;for(Te=0,Ae=1,ke=2;Ae<=le;++Ae,ke<<=1){if(Dt+=zr<<=1,0>(zr-=Ue[Ae]))return 0;for(;0<Ue[Ae];--Ue[Ae])(pe=new F).g=Ae,pe.value=$e[Te++],B(ae,De+ir,ke,Yt,pe),ir=O(ir,Ae)}for(Ae=le+1,ke=2;15>=Ae;++Ae,ke<<=1){if(Dt+=zr<<=1,0>(zr-=Ue[Ae]))return 0;for(;0<Ue[Ae];--Ue[Ae]){if(pe=new F,(ir&ut)!=ht){for(De+=Yt,tt=1<<(ht=Ae)-le;15>ht&&!(0>=(tt-=Ue[ht]));)++ht,tt<<=1;Je+=Yt=1<<(tt=ht-le),ae[se+(ht=ir&ut)].g=tt+le,ae[se+ht].value=De-se-ht}pe.g=Ae-le,pe.value=$e[Te++],B(ae,De+(ir>>le),ke,Yt,pe),ir=O(ir,Ae)}}return Dt!=2*et[15]-1?0:Je}(k,P,H,W,Z,re)}function F(){this.value=this.g=0}function I(){this.value=this.g=0}function D(){this.G=l(5,F),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=l(gx,I)}function L(k,P,H,W){r(k!=null),r(P!=null),r(2147483648>W),k.Ca=254,k.I=0,k.b=-8,k.Ka=0,k.oa=P,k.pa=H,k.Jd=P,k.Yc=H+W,k.Zc=4<=W?H+W-4+1:H,de(k)}function V(k,P){for(var H=0;0<P--;)H|=ce(k,128)<<P;return H}function U(k,P){var H=V(k,P);return oe(k)?-H:H}function Q(k,P,H,W){var Z,re=0;for(r(k!=null),r(P!=null),r(4294967288>W),k.Sb=W,k.Ra=0,k.u=0,k.h=0,4<W&&(W=4),Z=0;Z<W;++Z)re+=P[H+Z]<<8*Z;k.Ra=re,k.bb=W,k.oa=P,k.pa=H}function $(k){for(;8<=k.u&&k.bb<k.Sb;)k.Ra>>>=8,k.Ra+=k.oa[k.pa+k.bb]<<ho-8>>>0,++k.bb,k.u-=8;ne(k)&&(k.h=1,k.u=0)}function q(k,P){if(r(0<=P),!k.h&&P<=Hb){var H=K(k)&qp[P];return k.u+=P,$(k),H}return k.h=1,k.u=0}function M(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function z(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function K(k){return k.Ra>>>(k.u&ho-1)>>>0}function ne(k){return r(k.bb<=k.Sb),k.h||k.bb==k.Sb&&k.u>ho}function ie(k,P){k.u=P,k.h=ne(k)}function X(k){k.u>=Ro&&(r(k.u>=Ro),$(k))}function de(k){r(k!=null&&k.oa!=null),k.pa<k.Zc?(k.I=(k.oa[k.pa++]|k.I<<8)>>>0,k.b+=8):(r(k!=null&&k.oa!=null),k.pa<k.Yc?(k.b+=8,k.I=k.oa[k.pa++]|k.I<<8):k.Ka?k.b=0:(k.I<<=8,k.b+=8,k.Ka=1))}function oe(k){return V(k,1)}function ce(k,P){var H=k.Ca;0>k.b&&de(k);var W=k.b,Z=H*P>>>8,re=(k.I>>>W>Z)+0;for(re?(H-=Z,k.I-=Z+1<<W>>>0):H=Z+1,W=H,Z=0;256<=W;)Z+=8,W>>=8;return W=7^Z+xx[W],k.b-=W,k.Ca=(H<<W)-1,re}function ye(k,P,H){k[P+0]=H>>24&255,k[P+1]=H>>16&255,k[P+2]=H>>8&255,k[P+3]=255&H}function ge(k,P){return k[P+0]|k[P+1]<<8}function Be(k,P){return ge(k,P)|k[P+2]<<16}function Ve(k,P){return ge(k,P)|ge(k,P+2)<<16}function te(k,P){var H=1<<P;return r(k!=null),r(0<P),k.X=o(H),k.X==null?0:(k.Mb=32-P,k.Xa=P,1)}function xe(k,P){r(k!=null),r(P!=null),r(k.Xa==P.Xa),i(P.X,0,k.X,0,1<<P.Xa)}function We(){this.X=[],this.Xa=this.Mb=0}function ze(k,P,H,W){r(H!=null),r(W!=null);var Z=H[0],re=W[0];return Z==0&&(Z=(k*re+P/2)/P),re==0&&(re=(P*Z+k/2)/k),0>=Z||0>=re?0:(H[0]=Z,W[0]=re,1)}function we(k,P){return k+(1<<P)-1>>>P}function J(k,P){return((4278255360&k)+(4278255360&P)>>>0&4278255360)+((16711935&k)+(16711935&P)>>>0&16711935)>>>0}function he(k,P){E[P]=function(H,W,Z,re,ae,se,le){var pe;for(pe=0;pe<ae;++pe){var ke=E[k](se[le+pe-1],Z,re+pe);se[le+pe]=J(H[W+pe],ke)}}}function je(){this.ud=this.hd=this.jd=0}function ve(k,P){return((4278124286&(k^P))>>>1)+(k&P)>>>0}function Pe(k){return 0<=k&&256>k?k:0>k?0:255<k?255:void 0}function Ie(k,P){return Pe(k+(k-P+.5>>1))}function ue(k,P,H){return Math.abs(P-H)-Math.abs(k-H)}function Se(k,P,H,W,Z,re,ae){for(W=re[ae-1],H=0;H<Z;++H)re[ae+H]=W=J(k[P+H],W)}function He(k,P,H,W,Z){var re;for(re=0;re<H;++re){var ae=k[P+re],se=ae>>8&255,le=16711935&(le=(le=16711935&ae)+((se<<16)+se));W[Z+re]=(4278255360&ae)+le>>>0}}function Qe(k,P){P.jd=255&k,P.hd=k>>8&255,P.ud=k>>16&255}function ct(k,P,H,W,Z,re){var ae;for(ae=0;ae<W;++ae){var se=P[H+ae],le=se>>>8,pe=se,ke=255&(ke=(ke=se>>>16)+((k.jd<<24>>24)*(le<<24>>24)>>>5));pe=255&(pe=(pe+=(k.hd<<24>>24)*(le<<24>>24)>>>5)+((k.ud<<24>>24)*(ke<<24>>24)>>>5)),Z[re+ae]=(4278255360&se)+(ke<<16)+pe}}function dt(k,P,H,W,Z){E[P]=function(re,ae,se,le,pe,ke,$e,Ae,Te){for(le=$e;le<Ae;++le)for($e=0;$e<Te;++$e)pe[ke++]=Z(se[W(re[ae++])])},E[k]=function(re,ae,se,le,pe,ke,$e){var Ae=8>>re.b,Te=re.Ea,De=re.K[0],Je=re.w;if(8>Ae)for(re=(1<<re.b)-1,Je=(1<<Ae)-1;ae<se;++ae){var Ue,et=0;for(Ue=0;Ue<Te;++Ue)Ue&re||(et=W(le[pe++])),ke[$e++]=Z(De[et&Je]),et>>=Ae}else E["VP8LMapColor"+H](le,pe,De,Je,ke,$e,ae,se,Te)}}function Fr(k,P,H,W,Z){for(H=P+H;P<H;){var re=k[P++];W[Z++]=re>>16&255,W[Z++]=re>>8&255,W[Z++]=255&re}}function Xt(k,P,H,W,Z){for(H=P+H;P<H;){var re=k[P++];W[Z++]=re>>16&255,W[Z++]=re>>8&255,W[Z++]=255&re,W[Z++]=re>>24&255}}function Vt(k,P,H,W,Z){for(H=P+H;P<H;){var re=(ae=k[P++])>>16&240|ae>>12&15,ae=240&ae|ae>>28&15;W[Z++]=re,W[Z++]=ae}}function lr(k,P,H,W,Z){for(H=P+H;P<H;){var re=(ae=k[P++])>>16&248|ae>>13&7,ae=ae>>5&224|ae>>3&31;W[Z++]=re,W[Z++]=ae}}function cr(k,P,H,W,Z){for(H=P+H;P<H;){var re=k[P++];W[Z++]=255&re,W[Z++]=re>>8&255,W[Z++]=re>>16&255}}function Bt(k,P,H,W,Z,re){if(re==0)for(H=P+H;P<H;)ye(W,((re=k[P++])[0]>>24|re[1]>>8&65280|re[2]<<8&16711680|re[3]<<24)>>>0),Z+=32;else i(W,Z,k,P,H)}function kr(k,P){E[P][0]=E[k+"0"],E[P][1]=E[k+"1"],E[P][2]=E[k+"2"],E[P][3]=E[k+"3"],E[P][4]=E[k+"4"],E[P][5]=E[k+"5"],E[P][6]=E[k+"6"],E[P][7]=E[k+"7"],E[P][8]=E[k+"8"],E[P][9]=E[k+"9"],E[P][10]=E[k+"10"],E[P][11]=E[k+"11"],E[P][12]=E[k+"12"],E[P][13]=E[k+"13"],E[P][14]=E[k+"0"],E[P][15]=E[k+"0"]}function ar(k){return k==nP||k==iP||k==BC||k==aP}function ur(){this.eb=[],this.size=this.A=this.fb=0}function kn(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function Sr(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ur,this.f.kb=new kn,this.sd=null}function zt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function an(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function nr(k){return alert("todo:WebPSamplerProcessPlane"),k.T}function pr(k,P){var H=k.T,W=P.ba.f.RGBA,Z=W.eb,re=W.fb+k.ka*W.A,ae=ic[P.ba.S],se=k.y,le=k.O,pe=k.f,ke=k.N,$e=k.ea,Ae=k.W,Te=P.cc,De=P.dc,Je=P.Mc,Ue=P.Nc,et=k.ka,tt=k.ka+k.T,ht=k.U,ut=ht+1>>1;for(et==0?ae(se,le,null,null,pe,ke,$e,Ae,pe,ke,$e,Ae,Z,re,null,null,ht):(ae(P.ec,P.fc,se,le,Te,De,Je,Ue,pe,ke,$e,Ae,Z,re-W.A,Z,re,ht),++H);et+2<tt;et+=2)Te=pe,De=ke,Je=$e,Ue=Ae,ke+=k.Rc,Ae+=k.Rc,re+=2*W.A,ae(se,(le+=2*k.fa)-k.fa,se,le,Te,De,Je,Ue,pe,ke,$e,Ae,Z,re-W.A,Z,re,ht);return le+=k.fa,k.j+tt<k.o?(i(P.ec,P.fc,se,le,ht),i(P.cc,P.dc,pe,ke,ut),i(P.Mc,P.Nc,$e,Ae,ut),H--):1&tt||ae(se,le,null,null,pe,ke,$e,Ae,pe,ke,$e,Ae,Z,re+W.A,null,null,ht),H}function Gr(k,P,H){var W=k.F,Z=[k.J];if(W!=null){var re=k.U,ae=P.ba.S,se=ae==EC||ae==BC;P=P.ba.f.RGBA;var le=[0],pe=k.ka;le[0]=k.T,k.Kb&&(pe==0?--le[0]:(--pe,Z[0]-=k.width),k.j+k.ka+k.T==k.o&&(le[0]=k.o-k.j-pe));var ke=P.eb;pe=P.fb+pe*P.A,k=SH(W,Z[0],k.width,re,le,ke,pe+(se?0:3),P.A),r(H==le),k&&ar(ae)&&Kb(ke,pe,se,re,le,P.A)}return 0}function ii(k){var P=k.ma,H=P.ba.S,W=11>H,Z=H==SC||H==kC||H==EC||H==rP||H==12||ar(H);if(P.memory=null,P.Ib=null,P.Jb=null,P.Nd=null,!rc(P.Oa,k,Z?11:12))return 0;if(Z&&ar(H)&&eh(),k.da)alert("todo:use_scaling");else{if(W){if(P.Ib=nr,k.Kb){if(H=k.U+1>>1,P.memory=o(k.U+2*H),P.memory==null)return 0;P.ec=P.memory,P.fc=0,P.cc=P.ec,P.dc=P.fc+k.U,P.Mc=P.cc,P.Nc=P.dc+H,P.Ib=pr,eh()}}else alert("todo:EmitYUV");Z&&(P.Jb=Gr,W&&zi())}if(W&&!HH){for(k=0;256>k;++k)wje[k]=89858*(k-128)+PC>>TC,Cje[k]=-22014*(k-128)+PC,_je[k]=-45773*(k-128),jje[k]=113618*(k-128)+PC>>TC;for(k=Xb;k<lP;++k)P=76283*(k-16)+PC>>TC,Nje[k-Xb]=Qu(P,255),Sje[k-Xb]=Qu(P+8>>4,15);HH=1}return 1}function pt(k){var P=k.ma,H=k.U,W=k.T;return r(!(1&k.ka)),0>=H||0>=W?0:(H=P.Ib(k,P),P.Jb!=null&&P.Jb(k,P,H),P.Dc+=H,1)}function Di(k){k.ma.memory=null}function ln(k,P,H,W){return q(k,8)!=47?0:(P[0]=q(k,14)+1,H[0]=q(k,14)+1,W[0]=q(k,1),q(k,3)!=0?0:!k.h)}function Yn(k,P){if(4>k)return k+1;var H=k-2>>1;return(2+(1&k)<<H)+q(P,H)+1}function Ai(k,P){return 120<P?P-120:1<=(H=((H=lje[P-1])>>4)*k+(8-(15&H)))?H:1;var H}function gi(k,P,H){var W=K(H),Z=k[P+=255&W].g-8;return 0<Z&&(ie(H,H.u+8),W=K(H),P+=k[P].value,P+=W&(1<<Z)-1),ie(H,H.u+k[P].g),k[P].value}function Xi(k,P,H){return H.g+=k.g,H.value+=k.value<<P>>>0,r(8>=H.g),k.g}function Yi(k,P,H){var W=k.xc;return r((P=W==0?0:k.vc[k.md*(H>>W)+(P>>W)])<k.Wb),k.Ya[P]}function Vr(k,P,H,W){var Z=k.ab,re=k.c*P,ae=k.C;P=ae+P;var se=H,le=W;for(W=k.Ta,H=k.Ua;0<Z--;){var pe=k.gc[Z],ke=ae,$e=P,Ae=se,Te=le,De=(le=W,se=H,pe.Ea);switch(r(ke<$e),r($e<=pe.nc),pe.hc){case 2:yx(Ae,Te,($e-ke)*De,le,se);break;case 0:var Je=ke,Ue=$e,et=le,tt=se,ht=(Yt=pe).Ea;Je==0&&(Nf(Ae,Te,null,null,1,et,tt),Se(Ae,Te+1,0,0,ht-1,et,tt+1),Te+=ht,tt+=ht,++Je);for(var ut=1<<Yt.b,ir=ut-1,Dt=we(ht,Yt.b),zr=Yt.K,Yt=Yt.w+(Je>>Yt.b)*Dt;Je<Ue;){var cn=zr,Ma=Yt,Ur=1;for(Sf(Ae,Te,et,tt-ht,1,et,tt);Ur<ht;){var Jt=(Ur&~ir)+ut;Jt>ht&&(Jt=ht),(0,qc[cn[Ma++]>>8&15])(Ae,Te+ +Ur,et,tt+Ur-ht,Jt-Ur,et,tt+Ur),Ur=Jt}Te+=ht,tt+=ht,++Je&ir||(Yt+=Dt)}$e!=pe.nc&&i(le,se-De,le,se+($e-ke-1)*De,De);break;case 1:for(De=Ae,Ue=Te,ht=(Ae=pe.Ea)-(tt=Ae&~(et=(Te=1<<pe.b)-1)),Je=we(Ae,pe.b),ut=pe.K,pe=pe.w+(ke>>pe.b)*Je;ke<$e;){for(ir=ut,Dt=pe,zr=new je,Yt=Ue+tt,cn=Ue+Ae;Ue<Yt;)Qe(ir[Dt++],zr),Gp(zr,De,Ue,Te,le,se),Ue+=Te,se+=Te;Ue<cn&&(Qe(ir[Dt++],zr),Gp(zr,De,Ue,ht,le,se),Ue+=ht,se+=ht),++ke&et||(pe+=Je)}break;case 3:if(Ae==le&&Te==se&&0<pe.b){for(Ue=le,Ae=De=se+($e-ke)*De-(tt=($e-ke)*we(pe.Ea,pe.b)),Te=le,et=se,Je=[],tt=(ht=tt)-1;0<=tt;--tt)Je[tt]=Te[et+tt];for(tt=ht-1;0<=tt;--tt)Ue[Ae+tt]=Je[tt];Kp(pe,ke,$e,le,De,le,se)}else Kp(pe,ke,$e,Ae,Te,le,se)}se=W,le=H}le!=H&&i(W,H,se,le,re)}function Br(k,P){var H=k.V,W=k.Ba+k.c*k.C,Z=P-k.C;if(r(P<=k.l.o),r(16>=Z),0<Z){var re=k.l,ae=k.Ta,se=k.Ua,le=re.width;if(Vr(k,Z,H,W),Z=se=[se],r((H=k.C)<(W=P)),r(re.v<re.va),W>re.o&&(W=re.o),H<re.j){var pe=re.j-H;H=re.j,Z[0]+=pe*le}if(H>=W?H=0:(Z[0]+=4*re.v,re.ka=H-re.j,re.U=re.va-re.v,re.T=W-H,H=1),H){if(se=se[0],11>(H=k.ca).S){var ke=H.f.RGBA,$e=(W=H.S,Z=re.U,re=re.T,pe=ke.eb,ke.A),Ae=re;for(ke=ke.fb+k.Ma*ke.A;0<Ae--;){var Te=ae,De=se,Je=Z,Ue=pe,et=ke;switch(W){case NC:Vb(Te,De,Je,Ue,et);break;case SC:Wb(Te,De,Je,Ue,et);break;case nP:Wb(Te,De,Je,Ue,et),Kb(Ue,et,0,Je,1,0);break;case FH:Yp(Te,De,Je,Ue,et);break;case kC:Bt(Te,De,Je,Ue,et,1);break;case iP:Bt(Te,De,Je,Ue,et,1),Kb(Ue,et,0,Je,1,0);break;case EC:Bt(Te,De,Je,Ue,et,0);break;case BC:Bt(Te,De,Je,Ue,et,0),Kb(Ue,et,1,Je,1,0);break;case rP:vx(Te,De,Je,Ue,et);break;case aP:vx(Te,De,Je,Ue,et),NH(Ue,et,Je,1,0);break;case OH:Xp(Te,De,Je,Ue,et);break;default:r(0)}se+=le,ke+=$e}k.Ma+=re}else alert("todo:EmitRescaledRowsYUVA");r(k.Ma<=H.height)}}k.C=P,r(k.C<=k.i)}function xi(k){var P;if(0<k.ua)return 0;for(P=0;P<k.Wb;++P){var H=k.Ya[P].G,W=k.Ya[P].H;if(0<H[1][W[1]+0].g||0<H[2][W[2]+0].g||0<H[3][W[3]+0].g)return 0}return 1}function La(k,P,H,W,Z,re){if(k.Z!=0){var ae=k.qd,se=k.rd;for(r(Tf[k.Z]!=null);P<H;++P)Tf[k.Z](ae,se,W,Z,W,Z,re),ae=W,se=Z,Z+=re;k.qd=ae,k.rd=se}}function Ee(k,P){var H=k.l.ma,W=H.Z==0||H.Z==1?k.l.j:k.C;if(W=k.C<W?W:k.C,r(P<=k.l.o),P>W){var Z=k.l.width,re=H.ca,ae=H.tb+Z*W,se=k.V,le=k.Ba+k.c*W,pe=k.gc;r(k.ab==1),r(pe[0].hc==3),eP(pe[0],W,P,se,le,re,ae),La(H,W,P,re,ae,Z)}k.C=k.Ma=P}function nt(k,P,H,W,Z,re,ae){var se=k.$/W,le=k.$%W,pe=k.m,ke=k.s,$e=H+k.$,Ae=$e;Z=H+W*Z;var Te=H+W*re,De=280+ke.ua,Je=k.Pb?se:16777216,Ue=0<ke.ua?ke.Wa:null,et=ke.wc,tt=$e<Te?Yi(ke,le,se):null;r(k.C<re),r(Te<=Z);var ht=!1;e:for(;;){for(;ht||$e<Te;){var ut=0;if(se>=Je){var ir=$e-H;r((Je=k).Pb),Je.wd=Je.m,Je.xd=ir,0<Je.s.ua&&xe(Je.s.Wa,Je.s.vb),Je=se+uje}if(le&et||(tt=Yi(ke,le,se)),r(tt!=null),tt.Qb&&(P[$e]=tt.qb,ht=!0),!ht)if(X(pe),tt.jc){ut=pe,ir=P;var Dt=$e,zr=tt.pd[K(ut)&gx-1];r(tt.jc),256>zr.g?(ie(ut,ut.u+zr.g),ir[Dt]=zr.value,ut=0):(ie(ut,ut.u+zr.g-256),r(256<=zr.value),ut=zr.value),ut==0&&(ht=!0)}else ut=gi(tt.G[0],tt.H[0],pe);if(pe.h)break;if(ht||256>ut){if(!ht)if(tt.nd)P[$e]=(tt.qb|ut<<8)>>>0;else{if(X(pe),ht=gi(tt.G[1],tt.H[1],pe),X(pe),ir=gi(tt.G[2],tt.H[2],pe),Dt=gi(tt.G[3],tt.H[3],pe),pe.h)break;P[$e]=(Dt<<24|ht<<16|ut<<8|ir)>>>0}if(ht=!1,++$e,++le>=W&&(le=0,++se,ae!=null&&se<=re&&!(se%16)&&ae(k,se),Ue!=null))for(;Ae<$e;)ut=P[Ae++],Ue.X[(506832829*ut&4294967295)>>>Ue.Mb]=ut}else if(280>ut){if(ut=Yn(ut-256,pe),ir=gi(tt.G[4],tt.H[4],pe),X(pe),ir=Ai(W,ir=Yn(ir,pe)),pe.h)break;if($e-H<ir||Z-$e<ut)break e;for(Dt=0;Dt<ut;++Dt)P[$e+Dt]=P[$e+Dt-ir];for($e+=ut,le+=ut;le>=W;)le-=W,++se,ae!=null&&se<=re&&!(se%16)&&ae(k,se);if(r($e<=Z),le&et&&(tt=Yi(ke,le,se)),Ue!=null)for(;Ae<$e;)ut=P[Ae++],Ue.X[(506832829*ut&4294967295)>>>Ue.Mb]=ut}else{if(!(ut<De))break e;for(ht=ut-280,r(Ue!=null);Ae<$e;)ut=P[Ae++],Ue.X[(506832829*ut&4294967295)>>>Ue.Mb]=ut;ut=$e,r(!(ht>>>(ir=Ue).Xa)),P[ut]=ir.X[ht],ht=!0}ht||r(pe.h==ne(pe))}if(k.Pb&&pe.h&&$e<Z)r(k.m.h),k.a=5,k.m=k.wd,k.$=k.xd,0<k.s.ua&&xe(k.s.vb,k.s.Wa);else{if(pe.h)break e;ae!=null&&ae(k,se>re?re:se),k.a=0,k.$=$e-H}return 1}return k.a=3,0}function gt(k){r(k!=null),k.vc=null,k.yc=null,k.Ya=null;var P=k.Wa;P!=null&&(P.X=null),k.vb=null,r(k!=null)}function wt(){var k=new qt;return k==null?null:(k.a=0,k.xb=DH,kr("Predictor","VP8LPredictors"),kr("Predictor","VP8LPredictors_C"),kr("PredictorAdd","VP8LPredictorsAdd"),kr("PredictorAdd","VP8LPredictorsAdd_C"),yx=He,Gp=ct,Vb=Fr,Wb=Xt,vx=Vt,Xp=lr,Yp=cr,E.VP8LMapColor32b=wa,E.VP8LMapColor8b=Ku,k)}function dr(k,P,H,W,Z){var re=1,ae=[k],se=[P],le=W.m,pe=W.s,ke=null,$e=0;e:for(;;){if(H)for(;re&&q(le,1);){var Ae=ae,Te=se,De=W,Je=1,Ue=De.m,et=De.gc[De.ab],tt=q(Ue,2);if(De.Oc&1<<tt)re=0;else{switch(De.Oc|=1<<tt,et.hc=tt,et.Ea=Ae[0],et.nc=Te[0],et.K=[null],++De.ab,r(4>=De.ab),tt){case 0:case 1:et.b=q(Ue,3)+2,Je=dr(we(et.Ea,et.b),we(et.nc,et.b),0,De,et.K),et.K=et.K[0];break;case 3:var ht,ut=q(Ue,8)+1,ir=16<ut?0:4<ut?1:2<ut?2:3;if(Ae[0]=we(et.Ea,ir),et.b=ir,ht=Je=dr(ut,1,0,De,et.K)){var Dt,zr=ut,Yt=et,cn=1<<(8>>Yt.b),Ma=o(cn);if(Ma==null)ht=0;else{var Ur=Yt.K[0],Jt=Yt.w;for(Ma[0]=Yt.K[0][0],Dt=1;Dt<1*zr;++Dt)Ma[Dt]=J(Ur[Jt+Dt],Ma[Dt-1]);for(;Dt<4*cn;++Dt)Ma[Dt]=0;Yt.K[0]=null,Yt.K[0]=Ma,ht=1}}Je=ht;break;case 2:break;default:r(0)}re=Je}}if(ae=ae[0],se=se[0],re&&q(le,1)&&!(re=1<=($e=q(le,4))&&11>=$e)){W.a=3;break e}var jt;if(jt=re)t:{var ca,Lr,pn,vi=W,ys=ae,fo=se,Ji=$e,$s=H,mo=vi.m,za=vi.s,gn=[null],Mn=1,Zi=0,zn=cje[Ji];r:for(;;){if($s&&q(mo,1)){var vs=q(mo,3)+2,Gc=we(ys,vs),ua=we(fo,vs),Do=Gc*ua;if(!dr(Gc,ua,0,vi,gn))break r;for(gn=gn[0],za.xc=vs,ca=0;ca<Do;++ca){var Zn=gn[ca]>>8&65535;gn[ca]=Zn,Zn>=Mn&&(Mn=Zn+1)}}if(mo.h)break r;for(Lr=0;5>Lr;++Lr){var Ua=LH[Lr];!Lr&&0<Ji&&(Ua+=1<<Ji),Zi<Ua&&(Zi=Ua)}var xl=l(Mn*zn,F),po=Mn,yl=l(po,D);if(yl==null)var vl=null;else r(65536>=po),vl=yl;var Mo=o(Zi);if(vl==null||Mo==null||xl==null){vi.a=1;break r}var bl=xl;for(ca=pn=0;ca<Mn;++ca){var oi=vl[ca],wl=oi.G,Xc=oi.H,Jp=0,ih=1,bs=0;for(Lr=0;5>Lr;++Lr){Ua=LH[Lr],wl[Lr]=bl,Xc[Lr]=pn,!Lr&&0<Ji&&(Ua+=1<<Ji);i:{var FC,cP=Ua,OC=vi,Yb=Mo,Bje=bl,Tje=pn,uP=0,Pf=OC.m,Pje=q(Pf,1);if(a(Yb,0,0,cP),Pje){var Ije=q(Pf,1)+1,Fje=q(Pf,1),qH=q(Pf,Fje==0?1:8);Yb[qH]=1,Ije==2&&(Yb[qH=q(Pf,8)]=1);var LC=1}else{var KH=o(19),GH=q(Pf,4)+4;if(19<GH){OC.a=3;var RC=0;break i}for(FC=0;FC<GH;++FC)KH[oje[FC]]=q(Pf,3);var dP=void 0,Jb=void 0,XH=OC,Oje=KH,DC=cP,YH=Yb,hP=0,If=XH.m,JH=8,ZH=l(128,F);n:for(;T(ZH,0,7,Oje,19);){if(q(If,1)){var Lje=2+2*q(If,3);if((dP=2+q(If,Lje))>DC)break n}else dP=DC;for(Jb=0;Jb<DC&&dP--;){X(If);var e9=ZH[0+(127&K(If))];ie(If,If.u+e9.g);var jx=e9.value;if(16>jx)YH[Jb++]=jx,jx!=0&&(JH=jx);else{var Rje=jx==16,t9=jx-16,Dje=aje[t9],r9=q(If,ije[t9])+Dje;if(Jb+r9>DC)break n;for(var Mje=Rje?JH:0;0<r9--;)YH[Jb++]=Mje}}hP=1;break n}hP||(XH.a=3),LC=hP}(LC=LC&&!Pf.h)&&(uP=T(Bje,Tje,8,Yb,cP)),LC&&uP!=0?RC=uP:(OC.a=3,RC=0)}if(RC==0)break r;if(ih&&sje[Lr]==1&&(ih=bl[pn].g==0),Jp+=bl[pn].g,pn+=RC,3>=Lr){var Zb,fP=Mo[0];for(Zb=1;Zb<Ua;++Zb)Mo[Zb]>fP&&(fP=Mo[Zb]);bs+=fP}}if(oi.nd=ih,oi.Qb=0,ih&&(oi.qb=(wl[3][Xc[3]+0].value<<24|wl[1][Xc[1]+0].value<<16|wl[2][Xc[2]+0].value)>>>0,Jp==0&&256>wl[0][Xc[0]+0].value&&(oi.Qb=1,oi.qb+=wl[0][Xc[0]+0].value<<8)),oi.jc=!oi.Qb&&6>bs,oi.jc){var MC,ah=oi;for(MC=0;MC<gx;++MC){var Ff=MC,Of=ah.pd[Ff],zC=ah.G[0][ah.H[0]+Ff];256<=zC.value?(Of.g=zC.g+256,Of.value=zC.value):(Of.g=0,Of.value=0,Ff>>=Xi(zC,8,Of),Ff>>=Xi(ah.G[1][ah.H[1]+Ff],16,Of),Ff>>=Xi(ah.G[2][ah.H[2]+Ff],0,Of),Xi(ah.G[3][ah.H[3]+Ff],24,Of))}}}za.vc=gn,za.Wb=Mn,za.Ya=vl,za.yc=xl,jt=1;break t}jt=0}if(!(re=jt)){W.a=3;break e}if(0<$e){if(pe.ua=1<<$e,!te(pe.Wa,$e)){W.a=1,re=0;break e}}else pe.ua=0;var mP=W,n9=ae,zje=se,pP=mP.s,AP=pP.xc;if(mP.c=n9,mP.i=zje,pP.md=we(n9,AP),pP.wc=AP==0?-1:(1<<AP)-1,H){W.xb=gje;break e}if((ke=o(ae*se))==null){W.a=1,re=0;break e}re=(re=nt(W,ke,0,ae,se,se,null))&&!le.h;break e}return re?(Z!=null?Z[0]=ke:(r(ke==null),r(H)),W.$=0,H||gt(pe)):gt(pe),re}function jr(k,P){var H=k.c*k.i,W=H+P+16*P;return r(k.c<=P),k.V=o(W),k.V==null?(k.Ta=null,k.Ua=0,k.a=1,0):(k.Ta=k.V,k.Ua=k.Ba+H+P,1)}function Ar(k,P){var H=k.C,W=P-H,Z=k.V,re=k.Ba+k.c*H;for(r(P<=k.l.o);0<W;){var ae=16<W?16:W,se=k.l.ma,le=k.l.width,pe=le*ae,ke=se.ca,$e=se.tb+le*H,Ae=k.Ta,Te=k.Ua;Vr(k,ae,Z,re),kH(Ae,Te,ke,$e,pe),La(se,H,H+ae,ke,$e,le),W-=ae,Z+=ae*k.c,H+=ae}r(H==P),k.C=k.Ma=P}function Ct(){this.ub=this.yd=this.td=this.Rb=0}function qn(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function pl(){this.Fb=this.Bb=this.Cb=0,this.Zb=o(4),this.Lb=o(4)}function Wc(){this.Yb=function(){var k=[];return function P(H,W,Z){for(var re=Z[W],ae=0;ae<re&&(H.push(Z.length>W+1?[]:0),!(Z.length<W+1));ae++)P(H[ae],W+1,Z)}(k,0,[3,11]),k}()}function Ra(){this.jb=o(3),this.Wc=c([4,8],Wc),this.Xc=c([4,17],Wc)}function ix(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new o(4),this.od=new o(4)}function tc(){this.ld=this.La=this.dd=this.tc=0}function Pb(){this.Na=this.la=0}function cC(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ib(){this.ad=o(384),this.Za=0,this.Ob=o(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function uC(){this.uc=this.M=this.Nb=0,this.wa=Array(new tc),this.Y=0,this.ya=Array(new Ib),this.aa=0,this.l=new ax}function dC(){this.y=o(16),this.f=o(8),this.ea=o(8)}function hC(){this.cb=this.a=0,this.sc="",this.m=new M,this.Od=new Ct,this.Kc=new qn,this.ed=new ix,this.Qa=new pl,this.Ic=this.$c=this.Aa=0,this.D=new uC,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=l(8,M),this.ia=0,this.pb=l(4,cC),this.Pa=new Ra,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new dC),this.Hd=0,this.rb=Array(new Pb),this.sb=0,this.wa=Array(new tc),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Ib),this.L=this.aa=0,this.gd=c([4,2],tc),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Qu(k,P){return 0>k?0:k>P?P:k}function ax(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function R3(){var k=new hC;return k!=null&&(k.a=0,k.sc="OK",k.cb=0,k.Xb=0,Gb||(Gb=sx)),k}function va(k,P,H){return k.a==0&&(k.a=P,k.sc=H,k.cb=0),0}function fC(k,P,H){return 3<=H&&k[P+0]==157&&k[P+1]==1&&k[P+2]==42}function Hu(k,P){if(k==null)return 0;if(k.a=0,k.sc="OK",P==null)return va(k,2,"null VP8Io passed to VP8GetHeaders()");var H=P.data,W=P.w,Z=P.ha;if(4>Z)return va(k,7,"Truncated header.");var re=H[W+0]|H[W+1]<<8|H[W+2]<<16,ae=k.Od;if(ae.Rb=!(1&re),ae.td=re>>1&7,ae.yd=re>>4&1,ae.ub=re>>5,3<ae.td)return va(k,3,"Incorrect keyframe parameters.");if(!ae.yd)return va(k,4,"Frame not displayable.");W+=3,Z-=3;var se=k.Kc;if(ae.Rb){if(7>Z)return va(k,7,"cannot parse picture header");if(!fC(H,W,Z))return va(k,3,"Bad code word");se.c=16383&(H[W+4]<<8|H[W+3]),se.Td=H[W+4]>>6,se.i=16383&(H[W+6]<<8|H[W+5]),se.Ud=H[W+6]>>6,W+=7,Z-=7,k.za=se.c+15>>4,k.Ub=se.i+15>>4,P.width=se.c,P.height=se.i,P.Da=0,P.j=0,P.v=0,P.va=P.width,P.o=P.height,P.da=0,P.ib=P.width,P.hb=P.height,P.U=P.width,P.T=P.height,a((re=k.Pa).jb,0,255,re.jb.length),r((re=k.Qa)!=null),re.Cb=0,re.Bb=0,re.Fb=1,a(re.Zb,0,0,re.Zb.length),a(re.Lb,0,0,re.Lb)}if(ae.ub>Z)return va(k,7,"bad partition length");L(re=k.m,H,W,ae.ub),W+=ae.ub,Z-=ae.ub,ae.Rb&&(se.Ld=oe(re),se.Kd=oe(re)),se=k.Qa;var le,pe=k.Pa;if(r(re!=null),r(se!=null),se.Cb=oe(re),se.Cb){if(se.Bb=oe(re),oe(re)){for(se.Fb=oe(re),le=0;4>le;++le)se.Zb[le]=oe(re)?U(re,7):0;for(le=0;4>le;++le)se.Lb[le]=oe(re)?U(re,6):0}if(se.Bb)for(le=0;3>le;++le)pe.jb[le]=oe(re)?V(re,8):255}else se.Bb=0;if(re.Ka)return va(k,3,"cannot parse segment header");if((se=k.ed).zd=oe(re),se.Tb=V(re,6),se.wb=V(re,3),se.Pc=oe(re),se.Pc&&oe(re)){for(pe=0;4>pe;++pe)oe(re)&&(se.vd[pe]=U(re,6));for(pe=0;4>pe;++pe)oe(re)&&(se.od[pe]=U(re,6))}if(k.L=se.Tb==0?0:se.zd?1:2,re.Ka)return va(k,3,"cannot parse filter header");var ke=Z;if(Z=le=W,W=le+ke,se=ke,k.Xb=(1<<V(k.m,2))-1,ke<3*(pe=k.Xb))H=7;else{for(le+=3*pe,se-=3*pe,ke=0;ke<pe;++ke){var $e=H[Z+0]|H[Z+1]<<8|H[Z+2]<<16;$e>se&&($e=se),L(k.Jc[+ke],H,le,$e),le+=$e,se-=$e,Z+=3}L(k.Jc[+pe],H,le,se),H=le<W?0:5}if(H!=0)return va(k,H,"cannot parse partitions");for(H=V(le=k.m,7),Z=oe(le)?U(le,4):0,W=oe(le)?U(le,4):0,se=oe(le)?U(le,4):0,pe=oe(le)?U(le,4):0,le=oe(le)?U(le,4):0,ke=k.Qa,$e=0;4>$e;++$e){if(ke.Cb){var Ae=ke.Zb[$e];ke.Fb||(Ae+=H)}else{if(0<$e){k.pb[$e]=k.pb[0];continue}Ae=H}var Te=k.pb[$e];Te.Sc[0]=sP[Qu(Ae+Z,127)],Te.Sc[1]=oP[Qu(Ae+0,127)],Te.Eb[0]=2*sP[Qu(Ae+W,127)],Te.Eb[1]=101581*oP[Qu(Ae+se,127)]>>16,8>Te.Eb[1]&&(Te.Eb[1]=8),Te.Qc[0]=sP[Qu(Ae+pe,117)],Te.Qc[1]=oP[Qu(Ae+le,127)],Te.lc=Ae+le}if(!ae.Rb)return va(k,4,"Not a key frame.");for(oe(re),ae=k.Pa,H=0;4>H;++H){for(Z=0;8>Z;++Z)for(W=0;3>W;++W)for(se=0;11>se;++se)pe=ce(re,pje[H][Z][W][se])?V(re,8):fje[H][Z][W][se],ae.Wc[H][Z].Yb[W][se]=pe;for(Z=0;17>Z;++Z)ae.Xc[H][Z]=ae.Wc[H][Aje[Z]]}return k.kc=oe(re),k.kc&&(k.Bd=V(re,8)),k.cb=1}function sx(k,P,H,W,Z,re,ae){var se=P[Z].Yb[H];for(H=0;16>Z;++Z){if(!ce(k,se[H+0]))return Z;for(;!ce(k,se[H+1]);)if(se=P[++Z].Yb[0],H=0,Z==16)return 16;var le=P[Z+1].Yb;if(ce(k,se[H+2])){var pe=k,ke=0;if(ce(pe,(Ae=se)[($e=H)+3]))if(ce(pe,Ae[$e+6])){for(se=0,$e=2*(ke=ce(pe,Ae[$e+8]))+(Ae=ce(pe,Ae[$e+9+ke])),ke=0,Ae=dje[$e];Ae[se];++se)ke+=ke+ce(pe,Ae[se]);ke+=3+(8<<$e)}else ce(pe,Ae[$e+7])?(ke=7+2*ce(pe,165),ke+=ce(pe,145)):ke=5+ce(pe,159);else ke=ce(pe,Ae[$e+4])?3+ce(pe,Ae[$e+5]):2;se=le[2]}else ke=1,se=le[1];le=ae+hje[Z],0>(pe=k).b&&de(pe);var $e,Ae=pe.b,Te=($e=pe.Ca>>1)-(pe.I>>Ae)>>31;--pe.b,pe.Ca+=Te,pe.Ca|=1,pe.I-=($e+1&Te)<<Ae,re[le]=((ke^Te)-Te)*W[(0<Z)+0]}return 16}function Fb(k){var P=k.rb[k.sb-1];P.la=0,P.Na=0,a(k.zc,0,0,k.zc.length),k.ja=0}function Al(k,P,H,W,Z){Z=k[P+H+32*W]+(Z>>3),k[P+H+32*W]=-256&Z?0>Z?0:255:Z}function ox(k,P,H,W,Z,re){Al(k,P,0,H,W+Z),Al(k,P,1,H,W+re),Al(k,P,2,H,W-re),Al(k,P,3,H,W-Z)}function Gd(k){return(20091*k>>16)+k}function xs(k,P,H,W){var Z,re=0,ae=o(16);for(Z=0;4>Z;++Z){var se=k[P+0]+k[P+8],le=k[P+0]-k[P+8],pe=(35468*k[P+4]>>16)-Gd(k[P+12]),ke=Gd(k[P+4])+(35468*k[P+12]>>16);ae[re+0]=se+ke,ae[re+1]=le+pe,ae[re+2]=le-pe,ae[re+3]=se-ke,re+=4,P++}for(Z=re=0;4>Z;++Z)se=(k=ae[re+0]+4)+ae[re+8],le=k-ae[re+8],pe=(35468*ae[re+4]>>16)-Gd(ae[re+12]),Al(H,W,0,0,se+(ke=Gd(ae[re+4])+(35468*ae[re+12]>>16))),Al(H,W,1,0,le+pe),Al(H,W,2,0,le-pe),Al(H,W,3,0,se-ke),re++,W+=32}function mC(k,P,H,W){var Z=k[P+0]+4,re=35468*k[P+4]>>16,ae=Gd(k[P+4]),se=35468*k[P+1]>>16;ox(H,W,0,Z+ae,k=Gd(k[P+1]),se),ox(H,W,1,Z+re,k,se),ox(H,W,2,Z-re,k,se),ox(H,W,3,Z-ae,k,se)}function D3(k,P,H,W,Z){xs(k,P,H,W),Z&&xs(k,P+16,H,W+4)}function M3(k,P,H,W){th(k,P+0,H,W,1),th(k,P+32,H,W+128,1)}function z3(k,P,H,W){var Z;for(k=k[P+0]+4,Z=0;4>Z;++Z)for(P=0;4>P;++P)Al(H,W,P,Z,k)}function Vu(k,P,H,W){k[P+0]&&Us(k,P+0,H,W),k[P+16]&&Us(k,P+16,H,W+4),k[P+32]&&Us(k,P+32,H,W+128),k[P+48]&&Us(k,P+48,H,W+128+4)}function pC(k,P,H,W){var Z,re=o(16);for(Z=0;4>Z;++Z){var ae=k[P+0+Z]+k[P+12+Z],se=k[P+4+Z]+k[P+8+Z],le=k[P+4+Z]-k[P+8+Z],pe=k[P+0+Z]-k[P+12+Z];re[0+Z]=ae+se,re[8+Z]=ae-se,re[4+Z]=pe+le,re[12+Z]=pe-le}for(Z=0;4>Z;++Z)ae=(k=re[0+4*Z]+3)+re[3+4*Z],se=re[1+4*Z]+re[2+4*Z],le=re[1+4*Z]-re[2+4*Z],pe=k-re[3+4*Z],H[W+0]=ae+se>>3,H[W+16]=pe+le>>3,H[W+32]=ae-se>>3,H[W+48]=pe-le>>3,W+=64}function lx(k,P,H){var W,Z=P-32,re=gl,ae=255-k[Z-1];for(W=0;W<H;++W){var se,le=re,pe=ae+k[P-1];for(se=0;se<H;++se)k[P+se]=le[pe+k[Z+se]];P+=32}}function cx(k,P){lx(k,P,4)}function Ob(k,P){lx(k,P,8)}function U3(k,P){lx(k,P,16)}function $3(k,P){var H;for(H=0;16>H;++H)i(k,P+32*H,k,P-32,16)}function Q3(k,P){var H;for(H=16;
vendor: 4,442 bytes, line 3340
33400<H;--H)a(k,P,k[P-1],16),P+=32}function wf(k,P,H){var W;for(W=0;16>W;++W)a(P,H+32*W,k,16)}function AC(k,P){var H,W=16;for(H=0;16>H;++H)W+=k[P-1+32*H]+k[P+H-32];wf(W>>5,k,P)}function jf(k,P){var H,W=8;for(H=0;16>H;++H)W+=k[P-1+32*H];wf(W>>4,k,P)}function H3(k,P){var H,W=8;for(H=0;16>H;++H)W+=k[P+H-32];wf(W>>4,k,P)}function Dp(k,P){wf(128,k,P)}function _r(k,P,H){return k+2*P+H+2>>2}function V3(k,P){var H,W=P-32;for(W=new Uint8Array([_r(k[W-1],k[W+0],k[W+1]),_r(k[W+0],k[W+1],k[W+2]),_r(k[W+1],k[W+2],k[W+3]),_r(k[W+2],k[W+3],k[W+4])]),H=0;4>H;++H)i(k,P+32*H,W,0,W.length)}function W3(k,P){var H=k[P-1],W=k[P-1+32],Z=k[P-1+64],re=k[P-1+96];ye(k,P+0,16843009*_r(k[P-1-32],H,W)),ye(k,P+32,16843009*_r(H,W,Z)),ye(k,P+64,16843009*_r(W,Z,re)),ye(k,P+96,16843009*_r(Z,re,re))}function q3(k,P){var H,W=4;for(H=0;4>H;++H)W+=k[P+H-32]+k[P-1+32*H];for(W>>=3,H=0;4>H;++H)a(k,P+32*H,W,4)}function K3(k,P){var H=k[P-1+0],W=k[P-1+32],Z=k[P-1+64],re=k[P-1-32],ae=k[P+0-32],se=k[P+1-32],le=k[P+2-32],pe=k[P+3-32];k[P+0+96]=_r(W,Z,k[P-1+96]),k[P+1+96]=k[P+0+64]=_r(H,W,Z),k[P+2+96]=k[P+1+64]=k[P+0+32]=_r(re,H,W),k[P+3+96]=k[P+2+64]=k[P+1+32]=k[P+0+0]=_r(ae,re,H),k[P+3+64]=k[P+2+32]=k[P+1+0]=_r(se,ae,re),k[P+3+32]=k[P+2+0]=_r(le,se,ae),k[P+3+0]=_r(pe,le,se)}function G3(k,P){var H=k[P+1-32],W=k[P+2-32],Z=k[P+3-32],re=k[P+4-32],ae=k[P+5-32],se=k[P+6-32],le=k[P+7-32];k[P+0+0]=_r(k[P+0-32],H,W),k[P+1+0]=k[P+0+32]=_r(H,W,Z),k[P+2+0]=k[P+1+32]=k[P+0+64]=_r(W,Z,re),k[P+3+0]=k[P+2+32]=k[P+1+64]=k[P+0+96]=_r(Z,re,ae),k[P+3+32]=k[P+2+64]=k[P+1+96]=_r(re,ae,se),k[P+3+64]=k[P+2+96]=_r(ae,se,le),k[P+3+96]=_r(se,le,le)}function Xd(k,P){var H=k[P-1+0],W=k[P-1+32],Z=k[P-1+64],re=k[P-1-32],ae=k[P+0-32],se=k[P+1-32],le=k[P+2-32],pe=k[P+3-32];k[P+0+0]=k[P+1+64]=re+ae+1>>1,k[P+1+0]=k[P+2+64]=ae+se+1>>1,k[P+2+0]=k[P+3+64]=se+le+1>>1,k[P+3+0]=le+pe+1>>1,k[P+0+96]=_r(Z,W,H),k[P+0+64]=_r(W,H,re),k[P+0+32]=k[P+1+96]=_r(H,re,ae),k[P+1+32]=k[P+2+96]=_r(re,ae,se),k[P+2+32]=k[P+3+96]=_r(ae,se,le),k[P+3+32]=_r(se,le,pe)}function Yd(k,P){var H=k[P+0-32],W=k[P+1-32],Z=k[P+2-32],re=k[P+3-32],ae=k[P+4-32],se=k[P+5-32],le=k[P+6-32],pe=k[P+7-32];k[P+0+0]=H+W+1>>1,k[P+1+0]=k[P+0+64]=W+Z+1>>1,k[P+2+0]=k[P+1+64]=Z+re+1>>1,k[P+3+0]=k[P+2+64]=re+ae+1>>1,k[P+0+32]=_r(H,W,Z),k[P+1+32]=k[P+0+96]=_r(W,Z,re),k[P+2+32]=k[P+1+96]=_r(Z,re,ae),k[P+3+32]=k[P+2+96]=_r(re,ae,se),k[P+3+64]=_r(ae,se,le),k[P+3+96]=_r(se,le,pe)}function X3(k,P){var H=k[P-1+0],W=k[P-1+32],Z=k[P-1+64],re=k[P-1+96];k[P+0+0]=H+W+1>>1,k[P+2+0]=k[P+0+32]=W+Z+1>>1,k[P+2+32]=k[P+0+64]=Z+re+1>>1,k[P+1+0]=_r(H,W,Z),k[P+3+0]=k[P+1+32]=_r(W,Z,re),k[P+3+32]=k[P+1+64]=_r(Z,re,re),k[P+3+64]=k[P+2+64]=k[P+0+96]=k[P+1+96]=k[P+2+96]=k[P+3+96]=re}function Y3(k,P){var H=k[P-1+0],W=k[P-1+32],Z=k[P-1+64],re=k[P-1+96],ae=k[P-1-32],se=k[P+0-32],le=k[P+1-32],pe=k[P+2-32];k[P+0+0]=k[P+2+32]=H+ae+1>>1,k[P+0+32]=k[P+2+64]=W+H+1>>1,k[P+0+64]=k[P+2+96]=Z+W+1>>1,k[P+0+96]=re+Z+1>>1,k[P+3+0]=_r(se,le,pe),k[P+2+0]=_r(ae,se,le),k[P+1+0]=k[P+3+32]=_r(H,ae,se),k[P+1+32]=k[P+3+64]=_r(W,H,ae),k[P+1+64]=k[P+3+96]=_r(Z,W,H),k[P+1+96]=_r(re,Z,W)}function ux(k,P){var H;for(H=0;8>H;++H)i(k,P+32*H,k,P-32,8)}function Lb(k,P){var H;for(H=0;8>H;++H)a(k,P,k[P-1],8),P+=32}function Wu(k,P,H){var W;for(W=0;8>W;++W)a(P,H+32*W,k,8)}function J3(k,P){var H,W=8;for(H=0;8>H;++H)W+=k[P+H-32]+k[P-1+32*H];Wu(W>>4,k,P)}function dx(k,P){var H,W=4;for(H=0;8>H;++H)W+=k[P+H-32];Wu(W>>3,k,P)}function Z3(k,P){var H,W=4;for(H=0;8>H;++H)W+=k[P-1+32*H];Wu(W>>3,k,P)}function Rb(k,P){Wu(128,k,P)}function _f(k,P,H){var W=k[P-H],Z=k[P+0],re=3*(Z-W)+tP[1020+k[P-2*H]-k[P+H]],ae=CC[112+(re+4>>3)];k[P-H]=gl[255+W+CC[112+(re+3>>3)]],k[P+0]=gl[255+Z-ae]}function Db(k,P,H,W){var Z=k[P+0],re=k[P+H];return nc[255+k[P-2*H]-k[P-H]]>W||nc[255+re-Z]>W}function Mp(k,P,H,W){return 4*nc[255+k[P-H]-k[P+0]]+nc[255+k[P-2*H]-k[P+H]]<=W}function Mb(k,P,H,W,Z){var re=k[P-3*H],ae=k[P-2*H],se=k[P-H],le=k[P+0],pe=k[P+H],ke=k[P+2*H],$e=k[P+3*H];return 4*nc[255+se-le]+nc[255+ae-pe]>W?0:nc[255+k[P-4*H]-re]<=Z&&nc[255+re-ae]<=Z&&nc[255+ae-se]<=Z&&nc[255+$e-ke]<=Z&&nc[255+ke-pe]<=Z&&nc[255+pe-le]<=Z}function hx(k,P,H,W){var Z=2*W+1;for(W=0;16>W;++W)Mp(k,P+W,H,Z)&&_f(k,P+W,H)}function zb(k,P,H,W){var Z=2*W+1;for(W=0;16>W;++W)Mp(k,P+W*H,1,Z)&&_f(k,P+W*H,1)}function fx(k,P,H,W){var Z;for(Z=3;0<Z;--Z)hx(k,P+=4*H,H,W)}function gC(k,P,H,W){var Z;for(Z=3;0<Z;--Z)zb(k,P+=4,H,W)}function Jd(k,P,H,W,Z,re,ae,se){for(re=2*re+1;0<Z--;){if(Mb(k,P,H,re,ae))if(Db(k,P,H,se))_f(k,P,H);
vendor: 14,484 bytes, line 3340
3340else{var le=k,pe=P,ke=H,$e=le[pe-2*ke],Ae=le[pe-ke],Te=le[pe+0],De=le[pe+ke],Je=le[pe+2*ke],Ue=27*(tt=tP[1020+3*(Te-Ae)+tP[1020+$e-De]])+63>>7,et=18*tt+63>>7,tt=9*tt+63>>7;le[pe-3*ke]=gl[255+le[pe-3*ke]+tt],le[pe-2*ke]=gl[255+$e+et],le[pe-ke]=gl[255+Ae+Ue],le[pe+0]=gl[255+Te-Ue],le[pe+ke]=gl[255+De-et],le[pe+2*ke]=gl[255+Je-tt]}P+=W}}function Zd(k,P,H,W,Z,re,ae,se){for(re=2*re+1;0<Z--;){if(Mb(k,P,H,re,ae))if(Db(k,P,H,se))_f(k,P,H);else{var le=k,pe=P,ke=H,$e=le[pe-ke],Ae=le[pe+0],Te=le[pe+ke],De=CC[112+(4+(Je=3*(Ae-$e))>>3)],Je=CC[112+(Je+3>>3)],Ue=De+1>>1;le[pe-2*ke]=gl[255+le[pe-2*ke]+Ue],le[pe-ke]=gl[255+$e+Je],le[pe+0]=gl[255+Ae-De],le[pe+ke]=gl[255+Te-Ue]}P+=W}}function xC(k,P,H,W,Z,re){Jd(k,P,H,1,16,W,Z,re)}function yC(k,P,H,W,Z,re){Jd(k,P,1,H,16,W,Z,re)}function vC(k,P,H,W,Z,re){var ae;for(ae=3;0<ae;--ae)Zd(k,P+=4*H,H,1,16,W,Z,re)}function zp(k,P,H,W,Z,re){var ae;for(ae=3;0<ae;--ae)Zd(k,P+=4,1,H,16,W,Z,re)}function bC(k,P,H,W,Z,re,ae,se){Jd(k,P,Z,1,8,re,ae,se),Jd(H,W,Z,1,8,re,ae,se)}function R(k,P,H,W,Z,re,ae,se){Jd(k,P,1,Z,8,re,ae,se),Jd(H,W,1,Z,8,re,ae,se)}function Y(k,P,H,W,Z,re,ae,se){Zd(k,P+4*Z,Z,1,8,re,ae,se),Zd(H,W+4*Z,Z,1,8,re,ae,se)}function fe(k,P,H,W,Z,re,ae,se){Zd(k,P+4,1,Z,8,re,ae,se),Zd(H,W+4,1,Z,8,re,ae,se)}function Ce(){this.ba=new Sr,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new an,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Fe(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Ye(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function lt(){this.ua=0,this.Wa=new We,this.vb=new We,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new D,this.yc=new F}function qt(){this.xb=this.a=0,this.l=new ax,this.ca=new Sr,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new z,this.Pb=0,this.wd=new z,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new lt,this.ab=0,this.gc=l(4,Ye),this.Oc=0}function Wt(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new ax,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Er(k,P,H,W,Z,re,ae){for(k=k==null?0:k[P+0],P=0;P<ae;++P)Z[re+P]=k+H[W+P]&255,k=Z[re+P]}function Or(k,P,H,W,Z,re,ae){var se;if(k==null)Er(null,null,H,W,Z,re,ae);else for(se=0;se<ae;++se)Z[re+se]=k[P+se]+H[W+se]&255}function mn(k,P,H,W,Z,re,ae){if(k==null)Er(null,null,H,W,Z,re,ae);else{var se,le=k[P+0],pe=le,ke=le;for(se=0;se<ae;++se)pe=ke+(le=k[P+se])-pe,ke=H[W+se]+(-256&pe?0>pe?0:255:pe)&255,pe=le,Z[re+se]=ke}}function ba(k,P,H,W){var Z=P.width,re=P.o;if(r(k!=null&&P!=null),0>H||0>=W||H+W>re)return null;if(!k.Cc){if(k.ga==null){var ae;if(k.ga=new Wt,(ae=k.ga==null)||(ae=P.width*P.o,r(k.Gb.length==0),k.Gb=o(ae),k.Uc=0,k.Gb==null?ae=0:(k.mb=k.Gb,k.nb=k.Uc,k.rc=null,ae=1),ae=!ae),!ae){ae=k.ga;var se=k.Fa,le=k.P,pe=k.qc,ke=k.mb,$e=k.nb,Ae=le+1,Te=pe-1,De=ae.l;if(r(se!=null&&ke!=null&&P!=null),Tf[0]=null,Tf[1]=Er,Tf[2]=Or,Tf[3]=mn,ae.ca=ke,ae.tb=$e,ae.c=P.width,ae.i=P.height,r(0<ae.c&&0<ae.i),1>=pe)P=0;else if(ae.$a=3&se[le+0],ae.Z=se[le+0]>>2&3,ae.Lc=se[le+0]>>4&3,le=se[le+0]>>6&3,0>ae.$a||1<ae.$a||4<=ae.Z||1<ae.Lc||le)P=0;else if(De.put=pt,De.ac=ii,De.bc=Di,De.ma=ae,De.width=P.width,De.height=P.height,De.Da=P.Da,De.v=P.v,De.va=P.va,De.j=P.j,De.o=P.o,ae.$a)e:{r(ae.$a==1),P=wt();t:for(;;){if(P==null){P=0;break e}if(r(ae!=null),ae.mc=P,P.c=ae.c,P.i=ae.i,P.l=ae.l,P.l.ma=ae,P.l.width=ae.c,P.l.height=ae.i,P.a=0,Q(P.m,se,Ae,Te),!dr(ae.c,ae.i,1,P,null)||(P.ab==1&&P.gc[0].hc==3&&xi(P.s)?(ae.ic=1,se=P.c*P.i,P.Ta=null,P.Ua=0,P.V=o(se),P.Ba=0,P.V==null?(P.a=1,P=0):P=1):(ae.ic=0,P=jr(P,ae.c)),!P))break t;P=1;break e}ae.mc=null,P=0}else P=Te>=ae.c*ae.i;ae=!P}if(ae)return null;k.ga.Lc!=1?k.Ga=0:W=re-H}r(k.ga!=null),r(H+W<=re);e:{if(P=(se=k.ga).c,re=se.l.o,se.$a==0){if(Ae=k.rc,Te=k.Vc,De=k.Fa,le=k.P+1+H*P,pe=k.mb,ke=k.nb+H*P,r(le<=k.P+k.qc),se.Z!=0)for(r(Tf[se.Z]!=null),ae=0;ae<W;++ae)Tf[se.Z](Ae,Te,De,le,pe,ke,P),Ae=pe,Te=ke,ke+=P,le+=P;else for(ae=0;ae<W;++ae)i(pe,ke,De,le,P),Ae=pe,Te=ke,ke+=P,le+=P;k.rc=Ae,k.Vc=Te}else{if(r(se.mc!=null),P=H+W,r((ae=se.mc)!=null),r(P<=ae.i),ae.C>=P)P=1;else if(se.ic||zi(),se.ic){se=ae.V,Ae=ae.Ba,Te=ae.c;var Je=ae.i,Ue=(De=1,le=ae.$/Te,pe=ae.$%Te,ke=ae.m,$e=ae.s,ae.$),et=Te*Je,tt=Te*P,ht=$e.wc,ut=Ue<tt?Yi($e,pe,le):null;r(Ue<=et),r(P<=Je),r(xi($e));t:for(;;){for(;!ke.h&&Ue<tt;){if(pe&ht||(ut=Yi($e,pe,le)),r(ut!=null),X(ke),256>(Je=gi(ut.G[0],ut.H[0],ke)))se[Ae+Ue]=Je,++Ue,++pe>=Te&&(pe=0,++le<=P&&!(le%16)&&Ee(ae,le));else{if(!(280>Je)){De=0;break t}Je=Yn(Je-256,ke);var ir,Dt=gi(ut.G[4],ut.H[4],ke);if(X(ke),!(Ue>=(Dt=Ai(Te,Dt=Yn(Dt,ke)))&&et-Ue>=Je)){De=0;break t}for(ir=0;ir<Je;++ir)se[Ae+Ue+ir]=se[Ae+Ue+ir-Dt];for(Ue+=Je,pe+=Je;pe>=Te;)pe-=Te,++le<=P&&!(le%16)&&Ee(ae,le);Ue<tt&&pe&ht&&(ut=Yi($e,pe,le))}r(ke.h==ne(ke))}Ee(ae,le>P?P:le);break t}!De||ke.h&&Ue<et?(De=0,ae.a=ke.h?5:3):ae.$=Ue,P=De}else P=nt(ae,ae.V,ae.Ba,ae.c,ae.i,P,Ar);if(!P){W=0;break e}}H+W>=re&&(k.Cc=1),W=1}if(!W)return null;if(k.Cc&&((W=k.ga)!=null&&(W.mc=null),k.ga=null,0<k.Ga))return alert("todo:WebPDequantizeLevels"),null}return k.nb+H*Z}function Jn(k,P,H,W,Z,re){for(;0<Z--;){var ae,se=k,le=P+(H?1:0),pe=k,ke=P+(H?0:3);for(ae=0;ae<W;++ae){var $e=pe[ke+4*ae];$e!=255&&($e*=32897,se[le+4*ae+0]=se[le+4*ae+0]*$e>>23,se[le+4*ae+1]=se[le+4*ae+1]*$e>>23,se[le+4*ae+2]=se[le+4*ae+2]*$e>>23)}P+=re}}function Kn(k,P,H,W,Z){for(;0<W--;){var re;for(re=0;re<H;++re){var ae=k[P+2*re+0],se=15&(pe=k[P+2*re+1]),le=4369*se,pe=(240&pe|pe>>4)*le>>16;k[P+2*re+0]=(240&ae|ae>>4)*le>>16&240|(15&ae|ae<<4)*le>>16>>4&15,k[P+2*re+1]=240&pe|se}P+=Z}}function yi(k,P,H,W,Z,re,ae,se){var le,pe,ke=255;for(pe=0;pe<Z;++pe){for(le=0;le<W;++le){var $e=k[P+le];re[ae+4*le]=$e,ke&=$e}P+=H,ae+=se}return ke!=255}function Mi(k,P,H,W,Z){var re;for(re=0;re<Z;++re)H[W+re]=k[P+re]>>8}function zi(){Kb=Jn,NH=Kn,SH=yi,kH=Mi}function Ms(k,P,H){E[k]=function(W,Z,re,ae,se,le,pe,ke,$e,Ae,Te,De,Je,Ue,et,tt,ht){var ut,ir=ht-1>>1,Dt=se[le+0]|pe[ke+0]<<16,zr=$e[Ae+0]|Te[De+0]<<16;r(W!=null);var Yt=3*Dt+zr+131074>>2;for(P(W[Z+0],255&Yt,Yt>>16,Je,Ue),re!=null&&(Yt=3*zr+Dt+131074>>2,P(re[ae+0],255&Yt,Yt>>16,et,tt)),ut=1;ut<=ir;++ut){var cn=se[le+ut]|pe[ke+ut]<<16,Ma=$e[Ae+ut]|Te[De+ut]<<16,Ur=Dt+cn+zr+Ma+524296,Jt=Ur+2*(cn+zr)>>3;Yt=Jt+Dt>>1,Dt=(Ur=Ur+2*(Dt+Ma)>>3)+cn>>1,P(W[Z+2*ut-1],255&Yt,Yt>>16,Je,Ue+(2*ut-1)*H),P(W[Z+2*ut-0],255&Dt,Dt>>16,Je,Ue+(2*ut-0)*H),re!=null&&(Yt=Ur+zr>>1,Dt=Jt+Ma>>1,P(re[ae+2*ut-1],255&Yt,Yt>>16,et,tt+(2*ut-1)*H),P(re[ae+2*ut+0],255&Dt,Dt>>16,et,tt+(2*ut+0)*H)),Dt=cn,zr=Ma}1&ht||(Yt=3*Dt+zr+131074>>2,P(W[Z+ht-1],255&Yt,Yt>>16,Je,Ue+(ht-1)*H),re!=null&&(Yt=3*zr+Dt+131074>>2,P(re[ae+ht-1],255&Yt,Yt>>16,et,tt+(ht-1)*H)))}}function eh(){ic[NC]=xje,ic[SC]=MH,ic[FH]=yje,ic[kC]=zH,ic[EC]=UH,ic[rP]=$H,ic[OH]=vje,ic[nP]=MH,ic[iP]=zH,ic[BC]=UH,ic[aP]=$H}function Ub(k){return k&~bje?0>k?0:255:k>>QH}function Up(k,P){return Ub((19077*k>>8)+(26149*P>>8)-14234)}function $p(k,P,H){return Ub((19077*k>>8)-(6419*P>>8)-(13320*H>>8)+8708)}function Cf(k,P){return Ub((19077*k>>8)+(33050*P>>8)-17685)}function Qp(k,P,H,W,Z){W[Z+0]=Up(k,H),W[Z+1]=$p(k,P,H),W[Z+2]=Cf(k,P)}function mx(k,P,H,W,Z){W[Z+0]=Cf(k,P),W[Z+1]=$p(k,P,H),W[Z+2]=Up(k,H)}function px(k,P,H,W,Z){var re=$p(k,P,H);P=re<<3&224|Cf(k,P)>>3,W[Z+0]=248&Up(k,H)|re>>5,W[Z+1]=P}function zs(k,P,H,W,Z){var re=240&Cf(k,P)|15;W[Z+0]=240&Up(k,H)|$p(k,P,H)>>4,W[Z+1]=re}function Hp(k,P,H,W,Z){W[Z+0]=255,Qp(k,P,H,W,Z+1)}function Vp(k,P,H,W,Z){mx(k,P,H,W,Z),W[Z+3]=255}function $b(k,P,H,W,Z){Qp(k,P,H,W,Z),W[Z+3]=255}function qu(k,P,H){E[k]=function(W,Z,re,ae,se,le,pe,ke,$e){for(var Ae=ke+(-2&$e)*H;ke!=Ae;)P(W[Z+0],re[ae+0],se[le+0],pe,ke),P(W[Z+1],re[ae+0],se[le+0],pe,ke+H),Z+=2,++ae,++le,ke+=2*H;1&$e&&P(W[Z+0],re[ae+0],se[le+0],pe,ke)}}function uo(k,P,H){return H==0?k==0?P==0?6:5:P==0?4:0:H}function wC(k,P,H,W,Z){switch(k>>>30){case 3:th(P,H,W,Z,0);break;case 2:Ef(P,H,W,Z);break;case 1:Us(P,H,W,Z)}}function Ax(k,P){var H,W,Z=P.M,re=P.Nb,ae=k.oc,se=k.pc+40,le=k.oc,pe=k.pc+584,ke=k.oc,$e=k.pc+600;for(H=0;16>H;++H)ae[se+32*H-1]=129;for(H=0;8>H;++H)le[pe+32*H-1]=129,ke[$e+32*H-1]=129;for(0<Z?ae[se-1-32]=le[pe-1-32]=ke[$e-1-32]=129:(a(ae,se-32-1,127,21),a(le,pe-32-1,127,9),a(ke,$e-32-1,127,9)),W=0;W<k.za;++W){var Ae=P.ya[P.aa+W];if(0<W){for(H=-1;16>H;++H)i(ae,se+32*H-4,ae,se+32*H+12,4);for(H=-1;8>H;++H)i(le,pe+32*H-4,le,pe+32*H+4,4),i(ke,$e+32*H-4,ke,$e+32*H+4,4)}var Te=k.Gd,De=k.Hd+W,Je=Ae.ad,Ue=Ae.Hc;if(0<Z&&(i(ae,se-32,Te[De].y,0,16),i(le,pe-32,Te[De].f,0,8),i(ke,$e-32,Te[De].ea,0,8)),Ae.Za){var et=ae,tt=se-32+16;for(0<Z&&(W>=k.za-1?a(et,tt,Te[De].y[15],4):i(et,tt,Te[De+1].y,0,4)),H=0;4>H;H++)et[tt+128+H]=et[tt+256+H]=et[tt+384+H]=et[tt+0+H];for(H=0;16>H;++H,Ue<<=2)et=ae,tt=se+VH[H],Kc[Ae.Ob[H]](et,tt),wC(Ue,Je,16*+H,et,tt)}else if(et=uo(W,Z,Ae.Ob[0]),Bf[et](ae,se),Ue!=0)for(H=0;16>H;++H,Ue<<=2)wC(Ue,Je,16*+H,ae,se+VH[H]);for(H=Ae.Gc,et=uo(W,Z,Ae.Dd),nh[et](le,pe),nh[et](ke,$e),Ue=Je,et=le,tt=pe,255&(Ae=0|H)&&(170&Ae?bx(Ue,256,et,tt):Gu(Ue,256,et,tt)),Ae=ke,Ue=$e,255&(H>>=8)&&(170&H?bx(Je,320,Ae,Ue):Gu(Je,320,Ae,Ue)),Z<k.Ub-1&&(i(Te[De].y,0,ae,se+480,16),i(Te[De].f,0,le,pe+224,8),i(Te[De].ea,0,ke,$e+224,8)),H=8*re*k.B,Te=k.sa,De=k.ta+16*W+16*re*k.R,Je=k.qa,Ae=k.ra+8*W+H,Ue=k.Ha,et=k.Ia+8*W+H,H=0;16>H;++H)i(Te,De+H*k.R,ae,se+32*H,16);for(H=0;8>H;++H)i(Je,Ae+H*k.B,le,pe+32*H,8),i(Ue,et+H*k.B,ke,$e+32*H,8)}}function jC(k,P,H,W,Z,re,ae,se,le){var pe=[0],ke=[0],$e=0,Ae=le!=null?le.kd:0,Te=le??new Fe;if(k==null||12>H)return 7;Te.data=k,Te.w=P,Te.ha=H,P=[P],H=[H],Te.gb=[Te.gb];e:{var De=P,Je=H,Ue=Te.gb;if(r(k!=null),r(Je!=null),r(Ue!=null),Ue[0]=0,12<=Je[0]&&!n(k,De[0],"RIFF")){if(n(k,De[0]+8,"WEBP")){Ue=3;break e}var et=Ve(k,De[0]+4);if(12>et||4294967286<et){Ue=3;break e}if(Ae&&et>Je[0]-8){Ue=7;break e}Ue[0]=et,De[0]+=12,Je[0]-=12}Ue=0}if(Ue!=0)return Ue;for(et=0<Te.gb[0],H=H[0];;){e:{var tt=k;Je=P,Ue=H;var ht=pe,ut=ke,ir=De=[0];if((Yt=$e=[$e])[0]=0,8>Ue[0])Ue=7;else{if(!n(tt,Je[0],"VP8X")){if(Ve(tt,Je[0]+4)!=10){Ue=3;break e}if(18>Ue[0]){Ue=7;break e}var Dt=Ve(tt,Je[0]+8),zr=1+Be(tt,Je[0]+12);if(2147483648<=zr*(tt=1+Be(tt,Je[0]+15))){Ue=3;break e}ir!=null&&(ir[0]=Dt),ht!=null&&(ht[0]=zr),ut!=null&&(ut[0]=tt),Je[0]+=18,Ue[0]-=18,Yt[0]=1}Ue=0}}if($e=$e[0],De=De[0],Ue!=0)return Ue;if(Je=!!(2&De),!et&&$e)return 3;if(re!=null&&(re[0]=!!(16&De)),ae!=null&&(ae[0]=Je),se!=null&&(se[0]=0),ae=pe[0],De=ke[0],$e&&Je&&le==null){Ue=0;break}if(4>H){Ue=7;break}if(et&&$e||!et&&!$e&&!n(k,P[0],"ALPH")){H=[H],Te.na=[Te.na],Te.P=[Te.P],Te.Sa=[Te.Sa];e:{Dt=k,Ue=P,et=H;var Yt=Te.gb;ht=Te.na,ut=Te.P,ir=Te.Sa,zr=22,r(Dt!=null),r(et!=null),tt=Ue[0];var cn=et[0];for(r(ht!=null),r(ir!=null),ht[0]=null,ut[0]=null,ir[0]=0;;){if(Ue[0]=tt,et[0]=cn,8>cn){Ue=7;break e}var Ma=Ve(Dt,tt+4);if(4294967286<Ma){Ue=3;break e}var Ur=8+Ma+1&-2;if(zr+=Ur,0<Yt&&zr>Yt){Ue=3;break e}if(!n(Dt,tt,"VP8 ")||!n(Dt,tt,"VP8L")){Ue=0;break e}if(cn[0]<Ur){Ue=7;break e}n(Dt,tt,"ALPH")||(ht[0]=Dt,ut[0]=tt+8,ir[0]=Ma),tt+=Ur,cn-=Ur}}if(H=H[0],Te.na=Te.na[0],Te.P=Te.P[0],Te.Sa=Te.Sa[0],Ue!=0)break}H=[H],Te.Ja=[Te.Ja],Te.xa=[Te.xa];e:if(Yt=k,Ue=P,et=H,ht=Te.gb[0],ut=Te.Ja,ir=Te.xa,Dt=Ue[0],tt=!n(Yt,Dt,"VP8 "),zr=!n(Yt,Dt,"VP8L"),r(Yt!=null),r(et!=null),r(ut!=null),r(ir!=null),8>et[0])Ue=7;else{if(tt||zr){if(Yt=Ve(Yt,Dt+4),12<=ht&&Yt>ht-12){Ue=3;break e}if(Ae&&Yt>et[0]-8){Ue=7;break e}ut[0]=Yt,Ue[0]+=8,et[0]-=8,ir[0]=zr}else ir[0]=5<=et[0]&&Yt[Dt+0]==47&&!(Yt[Dt+4]>>5),ut[0]=et[0];Ue=0}if(H=H[0],Te.Ja=Te.Ja[0],Te.xa=Te.xa[0],P=P[0],Ue!=0)break;if(4294967286<Te.Ja)return 3;if(se==null||Je||(se[0]=Te.xa?2:1),ae=[ae],De=[De],Te.xa){if(5>H){Ue=7;break}se=ae,Ae=De,Je=re,k==null||5>H?k=0:5<=H&&k[P+0]==47&&!(k[P+4]>>5)?(et=[0],Yt=[0],ht=[0],Q(ut=new z,k,P,H),ln(ut,et,Yt,ht)?(se!=null&&(se[0]=et[0]),Ae!=null&&(Ae[0]=Yt[0]),Je!=null&&(Je[0]=ht[0]),k=1):k=0):k=0}else{if(10>H){Ue=7;break}se=De,k==null||10>H||!fC(k,P+3,H-3)?k=0:(Ae=k[P+0]|k[P+1]<<8|k[P+2]<<16,Je=16383&(k[P+7]<<8|k[P+6]),k=16383&(k[P+9]<<8|k[P+8]),1&Ae||3<(Ae>>1&7)||!(Ae>>4&1)||Ae>>5>=Te.Ja||!Je||!k?k=0:(ae&&(ae[0]=Je),se&&(se[0]=k),k=1))}if(!k||(ae=ae[0],De=De[0],$e&&(pe[0]!=ae||ke[0]!=De)))return 3;le!=null&&(le[0]=Te,le.offset=P-le.w,r(4294967286>P-le.w),r(le.offset==le.ha-H));break}return Ue==0||Ue==7&&$e&&le==null?(re!=null&&(re[0]|=Te.na!=null&&0<Te.na.length),W!=null&&(W[0]=ae),Z!=null&&(Z[0]=De),0):Ue}function rc(k,P,H){var W=P.width,Z=P.height,re=0,ae=0,se=W,le=Z;if(P.Da=k!=null&&0<k.Da,P.Da&&(se=k.cd,le=k.bd,re=k.v,ae=k.j,11>H||(re&=-2,ae&=-2),0>re||0>ae||0>=se||0>=le||re+se>W||ae+le>Z))return 0;if(P.v=re,P.j=ae,P.va=re+se,P.o=ae+le,P.U=se,P.T=le,P.da=k!=null&&0<k.da,P.da){if(!ze(se,le,H=[k.ib],re=[k.hb]))return 0;P.ib=H[0],P.hb=re[0]}return P.ob=k!=null&&k.ob,P.Kb=k==null||!k.Sd,P.da&&(P.ob=P.ib<3*W/4&&P.hb<3*Z/4,P.Kb=0),1}function Wp(k){if(k==null)return 2;if(11>k.S){var P=k.f.RGBA;P.fb+=(k.height-1)*P.A,P.A=-P.A}else P=k.f.kb,k=k.height,P.O+=(k-1)*P.fa,P.fa=-P.fa,P.N+=(k-1>>1)*P.Ab,P.Ab=-P.Ab,P.W+=(k-1>>1)*P.Db,P.Db=-P.Db,P.F!=null&&(P.J+=(k-1)*P.lb,P.lb=-P.lb);return 0}function Qb(k,P,H,W){if(W==null||0>=k||0>=P)return 2;if(H!=null){if(H.Da){var Z=H.cd,re=H.bd,ae=-2&H.v,se=-2&H.j;if(0>ae||0>se||0>=Z||0>=re||ae+Z>k||se+re>P)return 2;k=Z,P=re}if(H.da){if(!ze(k,P,Z=[H.ib],re=[H.hb]))return 2;k=Z[0],P=re[0]}}W.width=k,W.height=P;e:{var le=W.width,pe=W.height;if(k=W.S,0>=le||0>=pe||!(k>=NC&&13>k))k=2;else{if(0>=W.Rd&&W.sd==null){ae=re=Z=P=0;var ke=(se=le*WH[k])*pe;if(11>k||(re=(pe+1)/2*(P=(le+1)/2),k==12&&(ae=(Z=le)*pe)),(pe=o(ke+2*re+ae))==null){k=1;break e}W.sd=pe,11>k?((le=W.f.RGBA).eb=pe,le.fb=0,le.A=se,le.size=ke):((le=W.f.kb).y=pe,le.O=0,le.fa=se,le.Fd=ke,le.f=pe,le.N=0+ke,le.Ab=P,le.Cd=re,le.ea=pe,le.W=0+ke+re,le.Db=P,le.Ed=re,k==12&&(le.F=pe,le.J=0+ke+2*re),le.Tc=ae,le.lb=Z)}if(P=1,Z=W.S,re=W.width,ae=W.height,Z>=NC&&13>Z)if(11>Z)k=W.f.RGBA,P&=(se=Math.abs(k.A))*(ae-1)+re<=k.size,P&=se>=re*WH[Z],P&=k.eb!=null;else{k=W.f.kb,se=(re+1)/2,ke=(ae+1)/2,le=Math.abs(k.fa),pe=Math.abs(k.Ab);var $e=Math.abs(k.Db),Ae=Math.abs(k.lb),Te=Ae*(ae-1)+re;P&=le*(ae-1)+re<=k.Fd,P&=pe*(ke-1)+se<=k.Cd,P=(P&=$e*(ke-1)+se<=k.Ed)&le>=re&pe>=se&$e>=se,P&=k.y!=null,P&=k.f!=null,P&=k.ea!=null,Z==12&&(P&=Ae>=re,P&=Te<=k.Tc,P&=k.F!=null)}else P=0;k=P?0:2}}return k!=0||H!=null&&H.fd&&(k=Wp(W)),k}var gx=64,qp=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Hb=24,ho=32,Ro=8,xx=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
vendor: 4,765 bytes, line 3340
33406,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];he("Predictor0","PredictorAdd0"),E.Predictor0=function(){return 4278190080},E.Predictor1=function(k){return k},E.Predictor2=function(k,P,H){return P[H+0]},E.Predictor3=function(k,P,H){return P[H+1]},E.Predictor4=function(k,P,H){return P[H-1]},E.Predictor5=function(k,P,H){return ve(ve(k,P[H+1]),P[H+0])},E.Predictor6=function(k,P,H){return ve(k,P[H-1])},E.Predictor7=function(k,P,H){return ve(k,P[H+0])},E.Predictor8=function(k,P,H){return ve(P[H-1],P[H+0])},E.Predictor9=function(k,P,H){return ve(P[H+0],P[H+1])},E.Predictor10=function(k,P,H){return ve(ve(k,P[H-1]),ve(P[H+0],P[H+1]))},E.Predictor11=function(k,P,H){var W=P[H+0];return 0>=ue(W>>24&255,k>>24&255,(P=P[H-1])>>24&255)+ue(W>>16&255,k>>16&255,P>>16&255)+ue(W>>8&255,k>>8&255,P>>8&255)+ue(255&W,255&k,255&P)?W:k},E.Predictor12=function(k,P,H){var W=P[H+0];return(Pe((k>>24&255)+(W>>24&255)-((P=P[H-1])>>24&255))<<24|Pe((k>>16&255)+(W>>16&255)-(P>>16&255))<<16|Pe((k>>8&255)+(W>>8&255)-(P>>8&255))<<8|Pe((255&k)+(255&W)-(255&P)))>>>0},E.Predictor13=function(k,P,H){var W=P[H-1];return(Ie((k=ve(k,P[H+0]))>>24&255,W>>24&255)<<24|Ie(k>>16&255,W>>16&255)<<16|Ie(k>>8&255,W>>8&255)<<8|Ie(255&k,255&W))>>>0};var Nf=E.PredictorAdd0;E.PredictorAdd1=Se,he("Predictor2","PredictorAdd2"),he("Predictor3","PredictorAdd3"),he("Predictor4","PredictorAdd4"),he("Predictor5","PredictorAdd5"),he("Predictor6","PredictorAdd6"),he("Predictor7","PredictorAdd7"),he("Predictor8","PredictorAdd8"),he("Predictor9","PredictorAdd9"),he("Predictor10","PredictorAdd10"),he("Predictor11","PredictorAdd11"),he("Predictor12","PredictorAdd12"),he("Predictor13","PredictorAdd13");var Sf=E.PredictorAdd2;dt("ColorIndexInverseTransform","MapARGB","32b",function(k){return k>>8&255},function(k){return k}),dt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(k){return k},function(k){return k>>8&255});var yx,Kp=E.ColorIndexInverseTransform,wa=E.MapARGB,eP=E.VP8LColorIndexInverseTransformAlpha,Ku=E.MapAlpha,qc=E.VP8LPredictorsAdd=[];qc.length=16,(E.VP8LPredictors=[]).length=16,(E.VP8LPredictorsAdd_C=[]).length=16,(E.VP8LPredictors_C=[]).length=16;var Gp,Vb,Wb,vx,Xp,Yp,kf,th,Ef,bx,Us,Gu,ai,si,la,Da,rh,qb,wx,_C,wH,jH,_H,CH,Kb,NH,SH,kH,EH=o(511),BH=o(2041),TH=o(225),PH=o(767),IH=0,tP=BH,CC=TH,gl=PH,nc=EH,NC=0,SC=1,FH=2,kC=3,EC=4,rP=5,OH=6,nP=7,iP=8,BC=9,aP=10,ije=[2,3,7],aje=[3,3,11],LH=[280,256,256,256,40],sje=[0,1,1,1,0],oje=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],lje=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],cje=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],uje=8,sP=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],oP=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Gb=null,dje=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],hje=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],RH=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],fje=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,25
33405,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],mje=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,25
33405,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],pje=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,25
vendor: 26,031 bytes, lines 3340-3364
33405,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Aje=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Bf=[],Kc=[],nh=[],gje=1,DH=2,Tf=[],ic=[];Ms("UpsampleRgbLinePair",Qp,3),Ms("UpsampleBgrLinePair",mx,3),Ms("UpsampleRgbaLinePair",$b,4),Ms("UpsampleBgraLinePair",Vp,4),Ms("UpsampleArgbLinePair",Hp,4),Ms("UpsampleRgba4444LinePair",zs,2),Ms("UpsampleRgb565LinePair",px,2);var xje=E.UpsampleRgbLinePair,yje=E.UpsampleBgrLinePair,MH=E.UpsampleRgbaLinePair,zH=E.UpsampleBgraLinePair,UH=E.UpsampleArgbLinePair,$H=E.UpsampleRgba4444LinePair,vje=E.UpsampleRgb565LinePair,TC=16,PC=1<<TC-1,Xb=-227,lP=482,QH=6,bje=(256<<QH)-1,HH=0,wje=o(256),jje=o(256),_je=o(256),Cje=o(256),Nje=o(lP-Xb),Sje=o(lP-Xb);qu("YuvToRgbRow",Qp,3),qu("YuvToBgrRow",mx,3),qu("YuvToRgbaRow",$b,4),qu("YuvToBgraRow",Vp,4),qu("YuvToArgbRow",Hp,4),qu("YuvToRgba4444Row",zs,2),qu("YuvToRgb565Row",px,2);var VH=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],IC=[0,2,8],kje=[8,7,6,4,4,2,2,2,1,1,1,1],Eje=1;this.WebPDecodeRGBA=function(k,P,H,W,Z){var re=SC,ae=new Ce,se=new Sr;ae.ba=se,se.S=re,se.width=[se.width],se.height=[se.height];var le=se.width,pe=se.height,ke=new zt;if(ke==null||k==null)var $e=2;else r(ke!=null),$e=jC(k,P,H,ke.width,ke.height,ke.Pd,ke.Qd,ke.format,null);if($e!=0?le=0:(le!=null&&(le[0]=ke.width[0]),pe!=null&&(pe[0]=ke.height[0]),le=1),le){se.width=se.width[0],se.height=se.height[0],W!=null&&(W[0]=se.width),Z!=null&&(Z[0]=se.height);e:{if(W=new ax,(Z=new Fe).data=k,Z.w=P,Z.ha=H,Z.kd=1,P=[0],r(Z!=null),((k=jC(Z.data,Z.w,Z.ha,null,null,null,P,null,Z))==0||k==7)&&P[0]&&(k=4),(P=k)==0){if(r(ae!=null),W.data=Z.data,W.w=Z.w+Z.offset,W.ha=Z.ha-Z.offset,W.put=pt,W.ac=ii,W.bc=Di,W.ma=ae,Z.xa){if((k=wt())==null){ae=1;break e}if(function(Ae,Te){var De=[0],Je=[0],Ue=[0];t:for(;;){if(Ae==null)return 0;if(Te==null)return Ae.a=2,0;if(Ae.l=Te,Ae.a=0,Q(Ae.m,Te.data,Te.w,Te.ha),!ln(Ae.m,De,Je,Ue)){Ae.a=3;break t}if(Ae.xb=DH,Te.width=De[0],Te.height=Je[0],!dr(De[0],Je[0],1,Ae,null))break t;return 1}return r(Ae.a!=0),0}(k,W)){if(W=(P=Qb(W.width,W.height,ae.Oa,ae.ba))==0){t:{W=k;r:for(;;){if(W==null){W=0;break t}if(r(W.s.yc!=null),r(W.s.Ya!=null),r(0<W.s.Wb),r((H=W.l)!=null),r((Z=H.ma)!=null),W.xb!=0){if(W.ca=Z.ba,W.tb=Z.tb,r(W.ca!=null),!rc(Z.Oa,H,kC)){W.a=2;break r}if(!jr(W,H.width)||H.da)break r;if((H.da||ar(W.ca.S))&&zi(),11>W.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),W.ca.f.kb.F!=null&&zi()),W.Pb&&0<W.s.ua&&W.s.vb.X==null&&!te(W.s.vb,W.s.Wa.Xa)){W.a=1;break r}W.xb=0}if(!nt(W,W.V,W.Ba,W.c,W.i,H.o,Br))break r;Z.Dc=W.Ma,W=1;break t}r(W.a!=0),W=0}W=!W}W&&(P=k.a)}else P=k.a}else{if((k=new R3)==null){ae=1;break e}if(k.Fa=Z.na,k.P=Z.P,k.qc=Z.Sa,Hu(k,W)){if((P=Qb(W.width,W.height,ae.Oa,ae.ba))==0){if(k.Aa=0,H=ae.Oa,r((Z=k)!=null),H!=null){if(0<(le=0>(le=H.Md)?0:100<le?255:255*le/100)){for(pe=ke=0;4>pe;++pe)12>($e=Z.pb[pe]).lc&&($e.ia=le*kje[0>$e.lc?0:$e.lc]>>3),ke|=$e.ia;ke&&(alert("todo:VP8InitRandom"),Z.ia=1)}Z.Ga=H.Id,100<Z.Ga?Z.Ga=100:0>Z.Ga&&(Z.Ga=0)}(function(Ae,Te){if(Ae==null)return 0;if(Te==null)return va(Ae,2,"NULL VP8Io parameter in VP8Decode().");if(!Ae.cb&&!Hu(Ae,Te))return 0;if(r(Ae.cb),Te.ac==null||Te.ac(Te)){Te.ob&&(Ae.L=0);var De=IC[Ae.L];if(Ae.L==2?(Ae.yb=0,Ae.zb=0):(Ae.yb=Te.v-De>>4,Ae.zb=Te.j-De>>4,0>Ae.yb&&(Ae.yb=0),0>Ae.zb&&(Ae.zb=0)),Ae.Va=Te.o+15+De>>4,Ae.Hb=Te.va+15+De>>4,Ae.Hb>Ae.za&&(Ae.Hb=Ae.za),Ae.Va>Ae.Ub&&(Ae.Va=Ae.Ub),0<Ae.L){var Je=Ae.ed;for(De=0;4>De;++De){var Ue;if(Ae.Qa.Cb){var et=Ae.Qa.Lb[De];Ae.Qa.Fb||(et+=Je.Tb)}else et=Je.Tb;for(Ue=0;1>=Ue;++Ue){var tt=Ae.gd[De][Ue],ht=et;if(Je.Pc&&(ht+=Je.vd[0],Ue&&(ht+=Je.od[0])),0<(ht=0>ht?0:63<ht?63:ht)){var ut=ht;0<Je.wb&&(ut=4<Je.wb?ut>>2:ut>>1)>9-Je.wb&&(ut=9-Je.wb),1>ut&&(ut=1),tt.dd=ut,tt.tc=2*ht+ut,tt.ld=40<=ht?2:15<=ht?1:0}else tt.tc=0;tt.La=Ue}}}De=0}else va(Ae,6,"Frame setup failed"),De=Ae.a;if(De=De==0){if(De){Ae.$c=0,0<Ae.Aa||(Ae.Ic=Eje);t:{De=Ae.Ic,Je=4*(ut=Ae.za);var ir=32*ut,Dt=ut+1,zr=0<Ae.L?ut*(0<Ae.Aa?2:1):0,Yt=(Ae.Aa==2?2:1)*ut;if((tt=Je+832+(Ue=3*(16*De+IC[Ae.L])/2*ir)+(et=Ae.Fa!=null&&0<Ae.Fa.length?Ae.Kc.c*Ae.Kc.i:0))!=tt)De=0;else{if(tt>Ae.Vb){if(Ae.Vb=0,Ae.Ec=o(tt),Ae.Fc=0,Ae.Ec==null){De=va(Ae,1,"no memory during frame initialization.");break t}Ae.Vb=tt}tt=Ae.Ec,ht=Ae.Fc,Ae.Ac=tt,Ae.Bc=ht,ht+=Je,Ae.Gd=l(ir,dC),Ae.Hd=0,Ae.rb=l(Dt+1,Pb),Ae.sb=1,Ae.wa=zr?l(zr,tc):null,Ae.Y=0,Ae.D.Nb=0,Ae.D.wa=Ae.wa,Ae.D.Y=Ae.Y,0<Ae.Aa&&(Ae.D.Y+=ut),r(!0),Ae.oc=tt,Ae.pc=ht,ht+=832,Ae.ya=l(Yt,Ib),Ae.aa=0,Ae.D.ya=Ae.ya,Ae.D.aa=Ae.aa,Ae.Aa==2&&(Ae.D.aa+=ut),Ae.R=16*ut,Ae.B=8*ut,ut=(ir=IC[Ae.L])*Ae.R,ir=ir/2*Ae.B,Ae.sa=tt,Ae.ta=ht+ut,Ae.qa=Ae.sa,Ae.ra=Ae.ta+16*De*Ae.R+ir,Ae.Ha=Ae.qa,Ae.Ia=Ae.ra+8*De*Ae.B+ir,Ae.$c=0,ht+=Ue,Ae.mb=et?tt:null,Ae.nb=et?ht:null,r(ht+et<=Ae.Fc+Ae.Vb),Fb(Ae),a(Ae.Ac,Ae.Bc,0,Je),De=1}}if(De){if(Te.ka=0,Te.y=Ae.sa,Te.O=Ae.ta,Te.f=Ae.qa,Te.N=Ae.ra,Te.ea=Ae.Ha,Te.Vd=Ae.Ia,Te.fa=Ae.R,Te.Rc=Ae.B,Te.F=null,Te.J=0,!IH){for(De=-255;255>=De;++De)EH[255+De]=0>De?-De:De;for(De=-1020;1020>=De;++De)BH[1020+De]=-128>De?-128:127<De?127:De;for(De=-112;112>=De;++De)TH[112+De]=-16>De?-16:15<De?15:De;for(De=-255;510>=De;++De)PH[255+De]=0>De?0:255<De?255:De;IH=1}kf=pC,th=D3,bx=M3,Us=z3,Gu=Vu,Ef=mC,ai=xC,si=yC,la=bC,Da=R,rh=vC,qb=zp,wx=Y,_C=fe,wH=hx,jH=zb,_H=fx,CH=gC,Kc[0]=q3,Kc[1]=cx,Kc[2]=V3,Kc[3]=W3,Kc[4]=K3,Kc[5]=Xd,Kc[6]=G3,Kc[7]=Yd,Kc[8]=Y3,Kc[9]=X3,Bf[0]=AC,Bf[1]=U3,Bf[2]=$3,Bf[3]=Q3,Bf[4]=jf,Bf[5]=H3,Bf[6]=Dp,nh[0]=J3,nh[1]=Ob,nh[2]=ux,nh[3]=Lb,nh[4]=Z3,nh[5]=dx,nh[6]=Rb,De=1}else De=0}De&&(De=function(cn,Ma){for(cn.M=0;cn.M<cn.Va;++cn.M){var Ur,Jt=cn.Jc[cn.M&cn.Xb],jt=cn.m,ca=cn;for(Ur=0;Ur<ca.za;++Ur){var Lr=jt,pn=ca,vi=pn.Ac,ys=pn.Bc+4*Ur,fo=pn.zc,Ji=pn.ya[pn.aa+Ur];if(pn.Qa.Bb?Ji.$b=ce(Lr,pn.Pa.jb[0])?2+ce(Lr,pn.Pa.jb[2]):ce(Lr,pn.Pa.jb[1]):Ji.$b=0,pn.kc&&(Ji.Ad=ce(Lr,pn.Bd)),Ji.Za=!ce(Lr,145)+0,Ji.Za){var $s=Ji.Ob,mo=0;for(pn=0;4>pn;++pn){var za,gn=fo[0+pn];for(za=0;4>za;++za){gn=mje[vi[ys+za]][gn];for(var Mn=RH[ce(Lr,gn[0])];0<Mn;)Mn=RH[2*Mn+ce(Lr,gn[Mn])];gn=-Mn,vi[ys+za]=gn}i($s,mo,vi,ys,4),mo+=4,fo[0+pn]=gn}}else gn=ce(Lr,156)?ce(Lr,128)?1:3:ce(Lr,163)?2:0,Ji.Ob[0]=gn,a(vi,ys,gn,4),a(fo,0,gn,4);Ji.Dd=ce(Lr,142)?ce(Lr,114)?ce(Lr,183)?1:3:2:0}if(ca.m.Ka)return va(cn,7,"Premature end-of-partition0 encountered.");for(;cn.ja<cn.za;++cn.ja){if(ca=Jt,Lr=(jt=cn).rb[jt.sb-1],vi=jt.rb[jt.sb+jt.ja],Ur=jt.ya[jt.aa+jt.ja],ys=jt.kc?Ur.Ad:0)Lr.la=vi.la=0,Ur.Za||(Lr.Na=vi.Na=0),Ur.Hc=0,Ur.Gc=0,Ur.ia=0;else{var Zi,zn;if(Lr=vi,vi=ca,ys=jt.Pa.Xc,fo=jt.ya[jt.aa+jt.ja],Ji=jt.pb[fo.$b],pn=fo.ad,$s=0,mo=jt.rb[jt.sb-1],gn=za=0,a(pn,$s,0,384),fo.Za)var vs=0,Gc=ys[3];else{Mn=o(16);var ua=Lr.Na+mo.Na;if(ua=Gb(vi,ys[1],ua,Ji.Eb,0,Mn,0),Lr.Na=mo.Na=(0<ua)+0,1<ua)kf(Mn,0,pn,$s);else{var Do=Mn[0]+3>>3;for(Mn=0;256>Mn;Mn+=16)pn[$s+Mn]=Do}vs=1,Gc=ys[0]}var Zn=15&Lr.la,Ua=15&mo.la;for(Mn=0;4>Mn;++Mn){var xl=1&Ua;for(Do=zn=0;4>Do;++Do)Zn=Zn>>1|(xl=(ua=Gb(vi,Gc,ua=xl+(1&Zn),Ji.Sc,vs,pn,$s))>vs)<<7,zn=zn<<2|(3<ua?3:1<ua?2:pn[$s+0]!=0),$s+=16;Zn>>=4,Ua=Ua>>1|xl<<7,za=(za<<8|zn)>>>0}for(Gc=Zn,vs=Ua>>4,Zi=0;4>Zi;Zi+=2){for(zn=0,Zn=Lr.la>>4+Zi,Ua=mo.la>>4+Zi,Mn=0;2>Mn;++Mn){for(xl=1&Ua,Do=0;2>Do;++Do)ua=xl+(1&Zn),Zn=Zn>>1|(xl=0<(ua=Gb(vi,ys[2],ua,Ji.Qc,0,pn,$s)))<<3,zn=zn<<2|(3<ua?3:1<ua?2:pn[$s+0]!=0),$s+=16;Zn>>=2,Ua=Ua>>1|xl<<5}gn|=zn<<4*Zi,Gc|=Zn<<4<<Zi,vs|=(240&Ua)<<Zi}Lr.la=Gc,mo.la=vs,fo.Hc=za,fo.Gc=gn,fo.ia=43690&gn?0:Ji.ia,ys=!(za|gn)}if(0<jt.L&&(jt.wa[jt.Y+jt.ja]=jt.gd[Ur.$b][Ur.Za],jt.wa[jt.Y+jt.ja].La|=!ys),ca.Ka)return va(cn,7,"Premature end-of-file encountered.")}if(Fb(cn),jt=Ma,ca=1,Ur=(Jt=cn).D,Lr=0<Jt.L&&Jt.M>=Jt.zb&&Jt.M<=Jt.Va,Jt.Aa==0)t:{if(Ur.M=Jt.M,Ur.uc=Lr,Ax(Jt,Ur),ca=1,Ur=(zn=Jt.D).Nb,Lr=(gn=IC[Jt.L])*Jt.R,vi=gn/2*Jt.B,Mn=16*Ur*Jt.R,Do=8*Ur*Jt.B,ys=Jt.sa,fo=Jt.ta-Lr+Mn,Ji=Jt.qa,pn=Jt.ra-vi+Do,$s=Jt.Ha,mo=Jt.Ia-vi+Do,Ua=(Zn=zn.M)==0,za=Zn>=Jt.Va-1,Jt.Aa==2&&Ax(Jt,zn),zn.uc)for(xl=(ua=Jt).D.M,r(ua.D.uc),zn=ua.yb;zn<ua.Hb;++zn){vs=zn,Gc=xl;var po=(yl=(bs=ua).D).Nb;Zi=bs.R;var yl=yl.wa[yl.Y+vs],vl=bs.sa,Mo=bs.ta+16*po*Zi+16*vs,bl=yl.dd,oi=yl.tc;if(oi!=0)if(r(3<=oi),bs.L==1)0<vs&&jH(vl,Mo,Zi,oi+4),yl.La&&CH(vl,Mo,Zi,oi),0<Gc&&wH(vl,Mo,Zi,oi+4),yl.La&&_H(vl,Mo,Zi,oi);else{var wl=bs.B,Xc=bs.qa,Jp=bs.ra+8*po*wl+8*vs,ih=bs.Ha,bs=bs.Ia+8*po*wl+8*vs;po=yl.ld,0<vs&&(si(vl,Mo,Zi,oi+4,bl,po),Da(Xc,Jp,ih,bs,wl,oi+4,bl,po)),yl.La&&(qb(vl,Mo,Zi,oi,bl,po),_C(Xc,Jp,ih,bs,wl,oi,bl,po)),0<Gc&&(ai(vl,Mo,Zi,oi+4,bl,po),la(Xc,Jp,ih,bs,wl,oi+4,bl,po)),yl.La&&(rh(vl,Mo,Zi,oi,bl,po),wx(Xc,Jp,ih,bs,wl,oi,bl,po))}}if(Jt.ia&&alert("todo:DitherRow"),jt.put!=null){if(zn=16*Zn,Zn=16*(Zn+1),Ua?(jt.y=Jt.sa,jt.O=Jt.ta+Mn,jt.f=Jt.qa,jt.N=Jt.ra+Do,jt.ea=Jt.Ha,jt.W=Jt.Ia+Do):(zn-=gn,jt.y=ys,jt.O=fo,jt.f=Ji,jt.N=pn,jt.ea=$s,jt.W=mo),za||(Zn-=gn),Zn>jt.o&&(Zn=jt.o),jt.F=null,jt.J=null,Jt.Fa!=null&&0<Jt.Fa.length&&zn<Zn&&(jt.J=ba(Jt,jt,zn,Zn-zn),jt.F=Jt.mb,jt.F==null&&jt.F.length==0)){ca=va(Jt,3,"Could not decode alpha data.");break t}zn<jt.j&&(gn=jt.j-zn,zn=jt.j,r(!(1&gn)),jt.O+=Jt.R*gn,jt.N+=Jt.B*(gn>>1),jt.W+=Jt.B*(gn>>1),jt.F!=null&&(jt.J+=jt.width*gn)),zn<Zn&&(jt.O+=jt.v,jt.N+=jt.v>>1,jt.W+=jt.v>>1,jt.F!=null&&(jt.J+=jt.v),jt.ka=zn-jt.j,jt.U=jt.va-jt.v,jt.T=Zn-zn,ca=jt.put(jt))}Ur+1!=Jt.Ic||za||(i(Jt.sa,Jt.ta-Lr,ys,fo+16*Jt.R,Lr),i(Jt.qa,Jt.ra-vi,Ji,pn+8*Jt.B,vi),i(Jt.Ha,Jt.Ia-vi,$s,mo+8*Jt.B,vi))}if(!ca)return va(cn,6,"Output aborted.")}return 1}(Ae,Te)),Te.bc!=null&&Te.bc(Te),De&=1}return De?(Ae.cb=0,De):0})(k,W)||(P=k.a)}}else P=k.a}P==0&&ae.Oa!=null&&ae.Oa.fd&&(P=Wp(ae.ba))}ae=P}re=ae!=0?null:11>re?se.f.RGBA.eb:se.f.kb.y}else re=null;return re};var WH=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(E,O){for(var B="",T=0;T<4;T++)B+=String.fromCharCode(E[O++]);return B}function h(E,O){return E[O+0]|E[O+1]<<8}function f(E,O){return(E[O+0]|E[O+1]<<8|E[O+2]<<16)>>>0}function p(E,O){return(E[O+0]|E[O+1]<<8|E[O+2]<<16|E[O+3]<<24)>>>0}new u;var m=[0],A=[0],g=[],y=new u,x=e,b=function(E,O){var B={},T=0,F=!1,I=0,D=0;if(B.frames=[],!function(M,z){for(var K=0;K<4;K++)if(M[z+K]!="RIFF".charCodeAt(K))return!0;return!1}(E,O)){for(p(E,O+=4),O+=8;O<E.length;){var L=d(E,O),V=p(E,O+=4);O+=4;var U=V+(1&V);switch(L){case"VP8 ":case"VP8L":B.frames[T]===void 0&&(B.frames[T]={}),(q=B.frames[T]).src_off=F?D:O-8,q.src_size=I+V+8,T++,F&&(F=!1,I=0,D=0);break;case"VP8X":(q=B.header={}).feature_flags=E[O];var Q=O+4;q.canvas_width=1+f(E,Q),Q+=3,q.canvas_height=1+f(E,Q),Q+=3;break;case"ALPH":F=!0,I=U+8,D=O-8;break;case"ANIM":(q=B.header).bgcolor=p(E,O),Q=O+4,q.loop_count=h(E,Q),Q+=2;break;case"ANMF":var $,q;(q=B.frames[T]={}).offset_x=2*f(E,O),O+=3,q.offset_y=2*f(E,O),O+=3,q.width=1+f(E,O),O+=3,q.height=1+f(E,O),O+=3,q.duration=f(E,O),O+=3,$=E[O++],q.dispose=1&$,q.blend=$>>1&1}L!="ANMF"&&(O+=U)}return B}}(x,0);b.response=x,b.rgbaoutput=!0,b.dataurl=!1;var v=b.header?b.header:null,j=b.frames?b.frames:null;if(v){v.loop_counter=v.loop_count,m=[v.canvas_height],A=[v.canvas_width];for(var _=0;_<j.length&&j[_].blend!=0;_++);}var C=j[0],N=y.WebPDecodeRGBA(x,C.src_off,C.src_size,A,m);C.rgba=N,C.imgwidth=A[0],C.imgheight=m[0];for(var S=0;S<A[0]*m[0]*4;S++)g[S]=N[S];return this.width=A,this.height=m,this.data=g,this}/** ====================================================================
3341 * @license
3342 * jsPDF XMP metadata plugin
3343 * Copyright (c) 2016 Jussi Utunen, [email protected]
3344 *
3345 * Permission is hereby granted, free of charge, to any person obtaining
3346 * a copy of this software and associated documentation files (the
3347 * "Software"), to deal in the Software without restriction, including
3348 * without limitation the rights to use, copy, modify, merge, publish,
3349 * distribute, sublicense, and/or sell copies of the Software, and to
3350 * permit persons to whom the Software is furnished to do so, subject to
3351 * the following conditions:
3352 *
3353 * The above copyright notice and this permission notice shall be
3354 * included in all copies or substantial portions of the Software.
3355 *
3356 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3357 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3358 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3359 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
3360 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
3361 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
3362 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3363 * ====================================================================
3364 */function $6t(){var e,r=this.internal.__metadata__.metadata,n=unescape(encodeURIComponent(r));e=this.internal.__metadata__.rawXml?n:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+e.length+" >>"),this.internal.write("stream"),this.internal.write(e),this.internal.write("endstream"),this.internal.write("endobj")}function Q6t(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(e){var r,n,i,a,o,l,c,u,d,h=function(M){return M=M||{},this.isStrokeTransparent=M.isStrokeTransparent||!1,this.strokeOpacity=M.strokeOpacity||1,this.strokeStyle=M.strokeStyle||"#000000",this.fillStyle=M.fillStyle||"#000000",this.isFillTransparent=M.isFillTransparent||!1,this.fillOpacity=M.fillOpacity||1,this.font=M.font||"10px sans-serif",this.textBaseline=M.textBaseline||"alphabetic",this.textAlign=M.textAlign||"left",this.lineWidth=M.lineWidth||1,this.lineJoin=M.lineJoin||"miter",this.lineCap=M.lineCap||"butt",this.path=M.path||[],this.transform=M.transform!==void 0?M.transform.clone():new u,this.globalCompositeOperation=M.globalCompositeOperation||"normal",this.globalAlpha=M.globalAlpha||1,this.clip_path=M.clip_path||[],this.currentPoint=M.currentPoint||new l,this.miterLimit=M.miterLimit||10,this.lastPoint=M.lastPoint||new l,this.lineDashOffset=M.lineDashOffset||0,this.lineDash=M.lineDash||[],this.margin=M.margin||[0,0,0,0],this.prevPageLastElemOffset=M.prevPageLastElemOffset||0,this.ignoreClearRect=typeof M.ignoreClearRect!="boolean"||M.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new f(this),r=this.internal.f2,n=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,o=this.internal.getVerticalCoordinate,l=this.internal.Point,c=this.internal.Rectangle,u=this.internal.Matrix,d=new h}]);var f=function(M){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var z=M;Object.defineProperty(this,"pdf",{get:function(){return z}});var K=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return K},set:function(te){K=!!te}});var ne=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return ne},set:function(te){ne=!!te}});var ie=0;Object.defineProperty(this,"posX",{get:function(){return ie},set:function(te){isNaN(te)||(ie=te)}});var X=0;Object.defineProperty(this,"posY",{get:function(){return X},set:function(te){isNaN(te)||(X=te)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(te){var xe;typeof te=="number"?xe=[te,te,te,te]:((xe=new Array(4))[0]=te[0],xe[1]=te.length>=2?te[1]:xe[0],xe[2]=te.length>=3?te[2]:xe[0],xe[3]=te.length>=4?te[3]:xe[1]),d.margin=xe}});var de=!1;Object.defineProperty(this,"autoPaging",{get:function(){return de},set:function(te){de=te}});var oe=0;Object.defineProperty(this,"lastBreak",{get:function(){return oe},set:function(te){oe=te}});var ce=[];Object.defineProperty(this,"pageBreaks",{get:function(){return ce},set:function(te){ce=te}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(te){te instanceof h&&(d=te)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(te){d.path=te}});var ye=[];Object.defineProperty(this,"ctxStack",{get:function(){return ye},set:function(te){ye=te}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(te){var xe;xe=p(te),this.ctx.fillStyle=xe.style,this.ctx.isFillTransparent=xe.a===0,this.ctx.fillOpacity=xe.a,this.pdf.setFillColor(xe.r,xe.g,xe.b,{a:xe.a}),this.pdf.setTextColor(xe.r,xe.g,xe.b,{a:xe.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(te){var xe=p(te);this.ctx.strokeStyle=xe.style,this.ctx.isStrokeTransparent=xe.a===0,this.ctx.strokeOpacity=xe.a,xe.a===0?this.pdf.setDrawColor(255,255,255):(xe.a,this.pdf.setDrawColor(xe.r,xe.g,xe.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(te){["butt","round","square"].indexOf(te)!==-1&&(this.ctx.lineCap=te,this.pdf.setLineCap(te))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(te){isNaN(te)||(this.ctx.lineWidth=te,this.pdf.setLineWidth(te))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(te){["bevel","round","miter"].indexOf(te)!==-1&&(this.ctx.lineJoin=te,this.pdf.setLineJoin(te))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(te){isNaN(te)||(this.ctx.miterLimit=te,this.pdf.setMiterLimit(te))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(te){this.ctx.textBaseline=te}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(te){["right","end","center","left","start"].indexOf(te)!==-1&&(this.ctx.textAlign=te)}});var ge=null,Be=null,Ve=null;Object.defineProperty(this,"fontFaces",{get:function(){return Ve},set:function(te){ge=null,Be=null,Ve=te}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(te){var xe;if(this.ctx.font=te,(xe=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(te))!==null){var We=xe[1];xe[2];var ze=xe[3],we=xe[4];xe[5];var J=xe[6],he=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(we)[2];we=Math.floor(he==="px"?parseFloat(we)*this.pdf.internal.scaleFactor:he==="em"?parseFloat(we)*this.pdf.getFontSize():parseFloat(we)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(we);var je=function(dt){var Fr,Xt,Vt=[],lr=dt.trim();if(lr==="")return VO;if(lr in jie)return[jie[lr]];for(;lr!=="";){switch(Xt=null,Fr=(lr=Cie(lr)).charAt(0)){case'"':case"'":Xt=L6t(lr.substring(1),Fr);break;default:Xt=R6t(lr)}if(Xt===null||(Vt.push(Xt[0]),(lr=Cie(Xt[1]))!==""&&lr.charAt(0)!==","))return VO;lr=lr.replace(/^,/,"")}return Vt}(J);if(this.fontFaces){var ve=function(dt,Fr){var Xt=dt.getFontList(),Vt=JSON.stringify(Xt);if(ge===null||Be!==Vt){var lr=function(cr){var Bt=[];return Object.keys(cr).forEach(function(kr){cr[kr].forEach(function(ar){var ur=null;switch(ar){case"bold":ur={family:kr,weight:"bold"};break;case"italic":ur={family:kr,style:"italic"};break;case"bolditalic":ur={family:kr,weight:"bold",style:"italic"};break;case"":case"normal":ur={family:kr}}ur!==null&&(ur.ref={name:kr,style:ar},Bt.push(ur))})}),Bt}(Xt);ge=function(cr){for(var Bt={},kr=0;kr<cr.length;++kr){var ar=HO(cr[kr]),ur=ar.family,kn=ar.stretch,Sr=ar.style,zt=ar.weight;Bt[ur]=Bt[ur]||{},Bt[ur][kn]=Bt[ur][kn]||{},Bt[ur][kn][Sr]=Bt[ur][kn][Sr]||{},Bt[ur][kn][Sr][zt]=ar}return Bt}(lr.concat(Fr)),Be=Vt}return ge}(this.pdf,this.fontFaces),Pe=je.map(function(dt){return{family:dt,stretch:"normal",weight:ze,style:We}}),Ie=function(dt,Fr,Xt){for(var Vt=(Xt=Xt||{}).defaultFontFamily||"times",lr=Object.assign({},O6t,Xt.genericFontFamilies||{}),cr=null,Bt=null,kr=0;kr<Fr.length;++kr)if(lr[(cr=HO(Fr[kr])).family]&&(cr.family=lr[cr.family]),dt.hasOwnProperty(cr.family)){Bt=dt[cr.family];break}if(!(Bt=Bt||dt[Vt]))throw new Error("Could not find a font-family for the rule '"+_ie(cr)+"' and default family '"+Vt+"'.");if(Bt=function(ar,ur){if(ur[ar])return ur[ar];var kn=P6[ar],Sr=kn<=P6.normal?-1:1,zt=wie(ur,Z2e,kn,Sr);if(!zt)throw new Error("Could not find a matching font-stretch value for "+ar);return zt}(cr.stretch,Bt),Bt=function(ar,ur){if(ur[ar])return ur[ar];for(var kn=J2e[ar],Sr=0;Sr<kn.length;++Sr)if(ur[kn[Sr]])return ur[kn[Sr]];throw new Error("Could not find a matching font-style for "+ar)}(cr.style,Bt),!(Bt=function(ar,ur){if(ur[ar])return ur[ar];if(ar===400&&ur[500])return ur[500];if(ar===500&&ur[400])return ur[400];var kn=F6t[ar],Sr=wie(ur,eje,kn,ar<400?-1:1);if(!Sr)throw new Error("Could not find a matching font-weight for value "+ar);return Sr}(cr.weight,Bt)))throw new Error("Failed to resolve a font for the rule '"+_ie(cr)+"'.");return Bt}(ve,Pe);this.pdf.setFont(Ie.ref.name,Ie.ref.style)}else{var ue="";(ze==="bold"||parseInt(ze,10)>=700||We==="bold")&&(ue="bold"),We==="italic"&&(ue+="italic"),ue.length===0&&(ue="normal");for(var Se="",He={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Qe=0;Qe<je.length;Qe++){if(this.pdf.internal.getFont(je[Qe],ue,{noFallback:!0,disableWarning:!0})!==void 0){Se=je[Qe];break}if(ue==="bolditalic"&&this.pdf.internal.getFont(je[Qe],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Se=je[Qe],ue="bold";else if(this.pdf.internal.getFont(je[Qe],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Se=je[Qe],ue="normal";break}}if(Se===""){for(var ct=0;ct<je.length;ct++)if(He[je[ct]]){Se=He[je[ct]];break}}Se=Se===""?"Times":Se,this.pdf.setFont(Se,ue)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(te){this.ctx.globalCompositeOperation=te}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(te){this.ctx.globalAlpha=te}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(te){this.ctx.lineDashOffset=te,q.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(te){this.ctx.lineDash=te,q.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(te){this.ctx.ignoreClearRect=!!te}})};f.prototype.setLineDash=function(M){this.lineDash=M},f.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},f.prototype.fill=function(){j.call(this,"fill",!1)},f.prototype.stroke=function(){j.call(this,"stroke",!1)},f.prototype.beginPath=function(){this.path=[{type:"begin"}]},f.prototype.moveTo=function(M,z){if(isNaN(M)||isNaN(z))throw ti.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var K=this.ctx.transform.applyToPoint(new l(M,z));this.path.push({type:"mt",x:K.x,y:K.y}),this.ctx.lastPoint=new l(M,z)},f.prototype.closePath=function(){var M=new l(0,0),z=0;for(z=this.path.length-1;z!==-1;z--)if(this.path[z].type==="begin"&&$n(this.path[z+1])==="object"&&typeof this.path[z+1].x=="number"){M=new l(this.path[z+1].x,this.path[z+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new l(M.x,M.y)},f.prototype.lineTo=function(M,z){if(isNaN(M)||isNaN(z))throw ti.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var K=this.ctx.transform.applyToPoint(new l(M,z));this.path.push({type:"lt",x:K.x,y:K.y}),this.ctx.lastPoint=new l(K.x,K.y)},f.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),j.call(this,null,!0)},f.prototype.quadraticCurveTo=function(M,z,K,ne){if(isNaN(K)||isNaN(ne)||isNaN(M)||isNaN(z))throw ti.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var ie=this.ctx.transform.applyToPoint(new l(K,ne)),X=this.ctx.transform.applyToPoint(new l(M,z));this.path.push({type:"qct",x1:X.x,y1:X.y,x:ie.x,y:ie.y}),this.ctx.lastPoint=new l(ie.x,ie.y)},f.prototype.bezierCurveTo=function(M,z,K,ne,ie,X){if(isNaN(ie)||isNaN(X)||isNaN(M)||isNaN(z)||isNaN(K)||isNaN(ne))throw ti.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var de=this.ctx.transform.applyToPoint(new l(ie,X)),oe=this.ctx.transform.applyToPoint(new l(M,z)),ce=this.ctx.transform.applyToPoint(new l(K,ne));this.path.push({type:"bct",x1:oe.x,y1:oe.y,x2:ce.x,y2:ce.y,x:de.x,y:de.y}),this.ctx.lastPoint=new l(de.x,de.y)},f.prototype.arc=function(M,z,K,ne,ie,X){if(isNaN(M)||isNaN(z)||isNaN(K)||isNaN(ne)||isNaN(ie))throw ti.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to 
3364jsPDF.context2d.arc");if(X=!!X,!this.ctx.transform.isIdentity){var de=this.ctx.transform.applyToPoint(new l(M,z));M=de.x,z=de.y;var oe=this.ctx.transform.applyToPoint(new l(0,K)),ce=this.ctx.transform.applyToPoint(new l(0,0));K=Math.sqrt(Math.pow(oe.x-ce.x,2)+Math.pow(oe.y-ce.y,2))}Math.abs(ie-ne)>=2*Math.PI&&(ne=0,ie=2*Math.PI),this.path.push({type:"arc",x:M,y:z,radius:K,startAngle:ne,endAngle:ie,counterclockwise:X})},f.prototype.arcTo=function(M,z,K,ne,ie){throw new Error("arcTo not implemented.")},f.prototype.rect=function(M,z,K,ne){if(isNaN(M)||isNaN(z)||isNaN(K)||isNaN(ne))throw ti.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(M,z),this.lineTo(M+K,z),this.lineTo(M+K,z+ne),this.lineTo(M,z+ne),this.lineTo(M,z),this.lineTo(M+K,z),this.lineTo(M,z)},f.prototype.fillRect=function(M,z,K,ne){if(isNaN(M)||isNaN(z)||isNaN(K)||isNaN(ne))throw ti.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!m.call(this)){var ie={};this.lineCap!=="butt"&&(ie.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(ie.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(M,z,K,ne),this.fill(),ie.hasOwnProperty("lineCap")&&(this.lineCap=ie.lineCap),ie.hasOwnProperty("lineJoin")&&(this.lineJoin=ie.lineJoin)}},f.prototype.strokeRect=function(M,z,K,ne){if(isNaN(M)||isNaN(z)||isNaN(K)||isNaN(ne))throw ti.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");A.call(this)||(this.beginPath(),this.rect(M,z,K,ne),this.stroke())},f.prototype.clearRect=function(M,z,K,ne){if(isNaN(M)||isNaN(z)||isNaN(K)||isNaN(ne))throw ti.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(M,z,K,ne))},f.prototype.save=function(M){M=typeof M!="boolean"||M;for(var z=this.pdf.internal.getCurrentPageInfo().pageNumber,K=0;K<this.pdf.internal.getNumberOfPages();K++)this.pdf.setPage(K+1),this.pdf.internal.out("q");if(this.pdf.setPage(z),M){this.ctx.fontSize=this.pdf.internal.getFontSize();var ne=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=ne}},f.prototype.restore=function(M){M=typeof M!="boolean"||M;for(var z=this.pdf.internal.getCurrentPageInfo().pageNumber,K=0;K<this.pdf.internal.getNumberOfPages();K++)this.pdf.setPage(K+1),this.pdf.internal.out("Q");this.pdf.setPage(z),M&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},f.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var p=function(M){var z,K,ne,ie;if(M.isCanvasGradient===!0&&(M=M.getColor()),!M)return{r:0,g:0,b:0,a:0,style:M};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(M))z=0,K=0,ne=0,ie=0;else{var X=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(M);if(X!==null)z=parseInt(X[1]),K=parseInt(X[2]),ne=parseInt(X[3]),ie=1;else if((X=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(M))!==null)z=parseInt(X[1]),K=parseInt(X[2]),ne=parseInt(X[3]),ie=parseFloat(X[4]);else{if(ie=1,typeof M=="string"&&M.charAt(0)!=="#"){var de=new V2e(M);M=de.ok?de.toHex():"#000000"}M.length===4?(z=M.substring(1,2),z+=z,K=M.substring(2,3),K+=K,ne=M.substring(3,4),ne+=ne):(z=M.substring(1,3),K=M.substring(3,5),ne=M.substring(5,7)),z=parseInt(z,16),K=parseInt(K,16),ne=parseInt(ne,16)}}return{r:z,g:K,b:ne,a:ie,style:M}},m=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},A=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};f.prototype.fillText=function(M,z,K,ne){if(isNaN(z)||isNaN(K)||typeof M!="string")throw ti.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to 
3364jsPDF.context2d.fillText");if(ne=isNaN(ne)?void 0:ne,!m.call(this)){var ie=U(this.ctx.transform.rotation),X=this.ctx.transform.scaleX;T.call(this,{text:M,x:z,y:K,scale:X,angle:ie,align:this.textAlign,maxWidth:ne})}},f.prototype.strokeText=function(M,z,K,ne){if(isNaN(z)||isNaN(K)||typeof M!="string")throw ti.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!A.call(this)){ne=isNaN(ne)?void 0:ne;var ie=U(this.ctx.transform.rotation),X=this.ctx.transform.scaleX;T.call(this,{text:M,x:z,y:K,scale:X,renderingMode:"stroke",angle:ie,align:this.textAlign,maxWidth:ne})}},f.prototype.measureText=function(M){if(typeof M!="string")throw ti.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var z=this.pdf,K=this.pdf.internal.scaleFactor,ne=z.internal.getFontSize(),ie=z.getStringUnitWidth(M)*ne/z.internal.scaleFactor;return new function(X){var de=(X=X||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return de}}),this}({width:ie*=Math.round(96*K/72*1e4)/1e4})},f.prototype.scale=function(M,z){if(isNaN(M)||isNaN(z))throw ti.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var K=new u(M,0,0,z,0,0);this.ctx.transform=this.ctx.transform.multiply(K)},f.prototype.rotate=function(M){if(isNaN(M))throw ti.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");
vendor: 43,799 bytes, lines 3364-3370
3364var z=new u(Math.cos(M),Math.sin(M),-Math.sin(M),Math.cos(M),0,0);this.ctx.transform=this.ctx.transform.multiply(z)},f.prototype.translate=function(M,z){if(isNaN(M)||isNaN(z))throw ti.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var K=new u(1,0,0,1,M,z);this.ctx.transform=this.ctx.transform.multiply(K)},f.prototype.transform=function(M,z,K,ne,ie,X){if(isNaN(M)||isNaN(z)||isNaN(K)||isNaN(ne)||isNaN(ie)||isNaN(X))throw ti.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var de=new u(M,z,K,ne,ie,X);this.ctx.transform=this.ctx.transform.multiply(de)},f.prototype.setTransform=function(M,z,K,ne,ie,X){M=isNaN(M)?1:M,z=isNaN(z)?0:z,K=isNaN(K)?0:K,ne=isNaN(ne)?1:ne,ie=isNaN(ie)?0:ie,X=isNaN(X)?0:X,this.ctx.transform=new u(M,z,K,ne,ie,X)};var g=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};f.prototype.drawImage=function(M,z,K,ne,ie,X,de,oe,ce){var ye=this.pdf.getImageProperties(M),ge=1,Be=1,Ve=1,te=1;ne!==void 0&&oe!==void 0&&(Ve=oe/ne,te=ce/ie,ge=ye.width/ne*oe/ne,Be=ye.height/ie*ce/ie),X===void 0&&(X=z,de=K,z=0,K=0),ne!==void 0&&oe===void 0&&(oe=ne,ce=ie),ne===void 0&&oe===void 0&&(oe=ye.width,ce=ye.height);var xe=this.ctx.transform.decompose(),We=U(xe.rotate.shx),ze=new u,we=(ze=(ze=(ze=ze.multiply(xe.translate)).multiply(xe.skew)).multiply(xe.scale)).applyToRectangle(new c(X-z*Ve,de-K*te,ne*ge,ie*Be));if(this.autoPaging){for(var J,he=y.call(this,we),je=[],ve=0;ve<he.length;ve+=1)je.indexOf(he[ve])===-1&&je.push(he[ve]);v(je);for(var Pe=je[0],Ie=je[je.length-1],ue=Pe;ue<Ie+1;ue++){this.pdf.setPage(ue);var Se=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],He=ue===1?this.posY+this.margin[0]:this.margin[0],Qe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ct=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],dt=ue===1?0:Qe+(ue-2)*ct;if(this.ctx.clip_path.length!==0){var Fr=this.path;J=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(J,this.posX+this.margin[3],-dt+He+this.ctx.prevPageLastElemOffset),_.call(this,"fill",!0),this.path=Fr}var Xt=JSON.parse(JSON.stringify(we));Xt=b([Xt],this.posX+this.margin[3],-dt+He+this.ctx.prevPageLastElemOffset)[0];var Vt=(ue>Pe||ue<Ie)&&g.call(this);Vt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Se,ct,null).clip().discardPath()),this.pdf.addImage(M,"JPEG",Xt.x,Xt.y,Xt.w,Xt.h,null,null,We),Vt&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(M,"JPEG",we.x,we.y,we.w,we.h,null,null,We)};var y=function(M,z,K){var ne=[];z=z||this.pdf.internal.pageSize.width,K=K||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var ie=this.posY+this.ctx.prevPageLastElemOffset;switch(M.type){default:case"mt":case"lt":ne.push(Math.floor((M.y+ie)/K)+1);break;case"arc":ne.push(Math.floor((M.y+ie-M.radius)/K)+1),ne.push(Math.floor((M.y+ie+M.radius)/K)+1);break;case"qct":var X=Q(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x,M.y);ne.push(Math.floor((X.y+ie)/K)+1),ne.push(Math.floor((X.y+X.h+ie)/K)+1);break;case"bct":var de=$(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x2,M.y2,M.x,M.y);ne.push(Math.floor((de.y+ie)/K)+1),ne.push(Math.floor((de.y+de.h+ie)/K)+1);break;case"rect":ne.push(Math.floor((M.y+ie)/K)+1),ne.push(Math.floor((M.y+M.h+ie)/K)+1)}for(var oe=0;oe<ne.length;oe+=1)for(;this.pdf.internal.getNumberOfPages()<ne[oe];)x.call(this);return ne},x=function(){var M=this.fillStyle,z=this.strokeStyle,K=this.font,ne=this.lineCap,ie=this.lineWidth,X=this.lineJoin;this.pdf.addPage(),this.fillStyle=M,this.strokeStyle=z,this.font=K,this.lineCap=ne,this.lineWidth=ie,this.lineJoin=X},b=function(M,z,K){for(var ne=0;ne<M.length;ne++)switch(M[ne].type){case"bct":M[ne].x2+=z,M[ne].y2+=K;case"qct":M[ne].x1+=z,M[ne].y1+=K;default:M[ne].x+=z,M[ne].y+=K}return M},v=function(M){return M.sort(function(z,K){return z-K})},j=function(M,z){var K=this.fillStyle,ne=this.strokeStyle,ie=this.lineCap,X=this.lineWidth,de=Math.abs(X*this.ctx.transform.scaleX),oe=this.lineJoin;if(this.autoPaging){for(var ce,ye,ge=JSON.parse(JSON.stringify(this.path)),Be=JSON.parse(JSON.stringify(this.path)),Ve=[],te=0;te<Be.length;te++)if(Be[te].x!==void 0)for(var xe=y.call(this,Be[te]),We=0;We<xe.length;We+=1)Ve.indexOf(xe[We])===-1&&Ve.push(xe[We]);for(var ze=0;ze<Ve.length;ze++)for(;this.pdf.internal.getNumberOfPages()<Ve[ze];)x.call(this);v(Ve);for(var we=Ve[0],J=Ve[Ve.length-1],he=we;he<J+1;he++){this.pdf.setPage(he),this.fillStyle=K,this.strokeStyle=ne,this.lineCap=ie,this.lineWidth=de,this.lineJoin=oe;var je=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ve=he===1?this.posY+this.margin[0]:this.margin[0],Pe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ie=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ue=he===1?0:Pe+(he-2)*Ie;if(this.ctx.clip_path.length!==0){var Se=this.path;ce=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(ce,this.posX+this.margin[3],-ue+ve+this.ctx.prevPageLastElemOffset),_.call(this,M,!0),this.path=Se}if(ye=JSON.parse(JSON.stringify(ge)),this.path=b(ye,this.posX+this.margin[3],-ue+ve+this.ctx.prevPageLastElemOffset),z===!1||he===0){var He=(he>we||he<J)&&g.call(this);He&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],je,Ie,null).clip().discardPath()),_.call(this,M,z),He&&this.pdf.restoreGraphicsState()}this.lineWidth=X}this.path=ge}else this.lineWidth=de,_.call(this,M,z),this.lineWidth=X},_=function(M,z){if((M!=="stroke"||z||!A.call(this))&&(M==="stroke"||z||!m.call(this))){for(var K,ne,ie=[],X=this.path,de=0;de<X.length;de++){var oe=X[de];switch(oe.type){case"begin":ie.push({begin:!0});break;case"close":ie.push({close:!0});break;case"mt":ie.push({start:oe,deltas:[],abs:[]});break;case"lt":var ce=ie.length;if(X[de-1]&&!isNaN(X[de-1].x)&&(K=[oe.x-X[de-1].x,oe.y-X[de-1].y],ce>0)){for(;ce>=0;ce--)if(ie[ce-1].close!==!0&&ie[ce-1].begin!==!0){ie[ce-1].deltas.push(K),ie[ce-1].abs.push(oe);break}}break;case"bct":K=[oe.x1-X[de-1].x,oe.y1-X[de-1].y,oe.x2-X[de-1].x,oe.y2-X[de-1].y,oe.x-X[de-1].x,oe.y-X[de-1].y],ie[ie.length-1].deltas.push(K);break;case"qct":var ye=X[de-1].x+2/3*(oe.x1-X[de-1].x),ge=X[de-1].y+2/3*(oe.y1-X[de-1].y),Be=oe.x+2/3*(oe.x1-oe.x),Ve=oe.y+2/3*(oe.y1-oe.y),te=oe.x,xe=oe.y;K=[ye-X[de-1].x,ge-X[de-1].y,Be-X[de-1].x,Ve-X[de-1].y,te-X[de-1].x,xe-X[de-1].y],ie[ie.length-1].deltas.push(K);break;case"arc":ie.push({deltas:[],abs:[],arc:!0}),Array.isArray(ie[ie.length-1].abs)&&ie[ie.length-1].abs.push(oe)}}ne=z?null:M==="stroke"?"stroke":"fill";for(var We=!1,ze=0;ze<ie.length;ze++)if(ie[ze].arc)for(var we=ie[ze].abs,J=0;J<we.length;J++){var he=we[J];he.type==="arc"?S.call(this,he.x,he.y,he.radius,he.startAngle,he.endAngle,he.counterclockwise,void 0,z,!We):F.call(this,he.x,he.y),We=!0}else if(ie[ze].close===!0)this.pdf.internal.out("h"),We=!1;else if(ie[ze].begin!==!0){var je=ie[ze].start.x,ve=ie[ze].start.y;I.call(this,ie[ze].deltas,je,ve),We=!0}ne&&E.call(this,ne),z&&O.call(this)}},C=function(M){var z=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,K=z*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return M-K;case"top":return M+z-K;case"hanging":return M+z-2*K;case"middle":return M+z/2-K;default:return M}},N=function(M){return M+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};f.prototype.createLinearGradient=function(){var M=function(){};return M.colorStops=[],M.addColorStop=function(z,K){this.colorStops.push([z,K])},M.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},M.isCanvasGradient=!0,M},f.prototype.createPattern=function(){return this.createLinearGradient()},f.prototype.createRadialGradient=function(){return this.createLinearGradient()};var S=function(M,z,K,ne,ie,X,de,oe,ce){for(var ye=L.call(this,K,ne,ie,X),ge=0;ge<ye.length;ge++){var Be=ye[ge];ge===0&&(ce?B.call(this,Be.x1+M,Be.y1+z):F.call(this,Be.x1+M,Be.y1+z)),D.call(this,M,z,Be.x2,Be.y2,Be.x3,Be.y3,Be.x4,Be.y4)}oe?O.call(this):E.call(this,de)},E=function(M){switch(M){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},O=function(){this.pdf.clip(),this.pdf.discardPath()},B=function(M,z){this.pdf.internal.out(n(M)+" "+i(z)+" m")},T=function(M){var z;switch(M.align){case"right":case"end":z="right";break;case"center":z="center";break;default:z="left"}var K,ne,ie,X=this.pdf.getTextDimensions(M.text),de=C.call(this,M.y),oe=N.call(this,de)-X.h,ce=this.ctx.transform.applyToPoint(new l(M.x,de));if(this.autoPaging){var ye=this.ctx.transform.decompose(),ge=new u;ge=(ge=(ge=ge.multiply(ye.translate)).multiply(ye.skew)).multiply(ye.scale);for(var Be=this.ctx.transform.applyToRectangle(new c(M.x,de,X.w,X.h)),Ve=ge.applyToRectangle(new c(M.x,oe,X.w,X.h)),te=y.call(this,Ve),xe=[],We=0;We<te.length;We+=1)xe.indexOf(te[We])===-1&&xe.push(te[We]);v(xe);for(var ze=xe[0],we=xe[xe.length-1],J=ze;J<we+1;J++){this.pdf.setPage(J);var he=J===1?this.posY+this.margin[0]:this.margin[0],je=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ve=this.pdf.internal.pageSize.height-this.margin[2],Pe=ve-this.margin[0],Ie=this.pdf.internal.pageSize.width-this.margin[1],ue=Ie-this.margin[3],Se=J===1?0:je+(J-2)*Pe;if(this.ctx.clip_path.length!==0){var He=this.path;K=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(K,this.posX+this.margin[3],-1*Se+he),_.call(this,"fill",!0),this.path=He}var Qe=b([JSON.parse(JSON.stringify(Ve))],this.posX+this.margin[3],-Se+he+this.ctx.prevPageLastElemOffset)[0];M.scale>=.01&&(ne=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ne*M.scale),ie=this.lineWidth,this.lineWidth=ie*M.scale);var ct=this.autoPaging!=="text";if(ct||Qe.y+Qe.h<=ve){if(ct||Qe.y>=he&&Qe.x<=Ie){var dt=ct?M.text:this.pdf.splitTextToSize(M.text,M.maxWidth||Ie-Qe.x)[0],Fr=b([JSON.parse(JSON.stringify(Be))],this.posX+this.margin[3],-Se+he+this.ctx.prevPageLastElemOffset)[0],Xt=ct&&(J>ze||J<we)&&g.call(this);Xt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ue,Pe,null).clip().discardPath()),this.pdf.text(dt,Fr.x,Fr.y,{angle:M.angle,align:z,renderingMode:M.renderingMode}),Xt&&this.pdf.restoreGraphicsState()}}else Qe.y<ve&&(this.ctx.prevPageLastElemOffset+=ve-Qe.y);M.scale>=.01&&(this.pdf.setFontSize(ne),this.lineWidth=ie)}}else M.scale>=.01&&(ne=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ne*M.scale),ie=this.lineWidth,this.lineWidth=ie*M.scale),this.pdf.text(M.text,ce.x+this.posX,ce.y+this.posY,{angle:M.angle,align:z,renderingMode:M.renderingMode,maxWidth:M.maxWidth}),M.scale>=.01&&(this.pdf.setFontSize(ne),this.lineWidth=ie)},F=function(M,z,K,ne){K=K||0,ne=ne||0,this.pdf.internal.out(n(M+K)+" "+i(z+ne)+" l")},I=function(M,z,K){return this.pdf.lines(M,z,K,null,null)},D=function(M,z,K,ne,ie,X,de,oe){this.pdf.internal.out([r(a(K+M)),r(o(ne+z)),r(a(ie+M)),r(o(X+z)),r(a(de+M)),r(o(oe+z)),"c"].join(" "))},L=function(M,z,K,ne){for(var ie=2*Math.PI,X=Math.PI/2;z>K;)z-=ie;var de=Math.abs(K-z);de<ie&&ne&&(de=ie-de);for(var oe=[],ce=ne?-1:1,ye=z;de>1e-5;){var ge=ye+ce*Math.min(de,X);oe.push(V.call(this,M,ye,ge)),de-=Math.abs(ge-ye),ye=ge}return oe},V=function(M,z,K){var ne=(K-z)/2,ie=M*Math.cos(ne),X=M*Math.sin(ne),de=ie,oe=-X,ce=de*de+oe*oe,ye=ce+de*ie+oe*X,ge=4/3*(Math.sqrt(2*ce*ye)-ye)/(de*X-oe*ie),Be=de-ge*oe,Ve=oe+ge*de,te=Be,xe=-Ve,We=ne+z,ze=Math.cos(We),we=Math.sin(We);return{x1:M*Math.cos(z),y1:M*Math.sin(z),x2:Be*ze-Ve*we,y2:Be*we+Ve*ze,x3:te*ze-xe*we,y3:te*we+xe*ze,x4:M*Math.cos(K),y4:M*Math.sin(K)}},U=function(M){return 180*M/Math.PI},Q=function(M,z,K,ne,ie,X){var de=M+.5*(K-M),oe=z+.5*(ne-z),ce=ie+.5*(K-ie),ye=X+.5*(ne-X),ge=Math.min(M,ie,de,ce),Be=Math.max(M,ie,de,ce),Ve=Math.min(z,X,oe,ye),te=Math.max(z,X,oe,ye);return new c(ge,Ve,Be-ge,te-Ve)},$=function(M,z,K,ne,ie,X,de,oe){var ce,ye,ge,Be,Ve,te,xe,We,ze,we,J,he,je,ve,Pe=K-M,Ie=ne-z,ue=ie-K,Se=X-ne,He=de-ie,Qe=oe-X;for(ye=0;ye<41;ye++)ze=(xe=(ge=M+(ce=ye/40)*Pe)+ce*((Ve=K+ce*ue)-ge))+ce*(Ve+ce*(ie+ce*He-Ve)-xe),we=(We=(Be=z+ce*Ie)+ce*((te=ne+ce*Se)-Be))+ce*(te+ce*(X+ce*Qe-te)-We),ye==0?(J=ze,he=we,je=ze,ve=we):(J=Math.min(J,ze),he=Math.min(he,we),je=Math.max(je,ze),ve=Math.max(ve,we));return new c(Math.round(J),Math.round(he),Math.round(je-J),Math.round(ve-he))},q=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var M,z,K=(M=this.ctx.lineDash,z=this.ctx.lineDashOffset,JSON.stringify({lineDash:M,lineDashOffset:z}));this.prevLineDash!==K&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=K)}}})(sr.API),function(e){var r=function(l){var c,u,d,h,f,p,m,A,g,y;for(u=[],d=0,h=(l+=c="\0\0\0\0".slice(l.length%4||4)).length;h>d;d+=4)(f=(l.charCodeAt(d)<<24)+(l.charCodeAt(d+1)<<16)+(l.charCodeAt(d+2)<<8)+l.charCodeAt(d+3))!==0?(p=(f=((f=((f=((f=(f-(y=f%85))/85)-(g=f%85))/85)-(A=f%85))/85)-(m=f%85))/85)%85,u.push(p+33,m+33,A+33,g+33,y+33)):u.push(122);return function(x,b){for(var v=b;v>0;v--)x.pop()}(u,c.length),String.fromCharCode.apply(String,u)+"~>"},n=function(l){var c,u,d,h,f,p=String,m="length",A=255,g="charCodeAt",y="slice",x="replace";for(l[y](-2),l=l[y](0,-2)[x](/\s/g,"")[x]("z","!!!!!"),d=[],h=0,f=(l+=c="uuuuu"[y](l[m]%5||5))[m];f>h;h+=5)u=52200625*(l[g](h)-33)+614125*(l[g](h+1)-33)+7225*(l[g](h+2)-33)+85*(l[g](h+3)-33)+(l[g](h+4)-33),d.push(A&u>>24,A&u>>16,A&u>>8,A&u);return function(b,v){for(var j=v;j>0;j--)b.pop()}(d,c[m]),p.fromCharCode.apply(p,d)},i=function(l){return l.split("").map(function(c){return("0"+c.charCodeAt().toString(16)).slice(-2)}).join("")+">"},a=function(l){var c=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((l=l.replace(/\s/g,"")).indexOf(">")!==-1&&(l=l.substr(0,l.indexOf(">"))),l.length%2&&(l+="0"),c.test(l)===!1)return"";for(var u="",d=0;d<l.length;d+=2)u+=String.fromCharCode("0x"+(l[d]+l[d+1]));return u},o=function(l){for(var c=new Uint8Array(l.length),u=l.length;u--;)c[u]=l.charCodeAt(u);return(c=y6(c)).reduce(function(d,h){return d+String.fromCharCode(h)},"")};e.processDataByFilters=function(l,c){var u=0,d=l||"",h=[];for(typeof(c=c||[])=="string"&&(c=[c]),u=0;u<c.length;u+=1)switch(c[u]){case"ASCII85Decode":case"/ASCII85Decode":d=n(d),h.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":d=r(d),h.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":d=a(d),h.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":d=i(d),h.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":d=o(d),h.push("/FlateDecode");break;default:throw new Error('The filter: "'+c[u]+'" is not implemented')}return{data:d,reverseChain:h.reverse().join(" ")}}}(sr.API),function(e){e.loadFile=function(r,n,i){return function(a,o,l){o=o!==!1,l=typeof l=="function"?l:function(){};var c=void 0;try{c=function(u,d,h){var f=new XMLHttpRequest,p=0,m=function(A){var g=A.length,y=[],x=String.fromCharCode;for(p=0;p<g;p+=1)y.push(x(255&A.charCodeAt(p)));return y.join("")};if(f.open("GET",u,!d),f.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(f.onload=function(){f.status===200?h(m(this.responseText)):h(void 0)}),f.send(null),d&&f.status===200)return m(f.responseText)}(a,o,l)}catch{}return c}(r,n,i)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile}(sr.API),function(e){function r(){return(Cr.html2canvas?Promise.resolve(Cr.html2canvas):qw(()=>Promise.resolve().then(()=>tDt),void 0)).catch(function(c){return Promise.reject(new Error("Could not load html2canvas: "+c))}).then(function(c){return c.default?c.default:c})}function n(){return(Cr.DOMPurify?Promise.resolve(Cr.DOMPurify):qw(()=>import("./purify.es-dhnUglUx.js"),[])).catch(function(c){return Promise.reject(new Error("Could not load dompurify: "+c))}).then(function(c){return c.default?c.default:c})}var i=function(c){var u=$n(c);return u==="undefined"?"undefined":u==="string"||c instanceof String?"string":u==="number"||c instanceof Number?"number":u==="function"||c instanceof Function?"function":c&&c.constructor===Array?"array":c&&c.nodeType===1?"element":u==="object"?"object":"unknown"},a=function(c,u){var d=document.createElement(c);for(var h in u.className&&(d.className=u.className),u.innerHTML&&u.dompurify&&(d.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)d.style[h]=u.style[h];return d},o=function c(u,d){for(var h=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),f=u.firstChild;f;f=f.nextSibling)d!==!0&&f.nodeType===1&&f.nodeName==="SCRIPT"||h.appendChild(c(f,d));return u.nodeType===1&&(u.nodeName==="CANVAS"?(h.width=u.width,h.height=u.height,h.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(h.value=u.value),h.addEventListener("load",function(){h.scrollTop=u.scrollTop,h.scrollLeft=u.scrollLeft},!0)),h},l=function c(u){var d=Object.assign(c.convert(Promise.resolve()),JSON.parse(JSON.stringify(c.template))),h=c.convert(Promise.resolve(),d);return(h=h.setProgress(1,c,1,[c])).set(u)};(l.prototype=Object.create(Promise.prototype)).constructor=l,l.convert=function(c,u){return c.__proto__=u||l.prototype,c},l.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},l.prototype.from=function(c,u){return this.then(function(){switch(u=u||function(d){switch(i(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(c),u){case"string":return this.then(n).then(function(d){return this.set({src:a("div",{innerHTML:c,dompurify:d})})});case"element":return this.set({src:c});case"canvas":return this.set({canvas:c});case"img":return this.set({img:c});default:return this.error("Unknown source type.")}})},l.prototype.to=function(c){switch(c){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},l.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var c={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},u=o(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(c.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:c}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(a("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},l.prototype.toCanvas=function(){var c=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(c).then(r).then(function(u){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,u(this.prop.container,d)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toContext2d=function(){var c=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(c).then(r).then(function(u){var d=this.opt.jsPDF,h=this.opt.fontFaces,f=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,p=Object.assign({async:!0,allowTaint:!0,scale:f,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete p.onrendered,d.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,d.context2d.posX=this.opt.x,d.context2d.posY=this.opt.y,d.context2d.margin=this.opt.margin,d.context2d.fontFaces=h,h)for(var m=0;m<h.length;++m){var A=h[m],g=A.src.find(function(y){return y.format==="truetype"});g&&d.addFont(g.url,A.ref.name,A.ref.style)}return p.windowHeight=p.windowHeight||0,p.windowHeight=p.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):p.windowHeight,d.context2d.save(!0),u(this.prop.container,p)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var c=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=c})},l.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},l.prototype.output=function(c,u,d){return(d=d||"pdf").toLowerCase()==="img"||d.toLowerCase()==="image"?this.outputImg(c,u):this.outputPdf(c,u)},l.prototype.outputPdf=function(c,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(c,u)})},l.prototype.outputImg=function(c){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(c){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+c+'" is not supported.'}})},l.prototype.save=function(c){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(c?{filename:c}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},l.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},l.prototype.set=function(c){if(i(c)!=="object")return this;var u=Object.keys(c||{}).map(function(d){if(d in l.template.prop)return function(){this.prop[d]=c[d]};switch(d){case"margin":return this.setMargin.bind(this,c.margin);case"jsPDF":return function(){return this.opt.jsPDF=c.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,c.pageSize);default:return function(){this.opt[d]=c[d]}}},this);return this.then(function(){return this.thenList(u)})},l.prototype.get=function(c,u){return this.then(function(){var d=c in l.template.prop?this.prop[c]:this.opt[c];return u?u(d):d})},l.prototype.setMargin=function(c){return this.then(function(){switch(i(c)){case"number":c=[c,c,c,c];case"array":if(c.length===2&&(c=[c[0],c[1],c[0],c[1]]),c.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=c}).then(this.setPageSize)},l.prototype.setPageSize=function(c){function u(d,h){return Math.floor(d*h/72*96)}return this.then(function(){(c=c||sr.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(c.inner={width:c.width-this.opt.margin[1]-this.opt.margin[3],height:c.height-this.opt.margin[0]-this.opt.margin[2]},c.inner.px={width:u(c.inner.width,c.k),height:u(c.inner.height,c.k)},c.inner.ratio=c.inner.height/c.inner.width),this.prop.pageSize=c})},l.prototype.setProgress=function(c,u,d,h){return c!=null&&(this.progress.val=c),u!=null&&(this.progress.state=u),d!=null&&(this.progress.n=d),h!=null&&(this.progress.stack=h),this.progress.ratio=this.progress.val/this.progress.state,this},l.prototype.updateProgress=function(c,u,d,h){return this.setProgress(c?this.progress.val+c:null,u||null,d?this.progress.n+d:null,h?this.progress.stack.concat(h):null)},l.prototype.then=function(c,u){var d=this;return this.thenCore(c,u,function(h,f){return d.updateProgress(null,null,1,[h]),Promise.prototype.then.call(this,function(p){return d.updateProgress(null,h),p}).then(h,f).then(function(p){return d.updateProgress(1),p})})},l.prototype.thenCore=function(c,u,d){d=d||Promise.prototype.then;var h=this;c&&(c=c.bind(h)),u&&(u=u.bind(h));var f=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?h:l.convert(Object.assign({},h),Promise.prototype),p=d.call(f,c,u);return l.convert(p,h.__proto__)},l.prototype.thenExternal=function(c,u){return Promise.prototype.then.call(this,c,u)},l.prototype.thenList=function(c){var u=this;return c.forEach(function(d){u=u.thenCore(d)}),u},l.prototype.catch=function(c){c&&(c=c.bind(this));var u=Promise.prototype.catch.call(this,c);return l.convert(u,this)},l.prototype.catchExternal=function(c){return Promise.prototype.catch.call(this,c)},l.prototype.error=function(c){return this.then(function(){throw new Error(c)})},l.prototype.using=l.prototype.set,l.prototype.saveAs=l.prototype.save,l.prototype.export=l.prototype.output,l.prototype.run=l.prototype.then,sr.getPageSize=function(c,u,d){if($n(c)==="object"){var h=c;c=h.orientation,u=h.unit||u,d=h.format||d}u=u||"mm",d=d||"a4",c=(""+(c||"P")).toLowerCase();var f,p=(""+d).toLowerCase(),m={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(u){case"pt":f=1;break;case"mm":f=72/25.4;break;case"cm":f=72/2.54;break;case"in":f=72;break;case"px":f=.75;break;case"pc":case"em":f=12;break;case"ex":f=6;break;default:throw"Invalid unit: "+u}var A,g=0,y=0;if(m.hasOwnProperty(p))g=m[p][1]/f,y=m[p][0]/f;else try{g=d[1],y=d[0]}catch{throw new Error("Invalid format: "+d)}if(c==="p"||c==="portrait")c="p",y>g&&(A=y,y=g,g=A);else{if(c!=="l"&&c!=="landscape")throw"Invalid orientation: "+c;c="l",g>y&&(A=y,y=g,g=A)}return{width:y,height:g,unit:u,k:f,orientation:c}},e.html=function(c,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(HO):null;var d=new l(u);return u.worker?d:d.from(c).doCallback()}}(sr.API),sr.API.addJS=function(e){var r,n,i=function(a){for(var o="",l=0;l<a.length;l++){var c=a[l];if(c==="("||c===")"){for(var u=0,d=l-1;d>=0&&a[d]==="\\";d--)u++;o+=u%2==0?"\\"+c:c}else o+=c}return o}(e);return this.internal.events.subscribe("postPutResources",function(){r=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(r+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+i+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){r!==void 0&&n!==void 0&&this.internal.out("/Names <</JavaScript "+r+" 0 R>>")}),this},function(e){var r;e.events.push(["postPutResources",function(){var n=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var a=n.outline.render().split(/\r\n/),o=0;o<a.length;o++){var l=a[o],c=i.exec(l);if(c!=null){var u=c[1];n.internal.newObjectDeferredBegin(u,!1)}n.internal.write(l)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,h=[];for(o=0;o<d;o++){var f=n.internal.newObject();h.push(f);var p=n.internal.getPageInfo(o+1);n.internal.write("<< /D["+p.objId+" 0 R /XYZ null null null]>> endobj")}var m=n.internal.newObject();for(n.internal.write("<< /Names [ "),o=0;o<h.length;o++)n.internal.write("(page_"+(o+1)+")"+h[o]+" 0 R");n.internal.write(" ] >>","endobj"),r=n.internal.newObject(),n.internal.write("<< /Dests "+m+" 0 R"),n.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var n=this;n.outline.root.children.length>0&&(n.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&n.internal.write("/Names "+r+" 0 R"))}]),e.events.push(["initialized",function(){var n=this;n.outline={createNamedDestinations:!1,root:{children:[]}},n.outline.add=function(i,a,o){var l={title:a,options:o,children:[]};return i==null&&(i=this.root),i.children.push(l),l},n.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=n,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},n.outline.genIds_r=function(i){i.id=n.internal.newObjectDeferred();for(var a=0;a<i.children.length;a++)this.genIds_r(i.children[a])},n.outline.renderRoot=function(i){this.objStart(i),this.line("/Type /Outlines"),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1]))),this.line("/Count "+this.count_r({count:0},i)),this.objEnd()},n.outline.renderItems=function(i){for(var a=this.ctx.pdf.internal.getVerticalCoordinateString,o=0;o<i.children.length;o++){var l=i.children[o];this.objStart(l),this.line("/Title "+this.makeString(l.title)),this.line("/Parent "+this.makeRef(i)),o>0&&this.line("/Prev "+this.makeRef(i.children[o-1])),o<i.children.length-1&&this.line("/Next "+this.makeRef(i.children[o+1])),l.children.length>0&&(this.line("/First "+this.makeRef(l.children[0])),this.line("/Last "+this.makeRef(l.children[l.children.length-1])));var c=this.count=this.count_r({count:0},l);if(c>0&&this.line("/Count "+c),l.options&&l.options.pageNumber){var u=n.internal.getPageInfo(l.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+a(0)+" 0]")}this.objEnd()}for(var d=0;d<i.children.length;d++)this.renderItems(i.children[d])},n.outline.line=function(i){this.ctx.val+=i+`\r
3365`},n.outline.makeRef=function(i){return i.id+" 0 R"},n.outline.makeString=function(i){return"("+n.internal.pdfEscape(i)+")"},n.outline.objStart=function(i){this.ctx.val+=`\r
3366`+i.id+` 0 obj\r
3367<<\r
3368`},n.outline.objEnd=function(){this.ctx.val+=`>> \r
3369endobj\r
3370`},n.outline.count_r=function(i,a){for(var o=0;o<a.children.length;o++)i.count++,this.count_r(i,a.children[o]);return i.count}}])}(sr.API),function(e){var r=[192,193,194,195,196,197,198,199];e.processJPEG=function(n,i,a,o,l,c){var u,d=this.decode.DCT_DECODE,h=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=l||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,u=function(f){for(var p,m=256*f.charCodeAt(4)+f.charCodeAt(5),A=f.length,g={width:0,height:0,numcomponents:1},y=4;y<A;y+=2){if(y+=m,r.indexOf(f.charCodeAt(y+1))!==-1){p=256*f.charCodeAt(y+5)+f.charCodeAt(y+6),g={width:256*f.charCodeAt(y+7)+f.charCodeAt(y+8),height:p,numcomponents:f.charCodeAt(y+9)};break}m=256*f.charCodeAt(y+2)+f.charCodeAt(y+3)}return g}(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),u.numcomponents){case 1:c=this.color_spaces.DEVICE_GRAY;break;case 4:c=this.color_spaces.DEVICE_CMYK;break;case 3:c=this.color_spaces.DEVICE_RGB}h={data:n,width:u.width,height:u.height,colorSpace:c,bitsPerComponent:8,filter:d,index:i,alias:a}}return h}}(sr.API),sr.API.processPNG=function(e,r,n,i){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var a,o=v6t(e,{checkCrc:!0}),l=o.width,c=o.height,u=o.channels,d=o.palette,h=o.depth;a=d&&u===1?function(S){for(var E=S.width,O=S.height,B=S.data,T=S.palette,F=S.depth,I=!1,D=[],L=[],V=void 0,U=!1,Q=0,$=0;$<T.length;$++){var q=bne(T[$],4),M=q[0],z=q[1],K=q[2],ne=q[3];D.push(M,z,K),ne!=null&&(ne===0?(Q++,L.length<1&&L.push($)):ne<255&&(U=!0))}if(U||Q>1){I=!0,L=void 0;var ie=E*O;V=new Uint8Array(ie);for(var X=new DataView(B.buffer),de=0;de<ie;de++){var oe=WO(X,de,F),ce=bne(T[oe],4)[3];V[de]=ce}}else Q===0&&(L=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:I?8:void 0,colorBytes:B,alphaBytes:V,needSMask:I,palette:D,mask:L}}(o):u===2||u===4?function(S){for(var E=S.data,O=S.width,B=S.height,T=S.channels,F=S.depth,I=T===2?"DeviceGray":"DeviceRGB",D=T-1,L=O*B,V=D,U=L*V,Q=1*L,$=Math.ceil(U*F/8),q=Math.ceil(Q*F/8),M=new Uint8Array($),z=new Uint8Array(q),K=new DataView(E.buffer),ne=new DataView(M.buffer),ie=new DataView(z.buffer),X=!1,de=0;de<L;de++){for(var oe=de*T,ce=0;ce<V;ce++)Fie(ne,WO(K,oe+ce,F),de*V+ce,F);var ye=WO(K,oe+V,F);ye<(1<<F)-1&&(X=!0),Fie(ie,ye,1*de,F)}return{colorSpace:I,colorsPerPixel:D,sMaskBitsPerComponent:X?F:void 0,colorBytes:M,alphaBytes:z,needSMask:X}}(o):function(S){var E=S.data,O=S.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:O,colorsPerPixel:O==="DeviceGray"?1:3,colorBytes:E instanceof Uint16Array?function(B){for(var T=B.length,F=new Uint8Array(2*T),I=new DataView(F.buffer,F.byteOffset,F.byteLength),D=0;D<T;D++)I.setUint16(2*D,B[D],!1);return F}(E):E,needSMask:!1}}(o);var f,p,m,A=a,g=A.colorSpace,y=A.colorsPerPixel,x=A.sMaskBitsPerComponent,b=A.colorBytes,v=A.alphaBytes,j=A.needSMask,_=A.palette,C=A.mask,N=null;return i!==sr.API.image_compression.NONE&&typeof y6=="function"?(N=function(S){var E;switch(S){case sr.API.image_compression.FAST:E=11;break;case sr.API.image_compression.MEDIUM:E=13;break;case sr.API.image_compression.SLOW:E=14;break;default:E=12}return E}(i),f=this.decode.FLATE_DECODE,p="/Predictor ".concat(N," /Colors ").concat(y," /BitsPerComponent ").concat(h," /Columns ").concat(l),e=Eie(b,Math.ceil(l*y*h/8),y,h,i),j&&(m=Eie(v,Math.ceil(l*x/8),1,x,i))):(f=void 0,p=void 0,e=b,j&&(m=v)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(m&&this.__addimage__.isArrayBuffer(m)||this.__addimage__.isArrayBufferView(m))&&(m=this.__addimage__.arrayBufferToBinaryString(m)),{alias:n,data:e,index:r,filter:f,decodeParameters:p,transparency:C,palette:_,sMask:m,predictor:N,width:l,height:c,bitsPerComponent:h,sMaskBitsPerComponent:x,colorSpace:g}}},function(e){e.processGIF89A=function(r,n,i,a){var o=new U6t(r),l=o.width,c=o.height,u=[];o.decodeAndBlitFrameRGBA(0,u);var d={data:u,width:l,height:c},h=new qO(100).encode(d,100);return e.processJPEG.call(this,h,n,i,a)},e.processGIF87A=e.processGIF89A}(sr.API),tu.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var r=0;r<e;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[r]={red:a,green:i,blue:n,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},tu.prototype.parseBGR=function(){this.pos=this.offset;var e="bit"+this.bitPP,r=this.width*this.height*4;if(r>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(r);try{this[e]()}catch(n){ti.log("bit decode error:"+n)}},tu.prototype.bit1=function(){var e,r=Math.ceil(this.width/8),n=r%4;for(e=this.height-1;e>=0;e--){for(var i=this.bottom_up?e:this.height-1-e,a=0;a<r;a++)for(var o=this.datav.getUint8(this.pos++,!0),l=i*this.width*4+8*a*4,c=0;c<8&&8*a+c<this.width;c++){var u=this.palette[o>>7-c&1];this.data[l+4*c]=u.blue,this.data[l+4*c+1]=u.green,this.data[l+4*c+2]=u.red,this.data[l+4*c+3]=255}n!==0&&(this.pos+=4-n)}},tu.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),r=e%4,n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,a=0;a<e;a++){var o=this.datav.getUint8(this.pos++,!0),l=i*this.width*4+2*a*4,c=o>>4,u=15&o,d=this.palette[c];if(this.data[l]=d.blue,this.data[l+1]=d.green,this.data[l+2]=d.red,this.data[l+3]=255,2*a+1>=this.width)break;d=this.palette[u],this.data[l+4]=d.blue,this.data[l+4+1]=d.green,this.data[l+4+2]=d.red,this.data[l+4+3]=255}r!==0&&(this.pos+=4-r)}},tu.prototype.bit8=function(){for(var e=this.width%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var a=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+4*i;if(a<this.palette.length){var l=this.palette[a];this.data[o]=l.red,this.data[o+1]=l.green,this.data[o+2]=l.blue,this.data[o+3]=255}else this.data[o]=255,this.data[o+1]=255,this.data[o+2]=255,this.data[o+3]=255}e!==0&&(this.pos+=4-e)}},tu.prototype.bit15=function(){for(var e=this.width%3,r=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(o&r)/r*255|0,c=(o>>5&r)/r*255|0,u=(o>>10&r)/r*255|0,d=o>>15?255:0,h=i*this.width*4+4*a;this.data[h]=u,this.data[h+1]=c,this.data[h+2]=l,this.data[h+3]=d}this.pos+=e}},tu.prototype.bit16=function(){for(var e=this.width%3,r=parseInt("11111",2),n=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var a=this.bottom_up?i:this.height-1-i,o=0;o<this.width;o++){var l=this.datav.getUint16(this.pos,!0);this.pos+=2;var c=(l&r)/r*255|0,u=(l>>5&n)/n*255|0,d=(l>>11)/r*255|0,h=a*this.width*4+4*o;this.data[h]=d,this.data[h+1]=u,this.data[h+2]=c,this.data[h+3]=255}this.pos+=e}},tu.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),l=r*this.width*4+4*n;this.data[l]=o,this.data[l+1]=a,this.data[l+2]=i,this.data[l+3]=255}this.pos+=this.width%4}},tu.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var r=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0),c=r*this.width*4+4*n;this.data[c]=o,this.data[c+1]=a,this.data[c+2]=i,this.data[c+3]=l}},tu.prototype.getData=function(){return this.data},function(e){e.processBMP=function(r,n,i,a){var o=new tu(r,!1),l=o.width,c=o.height,u={data:o.getData(),width:l,height:c},d=new qO(100).encode(u,100);return e.processJPEG.call(this,d,n,i,a)}}(sr.API),Lie.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(r,n,i,a){var o=new Lie(r),l=o.width,c=o.height,u={data:o.getData(),width:l,height:c},d=new qO(100).encode(u,100);return e.processJPEG.call(this,d,n,i,a)}}(sr.API),sr.API.processRGBA=function(e,r,n){for(var i=e.data,a=i.length,o=new Uint8Array(a/4*3),l=new Uint8Array(a/4),c=0,u=0,d=0;d<a;d+=4){var h=i[d],f=i[d+1],p=i[d+2],m=i[d+3];o[c++]=h,o[c++]=f,o[c++]=p,l[u++]=m}var A=this.__addimage__.arrayBufferToBinaryString(o);return{alpha:this.__addimage__.arrayBufferToBinaryString(l),data:A,index:r,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},sr.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rh
3370aeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},ey=sr.API,US=ey.getCharWidthsArray=function(e,r){var n,i,a=(r=r||{}).font||this.internal.getFont(),o=r.fontSize||this.internal.getFontSize(),l=r.charSpace||this.internal.getCharSpace(),c=r.widths?r.widths:a.metadata.Unicode.widths,u=c.fof?c.fof:1,d=r.kerning?r.kerning:a.metadata.Unicode.kerning,h=d.fof?d.fof:1,f=r.doKerning!==!1,p=0,m=e.length,A=0,g=c[0]||u,y=[];for(n=0;n<m;n++)i=e.charCodeAt(n),typeof a.metadata.widthOfString=="function"?y.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(i))+l*(1e3/o)||0)/1e3):(p=f&&$n(d[i])==="object"&&!isNaN(parseInt(d[i][A],10))?d[i][A]/h:0,y.push((c[i]||g)/u+p)),A=i;return y},Nie=ey.getStringUnitWidth=function(e,r){var n=(r=r||{}).fontSize||this.internal.getFontSize(),i=r.font||this.internal.getFont(),a=r.charSpace||this.internal.getCharSpace();return ey.processArabic&&(e=ey.processArabic(e)),typeof i.metadata.widthOfString=="function"?i.metadata.widthOfString(e,n,a)/n:US.apply(this,arguments).reduce(function(o,l){return o+l},0)},Sie=function(e,r,n,i){for(var a=[],o=0,l=e.length,c=0;o!==l&&c+r[o]<n;)c+=r[o],o++;a.push(e.slice(0,o));var u=o;for(c=0;o!==l;)c+r[o]>i&&(a.push(e.slice(u,o)),c=0,u=o),c+=r[o],o++;return u!==o&&a.push(e.slice(u,o)),a},kie=function(e,r,n){n||(n={});var i,a,o,l,c,u,d,h=[],f=[h],p=n.textIndent||0,m=0,A=0,g=e.split(" "),y=US.apply(this,[" ",n])[0];if(u=n.lineIndent===-1?g[0].length+2:n.lineIndent||0){var x=Array(u).join(" "),b=[];g.map(function(j){(j=j.split(/\s*\n/)).length>1?b=b.concat(j.map(function(_,C){return(C&&_.length?`
3371`:"")+_})):b.push(j[0])}),g=b,u=Nie.apply(this,[x,n])}for(o=0,l=g.length;o<l;o++){var v=0;if(i=g[o],u&&i[0]==`
3372`&&(i=i.substr(1),v=1),p+m+(A=(a=US.apply(this,[i,n])).reduce(function(j,_){return j+_},0))>r||v){if(A>r){for(c=Sie.apply(this,[i,a,r-(p+m),r]),h.push(c.shift()),h=[c.pop()];c.length;)f.push([c.shift()]);A=a.slice(i.length-(h[0]?h[0].length:0)).reduce(function(j,_){return j+_},0)}else h=[i];f.push(h),p=A+u,m=y}else h.push(i),p+=m+A,m=y}return d=u?function(j,_){return(_?x:"")+j.join(" ")}:function(j){return j.join(" ")},f.map(d)},ey.splitTextToSize=function(e,r,n){var i,a=(n=n||{}).fontSize||this.internal.getFontSize(),o=(function(h){if(h.widths&&h.kerning)return{widths:h.widths,kerning:h.kerning};var f=this.internal.getFont(h.fontName,h.fontStyle),p="Unicode";return f.metadata[p]?{widths:f.metadata[p].widths||{0:1},kerning:f.metadata[p].kerning||{}}:{font:f.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);i=Array.isArray(e)?e:String(e).split(/\r?\n/);var l=1*this.internal.scaleFactor*r/a;o.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/a:0,o.lineIndent=n.lineIndent;var c,u,d=[];for(c=0,u=i.length;c<u;c++)d=d.concat(kie.apply(this,[i[c],l,o]));return d},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var r="0123456789abcdef",n="klmnopqrstuvwxyz",i={},a={},o=0;o<16;o++)i[n[o]]=r[o],a[r[o]]=n[o];var l=function(p){return"0x"+parseInt(p,10).toString(16)},c=e.__fontmetrics__.compress=function(p){var m,A,g,y,x=["{"];for(var b in p){if(m=p[b],isNaN(parseInt(b,10))?A="'"+b+"'":(b=parseInt(b,10),A=(A=l(b).slice(2)).slice(0,-1)+a[A.slice(-1)]),typeof m=="number")m<0?(g=l(m).slice(3),y="-"):(g=l(m).slice(2),y=""),g=y+g.slice(0,-1)+a[g.slice(-1)];
vendor: 1,093 bytes, line 3372
3372else{if($n(m)!=="object")throw new Error("Don't know what to do with value type "+$n(m)+".");g=c(m)}x.push(A+g)}return x.push("}"),x.join("")},u=e.__fontmetrics__.uncompress=function(p){if(typeof p!="string")throw new Error("Invalid argument passed to uncompress.");for(var m,A,g,y,x={},b=1,v=x,j=[],_="",C="",N=p.length-1,S=1;S<N;S+=1)(y=p[S])=="'"?m?(g=m.join(""),m=void 0):m=[]:m?m.push(y):y=="{"?(j.push([v,g]),v={},g=void 0):y=="}"?((A=j.pop())[0][A[1]]=v,g=void 0,v=A[0]):y=="-"?b=-1:g===void 0?i.hasOwnProperty(y)?(_+=i[y],g=parseInt(_,16)*b,b=1,_=""):_+=y:i.hasOwnProperty(y)?(C+=i[y],v[g]=parseInt(C,16)*b,b=1,g=void 0,C=""):C+=y;return x},d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},h={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},f
vendor: 14,727 bytes, line 3372
3372={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(
vendor: 8,429 bytes, lines 3372-3400
3372p){var m=p.font,A=f.Unicode[m.postScriptName];A&&(m.metadata.Unicode={},m.metadata.Unicode.widths=A.widths,m.metadata.Unicode.kerning=A.kerning);var g=h.Unicode[m.postScriptName];g&&(m.metadata.Unicode.encoding=g,m.encoding=g.codePages[0])}])}(sr.API),function(e){var r=function(n){for(var i=n.length,a=new Uint8Array(i),o=0;o<i;o++)a[o]=n.charCodeAt(o);return a};e.API.events.push(["addFont",function(n){var i=void 0,a=n.font,o=n.instance;if(!a.isStandardFont){if(o===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if(typeof(i=o.existsFileInVFS(a.postScriptName)===!1?o.loadFile(a.postScriptName):o.getFileFromVFS(a.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");(function(l,c){c=/^\x00\x01\x00\x00/.test(c)?r(c):r(Fk(c)),l.metadata=e.API.TTFFont.open(c),l.metadata.Unicode=l.metadata.Unicode||{encoding:{},kerning:{},widths:[]},l.metadata.glyIdsUsed=[0]})(a,i)}}])}(sr),sr.API.addSvgAsImage=function(e,r,n,i,a,o,l,c){if(isNaN(r)||isNaN(n))throw ti.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(a))throw ti.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=i,u.height=a;var d=u.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,u.width,u.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return(Cr.canvg?Promise.resolve(Cr.canvg):qw(()=>import("./index.es-F5MmqdrN.js"),[])).catch(function(p){return Promise.reject(new Error("Could not load canvg: "+p))}).then(function(p){return p.default?p.default:p}).then(function(p){return p.fromString(d,e,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(p){return p.render(h)}).then(function(){f.addImage(u.toDataURL("image/jpeg",1),r,n,i,a,l,c)})},sr.API.putTotalPages=function(e){var r,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(r=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(r=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var a=0;a<this.internal.pages[i].length;a++)this.internal.pages[i][a]=this.internal.pages[i][a].replace(r,n);return this},sr.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,l={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(l),u=[],d=0,h=0,f=0;function p(A,g){var y,x=!1;for(y=0;y<A.length;y+=1)A[y]===g&&(x=!0);return x}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(l)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||r===!0){var m=c.length;for(f=0;f<m;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1}if($n(e)==="object"){for(a in e)if(o=e[a],p(c,a)&&o!==void 0){if(n[a].type==="boolean"&&typeof o=="boolean")n[a].value=o;else if(n[a].type==="name"&&p(n[a].valueSet,o))n[a].value=o;else if(n[a].type==="integer"&&Number.isInteger(o))n[a].value=o;else if(n[a].type==="array"){for(d=0;d<o.length;d+=1)if(i=!0,o[d].length===1&&typeof o[d][0]=="number")u.push(String(o[d]-1));else if(o[d].length>1){for(h=0;h<o[d].length;h+=1)typeof o[d][h]!="number"&&(i=!1);i===!0&&u.push([o[d][0]-1,o[d][1]-1].join(" "))}n[a].value="["+u.join(" ")+"]"}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var A,g=[];for(A in n)n[A].explicitSet===!0&&(n[A].type==="name"?g.push("/"+A+" /"+n[A].value):g.push("/"+A+" "+n[A].value));g.length!==0&&this.internal.write(`/ViewerPreferences
3373<<
3374`+g.join(`
3375`)+`
3376>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},sr.API.addMetadata=function(e,r){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:e,namespaceUri:r??"http://jspdf.default.namespaceuri/",rawXml:typeof r=="boolean"&&r},this.internal.events.subscribe("putCatalog",Q6t),this.internal.events.subscribe("postPutResources",$6t)),this},function(e){var r=e.API,n=r.pdfEscape16=function(o,l){for(var c,u=l.metadata.Unicode.widths,d=["","0","00","000","0000"],h=[""],f=0,p=o.length;f<p;++f){if(c=l.metadata.characterToGlyph(o.charCodeAt(f)),l.metadata.glyIdsUsed.push(c),l.metadata.toUnicode[c]=o.charCodeAt(f),u.indexOf(c)==-1&&(u.push(c),u.push([parseInt(l.metadata.widthOfGlyph(c),10)])),c=="0")return h.join("");c=c.toString(16),h.push(d[4-c.length],c)}return h.join("")},i=function(o){var l,c,u,d,h,f,p;for(h=`/CIDInit /ProcSet findresource begin
337712 dict begin
3378begincmap
3379/CIDSystemInfo <<
3380  /Registry (Adobe)
3381  /Ordering (UCS)
3382  /Supplement 0
3383>> def
3384/CMapName /Adobe-Identity-UCS def
3385/CMapType 2 def
33861 begincodespacerange
3387<0000><ffff>
3388endcodespacerange`,u=[],f=0,p=(c=Object.keys(o).sort(function(m,A){return m-A})).length;f<p;f++)l=c[f],u.length>=100&&(h+=`
3389`+u.length+` beginbfchar
3390`+u.join(`
3391`)+`
3392endbfchar`,u=[]),o[l]!==void 0&&o[l]!==null&&typeof o[l].toString=="function"&&(d=("0000"+o[l].toString(16)).slice(-4),l=("0000"+(+l).toString(16)).slice(-4),u.push("<"+l+"><"+d+">"));return u.length&&(h+=`
3393`+u.length+` beginbfchar
3394`+u.join(`
3395`)+`
3396endbfchar
3397`),h+`endcmap
3398CMapName currentdict /CMap defineresource pop
3399end
3400end`};r.events.push(["putFont",function(o){(function(l){var c=l.font,u=l.out,d=l.newObject,h=l.putStream;if(c.metadata instanceof e.API.TTFFont&&c.encoding==="Identity-H"){for(var f=c.metadata.Unicode.widths,p=c.metadata.subset.encode(c.metadata.glyIdsUsed,1),m="",A=0;A<p.length;A++)m+=String.fromCharCode(p[A]);var g=d();h({data:m,addLength1:!0,objectId:g}),u("endobj");var y=d();h({data:i(c.metadata.toUnicode),addLength1:!0,objectId:y}),u("endobj");var x=d();u("<<"),u("/Type /FontDescriptor"),u("/FontName /"+uy(c.fontName)),u("/FontFile2 "+g+" 0 R"),u("/FontBBox "+e.API.PDFObject.convert(c.metadata.bbox)),u("/Flags "+c.metadata.flags),u("/StemV "+c.metadata.stemV),u("/ItalicAngle "+c.metadata.italicAngle),u("/Asce
3400nt "+c.metadata.ascender),u("/Descent "+c.metadata.decender),u("/CapHeight "+c.metadata.capHeight),u(">>"),u("endobj");var b=d();u("<<"),u("/Type /Font"),u("/BaseFont /"+uy(c.fontName)),u("/FontDescriptor "+x+" 0 R"),u("/W "+e.API.PDFObject.convert(f)),u("/CIDToGIDMap /Identity"),u("/DW 1000"),u("/Subtype /CIDFontType2"),u("/CIDSystemInfo"),u("<<"),u("/Supplement 0"),u("/Registry (Adobe)"),u("/Ordering ("+c.encoding+")"),u(">>"),u(">>"),u("endobj"),c.objectNumber=d(),u("<<"),u("/Type /Font"),u("/Subtype /Type0"),u("/ToUnicode "+y+" 0 R"),u("/BaseFont /"+uy(c.fontName)),u("/Encoding /"+c.encoding),u("/DescendantFonts ["+b+" 0 R]"),u(">>"),u("endobj"),c.isAlreadyPutted=!0}})(o)}]),r.events.push(["putFont",function(o){(function(l){var c=l.font,u=l.out,d=l.newObject,h=l.putStream;if(c.metadata instanceof e.API.TTFFont&&c.encoding==="WinAnsiEncoding"){for(var f=c.metadata.rawData,p="",m=0;m<f.length;m++)p+=String.fromCharCode(f[m]);var A=d();h({data:p,addLength1:!0,objectId:A}),u("endobj");var g=d();h({data:i(c.metadata.toUnicode),addLength1:!0,objectId:g}),u("endobj");var y=d();u("<<"),u("/Descent "+c.metadata.decender),u("/CapHeight "+c.metadata.capHeight),u("/StemV "+c.metadata.stemV),u("/Type /FontDescriptor"),u("/FontFile2 "+A+" 0 R"),u("/Flags 96"),u("/FontBBox "+e.API.PDFObject.convert(c.metadata.bbox)),u("/FontName /"+uy(c.fontName)),u("/ItalicAngle "+c.metadata.italicAngle),u("/Asce
3400nt "+c.metadata.ascender),u(">>"),u("endobj"),c.objectNumber=d();for(var x=0;x<c.metadata.hmtx.widths.length;x++)c.metadata.hmtx.widths[x]=parseInt(c.metadata.hmtx.widths[x]*(1e3/c.metadata.head.unitsPerEm));u("<</Subtype/TrueType/Type/Font/ToUnicode "+g+" 0 R/BaseFont/"+uy(c.fontName)+"/FontDescriptor "+y+" 0 R/Encoding/"+c.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(c.metadata.hmtx.widths)+">>"),u("endobj"),c.isAlreadyPutted=!0}})(o)}]);var a=function(o){var l,c=o.text||"",u=o.x,d=o.y,h=o.options||{},f=o.mutex||{},p=f.pdfEscape,m=f.activeFontKey,A=f.fonts,g=m,y="",x=0,b="",v=A[g].encoding;if(A[g].encoding!=="Identity-H")return{text:c,x:u,y:d,options:h,mutex:f};for(b=c,g=m,Array.isArray(c)&&(b=c[0]),x=0;x<b.length;x+=1)A[g].metadata.hasOwnProperty("cmap")&&(l=A[g].metadata.cmap.unicode.codeMap[b[x].charCodeAt(0)]),l||b[x].charCodeAt(0)<256&&A[g].metadata.hasOwnProperty("Unicode")?y+=b[x]:y+="";var j="";return parseInt(g.slice(1))<14||v==="WinAnsiEncoding"?j=p(y,g).split("").map(function(_){return _.charCodeAt(0).toString(16)}).join(""):v==="Identity-H"&&(j=n(y,A[g])),f.isHex=!0,{text:j,x:u,y:d,options:h,mutex:f}};r.events.push(["postProcessText",function(o){var l=o.text||"",c=[],u={text:l,x:o.x,y:o.y,options:o.options,mutex:o.mutex};if(Array.isArray(l)){var d=0;for(d=0;d<l.length;d+=1)Array.isArray(l[d])&&l[d].length===3?c.push([a(Object.assign({},u,{text:l[d][0]})).text,l[d][1],l[d][2]]):c.push(a(Object.assign({},u,{text:l[d]})).text);o.text=c}else o.text=a(Object.assign({},u,{text:l})).text}])}(sr),function(e){var r=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(n){return r.call(this),this.internal.vFS[n]!==void 0},e.addFileToVFS=function(n,i){return r.call(this),this.internal.vFS[n]=i,this},e.getFileFromVFS=function(n){return r.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}}(sr.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(i){var a,o,l,c,u,d,h,f=r,p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],m=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],A={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},g={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},y=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],x=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),b=!1,v=0;this.__bidiEngine__={};var j=function(B){var T=B.charCodeAt(),F=T>>8,I=g[F];return I!==void 0?f[256*I+(255&T)]:F===252||F===253?"AL":x.test(F)?"L":F===8?"R":"N"},_=function(B){for(var T,F=0;F<B.length;F++){if((T=j(B.charAt(F)))==="L")return!1;if(T==="R")return!0}return!1},C=function(B,T,F,I){var D,L,V,U,Q=T[I];switch(Q){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":b=!1;break;case"N":case"AN":break;case"EN":b&&(Q="AN");break;case"AL":b=!0,Q="R";break;case"WS":case"BN":Q="N";break;case"CS":I<1||I+1>=T.length||(D=F[I-1])!=="EN"&&D!=="AN"||(L=T[I+1])!=="EN"&&L!=="AN"?Q="N":b&&(L="AN"),Q=L===D?L:"N";break;case"ES":Q=(D=I>0?F[I-1]:"B")==="EN"&&I+1<T.length&&T[I+1]==="EN"?"EN":"N";break;case"ET":if(I>0&&F[I-1]==="EN"){Q="EN";break}if(b){Q="N";break}for(V=I+1,U=T.length;V<U&&T[V]==="ET";)V++;Q=V<U&&T[V]==="EN"?"EN":"N";break;case"NSM":if(l&&!c){for(U=T.length,V=I+1;V<U&&T[V]==="NSM";)V++;if(V<U){var $=B[I],q=$>=1425&&$<=2303||$===64286;if(D=T[V],q&&(D==="R"||D==="AL")){Q="R";break}}}Q=I<1||(D=T[I-1])==="B"?"N":F[I-1];break;case"B":b=!1,a=!0,Q=v;break;case"S":o=!0,Q="N"}return Q},N=function(B,T,F){var I=B.split("");return F&&S(I,F,{hiLevel:v}),I.reverse(),T&&T.reverse(),I.join("")},S=function(B,T,F){var I,D,L,V,U,Q=-1,$=B.length,q=0,M=[],z=v?m:p,K=[];for(b=!1,a=!1,o=!1,D=0;D<$;D++)K[D]=j(B[D]);for(L=0;L<$;L++){if(U=q,M[L]=C(B,K,M,L),I=240&(q=z[U][A[M[L]]]),q&=15,T[L]=V=z[q][5],I>0)if(I===16){for(D=Q;D<L;D++)T[D]=1;Q=-1}else Q=-1;if(z[q][6])Q===-1&&(Q=L);else if(Q>-1){for(D=Q;D<L;D++)T[D]=V;Q=-1}K[L]==="B"&&(T[L]=0),F.hiLevel|=V}o&&function(ne,ie,X){for(var de=0;de<X;de++)if(ne[de]==="S"){ie[de]=v;for(var oe=de-1;oe>=0&&ne[oe]==="WS";oe--)ie[oe]=v}}(K,T,$)},E=function(B,T,F,I,D){if(!(D.hiLevel<B)){if(B===1&&v===1&&!a)return T.reverse(),void(F&&F.reverse());for(var L,V,U,Q,$=T.length,q=0;q<$;){if(I[q]>=B){for(U=q+1;U<$&&I[U]>=B;)U++;for(Q=q,V=U-1;Q<V;Q++,V--)L=T[Q],T[Q]=T[V],T[V]=L,F&&(L=F[Q],F[Q]=F[V],F[V]=L);q=U}q++}}}
vendor: 32,924 bytes, lines 3400-3401
3400,O=function(B,T,F){var I=B.split(""),D={hiLevel:v};return F||(F=[]),S(I,F,D),function(L,V,U){if(U.hiLevel!==0&&h)for(var Q,$=0;$<L.length;$++)V[$]===1&&(Q=y.indexOf(L[$]))>=0&&(L[$]=y[Q+1])}(I,F,D),E(2,I,T,F,D),E(1,I,T,F,D),I.join("")};return this.__bidiEngine__.doBidiReorder=function(B,T,F){if(function(D,L){if(L)for(var V=0;V<D.length;V++)L[V]=V;c===void 0&&(c=_(D)),d===void 0&&(d=_(D))}(B,T),l||!u||d)if(l&&u&&c^d)v=c?1:0,B=N(B,T,F);else if(!l&&u&&d)v=c?1:0,B=O(B,T,F),B=N(B,T);else if(!l||c||u||d){if(l&&!u&&c^d)B=N(B,T),c?(v=0,B=O(B,T,F)):(v=1,B=O(B,T,F),B=N(B,T));else if(l&&c&&!u&&d)v=1,B=O(B,T,F),B=N(B,T);else if(!l&&!u&&c^d){var I=h;c?(v=1,B=O(B,T,F),v=0,h=!1,B=O(B,T,F),h=I):(v=0,B=O(B,T,F),B=N(B,T),v=1,h=!1,B=O(B,T,F),h=I,B=N(B,T))}}else v=0,B=O(B,T,F);else v=c?1:0,B=O(B,T,F);return B},this.__bidiEngine__.setOptions=function(B){B&&(l=B.isInputVisual,u=B.isOutputVisual,c=B.isInputRtl,d=B.isOutputRtl,h=B.isSymmetricSwapping)},this.__bidiEngine__.setOptions(i),this.__bidiEngine__};var r=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(i){var a=i.text;i.x,i.y;var o=i.options||{};i.mutex,o.lang;var l=[];if(o.isInputVisual=typeof o.isInputVisual!="boolean"||o.isInputVisual,n.setOptions(o),Object.prototype.toString.call(a)==="[object Array]"){var c=0;for(l=[],c=0;c<a.length;c+=1)Object.prototype.toString.call(a[c])==="[object Array]"?l.push([n.doBidiReorder(a[c][0]),a[c][1],a[c][2]]):l.push([n.doBidiReorder(a[c])]);i.text=l}else i.text=n.doBidiReorder(a);n.setOptions({isInputVisual:!0})}])}(sr),sr.API.TTFFont=function(){function e(r){var n;if(this.rawData=r,n=this.contents=new xp(r),this.contents.pos=4,n.readString(4)==="ttcf")throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new iUt(this),this.registerTTF()}return e.open=function(r){return new e(r)},e.prototype.parse=function(){return this.directory=new H6t(this.contents),this.head=new W6t(this),this.name=new Y6t(this),this.cmap=new rje(this),this.toUnicode={},this.hhea=new q6t(this),this.maxp=new J6t(this),this.hmtx=new Z6t(this),this.post=new G6t(this),this.os2=new K6t(this),this.loca=new nUt(this),this.glyf=new eUt(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var r,n,i,a,o;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var l,c,u,d;for(d=[],l=0,c=(u=this.bbox).length;l<c;l++)r=u[l],d.push(Math.round(r*this.scaleFactor));return d}).call(this),this.stemV=0,this.post.exists?(i=255&(a=this.post.italic_angle),32768&(n=a>>16)&&(n=-(1+(65535^n))),this.italicAngle=+(n+"."+i)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(o=this.familyClass)===1||o===2||o===3||o===4||o===5||o===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(r){var n;return((n=this.cmap.unicode)!=null?n.codeMap[r]:void 0)||0},e.prototype.widthOfGlyph=function(r){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(r).advance*n},e.prototype.widthOfString=function(r,n,i){var a,o,l,c;for(l=0,o=0,c=(r=""+r).length;0<=c?o<c:o>c;o=0<=c?++o:--o)a=r.charCodeAt(o),l+=this.widthOfGlyph(this.characterToGlyph(a))+i*(1e3/n)||0;return l*(n/1e3)},e.prototype.lineHeight=function(r,n){var i;return n==null&&(n=!1),i=n?this.lineGap:0,(this.ascender+i-this.decender)/1e3*r},e}();var $u,xp=function(){function e(r){this.data=r??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(r){return this.data[this.pos++]=r},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(r){return this.writeByte(r>>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},e.prototype.readInt32=function(){var r;return(r=this.readUInt32())>=2147483648?r-4294967296:r},e.prototype.writeInt32=function(r){return r<0&&(r+=4294967296),this.writeUInt32(r)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(r){return this.writeByte(r>>8&255),this.writeByte(255&r)},e.prototype.readInt16=function(){var r;return(r=this.readUInt16())>=32768?r-65536:r},e.prototype.writeInt16=function(r){return r<0&&(r+=65536),this.writeUInt16(r)},e.prototype.readString=function(r){var n,i;for(i=[],n=0;0<=r?n<r:n>r;n=0<=r?++n:--n)i[n]=String.fromCharCode(this.readByte());return i.join("")},e.prototype.writeString=function(r){var n,i,a;for(a=[],n=0,i=r.length;0<=i?n<i:n>i;n=0<=i?++n:--n)a.push(this.writeByte(r.charCodeAt(n)));return a},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(r){return this.writeInt16(r)},e.prototype.readLongLong=function(){var r,n,i,a,o,l,c,u;return r=this.readByte(),n=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),l=this.readByte(),c=this.readByte(),u=this.readByte(),128&r?-1*(72057594037927940*(255^r)+281474976710656*(255^n)+1099511627776*(255^i)+4294967296*(255^a)+16777216*(255^o)+65536*(255^l)+256*(255^c)+(255^u)+1):72057594037927940*r+281474976710656*n+1099511627776*i+4294967296*a+16777216*o+65536*l+256*c+u},e.prototype.writeLongLong=function(r){var n,i;return n=Math.floor(r/4294967296),i=4294967295&r,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(r){return this.writeInt32(r)},e.prototype.read=function(r){var n,i;for(n=[],i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)n.push(this.readByte());return n},e.prototype.write=function(r){var n,i,a,o;for(o=[],i=0,a=r.length;i<a;i++)n=r[i],o.push(this.writeByte(n));return o},e}(),H6t=function(){var e;function r(n){var i,a,o;for(this.scalarType=n.readInt(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),this.tables={},a=0,o=this.tableCount;0<=o?a<o:a>o;a=0<=o?++a:--a)i={tag:n.readString(4),checksum:n.readInt(),offset:n.readInt(),length:n.readInt()},this.tables[i.tag]=i}return r.prototype.encode=function(n){var i,a,o,l,c,u,d,h,f,p,m,A,g;for(g in m=Object.keys(n).length,u=Math.log(2),f=16*Math.floor(Math.log(m)/u),l=Math.floor(f/u),h=16*m-f,(a=new xp).writeInt(this.scalarType),a.writeShort(m),a.writeShort(f),a.writeShort(l),a.writeShort(h),o=16*m,d=a.pos+o,c=null,A=[],n)for(p=n[g],a.writeString(g),a.writeInt(e(p)),a.writeInt(d),a.writeInt(p.length),A=A.concat(p),g==="head"&&(c=d),d+=p.length;d%4;)A.push(0),d++;return a.write(A),i=2981146554-e(a.data),a.pos=c+8,a.writeUInt32(i),a.data},e=function(n){var i,a,o,l;for(n=nje.call(n);n.length%4;)n.push(0);for(o=new xp(n),a=0,i=0,l=n.length;i<l;i=i+=4)a+=o.readUInt32();return 4294967295&a},r}(),V6t={}.hasOwnProperty,Kd=function(e,r){for(var n in r)V6t.call(r,n)&&(e[n]=r[n]);function i(){this.constructor=e}return i.prototype=r.prototype,e.prototype=new i,e.__super__=r.prototype,e};$u=function(){function e(r){var n;this.file=r,n=this.file.directory.tables[this.tag],this.exists=!!n,n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var W6t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Kd(e,$u),e.prototype.tag="head",e.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.revision=r.readInt(),this.checkSumAdjustment=r.readInt(),this.magicNumber=r.readInt(),this.flags=r.readShort(),this.unitsPerEm=r.readShort(),this.created=r.readLongLong(),this.modified=r.readLongLong(),this.xMin=r.readShort(),this.yMin=r.readShort(),this.xMax=r.readShort(),this.yMax=r.readShort(),this.macStyle=r.readShort(),this.lowestRecPPEM=r.readShort(),this.fontDirectionHint=r.readShort(),this.indexToLocFormat=r.readShort(),this.glyphDataFormat=r.readShort()},e.prototype.encode=function(r){var n;return(n=new xp).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(r),n.writeShort(this.glyphDataFormat),n.data},e}(),Rie=function(){function e(r,n){var i,a,o,l,c,u,d,h,f,p,m,A,g,y,x,b,v;switch(this.platformID=r.readUInt16(),this.encodingID=r.readShort(),this.offset=n+r.readInt(),f=r.pos,r.pos=this.offset,this.format=r.readUInt16(),this.length=r.readUInt16(),this.language=r.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(u=0;u<256;++u)this.codeMap[u]=r.readByte();break;case 4:for(m=r.readUInt16(),p=m/2,r.pos+=6,o=function(){var j,_;for(_=[],u=j=0;0<=p?j<p:j>p;u=0<=p?++j:--j)_.push(r.readUInt16());return _}(),r.pos+=2,g=function(){var j,_;for(_=[],u=j=0;0<=p?j<p:j>p;u=0<=p?++j:--j)_.push(r.readUInt16());return _}(),d=function(){var j,_;for(_=[],u=j=0;0<=p?j<p:j>p;u=0<=p?++j:--j)_.push(r.readUInt16());return _}(),h=function(){var j,_;for(_=[],u=j=0;0<=p?j<p:j>p;u=0<=p?++j:--j)_.push(r.readUInt16());return _}(),a=(this.length-r.pos+this.offset)/2,c=function(){var j,_;for(_=[],u=j=0;0<=a?j<a:j>a;u=0<=a?++j:--j)_.push(r.readUInt16());return _}(),u=x=0,v=o.length;x<v;u=++x)for(y=o[u],i=b=A=g[u];A<=y?b<=y:b>=y;i=A<=y?++b:--b)h[u]===0?l=i+d[u]:(l=c[h[u]/2+(i-A)-(p-u)]||0)!==0&&(l+=d[u]),this.codeMap[i]=65535&l}r.pos=f}return e.encode=function(r,n){var i,a,o,l,c,u,d,h,f,p,m,A,g,y,x,b,v,j,_,C,N,S,E,O,B,T,F,I,D,L,V,U,Q,$,q,M,z,K,ne,ie,X,de,oe,ce,ye,ge;switch(I=new xp,l=Object.keys(r).sort(function(Be,Ve){return Be-Ve}),n){case"macroman":for(g=0,y=function(){var Be=[];for(A=0;A<256;++A)Be.push(0);return Be}(),b={0:0},o={},D=0,Q=l.length;D<Q;D++)b[oe=r[a=l[D]]]==null&&(b[oe]=++g),o[a]={old:r[a],new:b[r[a]]},y[a]=b[r[a]];return I.writeUInt16(1),I.writeUInt16(0),I.writeUInt32(12),I.writeUInt16(0),I.writeUInt16(262),I.writeUInt16(0),I.write(y),{charMap:o,subtable:I.data,maxGlyphID:g+1};case"unicode":for(T=[],f=[],v=0,b={},i={},x=d=null,L=0,$=l.length;L<$;L++)b[_=r[a=l[L]]]==null&&(b[_]=++v),i[a]={old:_,new:b[_]},c=b[_]-a,x!=null&&c===d||(x&&f.push(x),T.push(a),d=c),x=a;for(x&&f.push(x),f.push(65535),T.push(65535),O=2*(E=T.length),S=2*Math.pow(Math.log(E)/Math.LN2,2),p=Math.log(S/2)/Math.LN2,N=2*E-S,u=[],C=[],m=[],A=V=0,q=T.length;V<q;A=++V){if(B=T[A],h=f[A],B===65535){u.push(0),C.push(0);break}if(B-(F=i[B].new)>=32768)for(u.push(0),C.push(2*(m.length+E-A)),a=U=B;B<=h?U<=h:U>=h;a=B<=h?++U:--U)m.push(i[a].new);else u.push(F-B),C.push(0)}for(I.writeUInt16(3),I.writeUInt16(1),I.writeUInt32(12),I.writeUInt16(4),I.writeUInt16(16+8*E+2*m.length),I.writeUInt16(0),I.writeUInt16(O),I.writeUInt16(S),I.writeUInt16(p),I.writeUInt16(N),X=0,M=f.length;X<M;X++)a=f[X],I.writeUInt16(a);for(I.writeUInt16(0),de=0,z=T.length;de<z;de++)a=T[de],I.writeUInt16(a);for(ce=0,K=u.length;ce<K;ce++)c=u[ce],I.writeUInt16(c);for(ye=0,ne=C.length;ye<ne;ye++)j=C[ye],I.writeUInt16(j);for(ge=0,ie=m.length;ge<ie;ge++)g=m[ge],I.writeUInt16(g);return{charMap:i,subtable:I.data,maxGlyphID:v+1}}},e}(),rje=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Kd(e,$u),e.prototype.tag="cmap",e.prototype.parse=function(r){var n,i,a;for(r.pos=this.offset,this.version=r.readUInt16(),a=r.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=a?i<a:i>a;i=0<=a?++i:--i)n=new Rie(r,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},e.encode=function(r,n){var i,a;return n==null&&(n="macroman"),i=Rie.encode(r,n),(a=new xp).writeUInt16(0),a.writeUInt16(1),i.table=a.data.concat(i.subtable),i},e}(),q6t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Kd(e,$u),e.prototype.tag="hhea",e.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.ascender=r.readShort(),this.decender=r.readShort(),this.lineGap=r.readShort(),this.advanceWidthMax=r.readShort(),this.minLeftSideBearing=r.readShort(),this.minRightSideBearing=r.readShort(),this.xMaxExtent=r.readShort(),this.caretSlopeRise=r.readShort(),this.caretSlopeRun=r.readShort(),this.caretOffset=r.readShort(),r.pos+=8,this.metricDataFormat=r.readShort(),this.numberOfMetrics=r.readUInt16()},e}(),K6t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Kd(e,$u),e.prototype.tag="OS/2",e.prototype.parse=function(r){if(r.pos=this.offset,this.version=r.readUInt16(),this.averageCharWidth=r.readShort(),this.weightClass=r.readUInt16(),this.widthClass=r.readUInt16(),this.type=r.readShort(),this.ySubscriptXSize=r.readShort(),this.ySubscriptYSize=r.readShort(),this.ySubscriptXOffset=r.readShort(),this.ySubscriptYOffset=r.readShort(),this.ySuperscriptXSize=r.readShort(),this.ySuperscriptYSize=r.readShort(),this.ySuperscriptXOffset=r.readShort(),this.ySuperscriptYOffset=r.readShort(),this.yStrikeoutSize=r.readShort(),this.yStrikeoutPosition=r.readShort(),this.familyClass=r.readShort(),this.panose=function(){var n,i;for(i=[],n=0;n<10;++n)i.push(r.readByte());return i}(),this.charRange=function(){var n,i;for(i=[],n=0;n<4;++n)i.push(r.readInt());return i}(),this.vendorID=r.readString(4),this.selection=r.readShort(),this.firstCharIndex=r.readShort(),this.lastCharIndex=r.readShort(),this.version>0&&(this.ascent=r.readShort(),this.descent=r.readShort(),this.lineGap=r.readShort(),this.winAscent=r.readShort(),this.winDescent=r.readShort(),this.codePageRange=function(){var n,i;for(i=[],n=0;n<2;n=++n)i.push(r.readInt());return i}(),this.version>1))return this.xHeight=r.readShort(),this.capHeight=r.readShort(),this.defaultChar=r.readShort(),this.breakChar=r.readShort(),this.maxContext=r.readShort()},e}(),G6t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Kd(e,$u),e.prototype.tag="post",e.prototype.parse=function(r){var n,i,a;switch(r.pos=this.offset,this.format=r.readInt(),this.italicAngle=r.readInt(),this.underlinePosition=r.readShort(),this.underlineThickness=r.readShort(),this.isFixedPitch=r.readInt(),this.minMemType42=r.readInt(),this.maxMemType42=r.readInt(),this.minMemType1=r.readInt(),this.maxMemType1=r.readInt(),this.format){case 65536:case 196608:break;case 131072:var o;for(i=r.readUInt16(),this.glyphNameIndex=[],o=0;0<=i?o<i:o>i;o=0<=i?++o:--o)this.glyphNameIndex.push(r.readUInt16());for(this.names=[],a=[];r.pos<this.offset+this.length;)n=r.readByte(),a.push(this.names.push(r.readString(n)));return a;case 151552:return i=r.readUInt16(),this.offsets=r.read(i);case 262144:return this.map=(function(){var l,c,u;for(u=[],o=l=0,c=this.file.maxp.numGlyphs;0<=c?l<c:l>c;o=0<=c?++l:--l)u.push(r.readUInt32());return u}).call(this)}},e}(),X6t=function(e,r){this.raw=e,this.length=e.length,this.platformID=r.platformID,this.encodingID=r.encodingID,this.languageID=r.languageID},Y6t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Kd(e,$u),e.prototype.tag="name",e.prototype.parse=function(r){var n,i,a,o,l,c,u,d,h,f,p;for(r.pos=this.offset,r.readShort(),n=r.readShort(),c=r.readShort(),i=[],o=0;0<=n?o<n:o>n;o=0<=n?++o:--o)i.push({platformID:r.readShort(),encodingID:r.readShort(),languageID:r.readShort(),nameID:r.readShort(),length:r.readShort(),offset:this.offset+c+r.readShort()});for(u={},o=h=0,f=i.length;h<f;o=++h)a=i[o],r.pos=a.offset,d=r.readString(a.length),l=new X6t(d,a),u[p=a.nameID]==null&&(u[p]=[]),u[a.nameID].push(l);this.strings=u,this.copyright=u[0],this.fontFamily=u[1],this.fontSubfamily=u[2],this.uniqueSubfamily=u[3],this.fontName=u[4],this.version=u[5];try{this.postscriptName=u[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=u[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=u[7],this.manufacturer=u[8],this.designer=u[9],this.description=u[10],this.vendorUrl=u[11],this.designerUrl=u[12],this.license=u[13],this.licenseUrl=u[14],this.preferredFamily=u[15],this.preferredSubfamily=u[17],this.compatibleFull=u[18],this.sampleText=u[19]},e}(),J6t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Kd(e,$u),e.prototype.tag="maxp",e.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.numGlyphs=r.readUInt16(),this.maxPoints=r.readUInt16(),this.maxContours=r.readUInt16(),this.maxCompositePoints=r.readUInt16(),this.maxComponentContours=r.readUInt16(),this.maxZones=r.readUInt16(),this.maxTwilightPoints=r.readUInt16(),this.maxStorage=r.readUInt16(),this.maxFunctionDefs=r.readUInt16(),this.maxInstructionDefs=r.readUInt16(),this.maxStackElements=r.readUInt16(),this.maxSizeOfInstructions=r.readUInt16(),this.maxComponentElements=r.readUInt16(),this.maxComponentDepth=r.readUInt16()},e}(),Z6t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Kd(e,$u),e.prototype.tag="hmtx",e.prototype.parse=function(r){var n,i,a,o,l,c,u;for(r.pos=this.offset,this.metrics=[],n=0,c=this.file.hhea.numberOfMetrics;0<=c?n<c:n>c;n=0<=c?++n:--n)this.metrics.push({advance:r.readUInt16(),lsb:r.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var d,h;for(h=[],n=d=0;0<=a?d<a:d>a;n=0<=a?++d:--d)h.push(r.readInt16());return h}(),this.widths=(function(){var d,h,f,p;for(p=[],d=0,h=(f=this.metrics).length;d<h;d++)o=f[d],p.push(o.advance);return p}).call(this),i=this.widths[this.widths.length-1],u=[],n=l=0;0<=a?l<a:l>a;n=0<=a?++l:--l)u.push(this.widths.push(i));return u},e.prototype.forGlyph=function(r){return r in this.metrics?this.metrics[r]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[r-this.metrics.length]}},e}(),nje=[].slice,eUt=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Kd(e,$u),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(r){var n,i,a,o,l,c,u,d,h,f;return r in this.cache?this.cache[r]:(o=this.file.loca,n=this.file.contents,i=o.indexOf(r),(a=o.lengthOf(r))===0?this.cache[r]=null:(n.pos=this.offset+i,l=(c=new xp(n.read(a))).readShort(),d=c.readShort(),f=c.readShort(),u=c.readShort(),h=c.readShort(),this.cache[r]=l===-1?new rUt(c,d,f,u,h):new tUt(c,l,d,f,u,h),this.cache[r]))},e.prototype.encode=function(r,n,i){var a,o,l,c,u;for(l=[],o=[],c=0,u=n.length;c<u;c++)a=r[n[c]],o.push(l.length),a&&(l=l.concat(a.encode(i)));return o.push(l.length),{table:l,offsets:o}},e}(),tUt=function(){function e(r,n,i,a,o,l){this.raw=r,this.numberOfContours=n,this.xMin=i,this.yMin=a,this.xMax=o,this.yMax=l,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),rUt=function(){function e(r,n,i,a,o){var l,c;for(this.raw=r,this.xMin=n,this.yMin=i,this.xMax=a,this.yMax=o,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],l=this.raw;c=l.readShort(),this.glyphOffsets.push(l.pos),this.glyphIDs.push(l.readUInt16()),32&c;)l.pos+=1&c?4:2,128&c?l.pos+=8:64&c?l.pos+=4:8&c&&(l.pos+=2)}return e.prototype.encode=function(){var r,n,i;for(n=new xp(nje.call(this.raw.data)),r=0,i=this.glyphIDs.length;r<i;++r)n.pos=this.glyphOffsets[r];return n.data},e}(),nUt=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Kd(e,$u),e.prototype.tag="loca",e.prototype.parse=function(r){var n,i;return r.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var a,o;for(o=[],i=0,a=this.length;i<a;i+=2)o.push(2*r.readUInt16());return o}).call(this):(function(){var a,o;for(o=[],i=0,a=this.length;i<a;i+=4)o.push(r.readUInt32());return o}).call(this)},e.prototype.indexOf=function(r){return this.offsets[r]},e.prototype.lengthOf=function(r){return this.offsets[r+1]-this.offsets[r]},e.prototype.encode=function(r,n){for(var i=new Uint32Array(this.offsets.length),a=0,o=0,l=0;l<i.length;++l)if(i[l]=a,o<n.length&&n[o]==l){++o,i[l]=a;var c=this.offsets[l],u=this.offsets[l+1]-c;u>0&&(a+=u)}for(var d=new Array(4*i.length),h=0;h<i.length;++h)d[4*h+3]=255&i[h],d[4*h+2]=(65280&i[h])>>8,d[4*h+1]=(16711680&i[h])>>16,d[4*h]=(4278190080&i[h])>>24;return d},e}(),iUt=function(){function e(r){this.font=r,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var r,n,i,a,o;for(n in a=this.font.cmap.tables[0].codeMap,r={},o=this.subset)i=o[n],r[n]=a[i];return r},e.prototype.glyphsFor=function(r){var n,i,a,o,l,c,u;for(a={},l=0,c=r.length;l<c;l++)a[o=r[l]]=this.font.glyf.glyphFor(o);for(o in n=[],a)(i=a[o])!=null&&i.compound&&n.push.apply(n,i.glyphIDs);if(n.length>0)for(o in u=this.glyphsFor(n))i=u[o],a[o]=i;return a},e.prototype.encode=function(r,n){var i,a,o,l,c,u,d,h,f,p,m,A,g,y,x;for(a in i=rje.encode(this.generateCmap(),"unicode"),l=this.glyphsFor(r),m={0:0},x=i.charMap)m[(u=x[a]).old]=u.new;for(A in p=i.maxGlyphID,l)A in m||(m[A]=p++);return h=function(b){var v,j;for(v in j={},b)j[b[v]]=v;return j}(m),f=Object.keys(h).sort(function(b,v){return b-v}),g=function(){var b,v,j;for(j=[],b=0,v=f.length;b<v;b++)c=f[b],j.push(h[c]);return j}(),o=this.font.glyf.encode(l,g,m),d=this.font.loca.encode(o.offsets,g),y={cmap:this.font.cmap.raw(),glyf:o.table,loca:d,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(y["OS/2"]=this.font.os2.raw()),this.font.directory.encode(y)},e}();sr.API.PDFObject=function(){var e;function r(){}return e=function(n,i){return(Array(i+1).join("0")+n).slice(-i)},r.convert=function(n){var i,a,o,l;if(Array.isArray(n))return"["+function(){var c,u,d;for(d=[],c=0,u=n.length;c<u;c++)i=n[c],d.push(r.convert(i));return d}().join(" ")+"]";if(typeof n=="string")return"/"+n;if(n!=null&&n.isString)return"("+n+")";if(n instanceof Date)return"(D:"+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+"Z)";if({}.toString.call(n)==="[object Object]"){for(a in o=["<<"],n)l=n[a],o.push("/"+a+" "+r.convert(l));return o.push(">>"),o.join(`
3401`)}return""+n},r}();function aUt({holderName:e,courseTitle:r,certificateNumber:n,issuedAt:i,estimatedHours:a,competencies:o,verificationUrl:l}){const c=w.useRef(null),[u,d]=w.useState(!1),h=async()=>
3401{if(c.current){d(!0);try{const p=(await Kwe(c.current,{scale:2,useCORS:!0,backgroundColor:"#ffffff"})).toDataURL("image/png"),m=new sr({orientation:"landscape",unit:"mm",format:"a4"}),A=m.internal.pageSize.getWidth(),g=m.internal.pageSize.getHeight();m.addImage(p,"PNG",0,0,A,g),m.save(`Certificat-${n}.pdf`)}catch(f){console.error("PDF generation failed:",f)}finally{d(!1)}}};return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"rounded-xl overflow-hidden border border-border shadow-lg",children:s.jsx(X4,{ref:c,holderName:e,courseTitle:r,certificateNumber:n,issuedAt:i,estimatedHours:a,competencies:o,verificationUrl:l})}),s.jsx("div",{className:"flex justify-center",children:s.jsxs(me,{onClick:h,disabled:u,className:"gap-2",children:[u?s.jsx(rt,{size:16,className:"animate-spin"}):s.jsx(Wl,{size:16}),u?"Se generează...":"Descarcă PDF"]})})]})}function sUt(){var l,c,u,d,h,f;const{user:e}=Fn(),[r,n]=w.useState(null);Zr({title:"Diplomele mele – EduWeb Academy",noIndex:!0});const{data:i=[],isLoading:a}=Xe({queryKey:["my-certificates",e==null?void 0:e.id],enabled:!!e,queryFn:async()=>{const{data:p,error:m}=await G.from("certificates").select("*, courses(title, slug, image_url, estimated_hours, competencies)").eq("user_id",e.id).order("issued_at",{ascending:!1});if(m)throw m;return p||[]}}),o=((l=e==null?void 0:e.user_metadata)==null?void 0:l.full_name)||((c=e==null?void 0:e.user_metadata)==null?void 0:c.name)||((u=e==null?void 0:e.email)==null?void 0:u.split("@")[0])||"";return s.jsxs(Ft,{children:[s.jsx("div",{className:"container max-w-4xl py-8",children:s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx(oo,{size:28,className:"text-primary"}),s.jsx("h1",{className:"font-heading text-2xl sm:text-3xl font-bold",children:"Diplomele mele"})]}),a?s.jsx("div",{className:"flex justify-center py-16",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):i.length===0?s.jsxs("div",{className:"glass-card rounded-xl p-12 text-center",children:[s.jsx(Rr,{size:48,className:"mx-auto text-muted-foreground/30 mb-4"}),s.jsx("p",{className:"text-muted-foreground text-lg mb-2",children:"Nu ai nicio diplomă încă."}),s.jsx("p",{className:"text-muted-foreground text-sm mb-4",children:"Completează un curs pentru a primi prima ta diplomă!"}),s.jsxs(be,{to:"/academy",className:"inline-flex items-center gap-2 text-primary font-medium hover:underline",children:[s.jsx(Rr,{size:16})," Explorează cursurile"]})]}):s.jsx("div",{className:"grid gap-4",children:i.map((p,m)=>{var A,g,y;return s.jsx(Le.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:m*.05},children:s.jsx(st,{className:"hover:border-primary/30 transition-all",children:s.jsx(ot,{className:"p-5",children:s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-start gap-4",children:[((A=p.courses)==null?void 0:A.image_url)&&s.jsx("img",{src:p.courses.image_url,alt:(g=p.courses)==null?void 0:g.title,className:"w-16 h-16 rounded-lg object-cover shrink-0"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-heading font-semibold text-base",children:(y=p.courses)==null?void 0:y.title}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Emisă: ",new Date(p.issued_at).toLocaleDateString("ro-RO",{year:"numeric",month:"long",day:"numeric"})]}),s.jsx("p",{className:"text-xs font-mono text-muted-foreground mt-0.5",children:p.certificate_number})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(me,{variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>n(p),children:[s.jsx(Wl,{size:14})," Descarcă"]}),s.jsx(be,{to:`/verify/${p.certificate_number}`,children:s.jsxs(me,{variant:"ghost",size:"sm",className:"gap-1.5",children:[s.jsx(Yr,{size:14})," Verifică"]})})]})]})})})},p.id)})})]})}),s.jsx(sl,{open:!!r,onOpenChange:()=>n(null),children:s.jsx(Po,{className:"max-w-3xl",children:r&&s.jsx(aUt,{holderName:r.holder_name||o,courseTitle:((d=r.courses)==null?void 0:d.title)||"Curs EduWeb",certificateNumber:r.certificate_number,issuedAt:r.issued_at,estimatedHours:(h=r.courses)==null?void 0:h.estimated_hours,competencies:((f=r.courses)==null?void 0:f.competencies)||[],verificationUrl:`https://eduweb.ro/verify/${r.certificate_number}`})})})]})}function oUt(){var i,a,o;const{certNumber:e}=Zl();Zr({title:`Verificare certificat ${e} – EduWeb Academy`,description:"Verifică autenticitatea diplomei EduWeb Academy."});const{data:r,isLoading:n}=Xe({queryKey:["verify-certificate",e],enabled:!!e,queryFn:async()=>{const{data:l,error:c}=await G.rpc("verify_certificate",{p_certificate_number:e});if(c)throw c;const u=Array.isArray(l)?l[0]:l;
3401return u?{certificate_number:u.certificate_number,holder_name:u.holder_name,issued_at:u.issued_at,courses:{title:u.course_title,slug:u.course_slug,estimated_hours:u.estimated_hours,competencies:u.competencies}}:null}});return s.jsx(Ft,{children:s.jsx("div",{className:"container max-w-3xl py-12",children:s.jsxs(Le.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx(oo,{size:36,className:"mx-auto text-primary mb-3"}),s.jsx("h1",{className:"font-heading text-2xl sm:text-3xl font-bold",children:"Verificare certificat"}),s.jsx("p",{className:"text-muted-foreground mt-2 text-sm font-mono",children:e})]}),n?s.jsx("div",{className:"flex justify-center py-16",children:s.jsx(rt,{className:"animate-spin text-primary",size:32})}):r?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 text-emerald-500 bg-emerald-500/10 rounded-lg py-3 px-4",children:[s.jsx(hn,{size:20}),s.jsx("span",{className:"font-heading font-semibold",children:"Certificat valid"})]}),s.jsx("div",{className:"rounded-xl overflow-hidden border border-border shadow-lg",children:s.jsx(X4,{holderName:r.holder_name||"Absolvent EduWeb",courseTitle:((i=r.courses)==null?void 0:i.title)||"Curs EduWeb",certificateNumber:r.certificate_number,issuedAt:r.issued_at,estimatedHours:(a=r.courses)==null?void 0:a.estimated_hours,competencies:((o=r.courses)==null?void 0:o.competencies)||[],verificationUrl:`https://eduweb.ro/verify/${r.certificate_number}`})}),s.jsx("div",{className:"text-center text-sm text-muted-foreground",children:s.jsxs("p",{children:["Emis pe ",new Date(r.issued_at).toLocaleDateString("ro-RO",{year:"numeric",month:"long",day:"numeric"})]})})]}):s.jsxs("div",{className:"text-center py-16",children:[s.jsx(Yh,{size:48,className:"mx-auto text-destructive/50 mb-4"}),s.jsx("p",{className:"text-lg font-heading font-semibold text-destructive",children:"Certificat negăsit"}),s.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"Numărul introdus nu corespunde niciunui certificat din baza noastră de date."})]})]})})})}function lUt(){const{pathname:e}=ps();return w.useEffect(()=>{window.scrollTo(0,0)},[e]),null}function cUt(){const{user:e,loading:r}=Fn();return w.useEffect(()=>{if(r||!e)return;window.location.hostname.includes("lovable.app")&&G.auth.getSession().then(({data:{session:i}})=>{const a=window.location.pathname+window.location.search;if(i!=null&&i.access_token&&(i!=null&&i.refresh_token)){const o=`#access_token=${i.access_token}&refresh_token=${i.refresh_token}&token_type=bearer&type=signup`;window.location.href=`https://eduweb.ro${a}${o}`}else window.location.href=`https://eduweb.ro${a}`})},[e,r]),null}const I6={"/what-is":"/ce-este","/what-is-web3":"/ce-este-web3","/what-is-blockchain":"/ce-este-blockchain","/what-is-crypto":"/ce-este-crypto","/what-is-bitcoin":"/ce-este-bitcoin","/what-is-ethereum":"/ce-este-ethereum","/what-is-solana":"/ce-este-solana","/what-is-bnb":"/ce-este-bnb","/what-is-xrp":"/ce-este-xrp","/what-is-cardano":"/ce-este-cardano","/what-is-dogecoin":"/ce-este-dogecoin","/what-is-polkadot":"/ce-este-polkadot","/what-is-avalanche":"/ce-este-avalanche","/what-is-chainlink":"/ce-este-chainlink","/web3-case-studies":"/web3-studii-de-caz","/about":"/despre-noi"},Die=Object.fromEntries(Object.entries(I6).map(([e,r])=>[r,e]));function uUt(){return typeof window>"u"?!0:!window.location.hostname.includes("eduweb.ai")}function qr({children:e}){const{pathname:r}=ps(),n=uUt();return n&&I6[r]?s.jsx(xd,{to:I6[r],replace:!0}):!n&&Die[r]?s.jsx(xd,{to:Die[r],replace:!0}):n&&r.startsWith("/web3-case-studies/")?s.jsx(xd,{to:r.replace("/web3-case-studies/","/web3-studii-de-caz/"),replace:!0}):!n&&r.startsWith("/web3-studii-de-caz/")?s.jsx(xd,{to:r.replace("/web3-studii-de-caz/","/web3-case-studies/"),replace:!0}):e}const dUt=6e4;function hUt(){const{user:e}=Fn(),r=ps(),n=w.useRef(null),i=w.useRef(null),a=w.useRef(Date.now()),o=w.useRef(null);w.useEffect(()=>{if(!e){n.current=null,i.current=null,o.current=null;return}(async()=>{let d=null;try{d=(await(await fetch("https://api.ipify.org?format=json")).json()).ip||null}catch{}const{data:h}=await G.from("user_sessions").insert({user_id:e.id,ip_address:d}).select("id").single();h&&(n.current=h.id)})();const c=setInterval(async()=>{n.current&&await G.from("user_sessions").update({last_active_at:new Date().toISOString()}).eq("id",n.current)},dUt),u=()=>{n.current&&(JSON.stringify({session_id:n.current,ended_at:new Date().toISOString()}),navigator.sendBeacon(`https://ahleagpvrcuwshrzzpkq.supabase.co/rest/v1/user_sessions?id=eq.${n.current}`),G.from("user_sessions").update({ended_at:new Date().toISOString(),last_active_at:new Date().toISOString()}).eq("id",n.current).then(()=>{}))};return window.addEventListener("beforeunload",u),()=>{clearInterval(c),window.removeEventListener("beforeunload",u),n.current&&G.from("user_sessions").update({ended_at:new Date().toISOString(),last_active_at:new Date().toISOString()}).eq("id",n.current).then(()=>{})}},[e]),w.useEffect(()=>{if(!e||!n.current)return;const l=Date.now();if(o.current&&i.current){const u=Math.round((l-a.current)/1e3);u>0&&u<3600&&G.from("user_page_views").update({time_on_page_seconds:u}).eq("id",o.current).then(()=>{})}const c=r.pathname;c!==i.current&&(i.current=c,a.current=l,G.from("user_page_views").insert({user_id:e.id,session_id:n.current,path:c}).select("id").single().then(({data:u})=>{u&&(o.current=u.id)}))},[e,r.pathname])}let KO=null,Mie=!1;function fUt(){const e=navigator.userAgent;return/tablet|ipad/i.test(e)?"tablet":/mobile|android|iphone/i.test(e)?"mobile":"desktop"}function mUt(){const e=`${navigator.userAgent}|${screen.width}x${screen.height}|${Intl.DateTimeFormat().resolvedOptions().timeZone}`;let r=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);r=(r<<5)-r+i,r|=0}return"fp_"+Math.abs(r).toString(36)}async function pUt(){if(Mie)return KO;Mie=!0;try{KO=(await(await fetch("https://api.ipify.org?format=json")).json()).ip||null}catch{}return KO}function AUt(){const e=ps(),r=w.useRef(null),n=w.useRef(Date.now()),i=w.useRef(null),a=w.useRef(mUt());w.useEffect(()=>{const o=e.pathname;if(o===r.current||o.startsWith("/admin"))return;const l=Date.now();if(i.current&&r.current){const u=Math.round((l-n.current)/1e3);u>0&&u<3600&&G.from("site_visits").update({time_on_page_seconds:u}).eq("id",i.current).then(()=>{})}r.current=o,n.current=l,(async()=>{var m,A;const u=await pUt(),{data:{session:d}}=await G.auth.getSession(),h=((m=d==null?void 0:d.user)==null?void 0:m.id)||null,f=((A=d==null?void 0:d.user)==null?void 0:A.email)||null,{data:p}=await G.from("site_visits").insert({path:o,user_id:h,user_email:f,session_fingerprint:a.current,ip_address:u,user_agent:navigator.userAgent.
3401substring(0,500),referrer:document.referrer||null,device_type:fUt()}).select("id").single();p&&(i.current=p.id)})()},[e.pathname])}function gUt(){return hUt(),AUt(),null}function xUt(){const{slug:e}=Zl(),n=(window.location.hostname.includes("eduweb.ai")?"en":"ro")==="en"?"course":"curs";return s.jsx(xd,{to:`/academy/${n}/${e}`,replace:!0})}const yUt=new MBe({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:5*60*1e3}}}),vUt=()=>s.jsx(HBe,{client:yUt,children:s.jsx(aTe,{children:s.jsx(QPe,{children:s.jsx(MPe,{children:s.jsxs(ice,{children:[s.jsx(sEe,{}),s.jsx(DEe,{}),s.jsx(iNt,{}),s.jsxs(J4e,{children:[s.jsx(gUt,{}),s.jsx(lUt,{}),s.jsx(cUt,{}),s.jsxs(Q4e,{children:[s.jsx(Ke,{path:"/",element:s.jsx(YQe,{})}),s.jsx(Ke,{path:"/stiri",element:s.jsx(l7e,{})}),s.jsx(Ke,{path:"/analize",element:s.jsx(c7e,{})}),s.jsx(Ke,{path:"/articol/:slug",element:s.jsx(mG,{})}),s.jsx(Ke,{path:"/article/:slug",element:s.jsx(mG,{})}),s.jsx(Ke,{path:"/auth",element:s.jsx(tHe,{})}),s.jsx(Ke,{path:"/reset-password",element:s.jsx(kPt,{})}),s.jsx(Ke,{path:"/academy",element:s.jsx(vHe,{})}),s.jsx(Ke,{path:"/academy/abonament",element:s.jsx(BPt,{})}),s.jsx(Ke,{path:"/academy/curs/:slug",element:s.jsx(bG,{})}),s.jsx(Ke,{path:"/academy/course/:slug",element:s.jsx(bG,{})}),s.jsx(Ke,{path:"/academy/:slug",element:s.jsx(xUt,{})}),s.jsx(Ke,{path:"/crypto",element:s.jsx(zHe,{})}),s.jsx(Ke,{path:"/convertor-crypto-ron",element:s.jsx(jxt,{})}),s.jsx(Ke,{path:"/preturi-crypto",element:s.jsx(Sxt,{})}),s.jsx(Ke,{path:"/bitcoin-pret-azi",element:s.jsx(Yu,{})}),s.jsx(Ke,{path:"/ethereum-pret-ron",element:s.jsx(Yu,{})}),s.jsx(Ke,{path:"/solana-pret-azi",element:s.jsx(Yu,{})}),s.jsx(Ke,{path:"/bnb-pret-azi",element:s.jsx(Yu,{})}),s.jsx(Ke,{path:"/xrp-pret-azi",element:s.jsx(Yu,{})}),s.jsx(Ke,{path:"/cardano-pret-azi",element:s.jsx(Yu,{})}),s.jsx(Ke,{path:"/dogecoin-pret-azi",element:s.jsx(Yu,{})}),s.jsx(Ke,{path:"/polkadot-pret-azi",element:s.jsx(Yu,{})}),s.jsx(Ke,{path:"/avalanche-pret-azi",element:s.jsx(Yu,{})}),s.jsx(Ke,{path:"/chainlink-pret-azi",element:s.jsx(Yu,{})}),s.jsx(Ke,{path:"/membru",element:s.jsx(vr,{children:s.jsx(nyt,{})})}),s.jsx(Ke,{path:"/edu-coins",element:s.jsx(vr,{children:s.jsx(oyt,{})})}),s.jsx(Ke,{path:"/edu-coins/reguli",element:s.jsx(vr,{children:s.jsx(lyt,{})})}),s.jsx(Ke,{path:"/membru/diplome",element:s.jsx(vr,{children:s.jsx(sUt,{})})}),s.jsx(Ke,{path:"/verify/:certNumber",element:s.jsx(oUt,{})}),s.jsx(Ke,{path:"/partner",element:s.jsx(vr,{requirePartner:!0,children:s.jsx(nNt,{})})}),s.jsx(Ke,{path:"/admin",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(qyt,{})})}),s.jsx(Ke,{path:"/admin/users",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(mCt,{})})}),s.jsx(Ke,{path:"/admin/course-prompting",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(LCt,{})})}),s.jsx(Ke,{path:"/admin/courses",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Yyt,{})})}),s.jsx(Ke,{path:"/admin/courses/:id",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(tbt,{})})}),s.jsx(Ke,{path:"/admin/courses/:id/preview",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(rbt,{})})}),s.jsx(Ke,{path:"/admin/course-analytics",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(z0t,{})})}),s.jsx(Ke,{path:"/admin/sources",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(sbt,{})})}),s.jsx(Ke,{path:"/admin/posts",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Tbt,{})})}),s.jsx(Ke,{path:"/admin/posts/:id",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Ibt,{})})}),s.jsx(Ke,{path:"/admin/published",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Rbt,{})})}),s.jsx(Ke,{path:"/admin/rules",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Dbt,{})})}),s.jsx(Ke,{path:"/admin/authors",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(zbt,{})})}),s.jsx(Ke,{path:"/admin/editorial",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Ubt,{})})}),s.jsx(Ke,{path:"/admin/editorial/new",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Hbt,{})})}),s.jsx(Ke,{path:"/admin/custom-pages",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Vbt,{})})}),s.jsx(Ke,{path:"/admin/newsletter",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Wbt,{})})}),s.jsx(Ke,{path:"/admin/tracking",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(qbt,{})})}),s.jsx(Ke,{path:"/admin/media-analytics",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Xbt,{})})}),s.jsx(Ke,{path:"/admin/settings",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Zbt,{})})}),s.jsx(Ke,{path:"/admin/gamification",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(e1t,{})})}),s.jsx(Ke,{path:"/admin/educoins",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(n1t,{})})}),s.jsx(Ke,{path:"/admin/internal-links",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(s1t,{})})}),s.jsx(Ke,{path:"/admin/short-video",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(K_t,{})})}),s.jsx(Ke,{path:"/admin/prerender-audit",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(G_t,{})})}),s.jsx(Ke,{path:"/admin/seo-audit",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(X_t,{})})}),s.jsx(Ke,{path:"/admin/pillar-pages",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(J_t,{})})}),s.jsx(Ke,{path:"/admin/glossary",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(Z_t,{})})}),s.jsx(Ke,{path:"/admin/web3-cases",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(tCt,{})})}),s.jsx(Ke,{path:"/admin/innovation-network",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(rCt,{})})}),s.jsx(Ke,{path:"/admin/seo-overview",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(uCt,{})})}),s.jsx(Ke,{path:"/admin/sitemap",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(fCt,{})})}),s.jsx(Ke,{path:"/admin/media-gallery",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(dCt,{})})}),s.jsx(Ke,{path:"/admin/bot-logs",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(jCt,{})})}),s.jsx(Ke,{path:"/admin/chat-logs",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(_Ct,{})})}),s.jsx(Ke,{path:"/admin/user-analytics",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(ECt,{})})}),s.jsx(Ke,{path:"/admin/cron-jobs",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(xCt,{})})}),s.jsx(Ke,{path:"/admin/backups",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(vCt,{})})}),s.jsx(Ke,{path:"/admin/prompts",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(BCt,{})})}),s.jsx(Ke,{path:"/admin/seo-instructions",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(TCt,{})})}),s.jsx(Ke,{path:"/admin/email-templates",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(RCt,{})})}),s.jsx(Ke,{path:"/admin/email-logs",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(MCt,{})})}),s.jsx(Ke,{path:"/admin/video-demo",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(VCt,{})})}),s.jsx(Ke,{path:"/admin/site-analytics",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(qCt,{})})}),s.jsx(Ke,{path:"/admin/events",element:s.jsx(vr,{requireAdmin:!0,children:s.jsx(XCt,{})})}),s.jsx(Ke,{path:"/evenimente",element:s.jsx(qr,{children:s.jsx(kee,{})})}),s.jsx(Ke,{path:"/events",element:s.jsx(qr,{children:s.jsx(kee,{})})}),s.jsx(Ke,{path:"/evenimente/:slug",element:s.jsx(qr,{children:s.jsx(Bee,{})})}),s.jsx(Ke,{path:"/events/:slug",element:s.jsx(qr,{children:s.jsx(Bee,{})})}),s.jsx(Ke,{path:"/autor/:slug",element:s.jsx(sNt,{})}),s.jsx(Ke,{path:"/cele-mai-bune-exchange-crypto-romania",element:s.jsx(uNt,{})}),s.jsx(Ke,{path:"/contact",element:s.jsx(wSt,{})}),s.jsx(Ke,{path:"/podcast",element:s.jsx(CSt,{})}),s.jsx(Ke,{path:"/termeni",element:s.jsx(NSt,{})}),s.jsx(Ke,{path:"/confidentialitate",element:s.jsx(SSt,{})}),s.jsx(Ke,{path:"/ce-este",element:s.jsx(qr,{children:s.jsx(hre,{})})}),s.jsx(Ke,{path:"/what-is",element:s.jsx(qr,{children:s.jsx(hre,{})})}),s.jsx(Ke,{path:"/ce-este-web3",element:s.jsx(qr,{children:s.jsx(mte,{})})}),s.jsx(Ke,{path:"/what-is-web3",element:s.jsx(qr,{children:s.jsx(mte,{})})}),s.jsx(Ke,{path:"/ce-este-blockchain",element:s.jsx(qr,{children:s.jsx(Ate,{})})}),s.jsx(Ke,{path:"/what-is-blockchain",element:s.jsx(qr,{children:s.jsx(Ate,{})})}),s.jsx(Ke,{path:"/ce-este-crypto",element:s.jsx(qr,{children:s.jsx(xte,{})})}),s.jsx(Ke,{path:"/what-is-crypto",element:s.jsx(qr,{children:s.jsx(xte,{})})}),s.jsx(Ke,{path:"/ce-este-bitcoin",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/ce-este-ethereum",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/ce-este-solana",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/ce-este-bnb",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/ce-este-xrp",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/ce-este-cardano",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/ce-este-dogecoin",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/ce-este-polkadot",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/ce-este-avalanche",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/ce-este-chainlink",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/what-is-bitcoin",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/what-is-ethereum",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/what-is-solana",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/what-is-bnb",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/what-is-xrp",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/what-is-cardano",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/what-is-dogecoin",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/what-is-polkadot",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/what-is-avalanche",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/what-is-chainlink",element:s.jsx(qr,{children:s.jsx(ja,{})})}),s.jsx(Ke,{path:"/glosar",element:s.jsx(MSt,{})}),s.jsx(Ke,{path:"/glosar/:slug",element:s.jsx(USt,{})}),s.jsx(Ke,{path:"/knowledge-map",element:s.jsx(tPt,{})}),s.jsx(Ke,{path:"/web3-studii-de-caz",element:s.jsx(qr,{children:s.jsx(Tee,{})})}),s.jsx(Ke,{path:"/web3-studii-de-caz/:slug",element:s.jsx(qr,{children:s.jsx(Pee,{})})}),s.jsx(Ke,{path:"/web3-case-studies",element:s.jsx(qr,{children:s.jsx(Tee,{})})}),s.jsx(Ke,{path:"/web3-case-studies/:slug",element:s.jsx(qr,{children:s.jsx(Pee,{})})}),s.jsx(Ke,{path:"/despre-noi",element:s.jsx(qr,{children:s.jsx(dre,{})})}),s.jsx(Ke,{path:"/about",element:s.jsx(qr,{children:s.jsx(dre,{})})}),s.jsx(Ke,{path:"/innovation-network",element:s.jsx(iPt,{})}),s.jsx(Ke,{path:"/innovation-network/:slug",element:s.jsx(wPt,{})}),s.jsx(Ke,{path:"/ce-este-:slug",element:s.jsx(qr,{children:s.jsx(mre,{})})}),s.jsx(Ke,{path:"/what-is-:slug",element:s.jsx(qr,{children:s.jsx(mre,{})})}),s.jsx(Ke,{path:"/simulari-web3",element:s.jsx(NPt,{})}),s.jsx(Ke,{path:"/instaleaza",element:s.jsx(SPt,{})}),s.jsx(Ke,{path:"/unsubscribe",element:s.jsx(EPt,{})}),s.jsx(Ke,{path:"/:topic",element:s.jsx(h7e,{})}),s.jsx(Ke,{path:"*",element:s.jsx(Ez,{})}),s.jsx(Ke,{path:"*",element:s.jsx(Ez,{})})]})]})]})})})})});coe(document.getElementById("root")).render(s.jsx(Aoe,{children:s.jsx(vUt,{})}));export{Cm as c,bn as g};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.