vendor: 4,805 bytes, lines 1-9
1var ZN=t=>{throw TypeError(t)};var dw=(t,e,n)=>e.has(t)||ZN("Cannot "+n);var J=(t,e,n)=>(dw(t,e,"read from private field"),n?n.call(t):e.get(t)),tt=(t,e,n)=>e.has(t)?ZN("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Be=(t,e,n,r)=>(dw(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Qn=(t,e,n)=>(dw(t,e,"access private method"),n);var Hm=(t,e,n,r)=>({set _(i){Be(t,e,i,n)},get _(){return J(t,e,r)}});function xW(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Km=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ht(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rL={exports:{}},cx={},iL={exports:{}},Xe={};/** 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 km=Symbol.for("react.element"),wW=Symbol.for("react.portal"),SW=Symbol.for("react.fragment"),kW=Symbol.for("react.strict_mode"),EW=Symbol.for("react.profiler"),jW=Symbol.for("react.provider"),TW=Symbol.for("react.context"),_W=Symbol.for("react.forward_ref"),AW=Symbol.for("react.suspense"),NW=Symbol.for("react.memo"),CW=Symbol.for("react.lazy"),eC=Symbol.iterator;function OW(t){return t===null||typeof t!="object"?null:(t=eC&&t[eC]||t["@@iterator"],typeof t=="function"?t:null)}var oL={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sL=Object.assign,aL={};function Xd(t,e,n){this.props=t,this.context=e,this.refs=aL,this.updater=n||oL}Xd.prototype.isReactComponent={};Xd.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Xd.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function lL(){}lL.prototype=Xd.prototype;function xT(t,e,n){this.props=t,this.context=e,this.refs=aL,this.updater=n||oL}var wT=xT.prototype=new lL;wT.constructor=xT;sL(wT,Xd.prototype);wT.isPureReactComponent=!0;var tC=Array.isArray,cL=Object.prototype.hasOwnProperty,ST={current:null},uL={key:!0,ref:!0,__self:!0,__source:!0};function dL(t,e,n){var r,i={},o=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)cL.call(e,r)&&!uL.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:km,type:t,key:o,ref:s,props:i,_owner:ST.current}}function PW(t,e){return{$$typeof:km,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function kT(t){return typeof t=="object"&&t!==null&&t.$$typeof===km}function MW(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var nC=/\/+/g;function fw(t,e){return typeof t=="object"&&t!==null&&t.key!=null?MW(""+t.key):e.toString(36)}function iv(t,e,n,r,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var s=!1;if(t===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case km:case wW:s=!0}}if(s)return s=t,i=i(s),t=r===""?"."+fw(s,0):r,tC(i)?(n="",t!=null&&(n=t.replace(nC,"$&/")+"/"),iv(i,e,n,"",function(c){return c})):i!=null&&(kT(i)&&(i=PW(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(nC,"$&/")+"/")+t)),e.push(i)),1;if(s=0,r=r===""?".":r+":",tC(t))for(var a=0;a<t.length;a++){o=t[a];var l=r+fw(o,a);s+=iv(o,e,n,l,i)}
vendor: 4,235 bytes, lines 9-17
9else if(l=OW(t),typeof l=="function")for(t=l.call(t),a=0;!(o=t.next()).done;)o=o.value,l=r+fw(o,a++),s+=iv(o,e,n,l,i);else if(o==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return s}function Gm(t,e,n){if(t==null)return t;var r=[],i=0;return iv(t,r,"","",function(o){return e.call(n,o,i++)}),r}function RW(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var jr={current:null},ov={transition:null},IW={ReactCurrentDispatcher:jr,ReactCurrentBatchConfig:ov,ReactCurrentOwner:ST};function fL(){throw Error("act(...) is not supported in production builds of React.")}Xe.Children={map:Gm,forEach:function(t,e,n){Gm(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Gm(t,function(){e++}),e},toArray:function(t){return Gm(t,function(e){return e})||[]},only:function(t){if(!kT(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Xe.Component=Xd;Xe.Fragment=SW;Xe.Profiler=EW;Xe.PureComponent=xT;Xe.StrictMode=kW;Xe.Suspense=AW;Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=IW;Xe.act=fL;Xe.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=sL({},t.props),i=t.key,o=t.ref,s=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,s=ST.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)cL.call(e,l)&&!uL.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:km,type:t.type,key:i,ref:o,props:r,_owner:s}};Xe.createContext=function(t){return t={$$typeof:TW,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:jW,_context:t},t.Consumer=t};Xe.createElement=dL;Xe.createFactory=function(t){var e=dL.bind(null,t);return e.type=t,e};Xe.createRef=function(){return{current:null}};Xe.forwardRef=function(t){return{$$typeof:_W,render:t}};Xe.isValidElement=kT;Xe.lazy=function(t){return{$$typeof:CW,_payload:{_status:-1,_result:t},_init:RW}};Xe.memo=function(t,e){return{$$typeof:NW,type:t,compare:e===void 0?null:e}};Xe.startTransition=function(t){var e=ov.transition;ov.transition={};try{t()}finally{ov.transition=e}};Xe.unstable_act=fL;Xe.useCallback=function(t,e){return jr.current.useCallback(t,e)};Xe.useContext=function(t){return jr.current.useContext(t)};Xe.useDebugValue=function(){};Xe.useDeferredValue=function(t){return jr.current.useDeferredValue(t)};Xe.useEffect=function(t,e){return jr.current.useEffect(t,e)};Xe.useId=function(){return jr.current.useId()};Xe.useImperativeHandle=function(t,e,n){return jr.current.useImperativeHandle(t,e,n)};Xe.useInsertionEffect=function(t,e){return jr.current.useInsertionEffect(t,e)};Xe.useLayoutEffect=function(t,e){return jr.current.useLayoutEffect(t,e)};Xe.useMemo=function(t,e){return jr.current.useMemo(t,e)};Xe.useReducer=function(t,e,n){return jr.current.useReducer(t,e,n)};Xe.useRef=function(t){return jr.current.useRef(t)};Xe.useState=function(t){return jr.current.useState(t)};Xe.useSyncExternalStore=function(t,e,n){return jr.current.useSyncExternalStore(t,e,n)};Xe.useTransition=function(){return jr.current.useTransition()};Xe.version="18.3.1";iL.exports=Xe;var E=iL.exports;const A=ht(E),ET=xW({__proto__:null,default:A},[E]);/** 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 DW=E,$W=Symbol.for("react.element"),LW=Symbol.for("react.fragment"),BW=Object.prototype.hasOwnProperty,zW=DW.__SECRET_INT
vendor: 11,409 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,FW={key:!0,ref:!0,__self:!0,__source:!0};function hL(t,e,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)BW.call(e,r)&&!FW.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:$W,type:t,key:o,ref:s,props:i,_owner:zW.current}}cx.Fragment=LW;cx.jsx=hL;cx.jsxs=hL;rL.exports=cx;var u=rL.exports,pL={exports:{}},ai={},mL={exports:{}},gL={};/** 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(t){function e(R,L){var q=R.length;R.push(L);e:for(;0<q;){var G=q-1>>>1,V=R[G];if(0<i(V,L))R[G]=L,R[q]=V,q=G;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var L=R[0],q=R.pop();if(q!==L){R[0]=q;e:for(var G=0,V=R.length,Y=V>>>1;G<Y;){var pe=2*(G+1)-1,me=R[pe],Ue=pe+1,H=R[Ue];if(0>i(me,q))Ue<V&&0>i(H,me)?(R[G]=H,R[Ue]=q,G=Ue):(R[G]=me,R[pe]=q,G=pe);else if(Ue<V&&0>i(H,q))R[G]=H,R[Ue]=q,G=Ue;else break e}}return L}function i(R,L){var q=R.sortIndex-L.sortIndex;return q!==0?q:R.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(R){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=R)r(c),L.sortIndex=L.expirationTime,e(l,L);else break;L=n(c)}}function S(R){if(m=!1,x(R),!g)if(n(l)!==null)g=!0,B(w);else{var L=n(c);L!==null&&z(S,L.startTime-R)}}function w(R,L){g=!1,m&&(m=!1,y(T),T=-1),p=!0;var q=h;try{for(x(L),f=n(l);f!==null&&(!(f.expirationTime>L)||R&&!C());){var G=f.callback;if(typeof G=="function"){f.callback=null,h=f.priorityLevel;var V=G(f.expirationTime<=L);L=t.unstable_now(),typeof V=="function"?f.callback=V:f===n(l)&&r(l),x(L)}else r(l);f=n(l)}if(f!==null)var Y=!0;else{var pe=n(c);pe!==null&&z(S,pe.startTime-L),Y=!1}return Y}finally{f=null,h=q,p=!1}}var k=!1,j=null,T=-1,_=5,N=-1;function C(){return!(t.unstable_now()-N<_)}function O(){if(j!==null){var R=t.unstable_now();N=R;var L=!0;try{L=j(!0,R)}finally{L?I():(k=!1,j=null)}}else k=!1}var I;if(typeof b=="function")I=function(){b(O)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,$=P.port2;P.port1.onmessage=O,I=function(){$.postMessage(null)}}else I=function(){v(O,0)};function B(R){j=R,k||(k=!0,I())}function z(R,L){T=v(function(){R(t.unstable_now())},L)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(R){R.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,B(w))},t.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<R?Math.floor(1e3/R):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(R){switch(h){case 1:case 2:case 3:var L=3;break;default:L=h}var q=h;h=L;try{return R()}finally{h=q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(R,L){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var q=h;h=R;try{return L()}finally{h=q}},t.unstable_scheduleCallback=function(R,L,q){var G=t.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?G+q:G):q=G,R){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=q+V,R={id:d++,callback:L,priorityLevel:R,startTime:q,expirationTime:V,sortIndex:-1},q>G?(R.sortIndex=q,e(c,R),n(l)===null&&R===n(c)&&(m?(y(T),T=-1):m=!0,z(S,q-G))):(R.sortIndex=V,e(l,R),g||p||(g=!0,B(w))),R},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(R){var L=h;return function(){var q=h;h=L;try{return R.apply(this,arguments)}finally{h=q}}}})(gL);mL.exports=gL;var qW=mL.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 UW=E,oi=qW;function te(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var vL=new Set,Hh={};function Dc(t,e){sd(t,e),sd(t+"Capture",e)}function sd(t,e){for(Hh[t]=e,t=0;t<e.length;t++)vL.add(e[t])}var Os=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),PS=Object.prototype.hasOwnProperty,VW=/^[: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]*$/,rC={},iC={};function WW(t){return PS.call(iC,t)?!0:PS.call(rC,t)?!1:VW.test(t)?iC[t]=!0:(rC[t]=!0,!1)}function HW(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function KW(t,e,n,r){if(e===null||typeof e>"u"||HW(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Tr(t,e,n,r,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var Jn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Jn[t]=new Tr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Jn[e]=new Tr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Jn[t]=new Tr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Jn[t]=new Tr(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Jn[t]=new Tr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Jn[t]=new Tr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Jn[t]=new Tr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Jn[t]=new Tr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Jn[t]=new Tr(t,5,!1,t.toLowerCase(),null,!1,!1)});var jT=/[\-:]([a-z])/g;function TT(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(jT,TT);Jn[e]=new Tr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(jT,TT);Jn[e]=new Tr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(jT,TT);Jn[e]=new Tr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Jn[t]=new Tr(t,1,!1,t.toLowerCase(),null,!1,!1)});Jn.xlinkHref=new Tr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Jn[t]=new Tr(t,1,!1,t.toLowerCase(),null,!0,!0)});function _T(t,e,n,r){var i=Jn.hasOwnProperty(e)?Jn[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(KW(e,n,i,r)&&(n=null),r||i===null?WW(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Us=UW.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Jm=Symbol.for("react.element"),gu=Symbol.for("react.portal"),vu=Symbol.for("react.fragment"),AT=Symbol.for("react.strict_mode"),MS=Symbol.for("react.profiler"),yL=Symbol.for("react.provider"),bL=Symbol.for("react.context"),NT=Symbol.for("react.forward_ref"),RS=Symbol.for("react.suspense"),IS=Symbol.for("react.suspense_list"),CT=Symbol.for("react.memo"),sa=Symbol.for("react.lazy"),xL=Symbol.for("react.offscreen"),oC=Symbol.iterator;function kf(t){return t===null||typeof t!="object"?null:(t=oC&&t[oC]||t["@@iterator"],typeof t=="function"?t:null)}var zt=Object.assign,hw;function th(t){if(hw===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);hw=e&&e[1]||""}return` 34`+hw+t}var pw=!1;function mw(t,e){if(!t||pw)return"";pw=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}
vendor: 16,705 bytes, lines 34-37
34catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(` 35`),o=r.stack.split(` 36`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var l=` 37`+i[s].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{pw=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?th(t):""}function GW(t){switch(t.tag){case 5:return th(t.type);case 16:return th("Lazy");case 13:return th("Suspense");case 19:return th("SuspenseList");case 0:case 2:case 15:return t=mw(t.type,!1),t;case 11:return t=mw(t.type.render,!1),t;case 1:return t=mw(t.type,!0),t;default:return""}}function DS(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case vu:return"Fragment";case gu:return"Portal";case MS:return"Profiler";case AT:return"StrictMode";case RS:return"Suspense";case IS:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case bL:return(t.displayName||"Context")+".Consumer";case yL:return(t._context.displayName||"Context")+".Provider";case NT:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case CT:return e=t.displayName||null,e!==null?e:DS(t.type)||"Memo";case sa:e=t._payload,t=t._init;try{return DS(t(e))}catch{}}return null}function JW(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return DS(e);case 8:return e===AT?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Za(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function wL(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function YW(t){var e=wL(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ym(t){t._valueTracker||(t._valueTracker=YW(t))}function SL(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=wL(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Pv(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function $S(t,e){var n=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function sC(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Za(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function kL(t,e){e=e.checked,e!=null&&_T(t,"checked",e,!1)}function LS(t,e){kL(t,e);var n=Za(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?BS(t,e.type,n):e.hasOwnProperty("defaultValue")&&BS(t,e.type,Za(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function aC(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function BS(t,e,n){(e!=="number"||Pv(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var nh=Array.isArray;function Iu(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Za(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function zS(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(te(91));return zt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function lC(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(te(92));if(nh(n)){if(1<n.length)throw Error(te(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Za(n)}}function EL(t,e){var n=Za(e.value),r=Za(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function cC(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function jL(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function FS(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?jL(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Xm,TL=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Xm=Xm||document.createElement("div"),Xm.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Xm.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Kh(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var hh={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},XW=["Webkit","ms","Moz","O"];Object.keys(hh).forEach(function(t){XW.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),hh[e]=hh[t]})});function _L(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||hh.hasOwnProperty(t)&&hh[t]?(""+e).trim():e+"px"}function AL(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_L(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var QW=zt({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 qS(t,e){if(e){if(QW[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(te(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(te(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(te(61))}if(e.style!=null&&typeof e.style!="object")throw Error(te(62))}}function US(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var VS=null;function OT(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var WS=null,Du=null,$u=null;function uC(t){if(t=Tm(t)){if(typeof WS!="function")throw Error(te(280));var e=t.stateNode;e&&(e=px(e),WS(t.stateNode,t.type,e))}}function NL(t){Du?$u?$u.push(t):$u=[t]:Du=t}function CL(){if(Du){var t=Du,e=$u;if($u=Du=null,uC(t),e)for(t=0;t<e.length;t++)uC(e[t])}}function OL(t,e){return t(e)}function PL(){}var gw=!1;function ML(t,e,n){if(gw)return t(e,n);gw=!0;try{return OL(t,e,n)}finally{gw=!1,(Du!==null||$u!==null)&&(PL(),CL())}}function Gh(t,e){var n=t.stateNode;if(n===null)return null;var r=px(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(te(231,e,typeof n));return n}var HS=!1;if(Os)try{var Ef={};Object.defineProperty(Ef,"passive",{get:function(){HS=!0}}),window.addEventListener("test",Ef,Ef),window.removeEventListener("test",Ef,Ef)}catch{HS=!1}function ZW(t,e,n,r,i,o,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(d){this.onError(d)}}var ph=!1,Mv=null,Rv=!1,KS=null,e9={onError:function(t){ph=!0,Mv=t}};function t9(t,e,n,r,i,o,s,a,l){ph=!1,Mv=null,ZW.apply(e9,arguments)}function n9(t,e,n,r,i,o,s,a,l){if(t9.apply(this,arguments),ph){if(ph){var c=Mv;ph=!1,Mv=null}else throw Error(te(198));Rv||(Rv=!0,KS=c)}}function $c(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function RL(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function dC(t){if($c(t)!==t)throw Error(te(188))}function r9(t){var e=t.alternate;if(!e){if(e=$c(t),e===null)throw Error(te(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return dC(i),t;if(o===r)return dC(i),e;o=o.sibling}throw Error(te(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error(te(189))}}if(n.alternate!==r)throw Error(te(190))}if(n.tag!==3)throw Error(te(188));return n.stateNode.current===n?t:e}function IL(t){return t=r9(t),t!==null?DL(t):null}function DL(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=DL(t);if(e!==null)return e;t=t.sibling}return null}var $L=oi.unstable_scheduleCallback,fC=oi.unstable_cancelCallback,i9=oi.unstable_shouldYield,o9=oi.unstable_requestPaint,rn=oi.unstable_now,s9=oi.unstable_getCurrentPriorityLevel,PT=oi.unstable_ImmediatePriority,LL=oi.unstable_UserBlockingPriority,Iv=oi.unstable_NormalPriority,a9=oi.unstable_LowPriority,BL=oi.unstable_IdlePriority,ux=null,Io=null;function l9(t){if(Io&&typeof Io.onCommitFiberRoot=="function")try{Io.onCommitFiberRoot(ux,t,void 0,(t.current.flags&128)===128)}catch{}}var uo=Math.clz32?Math.clz32:d9,c9=Math.log,u9=Math.LN2;function d9(t){return t>>>=0,t===0?32:31-(c9(t)/u9|0)|0}var Qm=64,Zm=4194304;function rh(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Dv(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=rh(a):(o&=s,o!==0&&(r=rh(o)))}else s=n&~i,s!==0?r=rh(s):o!==0&&(r=rh(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-uo(e),i=1<<n,r|=t[n],e&=~i;return r}function f9(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function h9(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-uo(o),a=1<<s,l=i[s];l===-1?(!(a&n)||a&r)&&(i[s]=f9(a,e)):l<=e&&(t.expiredLanes|=a),o&=~a}}function GS(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function zL(){var t=Qm;return Qm<<=1,!(Qm&4194240)&&(Qm=64),t}function vw(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Em(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-uo(e),t[e]=n}function p9(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-uo(n),o=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~o}}function MT(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-uo(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var ft=0;function FL(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var qL,RT,UL,VL,WL,JS=!1,eg=[],Ma=null,Ra=null,Ia=null,Jh=new Map,Yh=new Map,ma=[],m9="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 hC(t,e){switch(t){case"focusin":case"focusout":Ma=null;break;case"dragenter":case"dragleave":Ra=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":Jh.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yh.delete(e.pointerId)}}function jf(t,e,n,r,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},e!==null&&(e=Tm(e),e!==null&&RT(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function g9(t,e,n,r,i){switch(e){case"focusin":return Ma=jf(Ma,t,e,n,r,i),!0;case"dragenter":return Ra=jf(Ra,t,e,n,r,i),!0;case"mouseover":return Ia=jf(Ia,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return Jh.set(o,jf(Jh.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Yh.set(o,jf(Yh.get(o)||null,t,e,n,r,i)),!0}return!1}function HL(t){var e=Fl(t.target);if(e!==null){var n=$c(e);if(n!==null){if(e=n.tag,e===13){if(e=RL(n),e!==null){t.blockedOn=e,WL(t.priority,function(){UL(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function sv(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=YS(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);VS=r,n.target.dispatchEvent(r),VS=null}else return e=Tm(n),e!==null&&RT(e),t.blockedOn=n,!1;e.shift()}return!0}function pC(t,e,n){sv(t)&&n.delete(e)}function v9(){JS=!1,Ma!==null&&sv(Ma)&&(Ma=null),Ra!==null&&sv(Ra)&&
vendor: 10,615 bytes, line 37
37(Ra=null),Ia!==null&&sv(Ia)&&(Ia=null),Jh.forEach(pC),Yh.forEach(pC)}function Tf(t,e){t.blockedOn===e&&(t.blockedOn=null,JS||(JS=!0,oi.unstable_scheduleCallback(oi.unstable_NormalPriority,v9)))}function Xh(t){function e(i){return Tf(i,t)}if(0<eg.length){Tf(eg[0],t);for(var n=1;n<eg.length;n++){var r=eg[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Ma!==null&&Tf(Ma,t),Ra!==null&&Tf(Ra,t),Ia!==null&&Tf(Ia,t),Jh.forEach(e),Yh.forEach(e),n=0;n<ma.length;n++)r=ma[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<ma.length&&(n=ma[0],n.blockedOn===null);)HL(n),n.blockedOn===null&&ma.shift()}var Lu=Us.ReactCurrentBatchConfig,$v=!0;function y9(t,e,n,r){var i=ft,o=Lu.transition;Lu.transition=null;try{ft=1,IT(t,e,n,r)}finally{ft=i,Lu.transition=o}}function b9(t,e,n,r){var i=ft,o=Lu.transition;Lu.transition=null;try{ft=4,IT(t,e,n,r)}finally{ft=i,Lu.transition=o}}function IT(t,e,n,r){if($v){var i=YS(t,e,n,r);if(i===null)_w(t,e,r,Lv,n),hC(t,r);else if(g9(i,t,e,n,r))r.stopPropagation();else if(hC(t,r),e&4&&-1<m9.indexOf(t)){for(;i!==null;){var o=Tm(i);if(o!==null&&qL(o),o=YS(t,e,n,r),o===null&&_w(t,e,r,Lv,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else _w(t,e,r,null,n)}}var Lv=null;function YS(t,e,n,r){if(Lv=null,t=OT(r),t=Fl(t),t!==null)if(e=$c(t),e===null)t=null;else if(n=e.tag,n===13){if(t=RL(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Lv=t,null}function KL(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(s9()){case PT:return 1;case LL:return 4;case Iv:case a9:return 16;case BL:return 536870912;default:return 16}default:return 16}}var ja=null,DT=null,av=null;function GL(){if(av)return av;var t,e=DT,n=e.length,r,i="value"in ja?ja.value:ja.textContent,o=i.length;for(t=0;t<n&&e[t]===i[t];t++);var s=n-t;for(r=1;r<=s&&e[n-r]===i[o-r];r++);return av=i.slice(t,1<r?1-r:void 0)}function lv(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function tg(){return!0}function mC(){return!1}function li(t){function e(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?tg:mC,this.isPropagationStopped=mC,this}return zt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=tg)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=tg)},persist:function(){},isPersistent:tg}),e}var Qd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$T=li(Qd),jm=zt({},Qd,{view:0,detail:0}),x9=li(jm),yw,bw,_f,dx=zt({},jm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:LT,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==_f&&(_f&&t.type==="mousemove"?(yw=t.screenX-_f.screenX,bw=t.screenY-_f.screenY):bw=yw=0,_f=t),yw)},movementY:function(t){return"movementY"in t?t.movementY:bw}}),gC=li(dx),w9=zt({},dx,{dataTransfer:0}),S9=li(w9),k9=zt({},jm,{relatedTarget:0}),xw=li(k9),E9=zt({},Qd,{animationName:0,elapsedTime:0,pseudoElement:0}),j9=li(E9),T9=zt({},Qd,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),_9=li(T9),A9=zt({},Qd,{data:0}),vC=li(A9),N9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},C9={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"},O9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function P9(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=O9[t])?!!e[t]:!1}function LT(){return P9}var M9=zt({},jm,{key:function(t){if(t.key){var e=N9[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=lv(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?C9[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:LT,charCode:function(t){return t.type==="keypress"?lv(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?lv(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),R9=li(M9),I9=zt({},dx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yC=li(I9),D9=zt({},jm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:LT}),$9=li(D9),L9=zt({},Qd,{propertyName:0,elapsedTime:0,pseudoElement:0}),B9=li(L9),z9=zt({},dx,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),F9=li(z9),q9=[9,13,27,32],BT=Os&&"CompositionEvent"in window,mh=null;Os&&"documentMode"in document&&(mh=document.documentMode);var U9=Os&&"TextEvent"in window&&!mh,JL=Os&&(!BT||mh&&8<mh&&11>=mh),bC=" ",xC=!1;function YL(t,e){switch(t){case"keyup":return q9.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function XL(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var yu=!1;function V9(t,e){switch(t){case"compositionend":return XL(e);case"keypress":return e.which!==32?null:(xC=!0,bC);case"textInput":return t=e.data,t===bC&&xC?null:t;default:return null}}function W9(t,e){if(yu)return t==="compositionend"||!BT&&YL(t,e)?(t=GL(),av=DT=ja=null,yu=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return JL&&e.locale!=="ko"?null:e.data;default:return null}}var H9={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 wC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!H9[t.type]:e==="textarea"}function QL(t,e,n,r){NL(r),e=Bv(e,"onChange"),0<e.length&&(n=new $T("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var gh=null,Qh=null;function K9(t){c4(t,0)}function fx(t){var e=wu(t);if(SL(e))return t}function G9(t,e){if(t==="change")return e}var ZL=!1;if(Os){var ww;if(Os){var Sw="oninput"in document;if(!Sw){var SC=document.createElement("div");SC.setAttribute("oninput","return;"),Sw=typeof SC.oninput=="function"}ww=Sw}else ww=!1;ZL=ww&&(!document.documentMode||9<document.documentMode)}function kC(){gh&&(gh.detachEvent("onpropertychange",e4),Qh=gh=null)}function e4(t){if(t.propertyName==="value"&&fx(Qh)){var e=[];QL(e,Qh,t,OT(t)),ML(K9,e)}}function J9(t,e,n){t==="focusin"?(kC(),gh=e,Qh=n,gh.attachEvent("onpropertychange",e4)):t==="focusout"&&kC()}function Y9(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return fx(Qh)}function X9(t,e){if(t==="click")return fx(e)}function Q9(t,e){if(t==="input"||t==="change")return fx(e)}function Z9(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ho=typeof Object.is=="function"?Object.is:Z9;function Zh(t,e){if(ho(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!PS.call(e,i)||!ho(t[i],e[i]))return!1}return!0}function EC(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function jC(t,e){var n=EC(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=EC(n)}}function t4(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?t4(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function n4(){for(var t=window,e=Pv();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Pv(t.document)}return e}function zT(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function eH(t){var e=n4(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&t4(n.ownerDocument.documentElement,n)){if(r!==null&&zT(n)){if
vendor: 5,074 bytes, line 37
37(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=jC(n,o);var s=jC(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var tH=Os&&"documentMode"in document&&11>=document.documentMode,bu=null,XS=null,vh=null,QS=!1;function TC(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;QS||bu==null||bu!==Pv(r)||(r=bu,"selectionStart"in r&&zT(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),vh&&Zh(vh,r)||(vh=r,r=Bv(XS,"onSelect"),0<r.length&&(e=new $T("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=bu)))}function ng(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var xu={animationend:ng("Animation","AnimationEnd"),animationiteration:ng("Animation","AnimationIteration"),animationstart:ng("Animation","AnimationStart"),transitionend:ng("Transition","TransitionEnd")},kw={},r4={};Os&&(r4=document.createElement("div").style,"AnimationEvent"in window||(delete xu.animationend.animation,delete xu.animationiteration.animation,delete xu.animationstart.animation),"TransitionEvent"in window||delete xu.transitionend.transition);function hx(t){if(kw[t])return kw[t];if(!xu[t])return t;var e=xu[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in r4)return kw[t]=e[n];return t}var i4=hx("animationend"),o4=hx("animationiteration"),s4=hx("animationstart"),a4=hx("transitionend"),l4=new Map,_C="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 al(t,e){l4.set(t,e),Dc(e,[t])}for(var Ew=0;Ew<_C.length;Ew++){var jw=_C[Ew],nH=jw.toLowerCase(),rH=jw[0].toUpperCase()+jw.slice(1);al(nH,"on"+rH)}al(i4,"onAnimationEnd");al(o4,"onAnimationIteration");al(s4,"onAnimationStart");al("dblclick","onDoubleClick");al("focusin","onFocus");al("focusout","onBlur");al(a4,"onTransitionEnd");sd("onMouseEnter",["mouseout","mouseover"]);sd("onMouseLeave",["mouseout","mouseover"]);sd("onPointerEnter",["pointerout","pointerover"]);sd("onPointerLeave",["pointerout","pointerover"]);Dc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dc("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ih="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(" "),iH=new Set("cancel close invalid load scroll toggle".split(" ").concat(ih));function AC(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,n9(r,e,void 0,t),t.currentTarget=null}function c4(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var o=void 0;if(e)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;AC(i,a,c),o=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;AC(i,a,c),o=l}}}if(Rv)throw t=KS,Rv=!1,KS=null,t}function Nt(t,e){var n=e[rk];n===void 0&&(n=e[rk]=new Set);var r=t+"__bubble";n.has(r)||(u4(e,t,2,!1),n.add(r))}function Tw(t,e,n){var r=0;e&&(r|=4),u4(n,t,r,e)}var rg="_reactListening"+Math.random().toString(36).slice(2);
vendor: 4,127 bytes, line 37
37function ep(t){if(!t[rg]){t[rg]=!0,vL.forEach(function(n){n!=="selectionchange"&&(iH.has(n)||Tw(n,!1,t),Tw(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[rg]||(e[rg]=!0,Tw("selectionchange",!1,e))}}function u4(t,e,n,r){switch(KL(e)){case 1:var i=y9;break;case 4:i=b9;break;default:i=IT}n=i.bind(null,e,n,t),i=void 0,!HS||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function _w(t,e,n,r,i){var o=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;s=s.return}for(;a!==null;){if(s=Fl(a),s===null)return;if(l=s.tag,l===5||l===6){r=o=s;continue e}a=a.parentNode}}r=r.return}ML(function(){var c=o,d=OT(n),f=[];e:{var h=l4.get(t);if(h!==void 0){var p=$T,g=t;switch(t){case"keypress":if(lv(n)===0)break e;case"keydown":case"keyup":p=R9;break;case"focusin":g="focus",p=xw;break;case"focusout":g="blur",p=xw;break;case"beforeblur":case"afterblur":p=xw;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":p=gC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=S9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=$9;break;case i4:case o4:case s4:p=j9;break;case a4:p=B9;break;case"scroll":p=x9;break;case"wheel":p=F9;break;case"copy":case"cut":case"paste":p=_9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=yC}var m=(e&4)!==0,v=!m&&t==="scroll",y=m?h!==null?h+"Capture":null:h;m=[];for(var b=c,x;b!==null;){x=b;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,y!==null&&(S=Gh(b,y),S!=null&&m.push(tp(b,S,x)))),v)break;b=b.return}0<m.length&&(h=new p(h,g,null,n,d),f.push({event:h,listeners:m}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",p=t==="mouseout"||t==="pointerout",h&&n!==VS&&(g=n.relatedTarget||n.fromElement)&&(Fl(g)||g[Ps]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=c,g=g?Fl(g):null,g!==null&&(v=$c(g),g!==v||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(m=gC,S="onMouseLeave",y="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(m=yC,S="onPointerLeave",y="onPointerEnter",b="pointer"),v=p==null?h:wu(p),x=g==null?h:wu(g),h=new m(S,b+"leave",p,n,d),h.target=v,h.relatedTarget=x,S=null,Fl(d)===c&&(m=new m(y,b+"enter",g,n,d),m.target=x,m.relatedTarget=v,S=m),v=S,p&&g)t:{for(m=p,y=g,b=0,x=m;x;x=Gc(x))b++;for(x=0,S=y;S;S=Gc(S))x++;for(;0<b-x;)m=Gc(m),b--;for(;0<x-b;)y=Gc(y),x--;for(;b--;){if(m===y||y!==null&&m===y.alternate)break t;m=Gc(m),y=Gc(y)}m=null}else m=null;p!==null&&NC(f,h,p,m,!1),g!==null&&v!==null&&NC(f,v,g,m,!0)}}e:{if(h=c?wu(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var w=G9;else if(wC(h))if(ZL)w=Q9;else{w=Y9;var k=J9}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(w=X9);if(w&&(w=w(t,c))){QL(f,w,n,d);break e}k&&k(t,h,c),t==="focusout"&&(k=h._wrapperState)&&k.controlled&&h.type==="number"&&BS(h,"number",h.value)}switch(k=c?wu(c):window,t){case"focusin":(wC(k)||k.contentEditable==="true")&&(bu=k,XS=c,vh=null);break;case"focusout":vh=XS=bu=null;break;case"mousedown":QS=!0;break;case"contextmenu":case"mouseup":case"dragend":QS=!1,TC(f,n,d);break;case"selectionchange":if(tH)break;case"keydown":case"keyup":TC(f,n,d)}var j;if(BT)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}
vendor: 4,447 bytes, lines 37-38
37else yu?YL(t,n)&&(T="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(JL&&n.locale!=="ko"&&(yu||T!=="onCompositionStart"?T==="onCompositionEnd"&&yu&&(j=GL()):(ja=d,DT="value"in ja?ja.value:ja.textContent,yu=!0)),k=Bv(c,T),0<k.length&&(T=new vC(T,t,null,n,d),f.push({event:T,listeners:k}),j?T.data=j:(j=XL(n),j!==null&&(T.data=j)))),(j=U9?V9(t,n):W9(t,n))&&(c=Bv(c,"onBeforeInput"),0<c.length&&(d=new vC("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=j))}c4(f,e)})}function tp(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Bv(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Gh(t,n),o!=null&&r.unshift(tp(t,o,i)),o=Gh(t,e),o!=null&&r.push(tp(t,o,i))),t=t.return}return r}function Gc(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function NC(t,e,n,r,i){for(var o=e._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=Gh(n,o),l!=null&&s.unshift(tp(n,l,a))):i||(l=Gh(n,o),l!=null&&s.push(tp(n,l,a)))),n=n.return}s.length!==0&&t.push({event:e,listeners:s})}var oH=/\r\n?/g,sH=/\u0000|\uFFFD/g;function CC(t){return(typeof t=="string"?t:""+t).replace(oH,` 38`).replace(sH,"")}function ig(t,e,n){if(e=CC(e),CC(t)!==e&&n)throw Error(te(425))}function zv(){}var ZS=null,ek=null;function tk(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var nk=typeof setTimeout=="function"?setTimeout:void 0,aH=typeof clearTimeout=="function"?clearTimeout:void 0,OC=typeof Promise=="function"?Promise:void 0,lH=typeof queueMicrotask=="function"?queueMicrotask:typeof OC<"u"?function(t){return OC.resolve(null).then(t).catch(cH)}:nk;function cH(t){setTimeout(function(){throw t})}function Aw(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Xh(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Xh(e)}function Da(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function PC(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Zd=Math.random().toString(36).slice(2),Co="__reactFiber$"+Zd,np="__reactProps$"+Zd,Ps="__reactContainer$"+Zd,rk="__reactEvents$"+Zd,uH="__reactListeners$"+Zd,dH="__reactHandles$"+Zd;function Fl(t){var e=t[Co];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Ps]||n[Co]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=PC(t);t!==null;){if(n=t[Co])return n;t=PC(t)}return e}t=n,n=t.parentNode}return null}function Tm(t){return t=t[Co]||t[Ps],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function wu(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(te(33))}function px(t){return t[np]||null}var ik=[],Su=-1;function ll(t){return{current:t}}function Mt(t){0>Su||(t.current=ik[Su],ik[Su]=null,Su--)}function Tt(t,e){Su++,ik[Su]=t.current,t.current=e}var el={},sr=ll(el),Br=ll(!1),yc=el;function ad(t,e){var n=t.type.contextTypes;if(!n)return el;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function zr(t){return t=t.childContextTypes,t!=null}function Fv(){Mt(Br),Mt(sr)}function MC(t,e,n){if(sr.current!==el)throw Error(te(168));Tt(sr,e),Tt(Br,n)}function d4(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(te(108,JW(t)||"Unknown",i));return zt({},n,r)}function qv(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||el,yc=sr.current,Tt(sr,t),Tt(Br,Br.current),!0}function RC(t,e,n){var r=t.stateNode;if(!r)throw Error(te(169));n?(t=d4(t,e,yc),r.__reactInternalMemoizedMergedChildContext=t,Mt(Br),Mt(sr),Tt(sr,t)):Mt(Br),Tt(Br,n)}var hs=null,mx=!1,Nw=!1;function f4(t){hs===null?hs=[t]:hs.push(t)}function fH(t){mx=!0,f4(t)}
vendor: 25,092 bytes, lines 38-40
38function cl(){if(!Nw&&hs!==null){Nw=!0;var t=0,e=ft;try{var n=hs;for(ft=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}hs=null,mx=!1}catch(i){throw hs!==null&&(hs=hs.slice(t+1)),$L(PT,cl),i}finally{ft=e,Nw=!1}}return null}var ku=[],Eu=0,Uv=null,Vv=0,Ei=[],ji=0,bc=null,gs=1,vs="";function Ol(t,e){ku[Eu++]=Vv,ku[Eu++]=Uv,Uv=t,Vv=e}function h4(t,e,n){Ei[ji++]=gs,Ei[ji++]=vs,Ei[ji++]=bc,bc=t;var r=gs;t=vs;var i=32-uo(r)-1;r&=~(1<<i),n+=1;var o=32-uo(e)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,gs=1<<32-uo(e)+i|n<<i|r,vs=o+t}else gs=1<<o|n<<i|r,vs=t}function FT(t){t.return!==null&&(Ol(t,1),h4(t,1,0))}function qT(t){for(;t===Uv;)Uv=ku[--Eu],ku[Eu]=null,Vv=ku[--Eu],ku[Eu]=null;for(;t===bc;)bc=Ei[--ji],Ei[ji]=null,vs=Ei[--ji],Ei[ji]=null,gs=Ei[--ji],Ei[ji]=null}var ni=null,ti=null,It=!1,io=null;function p4(t,e){var n=Ai(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function IC(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,ni=t,ti=Da(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,ni=t,ti=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=bc!==null?{id:gs,overflow:vs}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Ai(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,ni=t,ti=null,!0):!1;default:return!1}}function ok(t){return(t.mode&1)!==0&&(t.flags&128)===0}function sk(t){if(It){var e=ti;if(e){var n=e;if(!IC(t,e)){if(ok(t))throw Error(te(418));e=Da(n.nextSibling);var r=ni;e&&IC(t,e)?p4(r,n):(t.flags=t.flags&-4097|2,It=!1,ni=t)}}else{if(ok(t))throw Error(te(418));t.flags=t.flags&-4097|2,It=!1,ni=t}}}function DC(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;ni=t}function og(t){if(t!==ni)return!1;if(!It)return DC(t),It=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!tk(t.type,t.memoizedProps)),e&&(e=ti)){if(ok(t))throw m4(),Error(te(418));for(;e;)p4(t,e),e=Da(e.nextSibling)}if(DC(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(te(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){ti=Da(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}ti=null}}else ti=ni?Da(t.stateNode.nextSibling):null;return!0}function m4(){for(var t=ti;t;)t=Da(t.nextSibling)}function ld(){ti=ni=null,It=!1}function UT(t){io===null?io=[t]:io.push(t)}var hH=Us.ReactCurrentBatchConfig;function Af(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(te(309));var r=n.stateNode}if(!r)throw Error(te(147,t));var i=r,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(s){var a=i.refs;s===null?delete a[o]:a[o]=s},e._stringRef=o,e)}if(typeof t!="string")throw Error(te(284));if(!n._owner)throw Error(te(290,t))}return t}function sg(t,e){throw t=Object.prototype.toString.call(e),Error(te(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function $C(t){var e=t._init;return e(t._payload)}function g4(t){function e(y,b){if(t){var x=y.deletions;x===null?(y.deletions=[b],y.flags|=16):x.push(b)}}function n(y,b){if(!t)return null;for(;b!==null;)e(y,b),b=b.sibling;return null}function r(y,b){for(y=new Map;b!==null;)b.key!==null?y.set(b.key,b):y.set(b.index,b),b=b.sibling;return y}function i(y,b){return y=za(y,b),y.index=0,y.sibling=null,y}function o(y,b,x){return y.index=x,t?(x=y.alternate,x!==null?(x=x.index,x<b?(y.flags|=2,b):x):(y.flags|=2,b)):(y.flags|=1048576,b)}function s(y){return t&&y.alternate===null&&(y.flags|=2),y}function a(y,b,x,S){return b===null||b.tag!==6?(b=Dw(x,y.mode,S),b.return=y,b):(b=i(b,x),b.return=y,b)}function l(y,b,x,S){var w=x.type;return w===vu?d(y,b,x.props.children,S,x.key):b!==null&&(b.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===sa&&$C(w)===b.type)?(S=i(b,x.props),S.ref=Af(y,b,x),S.return=y,S):(S=mv(x.type,x.key,x.props,null,y.mode,S),S.ref=Af(y,b,x),S.return=y,S)}function c(y,b,x,S){return b===null||b.tag!==4||b.stateNode.containerInfo!==x.containerInfo||b.stateNode.implementation!==x.implementation?(b=$w(x,y.mode,S),b.return=y,b):(b=i(b,x.children||[]),b.return=y,b)}function d(y,b,x,S,w){return b===null||b.tag!==7?(b=ac(x,y.mode,S,w),b.return=y,b):(b=i(b,x),b.return=y,b)}function f(y,b,x){if(typeof b=="string"&&b!==""||typeof b=="number")return b=Dw(""+b,y.mode,x),b.return=y,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Jm:return x=mv(b.type,b.key,b.props,null,y.mode,x),x.ref=Af(y,null,b),x.return=y,x;case gu:return b=$w(b,y.mode,x),b.return=y,b;case sa:var S=b._init;return f(y,S(b._payload),x)}if(nh(b)||kf(b))return b=ac(b,y.mode,x,null),b.return=y,b;sg(y,b)}return null}function h(y,b,x,S){var w=b!==null?b.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return w!==null?null:a(y,b,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Jm:return x.key===w?l(y,b,x,S):null;case gu:return x.key===w?c(y,b,x,S):null;case sa:return w=x._init,h(y,b,w(x._payload),S)}if(nh(x)||kf(x))return w!==null?null:d(y,b,x,S,null);sg(y,x)}return null}function p(y,b,x,S,w){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(x)||null,a(b,y,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Jm:return y=y.get(S.key===null?x:S.key)||null,l(b,y,S,w);case gu:return y=y.get(S.key===null?x:S.key)||null,c(b,y,S,w);case sa:var k=S._init;return p(y,b,x,k(S._payload),w)}if(nh(S)||kf(S))return y=y.get(x)||null,d(b,y,S,w,null);sg(b,S)}return null}function g(y,b,x,S){for(var w=null,k=null,j=b,T=b=0,_=null;j!==null&&T<x.length;T++){j.index>T?(_=j,j=null):_=j.sibling;var N=h(y,j,x[T],S);if(N===null){j===null&&(j=_);break}t&&j&&N.alternate===null&&e(y,j),b=o(N,b,T),k===null?w=N:k.sibling=N,k=N,j=_}if(T===x.length)return n(y,j),It&&Ol(y,T),w;if(j===null){for(;T<x.length;T++)j=f(y,x[T],S),j!==null&&(b=o(j,b,T),k===null?w=j:k.sibling=j,k=j);return It&&Ol(y,T),w}for(j=r(y,j);T<x.length;T++)_=p(j,y,T,x[T],S),_!==null&&(t&&_.alternate!==null&&j.delete(_.key===null?T:_.key),b=o(_,b,T),k===null?w=_:k.sibling=_,k=_);return t&&j.forEach(function(C){return e(y,C)}),It&&Ol(y,T),w}function m(y,b,x,S){var w=kf(x);if(typeof w!="function")throw Error(te(150));if(x=w.call(x),x==null)throw Error(te(151));for(var k=w=null,j=b,T=b=0,_=null,N=x.next();j!==null&&!N.done;T++,N=x.next()){j.index>T?(_=j,j=null):_=j.sibling;var C=h(y,j,N.value,S);if(C===null){j===null&&(j=_);break}t&&j&&C.alternate===null&&e(y,j),b=o(C,b,T),k===null?w=C:k.sibling=C,k=C,j=_}if(N.done)return n(y,j),It&&Ol(y,T),w;if(j===null){for(;!N.done;T++,N=x.next())N=f(y,N.value,S),N!==null&&(b=o(N,b,T),k===null?w=N:k.sibling=N,k=N);return It&&Ol(y,T),w}for(j=r(y,j);!N.done;T++,N=x.next())N=p(j,y,T,N.value,S),N!==null&&(t&&N.alternate!==null&&j.delete(N.key===null?T:N.key),b=o(N,b,T),k===null?w=N:k.sibling=N,k=N);return t&&j.forEach(function(O){return e(y,O)}),It&&Ol(y,T),w}function v(y,b,x,S){if(typeof x=="object"&&x!==null&&x.type===vu&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Jm:e:{for(var w=x.key,k=b;k!==null;){if(k.key===w){if(w=x.type,w===vu){if(k.tag===7){n(y,k.sibling),b=i(k,x.props.children),b.return=y,y=b;break e}}else if(k.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===sa&&$C(w)===k.type){n(y,k.sibling),b=i(k,x.props),b.ref=Af(y,k,x),b.return=y,y=b;break e}n(y,k);break}else e(y,k);k=k.sibling}x.type===vu?(b=ac(x.props.children,y.mode,S,x.key),b.return=y,y=b):(S=mv(x.type,x.key,x.props,null,y.mode,S),S.ref=Af(y,b,x),S.return=y,y=S)}return s(y);case gu:e:{for(k=x.key;b!==null;){if(b.key===k)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(y,b.sibling),b=i(b,x.children||[]),b.return=y,y=b;break e}else{n(y,b);break}else e(y,b);b=b.sibling}b=$w(x,y.mode,S),b.return=y,y=b}return s(y);case sa:return k=x._init,v(y,b,k(x._payload),S)}if(nh(x))return g(y,b,x,S);if(kf(x))return m(y,b,x,S);sg(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(y,b.sibling),b=i(b,x),b.return=y,y=b):(n(y,b),b=Dw(x,y.mode,S),b.return=y,y=b),s(y)):n(y,b)}return v}var cd=g4(!0),v4=g4(!1),Wv=ll(null),Hv=null,ju=null,VT=null;function WT(){VT=ju=Hv=null}function HT(t){var e=Wv.current;Mt(Wv),t._currentValue=e}function ak(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Bu(t,e){Hv=t,VT=ju=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&($r=!0),t.firstContext=null)}function Ii(t){var e=t._currentValue;if(VT!==t)if(t={context:t,memoizedValue:e,next:null},ju===null){if(Hv===null)throw Error(te(308));ju=t,Hv.dependencies={lanes:0,firstContext:t}}else ju=ju.next=t;return e}var ql=null;function KT(t){ql===null?ql=[t]:ql.push(t)}function y4(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,KT(e)):(n.next=i.next,i.next=n),e.interleaved=n,Ms(t,r)}function Ms(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var aa=!1;function GT(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function b4(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function ws(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function $a(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Qe&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Ms(t,n)}return i=r.interleaved,i===null?(e.next=e,KT(r)):(e.next=i.next,i.next=e),r.interleaved=e,Ms(t,n)}function cv(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,MT(t,n)}}function LC(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Kv(t,e,n,r){var i=t.updateQueue;aa=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var d=t.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,d=c=l=null,a=o;do{var h=a.lane,p=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=t,m=a;switch(h=e,p=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){f=g.call(p,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(p,f,h):g,h==null)break e;f=zt({},f,h);break e;case 2:aa=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=p,l=f):d=d.next=p,s|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,e=i.shared.interleaved,e!==null){i=e;do s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);wc|=s,t.lanes=s,t.memoizedState=f}}function BC(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(te(191,i));i.call(r)}}}var _m={},Do=ll(_m),rp=ll(_m),ip=ll(_m);function Ul(t){if(t===_m)throw Error(te(174));return t}function JT(t,e){switch(Tt(ip,e),Tt(rp,t),Tt(Do,_m),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:FS(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=FS(e,t)}Mt(Do),Tt(Do,e)}function ud(){Mt(Do),Mt(rp),Mt(ip)}function x4(t){Ul(ip.current);var e=Ul(Do.current),n=FS(e,t.type);e!==n&&(Tt(rp,t),Tt(Do,n))}function YT(t){rp.current===t&&(Mt(Do),Mt(rp))}var $t=ll(0);function Gv(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Cw=[];function XT(){for(var t=0;t<Cw.length;t++)Cw[t]._workInProgressVersionPrimary=null;Cw.length=0}var uv=Us.ReactCurrentDispatcher,Ow=Us.ReactCurrentBatchConfig,xc=0,Bt=null,En=null,On=null,Jv=!1,yh=!1,op=0,pH=0;function Zn(){throw Error(te(321))}function QT(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!ho(t[n],e[n]))return!1;return!0}function ZT(t,e,n,r,i,o){if(xc=o,Bt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,uv.current=t===null||t.memoizedState===null?yH:bH,t=n(r,i),yh){o=0;do{if(yh=!1,op=0,25<=o)throw Error(te(301));o+=1,On=En=null,e.updateQueue=null,uv.current=xH,t=n(r,i)}while(yh)}if(uv.current=Yv,e=En!==null&&En.next!==null,xc=0,On=En=Bt=null,Jv=!1,e)throw Error(te(300));return t}function e_(){var t=op!==0;return op=0,t}function ko(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return On===null?Bt.memoizedState=On=t:On=On.next=t,On}function Di(){if(En===null){var t=Bt.alternate;t=t!==null?t.memoizedState:null}else t=En.next;var e=On===null?Bt.memoizedState:On.next;if(e!==null)On=e,En=t;else{if(t===null)throw Error(te(310));En=t,t={memoizedState:En.memoizedState,baseState:En.baseState,baseQueue:En.baseQueue,queue:En.queue,next:null},On===null?Bt.memoizedState=On=t:On=On.next=t}return On}function sp(t,e){return typeof e=="function"?e(t):e}function Pw(t){var e=Di(),n=e.queue;if(n===null)throw Error(te(311));n.lastRenderedReducer=t;var r=En,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=s=null,l=null,c=o;do{var d=c.lane;if((xc&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,s=r):l=l.next=f,Bt.lanes|=d,wc|=d}c=c.next}while(c!==null&&c!==o);l===null?s=r:l.next=a,ho(r,e.memoizedState)||($r=!0),e.memoizedState=r,e.baseState=s,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do o=i.lane,Bt.lanes|=o,wc|=o,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Mw(t){var e=Di(),n=e.queue;if(n===null)throw Error(te(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=t(o,s.action),s=s.next;while(s!==i);ho(o,e.memoizedState)||($r=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function w4(){}function S4(t,e){var n=Bt,r=Di(),i=e(),o=!ho(r.memoizedState,i);if(o&&(r.memoizedState=i,$r=!0),r=r.queue,t_(j4.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||On!==null&&On.memoizedState.tag&1){if(n.flags|=2048,ap(9,E4.bind(null,n,r,i,e),void 0,null),Mn===null)throw Error(te(349));xc&30||k4(n,e,i)}return i}function k4(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Bt.updateQueue,e===null?(e={lastEffect:null,stores:null},Bt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function E4(t,e,n,r){e.value=n,e.getSnapshot=r,T4(e)&&_4(t)}function j4(t,e,n){return n(function(){T4(e)&&_4(t)})}function T4(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!ho(t,n)}catch{return!0}}function _4(t){var e=Ms(t,1);e!==null&&fo(e,t,1,-1)}function zC(t){var e=ko();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:sp,lastRenderedState:t},e.queue=t,t=t.dispatch=vH.bind(null,Bt,t),[e.memoizedState,t]}function ap(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Bt.updateQueue,e===null?(e={lastEffect:null,stores:null},Bt.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function A4(){return Di().memoizedState}function dv(t,e,n,r){var i=ko();Bt.flags|=t,i.memoizedState=ap(1|e,n,void 0,r===void 0?null:r)}function gx(t,e,n,r){var i=Di();r=r===void 0?null:r;var o=void 0;if(En!==null){var s=En.memoizedState;if(o=s.destroy,r!==null&&QT(r,s.deps)){i.memoizedState=ap(e,n,o,r);return}}Bt.flags|=t,i.memoizedState=ap(1|e,n,o,r)}function FC(t,e){return dv(8390656,8,t,e)}function t_(t,e){return gx(2048,8,t,e)}function N4(t,e){return gx(4,2,t,e)}function C4(t,e){return gx(4,4,t,e)}function O4(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function P4(t,e,n){return n=n!=null?n.concat([t]):null,gx(4,4,O4.bind(null,e,t),n)}function n_(){}function M4(t,e){var n=Di();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&QT(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function R4(t,e){var n=Di();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&QT(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function I4(t,e,n){return xc&21?(ho(n,e)||(n=zL(),Bt.lanes|=n,wc|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,$r=!0),t.memoizedState=n)}function mH(t,e){var n=ft;ft=n!==0&&4>n?n:4,t(!0);var r=Ow.transition;Ow.transition={};try{t(!1),e()}finally{ft=n,Ow.transition=r}}function D4(){return Di().memoizedState}function gH(t,e,n){var r=Ba(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$4(t))L4(e,n);else if(n=y4(t,e,n,r),n!==null){var i=br();fo(n,t,r,i),B4(n,e,r)}}function vH(t,e,n){var r=Ba(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($4(t))L4(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,ho(a,s)){var l=e.interleaved;l===null?(i.next=i,KT(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=y4(t,e,i,r),n!==null&&(i=br(),fo(n,t,r,i),B4(n,e,r))}}function $4(t){var e=t.alternate;return t===Bt||e!==null&&e===Bt}function L4(t,e){yh=Jv=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function B4(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,MT(t,n)}}var Yv={readContext:Ii,useCallback:Zn,useContext:Zn,useEffect:Zn,useImperativeHandle:Zn,useInsertionEffect:Zn,useLayoutEffect:Zn,useMemo:Zn,useReducer:Zn,useRef:Zn,useState:Zn,useDebugValue:Zn,useDeferredValue:Zn,useTransition:Zn,useMutableSource:Zn,useSyncExternalStore:Zn,useId:Zn,unstable_isNewReconciler:!1},yH={readContext:Ii,useCallback:function(t,e){return ko().memoizedState=[t,e===void 0?null:e],t},useContext:Ii,useEffect:FC,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,dv(4194308,4,O4.bind(null,e,t),n)},useLayoutEffect:function(t,e){return dv(4194308,4,t,e)},useInsertionEffect:function(t,e){return dv(4,2,t,e)},useMemo:function(t,e){var n=ko();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=ko();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=gH.bind(null,Bt,t),[r.memoizedState,t]},useRef:function(t){var e=ko();return t={current:t},e.memoizedState=t},useState:zC,useDebugValue:n_,useDeferredValue:function(t){return ko().memoizedState=t},useTransition:function(){var t=zC(!1),e=t[0];return t=mH.bind(null,t[1]),ko().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Bt,i=ko();if(It){if(n===void 0)throw Error(te(407));n=n()}else{if(n=e(),Mn===null)throw Error(te(349));xc&30||k4(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,FC(j4.bind(null,r,o,t),[t]),r.flags|=2048,ap(9,E4.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=ko(),e=Mn.identifierPrefix;if(It){var n=vs,r=gs;n=(r&~(1<<32-uo(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=op++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=pH++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},bH={readContext:Ii,useCallback:M4,useContext:Ii,useEffect:t_,useImperativeHandle:P4,useInsertionEffect:N4,useLayoutEffect:C4,useMemo:R4,useReducer:Pw,useRef:A4,useState:function(){return Pw(sp)},useDebugValue:n_,useDeferredValue:function(t){var e=Di();return I4(e,En.memoizedState,t)},useTransition:function(){var t=Pw(sp)[0],e=Di().memoizedState;return[t,e]},useMutableSource:w4,useSyncExternalStore:S4,useId:D4,unstable_isNewReconciler:!1},xH={readContext:Ii,useCallback:M4,useContext:Ii,useEffect:t_,useImperativeHandle:P4,useInsertionEffect:N4,useLayoutEffect:C4,useMemo:R4,useReducer:Mw,useRef:A4,useState:function(){return Mw(sp)},useDebugValue:n_,useDeferredValue:function(t){var e=Di();return En===null?e.memoizedState=t:I4(e,En.memoizedState,t)},useTransition:function(){var t=Mw(sp)[0],e=Di().memoizedState;return[t,e]},useMutableSource:w4,useSyncExternalStore:S4,useId:D4,unstable_isNewReconciler:!1};function Ki(t,e){if(t&&t.defaultProps){e=zt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function lk(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:zt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var vx={isMounted:function(t){return(t=t._reactInternals)?$c(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=br(),i=Ba(t),o=ws(r,i);o.payload=e,n!=null&&(o.callback=n),e=$a(t,o,i),e!==null&&(fo(e,t,i,r),cv(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=br(),i=Ba(t),o=ws(r,i);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=$a(t,o,i),e!==null&&(fo(e,t,i,r),cv(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=br(),r=Ba(t),i=ws(n,r);i.tag=2,e!=null&&(i.callback=e),e=$a(t,i,r),e!==null&&(fo(e,t,r,n),cv(e,t,r))}};function qC(t,e,n,r,i,o,s){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,o,s):e.prototype&&e.prototype.isPureReactComponent?!Zh(n,r)||!Zh(i,o):!0}function z4(t,e,n){var r=!1,i=el,o=e.contextType;return typeof o=="object"&&o!==null?o=Ii(o):(i=zr(e)?yc:sr.current,r=e.contextTypes,o=(r=r!=null)?ad(t,i):el),e=new e(n,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=vx,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function UC(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&vx.enqueueReplaceState(e,e.state,null)}function ck(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},GT(t);var o=e.contextType;typeof o=="object"&&o!==null?i.context=Ii(o):(o=zr(e)?yc:sr.current,i.context=ad(t,o)),i.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(lk(t,e,o,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&vx.enqueueReplaceState(i,i.state,null),Kv(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function dd(t,e){try{var n="",r=e;do n+=GW(r),r=r.return;while(r);var i=n}catch(o){i=` 39Error generating stack: `+o.message+` 40`+o.stack}return{value:t,source:e,stack:i,digest:null}}function Rw(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function uk(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var wH=typeof WeakMap=="function"?WeakMap:Map;
vendor: 8,043 bytes, line 40
40function F4(t,e,n){n=ws(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Qv||(Qv=!0,xk=r),uk(t,e)},n}function q4(t,e,n){n=ws(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){uk(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){uk(t,e),typeof r!="function"&&(La===null?La=new Set([this]):La.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function VC(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new wH;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=IH.bind(null,t,e,n),e.then(t,t))}function WC(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function HC(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=ws(-1,1),e.tag=2,$a(n,e,1))),n.lanes|=1),t)}var SH=Us.ReactCurrentOwner,$r=!1;function fr(t,e,n,r){e.child=t===null?v4(e,null,n,r):cd(e,t.child,n,r)}function KC(t,e,n,r,i){n=n.render;var o=e.ref;return Bu(e,i),r=ZT(t,e,n,r,o,i),n=e_(),t!==null&&!$r?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Rs(t,e,i)):(It&&n&&FT(e),e.flags|=1,fr(t,e,r,i),e.child)}function GC(t,e,n,r,i){if(t===null){var o=n.type;return typeof o=="function"&&!u_(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,U4(t,e,o,r,i)):(t=mv(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Zh,n(s,r)&&t.ref===e.ref)return Rs(t,e,i)}return e.flags|=1,t=za(o,r),t.ref=e.ref,t.return=e,e.child=t}function U4(t,e,n,r,i){if(t!==null){var o=t.memoizedProps;if(Zh(o,r)&&t.ref===e.ref)if($r=!1,e.pendingProps=r=o,(t.lanes&i)!==0)t.flags&131072&&($r=!0);else return e.lanes=t.lanes,Rs(t,e,i)}return dk(t,e,n,r,i)}function V4(t,e,n){var r=e.pendingProps,i=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tt(_u,Gr),Gr|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Tt(_u,Gr),Gr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Tt(_u,Gr),Gr|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,Tt(_u,Gr),Gr|=r;return fr(t,e,i,n),e.child}function W4(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function dk(t,e,n,r,i){var o=zr(n)?yc:sr.current;return o=ad(e,o),Bu(e,i),n=ZT(t,e,n,r,o,i),r=e_(),t!==null&&!$r?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Rs(t,e,i)):(It&&r&&FT(e),e.flags|=1,fr(t,e,n,i),e.child)}function JC(t,e,n,r,i){if(zr(n)){var o=!0;qv(e)}else o=!1;if(Bu(e,i),e.stateNode===null)fv(t,e),z4(e,n,r),ck(e,n,r,i),r=!0;else if(t===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ii(c):(c=zr(n)?yc:sr.current,c=ad(e,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&UC(e,s,r,c),aa=!1;var h=e.memoizedState;s.state=h,Kv(e,r,s,i),l=e.memoizedState,a!==r||h!==l||Br.current||aa?(typeof d=="function"&&(lk(e,n,d,r),l=e.memoizedState),(a=aa||qC(e,n,a,r,h,l,c))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,b4(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Ki(e.type,a),s.props=c,f=e.pendingProps,h=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ii(l):(l=zr(n)?yc:sr.current,l=ad(e,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||h!==l)&&UC(e,s,r,l),aa=!1,h=e.memoizedState,s.state=h,Kv(e,r,s,i);var g=e.memoizedState;a!==f||h!==g||Br.current||aa?(typeof p=="function"&&(lk(e,n,p,r),g=e.memoizedState),(c=aa||qC(e,n,c,r,h,g,l)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,l)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),s.props=r,s.state=g,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return fk(t,e,n,r,o,i)}function fk(t,e,n,r,i,o){W4(t,e);var s=(e.flags&128)!==0;if(!r&&!s)return i&&RC(e,n,!1),Rs(t,e,o);r=e.stateNode,SH.current=e;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&s?(e.child=cd(e,t.child,null,o),e.child=cd(e,null,a,o)):fr(t,e,a,o),e.memoizedState=r.state,i&&RC(e,n,!0),e.child}function H4(t){var e=t.stateNode;e.pendingContext?MC(t,e.pendingContext,e.pendingContext!==e.context):e.context&&MC(t,e.context,!1),JT(t,e.containerInfo)}function YC(t,e,n,r,i){return ld(),UT(i),e.flags|=256,fr(t,e,n,r),e.child}var hk={dehydrated:null,treeContext:null,retryLane:0};function pk(t){return{baseLanes:t,cachePool:null,transitions:null}}function K4(t,e,n){var r=e.pendingProps,i=$t.current,o=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Tt($t,i&1),t===null)return sk(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=r.children,t=r.fallback,o?(r=e.mode,o=e.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=xx(s,r,0,null),t=ac(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=pk(n),e.memoizedState=hk,t):r_(e,s));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return kH(t,e,s,r,a,i,n);if(o){o=r.fallback,s=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=za(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=za(a,o):(o=ac(o,s,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,s=t.child.memoizedState,s=s===null?pk(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=hk,r}return o=t.child,t=o.sibling,r=za(o,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function r_(t,e){return e=xx({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function ag(t,e,n,r){return r!==null&&UT(r),cd(e,t.child,null,n),t=r_(e,e.pen
vendor: 6,391 bytes, line 40
40dingProps.children),t.flags|=2,e.memoizedState=null,t}function kH(t,e,n,r,i,o,s){if(n)return e.flags&256?(e.flags&=-257,r=Rw(Error(te(422))),ag(t,e,s,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=xx({mode:"visible",children:r.children},i,0,null),o=ac(o,i,s,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&cd(e,t.child,null,s),e.child.memoizedState=pk(s),e.memoizedState=hk,o);if(!(e.mode&1))return ag(t,e,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(te(419)),r=Rw(o,r,void 0),ag(t,e,s,r)}if(a=(s&t.childLanes)!==0,$r||a){if(r=Mn,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Ms(t,i),fo(r,t,i,-1))}return c_(),r=Rw(Error(te(421))),ag(t,e,s,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=DH.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,ti=Da(i.nextSibling),ni=e,It=!0,io=null,t!==null&&(Ei[ji++]=gs,Ei[ji++]=vs,Ei[ji++]=bc,gs=t.id,vs=t.overflow,bc=e),e=r_(e,r.children),e.flags|=4096,e)}function XC(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),ak(t.return,e,n)}function Iw(t,e,n,r,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function G4(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(fr(t,e,r.children,n),r=$t.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&XC(t,n,e);else if(t.tag===19)XC(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Tt($t,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Gv(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Iw(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Gv(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Iw(e,!0,n,null,o);break;case"together":Iw(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function fv(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Rs(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),wc|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(te(153));if(e.child!==null){for(t=e.child,n=za(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=za(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function EH(t,e,n){switch(e.tag){case 3:H4(e),ld();break;case 5:x4(e);break;case 1:zr(e.type)&&qv(e);break;case 4:JT(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Tt(Wv,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Tt($t,$t.current&1),e.flags|=128,null):n&e.child.childLanes?K4(t,e,n):(Tt($t,$t.current&1),t=Rs(t,e,n),t!==null?t.sibling:null);Tt($t,$t.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return G4(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Tt($t,$t.current),r)break;return null;case 22:case 23:return e.lanes=0,V4(t,e,n)}return Rs(t,e,n)}var J4,mk,Y4,X4;J4=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};mk=function(){};Y4=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Ul(Do.current);var o=null;switch(n){case"input":i=$S(t,i),r=$S(t,r),o=[];break;case"select":i=zt({},i,{value:void 0}),r=zt({},r,{value:void 0}),o=[];break;case"textarea":i=zS(t,i),r=zS(t,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=zv)}qS(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Hh.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Hh.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Nt("scroll",t),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(e.updateQueue=c)&&(e.flags|=4)}};X4=function(t,e,n,r){n!==r&&(e.flags|=4)};function Nf(t,e){if(!It)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function er(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function jH(t,e,n){var r=e.pendingProps;
vendor: 31,509 bytes, line 40
40switch(qT(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(e),null;case 1:return zr(e.type)&&Fv(),er(e),null;case 3:return r=e.stateNode,ud(),Mt(Br),Mt(sr),XT(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(og(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,io!==null&&(kk(io),io=null))),mk(t,e),er(e),null;case 5:YT(e);var i=Ul(ip.current);if(n=e.type,t!==null&&e.stateNode!=null)Y4(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(te(166));return er(e),null}if(t=Ul(Do.current),og(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[Co]=e,r[np]=o,t=(e.mode&1)!==0,n){case"dialog":Nt("cancel",r),Nt("close",r);break;case"iframe":case"object":case"embed":Nt("load",r);break;case"video":case"audio":for(i=0;i<ih.length;i++)Nt(ih[i],r);break;case"source":Nt("error",r);break;case"img":case"image":case"link":Nt("error",r),Nt("load",r);break;case"details":Nt("toggle",r);break;case"input":sC(r,o),Nt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Nt("invalid",r);break;case"textarea":lC(r,o),Nt("invalid",r)}qS(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&ig(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&ig(r.textContent,a,t),i=["children",""+a]):Hh.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Nt("scroll",r)}switch(n){case"input":Ym(r),aC(r,o,!0);break;case"textarea":Ym(r),cC(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=zv)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=jL(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=s.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[Co]=e,t[np]=r,J4(t,e,!1,!1),e.stateNode=t;e:{switch(s=US(n,r),n){case"dialog":Nt("cancel",t),Nt("close",t),i=r;break;case"iframe":case"object":case"embed":Nt("load",t),i=r;break;case"video":case"audio":for(i=0;i<ih.length;i++)Nt(ih[i],t);i=r;break;case"source":Nt("error",t),i=r;break;case"img":case"image":case"link":Nt("error",t),Nt("load",t),i=r;break;case"details":Nt("toggle",t),i=r;break;case"input":sC(t,r),i=$S(t,r),Nt("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=zt({},r,{value:void 0}),Nt("invalid",t);break;case"textarea":lC(t,r),i=zS(t,r),Nt("invalid",t);break;default:i=r}qS(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?AL(t,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&TL(t,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Kh(t,l):typeof l=="number"&&Kh(t,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Hh.hasOwnProperty(o)?l!=null&&o==="onScroll"&&Nt("scroll",t):l!=null&&_T(t,o,l,s))}switch(n){case"input":Ym(t),aC(t,r,!1);break;case"textarea":Ym(t),cC(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Za(r.value));break;case"select":t.multiple=!!r.multiple,o=r.value,o!=null?Iu(t,!!r.multiple,o,!1):r.defaultValue!=null&&Iu(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=zv)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return er(e),null;case 6:if(t&&e.stateNode!=null)X4(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(te(166));if(n=Ul(ip.current),Ul(Do.current),og(e)){if(r=e.stateNode,n=e.memoizedProps,r[Co]=e,(o=r.nodeValue!==n)&&(t=ni,t!==null))switch(t.tag){case 3:ig(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ig(r.nodeValue,n,(t.mode&1)!==0)}o&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Co]=e,e.stateNode=r}return er(e),null;case 13:if(Mt($t),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(It&&ti!==null&&e.mode&1&&!(e.flags&128))m4(),ld(),e.flags|=98560,o=!1;else if(o=og(e),r!==null&&r.dehydrated!==null){if(t===null){if(!o)throw Error(te(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(te(317));o[Co]=e}else ld(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;er(e),o=!1}else io!==null&&(kk(io),io=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||$t.current&1?jn===0&&(jn=3):c_())),e.updateQueue!==null&&(e.flags|=4),er(e),null);case 4:return ud(),mk(t,e),t===null&&ep(e.stateNode.containerInfo),er(e),null;case 10:return HT(e.type._context),er(e),null;case 17:return zr(e.type)&&Fv(),er(e),null;case 19:if(Mt($t),o=e.memoizedState,o===null)return er(e),null;if(r=(e.flags&128)!==0,s=o.rendering,s===null)if(r)Nf(o,!1);else{if(jn!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(s=Gv(t),s!==null){for(e.flags|=128,Nf(o,!1),r=s.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)o=n,t=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,t=s.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Tt($t,$t.current&1|2),e.child}t=t.sibling}o.tail!==null&&rn()>fd&&(e.flags|=128,r=!0,Nf(o,!1),e.lanes=4194304)}else{if(!r)if(t=Gv(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Nf(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!It)return er(e),null}else 2*rn()-o.renderingStartTime>fd&&n!==1073741824&&(e.flags|=128,r=!0,Nf(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=rn(),e.sibling=null,n=$t.current,Tt($t,r?n&1|2:n&1),e):(er(e),null);case 22:case 23:return l_(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Gr&1073741824&&(er(e),e.subtreeFlags&6&&(e.flags|=8192)):er(e),null;case 24:return null;case 25:return null}throw Error(te(156,e.tag))}function TH(t,e){switch(qT(e),e.tag){case 1:return zr(e.type)&&Fv(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ud(),Mt(Br),Mt(sr),XT(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return YT(e),null;case 13:if(Mt($t),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(te(340));ld()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Mt($t),null;case 4:return ud(),null;case 10:return HT(e.type._context),null;case 22:case 23:return l_(),null;case 24:return null;default:return null}}var lg=!1,ir=!1,_H=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Tu(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Gt(t,e,r)}else n.current=null}function gk(t,e,n){try{n()}catch(r){Gt(t,e,r)}}var QC=!1;function AH(t,e){if(ZS=$v,t=n4(),zT(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,d=0,f=t,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===t)break t;if(h===n&&++c===i&&(a=s),h===o&&++d===r&&(l=s),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ek={focusedElem:t,selectionRange:n},$v=!1,ve=e;ve!==null;)if(e=ve,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ve=t;else for(;ve!==null;){e=ve;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,v=g.memoizedState,y=e.stateNode,b=y.getSnapshotBeforeUpdate(e.elementType===e.type?m:Ki(e.type,m),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(te(163))}}catch(S){Gt(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,ve=t;break}ve=e.return}return g=QC,QC=!1,g}function bh(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&gk(e,n,o)}i=i.next}while(i!==r)}}function yx(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function vk(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Q4(t){var e=t.alternate;e!==null&&(t.alternate=null,Q4(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Co],delete e[np],delete e[rk],delete e[uH],delete e[dH])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Z4(t){return t.tag===5||t.tag===3||t.tag===4}function ZC(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Z4(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function yk(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=zv));else if(r!==4&&(t=t.child,t!==null))for(yk(t,e,n),t=t.sibling;t!==null;)yk(t,e,n),t=t.sibling}function bk(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(bk(t,e,n),t=t.sibling;t!==null;)bk(t,e,n),t=t.sibling}var qn=null,Qi=!1;function Zs(t,e,n){for(n=n.child;n!==null;)e3(t,e,n),n=n.sibling}function e3(t,e,n){if(Io&&typeof Io.onCommitFiberUnmount=="function")try{Io.onCommitFiberUnmount(ux,n)}catch{}switch(n.tag){case 5:ir||Tu(n,e);case 6:var r=qn,i=Qi;qn=null,Zs(t,e,n),qn=r,Qi=i,qn!==null&&(Qi?(t=qn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):qn.removeChild(n.stateNode));break;case 18:qn!==null&&(Qi?(t=qn,n=n.stateNode,t.nodeType===8?Aw(t.parentNode,n):t.nodeType===1&&Aw(t,n),Xh(t)):Aw(qn,n.stateNode));break;case 4:r=qn,i=Qi,qn=n.stateNode.containerInfo,Qi=!0,Zs(t,e,n),qn=r,Qi=i;break;case 0:case 11:case 14:case 15:if(!ir&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&gk(n,e,s),i=i.next}while(i!==r)}Zs(t,e,n);break;case 1:if(!ir&&(Tu(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Gt(n,e,a)}Zs(t,e,n);break;case 21:Zs(t,e,n);break;case 22:n.mode&1?(ir=(r=ir)||n.memoizedState!==null,Zs(t,e,n),ir=r):Zs(t,e,n);break;default:Zs(t,e,n)}}function eO(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new _H),e.forEach(function(r){var i=$H.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function qi(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=t,s=e,a=s;e:for(;a!==null;){switch(a.tag){case 5:qn=a.stateNode,Qi=!1;break e;case 3:qn=a.stateNode.containerInfo,Qi=!0;break e;case 4:qn=a.stateNode.containerInfo,Qi=!0;break e}a=a.return}if(qn===null)throw Error(te(160));e3(o,s,i),qn=null,Qi=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Gt(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)t3(e,t),e=e.sibling}function t3(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(qi(e,t),wo(t),r&4){try{bh(3,t,t.return),yx(3,t)}catch(m){Gt(t,t.return,m)}try{bh(5,t,t.return)}catch(m){Gt(t,t.return,m)}}break;case 1:qi(e,t),wo(t),r&512&&n!==null&&Tu(n,n.return);break;case 5:if(qi(e,t),wo(t),r&512&&n!==null&&Tu(n,n.return),t.flags&32){var i=t.stateNode;try{Kh(i,"")}catch(m){Gt(t,t.return,m)}}if(r&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,s=n!==null?n.memoizedProps:o,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&kL(i,o),US(a,s);var c=US(a,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d==="style"?AL(i,f):d==="dangerouslySetInnerHTML"?TL(i,f):d==="children"?Kh(i,f):_T(i,d,f,c)}switch(a){case"input":LS(i,o);break;case"textarea":EL(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Iu(i,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?Iu(i,!!o.multiple,o.defaultValue,!0):Iu(i,!!o.multiple,o.multiple?[]:"",!1))}i[np]=o}catch(m){Gt(t,t.return,m)}}break;case 6:if(qi(e,t),wo(t),r&4){if(t.stateNode===null)throw Error(te(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(m){Gt(t,t.return,m)}}break;case 3:if(qi(e,t),wo(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Xh(e.containerInfo)}catch(m){Gt(t,t.return,m)}break;case 4:qi(e,t),wo(t);break;case 13:qi(e,t),wo(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(s_=rn())),r&4&&eO(t);break;case 22:if(d=n!==null&&n.memoizedState!==null,t.mode&1?(ir=(c=ir)||d,qi(e,t),ir=c):qi(e,t),wo(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!d&&t.mode&1)for(ve=t,d=t.child;d!==null;){for(f=ve=d;ve!==null;){switch(h=ve,p=h.child,h.tag){case 0:case 11:case 14:case 15:bh(4,h,h.return);break;case 1:Tu(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(m){Gt(r,n,m)}}break;case 5:Tu(h,h.return);break;case 22:if(h.memoizedState!==null){nO(f);continue}}p!==null?(p.return=h,ve=p):nO(f)}d=d.sibling}e:for(d=null,f=t;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=_L("display",s))}catch(m){Gt(t,t.return,m)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){Gt(t,t.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:qi(e,t),wo(t),r&4&&eO(t);break;case 21:break;default:qi(e,t),wo(t)}}function wo(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(Z4(n)){var r=n;break e}n=n.return}throw Error(te(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Kh(i,""),r.flags&=-33);var o=ZC(t);bk(t,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=ZC(t);yk(t,a,s);break;default:throw Error(te(161))}}catch(l){Gt(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function NH(t,e,n){ve=t,n3(t)}function n3(t,e,n){for(var r=(t.mode&1)!==0;ve!==null;){var i=ve,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||lg;if(!s){var a=i.alternate,l=a!==null&&a.memoizedState!==null||ir;a=lg;var c=ir;if(lg=s,(ir=l)&&!c)for(ve=i;ve!==null;)s=ve,l=s.child,s.tag===22&&s.memoizedState!==null?rO(i):l!==null?(l.return=s,ve=l):rO(i);for(;o!==null;)ve=o,n3(o),o=o.sibling;ve=i,lg=a,ir=c}tO(t)}else i.subtreeFlags&8772&&o!==null?(o.return=i,ve=o):tO(t)}}function tO(t){for(;ve!==null;){var e=ve;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:ir||yx(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!ir)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Ki(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&BC(e,o,r);break;case 3:var s=e.updateQueue;if(s!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}BC(e,s,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Xh(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(te(163))}ir||e.flags&512&&vk(e)}catch(h){Gt(e,e.return,h)}}if(e===t){ve=null;break}if(n=e.sibling,n!==null){n.return=e.return,ve=n;break}ve=e.return}}function nO(t){for(;ve!==null;){var e=ve;if(e===t){ve=null;break}var n=e.sibling;if(n!==null){n.return=e.return,ve=n;break}ve=e.return}}function rO(t){for(;ve!==null;){var e=ve;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{yx(4,e)}catch(l){Gt(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){Gt(e,i,l)}}var o=e.return;try{vk(e)}catch(l){Gt(e,o,l)}break;case 5:var s=e.return;try{vk(e)}catch(l){Gt(e,s,l)}}}catch(l){Gt(e,e.return,l)}if(e===t){ve=null;break}var a=e.sibling;if(a!==null){a.return=e.return,ve=a;break}ve=e.return}}var CH=Math.ceil,Xv=Us.ReactCurrentDispatcher,i_=Us.ReactCurrentOwner,Ci=Us.ReactCurrentBatchConfig,Qe=0,Mn=null,mn=null,Gn=0,Gr=0,_u=ll(0),jn=0,lp=null,wc=0,bx=0,o_=0,xh=null,Ir=null,s_=0,fd=1/0,cs=null,Qv=!1,xk=null,La=null,cg=!1,Ta=null,Zv=0,wh=0,wk=null,hv=-1,pv=0;function br(){return Qe&6?rn():hv!==-1?hv:hv=rn()}function Ba(t){return t.mode&1?Qe&2&&Gn!==0?Gn&-Gn:hH.transition!==null?(pv===0&&(pv=zL()),pv):(t=ft,t!==0||(t=window.event,t=t===void 0?16:KL(t.type)),t):1}function fo(t,e,n,r){if(50<wh)throw wh=0,wk=null,Error(te(185));Em(t,n,r),(!(Qe&2)||t!==Mn)&&(t===Mn&&(!(Qe&2)&&(bx|=n),jn===4&&ga(t,Gn)),Fr(t,r),n===1&&Qe===0&&!(e.mode&1)&&(fd=rn()+500,mx&&cl()))}function Fr(t,e){var n=t.callbackNode;h9(t,e);var r=Dv(t,t===Mn?Gn:0);if(r===0)n!==null&&fC(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&fC(n),e===1)t.tag===0?fH(iO.bind(null,t)):f4(iO.bind(null,t)),lH(function(){!(Qe&6)&&cl()}),n=null;else{switch(FL(r)){case 1:n=PT;break;case 4:n=LL;break;case 16:n=Iv;break;case 536870912:n=BL;break;default:n=Iv}n=u3(n,r3.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function r3(t,e){if(hv=-1,pv=0,Qe&6)throw Error(te(327));var n=t.callbackNode;if(zu()&&t.callbackNode!==n)return null;var r=Dv(t,t===Mn?Gn:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=ey(t,r);else{e=r;var i=Qe;Qe|=2;var o=o3();(Mn!==t||Gn!==e)&&(cs=null,fd=rn()+500,sc(t,e));do try{MH();break}catch(a){i3(t,a)}while(!0);WT(),Xv.current=o,Qe=i,mn!==null?e=0:(Mn=null,Gn=0,e=jn)}if(e!==0){if(e===2&&(i=GS(t),i!==0&&(r=i,e=Sk(t,i))),e===1)throw n=lp,sc(t,0),ga(t,r),Fr(t,rn()),n;if(e===6)ga(t,r);else{if(i=t.current.alternate,!(r&30)&&!OH(i)&&(e=ey(t,r),e===2&&(o=GS(t),o!==0&&(r=o,e=Sk(t,o))),e===1))throw n=lp,sc(t,0),ga(t,r),Fr(t,rn()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(te(345));case 2:Pl(t,Ir,cs);break;case 3:if(ga(t,r),(r&130023424)===r&&(e=s_+500-rn(),10<e)){if(Dv(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){br(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=nk(Pl.bind(null,t,Ir,cs),e);break}Pl(t,Ir,cs);break;case 4:if(ga(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var s=31-uo(r);o=1<<s,s=e[s],s>i&&(i=s),r&=~o}if(r=i,r=rn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*CH(r/1960))-r,10<r){t.timeoutHandle=nk(Pl.bind(null,t,Ir,cs),r);break}Pl(t,Ir,cs);break;case 5:Pl(t,Ir,cs);break;default:throw Error(te(329))}}}return Fr(t,rn()),t.callbackNode===n?r3.bind(null,t):null}function Sk(t,e){var n=xh;return t.current.memoizedState.isDehydrated&&(sc(t,e).flags|=256),t=ey(t,e),t!==2&&(e=Ir,Ir=n,e!==null&&kk(e)),t}function kk(t){Ir===null?Ir=t:Ir.push.apply(Ir,t)}function OH(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!ho(o(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ga(t,e){for(e&=~o_,e&=~bx,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-uo(e),r=1<<n;t[n]=-1,e&=~r}}function iO(t){if(Qe&6)throw Error(te(327));zu();var e=Dv(t,0);if(!(e&1))return Fr(t,rn()),null;var n=ey(t,e);if(t.tag!==0&&n===2){var r=GS(t);r!==0&&(e=r,n=Sk(t,r))}if(n===1)throw n=lp,sc(t,0),ga(t,e),Fr(t,rn()),n;if(n===6)throw Error(te(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Pl(t,Ir,cs),Fr(t,rn()),null}function a_(t,e){var n=Qe;Qe|=1;try{return t(e)}finally{Qe=n,Qe===0&&(fd=rn()+500,mx&&cl())}}function Sc(t){Ta!==null&&Ta.tag===0&&!(Qe&6)&&zu();var e=Qe;Qe|=1;var n=Ci.transition,r=ft;try{if(Ci.transition=null,ft=1,t)return t()}finally{ft=r,Ci.transition=n,Qe=e,!(Qe&6)&&cl()}}function l_(){Gr=_u.current,Mt(_u)}function sc(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,aH(n)),mn!==null)for(n=mn.return;n!==null;){var r=n;switch(qT(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Fv();break;case 3:ud(),Mt(Br),Mt(sr),XT();break;case 5:YT(r);break;case 4:ud();break;case 13:Mt($t);break;case 19:Mt($t);break;case 10:HT(r.type._context);break;case 22:case 23:l_()}n=n.return}if(Mn=t,mn=t=za(t.current,null),Gn=Gr=e,jn=0,lp=null,o_=bx=wc=0,Ir=xh=null,ql!==null){for(e=0;e<ql.length;e++)if(n=ql[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}ql=null}return t}function i3(t,e){do{var n=mn;try{if(WT(),uv.current=Yv,Jv){for(var r=Bt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Jv=!1}if(xc=0,On=En=Bt=null,yh=!1,op=0,i_.current=null,n===null||n.return===null){jn=1,lp=e,mn=null;break}e:{var o=t,s=n.return,a=n,l=e;if(e=Gn,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=WC(s);if(p!==null){p.flags&=-257,HC(p,s,a,o,e),p.mode&1&&VC(o,c,e),e=p,l=c;var g=e.updateQueue;if(g===null){var m=new Set;m.add(l),e.updateQueue=m}else g.add(l);break e}else{if(!(e&1)){VC(o,c,e),c_();break e}l=Error(te(426))}}else if(It&&a.mode&1){var v=WC(s);if(v!==null){!(v.flags&65536)&&(v.flags|=256),HC(v,s,a,o,e),UT(dd(l,a));break e}}o=l=dd(l,a),jn!==4&&(jn=2),xh===null?xh=[o]:xh.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var y=F4(o,l,e);LC(o,y);break e;case 1:a=l;var b=o.type,x=o.stateNode;if(!(o.flags&128)&&(typeof b.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(La===null||!La.has(x)))){o.flags|=65536,e&=-e,o.lanes|=e;var S=q4(o,a,e);LC(o,S);break e}}o=o.return}while(o!==null)}a3(n)}catch(w){e=w,mn===n&&n!==null&&(mn=n=n.return);continue}break}while(!0)}function o3(){var t=Xv.current;return Xv.current=Yv,t===null?Yv:t}function c_(){(jn===0||jn===3||jn===2)&&(jn=4),Mn===null||!(wc&268435455)&&!(bx&268435455)||ga(Mn,Gn)}function ey(t,e){var n=Qe;Qe|=2;var r=o3();(Mn!==t||Gn!==e)&&(cs=null,sc(t,e));do try{PH();break}catch(i){i3(t,i)}while(!0);if(WT(),Qe=n,Xv.current=r,mn!==null)throw Error(te(261));return Mn=null,Gn=0,jn}function PH(){for(;mn!==null;)s3(mn)}function MH(){for(;mn!==null&&!i9();)s3(mn)}function s3(t){var e=c3(t.alternate,t,Gr);t.memoizedProps=t.pendingProps,e===null?a3(t):mn=e,i_.current=null}function a3(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=TH(n,e),n!==null){n.flags&=32767,mn=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{jn=6,mn=null;return}}else if(n=jH(n,e,Gr),n!==null){mn=n;return}if(e=e.sibling,e!==null){mn=e;return}mn=e=t}while(e!==null);jn===0&&(jn=5)}function Pl(t,e,n){var r=ft,i=Ci.transition;try{Ci.transition=null,ft=1,RH(t,e,n,r)}finally{Ci.transition=i,ft=r}return null}function RH(t,e,n,r){do zu();while(Ta!==null);if(Qe&6)throw Error(te(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(te(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(p9(t,o),t===Mn&&(mn=Mn=null,Gn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||cg||(cg=!0,u3(Iv,function(){return zu(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Ci.transition,Ci.transition=null;var s=ft;ft=1;var a=Qe;Qe|=4,i_.current=null,AH(t,n),t3(n,t),eH(ek),$v=!!ZS,ek=ZS=null,t.current=n,NH(n),o9(),Qe=a,ft=s,Ci.transition=o}else t.current=n;if(cg&&(cg=!1,Ta=t,Zv=i),o=t.pendingLanes,o===0&&(La=null),l9(n.stateNode),Fr(t,rn()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Qv)throw Qv=!1,t=xk,xk=null,t;return Zv&1&&t.tag!==0&&zu(),o=t.pendingLanes,o&1?t===wk?wh++:(wh=0,wk=t):wh=0,cl(),null}function zu(){if(Ta!==null){var t=FL(Zv),e=Ci.transition,n=ft;try{if(Ci.transition=null,ft=16>t?16:t,Ta===null)var r=!1;else{if(t=Ta,Ta=null,Zv=0,Qe&6)throw Error(te(331));var i=Qe;for(Qe|=4,ve=t.current;ve!==null;){var o=ve,s=o.child;if(ve.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(ve=c;ve!==null;){var d=ve;switch(d.tag){case 0:case 11:case 15:bh(8,d,o)}var f=d.child;if(f!==null)f.return=d,ve=f;else for(;ve!==null;){d=ve;var h=d.sibling,p=d.return;if(Q4(d),d===c){ve=null;break}if(h!==null){h.return=p,ve=h;break}ve=p}}}var g=o.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}ve=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,ve=s;else e:for(;ve!==null;){if(o=ve,o.flags&2048)switch(o.tag){case 0:case 11:case 15:bh(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,ve=y;break e}ve=o.return}}var b=t.current;for(ve=b;ve!==null;){s=ve;var x=s.child;if(s.subtreeFlags&2064&&x!==null)x.return=s,ve=x;else e:for(s=b;ve!==null;){if(a=ve,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:yx(9,a)}}catch(w){Gt(a,a.return,w)}if(a===s){ve=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,ve=S;break e}ve=a.return}}if(Qe=i,cl(),Io&&typeof Io.onPostCommitFiberRoot=="function")try{Io.onPostCommitFiberRoot(ux,t)}catch{}r=!0}return r}finally{ft=n,Ci.transition=e}}return!1}function oO(t,e,n){e=dd(n,e),e=F4(t,e,1),t=$a(t,e,1),e=br(),t!==null&&(Em(t,1,e),Fr(t,e))}function Gt(t,e,n){if(t.tag===3)oO(t,t,n);else for(;e!==null;){if(e.tag===3){oO(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(La===null||!La.has(r))){t=dd(n,t),t=q4(e,t,1),e=$a(e,t,1),t=br(),e!==null&&(Em(e,1,t),Fr(e,t));break}}e=e.return}}function IH(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=br(),t.pingedLanes|=t.suspendedLanes&n,Mn===t&&(Gn&n)===n&&(jn===4||jn===3&&(Gn&130023424)===Gn&&500>rn()-s_?sc(t,0):o_|=n),Fr(t,e)}function l3(t,e){e===0&&(t.mode&1?(e=Zm,Zm<<=1,!(Zm&130023424)&&(Zm=4194304)):e=1);var n=br();t=Ms(t,e),t!==null&&(Em(t,e,n),Fr(t,n))}function DH(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),l3(t,n)}function $H(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(te(314))}r!==null&&r.delete(e),l3(t,n)}var c3;c3=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Br.current)$r=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return $r=!1,EH(t,e,n);$r=!!(t.flags&131072)}else $r=!1,It&&e.flags&1048576&&h4(e,Vv,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;fv(t,e),t=e.pendingProps;var i=ad(e,sr.current);Bu(e,n),i=ZT(null,e,r,t,i,n);var o=e_();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,zr(r)?(o=!0,qv(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,GT(e),i.updater=vx,e.stateNode=i,i._reactInternals=e,ck(e,r,t,n),e=fk(null,e,r,!0,o,n)):(e.tag=0,It&&o&&FT(e),fr(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(fv(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=BH(r),t=Ki(r,t),i){case 0:e=dk(null,e,r,t,n);break e;case 1:e=JC(null,e,r,t,n);break e;case 11:e=KC(null,e,r,t,n);break e;case 14:e=GC(null,e,r,Ki(r.type,t),n);break e}throw Error(te(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ki(r,i),dk(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ki(r,i),JC(t,e,r,i,n);case 3:e:{if(H4(e),t===null)throw Error(te(387));r=e.pendingProps,o=e.memoizedState,i=o.element,b4(t,e),Kv(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=dd(Error(te(423)),e),e=YC(t,e,r,n,i);break e}else if(r!==i){i=dd(Error(te(424)),e),e=YC(t,e,r,n,i);break e}else for(ti=Da(e.stateNode.containerInfo.firstChild),ni=e,It=!0,io=null,n=v4(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ld(),r===i){e=Rs(t,e,n);break e}fr(t,e,r,n)}e=e.child}return e;case 5:return x4(e),t===null&&sk(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,tk(r,i)?s=null:o!==null&&tk(r,o)&&(e.flags|=32),W4(t,e),fr(t,e,s,n),e.child;case 6:return t===null&&sk(e),null;case 13:return K4(t,e,n);case 4:return JT(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=cd(e,null,r,n):fr(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ki(r,i),KC(t,e,r,i,n);case 7:return fr(t,e,e.pendingProps,n),e.child;case 8:return fr(t,e,e.pendingProps.children,n),e.child;case 12:return fr(t,e,e.pendingProps.children,n),e.child;
vendor: 2,884 bytes, line 40
40case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Tt(Wv,r._currentValue),r._currentValue=s,o!==null)if(ho(o.value,s)){if(o.children===i.children&&!Br.current){e=Rs(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ws(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ak(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(te(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ak(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}fr(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Bu(e,n),i=Ii(i),r=r(i),e.flags|=1,fr(t,e,r,n),e.child;case 14:return r=e.type,i=Ki(r,e.pendingProps),i=Ki(r.type,i),GC(t,e,r,i,n);case 15:return U4(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ki(r,i),fv(t,e),e.tag=1,zr(r)?(t=!0,qv(e)):t=!1,Bu(e,n),z4(e,r,i),ck(e,r,i,n),fk(null,e,r,!0,t,n);case 19:return G4(t,e,n);case 22:return V4(t,e,n)}throw Error(te(156,e.tag))};function u3(t,e){return $L(t,e)}function LH(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ai(t,e,n,r){return new LH(t,e,n,r)}function u_(t){return t=t.prototype,!(!t||!t.isReactComponent)}function BH(t){if(typeof t=="function")return u_(t)?1:0;if(t!=null){if(t=t.$$typeof,t===NT)return 11;if(t===CT)return 14}return 2}function za(t,e){var n=t.alternate;return n===null?(n=Ai(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function mv(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")u_(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case vu:return ac(n.children,i,o,e);case AT:s=8,i|=8;break;case MS:return t=Ai(12,n,e,i|2),t.elementType=MS,t.lanes=o,t;
vendor: 4,536 bytes, line 40
40case RS:return t=Ai(13,n,e,i),t.elementType=RS,t.lanes=o,t;case IS:return t=Ai(19,n,e,i),t.elementType=IS,t.lanes=o,t;case xL:return xx(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case yL:s=10;break e;case bL:s=9;break e;case NT:s=11;break e;case CT:s=14;break e;case sa:s=16,r=null;break e}throw Error(te(130,t==null?t:typeof t,""))}return e=Ai(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function ac(t,e,n,r){return t=Ai(7,t,r,e),t.lanes=n,t}function xx(t,e,n,r){return t=Ai(22,t,r,e),t.elementType=xL,t.lanes=n,t.stateNode={isHidden:!1},t}function Dw(t,e,n){return t=Ai(6,t,null,e),t.lanes=n,t}function $w(t,e,n){return e=Ai(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function zH(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vw(0),this.expirationTimes=vw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vw(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function d_(t,e,n,r,i,o,s,a,l){return t=new zH(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Ai(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},GT(o),t}function FH(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:gu,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function d3(t){if(!t)return el;t=t._reactInternals;e:{if($c(t)!==t||t.tag!==1)throw Error(te(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(zr(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(te(171))}if(t.tag===1){var n=t.type;if(zr(n))return d4(t,n,e)}return e}function f3(t,e,n,r,i,o,s,a,l){return t=d_(n,r,!0,t,i,o,s,a,l),t.context=d3(null),n=t.current,r=br(),i=Ba(n),o=ws(r,i),o.callback=e??null,$a(n,o,i),t.current.lanes=i,Em(t,i,r),Fr(t,r),t}function wx(t,e,n,r){var i=e.current,o=br(),s=Ba(i);return n=d3(n),e.context===null?e.context=n:e.pendingContext=n,e=ws(o,s),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=$a(i,e,s),t!==null&&(fo(t,i,s,o),cv(t,i,s)),s}function ty(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function sO(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function f_(t,e){sO(t,e),(t=t.alternate)&&sO(t,e)}function qH(){return null}var h3=typeof reportError=="function"?reportError:function(t){console.error(t)};function h_(t){this._internalRoot=t}Sx.prototype.render=h_.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(te(409));wx(t,e,null,null)};Sx.prototype.unmount=h_.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Sc(function(){wx(null,t,null,null)}),e[Ps]=null}};function Sx(t){this._internalRoot=t}Sx.prototype.unstable_scheduleHydration=function(t){if(t){var e=VL();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ma.length&&e!==0&&e<ma[n].priority;n++);ma.splice(n,0,t),n===0&&HL(t)}};function p_(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function kx(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function aO(){}function UH(t,e,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=ty(s);o.call(c)}}var s=f3(e,r,t,0,null,!1,!1,"",aO);return t._reactRootContainer=s,t[Ps]=s.current,ep(t.nodeType===8?t.parentNode:t),Sc(),s}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=ty(l);a.call(c)}}var l=d_(t,0,!1,null,null,!1,!1,"",aO);return t._reactRootContainer=l,t[Ps]=l.current,ep(t.nodeType===8?t.parentNode:t),Sc(function(){wx(e,l,n,r)}),l}function Ex(t,e,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var l=ty(s);a.call(l)}}wx(e,s,t,i)}else s=UH(n,e,t,i,r);return ty(s)}qL=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=rh(e.pendingLanes);
vendor: 4,609 bytes, line 40
40n!==0&&(MT(e,n|1),Fr(e,rn()),!(Qe&6)&&(fd=rn()+500,cl()))}break;case 13:Sc(function(){var r=Ms(t,1);if(r!==null){var i=br();fo(r,t,1,i)}}),f_(t,1)}};RT=function(t){if(t.tag===13){var e=Ms(t,134217728);if(e!==null){var n=br();fo(e,t,134217728,n)}f_(t,134217728)}};UL=function(t){if(t.tag===13){var e=Ba(t),n=Ms(t,e);if(n!==null){var r=br();fo(n,t,e,r)}f_(t,e)}};VL=function(){return ft};WL=function(t,e){var n=ft;try{return ft=t,e()}finally{ft=n}};WS=function(t,e,n){switch(e){case"input":if(LS(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=px(r);if(!i)throw Error(te(90));SL(r),LS(r,i)}}}break;case"textarea":EL(t,n);break;case"select":e=n.value,e!=null&&Iu(t,!!n.multiple,e,!1)}};OL=a_;PL=Sc;var VH={usingClientEntryPoint:!1,Events:[Tm,wu,px,NL,CL,a_]},Cf={findFiberByHostInstance:Fl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},WH={bundleType:Cf.bundleType,version:Cf.version,rendererPackageName:Cf.rendererPackageName,rendererConfig:Cf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Us.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=IL(t),t===null?null:t.stateNode},findFiberByHostInstance:Cf.findFiberByHostInstance||qH,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 ug=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ug.isDisabled&&ug.supportsFiber)try{ux=ug.inject(WH),Io=ug}catch{}}ai.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VH;ai.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p_(e))throw Error(te(200));return FH(t,e,null,n)};ai.createRoot=function(t,e){if(!p_(t))throw Error(te(299));var n=!1,r="",i=h3;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=d_(t,1,!1,null,null,n,!1,r,i),t[Ps]=e.current,ep(t.nodeType===8?t.parentNode:t),new h_(e)};ai.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(te(188)):(t=Object.keys(t).join(","),Error(te(268,t)));return t=IL(e),t=t===null?null:t.stateNode,t};ai.flushSync=function(t){return Sc(t)};ai.hydrate=function(t,e,n){if(!kx(e))throw Error(te(200));return Ex(null,t,e,!0,n)};ai.hydrateRoot=function(t,e,n){if(!p_(t))throw Error(te(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=h3;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),e=f3(e,null,t,1,n??null,i,!1,o,s),t[Ps]=e.current,ep(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Sx(e)};ai.render=function(t,e,n){if(!kx(e))throw Error(te(200));return Ex(null,t,e,!1,n)};ai.unmountComponentAtNode=function(t){if(!kx(t))throw Error(te(40));return t._reactRootContainer?(Sc(function(){Ex(null,null,t,!1,function(){t._reactRootContainer=null,t[Ps]=null})}),!0):!1};ai.unstable_batchedUpdates=a_;ai.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!kx(n))throw Error(te(200));if(t==null||t._reactInternals===void 0)throw Error(te(38));return Ex(t,e,n,!1,r)};ai.version="18.3.1-next-f1338f8080-20240426";function p3(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p3)}catch(t){console.error(t)}}p3(),pL.exports=ai;var Am=pL.exports;const m_=ht(Am);var m3,lO=Am;m3=lO.createRoot,lO.hydrateRoot;const HH=1,KH=1e6;let Lw=0;function GH(){return Lw=(Lw+1)%Number.MAX_SAFE_INTEGER,Lw.toString()}const Bw=new Map,cO=t=>{if(Bw.has(t))return;const e=setTimeout(()=>{Bw.delete(t),Sh({type:"REMOVE_TOAST",toastId:t})},KH);Bw.set(t,e)},JH=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,HH)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;
40return n?cO(n):t.toasts.forEach(r=>{cO(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},gv=[];let vv={toasts:[]};function Sh(t){vv=JH(vv,t),gv.forEach(e=>{e(vv)})}function YH({...t}){const e=GH(),n=i=>Sh({type:"UPDATE_TOAST",toast:{...i,id:e}}),r=()=>Sh({type:"DISMISS_TOAST",toastId:e});return Sh({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:i=>{i||r()}}}),{id:e,dismiss:r,update:n}}function g3(){const[t,e]=E.useState(vv);return E.useEffect(()=>(gv.push(e),()=>{const n=gv.indexOf(e);n>-1&&gv.splice(n,1)}),[t]),{...t,toast:YH,dismiss:n=>Sh({type:"DISMISS_TOAST",toastId:n})}}function ot(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function uO(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function v3(...t){return e=>{let n=!1;const r=t.map(i=>{const o=uO(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():uO(t[i],null)}}}}function Ft(...t){return E.useCallback(v3(...t),t)}function XH(t,e){const n=E.createContext(e),r=o=>{const{children:s,...a}=o,l=E.useMemo(()=>a,Object.values(a));return u.jsx(n.Provider,{value:l,children:s})};r.displayName=t+"Provider";function i(o){const s=E.useContext(n);if(s)return s;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[r,i]}function Lc(t,e=[]){let n=[];function r(o,s){const a=E.createContext(s),l=n.length;n=[...n,s];const c=f=>{var y;const{scope:h,children:p,...g}=f,m=((y=h==null?void 0:h[t])==null?void 0:y[l])||a,v=E.useMemo(()=>g,Object.values(g));return u.jsx(m.Provider,{value:v,children:p})};c.displayName=o+"Provider";function d(f,h){var m;const p=((m=h==null?void 0:h[t])==null?void 0:m[l])||a,g=E.useContext(p);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(s=>E.createContext(s));return function(a){const l=(a==null?void 0:a[t])||o;return E.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,QH(i,...e)]}function QH(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return E.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}function cp(t){const e=ZH(t),n=E.forwardRef((r,i)=>{const{children:o,...s}=r,a=E.Children.toArray(o),l=a.find(t7);if(l){const c=l.props.children,d=a.map(f=>f===l?E.Children.count(c)>1?E.Children.only(null):E.isValidElement(c)?c.props.children:null:f);return u.jsx(e,{...s,ref:i,children:E.isValidElement(c)?E.cloneElement(c,void 0,d):null})}return u.jsx(e,{...s,ref:i,children:o})});return n.displayName=`${t}.Slot`,n}var y3=cp("Slot");function ZH(t){const e=E.forwardRef((n,r)=>{const{children:i,...o}=n;if(E.isValidElement(i)){const s=r7(i),a=n7(o,i.props);return i.type!==E.Fragment&&(a.ref=r?v3(r,s):s),E.cloneElement(i,a)}return E.Children.count(i)>1?E.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var b3=Symbol("radix.slottable");function e7(t){const e=({children:n})=>u.jsx(u.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=b3,e}function t7(t){return E.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===b3}function n7(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const l=o(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function r7(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.
vendor: 6,639 bytes, line 40
40isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function x3(t){const e=t+"CollectionProvider",[n,r]=Lc(e),[i,o]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:y}=m,b=A.useRef(null),x=A.useRef(new Map).current;return u.jsx(i,{scope:v,itemMap:x,collectionRef:b,children:y})};s.displayName=e;const a=t+"CollectionSlot",l=cp(a),c=A.forwardRef((m,v)=>{const{scope:y,children:b}=m,x=o(a,y),S=Ft(v,x.collectionRef);return u.jsx(l,{ref:S,children:b})});c.displayName=a;const d=t+"CollectionItemSlot",f="data-radix-collection-item",h=cp(d),p=A.forwardRef((m,v)=>{const{scope:y,children:b,...x}=m,S=A.useRef(null),w=Ft(v,S),k=o(d,y);return A.useEffect(()=>(k.itemMap.set(S,{ref:S,...x}),()=>void k.itemMap.delete(S))),u.jsx(h,{[f]:"",ref:w,children:b})});p.displayName=d;function g(m){const v=o(t+"CollectionConsumer",m);return A.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((k,j)=>x.indexOf(k.ref.current)-x.indexOf(j.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},g,r]}var i7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],gt=i7.reduce((t,e)=>{const n=cp(`Primitive.${e}`),r=E.forwardRef((i,o)=>{const{asChild:s,...a}=i,l=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function w3(t,e){t&&Am.flushSync(()=>t.dispatchEvent(e))}function Vo(t){const e=E.useRef(t);return E.useEffect(()=>{e.current=t}),E.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function o7(t,e=globalThis==null?void 0:globalThis.document){const n=Vo(t);E.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var s7="DismissableLayer",Ek="dismissableLayer.update",a7="dismissableLayer.pointerDownOutside",l7="dismissableLayer.focusOutside",dO,S3=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jx=E.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...l}=t,c=E.useContext(S3),[d,f]=E.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=E.useState({}),g=Ft(e,j=>f(j)),m=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),b=d?m.indexOf(d):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,w=u7(j=>{const T=j.target,_=[...c.branches].some(N=>N.contains(T));!S||_||(i==null||i(j),s==null||s(j),j.defaultPrevented||a==null||a())},h),k=d7(j=>{const T=j.target;[...c.branches].some(N=>N.contains(T))||(o==null||o(j),s==null||s(j),j.defaultPrevented||a==null||a())},h);return o7(j=>{b===c.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&a&&(j.preventDefault(),a()))},h),E.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(dO=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),fO(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=dO)}},[d,h,n,c]),E.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),fO())},[d,c]),E.useEffect(()=>{const j=()=>p({});return document.addEventListener(Ek,j),()=>document.removeEventListener(Ek,j)},[]),u.jsx(gt.div,{...l,ref:g,style:{pointerEvents:x?S?"auto":"none":void 0,...t.style},onFocusCapture:ot(t.onFocusCapture,k.onFocusCapture),onBlurCapture:ot(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ot(t.onPointerDownCapture,w.onPointerDownCapture)})});jx.displayName=s7;var c7="DismissableLayerBranch",k3=E.forwardRef((t,e)=>{const n=E.useContext(S3),r=E.useRef(null),i=Ft(e,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(gt.div,{...t,ref:i})});k3.displayName=c7;function u7(t,e=globalThis==null?void 0:globalThis.document){const n=Vo(t),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){E3(a7,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function d7(t,e=globalThis==null?void 0:globalThis.document){const n=Vo(t),r=E.useRef(!1);return E.useEffect(()=>{const i=o=>{o.target&&!r.current&&E3(l7,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fO(){const t=new CustomEvent(Ek);document.dispatchEvent(t)}function E3(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?w3(i,o):i.dispatchEvent(o)}var f7=jx,h7=k3,Is=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},p7="Portal",g_=E.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[i,o]=E.useState(!1);Is(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?m_.createPortal(u.jsx(gt.div,{...r,ref:e}),s):null});g_.displayName=p7;function m7(t,e){return E.useReducer((n,r)=>e[n][r]??n,t)}var ef=t=>{const{present:e,children:n}=t,r=g7(e),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=Ft(r.ref,v7(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:o}):null};ef.displayName="Presence";function g7(t){const[e,n]=E.useState(),r=E.useRef(null),i=E.useRef(t),o=E.useRef("none"),s=t?"mounted":"unmounted",[a,l]=m7(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=dg(r.current);o.current=a==="mounted"?c:"none"},[a]),Is(()=>{const c=r.current,d=i.current;if(d!==t){const h=o.current,p=dg(c);t?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Is(()=>
40{if(e){let c;const d=e.ownerDocument.defaultView??window,f=p=>{const m=dg(r.current).includes(p.animationName);if(p.target===e&&m&&(l("ANIMATION_END"),!i.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",c=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},h=p=>{p.target===e&&(o.current=dg(r.current))};return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{d.clearTimeout(c),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:E.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function dg(t){return(t==null?void 0:t.animationName)||"none"}function v7(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var y7=ET[" useInsertionEffect ".trim().toString()]||Is;function Nm({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[i,o,s]=b7({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:i;{const d=E.useRef(t!==void 0);E.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=E.useCallback(d=>{var f;if(a){const h=x7(d)?d(t):d;h!==t&&((f=s.current)==null||f.call(s,h))}else o(d)},[a,t,o,s]);return[l,c]}function b7({defaultProp:t,onChange:e}){const[n,r]=E.useState(t),i=E.useRef(n),o=E.useRef(e);return y7(()=>{o.current=e},[e]),E.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function x7(t){return typeof t=="function"}var w7=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"}),S7="VisuallyHidden",Tx=E.forwardRef((t,e)=>u.jsx(gt.span,{...t,ref:e,style:{...w7,...t.style}}));Tx.displayName=S7;var k7=Tx,v_="ToastProvider",[y_,E7,j7]=x3("Toast"),[j3,dLe]=Lc("Toast",[j7]),[T7,_x]=j3(v_),T3=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:o=50,children:s}=t,[a,l]=E.useState(null),[c,d]=E.useState(0),f=E.useRef(!1),h=E.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${v_}\`. Expected non-empty \`string\`.`),u.jsx(y_.Provider,{scope:e,children:u.jsx(T7,{scope:e,label:n,duration:r,swipeDirection:i,swipeThreshold:o,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:E.useCallback(()=>d(p=>p+1),[]),onToastRemove:E.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:s})})};T3.displayName=v_;var _3="ToastViewport",_7=["F8"],jk="toast.viewportPause",Tk="toast.viewportResume",A3=E.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=_7,label:i="Notifications ({hotkey})",...o}=t,s=_x(_3,n),a=E7(n),l=E.useRef(null),c=E.useRef(null),d=E.useRef(null),f=E.useRef(null),h=Ft(e,f,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=s.toastCount>0;E.useEffect(()=>{const v=y=>{var x;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((x=f.current)==null||x.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),E.useEffect(()=>{const v=l.current,y=f.current;if(g&&v&&y){const b=()=>{if(!s.isClosePausedRef.current){const k=new CustomEvent(jk);y.dispatchEvent(k),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const k=new CustomEvent(Tk);y.dispatchEvent(k),s.isClosePausedRef.current=!1}},S=k=>{!v.contains(k.relatedTarget)&&x()},w=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",b),v.addEventListener("focusout",S),v.addEventListener("pointermove",b),v.addEventListener("pointerleave",w),window.addEventListener("blur",b),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",b),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",b),v.removeEventListener("pointerleave",w),window.removeEventListener("blur",b),window.removeEventListener("focus",x)}}},[g,s.isClosePausedRef]);const m=E.useCallback(({tabbingDirection:v})=>{const b=a().map(x=>{const S=x.ref.current,w=[S,...z7(S)];return v==="forwards"?w:w.reverse()});return(v==="forwards"?b.reverse():b).flat()},[a]);return E.useEffect(()=>{const v=f.current;if(v){const y=b=>{var w,k,j;const x=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!x){const T=document.activeElement,_=b.shiftKey;if(b.target===v&&_){(w=c.current)==null||w.focus();return}const O=m({tabbingDirection:_?"backwards":"forwards"}),I=O.findIndex(P=>P===T);zw(O.slice(I+1))?b.preventDefault():_?(k=c.current)==null||k.focus():(j=d.current)==null||j.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[a,m]),u.jsxs(h7,{ref:l,role:"region","aria-label":i.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&u.jsx(_k,{ref:c,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});zw(v)}}),u.jsx(y_.Slot,{scope:n,children:u.jsx(gt.ol,{tabIndex:-1,...o,ref:h})}),g&&u.jsx(_k,{ref:d,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});zw(v)}})]})});A3.displayName=_3;var N3="ToastFocusProxy",_k=E.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=t,o=_x(N3,n);return u.jsx(Tx,{"aria-hidden":!0,tabIndex:0,...i,ref:e,style:{position:"fixed"},onFocus:s=>{var c;const a=s.relatedTarget;!((c=o.viewport)!=null&&c.contains(a))&&r()}})});_k.displayName=N3;var Cm="Toast",A7="toast.swipeStart",N7="toast.swipeMove",C7="toast.swipeCancel",O7="toast.swipeEnd",C3=E.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:o,...s}=t,[a,l]=Nm({prop:r,defaultProp:i??!0,onChange:o,caller:Cm});return u.jsx(ef,{present:n||a,children:u.jsx(R7,{open:a,...s,ref:e,onClose:()=>l(!1),onPause:Vo(t.onPause),onResume:Vo(t.onResume),onSwipeStart:ot(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ot(t.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ot(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ot(t.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});C3.displayName=Cm;var[P7,M7]=j3(Cm,{onClose(){}}),R7=E.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:o,onClose:s,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:p,...g}
40=t,m=_x(Cm,n),[v,y]=E.useState(null),b=Ft(e,P=>y(P)),x=E.useRef(null),S=E.useRef(null),w=i||m.duration,k=E.useRef(0),j=E.useRef(w),T=E.useRef(0),{onToastAdd:_,onToastRemove:N}=m,C=Vo(()=>{var $;(v==null?void 0:v.contains(document.activeElement))&&(($=m.viewport)==null||$.focus()),s()}),O=E.useCallback(P=>{!P||P===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(C,P))},[C]);E.useEffect(()=>{const P=m.viewport;if(P){const $=()=>{O(j.current),c==null||c()},B=()=>{const z=new Date().getTime()-k.current;j.current=j.current-z,window.clearTimeout(T.current),l==null||l()};return P.addEventListener(jk,B),P.addEventListener(Tk,$),()=>{P.removeEventListener(jk,B),P.removeEventListener(Tk,$)}}},[m.viewport,w,l,c,O]),E.useEffect(()=>{o&&!m.isClosePausedRef.current&&O(w)},[o,w,m.isClosePausedRef,O]),E.useEffect(()=>(_(),()=>N()),[_,N]);const I=E.useMemo(()=>v?$3(v):null,[v]);return m.viewport?u.jsxs(u.Fragment,{children:[I&&u.jsx(I7,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:I}),u.jsx(P7,{scope:n,onClose:C,children:Am.createPortal(u.jsx(y_.ItemSlot,{scope:n,children:u.jsx(f7,{asChild:!0,onEscapeKeyDown:ot(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||C(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(gt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:b,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ot(t.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,C()))}),onPointerDown:ot(t.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:ot(t.onPointerMove,P=>{if(!x.current)return;const $=P.clientX-x.current.x,B=P.clientY-x.current.y,z=!!S.current,R=["left","right"].includes(m.swipeDirection),L=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,q=R?L(0,$):0,G=R?0:L(0,B),V=P.pointerType==="touch"?10:2,Y={x:q,y:G},pe={originalEvent:P,delta:Y};z?(S.current=Y,fg(N7,f,pe,{discrete:!1})):hO(Y,m.swipeDirection,V)?(S.current=Y,fg(A7,d,pe,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs($)>V||Math.abs(B)>V)&&(x.current=null)}),onPointerUp:ot(t.onPointerUp,P=>{const $=S.current,B=P.target;if(B.hasPointerCapture(P.pointerId)&&B.releasePointerCapture(P.pointerId),S.current=null,x.current=null,$){const z=P.currentTarget,R={originalEvent:P,delta:$};hO($,m.swipeDirection,m.swipeThreshold)?fg(O7,p,R,{discrete:!0}):fg(C7,h,R,{discrete:!0}),z.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),I7=t=>{const{__scopeToast:e,children:n,...r}=t,i=_x(Cm,e),[o,s]=E.useState(!1),[a,l]=E.useState(!1);return L7(()=>s(!0)),E.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(g_,{asChild:!0,children:u.jsx(Tx,{...r,children:o&&u.jsxs(u.Fragment,{children:[i.label," ",n]})})})},D7="ToastTitle",O3=E.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return u.jsx(gt.div,{...r,ref:e})});O3.displayName=D7;var $7="ToastDescription",P3=E.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return u.jsx(gt.div,{...r,ref:e})});P3.displayName=$7;var M3="ToastAction",R3=E.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?u.jsx(D3,{altText:n,asChild:!0,children:u.jsx(b_,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${M3}\`. Expected non-empty \`string\`.`),null)});R3.displayName=M3;var I3="ToastClose",b_=E.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,i=M7(I3,n);return u.jsx(D3,{asChild:!0,children:u.jsx(gt.button,{type:"button",...r,ref:e,onClick:ot(t.onClick,i.onClose)})})});b_.displayName=I3;var D3=E.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...i}=t;return u.jsx(gt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:e})});function $3(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),B7(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!i)if(o){const s=r.dataset.radixToastAnnounceAlt;s&&e.push(s)}else e.push(...$3(r))}}),e}function fg(t,e,n,{discrete:r}){const i=n.originalEvent.currentTarget,o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?w3(i,o):i.dispatchEvent(o)}var hO=(t,e,n=0)=>{const r=Math.abs(t.x),i=Math.abs(t.y),o=r>i;return e==="left"||e==="right"?o&&r>n:!o&&i>n};function L7(t=()=>{}){const e=Vo(t);Is(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function B7(t){return t.nodeType===t.ELEMENT_NODE}function z7(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function zw(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var F7=T3,L3=A3,B3=C3,z3=O3,F3=P3,q3=R3,U3=b_;function V3(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=V3(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function qe(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=V3(t))&&(r&&(r+=" "),r+=e);return r}const pO=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,mO=qe,x_=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return mO(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=e,s=Object.keys(i).map(c=>{const d=n==null?void 0:n[c],f=o==null?void 0:o[c];if(d===null)return null;const h=pO(d)||pO(f);return i[c][h]}),a=n&&Object.entries(n).reduce((c,d)=>{let[f,h]=d;return h===void 0||(c[f]=h),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(g=>{let[m,v]=g;return Array.isArray(v)?v.includes({...o,...a}[m]):{...o,...a}[m]===v})?[...c,f,h]:c},[]);return mO(t,s,l,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 q7=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),W3=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===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 U7={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 V7=E.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},l)=>E.createElement("svg",{ref:l,...U7,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:W3("lucide",i),...a},[...s.map(([c,d])=>E.createElement(c,d)),...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 oe=(t,e)=>{const n=E.forwardRef(({className:r,...i},o)=>
60E.createElement(V7,{ref:o,iconNode:e,className:W3(`lucide-${q7(t)}`,r),...i}));return n.displayName=`${t}`,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 W7=oe("AlignCenter",[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/** 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 H7=oe("AlignLeft",[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/** 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 K7=oe("AlignRight",[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/** 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 G7=oe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 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 st=oe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 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 J7=oe("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** 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 Vn=oe("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 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 Y7=oe("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/** 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 X7=oe("BookOpenCheck",[["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m16 12 2 2 4-4",key:"mdajum"}],["path",{d:"M22 6V4a1 1 0 0 0-1-1h-5a4 4 0 0 0-4 4 4 4 0 0 0-4-4H3a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h6a3 3 0 0 1 3 3 3 3 0 0 1 3-3h6a1 1 0 0 0 1-1v-1.3",key:"8arnkb"}]]);/** 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 $o=oe("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"}]]);/** 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 up=oe("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"}]]);/** 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 Fw=oe("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"}]]);/** 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 Fu=oe("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"}
125],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 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 Q7=oe("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/** 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 Ss=oe("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 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 Ak=oe("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"}]]);/** 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 Nk=oe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const hg=oe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const H3=oe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 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 lc=oe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 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 Z7=oe("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"}]]);/** 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 ks=oe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 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 Es=oe("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 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 eK=oe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 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 cc=oe("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"}]]);/** 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 tK=oe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 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 gO=oe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** 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 yv=oe("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"}]]);/** 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 Fa=oe("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"}]]);/** 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 qw=oe("HandHeart",[["path",{d:"M11 14h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16",key:"1ifwr1"}],["path",{d:"m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"17abbs"}],["path",{d:"m2 15 6 6",key:"10dquu"}],["path",{d:"M19.5 8.5c.7-.7 1.5-1.6 1.5-2.7A2.73 2.73 0 0 0 16 4a2.78 2.78 0 0 0-5 1.8c0 1.2.8 2 1.5 2.8L16 12Z",key:"1h3036"}]]);/** 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 nK=oe("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}
215]]);/** 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 rK=oe("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);/** 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 Uw=oe("HeartHandshake",[["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"}],["path",{d:"M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66",key:"4oyue0"}],["path",{d:"m18 15-2-2",key:"60u0ii"}],["path",{d:"m15 18-2-2",key:"6p76be"}]]);/** 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 xr=oe("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"}]]);/** 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 K3=oe("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"}]]);/** 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 iK=oe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 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 oK=oe("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/** 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 sK=oe("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"}]]);/** 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 Lo=oe("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"}]]);/** 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 aK=oe("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"}]]);/** 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 lK=oe("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** 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 cK=oe("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 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 uK=oe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 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 vO=oe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 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 dK=oe("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 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 G3=oe("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 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 fK=oe("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 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 Vw=oe("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"}]]);/** 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 hK=oe("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"}]]);/** 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 qa=oe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 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 pK=oe("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"}]]);/** 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 mK=oe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 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 gK=oe("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** 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 Ww=oe("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"}]]);/** 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 vK=oe("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"}]]);/** 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 J3=oe("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"}]]);/** 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 Hw=oe("PiggyBank",[["path",{d:"M19 5c-1.5 0-2.8 1.4-3 2-3.5-1.5-11-.3-11 5 0 1.8 0 3 2 4.5V20h4v-2h3v2h4v-4c1-.5 1.7-1 2-2h2v-4h-2c0-1-.5-1.5-1-2V5z",key:"1ivx2i"}],["path",{d:"M2 9v1c0 1.1.9 2 2 2h1",key:"nm575m"}],["path",{d:"M16 11h.01",key:"xkw8gn"}]]);/** 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 yK=oe("Pilcrow",[["path",{d:"M13 4v16",key:"8vvj80"}],["path",{d:"M17 4v16",key:"7dpous"}],["path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13",key:"sh4n9v"}]]);/** 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 yO=oe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 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 bK=oe("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"}]]);/** 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 xK=oe("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/** 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 Y3=oe("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/** 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 wK=oe("Redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);/** 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 Kw=oe("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"}]]);/** 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 X3=oe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 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 SK=oe("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"}]]);/** 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 Gw=oe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 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 Q3=oe("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
400y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** 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 kK=oe("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 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 Ua=oe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 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 uc=oe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 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 kh=oe("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"}]]);/** 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 EK=oe("Strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/** 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 Bo=oe("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"}]]);/** 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 jK=oe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 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 dp=oe("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"}]]);/** 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 Ax=oe("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"}]]);/** 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 Z3=oe("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"}]]);/** 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 TK=oe("Underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",ke
vendor: 9,658 bytes, lines 455-480
455y:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/** 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 _K=oe("Undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/** 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 AK=oe("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"}]]);/** 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 vn=oe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 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 w_=oe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 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 e5=oe("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"}]]),S_="-",NK=t=>{const e=OK(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:s=>{const a=s.split(S_);return a[0]===""&&a.length!==1&&a.shift(),t5(a,e)||CK(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},t5=(t,e)=>{var s;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),i=r?t5(t.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const o=t.join(S_);return(s=e.validators.find(({validator:a})=>a(o)))==null?void 0:s.classGroupId},bO=/^\[(.+)\]$/,CK=t=>{if(bO.test(t)){const e=bO.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},OK=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return MK(Object.entries(t.classGroups),n).forEach(([o,s])=>{Ck(s,r,o,e)}),r},Ck=(t,e,n,r)=>{t.forEach(i=>{if(typeof i=="string"){const o=i===""?e:xO(e,i);o.classGroupId=n;return}if(typeof i=="function"){if(PK(i)){Ck(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{Ck(s,xO(e,o),n,r)})})},xO=(t,e)=>{let n=t;return e.split(S_).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},PK=t=>t.isThemeGetter,MK=(t,e)=>e?t.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[e+s,a])):o);return[n,i]}):t,RK=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const i=(o,s)=>{n.set(o,s),e++,e>t&&(e=0,r=n,n=new Map)};return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){n.has(o)?n.set(o,s):i(o,s)}}},n5="!",IK=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,i=e[0],o=e.length,s=a=>{const l=[];let c=0,d=0,f;for(let v=0;v<a.length;v++){let y=a[v];if(c===0){if(y===i&&(r||a.slice(v,v+o)===e)){l.push(a.slice(d,v)),d=v+o;continue}if(y==="/"){f=v;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(d),p=h.startsWith(n5),g=p?h.substring(1):h,m=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:s}):s},DK=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},$K=t=>({cache:RK(t.cacheSize),parseClassName:IK(t),...NK(t)}),LK=/\s+/,BK=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=e,o=[],s=t.trim().split(LK);let a="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(c);let g=!!p,m=r(g?h.substring(0,p):h);if(!m){if(!g){a=c+(a.length>0?" "+a:a);continue}if(m=r(h),!m){a=c+(a.length>0?" "+a:a);continue}g=!1}const v=DK(d).join(":"),y=f?v+n5:v,b=y+m;if(o.includes(b))continue;o.push(b);const x=i(m,g);for(let S=0;S<x.length;++S){const w=x[S];o.push(y+w)}a=c+(a.length>0?" "+a:a)}return a};function zK(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=r5(e))&&(r&&(r+=" "),r+=n);return r}const r5=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=r5(t[r]))&&(n&&(n+=" "),n+=e);return n};function FK(t,...e){let n,r,i,o=s;function s(l){const c=e.reduce((d,f)=>f(d),t());return n=$K(c),r=n.cache.get,i=n.cache.set,o=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=BK(l,n);return i(l,d),d}return function(){return o(zK.apply(null,arguments))}}const At=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},i5=/^\[(?:([a-z-]+):)?(.+)\]$/i,qK=/^\d+\/\d+$/,UK=new Set(["px","full","screen"]),VK=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WK=/\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$/,HK=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,KK=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GK=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zo=t=>qu(t)||UK.has(t)||qK.test(t),ea=t=>tf(t,"length",nG),qu=t=>!!t&&!Number.isNaN(Number(t)),Jw=t=>tf(t,"number",qu),Of=t=>!!t&&Number.isInteger(Number(t)),JK=t=>t.endsWith("%")&&qu(t.slice(0,-1)),Fe=t=>i5.test(t),ta=t=>VK.test(t),YK=new Set(["length","size","percentage"]),XK=t=>tf(t,YK,o5),QK=t=>tf(t,"position",o5),ZK=new Set(["image","url"]),eG=t=>tf(t,ZK,iG),tG=t=>tf(t,"",rG),Pf=()=>!0,tf=(t,e,n)=>{const r=i5.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},nG=t=>WK.test(t)&&!HK.test(t),o5=()=>!1,rG=t=>KK.test(t),iG=t=>GK.test(t),oG=()=>{const t=At("colors"),e=At("spacing"),n=At("blur"),r=At("brightness"),i=At("borderColor"),o=At("borderRadius"),s=At("borderSpacing"),a=At("borderWidth"),l=At("contrast"),c=At("grayscale"),d=At("hueRotate"),f=At("invert"),h=At("gap"),p=At("gradientColorStops"),g=At("gradientColorStopPositions"),m=At("inset"),v=At("margin"),y=At("opacity"),b=At("padding"),x=At("saturate"),S=At("scale"),w=At("sepia"),k=At("skew"),j=At("space"),T=At("translate"),_=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto",Fe,e],O=()=>[Fe,e],I=()=>["",Zo,ea],P=()=>["auto",qu,Fe],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",Fe],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[qu,Fe];return{cacheSize:500,separator:":",theme:{colors:[Pf],spacing:[Zo,ea],blur:["none","",ta,Fe],brightness:G(),borderColor:[t],borderRadius:["none","","full",ta,Fe],borderSpacing:O(),borderWidth:I(),contrast:G(),grayscale:L(),hueRotate:G(),invert:L(),gap:O(),gradientColorStops:[t],gradientColorStopPositions:[JK,ea],inset:C(),margin:C(),opacity:G(),padding:O(),saturate:G(),scale:G(),sepia:L(),skew:G(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Fe]}],container:["container"],columns:[{columns:[ta]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),Fe]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Of,Fe]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Fe]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",Of,Fe]}
vendor: 4,363 bytes, line 480
480],"grid-cols":[{"grid-cols":[Pf]}],"col-start-end":[{col:["auto",{span:["full",Of,Fe]},Fe]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Pf]}],"row-start-end":[{row:["auto",{span:[Of,Fe]},Fe]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Fe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Fe,e]}],"min-w":[{"min-w":[Fe,e,"min","max","fit"]}],"max-w":[{"max-w":[Fe,e,"none","full","min","max","fit","prose",{screen:[ta]},ta]}],h:[{h:[Fe,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Fe,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Fe,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Fe,e,"auto","min","max","fit"]}],"font-size":[{text:["base",ta,ea]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jw]}],"font-family":[{font:[Pf]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Fe]}],"line-clamp":[{"line-clamp":["none",qu,Jw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Zo,Fe]}],"list-image":[{"list-image":["none",Fe]}],"list-style-type":[{list:["none","disc","decimal",Fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Zo,ea]}],"underline-offset":[{"underline-offset":["auto",Zo,Fe]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),QK]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",XK]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},eG]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}
480],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}
vendor: 4,467 bytes, line 480
480],"divide-style":[{divide:B()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Zo,Fe]}],"outline-w":[{outline:[Zo,ea]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Zo,ea]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",ta,tG]}],"shadow-color":[{shadow:[Pf]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ta,Fe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Fe]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Fe]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Of,Fe]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Fe]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Fe]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Fe]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Zo,ea,Jw]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
480none"]}]},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"]}}},sG=FK(oG);function qt(...t){return sG(qe(t))}const aG=F7,s5=E.forwardRef(({className:t,...e},n)=>u.jsx(L3,{ref:n,className:qt("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]",t),...e}));s5.displayName=L3.displayName;const lG=x_("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"}}),a5=E.forwardRef(({className:t,variant:e,...n},r)=>u.jsx(B3,{ref:r,className:qt(lG({variant:e}),t),...n}));a5.displayName=B3.displayName;const cG=E.forwardRef(({className:t,...e},n)=>u.jsx(q3,{ref:n,className:qt("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",t),...e}));cG.displayName=q3.displayName;const l5=E.forwardRef(({className:t,...e},n)=>u.jsx(U3,{ref:n,className:qt("absolute right-2 top-2 rounded-md p-1 text-foreground
480/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",t),"toast-close":"",...e,children:u.jsx(w_,{className:"h-4 w-4"})}));l5.displayName=U3.displayName;const c5=E.forwardRef(({className:t,...e},n)=>u.jsx(z3,{ref:n,className:qt("text-sm font-semibold",t),...e}));c5.displayName=z3.displayName;const u5=E.forwardRef(({className:t,...e},n)=>u.jsx(F3,{ref:n,className:qt("text-sm opacity-90",t),...e}));u5.displayName=F3.displayName;function uG(){const{toasts:t}=g3();return u.jsxs(aG,{children:[t.map(function({id:e,title:n,description:r,action:i,...o}){return u.jsxs(a5,{...o,children:[u.jsxs("div",{className:"grid gap-1",children:[n&&u.jsx(c5,{children:n}),r&&u.jsx(u5,{children:r})]}),i,u.jsx(l5,{})]},e)}),u.jsx(s5,{})]})}var wO=["light","dark"],dG="(prefers-color-scheme: dark)",fG=E.createContext(void 0),hG={setTheme:t=>{},themes:[]},pG=()=>{var t;return(t=E.useContext(fG))!=null?t:hG};E.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:s,attrs:a,nonce:l})=>{let c=o==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=i?wO.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(g,m=!1,v=!0)=>{let y=s?s[g]:g,b=m?g+"|| ''":`'${y}'`,x="";return i&&v&&!m&&wO.includes(g)&&(x+=`d.style.colorScheme = '${g}';`),n==="class"?m||y?x+=`c.add(${b})`:x+="null":y&&(x+=`d[s](n,${b})`),x},p=t?`!function(){${d}${h(t)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${dG}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}${c?"":"else{"+h(o,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${e}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}else{${h(o,!1,!1)};}${f}}catch(t){}}();`;return E.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var mG=t=>{switch(t){case"success":return yG;case"info":return xG;case"warning":return bG;case"error":return wG;default:return null}},gG=Array(12).fill(0),vG=({visible:t,className:e})=>A.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},A.createElement("div",{className:"sonner-spinner"},gG.map((n,r)=>A.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),yG=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),bG=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},A.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"})),xG=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),wG=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),SG=A.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"},A.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),A.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),kG=()=>{let[t,e]=A.useState(document.hidden);return A.useEffect(()=>{let n=()=>{e(document.hidden)};
480return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},Ok=1,EG=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,i=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Ok++,o=this.toasts.find(a=>a.id===i),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...t,id:i,title:n}),{...a,...t,id:i,dismissible:s,title:n}):a):this.addToast({title:n,...r,dismissible:s,id:i}),i},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),i=n!==void 0,o,s=r.then(async l=>{if(o=["resolve",l],A.isValidElement(l))i=!1,this.create({id:n,type:"default",message:l});else if(TG(l)&&!l.ok){i=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,d=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:c,description:d})}else if(e.success!==void 0){i=!1;let c=typeof e.success=="function"?await e.success(l):e.success,d=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:c,description:d})}}).catch(async l=>{if(o=["reject",l],e.error!==void 0){i=!1;let c=typeof e.error=="function"?await e.error(l):e.error,d=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:c,description:d})}}).finally(()=>{var l;i&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>s.then(()=>o[0]==="reject"?c(o[1]):l(o[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||Ok++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Rr=new EG,jG=(t,e)=>{let n=(e==null?void 0:e.id)||Ok++;return Rr.addToast({title:t,...e,id:n}),n},TG=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",_G=jG,AG=()=>Rr.toasts,NG=()=>Rr.getActiveToasts(),kt=Object.assign(_G,{success:Rr.success,info:Rr.info,warning:Rr.warning,error:Rr.error,custom:Rr.custom,message:Rr.message,promise:Rr.promise,dismiss:Rr.dismiss,loading:Rr.loading},{getHistory:AG,getToasts:NG});function CG(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}CG(`: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;
480left: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}
480: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%);
480--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%)} 481`);function pg(t){return t.label!==void 0}var OG=3,PG="32px",MG="16px",SO=4e3,RG=356,IG=14,DG=20,$G=200;function Ui(...t){return t.filter(Boolean).join(" ")}function LG(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var BG=t=>{var e,n,r,i,o,s,a,l,c,d,f;let{invert:h,toast:p,unstyled:g,interacting:m,setHeights:v,visibleToasts:y,heights:b,index:x,toasts:S,expanded:w,removeToast:k,defaultRichColors:j,closeButton:T,style:_,cancelButtonStyle:N,actionButtonStyle:C,className:O="",descriptionClassName:I="",duration:P,position:$,gap:B,loadingIcon:z,expandByDefault:R,classNames:L,icons:q,closeButtonAriaLabel:G="Close toast",pauseWhenPageIsHidden:V}=t,[Y,pe]=A.useState(null),[me,Ue]=A.useState(null),[H,de]=A.useState(!1),[X,ce]=A.useState(!1),[ge,K]=A.useState(!1),[Ce,Ee]=A.useState(!1),[Ve,Ke]=A.useState(!1),[lt,xt]=A.useState(0),[vt,M]=A.useState(0),F=A.useRef(p.duration||P||SO),U=A.useRef(null),se=A.useRef(null),ie=x===0,Z=x+1<=y,ue=p.type,Pe=p.dismissible!==!1,et=p.className||"",$n=p.descriptionClassName||"",ci=A.useMemo(()=>b.findIndex(Ie=>Ie.toastId===p.id)||0,[b,p.id]),_r=A.useMemo(()=>{var Ie;return(Ie=p.closeButton)!=null?Ie:T},[p.closeButton,T]),xl=A.useMemo(()=>p.duration||P||SO,[p.duration,P]),ui=A.useRef(0),cr=A.useRef(0),Ar=A.useRef(0),Yn=A.useRef(null),[wl,Qs]=$.split("-"),Wm=A.useMemo(()=>b.reduce((Ie,Oe,it)=>it>=ci?Ie:Ie+Oe.height,0),[b,ci]),Sl=kG(),Hc=p.invert||h,Sf=ue==="loading";cr.current=A.useMemo(()=>ci*B+Wm,[ci,Wm]),A.useEffect(()=>{F.current=xl},[xl]),A.useEffect(()=>{de(!0)},[]),A.useEffect(()=>{let Ie=se.current;if(Ie){let Oe=Ie.getBoundingClientRect().height;return M(Oe),v(it=>[{toastId:p.id,height:Oe,position:p.position},...it]),()=>v(it=>it.filter(Wr=>Wr.toastId!==p.id))}},[v,p.id]),A.useLayoutEffect(()=>{if(!H)return;let Ie=se.current,Oe=Ie.style.height;Ie.style.height="auto";let it=Ie.getBoundingClientRect().height;Ie.style.height=Oe,M(it),v(Wr=>Wr.find(Cr=>Cr.toastId===p.id)?Wr.map(Cr=>Cr.toastId===p.id?{...Cr,height:it}:Cr):[{toastId:p.id,height:it,position:p.position},...Wr])},[H,p.title,p.description,v,p.id]);let Nr=A.useCallback(()=>{ce(!0),xt(cr.current),v(Ie=>Ie.filter(Oe=>Oe.toastId!==p.id)),setTimeout(()=>{k(p)},$G)},[p,k,v,cr]);A.useEffect(()=>{if(p.promise&&ue==="loading"||p.duration===1/0||p.type==="loading")return;let Ie;return w||m||V&&Sl?(()=>
481{if(Ar.current<ui.current){let Oe=new Date().getTime()-ui.current;F.current=F.current-Oe}Ar.current=new Date().getTime()})():F.current!==1/0&&(ui.current=new Date().getTime(),Ie=setTimeout(()=>{var Oe;(Oe=p.onAutoClose)==null||Oe.call(p,p),Nr()},F.current)),()=>clearTimeout(Ie)},[w,m,p,ue,V,Sl,Nr]),A.useEffect(()=>{p.delete&&Nr()},[Nr,p.delete]);function lw(){var Ie,Oe,it;return q!=null&&q.loading?A.createElement("div",{className:Ui(L==null?void 0:L.loader,(Ie=p==null?void 0:p.classNames)==null?void 0:Ie.loader,"sonner-loader"),"data-visible":ue==="loading"},q.loading):z?A.createElement("div",{className:Ui(L==null?void 0:L.loader,(Oe=p==null?void 0:p.classNames)==null?void 0:Oe.loader,"sonner-loader"),"data-visible":ue==="loading"},z):A.createElement(vG,{className:Ui(L==null?void 0:L.loader,(it=p==null?void 0:p.classNames)==null?void 0:it.loader),visible:ue==="loading"})}return A.createElement("li",{tabIndex:0,ref:se,className:Ui(O,et,L==null?void 0:L.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,L==null?void 0:L.default,L==null?void 0:L[ue],(n=p==null?void 0:p.classNames)==null?void 0:n[ue]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:j,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":H,"data-promise":!!p.promise,"data-swiped":Ve,"data-removed":X,"data-visible":Z,"data-y-position":wl,"data-x-position":Qs,"data-index":x,"data-front":ie,"data-swiping":ge,"data-dismissible":Pe,"data-type":ue,"data-invert":Hc,"data-swipe-out":Ce,"data-swipe-direction":me,"data-expanded":!!(w||R&&H),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${X?lt:cr.current}px`,"--initial-height":R?"auto":`${vt}px`,..._,...p.style},onDragEnd:()=>{K(!1),pe(null),Yn.current=null},onPointerDown:Ie=>{Sf||!Pe||(U.current=new Date,xt(cr.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(K(!0),Yn.current={x:Ie.clientX,y:Ie.clientY}))},onPointerUp:()=>{var Ie,Oe,it,Wr;if(Ce||!Pe)return;Yn.current=null;let Cr=Number(((Ie=se.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),di=Number(((Oe=se.current)==null?void 0:Oe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),yo=new Date().getTime()-((it=U.current)==null?void 0:it.getTime()),Or=Y==="x"?Cr:di,bo=Math.abs(Or)/yo;if(Math.abs(Or)>=DG||bo>.11){xt(cr.current),(Wr=p.onDismiss)==null||Wr.call(p,p),Ue(Y==="x"?Cr>0?"right":"left":di>0?"down":"up"),Nr(),Ee(!0),Ke(!1);return}K(!1),pe(null)},onPointerMove:Ie=>{var Oe,it,Wr,Cr;if(!Yn.current||!Pe||((Oe=window.getSelection())==null?void 0:Oe.toString().length)>0)return;let di=Ie.clientY-Yn.current.y,yo=Ie.clientX-Yn.current.x,Or=(it=t.swipeDirections)!=null?it:LG($);!Y&&(Math.abs(yo)>1||Math.abs(di)>1)&&pe(Math.abs(yo)>Math.abs(di)?"x":"y");let bo={x:0,y:0};Y==="y"?(Or.includes("top")||Or.includes("bottom"))&&(Or.includes("top")&&di<0||Or.includes("bottom")&&di>0)&&(bo.y=di):Y==="x"&&(Or.includes("left")||Or.includes("right"))&&(Or.includes("left")&&yo<0||Or.includes("right")&&yo>0)&&(bo.x=yo),(Math.abs(bo.x)>0||Math.abs(bo.y)>0)&&Ke(!0),(Wr=se.current)==null||Wr.style.setProperty("--swipe-amount-x",`${bo.x}px`),(Cr=se.current)==null||Cr.style.setProperty("--swipe-amount-y",`${bo.y}px`)}},_r&&!p.jsx?A.createElement("button",{"aria-label":G,"data-disabled":Sf,"data-close-button":!0,onClick:Sf||!Pe?()=>{}:()=>{var Ie;Nr(),(Ie=p.onDismiss)==null||Ie.call(p,p)},className:Ui(L==null?void 0:L.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},(o=q==null?void 0:q.close)!=null?o:SG):null,p.jsx||E.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:A.createElement(A.Fragment,null,ue||p.icon||p.promise?A.createElement("div",{"data-icon":"",className:Ui(L==null?void 0:L.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||lw():null,p.type!=="loading"?p.icon||(q==null?void 0:q[ue])||mG(ue):null):null,A.createElement("div",{"data-content":"",className:Ui(L==null?void 0:L.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},A.createElement("div",{"data-title":"",className:Ui(L==null?void 0:L.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?A.createElement("div",{"data-description":"",className:Ui(I,$n,L==null?void 0:L.description,(c=p==null?void 0:p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),E.isValidElement(p.cancel)?p.cancel:p.cancel&&pg(p.cancel)?A.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||N,onClick:Ie=>{var Oe,it;pg(p.cancel)&&Pe&&((it=(Oe=p.cancel).onClick)==null||it.call(Oe,Ie),Nr())},className:Ui(L==null?void 0:L.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,E.isValidElement(p.action)?p.action:p.action&&pg(p.action)?A.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||C,onClick:Ie=>{var Oe,it;pg(p.action)&&((it=(Oe=p.action).onClick)==null||it.call(Oe,Ie),!Ie.defaultPrevented&&Nr())},className:Ui(L==null?void 0:L.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function kO(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function zG(t,e){let n={};return[t,e].forEach((r,i)=>{let o=i===1,s=o?"--mobile-offset":"--offset",a=o?MG:PG;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${s}-${c}`]=a:n[`${s}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var FG=E.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:s,className:a,offset:l,mobileOffset:c,theme:d="light",richColors:f,duration:h,style:p,visibleToasts:g=OG,toastOptions:m,dir:v=kO(),gap:y=IG,loadingIcon:b,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:w}=t,[k,j]=A.useState([]),T=A.useMemo(()=>Array.from(new Set([r].concat(k.filter(V=>V.position).map(V=>V.position)))),[k,r]),[_,N]=A.useState([]),[C,O]=A.useState(!1),[I,P]=A.useState(!1),[$,B]=A.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
481k":"light"),z=A.useRef(null),R=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=A.useRef(null),q=A.useRef(!1),G=A.useCallback(V=>{j(Y=>{var pe;return(pe=Y.find(me=>me.id===V.id))!=null&&pe.delete||Rr.dismiss(V.id),Y.filter(({id:me})=>me!==V.id)})},[]);return A.useEffect(()=>Rr.subscribe(V=>{if(V.dismiss){j(Y=>Y.map(pe=>pe.id===V.id?{...pe,delete:!0}:pe));return}setTimeout(()=>{m_.flushSync(()=>{j(Y=>{let pe=Y.findIndex(me=>me.id===V.id);return pe!==-1?[...Y.slice(0,pe),{...Y[pe],...V},...Y.slice(pe+1)]:[V,...Y]})})})}),[]),A.useEffect(()=>{if(d!=="system"){B(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;let V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:Y})=>{B(Y?"dark":"light")})}catch{V.addListener(({matches:pe})=>{try{B(pe?"dark":"light")}catch(me){console.error(me)}})}},[d]),A.useEffect(()=>{k.length<=1&&O(!1)},[k]),A.useEffect(()=>{let V=Y=>{var pe,me;i.every(Ue=>Y[Ue]||Y.code===Ue)&&(O(!0),(pe=z.current)==null||pe.focus()),Y.code==="Escape"&&(document.activeElement===z.current||(me=z.current)!=null&&me.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[i]),A.useEffect(()=>{if(z.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,q.current=!1)}},[z.current]),A.createElement("section",{ref:e,"aria-label":`${S} ${R}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((V,Y)=>{var pe;let[me,Ue]=V.split("-");return k.length?A.createElement("ol",{key:V,dir:v==="auto"?kO():v,tabIndex:-1,ref:z,className:a,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":me,"data-lifted":C&&k.length>1&&!o,"data-x-position":Ue,style:{"--front-toast-height":`${((pe=_[0])==null?void 0:pe.height)||0}px`,"--width":`${RG}px`,"--gap":`${y}px`,...p,...zG(l,c)},onBlur:H=>{q.current&&!H.currentTarget.contains(H.relatedTarget)&&(q.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||q.current||(q.current=!0,L.current=H.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{I||O(!1)},onDragEnd:()=>O(!1),onPointerDown:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||P(!0)},onPointerUp:()=>P(!1)},k.filter(H=>!H.position&&Y===0||H.position===V).map((H,de)=>{var X,ce;return A.createElement(BG,{key:H.id,icons:x,index:de,toast:H,defaultRichColors:f,duration:(X=m==null?void 0:m.duration)!=null?X:h,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:g,closeButton:(ce=m==null?void 0:m.closeButton)!=null?ce:s,interacting:I,position:V,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:G,toasts:k.filter(ge=>ge.position==H.position),heights:_.filter(ge=>ge.position==H.position),setHeights:N,expandByDefault:o,gap:y,loadingIcon:b,expanded:C,pauseWhenPageIsHidden:w,swipeDirections:t.swipeDirections})})):null}))});const qG=({...t})=>{const{theme:e="system"}=pG();return u.jsx(FG,{theme:e,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"}},...t})};var UG=ET[" useId ".trim().toString()]||(()=>{}),VG=0;function bv(t){const[e,n]=E.useState(UG());return Is(()=>{t||n(r=>r??String(VG++))},[t]),t||(e?`radix-${e}`:"")}const WG=["top","right","bottom","left"],tl=Math.min,Xr=Math.max,ny=Math.round,mg=Math.floor,zo=t=>({x:t,y:t}
vendor: 11,921 bytes, line 481
481),HG={left:"right",right:"left",bottom:"top",top:"bottom"},KG={start:"end",end:"start"};function Pk(t,e,n){return Xr(t,tl(e,n))}function Ds(t,e){return typeof t=="function"?t(e):t}function $s(t){return t.split("-")[0]}function nf(t){return t.split("-")[1]}function k_(t){return t==="x"?"y":"x"}function E_(t){return t==="y"?"height":"width"}const GG=new Set(["top","bottom"]);function Po(t){return GG.has($s(t))?"y":"x"}function j_(t){return k_(Po(t))}function JG(t,e,n){n===void 0&&(n=!1);const r=nf(t),i=j_(t),o=E_(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=ry(s)),[s,ry(s)]}function YG(t){const e=ry(t);return[Mk(t),e,Mk(e)]}function Mk(t){return t.replace(/start|end/g,e=>KG[e])}const EO=["left","right"],jO=["right","left"],XG=["top","bottom"],QG=["bottom","top"];function ZG(t,e,n){switch(t){case"top":case"bottom":return n?e?jO:EO:e?EO:jO;case"left":case"right":return e?XG:QG;default:return[]}}function eJ(t,e,n,r){const i=nf(t);let o=ZG($s(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(Mk)))),o}function ry(t){return t.replace(/left|right|bottom|top/g,e=>HG[e])}function tJ(t){return{top:0,right:0,bottom:0,left:0,...t}}function d5(t){return typeof t!="number"?tJ(t):{top:t,right:t,bottom:t,left:t}}function iy(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function TO(t,e,n){let{reference:r,floating:i}=t;const o=Po(e),s=j_(e),a=E_(s),l=$s(e),c=o==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(nf(e)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1);break}return p}const nJ=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:f}=TO(c,r,l),h=r,p={},g=0;for(let m=0;m<a.length;m++){const{name:v,fn:y}=a[m],{x:b,y:x,data:S,reset:w}=await y({x:d,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});d=b??d,f=x??f,p={...p,[v]:{...p[v],...S}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(c=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):w.rects),{x:d,y:f}=TO(c,h,l)),m=-1)}return{x:d,y:f,placement:h,strategy:i,middlewareData:p}};async function fp(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Ds(e,t),g=d5(p),v=a[h?f==="floating"?"reference":"floating":f],y=iy(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),b=f==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),S=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},w=iy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-w.top+g.top)/S.y,bottom:(w.bottom-y.bottom+g.bottom)/S.y,left:(y.left-w.left+g.left)/S.x,right:(w.right-y.right+g.right)/S.x}}const rJ=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:d=0}=Ds(t,e)||{};if(c==null)return{};const f=d5(d),h={x:n,y:r},p=j_(i),g=E_(p),m=await s.getDimensions(c),v=p==="y",y=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=o.reference[g]+o.reference[p]-h[p]-o.floating[g],w=h[p]-o.reference[p],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let j=k?k[x]:0;(!j||!await(s.isElement==null?void 0:s.isElement(k)))&&(j=a.floating[x]||o.floating[g]);const T=S/2-w/2,_=j/2-m[g]/2-1,N=tl(f[y],_),C=tl(f[b],_),O=N,I=j-m[g]-C,P=j/2-m[g]/2+T,$=Pk(O,P,I),B=!l.arrow&&nf(i)!=null&&P!==$&&o.reference[g]/2-(P<O?N:C)-m[g]/2<0,z=B?P<O?P-O:P-I:0;return{[p]:h[p]+z,data:{[p]:$,centerOffset:P-$-z,...B&&{alignmentOffset:z}},reset:B}}}),iJ=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=Ds(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=$s(i),b=Po(a),x=$s(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=h||(x||!m?[ry(a)]:YG(a)),k=g!=="none";!h&&k&&w.push(...eJ(a,m,g,S));const j=[a,...w],T=await fp(e,v),_=[];let N=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&_.push(T[y]),f){const P=JG(i,s,S);_.push(T[P[0]],T[P[1]])}if(N=[...N,{placement:i,overflows:_}],!_.every(P=>P<=0)){var C,O;const P=(((C=o.flip)==null?void 0:C.index)||0)+1,$=j[P];if($&&(!(f==="alignment"?b!==Po($):!1)||N.every(R=>R.overflows[0]>0&&Po(R.placement)===b)))return{data:{index:P,overflows:N},reset:{placement:$}};let B=(O=N.filter(z=>z.overflows[0]<=0).sort((z,R)=>z.overflows[1]-R.overflows[1])[0])==null?void 0:O.placement;if(!B)switch(p){case"bestFit":{var I;const z=(I=N.filter(R=>{if(k){const L=Po(R.placement);return L===b||L==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(L=>L>0).reduce((L,q)=>L+q,0)]).sort((R,L)=>R[1]-L[1])[0])==null?void 0:I[0];z&&(B=z);break}case"initialPlacement":B=a;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function _O(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function AO(t){return WG.some(e=>t[e]>=0)}const oJ=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=Ds(t,e);switch(r){case"referenceHidden":{const o=await fp(e,{...i,elementContext:"reference"}),s=_O(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:AO(s)}}}case"escaped":{const o=await fp(e,{...i,altBoundary:!0}),s=_O(o,n.floating);return{data:{escapedOffsets:s,escaped:AO(s)}}}default:return{}}}}},f5=new Set(["left","top"]);async function sJ(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=$s(n),a=nf(n),l=Po(n)==="y",c=f5.has(s)?-1:1,d=o&&l?-1:1,f=Ds(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}const aJ=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,l=await sJ(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},lJ=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:y,y:b}=v;return{x:y,y:b}}},...l}=Ds(t,e),c={x:n,y:r},d=await fp(e,l),f=Po($s(i)),h=k_(f);let p=c[h],g=c[f];if(o){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=p+d[v],x=p-d[y];p=Pk(b,p,x)}if(s){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=g+d[v],x=g-d[y];g=Pk(b,g,x)}const m=a.fn({...e,[h]:p,[f]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[f]:s}}}}}},cJ=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ds(t,e),d={x:n,y:r},f=Po(i),h=k_(f);let p=d[h],g=d[f];const m=Ds(a,e),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=h==="y"?"height":"width",S=o.reference[h]-o.floating[x]+v.mainAxis,w=o.reference[h]+o.reference[x]-v.mainAxis;p<S?p=S:p>w&&(p=w)}if(c){var y,b;const x=h==="y"?"width":"height",S=f5.has($s(i)),w=o.reference[f]-o.floating[x]+(S&&((y=s.offset)==null?void 0:y[f])||0)+(S?0:v.crossAxis),k=o.reference[f]+o.reference[x]+(S?0:((b=s.offset)==null?void 0:b[f])||0)-(S?v.crossAxis:0);g<w?g=w:g>k&&(g=k)}return{[h]:p,[f]:g}}}},uJ=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:o,platform:s,elements:a}=e,{apply:l=()=>{},...c}=Ds(t,e),d=await fp(e,c),f=$s(i),h=nf(i),p=Po(i)==="y",{width:g,height:m}=o.floating;let v,y;f==="top"||f==="bottom"?(v=f,y=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,v=h==="end"?"top":"bottom");const b=m-d.top-d.bottom,x=g-d.left-d.right,S=tl(m-d[v],b),w=tl(g-d[y],x),k=!e.middlewareData.shift;let j=S,T=w;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=x),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(j=b),k&&!h){const N=Xr(d.left,0),C=Xr(d.right,0),O=Xr(d.top,0),I=Xr(d.bottom,0);p?T=g-2*(N!==0||C!==0?N+C:Xr(d.left,d.right)):j=m-2*(O!==0||I!==0?O+I:Xr(d.top,d.bottom))}await l({...e,availableWidth:T,availableHeight:j});const _=await s.getDimensions(a.floating);return g!==_.width||m!==_.height?{reset:{rects:!0}}:{}}}};function Nx(){return typeof window<"u"}function rf(t){return h5(t)?(t.nodeName||"").toLowerCase():"#document"}function ri(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Jo(t){var e;return(e=(h5(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function h5(t){return Nx()?t instanceof Node||t instanceof ri(t).Node:!1}function po(t){return Nx()?t instanceof Element||t instanceof ri(t).Element:!1}function Wo(t){return Nx()?t instanceof HTMLElement||t instanceof ri(t).HTMLElement:!1}function NO(t){return!Nx()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ri(t).ShadowRoot}const dJ=new Set(["inline","contents"]);function Om(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=mo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!dJ.has(i)}const fJ=new Set(["table","td","th"]);function hJ(t){return fJ.has(rf(t))}const pJ=[":popover-open",":modal"];function Cx(t){return pJ.some(e=>{try{return t.matches(e)}catch{return!1}})}const mJ=["transform","translate","scale","rotate","perspective"],gJ=["transform","translate","scale","rotate","perspective","filter"],vJ=["paint","layout","strict","content"];function T_(t){const e=__(),n=po(t)?mo(t):t;return mJ.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||gJ.some(r=>(n.willChange||"").includes(r))||vJ.some(r=>(n.contain||"").includes(r))}function yJ(t){let e=nl(t);for(;Wo(e)&&!hd(e);){if(T_(e))return e;if(Cx(e))return null;e=nl(e)}return null}function __(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const bJ=new Set(["html","body","#document"]);function hd(t){return bJ.has(rf(t))}function mo(t){return ri(t).getComputedStyle(t)}function Ox(t){return po(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function nl(t){if(rf(t)==="html")return t;const e=t.assignedSlot||t.parentNode||NO(t)&&t.host||Jo(t);return NO(e)?e.host:e}function p5(t){const e=nl(t);return hd(e)?t.ownerDocument?t.ownerDocument.body:t.body:Wo(e)&&Om(e)?e:p5(e)}function hp(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=p5(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=ri(i);if(o){const a=Rk(s);
vendor: 3,382 bytes, line 481
481return e.concat(s,s.visualViewport||[],Om(i)?i:[],a&&n?hp(a):[])}return e.concat(i,hp(i,[],n))}function Rk(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function m5(t){const e=mo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Wo(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=ny(n)!==o||ny(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function A_(t){return po(t)?t:t.contextElement}function Uu(t){const e=A_(t);if(!Wo(e))return zo(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=m5(e);let s=(o?ny(n.width):n.width)/r,a=(o?ny(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const xJ=zo(0);function g5(t){const e=ri(t);return!__()||!e.visualViewport?xJ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function wJ(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ri(t)?!1:e}function kc(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=A_(t);let s=zo(1);e&&(r?po(r)&&(s=Uu(r)):s=Uu(t));const a=wJ(o,n,r)?g5(o):zo(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(o){const h=ri(o),p=r&&po(r)?ri(r):r;let g=h,m=Rk(g);for(;m&&r&&p!==g;){const v=Uu(m),y=m.getBoundingClientRect(),b=mo(m),x=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*v.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,f*=v.y,l+=x,c+=S,g=ri(m),m=Rk(g)}}return iy({width:d,height:f,x:l,y:c})}function N_(t,e){const n=Ox(t).scrollLeft;return e?e.left+n:kc(Jo(t)).left+n}function v5(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:N_(t,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function SJ(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Jo(r),a=e?Cx(e.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=zo(1);const d=zo(0),f=Wo(r);if((f||!f&&!o)&&((rf(r)!=="body"||Om(s))&&(l=Ox(r)),Wo(r))){const p=kc(r);c=Uu(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=s&&!f&&!o?v5(s,l,!0):zo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}}function kJ(t){return Array.from(t.getClientRects())}function EJ(t){const e=Jo(t),n=Ox(t),r=t.ownerDocument.body,i=Xr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Xr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+N_(t);const a=-n.scrollTop;return mo(r).direction==="rtl"&&(s+=Xr(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function jJ(t,e){const n=ri(t),r=Jo(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const c=__();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}const TJ=new Set(["absolute","fixed"]);function _J(t,e){const n=kc(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=Wo(t)?Uu(t):zo(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:s,height:a,x:l,y:c}}function CO(t,e,n){let r;if(e==="viewport")r=jJ(t,n);else if(e==="document")r=EJ(Jo(t));else if(po(e))r=_J(e,n);else{const i=g5(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return iy(r)}function y5(t,e){const n=nl(t);return n===e||!po(n)||hd(n)?!1:mo(n).position==="fixed"||y5(n,e)}function AJ(t,e){const n=e.get(t);if(n)return n;let r=hp(t,[],!1).filter(a=>
vendor: 5,774 bytes, line 481
481po(a)&&rf(a)!=="body"),i=null;const o=mo(t).position==="fixed";let s=o?nl(t):t;for(;po(s)&&!hd(s);){const a=mo(s),l=T_(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&TJ.has(i.position)||Om(s)&&!l&&y5(t,s))?r=r.filter(d=>d!==s):i=a,s=nl(s)}return e.set(t,r),r}function NJ(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?Cx(e)?[]:AJ(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,d)=>{const f=CO(e,d,i);return c.top=Xr(f.top,c.top),c.right=tl(f.right,c.right),c.bottom=tl(f.bottom,c.bottom),c.left=Xr(f.left,c.left),c},CO(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function CJ(t){const{width:e,height:n}=m5(t);return{width:e,height:n}}function OJ(t,e,n){const r=Wo(e),i=Jo(e),o=n==="fixed",s=kc(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=zo(0);function c(){l.x=N_(i)}if(r||!r&&!o)if((rf(e)!=="body"||Om(i))&&(a=Ox(e)),r){const p=kc(e,!0,o,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else i&&c();o&&!r&&i&&c();const d=i&&!r&&!o?v5(i,a):zo(0),f=s.left+a.scrollLeft-l.x-d.x,h=s.top+a.scrollTop-l.y-d.y;return{x:f,y:h,width:s.width,height:s.height}}function Yw(t){return mo(t).position==="static"}function OO(t,e){if(!Wo(t)||mo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Jo(t)===n&&(n=n.ownerDocument.body),n}function b5(t,e){const n=ri(t);if(Cx(t))return n;if(!Wo(t)){let i=nl(t);for(;i&&!hd(i);){if(po(i)&&!Yw(i))return i;i=nl(i)}return n}let r=OO(t,e);for(;r&&hJ(r)&&Yw(r);)r=OO(r,e);return r&&hd(r)&&Yw(r)&&!T_(r)?n:r||yJ(t)||n}const PJ=async function(t){const e=this.getOffsetParent||b5,n=this.getDimensions,r=await n(t.floating);return{reference:OJ(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function MJ(t){return mo(t).direction==="rtl"}const RJ={convertOffsetParentRelativeRectToViewportRelativeRect:SJ,getDocumentElement:Jo,getClippingRect:NJ,getOffsetParent:b5,getElementRects:PJ,getClientRects:kJ,getDimensions:CJ,getScale:Uu,isElement:po,isRTL:MJ};function x5(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function IJ(t,e){let n=null,r;const i=Jo(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const c=t.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=c;if(a||e(),!h||!p)return;const g=mg(f),m=mg(i.clientWidth-(d+h)),v=mg(i.clientHeight-(f+p)),y=mg(d),x={rootMargin:-g+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Xr(0,tl(1,l))||1};let S=!0;function w(k){const j=k[0].intersectionRatio;if(j!==l){if(!S)return s();j?s(!1,j):r=setTimeout(()=>{s(!1,1e-7)},1e3)}j===1&&!x5(c,t.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(w,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,x)}n.observe(t)}return s(!0),o}function DJ(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=A_(t),d=i||o?[...c?hp(c):[],...hp(e)]:[];d.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=c&&a?IJ(c,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(e)})),n()}),c&&!l&&p.observe(c),p.observe(e));let g,m=l?kc(t):null;l&&v();function v(){const y=kc(t);m&&!x5(m,y)&&n(),m=y,g=requestAnimationFrame(v)}return n(),()=>{var y;d.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const $J=aJ,LJ=lJ,BJ=iJ,zJ=uJ,FJ=oJ,PO=rJ,qJ=cJ,UJ=(t,e,n)=>{const r=new Map,i={platform:RJ,...n},o={...i.platform,_c:r};return nJ(t,e,{...i,platform:o})};var VJ=typeof document<"u",WJ=function(){},xv=VJ?E.useLayoutEffect:WJ;function oy(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!oy(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!oy(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function w5(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function MO(t,e){const n=w5(t);return Math.round(e*n)/n}function Xw(t){const e=E.useRef(t);return xv(()=>{e.current=t}),e}function HJ(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[d,f]=E.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,p]=E.useState(r);oy(h,r)||p(r);const[g,m]=E.useState(null),[v,y]=E.useState(null),b=E.useCallback(R=>{R!==k.current&&(k.current=R,m(R))},[]),x=E.useCallback(R=>{R!==j.current&&(j.current=R,y(R))},[]),S=o||g,w=s||v,k=E.useRef(null),j=E.useRef(null),T=E.useRef(d),_=l!=null,N=Xw(l),C=Xw(i),O=Xw(c),I=E.useCallback(()=>{if(!k.current||!j.current)return;const R={placement:e,strategy:n,middleware:h};C.current&&(R.platform=C.current),UJ(k.current,j.current,R).then(L=>{const q={...L,isPositioned:O.current!==!1};P.current&&!oy(T.current,q)&&(T.current=q,Am.flushSync(()=>{f(q)}))})},[h,e,n,C,O]);xv(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[c]);const P=E.useRef(!1);xv(()=>(P.current=!0,()=>{P.current=!1}),[]),xv(()=>
vendor: 1,473 bytes, line 481
481{if(S&&(k.current=S),w&&(j.current=w),S&&w){if(N.current)return N.current(S,w,I);I()}},[S,w,I,N,_]);const $=E.useMemo(()=>({reference:k,floating:j,setReference:b,setFloating:x}),[b,x]),B=E.useMemo(()=>({reference:S,floating:w}),[S,w]),z=E.useMemo(()=>{const R={position:n,left:0,top:0};if(!B.floating)return R;const L=MO(B.floating,d.x),q=MO(B.floating,d.y);return a?{...R,transform:"translate("+L+"px, "+q+"px)",...w5(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:q}},[n,a,B.floating,d.x,d.y]);return E.useMemo(()=>({...d,update:I,refs:$,elements:B,floatingStyles:z}),[d,I,$,B,z])}const KJ=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?PO({element:r.current,padding:i}).fn(n):{}:r?PO({element:r,padding:i}).fn(n):{}}}},GJ=(t,e)=>({...$J(t),options:[t,e]}),JJ=(t,e)=>({...LJ(t),options:[t,e]}),YJ=(t,e)=>({...qJ(t),options:[t,e]}),XJ=(t,e)=>({...BJ(t),options:[t,e]}),QJ=(t,e)=>({...zJ(t),options:[t,e]}),ZJ=(t,e)=>({...FJ(t),options:[t,e]}),eY=(t,e)=>({...KJ(t),options:[t,e]});var tY="Arrow",S5=E.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...o}=t;return u.jsx(gt.svg,{...o,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});S5.displayName=tY;var nY=S5;function C_(t){const[e,n]=E.useState(void 0);return Is(()=>
vendor: 5,219 bytes, line 481
481{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=t.offsetWidth,a=t.offsetHeight;n({width:s,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var O_="Popper",[k5,E5]=Lc(O_),[rY,j5]=k5(O_),T5=t=>{const{__scopePopper:e,children:n}=t,[r,i]=E.useState(null);return u.jsx(rY,{scope:e,anchor:r,onAnchorChange:i,children:n})};T5.displayName=O_;var _5="PopperAnchor",A5=E.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,o=j5(_5,n),s=E.useRef(null),a=Ft(e,s);return E.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:u.jsx(gt.div,{...i,ref:a})});A5.displayName=_5;var P_="PopperContent",[iY,oY]=k5(P_),N5=E.forwardRef((t,e)=>{var H,de,X,ce,ge,K;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=t,v=j5(P_,n),[y,b]=E.useState(null),x=Ft(e,Ce=>b(Ce)),[S,w]=E.useState(null),k=C_(S),j=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,_=r+(o!=="center"?"-"+o:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},C=Array.isArray(c)?c:[c],O=C.length>0,I={padding:N,boundary:C.filter(aY),altBoundary:O},{refs:P,floatingStyles:$,placement:B,isPositioned:z,middlewareData:R}=HJ({strategy:"fixed",placement:_,whileElementsMounted:(...Ce)=>DJ(...Ce,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[GJ({mainAxis:i+T,alignmentAxis:s}),l&&JJ({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?YJ():void 0,...I}),l&&XJ({...I}),QJ({...I,apply:({elements:Ce,rects:Ee,availableWidth:Ve,availableHeight:Ke})=>{const{width:lt,height:xt}=Ee.reference,vt=Ce.floating.style;vt.setProperty("--radix-popper-available-width",`${Ve}px`),vt.setProperty("--radix-popper-available-height",`${Ke}px`),vt.setProperty("--radix-popper-anchor-width",`${lt}px`),vt.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),S&&eY({element:S,padding:a}),lY({arrowWidth:j,arrowHeight:T}),h&&ZJ({strategy:"referenceHidden",...I})]}),[L,q]=P5(B),G=Vo(g);Is(()=>{z&&(G==null||G())},[z,G]);const V=(H=R.arrow)==null?void 0:H.x,Y=(de=R.arrow)==null?void 0:de.y,pe=((X=R.arrow)==null?void 0:X.centerOffset)!==0,[me,Ue]=E.useState();return Is(()=>{y&&Ue(window.getComputedStyle(y).zIndex)},[y]),u.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:z?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(ce=R.transformOrigin)==null?void 0:ce.x,(ge=R.transformOrigin)==null?void 0:ge.y].join(" "),...((K=R.hide)==null?void 0:K.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:u.jsx(iY,{scope:n,placedSide:L,onArrowChange:w,arrowX:V,arrowY:Y,shouldHideArrow:pe,children:u.jsx(gt.div,{"data-side":L,"data-align":q,...m,ref:x,style:{...m.style,animation:z?void 0:"none"}})})})});N5.displayName=P_;var C5="PopperArrow",sY={top:"bottom",right:"left",bottom:"top",left:"right"},O5=E.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,o=oY(C5,r),s=sY[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]: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:u.jsx(nY,{...i,ref:n,style:{...i.style,display:"block"}})})});O5.displayName=C5;function aY(t){return t!==null}var lY=t=>({name:"transformOrigin",options:t,fn(e){var v,y,b;const{placement:n,rects:r,middlewareData:i}=e,s=((v=i.arrow)==null?void 0:v.centerOffset)!==0,a=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[c,d]=P5(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,p=(((b=i.arrow)==null?void 0:b.y)??0)+l/2;let g="",m="";return c==="bottom"?(g=s?f:`${h}px`,m=`${-l}px`):c==="top"?(g=s?f:`${h}px`,m=`${r.floating.height+l}px`):c==="right"?(g=`${-l}px`,m=s?f:`${p}px`):c==="left"&&(g=`${r.floating.width+l}px`,m=s?f:`${p}px`),{data:{x:g,y:m}}}});function P5(t){const[e,n="center"]=t.split("-");return[e,n]}var cY=T5,uY=A5,dY=N5,fY=O5,[Px,fLe]=Lc("Tooltip",[E5]),Mx=E5(),M5="TooltipProvider",hY=700,Ik="tooltip.open",[pY,M_]=Px(M5),R5=t=>{const{__scopeTooltip:e,delayDuration:n=hY,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=t,s=E.useRef(!0),a=E.useRef(!1),l=E.useRef(0);return E.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),u.jsx(pY,{scope:e,isOpenDelayedRef:s,delayDuration:n,onOpen:E.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:E.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:E.useCallback(c=>{a.current=c}
vendor: 6,527 bytes, line 481
481,[]),disableHoverableContent:i,children:o})};R5.displayName=M5;var pp="Tooltip",[mY,Rx]=Px(pp),I5=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=t,l=M_(pp,t.__scopeTooltip),c=Mx(e),[d,f]=E.useState(null),h=bv(),p=E.useRef(0),g=s??l.disableHoverableContent,m=a??l.delayDuration,v=E.useRef(!1),[y,b]=Nm({prop:r,defaultProp:i??!1,onChange:j=>{j?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ik))):l.onClose(),o==null||o(j)},caller:pp}),x=E.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),S=E.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,b(!0)},[b]),w=E.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),k=E.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,b(!0),p.current=0},m)},[m,b]);return E.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),u.jsx(cY,{...c,children:u.jsx(mY,{scope:e,contentId:h,open:y,stateAttribute:x,trigger:d,onTriggerChange:f,onTriggerEnter:E.useCallback(()=>{l.isOpenDelayedRef.current?k():S()},[l.isOpenDelayedRef,k,S]),onTriggerLeave:E.useCallback(()=>{g?w():(window.clearTimeout(p.current),p.current=0)},[w,g]),onOpen:S,onClose:w,disableHoverableContent:g,children:n})})};I5.displayName=pp;var Dk="TooltipTrigger",D5=E.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=Rx(Dk,n),o=M_(Dk,n),s=Mx(n),a=E.useRef(null),l=Ft(e,a,i.onTriggerChange),c=E.useRef(!1),d=E.useRef(!1),f=E.useCallback(()=>c.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(uY,{asChild:!0,...s,children:u.jsx(gt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:ot(t.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:ot(t.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:ot(t.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ot(t.onFocus,()=>{c.current||i.onOpen()}),onBlur:ot(t.onBlur,i.onClose),onClick:ot(t.onClick,i.onClose)})})});D5.displayName=Dk;var gY="TooltipPortal",[hLe,vY]=Px(gY,{forceMount:void 0}),pd="TooltipContent",$5=E.forwardRef((t,e)=>{const n=vY(pd,t.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=t,s=Rx(pd,t.__scopeTooltip);return u.jsx(ef,{present:r||s.open,children:s.disableHoverableContent?u.jsx(L5,{side:i,...o,ref:e}):u.jsx(yY,{side:i,...o,ref:e})})}),yY=E.forwardRef((t,e)=>{const n=Rx(pd,t.__scopeTooltip),r=M_(pd,t.__scopeTooltip),i=E.useRef(null),o=Ft(e,i),[s,a]=E.useState(null),{trigger:l,onClose:c}=n,d=i.current,{onPointerInTransitChange:f}=r,h=E.useCallback(()=>{a(null),f(!1)},[f]),p=E.useCallback((g,m)=>{const v=g.currentTarget,y={x:g.clientX,y:g.clientY},b=kY(y,v.getBoundingClientRect()),x=EY(y,b),S=jY(m.getBoundingClientRect()),w=_Y([...x,...S]);a(w),f(!0)},[f]);return E.useEffect(()=>()=>h(),[h]),E.useEffect(()=>{if(l&&d){const g=v=>p(v,d),m=v=>p(v,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",m)}}},[l,d,p,h]),E.useEffect(()=>{if(s){const g=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},b=(l==null?void 0:l.contains(v))||(d==null?void 0:d.contains(v)),x=!TY(y,s);b?h():x&&(h(),c())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,s,c,h]),u.jsx(L5,{...t,ref:o})}),[bY,xY]=Px(pp,{isInside:!1}),wY=e7("TooltipContent"),L5=E.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=t,l=Rx(pd,n),c=Mx(n),{onClose:d}=l;return E.useEffect(()=>(document.addEventListener(Ik,d),()=>document.removeEventListener(Ik,d)),[d]),E.useEffect(()=>{if(l.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.jsx(jx,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(dY,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.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:[u.jsx(wY,{children:r}),u.jsx(bY,{scope:n,isInside:!0,children:u.jsx(k7,{id:l.contentId,role:"tooltip",children:i||r})})]})})});$5.displayName=pd;var B5="TooltipArrow",SY=E.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=Mx(n);return xY(B5,n).isInside?null:u.jsx(fY,{...i,...r,ref:e})});SY.displayName=B5;function kY(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),o=Math.abs(e.left-t.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function EY(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function jY(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function TY(t,e){const{x:n,y:r}=t;let i=!1;for(let o=0,s=e.length-1;o<e.length;s=o++){const a=e[o],l=e[s],c=a.x,d=a.y,f=l.x,h=l.y;d>r!=h>r&&n<(f-c)*(r-d)/(h-d)+c&&(i=!i)}return i}function _Y(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),AY(e)}function AY(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const o=e[e.length-1],s=e[e.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}
vendor: 24,369 bytes, line 481
481var NY=R5,CY=I5,OY=D5,z5=$5;const F5=NY,PY=CY,MY=OY,q5=E.forwardRef(({className:t,sideOffset:e=4,...n},r)=>u.jsx(z5,{ref:r,sideOffset:e,className:qt("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",t),...n}));q5.displayName=z5.displayName;var Ix=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Dx=typeof window>"u"||"Deno"in globalThis;function Gi(){}function RY(t,e){return typeof t=="function"?t(e):t}function IY(t){return typeof t=="number"&&t>=0&&t!==1/0}function DY(t,e){return Math.max(t+(e||0)-Date.now(),0)}function $k(t,e){return typeof t=="function"?t(e):t}function $Y(t,e){return typeof t=="function"?t(e):t}function RO(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=t;if(s){if(r){if(e.queryHash!==R_(s,e.options))return!1}else if(!gp(e.queryKey,s))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||o&&!o(e))}function IO(t,e){const{exact:n,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(mp(e.options.mutationKey)!==mp(o))return!1}else if(!gp(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function R_(t,e){return((e==null?void 0:e.queryKeyHashFn)||mp)(t)}function mp(t){return JSON.stringify(t,(e,n)=>Lk(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function gp(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>gp(t[n],e[n])):!1}function U5(t,e){if(t===e)return t;const n=DO(t)&&DO(e);if(n||Lk(t)&&Lk(e)){const r=n?t:Object.keys(t),i=r.length,o=n?e:Object.keys(e),s=o.length,a=n?[]:{},l=new Set(r);let c=0;for(let d=0;d<s;d++){const f=n?d:o[d];(!n&&l.has(f)||n)&&t[f]===void 0&&e[f]===void 0?(a[f]=void 0,c++):(a[f]=U5(t[f],e[f]),a[f]===t[f]&&t[f]!==void 0&&c++)}return i===s&&c===i?t:a}return e}function DO(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Lk(t){if(!$O(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!$O(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function $O(t){return Object.prototype.toString.call(t)==="[object Object]"}function LY(t){return new Promise(e=>{setTimeout(e,t)})}function BY(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?U5(t,e):e}function zY(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function FY(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var I_=Symbol();function V5(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===I_?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var ec,xa,Qu,J$,qY=(J$=class extends Ix{constructor(){super();tt(this,ec);tt(this,xa);tt(this,Qu);Be(this,Qu,e=>{if(!Dx&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){J(this,xa)||this.setEventListener(J(this,Qu))}onUnsubscribe(){var e;this.hasListeners()||((e=J(this,xa))==null||e.call(this),Be(this,xa,void 0))}setEventListener(e){var n;Be(this,Qu,e),(n=J(this,xa))==null||n.call(this),Be(this,xa,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){J(this,ec)!==e&&(Be(this,ec,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof J(this,ec)=="boolean"?J(this,ec):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ec=new WeakMap,xa=new WeakMap,Qu=new WeakMap,J$),W5=new qY,Zu,wa,ed,Y$,UY=(Y$=class extends Ix{constructor(){super();tt(this,Zu,!0);tt(this,wa);tt(this,ed);Be(this,ed,e=>{if(!Dx&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){J(this,wa)||this.setEventListener(J(this,ed))}onUnsubscribe(){var e;this.hasListeners()||((e=J(this,wa))==null||e.call(this),Be(this,wa,void 0))}setEventListener(e){var n;Be(this,ed,e),(n=J(this,wa))==null||n.call(this),Be(this,wa,e(this.setOnline.bind(this)))}setOnline(e){J(this,Zu)!==e&&(Be(this,Zu,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return J(this,Zu)}},Zu=new WeakMap,wa=new WeakMap,ed=new WeakMap,Y$),sy=new UY;function VY(){let t,e;const n=new Promise((i,o)=>{t=i,e=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}function WY(t){return Math.min(1e3*2**t,3e4)}function H5(t){return(t??"online")==="online"?sy.isOnline():!0}var K5=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Qw(t){return t instanceof K5}function G5(t){let e=!1,n=0,r=!1,i;const o=VY(),s=m=>{var v;r||(h(new K5(m)),(v=t.abort)==null||v.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>W5.isFocused()&&(t.networkMode==="always"||sy.isOnline())&&t.canRun(),d=()=>H5(t.networkMode)&&t.canRun(),f=m=>{var v;r||(r=!0,(v=t.onSuccess)==null||v.call(t,m),i==null||i(),o.resolve(m))},h=m=>{var v;r||(r=!0,(v=t.onError)==null||v.call(t,m),i==null||i(),o.reject(m))},p=()=>new Promise(m=>{var v;i=y=>{(r||c())&&m(y)},(v=t.onPause)==null||v.call(t)}).then(()=>{var m;i=void 0,r||(m=t.onContinue)==null||m.call(t)}),g=()=>{if(r)return;let m;const v=n===0?t.initialPromise:void 0;try{m=v??t.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{var k;if(r)return;const b=t.retry??(Dx?0:3),x=t.retryDelay??WY,S=typeof x=="function"?x(n,y):x,w=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,y);if(e||!w){h(y);return}n++,(k=t.onFail)==null||k.call(t,n,y),LY(S).then(()=>c()?void 0:p()).then(()=>{e?h(y):g()})})};return{promise:o,cancel:s,continue:()=>(i==null||i(),o),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?g():p().then(g),o)}}var HY=t=>setTimeout(t,0);function KY(){let t=[],e=0,n=a=>{a()},r=a=>{a()},i=HY;const o=a=>{e?t.push(a):i(()=>{n(a)})},s=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||s()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var pr=KY(),tc,X$,J5=(X$=class{constructor(){tt(this,tc)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),IY(this.gcTime)&&Be(this,tc,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Dx?1/0:5*60*1e3))}clearGcTimeout(){J(this,tc)&&(clearTimeout(J(this,tc)),Be(this,tc,void 0))}},tc=new WeakMap,X$),td,nc,vi,rc,tr,wm,ic,Yi,as,Q$,GY=(Q$=class extends J5{constructor(e){super();tt(this,Yi);tt(this,td);tt(this,nc);tt(this,vi);tt(this,rc);tt(this,tr);tt(this,wm);tt(this,ic);Be(this,ic,!1),Be(this,wm,e.defaultOptions),this.setOptions(e.options),this.observers=[],Be(this,rc,e.client),Be(this,vi,J(this,rc).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Be(this,td,YY(this.options)),this.state=e.state??J(this,td),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=J(this,tr))==null?void 0:e.promise}setOptions(e){this.options={...J(this,wm),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&J(this,vi).remove(this)}setData(e,n){const r=BY(this.state.data,e,this.options);return Qn(this,Yi,as).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Qn(this,Yi,as).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=J(this,tr))==null?void 0:r.promise;return(i=J(this,tr))==null||i.cancel(e),n?n.then(Gi).catch(Gi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(J(this,td))}isActive(){return this.observers.some(e=>$Y(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===I_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>$k(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!DY(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=J(this,tr))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=J(this,tr))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),J(this,vi).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(J(this,tr)&&(J(this,ic)?J(this,tr).cancel({revert:!0}):J(this,tr).cancelRetry()),this.scheduleGc()),J(this,vi).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Qn(this,Yi,as).call(this,{type:"invalidate"})}fetch(e,n){var c,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(J(this,tr))return J(this,tr).continueRetry(),J(this,tr).promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(Be(this,ic,!0),r.signal)})},o=()=>{const h=V5(this.options,n),g=(()=>{const m={client:J(this,rc),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return Be(this,ic,!1),this.options.persister?this.options.persister(h,g,this):h(g)},a=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:J(this,rc),state:this.state,fetchFn:o};return i(h),h})();(c=this.options.behavior)==null||c.onFetch(a,this),Be(this,nc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&Qn(this,Yi,as).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const l=h=>{var p,g,m,v;Qw(h)&&h.silent||Qn(this,Yi,as).call(this,{type:"error",error:h}),Qw(h)||((g=(p=J(this,vi).config).onError)==null||g.call(p,h,this),(v=(m=J(this,vi).config).onSettled)==null||v.call(m,this.state.data,h,this)),this.scheduleGc()};return Be(this,tr,G5({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var p,g,m,v;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(y){l(y);return}(g=(p=J(this,vi).config).onSuccess)==null||g.call(p,h,this),(v=(m=J(this,vi).config).onSettled)==null||v.call(m,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,p)=>{Qn(this,Yi,as).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{Qn(this,Yi,as).call(this,{type:"pause"})},onContinue:()=>{Qn(this,Yi,as).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),J(this,tr).start()}},td=new WeakMap,nc=new WeakMap,vi=new WeakMap,rc=new WeakMap,tr=new WeakMap,wm=new WeakMap,ic=new WeakMap,Yi=new WeakSet,as=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...JY(r.data,this.options),fetchMeta:e.meta??null};case"success":return Be(this,nc,void 0),{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return Qw(i)&&i.revert&&J(this,nc)?{...J(this,nc),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),pr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),J(this,vi).notify({query:this,type:"updated",action:e})})},Q$);function JY(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:H5(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function YY(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var _o,Z$,XY=(Z$=class extends Ix{constructor(e={}){super();tt(this,_o);this.config=e,Be(this,_o,new Map)}build(e,n,r){const i=n.queryKey,o=n.queryHash??R_(i,n);let s=this.get(o);return s||(s=new GY({client:e,queryKey:i,queryHash:o,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){J(this,_o).has(e.queryHash)||(J(this,_o).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=J(this,_o).get(e.queryHash);n&&(e.destroy(),n===e&&J(this,_o).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){pr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return J(this,_o).get(e)}getAll(){return[...J(this,_o).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>RO(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>RO(e,r)):n}notify(e){pr.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){pr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){pr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_o=new WeakMap,Z$),Ao,dr,oc,No,ra,eL,QY=(eL=class extends J5{constructor(e){super();tt(this,No);tt(this,Ao);tt(this,dr);tt(this,oc);this.mutationId=e.mutationId,Be(this,dr,e.mutationCache),Be(this,Ao,[]),this.state=e.state||ZY(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){J(this,Ao).includes(e)||(J(this,Ao).push(e),this.clearGcTimeout(),J(this,dr).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Be(this,Ao,J(this,Ao).filter(n=>n!==e)),this.scheduleGc(),J(this,dr).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){J(this,Ao).length||(this.state.status==="pending"?this.scheduleGc():J(this,dr).remove(this))}continue(){var e;return((e=J(this,oc))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,s,a,l,c,d,f,h,p,g,m,v,y,b,x,S,w,k,j,T;const n=()=>{Qn(this,No,ra).call(this,{type:"continue"})};Be(this,oc,G5({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(_,N)=>{Qn(this,No,ra).call(this,{type:"failed",failureCount:_,error:N})},onPause:()=>{Qn(this,No,ra).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>J(this,dr).canRun(this)}));const r=this.state.status==="pending",i=!J(this,oc).canStart();try{if(r)n();else{Qn(this,No,ra).call(this,{type:"pending",variables:e,isPaused:i}),await((s=(o=J(this,dr).config).onMutate)==null?void 0:s.call(o,e,this));const N=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));N!==this.state.context&&Qn(this,No,ra).call(this,{type:"pending",context:N,variables:e,isPaused:i})}const _=await J(this,oc).start();return await((d=(c=J(this,dr).config).onSuccess)==null?void 0:d.call(c,_,e,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,_,e,this.state.context)),await((g=(p=J(this,dr).config).onSettled)==null?void 0:g.call(p,_,null,this.state.variables,this.state.context,this)),await((v=(m=this.options).onSettled)==null?void 0:v.call(m,_,null,e,this.state.context)),Qn(this,No,ra).call(this,{type:"success",data:_}),_}catch(_){try{throw await((b=(y=J(this,dr).config).onError)==null?void 0:b.call(y,_,e,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,_,e,this.state.context)),await((k=(w=J(this,dr).config).onSettled)==null?void 0:k.call(w,void 0,_,this.state.variables,this.state.context,this)),await((T=(j=this.options).onSettled)==null?void 0:T.call(j,void 0,_,e,this.state.context)),_}finally{Qn(this,No,ra).call(this,{type:"error",error:_})}}finally{J(this,dr).runNext(this)}}},Ao=new WeakMap,dr=new WeakMap,oc=new WeakMap,No=new WeakSet,ra=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),pr.batch(()=>{J(this,Ao).forEach(r=>{r.onMutationUpdate(e)}),J(this,dr).notify({mutation:this,type:"updated",action:e})})},eL);function ZY(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ps,Xi,Sm,tL,eX=(tL=class extends Ix{constructor(e={}){super();tt(this,ps);tt(this,Xi);tt(this,Sm);this.config=e,Be(this,ps,new Set),Be(this,Xi,new Map),Be(this,Sm,0)}build(e,n,r){const i=new QY({mutationCache:this,mutationId:++Hm(this,Sm)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){J(this,ps).add(e);const n=gg(e);if(typeof n=="string"){const r=J(this,Xi).get(n);r?r.push(e):J(this,Xi).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(J(this,ps).delete(e)){const n=gg(e);if(typeof n=="string"){const r=J(this,Xi).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&J(this,Xi).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=gg(e);if(typeof n=="string"){const r=J(this,Xi).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=gg(e);if(typeof n=="string"){const i=(r=J(this,Xi).get(n))==null?void 0:r.find(o=>o!==e&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){pr.batch(()=>{J(this,ps).forEach(e=>{this.notify({type:"removed",mutation:e})}),J(this,ps).clear(),J(this,Xi).clear()})}getAll(){return Array.from(J(this,ps))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>IO(n,r))}findAll(e={}){return this.getAll().filter(n=>IO(e,n))}notify(e){pr.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return pr.batch(()=>Promise.all(e.map(n=>n.continue().catch(Gi))))}},ps=new WeakMap,Xi=new WeakMap,Sm=new WeakMap,tL);function gg(t){var e;return(e=t.options.scope)==null?void 0:e.id}function LO(t){return{onFetch:(e,n)=>{var d,f,h,p,g;const r=e.options,i=(h=(f=(d=e.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,o=((p=e.state.data)==null?void 0:p.pages)||[],s=((g=e.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const v=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},y=V5(e.options,e.fetchOptions),b=async(x,S,w)=>{if(m)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const j=(()=>{const C={client:e.client,queryKey:e.queryKey,pageParam:S,direction:w?"backward":"forward",meta:e.options.meta};return v(C),C})(),T=await y(j),{maxPages:_}=e.options,N=w?FY:zY;return{pages:N(x.pages,T,_),pageParams:N(x.pageParams,S,_)}};if(i&&o.length){const x=i==="backward",S=x?tX:BO,w={pages:o,pageParams:s},k=S(r,w);a=await b(w,k,x)}else{const x=t??o.length;do{const S=l===0?s[0]??r.initialPageParam:BO(r,a);if(l>0&&S==null)break;a=await b(a,S),l++}while(l<x)}return a};e.options.persister?e.fetchFn=()=>{var m,v;return(v=(m=e.options).persister)==null?void 0:v.call(m,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=c}}}function BO(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function tX(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var Wt,Sa,ka,nd,rd,Ea,id,od,nL,nX=(nL=class{constructor(t={}){tt(this,Wt);tt(this,Sa);tt(this,ka);tt(this,nd);tt(this,rd);tt(this,Ea);tt(this,id);tt(this,od);Be(this,Wt,t.queryCache||new XY),Be(this,Sa,t.mutationCache||new eX),Be(this,ka,t.defaultOptions||{}),Be(this,nd,new Map),Be(this,rd,new Map),Be(this,Ea,0)}mount(){Hm(this,Ea)._++,J(this,Ea)===1&&(Be(this,id,W5.subscribe(async t=>{t&&(await this.resumePausedMutations(),J(this,Wt).onFocus())})),Be(this,od,sy.subscribe(async t=>{t&&(await this.resumePausedMutations(),J(this,Wt).onOnline())})))}unmount(){var t,e;Hm(this,Ea)._--,J(this,Ea)===0&&((t=J(this,id))==null||t.call(this),Be(this,id,void 0),(e=J(this,od))==null||e.call(this),Be(this,od,void 0))}isFetching(t){return J(this,Wt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return J(this,Sa).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=J(this,Wt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=J(this,Wt).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime($k(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return J(this,Wt).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=J(this,Wt).get(r.queryHash),o=i==null?void 0:i.state.data,s=RY(e,o);if(s!==void 0)return J(this,Wt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(t,e,n){return pr.batch(()=>J(this,Wt).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=J(this,Wt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=J(this,Wt);pr.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=J(this,Wt);return pr.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=pr.batch(()=>J(this,Wt).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Gi).catch(Gi)}invalidateQueries(t,e={}){return pr.batch(()=>(J(this,Wt).findAll(t).forEach(n=>
481{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=pr.batch(()=>J(this,Wt).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Gi)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Gi)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=J(this,Wt).build(this,e);return n.isStaleByTime($k(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Gi).catch(Gi)}fetchInfiniteQuery(t){return t.behavior=LO(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Gi).catch(Gi)}ensureInfiniteQueryData(t){return t.behavior=LO(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return sy.isOnline()?J(this,Sa).resumePausedMutations():Promise.resolve()}getQueryCache(){return J(this,Wt)}getMutationCache(){return J(this,Sa)}getDefaultOptions(){return J(this,ka)}setDefaultOptions(t){Be(this,ka,t)}setQueryDefaults(t,e){J(this,nd).set(mp(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...J(this,nd).values()],n={};return e.forEach(r=>{gp(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){J(this,rd).set(mp(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...J(this,rd).values()],n={};return e.forEach(r=>{gp(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...J(this,ka).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=R_(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===I_&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...J(this,ka).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){J(this,Wt).clear(),J(this,Sa).clear()}},Wt=new WeakMap,Sa=new WeakMap,ka=new WeakMap,nd=new WeakMap,rd=new WeakMap,Ea=new WeakMap,id=new WeakMap,od=new WeakMap,nL),rX=E.createContext(void 0),iX=({client:t,children:e})=>(E.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),u.jsx(rX.Provider,{value:t,children:e}));/** 482 * @remix-run/router v1.23.0 483 * 484 * Copyright (c) Remix Software Inc. 485 * 486 * This source code is licensed under the MIT license found in the 487 * LICENSE.md file in the root directory of this source tree. 488 * 489 * @license MIT 490 */function vp(){return vp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},vp.apply(this,arguments)}var _a;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(_a||(_a={}));const zO="popstate";function oX(t){t===void 0&&(t={});function e(r,i){let{pathname:o,search:s,hash:a}=r.location;return Bk("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:ay(i)}return aX(e,n,null,t)}function on(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Y5(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function sX(){return Math.random().toString(36).substr(2,8)}function FO(t,e){return{usr:t.state,key:t.key,idx:e}}function Bk(t,e,n,r){return n===void 0&&(n=null),vp({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?of(e):e,{state:n,key:e&&e.key||r||sX()})}function ay(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function of(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function aX(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=_a.Pop,l=null,c=d();c==null&&(c=0,s.replaceState(vp({},s.state,{idx:c}),""));function d(){return(s.state||{idx:null}).idx}function f(){a=_a.Pop;let v=d(),y=v==null?null:v-c;c=v,l&&l({action:a,location:m.location,delta:y})}function h(v,y){a=_a.Push;let b=Bk(m.location,v,y);c=d()+1;let x=FO(b,c),S=m.createHref(b);
vendor: 3,348 bytes, line 490
490try{s.pushState(x,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}o&&l&&l({action:a,location:m.location,delta:1})}function p(v,y){a=_a.Replace;let b=Bk(m.location,v,y);c=d();let x=FO(b,c),S=m.createHref(b);s.replaceState(x,"",S),o&&l&&l({action:a,location:m.location,delta:0})}function g(v){let y=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof v=="string"?v:ay(v);return b=b.replace(/ $/,"%20"),on(y,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,y)}let m={get action(){return a},get location(){return t(i,s)},listen(v){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(zO,f),l=v,()=>{i.removeEventListener(zO,f),l=null}},createHref(v){return e(i,v)},createURL:g,encodeLocation(v){let y=g(v);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(v){return s.go(v)}};return m}var qO;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(qO||(qO={}));function lX(t,e,n){return n===void 0&&(n="/"),cX(t,e,n,!1)}function cX(t,e,n,r){let i=typeof e=="string"?of(e):e,o=D_(i.pathname||"/",n);if(o==null)return null;let s=X5(t);uX(s);let a=null;for(let l=0;a==null&&l<s.length;++l){let c=wX(o);a=bX(s[l],c,r)}return a}function X5(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,s,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(on(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Va([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(on(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),X5(o.children,e,d,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:vX(c,o.index),routesMeta:d})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of Q5(o.path))i(o,s,l)}),e}function Q5(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=Q5(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function uX(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:yX(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const dX=/^:[\w-]+$/,fX=3,hX=2,pX=1,mX=10,gX=-2,UO=t=>t==="*";function vX(t,e){let n=t.split("/"),r=n.length;return n.some(UO)&&(r+=gX),e&&(r+=hX),n.filter(i=>!UO(i)).reduce((i,o)=>i+(dX.test(o)?fX:o===""?pX:mX),r)}function yX(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function bX(t,e,n){let{routesMeta:r}=t,i={},o="/",s=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=o==="/"?e:e.slice(o.length)||"/",f=VO({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),h=l.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=VO({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;
vendor: 6,917 bytes, lines 490-499
490Object.assign(i,f.params),s.push({params:i,pathname:Va([o,f.pathname]),pathnameBase:jX(Va([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=Va([o,f.pathnameBase]))}return s}function VO(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=xX(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let m=a[f]||"";s=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const g=a[f];return p&&!g?c[h]=void 0:c[h]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:t}}function xX(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Y5(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function wX(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Y5(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function D_(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function SX(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?of(t):t;return{pathname:n?n.startsWith("/")?n:kX(n,e):e,search:TX(r),hash:_X(i)}}function kX(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Zw(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function EX(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function $_(t,e){let n=EX(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function L_(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=of(t):(i=vp({},t),on(!i.pathname||!i.pathname.includes("?"),Zw("?","pathname","search",i)),on(!i.pathname||!i.pathname.includes("#"),Zw("#","pathname","hash",i)),on(!i.search||!i.search.includes("#"),Zw("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let f=e.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?e[f]:"/"}let l=SX(i,a),c=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Va=t=>t.join("/").replace(/\/\/+/g,"/"),jX=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),TX=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,_X=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function AX(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Z5=["post","put","patch","delete"];new Set(Z5);const NX=["get",...Z5];new Set(NX);/** 491 * React Router v6.30.1 492 * 493 * Copyright (c) Remix Software Inc. 494 * 495 * This source code is licensed under the MIT license found in the 496 * LICENSE.md file in the root directory of this source tree. 497 * 498 * @license MIT 499 */function yp(){return yp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yp.apply(this,arguments)}const B_=E.createContext(null),CX=E.createContext(null),ul=E.createContext(null),$x=E.createContext(null),Vs=E.createContext({outlet:null,matches:[],isDataRoute:!1}),eB=E.createContext(null);function OX(t,e){let{relative:n}=e===void 0?{}:e;sf()||on(!1);let{basename:r,navigator:i}=E.useContext(ul),{hash:o,pathname:s,search:a}=nB(t,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:Va([r,s])),i.createHref({pathname:l,search:a,hash:o})}function sf(){return E.useContext($x)!=null}function dl(){return sf()||on(!1),E.useContext($x).location}function tB(t){E.useContext(ul).static||E.useLayoutEffect(t)}function Lx(){let{isDataRoute:t}=E.useContext(Vs);return t?WX():PX()}function PX(){sf()||on(!1);let t=E.useContext(B_),{basename:e,future:n,navigator:r}=E.useContext(ul),{matches:i}=E.useContext(Vs),{pathname:o}=dl(),s=JSON.stringify($_(i,n.v7_relativeSplatPath)),a=E.useRef(!1);return tB(()=>{a.current=!0}),E.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=L_(c,JSON.parse(s),o,d.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Va([e,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[e,r,s,o,t])}function MX(){let{matches:t}=E.useContext(Vs),e=t[t.length-1];return e?e.params:{}}function nB(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=E.useContext(ul),{matches:i}=E.useContext(Vs),{pathname:o}=dl(),s=JSON.stringify($_(i,r.v7_relativeSplatPath));return E.useMemo(()=>L_(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}function RX(t,e){return IX(t,e)}function IX(t,e,n,r){sf()||on(!1);let{navigator:i}=E.useContext(ul),{matches:o}=E.useContext(Vs),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=dl(),d;if(e){var f;let v=typeof e=="string"?of(e):e;l==="/"||(f=v.pathname)!=null&&f.startsWith(l)||on(!1),d=v}else d=c;let h=d.pathname||"/",p=h;if(l!=="/"){let v=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(v.length).join("/")}let g=lX(t,{pathname:p}),m=zX(g&&g.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:Va([l,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:Va([l,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r);return e&&m?E.createElement($x.Provider,{value:{location:yp({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:_a.Pop}},m):m}function DX(){let t=VX(),e=AX(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application
499Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),n?E.createElement("pre",{style:i},n):null,null)}const $X=E.createElement(DX,null);class LX extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?E.createElement(Vs.Provider,{value:this.props.routeContext},E.createElement(eB.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function BX(t){let{routeContext:e,match:n,children:r}=t,i=E.useContext(B_);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(Vs.Provider,{value:e},r)}function zX(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var o;if(!n)return null;if(n.errors)t=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let d=s.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||on(!1),s=s.slice(0,Math.min(s.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<s.length;d++){let f=s[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:h,errors:p}=n,g=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||g){l=!0,c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((d,f,h)=>{let p,g=!1,m=null,v=null;n&&(p=a&&f.route.id?a[f.route.id]:void 0,m=f.route.errorElement||$X,l&&(c<0&&h===0?(g=!0,v=null):c===h&&(g=!0,v=f.route.hydrateFallbackElement||null)));let y=e.concat(s.slice(0,h+1)),b=()=>{let x;return p?x=m:g?x=v:f.route.Component?x=E.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=d,E.createElement(BX,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?E.createElement(LX,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}var rB=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(rB||{}),ly=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(ly||{});function FX(t){let e=E.useContext(B_);return e||on(!1),e}function qX(t){let e=E.useContext(CX);return e||on(!1),e}function UX(t){let e=E.useContext(Vs);return e||on(!1),e}function iB(t){let e=UX(),n=e.matches[e.matches.length-1];return n.route.id||on(!1),n.route.id}function VX(){var t;let e=E.useContext(eB),n=qX(ly.UseRouteError),r=iB(ly.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function WX(){let{router:t}=FX(rB.UseNavigateStable),e=iB(ly.UseNavigateStable),n=E.useRef(!1);return tB(()=>{n.current=!0}),E.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,yp({fromRouteId:e},o)))},[t,e])}function HX(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function WO(t){let{to:e,replace:n,state:r,relative:i}=t;sf()||on(!1);let{future:o,static:s}=E.useContext(ul),{matches:a}=E.useContext(Vs),{pathname:l}=dl(),c=Lx(),d=L_(e,$_(a,o.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(d);return E.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:i}),[c,f,i,n,r]),null}function wt(t){on(!1)}function KX(t){let{basename:e="/",children:n=null,location:r,navigationType:i=_a.Pop,navigator:o,static:s=!1,future:a}=t;sf()&&on(!1);let l=e.replace(/^\/*/,"/"),c=E.useMemo(()=>({basename:l,navigator:o,static:s,future:yp({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=of(r));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:g="default"}=r,m=E.useMemo(()=>{let v=D_(d,l);return v==null?null:{location:{pathname:v,search:f,hash:h,state:p,key:g},navigationType:i}},[l,d,f,h,p,g,i]);return m==null?null:E.createElement(ul.Provider,{value:c},E.createElement($x.Provider,{children:n,value:m}))}function GX(t){let{children:e,location:n}=t;return RX(zk(e),n)}new Promise(()=>{});function zk(t,e){e===void 0&&(e=[]);let n=[];
499return E.Children.forEach(t,(r,i)=>{if(!E.isValidElement(r))return;let o=[...e,i];if(r.type===E.Fragment){n.push.apply(n,zk(r.props.children,o));return}r.type!==wt&&on(!1),!r.props.index||!r.props.children||on(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=zk(r.props.children,o)),n.push(s)}),n}/** 500 * React Router DOM v6.30.1 501 * 502 * Copyright (c) Remix Software Inc. 503 * 504 * This source code is licensed under the MIT license found in the 505 * LICENSE.md file in the root directory of this source tree. 506 * 507 * @license MIT 508 */function Fk(){return Fk=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Fk.apply(this,arguments)}function JX(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function YX(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function XX(t,e){return t.button===0&&(!e||e==="_self")&&!YX(t)}const QX=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ZX="6";try{window.__reactRouterVersion=ZX}catch{}const eQ="startTransition",HO=ET[eQ];function tQ(t){let{basename:e,children:n,future:r,window:i}=t,o=E.useRef();o.current==null&&(o.current=oX({window:i,v5Compat:!0}));let s=o.current,[a,l]=E.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},d=E.useCallback(f=>{c&&HO?HO(()=>l(f)):l(f)},[l,c]);return E.useLayoutEffect(()=>s.listen(d),[s,d]),E.useEffect(()=>HX(r),[r]),E.createElement(KX,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const nQ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rQ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,De=E.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:d,viewTransition:f}=e,h=JX(e,QX),{basename:p}=E.useContext(ul),g,m=!1;if(typeof c=="string"&&rQ.test(c)&&(g=c,nQ))try{let x=new URL(window.location.href),S=c.startsWith("//")?new URL(x.protocol+c):new URL(c),w=D_(S.pathname,p);S.origin===x.origin&&w!=null?c=w+S.search+S.hash:m=!0}catch{}let v=OX(c,{relative:i}),y=iQ(c,{replace:s,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:f});function b(x){r&&r(x),x.defaultPrevented||y(x)}return E.createElement("a",Fk({},h,{href:g||v,onClick:m||o?r:b,ref:n,target:l}))});var KO;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(KO||(KO={}));var GO;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(GO||(GO={}));function iQ(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:a}=e===void 0?{}:e,l=Lx(),c=dl(),d=nB(t,{relative:s});return E.useCallback(f=>{if(XX(f,n)){f.preventDefault();let h=r!==void 0?r:ay(c)===ay(d);l(t,{replace:h,state:i,preventScrollReset:o,relative:s,viewTransition:a})}}
508,[c,l,d,r,i,n,t,o,s,a])}const oQ={nav:{soluciones:"Soluciones",metodo:"Método",eventos:"Eventos",formacion:"Formación",clubs:"Clubs de Mejor Longevidad",empresas:"Empresas",adminPublicas:"Administraciones Públicas",colegios:"Colegios Profesionales",quienAyudamos:"Clientes",planes:"Planes",actualidad:"Actualidad",sobreNosotros:"Sobre nosotros",contacto:"Solicitar más información"},hero:{badge:"El coste oculto del envejecimiento no gestionado ya impacta en tu organización",headline1:"Mejoramos la",longevidad:"longevidad",headline2:"de las personas mientras optimizamos el",rendimiento:"rendimiento",headline3:"de las organizaciones",sub:"Soluciones de previsión del envejecimiento que generan impacto social y retorno económico medible para empresas, administraciones públicas y colegios profesionales.",kpi1:"Reducción de absentismo",kpi2:"Mejora de productividad",kpi3:"Reducción de rotación",cta1:"Solicita más info",cta2:"Calcular impacto del envejecimiento en tu organización",trust:"Trabajamos con organizaciones comprometidas",personas:"Personas",formadas:"formadas",pilares:"Pilares del",envejecimiento:"envejecimiento",odsAlineados:"ODS",alineados:"alineados"},audience:{badge:"Soluciones a medida",title1:"¿A quién",title2:"ayudamos",sub:"Contenido y programas adaptados a las necesidades especÃficas de cada tipo de organización.",empresasTitle:"Empresas",empresasSub:"ROI medible y talento sostenible",empresasDesc:"Reduce el absentismo hasta un 30%, mejora la productividad y retén el talento senior. Fomenta el diálogo intergeneracional, prepara a tus empleados para comprender el futuro que viene, lucha contra el edadismo y promueve la diversidad. Impacto económico estimado de 145.000â¬â420.000â¬/año para una empresa de 100 empleados.",empresasCta:"Calcular impacto del envejecimiento en tu organización",adminTitle:"Administraciones Públicas",adminSub:"Prevención y sostenibilidad del sistema",adminDesc:"La longevidad puede pasar de ser un reto a un factor de desarrollo socioeconómico, y nosotros ayudamos a que eso sea asÃ. Actuar hoy reduce el coste público futuro. Programas de envejecimiento activo que retrasan la dependencia y generan ahorros de 6.000â¬â10.000⬠por persona/año en costes sociosanitarios.",adminCta:"Explorar oportunidades",colegiosTitle:"Colegios Profesionales",colegiosSub:"Valor, fidelización y diferenciación",colegiosDesc:"Ayudamos a preparar a los profesionales para que puedan diseñar servicios y productos que respondan a las verdaderas necesidades de una sociedad cada dÃa más envejecida. Les damos la posibilidad de ser más interdisciplinares, mejorando su percepción de valor y diferenciándose de otros colegios.",colegiosCta:"Descubrir programa",kpiAbsentismo:"absentismo",kpiProductividad:"productividad",kpiRotacion:"rotación",kpiDialogo:"Diálogo intergeneracional",kpiEdadismo:"Edadismo",kpiCostesSocio:"Costes sociosanitarios",kpiEnvActivo:"Envejecimiento activo",kpiDependencia:"Dependencia",kpiDesarrollo:"Desarrollo socioeconómico",kpiEngagement:"Engagement colegiados",kpiPercepcion:"Percepción de valor",kpiRetencion:"Retención miembros",kpiInterdiscipl:"Interdisciplinariedad"},overview:{badge:"Nuestro sistema",title1:"Sistema de",title2:"Longevidad Productiva",sub:"Un método probado en 3 fases que transforma la longevidad en ventaja competitiva. Cada fase se mide por resultados, no por procesos.",phase1:"Diagnóstico",phase1desc:"Identificamos el impacto económico y social del envejecimiento en tu organización. Análisis de costes ocultos, absentismo y productividad.",phase1result:"Mapa claro del coste actual y potencial de mejora.",phase2:"Intervención",phase2desc:"Programas holÃsticos que superan el enfoque tradicional centrado solo en salud y bienestar. Abarcamos todo lo que afecta al envejecimiento: vivienda, tecnologÃa, finanzas, derecho, relaciones sociales, cuidado del mayor y mucho más.",phase2result:"Reducción medible de absentismo y mejora de productividad.",phase3:"Optimización",phase3desc:"Consolidación de resultados y transferencia de conocimiento. Métricas de seguimiento y mejora continua del programa.",phase3result:"ROI sostenible y cultura organizacional transformada.",link:"Conocer el método completo"},urgency:{badge:"¿Por qué ahora?",title1:"El momento de actuar es",title2:"hoy",sub:"El envejecimiento poblacional no es un reto futuro. Es un desafÃo presente con impacto económico real.",point1title:"El envejecimiento ya impacta en las organizaciones",point1desc:"El 30% de la fuerza laboral en Esp
508aña supera los 50 años. Los costes asociados al envejecimiento no gestionado crecen exponencialmente.",point2title:"Anticiparse reduce costes y mejora resultados",point2desc:"Las organizaciones que actúan preventivamente obtienen retornos medibles en productividad, retención y bienestar.",point3title:"No actuar incrementa el coste estructural",point3desc:"El absentismo, la baja productividad y la pérdida de talento son costes ocultos que se acumulan a medio plazo.",cta:"Solicita más info"},cta:{title:"Explora las oportunidades de mejora en tu organización",sub:"Solicita más información y descubre el impacto económico y social que podemos generar juntos.",btn1:"Solicita más info",btn2:"Calcular impacto del envejecimiento en tu organización",email:"Email",phone:"Teléfono",location:"Ubicación",locationValue:"España"},footer:{tagline:"Mejoramos la longevidad de las personas mientras optimizamos el rendimiento de las organizaciones.",quienAyudamos:"Clientes",explora:"Explora",legal:"Legal",privacidad:"PolÃtica de privacidad",avisoLegal:"Aviso legal",cookies:"Cookies",derechos:"Todos los derechos reservados.",contactanos:"Contáctanos"},about:{badge:"Sobre nosotros",title1:"Promovemos el envejecimiento",title2:"inteligente",sub:"Nuestro propósito es ayudar a las personas a tomar mejores decisiones para disfrutar del mejor futuro posible.",razonTitle:"Nuestra",razonTitle2:"razón de ser",razonP1:"La generación baby boomer âunos 14,5 millones de españoles nacidos entre 1957 y 1974â ya ha comenzado a jubilarse. En los próximos años, millones de personas se enfrentarán a los retos del envejecimiento: atención médica, cuidados, planificación financiera y mucho más.",razonP2:"En el Instituto de Smart Ageing creemos que cada persona puede jugar un rol esencial en su propio futuro. Por eso hemos creado herramientas innovadoras que informan, forman y preparan a las personas para diseñar su mejor longevidad, tomando las decisiones correctas en el momento idóneo.",valoresBadge:"Lo que nos define",valoresTitle:"Nuestros",valoresTitle2:"valores",equipoBadge:"Nuestro equipo",equipoTitle:"Expertos en",equipoTitle2:"longevidad",equipoSub:"Un equipo multidisciplinar de profesionales comprometidos con el envejecimiento inteligente.",consejoBadge:"Consejo asesor",consejoTitle:"Muchas mentes",consejoTitle2:"brillantes",consejoTitle3:"nos apoyan"},metodo:{badge:"Nuestro método",heroTitle1:"Los sherpas del",heroTitle2:"envejecimiento inteligente",heroP1:"Envejecer es un proceso, no un destino. Cada persona tiene la opción de acometer ese camino de forma",heroConsciente:"consciente",heroO:"o",heroInconsciente:"inconsciente",heroP1end:". Cuando eliges hacerlo conscientemente, necesitas prepararte.",heroP2:"Hay que adoptar muchas decisiones âalgunas complejasâ y saber",heroCuando:"cuándo",heroP2end:"adoptarlas. Nuestro método te ayuda a",heroDisena:"diseñar tu mejor futuro",heroCta:"Solicita más info",filoBadge:"FilosofÃa",filoTitle1:"¿Por qué necesitas un",filoTitle2:"sherpa",filoSub:"Nuestro método ayuda a las personas a diseñar su mejor futuro, paso a paso, decisión a decisión.",libroBadge:"El libro",libroTitle1:"El arte de",libroTitle2:"envejecer sabiamente",libroSub:"GuÃa para adoptar mejores decisiones vitales y disfrutar de un futuro más pleno",libroComprar:"Comprar en Amazon",libroMas:"Más sobre el libro",capBadge:"Contenido del libro",capTitle1:"10 capÃtulos para",capTitle2:"tomar el control de tu futuro",pilaresBadge:"Los 9 pilares",pilaresTitle1:"Los 9 pilares del",pilaresTitle2:"envejecimiento inteligente",pilaresSub:"Cada pilar aborda una dimensión clave de la vida. Juntos, te ayudan a comprender todo lo que necesitas decidir y cuándo hacerlo.",autoraBadge:"Sobre la autora"},empresas:{badge:"Para empresas",heroTitle1:"Transforma la longevidad en",heroTitle2:"ventaja competitiva",heroSub:"Programas de prevención del envejecimiento con retorno económico medible. Reduce costes ocultos y mejora el rendimiento organizacional.",cta:"Solicitar más información",benefBadge:"Nuestras soluciones",benefTitle1:"Beneficios para",benefTitle2:"tu empresa",benefSub:"Nuestros programas generan impacto real en las personas y resultados medibles en la organización.",kpiBadge:"Resultados medibles",kpiTitle1:"Indicadores de",kpiTitle2:"impacto",simTitle:"¿Quieres calcular cuánto impacta económicamente el envejecimiento en tu organización?",simSub:"Usa nuestro simulador para calcular el ROI que pueden generar nuestras soluciones en tu organización y ayuda a tu empresa a lograr eficiencias gracias a la inversión en la gestión del envejecimiento de la plantilla.",costTitle:"El coste oculto del envejecimiento no gestionado",costSub:"Las organizaciones que no abordan proactivamente el envejecimiento de su fuerza laboral asumen costes crecientes que impactan directamente en su cuenta de resultados."},roi:{badge:"Calculadora de ROI",title1:"Calcula el",title2:"impacto económico",title3:"en tu organización",sub:"Descubre cuánto podrÃa estar perdiendo tu empresa por no gestionar el envejecimiento de su plantilla.",tooltipTitle:"coste oculto del envejecimiento",tooltipDesc:"El coste oculto del envejecimiento incluye absentismo creciente, pérdida de productividad, rotación no planificada y desengagement de empleados senior. Estos costes rara vez se miden, pero impactan directamente en la cuenta de resultados.",labelEmpleados:"Nº de empleados",labelEdad:"Edad media de la plantilla",labelSenior:"% empleados senior (50+)",empleados:"empleados",anos:"años",senior:"senior",calcBtn:"Calcular impacto en tu organización",reducAbsentismo:"Reducción absentismo",mejoraProductividad:"Mejora productividad",retencionTalento:"Retención talento",rango:"Rango",minimo:"MÃnimo",maximo:"Máximo",distribTitle:"Distribución del impacto",rangoTitle:"Rango de impacto económico",totalLabel:"Impacto económico anual estimado",porAno:"por año",msgP1:"Una empresa de",msgP2:"empleados",msgP3:"con una edad media de",msgP4:"años",msgP5:"y un",msgP6:"de empleados senior podrÃa estar perdiendo entre",msgP7:"y",msgP8:"si no gestiona el envejecimiento de su plantilla.",ctaInfo:"Solicitar más información",ctaExplorar:"Explorar oportunidades de mejora",absentismo:"Absentismo",productividad:"Productividad",retencion:"Retención"},admin:{badge:"Para administraciones públicas",heroTitle1:"Actuar hoy reduce el",heroTitle2:"coste público futuro",heroSub:"La longevidad puede pasar de ser un reto a un factor de desarrollo socioeconómico, y nosotros ayudamos a que eso sea asÃ. Programas de prevención del envejecimiento que contribuyen a la sostenibilidad del sistema, reducen la dependencia y mejoran la calidad de vida de los ciudadanos.",cta:"Explorar oportunidades de mejora",benefBadge:"Impacto público",benefTitle1:"Beneficios para la",benefTitle2:"comunidad",benefSub:"Resultados medibles que justifican la inversión pública en prevención del envejecimiento.",progBadge:"Nuestros programas",progTitle1:"Soluciones para",progTitle2:"ayuntamientos",msgTitle:"La prevención es la mejor inversión pública",msgSub:"Cada euro invertido en prevención del envejecimiento genera un retorno significativo en ahorro sanitario, social y en calidad de vida. Anticiparse permite construir comunidades más resilientes y sostenibles.",msgCta:"Solicitar información"},colegios:{badge:"Para colegios profesionales",heroTitle1:"Genera valor real para tus",heroTitle2:"colegiados",heroSub:"Ayudamos a preparar a los profesionales para que puedan diseñar servicios y productos que respondan a las verdaderas necesidades de una sociedad cada dÃa más envejecida. Les damos la posibilidad de ser más interdisciplinares, mejorando su percepción de valor y diferenciando a tu colegi
508o como referente en bienestar profesional.",cta:"Descubrir programa",benefBadge:"Valor institucional",benefTitle1:"¿Por qué integrar la longevidad en tu",benefTitle2:"colegio",servBadge:"Servicios",servTitle1:"Qué ofrecemos a tu",servTitle2:"colegio",msgTitle:"Experiencia contrastada con colegios profesionales",msgSub1:"Hemos trabajado con colegios de médicos, abogados y otros colectivos profesionales, diseñando programas que generan impacto real en sus miembros.",msgSub2:"Nuestro enfoque institucional y basado en evidencia garantiza credibilidad y resultados.",msgCta:"Explorar oportunidades"},eventos:{badge:"Eventos y conferencias",heroTitle1:"Experiencias que",heroTitle2:"transforman vidas",heroSub:"Organizamos eventos exclusivos dirigidos a fomentar el conocimiento sobre el envejecimiento inteligente de forma innovadora, divertida y didáctica. Desde conferencias inspiradoras hasta sesiones de networking, fomentamos la colaboración y el intercambio de ideas entre los participantes.",inmersivos:"Eventos inmersivos",inmersivosDesc:"Experiencias diseñadas para generar un impacto real en los asistentes.",conferencias:"Conferencias inspiradoras",conferenciasDesc:"Ponencias de expertos que combinan rigor, cercanÃa y visión de futuro.",networking:"Networking activo",networkingDesc:"Espacios para conectar con profesionales comprometidos con la longevidad.",matBadge:"Nuestro evento estrella",matTitle:"Los",matTitle2:"Maturatones",matSub:"Un evento inmersivo, cuya duración determina nuestro cliente, con talleres, charlas y actividades a través de las que revisamos las cuestiones clave relacionadas con los pilares del buen envejecimiento. Una experiencia inolvidable que transformará la forma en que tu equipo entiende y se prepara para el futuro.",matTemasTitle:"Temas que abordamos en un Maturatón",matCta:"Organiza un Maturatón para tu equipo",temBadge:"Nuestras temáticas",temTitle1:"Sobre lo que nos gusta",temTitle2:"hablar",temSub:"Hoy más que nunca hay que hablar sobre las cuestiones clave para un buen envejecimiento con un enfoque innovador, holÃstico y orientado a la acción.",videosTitle:"Aquà puedes vernos en acción",videosSub:"Ejemplos de conferencias e intervenciones en medios.",videosCta:"Contrata una conferencia",video1Title:"Entrevista sobre longevidad y planificación vital",video2Title:"Webinar: El riesgo de vivir demasiado: ¿Está tu plan financiero diseñado para un cuerpo que durará un siglo?",video3Title:"Intervención en 'La Noche' - Canal 24 Horas"},academia:{badge:"Academia de Smart Ageing",heroTitle1:"Formación para diseñar tu",heroTitle2:"mejor futuro",heroSub:"Programas formativos basados en el método «Justo a Tiempo» y los 9 pilares del envejecimiento inteligente. Cursos prácticos, repletos de herramientas útiles, que te ayudarán a tomar las decisiones adecuadas en el momento justo.",metPropia:"MetodologÃa propia",libroIncl:"Libro incluido",certOficial:"Certificado oficial",online:"100% online",catTitle1:"Tres diplomados, tres",catTitle2:"públicos",catSub:"Cada curso está diseña
508do para un perfil concreto, con contenido adaptado a sus retos y necesidades especÃficas.",masPopular:"Más popular",quienDebe:"¿Quién debe hacer este curso?",retosTitle:"Retos que abordamos",queAprenderas:"Qué aprenderás",verModulos:"Ver módulos del programa",certificado:"Certificado",inscribirme:"Inscribirme",formBadge:"Formación a medida",formTitle1:"¿Necesitas una formación",formTitle2:"personalizada",formSub:"Diseñamos programas formativos a medida para organizaciones que quieren abordar retos especÃficos.",formCta:"Solicitar formación a medida"},clubs:{badge:"Comunidades",heroTitle1:"Clubs de",heroTitle2:"Mejor Longevidad",heroSub:"Somos expertos en la creación y gestión de comunidades enfocadas en el envejecimiento inteligente. Creamos espacios donde las personas conectan, aprenden y mejoran su calidad de vida.",porqueBadge:"¿Por qué un Club de Mejor Longevidad?",porqueTitle:"Más que un club de alumni, de ex empleados o de jubilados",porqueSub:"Un Club de Mejor Longevidad supera a los clubs de alumni, de ex empleados o de jubilados porque la longevidad es transversal: interesa a todo el mund
508o, une a jóvenes y mayores en un mismo espacio y eso puede utilizarse para lograr objetivos estratégicos de gran valor.",evidBadge:"Evidencia cientÃfica",evidTitle:"La comunidad como pilar del buen envejecimiento",maturaTitle:"Matura Club",metBadge:"Nuestra metodologÃa",metTitle:"Cómo trabajamos",metSub:"Un proceso estructurado en fases para crear la comunidad perfecta para tu organización.",inclTitle:"¿Qué incluye el diseño de tu comunidad?"},contacto:{badge:"Contacto",title:"Contáctanos",sub:"Estamos aquà para ayudarte. Rellena el formulario o utiliza nuestros datos de contacto directo.",formTitle:"EnvÃanos un mensaje",nombre:"Nombre",email:"Email",telefono:"Teléfono",mensaje:"Mensaje",enviar:"Enviar mensaje",enviando:"Enviando...",llamanos:"Llámanos",llamanosDesc:"Estamos a tu disposición.",escribenos:"EscrÃbenos",escribenosDesc:"Te respondemos en 24h.",successMsg:"¡Mensaje enviado correctamente! Te responderemos pronto.",errorMsg:"Error al enviar el mensaje. Inténtalo de nuevo.",placeholderNombre:"Tu nombre completo",placeholderEmail:"[email protected]",placeholderTel:"+34 600 000 000",placeholderMsg:"¿En qué podemos ayudarte?"},planesPage:{plansBadge:"Nuestros planes",plansTitle1:"Tres planes para",plansTitle2:"tres objetivos clave",plansSub:"Hemos diseñado tres planes que responden a los objetivos que comparten muchas organizaciones: preparar a sus empleados para la longevidad, empoderar a sus mujeres ante los retos del futuro y acompañar a quienes se jubilan en su transición.",faseBadge:"Nuestra forma de trabajar",faseTitle1:"Trabajamos en",faseTitle2:"tres fases",faseSub:"Nos gusta acompañar a las organizaciones que confÃan en nosotros a través de un proceso estructurado en tres fases que garantiza resultados duraderos.",pregTitle1:"Si buscas respuesta a",pregTitle2:"estas preguntas",pregResp:"â¦nosotros la tenemos.",pregSub:"Explora nuestros planes y contáctanos para que expliquemos en detalle cómo pueden beneficiar a tu organización.",objetivo:"Objetivo",inmersion:"Inmersión",profundizacion:"Profundización",consolidacion:"Consolidación"},beneficios:{badge:"Beneficios de nuestras soluciones",title1:"Estos son los beneficios que obtienen las",title2:"personas y organizaciones",title3:"gracias a nuestras soluciones",sub:"Nuestros programas generan un impacto real y medible, tanto en el bienestar de las personas como en los resultados de las organizaciones.",orgTitle:"Beneficios para tu organización",odsBadge:"Compromiso global",odsTitle1:"Alineados con los",odsTitle2:"ODS de Naciones Unidas",odsSub:"Nuestros programas contribuyen directamente a 9 Objetivos de Desarrollo Sostenible.",whyBadge:"¿Por qué elegirnos?",whyTitle1:"Porque ofrecemos algo",whyTitle2:"diferente"},soluciones:{badge:"Nuestras soluciones",title1:"Todo lo que necesitas para un",title2:"envejecimiento inteligente",sub:"Un método propio, eventos inmersivos, formación especializada y una comunidad de apoyo: las piezas clave para diseñar tu mejor futuro."},common:{fase:"Fase"}},sQ={nav:{soluciones:"Solutions",metodo:"Method",eventos:"Events",formacion:"Training",clubs:"Better Longevity Clubs",empresas:"Companies",adminPublicas:"Public Administrations",colegios:"Professional Associations",quienAyudamos:"Clients",planes:"Plans",actualidad:"News",sobreNosotros:"About us",contacto:"Request more information"},hero:{badge:"The hidden cost of unmanaged ageing is already impacting your organisation",headline1:"We improve people's",longevidad:"longevity",headline2:"while optimising the",rendimiento:"performance",headline3:"of organisations",sub:"Ageing foresight solutions that generate social impact and measurable economic returns for companies, public administrations, and professional associations.",kpi1:"Absenteeism reduction",kpi2:"Productivity improvement",kpi3:"Turnover reduction",cta1:"Request more info",cta2:"Calculate ageing impact on your organisation",trust:"We work with committed organisations",personas:"People",formadas:"trained",pilares:"Pillars of",envejecimiento:"ageing",odsAlineados:"SDGs",alineados:"aligned"},audience:{badge:"Tailored solutions",title1:"Who do we",title2:"help",sub:"Content and programs adapted to the specific needs of each type of organisation.",empresasTitle:"Companies",empresasSub:"Measurable ROI and sustainable talent",empresasDesc:"Reduce absenteeism by up to 30%, improve productivity, and retain senior talent. Foster intergenerational dialogue, prepare your employees to understand the future ahead, fight ageism, and promote diversity. Estimated economic impact of â¬145,000ââ¬420,000/year for a 100-employee company.",empresasCta:"Calculate ageing impact on your organisation",adminTitle:"Public Administrations",adminSub:"Prevention and system sustainability",adminDesc:"Longevity can shift from being a challenge to a driver of socioeconomic development, and we help make that happen. Acting today reduces future public costs. Active ageing programs that delay dependency and save â¬6,000ââ¬10,000 per person/year in social healthcare costs.",adminCta:"Explore opportunities",colegiosTitle:"Professional Associations",colegiosSub:"Value, loyalty, and differentiation",colegiosDesc:"We help professionals design services and products that respond to the real needs of an increasingly ageing society. We give them the opportunity to become more interdisciplinary, improving their perceived value and differentiating from other associations.",colegiosCta:"Discover programme",kpiAbsentismo:"Absenteeism",kpiProductividad:"Productivity",kpiRotacion:"Turnover",kpiDialogo:"Intergenerational dialogue",kpiEdadismo:"Ageism",kpiCostesSocio:"Social healthcare costs",kpiEnvActivo:"Active ageing",kpiDependencia:"Dependency",kpiDesarrollo:"Socioeconomic development",kpiEngagement:"Member engagement",kpiPercepcion:"Perceived value",kpiRetencion:"Member retention",kpiInterdiscipl:"Interdisciplinarity"},overview:{badge:"Our system",title1:"Productive",title2:"Longevity System",sub:"A proven 3-phase method that transforms longevity into competitive advantage. Each phase is measured by results, not processes.",phase1:"Diagnosis",phase1desc:"We identify the economic and social impact of ageing in y
508our organisation. Analysis of hidden costs, absenteeism, and productivity.",phase1result:"Clear map of current costs and potential for improvement.",phase2:"Intervention",phase2desc:"Holistic programmes that go beyond the traditional focus on health and wellness. We address everything that affects ageing: housing, technology, finance, law, social relationships, elder care, and much more.",phase2result:"Measurable reduction in absenteeism and productivity improvement.",phase3:"Optimisation",phase3desc:"Consolidation of results and knowledge transfer. Follow-up metrics and continuous programme improvement.",phase3result:"Sustainable ROI and transformed organisational culture.",link:"Learn about the full method"},urgency:{badge:"Why now?",title1:"The time to act is",title2:"today",sub:"Population ageing is not a future challenge. It is a present-day challenge with real economic impact.",point1title:"Ageing is already impacting organisations",point1desc:"30% of Spain's workforce is over 50. The costs associated with unmanaged ageing grow exponentially.",point2title:"Being proactive reduces costs and improves results",point2desc:"Organisations that act preventively achieve measurable returns in productivity, retention, and wellbeing.",point3title:"Inaction increases structural costs",point3desc:"Absenteeism, low productivity, and talent loss are hidden costs that accumulate over the medium term.",cta:"Request more info"},cta:{title:"Explore improvement opportunities in your organisation",sub:"Request more information and discover the economic and social impact we can generate together.",btn1:"Request more info",btn2:"Calculate ageing impact on your organisation",email:"Email",phone:"Phone",location:"Location",locationValue:"Spain"},footer:{tagline:"We improve people's longevity while optimising the performance of organisations.",quienAyudamos:"Clients",explora:"Explore",legal:"Legal",privacidad:"Privacy policy",avisoLegal:"Legal notice",cookies:"Cookies",derechos:"All rights reserved.",contactanos:"Contact us"},about:{badge:"About us",title1:"We promote",title2:"smart ageing",sub:"Our purpose is to help people make better decisions to enjoy the best possible future.",razonTitle:"Our",razonTitle2:"reason for being",razonP1:"The baby boomer generationâapproximately 14.5 million Spaniards born between 1957 and 1974âhas already begun to retire. In the coming years, millions of people will face the challenges of ageing: medical care, caregiving, financial planning, and much more.",razonP2:"At the Instituto de Smart Ageing, we believe that every person can play an essential role in their own future. That's why we have created innovative tools that inform, educate, and prepare people to design their best longevity, making the right decisions at the right time.",valoresBadge:"What defines us",valoresTitle:"Our",valoresTitle2:"values",equipoBadge:"Our team",equipoTitle:"Experts in",equipoTitle2:"longevity",equipoSub:"A multidisciplinary team of professionals committed to smart ageing.",consejoBadge:"Advisory board",consejoTitle:"Many",consejoTitle2:"brilliant minds",consejoTitle3:"support us"},metodo:{badge:"Our method",heroTitle1:"The sherpas of",heroTitle2:"smart ageing",heroP1:"Ageing is a process, not a destination. Every person has the choice to approach this journey",heroConsciente:"consciously",heroO:"or",heroInconsciente:"unconsciously",heroP1end:". When you choose to do it consciously, you need to prepare.",heroP2:"There are many decisions to makeâsome complexâand you need to know",heroCuando:"when",heroP2end:"to make them. Our method helps you",heroDisena:"design your best future",heroCta:"Request more info",filoBadge:"Philosophy",filoTitle1:"Why do you need a",filoTitle2:"sherpa",filoSub:"Our method helps people design their best future, step by step, decision by decision.",libroBadge:"The book",libroTitle1:"The art of",libroTitle2:"ageing wisely",libroSub:"A guide for making better life decisions and enjoying a more fulfilling future",libroComprar:"Buy on Amazon",libroMas:"More about the book",capBadge:"Book contents",capTitle1:"10 chapters to",capTitle2:"take control of your future",pilaresBadge:"The 9 pillars",pilaresTitle1:"The 9 pillars of",pilaresTitle2:"smart ageing",pilaresSub:"Eac
508h pillar addresses a key dimension of life. Together, they help you understand everything you need to decide and when to do it.",autoraBadge:"About the author"},empresas:{badge:"For companies",heroTitle1:"Transform longevity into",heroTitle2:"competitive advantage",heroSub:"Ageing prevention programmes with measurable economic returns. Reduce hidden costs and improve organisational performance.",cta:"Request more information",benefBadge:"Our solutions",benefTitle1:"Benefits for",benefTitle2:"your company",benefSub:"Our programmes generate real impact on people and measurable results for the organisation.",kpiBadge:"Measurable results",kpiTitle1:"Impact",kpiTitle2:"indicators",simTitle:"Want to calculate how much ageing economically impacts your organisation?",simSub:"Use our simulator to calculate the ROI our solutions can generate for your organisation and help your company achieve efficiencies through investment in workforce ageing management.",costTitle:"The hidden cost of unmanaged ageing",costSub:"Organisations that don't proactively address workforce ageing absorb growing costs that directly impact their bottom line."},roi:{badge:"ROI Calculator",title1:"Calculate the",title2:"economic impact",title3:"on your organisation",sub:"Discover how much your company could be losing by not managing the ageing of its workforce.",tooltipTitle:"hidden cost of ageing",tooltipDesc:"The hidden cost of ageing includes increasing absenteeism, productivity loss, unplanned turnover, and disengagement of senior employees. These costs are rarely measured but directly impact the bottom line.",labelEmpleados:"Number of employees",labelEdad:"Average workforce age",labelSenior:"% senior employees (50+)",empleados:"employees",anos:"years",senior:"senior",calcBtn:"Calculate impact on your organisation",reducAbsentismo:"Absenteeism reduction",mejoraProductividad:"Productivity improvement",retencionTalento:"Talent retention",rango:"Range",minimo:"Minimum",maximo:"Maximum",distribTitle:"Impact distribution",rangoTitle:"Economic impact range",totalLabel:"Estimated annual economic impact",porAno:"per year",msgP1:"A company of",msgP2:"employees",msgP3:"with an average age of",msgP4:"years",msgP5:"and",msgP6:"senior employees could be losing between",msgP7:"and",msgP8:"if it doesn't manage the ageing of its workforce.",ctaInfo:"Request more information",ctaExplorar:"Explore improvement opportunities",absentismo:"Absenteeism",productividad:"Productivity",retencion:"Retention"},admin:{badge:"For public administrations",heroTitle1:"Acting today reduces",heroTitle2:"future public costs",heroSub:"Longevity can shift from being a challenge to a driver of socioeconomic development, and we help make that happen. Ageing prevention programmes that contribute to system sustainability, reduce dependency, and improve citizens' quality of life.",cta:"Explore improvement opportunities",benefBadge:"Public impact",benefTitle1:"Benefits for the",benefTitle2:"community",benefSub:"Measurable results that justify public investment in ageing prevention.",progBadge:"Our programmes",progTitle1:"Solutions for",progTitle2:"local governments",msgTitle:"Prevention is the best public investment",msgSub:"Every euro invested in ageing prevention generates a significant return in healthcare, social savings, and quality of life. Being proactive builds more resilient and sustainable communities.",msgCta:"Request information"},colegios:{badge:"For professional associations",heroTitle1:"Generate real value for your",heroTitle2:"members",heroSub:"We help professionals design services and products that respond to the real needs of an increasingly ageing society. We give them the opportunity to become more interdisciplinary, improving their perceived value and differentiating your association as a benchmark in professional wellbeing.",cta:"Discover programme",benefBadge:"Institutional value",benefTitle1:"Why integrate longevity in your",benefTitle2:"association",servBadge:"Services",servTitle1:"What we offer your",servTitle2:"association",msgTitle:"Proven experience with professional associations",msgSub1:"We have worked with medical, legal, and other professional bodies, designing programmes that generate real impact on their members.",msgSub2:"Our institutional, evidence-based approach guarantees credibility and results.",msgCta:"Explore opportunities"},eventos:{badge:"Events and conferences",heroTitle1:"Experiences that",heroTitle2:"transform lives",heroSub:"We organise exclusive events to promote knowledge about smart ageing in an innovative, fun, and educational way. From inspiring conferences to networking sessions, we foster collaboration and the exchange of ideas among participants.",inmersivos:"Immersive events",inmersivosDesc:"Experiences designed to create real impact on attendees.",conferencias:"Inspiring conferences",conferenciasDesc:"Expert talks combining rigour, warmth, and forward vision.",networking:"Active networking",networkingDesc:"Spaces to connect with professionals committed to longevity.",matBadge:"Our flagship event",matTitle:"The",matTitle2:"Maturathons",matSub:"An immersive event, whose duration is determined by our client, featuring workshops, talks, and activities through which we review the key issues related to the pillars of healthy ageing. An unforgettable experience that will transform the way your team understands and prepares for the future.",matTemasTitle:"Topics covered in a Maturathon",matCta:"Organise a Maturathon for your team",temBadge:"Our topics",temTitle1:"What we love to",temTitle2:"talk about",temSub:"Now more than ever, it's time to discu
508ss the key issues for healthy ageing with an innovative, holistic, and action-oriented approach.",videosTitle:"See us in action",videosSub:"Examples of conferences and media appearances.",videosCta:"Book a conference",video1Title:"Interview on longevity and life planning",video2Title:"Webinar: The risk of living too long â is your financial plan designed for a body that will last a century?",video3Title:"Appearance on 'La Noche' â Canal 24 Horas"},academia:{badge:"Smart Ageing Academy",heroTitle1:"Training to design your",heroTitle2:"best future",heroSub:"Training programmes based on the «Just in Time» method and the 9 pillars of smart ageing. Practical courses packed with useful tools that will help you make the right decisions at the right time.",metPropia:"Proprietary methodology",libroIncl:"Book included",certOficial:"Official certificate",online:"100% online",catTitle1:"Three diplomas, three",catTitle2:"audiences",catSub:"Each course is designed for a specific profile, with content adapted to their challenges and specific needs.",masPopular:"Most popular",quienDebe:"Who should take this course?",retosTitle:"Challenges we address",queAprenderas:"What you'll learn",verModulos:"See programme modules",certificado:"Certificate",inscribirme:"Enrol",formBadge:"Custom training",formTitle1:"Need a",formTitle2:"custom training programme",formSub:"We design tailor-made training programmes for organisations that want to address specific challenges.",formCta:"Request custom training"},clubs:{badge:"Communities",heroTitle1:"Better",heroTitle2:"Longevity Clubs",heroSub:"We are experts in creating and managing communities focu
508sed on smart ageing. We create spaces where people connect, learn, and improve their quality of life.",porqueBadge:"Why a Better Longevity Club?",porqueTitle:"More than an alumni, ex-employee, or retiree club",porqueSub:"A Better Longevity Club surpasses alumni, ex-employee, or retiree clubs because longevity is cross-cutting: it interests everyone, brings young and old together in the same space, and this can be used to achieve high-value strategic objectives.",evidBadge:"Scientific evidence",evidTitle:"Community as a pillar of healthy ageing",maturaTitle:"Matura Club",metBadge:"Our methodology",metTitle:"How we work",metSub:"A structured phased process to create the perfect community for your organisation.",inclTitle:"What does your community design include?"},contacto:{badge:"Contact",title:"Contact us",sub:"We're here to help. Fill in the form or use our direct contact details.",formTitle:"Send us a message",nombre:"Name",email:"Email",telefono:"Phone",mensaje:"Message",enviar:"Send message",enviando:"Sending...",llamanos:"Call us",llamanosDesc:"We're at your service.",escribenos:"Write to us",escribenosDesc:"We'll reply within 24h.",successMsg:"Message sent successfully! We'll get back to you soon.",errorMsg:"Error sending message. Please try again.",placeholderNombre:"Your full name",placeholderEmail:"[email protected]",placeholderTel:"+34 600 000 000",placeholderMsg:"How can we help you?"},planesPage:{plansBadge:"Our plans",plansTitle1:"Three plans for",plansTitle2:"three key objectives",plansSub:"We've designed three plans that respond to the objectives shared by many organisations: preparing employees for longevity, empowering women facing future challenges, and supporting those transitioning to retirement.",faseBadge:"Our way of working",faseTitle1:"We work in",faseTitle2:"three phases",faseSub:"We like to accompany the organisations that trust us through a structured three-phase process that ensures lasting results.",pregTitle1:"If you're looking for answers to",pregTitle2:"these questions",pregResp:"â¦we have them.",pregSub:"Explore our plans and contact us so we can explain in detail how they can benefit your organisation.",objetivo:"Objective",inmersion:"Immersion",profundizacion:"Deepening",consolidacion:"Consolidation"},beneficios:{badge:"Benefits of our solutions",title1:"These are the benefits obtained by",title2:"people and organisations",title3:"thanks to our solutions",sub:"Our programmes generate real and measurable impact, both in people's wellbeing and in organisational results.",orgTitle:"Benefits for your organisation",odsBadge:"Global commitment",odsTitle1:"Aligned with the",odsTitle2:"UN Sustainable Development Goals",odsSub:"Our programmes contribute directly to 9 Sustainable Development Goals.",whyBadge:"Why choose us?",whyTitle1:"Because we offer something",whyTitle2:"different"},soluciones:{badge:"Our solutions",title1:"Everything you need for",title2:"smart ageing",sub:"A proprietary method, immersive events, specialised training, and a support community: the key pieces to design your best future."},common:{fase:"Phase"}},aQ={nav:{soluciones:"Solutions",metodo:"Méthode",eventos:"Ãvénements",formacion:"Formation",clubs:"Clubs de Meilleure Longévité",empresas:"Entreprises",adminPublicas:"Administrations Publiques",colegios:"Ordres Professionnels",quienAyudamos:"Clients",planes:"Plans",actualidad:"Actualité",sobreNosotros:"à propos",contacto:"Demander plus d'informations"},hero:{badge:"Le coût caché du vieillissement non géré impacte déjà votre organisation",headline1:"Nous améliorons la",longevidad:"longévité",headline2:"des personnes tout en optimisant la",rendimiento:"performance",headline3:"des organisations",sub:"Des solutions de prévoyance du vieillissement qui génèrent un impact social et un retour économique mesurable pour les entreprises, les administrations publiques et les ordres professionnels.",kpi1:"Réduction de l'absentéisme",kpi2:"Amélioration de la productivité",kpi3:"Réduction de la rotation",cta1:"Demander plus d'infos",cta2:"Calculer l'impact du vieillissement sur votre organisation",trust:"Nous travaillons avec des organisations engagées",personas:"Personnes",formadas:"formées",pilares:"Piliers du",envejecimiento:"vieillissement",odsAlineados:"ODD",alineados:"alignés"},audience:{badge:"Solutions sur mesure",title1:"à qui",title2:"aidons-nous",sub:"Contenus et programmes adaptés aux besoins spécifiques de chaque type d'organisation.",empresasTitle:"Entreprises",empresasSub:"ROI mesurable et talent durable",empresasDesc:"Réduisez l'absentéisme jusqu'à 30 %, améliorez la productivité et retenez les talents seniors. Favorisez le dialogue intergénérationnel, préparez vos employés à comprendre l'avenir, luttez contre l'âgisme et promouvez la diversité. Impact économique estimé de 145 000 ⬠â 420 000 â¬/an pour une entreprise de 100 employés.",empresasCta:"Calculer l'impact du vieillissement sur votre organisation",adminTitle:"Administrations Publiques",adminSub:"Prévention et durabilité du système",adminDesc:"La longévité peut passer d'un défi à un facteur de développement socio-économique, et nous y contribuons. Agir aujourd'hui réduit les coûts publics futurs. Programmes de vieillissement actif qui retardent la dépendance et génèrent des économies de 6 000 ⬠â 10 000 ⬠par personne/an en coûts socio-sanitaires.",adminCta:"Explorer les opportunités",colegiosTitle:"Ordres Professionnels",colegiosSub:"Valeur, fidélisation et différenciation",colegiosDesc:"Nous aidons les professionnels à concevoir des services et des produits qui répondent aux véritables besoins d'une société de plus en plus vieillissante. Nous leur donnons la possibilité d'être plus interdisciplinaires, améliorant leur perception de valeur.",colegiosCta:"Découvrir le programme",kpiAbsentismo:"Absentéisme",kpiProductividad:"Productivité",kpiRotacion:"Rotation",kpiDialogo:"Dialogue intergénérationnel",kpiEdadismo:"Ãgisme",kpiCostesSocio:"Coûts socio-sanitaires",kpiEnvActivo:"Vieillissement actif",kpiDependencia:"Dépendance",kpiDesarrollo:"Développement socio-économique",kpiEngagement:"Engagement des membres",kpiPercepcion:"Perception de valeur",kpiRetencion:"Rétention des membres",kpiInterdiscipl:"Interdisciplinarité"},overview:{badge:"Notre système",title1:"Système de",title2:"Longévité Productive",sub:"Une méthode éprouvée en 3 phases qui transforme la longévité en avantage compétitif. Chaque phase est mesurée par les résultats, pas par les processus.",phase1:"Diagnostic",phase1desc:"Nous identifions l'impact économique et social du vieillissement dans votre organisation. Analyse des coûts cachés, de l'absentéisme et de la productivité.",phase1result:"Carte claire des coûts actuels et du potentiel d'amélioration.",phase2:"Intervention",phase2desc:"Des programmes holistiques qui dépassent l'approche traditionnelle centrée uniquement sur la santé et le bien-être. Nous abordons tout ce qui affecte le vieillissement : logement, technologie, finances, droit, relations sociales, soins aux aînés et bien plus.",phase2result:"Réduction mesurable de l'absentéisme et amélioration de la productivité.",phase3:"Optimisation",phase3desc:"Consolidation des résultats et transfert de connaissances. Métriques de suivi et amélioration continue du programme.",phase3result:"ROI durable et culture organisationnelle transformée.",link:"Découvrir la méthode complète"},urgency:{badge:"Pourquoi maintenant ?",title1:"Le moment d'agir est",title2:"aujourd'hui",sub:"Le vieillissement de la population n'est pas un défi futur. C'est un défi actuel avec un impact économique réel.",point1title:"Le vieillissement impacte déjà les organisations",point1desc:"30 % de la main-d'Åuvre en Espagne a plus de 50 ans. Les coûts associés au vieillissement non géré croissent de manière exponentielle.",point2title:"Anticiper réduit les coûts et améliore les résultats",point2desc:"Les organisations qui agissent de manière préventive obtiennent des retours mesurables en productivité, rétention et bien-être.",point3title:"L'inaction augmente les coûts structurels",point3desc:"L'absentéisme, la faible productivité et la perte de talents sont des coûts cachés qui s'accumulent à moyen terme.",cta:"Demander plus d'infos"},cta:{title:"Explorez les opportunités d'amélioration dans votre organisation",sub:"Demandez plus d'informations et découvrez l'impact économique et social que nous pouvons générer ensemble.",btn1:"Demander plus d'infos",btn2:"Calculer l'impact du vieillissement sur votre organisation",email:"Email",phone:"Téléphone",location:"Localisation",locationValue:"Espagne"},footer:{tagline:"Nous améliorons la longévité des personnes tout en optimisant la performance des organisations.",quienAyudamos:"Clients",explora:"Explorer",legal:"Mentions légales",privacidad:"Politique de confidentialité",avisoLegal:"Mentions légales",cookies:"Cookies",derechos:"Tous droits réservés.",contactanos:"Contactez-nous"},about:{badge:"à propos de nous",title1:"Nous promouvons le vieillissement",title2:"intelligent",sub:"Notre mission est d'aider les personnes à prendre de meilleures décisions pour profiter du meilleur avenir possible.",razonTitle:"Notre",razonTitle2:"raison d'être",razonP1:"La génération des baby-boomers â environ 14,5 millions d'Espagnols nés entre 1957 et 1974 â a déjà c
508ommencé à prendre sa retraite. Dans les années à venir, des millions de personnes seront confrontées aux défis du vieillissement : soins médicaux, prise en charge, planification financière et bien plus.",razonP2:"à l'Instituto de Smart Ageing, nous croyons que chaque personne peut jouer un rôle essentiel dans son propre avenir. C'est pourquoi nous avons créé des outils innovants qui informent, forment et préparent les personnes à concevoir leur meilleure longévité, en prenant les bonnes décisions au bon moment.",valoresBadge:"Ce qui nous définit",valoresTitle:"Nos",valoresTitle2:"valeurs",equipoBadge:"Notre équipe",equipoTitle:"Experts en",equipoTitle2:"longévité",equipoSub:"Une équipe multidisciplinaire de professionnels engagés dans le vieillissement intelligent.",consejoBadge:"Conseil consultatif",consejoTitle:"De nombreux esprits",consejoTitle2:"brillants",consejoTitle3:"nous soutiennent"},metodo:{badge:"Notre méthode",heroTitle1:"Les sherpas du",heroTitle2:"vieillissement intelligent",heroP1:"Vieillir est un processus, pas une destination. Chaque personne a le choix d'aborder ce chemin de manière",heroConsciente:"consciente",heroO:"ou",heroInconsciente:"inconsciente",heroP1end:". Lorsque vous choisissez de le faire consciemment, vous devez vous préparer.",heroP2:"Il y a beaucoup de décisions à prendre â certaines complexes â et il faut savoir",heroCuando:"quand",heroP2end:"les prendre. Notre méthode vous aide à ",heroDisena:"concevoir votre meilleur avenir",heroCta:"Demander plus d'infos",filoBadge:"Philosophie",filoTitle1:"Pourquoi avez-vous besoin d'un",filoTitle2:"sherpa",filoSub:"Notre méthode aide les personnes à concevoir leur meilleur avenir, étape par étape, décision par décision.",libroBadge:"Le livre",libroTitle1:"L'art de",libroTitle2:"vieillir sagement",libroSub:"Un guide pour prendre de meilleures décisions de vie et profiter d'un avenir plus épanouissant",libroComprar:"Acheter sur Amazon",libroMas:"En savoir plus sur le livre",capBadge:"Contenu du livre",capTitle1:"10 chapitres pour",capTitle2:"prendre le contrôle de votre avenir",pilaresBadge:"Les 9 piliers",pilaresTitle1:"Les 9 piliers du",pilaresTitle2:"vieillissement intelligent",pilaresSub:"Chaque pilier aborde une dimension clé de la vie. Ensemble, ils vous aident à comprendre tout ce que vous devez décider et quand le faire.",autoraBadge:"à propos de l'auteure"},empresas:{badge:"Pour les entreprises",heroTitle1:"Transformez la longévité en",heroTitle2:"avantage compétitif",heroSub:"Programmes de prévention du vieillissement avec un retour économique mesurable. Réduisez les coûts cachés et améliorez la performance organisationnelle.",cta:"Demander plus d'informations",benefBadge:"Nos solutions",benefTitle1:"Avantages pour",benefTitle2:"votre entreprise",benefSub:"Nos programmes génèrent un impact réel sur les personnes et des résultats mesurables pour l'organisation.",kpiBadge:"Résultats mesurables",kpiTitle1:"Indicateurs",kpiTitle2:"d'impact",simTitle:"Vous voulez calculer l'impact économique du vieillissement sur votre organisation ?",simSub:"Utilisez notre simulateur pour calculer le ROI que nos solutions peuvent générer pour votre organisation et aidez votre entreprise à réaliser des efficacités grâce à l'investissement dans la gestion du vieillissement de la main-d'Åuvre.",costTitle:"Le coût caché du vieillissement non géré",costSub:"Les organisations qui n'abordent pas de manière proactive le vieillissement de leur main-d'Åuvre absorbent des coûts croissants qui impactent directement leur résultat net."},roi:{badge:"Calculateur de ROI",title1:"Calculez l'",title2:"impact économique",title3:"sur votre organisation",sub:"Découvrez combien votre entreprise pourrait perdre en ne gérant pas le vieillissement de sa main-d'Åuvre.",tooltipTitle:"coût caché du vieillissement",tooltipDesc:"Le coût caché du vieillissement comprend l'absentéisme croissant, la perte de productivité, la rotation non planifiée et le désengagement des employés seniors. Ces coûts sont rarement mesurés mais impactent directement le résultat net.",labelEmpleados:"Nombre d'employés",labelEdad:"Ãge moyen de l'effectif",labelSenior:"% employés seniors (50+)",empleados:"employés",anos:"ans",senior:"seniors",calcBtn:"Calculer l'impact sur votre organisation",reducAbsentismo:"Réduction de l'absentéisme",mejoraProductividad:"Amélioration de la productivité",retencionTalento:"Rétention des talents",rango:"Fourchette",minimo:"Minimum",maximo:"Maximum",distribTitle:"Répartition de l'impact",rangoTitle:"Fourchette d'impact économique",totalLabel:"Impact économique annuel estimé",porAno:"par an",msgP1:"Une entreprise de",msgP2:"employés",msgP3:"avec un âge moyen de",msgP4:"ans",msgP5:"et",msgP6:"d'employés seniors pourrait perdre entre",msgP7:"et",msgP8:"si elle ne gère pas le vieillissement de sa main-d'Åuvre.",ctaInfo:"Demander plus d'informations",ctaExplorar:"Explorer les opportunités d'amélioration",absentismo:"Absentéisme",productividad:"Productivité",retencion:"Rétention"},admin:{badge:"Pour les administrations publiques",heroTitle1:"Agir aujourd'hui réduit les",heroTitle2:"coûts publics futurs",heroSub:"La longévité peut passer d'un défi à un facteur de développement socio-économique, et nous y contribuons. Programmes de prévention du vieillissement qui contribuent à la durabilité du système, réduisent la dépendance et améliorent la qualité de vie des citoyens.",cta:"Explorer les opportunités d'amélioration",benefBadge:"Impact public",benefTitle1:"Avantages pour la",benefTitle2:"communauté",benefSub:"Résultats mesurables qui justifient l'investissement public dans la prévention du vieillissement.",progBadge:"Nos programmes",progTitle1:"Solutions pour les",progTitle2:"collectivités locales",msgTitle:"La prévention est le meilleur investissement public",msgSub:"Chaque euro investi dans la prévention du vieillissement génère un retour significatif en économies sanitaires, sociales et en qualité de vie. Anticiper permet de construire des communautés plus résilientes et durables.",msgCta:"Demander des informations"},colegios:{badge:"Pour les ordres professionnels",heroTitle1:"Générez de la valeur réelle pour vos",heroTitle2:"membres",heroSub:"Nous aidons les professionnels à concevoir des services et des produits qui répondent aux véritables besoins d'une société de plus en plus vieillissante. Nous leur donnons la possibilité d'être plus interdisciplinaires, améliorant leur perception de valeur et différenciant votre ordre comme référence en bien-être professionnel.",cta:"Découvrir le programme",benefBadge:"Valeur institutionnelle",benefTitle1:"Pourquoi intégrer la longévité dans votre",benefTitle2:"ordre",servBadge:"Services",servTitle1:"Ce que nous offrons à votre",servTitle2:"ordre",msgTitle:"Expérience avérée avec des ordres professionnels",msgSub1:"Nous avons travaillé avec des ordres de médecins, d'avocats et d'autres collectifs professionnels, en concevant des programmes qui génèrent un impact réel sur leurs membres.",msgSub2:"Notre approche institutionnelle et fondée sur des preuves garantit crédibilité et résultats.",msgCta:"Explorer les opportunités"},eventos:{badge:"Ãvénements et conférences",heroTitle1:"Des expérience
508s qui",heroTitle2:"transforment des vies",heroSub:"Nous organisons des événements exclusifs visant à promouvoir la connaissance du vieillissement intelligent de manière innovante, ludique et pédagogique. Des conférences inspirantes aux sessions de networking, nous favorisons la collaboration et l'échange d'idées entre les participants.",inmersivos:"Ãvénements immersifs",inmersivosDesc:"Des expériences conçues pour créer un impact réel sur les participants.",conferencias:"Conférences inspirantes",conferenciasDesc:"Des interventions d'experts alliant rigueur, proximité et vision d'avenir.",networking:"Networking actif",networkingDesc:"Des espaces pour se connecter avec des professionnels engagés dans la longévité.",matBadge:"Notre événement phare",matTitle:"Les",matTitle2:"Maturathons",matSub:"Un événement immersif, dont la durée est déterminée par notre client, avec des ateliers, des conférences et des activités à travers lesquels nous passons en revue les questions clés liées aux piliers du bien vieillir. Une expérience inoubliable qui transformera la façon dont votre équipe comprend et se prépare pour l'avenir.",matTemasTitle:"Thèmes abordés dans un Maturathon",matCta:"Organisez un Maturathon pour votre équipe",temBadge:"Nos thématiques",temTitle1:"Ce dont nous aimons",temTitle2:"parler",temSub:"Plus que jamais, il est temps de parler des questions clés pour bien vieillir avec une approche innovante, holistique et orientée vers l'action.",videosTitle:"Voyez-nous en action",videosSub:"Exemples de conférences et d'interventions dans les médias.",videosCta:"Réservez une conférence",video1Title:"Entretien sur la longévité et la planification de vie",video2Title:"Webinaire : Le risque de vivre trop longtemps â votre plan financier est-il conçu pour un corps qui durera un siècle ?",video3Title:"Intervention dans 'La Noche' â Canal 24 Horas"},academia:{badge:"Académie de Smart Ageing",heroTitle1:"Formation pour concevoir votre",heroTitle2:"meilleur avenir",heroSub:"Programmes de formation basés sur la méthode « Juste à Temps » et les 9 piliers du vieillissement intelligent. Des cours pratiques, remplis d'outils utiles, qui vous aideront à prendre les bonnes décisions au bon moment.",metPropia:"Méthodologie propre",libroIncl:"Livre inclus",certOficial:"Certificat officiel",online:"100% en ligne",catTitle1:"Trois diplômes, trois",catTitle2:"publics",catSub:"Chaque cours est conçu pour un profil spécifique, avec un contenu adapté à ses défis et besoins spécifiques.",masPopular:"Le plus populaire",quienDebe:"Qui devrait suivre ce cours ?",retosTitle:"Défis que nous abordons",queAprenderas:"Ce que vous apprendrez",verModulos:"Voir les modules du programme",certificado:"Certificat",inscribirme:"S'inscrire",formBadge:"Formation sur mesure",formTitle1:"Besoin d'une formation",formTitle2:"personnalisée",formSub:"Nous concevons des programmes de formation sur mesure pour les organisations qui souhaitent relever des défis spécifiques.",formCta:"Demander une formation sur mesure"},clubs:{badge:"Communautés",heroTitle1:"Clubs de",heroTitle2:"Meilleure Longévité",heroSub:"Nous sommes experts dans la création et la gestion de communautés axées sur le vieillissement intelligent. Nous créons des espaces où les personnes se connectent, apprennent et améliorent leur qualité de vie.",porqueBadge:"Pourquoi un Club de Meilleure Longévité ?",porqueTitle:"Plus qu'un club d'anciens, d'ex-employés ou de retraités",porqueSub:"Un Club de Meilleure Longévité dépasse les clubs d'anciens, d'ex-employés ou de retraités car la longévité est transversale : elle intéresse tout le monde, réunit jeunes et aînés dans un même espace et cela peut être utilisé pour atteindre des objectifs stratégiques de grande valeur.",evidBadge:"Preuves scientifiques",evidTitle:"La communauté comme pilier du bien vieillir",maturaTitle:"Club Matura",metBadge:"Notre méthodologie",metTitle:"Comment nous travaillons",metSub:"Un processus structuré en phases pour créer la communauté parfaite pour votre organisation.",inclTitle:"Que comprend la conception de votre communauté ?"},contacto:{badge:"Contact",title:"Contactez-nous",sub:"Nous sommes là pour vous aider. Remplissez le formulaire ou utilisez nos coordonnées directes.",formTitle:"Envoyez-nous un message",nombre:"Nom",email:"Email",telefono:"Téléphone",mensaje:"Message",enviar:"Envoyer le message",enviando:"Envoi en cours...",llamanos:"Appelez-nous",llamanosDesc:"Nous sommes à votre disposition.",escribenos:"Ãcrivez-nous",escribenosDesc:"Nous vous répondons sous 24h.",successMsg:"Message envoyé avec succès ! Nous vous répondrons bientôt.",errorMsg:"Erreur lors de l'envoi du message. Veuillez réessayer.",placeholderNombre:"Votre nom complet",placeholderEmail:"[email protected]",placeholderTel:"+34 600 000 000",placeholderMsg:"Comment pouvons-nous vous aider ?"},planesPage:{plansBadge:"Nos plans",plansTitle1:"Trois plans pour",plansTitle2:"trois objectifs clés",plansSub:"Nous avons conçu trois plans qui répondent aux objectifs partagés par de nombreuses organisations : préparer leurs employés à la longévité, autonomiser leurs femmes face aux défis futurs et accompagner ceux qui prennent leur retraite dans leur transition.",faseBadge:"Notre façon de travailler",faseTitle1:"Nous travaillons en",faseTitle2:"trois phases",faseSub:"Nous aimons accompagner les organisations qui nous font confiance à travers un processus structuré en trois phases qui garantit des résultats durables.",pregTitle1:"Si vous cherchez des réponses à ",pregTitle2:"ces questions",pregResp:"â¦nous les avons.",pregSub:"Explorez nos plans et contactez-nous pour que nous vous expliquions en détail comment ils peuvent bénéficier à votre organisation.",objetivo:"Objectif",inmersion:"Immersion",profundizacion:"Approfondissement",consolidacion:"Consolidation"},beneficios:{badge:"Avantages de nos solutions",title1:"Voici les avantages obtenus par les",title2:"personnes et organisations",title3:"grâce à nos solutions",sub:"Nos programmes génèrent un impact réel et mesurable, tant sur le bien-être des personnes que sur les résultats des organisations.",orgTitle:"Avantages pour votre organisation",odsBadge:"Engagement mondial",odsTitle1:"Alignés avec les",odsTitle2:"ODD des Nations Unies",odsSub:"Nos programmes contribuent directement à 9 Objectifs de Développement Durable.",whyBadge:"Pourquoi nous choisir ?",whyTitle1:"Parce que nous offrons quelque chose de",whyTitle2:"différent"},soluciones:{badge:"Nos solutions",title1:"Tout ce dont vous avez besoin pour un",title2:"vieillissement intelligent",sub:"Une méthode propre, des événements immersifs, une formation spécialisée et une communauté de soutien : les pièces clés pour concevoir votre meilleur avenir."},common:{fase:"Phase"}},JO={es:oQ,en:sQ,fr:aQ},oB=E.createContext(void 0),lQ=({children:t})=>{const[e,n]=E.useState(()=>{const o=localStorage.getItem("isa-lang");return o==="en"||o==="fr"?o:"es"}),r=E.useCallback(o=>{n(o),localStorage.setItem("isa-lang",o)},[]),i=E.useCallback(o=>{const s=o.split(".");let a=JO[e];for(const c of s)a=a==null?void 0:a[c];
508if(typeof a=="string")return a;let l=JO.es;for(const c of s)l=l==null?void 0:l[c];return typeof l=="string"?l:o},[e]);return u.jsx(oB.Provider,{value:{lang:e,setLang:r,t:i},children:t})},Zt=()=>{const t=E.useContext(oB);if(!t)throw new Error("useLanguage must be used within LanguageProvider");return t},cQ=()=>{const{pathname:t,hash:e}=dl();return E.useEffect(()=>{e?setTimeout(()=>{const n=document.querySelector(e);n&&n.scrollIntoView({behavior:"smooth",block:"start"})},100):window.scrollTo(0,0)},[t,e]),null},uQ=()=>u.jsx("a",{href:"https://wa.me/34650781592",target:"_blank",rel:"noopener noreferrer","aria-label":"Contactar por WhatsApp",className:"fixed bottom-6 right-6 z-50 flex items-center justify-center w-[58px] h-[58px] rounded-full bg-[#25D366] shadow-lg hover:shadow-xl hover:scale-105 transition-all duration-200",children:u.jsx("svg",{viewBox:"0 0 32 32",fill:"white",className:"w-8 h-8",children:u.jsx("path",{d:"M16.004 0h-.008C7.174 0 0 7.176 0 16.004c0 3.5 1.129 6.744 3.046 9.378L1.054 31.29l6.118-1.96A15.924 15.924 0 0016.004 32C24.826 32 32 24.826 32 16.004 32 7.176 24.826 0 16.004 0zm9.302 22.602c-.39 1.1-1.932 2.014-3.168 2.28-.846.18-1.95.324-5.668-1.218-4.762-1.972-7.826-6.81-8.064-7.124-.23-.314-1.932-2.572-1.932-4.904 0-2.332 1.222-3.478 1.656-3.952.39-.428 1.03-.624 1.642-.624.198 0 .376.01.536.018.472.02.71.048 1.022.788.39.926 1.34 3.258 1.456 3.496.118.238.236.554.078.868-.15.322-.282.466-.52.736-.238.27-.464.476-.702.768-.218.254-.464.526-.198.998.266.472 1.184 1.95 2.542 3.16 1.744 1.554 3.214 2.036 3.67 2.262.354.176.778.148 1.054-.148.35-.376.782-.998 1.222-1.612.314-.438.71-.494 1.1-.332.396.154 2.506 1.182 2.936 1.396.43.218.716.324.822.504.104.18.104 1.044-.286 2.144z"})})}),dQ=[{code:"es",label:"ESP"},{code:"en",label:"ENG"},{code:"fr",label:"FR"}],YO=()=>{const{lang:t,setLang:e}=Zt();return u.jsx("div",{className:"flex items-center gap-1 text-xs font-medium",translate:"no",children:dQ.map((n,r)=>u.jsxs("span",{className:"flex items-center gap-1",children:[r>0&&u.jsx("span",{className:"text-muted-foreground/40",children:"/"}),u.jsx("button",{onClick:()=>e(n.code),className:`px-1 py-0.5 rounded transition-colors duration-200 ${t===n.code?"text-primary font-bold":"text-muted-foreground hover:text-foreground"}`,children:n.label})]},n.code))})},Xt=()=>{dl();const{t}=Zt(),[e,n]=E.useState(!1),[r,i]=E.useState(!1),[o,s]=E.useState(!1),[a,l]=E.useState(!1),[c,d]=E.useState(!1),f=E.useRef(null),h=E.useRef(null),p=[{label:"El libro",href:"/libro-acceso"},{label:t("nav.metodo"),href:"/metodo"},{label:t("nav.eventos"),href:"/eventos"},{label:t("nav.formacion"),href:"/academia"},{label:t("nav.clubs"),href:"/clubs"}],g=[{label:t("nav.empresas"),href:"/empresas"},{label:t("nav.adminPublicas"),href:"/administraciones-publicas"},{label:t("nav.colegios"),href:"/colegios-profesionales"}],m=[{label:t("nav.planes"),href:"/planes"},{label:t("nav.actualidad"),href:"/actualidad"},{label:t("nav.sobreNosotros"),href:"/sobre-nosotros"}];return E.useEffect(()=>{const v=y=>{f.current&&!f.current.contains(y.target)&&i(!1),h.current&&!h.current.contains(y.target)&&l(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]),u.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-md border-b border-border/50",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"flex items-center justify-between h-16 md:h-20",children:[u.jsxs(De,{to:"/",className:"flex items-center gap-2 group",children:[u.jsxs("div",{className:"relative",children:[u.jsx(up,{className:"w-8 h-8 text-primary transition-transform duration-300 group-hover:scale-110"}),u.jsx("div",{className:"absolute inset-0 bg-primary/20 rounded-full blur-lg opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),u.jsxs("div",{className:"hidden sm:block",translate:"no",children:[u.jsx("span",{className:"text-lg font-bold text-foreground",children:"Instituto de"}),u.jsx("span",{className:"text-lg font-bold text-primary ml-1",children:"Smart Ageing"})]})]}),u.jsxs("nav",{className:"hidden md:flex items-center gap-3 lg:gap-5",children:[u.jsxs("div",{ref:f,className:"relative",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[u.jsxs(De,{to:"/soluciones",className:"flex items-center gap-1 text-sm font-medium text-muted-foreground hover:text-primary transition-colors duration-200 py-2",children:[u.jsx("span",{translate:"no",children:t("nav.soluciones")}),u.jsx(hg,{className:`w-4 h-4 transition-transform duration-200 ${r?"rotate-180":""}`})]}),r&&u.jsx("div",{className:"absolute top-full left-0 pt-0 w-56 z-50",children:u.jsx("div",{className:"rounded-xl bg-card border border-border shadow-lg py-2",children:p.map(v=>u.jsx(De,{to:v.href,className:"block px-4 py-2.5 text-sm text-muted-foreground hover:text-primary hover:bg-accent transition-colors",onClick:()=>i(!1),children:v.label},v.label))})})]}),u.jsxs("div",{ref:h,className:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[u.jsxs("button",{className:"flex items-center gap-1 text-sm font-medium text-muted-foreground hover:text-primary transition-colors duration-200 py-2",children:[t("nav.quienAyudamos"),u.jsx(hg,{className:`w-4 h-4 transition-transform duration-200 ${a?"rotate-180":""}`})]}),a&&u.jsx("div",{className:"absolute top-full left-0 pt-0 w-56 z-50",children:u.jsx("div",{className:"rounded-xl bg-card border border-border shadow-lg py-2",children:g.map(v=>u.jsx(De,{to:v.href,className:"block px-4 py-2.5 text-sm text-muted-foreground hover:text-primary hover:bg-accent transition-colors",onClick:()=>l(!1),children:v.label},v.label))})})]}),m.map(v=>u.jsx(De,{to:v.href,className:"text-sm font-medium text-muted-foreground hover:text-primary transition-colors duration-200",children:u.jsx("span",{translate:"no",children:v.label})},v.label)),u.jsx(De,{to:"/contactanos",className:"inline-flex items-center justify-center h-8 px-4 roun
508ded-md bg-primary text-primary-foreground text-xs font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",children:t("nav.contacto")}),u.jsx(YO,{})]}),u.jsxs("div",{className:"md:hidden flex items-center gap-3",children:[u.jsx(YO,{}),u.jsx("button",{className:"p-2 rounded-lg hover:bg-muted transition-colors",onClick:()=>n(!e),children:e?u.jsx(w_,{className:"w-6 h-6"}):u.jsx(hK,{className:"w-6 h-6"})})]})]}),e&&u.jsx("div",{className:"md:hidden pb-4 border-t border-border/50",children:u.jsxs("nav",{className:"flex flex-col gap-2 pt-4",children:[u.jsxs("button",{className:"flex items-center justify-between px-4 py-2 text-sm font-medium text-muted-foreground hover:text-primary transition-colors",onClick:()=>s(!o),children:[t("nav.soluciones"),u.jsx(hg,{className:`w-4 h-4 transition-transform duration-200 ${o?"rotate-180":""}`})]}),o&&u.jsx("div",{className:"pl-6 flex flex-col gap-1",children:p.map(v=>u.jsx(De,{to:v.href,className:"px-4 py-2 text-sm text-muted-foreground hover:text-primary transition-colors",onClick:()=>n(!1),children:v.label},v.label))}),u.jsxs("button",{className:"flex items-center justify-between px-4 py-2 text-sm font-medium text-muted-foreground hover:text-primary transition-colors",onClick:()=>d(!c),children:[t("nav.quienAyudamos"),u.jsx(hg,{className:`w-4 h-4 transition-transform duration-200 ${c?"rotate-180":""}`})]}),c&&u.jsx("div",{className:"pl-6 flex flex-col gap-1",children:g.map(v=>u.jsx(De,{to:v.href,className:"px-4 py-2 text-sm text-muted-foreground hover:text-primary transition-colors",onClick:()=>n(!1),children:v.label},v.label))}),m.map(v=>u.jsx(De,{to:v.href,className:"px-4 py-2 text-sm font-medium text-muted-foreground hover:text-primary transition-colors",onClick:()=>n(!1),children:v.label},v.label)),u.jsx(De,{to:"/contactanos",className:"mx-4 mt-2 inline-flex items-center justify-center h-10 px-5 rounded-lg bg-primary text-primary-foreground text-sm font-semibold",onClick:()=>n(!1),children:t("nav.contacto")})]})})]})})},fQ="/assets/hero-mountains-C3ONDXuV.jpg",hQ=()=>{const{t}=Zt();return u.jsxs("section",{className:"relative min-h-screen flex items-center justify-center overflow-hidden pt-16 md:pt-20",children:[u.jsxs("div",{className:"absolute inset-0",children:[u.jsx("img",{src:fQ,alt:"Camino hacia el envejecimiento inteligente",className:"w-full h-full object-cover"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-foreground
508/85 via-foreground/70 to-foreground/50"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground/60 via-transparent to-foreground/30"})]}),u.jsx("div",{className:"relative z-10 container mx-auto px-4 sm:px-6 lg:px-8 py-20 md:py-32",children:u.jsxs("div",{className:"max-w-4xl",children:[u.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary/20 backdrop-blur-sm border border-primary/30 mb-8 animate-fade-up",children:[u.jsx(Q3,{className:"w-4 h-4 text-primary"}),u.jsx("span",{className:"text-sm font-medium text-primary-foreground/90",children:t("hero.badge")})]}),u.jsxs("h1",{className:"text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-bold text-primary-foreground leading-tight mb-6 animate-fade-up",style:{animationDelay:"0.1s"},children:[t("hero.headline1")," ",u.jsx("span",{className:"text-gradient",children:t("hero.longevidad")})," ",t("hero.headline2")," ",u.jsx("span",{className:"text-gradient",children:t("hero.rendimiento")})," ",t("hero.headline3")]}),u.jsx("p",{className:"text-lg sm:text-xl text-primary-foreground/80 max-w-3xl mb-10 leading-relaxed animate-fade-up",style:{animationDelay:"0.2s"},children:t("hero.sub")}),u.jsx("div",{className:"flex flex-col sm:flex-row gap-4 sm:gap-8 mb-10 animate-fade-up",style:{animationDelay:"0.25s"},children:[{icon:dp,pct:"15â30%",label:t("hero.kpi1")},{icon:Ax,pct:"10â20%",label:t("hero.kpi2")},{icon:dp,pct:"20â40%",label:t("hero.kpi3")}].map(e=>u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-white flex items-center justify-center shadow-md",children:u.jsx(e.icon,{className:"w-5 h-5 text-primary"})}),u.jsxs("div",{children:[u.jsx("span",{className:"text-2xl font-bold text-primary-foreground",children:e.pct}),u.jsx("p",{className:"text-sm text-primary-foreground/70",children:e.label})]})]},e.label))}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 animate-fade-up",style:{animationDelay:"0.3s"},children:[u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl bg-gradient-hero text-primary-foreground font-semibold shadow-lg transition-all duration-300 hover:shadow-glow hover:-translate-y-1 hover:scale-105",children:[t("hero.cta1"),u.jsx(st,{className:"w-5 h-5"})]}),u.jsx(De,{to:"/empresas#calculadora-roi",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl border-2 border-primary-foreground/30 bg-transparent text-primary-foreground font-semibold backdrop-blur-sm transition-all duration-300 hover:bg-primary-foreground/10 hover:border-primary-foreground/50",children:t("hero.cta2")})]}),u.jsxs("div",{className:"mt-16 pt-8 border-t border-primary-foreground/20 animate-fade-up",style:{animationDelay:"0.4s"},children:[u.jsx("p",{className:"text-sm text-primary-foreground/90 mb-4",children:t("hero.trust")}),u.jsxs("div",{className:"flex flex-wrap items-center gap-8",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-3xl font-bold text-primary-foreground",children:"500+"}),u.jsxs("span",{className:"text-sm text-primary-foreground/90",children:[t("hero.personas"),u.jsx("br",{}),t("hero.formadas")]})]}),u.jsx("div",{className:"w-px h-10 bg-primary-foreground/20"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-3xl font-bold text-primary-foreground",children:"9"}),u.jsxs("span",{className:"text-sm text-primary-foreground/90",children:[t("hero.pilares"),u.jsx("br",{}),t("hero.envejecimiento")]})]}),u.jsx("div",{className:"w-px h-10 bg-primary-foreground/20"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-3xl font-bold text-primary-foreground",children:"8"}),u.jsxs("span",{className:"text-sm text-primary-foreground/70",children:[t("hero.odsAlineados"),u.jsx("br",{}),t("hero.alineados")]})]})]})]})]})}),u.jsx("div",{className:"absolute bottom-8 left-1/2 -translate-x-1/2 animate-bounce",children:u.jsx("div",{className:"w-6 h-10 rounded-full border-2 border-primary-foreground
508/40 flex items-start justify-center p-2",children:u.jsx("div",{className:"w-1.5 h-2.5 rounded-full bg-primary-foreground/60 animate-pulse"})})})]})},pQ=()=>{const{t}=Zt(),e=[{icon:Fu,title:t("audience.empresasTitle"),subtitle:t("audience.empresasSub"),description:t("audience.empresasDesc"),kpis:[`â 15â30% ${t("audience.kpiAbsentismo")}`,`â 10â20% ${t("audience.kpiProductividad")}`,`â 20â40% ${t("audience.kpiRotacion")}`,`â ${t("audience.kpiDialogo")}`,`â ${t("audience.kpiEdadismo")}`],link:"/empresas#calculadora-roi",cta:t("audience.empresasCta")},{icon:sK,title:t("audience.adminTitle"),subtitle:t("audience.adminSub"),description:t("audience.adminDesc"),kpis:[`â ${t("audience.kpiCostesSocio")}`,`â ${t("audience.kpiEnvActivo")}`,`â ${t("audience.kpiDependencia")}`,`â ${t("audience.kpiDesarrollo")}`],link:"/administraciones-publicas",cta:t("audience.adminCta")},{icon:vn,title:t("audience.colegiosTitle"),subtitle:t("audience.colegiosSub"),description:t("audience.colegiosDesc"),kpis:[`â ${t("audience.kpiEngagement")}`,`â ${t("audience.kpiPercepcion")}`,`â ${t("audience.kpiRetencion")}`,`â ${t("audience.kpiInterdiscipl")}`],link:"/colegios-profesionales",cta:t("audience.colegiosCta")}];return u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12 md:mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("audience.badge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("audience.title1")," ",u.jsx("span",{className:"text-gradient",children:t("audience.title2")}),"?"]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("audience.sub")})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-6 lg:gap-8",children:e.map(n=>u.jsxs(De,{to:n.link,className:"group relative bg-card rounded-2xl p-8 border border-border/50 transition-all duration-500 hover:shadow-lg hover:border-primary/30 hover:-translate-y-1 overflow-hidden flex flex-col",children:[u.jsx("div",{className:"flex-shrink-0 w-14 h-14 rounded-xl bg-white shadow-md flex items-center justify-center transition-all duration-500 group-hover:bg-primary group-hover:shadow-lg mb-6",children:u.jsx(n.icon,{className:"w-7 h-7 text-primary transition-colors duration-500 group-hover:text-primary-foreground"})}),u.jsx("h3",{className:"text-xl font-bold text-foreground mb-1 group-hover:text-primary transition-colors duration-300",children:n.title}),u.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:n.subtitle}),u.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6 flex-1",children:n.description}),u.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:n.kpis.map(r=>u.jsx("span",{className:"inline-block px-3 py-1 rounded-full bg-white text-foreground border border-border text-xs font-semibold",children:r},r))}),u.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-semibold text-primary group-hover:gap-3 transition-all duration-300",children:[n.cta,u.jsx(st,{className:"w-4 h-4"})]})]},n.title))})]})})},mQ=()=>{const{t}=Zt(),e=[{icon:X3,step:"01",title:t("overview.phase1"),description:t("overview.phase1desc"),result:t("overview.phase1result")},{icon:e5,step:"02",title:t("overview.phase2"),description:t("overview.phase2desc"),result:t("overview.phase2result")},{icon:Ak,step:"03",title:t("overview.phase3"),description:t("overview.phase3desc"),result:t("overview.phase3result")}];return u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12 md:mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("overview.badge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("overview.title1")," ",u.jsx("span",{className:"text-gradient",children:t("overview.title2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("overview.sub")})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-6 lg:gap-8 mb-12",children:e.map(n=>u.jsxs("div",{className:"group relative bg-card rounded-2xl p-8 border border-border/50 transition-all duration-500 hover:shadow-lg hover:border-primary/30 hover:-translate-y-1",children:[u.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[u.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-xl bg-white shadow-md flex items-center justify-center transition-all duration-500 group-hover:bg-primary group-hover:shadow-lg",children:u.jsx(n.icon,{className:"w-6 h-6 text-primary transition-colors duration-500 group-hover:text-primary-foreground"})}),u.jsxs("span",{className:"text-sm font-bold text-primary/40",children:[t("common.fase").toUpperCase()," ",n.step]})]}),u.jsx("h3",{className:"text-xl font-bold text-foreground mb-3 group-hover:text-primary transition-colors duration-300",children:n.title}),u.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:n.description}),u.jsx("div",{className:"pt-4 border-t border-border/50",children:u.jsxs("p",{className:"text-sm font-semibold text-primary",children:["â ",n.result]})})]},n.step))}),u.jsx("div",{className:"text-center",children:u.jsxs(De,{to:"/metodo",className:"inline-flex items-center gap-2 text-primary font-semibold hover:gap-3 transition-all duration-300",children:[t("overview.link"),u.jsx(st,{className:"w-5 h-5"})]})})]})})},gQ=()=>{const{t}=Zt(),e=[{icon:Z3,title:t("urgency.point1title"),description:t("urgency.point1desc")},{icon:ks,title:t("urgency.point2title"),description:t("urgency.point2desc")},{icon:Ax,title:t("urgency.point3title"),description:t("urgency.point3desc")}];return u.jsxs("section",{className:"py-16 md:py-24 bg-foreground relative overflow-hidden",children:[u.jsxs("div",{className:"absolute inset-0 opacity-10",children:[u.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-primary rounded-full blur-3xl"}),u.jsx("div",{className:"absolute bottom-0 right-1/4 w-96 h-96 bg-primary rounded-full blur-3xl"})]}),u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12 md:mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-white/20 text-white text-sm font-medium mb-4 backdrop-blur-sm",children:t("urgency.badge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-primary-foreground mb-6",children:[t("urgency.title1")," ",u.jsx("span",{className:"text-primary",children:t("urgency.title2")})]}
508),u.jsx("p",{className:"text-lg text-primary-foreground/70",children:t("urgency.sub")})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-6 lg:gap-8 mb-12",children:e.map(n=>u.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-8 border border-white/15",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-white flex items-center justify-center mb-6 shadow-md",children:u.jsx(n.icon,{className:"w-6 h-6 text-primary"})}),u.jsx("h3",{className:"text-lg font-bold text-primary-foreground mb-3",children:n.title}),u.jsx("p",{className:"text-primary-foreground/70 leading-relaxed",children:n.description})]},n.title))}),u.jsx("div",{className:"text-center",children:u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-14 px-10 rounded-xl bg-gradient-hero text-primary-foreground text-lg font-semibold shadow-lg transition-all duration-300 hover:shadow-glow hover:-translate-y-1 hover:scale-105",children:[t("urgency.cta"),u.jsx(st,{className:"w-5 h-5"})]})})]})]})},Ws=()=>{const{t}=Zt();return u.jsxs(u.Fragment,{children:[u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[u.jsx("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:t("cta.title")}),u.jsx("p",{className:"text-lg text-muted-foreground mb-10 max-w-2xl mx-auto",children:t("cta.sub")}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-16 px-10 rounded-xl bg-primary text-primary-foreground text-lg font-semibold shadow-lg transition-all duration-300 hover:bg-primary/90 hover:shadow-xl hover:-translate-y-1",children:[t("cta.btn1"),u.jsx(st,{className:"w-5 h-5"})]}),u.jsx(De,{to:"/empresas#calculadora-roi",className:"inline-flex items-center justify-center gap-2 h-16 px-10 rounded-xl border-2 border-primary text-primary text-lg font-semibold transition-all duration-300 hover:bg-primary hover:text-primary-foreground",children:t("cta.btn2")})]})]})})}),u.jsxs("section",{id:"contacto",className:"py-12 md:py-16 bg-foreground relative overflow-hidden",children:[u.jsxs("div",{className:"absolute inset-0 opacity-10",children:[u.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-primary rounded-full blur-3xl"}),u.jsx("div",{className:"absolute bottom-0 right-1/4 w-96 h-96 bg-primary rounded-full blur-3xl"})]}),u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:u.jsxs("div",{className:"grid sm:grid-cols-3 gap-8 max-w-3xl mx-auto",children:[u.jsxs("div",{className:"flex flex-col items-center gap-3",children:[u.jsx("div",{className:"w-12 h-12 rounded-full bg-background flex items-center justify-center shadow-md",children:u.jsx(G3,{className:"w-5 h-5 text-primary"})}),u.jsx("span",{className:"text-sm text-primary-foreground/70",children:t("cta.email")}),u.jsx("a",{href:"mailto:[email protected]",className:"text-primary-foreground hover:text-primary transition-colors text-sm text-center",children:"[email protected]"})]}),u.jsxs("div",{className:"flex flex-col items-center gap-3",children:[u.jsx("div",{className:"w-12 h-12 rounded-full bg-background flex items-center justify-center shadow-md",children:u.jsx(J3,{className:"w-5 h-5 text-primary"})}),u.jsx("span",{className:"text-sm text-primary-foreground/70",children:t("cta.phone")}),u.jsx("a",{href:"tel:+34650781592",className:"text-primary-foreground hover:text-primary transition-colors text-sm",children:"+34 650 781 592"})]}),u.jsxs("div",{className:"flex flex-col items-center gap-3",children:[u.jsx("div",{className:"w-12 h-12 rounded-full bg-background flex items-center justify-center shadow-md",children:u.jsx(fK,{className:"w-5 h-5 text-primary"})}),u.jsx("span",{className:"text-sm text-primary-foreground/70",children:t("cta.location")}),u.jsx("span",{className:"text-primary-foreground text-sm",children:t("cta.locationValue")})]})]})})]})]})},Qt=()=>{const t=new Date().getFullYear(),{t:e}=Zt();return u.jsx("footer",{className:"bg-background border-t border-border py-12",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[u.jsxs("div",{className:"md:col-span-1",children:[u.jsxs(De,{to:"/",className:"flex items-center gap-2 mb-4",children:[u.jsx(up,{className:"w-8 h-8 text-primary"}),u.jsxs("div",{translate:"no",children:[u.jsx("span",{className:"text-lg font-bold text-foreground",children:"Instituto de"}),u.jsx("span",{className:"text-lg font-bold text-primary ml-1",children:"Smart Ageing"})]})]}),u.jsx("p",{className:"text-muted-foreground text-sm",children:e("footer.tagline")})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground mb-4 text-base",children:e("footer.quienAyudamos")}),u.jsxs("ul",{className:"space-y-2",children:[u.jsx("li",{children:u.jsx(De,{to:"/empresas",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("nav.empresas")})}),u.jsx("li",{children:u.jsx(De,{to:"/administraciones-publicas",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("nav.adminPublicas")})}),u.jsx("li",{children:u.jsx(De,{to:"/colegios-profesionales",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("nav.colegios")})})]})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground mb-4 text-base",children:e("footer.explora")}),u.jsxs("ul",{className:"space-y-2",children:[u.jsx("li",{children:u.jsx(De,{to:"/soluciones",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("nav.soluciones")})}),u.jsx("li",{children:u.jsx(De,{to:"/metodo",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("nav.metodo")})}),u.jsx("li",{children:u.jsx(De,{to:"/planes",className:"text-muted-foreground hover:text-primary transition-colors text-sm",translate:"no",children:e("nav.planes")})}),u.jsx("li",{children:u.jsx(De,{to:"/actualidad",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("nav.actualidad")})}),u.jsx("li",{children:u.jsx(De,{to:"/sobre-nosotros",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("nav.sobreNosotros")})}),u.jsx("li",{children:u.jsx(De,{to:"/contactanos",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("footer.contactanos")})})]})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground mb-4 text-base",children:e("footer.legal")}),u.jsxs("ul",{className:"space-y-2",children:[u.jsx("li",{children:u.jsx(De,{to:"/politica-de-privacidad",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("footer.privacidad")})}),u.jsx("li",{children:u.jsx(De,{to:"/aviso-legal",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("footer.avisoLegal")})}
508),u.jsx("li",{children:u.jsx(De,{to:"/politica-de-cookies",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:e("footer.cookies")})})]})]})]}),u.jsxs("div",{className:"pt-8 border-t border-border flex flex-col sm:flex-row justify-between items-center gap-4",children:[u.jsxs("p",{className:"text-sm text-muted-foreground",children:["© ",t," Instituto de Smart Ageing. ",e("footer.derechos")]}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("a",{href:"https://www.linkedin.com/company/institutodesmartageing/",target:"_blank",rel:"noopener noreferrer","aria-label":"LinkedIn",className:"w-10 h-10 rounded-full bg-muted flex items-center justify-center text-muted-foreground hover:bg-primary hover:text-primary-foreground transition-all duration-300",children:u.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})}),u.jsx("a",{href:"https://www.youtube.com/@smartageingtv/",target:"_blank",rel:"noopener noreferrer","aria-label":"YouTube",className:"w-10 h-10 rounded-full bg-muted flex items-center justify-center text-muted-foreground hover:bg-primary hover:text-primary-foreground transition-all duration-300",children:u.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})}),u.jsx("a",{href:"https://www.instagram.com/institutodesmartageing/",target:"_blank",rel:"noopener noreferrer","aria-label":"Instagram",className:"w-10 h-10 rounded-full bg-muted flex items-center justify-center text-muted-foreground hover:bg-primary hover:text-primary-foreground transition-all duration-300",children:u.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"})})}),u.jsx("a",{href:"https://www.facebook.com/institutodesmartageing/",target:"_blank",rel:"noopener noreferrer","aria-label":"Facebook",className:"w-10 h-10 rounded-full bg-muted flex items-center justify-center text-muted-foreground hover:bg-primary hover:text-primary-foreground transition-all duration-300",children:u.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})})]})]})]})})},vQ=()=>u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx(hQ,{}),u.jsx(pQ,{}),u.jsx(mQ,{}),u.jsx(gQ,{}),u.jsx(Ws,{})]}),u.jsx(Qt,{})]}),yQ={es:[{icon:qw,title:"Vocación de servicio",description:"Estamos al servicio de las personas, siempre."},{icon:xr,title:"EmpatÃa",description:"Queremos entenderte y darte lo que necesitas."},{icon:Ua,title:"Honestidad",description:"Somos transparentes y cumplimos nuestros compromisos."},{icon:qa,title:"CercanÃa",description:"Hablamos tu lenguaje y queremos estar cerca de ti."},{icon:vn,title:"Profesionalidad",description:"Creemos en el valor del trabajo y del esfuerzo continuo."},{icon:Lo,title:"Innovación",description:"Nos gusta ir un paso por delante."}],en:[{icon:qw,title:"Service vocation",description:"We are at the service of people, always."}
508,{icon:xr,title:"Empathy",description:"We want to understand you and give you what you need."},{icon:Ua,title:"Honesty",description:"We are transparent and keep our commitments."},{icon:qa,title:"Closeness",description:"We speak your language and want to be close to you."},{icon:vn,title:"Professionalism",description:"We believe in the value of work and continuous effort."},{icon:Lo,title:"Innovation",description:"We like to stay one step ahead."}],fr:[{icon:qw,title:"Vocation de service",description:"Nous sommes au service des personnes, toujours."},{icon:xr,title:"Empathie",description:"Nous voulons vous comprendre et vous donner ce dont vous avez besoin."},{icon:Ua,title:"Honnêteté",description:"Nous sommes transparents et tenons nos engagements."},{icon:qa,title:"Proximité",description:"Nous parlons votre langage et voulons être proches de vous."},{icon:vn,title:"Professionnalisme",description:"Nous croyons en la valeur du travail et de l'effort continu."},{icon:Lo,title:"Innovation",description:"Nous aimons avoir une longueur d'avance."}]},bQ=[{name:"MarÃa Jesús González-Espejo",roleEs:"Fundadora y alma mater",roleEn:"Founder and driving force",roleFr:"Fondatrice et âme mater",location:{es:"España",en:"Spain",fr:"Espagne"},descEs:"Autora de «El arte de envejecer sabiamente». Su sueño es ayudar a las personas a adquirir la información, formación y recursos necesarios para tener una buena vejez. Es abogada y experta en estrategia, comunicación y tecnologÃa.",descEn:"Author of «The Art of Ageing Wisely». Her dream is to help people acquire the information, training, and resources needed for a good old age. She is a lawyer and expert in strategy, communication, and technology.",descFr:"Auteure de « L'art de vieillir sagement ». Son rêve est d'aider les personnes à acquérir les informations, la formation et les ressources nécessaires pour bien vieillir. Avocate et experte en stratégie, communication et technologie."},{name:"Juan Ramón Conde",roleEs:"Abogado y mediador",roleEn:"Lawyer and mediator",roleFr:"Avocat et médiateur",location:{es:"España",en:"Spain",fr:"Espagne"},descEs:"Experto en derecho y especialista en resolución de conflictos familiares, priorizando siempre el bienestar y la continuidad de las relaciones. Abogado experto en derecho de familia, herencias y sucesiones.",descEn:"Legal expert and specialist in family conflict resolution, always prioritising wellbeing and relationship continuity. Expert in family law, inheritance, and succession.",descFr:"Expert en droit et spécialiste de la résolution des conflits familiaux, privilégiant toujours le bien-être et la continuité des relations."},{name:"Patricio Torres Castillo",roleEs:"Representante en Chile",roleEn:"Representative in Chile",roleFr:"Représentant au Chili",location:{es:"Chile",en:"Chile",fr:"Chili"},descEs:"Trabajador social, doctor en psicologÃa por la UPSA e investigador. Conecta, difunde y coordina iniciativas de Smart Ageing en Chile, promoviendo nuestros valores y actividades.",descEn:"Social worker, PhD in Psychology from UPSA, and researcher. Connects, disseminates, and coordinates Smart Ageing initiatives in Chile.",descFr:"Travailleur social, docteur en psychologie de l'UPSA et chercheur. Connecte, diffuse et coordonne les initiatives de Smart Ageing au Chili."}],xQ=()=>{const{t,lang:e}=Zt(),n=yQ[e];return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("section",{className:"pt-28 md:pt-36 pb-12 md:pb-14 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 text-center max-w-4xl",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("about.badge")}),u.jsxs("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("about.title1")," ",u.jsx("span",{className:"text-gradient",children:t("about.title2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl mx-auto",children:t("about.sub")})]})}),u.jsx("section",{className:"py-12 md:py-16 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto",children:[u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6 text-center",children:[t("about.razonTitle")," ",u.jsx("span",{className:"text-gradient",children:t("about.razonTitle2")})]}),u.jsxs("div",{className:"space-y-4 text-muted-foreground leading-relaxed",children:[u.jsx("p",{children:t("about.razonP1")}),u.jsx("p",{children:t("about.razonP2")})]})]})})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("about.valoresBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground",children:[t("about.valoresTitle")," ",u.jsx("span",{className:"text-gradient",children:t("about.valoresTitle2")})]})]}),u.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:n.map(r=>u.jsxs("div",{className:"group p-6 rounded-xl bg-card border border-border/50 transition-all duration-300 hover:shadow-md hover:border-primary/30",children:[u.jsx("div",{className:"w-12 h-12 rounded-lg bg-accent flex items-center justify-center mb-4 transition-all duration-300 group-hover:bg-primary",children:u.jsx(r.icon,{className:"w-6 h-6 text-accent-foreground transition-colors duration-300 group-hover:text-primary-foreground"})}),u.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:r.title}),u.jsx("p",{className:"text-sm text-muted-foreground",children:r.description})]},r.title))})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("about.equipoBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground",children:[t("about.equipoTitle")," ",u.jsx("span",{className:"text-gradient",children:t("about.equipoTitle2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground mt-4 max-w-2xl mx-auto",children:t("about.equipoSub")})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-8 max-w-5xl mx-auto",children:bQ.map(r=>u.jsxs("div",{className:"group bg-card rounded-2xl p-8 border border-border/50 text-center transition-all duration-300 hover:shadow-lg hover:border-primary/30",children:[u.jsx("div",{className:"w-20 h-20 rounded-full bg-accent flex items-center justify-center mx-auto mb-4",children:u.jsx(vn,{className:"w-8 h-8 text-accent-foreground"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-1",children:r.name}),u.jsx("p",{className:"text-sm text-primary font-medium mb-1",children:e==="fr"?r.roleFr:e==="en"?r.roleEn:r.roleEs}),u.jsx("p",{className:"text-xs text-muted-foreground font-medium mb-3",children:r.location[e]}),u.jsx("p",{className:"text-sm text-muted-foreground",children:e==="fr"?r.descFr:e==="en"?r.descEn:r.descEs})]},r.name))})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("about.consejoBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground",children:[t("about.consejoTitle")," ",u.jsx("span",{className:"text-gradient",children:t("about.consejoTitle2")})," ",t("about.consejoTitle3")]})]}),u.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 max-w-6xl mx-auto",children:[{name:"Paloma Alonso",role:{es:"Médico, socióloga y politóloga",en:"Physician, sociologist and political scientist",fr:"Médecin, sociologue et politologue"},description:{es:"Experta en gestión hospitalaria con más de 15 años de experiencia.",en:"Expert in hospital management with over 15 years of experience.",fr:"Experte en gestion hospital
508ière avec plus de 15 ans d'expérience."}},{name:"Pablo Caneda",role:{es:"Directivo y músico jubilado",en:"Retired executive and musician",fr:"Cadre et musicien retraité"},description:{es:"Experto en música y apoyo mutuo.",en:"Expert in music and mutual support.",fr:"Expert en musique et entraide."}},{name:"NÃtida Pastor",role:{es:"Directiva del sector farmacéutico",en:"Pharmaceutical sector executive",fr:"Cadre du secteur pharmaceutique"},description:{es:"Más de 25 años de experiencia en consumo y farmacia.",en:"Over 25 years of experience in consumer goods and pharmacy.",fr:"Plus de 25 ans d'expérience dans la consommation et la pharmacie."}},{name:"Jaime Algorta Pineda",role:{es:"Médico y experto en salud",en:"Physician and health expert",fr:"Médecin et expert en santé"},description:{es:"Doctor en medicina y experto en ensayos clÃnicos.",en:"Doctor of Medicine and clinical trials expert.",fr:"Docteur en médecine et expert en essais cliniques."}},{name:"Francisco Marticorena RodrÃguez",role:{es:"Economista y experto en seguros",en:"Economist and insurance expert",fr:"Ãconomiste et expert en assurances"},description:{es:"Corredor de seguros y ex Director Financiero.",en:"Insurance broker and former CFO.",fr:"Courtier en assurances et ancien Directeur Financier."}},{name:"Miguel Ãngel Cicuéndez",role:{es:"Asesor financiero (EAF)",en:"Financial advisor (EAF)",fr:"Conseiller financier (EAF)"},description:{es:"Experto en planificación financiera y fiscal.",en:"Expert in financial and tax planning.",fr:"Expert en planification financière et fiscale."}},{name:"Jesús Moreno",role:{es:"Empresario y experto en bienestar",en:"Entrepreneur and wellbeing expert",fr:"Entrepreneur et expert en bien-être"},description:{es:"Especialista en gestión de empresas y bienestar.",en:"Specialist in business management and wellbeing.",fr:"Spécialiste en gestion d'entreprise et bien-être."}},{name:"Rodrigo Miranda",role:{es:"Socio Director General de ISDI",en:"Managing Partner at ISDI",fr:"Associé Directeur Général d'ISDI"},description:{es:"Experto en tecnologÃa y transformación digital.",en:"Expert in technology and digital transformation.",fr:"Expert en technologie et transformation numérique."}},{name:"Iñaki Alonso",role:{es:"Arquitecto",en:"Architect",fr:"Architecte"},description:{es:"25 años en la parte social y ambiental de la arquitectura.",en:"25 years in the social and environmental aspects of architecture.",fr:"25 ans dans les aspects sociaux et environnementaux de l'architecture."}},{name:"Teresa Quirós",role:{es:"Experta en finanzas y sostenibilidad",en:"Finance and sustainability expert",fr:"Experte en finances et durabilité"},description:{es:"Amplia experiencia en finanzas y gobierno corporativo.",en:"Extensive experience in finance and corporate governance.",fr:"Vaste expérience en finances et gouvernance d'entreprise."}},{name:"Vicente Gil Durante",role:{es:"Ingeniero de telecomunicaciones",en:"Telecommunications engineer",fr:"Ingénieur en télécommunications"},description:{es:"Consultor senior en desarrollo de negocio.",en:"Senior consultant in business development.",fr:"Consultant senior en développement commercial."}},{name:"Luis Santiago Moreno",role:{es:"Catedrático de EconomÃa (UCM)",en:"Professor of Economics (UCM)",fr:"Professeur d'Ãconomie (UCM)"},description:{es:"Especializado en polÃticas económicas y economÃa pública.",en:"Specialised in economic policies and public economics.",fr:"Spécialisé en politiques économiques et économie publique."}},{name:"Juan Pavón",role:{es:"Catedrático de IA (UCM)",en:"Professor of AI (UCM)",fr:"Professeur d'IA (UCM)"},description:{es:"Especialista en inteligencia artificial y sistemas multi-agente.",en:"Specialist in artificial intelligence and multi-agent systems.",fr:"Spécialiste en intelligence artificielle et systèmes multi-agents."}}].map(r=>u.jsxs("div",{className:"group bg-card rounded-xl p-6 border border-border/50 transition-all duration-300 hover:shadow-md hover:border-primary/30",children:[u.jsx("div",{className:"w-14 h-14 roun
508ded-full bg-accent flex items-center justify-center mx-auto mb-4",children:u.jsx("span",{className:"text-lg font-bold text-accent-foreground",children:r.name.split(" ").map(i=>i[0]).slice(0,2).join("")})}),u.jsx("h3",{className:"text-sm font-bold text-foreground text-center mb-1",children:r.name}),u.jsx("p",{className:"text-xs text-primary font-medium text-center mb-2",children:r.role[e]}),u.jsx("p",{className:"text-xs text-muted-foreground text-center leading-relaxed",children:r.description[e]})]},r.name))})]})}),u.jsx(Ws,{})]}),u.jsx(Qt,{})]})},XO={es:[{icon:$o,number:"01",title:"Método Justo a Tiempo",subtitle:"Nuestro método propio",description:"Envejecer es un proceso que puedes vivir de forma consciente o inconsciente. Nosotros apostamos por la primera opción. Nuestro método «Justo a Tiempo» te ayuda a formarte, informarte y tomar las mejores decisiones en el momento adecuado para diseñar tu mejor futuro.",extra:"El método está recogido en el libro «El arte de envejecer sabiamente», editado por Editorial Matura y disponible en Amazon.",cta:"Descubrir el libro",link:"/libro",external:!1,isRoute:!0},{icon:Ss,number:"02",title:"Maturatones",subtitle:"Eventos inmersivos",description:"Los Maturatones son eventos inmersivos en nuestra metodologÃa, diseñados para ayudar a las personas a comprender sin esfuerzo los retos derivados del envejecimiento y la necesidad de asumir la responsabilidad sobre su futuro.",extra:"Una experiencia transformadora que combina talleres, charlas y actividades prácticas para revisar las cuestiones clave del buen envejecimiento.",cta:"Descubrir nuestros eventos",link:"/eventos",external:!1,isRoute:!0},{icon:Fa,number:"03",title:"Formación en Smart Ageing",subtitle:"Academia de Smart Ageing",description:"Basándonos en el método «Justo a Tiempo» hemos creado programas formativos diseñados para que las personas aprendan todo lo necesario para diseñar su mejor futuro. Cursos prácticos, basados en evidencia y orientados a la acción.",extra:"Nuestras formaciones están albergadas en la Academia de Smart Ageing, donde encontrarás tanto programas a medida como formaciones estándar.",cta:"Explorar la Academia",link:"/academia",external:!1,isRoute:!0},{icon:vn,number:"04",title:"Matura Club de Mejor Longevidad",subtitle:"Comunidad y redes de apoyo",description:"Hemos creado el Matura Club de Mejor Longevidad, una comunidad que nos ha permitido comprender la importancia de las redes de apoyo mutuo para envejecer mejor. Somos expertos en construir y gestionar comunidades.",extra:"Dominamos la tecnologÃa, la arquitectura y la dinamización de comunidades. Ãnete a nuestra comunidad y conecta con personas que comparten tu compromiso con un envejecimiento inteligente.",cta:"Ãnete al Club en WhatsApp",link:"https://chat.whatsapp.com/CuwlSun9CesLYd9Ro78pOV",external:!0,isRoute:!1}],en:[{icon:$o,number:"01",title:"Just in Time Method",subtitle:"Our proprietary method",description:"Ageing is a process you can live consciously or unconsciously. We champion the first option. Our «Just in Time» method helps you learn, stay informed, and make the best decisions at the right moment to design your best future.",extra:"The method is captured in the book «The Art of Ageing Wisely», published by Editorial Matura and available on Amazon.",cta:"Discover the book",link:"/libro",external:!1,isRoute:!0},{icon:Ss,number:"02",title:"Maturathons",subtitle:"Immersive events",description:"Maturathons are immersive events based on our methodology, designed to help people effortlessly understand the challenges of ageing and the need to take responsibility for their future.",extra:"A transformative experience combining workshops, talks, and practical activities to review the key aspects of healthy ageing.",cta:"Discover our events",link:"/eventos",external:!1,isRoute:!0},{icon:Fa,number:"03",title:"Smart Ageing Training",subtitle:"Smart Ageing Academy",description:"Based on the «Just in Time» method, we have created training programmes designed to teach people everything they need to design their best future. Practical, evidence-based, action-oriented courses.",extra:"Our courses are hosted at the Smart Ageing Academy, where you'll find both custom and standard training programmes.",cta:"Explore the Academy",link:"/academia",external:!1,isRoute:!0},{icon:vn,number:"04",title:"Matura Better Longevity Club",subtitle:"Community and support networks",description:"We created the Matura Better Longevity Club, a community that has helped us understand the importance of mutual support networks for ageing better. We are experts in building and managing communities.",extra:"We master the technology, architecture, and dynamisation of communities. Join our community and connect with people who share your commitment to smart ageing.",cta:"Join the Club on WhatsApp",link:"https://chat.whatsapp.com/CuwlSun9CesLYd9Ro78pOV",external:!0,isRoute:!1}],fr:[{icon:$o,number:"01",title:"Méthode Juste à Temps",subtitle:"Notre méthode propre",description:"Vieillir est un processus que vous pouvez vivre de manière consciente ou inconsciente. Nous misons sur la première option. Notre méthode «Juste à Temps» vous aide à vous former, vous informer et prendre les meilleures décisions au bon moment pour concevoir votre meilleur avenir.",extra:"La méthode est décrite dans le livre «L'art de vieillir sagement», publié par Editorial Matura et disponible sur Amazon.",cta:"Découvrir le livre",link:"/libro",external:!1,isRoute:!0},{icon:Ss,number:"02",title:"Maturathons",subtitle:"Ãvénements immersifs",description:"Les Maturathons sont des événements immersifs dans notre méthodologie, conçus pour aider les personnes à comprendre sans effort les défis du vieillissement et la nécessité d'assumer la responsabilité de leur avenir.",extra:"Une expérience transformatrice combinant ateliers, conférences et activités pratiques pour passer en revue les questions clés du bon vieillissement.",cta:"Découvrir nos événements",link:"/eventos",external:!1,isRoute:!0}
508,{icon:Fa,number:"03",title:"Formation en Smart Ageing",subtitle:"Académie de Smart Ageing",description:"En nous basant sur la méthode «Juste à Temps», nous avons créé des programmes de formation conçus pour que les personnes apprennent tout ce qui est nécessaire pour concevoir leur meilleur avenir. Des cours pratiques, basés sur des preuves et orientés vers l'action.",extra:"Nos formations sont hébergées à l'Académie de Smart Ageing, où vous trouverez des programmes sur mesure et des formations standard.",cta:"Explorer l'Académie",link:"/academia",external:!1,isRoute:!0},{icon:vn,number:"04",title:"Matura Club de Meilleure Longévité",subtitle:"Communauté et réseaux de soutien",description:"Nous avons créé le Matura Club de Meilleure Longévité, une communauté qui nous a permis de comprendre l'importance des réseaux de soutien mutuel pour mieux vieillir. Nous sommes experts dans la construction et la gestion de communautés.",extra:"Nous maîtrisons la technologie, l'architecture et la dynamisation des communautés. Rejoignez notre communauté et connectez-vous avec des personnes partageant votre engagement envers un vieillissement intelligent.",cta:"Rejoindre le Club sur WhatsApp",link:"https://chat.whatsapp.com/CuwlSun9CesLYd9Ro78pOV",external:!0,isRoute:!1}]},wQ=()=>{const{t,lang:e}=Zt(),n=XO[e]||XO.es;return u.jsx("section",{id:"soluciones",className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16 md:mb-20",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("soluciones.badge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("soluciones.title1")," ",u.jsx("span",{className:"text-gradient",children:t("soluciones.title2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("soluciones.sub")})]}),u.jsx("div",{className:"space-y-8 lg:space-y-12",children:n.map((r,i)=>u.jsxs("div",{className:`group relative rounded-2xl border-2 border-border overflow-hidden transition-all duration-500 hover:shadow-lg hover:border-primary/30 ${i%2===0?"bg-card":"bg-gradient-section"}`,children:[u.jsx("div",{className:"p-8 md:p-10 lg:p-12",children:u.jsxs("div",{className:"flex flex-col lg:flex-row gap-8 lg:gap-12 items-start",children:[u.jsxs("div",{className:"flex-shrink-0 flex items-center gap-4 lg:flex-col lg:items-center lg:text-center",children:[u.jsx("div",{className:"w-16 h-16 rounded-2xl bg-accent flex items-center justify-center transition-all duration-500 group-hover:bg-primary group-hover:shadow-lg",children:u.jsx(r.icon,{className:"w-8 h-8 text-accent-foreground transition-colors duration-500 group-hover:text-primary-foreground"})}),u.jsx("span",{className:"text-5xl font-bold text-border group-hover:text-primary/20 transition-colors duration-500",children:r.number})]}),u.jsxs("div",{className:"flex-1",children:[u.jsx("span",{className:"text-xs font-semibold text-primary tracking-wider uppercase",children:r.subtitle}),u.jsx("h3",{className:"text-2xl md:text-3xl font-bold text-foreground mt-2 mb-4 group-hover:text-primary transition-colors duration-300",children:r.title}),u.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4 max-w-3xl",children:r.description}),u.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6 max-w-3xl",children:r.extra}),r.isRoute?u.jsxs(De,{to:r.link,className:"inline-flex items-center gap-2 px-6 py-3 rounded-lg bg-primary text-primary-foreground text-sm font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",children:[r.cta,u.jsx(st,{className:"w-4 h-4"})]}):r.external?u.jsxs("a",{href:r.link,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-6 py-3 rounded-lg bg-primary text-primary-foreground text-sm font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",children:[r.cta,u.jsx(cc,{className:"w-4 h-4"})]}):u.jsxs("a",{href:r.link,className:"inline-flex items-center gap-2 px-6 py-3 rounded-lg bg-primary text-primary-foreground text-sm font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",children:[r.cta,u.jsx(st,{className:"w-4 h-4"})]})]})]})}),u.jsx("div",{className:"absolute inset-0 rounded-2xl bg-gradient-to-br from-primary/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none"})]},r.title))})]})})},SQ=()=>u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx(wQ,{}),u.jsx(Ws,{})]}),u.jsx(Qt,{})]}),z_="/assets/portada-libro-gUNZQruj.jpg",sB="/assets/chusa-con-libro-CQEzOAJh.jpg",aB="/assets/rueda-pilares-C4BvZtwy.jpg",kQ="https://www.amazon.es/dp/B0DKXSGSG1/ref=mp_s_a_1_1?crid=3SHIMJAAZ4V3F&dib=eyJ2IjoiMSJ9.N2I2ojCzfQWNWLMQLC7KaA.Av3unOJiE2DvsT5ZhNIo1qwsS0-ru88d9dhmUhUoJks&dib_tag=se&keywords=el+arte+de+envejecer+sabiamente&qid=1729940973&sprefix=el+
508arte+de+envejecer+sabiamente%2Caps%2C131&sr=8-1",EQ={es:[{icon:Kw,title:"Envejecer es un proceso",description:"No es un evento puntual. Es un camino largo que recorremos todos, con etapas, decisiones y bifurcaciones que marcan la diferencia."},{icon:Es,title:"Consciente o inconsciente: tú eliges",description:"Cada persona tiene la opción de acometer este proceso de forma consciente âpreparándoseâ o inconsciente âdejando que las circunstancias decidan por ella."},{icon:ks,title:"Prepararse es clave",description:"Cuando decides envejecer de forma consciente, necesitas prepararte: hay que adoptar muchas decisiones, algunas complejas, y hay que saber cuándo adoptarlas."},{icon:lc,title:"Nuestros 9 pilares te guÃan",description:"Te ayudan a comprender cada dimensión del envejecimiento y a tomar las mejores decisiones para ti, en el momento adecuado."}],en:[{icon:Kw,title:"Ageing is a process",description:"It's not a single event. It's a long journey we all take, with stages, decisions, and crossroads that make the difference."},{icon:Es,title:"Conscious or unconscious: you choose",description:"Every person has the choice to approach this process consciouslyâby preparingâor unconsciouslyâletting circumstances decide."},{icon:ks,title:"Preparation is key",description:"When you decide to age consciously, you need to prepare: there are many decisions to make, some complex, and you need to know when to make them."},{icon:lc,title:"Our 9 pillars guide you",description:"They help you understand every dimension of ageing and make the best decisions for you, at the right time."}],fr:[{icon:Kw,title:"Vieillir est un processus",description:"Ce n'est pas un événement ponctuel. C'est un long chemin que nous parcourons tous, avec des étapes, des décisions et des bifurcations."},{icon:Es,title:"Conscient ou inconscient : à vous de choisir",description:"Chaque personne a le choix d'aborder ce processus de manière consciente â en se préparant â ou inconsciente."},{icon:ks,title:"Se préparer est essentiel",description:"Lorsque vous décidez de vieillir consciemment, vous devez vous préparer : il y a beaucoup de décisions à prendre, certaines complexes."},{icon:lc,title:"Nos 9 piliers vous guident",description:"Ils vous aident à comprendre chaque dimension du vieillissement et à prendre les meilleures décisions, au bon moment."}]},jQ={es:[{num:"01",title:"Finanzas y seguros",desc:"Planificación financiera, patrimonial y coberturas esenciales para una vejez tranquila y segura."},{num:"02",title:"Trabajo y jubilación",desc:"Transición laboral con propósito, planificación de la jubilación y nuevas oportunidades profesionales."},{num:"03",title:"Legal",desc:"Testamentos, poderes preventivos, derechos del consumidor y protección jurÃdica."},{num:"04",title:"Vivienda",desc:"Adaptación del hogar y opciones como coliving, cohousing o viviendas tuteladas."},{num:"05",title:"TecnologÃa",desc:"La tecnologÃa como aliada para mejorar la calidad de vida y superar la brecha digital."},{num:"06",title:"Salud y bienestar",desc:"Cuidar cuerpo y mente para envejecer con vitalidad."},{num:"07",title:"Ocio y sociabilidad",desc:"Mantener una vida social activa, cultivar relaciones y disfrutar del tiempo libre con propósito."},{num:"08",title:"Muerte y enfermedad",desc:"Afrontar con serenidad y dignidad los momentos más difÃciles de la vida."},{num:"09",title:"Cuidado del mayor",desc:"Planificar el cuidado propio y de nuestros seres queridos."}],en:[{num:"01",title:"Finance & insurance",desc:"Financial, asset, and insurance planning for a peaceful and secure old age."},{num:"02",title:"Work & retirement",desc:"Purposeful work transition, retirement planning, and new professional opportunities."},{num:"03",title:"Legal",desc:"Wills, preventive powers of attorney, consumer rights, and legal protection."},{num:"04",title:"Housing",desc:"Home adaptation and options like co-living, co-housing, or assisted living."},{num:"05",title:"Technology",desc:"Technology as an ally to improve quality of life and bridge the digital divide."},{num:"06",title:"Health & wellbeing",desc:"Caring for body and mind to age with vitality."},{num:"07",title:"Leisure & sociability",desc:"Maintaining an active social life, nurturing relationships, and enjoying purposeful free time."},{num:"08",title:"Death & illness",desc:"Facing the most difficult moments with serenity and dignity."},{num:"09",title:"Elder care",desc:"Planning care for yourself and your loved one
508s."}],fr:[{num:"01",title:"Finances et assurances",desc:"Planification financière, patrimoniale et couvertures essentielles pour une vieillesse sereine."},{num:"02",title:"Travail et retraite",desc:"Transition professionnelle avec sens, planification de la retraite et nouvelles opportunités."},{num:"03",title:"Juridique",desc:"Testaments, mandats de protection, droits du consommateur et protection juridique."},{num:"04",title:"Logement",desc:"Adaptation du logement et options comme le coliving, cohousing ou résidences assistées."},{num:"05",title:"Technologie",desc:"La technologie comme alliée pour améliorer la qualité de vie et combler la fracture numérique."},{num:"06",title:"Santé et bien-être",desc:"Prendre soin du corps et de l'esprit pour vieillir avec vitalité."},{num:"07",title:"Loisirs et sociabilité",desc:"Maintenir une vie sociale active, cultiver les relations et profiter du temps libre avec sens."},{num:"08",title:"Mort et maladie",desc:"Affronter avec sérénité et dignité les moments les plus difficiles."},{num:"09",title:"Soins aux aînés",desc:"Planifier les soins pour soi-même et ses proches."}]},TQ={es:[{title:"El envejecimiento y la generación Baby Boomer",desc:"Repensando qué significa envejecer hoy, la Silver Economy y el despertar de una nueva conciencia."},{title:"Decisiones financieras y patrimoniales",desc:"Tu 'foto' económica actual, hipoteca inversa, renta vitalicia, nuda propiedad y más soluciones."},{title:"La jubilación",desc:"Cómo convertir esta etapa en un periodo de creación, emprendimiento y propósito."},{title:"Decisiones jurÃdicas",desc:"Testamentos, poderes preventivos y todo lo que protege a tus seres queridos."},{title:"El hogar",desc:"¿Es tu casa adecuada para tu vejez? Coliving, cohousing y viviendas tuteladas."},{title:"TecnologÃa",desc:"Superar la brecha digital y usar la tecnologÃa para mejorar tu calidad de vida."},{title:"Salud y bienestar",desc:"Alimentación, ejercicio, sueño y cómo prepararse para los cambios hormonales."},{title:"La enfermedad y la muerte",desc:"Cuidados paliativos, eutanasia y decisiones para vivir y morir con dignidad."},{title:"Cuidado de los mayores",desc:"Perspectiva realista y planificación efectiva para cuidar a quien más quieres."},{title:"El proceso de toma de decisiones",desc:"Herramientas para decidir bien y a tiempo. Tú tienes el control de tu futuro."}],en:[{title:"Ageing and the Baby Boomer generation",desc:"Rethinking what ageing means today, the Silver Economy, and the awakening of a new consciousness."},{title:"Financial and asset decisions",desc:"Your current economic snapshot, reverse mortgage, life annuity, bare ownership, and more solutions."},{title:"Retirement",desc:"How to turn this stage into a period of creation, entrepreneurship, and purpose."},{title:"Legal decisions",desc:"Wills, preventive powers, and everything that protects your loved ones."},{title:"Home",desc:"Is your home suitable for your old age? Co-living, co-housing, and sheltered housing."},{title:"Technology",desc:"Bridging the digital gap and using technology to improve your quality of life."},{title:"Health and wellbeing",desc:"Nutrition, exercise, sleep, and how to prepare for hormonal changes."},{title:"Illness and death",desc:"Palliative care, euthanasia, and decisions for living and dying with dignity."},{title:"Elder care",desc:"Realistic perspective and effective planning to care for those you love most."},{title:"The decision-making process",desc:"Tools to decide well and on time. You have control of your future."}],fr:[{title:"Le vieillissement et la génération Baby Boomer",desc:"Repenser ce que signifie vieillir aujourd'hui, la Silver Economy et l'éveil d'une nouvelle conscience."},{title:"Décisions financières et patrimoniales",desc:"Votre situation économique actuelle, prêt viager hypothécaire, rente viagère, nue-propriété et plus."},{title:"La retraite",desc:"Comment transformer cette étape en une période de création, d'entrepreneuriat et de sens."},{title:"Décisions juridiques",desc:"Testaments, mandats de protection et tout ce qui protège vos proches."},{title:"Le logement",desc:"Votre maison est-elle adaptée à votre vieillesse ? Coliving, cohousing et logements encadrés."},{title:"Technologie",desc:"Surmonter la fracture numérique et utiliser la technologie pour améliorer votre qualité de vie."},{title:"Santé et bien-être",desc:"Alimentation, exercice, sommeil et comment se préparer aux changements hormonaux."},{title:"La maladie et la mort",desc:"Soins palliatifs, euthanasie et décisions pour vivre et mourir avec dignité."},{title:"Soins aux aînés",desc:"Perspective réaliste et planification efficace pour prendre soin de ceux que vous aimez."},{title:"Le processus de prise de décision",desc:"Des outils pour bien décider et à temps. Vous avez le contrôle de votre avenir."}]},_Q=()=>{const{t,lang:e}=Zt(),n=EQ[e],r=jQ[e],i=TQ[e],o={es:"Los primeros baby boomers están empezando a jubilarse y en los próximos 15 años lo harán los 14,5 millones de personas que forman la generación más numerosa de la historia de España. Este libro parte de una idea fundamental: ser previsor y tomar decisiones acertadas es esencial para vivir una buena vejez.",en:"The first baby boomers are starting to retire and in the next 15 years, the 14.5 million people who make up the largest generation in Spain's history will follow. This book starts from a fundamental idea: being foresighted and making sound decisions is essential for a good old age.",fr:"Les premiers baby-boomers commencent à prendre leur retraite et dans les 15 prochaines années, les 14,5 millions de personnes qui forment la plus grande génération de l'histoire de l'Espagne suivront. Ce livre part d'une idée fondamentale : être prévoyant et prendre de bonnes décisions est essentiel pour bien vieillir."},s={es:"Con casi 500 páginas, incluye ejercicios prácticos, casos reales, bibliografÃa extensa y un resumen de decisiones clave con el momento adecuado para realizarlas.",en:"With nearly 500 pages, it includes practical exercises, real cases, extensive bibliography, and a summary of key decisions with the right time to make them.",fr:"Avec près de 500 pages, il comprend des exercices pratiques, des cas réels, une bibliographie étendue et un résumé des décisions clés avec le moment idéal pour les prendre."},a={es:"CEO del Instituto de Smart Ageing y fundadora de Matura: Club de Mejor Longevidad. Experta en envejecimiento inteligente, innovación, transformación digital e inteligencia artificial.",en:"CEO of the Instituto de Smart Ageing and founder of Matura: Better Longevity Club. Expert in smart ageing, innovation, digital transformation, and artificial intelligence.",fr:"PDG de l'Instituto de Smart Ageing et fondatrice de Matura : Club de Meilleure Longévité. Experte en vieillissement intelligent, innovation, transformation numérique et intelligence artificielle."},l={es:"Conferenciante, escritora y profesora de Derecho Digital, Inteligencia Artificial, Prevención del Envejecimiento y Longevidad. Autora de varias obras especializadas.",en:"Speaker, writer, and professor of Digital Law, Artificial Intelligence, Ageing Prevention, and Longevity. Author of several specialised works.",fr:"Conférencière, écrivaine et professeure de Droit Numérique, Intelligence Artificielle, Prévention du Vieillissement et Longévité. Auteure de plusieurs ouvrages spécialisés."},c={es:[{icon:Vn,text:"Reconocida por ILTA como una de las 5 mujeres más influyentes en LegalTech del mundo (2020)"},{icon:kh,text:"Reconocida como una de las mejores juristas de España por Best Lawyers e Iberian Lawyer"},{icon:Vn,text:"«Embajadora de Madrid» por el Ayuntamiento de Madrid y premio ICEX Alumni 2023"},{icon:yv,text:"PolÃglota: español, inglés, francés, italiano, holandés y catalán"}],en:[{icon:Vn,text:"Recognised by ILTA as one of the 5 most influential women in LegalTech worldwide (2020)"},{icon:kh,text:"Recognised as one of the best jurists in Spain by Best Lawyers and Iberian Lawyer"},{icon:Vn,text:'"Ambassador of Madrid" by Madrid City Council and ICEX Alumni Award 2023'}
508,{icon:yv,text:"Polyglot: Spanish, English, French, Italian, Dutch, and Catalan"}],fr:[{icon:Vn,text:"Reconnue par ILTA comme l'une des 5 femmes les plus influentes en LegalTech au monde (2020)"},{icon:kh,text:"Reconnue comme l'une des meilleures juristes d'Espagne par Best Lawyers et Iberian Lawyer"},{icon:Vn,text:"« Ambassadrice de Madrid » par la Mairie de Madrid et prix ICEX Alumni 2023"},{icon:yv,text:"Polyglotte : espagnol, anglais, français, italien, néerlandais et catalan"}]};return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsxs("section",{className:"pt-28 md:pt-36 pb-16 md:pb-24 bg-gradient-section relative overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 to-transparent pointer-events-none"}),u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative",children:u.jsxs("div",{className:"text-center max-w-4xl mx-auto",children:[u.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-6",children:[u.jsx(gK,{className:"w-4 h-4"}),t("metodo.badge")]}),u.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-foreground mb-6 leading-tight",children:[t("metodo.heroTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("metodo.heroTitle2")})]}),u.jsxs("p",{className:"text-xl text-muted-foreground leading-relaxed mb-6 max-w-3xl mx-auto",children:[t("metodo.heroP1")," ",u.jsx("strong",{className:"text-foreground",children:t("metodo.heroConsciente")})," ",t("metodo.heroO")," ",u.jsx("strong",{className:"text-foreground",children:t("metodo.heroInconsciente")}),t("metodo.heroP1end")]}),u.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed max-w-3xl mx-auto mb-10",children:[t("metodo.heroP2")," ",u.jsx("strong",{className:"text-foreground",children:t("metodo.heroCuando")})," ",t("metodo.heroP2end")," ",u.jsx("strong",{className:"text-foreground",children:t("metodo.heroDisena")}),"."]}),u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl bg-gradient-hero text-primary-foreground font-semibold shadow-lg transition-all duration-300 hover:shadow-glow hover:-translate-y-1 hover:scale-105",children:[t("metodo.heroCta"),u.jsx(st,{className:"w-5 h-5"})]})]})})]}),u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12 md:mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("metodo.filoBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("metodo.filoTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("metodo.filoTitle2")}),"?"]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("metodo.filoSub")})]}),u.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6 lg:gap-8",children:n.map((d,f)=>u.jsxs("div",{className:"group relative bg-card rounded-2xl p-8 border border-border/50 transition-all duration-500 hover:shadow-lg hover:border-primary/30 hover:-translate-y-1",children:[u.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[u.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-xl bg-white shadow-md flex items-center justify-center transition-all duration-500 group-hover:bg-primary group-hover:shadow-lg",children:u.jsx(d.icon,{className:"w-6 h-6 text-primary transition-colors duration-500 group-hover:text-primary-foreground"})}),u.jsx("span",{className:"text-3xl font-bold text-primary/20",children:String(f+1).padStart(2,"0")})]}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-3 group-hover:text-primary transition-colors duration-300",children:d.title}),u.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:d.description})]},d.title))})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-center",children:[u.jsxs("div",{children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-6",children:t("metodo.libroBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:[t("metodo.libroTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("metodo.libroTitle2")})]}),u.jsx("p",{className:"text-xl text-muted-foreground mb-4 leading-relaxed",children:t("metodo.libroSub")}),u.jsx("p",{className:"text-muted-foreground mb-4 leading-relaxed",children:o[e]}),u.jsx("p",{className:"text-muted-foreground mb-8 leading-relaxed",children:s[e]}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[u.jsxs("a",{href:kQ,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-8 py-4 rounded-xl bg-primary text-primary-foreground text-base font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",children:[t("metodo.libroComprar"),u.jsx(cc,{className:"w-5 h-5"})]}),u.jsxs(De,{to:"/libro",className:"inline-flex items-center justify-center gap-2 px-8 py-4 rounded-xl border-2 border-primary bg-transparent text-primary text-base font-semibold transition-all duration-300 hover:bg-primary hover:text-primary-foreground",children:[t("metodo.libroMas"),u.jsx(st,{className:"w-5 h-5"})]})]})]}),u.jsx("div",{className:"flex justify-center lg:justify-end",children:u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-primary/20 to-primary/5 rounded-3xl blur-2xl"}),u.jsx("img",{src:z_,alt:"Book cover",className:"relative w-72 sm:w-80 lg:w-96 rounded-2xl shadow-2xl",loading:"lazy"})]})})]})})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12 md:mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("metodo.capBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:[t("metodo.capTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("metodo.capTitle2")})]})]}
508),u.jsx("div",{className:"max-w-4xl mx-auto space-y-4",children:i.map((d,f)=>u.jsxs("div",{className:"group flex items-start gap-5 bg-card rounded-xl p-5 border border-border/50 transition-all duration-300 hover:shadow-md hover:border-primary/30",children:[u.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-lg bg-white shadow-md flex items-center justify-center text-sm font-bold text-primary group-hover:bg-primary group-hover:text-primary-foreground transition-all duration-300",children:f+1}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-bold text-foreground group-hover:text-primary transition-colors duration-300",children:d.title}),u.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:d.desc})]})]},f))})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",id:"pilares",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12 md:mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("metodo.pilaresBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("metodo.pilaresTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("metodo.pilaresTitle2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("metodo.pilaresSub")})]}),u.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-start",children:[u.jsx("div",{className:"flex justify-center lg:sticky lg:top-28",children:u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-primary/15 to-transparent rounded-3xl blur-2xl"}),u.jsx("img",{src:aB,alt:"9 pillars wheel",className:"relative w-full max-w-md rounded-2xl shadow-lg",loading:"eager"})]})}),u.jsx("div",{className:"space-y-4",children:r.map(d=>u.jsx("div",{className:"group bg-card rounded-2xl p-5 border border-border/50 transition-all duration-500 hover:shadow-lg hover:border-primary/30",children:u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx("span",{className:"text-2xl font-bold text-primary/30 group-hover:text-primary/60 transition-colors duration-300 flex-shrink-0",children:d.num}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-bold text-foreground mb-1 group-hover:text-primary transition-colors duration-300",children:d.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:d.desc})]})]})},d.num))})]})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-center",children:[u.jsx("div",{className:"flex justify-center lg:justify-start order-2 lg:order-1",children:u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-primary/15 to-transparent rounded-3xl blur-2xl"}),u.jsx("img",{src:sB,alt:"MarÃa Jesús González-Espejo",className:"relative w-full max-w-md rounded-2xl shadow-2xl",loading:"lazy"})]})}),u.jsxs("div",{className:"order-1 lg:order-2",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("metodo.autoraBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:["MarÃa Jesús"," ",u.jsx("span",{className:"text-gradient",children:"González-Espejo"})]}),u.jsx("p",{className:"text-lg text-muted-foreground mb-4 leading-relaxed",children:a[e]}),u.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:l[e]}),u.jsx("div",{className:"space-y-3 mb-8",children:c[e].map((d,f)=>u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(d.icon,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:d.text})]},f))})]})]})})}),u.jsx(Ws,{})]}),u.jsx(Qt,{})]})},QO={es:[{icon:Bo,title:"Soluciones personalizadas",description:"Adaptamos
508nuestras propuestas a la cultura y los valores de tu empresa."},{icon:Vn,title:"Experiencia sobresaliente",description:"Equipo multidisciplinar especializado en campos del envejecimiento y longevidad."},{icon:Ua,title:"Enfoque integral",description:"Abordamos todos los aspectos: legales, financieros, salud, bienestar y más."},{icon:Lo,title:"Resultados medibles",description:"Implementamos KPIs para evaluar el impacto de nuestros programas."}],en:[{icon:Bo,title:"Customised solutions",description:"We adapt our proposals to the culture and values of your company."},{icon:Vn,title:"Outstanding experience",description:"Multidisciplinary team specialised in ageing and longevity fields."},{icon:Ua,title:"Comprehensive approach",description:"We address all aspects: legal, financial, health, wellbeing, and more."},{icon:Lo,title:"Measurable results",description:"We implement KPIs to evaluate the impact of our programmes."}],fr:[{icon:Bo,title:"Solutions personnalisées",description:"Nous adaptons nos propositions à la culture et aux valeurs de votre entreprise."},{icon:Vn,title:"Expérience remarquable",description:"Ãquipe multidisciplinaire spécialisée dans les domaines du vieillissement et de la longévité."},{icon:Ua,title:"Approche intégrale",description:"Nous abordons tous les aspects : juridiques, financiers, santé, bien-être et plus."},{icon:Lo,title:"Résultats mesurables",description:"Nous mettons en place des KPI pour évaluer l'impact de nos programmes."}]},ZO={es:["Mayor productividad con personas más saludables y felices","Reducción de costes por menor absentismo y rotación","Mejora de la imagen corporativa como empresa responsable","Atracción y retención del talento sénior","Alineación con los Objetivos de Desarrollo Sostenible"],en:["Higher productivity with healthier and happier people","Cost reduction through lower absenteeism and turnover","Improved corporate image as a responsible company","Attraction and retention of senior talent","Alignment with the Sustainable Development Goals"],fr:["Productivité accrue grâce à des personnes en meilleure santé et plus heureuses","Réduction des coûts grâce à un absentéisme et une rotation réduits","Amélioration de l'image de l'entreprise en tant qu'entreprise responsable","Attraction et rétention des talents seniors","Alignement avec les Objectifs de Développement Durable"]},e2={es:[{number:3,name:"Salud y bienestar",color:"bg-[#4C9F38]"},{number:4,name:"Educación de calidad",color:"bg-[#C5192D]"},{number:5,name:"Igualdad de género",color:"bg-[#FF3A21]"},{number:8,name:"Trabajo decente",color:"bg-[#A21942]"},{number:10,name:"Reducción de desigualdades",color:"bg-[#DD1367]"},{number:11,name:"Ciudades sostenibles",color:"bg-[#FD9D24]"},{number:12,name:"Producción responsable",color:"bg-[#BF8B2E]"},{number:16,name:"Paz y justicia",color:"bg-[#00689D]"},{number:17,name:"Alianzas",color:"bg-[#19486A]"}],en:[{number:3,name:"Good health",color:"bg-[#4C9F38]"},{number:4,name:"Quality education",color:"bg-[#C5192D]"},{number:5,name:"Gender equality",color:"bg-[#FF3A21]"},{number:8,name:"Decent work",color:"bg-[#A21942]"},{number:10,name:"Reduced inequalities",color:"bg-[#DD1367]"},{number:11,name:"Sustainable cities",color:"bg-[#FD9D24]"},{number:12,name:"Responsible production",color:"bg-[#BF8B2E]"},{number:16,name:"Peace and justice",color:"bg-[#00689D]"},{number:17,name:"Partnerships",color:"bg-[#19486A]"}],fr:[{number:3,name:"Bonne santé",color:"bg-[#4C9F38]"},{number:4,name:"Ãducation de qualité",color:"bg-[#C5192D]"},{number:5,name:"Ãgalité des genres",color:"bg-[#FF3A21]"},{number:8,name:"Travail décent",color:"bg-[#A21942]"},{number:10,name:"Inégalités réduites",color:"bg-[#DD1367]"},{number:11,name:"Villes durables",color:"bg-[#FD9D24]"},{number:12,name:"Production responsable",color:"bg-[#BF8B2E]"},{number:16,name:"Paix et justice",color:"bg-[#00689D]"},{number:17,name:"Partenariats",color:"bg-[#19486A]"}]},AQ=()=>{const{t,lang:e}=Zt(),n=QO[e]||QO.es,r=ZO[e]||ZO.es,i=e2[e]||e2.es;return u.jsxs("div",{id:"beneficios",className:"overflow-hidden",children:[u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("beneficios.badge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("beneficios.title1")," ",u.jsx("span",{className:"text-gradient",children:t("beneficios.title2")})," ",t("beneficios.title3")]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("beneficios.sub")})]}),u.jsx("div",{className:"max-w-3xl mx-auto",children:u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 via-primary/5 to-transparent roun
508ded-3xl blur-3xl"}),u.jsxs("div",{className:"relative bg-card rounded-3xl p-8 md:p-10 border border-border/50 shadow-lg",children:[u.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[u.jsx(xr,{className:"w-8 h-8 text-primary"}),u.jsx("h3",{className:"text-2xl font-bold text-foreground",children:t("beneficios.orgTitle")})]}),u.jsx("ul",{className:"space-y-4",children:r.map((o,s)=>u.jsxs("li",{className:"flex items-start gap-4 group",children:[u.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 flex items-center justify-center mt-0.5 transition-colors duration-300 group-hover:bg-primary",children:u.jsx(Nk,{className:"w-4 h-4 text-primary transition-colors duration-300 group-hover:text-primary-foreground"})}),u.jsx("span",{className:"text-foreground/90 leading-relaxed",children:o})]},s))})]})]})})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center mb-10",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("beneficios.odsBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-4",children:[t("beneficios.odsTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("beneficios.odsTitle2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:t("beneficios.odsSub")})]}),u.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-9 gap-4",children:i.map(o=>u.jsxs("div",{className:"group flex flex-col items-center gap-2",children:[u.jsx("div",{className:`${o.color} w-16 h-16 sm:w-20 sm:h-20 rounded-2xl flex items-center justify-center shadow-md transition-all duration-300 group-hover:scale-110 group-hover:shadow-lg group-hover:-translate-y-1`,children:u.jsx("span",{className:"text-white text-2xl sm:text-3xl font-bold",children:o.number})}),u.jsx("span",{className:"text-xs text-center text-muted-foreground font-medium leading-tight max-w-[80px]",children:o.name})]},o.number))})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center mb-10",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("beneficios.whyBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-4",children:[t("beneficios.whyTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("beneficios.whyTitle2")})]})]}),u.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6",children:n.map(o=>u.jsxs("div",{className:"group p-6 rounded-xl bg-card border border-border/50 transition-all duration-300 hover:shadow-md hover:border-primary/30",children:[u.jsx("div",{className:"w-12 h-12 rounded-lg bg-accent flex items-center justify-center mb-4 transition-all duration-300 group-hover:bg-primary",children:u.jsx(o.icon,{className:"w-6 h-6 text-accent-foreground transition-colors duration-300 group-hover:text-primary-foreground"})}),u.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:o.title}),u.jsx("p",{className:"text-sm text-muted-foreground",children:o.description})]},o.title))})]})})]})},NQ=()=>u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx(AQ,{}),u.jsx(Ws,{})]}),u.jsx(Qt,{})]}),e1="/assets/icon-seedling-DU1UIQfF.png",t1="/assets/icon-watering-CzQhcfGp.png",n1="/assets/icon-tree-13yQQnfS.png",t2={es:[{number:"01",title:"La Inmersión",subtitle:"MATURATÃN",description:"Un evento transformador para comprender las claves del Smart Ageing y comenzar tu viaje hacia un envejecimiento inteligente.",icon:e1},{number:"02",title:"La Profundización",subtitle:"CURSO ESPECIALIZADO",description:"Formación completa sobre envejecimiento inteligente con herramientas prácticas y conocimientos basad
508os en evidencia.",icon:t1},{number:"03",title:"La Consolidación",subtitle:"CLUB DE LONGEVIDAD",description:"Pertenencia a una comunidad de aprendizaje continuo y apoyo mutuo para mantener los hábitos y seguir creciendo.",icon:n1}],en:[{number:"01",title:"Immersion",subtitle:"MATURATHON",description:"A transformative event to understand the keys of Smart Ageing and start your journey towards intelligent ageing.",icon:e1},{number:"02",title:"Deepening",subtitle:"SPECIALISED COURSE",description:"Complete training on smart ageing with practical tools and evidence-based knowledge.",icon:t1},{number:"03",title:"Consolidation",subtitle:"LONGEVITY CLUB",description:"Belonging to a community of continuous learning and mutual support to maintain habits and keep growing.",icon:n1}],fr:[{number:"01",title:"L'Immersion",subtitle:"MATURATHON",description:"Un événement transformateur pour comprendre les clés du Smart Ageing et commencer votre voyage vers un vieillissement intelligent.",icon:e1},{number:"02",title:"L'Approfondissement",subtitle:"COURS SPÃCIALISÃ",description:"Formation complète sur le vieillissement intelligent avec des outils pratiques et des connaissances basées sur des preuves.",icon:t1},{number:"03",title:"La Consolidation",subtitle:"CLUB DE LONGÃVITÃ",description:"Appartenance à une communauté d'apprentissage continu et de soutien mutuel pour maintenir les habitudes et continuer à grandir.",icon:n1}]},n2={es:["¿Sientes que el talento veterano pierde tracción o se desconecta?","¿Necesitas que jóvenes y seniors trabajen en sintonÃa real?","¿Quieres apoyar especÃficamente a tus mujeres lÃderes en su madurez?","¿Necesitas capacitar a tu equipo para que comprendan el impacto del reto demográfico en vuestros productos o servicios?","¿Te gustarÃa formar a tu equipo para que su comunicación responda a las necesidades de un público cada vez más mayor?"],en:["Do you feel that veteran talent is losing traction or becoming disengaged?","Do you need young and senior workers to work in real harmony?","Do you want to specifically support your women leaders in their maturity?","Do you need to train your team to understand the impact of the demographic challenge on your products or services?","Would you like to train your team so that their communication responds to the needs of an increasingly older audience?"],fr:["Sentez-vous que les talents expérimentés perdent en dynamisme ou se désengagent ?","Avez-vous besoin que jeunes et seniors travaillent en vraie harmonie ?","Voulez-vous soutenir spécifiquement vos femmes leaders dans leur maturité ?","Avez-vous besoin de former votre équipe pour comprendre l'impact du défi démographique sur vos produits ou services ?","Souhaitez-vous former votre équipe pour que sa communication réponde aux besoins d'un public de plus en plus âgé ?"]},r2={es:[{icon:Fu,title:"Plan Smart Ageing Para Todos",subtitle:"Para empleados mayores de 30 años",objetivo:"Ayudar a los empleados a hacer frente a los retos derivados del envejecimiento y la longevidad, mejorando su desempeño profesional e introduciendo la prevención como herramienta de cuidado de la salud y diseño de futuro.",inmersion:"Maturatón centrado en la metodologÃa Justo a tiempo para envejecer sabiamente.",profundizacion:'Diplomado "Diseña tu futuro para una mejor longevidad". El curso definitivo para dominar los pilares de una vida plena y saludable.',consolidacion:'Comunidad de apoyo y red de cuidados "Club de Mejor Longevidad" para mantener el vÃnculo con el talento y la comunidad.'},{icon:xr,title:"Plan Smart Ageing en Femenino",subtitle:"Para mujeres +40",objetivo:"Ayudar a las mujeres a diseñar su mejor vejez. La mujer se enfrenta a desafÃos de futuro más importantes que el hombre en salud, finanzas, cuidados y red de apoyo.",inmersion:"Maturatón centrado en los retos del envejecimiento de la mujer.",profundizacion:'Diplomado "Mujer y Futuro, ¿Cómo prepararte para tu mejor etapa?", diseñado para abordar la longevidad desde la perspectiva femenina.',consolidacion:'Comunidad de apoyo y red de cuidados "Serena para una mejor longevidad".'},{icon:Vn,title:"Plan Legado",subtitle:"Para empleados en fase de pre-jubilación y off-boarding",objetivo:"Ayudar a quienes se van a jubilar a hacer una mejor transición hacia esa nueva etapa de su vida, gestionándola como un periodo activo y conectado.",inmersion:"Maturatón centrado en el concepto del propósito.",profundizacion:'Diplomado "Preparación para una jubilación más plena". Herramientas prácticas para planificar el nuevo proyecto de vida.',consolidacion:'Comunidad de apoyo y red de cuidados "Club de Mejor Longevidad" para mantener el vÃnculo con el talento y la comunidad.'}],en:[{icon:Fu,title:"Smart Ageing For All Plan",subtitle:"For employees over 30",objetivo:"Help employees face the challenges of ageing and longevity, improving their professional performance and introducing prevention as a tool for health care and future planning.",inmersion:"Maturathon focused on the Just in Time methodology for ageing wisely.",profundizacion:'"Design your Future for Better Longevity" diploma. The definitive course to master the pillars of a full and healthy life.',consolidacion:'"Better Longevity Club" support community and care network to maintain the bond with talent and community.'},{icon:xr,title:"Smart Ageing for Women Plan",subtitle:"For women 40+",objetivo:"Help women design their best ageing. Women face more significant future challenges than men in health, finance, care, and support networks.",inmersion:"Maturathon focused on the challenges of women's ageing.",profundizacion:'"Women and Future: How to Prepare for Your Best Stage?" diploma, designed to address longevity from a female perspective.',consolidacion:'"Serena for Better Longevity" support community and care network.'},{icon:Vn,title:"Legacy Plan",subtitle:"For employees in the pre-retirement and off-boarding phase",objetivo:"Help those about to retire make a better transition to this new stage of their life, managing it as an active and connected period.",inmersion:"Maturathon focused on the concept of purpose.",profundizacion:'"Preparation for a More Fulfilling Retirement" diploma. Practical tools for planning the new life project.',consolidacion:'"Better Longevity Club" support community and care network to maintain the bond with talent and community.'}],fr:[{icon:Fu,title:"Plan Smart Ageing Pour Tous",subtitle:"Pour les employés de plus de 30 ans",objetivo:"Aider les employés à faire face aux défis du vieillissement et de la longévité, en améliorant leur performance professionnelle et en introduisant la prévention comme outil de santé et de conception de l'avenir.",inmersion:"Maturathon centré sur la méthodologie Juste à Temps pour vieillir sagement.",profundizacion:"Diplôme « Concevez votre avenir pour une meilleure longévité ». Le cours définitif pour maîtriser les piliers d'une vie pleine et saine.",consolidacion:"Communauté de soutien et réseau de soins « Club de Meilleure Longévité » pour maintenir le lien avec le talent et la communauté."},{icon:xr,title:"Plan Smart Ageing au Féminin",subtitle:"Pour les femmes de 40+",objetivo:"Aider les femmes à concevoir leur meilleur vieillissement. Les femmes font face à des défis futurs plus importants que les hommes en santé, finances, soins et réseau de soutien.",inmersion:"Maturathon centré sur les défis du vieillissement des femmes.",profundizacion:"Diplôme « Femme et Avenir : Comment se préparer pour sa meilleure étape ? », conçu pour aborder la longévité du point de vue féminin.",consolidacion:"Communauté de soutien et réseau de soins « Serena pour une meilleure longévité »."}
508,{icon:Vn,title:"Plan Héritage",subtitle:"Pour les employés en phase de pré-retraite",objetivo:"Aider ceux qui vont prendre leur retraite à faire une meilleure transition vers cette nouvelle étape de leur vie, en la gérant comme une période active et connectée.",inmersion:"Maturathon centré sur le concept de dessein.",profundizacion:"Diplôme « Préparation pour une retraite plus épanouissante ». Outils pratiques pour planifier le nouveau projet de vie.",consolidacion:"Communauté de soutien et réseau de soins « Club de Meilleure Longévité » pour maintenir le lien avec le talent et la communauté."}]},CQ=()=>{const{t,lang:e}=Zt(),n=t2[e]||t2.es,r=n2[e]||n2.es,i=r2[e]||r2.es,o=[{label:t("planesPage.objetivo"),key:"objetivo"},{label:t("planesPage.inmersion"),key:"inmersion"},{label:t("planesPage.profundizacion"),key:"profundizacion"},{label:t("planesPage.consolidacion"),key:"consolidacion"}];return u.jsxs(u.Fragment,{children:[u.jsx("section",{id:"planes",className:"py-16 md:py-20 bg-gradient-section",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16 md:mb-20",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("planesPage.plansBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("planesPage.plansTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("planesPage.plansTitle2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("planesPage.plansSub")})]}),u.jsx("div",{className:"grid lg:grid-cols-3 gap-8",children:i.map((s,a)=>u.jsxs("div",{className:"group relative bg-card rounded-2xl border-2 border-border overflow-hidden transition-all duration-500 hover:shadow-lg hover:border-primary/30 hover:-translate-y-2",style:{animationDelay:`${a*.15}s`},children:[u.jsxs("div",{className:"bg-gradient-to-br from-primary/10 via-primary/5 to-transparent p-6 pb-4",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 transition-all duration-300 group-hover:bg-primary",children:u.jsx(s.icon,{className:"w-6 h-6 text-primary transition-colors duration-300 group-hover:text-primary-foreground"})}),u.jsx("h3",{className:"text-xl font-bold text-foreground mb-1",children:s.title}),u.jsx("p",{className:"text-sm text-primary font-medium",children:s.subtitle})]}),u.jsx("div",{className:"p-6 pt-4 space-y-0",children:o.map(l=>u.jsxs("div",{className:"py-4 border-t border-border first:border-t-0",children:[u.jsxs("span",{className:"text-sm font-bold text-foreground",children:[l.label,": "]}),u.jsx("span",{className:"text-sm text-muted-foreground leading-relaxed",children:s[l.key]})]},l.key))})]},s.title))})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16 md:mb-20",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("planesPage.faseBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("planesPage.faseTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("planesPage.faseTitle2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("planesPage.faseSub")})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-8 lg:gap-12",children:n.map((s,a)=>u.jsxs("div",{className:"group relative",style:{animationDelay:`${a*.15}s`},children:[a<n.length-1&&u.jsx("div",{className:"hidden md:block absolute top-24 left-full w-full h-0.5 bg-gradient-to-r from-primary/40 to-transparent -translate-x-1/2 z-0"}),u.jsxs("div",{className:"relative bg-card rounded-2xl p-8 shadow-md border-2 border-border transition-all duration-500 hover:shadow-lg hover:-translate-y-2 hover:border-primary/30",children:[u.jsxs("div",{className:"absolute -top-4 left-8 px-3 py-1 bg-primary text-primary-foreground text-sm font-bold rounded-lg",children:[t("common.fase")," ",s.number]}),u.jsxs("div",{className:"w-24 h-24 mx-auto mt-4 mb-6 relative",children:[u.jsx("img",{src:s.icon,alt:s.title,className:"w-full h-full object-contain transition-transform duration-500 group-hover:scale-110"}),u.jsx("div",{className:"absolute inset-0 bg-primary/10 rounded-full blur-xl opacity-0 group-hover:opacity-100 transition-opacity duration-500"})]}),u.jsxs("div",{className:"text-center",children:[u.jsx("span",{className:"text-xs font-semibold text-primary tracking-wider up
508percase",children:s.subtitle}),u.jsx("h3",{className:"text-xl font-bold text-foreground mt-2 mb-3",children:s.title}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:s.description})]}),u.jsx("div",{className:"absolute inset-0 rounded-2xl bg-gradient-to-br from-primary/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none"})]})]},s.number))})]})}),u.jsx("section",{className:"py-12 md:py-16 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[u.jsx("div",{className:"w-16 h-16 rounded-2xl bg-primary/10 flex items-center justify-center mx-auto mb-6",children:u.jsx(Z7,{className:"w-8 h-8 text-primary"})}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-10",children:[t("planesPage.pregTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("planesPage.pregTitle2")})]}),u.jsx("div",{className:"space-y-4 mb-10",children:r.map((s,a)=>u.jsxs("div",{className:"group flex items-start gap-4 p-4 rounded-xl bg-card border border-border/50 text-left transition-all duration-300 hover:border-primary/30 hover:shadow-sm",children:[u.jsx("span",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold text-sm group-hover:bg-primary group-hover:text-primary-foreground transition-all duration-300",children:"?"}),u.jsx("span",{className:"text-foreground leading-relaxed",children:s})]},a))}),u.jsx("p",{className:"text-lg text-foreground font-medium mb-2",children:t("planesPage.pregResp")}),u.jsx("p",{className:"text-muted-foreground mb-4",children:t("planesPage.pregSub")})]})})})]})},OQ=()=>u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx(CQ,{}),u.jsx(Ws,{})]}),u.jsx(Qt,{})]}),i2={es:{heroBadge:"Academia de Smart Ageing",heroTitle1:"Formación para diseñar tu",heroTitle2:"mejor futuro",heroSub:"Programas formativos basados en el método «Justo a Tiempo» y los 9 pilares del envejecimiento inteligente. Cursos prácticos, repletos de herramientas útiles, que te ayudarán a tomar las decisiones adecuadas en el momento justo.",heroTag1:"MetodologÃa propia",heroTag2:"Libro incluido",heroTag3:"Certificado oficial",heroTag4:"100% online",diffTitle1:"Método «Justo a Tiempo»",diffTitle2:"Certificado incluido",diffTitle3:"Libro incluido",diffTitle4:"100% práctico",diffText1:"MetodologÃa propia basada en los 9 pilares del envejecimiento inteligente.",diffText2:"Diploma acreditativo al completar cada programa formativo.",diffText3:"Cada alumno recibe «El arte de envejecer sabiamente» (500 págs.).",diffText4:"Ejercicios, herramientas y tu propio mapa de decisiones vitales.",catalogTitle1:"Tres diplomados, tres",catalogTitle2:"públicos",catalogSub:"Cada curso está diseña
508do para un perfil concreto, con contenido adaptado a sus retos y necesidades especÃficas.",popular:"Más popular",whoLabel:"¿Quién debe hacer este curso?",challengesLabel:"Retos que abordamos",learnLabel:"Qué aprenderás",seeModules:"módulos del programa",modules:"módulos",certificate:"Certificado",enroll:"Inscribirme",customBadge:"Para organizaciones",customTitle1:"Formación",customTitle2:"a medida",customP1:"Diseñamos programas formativos personalizados, adaptados a la realidad, los objetivos y la cultura de cada organización. Desde talleres intensivos hasta diplomados completos.",customP2:"Ideal para empresas que quieren preparar a sus empleados senior, administraciones públicas que buscan programas de envejecimiento activo, y colegios profesionales que desean ofrecer valor diferencial a sus colegiados.",customCheck1:"Contenido adaptado a tu sector y audiencia",customCheck2:"Formatos flexibles: presencial, online o hÃbrido",customCheck3:"Acompañamiento y seguimiento personalizado",customCheck4:"Posibilidad de certificación para los participantes",customCta:"Solicitar información",orgTitle1:"Empresas",orgText1:"Programas de preparación para la jubilación, gestión del talento senior e impulso del diálogo intergeneracional.",orgTitle2:"Administraciones públicas",orgText2:"Formación en envejecimiento activo para convertir la longevidad en factor de desarrollo socioeconómico local.",orgTitle3:"Colegios profesionales",orgText3:"Capacitación interdisciplinar para diseñar servicios y productos que respondan a las necesidades de una sociedad envejecida.",ctaTitle:"¿Listo para diseñar tu mejor futuro?",ctaSub:"Explora nuestra oferta formativa completa en la plataforma de la Academia o contacta con nosotros para una formación personalizada.",ctaExplore:"Explorar la Academia",ctaContact:"Solicita más info"},en:{heroBadge:"Smart Ageing Academy",heroTitle1:"Training to design your",heroTitle2:"best future",heroSub:"Training programmes based on the «Just in Time» method and the 9 pillars of smart ageing. Practical courses packed with useful tools to help you make the right decisions at the right time.",heroTag1:"Proprietary methodology",heroTag2:"Book included",heroTag3:"Official certificate",heroTag4:"100% online",diffTitle1:"«Just in Time» Method",diffTitle2:"Certificate included",diffTitle3:"Book included",diffTitle4:"100% practical",diffText1:"Proprietary methodology based on the 9 pillars of smart ageing.",diffText2:"Accredited diploma upon completing each training programme.",diffText3:"Each student receives «The Art of Ageing Wisely» (500 pages).",diffText4:"Exercises, tools, and your own life-decision map.",catalogTitle1:"Three diplomas, three",catalogTitle2:"audiences",catalogSub:"Each course is designed for a specific profile, with content tailored to their challenges and specific needs.",popular:"Most popular",whoLabel:"Who should take this course?",challengesLabel:"Challenges we address",learnLabel:"What you'll learn",seeModules:"programme modules",modules:"modules",certificate:"Certificate",enroll:"Enrol now",customBadge:"For organisations",customTitle1:"Custom",customTitle2:"training",customP1:"We design personalised training programmes, adapted to the reality, objectives and culture of each organisation. From intensive workshops to full diploma courses.",customP2:"Ideal for companies wanting to prepare their senior employees, public administrations seeking active ageing programmes, and professional associations wishing to offer differential value to their members.",customCheck1:"Content adapted to your sector and audience",customCheck2:"Flexible formats: in-person, online or hybrid",customCheck3:"Personalised support and follow-up",customCheck4:"Certification options for participants",customCta:"Request information",orgTitle1:"Companies",orgText1:"Retirement preparation programmes, senior talent management and intergenerational dialogue.",orgTitle2:"Public administrations",orgText2:"Active ageing training to turn longevity into a local socioeconomic development factor.",orgTitle3:"Professional associations",orgText3:"Interdisciplinary training to de
508sign services and products that meet the needs of an ageing society.",ctaTitle:"Ready to design your best future?",ctaSub:"Explore our full training offer on the Academy platform or contact us for customised training.",ctaExplore:"Explore the Academy",ctaContact:"Request more info"},fr:{heroBadge:"Académie de Smart Ageing",heroTitle1:"Formation pour concevoir votre",heroTitle2:"meilleur avenir",heroSub:"Programmes de formation basés sur la méthode «Juste à Temps» et les 9 piliers du vieillissement intelligent. Des cours pratiques, remplis d'outils utiles, pour vous aider à prendre les bonnes décisions au bon moment.",heroTag1:"Méthodologie propre",heroTag2:"Livre inclus",heroTag3:"Certificat officiel",heroTag4:"100% en ligne",diffTitle1:"Méthode «Juste à Temps»",diffTitle2:"Certificat inclus",diffTitle3:"Livre inclus",diffTitle4:"100% pratique",diffText1:"Méthodologie propre basée sur les 9 piliers du vieillissement intelligent.",diffText2:"Diplôme accrédité à l'issue de chaque programme de formation.",diffText3:"Chaque étudiant reçoit «L'art de vieillir sagement» (500 pages).",diffText4:"Exercices, outils et votre propre carte de décisions vitales.",catalogTitle1:"Trois diplômes, trois",catalogTitle2:"publics",catalogSub:"Chaque cours est conçu pour un profil concret, avec un contenu adapté à ses défis et besoins spécifiques.",popular:"Le plus populaire",whoLabel:"Qui devrait suivre ce cours ?",challengesLabel:"Défis que nous abordons",learnLabel:"Ce que vous apprendrez",seeModules:"modules du programme",modules:"modules",certificate:"Certificat",enroll:"S'inscrire",customBadge:"Pour les organisations",customTitle1:"Formation",customTitle2:"sur mesure",customP1:"Nous concevons des programmes de formation personnalisés, adaptés à la réalité, aux objectifs et à la culture de chaque organisation. Des ateliers intensifs aux diplômes complets.",customP2:"Idéal pour les entreprises souhaitant préparer leurs employés seniors, les administrations publiques recherchant des programmes de vieillissement actif, et les ordres professionnels désirant offrir une valeur différentielle à leurs membres.",customCheck1:"Contenu adapté à votre secteur et audience",customCheck2:"Formats flexibles : présentiel, en ligne ou hybride",customCheck3:"Accompagnement et suivi personnalisé",customCheck4:"Possibilité de certification pour les participants",customCta:"Demander des informations",orgTitle1:"Entreprises",orgText1:"Programmes de préparation à la retraite, gestion des talents seniors et dialogue intergénérationnel.",orgTitle2:"Administrations publiques",orgText2:"Formation au vieillissement actif pour faire de la longévité un facteur de développement socio-économique local.",orgTitle3:"Ordres professionnels",orgText3:"Formation interdisciplinaire pour concevoir des services et produits répondant aux besoins d'une société vieillissante.",ctaTitle:"Prêt à concevoir votre meilleur avenir ?",ctaSub:"Explorez notre offre de formation complète sur la plateforme de l'Académie ou contactez-nous pour une formation personnalisée.",ctaExplore:"Explorer l'Aca
508démie",ctaContact:"Demander plus d'infos"}},o2={es:[{id:"futuro",titulo:"Diseña tu futuro para una mejor longevidad",subtitulo:"Para cualquier persona mayor de 30 años",icono:Es,color:"from-primary/10 to-primary/5",borderColor:"hover:border-primary/40",audiencia:"+30 años",precio:"450 â¬",duracion:"10 módulos + libro incluido",certificado:!0,descripcion:"Este curso se fundamenta en una idea clave: ser previsor y tomar decisiones acertadas es esencial para vivir una buena vejez. Aplicarás el método «Justo a Tiempo», basado en los nueve pilares del envejecimiento inteligente, y diseñarás tu propio mapa de decisiones vitales.",quienDebeCursar:"Toda persona mayor de 30 años que quiera aprender a diseñar su mejor futuro para disfrutar de una buena longevidad.",retos:["Falta de planificación financiera para la vejez","Desconocimiento de los aspectos legales y patrimoniales clave","Hábitos de salud insuficientes para una longevidad activa","Brecha digital y tecnológica creciente con la edad","Ausencia de un plan de vivienda adaptado al envejecimiento","Relaciones sociales que se debilitan con el tiempo","Falta de preparación emocional ante la enfermedad y el final de vida"],aprendizajes:["Aplicar el método «Justo a Tiempo» con los 9 pilares del envejecimiento inteligente","Tomar decisiones informadas sobre jubilación, seguros, finanzas y patrimonio","Desarrollar hábitos de salud, bienestar y uso de tecnologÃa para una longevidad activa","Diseñar tu mapa personal de decisiones vitales con acciones concretas y calendario"],modulos:["Finanzas y seguros","Trabajo y jubilación","Temas jurÃdicos","Vivienda","TecnologÃa","Salud y bienestar","Ocio y sociabilidad","Enfermedad y muerte","Cuidado del mayor","Mapa de decisiones"],enlace:"https://academia.institutodesmartageing.com/cursos/disena-tu-futuro-para-una-mejor-longevidad/",destacado:!0},{id:"mujer",titulo:"Mujer y futuro: ¿Cómo prepararte para tu mejor etapa?",subtitulo:"Diseñado especÃficamente para mujeres",icono:xr,color:"from-pink-500/10 to-pink-500/5",borderColor:"hover:border-pink-500/40",audiencia:"Mujeres",precio:"450 â¬",duracion:"10 módulos + libro incluido",certificado:!0,descripcion:"Las mujeres enfrentamos retos especÃficos: sueldos más bajos, carreras intermitentes, diagnósticos más tardÃos, vidas más longevas con peor salud y mayor riesgo de soledad. Este curso te prepara para superar cada uno de estos retos con decisiones acertadas y en el momento justo.",quienDebeCursar:"Mujeres decididas a superar con éxito los retos que el envejecimiento tiene para nosotras y que quieren diseñar su mejor futuro.",retos:["Sueldos más bajos a lo largo de la vida que dificultan el ahorro","Carreras profesionales intermitentes que reducen las pensiones","Diagnósticos médicos más tardÃos o menos precisos","Vidas más longevas pero con peor salud en los últimos años","Mayor riesgo de sufrir soledad no deseada","Menor acceso a productos financieros adaptados","Sobrecarga en roles de cuidadora familiar"],aprendizajes:["Gestionar tus finanzas y jubilación teniendo en cuenta los retos especÃficos de las mujeres","Proteger tu salud, tu autonomÃa y tu patrimonio con perspectiva de género","Mantener relaciones sociales activas y evitar la soledad no deseada","Construir tu propio mapa de decisiones vitales con herramientas prácticas y un plan personal"],modulos:["Finanzas y seguros","Trabajo y jubilación","Temas jurÃdicos","Vivienda","TecnologÃa","Salud y bienestar","Ocio y sociabilidad","Enfermedad y muerte","Cuidado del mayor","Mapa de decisiones"],enlace:"https://academia.institutodesmartageing.com/cursos/diplomado-mujer-y-futuro-como-prepararte-para-tu-mejor-etapa/",destacado:!1},{id:"jubilacion",titulo:"Preparación para una jubilación más plena",subtitulo:"Para quienes se jubilan en los próximos 2 años",icono:Fw,color:"from-emerald-500/10 to-emerald-500/5",borderColor:"hover:border-emerald-500/40",audiencia:"Pre-jubilación",precio:"450 â¬",duracion:"8 módulos + libro incluido",certificado:!0,descripcion:"La jubilación ya no es lo que era. Hoy vivimos más años, con más energÃa y más opciones⦠pero también más
508incertidumbres. Este curso te acompaña a diseñar tu transición hacia una jubilación activa, consciente y feliz, combinando reflexión, planificación y acción.",quienDebeCursar:"Profesionales decididos a que la jubilación sea la mejor etapa de su vida.",retos:["Pérdida de identidad y propósito al dejar de trabajar","Incertidumbre financiera sobre la suficiencia de la pensión","Cambios emocionales y psicológicos en la transición","Reorganización del tiempo libre y las relaciones","Decisiones legales y patrimoniales pendientes","Adaptación de la vivienda y el estilo de vida"],aprendizajes:["Hacer una transición armónica hacia la jubilación con autonomÃa y bienestar integral","Garantizar tu tranquilidad financiera con planificación de ingresos, gastos y recursos","Diseñar tu vida ideal después del trabajo con propósito, relaciones y hábitos activos","Planificar tu futuro con serenidad: vivienda, cuidados y decisiones anticipadas"],modulos:["Introducción: segunda parte de la vida","Trabajo y jubilación","Finanzas y seguros","Temas jurÃdicos","Ocio y sociabilidad","TecnologÃa","Salud y bienestar","Mapa de decisiones"],enlace:"https://academia.institutodesmartageing.com/cursos/diplomado-preparacion-para-una-jubilacion-mas-plena/",destacado:!1}],en:[{id:"futuro",titulo:"Design your future for better longevity",subtitulo:"For anyone over 30 years old",icono:Es,color:"from-primary/10 to-primary/5",borderColor:"hover:border-primary/40",audiencia:"30+ years",precio:"â¬450",duracion:"10 modules + book included",certificado:!0,descripcion:"This course is based on a key idea: being foresighted and making the right decisions is essential for a good old age. You will apply the «Just in Time» method, based on the nine pillars of smart ageing, and design your own life-decision map.",quienDebeCursar:"Anyone over 30 who wants to learn how to design their best future for better longevity.",retos:["Lack of financial planning for old age","Ignorance of key legal and estate matters","Insufficient health habits for active longevity","Growing digital and technological gap with age","No housing plan adapted to ageing","Social relationships that weaken over time","Lack of emotional preparation for illness and end of life"],aprendizajes:["Apply the «Just in Time» method with the 9 pillars of smart ageing","Make informed decisions about retirement, insurance, finances and estate","Develop health, wellness and technology habits for active longevity","Design your personal life-decision map with concrete actions and a timeline"],modulos:["Finance and insurance","Work and retirement","Legal matters","Housing","Technology","Health and wellness","Leisure and sociability","Illness and death","Elder care","Decision map"],enlace:"https://academia.institutodesmartageing.com/cursos/disena-tu-futuro-para-una-mejor-longevidad/",destacado:!0},{id:"mujer",titulo:"Women and the future: How to prepare for your best stage?",subtitulo:"Designed specifically for women",icono:xr,color:"from-pink-500/10 to-pink-500/5",borderColor:"hover:border-pink-500/40",audiencia:"Women",precio:"â¬450",duracion:"10 modules + book included",certificado:!0,descripcion:"Women face specific challenges: lower salaries, intermittent careers, later diagnoses, longer lives with poorer health, and a higher risk of loneliness. This course prepares you to overcome each of these challenges with the right decisions at the right time.",quienDebeCursar:"Women determined to successfully overcome the challenges ageing poses for us and who want to design their best future.",retos:["Lower salaries throughout life making saving difficult","Intermittent careers that reduce pensions","Later or less accurate medical diagnoses","Longer lives but with poorer health in later years","Higher risk of unwanted loneliness","Less access to adapted financial products","Overload in family caregiver roles"],aprendizajes:["Manage your finances and retirement considering women-specific challenges","Protect your health, autonomy and assets with a gender perspective","Maintain active social relationships and avoid unwanted loneliness","Build your own life-decision map with practical tools and a personal plan"],modulos:["Finance and insurance","Work and retirement","Legal matters","Housing","Technology","Health and wellness","
508Leisure and sociability","Illness and death","Elder care","Decision map"],enlace:"https://academia.institutodesmartageing.com/cursos/diplomado-mujer-y-futuro-como-prepararte-para-tu-mejor-etapa/",destacado:!1},{id:"jubilacion",titulo:"Preparing for a more fulfilling retirement",subtitulo:"For those retiring within the next 2 years",icono:Fw,color:"from-emerald-500/10 to-emerald-500/5",borderColor:"hover:border-emerald-500/40",audiencia:"Pre-retirement",precio:"â¬450",duracion:"8 modules + book included",certificado:!0,descripcion:"Retirement is no longer what it used to be. Today we live longer, with more energy and more options⦠but also more uncertainties. This course helps you design your transition to an active, conscious and happy retirement, combining reflection, planning and action.",quienDebeCursar:"Professionals determined to make retirement the best stage of their life.",retos:["Loss of identity and purpose when leaving work","Financial uncertainty about pension adequacy","Emotional and psychological changes during the transition","Reorganisation of free time and relationships","Pending legal and estate decisions","Adapting housing and lifestyle"],aprendizajes:["Make a harmonious transition to retirement with autonomy and holistic wellbeing","Ensure your financial peace of mind with income, expense and resource planning","Design your ideal post-work life with purpose, relationships and active habits","Plan your future with serenity: housing, care and advance decisions"],modulos:["Introduction: the second half of life","Work and retirement","Finance and insurance","Legal matters","Leisure and sociability","Technology","Health and wellness","Decision map"],enlace:"https://academia.institutodesmartageing.com/cursos/diplomado-preparacion-para-una-jubilacion-mas-plena/",destacado:!1}],fr:[{id:"futuro",titulo:"Concevez votre avenir pour une meilleure longévité",subtitulo:"Pour toute personne de plus de 30 ans",icono:Es,color:"from-primary/10 to-primary/5",borderColor:"hover:border-primary/40",audiencia:"+30 ans",precio:"450 â¬",duracion:"10 modules + livre inclus",certificado:!0,descripcion:"Ce cours repose sur une idée clé : être prévoyant et prendre les bonnes décisions est essentiel pour bien vieillir. Vous appliquerez la méthode «Juste à Temps», basée sur les neuf piliers du vieillissement intelligent, et concevrez votre propre carte de décisions vitales.",quienDebeCursar:"Toute personne de plus de 30 ans souhaitant apprendre à concevoir son meilleur avenir pour profiter d'une bonne longévité.",retos:["Manque de planification financière pour la vieillesse","Méconnaissance des aspects juridiques et patrimoniaux clés","Habitudes de santé insuffisantes pour une longévité active","Fossé numérique et technologique croissant avec l'âge","Absence de plan de logement adapté au vieillissement","Relations sociales qui s'affaiblissent avec le temps","Manque de préparation émotionnelle face à la maladie et la fin de vie"],aprendizajes:["Appliquer la méthode «Juste à Temps» avec les 9 piliers du vieillissement intelligent","Prendre des décisions éclairées sur la retraite, les assurances, les finances et le patrimoine","Développer des habitudes de santé, de bien-être et d'utilisation de la technologie pour une longévité active","Concevoir votre carte personnelle de décisions vitales avec des actions concrètes et un calendrier"],modulos:["Finances et assurances","Travail et retraite","Questions juridiques","Logement","Technologie","Santé et bien-être","Loisirs et sociabilité","Maladie et mort","Soins aux aînés","Carte de décisions"],enlace:"https://academia.institutodesmartageing.com/cursos/disena-tu-futuro-para-una-mejor-longevidad/",destacado:!0},{id:"mujer",titulo:"Femme et avenir : comment préparer votre meilleure étape ?",subtitulo:"Conçu spécifiquement pour les femmes",icono:xr,color:"from-pink-500/10 to-pink-500/5",borderColor:"hover:border-pink-500/40",audiencia:"Femmes",precio:"450 â¬",duracion:"10 modules + livre inclus",certificado:!0,descripcion:"Les femmes font face à des défis spécifiques : salaires plus bas, carrières intermittentes, diagnostics plus tardifs, vies plus longues avec une moins bonne santé et un risque accru de solitude. Ce cours vous prépare à surmonter chacun de ces défis avec les bonnes décisions au bon moment.",quienDebeCursar:"Femmes déterminées à surmonter avec succès les défis que le vieillissement représente pour nous et qui souhaitent concevoir leur meilleur avenir.",retos:["Salaires plus bas tout au long de la vie rend
508ant l'épargne difficile","Carrières professionnelles intermittentes réduisant les pensions","Diagnostics médicaux plus tardifs ou moins précis","Vies plus longues mais avec une moins bonne santé dans les dernières années","Risque accru de solitude non désirée","Moindre accès aux produits financiers adaptés","Surcharge dans les rôles d'aidante familiale"],aprendizajes:["Gérer vos finances et votre retraite en tenant compte des défis spécifiques des femmes","Protéger votre santé, votre autonomie et votre patrimoine avec une perspective de genre","Maintenir des relations sociales actives et éviter la solitude non désirée","Construire votre propre carte de décisions vitales avec des outils pratiques et un plan personnel"],modulos:["Finances et assurances","Travail et retraite","Questions juridiques","Logement","Technologie","Santé et bien-être","Loisirs et sociabilité","Maladie et mort","Soins aux aînés","Carte de décisions"],enlace:"https://academia.institutodesmartageing.com/cursos/diplomado-mujer-y-futuro-como-prepararte-para-tu-mejor-etapa/",destacado:!1},{id:"jubilacion",titulo:"Préparation pour une retraite plus épanouissante",subtitulo:"Pour ceux qui prennent leur retraite dans les 2 prochaines années",icono:Fw,color:"from-emerald-500/10 to-emerald-500/5",borderColor:"hover:border-emerald-500/40",audiencia:"Pré-retraite",precio:"450 â¬",duracion:"8 modules + livre inclus",certificado:!0,descripcion:"La retraite n'est plus ce qu'elle était. Aujourd'hui nous vivons plus longtemps, avec plus d'énergie et plus d'options⦠mais aussi plus d'incertitudes. Ce cours vous accompagne pour concevoir votre transition vers une retraite active, consciente et heureuse, alliant réflexion, planification et action.",quienDebeCursar:"Professionnels déterminés à faire de la retraite la meilleure étape de leur vie.",retos:["Perte d'identité et de sens en quittant le travail","Incertitude financière sur l'adéquation de la pension","Changements émotionnels et psychologiques pendant la transition","Réorganisation du temps libre et des relations","Décisions juridiques et patrimoniales en suspens","Adaptation du logement et du style de vie"],aprendizajes:["Faire une transition harmonieuse vers la retraite avec autonomie et bien-être global","Assurer votre tranquillité financière avec la planification des revenus, dépenses et ressources","Concevoir votre vie idéale après le travail avec un sens, des relations et des habitudes actives","Planifier votre avenir avec sérénité : logement, soins et décisions anticipées"],modulos:["Introduction : la seconde partie de la vie","Travail et retraite","Finances et assurances","Questions juridiques","Loisirs et sociabilité","Technologie","Santé et bien-être","Carte de décisions"],enlace:"https://academia.institutodesmartageing.com/cursos/diplomado-preparacion-para-una-jubilacion-mas-plena/",destacado:!1}]},PQ=()=>{const{lang:t}=Zt(),e=i2[t]||i2.es,n=o2[t]||o2.es,r=[{icono:X7,titulo:e.diffTitle1,texto:e.diffText1},{icono:Vn,titulo:e.diffTitle2,texto:e.diffText2},{icono:Ua,titulo:e.diffTitle3,texto:e.diffText3},{icono:Bo,titulo:e.diffTitle4,texto:e.diffText4}],i=[{icono:vn,titulo:e.orgTitle1,texto:e.orgText1},{icono:uc,titulo:e.orgTitle2,texto:e.orgText2},{icono:Fa,titulo:e.orgTitle3,texto:e.orgText3}],o=[e.customCheck1,e.customCheck2,e.customCheck3,e.customCheck4];return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"text-center max-w-4xl mx-auto",children:[u.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-6",children:[u.jsx(Fa,{className:"w-4 h-4"}),e.heroBadge]}),u.jsxs("h1",{className:"text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-foreground mb-6 leading-tight",children:[e.heroTitle1," ",u.jsx("span",{className:"text-gradient",children:e.heroTitle2})]}),u.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-3xl mx-auto mb-8 leading-relaxed",children:e.heroSub}),u.jsx("div",{className:"flex flex-wrap justify-center gap-6 text-sm text-muted-foreground",children:[e.heroTag1,e.heroTag2,e.heroTag3,e.heroTag4].map(s=>u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(lc,{className:"w-5 h-5 text-primary"}),u.jsx("span",{children:s})]},s))})]})})}),u.jsx("section",{className:"py-12 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6 max-w-5xl mx-auto",children:r.map((s,a)=>u.jsxs("div",{className:"flex items-start gap-4 p-5 rounded-xl bg-background/80 border border-border",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:u.jsx(s.icono,{className:"w-5 h-5 text-primary"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground text-sm mb-1",children:s.titulo}),u.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:s.texto})]})]},a))})})}),u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[u.jsxs("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold text-foreground mb-4",children:[e.catalogTitle1," ",u.jsx("span",{className:"text-gradient",children:e.catalogTitle2})]}),u.jsx("p",{className:"text-muted-foreground text-lg",children:e.catalogSub})]}),u.jsx("div",{className:"grid lg:grid-cols-3 gap-8 max-w-7xl mx-auto",children:n.map(s=>u.jsxs("div",{className:`group relative bg-card rounded-2xl border-2 border-border transition-all duration-500 hover:shadow-xl ${s.borderColor} hover:-translate-y-2 overflow-hidden flex flex-col`,children:[u.jsxs("div",{className:`bg-gradient-to-br ${s.color} p-8 pb-6 relative`,children:[s.destacado&&u.jsxs("span",{className:"absolute top-4 right-4 inline-flex items-center gap-1 px-3 py-1 rounded-full bg-primary text-primary-foreground text-xs font-semibold",children:[u.jsx(kh,{className:"w-3 h-3"}),e.popular]}
508),u.jsx("div",{className:"w-14 h-14 rounded-xl bg-background/90 shadow-md flex items-center justify-center mb-5",children:u.jsx(s.icono,{className:"w-7 h-7 text-primary"})}),u.jsx("span",{className:"inline-block px-3 py-1 rounded-full bg-background/80 text-foreground text-xs font-medium mb-3",children:s.audiencia}),u.jsx("h3",{className:"text-xl font-bold text-foreground leading-snug",children:s.titulo}),u.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:s.subtitulo})]}),u.jsxs("div",{className:"p-8 pt-6 flex-1 flex flex-col",children:[u.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed mb-6",children:s.descripcion}),s.quienDebeCursar&&u.jsxs("div",{className:"mb-6 p-4 rounded-xl bg-primary/5 border border-primary/15",children:[u.jsx("p",{className:"text-xs font-semibold text-foreground mb-1 uppercase tracking-wide",children:e.whoLabel}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:s.quienDebeCursar})]}),s.retos&&u.jsxs("div",{className:"mb-6",children:[u.jsx("p",{className:"text-xs font-semibold text-foreground mb-3 uppercase tracking-wide",children:e.challengesLabel}),u.jsx("ul",{className:"space-y-1.5",children:s.retos.map((a,l)=>u.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[u.jsx(Ua,{className:"w-3 h-3 text-primary mt-0.5 shrink-0"}),a]},l))})]}),u.jsxs("div",{className:"mb-6",children:[u.jsx("p",{className:"text-xs font-semibold text-foreground mb-3 uppercase tracking-wide",children:e.learnLabel}),u.jsx("ul",{className:"space-y-2.5",children:s.aprendizajes.map((a,l)=>u.jsxs("li",{className:"flex items-start gap-2.5 text-sm text-muted-foreground",children:[u.jsx(lc,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),u.jsx("span",{children:a})]},l))})]}),u.jsxs("details",{className:"mb-6 group/details",children:[u.jsxs("summary",{className:"text-xs font-semibold text-primary cursor-pointer hover:underline flex items-center gap-1",children:[u.jsx($o,{className:"w-3.5 h-3.5"}),`${s.modulos.length} ${e.seeModules}`]}),u.jsx("ul",{className:"mt-3 space-y-1.5 pl-5",children:s.modulos.map((a,l)=>u.jsx("li",{className:"text-xs text-muted-foreground list-disc",children:a},l))})]}),u.jsxs("div",{className:"flex items-center gap-4 mb-6 text-xs text-muted-foreground border-t border-border pt-4 mt-auto",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(ks,{className:"w-3.5 h-3.5"}),s.duracion]}),s.certificado&&u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(Vn,{className:"w-3.5 h-3.5"}),e.certificate]})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-2xl font-bold text-foreground",children:s.precio}),u.jsxs("a",{href:s.enlace,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-primary text-primary-foreground text-sm font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",children:[e.enroll,u.jsx(cc,{className:"w-4 h-4"})]})]})]})]},s.id))})]})}),u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsx("div",{className:"max-w-5xl mx-auto",children:u.jsxs("div",{className:"grid md:grid-cols-2 gap-10 items-center",children:[u.jsxs("div",{children:[u.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:[u.jsx(xK,{className:"w-4 h-4"}),e.customBadge]}),u.jsxs("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold text-foreground mb-6",children:[e.customTitle1," ",u.jsx("span",{className:"text-gradient",children:e.customTitle2})]}),u.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:e.customP1}),u.jsx("p",{className:"text-muted-foreground leading-relaxed mb-8",children:e.customP2}),u.jsx("div",{className:"space-y-3 mb-8",children:o.map((s,a)=>u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(lc,{className:"w-5 h-5 text-primary mt-0.5 shrink-0"}),u.jsx("span",{className:"text-sm text-foreground",children:s})]},a))}),u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center gap-2 px-6 py-3 rounded-lg bg-primary text-primary-foreground text-sm font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",children:[e.customCta,u.jsx(st,{className:"w-4 h-4"})]})]}),u.jsx("div",{className:"space-y-4",children:i.map((s,a)=>u.jsxs("div",{className:"flex items-start gap-4 p-5 rounded-xl bg-background border border-border",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:u.jsx(s.icono,{className:"w-5 h-5 text-primary"})}),u.jsxs("div",{children:[u.jsx("h4",{className:"font-semibold text-foreground text-sm mb-1",children:s.titulo}),u.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:s.texto})]})]},a))})]})})})}),u.jsx("section",{className:"py-16 md:py-20 bg-foreground",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[u.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold text-primary-foreground mb-4",children:e.ctaTitle}
508),u.jsx("p",{className:"text-primary-foreground/70 text-lg max-w-2xl mx-auto mb-8",children:e.ctaSub}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[u.jsxs("a",{href:"https://academia.institutodesmartageing.com/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl bg-primary text-primary-foreground font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",children:[e.ctaExplore,u.jsx(cc,{className:"w-5 h-5"})]}),u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl border-2 border-primary-foreground/30 text-primary-foreground font-semibold transition-all duration-300 hover:bg-primary-foreground/10 hover:border-primary-foreground/50",children:[e.ctaContact,u.jsx(st,{className:"w-5 h-5"})]})]})]})})]}),u.jsx(Qt,{})]})},MQ={es:["Estrategias de envejecimiento activo y saludable en el entorno corporativo","Transformación digital para el envejecimiento inteligente","Adaptación de espacios laborales y públicos para la inclusión de personas mayores","Cuidado preventivo y bienestar mental para adultos mayores","Gestión y retención de talento senior en la era digital","Finanzas personales y planificación para una jubilación saludable y activa","Tendencias en bienestar y vida activa para la generación silver","Innovación y desarrollo de productos para adultos mayores","PolÃticas de inclusión y diversidad etaria en la cultura organizacional","Salud preventiva y gestión de enfermedades crónicas a través de smart ageing"],en:["Active and healthy ageing strategies in the corporate environment","Digital transformation for smart ageing","Adapting workplaces and public spaces for the inclusion of older adults","Preventive care and mental wellbeing for older adults","Senior talent management and retention in the digital era","Personal finance and planning for a healthy, active retirement","Wellbeing and active living trends for the silver generation","Innovation and product development for older adults","Age inclusion and diversity policies in organisational culture","Preventive health and chronic disease management through smart ageing"],fr:["Stratégies de vieillissement actif et sain en milieu professionnel","Transformation numérique pour le vieillissement intelligent","Adaptation des espaces de travail et publics pour l'inclusion des personnes âgées","Soins préventifs et bien-être mental pour les adultes âgés","Gestion et rétention des talents seniors à l'ère numérique","Finances personnelles et planification pour une retraite saine et active","Tendances en bien-être et vie active pour la génération silver","Innovation et développement de produits pour les adultes âgés","Politiques d'inclusion et de diversité d'âge dans la culture organisationnelle","Santé préventive et gestion des maladies chroniques par le smart ageing"]},RQ={es:["¿Cómo planificar tus finanzas para poder cubrir tus gastos en la vejez?","¿Cómo organizar tu legado para facilitarle la vida a tus seres queridos?","¿Cómo cambiar esos hábitos que perjudican tu salud?","¿Cómo hacer testamento vital?","¿Cómo escoger e invertir en el mejor cohousing para ti?","¿Cómo dotar de propósito a tu vida tras la jubilación?"],en:["How to plan your finances to cover expenses in old age?","How to organise your legacy to make life easier for loved ones?","How to change habits that harm your health?","How to create a living will?","How to choose and invest in the best co-housing for you?","How to give purpose to your life after retirement?"],fr:["Comment planifier vos finances pour couvrir vos dépenses à la vieillesse ?","Comment organiser votre héritage pour faciliter la vie de vos proches ?","Comment changer les habitudes qui nuisent à votre santé ?","Comment rédiger un testament de vie ?","Comment choisir et investir dans le meilleur cohousing pour vous ?","Comment donner un sens à votre vie après la retraite ?"]},IQ=()=>{const{t,lang:e}=Zt(),n=MQ[e],r=RQ[e],i=[{icon:Ss,title:t("eventos.inmersivos"),desc:t("eventos.inmersivosDesc")},{icon:pK,title:t("eventos.conferencias"),desc:t("eventos.conferenciasDesc")},{icon:vn,title:t("eventos.networking"),desc:t("eventos.networkingDesc")}];return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("eventos.badge")}),u.jsxs("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("eventos.heroTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("eventos.heroTitle2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("eventos.heroSub")})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-8 max-w-5xl mx-auto mb-16",children:i.map(o=>u.jsxs("div",{className:"group p-6 rounded-xl bg-card border border-border/50 transition-all duration-300 hover:shadow-md hover:border-primary/30 text-center",children:[u.jsx("div",{className:"w-14 h-14 roun
508ded-xl bg-accent flex items-center justify-center mx-auto mb-4 transition-all duration-300 group-hover:bg-primary",children:u.jsx(o.icon,{className:"w-7 h-7 text-accent-foreground transition-colors duration-300 group-hover:text-primary-foreground"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-2",children:o.title}),u.jsx("p",{className:"text-sm text-muted-foreground",children:o.desc})]},o.title))})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("eventos.matBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("eventos.matTitle")," ",u.jsx("span",{className:"text-gradient",children:t("eventos.matTitle2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl mx-auto",children:t("eventos.matSub")})]}),u.jsxs("div",{className:"bg-card rounded-2xl p-8 md:p-10 border border-border/50 shadow-lg mb-12",children:[u.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[u.jsx(uc,{className:"w-6 h-6 text-primary"}),u.jsx("h3",{className:"text-xl font-bold text-foreground",children:t("eventos.matTemasTitle")})]}),u.jsx("div",{className:"grid sm:grid-cols-2 gap-4",children:r.map((o,s)=>u.jsxs("div",{className:"flex items-start gap-3 group",children:[u.jsx(H3,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),u.jsx("span",{className:"text-muted-foreground text-sm leading-relaxed",children:o})]},s))})]}),u.jsx("div",{className:"text-center",children:u.jsxs("a",{href:"https://www.institutodesmartageing.com/contactanos/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-8 py-4 rounded-xl bg-primary text-primary-foreground font-semibold shadow-lg transition-all duration-300 hover:bg-primary/90 hover:shadow-glow hover:-translate-y-1",children:[t("eventos.matCta"),u.jsx(st,{className:"w-5 h-5"})]})})]})})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("eventos.temBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("eventos.temTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("eventos.temTitle2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:t("eventos.temSub")})]}),u.jsx("div",{className:"grid sm:grid-cols-2 gap-4 max-w-4xl mx-auto",children:n.map((o,s)=>u.jsxs("div",{className:"group flex items-start gap-3 p-4 rounded-xl bg-card border border-border/50 transition-all duration-300 hover:border-primary/30 hover:shadow-sm",children:[u.jsx("span",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-accent flex items-center justify-center text-sm font-bold text-accent-foreground group-hover:bg-primary group-hover:text-primary-foreground transition-all duration-300",children:String(s+1).padStart(2,"0")}),u.jsx("span",{className:"text-sm text-foreground leading-relaxed",children:o})]},s))})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:t("eventos.videosTitle")}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("eventos.videosSub")})]}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 max-w-6xl mx-auto mb-12",children:[{id:"zfhMFkN-UsQ",source:"65YMás",title:t("eventos.video1Title")},{id:"QzWElUa-5KY",source:"Rankia",title:t("eventos.video2Title")},{id:"S8-RSS1GGKI",source:"RTVE · Canal 24 horas",title:t("eventos.video3Title")}].map(o=>u.jsxs("div",{className:"group rounded-xl overflow-hidden bg-card border border-border/50 shadow-sm transition-all duration-300 hover:shadow-md hover:border-primary/30 flex flex-col",children:[u.jsx("div",{className:"relative w-full",style:{aspectRatio:"16 / 9"},children:u.jsx("iframe",{src:`https://www.youtube-nocookie.com/embed/${o.id}`,title:o.title,loading:"lazy",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture;
508 web-share",allowFullScreen:!0,referrerPolicy:"strict-origin-when-cross-origin",className:"absolute inset-0 w-full h-full border-0"})}),u.jsxs("div",{className:"px-4 py-3 flex flex-col gap-1.5 flex-1",children:[u.jsx("span",{className:"text-xs font-semibold text-primary tracking-wider uppercase",children:o.source}),u.jsx("h3",{className:"text-sm font-semibold text-foreground leading-snug",children:o.title})]})]},o.id))}),u.jsx("div",{className:"text-center",children:u.jsxs("a",{href:"https://www.institutodesmartageing.com/contactanos/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-8 py-4 rounded-xl bg-primary text-primary-foreground font-semibold shadow-lg transition-all duration-300 hover:bg-primary/90 hover:shadow-glow hover:-translate-y-1",children:[t("eventos.videosCta"),u.jsx(st,{className:"w-5 h-5"})]})})]})}),u.jsx(Ws,{})]}),u.jsx(Qt,{})]})};var Oo=function(){return Oo=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Oo.apply(this,arguments)};function af(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function DQ(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(d){try{c(r.next(d))}catch(f){s(f)}}function l(d){try{c(r.throw(d))}catch(f){s(f)}}function c(d){d.done?o(d.value):i(d.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function $Q(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}const LQ=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class F_ extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}}class BQ extends F_{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class s2 extends F_{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class a2 extends F_{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var qk;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(qk||(qk={}));class zQ{constructor(e,{headers:n={},customFetch:r,region:i=qk.Any}={}){this.url=e,this.headers=n,this.region=i,this.fetch=LQ(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return DQ(this,arguments,void 0,function*(n,r={}){var i;let o,s;try{const{headers:a,method:l,body:c,signal:d,timeout:f}=r;let h={},{region:p}=r;p||(p=this.region);const g=new URL(`${this.url}/${n}`);p&&p!=="any"&&(h["x-region"]=p,g.searchParams.set("forceFunctionRegion",p));let m;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(h["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(h["Content-Type"]="application/json",m=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?m=JSON.stringify(c):m=c;let v=d;f&&(s=new AbortController,o=setTimeout(()=>s.abort(),f),d?(v=s.signal,d.addEventListener("abort",()=>s.abort())):v=s.signal);const y=yield this.fetch(g.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),a),body:m,signal:v}).catch(w=>{throw new BQ(w)}),b=y.headers.get("x-relay-error");
508if(b&&b==="true")throw new s2(y);if(!y.ok)throw new a2(y);let x=((i=y.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),S;return x==="application/json"?S=yield y.json():x==="application/octet-stream"||x==="application/pdf"?S=yield y.blob():x==="text/event-stream"?S=y:x==="multipart/form-data"?S=yield y.formData():S=yield y.text(),{data:S,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof a2||a instanceof s2?a.context:void 0}}finally{o&&clearTimeout(o)}})}}var FQ=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}},qQ=class{constructor(t){var e,n,r;this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(r=t.urlLengthLimit)!==null&&r!==void 0?r:8e3,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}then(t,e){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 r=this.fetch;let i=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{let s=null,a=null,l=null,c=o.status,d=o.statusText;if(o.ok){var f,h;if(n.method!=="HEAD"){var p;const y=await o.text();y===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((p=n.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text"))?a=y:a=JSON.parse(y))}const m=(f=n.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),v=(h=o.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");m&&v&&v.length>1&&(l=parseInt(v[1])),n.isMaybeSingle&&n.method==="GET"&&Array.isArray(a)&&(a.length>1?(s={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,c=406,d="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var g;const m=await o.text();try{s=JSON.parse(m),Array.isArray(s)&&o.status===404&&(a=[],s=null,c=200,d="OK")}catch{o.status===404&&m===""?(c=204,d="No Content"):s={message:m}}if(s&&n.isMaybeSingle&&(!(s==null||(g=s.details)===null||g===void 0)&&g.includes("0 rows"))&&(s=null,c=200,d="OK"),s&&n.shouldThrowOnError)throw new FQ(s)}return{error:s,data:a,count:l,status:c,statusText:d}});return this.shouldThrowOnError||(i=i.catch(o=>{var s;let a="",l="",c="";const d=o==null?void 0:o.cause;if(d){var f,h,p,g;const y=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",b=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";a=`${(p=o==null?void 0:o.name)!==null&&p!==void 0?p:"FetchError"}: ${o==null?void 0:o.message}`,a+=` 509 510Caused by: ${(g=d==null?void 0:d.name)!==null&&g!==void 0?g:"Error"}: ${y}`,b&&(a+=` (${b})`),d!=null&&d.stack&&(a+=` 511${d.stack}`)}else{var m;a=(m=o==null?void 0:o.stack)!==null&&m!==void 0?m:""}const v=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(c="",l="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${v} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",l="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(l+=`. Your request URL is ${v} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(s=o==null?void 0:o.name)!==null&&s!==void 0?s:"FetchError"}: ${o==null?void 0:o.message}`,details:a,hint:l,code:c},data:null,count:null,status:0,statusText:""}}
511)),i.then(t,e)}returns(){return this}overrideTypes(){return this}},UQ=class extends qQ{select(t){let e=!1;const n=(t??"*").split("").map(r=>/\s/.test(r)&&!e?"":(r==='"'&&(e=!e),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){const o=i?`${i}.order`:"order",s=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${s?`${s},`:""}${t}.${e?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:n=e}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,e,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"offset":`${r}.offset`,o=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${t}`),this.url.searchParams.set(o,`${e-t+1}`),this}abortSignal(t){return this.signal=t,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}explain({analyze:t=!1,verbose:e=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:o="text"}={}){var s;const a=[t?"analyze":null,e?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=(s=this.headers.get("Accept"))!==null&&s!==void 0?s:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${l}"; options=${a};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const l2=new RegExp("[,()]");var lu=class extends UQ{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&l2.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}notIn(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&l2.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`not.in.(${n})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:n,type:r}={}){let i="";r==="plain"?i="pl":r==="phrase"?i="ph":r==="websearch"&&(i="w");const o=n===void 0?"":`(${n})`;return this.url.searchParams.append(t,`${i}fts${o}.${e}`),this}match(t){return Object.entries(t).forEach(([e,n])=>{this.url.searchParams.append(e,`eq.${n}`)}),this}not(t,e,n){return this.url.searchParams.append(t,`not.${e}.${n}`),this}or(t,{foreignTable:e,referencedTable:n=e}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,e,n){return this.url.searchParams.append(t,`${e}.${n}`),this}},VQ=class{constructor(t,{headers:e={},schema:n,fetch:r,urlLengthLimit:i=8e3}){this.url=t,this.headers=new Headers(e),this.schema=n,this.fetch=r,this.urlLengthLimit=i}
511cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:n=!1,count:r}=e??{},i=n?"HEAD":"GET";let o=!1;const s=(t??"*").split("").map(c=>/\s/.test(c)&&!o?"":(c==='"'&&(o=!o),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",s),r&&l.append("Prefer",`count=${r}`),new lu({method:i,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(t,{count:e,defaultToNull:n=!0}={}){var r;const i="POST",{url:o,headers:s}=this.cloneRequestState();if(e&&s.append("Prefer",`count=${e}`),n||s.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>0){const l=[...new Set(a)].map(c=>`"${c}"`);o.searchParams.set("columns",l.join(","))}}return new lu({method:i,url:o,headers:s,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(t,{onConflict:e,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){var o;const s="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),r&&l.append("Prefer",`count=${r}`),i||l.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((d,f)=>d.concat(Object.keys(f)),[]);if(c.length>0){const d=[...new Set(c)].map(f=>`"${f}"`);a.searchParams.set("columns",d.join(","))}}return new lu({method:s,url:a,headers:l,schema:this.schema,body:t,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}update(t,{count:e}={}){var n;const r="PATCH",{url:i,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new lu({method:r,url:i,headers:o,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:t}={}){var e;const n="DELETE",{url:r,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new lu({method:n,url:r,headers:i,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit})}};function bp(t){"@babel/helpers - typeof";return bp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bp(t)}function WQ(t,e){if(bp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(bp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function HQ(t){var e=WQ(t,"string");return bp(e)=="symbol"?e:e+""}function KQ(t,e,n){return(e=HQ(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?c2(Object(n),!0).forEach(function(r){KQ(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c2(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var GQ=class lB{constructor(e,{headers:n={},schema:r,fetch:i,timeout:o,urlLengthLimit:s=8e3}={}){this.url=e,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=s;const a=i??globalThis.fetch;o!==void 0&&o>0?this.fetch=(l,c)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),o),h=c==null?void 0:c.signal;if(h){if(h.aborted)return clearTimeout(f),a(l,c);const p=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",p,{once:!0}),a(l,vg(vg({},c),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",p)})}return a(l,vg(vg({},c),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new VQ(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(e){return new lB(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(e,n={},{head:r=!1,get:i=!1,count:o}={}){var s;let a;const l=new URL(`${this.url}/rpc/${e}`);let c;const d=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(d)),f=r&&Object.values(n).some(d);f?(a="POST",c=n):r||i?(a=r?"HEAD":"GET",Object.entries(n).filter(([p,g])=>g!==void 0).map(([p,g])=>[p,Array.isArray(g)?`{${g.join(",")}}`:`${g}
511`]).forEach(([p,g])=>{l.searchParams.append(p,g)})):(a="POST",c=n);const h=new Headers(this.headers);return f?h.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&h.set("Prefer",`count=${o}`),new lu({method:a,url:l,headers:h,schema:this.schemaName,body:c,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit})}};class JQ{constructor(){}static detectEnvironment(){var e;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"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.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 r=n.versions;if(r&&r.node){const i=r.node,o=parseInt(i.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: 512import ws from "ws" 513new 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 e=this.detectEnvironment();if(e.constructor)return e.constructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=` 514 515Suggested solution: ${e.workaround}`),new Error(n)}static createWebSocket(e,n){const r=this.getWebSocketConstructor();return new r(e,n)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const YQ="2.98.0",XQ=`realtime-js/${YQ}`,QQ="1.0.0",cB="2.0.0",u2=cB,Uk=1e4,ZQ=1e3,eZ=100;var la;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(la||(la={}));var Sn;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Sn||(Sn={}));var Zi;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(Zi||(Zi={}));var Vk;(function(t){t.websocket="websocket"})(Vk||(Vk={}));var $l;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})($l||($l={}));class tZ{constructor(e){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=e??[]}encode(e,n){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(e));let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(e){var n;return this._isArrayBuffer((n=e.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var n,r;const i=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(e){var n,r;const i=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},s=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,s)}_encodeUserBroadcastPush(e,n,r){var i,o;const s=e.topic,a=(i=e.ref)!==null&&i!==void 0?i:"",l=(o=e.join_ref)!==null&&o!==void 0?o:"",c=e.payload.event,d=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},f=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(s.length>255)throw new Error(`topic length ${s.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+s.length+c.length+f.length,p=new ArrayBuffer(this.HEADER_LENGTH+h);let g=new DataView(p),m=0;g.setUint8(m++,this.KINDS.userBroadcastPush),g.setUint8(m++,l.length),g.setUint8(m++,a.length),g.setUint8(m++,s.length),g.setUint8(m++,c.length),g.setUint8(m++,f.length),g.setUint8(m++,n),Array.from(l,y=>
515g.setUint8(m++,y.charCodeAt(0))),Array.from(a,y=>g.setUint8(m++,y.charCodeAt(0))),Array.from(s,y=>g.setUint8(m++,y.charCodeAt(0))),Array.from(c,y=>g.setUint8(m++,y.charCodeAt(0))),Array.from(f,y=>g.setUint8(m++,y.charCodeAt(0)));var v=new Uint8Array(p.byteLength+r.byteLength);return v.set(new Uint8Array(p),0),v.set(new Uint8Array(r),p.byteLength),v.buffer}decode(e,n){if(this._isArrayBuffer(e)){let r=this._binaryDecode(e);return n(r)}if(typeof e=="string"){const r=JSON.parse(e),[i,o,s,a,l]=r;return n({join_ref:i,ref:o,topic:s,event:a,payload:l})}return n({})}_binaryDecode(e){const n=new DataView(e),r=n.getUint8(0),i=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,n,i)}}_decodeUserBroadcast(e,n,r){const i=n.getUint8(1),o=n.getUint8(2),s=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(e.slice(l,l+i));l=l+i;const d=r.decode(e.slice(l,l+o));l=l+o;const f=r.decode(e.slice(l,l+s));l=l+s;const h=e.slice(l,e.byteLength),p=a===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,g={type:this.BROADCAST_EVENT,event:d,payload:p};return s>0&&(g.meta=JSON.parse(f)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(e){var n;return e instanceof ArrayBuffer||((n=e==null?void 0:e.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(e,n){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([r])=>n.includes(r)))}}class uB{constructor(e,n){this.callback=e,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var St;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(St||(St={}));const d2=(t,e,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return e?Object.keys(e).reduce((o,s)=>(o[s]=nZ(s,t,e,i),o),{}):{}},nZ=(t,e,n,r)=>{const i=e.find(a=>a.name===t),o=i==null?void 0:i.type,s=n[t];return o&&!r.includes(o)?dB(o,s):Wk(s)},dB=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return sZ(e,n)}switch(t){case St.bool:return rZ(e);case St.float4:case St.float8:case St.int2:case St.int4:case St.int8:case St.numeric:case St.oid:return iZ(e);case St.json:case St.jsonb:return oZ(e);case St.timestamp:return aZ(e);case St.abstime:case St.date:case St.daterange:case St.int4range:case St.int8range:case St.money:case St.reltime:case St.text:case St.time:case St.timestamptz:case St.timetz:case St.tsrange:case St.tstzrange:return Wk(e);default:return Wk(e)}},Wk=t=>t,rZ=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},iZ=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},oZ=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},sZ=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let o;const s=t.slice(1,n);try{o=JSON.parse("["+s+"]")}catch{o=s?s.split(","):[]}return o.map(a=>dB(e,a))}return t},aZ=t=>typeof t=="string"?t.replace(" ","T"):t,fB=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};class r1{constructor(e,n,r={},i=Uk){this.channel=e,this.event=n,this.payload=r,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,j
515oin_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,n){var r;return this._hasReceived(e)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:e,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(n))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var f2;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(f2||(f2={}));class Eh{constructor(e,n){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},i=>{const{onJoin:o,onLeave:s,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Eh.syncState(this.state,i,o,s),this.pendingDiffs.forEach(l=>{this.state=Eh.syncDiff(this.state,l,o,s)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},i=>{const{onJoin:o,onLeave:s,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Eh.syncDiff(this.state,i,o,s),a())}),this.onJoin((i,o,s)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:o,newPresences:s})}),this.onLeave((i,o,s)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:o,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,n,r,i){const o=this.cloneDeep(e),s=this.transformState(n),a={},l={};return this.map(o,(c,d)=>{s[c]||(l[c]=d)}),this.map(s,(c,d)=>{const f=o[c];if(f){const h=d.map(v=>v.presence_ref),p=f.map(v=>v.presence_ref),g=d.filter(v=>p.indexOf(v.presence_ref)<0),m=f.filter(v=>h.indexOf(v.presence_ref)<0);g.length>0&&(a[c]=g),m.length>0&&(l[c]=m)}else a[c]=d}),this.syncDiff(o,{joins:a,leaves:l},r,i)}static syncDiff(e,n,r,i){const{joins:o,leaves:s}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(o,(a,l)=>{var c;const d=(c=e[a])!==null&&c!==void 0?c:[];if(e[a]=this.cloneDeep(l),d.length>0){const f=e[a].map(p=>p.presence_ref),h=d.filter(p=>f.indexOf(p.presence_ref)<0);e[a].unshift(...h)}r(a,d,l)}),this.map(s,(a,l)=>{let c=e[a];if(!c)return;const d=l.map(f=>f.presence_ref);c=c.filter(f=>d.indexOf(f.presence_ref)<0),e[a]=c,i(a,c,l),c.length===0&&delete e[a]}),e}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const i=e[r];return"metas"in i?n[r]=i.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[r]=i,n},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var h2;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(h2||(h2={}));var jh;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(jh||(jh={}));var us;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(us||(us={}));class Au{constructor(e,n={config:{}},r){var i,o;if(this.topic=e,this.params=n,this.socket=r,this.bindings={},this.state=Sn.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.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 r1(this,Zi.join,this.params,this.timeout),this.rejoinTimer=new uB(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Sn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Sn.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=Sn.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Sn.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=Sn.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Zi.reply,{},(s,a)=>{this._trigger(this._replyEventName(a),s)}),this.presence=new Eh(this),this.broadcastEndpointURL=fB(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(e,n=this.timeout){var r,i,o;if(this.socket.isConnected()||this.socket.connect(),this.state==Sn.closed){const{config:{broadcast:s,presence:a,private:l}}=this.params,c=(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&i!==void 0?i:[],d=!!this.bindings[jh.PRESENCE]&&this.bindings[jh.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,f={},h={broadcast:s,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(p=>e==null?void 0:e(us.CHANNEL_ERROR,p)),this._onClose(()=>e==null?void 0:e(us.CLOSED)),this.updateJoinPayload(Object.assign({config:h},f)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:p})=>{var g;if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){e==null||e(us.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,v=(g=m==null?void 0:m.length)!==null&&g!==void 0?g:0,y=[];for(let b=0;b<v;b++){const x=m[b],{filter:{event:S,schema:w,table:k,filter:j}}=x,T=p&&p[b];if(T&&T.event===S&&Au.isFilterValueEqual(T.schema,w)&&Au.isFilterValueEqual(T.table,k)&&Au.isFilterValueEqual(T.filter,j))y.push(Object.assign(Object.assign({},x),{id:T.id}));else{this.unsubscribe(),this.state=Sn.errored,e==null||e(us.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=y,e&&e(us.SUBSCRIBED);return}}).receive("error",p=>{this.state=Sn.errored,e==null||e(us.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(us.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){return this.state===Sn.joined&&e===jh.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(e,n,r)}async httpSend(e,n,r={}){var i;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 s={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,s,(i=r.timeout)!==null&&i!==void 0?i:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
515try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(e,n={}){var r,i;if(!this._canPush()&&e.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:s}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:s,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=c.body)===null||i===void 0?void 0:i.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var s,a,l;const c=this._push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(s=this.params)===null||s===void 0?void 0:s.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),c.receive("ok",()=>o("ok")),c.receive("error",()=>o("error")),c.receive("timeout",()=>o("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Sn.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Zi.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(i=>{r=new r1(this,Zi.leave,{},e),r.receive("ok",()=>{n(),i("ok")}).receive("timeout",()=>{n(),i("timed out")}).receive("error",()=>{i("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Sn.closed,this.bindings={}}async _fetchWithTimeout(e,n,r){const i=new AbortController,o=setTimeout(()=>i.abort(),r),s=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(o),s}_push(e,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new r1(this,e,n,r);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>eZ){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(e,n,r){return n}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,n,r){var i,o;const s=e.toLocaleLowerCase(),{close:a,error:l,leave:c,join:d}=Zi;if(r&&[a,l,c,d].indexOf(s)>=0&&r!==this._joinRef())return;let h=this._onMessage(s,n,r);if(n&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(p=>{var g,m,v;return((g=p.filter)===null||g===void 0?void 0:g.event)==="*"||((v=(m=p.filter)===null||m===void 0?void 0:m.event)===null||v===void 0?void 0:v.toLocaleLowerCase())===s}).map(p=>p.callback(h,r)):(o=this.bindings[s])===null||o===void 0||o.filter(p=>{var g,m,v,y,b,x;if(["broadcast","presence","postgres_changes"].includes(s))if("id"in p){const S=p.id,w=(g=p.filter)===null||g===void 0?void 0:g.event;return S&&((m=n.ids)===null||m===void 0?void 0:m.includes(S))&&(w==="*"||(w==null?void 0:w.toLocaleLowerCase())===((v=n.data)===null||v===void 0?void 0:v.type.toLocaleLowerCase()))}else{const S=(b=(y=p==null?void 0:p.filter)===null||y===void 0?void 0:y.event)===null||b===void 0?void 0:b.toLocaleLowerCase();return S==="*"||S===((x=n==null?void 0:n.event)===null||x===void 0?void 0:x.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===s}).map(p=>{if(typeof h=="object"&&"ids"in h){const g=h.data,{schema:m,table:v,commit_timestamp:y,type:b,errors:x}=g;h=Object.assign(Object.assign({},{schema:m,table:v,commit_timestamp:y,eventType:b,new:{},old:{},errors:x}),this._getPayloadRecords(g))}p.callback(h,r)})}_isClosed(){return this.state===Sn.closed}_isJoined(){return this.state===Sn.joined}_isJoining(){return this.state===Sn.joining}_isLeaving(){return this.state===Sn.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,n,r){const i=e.toLocaleLowerCase(),o={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(o):this.bindings[i]=[o],this}_off(e,n){const r=e.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(i=>{var o;return!(((o=i.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===r&&Au.isEqual(i.filter,n))})),this}static isEqual(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}static isFilterValueEqual(e,n){return(e??void 0)===(n??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Zi.close,{},e)}_onError(e){this._on(Zi.error,{},n=>e(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Sn.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=d2(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=d2(e.columns,e.old_record)),n}}const i1=()=>{},yg={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},lZ=[1e3,2e3,5e3,1e4],cZ=1e4,uZ=` 516 addEventListener("message", (e) => { 517 if (e.data.event === "start") { 518 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 519 } 520 });`;class dZ{constructor(e,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Uk,this.transport=null,this.heartbeatIntervalMs=yg.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=i1,this.ref=0,this.reconnectTimer=null,this.vsn=u2,this.logger=i1,this.conn=null,this.sendBuffer=[],this.serializer
520=new tZ,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${e}/${Vk.websocket}`,this.httpEndpoint=fB(e),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=JQ.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const n=e.message;throw n.includes("Node.js")?new Error(`${n} 521 522To use Realtime in Node.js, you need to provide a WebSocket implementation: 523 524Option 1: Use Node.js 22+ which has native WebSocket support 525Option 2: Install and provide the "ws" package: 526 527 npm install ws 528 529 import ws from "ws" 530 const client = new RealtimeClient(url, { 531 ...options, 532 transport: ws 533 })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(e,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(e?this.conn.close(e,n??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const e=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,n,r){this.logger(e,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case la.connecting:return $l.Connecting;case la.open:return $l.Open;case la.closing:return $l.Closing;default:return $l.Closed}}isConnected(){return this.connectionState()===$l.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e,n={config:{}}){const r=`realtime:${e}`,i=this.getChannels().find(o=>o.topic===r);if(i)return i;{const o=new Au(`realtime:${e}`,n,this);return this.channels.push(o),o}}push(e){const{topic:n,event:r,payload:i,ref:o}=e,s=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${o})`,i),this.isConnected()?s():this.sendBuffer.push(s)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var e;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,(e=this.conn)===null||e===void 0||e.close(ZQ,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},yg.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(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>
5330&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let n=this.channels.find(r=>r.topic===e&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${e}"`),n.unsubscribe())}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,n=>{if(n.topic==="phoenix"&&n.event==="phx_reply"&&n.ref&&n.ref===this.pendingHeartbeatRef){const c=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error",c)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:r,event:i,payload:o,ref:s}=n,a=s?`(${s})`:"",l=o.status||"";this.log("receive",`${l} ${r} ${i} ${a}`.trim(),o),this.channels.filter(c=>c._isMember(r)).forEach(c=>c._trigger(i,o,s)),this._triggerStateCallbacks("message",n)})}_clearTimer(e){var n;e==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e==="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=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e),this.conn.readyState===la.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===la.open||this.conn.readyState===la.connecting)try{this.conn.close()}catch(e){this.log("error","Error closing connection",e)}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(e=>e.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 e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),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(e){var n;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e);try{this.heartbeatCallback("error")}catch(n){this.log("error","error in heartbeat callback",n)}}_triggerChanError(){this.channels.forEach(e=>e._trigger(Zi.error))}_appendParams(e,n){if(Object.keys(n).length===0)return e;const r=e.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${e}${r}${i}`}_workerObjectUrl(e){let n;if(e)n=e;else{const r=new Blob([uZ],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(e,n=!1){this._connectionState=e,e==="connecting"?this._wasManualDisconnect=!1:e==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(e=null){let n,r=!1;if(e)n=e,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEac
533h(i=>{const o={access_token:n,version:XQ};n&&i.updateJoinPayload(o),i.joinedOnce&&i._isJoined()&&i._push(Zi.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${e}`,n)})}_triggerStateCallbacks(e,n){try{this.stateChangeCallbacks[e].forEach(r=>{try{r(n)}catch(i){this.log("error",`error in ${e} callback`,i)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new uB(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},yg.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var n,r,i,o,s,a,l,c,d,f,h,p;switch(this.transport=(n=e==null?void 0:e.transport)!==null&&n!==void 0?n:null,this.timeout=(r=e==null?void 0:e.timeout)!==null&&r!==void 0?r:Uk,this.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:yg.HEARTBEAT_INTERVAL,this.worker=(o=e==null?void 0:e.worker)!==null&&o!==void 0?o:!1,this.accessToken=(s=e==null?void 0:e.accessToken)!==null&&s!==void 0?s:null,this.heartbeatCallback=(a=e==null?void 0:e.heartbeatCallback)!==null&&a!==void 0?a:i1,this.vsn=(l=e==null?void 0:e.vsn)!==null&&l!==void 0?l:u2,e!=null&&e.params&&(this.params=e.params),e!=null&&e.logger&&(this.logger=e.logger),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=e==null?void 0:e.reconnectAfterMs)!==null&&c!==void 0?c:g=>lZ[g-1]||cZ,this.vsn){case QQ:this.encode=(d=e==null?void 0:e.encode)!==null&&d!==void 0?d:(g,m)=>m(JSON.stringify(g)),this.decode=(f=e==null?void 0:e.decode)!==null&&f!==void 0?f:(g,m)=>m(JSON.parse(g));break;case cB:this.encode=(h=e==null?void 0:e.encode)!==null&&h!==void 0?h:this.serializer.encode.bind(this.serializer),this.decode=(p=e==null?void 0:e.decode)!==null&&p!==void 0?p: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=e==null?void 0:e.workerUrl}}}var xp=class extends Error{constructor(t,e){var n;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((n=e.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function fZ(t,e,n){const r=new URL(e,t);if(n)for(const[i,o]of Object.entries(n))o!==void 0&&r.searchParams.set(i,o);return r.toString()}async function hZ(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function pZ(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:o,headers:s}){const a=fZ(t.baseUrl,r,i),l=await hZ(t.auth),c=await e(a,{method:n,headers:{...o?{"Content-Type":"application/json"}:{},...l,...s},body:o?JSON.stringify(o):void 0}),d=await c.text(),f=(c.headers.get("content-type")||"").includes("application/json"),h=f&&d?JSON.parse(d):d;if(!c.ok){const p=f?h:void 0,g=p==null?void 0:p.error;throw new xp((g==null?void 0:g.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:p})}return{status:c.status,headers:c.headers,data:h}}}}function bg(t){return t.join("�")}var mZ=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:bg(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(t,e){const n={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}
533/namespaces/${bg(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${bg(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${bg(t.namespace)}`}),!0}catch(e){if(e instanceof xp&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(n){if(n instanceof xp&&n.status===409)return;throw n}}};function Jc(t){return t.join("�")}var gZ=class{constructor(t,e="",n){this.client=t,this.prefix=e,this.accessDelegation=n}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Jc(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Jc(t.namespace)}/tables`,body:e,headers:n})).data.metadata}async updateTable(t,e){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Jc(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Jc(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Jc(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Jc(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(n){if(n instanceof xp&&n.status===404)return!1;throw n}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(n){if(n instanceof xp&&n.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw n}}},vZ=class{constructor(t){var r;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const n=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=pZ({baseUrl:n,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(r=t.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new mZ(this.client,e),this.tableOps=new gZ(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}},Bx=class extends Error{constructor(t,e="storage",n,r){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function zx(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var xg=class extends Bx{constructor(t,e,n,r="storage"){super(t,r,e,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},hB=class extends Bx{constructor(t,e,n="storage"){super(t,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};const yZ=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),bZ=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);
533return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Hk=t=>{if(Array.isArray(t))return t.map(n=>Hk(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const i=n.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));e[i]=Hk(r)}),e},xZ=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t);function wp(t){"@babel/helpers - typeof";return wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wp(t)}function wZ(t,e){if(wp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(wp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function SZ(t){var e=wZ(t,"string");return wp(e)=="symbol"?e:e+""}function kZ(t,e,n){return(e=SZ(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _e(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?p2(Object(n),!0).forEach(function(r){kZ(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p2(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const m2=t=>{var e;return t.msg||t.message||t.error_description||(typeof t.error=="string"?t.error:(e=t.error)===null||e===void 0?void 0:e.message)||JSON.stringify(t)},EZ=async(t,e,n,r)=>{if(t&&typeof t=="object"&&"status"in t&&"ok"in t&&typeof t.status=="number"&&!(n!=null&&n.noResolveJson)){const i=t,o=i.status||500;if(typeof i.json=="function")i.json().then(s=>{const a=(s==null?void 0:s.statusCode)||(s==null?void 0:s.code)||o+"";e(new xg(m2(s),o,a,r))}).catch(()=>{if(r==="vectors"){const s=o+"";e(new xg(i.statusText||`HTTP ${o} error`,o,s,r))}else{const s=o+"";e(new xg(i.statusText||`HTTP ${o} error`,o,s,r))}});else{const s=o+"";e(new xg(i.statusText||`HTTP ${o} error`,o,s,r))}}else e(new hB(m2(t),t,r))},jZ=(t,e,n,r)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||t==="HEAD"||!r?_e(_e({},i),n):(bZ(r)?(i.headers=_e({"Content-Type":"application/json"},e==null?void 0:e.headers),i.body=JSON.stringify(r)):i.body=r,e!=null&&e.duplex&&(i.duplex=e.duplex),_e(_e({},i),n))};async function Mf(t,e,n,r,i,o,s){return new Promise((a,l)=>{t(n,jZ(e,r,i,o)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(s==="vectors"){const d=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!d||!d.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>EZ(c,l,r,s))})}function pB(t="storage"){return{get:async(e,n,r,i)=>Mf(e,"GET",n,r,i,void 0,t),post:async(e,n,r,i,o)=>Mf(e,"POST",n,i,o,r,t),put:async(e,n,r,i,o)=>Mf(e,"PUT",n,i,o,r,t),head:async(e,n,r,i)=>Mf(e,"HEAD",n,_e(_e({},r),{},{noResolveJson:!0}),i,void 0,t),remove:async(e,n,r,i,o)=>Mf(e,"DELETE",n,i,o,r,t)}}const TZ=pB("storage"),{get:Sp,post:Ji,put:Kk,head:_Z,remove:q_}=TZ,Qr=pB("vectors");var lf=class{constructor(t,e={},n,r="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=e,this.fetch=yZ(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=_e(_e({},this.headers),{},{[t]:e}),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(zx(n))return{data:null,error:n};throw n}}},AZ=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(zx(e))return{data:null,error:e};throw e}}};let mB;mB=Symbol.toStringTag;var NZ=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[mB]="BlobDownloadBuilder",this.promise=null}asStream(){return new AZ(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(zx(e))return{data:null,error:e};throw e}}};const CZ={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},g2={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var OZ=class extends lf{constructor(t,e={},n,r){super(t,e,r,"storage"),this.bucketId=n}async uploadOrUpdate(t,e,n,r){var i=this;return i.handleOperation(async()=>{let o;const s=_e(_e({},g2),r);let a=_e(_e({},i.headers),t==="POST"&&{"x-upsert":String(s.upsert)});const l=s.metadata;typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",s.cacheControl),l&&o.append("metadata",i.encodeMetadata(l)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.has("cacheControl")||o.append("cacheControl",s.cacheControl),l&&!o.has("metadata")&&o.append("metadata",i.encodeMetadata(l))):(o=n,a["cache-control"]=`max-age=${s.cacheControl}`,a["content-type"]=s.contentType,l&&(a["x-metadata"]=i.toBase64(i.encodeMetadata(l))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!s.duplex&&(s.duplex="half")),r!=null&&r.headers&&(a=_e(_e({},a),r.headers));const c=i._removeEmptyFolders(e),d=i._getFinalPath(c),f=await(t=="PUT"?Kk:Ji)(i.fetch,`${i.url}/object/${d}`,o,_e({headers:a},s!=null&&s.duplex?{duplex:s.duplex}:{}));return{path:c,id:f.Id,fullPath:f.Key}})}async upload(t,e,n){return this.uploadOrUpdate("POST",t,e,n)}async uploadToSignedUrl(t,e,n,r){var i=this;const o=i._removeEmptyFolders(t),s=i._getFinalPath(o),a=new URL(i.url+`/object/upload/sign/${s}`);return a.searchParams.set("token",e),i.handleOperation(async()=>{let l;const c=_e({upsert:g2.upsert},r),d=_e(_e({},i.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",c.cacheControl)):(l=n,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType),{path:o,fullPath:(await Kk(i.fetch,a.toString(),l,{headers:d})).Key}})}async createSignedUploadUrl(t,e){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(t);const i=_e({},n.headers);e!=null&&e.upsert&&(i["x-upsert"]="true");const o=await Ji(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),s=new URL(n.url+o.url),a=s.searchParams.get("token");if(!a)throw new Bx("No token returned by API");return{signedUrl:s.toString(),path:t,token:a}})}async update(t,e,n){return this.uploadOrUpdate("PUT",t,e,n)}async move(t,e,n){var r=this;return r.handleOperation(async()=>await Ji(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(t,e,n){var r=this;return r.handleOperation(async()=>({path:(await Ji(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(t,e,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(t),o=await Ji(r.fetch,`${r.url}/object/sign/${i}
533`,_e({expiresIn:e},n!=null&&n.transform?{transform:n.transform}:{}),{headers:r.headers});const s=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{signedUrl:encodeURI(`${r.url}${o.signedURL}${s}`)}})}async createSignedUrls(t,e,n){var r=this;return r.handleOperation(async()=>{const i=await Ji(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:e,paths:t},{headers:r.headers}),o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return i.map(s=>_e(_e({},s),{},{signedUrl:s.signedURL?encodeURI(`${r.url}${s.signedURL}${o}`):null}))})}download(t,e,n){const r=typeof(e==null?void 0:e.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((e==null?void 0:e.transform)||{}),o=i?`?${i}`:"",s=this._getFinalPath(t),a=()=>Sp(this.fetch,`${this.url}/${r}/${s}${o}`,{headers:this.headers,noResolveJson:!0},n);return new NZ(a,this.shouldThrowOnError)}async info(t){var e=this;const n=e._getFinalPath(t);return e.handleOperation(async()=>Hk(await Sp(e.fetch,`${e.url}/object/info/${n}`,{headers:e.headers})))}async exists(t){var e=this;const n=e._getFinalPath(t);try{return await _Z(e.fetch,`${e.url}/object/${n}`,{headers:e.headers}),{data:!0,error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(zx(r)&&r instanceof hB){const i=r.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:r}}throw r}}getPublicUrl(t,e){const n=this._getFinalPath(t),r=[],i=e!=null&&e.download?`download=${e.download===!0?"":e.download}`:"";i!==""&&r.push(i);const o=typeof(e==null?void 0:e.transform)<"u"?"render/image":"object",s=this.transformOptsToQueryString((e==null?void 0:e.transform)||{});s!==""&&r.push(s);let a=r.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${a}`)}}}async remove(t){var e=this;return e.handleOperation(async()=>await q_(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,n){var r=this;return r.handleOperation(async()=>{const i=_e(_e(_e({},CZ),e),{},{prefix:t||""});return await Ji(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(t,e){var n=this;return n.handleOperation(async()=>{const r=_e({},t);return await Ji(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const e=[];return t.width&&e.push(`width=${t.width}`),t.height&&e.push(`height=${t.height}`),t.resize&&e.push(`resize=${t.resize}`),t.format&&e.push(`format=${t.format}`),t.quality&&e.push(`quality=${t.quality}`),e.join("&")}};const PZ="2.98.0",Pm={"X-Client-Info":`storage-js/${PZ}`};var MZ=class extends lf{constructor(t,e={},n,r){const i=new URL(t);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const o=i.href.replace(/\/$/,""),s=_e(_e({},Pm),e);super(o,s,n,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=e.listBucketOptionsToQueryString(t);return await Sp(e.fetch,`${e.url}/bucket${n}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Sp(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var n=this;return n.handleOperation(async()=>await Ji(n.fetch,`${n.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async updateBucket(t,e){var n=this;return n.handleOperation(async()=>await Kk(n.fetch,`${n.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await Ji(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await q_(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},RZ=class extends lf{constructor(t,e={},n){const r=t.replace(/\/$/,""),i=_e(_e({},Pm),e);super(r,i,n,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Ji(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&n.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&n.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&n.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&n.set("sortOrder",t.sortOrder),t!=null&&t.search&&n.set("search",t.search);const r=n.toString(),i=r?`${e.url}/bucket?${r}`:`${e.url}/bucket`;return await Sp(e.fetch,i,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await q_(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!xZ(t))throw new Bx("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 vZ({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}
533),r=this.shouldThrowOnError;return new Proxy(n,{get(i,o){const s=i[o];return typeof s!="function"?s:async(...a)=>{try{return{data:await s.apply(i,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},IZ=class extends lf{constructor(t,e={},n){const r=t.replace(/\/$/,""),i=_e(_e({},Pm),{},{"Content-Type":"application/json"},e);super(r,i,n,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var n=this;return n.handleOperation(async()=>await Qr.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var n=this;return n.handleOperation(async()=>await Qr.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers})||{})}},DZ=class extends lf{constructor(t,e={},n){const r=t.replace(/\/$/,""),i=_e(_e({},Pm),{},{"Content-Type":"application/json"},e);super(r,i,n,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},$Z=class extends lf{constructor(t,e={},n){const r=t.replace(/\/$/,""),i=_e(_e({},Pm),{},{"Content-Type":"application/json"},e);super(r,i,n,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Qr.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},LZ=class extends $Z{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new BZ(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,n=this;return e().call(n,t)}async getBucket(t){var e=()=>super.getBucket,n=this;return e().call(n,t)}async listBuckets(t={}){var e=()=>super.listBuckets,n=this;return e().call(n,t)}async deleteBucket(t){var e=()=>super.deleteBucket,n=this;return e().call(n,t)}},BZ=class extends IZ{constructor(t,e,n,r){super(t,e,r),this.vectorBucketName=n}async createIndex(t){var e=()=>super.createIndex,n=this;return e().call(n,_e(_e({},t),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,n=this;return e().call(n,_e(_e({},t),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,n=this;return e().call(n,n.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,n=this;return e().call(n,n.vectorBucketName,t)}index(t){return new zZ(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},zZ=class extends DZ{constructor(t,e,n,r,i){super(t,e,i),this.vectorBucketName=n,this.indexName=r}async putVectors(t){var e=()=>super.putVectors,n=this;return e().call(n,_e(_e({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(t){var e=()=>super.getVectors,n=this;return e().call(n,_e(_e({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,n=this;return e().call(n,_e(_e({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,n=this;return e().call(n,_e(_e({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,n=this;return e().call(n,_e(_e({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},FZ=class extends MZ{constructor(t,e={},n,r){super(t,e,n,r)}from(t){return new OZ(this.url,this.headers,t,this.fetch)}get vectors(){return new LZ(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new RZ(this.url+"/iceberg",this.headers,this.fetch)}};const gB="2.98.0",cu=30*1e3,Gk=3,o1=Gk*cu,qZ="http://localhost:9999",UZ="supabase.auth.token",VZ={"X-Client-Info":`gotrue-js/${gB}`},Jk="X-Supabase-Api-Version",vB={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},WZ=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,HZ=10*60*1e3;
533class kp extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function Se(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class KZ extends kp{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function GZ(t){return Se(t)&&t.name==="AuthApiError"}class Ll extends kp{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class Hs extends kp{constructor(e,n,r,i){super(e,r,i),this.name=n,this.status=r}}class Hr extends Hs{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function s1(t){return Se(t)&&t.name==="AuthSessionMissingError"}class Yc extends Hs{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class wg extends Hs{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Sg extends Hs{constructor(e,n=null){super(e,"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 JZ(t){return Se(t)&&t.name==="AuthImplicitGrantRedirectError"}class v2 extends Hs{constructor(e,n=null){super(e,"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 YZ extends Hs{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 Yk extends Hs{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function a1(t){return Se(t)&&t.name==="AuthRetryableFetchError"}class y2 extends Hs{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class Xk extends Hs{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const cy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),b2=` 534\r=`.split(""),XZ=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<b2.length;e+=1)t[b2[e].charCodeAt(0)]=-2;for(let e=0;e<cy.length;e+=1)t[cy[e].charCodeAt(0)]=e;return t})();function x2(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(cy[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(cy[r]),e.queuedBits-=6}}function yB(t,e,n){const r=XZ[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function w2(t){const e=[],n=s=>{e.push(String.fromCodePoint(s))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},o=s=>{eee(s,r,n)};for(let s=0;s<t.length;s+=1)yB(t.charCodeAt(s),i,o);return e.join("")}function QZ(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function ZZ(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const i=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}QZ(r,e)}}function eee(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function Vu(t){const e=[],n={queue:0,queuedBits:0},r=i=>{e.push(i)};for(let i=0;i<t.length;i+=1)yB(t.charCodeAt(i),n,r);return new Uint8Array(e)}function tee(t){const e=[];return ZZ(t,n=>e.push(n)),new Uint8Array(e)}function Vl(t){const e=[],n={queue:0,queuedBits:0},r=i=>{e.push(i)};return t.forEach(i=>
534x2(i,n,r)),x2(null,n,r),e.join("")}function nee(t){return Math.round(Date.now()/1e3)+t}function ree(){return Symbol("auth-callback")}const zn=()=>typeof window<"u"&&typeof document<"u",El={tested:!1,writable:!1},bB=()=>{if(!zn())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(El.tested)return El.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),El.tested=!0,El.writable=!0}catch{El.tested=!0,El.writable=!1}return El.writable};function iee(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,o)=>{e[o]=i})}catch{}return n.searchParams.forEach((r,i)=>{e[i]=r}),e}const xB=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),oee=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",uu=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},jl=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Bn=async(t,e)=>{await t.removeItem(e)};class Fx{constructor(){this.promise=new Fx.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}Fx.promiseConstructor=Promise;function kg(t){const e=t.split(".");if(e.length!==3)throw new Xk("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!WZ.test(e[r]))throw new Xk("JWT not in base64url format");return{header:JSON.parse(w2(e[0])),payload:JSON.parse(w2(e[1])),signature:Vu(e[2]),raw:{header:e[0],payload:e[1]}}}async function see(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function aee(t,e){return new Promise((r,i)=>{(async()=>{for(let o=0;o<1/0;o++)try{const s=await t(o);if(!e(o,null,s)){r(s);return}}catch(s){if(!e(o,s)){i(s);return}}})()})}function lee(t){return("0"+t.toString(16)).substr(-2)}function cee(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let o=0;o<56;o++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(e),Array.from(e,lee).join("")}async function uee(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(o=>String.fromCharCode(o)).join("")}async function dee(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const n=await uee(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Xc(t,e,n=!1){const r=cee();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await uu(t,`${e}-code-verifier`,i);const o=await dee(r);return[o,r===o?"plain":"s256"]}const fee=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function hee(t){const e=t.headers.get(Jk);if(!e||!e.match(fee))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function pee(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function mee(t){switch(t){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 gee=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Qc(t){if(!gee.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function l1(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="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:(e,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:(e,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 vee(t,e){return new Proxy(t,{get:(n,r,i)=>{if(r==="__isInsecureUserWarningProxy")return!0;
534if(typeof r=="symbol"){const o=r.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,r,i)}return!e.value&&typeof r=="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."),e.value=!0),Reflect.get(n,r,i)}})}function S2(t){return JSON.parse(JSON.stringify(t))}const Ml=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),yee=[502,503,504];async function k2(t){var e;if(!oee(t))throw new Yk(Ml(t),0);if(yee.includes(t.status))throw new Yk(Ml(t),t.status);let n;try{n=await t.json()}catch(o){throw new Ll(Ml(o),o)}let r;const i=hee(t);if(i&&i.getTime()>=vB["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new y2(Ml(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new Hr}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,s)=>o&&typeof s=="string",!0))throw new y2(Ml(n),t.status,n.weak_password.reasons);throw new KZ(Ml(n),t.status||500,r)}const bee=(t,e,n,r)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function Ne(t,e,n,r){var i;const o=Object.assign({},r==null?void 0:r.headers);o[Jk]||(o[Jk]=vB["2024-01-01"].name),r!=null&&r.jwt&&(o.Authorization=`Bearer ${r.jwt}`);const s=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(s.redirect_to=r.redirectTo);const a=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=await xee(t,e,n+a,{headers:o,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function xee(t,e,n,r,i,o){const s=bee(e,r,i,o);let a;try{a=await t(n,Object.assign({},s))}catch(l){throw console.error(l),new Yk(Ml(l),0)}if(a.ok||await k2(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await k2(l)}}function Wi(t){var e;let n=null;kee(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=nee(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:n,user:r},error:null}}function E2(t){const e=Wi(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function va(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function wee(t){return{data:t,error:null}}function See(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:i,verification_type:o}=t,s=af(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:n,hashed_token:r,redirect_to:i,verification_type:o},l=Object.assign({},s);return{data:{properties:a,user:l},error:null}}function j2(t){return t}function kee(t){return t.access_token&&t.refresh_token&&t.expires_in}const c1=["global","local","others"];class Eee{constructor({url:e="",headers:n={},fetch:r}){this.url=e,this.headers=n,this.fetch=xB(r),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(e,n=c1[0]){if(c1.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${c1.join(", ")}`);try{return await Ne(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Se(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await Ne(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:va})}catch(r){if(Se(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=af(e,["options"]),i=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(i.new_email=r==null?void 0:r.newEmail,delete i.newEmail),await Ne(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:See,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(Se(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await Ne(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:va})}catch(n){if(Se(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,i,o,s,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await Ne(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(o=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:""},xform:j2});if(d.error)throw d.error;const f=await d.json(),h=(s=d.headers.get("x-total-count"))!==null&&s!==void 0?s:0,p=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>
5340&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(g.split(";")[1].split("=")[1]);c[`${v}Page`]=m}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(Se(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){Qc(e);try{return await Ne(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:va})}catch(n){if(Se(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){Qc(e);try{return await Ne(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:va})}catch(r){if(Se(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){Qc(e);try{return await Ne(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:va})}catch(r){if(Se(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){Qc(e.userId);try{const{data:n,error:r}=await Ne(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(Se(n))return{data:null,error:n};throw n}}async _deleteFactor(e){Qc(e.userId),Qc(e.id);try{return{data:await Ne(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(Se(n))return{data:null,error:n};throw n}}async _listOAuthClients(e){var n,r,i,o,s,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await Ne(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(o=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:""},xform:j2});if(d.error)throw d.error;const f=await d.json(),h=(s=d.headers.get("x-total-count"))!==null&&s!==void 0?s:0,p=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(g.split(";")[1].split("=")[1]);c[`${v}Page`]=m}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(Se(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(e){try{return await Ne(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Se(n))return{data:null,error:n};throw n}}async _getOAuthClient(e){try{return await Ne(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Se(n))return{data:null,error:n};throw n}}async _updateOAuthClient(e,n){try{return await Ne(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Se(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(e){try{return await Ne(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Se(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(e){try{return await Ne(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Se(n))return{data:null,error:n};throw n}}}function T2(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}const es={debug:!!(globalThis&&bB()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class wB extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class jee extends wB{}async function Tee(t,e,n){es.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const r=new globalThis.AbortController;e>0&&setTimeout(()=>{r.abort(),es.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal}
534,async i=>{if(i){es.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await n()}finally{es.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw es.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new jee(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(es.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(i){if((i==null?void 0:i.name)==="AbortError"&&e>0)return es.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}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(t,{mode:"exclusive",steal:!0},async o=>{if(o){es.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,o.name);try{return await n()}finally{es.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw i}}function _ee(){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 SB(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function Aee(t){return parseInt(t,16)}function Nee(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}function Cee(t){var e;const{chainId:n,domain:r,expirationTime:i,issuedAt:o=new Date,nonce:s,notBefore:a,requestId:l,resources:c,scheme:d,uri:f,version:h}=t;{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(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(s&&s.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${s}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 535`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const p=SB(t.address),g=d?`${d}://${r}`:r,m=t.statement?`${t.statement} 536`:"",v=`${g} wants you to sign in with your Ethereum account: 537${p} 538 539${m}`;let y=`URI: ${f} 540Version: ${h} 541Chain ID: ${n}${s?` 542Nonce: ${s}`:""} 543Issued At: ${o.toISOString()}`;if(i&&(y+=` 544Expiration Time: ${i.toISOString()}`),a&&(y+=` 545Not Before: ${a.toISOString()}`),l&&(y+=` 546Request ID: ${l}`),c){let b=` 547Resources:`;for(const x of c){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);b+=` 548- ${x}`}y+=b}return`${v} 549${y}`}class dn extends Error{constructor({message:e,code:n,cause:r,name:i}){var o;super(e,{cause:r}),this.__isWebAuthnError=!0,this.name=(o=i??(r instanceof Error?r.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.co
549de=n}}class uy extends dn{constructor(e,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:e}),this.name="WebAuthnUnknownError",this.originalError=n}}function Oee({error:t,options:e}){var n,r,i;const{publicKey:o}=e;if(!o)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new dn({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((n=o.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new dn({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((r=o.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new dn({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((i=o.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new dn({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new dn({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new dn({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return o.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new dn({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new dn({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const s=window.location.hostname;if(kB(s)){if(o.rp.id!==s)return new dn({message:`The RP ID "${o.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new dn({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new dn({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new dn({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new dn({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function Pee({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new dn({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new dn({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const r=window.location.hostname;if(kB(r)){if(n.rpId!==r)return new dn({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new dn({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new dn({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new dn({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class Mee{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}
549const Ree=new Mee;function Iee(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:n,excludeCredentials:r}=t,i=af(t,["challenge","user","excludeCredentials"]),o=Vu(e).buffer,s=Object.assign(Object.assign({},n),{id:Vu(n.id).buffer}),a=Object.assign(Object.assign({},i),{challenge:o,user:s});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Vu(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function Dee(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:n}=t,r=af(t,["challenge","allowCredentials"]),i=Vu(e).buffer,o=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){o.allowCredentials=new Array(n.length);for(let s=0;s<n.length;s++){const a=n[s];o.allowCredentials[s]=Object.assign(Object.assign({},a),{id:Vu(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function $ee(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t;return{id:t.id,rawId:t.id,response:{attestationObject:Vl(new Uint8Array(t.response.attestationObject)),clientDataJSON:Vl(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Lee(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t,r=t.getClientExtensionResults(),i=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Vl(new Uint8Array(i.authenticatorData)),clientDataJSON:Vl(new Uint8Array(i.clientDataJSON)),signature:Vl(new Uint8Array(i.signature)),userHandle:i.userHandle?Vl(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function kB(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function _2(){var t,e;return!!(zn()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function Bee(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new uy("Browser returned unexpected credential type",e)}:{data:null,error:new uy("Empty credential response",e)}}catch(e){return{data:null,error:Oee({error:e,options:t})}}}async function zee(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new uy("Browser returned unexpected credential type",e)}:{data:null,error:new uy("Empty credential response",e)}}catch(e){return{data:null,error:Pee({error:e,options:t})}}}const Fee={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},qee={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function dy(...t){const e=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),n=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),r={};for(const i of t)if(i)for(const o in i){const s=i[o];if(s!==void 0)if(Array.isArray(s))r[o]=s;else if(n(s))r[o]=s;else if(e(s)){const a=r[o];e(a)?r[o]=dy(a,s):r[o]=dy(s)}else r[o]=s}return r}function Uee(t,e){return dy(Fee,t,e||{})}function Vee(t,e){return dy(qee,t,e||{})}class Wee{constructor(e){this.client=e,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(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:n,friendlyName:r,signal:i},o){var s;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:n});if(!a)return{data:null,error:l};const c=i??Ree.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:d}=a.webauthn.credential_options.publicKey;if(!d.name){const f=r;if(f)d.name=`${d.id}:${f}`;else{const p=(await this.client.getUser()).data.user,g=((s=p==null?void 0:p.user_metadata)===null||s===void 0?void 0:s.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";d.name=`${d.id}:${g}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=Uee(a.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:f,error:h}=await Bee({publicKey:d,signal:c});return f?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:f}},error:null}:{data:null,error:h}}case"request":{const d=Vee(a.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:f,error:h}=await zee(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:c}));return f?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:f}},error:null}:{data:null,error:h}}}}catch(a){return Se(a)?{data:null,error:a}:{data:null,error:new Ll("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:e,webauthn:r})}async _authenticate({factorId:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},o){if(!n)return{data:null,error:new kp("rpId is required for WebAuthn authentication")};try{if(!_2())return{data:null,error:new Ll("Browser does not support WebAuthn",null)};const{data:s,error:a}=await this.challenge({factorId:e,webauthn:{rpId:n,rpOrigins:r},signal:i},{request:o});if(!s)return{data:null,error:a};const{webauthn:l}=s;return this._verify({factorId:e,challengeId:s.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(s){return Se(s)?{data:null,error:s}:{data:null,error:new Ll("Unexpected error in authenticate",s)}}}async _register({friendlyName:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},o){if(!n)return{data:null,error:new kp("rpId is required for WebAuthn registration")};try{if(!_2())return{data:null,error:new Ll("Browser does not support WebAuthn",null)};const{data:s,error:a}=await this._enroll({friendlyName:e});if(!s)return await this.client.mfa.listFactors().then(d=>{var f;return(f=d.data)===null||f===void 0?void 0:f.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===e&&h.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:s.id,friendlyName:s.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:i},{create:o});return l?this._verify({factorId:s.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(s){return Se(s)?{data:null,error:s}:{data:null,error:new Ll("Unexpected error in register",s)}}}}
549_ee();const Hee={url:qZ,storageKey:UZ,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:VZ,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function A2(t,e,n){return await n()}const Zc={};class Ep{get jwks(){var e,n;return(n=(e=Zc[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){Zc[this.storageKey]=Object.assign(Object.assign({},Zc[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=Zc[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Zc[this.storageKey]=Object.assign(Object.assign({},Zc[this.storageKey]),{cachedAt:e})}constructor(e){var n,r,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},Hee),e);if(this.storageKey=o.storageKey,this.instanceID=(n=Ep.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Ep.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&zn()){const s=`${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(s),this.logDebugMessages&&console.trace(s)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new Eee({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=xB(o.fetch),this.lock=o.lock||A2,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&&zn()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=Tee:this.lock=A2,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 Wee(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:bB()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=T2(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=T2(this.memoryStorage)),zn()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async s=>{this._debug("received broadcast notification from other tab or client",s);try{await this._notifyAllSubscribers(s.data.event,s.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}o.skipAutoInitialize||this.initialize().catch(s=>{this._debug("#initialize()","error",s)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${gB}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),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 e;try{let n={},r="none";if(zn()&&(n=iee(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),zn()&&this.detectSessionInUrl&&r!=="none"){const{data:i,error:o}=await this._getSessionFromURL(n,r);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),JZ(o)){const l=(e=o.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:s,redirectType:a}=i;return this._debug("#_initialize()","detected session in URL",s,"redirect type",a),await this._saveSession(s),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return Se(n)?this._returnResult({error:n}):this._returnResult({error:new Ll("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,i;try{const o=await Ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}},xform:Wi}),{data:s,error:a}=o;if(a||!s)return this._returnResult({data:{user:null,session:null},error:a});const l=s.session,c=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(Se(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(e){var n,r,i;try{let o;if("email"in e){const{email:d,password:f,options:h}=e;let p=null,g=null;this.flowType==="pkce"&&([p,g]=await Xc(this.storage,this.storageKey)),o=await Ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:d,password:f,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:p,code_challenge_method:g},xform:Wi})}else if("phone"in e){const{phone:d,password:f,options:h}=e;o=await Ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(i=h==null?void 0:h.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Wi})}else throw new wg("You must provide either an email or phone number and a password");const{data:s,error:a}=o;if(a||!s)return await Bn(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=s.session,c=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(await Bn(this.storage,`${this.storageKey}-code-verifier`),Se(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(e){try{let n;if("email"in e){const{email:o,password:s,options:a}=e;n=await Ne(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:s,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:E2})}else if("phone"in e){const{phone:o,password:s,options:a}=e;n=await Ne(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:s,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:E2})}else throw new wg("You must provide either an email or phone number and a password");const{data:r,error:i}=n;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!r||!r.session||!r.user){const o=new Yc;return this._returnResult({data:{user:null,session:null},error:o})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(Se(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(e){var n,r,i,o;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(o=e.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,r,i,o,s,a,l,c,d,f,h;let p,g;if("message"in e)p=e.message,g=e.signature;else{const{chain:m,wallet:v,statement:y,options:b}=e;let x;if(zn())if(typeof v=="object")x=v;else{const _=window;if("ethereum"in _&&typeof _.ethereum=="object"&&"request"in _.ethereum&&typeof _.ethereum.request=="function")x=_.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=v}const S=new URL((n=b==null?void 0:b.url)!==null&&n!==void 0?n:window.location.href),w=await x.request({method:"eth_requestAccounts"}).then(_=>_).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!w||w.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=SB(w[0]);let j=(r=b==null?void 0:b.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!j){const _=await x.request({method:"eth_chainId"});j=Aee(_)}const T={domain:S.host,address:k,statement:y,uri:S.href,version:"1",chainId:j,nonce:(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(s=(o=b==null?void 0:b.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&s!==void 0?s:new Date,expirationTime:(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=b==null?void 0:b.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(d=b==null?void 0:b.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=Cee(T),g=await x.request({method:"personal_sign",params:[Nee(p),k]})}try{const{data:m,error:v}=await Ne(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:g},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Wi});if(v)throw v;if(!m||!m.session||!m.user){const y=new Yc;return this._returnResult({data:{user:null,session:null},error:y})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:v})}catch(m){if(Se(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(e){var n,r,i,o,s,a,l,c,d,f,h,p;let g,m;if("message"in e)g=e.message,m=e.signature;else{const{chain:v,wallet:y,statement:b,options:x}=e;let S;if(zn())if(typeof y=="object")S=y;
549else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))S=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=y}const w=new URL((n=x==null?void 0:x.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const k=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:w.host,uri:w.href}),b?{statement:b}:null));let j;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")j=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)j=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in j&&"signature"in j&&(typeof j.signedMessage=="string"||j.signedMessage instanceof Uint8Array)&&j.signature instanceof Uint8Array)g=typeof j.signedMessage=="string"?j.signedMessage:new TextDecoder().decode(j.signedMessage),m=j.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${w.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${w.href}`,`Issued At: ${(i=(r=x==null?void 0:x.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((s=x==null?void 0:x.signInWithSolana)===null||s===void 0)&&s.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((a=x==null?void 0:x.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((c=x==null?void 0:x.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((f=(d=x==null?void 0:x.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||f===void 0)&&f.length?["Resources",...x.signInWithSolana.resources.map(j=>`- ${j}`)]:[]].join(` 550`);const k=await S.signMessage(new TextEncoder().encode(g),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=k}}try{const{data:v,error:y}=await Ne(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:Vl(m)},!((h=e.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=e.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Wi});if(y)throw y;if(!v||!v.session||!v.user){const b=new Yc;return this._returnResult({data:{user:null,session:null},error:b})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:y})}catch(v){if(Se(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async _exchangeCodeForSession(e){const n=await jl(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new YZ;const{data:o,error:s}=await Ne(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:Wi});if(await Bn(this.storage,`${this.storageKey}-code-verifier`),s)throw s;if(!o||!o.session||!o.user){const a=new Yc;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:i??null}),error:s})}catch(o){if(await Bn(this.storage,`${this.storageKey}-code-verifier`),Se(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(e){try{const{options:n,provider:r,token:i,access_token:o,nonce:s}=e,a=await Ne(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:o,nonce:s,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Wi}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const d=new Yc;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if(Se(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(e){var n,r,i,o,s;try{if("email"in e){const{email:a,options:l}=e;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await Xc(this.storage,this.storageKey));const{error:f}=await Ne(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:d}=await Ne(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(s=l==null?void 0:l.channel)!==null&&s!==void 0?s:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d})}throw new wg("You must provide either an email or phone number.")}catch(a){if(await Bn(this.storage,`${this.storageKey}-code-verifier`),Se(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var n,r;try{let i,o;"options"in e&&(i=(n=e.options)===null||n===void 0?void 0:n.redirectTo,o=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:s,error:a}=await Ne(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:o}}),redirectTo:i,xform:Wi});if(a)throw a;if(!s)throw new Error("An error occurred on token verification.");const l=s.session,c=s.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(Se(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(e){var n,r,i,o,s;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Xc(this.storage,this.storageKey));const c=await Ne(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=e==null?void 0:e.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:wee});return!((o=c.data)===null||o===void 0)&&o.url&&zn()&&!(!((s=e.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Bn(this.storage,`${this.storageKey}-code-verifier`),Se(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new Hr;const{error:i}=await Ne(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(e){if(Se(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:r,type:i,options:o}=e,{error:s}=await Ne(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,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:s})}else if("phone"in e){const{phone:r,type:i,options:o}=e,{data:s,error:a}=await Ne(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:a})}throw new wg("You must provide either an email or phone number and a type")}catch(n){if(Se(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(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const n=await jl(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not val
550id"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<o1:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const s=await jl(this.userStorage,this.storageKey+"-user");s!=null&&s.user?e.user=s.user:e.user=l1()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const s={value:this.suppressGetSessionWarning};e.user=vee(e.user,s),s.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:i,error:o}=await this._callRefreshToken(e.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(e){try{return e?await Ne(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:va}):await this._useSession(async n=>{var r,i,o;const{data:s,error:a}=n;if(a)throw a;return!(!((r=s.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Hr}:await Ne(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&o!==void 0?o:void 0,xform:va})})}catch(n){if(Se(n))return s1(n)&&(await this._removeSession(),await Bn(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async r=>{const{data:i,error:o}=r;if(o)throw o;if(!i.session)throw new Hr;const s=i.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await Xc(this.storage,this.storageKey));const{data:c,error:d}=await Ne(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:s.access_token,xform:va});if(d)throw d;return s.user=c.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),this._returnResult({data:{user:s.user},error:null})})}catch(r){if(await Bn(this.storage,`${this.storageKey}-code-verifier`),Se(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Hr;const n=Date.now()/1e3;let r=n,i=!0,o=null;const{payload:s}=kg(e.access_token);if(s.exp&&(r=s.exp,i=r<=n),i){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};o=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});o={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(n){if(Se(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:s,error:a}=n;if(a)throw a;e=(r=s.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new Hr;const{data:i,error:o}=await this._callRefreshToken(e.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(Se(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(e,n){try{if(!zn())throw new Sg("No browser detected.");
550if(e.error||e.error_description||e.error_code)throw new Sg(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new v2("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Sg("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new v2("No code detected.");const{data:b,error:x}=await this._exchangeCodeForSession(e.code);if(x)throw x;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:b.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:i,access_token:o,refresh_token:s,expires_in:a,expires_at:l,token_type:c}=e;if(!o||!a||!s||!c)throw new Sg("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(a);let h=d+f;l&&(h=parseInt(l));const p=h-d;p*1e3<=cu&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${f}s`);const g=h-f;d-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,h,d):d-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,h,d);const{data:m,error:v}=await this._getUser(o);if(v)throw v;const y={provider_token:r,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:h,refresh_token:s,token_type:c,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:e.type},error:null})}catch(r){if(Se(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const n=await jl(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:i,error:o}=n;if(o&&!s1(o))return this._returnResult({error:o});const s=(r=i.session)===null||r===void 0?void 0:r.access_token;if(s){const{error:a}=await this.admin.signOut(s,e);if(a&&!(GZ(a)&&(a.status===404||a.status===401||a.status===403)||s1(a)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await Bn(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const n=ree(),r={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async n=>{var r,i;try{const{data:{session:o},error:s}=n;if(s)throw s;await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",e,"session",o)}catch(o){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",o),console.error(o)}})}async resetPasswordForEmail(e,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await Xc(this.storage,this.storageKey,!0));try{return await Ne(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(await Bn(this.storage,`${this.storageKey}-code-verifier`),Se(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(n){if(Se(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var n;try{const{data:r,error:i}=await this._useSession(async o=>{var s,a,l,c,d;const{data:f,error:h}=o;if(h)throw h;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await Ne(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})});if(i)throw i;return zn()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:e.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(Se(r))return this._returnResult({data:{provider:e.provider,url:null},error:r});throw r}}async linkIdentityIdToken(e){return await this._useSession(async n=>{var r;try{const{error:i,data:{session:o}}=n;if(i)throw i;const{options:s,provider:a,token:l,access_token:c,nonce:d}=e,f=await Ne(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=o==null?void 0:o.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:c,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:Wi}),{data:h,error:p}=f;return p?this._returnResult({data:{user:null,session:null},error:p}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new Yc}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:p}))}catch(i){if(await Bn(this.storage,`${this.storageKey}-code-verifier`),Se(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,i;const{data:o,error:s}=n;if(s)throw s;
550return await Ne(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(Se(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await aee(async i=>(i>0&&await see(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await Ne(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Wi})),(i,o)=>{const s=200*Math.pow(2,i);return o&&a1(o)&&Date.now()+s-r<cu})}catch(r){if(this._debug(n,"error",r),Se(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),zn()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const i=await jl(this.storage,this.storageKey);if(i&&this.userStorage){let s=await jl(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!s&&(s={user:i.user},await uu(this.userStorage,this.storageKey+"-user",s)),i.user=(e=s==null?void 0:s.user)!==null&&e!==void 0?e:l1()}else if(i&&!i.user&&!i.user){const s=await jl(this.storage,this.storageKey+"-user");s&&(s!=null&&s.user)?(i.user=s.user,await Bn(this.storage,this.storageKey+"-user"),await uu(this.storage,this.storageKey,i)):i.user=l1()}if(this._debug(r,"session from storage",i),!this._isValidSession(i)){this._debug(r,"session is not valid"),i!==null&&await this._removeSession();return}const o=((n=i.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<o1;if(this._debug(r,`session has${o?"":" not"} expired with margin of ${o1}s`),o){if(this.autoRefreshToken&&i.refresh_token){const{error:s}=await this._callRefreshToken(i.refresh_token);s&&(console.error(s),a1(s)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:s,error:a}=await this._getUser(i.access_token);!a&&(s!=null&&s.user)?(i.user=s.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(s){console.error("Error getting user data:",s),this._debug(r,"error getting user data, skipping SIGNED_IN notification",s)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(r,"error",i),console.error(i);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new Hr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new Fx;const{data:o,error:s}=await this._refreshAccessToken(e);if(s)throw s;if(!o.session)throw new Hr;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={data:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(i,"error",o),Se(o)){const s={data:null,error:o};return a1(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(s),s}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(o),o}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,n,r=!0){const i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const o=[],s=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,n)}catch(l){o.push(l)}});if(await Promise.all(s),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Bn(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await uu(this.userStorage,this.storageKey+"-user",{user:n.user});const i=Object.assign({},n);delete i.user;const o=S2(i);await uu(this.storage,this.storageKey,o)}else{const i=S2(n);await uu(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Bn(this.storage,this.storageKey),await Bn(this.storage,this.storageKey+"-code-verifier"),await Bn(this.storage,this.storageKey+"-user"),this.userStorage&&await Bn(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&zn()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
550catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),cu);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);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 e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);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 e=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-e)/cu);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${cu}ms, refresh threshold is ${Gk} ticks`),i<=Gk&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof wB)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!zn()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(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(e,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[o,s]=await Xc(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(a.toString())}if(r!=null&&r.queryParams){const o=new URLSearchParams(r.queryParams);i.push(o.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:i,error:o}=n;return o?this._returnResult({data:null,error:o}):await Ne(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(Se(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,i;const{data:o,error:s}=n;if(s)return this._returnResult({data:null,error:s});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:c}=await Ne(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(e.factorType==="totp"&&l.type==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(Se(n))return this._returnResult({data:null,error:n});throw n}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:o}=n;
550if(o)return this._returnResult({data:null,error:o});const s=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?$ee(e.webauthn.credential_response):Lee(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await Ne(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:s,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(n){if(Se(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const s=await Ne(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});if(s.error)return s;const{data:a}=s;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Iee(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Dee(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(Se(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){var e;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const i={all:[],phone:[],totp:[],webauthn:[]};for(const o of(e=n==null?void 0:n.factors)!==null&&e!==void 0?e:[])i.all.push(o),o.status==="verified"&&i[o.factor_type].push(o);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(e){var n,r,i,o;if(e)try{const{payload:p}=kg(e);let g=null;p.aal&&(g=p.aal);let m=g;const{data:{user:v},error:y}=await this.getUser(e);if(y)return this._returnResult({data:null,error:y});((r=(n=v==null?void 0:v.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const x=p.amr||[];return{data:{currentLevel:g,nextLevel:m,currentAuthenticationMethods:x},error:null}}catch(p){if(Se(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:s},error:a}
550=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=kg(s.access_token);let c=null;l.aal&&(c=l.aal);let d=c;((o=(i=s.user.factors)===null||i===void 0?void 0:i.filter(p=>p.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(d="aal2");const h=l.amr||[];return{data:{currentLevel:c,nextLevel:d,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?await Ne(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Hr})})}catch(n){if(Se(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new Hr});const s=await Ne(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return s.data&&s.data.redirect_url&&zn()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(r){if(Se(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new Hr});const s=await Ne(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return s.data&&s.data.redirect_url&&zn()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(r){if(Se(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;return r?this._returnResult({data:null,error:r}):n?await Ne(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Hr})})}catch(e){if(Se(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?(await Ne(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Hr})})}catch(n){if(Se(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(a=>a.kid===e);if(r)return r;const i=Date.now();if(r=this.jwks.keys.find(a=>a.kid===e),r&&this.jwks_cached_at+HZ>i)return r;const{data:o,error:s}=await Ne(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(s)throw s;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=i,r=o.keys.find(a=>a.kid===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:p,error:g}
550=await this.getSession();if(g||!p.session)return this._returnResult({data:null,error:g});r=p.session.access_token}const{header:i,payload:o,signature:s,raw:{header:a,payload:l}}=kg(r);n!=null&&n.allowExpired||pee(o.exp);const c=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:o,header:i,signature:s},error:null}}const d=mee(i.alg),f=await crypto.subtle.importKey("jwk",c,d,!0,["verify"]);if(!await crypto.subtle.verify(d,f,s,tee(`${a}.${l}`)))throw new Xk("Invalid JWT signature");return{data:{claims:o,header:i,signature:s},error:null}}catch(r){if(Se(r))return this._returnResult({data:null,error:r});throw r}}}Ep.nextInstanceID={};const Kee=Ep,Gee="2.98.0";let oh="";typeof Deno<"u"?oh="deno":typeof document<"u"?oh="web":typeof navigator<"u"&&navigator.product==="ReactNative"?oh="react-native":oh="node";const Jee={"X-Client-Info":`supabase-js-${oh}/${Gee}`},Yee={headers:Jee},Xee={schema:"public"},Qee={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Zee={};function jp(t){"@babel/helpers - typeof";return jp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jp(t)}function ete(t,e){if(jp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(jp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function tte(t){var e=ete(t,"string");return jp(e)=="symbol"?e:e+""}function nte(t,e,n){return(e=tte(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ht(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?N2(Object(n),!0).forEach(function(r){nte(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N2(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const rte=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),ite=()=>Headers,ote=(t,e,n)=>{const r=rte(n),i=ite();return async(o,s)=>{var a;const l=(a=await e())!==null&&a!==void 0?a:t;let c=new i(s==null?void 0:s.headers);return c.has("apikey")||c.set("apikey",t),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(o,Ht(Ht({},s),{},{headers:c}))}};function ste(t){return t.endsWith("/")?t:t+"/"}function ate(t,e){var n,r;const{db:i,auth:o,realtime:s,global:a}=t,{db:l,auth:c,realtime:d,global:f}=e,h={db:Ht(Ht({},l),i),auth:Ht(Ht({},c),o),realtime:Ht(Ht({},d),s),storage:{},global:Ht(Ht(Ht({},f),a),{},{headers:Ht(Ht({},(n=f==null?void 0:f.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return t.accessToken?h.accessToken=t.accessToken:delete h.accessToken,h}function lte(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(ste(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var cte=class extends Kee{constructor(t){super(t)}},ute=class{constructor(t,e,n){var r,i;this.supabaseUrl=t,this.supabaseKey=e;const o=lte(t);if(!e)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 s=`sb-${o.hostname.split(".")[0]}
550-auth-token`,a={db:Xee,realtime:Zee,auth:Ht(Ht({},Qee),{},{storageKey:s}),global:Yee},l=ate(n??{},a);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(i=l.global.headers)!==null&&i!==void 0?i:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,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 c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=ote(e,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Ht({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new GQ(new URL("rest/v1",o).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new FZ(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new zQ(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,n)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,n;if(t.accessToken)return await t.accessToken();const{data:r}=await t.auth.getSession();return(e=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:o,flowType:s,lock:a,debug:l,throwOnError:c},d,f){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new cte({url:this.authUrl.href,headers:Ht(Ht({},h),d),storageKey:o,autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:i,flowType:s,lock:a,debug:l,throwOnError:c,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new dZ(this.realtimeUrl.href,Ht(Ht({},t),{},{params:Ht(Ht({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const dte=(t,e,n)=>new ute(t,e,n);function fte(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const n=e.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}fte()&&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 hte="https://sfczsdghntekkbjgghgg.supabase.co",pte="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNmY3pzZGdobnRla2tiamdnaGdnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzI0ODY0MzIsImV4cCI6MjA4ODA2MjQzMn0.EP9RssaTf9ONJEPFNRckm4suPJU79fiI2E_I5-mdVtE",tn=dte(hte,pte,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),mte={prensa:{label:"En los medios",color:"text-blue-700",bgColor:"bg-blue-100"},evento:{label:"Evento",color:"text-emerald-700",bgColor:"bg-emerald-100"},noticia:{label:"Noticia",color:"text-orange-700",bgColor:"bg-orange-100"},tribuna:{label:"Tribuna",color:"text-purple-700",bgColor:"bg-purple-100"}
550,resena:{label:"Reseña",color:"text-amber-700",bgColor:"bg-amber-100"}},gte=[{value:"todo",label:"Todo"},{value:"prensa",label:"En los medios"},{value:"evento",label:"Eventos"},{value:"noticia",label:"Noticias"},{value:"tribuna",label:"Tribunas"},{value:"resena",label:"Reseñas"}],vte=()=>{const[t,e]=E.useState([]),[n,r]=E.useState(!0),[i,o]=E.useState("todo");E.useEffect(()=>{document.title="Actualidad | Instituto de Smart Ageing";const l=document.querySelector('meta[name="description"]');l&&l.setAttribute("content","Noticias, eventos y apariciones en medios del Instituto de Smart Ageing sobre longevidad y smart ageing."),(async()=>{const{data:d,error:f}=await tn.from("posts").select("id, title, slug, excerpt, cover_image, created_at, category, published_at").eq("published",!0).order("published_at",{ascending:!1,nullsFirst:!1});!f&&d&&e(d),r(!1)})()},[]);const s=i==="todo"?t:t.filter(l=>l.category===i),a=l=>l?new Date(l).toLocaleDateString("es-ES",{day:"numeric",month:"long",year:"numeric"}):"";return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:"Actualidad"}),u.jsxs("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:["Nuestras noticias, eventos y"," ",u.jsx("span",{className:"text-gradient",children:"presencia en medios de comunicación"})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:"Mantente al dÃa de nuestras últimas noticias, eventos y apariciones en prensa."})]})})}),u.jsx("section",{className:"pb-16 md:pb-20 pt-12 bg-muted",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsx("div",{className:"flex flex-wrap justify-center gap-2 mb-12",children:gte.map(l=>u.jsx("button",{onClick:()=>o(l.value),className:`px-5 py-2 rounded-full text-sm font-medium transition-all duration-300 ${i===l.value?"bg-primary text-primary-foreground shadow-md":"bg-background text-muted-foreground hover:bg-accent hover:text-accent-foreground"}`,children:l.label},l.value))}),n?u.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6 lg:gap-8",children:[1,2,3].map(l=>u.jsxs("div",{className:"bg-card rounded-2xl border border-border overflow-hidden animate-pulse",children:[u.jsx("div",{className:"aspect-video bg-muted"}),u.jsxs("div",{className:"p-6 space-y-3",children:[u.jsx("div",{className:"h-4 bg-muted rounded w-1/3"}),u.jsx("div",{className:"h-6 bg-muted rounded w-full"}),u.jsx("div",{className:"h-4 bg-muted rounded w-2/3"})]})]},l))}):s.length>0?u.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6 lg:gap-8",children:s.map(l=>{const c=mte[l.category];return u.jsxs("article",{className:"group relative bg-card rounded-2xl border border-border shadow-md overflow-hidden transition-all duration-300 hover:shadow-xl hover:border-primary/30 hover:-translate-y-1 flex flex-col",children:[l.cover_image&&u.jsx("div",{className:"aspect-video overflow-hidden",children:u.jsx("img",{src:l.cover_image,alt:l.title,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"})}),u.jsxs("div",{className:"p-6 flex flex-col flex-1",children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c&&u.jsx("span",{className:`inline-flex items-center px-2.5 py-1 rounded-full text-xs font-semibold ${c.bgColor} ${c.color}`,children:c.label}),u.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[u.jsx(Ss,{className:"w-3.5 h-3.5"}),a(l.created_at)]})]}),u.jsx("h2",{className:"text-lg font-bold text-foreground mb-2 line-clamp-2 group-hover:text-primary transition-colors duration-300",children:l.title}),l.excerpt&&u.jsx("p",{className:"text-sm text-muted-foreground line-clamp-3 mb-4 flex-1",children:l.excerpt}),u.jsxs(De,{to:`/actualidad/${l.slug}`,className:"inline-flex items-center gap-2 text-sm font-semibold text-primary hover:gap-3 transition-all duration-300 mt-auto",children:["Leer más",u.jsx(st,{className:"w-4 h-4"})]})]})]},l.id)})}):u.jsx("div",{className:"text-center py-16",children:u.jsx("p",{className:"text-muted-foreground text-lg",children:"No hay contenido en esta categorÃa por el momento."})})]})})]}),u.jsx(Qt,{})]})};/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:EB,setPrototypeOf:C2,isFrozen:yte,getPrototypeOf:bte,getOwnPropertyDescriptor:xte}=Object;let{freeze:wr,seal:$i,create:Qk}=Object,{apply:Zk,construct:eE}=typeof Reflect<"u"&&Reflect;wr||(wr=function(e){return e});$i||($i=function(e){return e});Zk||(Zk=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return e.apply(n,i)});eE||(eE=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new e(...r)});const Eg=Sr(Array.prototype.forEach),wte=Sr(Array.prototype.lastIndexOf),O2=Sr(Array.prototype.pop),Rf=Sr(Array.prototype.push),Ste=Sr(Array.prototype.splice),wv=Sr(String.prototype.toLowerCase),u1=Sr(String.prototype.toString),d1=Sr(String.prototype.match),If=Sr(String.prototype.replace),kte=Sr(String.prototype.indexOf),Ete=Sr(String.prototype.trim),Hi=Sr
vendor: 4,422 bytes, line 550
550(Object.prototype.hasOwnProperty),ur=Sr(RegExp.prototype.test),Df=jte(TypeError);function Sr(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Zk(t,e,r)}}function jte(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return eE(t,n)}}function Ge(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wv;C2&&C2(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const o=n(i);o!==i&&(yte(e)||(e[r]=o),i=o)}t[i]=!0}return t}function Tte(t){for(let e=0;e<t.length;e++)Hi(t,e)||(t[e]=null);return t}function So(t){const e=Qk(null);for(const[n,r]of EB(t))Hi(t,n)&&(Array.isArray(r)?e[n]=Tte(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=So(r):e[n]=r);return e}function $f(t,e){for(;t!==null;){const r=xte(t,e);if(r){if(r.get)return Sr(r.get);if(typeof r.value=="function")return Sr(r.value)}t=bte(t)}function n(){return null}return n}const P2=wr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),f1=wr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),h1=wr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_te=wr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),p1=wr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ate=wr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M2=wr(["#text"]),R2=wr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
550spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),m1=wr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I2=wr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jg=wr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Nte=$i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Cte=$i(/<%[\w\W]*|[\w\W]*%>/gm),Ote=$i(/\$\{[\w\W]*/gm),Pte=$i(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mte=$i(/^aria-[\-\w]+$/),jB=$i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rte=$i(/^(?:\w+script|data):/i),Ite=$i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),TB=$i(/^html$/i),Dte=$i(/^[a-z][.\w]*(-[.\w]+)+$/i);var D2=Object.freeze({__proto__:null,ARIA_ATTR:Mte,ATTR_WHITESPACE:Ite,CUSTOM_ELEMENT:Dte,DATA_ATTR:Pte,DOCTYPE_NAME:TB,ERB_EXPR:Cte,IS_ALLOWED_URI:jB,IS_SCRIPT_OR_DATA:Rte,MUSTACHE_EXPR:Nte,TMPLIT_EXPR:Ote});const Lf={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$te=function(){return typeof window>"u"?null:window},Lte=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;
vendor: 4,278 bytes, line 550
550const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},$2=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _B(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$te();const e=je=>_B(je);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==Lf.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:p}=t,g=l.prototype,m=$f(g,"cloneNode"),v=$f(g,"remove"),y=$f(g,"nextSibling"),b=$f(g,"childNodes"),x=$f(g,"parentNode");if(typeof s=="function"){const je=n.createElement("template");je.content&&je.content.ownerDocument&&(n=je.content.ownerDocument)}let S,w="";const{implementation:k,createNodeIterator:j,createDocumentFragment:T,getElementsByTagName:_}=n,{importNode:N}=r;let C=$2();e.isSupported=typeof EB=="function"&&typeof x=="function"&&k&&k.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:O,ERB_EXPR:I,TMPLIT_EXPR:P,DATA_ATTR:$,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:L}=D2;let{IS_ALLOWED_URI:q}=D2,G=null;const V=Ge({},[...P2,...f1,...h1,...p1,...M2]);let Y=null;const pe=Ge({},[...R2,...m1,...I2,...jg]);let me=Object.seal(Qk(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ue=null,H=null;const de=Object.seal(Qk(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let X=!0,ce=!0,ge=!1,K=!0,Ce=!1,Ee=!0,Ve=!1,Ke=!1,lt=!1,xt=!1,vt=!1,M=!1,F=!0,U=!1;const se="user-content-";let ie=!0,Z=!1,ue={},Pe=null;const et=Ge({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $n=null;const ci=Ge({},["audio","video","img","source","image","track"]);let _r=null;const xl=Ge({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ui="http://www.w3.org/1998/Math/MathML",cr="http://www.w3.org/2000/svg",Ar="http://www.w3.org/1999/xhtml";let Yn=Ar,wl=!1,Qs=null;const Wm=Ge({},[ui,cr,Ar],u1);let Sl=Ge({},["mi","mo","mn","ms","mtext"]),Hc=Ge({},["annotation-xml"]);const Sf=Ge({},["title","style","font","a","script"]);let Nr=null;const lw=["application/xhtml+xml","text/html"],Ie="text/html";let Oe=null,it=null;const Wr=n.createElement("form"),Cr=function(D){return D instanceof RegExp||D instanceof Function},di=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(it&&it===D)){if((!D||typeof D!="object")&&(D={}),D=So(D),Nr=lw.indexOf(D.PARSER_MEDIA_TYPE)===-1?Ie:D.PARSER_MEDIA_TYPE,Oe=Nr==="application/xhtml+xml"?u1:wv,G=Hi(D,"ALLOWED_TAGS")?Ge({},D.ALLOWED_TAGS,Oe):V,Y=Hi(D,"ALLOWED_ATTR")?Ge({},D.ALLOWED_ATTR,Oe):pe,Qs=Hi(D,"ALLOWED_NAMESPACES")?Ge({},D.ALLOWED_NAMESPACES,u1):Wm,_r=Hi(D,"ADD_URI_SAFE_ATTR")?Ge(So(xl),D.ADD_URI_SAFE_ATTR,Oe):xl,$n=Hi(D,"ADD_DATA_URI_TAGS")?Ge(So(ci),D.ADD_DATA_URI_TAGS,Oe):ci,Pe=Hi(D,"FORBID_CONTENTS")?Ge({},D.FORBID_CONTENTS,Oe):et,Ue=Hi(D,"FORBID_TAGS")?Ge({},D.FORBID_TAGS,Oe):So({}),H=Hi(D,"FORBID_ATTR")?Ge({},D.FORBID_ATTR,Oe):So({}),ue=Hi(D,"USE_PROFILES")?D.USE_PROFILES:!1,X=D.ALLOW_ARIA_ATTR!==!1,ce=D.ALLOW_DATA_ATTR!==!1,ge=D.ALLOW_UNKNOWN_PROTOCOLS||!1,K=D.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ce=D.SAFE_FOR_TEMPLATES||!1,Ee=D.SAFE_FOR_XML!==!1,Ve=D.WHOLE_DOCUMENT||!1,xt=D.RETURN_DOM||!1,vt=D.RETURN_DOM_FRAGMENT||!1,M=D.RETURN_TRUSTED_TYPE||!1,lt=D.FORCE_BODY||!1,F=D.SANITIZE_DOM!==!1,U=D.SA
vendor: 8,930 bytes, lines 550-551
550NITIZE_NAMED_PROPS||!1,ie=D.KEEP_CONTENT!==!1,Z=D.IN_PLACE||!1,q=D.ALLOWED_URI_REGEXP||jB,Yn=D.NAMESPACE||Ar,Sl=D.MATHML_TEXT_INTEGRATION_POINTS||Sl,Hc=D.HTML_INTEGRATION_POINTS||Hc,me=D.CUSTOM_ELEMENT_HANDLING||{},D.CUSTOM_ELEMENT_HANDLING&&Cr(D.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(me.tagNameCheck=D.CUSTOM_ELEMENT_HANDLING.tagNameCheck),D.CUSTOM_ELEMENT_HANDLING&&Cr(D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(me.attributeNameCheck=D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),D.CUSTOM_ELEMENT_HANDLING&&typeof D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(me.allowCustomizedBuiltInElements=D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(ce=!1),vt&&(xt=!0),ue&&(G=Ge({},M2),Y=[],ue.html===!0&&(Ge(G,P2),Ge(Y,R2)),ue.svg===!0&&(Ge(G,f1),Ge(Y,m1),Ge(Y,jg)),ue.svgFilters===!0&&(Ge(G,h1),Ge(Y,m1),Ge(Y,jg)),ue.mathMl===!0&&(Ge(G,p1),Ge(Y,I2),Ge(Y,jg))),D.ADD_TAGS&&(typeof D.ADD_TAGS=="function"?de.tagCheck=D.ADD_TAGS:(G===V&&(G=So(G)),Ge(G,D.ADD_TAGS,Oe))),D.ADD_ATTR&&(typeof D.ADD_ATTR=="function"?de.attributeCheck=D.ADD_ATTR:(Y===pe&&(Y=So(Y)),Ge(Y,D.ADD_ATTR,Oe))),D.ADD_URI_SAFE_ATTR&&Ge(_r,D.ADD_URI_SAFE_ATTR,Oe),D.FORBID_CONTENTS&&(Pe===et&&(Pe=So(Pe)),Ge(Pe,D.FORBID_CONTENTS,Oe)),D.ADD_FORBID_CONTENTS&&(Pe===et&&(Pe=So(Pe)),Ge(Pe,D.ADD_FORBID_CONTENTS,Oe)),ie&&(G["#text"]=!0),Ve&&Ge(G,["html","head","body"]),G.table&&(Ge(G,["tbody"]),delete Ue.tbody),D.TRUSTED_TYPES_POLICY){if(typeof D.TRUSTED_TYPES_POLICY.createHTML!="function")throw Df('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof D.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Df('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=D.TRUSTED_TYPES_POLICY,w=S.createHTML("")}else S===void 0&&(S=Lte(p,i)),S!==null&&typeof w=="string"&&(w=S.createHTML(""));wr&&wr(D),it=D}},yo=Ge({},[...f1,...h1,..._te]),Or=Ge({},[...p1,...Ate]),bo=function(D){let ne=x(D);(!ne||!ne.tagName)&&(ne={namespaceURI:Yn,tagName:"template"});const xe=wv(D.tagName),Rt=wv(ne.tagName);return Qs[D.namespaceURI]?D.namespaceURI===cr?ne.namespaceURI===Ar?xe==="svg":ne.namespaceURI===ui?xe==="svg"&&(Rt==="annotation-xml"||Sl[Rt]):!!yo[xe]:D.namespaceURI===ui?ne.namespaceURI===Ar?xe==="math":ne.namespaceURI===cr?xe==="math"&&Hc[Rt]:!!Or[xe]:D.namespaceURI===Ar?ne.namespaceURI===cr&&!Hc[Rt]||ne.namespaceURI===ui&&!Sl[Rt]?!1:!Or[xe]&&(Sf[xe]||!yo[xe]):!!(Nr==="application/xhtml+xml"&&Qs[D.namespaceURI]):!1},xo=function(D){Rf(e.removed,{element:D});try{x(D).removeChild(D)}catch{v(D)}},kl=function(D,ne){try{Rf(e.removed,{attribute:ne.getAttributeNode(D),from:ne})}catch{Rf(e.removed,{attribute:null,from:ne})}if(ne.removeAttribute(D),D==="is")if(xt||vt)try{xo(ne)}catch{}else try{ne.setAttribute(D,"")}catch{}},VN=function(D){let ne=null,xe=null;if(lt)D="<remove></remove>"+D;else{const ln=d1(D,/^[\r\n\t ]+/);xe=ln&&ln[0]}Nr==="application/xhtml+xml"&&Yn===Ar&&(D='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+D+"</body></html>");const Rt=S?S.createHTML(D):D;if(Yn===Ar)try{ne=new h().parseFromString(Rt,Nr)}catch{}if(!ne||!ne.documentElement){ne=k.createDocument(Yn,"template",null);try{ne.documentElement.innerHTML=wl?w:Rt}catch{}}const Xn=ne.body||ne.documentElement;return D&&xe&&Xn.insertBefore(n.createTextNode(xe),Xn.childNodes[0]||null),Yn===Ar?_.call(ne,Ve?"html":"body")[0]:Ve?ne.documentElement:Xn},WN=function(D){return j.call(D.ownerDocument||D,D,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},cw=function(D){return D instanceof f&&(typeof D.nodeName!="string"||typeof D.textContent!="string"||typeof D.removeChild!="function"||!(D.attributes instanceof d)||typeof D.removeAttribute!="function"||typeof D.setAttribute!="function"||typeof D.namespaceURI!="string"||typeof D.insertBefore!="function"||typeof D.hasChildNodes!="function")},HN=function(D){return typeof a=="function"&&D instanceof a};function Xo(je,D,ne){Eg(je,xe=>{xe.call(e,D,ne,it)})}const KN=function(D){let ne=null;if(Xo(C.beforeSanitizeElements,D,null),cw(D))return xo(D),!0;const xe=Oe(D.nodeName);if(Xo(C.uponSanitizeElement,D,{tagName:xe,allowedTags:G}),Ee&&D.hasChildNodes()&&!HN(D.firstElementChild)&&ur(/<[/\w!]/g,D.innerHTML)&&ur(/<[/\w!]/g,D.textContent)||D.nodeType===Lf.progressingInstruction||Ee&&D.nodeType===Lf.comment&&ur(/<[/\w]/g,D.data))return xo(D),!0;if(!(de.tagCheck instanceof Function&&de.tagCheck(xe))&&(!G[xe]||Ue[xe])){if(!Ue[xe]&&JN(xe)&&(me.tagNameCheck instanceof RegExp&&ur(me.tagNameCheck,xe)||me.tagNameCheck instanceof Function&&me.tagNameCheck(xe)))return!1;if(ie&&!Pe[xe]){const Rt=x(D)||D.parentNode,Xn=b(D)||D.childNodes;if(Xn&&Rt){const ln=Xn.length;for(let Pr=ln-1;Pr>=0;--Pr){const Qo=m(Xn[Pr],!0);Qo.__removalCount=(D.__removalCount||0)+1,Rt.insertBefore(Qo,y(D))}}}return xo(D),!0}return D instanceof l&&!bo(D)||(xe==="noscript"||xe==="noembed"||xe==="noframes")&&ur(/<\/no(script|embed|frames)/i,D.innerHTML)?(xo(D),!0):(Ce&&D.nodeType===Lf.text&&(ne=D.textContent,Eg([O,I,P],Rt=>{ne=If(ne,Rt," ")}),D.textContent!==ne&&(Rf(e.removed,{element:D.cloneNode()}),D.textContent=ne)),Xo(C.afterSanitizeElements,D,null),!1)},GN=function(D,ne,xe){if(F&&(ne==="id"||ne==="name")&&(xe in n||xe in Wr))return!1;if(!(ce&&!H[ne]&&ur($,ne))){if(!(X&&ur(B,ne))){if(!(de.attributeCheck instanceof Function&&de.attributeCheck(ne,D))){if(!Y[ne]||H[ne]){if(!(JN(D)&&(me.tagNameCheck instanceof RegExp&&ur(me.tagNameCheck,D)||me.tagNameCheck instanceof Function&&me.tagNameCheck(D))&&(me.attributeNameCheck instanceof RegExp&&ur(me.attributeNameCheck,ne)||me.attributeNameCheck instanceof Function&&me.attributeNameCheck(ne,D))||ne==="is"&&me.allowCustomizedBuiltInElements&&(me.tagNameCheck instanceof RegExp&&ur(me.tagNameCheck,xe)||me.tagNameCheck instanceof Function&&me.tagNameCheck(xe))))return!1}else if(!_r[ne]){if(!ur(q,If(xe,R,""))){if(!((ne==="src"||ne==="xlink:href"||ne==="href")&&D!=="script"&&kte(xe,"data:")===0&&$n[D])){if(!(ge&&!ur(z,If(xe,R,"")))){if(xe)return!1}}}}}}}return!0},JN=function(D){return D!=="annotation-xml"&&d1(D,L)},YN=function(D){Xo(C.beforeSanitizeAttributes,D,null);const{attributes:ne}=D;if(!ne||cw(D))return;const xe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let Rt=ne.length;for(;Rt--;){const Xn=ne[Rt],{name:ln,namespaceURI:Pr,value:Qo}=Xn,Kc=Oe(ln),uw=Qo;let Ln=ln==="value"?uw:Ete(uw);if(xe.attrName=Kc,xe.attrValue=Ln,xe.keepAttr=!0,xe.forceKeepAttr=void 0,Xo(C.uponSanitizeAttribute,D,xe),Ln=xe.attrValue,U&&(Kc==="id"||Kc==="name")&&(kl(ln,D),Ln=se+Ln),Ee&&ur(/((--!?|])>)|<\/(style|title|textarea)/i,Ln)){kl(ln,D);continue}if(Kc==="attributename"&&d1(Ln,"href")){kl(ln,D);continue}if(xe.forceKeepAttr)continue;if(!xe.keepAttr){kl(ln,D);continue}if(!K&&ur(/\/>/i,Ln)){kl(ln,D);continue}Ce&&Eg([O,I,P],QN=>{Ln=If(Ln,QN," ")});const XN=Oe(D.nodeName);if(!GN(XN,Kc,Ln)){kl(ln,D);continue}if(S&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Pr)switch(p.getAttributeType(XN,Kc)){case"TrustedHTML":{Ln=S.createHTML(Ln);break}case"TrustedScriptURL":{Ln=S.createScriptURL(Ln);break}}if(Ln!==uw)try{Pr?D.setAttributeNS(Pr,ln,Ln):D.setAttribute(ln,Ln),cw(D)?xo(D):O2(e.removed)}catch{kl(ln,D)}}Xo(C.afterSanitizeAttributes,D,null)},bW=function je(D){let ne=null;const xe=WN(D);for(Xo(C.beforeSanitizeShadowDOM,D,null);ne=xe.nextNode();)Xo(C.uponSanitizeShadowNode,ne,null),KN(ne),YN(ne),ne.content instanceof o&&je(ne.content);Xo(C.afterSanitizeShadowDOM,D,null)};return e.sanitize=function(je){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=null,xe=null,Rt=null,Xn=null;if(wl=!je,wl&&(je="<!-->"),typeof je!="string"&&!HN(je))if(typeof je.toString=="function"){if(je=je.toString(),typeof je!="string")throw Df("dirty is not a string, aborting")}else throw Df("toString is not a function");if(!e.isSupported)return je;if(Ke||di(D),e.removed=[],typeof je=="string"&&(Z=!1),Z){if(je.nodeName){const Qo=Oe(je.nodeName);if(!G[Qo]||Ue[Qo])throw Df("root node is forbidden and cannot be sanitized in-place")}}else if(je instanceof a)ne=VN("<!---->"),xe=ne.ownerDocument.importNode(je,!0),xe.nodeType===Lf.element&&xe.nodeName==="BODY"||xe.nodeName==="HTML"?ne=xe:ne.appendChild(xe);else{if(!xt&&!Ce&&!Ve&&je.indexOf("<")===-1)return S&&M?S.createHTML(je):je;if(ne=VN(je),!ne)return xt?null:M?w:""}ne&<&&xo(ne.firstChild);const ln=WN(Z?je:ne);for(;Rt=ln.nextNode();)KN(Rt),YN(Rt),Rt.content instanceof o&&bW(Rt.content);if(Z)return je;if(xt){if(vt)for(Xn=T.call(ne.ownerDocument);ne.firstChild;)Xn.appendChild(ne.firstChild);else Xn=ne;return(Y.shadowroot||Y.shadowrootmode)&&(Xn=N.call(r,Xn,!0)),Xn}let Pr=Ve?ne.outerHTML:ne.innerHTML;return Ve&&G["!doctype"]&&ne.ownerDocument&&ne.ownerDocument.doctype&&ne.ownerDocument.doctype.name&&ur(TB,ne.ownerDocument.doctype.name)&&(Pr="<!DOCTYPE "+ne.ownerDocument.doctype.name+`> 551`+Pr),Ce&&Eg([O,I,P],Qo=>{Pr=If(Pr,Qo," ")}
551),S&&M?S.createHTML(Pr):Pr},e.setConfig=function(){let je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};di(je),Ke=!0},e.clearConfig=function(){it=null,Ke=!1},e.isValidAttribute=function(je,D,ne){it||di({});const xe=Oe(je),Rt=Oe(D);return GN(xe,Rt,ne)},e.addHook=function(je,D){typeof D=="function"&&Rf(C[je],D)},e.removeHook=function(je,D){if(D!==void 0){const ne=wte(C[je],D);return ne===-1?void 0:Ste(C[je],ne,1)[0]}return O2(C[je])},e.removeHooks=function(je){C[je]=[]},e.removeAllHooks=function(){C=$2()},e}var Bte=_B();const zte=t=>{if(!t)return"";const n=t.replace(/\r\n/g,` 552`).replace(/\n{3,}/g,` 553 554`).split(/\n{2,}/),r=/^\s*<(p|h[1-6]|ul|ol|li|blockquote|figure|img|div|table|pre|hr|iframe|video|audio|section|article|aside|header|footer|nav|details)[\s>/]/i;return n.map(i=>{const o=i.trim();return o?r.test(o)||o.startsWith("<!--")?o:`<p>${o.replace(/\n/g,"<br>")}</p>`:""}).filter(Boolean).join(` 555`)},Fte=()=>{const{slug:t}=MX(),[e,n]=E.useState(null),[r,i]=E.useState(!0);E.useEffect(()=>{if(!t)return;(async()=>{const{data:a,error:l}=await tn.from("posts").select("*").eq("slug",t).eq("published",!0).maybeSingle();if(!l&&a){n(a);const c=a.excerpt||a.title,d=`https://institutodesmartageing.com/actualidad/${a.slug}`,f=a.cover_image||"https://institutodesmartageing.com/og-default.jpg";document.title=`${a.title} | Instituto de Smart Ageing`;const h=(m,v,y)=>{let b=document.querySelector(`meta[${v}="${m}"]`);b||(b=document.createElement("meta"),b.setAttribute(v,m),document.head.appendChild(b)),b.setAttribute("content",y)};h("description","name",c),h("og:title","property",a.title),h("og:description","property",c),h("og:type","property","article"),h("og:url","property",d),h("og:image","property",f),h("twitter:card","name","summary_large_image"),h("twitter:title","name",a.title),h("twitter:description","name",c),h("twitter:image","name",f);let p=document.querySelector('link[rel="canonical"]');p||(p=document.createElement("link"),p.rel="canonical",document.head.appendChild(p)),p.href=d;let g=document.getElementById("post-jsonld");g||(g=document.createElement("script"),g.id="post-jsonld",g.type="application/ld+json",document.head.appendChild(g)),g.textContent=JSON.stringify({"@context":"https://schema.org","@type":"NewsArticle",headline:a.title,de
555scription:c,image:[f],datePublished:a.created_at,author:{"@type":"Organization",name:"Instituto de Smart Ageing"},publisher:{"@type":"Organization",name:"Instituto de Smart Ageing",logo:{"@type":"ImageObject",url:"https://institutodesmartageing.com/logo.png"}},mainEntityOfPage:{"@type":"WebPage","@id":d}})}i(!1)})()},[t]);const o=s=>s?new Date(s).toLocaleDateString("es-ES",{day:"numeric",month:"long",year:"numeric"}):"";return r?u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsx("main",{className:"pt-32 pb-20",children:u.jsxs("div",{className:"container mx-auto px-4 max-w-3xl animate-pulse space-y-6",children:[u.jsx("div",{className:"h-4 bg-muted rounded w-32"}),u.jsx("div",{className:"h-10 bg-muted rounded w-3/4"}),u.jsx("div",{className:"aspect-video bg-muted rounded-2xl"}),u.jsxs("div",{className:"space-y-3",children:[u.jsx("div",{className:"h-4 bg-muted rounded"}),u.jsx("div",{className:"h-4 bg-muted rounded w-5/6"}),u.jsx("div",{className:"h-4 bg-muted rounded w-2/3"})]})]})}),u.jsx(Qt,{})]}):e?u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx("article",{className:"py-12 md:py-16",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 max-w-3xl",children:[u.jsxs(De,{to:"/actualidad",className:"inline-flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-primary transition-colors mb-8",children:[u.jsx(G7,{className:"w-4 h-4"}),"Volver a Actualidad"]}),u.jsx("div",{className:"flex items-center gap-3 mb-4",children:u.jsxs("span",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[u.jsx(Ss,{className:"w-4 h-4"}),o(e.created_at)]})}),u.jsx("h1",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:e.title}),e.cover_image&&u.jsx("div",{className:"rounded-2xl overflow-hidden mb-8",children:u.jsx("img",{src:e.cover_image,alt:e.title,className:"w-full h-auto object-cover"})}),e.content?u.jsx("div",{className:"prose prose-lg max-w-none text-foreground prose-headings:text-foreground prose-p:text-muted-foreground prose-li:text-muted-foreground prose-a:text-primary blog-content",dangerouslySetInnerHTML:{__html:Bte.sanitize(zte(e.content))}}):e.excerpt?u.jsx("p",{className:"text-lg text-muted-foreground",children:e.excerpt}):null]})})]}),u.jsx(Qt,{})]}):u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsx("main",{className:"pt-32 pb-20",children:u.jsxs("div",{className:"container mx-auto px-4 text-center",children:[u.jsx("h1",{className:"text-3xl font-bold text-foreground mb-4",children:"ArtÃculo no encontrado"}),u.jsx(De,{to:"/actualidad",className:"text-primary font-semibold hover:underline",children:"Volver a Actualidad"})]})}),u.jsx(Qt,{})]})},qte=x_("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-semibold ring-offset-background transition-all duration-300 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 hover:shadow-lg hover:-translate-y-0.5",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-2 border-primary bg-transparent text-primary hover:bg-primary hover:text-primary-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",hero:"bg-gradient-hero text-primary-foreground shadow-lg hover:shadow-glow hover:-translate-y-1 hover:scale-105","hero-outline":"border-2 border-primary-foreground/30 bg-transparent text-primary-foreground backdrop-blur-sm hover:bg-primary-foreground/10 hover:border-primary-foreground/50"},size:{default:"h-11 px-6 py-2",sm:"h-9 rounded-md px-4",lg:"h-14 roun
555ded-xl px-10 text-base",xl:"h-16 rounded-xl px-12 text-lg",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),fn=E.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...i},o)=>{const s=r?y3:"button";return u.jsx(s,{className:qt(qte({variant:e,size:n,className:t})),ref:o,...i})});fn.displayName="Button";const hn=E.forwardRef(({className:t,type:e,...n},r)=>u.jsx("input",{type:e,className:qt("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",t),ref:r,...n}));hn.displayName="Input";const U_=E.forwardRef(({className:t,...e},n)=>u.jsx("textarea",{className:qt("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",t),ref:n,...e}));U_.displayName="Textarea";function AB(t){const e=E.useRef({value:t,previous:t});return E.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var qx="Switch",[Ute,pLe]=Lc(qx),[Vte,Wte]=Ute(qx),NB=E.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:l="on",onCheckedChange:c,form:d,...f}=t,[h,p]=E.useState(null),g=Ft(e,x=>p(x)),m=E.useRef(!1),v=h?d||!!h.closest("form"):!0,[y,b]=Nm({prop:i,defaultProp:o??!1,onChange:c,caller:qx});return u.jsxs(Vte,{scope:n,checked:y,disabled:a,children:[u.jsx(gt.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":MB(y),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:g,onClick:ot(t.onClick,x=>{b(S=>!S),v&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),v&&u.jsx(PB,{control:h,bubbles:!m.current,name:r,value:l,checked:y,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});NB.displayName=qx;var CB="SwitchThumb",OB=E.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,i=Wte(CB,n);return u.jsx(gt.span,{"data-state":MB(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:e})});OB.displayName=CB;var Hte="SwitchBubbleInput",PB=E.forwardRef(({__scopeSwitch:t,control:e,checked:n,bubbles:r=!0,...i},o)=>{const s=E.useRef(null),a=Ft(s,o),l=AB(n),c=C_(e);return E.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&p){const g=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(g)}},[l,n,r]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});PB.displayName=Hte;function MB(t){return t?"checked":"unchecked"}var RB=NB,Kte=OB;const IB=E.forwardRef(({className:t,...e},n)=>u.jsx(RB,{className:qt("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",t),...e,ref:n,children:u.jsx(Kte,{className:qt("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")})}));IB.displayName=RB.displayName;var Gte="Label",DB=E.forwardRef((t,e)=>u.jsx(gt.label,{...t,ref:e,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=t.onMouseDown)==null||i.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));DB.displayName=Gte;var $B=DB;const Jte=x_("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),yi=E.forwardRef(({className:t,...e},n)=>u.jsx($B,{ref:n,className:qt(Jte(),t),...e}));yi.displayName=$B.displayName;var g1="focusScope.autoFocusOnMount",v1="focusScope.autoFocusOnUnmount",L2={bubbles:!1,cancelable:!0},Yte="FocusScope",LB=E.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=t,[a,l]=E.useState(null),c=Vo(i),d=Vo(o),f=E.useRef(null),h=Ft(e,m=>l(m)),p=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let m=function(x){if(p.paused||!a)return;const S=x.target;a.contains(S)?f.current=S:ia(f.current,{select:!0})},v=function(x){if(p.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||ia(f.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&ia(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const b=new MutationObserver(y);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),b.disconnect()}}},[r,a,p.paused]),E.useEffect(()=>{if(a){z2.add(p);
vendor: 3,376 bytes, line 555
555const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(g1,L2);a.addEventListener(g1,c),a.dispatchEvent(y),y.defaultPrevented||(Xte(nne(BB(a)),{select:!0}),document.activeElement===m&&ia(a))}return()=>{a.removeEventListener(g1,c),setTimeout(()=>{const y=new CustomEvent(v1,L2);a.addEventListener(v1,d),a.dispatchEvent(y),y.defaultPrevented||ia(m??document.body,{select:!0}),a.removeEventListener(v1,d),z2.remove(p)},0)}}},[a,c,d,p]);const g=E.useCallback(m=>{if(!n&&!r||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const b=m.currentTarget,[x,S]=Qte(b);x&&S?!m.shiftKey&&y===S?(m.preventDefault(),n&&ia(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),n&&ia(S,{select:!0})):y===b&&m.preventDefault()}},[n,r,p.paused]);return u.jsx(gt.div,{tabIndex:-1,...s,ref:h,onKeyDown:g})});LB.displayName=Yte;function Xte(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ia(r,{select:e}),document.activeElement!==n)return}function Qte(t){const e=BB(t),n=B2(e,t),r=B2(e.reverse(),t);return[n,r]}function BB(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function B2(t,e){for(const n of t)if(!Zte(n,{upTo:e}))return n}function Zte(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function ene(t){return t instanceof HTMLInputElement&&"select"in t}function ia(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&ene(t)&&e&&t.select()}}var z2=tne();function tne(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=F2(t,e),t.unshift(e)},remove(e){var n;t=F2(t,e),(n=t[0])==null||n.resume()}}}function F2(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function nne(t){return t.filter(e=>e.tagName!=="A")}var y1=0;function rne(){E.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??q2()),document.body.insertAdjacentElement("beforeend",t[1]??q2()),y1++,()=>{y1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),y1--}},[])}function q2(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Sv="right-scroll-bar-position",kv="width-before-scroll-bar",ine="with-scroll-bars-hidden",one="--removed-body-scroll-bar-size";function b1(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function sne(t,e){var n=E.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var ane=typeof window<"u"?E.useLayoutEffect:E.useEffect,U2=new WeakMap;function lne(t,e){var n=sne(null,function(r){return t.forEach(function(i){return b1(i,r)})});return ane(function(){var r=U2.get(n);if(r){var i=new Set(r),o=new Set(t),s=n.current;
vendor: 4,224 bytes, lines 555-570
555i.forEach(function(a){o.has(a)||b1(a,null)}),o.forEach(function(a){i.has(a)||b1(a,s)})}U2.set(n,t)},[t]),n}function cne(t){return t}function une(t,e){e===void 0&&(e=cne);var n=[],r=!1,i={read:function(){if(r)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]:t},useMedium:function(o){var s=e(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var l=function(){var d=s;s=[],d.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){s.push(d),c()},filter:function(d){return s=s.filter(d),n}}}};return i}function dne(t){t===void 0&&(t={});var e=une(null);return e.options=Oo({async:!0,ssr:!1},t),e}var zB=function(t){var e=t.sideCar,n=af(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return E.createElement(r,Oo({},n))};zB.isSideCarExport=!0;function fne(t,e){return t.useMedium(e),zB}var FB=dne(),x1=function(){},Ux=E.forwardRef(function(t,e){var n=E.useRef(null),r=E.useState({onScrollCapture:x1,onWheelCapture:x1,onTouchMoveCapture:x1}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,d=t.enabled,f=t.shards,h=t.sideCar,p=t.noRelative,g=t.noIsolation,m=t.inert,v=t.allowPinchZoom,y=t.as,b=y===void 0?"div":y,x=t.gapMode,S=af(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,k=lne([n,e]),j=Oo(Oo({},S),i);return E.createElement(E.Fragment,null,d&&E.createElement(w,{sideCar:FB,removeScrollBar:c,shards:f,noRelative:p,noIsolation:g,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:x}),s?E.cloneElement(E.Children.only(a),Oo(Oo({},j),{ref:k})):E.createElement(b,Oo({},j,{className:l,ref:k}),a))});Ux.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ux.classNames={fullWidth:kv,zeroRight:Sv};var hne=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pne(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=hne();return e&&t.setAttribute("nonce",e),t}function mne(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function gne(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var vne=function(){var t=0,e=null;return{add:function(n){t==0&&(e=pne())&&(mne(e,n),gne(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},yne=function(){var t=vne();return function(e,n){E.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},qB=function(){var t=yne(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},bne={left:0,top:0,right:0,gap:0},w1=function(t){return parseInt(t||"",10)||0},xne=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[w1(n),w1(r),w1(i)]},wne=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return bne;var e=xne(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Sne=qB(),Wu="data-scroll-locked",kne=function(t,e,n,r){var i=t.left,o=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),` 556 .`.concat(ine,` { 557 overflow: hidden `).concat(r,`; 558 padding-right: `).concat(a,"px ").concat(r,`; 559 } 560 body[`).concat(Wu,`] { 561 overflow: hidden `).concat(r,`; 562 overscroll-behavior: contain; 563 `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&` 564 padding-left: `.concat(i,`px; 565 padding-top: `).concat(o,`px; 566 padding-right: `).concat(s,`px; 567 margin-left:0; 568 margin-top:0; 569 margin-right: `).concat(a,"px ").concat(r,`; 570 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
570")].filter(Boolean).join(""),` 571 } 572 573 .`).concat(Sv,` { 574 right: `).concat(a,"px ").concat(r,`; 575 } 576 577 .`).concat(kv,` { 578 margin-right: `).concat(a,"px ").concat(r,`; 579 } 580 581 .`).concat(Sv," .").concat(Sv,` { 582 right: 0 `).concat(r,`; 583 } 584 585 .`).concat(kv," .").concat(kv,` { 586 margin-right: 0 `).concat(r,`; 587 } 588 589 body[`).concat(Wu,`] { 590 `).concat(one,": ").concat(a,`px; 591 } 592`)},V2=function(){var t=parseInt(document.body.getAttribute(Wu)||"0",10);return isFinite(t)?t:0},Ene=function(){E.useEffect(function(){return document.body.setAttribute(Wu,(V2()+1).toString()),function(){var t=V2()-1;t<=0?document.body.removeAttribute(Wu):document.body.setAttribute(Wu,t.toString())}},[])},jne=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;Ene();var o=E.useMemo(function(){return wne(i)},[i]);return E.createElement(Sne,{styles:kne(o,!e,i,n?"":"!important")})},tE=!1;if(typeof window<"u")try{var Tg=Object.defineProperty({},"passive",{get:function(){return tE=!0,!0}});window.addEventListener("test",Tg,Tg),window.removeEventListener("test",Tg,Tg)}catch{tE=!1}var eu=tE?{passive:!1}:!1,Tne=function(t){return t.tagName==="TEXTAREA"},UB=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Tne(t)&&n[e]==="visible")},_ne=function(t){return UB(t,"overflowY")},Ane=function(t){return UB(t,"overflowX")},W2=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=VB(t,r);if(i){var o=WB(t,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Nne=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Cne=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},VB=function(t,e){return t==="v"?_ne(e):Ane(e)},WB=function(t,e){return t==="v"?Nne(e):Cne(e)},One=function(t,e){return t==="h"&&e==="rtl"?-1:1},Pne=function(t,e,n,r,i){var o=One(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,l=e.contains(a),c=!1,d=s>0,f=0,h=0;do{if(!a)break;var p=WB(t,a),g=p[0],m=p[1],v=p[2],y=m-v-o*g;(g||y)&&VB(t,a)&&(f+=y,h+=g);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(d&&(Math.abs(f)<1||!i)||!d&&(Math.abs(h)<1||!i))&&(c=!0),c},_g=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},H2=function(t){return[t.deltaX,t.deltaY]},K2=function(t){return t&&"current"in t?t.current:t},Mne=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Rne=function(t){return` 593 .block-interactivity-`.concat(t,` {pointer-events: none;} 594 .allow-interactivity-`).concat(t,` {pointer-events: all;} 595`)},Ine=0,tu=[];function Dne(t){var e=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(Ine++)[0],o=E.useState(qB)[0],s=E.useRef(t);E.useEffect(function(){s.current=t},[t]),E.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var m=$Q([t.lockRef.current],(t.shards||[]).map(K2),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=E.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var y=_g(m),b=n.current,x="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],w,k=m.target,j=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&j==="h"&&k.type==="range")return!1;var T=W2(j,k);if(!T)return!0;if(T?w=j:(w=j==="v"?"h":"v",T=W2(j,k)),!T)return!1;if(!r.current&&"changedTouches"in m&&(x||S)&&(r.current=w),!w)return!0;var _=r.current||w;return Pne(_,v,m,_==="h"?x:S,!0)},[]),l=E.useCallback(function(m){var v=m;if(!(!tu.length||tu[tu.length-1]!==o)){var y="deltaY"in v?H2(v):_g(v),b=e.current.filter(function(w){return w.name===v.type&&(w.target===v.target||v.target===w.shadowParent)&&Mne(w.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}
vendor: 4,509 bytes, line 595
595if(!b){var x=(s.current.shards||[]).map(K2).filter(Boolean).filter(function(w){return w.contains(v.target)}),S=x.length>0?a(v,x[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),c=E.useCallback(function(m,v,y,b){var x={name:m,delta:v,target:y,should:b,shadowParent:$ne(y)};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(S){return S!==x})},1)},[]),d=E.useCallback(function(m){n.current=_g(m),r.current=void 0},[]),f=E.useCallback(function(m){c(m.type,H2(m),m.target,a(m,t.lockRef.current))},[]),h=E.useCallback(function(m){c(m.type,_g(m),m.target,a(m,t.lockRef.current))},[]);E.useEffect(function(){return tu.push(o),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,eu),document.addEventListener("touchmove",l,eu),document.addEventListener("touchstart",d,eu),function(){tu=tu.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,eu),document.removeEventListener("touchmove",l,eu),document.removeEventListener("touchstart",d,eu)}},[]);var p=t.removeScrollBar,g=t.inert;return E.createElement(E.Fragment,null,g?E.createElement(o,{styles:Rne(i)}):null,p?E.createElement(jne,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function $ne(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const Lne=fne(FB,Dne);var HB=E.forwardRef(function(t,e){return E.createElement(Ux,Oo({},t,{ref:e,sideCar:Lne}))});HB.classNames=Ux.classNames;var Bne=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},nu=new WeakMap,Ag=new WeakMap,Ng={},S1=0,KB=function(t){return t&&(t.host||KB(t.parentNode))},zne=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=KB(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},Fne=function(t,e,n,r){var i=zne(e,Array.isArray(t)?t:[t]);Ng[n]||(Ng[n]=new WeakMap);var o=Ng[n],s=[],a=new Set,l=new Set(i),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};i.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var p=h.getAttribute(r),g=p!==null&&p!=="false",m=(nu.get(h)||0)+1,v=(o.get(h)||0)+1;nu.set(h,m),o.set(h,v),s.push(h),m===1&&g&&Ag.set(h,!0),v===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(e),a.clear(),S1++,function(){s.forEach(function(f){var h=nu.get(f)-1,p=o.get(f)-1;nu.set(f,h),o.set(f,p),h||(Ag.has(f)||f.removeAttribute(r),Ag.delete(f)),p||f.removeAttribute(n)}),S1--,S1||(nu=new WeakMap,nu=new WeakMap,Ag=new WeakMap,Ng={})}},qne=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=Bne(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Fne(r,i,n,"aria-hidden")):function(){return null}},Vx="Dialog",[GB,mLe]=Lc(Vx),[Une,go]=GB(Vx),JB=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=t,a=E.useRef(null),l=E.useRef(null),[c,d]=Nm({prop:r,defaultProp:i??!1,onChange:o,caller:Vx});return u.jsx(Une,{scope:e,triggerRef:a,contentRef:l,contentId:bv(),titleId:bv(),descriptionId:bv(),open:c,onOpenChange:d,onOpenToggle:E.useCallback(()=>d(f=>!f),[d]),modal:s,children:n})};JB.displayName=Vx;var YB="DialogTrigger",Vne=E.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=go(YB,n),o=Ft(e,i.triggerRef);return u.jsx(gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":H_(i.open),...r,ref:o,onClick:ot(t.onClick,i.onOpenToggle)})});Vne.displayName=YB;var V_="DialogPortal",[Wne,XB]=GB(V_,{forceMount:void 0}),QB=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,o=go(V_,e);return u.jsx(Wne,{scope:e,forceMount:n,children:E.Children.map(r,s=>u.jsx(ef,{present:n||o.open,children:u.jsx(g_,{asChild:!0,container:i,children:s})}))})};QB.displayName=V_;var fy="DialogOverlay",ZB=E.forwardRef((t,e)=>{const n=XB(fy,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=go(fy,t.__scopeDialog);return o.modal?u.jsx(ef,{present:r||o.open,children:u.jsx(Kne,{...i,ref:e})}):null});ZB.displayName=fy;var Hne=cp("DialogOverlay.RemoveScroll"),Kne=E.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=go(fy,n);return u.jsx(HB,{as:Hne,allowPinchZoom:!0,shards:[i.contentRef],children:u.jsx(gt.div,{"data-state":H_(i.open
vendor: 4,498 bytes, lines 595-599
595),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Ec="DialogContent",ez=E.forwardRef((t,e)=>{const n=XB(Ec,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=go(Ec,t.__scopeDialog);return u.jsx(ef,{present:r||o.open,children:o.modal?u.jsx(Gne,{...i,ref:e}):u.jsx(Jne,{...i,ref:e})})});ez.displayName=Ec;var Gne=E.forwardRef((t,e)=>{const n=go(Ec,t.__scopeDialog),r=E.useRef(null),i=Ft(e,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return qne(o)},[]),u.jsx(tz,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ot(t.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ot(t.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ot(t.onFocusOutside,o=>o.preventDefault())})}),Jne=E.forwardRef((t,e)=>{const n=go(Ec,t.__scopeDialog),r=E.useRef(!1),i=E.useRef(!1);return u.jsx(tz,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=t.onCloseAutoFocus)==null||s.call(t,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),tz=E.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=t,a=go(Ec,n),l=E.useRef(null),c=Ft(e,l);return rne(),u.jsxs(u.Fragment,{children:[u.jsx(LB,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:u.jsx(jx,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":H_(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(Yne,{titleId:a.titleId}),u.jsx(Qne,{contentRef:l,descriptionId:a.descriptionId})]})]})}),W_="DialogTitle",nz=E.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=go(W_,n);return u.jsx(gt.h2,{id:i.titleId,...r,ref:e})});nz.displayName=W_;var rz="DialogDescription",iz=E.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=go(rz,n);return u.jsx(gt.p,{id:i.descriptionId,...r,ref:e})});iz.displayName=rz;var oz="DialogClose",sz=E.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=go(oz,n);return u.jsx(gt.button,{type:"button",...r,ref:e,onClick:ot(t.onClick,()=>i.onOpenChange(!1))})});sz.displayName=oz;function H_(t){return t?"open":"closed"}var az="DialogTitleWarning",[gLe,lz]=XH(az,{contentName:Ec,titleName:W_,docsSlug:"dialog"}),Yne=({titleId:t})=>{const e=lz(az),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. 596 597If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. 598 599For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return E.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},Xne="DialogDescriptionWarning",Qne=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lz(Xne).contentName}}.`;return E.useEffect(()=>{var o;const i=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},Zne=JB,ere=QB,cz=ZB,uz=ez,dz=nz,fz=iz,tre=sz;const G2=Zne,nre=ere,hz=E.forwardRef(({className:t,...e},n)=>u.jsx(cz,{ref:n,className:qt("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",t),...e}));hz.displayName=cz.displayName;const nE=E.forwardRef(({className:t,children:e,...n},r)=>u.jsxs(nre,{children:[u.jsx(hz,{}),u.jsxs(uz,{ref:r,className:qt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
599nded-lg",t),...n,children:[e,u.jsxs(tre,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[u.jsx(w_,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));nE.displayName=uz.displayName;const rE=({className:t,...e})=>u.jsx("div",{className:qt("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});rE.displayName="DialogHeader";const iE=E.forwardRef(({className:t,...e},n)=>u.jsx(dz,{ref:n,className:qt("text-lg font-semibold leading-none tracking-tight",t),...e}));iE.displayName=dz.displayName;const rre=E.forwardRef(({className:t,...e},n)=>u.jsx(fz,{ref:n,className:qt("text-sm text-muted-foreground",t),...e}));rre.displayName=fz.displayName;var pz={exports:{}},mz={};/** 600 * @license React 601 * use-sync-external-store-shim.production.js 602 * 603 * Copyright (c) Meta Platforms, Inc. and affiliates. 604 * 605 * This source code is licensed under the MIT license found in the 606 * LICENSE file in the root directory of this source tree. 607 */var md=E;function ire(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ore=typeof Object.is=="function"?Object.is:ire,sre=md.useState,are=md.useEffect,lre=md.useLayoutEffect,cre=md.useDebugValue;function ure(t,e){var n=e(),r=sre({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return lre(function(){i.value=n,i.getSnapshot=e,k1(i)&&o({inst:i})},[t,n,e]),are(function(){return k1(i)&&o({inst:i}),t(function(){k1(i)&&o({inst:i})})},[t]),cre(n),n}function k1(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!ore(t,n)}catch{return!0}}function dre(t,e){return e()}var fre=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?dre:ure;mz.useSyncExternalStore=md.useSyncExternalStore!==void 0?md.useSyncExternalStore:fre;pz.exports=mz;var K_=pz.exports;function Un(t){this.content=t}Un.prototype={constructor:Un,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Un(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Un(n)},addToStart:function(t,e){return new Un([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Un(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Un(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Un.from(t),t.size?new Un(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Un.from(t),t.size?new Un(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Un.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Un.from=function(t){if(t instanceof Un)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Un(e)};function gz(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=gz(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function vz(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let c=0,d=Math.min(s.text.length,a.text.length);for(;c<d&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let c=vz(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class Q{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let d=a+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,n-d),r,i+d)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}
vendor: 4,161 bytes, line 607
607textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new Q(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new Q(r,i)}cutByIndex(e,n){return e==n?Q.empty:e==0&&n==this.content.length?this:new Q(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new Q(i,o)}addToStart(e){return new Q([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Q(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return gz(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return vz(this,e,n,r)}findIndex(e){if(e==0)return Cg(0,e);if(e==this.size)return Cg(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),o=r+i.nodeSize;if(o>=e)return o==e?Cg(n+1,o):Cg(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Q.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Q(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Q.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new Q(n||e,r)}static from(e){if(!e)return Q.empty;if(e instanceof Q)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Q([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Q.empty=new Q([],0);const E1={index:0,offset:0};function Cg(t,e){return E1.index=t,E1.offset=e,E1}function hy(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!hy(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!hy(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let yt=class oE{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&hy(this.attrs,e.attrs)}
vendor: 7,156 bytes, line 607
607toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return oE.none;if(e instanceof oE)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};yt.none=[];class py extends Error{}class he{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=bz(this.content,e+this.openStart,n);return r&&new he(r,this.openStart,this.openEnd)}removeBetween(e,n){return new he(yz(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return he.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new he(Q.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new he(e,r,i)}}he.empty=new he(Q.empty,0,0);function yz(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(yz(o.content,e-i-1,n-i-1)))}function bz(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=bz(s.content,e-o-1,n,s);return a&&t.replaceChild(i,s.copy(a))}function hre(t,e,n){if(n.openStart>t.depth)throw new py("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new py("Inconsistent open depths");return xz(t,e,n,0)}function xz(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=xz(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,a=s.content;return fc(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=pre(n,t);return fc(o,Sz(t,s,a,e,r))}else return fc(o,my(t,e,r))}function wz(t,e){if(!e.type.compatibleContent(t.type))throw new py("Cannot join "+e.type.name+" onto "+t.type.name)}function sE(t,e,n){let r=t.node(n);return wz(r,e.node(n)),r}function dc(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Th(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(dc(t.nodeAfter,r),o++));for(let a=o;a<s;a++)dc(i.child(a),r);e&&e.depth==n&&e.textOffset&&dc(e.nodeBefore,r)}function fc(t,e){return t.type.checkContent(e),t.copy(e)}function Sz(t,e,n,r,i){let o=t.depth>i&&sE(t,e,i+1),s=r.depth>i&&sE(n,r,i+1),a=[];return Th(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(wz(o,s),dc(fc(o,Sz(t,e,n,r,i+1)),a)):(o&&dc(fc(o,my(t,e,i+1)),a),Th(e,n,i,a),s&&dc(fc(s,my(n,r,i+1)),a)),Th(r,null,i,a),new Q(a)}function my(t,e,n){let r=[];if(Th(null,t,n,r),t.depth>n){let i=sE(t,e,n+1);dc(fc(i,my(t,e,n+1)),r)}return Th(e,null,n,r),new Q(r)}function pre(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(Q.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Tp{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return yt.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new gy(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new Tp(n,r,o)}
vendor: 4,390 bytes, line 607
607static resolveCached(e,n){let r=J2.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else J2.set(e,r=new mre);let i=r.elts[r.i]=Tp.resolve(e,n);return r.i=(r.i+1)%gre,i}}class mre{constructor(){this.elts=[],this.i=0}}const gre=12,J2=new WeakMap;class gy{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const vre=Object.create(null);let Wa=class aE{constructor(e,n,r,i=yt.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||Q.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&hy(this.attrs,n||e.defaultAttrs||vre)&&yt.sameSet(this.marks,r||yt.none)}copy(e=null){return e==this.content?this:new aE(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new aE(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return he.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new he(c,i.depth-s,o.depth-s)}replace(e,n,r){return hre(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Tp.resolveCached(this,e)}resolveNoCache(e){return Tp.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),kz(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=Q.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=yt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!yt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}
607`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=Q.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};Wa.prototype.text=void 0;class vy extends Wa{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):kz(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new vy(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new vy(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function kz(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class jc{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new yre(e,n);if(r.next==null)return jc.empty;let i=Ez(r);r.next&&r.err("Unexpected trailing text");let o=jre(Ere(i));return Tre(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return Q.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:d,next:f}=s.next[c];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,a.concat(d));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(` 608`)}}jc.empty=new jc(!0);class yre{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Ez(t){let e=[];do e.push(bre(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function bre(t){let e=[];do e.push(xre(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function xre(t){let e=kre(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=wre(t,e);else break;return e}function Y2(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");
vendor: 4,729 bytes, line 608
608let e=Number(t.next);return t.pos++,e}function wre(t,e){let n=Y2(t),r=n;return t.eat(",")&&(t.next!="}"?r=Y2(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Sre(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function kre(t){if(t.eat("(")){let e=Ez(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Sre(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Ere(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(s,a,l){let c={term:l,to:a};return e[s].push(c),c}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],a);if(l==s.exprs.length-1)return c;i(c,a=n())}else if(s.type=="star"){let l=n();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c<s.min;c++){let d=n();i(o(s.expr,l),d),l=d}if(s.max==-1)i(o(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let d=n();r(l,d),i(o(s.expr,l),d),l=d}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function jz(t,e){return e-t}function X2(t,e){let n=[];return r(e),n.sort(jz);function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&r(l)}}}function jre(t){let e=Object.create(null);return n(X2(t,0));function n(r){let i=[];r.forEach(s=>{t[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let d=0;d<i.length;d++)i[d][0]==a&&(c=i[d][1]);X2(t,l).forEach(d=>{c||i.push([a,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let o=e[r.join(",")]=new jc(r.indexOf(t.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(jz);o.next.push({type:i[s][0],next:e[a.join(",")]||n(a)})}return o}}function Tre(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Tz(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function _z(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Az(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function Nz(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Are(t,r,e[r]);return n}let Q2=class Cz{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Nz(e,r.attrs),this.defaultAttrs=Tz(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==jc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:_z(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Wa(this,this.computeAttrs(e),Q.from(n),yt.setFrom(r))}createChecked(e=null,n,r){return n=Q.from(n),this.checkContent(n),new Wa(this,this.computeAttrs(e),n,yt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=Q.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(Q.empty,!0);return o?new Wa(this,e,n.append(o),yt.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);
vendor: 10,951 bytes, lines 608-610
608if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Az(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:yt.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Cz(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function _re(t,e,n){let r=n.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}class Are{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?_re(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Wx{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=Nz(e,i.attrs),this.excluded=null;let o=Tz(this.attrs);this.instance=o?new yt(this,o):null}create(e=null){return!e&&this.instance?this.instance:new yt(this,_z(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Wx(o,i++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){Az(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Oz{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=Un.from(e.nodes),n.marks=Un.from(e.marks||{}),this.nodes=Q2.compile(this.spec.nodes,this),this.marks=Wx.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=jc.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?Z2(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:Z2(this,s.split(" "))}this.nodeFromJSON=i=>Wa.fromJSON(this,i),this.markFromJSON=i=>yt.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Q2){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new vy(r,r.defaultAttrs,e,yt.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Z2(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Nre(t){return t.tag!=null}function Cre(t){return t.style!=null}let _h=class lE{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(Nre(i))this.tags.push(i);else if(Cre(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new tP(this,n,!1);return r.addAll(e,yt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new tP(this,n,!0);return r.addAll(e,yt.none,n.from,n.to),he.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(Mre(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=nP(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=nP(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new lE(e,lE.schemaRules(e)))}};const Pz={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Ore={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Mz={ol:!0,ul:!0},_p=1,cE=2,Ah=4;function eP(t,e,n){return e!=null?(e?_p:0)|(e==="full"?cE:0):t&&t.whitespace=="pre"?_p|cE:n&~Ah}class Og{constructor(e,n,r,i,o,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=yt.none,this.match=o||(s&Ah?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Q.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&_p)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=Q.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Q.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Pz.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class tP{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,o,s=eP(null,n.preserveWhitespace,0)|(r?Ah:0);i?o=new Og(i.type,i.attrs,yt.none,!0,n.topMatch||i.type.contentMatch,s):r?o=new Og(null,null,yt.none,!0,null,s):o=new Og(e.schema.topNodeType,null,yt.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,o=i.options&cE?"full":this.localPreserveWS||(i.options&_p)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,` 609`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;Mz.hasOwnProperty(s)&&this.parser.normalizeLists&&Pre(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:Ore.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,d=this.needsBlock;if(Pz.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let f=l&&l.skip?n:this.readStyles(e,n);f&&this.addAll(e,f),c&&this.sync(o),this.needsBlock=d}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` 610`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEac
vendor: 4,077 bytes, line 610
610h(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(e);if(c&&(!i||i.length>c.length+a)&&(i=c,o=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=yt.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):rP(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=eP(e,o,s.options);s.options&Ah&&s.content.length==0&&(a|=Ah);let l=yt.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):rP(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new Og(e,n,l,i,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=_p)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let d=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Pre(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Mz.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Mre(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function nP(t){let e={};for(let n in t)e[n]=t[n];return e}
vendor: 3,763 bytes, line 610
610function rP(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:d}=a.edge(l);if(c==e||o.indexOf(d)<0&&s(d))return!0}};if(s(i.contentMatch))return!0}}class Bc{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=j1(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],d=this.serializeMark(c,s.isInline,n);d&&(o.push([c,i]),i.appendChild(d.dom),i=d.contentDOM||d.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=Ev(j1(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Ev(j1(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return Ev(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Bc(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=iP(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return iP(e.marks)}}function iP(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function j1(t){return t.document||window.document}const oP=new WeakMap;function Rre(t){let e=oP.get(t);return e===void 0&&oP.set(t,e=Ire(t)),e}function Ire(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function Ev(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=Rre(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let a,l=n?t.createElementNS(n,i):t.createElement(i),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let f in c)if(c[f]!=null){let h=f.indexOf(" ");h>0?l.setAttributeNS(f.slice(0,h),f.slice(h+1),c[f]):f=="style"&&l.style?l.style.cssText=c[f]:l.setAttribute(f,c[f])}}for(let f=d;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:g}=Ev(t,h,n,r);if(l.appendChild(p),g){if(a)throw new RangeError("Multiple content holes");a=g}}}return{dom:l,contentDOM:a}}const Rz=65535,Iz=Math.pow(2,16);function Dre(t,e){return t+e*Iz}function sP(t){return t&Rz}function $re(t){return(t-(t&Rz))/Iz}const Dz=1,$z=2,jv=4,Lz=8;class uE{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Lz)>0}get deletedBefore(){return(this.delInfo&(Dz|jv))>0}get deletedAfter(){return(this.delInfo&($z|jv))>0}get deletedAcross(){return(this.delInfo&jv)>0}}class Zr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Zr.empty)return Zr.empty}recover(e){let n=0,r=sP(e);if(!this.inverted)for(let i=0;i<r;
vendor: 3,664 bytes, line 610
610i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+$re(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+o],d=this.ranges[a+s],f=l+c;if(e<=f){let h=c?e==l?-1:e==f?1:n:n,p=l+i+(h<0?0:d);if(r)return p;let g=e==(n<0?l:f)?null:Dre(a/3,e-l),m=e==l?$z:e==f?Dz:jv;return(n<0?e!=l:e!=f)&&(m|=Lz),new uE(p,m,g)}i+=d-c}return r?e+i:new uE(e+i,0,null)}touches(e,n){let r=0,i=sP(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+o],d=l+c;if(e<=d&&a==i*3)return!0;r+=this.ranges[a+s]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+n],d=this.ranges[i+r];e(a,a+c,l,l+d),o+=d-c}}invert(){return new Zr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Zr.empty:new Zr(e<0?[0,-e,0]:[0,0,e])}}Zr.empty=new Zr([]);class Ap{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Ap(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Ap;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],a=s.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this._maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new uE(e,i,null)}}const T1=Object.create(null);let lr=class{getMap(){return Zr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=T1[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in T1)throw new RangeError("Duplicate use of step JSON ID "+e);return T1[e]=n,n.prototype.jsonID=e,n}};class gn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new gn(e,null)}static fail(e){return new gn(null,e)}static fromReplace(e,n,r,i){try{return gn.ok(e.replace(n,r,i))}catch(o){if(o instanceof py)return gn.fail(o.message);throw o}}}function G_(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(G_(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return Q.fromArray(r)}class Aa extends lr{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.no
vendor: 6,946 bytes, line 610
610de(r.sharedDepth(this.to)),o=new he(G_(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return gn.fromReplace(e,this.from,this.to,o)}invert(){return new co(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Aa(n.pos,r.pos,this.mark)}merge(e){return e instanceof Aa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Aa(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Aa(n.from,n.to,e.markFromJSON(n.mark))}}lr.jsonID("addMark",Aa);class co extends lr{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new he(G_(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return gn.fromReplace(e,this.from,this.to,r)}invert(){return new Aa(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new co(n.pos,r.pos,this.mark)}merge(e){return e instanceof co&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new co(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new co(n.from,n.to,e.markFromJSON(n.mark))}}lr.jsonID("removeMark",co);class Na extends lr{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return gn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return gn.fromReplace(e,this.pos,this.pos+1,new he(Q.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Na(this.pos,n.marks[i]);return new Na(this.pos,this.mark)}}return new Tc(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Na(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Na(n.pos,e.markFromJSON(n.mark))}}lr.jsonID("addNodeMark",Na);class Tc extends lr{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return gn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return gn.fromReplace(e,this.pos,this.pos+1,new he(Q.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Na(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Tc(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Tc(n.pos,e.markFromJSON(n.mark))}}lr.jsonID("removeNodeMark",Tc);class pn extends lr{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&dE(e,this.from,this.to)?gn.fail("Structure replace would overwrite content"):gn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Zr([this.from,this.to-this.from,this.slice.size])}invert(e){return new pn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&pn.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new pn(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof pn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?he.empty:new he(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new pn(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?he.empty:new he(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new pn(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new pn(n.from,n.to,he.fromJSON(e,n.slice),!!n.structure)}}pn.MAP_BIAS=1;lr.jsonID("replace",pn);class Rn extends lr{constructor(e,n,r,i,o,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(dE(e,this.from,this.gapFrom)||dE(e,this.gapTo,this.to)))return gn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return gn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?gn.fromReplace(e,this.from,this.to,r):gn.fail("Content does not fit in gap")}getMap(){return new Zr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Rn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new Rn(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Rn(n.from,n.to,n.gapFrom,n.gapTo,he.fromJSON(e,n.slice),n.insert,!!n.structure)}}lr.jsonID("replaceAround",Rn);function dE(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>
vendor: 1,070 bytes, line 610
6100&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function Lre(t,e,n,r){let i=[],o=[],s,a;t.doc.nodesBetween(e,n,(l,c,d)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&d.type.allowsMarkType(r.type)){let h=Math.max(c,e),p=Math.min(c+l.nodeSize,n),g=r.addToSet(f);for(let m=0;m<f.length;m++)f[m].isInSet(g)||(s&&s.to==h&&s.mark.eq(f[m])?s.to=p:i.push(s=new co(h,p,f[m])));a&&a.to==h?a.to=p:o.push(a=new Aa(h,p,r))}}),i.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function Bre(t,e,n,r){let i=[],o=0;t.doc.nodesBetween(e,n,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(r instanceof Wx){let c=s.marks,d;for(;d=r.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,n);for(let d=0;d<l.length;d++){let f=l[d],h;for(let p=0;p<i.length;p++){let g=i[p];g.step==o-1&&f.eq(i[p].style)&&(h=g)}h?(h.to=c,h.step=o):i.push({style:f,from:Math.max(a,e),to:c,step:o})}}}
vendor: 4,482 bytes, lines 610-611
610),i.forEach(s=>t.step(new co(s.from,s.to,s.style)))}function J_(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),d=a+c.nodeSize,f=r.matchType(c.type);if(!f)s.push(new pn(a,d,he.empty));else{r=f;for(let h=0;h<c.marks.length;h++)n.allowsMarkType(c.marks[h].type)||t.step(new co(a,d,c.marks[h]));if(i&&c.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,g;for(;h=p.exec(c.text);)g||(g=new he(Q.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new pn(a+h.index,a+h.index+h[0].length,g))}}a=d}if(!r.validEnd){let l=r.fillBefore(Q.empty,!0);t.replace(a,a,new he(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function zre(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function cf(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,o=0;;--r){let s=t.$from.node(r),a=t.$from.index(r)+i,l=t.$to.indexAfter(r)-o;if(r<t.depth&&s.canReplace(a,l,n))return r;if(r==0||s.type.spec.isolating||!zre(s,a,l))break;a&&(i=1),l<s.childCount&&(o=1)}return null}function Fre(t,e,n){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),l=s,c=a,d=Q.empty,f=0;for(let g=o,m=!1;g>n;g--)m||r.index(g)>0?(m=!0,d=Q.from(r.node(g).copy(d)),f++):l--;let h=Q.empty,p=0;for(let g=o,m=!1;g>n;g--)m||i.after(g+1)<i.end(g)?(m=!0,h=Q.from(i.node(g).copy(h)),p++):c++;t.step(new Rn(l,c,s,a,new he(d.append(h),f,p),d.size-f,!0))}function Y_(t,e,n=null,r=t){let i=qre(t,e),o=i&&Ure(r,e);return o?i.map(aP).concat({type:e,attrs:n}).concat(o.map(aP)):null}function aP(t){return{type:t,attrs:null}}function qre(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}function Ure(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:s}function Vre(t,e,n){let r=Q.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Q.from(n[s].type.create(n[s].attrs,r))}let i=e.start,o=e.end;t.step(new Rn(i,o,i,o,new he(r,0,0),n.length,!0))}function Wre(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(s,a)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,l)&&Hre(t.doc,t.mapping.slice(o).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",g=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!g?c=!1:!p&&g&&(c=!0)}c===!1&&zz(t,s,a,o),J_(t,t.mapping.slice(o).map(a,1),r,void 0,c===null);let d=t.mapping.slice(o),f=d.map(a,1),h=d.map(a+s.nodeSize,1);return t.step(new Rn(f,h,f+1,h-1,new he(Q.from(r.create(l,null,s.marks)),0,0),1,!0)),c===!0&&Bz(t,s,a,o),!1}})}function Bz(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function zz(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(` 611`))}})}function Hre(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function Kre(t,e,n,r,i){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Rn(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new he(Q.from(s),0,0),1,!0))}function Hu(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,d=n-2;c>o;c--,d--){let f=i.node(c),h=i.index(c);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(h,f.childCount),g=r&&r[d+1];g&&(p=p.replaceChild(0,g.type.create(g.attrs)));let m=r&&r[d]||f;if(!f.canReplace(h+1,f.childCount)||!m.type.validContent(p))return!1}
vendor: 7,681 bytes, line 611
611let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function Gre(t,e,n=1,r){let i=t.doc.resolve(e),o=Q.empty,s=Q.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){o=Q.from(i.node(a).copy(o));let d=r&&r[c];s=Q.from(d?d.type.create(d.attrs,s):i.node(a).copy(s))}t.step(new pn(e,e,new he(o.append(s),n,n),!0))}function fl(t,e){let n=t.resolve(e),r=n.index();return Fz(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Jre(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let i=0;i<e.childCount;i++){let o=e.child(i),s=o.type==r?t.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(o.marks))return!1}return n.validEnd}function Fz(t,e){return!!(t&&e&&!t.isLeaf&&Jre(t,e))}function Hx(t,e,n=-1){let r=t.resolve(e);for(let i=r.depth;;i--){let o,s,a=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):n>0?(o=r.node(i+1),a++,s=r.node(i).maybeChild(a)):(o=r.node(i).maybeChild(a-1),s=r.node(i+1)),o&&!o.isTextblock&&Fz(o,s)&&r.node(i).canReplace(a,a+1))return e;if(i==0)break;e=n<0?r.before(i):r.after(i)}}function Yre(t,e,n){let r=null,{linebreakReplacement:i}=t.doc.type.schema,o=t.doc.resolve(e-n),s=o.node().type;if(i&&s.inlineContent){let d=s.whitespace=="pre",f=!!s.contentMatch.matchType(i);d&&!f?r=!1:!d&&f&&(r=!0)}let a=t.steps.length;if(r===!1){let d=t.doc.resolve(e+n);zz(t,d.node(),d.before(),a)}s.inlineContent&&J_(t,e+n-1,s,o.node().contentMatchAt(o.index()),r==null);let l=t.mapping.slice(a),c=l.map(e-n);if(t.step(new pn(c,l.map(e+n,-1),he.empty,!0)),r===!0){let d=t.doc.resolve(c);Bz(t,d.node(),d.before(),t.steps.length)}return t}function Xre(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function qz(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),c=r.node(s),d=!1;if(o==1)d=c.canReplace(l,l,i);else{let f=c.contentMatchAt(l).findWrapping(i.firstChild.type);d=f&&c.canReplaceWith(l,l,f[0])}if(d)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Kx(t,e,n=e,r=he.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return Uz(i,o,r)?new pn(e,n,r):new Qre(i,o,r).fit()}function Uz(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Qre{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Q.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=Q.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new he(o,s,a);return e>-1?new Rn(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new pn(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=_1(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],d,f=null;if(n==1&&(s?c.matchType(s.type)||(f=c.fillBefore(Q.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:f};if(n==2&&s&&(d=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:d};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=_1(e,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new he(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=_1(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new he(sh(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new he(sh(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,c=0,d=[],{match:f,type:h}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)d.push(i.child(m));f=f.matchFragment(i)}let p=a.size+e-(s.content.size-s.openEnd);for(;c<a.childCount;){let m=a.child(c),v=f.matchType(m.type);if(!v)break;c++,(c>1||l==0||m.content.size)&&(f=v,d.push(Vz(m.mark(h.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?p:-1)))}let g=c==a.childCount;g||(p=-1),this.placed=ah(this.placed,n,Q.from(d)),this.frontier[n].match=f,g&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,v=a;m<p;m++){let y=v.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),v=y.content}this.unplaced=g?e==0?he.empty:new he(sh(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new he(sh(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!A1(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=A1(e,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],d=A1(e,a,c,l,!0);if(!d||d.childCount)continue e}return{depth:n,fit:s,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ah(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=ah(this.placed,this.depth,Q.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Q.empty,!0);n.childCount&&(this.placed=ah(this.placed,this.frontier.length,n))}}function sh(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(sh(t.firstChild.content,e-1,n)))}function ah(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(ah(t.lastChild.content,e-1,n)))}function _1(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function Vz(t,e,n){if(e<=0)return t;let r=t.content;return e>
vendor: 9,103 bytes, line 611
6111&&(r=r.replaceChild(0,Vz(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(Q.empty,!0)))),t.copy(r)}function A1(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!Zre(n,o.content,s)?a:null}function Zre(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function eie(t){return t.spec.defining||t.spec.definingForContent}function tie(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),o=t.doc.resolve(n);if(Uz(i,o,r))return t.step(new pn(e,n,r));let s=Hz(i,o);s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let h=i.depth,p=i.pos-1;h>0;h--,p--){let g=i.node(h).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;s.indexOf(h)>-1?a=h:i.before(h)==p&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],d=r.openStart;for(let h=r.content,p=0;;p++){let g=h.firstChild;if(c.push(g),p==r.openStart)break;h=g.content}for(let h=d-1;h>=0;h--){let p=c[h],g=eie(p.type);if(g&&!p.sameMarkup(i.node(Math.abs(a)-1)))d=h;else if(g||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+d+1)%(r.openStart+1),g=c[p];if(g)for(let m=0;m<s.length;m++){let v=s[(m+l)%s.length],y=!0;v<0&&(y=!1,v=-v);let b=i.node(v-1),x=i.index(v-1);if(b.canReplaceWith(x,x,g.type,g.marks))return t.replace(i.before(v),y?o.after(v):n,new he(Wz(r.content,0,r.openStart,p),p,r.openEnd))}}let f=t.steps.length;for(let h=s.length-1;h>=0&&(t.replace(e,n,r),!(t.steps.length>f));h--){let p=s[h];p<0||(e=i.before(p),n=o.after(p))}}function Wz(t,e,n,r,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(Wz(o.content,e+1,n,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(t).append(t);t=s.append(o.matchFragment(s).fillBefore(Q.empty,!0))}return t}function nie(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=Xre(t.doc,e,r.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new he(Q.from(r),0,0))}function rie(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let s=r.sharedDepth(n),a=!1;for(let l=r.depth;l>s;l--)r.node(l).type.spec.isolating&&(a=!0);for(let l=i.depth;l>s;l--)i.node(l).type.spec.isolating&&(a=!0);if(!a){for(let l=r.depth;l>0&&e==r.start(l);l--)e=r.before(l);for(let l=i.depth;l>0&&n==i.start(l);l--)n=i.before(l);r=t.doc.resolve(e),i=t.doc.resolve(n)}}let o=Hz(r,i);for(let s=0;s<o.length;s++){let a=o[s],l=s==o.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),i.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return t.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}function Hz(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let o=t.start(i);if(o<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&n.push(i)}return n}class Ku extends lr{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return gn.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return gn.fromReplace(e,this.pos,this.pos+1,new he(Q.from(i),0,n.isLeaf?0:1))}getMap(){return Zr.empty}invert(e){return new Ku(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Ku(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Ku(n.pos,n.attr,n.value)}}lr.jsonID("attr",Ku);class Np extends lr{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return gn.ok(r)}getMap(){return Zr.empty}invert(e){return new Np(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Np(n.attr,n.value)}}lr.jsonID("docAttr",Np);let gd=class extends Error{};gd=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};gd.prototype=Object.create(Error.prototype);gd.prototype.constructor=gd;gd.prototype.name="TransformError";class Kz{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ap}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new gd(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(e=i.map(e,1),n=i.map(n,-1)),i.forEach((o,s,a,l)=>{e=Math.min(e,a),n=Math.max(n,l)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=he.empty){let i=Kx(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new he(Q.from(r),0,0))}delete(e,n){return this.replace(e,n,he.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return tie(this,e,n,r),this}replaceRangeWith(e,n,r){return nie(this,e,n,r),this}deleteRange(e,n){return rie(this,e,n),this}lift(e,n){return Fre(this,e,n),this}join(e,n=1){return Yre(this,e,n),this}wrap(e,n){return Vre(this,e,n),this}setBlockType(e,n=e,r,i=null){return Wre(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return Kre(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new Ku(e,n,r)),this}setDocAttribute(e,n){return this.step(new Np(e,n)),this}addNodeMark(e,n){return this.step(new Na(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof yt)n.isInSet(r.marks)&&this.step(new Tc(e,n));else{let i=r.marks,o,s=[];for(;o=n.isInSet(i);)s.push(new Tc(e,o)),i=o.removeFromSet(i);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(e,n=1,r){return Gre(this,e,n,r),this}addMark(e,n,r){return Lre(this,e,n,r),this}removeMark(e,n,r){return Bre(this,e,n,r),this}clearIncompatible(e,n,r){return J_(this,e,n,r),this}}const N1=Object.create(null);class He{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new iie(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=he.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],d=e.mapping.slice(o);e.replaceRange(d.map(l.pos),d.map(c.pos),a?he.empty:n),a==0&&uP(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=e.mapping.slice(r),c=l.map(s.pos),d=l.map(a.pos);o?e.deleteRange(c,d):(e.replaceRangeWith(c,d,n),uP(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new Re(e):du(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=n<0?du(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):du(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Oi(e.node(0))}static atStart(e){return du(e,e,0,0,1)||new Oi(e)}static atEnd(e){return du(e,e,e.content.size,e.childCount,-1)||new Oi(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=N1[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in N1)throw new RangeError("Duplicate use of selection JSON ID "+e);return N1[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Re.between(this.$anchor,this.$head).getBookmark()}}He.prototype.visible=!0;class iie{constructor(e,n){this.$from=e,this.$to=n}}let lP=!1;function cP(t){!lP&&!t.parent.inlineContent&&(lP=!0,console.warn("TextSelection endpoint not pointing into a
611node with inline content ("+t.parent.type.name+")"))}class Re extends He{constructor(e,n=e){cP(e),cP(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return He.near(r);let i=e.resolve(n.map(this.anchor));return new Re(i.parent.inlineContent?i:r,r)}replace(e,n=he.empty){if(super.replace(e,n),n==he.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Re&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Gx(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Re(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=He.findFrom(n,r,!0)||He.findFrom(n,-r,!0);if(o)n=o.$head;else return He.near(n,r)}return e.parent.inlineContent||(i==0?e=n:(e=(He.findFrom(e,-r,!0)||He.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=i<0&&(e=n))),new Re(e,n)}}He.jsonID("text",Re);class Gx{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Gx(e.map(this.anchor),e.map(this.head))}resolve(e){return Re.between(e.resolve(this.anchor),e.resolve(this.head))}}class Te extends He{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=e.resolve(i);return r?He.near(o):new Te(o)}content(){return new he(Q.from(this.node),0,0)}eq(e){return e instanceof Te&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new X_(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Te(e.resolve(n.anchor))}static create(e,n){return new Te(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Te.prototype.visible=!1;He.jsonID("node",Te);class X_{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Gx(r,r):new X_(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Te.isSelectable(r)?new Te(n):He.near(n)}}class Oi extends He{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=he.empty){if(n==he.empty){e.delete(0,e.doc.content.size);let r=He.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Oi(e)}map(e){return new Oi(e)}eq(e){return e instanceof Oi}getBookmark(){return oie}}He.jsonID("all",Oi);const oie={map(){return this},resolve(t){return new Oi(t)}};function du(t,e,n,r,i,o=!1){if(e.inlineContent)return Re.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let a=e.child(s);if(a.isAtom){if(!o&&Te.isSelectable(a))return Te.create(t,n-(i<0?a.nodeSize:0))}else{let l=du(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function uP(t,e,n){let r=t.steps.length-1;if(r<e)return;let i=t.steps[r];if(!(i instanceof pn||i instanceof Rn))return;let o=t.mapping.maps[r],s;o.forEach((a,l,c,d)=>{s==null&&(s=d)}),t.setSelection(He.near(t.doc.resolve(s),n))}const dP=1,Pg=2,fP=4;class sie extends Kz{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|dP)&~Pg,this.storedMarks=null,this}get selectionSet(){return(this.updated&dP)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Pg,this}ensureMarks(e){return yt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Pg)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Pg,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||yt.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,o)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(He.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=fP,this}get scrolledIntoView(){return(this.updated&fP)>0}}function hP(t,e){return!e||!t?t:t.bind(e)}class lh{constructor(e,n,r){this.name=e,this.init=hP(n.init,r),this.apply=hP(n.apply,r)}}const aie=[new lh("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new lh("selection",{init(t,e){return t.selection||He.atStart(e.doc)},apply(t){return t.selection}}),new lh("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new lh("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class C1{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=aie.slice(),n&&n.forEac
vendor: 14,480 bytes, lines 611-612
611h(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new lh(r.key,r.spec.state,r))})}}class Nu{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=i?i[s].n:0,c=i?i[s].state:this,d=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(d&&r.filterTransaction(d,s)){if(d.setMeta("appendedTransaction",e),!i){i=[];for(let f=0;f<this.config.plugins.length;f++)i.push(f<s?{state:r,n:n.length}:{state:this,n:0})}n.push(d),r=r.applyInner(d),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Nu(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new sie(this)}static create(e){let n=new C1(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Nu(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new C1(this.schema,e.plugins),r=n.fields,i=new Nu(n);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new C1(e.schema,e.plugins),o=new Nu(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=Wa.fromJSON(e.schema,n.doc);else if(s.name=="selection")o.selection=He.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[s.name]=c.fromJSON.call(l,e,n[a],o);return}}o[s.name]=s.init(e,o)}}),o}}function Gz(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=Gz(i,e,{})),n[r]=i}return n}class Ut{constructor(e){this.spec=e,this.props={},e.props&&Gz(e.props,this,this.props),this.key=e.key?e.key.key:Jz("plugin")}getState(e){return e[this.key]}}const O1=Object.create(null);function Jz(t){return t in O1?t+"$"+ ++O1[t]:(O1[t]=0,t+"$")}class _n{constructor(e="key"){this.key=Jz(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const lie=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Yz(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const cie=(t,e,n)=>{let r=Yz(t,n);if(!r)return!1;let i=Q_(r);if(!i){let s=r.blockRange(),a=s&&cf(s);return a==null?!1:(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(e6(t,i,e,-1))return!0;if(r.parent.content.size==0&&(vd(o,"end")||Te.isSelectable(o)))for(let s=r.depth;;s--){let a=Kx(t.doc,r.before(s),r.after(s),he.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(vd(o,"end")?He.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):Te.create(l.doc,i.pos-o.nodeSize)),e(l.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1},uie=(t,e,n)=>{let r=Yz(t,n);if(!r)return!1;let i=Q_(r);return i?Xz(t,i,e):!1},die=(t,e,n)=>{let r=Qz(t,n);if(!r)return!1;let i=Z_(r);return i?Xz(t,i,e):!1};function Xz(t,e,n){let r=e.nodeBefore,i=r,o=e.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let d=i.lastChild;if(!d)return!1;i=d}let s=e.nodeAfter,a=s,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let d=a.firstChild;if(!d)return!1;a=d}let c=Kx(t.doc,o,l,he.empty);if(!c||c.from!=o||c instanceof pn&&c.slice.size>=l-o)return!1;if(n){let d=t.tr.step(c);d.setSelection(Re.create(d.doc,o)),n(d.scrollIntoView())}return!0}function vd(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const fie=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=Q_(r)}let s=o&&o.nodeBefore;return!s||!Te.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Te.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function Q_(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function Qz(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const hie=(t,e,n)=>{let r=Qz(t,n);if(!r)return!1;let i=Z_(r);if(!i)return!1;let o=i.nodeAfter;if(e6(t,i,e,1))return!0;if(r.parent.content.size==0&&(vd(o,"start")||Te.isSelectable(o))){let s=Kx(t.doc,r.before(),r.after(),he.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(vd(o,"start")?He.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):Te.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},pie=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=Z_(r)}let s=o&&o.nodeAfter;return!s||!Te.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Te.create(t.doc,o.pos)).scrollIntoView()),!0)};function Z_(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const mie=(t,e)=>{let n=t.selection,r=n instanceof Te,i;if(r){if(n.node.isTextblock||!fl(t.doc,n.from))return!1;i=n.from}else if(i=Hx(t.doc,n.from,-1),i==null)return!1;if(e){let o=t.tr.join(i);r&&o.setSelection(Te.create(o.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},gie=(t,e)=>{let n=t.selection,r;if(n instanceof Te){if(n.node.isTextblock||!fl(t.doc,n.to))return!1;r=n.to}else if(r=Hx(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},vie=(t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),o=i&&cf(i);return o==null?!1:(e&&e(t.tr.lift(i,o).scrollIntoView()),!0)},yie=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(` 612`).scrollIntoView()),!0)};function Zz(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const bie=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=Zz(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection(He.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},xie=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Oi||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Zz(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=t.tr.insert(s,o.createAndFill());a.setSelection(Re.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},wie=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(Hu(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&cf(r);return i==null?!1:(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},Sie=(t,e)=>{let{$from:n,to:r}=t.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),e&&e(t.tr.setSelection(Te.create(t.doc,i))),!0)};function kie(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||fl(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function e6(t,e,n,r){let i=e.nodeBefore,o=e.nodeAfter,s,a,l=i.type.spec.isolating||o.type.spec.isolating;if(!l&&kie(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(n){let p=e.pos+o.nodeSize,g=Q.empty;for(let y=s.length-1;y>=0;y--)g=Q.from(s[y].create(null,g));g=Q.from(i.copy(g));let m=t.tr.step(new Rn(e.pos-1,p,e.pos,p,new he(g,1,0),s.length,!0)),v=m.doc.resolve(p+2*s.length);v.nodeAfter&&v.nodeAfter.type==i.type&&fl(m.doc,v.pos)&&m.join(v.pos),n(m.scrollIntoView())}return!0}let d=o.type.spec.isolating||r>0&&l?null:He.findFrom(e,1),f=d&&d.$from.blockRange(d.$to),h=f&&cf(f);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(f,h).scrollIntoView()),!0;if(c&&vd(o,"start",!0)&&vd(i,"end")){let p=i,g=[];for(;g.push(p),!p.isTextblock;)p=p.lastChild;let m=o,v=1;for(;!m.isTextblock;m=m.firstChild)v++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let y=Q.empty;for(let x=g.length-1;x>=0;x--)y=Q.from(g[x].copy(y));let b=t.tr.step(new Rn(e.pos-g.length,e.pos+o.nodeSize,e.pos+v,e.pos+o.nodeSize-v,new he(y,g.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function t6(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(e.tr.setSelection(Re.create(e.doc,t<0?i.start(o):i.end(o)))),!0):!1}}const Eie=t6(-1),jie=t6(1);function Tie(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&Y_(s,t,e);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function pP(t,e=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(l,c)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)i=!0;else{let d=n.doc.resolve(c),f=d.index();i=d.parent.canReplaceWith(f,f+1,t)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];o.setBlockType(a,l,t,e)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function _ie(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o);if(!s)return!1;let a=r?n.tr:null;return Aie(a,s,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function Aie(t,e,n,r=null){let i=!1,o=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=s.resolve(e.start-2);o=new gy(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new gy(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let a=Y_(o,n,r,e);return a?(t&&Nie(t,e,a,i,n),!0):!1}function Nie(t,e,n,r,i){let o=Q.empty;for(let d=n.length-1;d>=0;d--)o=Q.from(n[d].type.create(n[d].attrs,o));t.step(new Rn(e.start-(r?2:0),e.end,e.start,e.end,new he(o,0,0),n.length,!0));let s=0;for(let d=0;d<n.length;d++)n[d].type==i&&(s=d+1);let a=n.length-s,l=e.start+n.length-(r?2:0),c=e.parent;for(let d=e.startIndex,f=e.endIndex,h=!0;d<f;d++,h=!1)!h&&Hu(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(d).nodeSize;return t}function Cie(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==t);return o?n?r.node(o.depth-1).type==t?Oie(e,n,t,o):Pie(e,n,o):!0:!1}}function Oie(t,e,n,r){let i=t.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new Rn(o-1,s,o,s,new he(Q.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new gy(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=cf(r);if(a==null)return!1;i.lift(r,a);let l=i.doc.resolve(i.mapping.map(o,-1)-1);return fl(i.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&i.join(l.pos),e(i.scrollIntoView()),!0}function Pie(t,e,n){let r=t.tr,i=n.parent;for(let p=n.end,g=n.endIndex-1,m=n.startIndex;g>m;g--)p-=i.child(g).nodeSize,r.delete(p-1,p+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,c=o.node(-1),d=o.index(-1);if(!c.canReplace(d+(a?0:1),d+1,s.content.append(l?Q.empty:Q.from(i))))return!1;let f=o.pos,h=f+s.nodeSize;return r.step(new Rn(f-(a?1:0),h+(l?1:0),f+1,h-1,new he((a?Q.empty:Q.from(i.copy(Q.empty))).append(l?Q.empty:Q.from(i.copy(Q.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function Mie(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==t);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,d=Q.from(c?t.create():null),f=new he(Q.from(t.create(null,Q.from(a.type.create(null,d)))),c?3:1,0),h=o.start,p=o.end;n(e.tr.step(new Rn(h-(c?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}const Wn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},yd=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let fE=null;const ds=function(t,e,n){let r=fE||(fE=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},Rie=function(){fE=null},_c=function(t,e,n,r){return n&&(mP(t,e,n,r,-1)||mP(t,e,n,r,1))},Iie=/^(img|br|input|textarea|hr)$/i;function mP(t,e,n,r,i){for(var o;;){if(t==n&&e==r)return!0;
vendor: 5,471 bytes, line 612
612if(e==(i<0?0:Ti(t))){let s=t.parentNode;if(!s||s.nodeType!=1||Mm(t)||Iie.test(t.nodeName)||t.contentEditable=="false")return!1;e=Wn(t)+(i<0?0:1),t=s}else if(t.nodeType==1){let s=t.childNodes[e+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection)e+=i;else return!1;else t=s,e=i<0?Ti(t):0}else return!1}}function Ti(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Die(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=Ti(t)}else if(t.parentNode&&!Mm(t))e=Wn(t),t=t.parentNode;else return null}}function $ie(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Mm(t))e=Wn(t)+1,t=t.parentNode;else return null}}function Lie(t,e,n){for(let r=e==0,i=e==Ti(t);r||i;){if(t==n)return!0;let o=Wn(t);if(t=t.parentNode,!t)return!1;r=r&&o==0,i=i&&o==Ti(t)}}function Mm(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Jx=function(t){return t.focusNode&&_c(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Bl(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Bie(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function zie(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(Ti(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(Ti(r.startContainer),r.startOffset)}}}const Ho=typeof navigator<"u"?navigator:null,gP=typeof document<"u"?document:null,hl=Ho&&Ho.userAgent||"",hE=/Edge\/(\d+)/.exec(hl),n6=/MSIE \d/.exec(hl),pE=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(hl),qr=!!(n6||pE||hE),Ha=n6?document.documentMode:pE?+pE[1]:hE?+hE[1]:0,Pi=!qr&&/gecko\/(\d+)/i.test(hl);Pi&&+(/Firefox\/(\d+)/.exec(hl)||[0,0])[1];const mE=!qr&&/Chrome\/(\d+)/.exec(hl),Kn=!!mE,r6=mE?+mE[1]:0,ar=!qr&&!!Ho&&/Apple Computer/.test(Ho.vendor),bd=ar&&(/Mobile\/\w+/.test(hl)||!!Ho&&Ho.maxTouchPoints>2),bi=bd||(Ho?/Mac/.test(Ho.platform):!1),i6=Ho?/Win/.test(Ho.platform):!1,ys=/Android \d/.test(hl),Rm=!!gP&&"webkitFontSmoothing"in gP.documentElement.style,Fie=Rm?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function qie(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function ts(t,e){return typeof t=="number"?t:t[e]}function Uie(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function vP(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=yd(s);continue}let a=s,l=a==o.body,c=l?qie(o):Uie(a),d=0,f=0;if(e.top<c.top+ts(r,"top")?f=-(c.top-e.top+ts(i,"top")):e.bottom>c.bottom-ts(r,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+ts(i,"top")-c.top:e.bottom-c.bottom+ts(i,"bottom")),e.left<c.left+ts(r,"left")?d=-(c.left-e.left+ts(i,"left")):e.right>c.right-ts(r,"right")&&(d=e.right-c.right+ts(i,"right")),d||f)if(l)o.defaultView.scrollBy(d,f);else{let p=a.scrollLeft,g=a.scrollTop;f&&(a.scrollTop+=f),d&&(a.scrollLeft+=d);let m=a.scrollLeft-p,v=a.scrollTop-g;e={left:e.left-m,top:e.top-v,right:e.right-m,bottom:e.bottom-v}}let h=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:yd(s)}}function Vie(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,i;for(let o=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let a=t.root.elementFromPoint(o,s);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,i=l.top;break}}return{refDOM:r,refTop:i,stack:o6(t.dom)}}function o6(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=yd(r));return e}function Wie({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;s6(n,r==0?0:r-e)}function s6(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:o}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let ru=null;function Hie(t){if(t.setActive)return t.setActive();if(ru)return t.focus(ru);let e=o6(t);t.focus(ru==null?{get preventScroll(){return ru={preventScroll:!0},!0}}:void 0),ru||(ru=!1,s6(e,0))}function a6(t,e){let n,r=2e8,i,o=0,s=e.top,a=e.top,l,c;for(let d=t.firstChild,f=0;d;d=d.nextSibling,f++){let h;if(d.nodeType==1)h=d.getClientRects();else if(d.nodeType==3)h=ds(d).getClientRects();else continue;for(let p=0;p<h.length;p++){let g=h[p];if(g.top<=s&&g.bottom>=a){s=Math.max(g.bottom,s),a=Math.min(g.top,a);let m=g.left>e.left?g.left-e.left:g.right<e.left?e.left-g.right:0;if(m<r){n=d,r=m,i=m&&n.nodeType==3?{left:g.right<e.left?g.right:g.left,top:e.top}:e,d.nodeType==1&&m&&(o=f+(e.left>=(g.left+g.right)/2?1:0));continue}}else g.top>e.top&&!l&&g.left<=e.left&&g.right>=e.left&&(l=d,c={left:Math.max(g.left,Math.min(g.right,e.left)),top:g.top});!n&&(e.left>=g.right&&e.top>
vendor: 4,084 bytes, line 612
612=g.top||e.left>=g.left&&e.top>=g.bottom)&&(o=f+1)}}return!n&&l&&(n=l,i=c,r=0),n&&n.nodeType==3?Kie(n,i):!n||r&&n.nodeType==1?{node:t,offset:o}:a6(n,i)}function Kie(t,e){let n=t.nodeValue.length,r=document.createRange(),i;for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let s=oa(r,1);if(s.top!=s.bottom&&eA(e,s)){i={node:t,offset:o+(e.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),i||{node:t,offset:0}}function eA(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Gie(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Jie(t,e,n){let{node:r,offset:i}=a6(e,n),o=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();o=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,i,o)}function Yie(t,e,n,r){let i=-1;for(let o=e,s=!1;o!=t.dom;){let a=t.docView.nearestDesc(o,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&l.left>r.left||l.top>r.top?i=a.posBefore:(!s&&l.right<r.left||l.bottom<r.top)&&(i=a.posAfter),s=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;o=a.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function l6(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let s=t.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(eA(e,c))return l6(s,e,c)}}if((o=(o+1)%r)==i)break}return t}function Xie(t,e){let n=t.dom.ownerDocument,r,i=0,o=zie(n,e.left,e.top);o&&({node:r,offset:i}=o);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let c=t.dom.getBoundingClientRect();if(!eA(e,c)||(s=l6(t.dom,e,c),!s))return null}if(ar)for(let c=s;r&&c;c=yd(c))c.draggable&&(r=void 0);if(s=Gie(s,e),r){if(Pi&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let d=r.childNodes[i],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&i++}let c;Rm&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==t.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=Yie(t,r,i,e))}a==null&&(a=Jie(t,s,e));let l=t.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function yP(t){return t.top<t.bottom||t.left<t.right}function oa(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(yP(r))return r}return Array.prototype.find.call(n,yP)||t.getBoundingClientRect()}const Qie=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function c6(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=Rm||Pi;if(r.nodeType==3)if(s&&(Qie.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let l=oa(ds(r,i,i),n);if(Pi&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let c=oa(ds(r,i-1,i-1),-1);if(c.top==l.top){let d=oa(ds(r,i,i+1),-1);if(d.top!=l.top)return Bf(d,d.left<c.left)}}return l}else{let l=i,c=i,d=n<0?1:-1;return n<0&&!i?(c++,d=-1):n>=0&&i==r.nodeValue.length?(l--,d=1):n<0?l--:c++,Bf(oa(ds(r,l,c),d),d<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Ti(r))){let l=r.childNodes[i-1];if(l.nodeType==1)return P1(l.getBoundingClientRect(),!1)}if(o==null&&i<Ti(r)){let l=r.childNodes[i];if(l.nodeType==1)return P1(l.getBoundingClientRect(),!0)}return P1(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Ti(r))){let l=r.childNodes[i-1],c=l.nodeType==3?ds(l,Ti(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Bf(oa(c,1),!1)}if(o==null&&i<Ti(r)){let l=r.childNodes[i];for(;
vendor: 7,104 bytes, lines 612-613
612l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?ds(l,0,s?0:1):l.nodeType==1?l:null:null;if(c)return Bf(oa(c,-1),!0)}return Bf(oa(r.nodeType==3?ds(r):r,-n),n>=0)}function Bf(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function P1(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function u6(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}function Zie(t,e,n){let r=e.selection,i=n=="up"?r.$from:r.$to;return u6(t,e,()=>{let{node:o}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=c6(t,i.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=ds(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let d=l[c];if(d.bottom>d.top+1&&(n=="up"?s.top-d.top>(d.bottom-s.top)*2:d.bottom-s.bottom>(s.bottom-d.top)*2))return!1}}return!0})}const eoe=/[\u0590-\u08ac]/;function toe(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=t.domSelection();return a?!eoe.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:s:u6(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:d,anchorOffset:f}=t.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:g,focusOffset:m}=t.domSelectionRange(),v=g&&!p.contains(g.nodeType==1?g:g.parentNode)||l==g&&c==m;try{a.collapse(d,f),l&&(l!=d||c!=f)&&a.extend&&a.extend(l,c)}catch{}return h!=null&&(a.caretBidiLevel=h),v}):r.pos==r.start()||r.pos==r.end()}let bP=null,xP=null,wP=!1;function noe(t,e,n){return bP==e&&xP==n?wP:(bP=e,xP=n,wP=n=="up"||n=="down"?Zie(t,e,n):toe(t,e,n))}const Mi=0,SP=1,Wl=2,Ko=3;class Im{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=Mi,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let o,s;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>Wn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),s;if(o&&(!n||o.node))if(r&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return o}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>e||s instanceof f6){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof d6&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Wn(o.dom)+1:0}}else{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Wn(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],c=s+l.size;if(i==-1&&e<=c){let d=s+l.border;if(e>=d&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,d);e=s;for(let f=a;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=Wn(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(c>n||a==this.children.length-1)){n=c;for(let d=a+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=Wn(f.dom);break}n+=f.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let o=Math.min(e,n),s=Math.max(e,n);for(let p=0,g=0;p<this.children.length;p++){let m=this.children[p],v=g+m.size;if(o>g&&s<v)return m.setSelection(e-g-m.border,n-g-m.border,r,i);g=v}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),d=r.domSelectionRange(),f=!1;if((Pi||ar)&&e==n){let{node:p,offset:g}=a;if(p.nodeType==3){if(f=!!(g&&p.nodeValue[g-1]==` 613`),f&&g==p.nodeValue.length)for(let m=p,v;m;
vendor: 4,573 bytes, line 613
613m=m.parentNode){if(v=m.nextSibling){v.nodeName=="BR"&&(a=l={node:v.parentNode,offset:Wn(v)+1});break}let y=m.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let m=p.childNodes[g-1];f=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(Pi&&d.focusNode&&d.focusNode!=l.node&&d.focusNode.nodeType==1){let p=d.focusNode.childNodes[d.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||f&&ar)&&_c(a.node,a.offset,d.anchorNode,d.anchorOffset)&&_c(l.node,l.offset,d.focusNode,d.focusOffset))return;let h=!1;if((c.extend||e==n)&&!(f&&Pi)){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),h=!0}catch{}}if(!h){if(e>n){let g=a;a=l,l=g}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let a=r+o.border,l=s-o.border;if(e>=a&&n<=l){this.dirty=e==r||n==s?Wl:SP,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Ko:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Wl:Ko}r=s}this.dirty=Wl}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Wl:SP;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class d6 extends Im{constructor(e,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==Mi&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class roe extends Im{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Ac extends Im{constructor(e,n,r,i,o){super(e,[],r,i),this.mark=n,this.spec=o}static create(e,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return(!s||!s.dom)&&(s=Bc.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Ac(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Ko||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ko&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Mi){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Mi}}slice(e,n,r){let i=Ac.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=vE(o,n,s,r)),e>0&&(o=vE(o,0,e,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Ka extends Im{constructor(e,n,r,i,o,s,a,l,c){super(e,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,n,r,i,o,s){let a=o.nodeViews[n.type.name],l,c=a&&a(n,o,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,i),d=c&&c.dom,f=c&&c.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=Bc.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let h=d;return d=m6(d,r,n),c?l=new ioe(e,n,r,i,d,f||null,h,c,o,s+1):n.isText?new Yx(e,n,r,i,d,h,o):new Ka(e,n,r,i,d,f||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;
vendor: 4,619 bytes, line 613
613let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Q.empty)}return e}matchesNode(e,n,r){return this.dirty==Mi&&e.eq(this.node)&&yy(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,o=e.composing?this.localCompositionInfo(e,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new soe(this,s&&s.node,e);coe(this.node,this.innerDeco,(c,d,f)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e,d):c.type.side>=0&&!f&&l.syncToMarks(d==this.node.childCount?yt.none:this.node.child(d).marks,r,e,d),l.placeWidget(c,e,i)},(c,d,f,h)=>{l.syncToMarks(c.marks,r,e,h);let p;l.findNodeMatch(c,d,f,h)||a&&e.state.selection.from>i&&e.state.selection.to<i+c.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,d,f,p,e)||l.updateNextNode(c,d,f,e,h,i)||l.addNode(c,d,f,e,i),i+=c.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Wl)&&(s&&this.protectLocalComposition(e,s),h6(this.contentDOM,this.children,e),bd&&uoe(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof Re)||r<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=doe(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new roe(this,o,n,i);e.input.compositionNodes.push(s),this.children=vE(this.children,r,r+i.length,e,s)}update(e,n,r,i){return this.dirty==Ko||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Mi}updateOuterDeco(e){if(yy(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=p6(this.dom,this.nodeDOM,gE(this.outerDeco,this.node,n),gE(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function kP(t,e,n,r,i){m6(r,e,t);let o=new Ka(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Yx extends Ka{constructor(e,n,r,i,o,s,a){super(e,n,r,i,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return this.dirty==Ko||this.dirty!=Mi&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Mi||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=Mi,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),o=document.createTextNode(i.text);return new Yx(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ko)}get domAtom(){return!1}isText(e){return this.node.text==e}}class f6 extends Im{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Mi&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}
vendor: 5,568 bytes, line 613
613class ioe extends Ka{constructor(e,n,r,i,o,s,a,l,c,d){super(e,n,r,i,o,s,a,c,d),this.spec=l}update(e,n,r,i){if(this.dirty==Ko)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function h6(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=EP(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof Ac){let l=r?r.previousSibling:t.lastChild;h6(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=EP(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Nh=function(t){t&&(this.nodeName=t)};Nh.prototype=Object.create(null);const Hl=[new Nh];function gE(t,e,n){if(t.length==0)return Hl;let r=n?Hl[0]:new Nh,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new Nh(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new Nh(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function p6(t,e,n,r){if(n==Hl&&r==Hl)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=Hl[0]),i=l}ooe(i,a||Hl[0],s)}return i}function ooe(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&t.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function m6(t,e,n){return p6(t,t,Hl,gE(e,n,t.nodeType!=1))}function yy(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function EP(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class soe{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=aoe(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,i){let o=0,s=this.stack.length>>1,a=Math.min(s,e.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=Mi,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let l=-1,c=this.top.children.length;i<this.preMatch.index&&(c=Math.min(this.index+3,c));for(let d=this.index;d<c;d++){let f=this.top.children[d];if(f.matchesMark(e[s])&&!this.isLocked(f.dom)){l=d;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let d=Ac.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,d),this.top=d,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,r,i,o){let s=this.top.children[i];return s.dirty==Ko&&s.dom==s.contentDOM&&(s.dirty=Wl),s.update(e,n,r,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Ka){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let d=l.dom,f,h=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Ko&&yy(n,l.outerDeco));if(!h&&l.update(e,n,r,i))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(l,e,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=Wl,f.updateChildren(i,s+1),f.dirty=Mi),this.changed=!0,this.index++,!0;break}}return!1}
vendor: 6,166 bytes, line 613
613recreateWrapper(e,n,r,i,o,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!yy(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=Ka.create(this.top,n,r,i,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,i,o){let s=Ka.create(this.top,e,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new d6(this.top,e,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Ac;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Yx)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((ar||Kn)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new f6(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function aoe(t,e){let n=e,r=n.children.length,i=t.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof Ac)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}function loe(t,e){return t.type.side-e.type.side}function coe(t,e,n,r){let i=e.locals(t),o=0;if(i.length==0){for(let c=0;c<t.childCount;c++){let d=t.child(c);r(d,i,e.forChild(o,d),c),o+=d.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let d,f;for(;s<i.length&&i[s].to==o;){let v=i[s++];v.widget&&(d?(f||(f=[d])).push(v):d=v)}if(d)if(f){f.sort(loe);for(let v=0;v<f.length;v++)n(f[v],c,!!l)}else n(d,c,!!l);let h,p;if(l)p=-1,h=l,l=null;else if(c<t.childCount)p=c,h=t.child(c++);else break;for(let v=0;v<a.length;v++)a[v].to<=o&&a.splice(v--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let g=o+h.nodeSize;if(h.isText){let v=g;s<i.length&&i[s].from<v&&(v=i[s].from);for(let y=0;y<a.length;y++)a[y].to<v&&(v=a[y].to);v<g&&(l=h.cut(v-o),h=h.cut(0,v-o),g=v,p=-1)}else for(;s<i.length&&i[s].to<g;)s++;let m=h.isInline&&!h.isLeaf?a.filter(v=>!v.inline):a.slice();r(h,m,e.forChild(o,h),p),o=g}}function uoe(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function doe(t,e,n,r){for(let i=0,o=0;i<t.childCount&&o<=r;){let s=t.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<t.childCount;){let c=t.child(i++);if(o+=c.nodeSize,!c.isText)break;l+=c.text}if(o>=n){if(o>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let c=a<r?l.lastIndexOf(e,r-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function vE(t,e,n,r,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],c=a,d=a+=l.size;c>=n||d<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,r)),i&&(o.push(i),i=void 0),d>n&&o.push(l.slice(n-c,l.size,r)))}return o}function tA(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,c;if(Jx(n)){for(l=s;i&&!i.node;)i=i.parent;let f=i.node;if(i&&f.isAtom&&Te.isSelectable(f)&&i.parent&&!(f.isInline&&Lie(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;c=new Te(s==h?a:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=s,h=s;for(let p=0;p<n.rangeCount;p++){let g=n.getRangeAt(p);f=Math.min(f,t.docView.posFromDOM(g.startContainer,g.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(g.endContainer,g.endOffset,-1))}if(f<0)return null;[l,s]=h==t.state.selection.anchor?[h,f]:[f,h],a=r.resolve(s)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let d=r.resolve(l);if(!c){let f=e=="pointer"||t.state.selection.head<a.pos&&!o?1:-1;c=nA(t,d,a,f)}return c}function g6(t){return t.editable?t.hasFocus():y6(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function js(t,e=!1){let n=t.state.selection;if(v6(t,n),!!g6(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Kn){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&_c(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)hoe(t);else{let{anchor:r,head:i}=n,o,s;jP&&!(n instanceof Re)&&(n.$from.parent.inlineContent||(o=TP(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=TP(t,n.to))),t.docView.setSelection(r,i,t,e),jP&&(o&&_P(o),s&&_P(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&foe(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const jP=ar||Kn&&r6<63;function TP(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(ar&&i&&i.contentEditable=="false")return M1(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return M1(i);if(o)return M1(o)}}function M1(t){return t.contentEditable="true",ar&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function _P(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function foe(t){let e=t.dom.ownerDocument;
vendor: 8,195 bytes, lines 613-616
613e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!g6(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function hoe(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,Wn(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&qr&&Ha<=11&&(n.disabled=!0,n.disabled=!1)}function v6(t,e){if(e instanceof Te){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(AP(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else AP(t)}function AP(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function nA(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||Re.between(e,n,r)}function NP(t){return t.editable&&!t.hasFocus()?!1:y6(t)}function y6(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function poe(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return _c(e.node,e.offset,n.anchorNode,n.anchorOffset)}function yE(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&He.findFrom(o,e)}function ca(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function CP(t,e,n){let r=t.state.selection;if(r instanceof Re)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return ca(t,new Re(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=yE(t.state,e);return i&&i instanceof Te?ca(t,i):!1}else if(!(bi&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let a=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=t.docView.descAt(a))&&!s.contentDOM?Te.isSelectable(o)?ca(t,new Te(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):Rm?ca(t,new Re(t.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Te&&r.node.isInline)return ca(t,new Re(e>0?r.$to:r.$from));{let i=yE(t.state,e);return i?ca(t,i):!1}}}function by(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ch(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function iu(t,e){return e<0?moe(t):goe(t)}function moe(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,s=!1;for(Pi&&n.nodeType==1&&r<by(n)&&Ch(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Ch(a,-1))i=n,o=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(b6(n))break;{let a=n.previousSibling;for(;a&&Ch(a,-1);)i=n.parentNode,o=Wn(a),a=a.previousSibling;if(a)n=a,r=by(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?bE(t,n,r):i&&bE(t,i,o)}function goe(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i=by(n),o,s;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Ch(a,1))o=n,s=++r;else break}else{if(b6(n))break;{let a=n.nextSibling;for(;a&&Ch(a,1);)o=a.parentNode,s=Wn(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=by(n);else{if(n=n.parentNode,n==t.dom)break;r=i=0}}}o&&bE(t,o,s)}function b6(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function voe(t,e){for(;t&&e==t.childNodes.length&&!Mm(t);)e=Wn(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function yoe(t,e){for(;t&&!e&&!Mm(t);)e=Wn(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function bE(t,e,n){if(e.nodeType!=3){let o,s;(s=voe(e,n))?(e=s,n=0):(o=yoe(e,n))&&(e=o,n=o.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Jx(r)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&js(t)},50)}function OP(t,e){let n=t.state.doc.resolve(e);if(!(Kn||i6)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function PP(t,e,n){let r=t.state.selection;if(r instanceof Re&&!r.empty||n.indexOf("s")>-1||bi&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=yE(t.state,e);if(s&&s instanceof Te)return ca(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof Oi?He.near(s,e):He.findFrom(s,e);return a?ca(t,a):!1}return!1}function MP(t,e){if(!(t.state.selection instanceof Re))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=t.state.tr;return e<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),t.dispatch(s),!0}return!1}function RP(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function boe(t){if(!ar||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;RP(t,r,"true"),setTimeout(()=>RP(t,r,"false"),20)}return!1}function xoe(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function woe(t,e){let n=e.keyCode,r=xoe(e);if(n==8||bi&&n==72&&r=="c")return MP(t,-1)||iu(t,-1);if(n==46&&!e.shiftKey||bi&&n==68&&r=="c")return MP(t,1)||iu(t,1);if(n==13||n==27)return!0;if(n==37||bi&&n==66&&r=="c"){let i=n==37?OP(t,t.state.selection.from)=="ltr"?-1:1:-1;return CP(t,i,r)||iu(t,i)}else if(n==39||bi&&n==70&&r=="c"){let i=n==39?OP(t,t.state.selection.from)=="ltr"?1:-1:1;return CP(t,i,r)||iu(t,i)}else{if(n==38||bi&&n==80&&r=="c")return PP(t,-1,r)||iu(t,-1);if(n==40||bi&&n==78&&r=="c")return boe(t)||PP(t,1,r)||iu(t,1);if(r==(bi?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function rA(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||Bc.fromSchema(t.state.schema),a=j6(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c=l.firstChild,d,f=0;for(;c&&c.nodeType==1&&(d=E6[c.nodeName.toLowerCase()]);){for(let p=d.length-1;p>=0;p--){let g=a.createElement(d[p]);for(;l.firstChild;)g.appendChild(l.firstChild);l.appendChild(g),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,` 614 615`);return{dom:l,text:h,slice:e}}function x6(t,e,n,r,i){let o=i.parent.type.spec.code,s,a;if(!n&&!e)return null;let l=!!e&&(r||o||!n);if(l){if(t.someProp("transformPastedText",h=>{e=h(e,o||r,t)}),o)return a=new he(Q.from(t.state.schema.text(e.replace(/\r\n?/g,` 616`))),0,0),t.someProp("transformPasted",h=>{a=h(a,t,!0)}),a;let f=t.someProp("clipboardTextParser",h=>h(e,i,r,t));if(f)a=f;else{let h=i.marks(),{schema:p}=t.state,g=Bc.fromSchema(p);
vendor: 13,739 bytes, line 616
616s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let v=s.appendChild(document.createElement("p"));m&&v.appendChild(g.serializeNode(p.text(m,h)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),s=joe(n),Rm&&Toe(s);let c=s&&s.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||_h.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||d),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!Soe.test(h.parentNode.nodeName)?{ignore:!0}:null}})),d)a=_oe(IP(a,+d[1],+d[2]),d[4]);else if(a=he.maxOpen(koe(a.content,i),!0),a.openStart||a.openEnd){let f=0,h=0;for(let p=a.content.firstChild;f<a.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=a.content.lastChild;h<a.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);a=IP(a,f,h)}return t.someProp("transformPasted",f=>{a=f(a,t,l)}),a}const Soe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function koe(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),o,s=[];if(t.forEach(a=>{if(!s)return;let l=i.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&o.length&&S6(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=k6(s[s.length-1],o.length));let d=w6(a,l);s.push(d),i=i.matchType(d.type),o=l}}),s)return Q.from(s)}return t}function w6(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Q.from(t));return t}function S6(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=S6(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(Q.from(w6(n,t,i+1))))}}function k6(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,k6(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Q.empty,!0);return t.copy(n.append(r))}function xE(t,e,n,r,i,o){let s=e<0?t.firstChild:t.lastChild,a=s.content;return t.childCount>1&&(o=0),i<r-1&&(a=xE(a,e,n,r,i+1,o)),i>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Q.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function IP(t,e,n){return e<t.openStart&&(t=new he(xE(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new he(xE(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const E6={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let DP=null;function j6(){return DP||(DP=document.implementation.createHTMLDocument("title"))}let R1=null;function Eoe(t){let e=window.trustedTypes;return e?(R1||(R1=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),R1.createHTML(t)):t}function joe(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=j6().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),i;if((i=r&&E6[r[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=Eoe(t),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function Toe(t){let e=t.querySelectorAll(Kn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent=="Â "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function _oe(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:i,openStart:o,openEnd:s}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=Q.from(l.create(r[a+1],i)),o++,s++}return new he(i,o,s)}const kr={},Er={},Aoe={touchstart:!0,touchmove:!0};class Noe{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Coe(t){for(let e in kr){let n=kr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Poe(t,r)&&!iA(t,r)&&(t.editable||!(r.type in Er))&&n(t,r)},Aoe[e]?{passive:!0}:void 0)}ar&&t.dom.addEventListener("input",()=>null),wE(t)}function Ca(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Ooe(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function wE(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>iA(t,r))})}function iA(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function Poe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function Moe(t,e){!iA(t,e)&&kr[e.type]&&(t.editable||!(e.type in Er))&&kr[e.type](t,e)}Er.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!_6(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(ys&&Kn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),bd&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,Bl(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||woe(t,n)?n.preventDefault():Ca(t,"key")};Er.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Er.keypress=(t,e)=>{let n=e;if(_6(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||bi&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Re)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),o=()=>t.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,i,o))&&t.dispatch(o()),n.preventDefault()}};function Xx(t){return{left:t.clientX,top:t.clientY}}function Roe(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function oA(t,e,n,r,i){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,a=>s>o.depth?a(t,n,o.nodeAfter,o.before(s),i,!0):a(t,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function Gu(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function Ioe(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Te.isSelectable(r)?(Gu(t,new Te(n)),!0):!1}function Doe(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof Te&&(r=n.node);let o=t.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(Te.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(s);break}}return i!=null?(Gu(t,Te.create(t.state.doc,i)),!0):!1}function $oe(t,e,n,r,i){return oA(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(i?Doe(t,n):Ioe(t,n))}function Loe(t,e,n,r){return oA(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function Boe(t,e,n,r){return oA(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||zoe(t,n,r)}function zoe(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Gu(t,Re.create(r,0,r.content.size)),!0):!1;let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)Gu(t,Re.create(r,a+1,a+1+s.content.size));else if(Te.isSelectable(s))Gu(t,Te.create(r,a));else continue;return!0}}function sA(t){return xy(t)}const T6=bi?"metaKey":"ctrlKey";kr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=sA(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&Roe(n,t.input.lastClick)&&!n[T6]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o,button:n.button};let s=t.posAtCoords(Xx(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Foe(t,s,n,!!r)):(o=="doubleClick"?Loe:Boe)(t,s.pos,s.inside,n)?n.preventDefault():Ca(t,"pointer"))};class Foe{constructor(e,n,r,i){this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[T6],this.allowDefault=r.shiftKey;let o,s;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let d=e.state.doc.resolve(n.pos);o=d.parent,s=d.depth?d.before():0}const a=i?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=e.state;r.button==0&&(o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof Te&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Pi&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ca(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>js(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Xx(e))),this.updateAllowDefault(e),this.allowDefault||!n?Ca(this.view,"pointer"):$oe(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ar&&this.mightDrag&&!this.mightDrag.node.isAtom||Kn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Gu(this.view,He.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Ca(this.view,"pointer")}move(e){this.updateAllowDefault(e),Ca(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}kr.touchstart=t=>{t.input.lastTouch=Date.now(),sA(t),Ca(t,"pointer")};kr.touchmove=t=>{t.input.lastTouch=Date.now(),Ca(t,"pointer")};kr.contextmenu=t=>sA(t);function _6(t,e){return t.composing?!0:ar&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const qoe=ys?5e3:-1;Er.compositionstart=Er.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Re&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Kn&&i6&&Uoe(t)))t.markCursor=t.state.storedMarks||n.marks(),xy(t,!0),t.markCursor=null;else if(xy(t,!e.selection.empty),Pi&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=t.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}t.input.composing=!0}A6(t,qoe)};function Uoe(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Er.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,A6(t,20))};function A6(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>xy(t),e))}function N6(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Woe());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Voe(t){let e=t.domSelectionRange();if(!e.focusNode)return null;
vendor: 4,633 bytes, line 616
616let n=Die(e.focusNode,e.focusOffset),r=$ie(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function Woe(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function xy(t,e=!1){if(!(ys&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),N6(t),e||t.docView&&t.docView.dirty){let n=tA(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function Hoe(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Cp=qr&&Ha<15||bd&&Fie<604;kr.copy=Er.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=Cp?null:n.clipboardData,s=r.content(),{dom:a,text:l}=rA(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):Hoe(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Koe(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Goe(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Op(t,r.value,null,i,e):Op(t,r.textContent,r.innerHTML,i,e)},50)}function Op(t,e,n,r,i){let o=x6(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||he.empty)))return!0;if(!o)return!1;let s=Koe(o),a=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function C6(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Er.paste=(t,e)=>{let n=e;if(t.composing&&!ys)return;let r=Cp?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Op(t,C6(r),r.getData("text/html"),i,n)?n.preventDefault():Goe(t,n)};class O6{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Joe=bi?"altKey":"ctrlKey";function P6(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[Joe]}kr.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(Xx(n)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof Te?i.to-1:i.to))){if(r&&r.mightDrag)s=Te.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(s=Te.create(t.state.doc,f.posBefore))}}let a=(s||t.state.selection).content(),{dom:l,text:c,slice:d}=rA(t,a);(!n.dataTransfer.files.length||!Kn||r6>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Cp?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Cp||n.dataTransfer.setData("text/plain",c),t.dragging=new O6(d,P6(t,n),s)};kr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Er.dragover=Er.dragenter=(t,e)=>e.preventDefault();Er.drop=(t,e)=>{try{Yoe(t,e,t.dragging)}finally{t.dragging=null}};function Yoe(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(Xx(e));if(!r)return;let i=t.state.doc.resolve(r.pos),o=n&&n.slice;o?t.someProp("transformPasted",p=>{o=p(o,t,!1)}):o=x6(t,C6(e.dataTransfer),Cp?null:e.dataTransfer.getData("text/html"),!1,i);let s=!!(n&&P6(t,e));if(t.someProp("handleDrop",p=>p(t,e,o||he.empty,s))){e.preventDefault();return}if(!o)return;e.preventDefault();let a=o?qz(t.state.doc,i.pos,o):i.pos;a==null&&(a=i.pos);let l=t.state.tr;if(s){let{node:p}=n;p?p.replace(l):l.deleteSelection()}let c=l.mapping.map(a),d=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,f=l.doc;if(d?l.replaceRangeWith(c,c,o.content.firstChild):l.replaceRange(c,c,o),l.doc.eq(f))return;let h=l.doc.resolve(c);
vendor: 9,658 bytes, line 616
616if(d&&Te.isSelectable(o.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new Te(h));else{let p=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((g,m,v,y)=>p=y),l.setSelection(nA(t,h,l.doc.resolve(p)))}t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}kr.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&js(t)},20))};kr.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};kr.beforeinput=(t,e)=>{if(Kn&&ys&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,Bl(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in Er)kr[t]=Er[t];function Pp(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class wy{constructor(e,n){this.toDOM=e,this.spec=n||hc,this.side=this.spec.side||0}map(e,n,r,i){let{pos:o,deleted:s}=e.mapResult(n.from+i,this.side<0?-1:1);return s?null:new mr(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof wy&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Pp(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Ga{constructor(e,n){this.attrs=e,this.spec=n||hc}map(e,n,r,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new mr(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Ga&&Pp(this.attrs,e.attrs)&&Pp(this.spec,e.spec)}static is(e){return e.type instanceof Ga}destroy(){}}class aA{constructor(e,n){this.attrs=e,this.spec=n||hc}map(e,n,r,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let s=e.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new mr(o.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),o;return i==n.from&&!(o=e.child(r)).isText&&i+o.nodeSize==n.to}eq(e){return this==e||e instanceof aA&&Pp(this.attrs,e.attrs)&&Pp(this.spec,e.spec)}destroy(){}}class mr{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new mr(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new mr(e,e,new wy(n,r))}static inline(e,n,r,i){return new mr(e,n,new Ga(r,i))}static node(e,n,r,i){return new mr(e,n,new aA(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Ga}get widget(){return this.type instanceof wy}}const fu=[],hc={};class Lt{constructor(e,n){this.local=e.length?e:fu,this.children=n.length?n:fu}static create(e,n){return n.length?Sy(n,e,0,hc):nr}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,n-a,r,i+a,o)}}map(e,n,r){return this==nr||e.maps.length==0?this:this.mapInner(e,n,0,0,r||hc)}mapInner(e,n,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,i);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?Xoe(this.children,s||[],e,n,r,i,o):s?new Lt(s.sort(pc),fu):nr}add(e,n){return n.length?this==nr?Lt.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,o=0;e.forEach((a,l)=>{let c=l+r,d;if(d=R6(n,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,d,c+1):i.splice(o,0,l,l+a.nodeSize,Sy(d,a,c+1,hc)),o+=3}});let s=M6(o?I6(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Lt(s.length?this.local.concat(s).sort(pc):this.local,i||this.children)}remove(e){return e.length==0||this==nr?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let d=0,f;d<e.length;d++)(f=e[d])&&f.from>a&&f.to<l&&(e[d]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let c=r[o+2].removeInner(s,a+1);c!=nr?r[o+2]=c:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<e.length;o++)if(s=e[o])for(let a=0;a<i.length;a++)i[a].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Lt(i,r):nr}forChild(e,n){if(this==nr)return this;if(n.isLeaf)return Lt.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let o=e+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof Ga){let c=Math.max(o,l.from)-o,d=Math.min(s,l.to)-o;c<d&&(i||(i=[])).push(l.copy(c,d))}}if(i){let a=new Lt(i.sort(pc),fu);return r?new ya([a,r]):a}return r||nr}eq(e){if(this==e)return!0;if(!(e instanceof Lt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return lA(this.localsInner(e))}localsInner(e){if(this==nr)return fu;if(e.inlineContent||!this.local.some(Ga.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Ga||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Lt.empty=new Lt([],[]);Lt.removeOverlap=lA;const nr=Lt.empty;class ya{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,hc));return ya.from(r)}forChild(e,n){if(n.isLeaf)return Lt.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=nr&&(o instanceof ya?r=r.concat(o.members):r.push(o))}return ya.from(r)}eq(e){if(!(e instanceof ya)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!n)n=o;else{r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?lA(r?n:n.sort(pc)):fu}static from(e){switch(e.length){case 0:return nr;case 1:return e[0];default:return new ya(e.every(n=>n instanceof Lt)?e:e.reduce((n,r)=>n.concat(r instanceof Lt?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function Xoe(t,e,n,r,i,o,s){let a=t.slice();for(let c=0,d=o;c<n.maps.length;c++){let f=0;n.maps[c].forEach((h,p,g,m)=>{let v=m-g-(p-h);for(let y=0;y<a.length;y+=3){let b=a[y+1];if(b<0||h>b+d-f)continue;let x=a[y]+d-f;p>=x?a[y+1]=h<=x?-2:-1:h>=d&&v&&(a[y]+=v,a[y+1]+=v)}f+=v}),d=n.maps[c].map(d,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let d=n.map(t[c]+o),f=d-i;if(f<0||f>=r.content.size){l=!0;continue}let h=n.map(t[c+1]+o,-1),p=h-i,{index:g,offset:m}=r.content.findIndex(f),v=r.maybeChild(g);if(v&&m==f&&m+v.nodeSize==p){let y=a[c+2].mapInner(n,v,d+1,t[c]+o+1,s);y!=nr?(a[c]=f,a[c+1]=p,a[c+2]=y):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=Qoe(a,t,e,n,i,o,s),d=Sy(c,r,0,s);e=d.local;for(let f=0;f<a.length;f+=3)a[f+1]<0&&(a.splice(f,3),f-=3);for(let f=0,h=0;f<d.children.length;f+=3){let p=d.children[f];for(;h<a.length&&a[h]<p;)h+=3;a.splice(h,0,d.children[f],d.children[f+1],d.children[f+2])}}return new Lt(e.sort(pc),a)}function M6(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new mr(i.from+e,i.to+e,i.type))}return n}function Qoe(t,e,n,r,i,o,s){function a(l,c){for(let d=0;d<l.local.length;d++){let f=l.local[d].map(r,i,c);f?n.push(f):s.onRemove&&s.onRemove(l.local[d].spec)}for(let d=0;d<l.children.length;d+=3)a(l.children[d+2],l.children[d]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+o+1);return n}function R6(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o=0,s;o<t.length;o++)(s=t[o])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),t[o]=null);return i}function I6(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Sy(t,e,n,r){let i=[],o=!1;e.forEach((a,l)=>{let c=R6(t,a,l+n);if(c){o=!0;let d=Sy(c,a,n+l+1,r);d!=nr&&i.push(l,l+a.nodeSize,d)}});let s=M6(o?I6(t):t,-n).sort(pc);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Lt(s,i):nr}function pc(t,e){return t.from-e.from||t.to-e.to}function lA(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from==r.from){o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),$P(e,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),$P(e,i,r.copy(o.from,r.to)));break}}}return e}function $P(t,e,n){for(;e<t.length&&pc(n,t[e])>0;)e++;t.splice(e,0,n)}function I1(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=nr&&e.push(r)}
vendor: 10,386 bytes, line 616
616),t.cursorWrapper&&e.push(Lt.create(t.state.doc,[t.cursorWrapper.deco])),ya.from(e)}const Zoe={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ese=qr&&Ha<=11;class tse{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class nse{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new tse,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);qr&&Ha<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():ar&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),ese&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Zoe)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(NP(this.view)){if(this.suppressingSelectionUpdates)return js(this.view);if(qr&&Ha<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&_c(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let o=e.focusNode;o;o=yd(o))n.add(o);for(let o=e.anchorNode;o;o=yd(o))if(n.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&NP(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let d=0;d<n.length;d++){let f=this.registerMutation(n[d],l);f&&(o=o<0?f.from:Math.min(f.from,o),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(a=!0))}if(l.some(d=>d.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let d of l)if(d.nodeName=="BR"&&d.parentNode){let f=d.nextSibling;for(;f&&f.nodeType==1;){if(f.contentEditable=="false"){d.parentNode.removeChild(d);break}f=f.firstChild}}}else if(Pi&&l.length){let d=l.filter(f=>f.nodeName=="BR");if(d.length==2){let[f,h]=d;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of d){let p=h.parentNode;p&&p.nodeName=="LI"&&(!f||ose(e,f)!=p)&&h.remove()}}}let c=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Jx(r)&&(c=tA(e))&&c.eq(He.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,js(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),rse(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,sse(e,l)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||js(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let f=e.addedNodes[d];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(qr&&Ha<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:f,nextSibling:h}=e.addedNodes[d];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let s=i&&i.parentNode==e.target?Wn(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?Wn(o):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let LP=new WeakMap,BP=!1;function rse(t){if(!LP.has(t)&&(LP.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Pi,BP)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),BP=!0}}function zP(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return _c(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function ise(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return zP(t,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?zP(t,n):null}function ose(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function sse(t,e){var n;let{focusNode:r,focusOffset:i}=t.domSelectionRange();for(let o of e)if(((n=o.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=o.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let a=s;for(;;){let l=a.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;a=l}a.insertBefore(o,a.firstChild),r==o&&t.domSelection().collapse(o,i)}else o.parentNode.removeChild(o)}}function ase(t,e,n){let{node:r,fromOffset:i,toOffset:o,from:s,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,d=l.anchorNode;if(d&&t.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:l.anchorOffset}],Jx(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Kn&&t.input.lastKeyCode===8)for(let v=o;v>i;v--){let y=r.childNodes[v-1],b=y.pmViewDesc;if(y.nodeName=="BR"&&!b){o=v;break}if(!b||b.size)break}let f=t.state.doc,h=t.someProp("domParser")||_h.fromSchema(t.state.schema),p=f.resolve(s),g=null,m=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:o,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:lse,context:p});if(c&&c[0].pos!=null){let v=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=v),g={anchor:v+s,head:y+s}}return{doc:m,sel:g,from:s,to:a}}function lse(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(ar&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||ar&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const cse=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function use(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let j=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,T=tA(t,j);if(T&&!t.state.selection.eq(T)){if(Kn&&ys&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",N=>N(t,Bl(13,"Enter"))))return;let _=t.state.tr.setSelection(T);j=="pointer"?_.setMeta("pointer",!0):j=="key"&&_.scrollIntoView(),o&&_.setMeta("composition",o),t.dispatch(_)}return}let s=t.state.doc.resolve(e),a=s.sharedDepth(n);e=s.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=ase(t,e,n),d=t.state.doc,f=d.slice(c.from,c.to),h,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,p="end"):(h=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let g=hse(f.content,c.doc.content,c.from,h,p);if(g&&t.input.domChangeCount++,(bd&&t.input.lastIOSEnter>Date.now()-225||ys)&&i.some(j=>j.nodeType==1&&!cse.test(j.nodeName))&&(!g||g.endA>=g.endB)&&t.someProp("handleKeyDown",j=>j(t,Bl(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!g)if(r&&l instanceof Re&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head)
vendor: 4,138 bytes, line 616
616)g={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let j=FP(t,t.state.doc,c.sel);if(j&&!j.eq(t.state.selection)){let T=t.state.tr.setSelection(j);o&&T.setMeta("composition",o),t.dispatch(T)}}return}t.state.selection.from<t.state.selection.to&&g.start==g.endB&&t.state.selection instanceof Re&&(g.start>t.state.selection.from&&g.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?g.start=t.state.selection.from:g.endA<t.state.selection.to&&g.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(g.endB+=t.state.selection.to-g.endA,g.endA=t.state.selection.to)),qr&&Ha<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>c.from&&c.doc.textBetween(g.start-c.from-1,g.start-c.from+1)==" Â "&&(g.start--,g.endA--,g.endB--);let m=c.doc.resolveNoCache(g.start-c.from),v=c.doc.resolveNoCache(g.endB-c.from),y=d.resolve(g.start),b=m.sameParent(v)&&m.parent.inlineContent&&y.end()>=g.endA;if((bd&&t.input.lastIOSEnter>Date.now()-225&&(!b||i.some(j=>j.nodeName=="DIV"||j.nodeName=="P"))||!b&&m.pos<c.doc.content.size&&(!m.sameParent(v)||!m.parent.inlineContent)&&m.pos<v.pos&&!/\S/.test(c.doc.textBetween(m.pos,v.pos,"","")))&&t.someProp("handleKeyDown",j=>j(t,Bl(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>g.start&&fse(d,g.start,g.endA,m,v)&&t.someProp("handleKeyDown",j=>j(t,Bl(8,"Backspace")))){ys&&Kn&&t.domObserver.suppressSelectionUpdates();return}Kn&&g.endB==g.start&&(t.input.lastChromeDelete=Date.now()),ys&&!b&&m.start()!=v.start()&&v.parentOffset==0&&m.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==g.endA&&(g.endB-=2,v=c.doc.resolveNoCache(g.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(j){return j(t,Bl(13,"Enter"))})},20));let x=g.start,S=g.endA,w=j=>{let T=j||t.state.tr.replace(x,S,c.doc.slice(g.start-c.from,g.endB-c.from));if(c.sel){let _=FP(t,T.doc,c.sel);_&&!(Kn&&t.composing&&_.empty&&(g.start!=g.endB||t.input.lastChromeDelete<Date.now()-100)&&(_.head==x||_.head==T.mapping.map(S)-1)||qr&&_.empty&&_.head==x)&&T.setSelection(_)}return o&&T.setMeta("composition",o),T.scrollIntoView()},k;if(b)if(m.pos==v.pos){qr&&Ha<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>js(t),20));let j=w(t.state.tr.delete(x,S)),T=d.resolve(g.start).marksAcross(d.resolve(g.endA));T&&j.ensureMarks(T),t.dispatch(j)}else if(g.endA==g.endB&&(k=dse(m.parent.content.cut(m.parentOffset,v.parentOffset),y.parent.content.cut(y.parentOffset,g.endA-y.start())))){let j=w(t.state.tr);k.type=="add"?j.addMark(x,S,k.mark):j.removeMark(x,S,k.mark),t.dispatch(j)}else if(m.parent.child(m.index()).isText&&m.index()==v.index()-(v.textOffset?0:1)){let j=m.parent.textBetween(m.parentOffset,v.parentOffset),T=()=>w(t.state.tr.insertText(j,x,S));t.someProp("handleTextInput",_=>_(t,x,S,j,T))||t.dispatch(T())}else t.dispatch(w());else t.dispatch(w())}function FP(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:nA(t,e.resolve(n.anchor),e.resolve(n.head))}function dse(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,o=r,s,a,l;for(let d=0;d<r.length;d++)i=r[d].removeFromSet(i);for(let d=0;d<n.length;d++)o=n[d].removeFromSet(o);if(i.length==1&&o.length==0)a=i[0],s="add",l=d=>d.mark(a.addToSet(d.marks));else if(i.length==0&&o.length==1)a=o[0],s="remove",l=d=>d.mark(a.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<e.childCount;d++)c.push(l(e.child(d)));if(Q.from(c).eq(t))return{mark:a,type:s}}function fse(t,e,n,r,i){if(n-e<=i.pos-r.pos||D1(r,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!r.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==e+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(D1(o,!0,!0));return!s.parent.isTextblock||s.pos>n||D1(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function D1(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function hse(t,e,n,r,i){let o=t.findDiffStart(e,n);if(o==null)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);
vendor: 4,459 bytes, line 616
616if(i=="end"){let l=Math.max(0,o-Math.min(s,a));r-=s+l-o}if(s<o&&t.size<e.size){let l=r<=o&&r>=s?o-r:0;o-=l,o&&o<e.size&&qP(e.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-s),s=o}else if(a<o){let l=r<=o&&r>=a?o-r:0;o-=l,o&&o<t.size&&qP(t.textBetween(o-1,o+1))&&(o+=l?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}function qP(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class D6{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Noe,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(KP),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=WP(this),VP(this),this.nodeViews=HP(this),this.docView=kP(this.state.doc,UP(this),I1(this),this.dom,this),this.domObserver=new nse(this,(r,i,o,s)=>use(this,r,i,o,s)),this.domObserver.start(),Coe(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&wE(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(KP),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(N6(this),s=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=HP(this);mse(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&wE(this),this.editable=WP(this),VP(this);let l=I1(this),c=UP(this),d=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(e.doc,c,l);(f||!e.selection.eq(i.selection))&&(s=!0);let h=d=="preserve"&&s&&this.dom.style.overflowAnchor==null&&Vie(this);if(s){this.domObserver.stop();let p=f&&(qr||Kn)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&pse(i.selection,e.selection);if(f){let g=Kn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Voe(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=kP(e.doc,c,l,this.dom,this)),g&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&poe(this))?js(this,p):(v6(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():h&&Wie(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Te){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&vP(this,n.getBoundingClientRect(),e)}else vP(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,i=-1;
vendor: 6,082 bytes, line 616
616if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&o<this.state.doc.content.size&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new O6(e.slice,e.move,i<0?void 0:Te.create(this.state.doc,i))}someProp(e,n){let r=this._props&&this._props[e],i;if(r!=null&&(i=n?n(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(i=n?n(a):a))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[e];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(qr){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Hie(this.dom),js(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Xie(this,e)}coordsAtPos(e,n=1){return c6(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return noe(this,n||this.state,e)}pasteHTML(e,n){return Op(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Op(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return rA(this,e)}destroy(){this.docView&&(Ooe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],I1(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Rie())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Moe(this,e)}domSelectionRange(){let e=this.domSelection();return e?ar&&this.root.nodeType===11&&Bie(this.dom.ownerDocument)==this.dom&&ise(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}D6.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function UP(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[mr.node(0,t.state.doc.content.size,e)]}function VP(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:mr.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function WP(t){return!t.someProp("editable",e=>e(t.state)===!1)}function pse(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function HP(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function mse(t,e){let n=0,r=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)r++;return n!=r}function KP(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var rl={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ky={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},gse=typeof navigator<"u"&&/Mac/.test(navigator.platform),vse=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Hn=0;Hn<10;Hn++)rl[48+Hn]=rl[96+Hn]=String(Hn);for(var Hn=1;Hn<=24;Hn++)rl[Hn+111]="F"+Hn;for(var Hn=65;Hn<=90;Hn++)rl[Hn]=String.fromCharCode(Hn+32),ky[Hn]=String.fromCharCode(Hn);for(var $1 in rl)ky.hasOwnProperty($1)||(ky[$1]=rl[$1]);function yse(t){var e=gse&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||vse&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?ky:rl)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const bse=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),xse=typeof navigator<"u"&&/Win/.test(navigator.platform);function wse(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))bse?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function Sse(t){let e=Object.create(null);for(let n in t)e[wse(n)]=t[n];return e}
vendor: 17,801 bytes, line 616
616function L1(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function kse(t){return new Ut({props:{handleKeyDown:$6(t)}})}function $6(t){let e=Sse(t);return function(n,r){let i=yse(r),o,s=e[L1(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=e[L1(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(xse&&r.ctrlKey&&r.altKey)&&(o=rl[r.keyCode])&&o!=i){let a=e[L1(o,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var Ese=Object.defineProperty,cA=(t,e)=>{for(var n in e)Ese(t,n,{get:e[n],enumerable:!0})};function Qx(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}var Zx=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([s,a])=>[s,(...c)=>{const d=a(...c)(o);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s=[],a=!!t,l=t||i.tr,c=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(l),s.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(n).map(([f,h])=>[f,(...g)=>{const m=this.buildProps(l,e),v=h(...g)(m);return s.push(v),d}])),run:c};return d}createCan(t){const{rawCommands:e,state:n}=this,r=!1,i=t||n.tr,o=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...c)=>l(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s={tr:t,editor:r,view:o,state:Qx({state:i,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)(s)]))}};return s}},L6={};cA(L6,{blur:()=>jse,clearContent:()=>Tse,clearNodes:()=>_se,command:()=>Ase,createParagraphNear:()=>Nse,cut:()=>Cse,deleteCurrentNode:()=>Ose,deleteNode:()=>Pse,deleteRange:()=>Mse,deleteSelection:()=>Rse,enter:()=>Ise,exitCode:()=>Dse,extendMarkRange:()=>$se,first:()=>Lse,focus:()=>zse,forEach:()=>Fse,insertContent:()=>qse,insertContentAt:()=>Wse,joinBackward:()=>Gse,joinDown:()=>Kse,joinForward:()=>Jse,joinItemBackward:()=>Yse,joinItemForward:()=>Xse,joinTextblockBackward:()=>Qse,joinTextblockForward:()=>Zse,joinUp:()=>Hse,keyboardShortcut:()=>tae,lift:()=>nae,liftEmptyBlock:()=>rae,liftListItem:()=>iae,newlineInCode:()=>oae,resetAttributes:()=>sae,scrollIntoView:()=>aae,selectAll:()=>lae,selectNodeBackward:()=>cae,selectNodeForward:()=>uae,selectParentNode:()=>dae,selectTextblockEnd:()=>fae,selectTextblockStart:()=>hae,setContent:()=>pae,setMark:()=>Iae,setMeta:()=>Dae,setNode:()=>$ae,setNodeSelection:()=>Lae,setTextDirection:()=>Bae,setTextSelection:()=>zae,sinkListItem:()=>Fae,splitBlock:()=>qae,splitListItem:()=>Uae,toggleList:()=>Wae,toggleMark:()=>Hae,toggleNode:()=>Kae,toggleWrap:()=>Gae,undoInputRule:()=>Jae,unsetAllMarks:()=>Yae,unsetMark:()=>Xae,unsetTextDirection:()=>Qae,updateAttributes:()=>Zae,wrapIn:()=>ele,wrapInList:()=>tle});var jse=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),Tse=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),_se=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:s})=>{t.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:d}=e,f=c.resolve(d.map(l)),h=c.resolve(d.map(l+a.nodeSize)),p=f.blockRange(h);if(!p)return;const g=cf(p);if(a.type.isTextblock){const{defaultType:m}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(p.start,m)}(g||g===0)&&e.lift(p,g)})}),!0},Ase=t=>e=>t(e),Nse=()=>({state:t,dispatch:e})=>xie(t,e),Cse=(t,e)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const s=r.mapping.map(e);return r.insert(s,o.content),r.setSelection(new Re(r.doc.resolve(Math.max(s-1,0)))),!0},Ose=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const i=t.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(e){const a=i.before(o),l=i.after(o);t.delete(a,l).scrollIntoView()}return!0}return!1};function bn(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var Pse=t=>({tr:e,state:n,dispatch:r})=>{const i=bn(t,n.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const l=o.before(s),c=o.after(s);e.delete(l,c).scrollIntoView()}return!0}return!1},Mse=t=>({tr:e,dispatch:n})=>{const{from:r,to:i}=t;return n&&e.delete(r,i),!0},Rse=()=>({state:t,dispatch:e})=>lie(t,e),Ise=()=>({commands:t})=>t.keyboardShortcut("Enter"),Dse=()=>({state:t,dispatch:e})=>bie(t,e);function uA(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Ey(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>n.strict?e[i]===t[i]:uA(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function B6(t,e,n={}){return t.find(r=>r.type===e&&Ey(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function GP(t,e,n={}){return!!B6(t,e,n)}function dA(t,e,n){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if((!r.node||!r.node.marks.some(c=>c.type===e))&&(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(c=>c.type===e))return;if(!n){const c=r.node.marks.find(d=>d.type===e);c&&(n=c.attrs)}if(!B6([...r.node.marks],e,n))return;let o=r.index,s=t.start()+r.offset,a=o+1,l=s+r.node.nodeSize;for(;o>0&&GP([...t.parent.child(o-1).marks],e,n);)o-=1,s-=t.parent.child(o).nodeSize;for(;a<t.parent.childCount&&GP([...t.parent.child(a).marks],e,n);)l+=t.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function Ks(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var $se=(t,e)=>({tr:n,state:r,dispatch:i})=>{const o=Ks(t,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:d}=a;if(i){const f=dA(l,o,e);if(f&&f.from<=c&&f.to>=d){const h=Re.create(s,f.from,f.to);n.setSelection(h)}}return!0},Lse=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function z6(t){return t instanceof Re}function Kl(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function F6(t,e=null){if(!e)return null;const n=He.atStart(t),r=He.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const i=n.from,o=r.to;return e==="all"?Re.create(t,Kl(0,i,o),Kl(t.content.size,i,o)):Re.create(t,Kl(e,i,o),Kl(e,i,o))}function JP(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function jy(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function Bse(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var zse=(t=null,e={})=>({editor:n,view:r,tr:i,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{(jy()||JP())&&r.dom.focus(),Bse()&&!jy()&&!JP()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(o&&t===null&&!z6(n.state.selection))return s(),!0;const a=F6(i.doc,t)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},Fse=(t,e)=>n=>t.every((r,i)=>e(r,{...n,index:i})),qse=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),q6=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&q6(r)}return t};function Mg(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return q6(n)}function Mp(t,e,n){if(t instanceof Wa||t instanceof Q)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,i=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return Q.fromArray(t.map(a=>e.nodeFromJSON(a)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",o),Mp("",e,n)}if(i){if(n.errorOnInvalidContent){let s=!1,a="";const l=new Oz({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(s=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?_h.fromSchema(l).parseSlice(Mg(t),n.parseOptions):_h.fromSchema(l).parse(Mg(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const o=_h.fromSchema(e);return n.slice?o.parseSlice(Mg(t),n.parseOptions).content:o.parse(Mg(t),n.parseOptions)}return Mp("",e,n)}function Use(t,e,n){const r=t.steps.length-1;if(r<e)return;const i=t.steps[r];if(!(i instanceof pn||i instanceof Rn))return;const o=t.mapping.maps[r];let s=0;o.forEach((a,l,c,d)=>{s===0&&(s=d)}),t.setSelection(He.near(t.doc.resolve(s),n))}var Vse=t=>!("type"in t),Wse=(t,e,n)=>({tr:r,dispatch:i,editor:o})=>{var s;if(i){n={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=v=>{o.emit("contentError",{editor:o,error:v,disableCollaboration:()=>{"collaboration"in o.storage&&typeof o.storage.collaboration=="object"&&o.storage.collaboration&&(o.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!o.options.enableContentCheck&&o.options.emitContentError)try{Mp(e,o.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(v){l(v)}try{a=Mp(e,o.schema,{parseOptions:c,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:o.options.enableContentCheck})}catch(v){return l(v),!1}let{from:d,to:f}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},h=!0,p=!0;if((Vse(a)?a:[a]).forEach(v=>{v.check(),h=h?v.isText&&v.marks.length===0:!1,p=p?v.isBlock:!1}),d===f&&p){const{parent:v}=r.doc.resolve(d);v.isTextblock&&!v.type.spec.code&&!v.childCount&&(d-=1,f+=1)}let m;if(h){if(Array.isArray(e))m=e.map(v=>v.text||"").join("");else if(e instanceof Q){let v="";e.forEach(y=>{y.text&&(v+=y.text)}),m=v}else typeof e=="object"&&e&&e.text?m=e.text:m=e;r.insertText(m,d,f)}else{m=a;const v=r.doc.resolve(d),y=v.node(),b=v.parentOffset===0,x=y.isText||y.isTextblock,S=y.content.size>0;b&&x&&S&&p&&(d=Math.max(0,d-1)),r.replaceWith(d,f,m)}n.updateSelection&&Use(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:d,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:d,text:m})}return!0},Hse=()=>({state:t,dispatch:e})=>mie(t,e),Kse=()=>({state:t,dispatch:e})=>gie(t,e),Gse=()=>({state:t,dispatch:e})=>cie(t,e),Jse=()=>({state:t,dispatch:e})=>hie(t,e),Yse=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Hx(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Xse=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Hx(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Qse=()=>({state:t,dispatch:e})=>uie(t,e),Zse=()=>({state:t,dispatch:e})=>die(t,e);function U6(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function eae(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))jy()||U6()?s=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}var tae=t=>({editor:e,view:n,tr:r,dispatch:i})=>{const o=eae(t).split(/-(?!$)/),s=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const d=c.map(r.mapping);d&&i&&r.maybeStep(d)}),!0};function il(t,e,n={}){const{from:r,to:i,empty:o}=t.selection,s=e?bn(e,t.schema):null,a=[];t.doc.nodesBetween(r,i,(f,h)=>{if(f.isText)return;const p=Math.max(r,h),g=Math.min(i,h+f.nodeSize);a.push({node:f,from:p,to:g})});const l=i-r,c=a.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>Ey(f.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((f,h)=>f+h.to-h.from,0)>=l}var nae=(t,e={})=>({state:n,dispatch:r})=>{const i=bn(t,n.schema);return il(n,i,e)?vie(n,r):!1},rae=()=>({state:t,dispatch:e})=>wie(t,e),iae=t=>({state:e,dispatch:n})=>{const r=bn(t,e.schema);return Cie(r)(e,n)},oae=()=>({state:t,dispatch:e})=>yie(t,e);function e0(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function YP(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,i)=>(n.includes(i)||(r[i]=t[i]),r),{})}var sae=(t,e)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=e0(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(o=bn(t,r.schema)),a==="mark"&&(s=Ks(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(d,f)=>{o&&o===d.type&&(l=!0,i&&n.setNodeMarkup(f,void 0,YP(d.attrs,e))),s&&d.marks.length&&d.marks.forEach(h=>{s===h.type&&(l=!0,i&&n.addMark(f,f+d.nodeSize,s.create(YP(h.attrs,e))))})})}),l},aae=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),lae=()=>({tr:t,dispatch:e})=>{if(e){const n=new Oi(t.doc);t.setSelection(n)}return!0},cae=()=>({state:t,dispatch:e})=>fie(t,e),uae=()=>({state:t,dispatch:e})=>pie(t,e),dae=()=>({state:t,dispatch:e})=>Sie(t,e),fae=()=>({state:t,dispatch:e})=>jie(t,e),hae=()=>({state:t,dispatch:e})=>Eie(t,e);function SE(t,e,n={},r={}){return Mp(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var pae=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:o,dispatch:s,commands:a})=>{const{doc:l}=o;if(r.preserveWhitespace!=="full"){const c=SE(t,i.schema,r,{errorOnInvalidContent:e??i.options.enableContentCheck});return s&&o.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n),!0}return s&&o.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:r,errorOnInvalidContent:e??i.options.enableContentCheck})};function V6(t,e){const n=Ks(e,t.schema),{from:r,to:i,empty:o}=t.selection,s=[];o?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,i,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function W6(t,e){const n=new Kz(t);return e.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function mae(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function gae(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(i,o)=>{n(i)&&r.push({node:i,pos:o})}),r}function vae(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function t0(t){return e=>vae(e.$from,t)}function ke(t,e,n){return t.config[e]===void 0&&t.parent?ke(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?ke(t.parent,e,n):null}):t.config[e]}function fA(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=ke(e,"addExtensions",n);return r?[e,...fA(r())]:e}).flat(10)}function hA(t,e){const n=Bc.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function H6(t){return typeof t=="function"}function ut(t,e=void 0,...n){return H6(t)?e?t.bind(e)(...n):t(...n):t}function yae(t={}){return Object.keys(t).length===0&&t.constructor===Object}function xd(t){const e=t.filter(i=>i.type==="extension"),n=t.filter(i=>i.type==="node"),r=t.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function K6(t){const e=[],{nodeExtensions:n,markExtensions:r}=xd(t),i=[...n,...r],o={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(c=>c.name!=="text").map(c=>c.name),a=r.map(c=>c.name),l=[...s,...a];return t.forEach(c=>{const d={name:c.name,options:c.options,storage:c.storage,extensions:i},f=ke(c,"addGlobalAttributes",d);if(!f)return;
616f().forEach(p=>{let g;Array.isArray(p.types)?g=p.types:p.types==="*"?g=l:p.types==="nodes"?g=s:p.types==="marks"?g=a:g=[],g.forEach(m=>{Object.entries(p.attributes).forEach(([v,y])=>{e.push({type:m,name:v,attribute:{...o,...y}})})})})}),i.forEach(c=>{const d={name:c.name,options:c.options,storage:c.storage},f=ke(c,"addAttributes",d);if(!f)return;const h=f();Object.entries(h).forEach(([p,g])=>{const m={...o,...g};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,e.push({type:c.name,name:p,attribute:m})})}),e}function bae(t){const e=[];let n="",r=!1,i=!1,o=0;const s=t.length;for(let a=0;a<s;a+=1){const l=t[a];if(l==="'"&&!i){r=!r,n+=l;continue}if(l==='"'&&!r){i=!i,n+=l;continue}if(!r&&!i){if(l==="("){o+=1,n+=l;continue}if(l===")"&&o>0){o-=1,n+=l;continue}if(l===";"&&o===0){e.push(n),n="";continue}}n+=l}return n&&e.push(n),e}function XP(t){const e=[],n=bae(t||""),r=n.length;for(let i=0;i<r;i+=1){const o=n[i],s=o.indexOf(":");if(s===-1)continue;const a=o.slice(0,s).trim(),l=o.slice(s+1).trim();a&&l&&e.push([a,l])}return e}function an(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([i,o])=>{if(!r[i]){r[i]=o;return}if(i==="class"){const a=o?String(o).split(" "):[],l=r[i]?r[i].split(" "):[],c=a.filter(d=>!l.includes(d));r[i]=[...l,...c].join(" ")}else if(i==="style"){const a=new Map([...XP(r[i]),...XP(o)]);r[i]=Array.from(a.entries()).map(([l,c])=>`${l}: ${c}`).join("; ")}else r[i]=o}),r},{})}function Rp(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>an(n,r),{})}function xae(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function QP(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const i=e.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):xae(n.getAttribute(s.name));return a==null?o:{...o,[s.name]:a}},{});return{...r,...i}}}}function ZP(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&yae(n)?!1:n!=null))}function eM(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function wae(t,e){var n;const r=K6(t),{nodeExtensions:i,markExtensions:o}=xd(t),s=(n=i.find(c=>ke(c,"topNode")))==null?void 0:n.name,a=Object.fromEntries(i.map(c=>{const d=r.filter(y=>y.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},h=t.reduce((y,b)=>{const x=ke(b,"extendNodeSchema",f);return{...y,...x?x(c):{}}},{}),p=ZP({...h,content:ut(ke(c,"content",f)),marks:ut(ke(c,"marks",f)),group:ut(ke(c,"group",f)),inline:ut(ke(c,"inline",f)),atom:ut(ke(c,"atom",f)),selectable:ut(ke(c,"selectable",f)),draggable:ut(ke(c,"draggable",f)),code:ut(ke(c,"code",f)),whitespace:ut(ke(c,"whitespace",f)),linebreakReplacement:ut(ke(c,"linebreakReplacement",f)),defining:ut(ke(c,"defining",f)),isolating:ut(ke(c,"isolating",f)),attrs:Object.fromEntries(d.map(eM))}),g=ut(ke(c,"parseHTML",f));g&&(p.parseDOM=g.map(y=>QP(y,d)));const m=ke(c,"renderHTML",f);m&&(p.toDOM=y=>m({node:y,HTMLAttributes:Rp(y,d)}));const v=ke(c,"renderText",f);return v&&(p.toText=v),[c.name,p]})),l=Object.fromEntries(o.map(c=>{const d=r.filter(v=>v.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},h=t.reduce((v,y)=>{const b=ke(y,"extendMarkSchema",f);return{...v,...b?b(c):{}}},{}),p=ZP({...h,inclusive:ut(ke(c,"inclusive",f)),excludes:ut(ke(c,"excludes",f)),group:ut(ke(c,"group",f)),spanning:ut(ke(c,"spanning",f)),code:ut(ke(c,"code",f)),attrs:Object.fromEntries(d.map(eM))}),g=ut(ke(c,"parseHTML",f));g&&(p.parseDOM=g.map(v=>QP(v,d)));const m=ke(c,"renderHTML",f);return m&&(p.toDOM=v=>m({mark:v,HTMLAttributes:Rp(v,d)})),[c.name,p]}));return new Oz({topNode:s,nodes:a,marks:l})}function Sae(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function Oh(t){return t.sort((n,r)=>{const i=ke(n,"priority")||100,o=ke(r,"priority")||100;return i>o?-1:i<o?1:0})}function G6(t){const e=Oh(fA(t)),n=Sae(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function J6(t,e,n){const{from:r,to:i}=e,{blockSeparator:o=` 617
618`,textSerializers:s={}}=n||{};let a="";return t.nodesBetween(r,i,(l,c,d,f)=>{var h;l.isBlock&&c>r&&(a+=o);const p=s==null?void 0:s[l.type.name];if(p)return d&&(a+=p({node:l,pos:c,parent:d,index:f,range:e})),!1;l.isText&&(a+=(h=l==null?void 0:l.text)==null?void 0:h.slice(Math.max(r,c)-c,i-c))}),a}function kae(t,e){const n={from:0,to:t.content.size};return J6(t,n,e)}function Y6(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function Eae(t,e){const n=bn(e,t.schema),{from:r,to:i}=t.selection,o=[];t.doc.nodesBetween(r,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function X6(t,e){const n=e0(typeof e=="string"?e:e.name,t.schema);return n==="node"?Eae(t,e):n==="mark"?V6(t,e):{}}function jae(t,e=JSON.stringify){const n={};return t.filter(r=>{const i=e(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function Tae(t){const e=jae(t);return e.length===1?e:e.filter((n,r)=>!e.filter((o,s)=>s!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function Q6(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=e.slice(o).map(a,-1),d=e.slice(o).map(l),f=e.invert().map(c,-1),h=e.invert().map(d);r.push({oldRange:{from:f,to:h},newRange:{from:c,to:d}})})}),Tae(r)}function pA(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(i=>{const o=n.resolve(t),s=dA(o,i.type);s&&r.push({mark:i,...s})}):n.nodesBetween(t,e,(i,o)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}var _ae=(t,e,n,r=20)=>{const i=t.doc.resolve(n);let o=r,s=null;for(;o>0&&s===null;){const a=i.node(o);(a==null?void 0:a.type.name)===e?s=a:o-=1}return[s,o]};function zf(t,e){return e.nodes[t]||e.marks[t]||null}function Tv(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(o=>o.type===e&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}var Aae=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(i,o,s,a)=>{var l,c;const d=((c=(l=i.type.spec).toText)==null?void 0:c.call(l,{node:i,pos:o,parent:s,index:a}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?d:d.slice(0,Math.max(0,r-o))}),n};function kE(t,e,n={}){const{empty:r,ranges:i}=t.selection,o=e?Ks(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(f=>o?o.name===f.type.name:!0).find(f=>Ey(f.attrs,n,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:f,$to:h})=>{const p=f.pos,g=h.pos;t.doc.nodesBetween(p,g,(m,v)=>{if(o&&m.inlineContent&&!m.type.allowsMarkType(o))return!1;if(!m.isText&&!m.marks.length)return;const y=Math.max(p,v),b=Math.min(g,v+m.nodeSize),x=b-y;s+=x,a.push(...m.marks.map(S=>({mark:S,from:y,to:b})))})}),s===0)return!1;const l=a.filter(f=>o?o.name===f.mark.type.name:!0).filter(f=>Ey(f.mark.attrs,n,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),c=a.filter(f=>o?f.mark.type!==o&&f.mark.type.excludes(o):!0).reduce((f,h)=>f+h.to-h.from,0);return(l>0?l+c:l)>=s}function Nae(t,e,n={}){if(!e)return il(t,null,n)||kE(t,null,n);const r=e0(e,t.schema);return r==="node"?il(t,e,n):r==="mark"?kE(t,e,n):!1}var Cae=(t,e)=>{const{$from:n,$to:r,$anchor:i}=t.selection;if(e){const o=t0(a=>a.type.name===e)(t.selection);if(!o)return!1;const s=t.doc.resolve(o.pos+1);return i.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},Oae=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function tM(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function B1(t,e){const{nodeExtensions:n}=xd(e),r=n.find(s=>s.name===t);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=ut(ke(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function n0(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;
vendor: 30,512 bytes, lines 618-659
618if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let i=!0;return t.content.forEach(o=>{i!==!1&&(n0(o,{ignoreWhitespace:n,checkChildren:e})||(i=!1))}),i}return!1}function Z6(t){return t instanceof Te}var eF=class tF{constructor(e){this.position=e}static fromJSON(e){return new tF(e.position)}toJSON(){return{position:this.position}}};function Pae(t,e){const n=e.mapping.mapResult(t.position);return{position:new eF(n.pos),mapResult:n}}function Mae(t){return new eF(t)}function Rae(t,e,n){var r;const{selection:i}=e;let o=null;if(z6(i)&&(o=i.$cursor),o){const a=(r=t.storedMarks)!=null?r:o.marks();return o.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(c=>c.type.excludes(n)))}const{ranges:s}=i;return s.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(d,f,h)=>{if(c)return!1;if(d.isInline){const p=!h||h.type.allowsMarkType(n),g=!!n.isInSet(d.marks)||!d.marks.some(m=>m.type.excludes(n));c=p&&g}return!c}),c})}var Iae=(t,e={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=Ks(t,r.schema);if(i)if(s){const c=V6(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(d,f,(h,p)=>{const g=Math.max(p,d),m=Math.min(p+h.nodeSize,f);h.marks.find(y=>y.type===l)?h.marks.forEach(y=>{l===y.type&&n.addMark(g,m,l.create({...y.attrs,...e}))}):n.addMark(g,m,l.create(e))})});return Rae(r,n,l)},Dae=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),$ae=(t,e={})=>({state:n,dispatch:r,chain:i})=>{const o=bn(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),o.isTextblock?i().command(({commands:a})=>pP(o,{...s,...e})(n)?!0:a.clearNodes()).command(({state:a})=>pP(o,{...s,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Lae=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,i=Kl(t,0,r.content.size),o=Te.create(r,i);e.setSelection(o)}return!0},Bae=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=r;let s,a;return typeof e=="number"?(s=e,a=e):e&&"from"in e&&"to"in e?(s=e.from,a=e.to):(s=o.from,a=o.to),i&&n.doc.nodesBetween(s,a,(l,c)=>{l.isText||n.setNodeMarkup(c,void 0,{...l.attrs,dir:t})}),!0},zae=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:i,to:o}=typeof t=="number"?{from:t,to:t}:t,s=Re.atStart(r).from,a=Re.atEnd(r).to,l=Kl(i,s,a),c=Kl(o,s,a),d=Re.create(r,l,c);e.setSelection(d)}return!0},Fae=t=>({state:e,dispatch:n})=>{const r=bn(t,e.schema);return Mie(r)(e,n)};function nM(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(r)}}var qae=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:s}=e,{$from:a,$to:l}=o,c=i.extensionManager.attributes,d=Tv(c,a.node().type.name,a.node().attrs);if(o instanceof Te&&o.node.isBlock)return!a.parentOffset||!Hu(s,a.pos)?!1:(r&&(t&&nM(n,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const f=l.parentOffset===l.parent.content.size,h=a.depth===0?void 0:mae(a.node(-1).contentMatchAt(a.indexAfter(-1)));let p=f&&h?[{type:h,attrs:d}]:void 0,g=Hu(e.doc,e.mapping.map(a.pos),1,p);if(!p&&!g&&Hu(e.doc,e.mapping.map(a.pos),1,h?[{type:h}]:void 0)&&(g=!0,p=h?[{type:h,attrs:d}]:void 0),r){if(g&&(o instanceof Re&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,p),h&&!f&&!a.parentOffset&&a.parent.type!==h)){const m=e.mapping.map(a.before()),v=e.doc.resolve(m);a.node(-1).canReplaceWith(v.index(),v.index()+1,h)&&e.setNodeMarkup(e.mapping.map(a.before()),h)}t&&nM(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return g},Uae=(t,e={})=>({tr:n,state:r,dispatch:i,editor:o})=>{var s;const a=bn(t,r.schema),{$from:l,$to:c}=r.selection,d=r.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(c))return!1;const f=l.node(-1);if(f.type!==a)return!1;const h=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let y=Q.empty;const b=l.index(-1)?1:l.index(-2)?2:3;for(let T=l.depth-b;T>=l.depth-3;T-=1)y=Q.from(l.node(T).copy(y));const x=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,S={...Tv(h,l.node().type.name,l.node().attrs),...e},w=((s=a.contentMatch.defaultType)==null?void 0:s.createAndFill(S))||void 0;y=y.append(Q.from(a.createAndFill(null,w)||void 0));const k=l.before(l.depth-(b-1));n.replace(k,l.after(-x),new he(y,4-b,0));let j=-1;n.doc.nodesBetween(k,n.doc.content.size,(T,_)=>{if(j>-1)return!1;T.isTextblock&&T.content.size===0&&(j=_+1)}),j>-1&&n.setSelection(Re.near(n.doc.resolve(j))),n.scrollIntoView()}return!0}const p=c.pos===l.end()?f.contentMatchAt(0).defaultType:null,g={...Tv(h,f.type.name,f.attrs),...e},m={...Tv(h,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,c.pos);const v=p?[{type:a,attrs:g},{type:p,attrs:m}]:[{type:a,attrs:g}];if(!Hu(n.doc,l.pos,2))return!1;if(i){const{selection:y,storedMarks:b}=r,{splittableMarks:x}=o.extensionManager,S=b||y.$to.parentOffset&&y.$from.marks();if(n.split(l.pos,2,v).scrollIntoView(),!S||!i)return!0;const w=S.filter(k=>x.includes(k.type.name));n.ensureMarks(w)}return!0},z1=(t,e)=>{const n=t0(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&fl(t.doc,n.pos)&&t.join(n.pos),!0},F1=(t,e)=>{const n=t0(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&fl(t.doc,r)&&t.join(r),!0};function Vae(t){const e=t.doc,n=e.firstChild;if(!n)return null;const r=1,i=n.nodeSize-1;return Re.create(e,r,i)}var Wae=(t,e,n,r={})=>({editor:i,tr:o,state:s,dispatch:a,chain:l,commands:c,can:d})=>{const{extensions:f,splittableMarks:h}=i.extensionManager,p=bn(t,s.schema),g=bn(e,s.schema),{selection:m,storedMarks:v}=s,{$from:y,$to:b}=m,x=y.blockRange(b),S=v||m.$to.parentOffset&&m.$from.marks();if(!x)return!1;const w=t0(I=>B1(I.type.name,f))(m),k=m.from===0&&m.to===s.doc.content.size,j=s.doc.content.content,T=j.length===1?j[0]:null,_=k&&T&&B1(T.type.name,f)?{node:T,pos:0,depth:0}:null,N=w??_,C=!!w&&x.depth>=1&&x.depth-w.depth<=1,O=!!_;if((C||O)&&N){if(N.node.type===p)return k&&O?l().command(({tr:I,dispatch:P})=>{const $=Vae(I);return $?(I.setSelection($),P&&P(I),!0):!1}).liftListItem(g).run():c.liftListItem(g);if(B1(N.node.type.name,f)&&p.validContent(N.node.content))return l().command(()=>(o.setNodeMarkup(N.pos,p),!0)).command(()=>z1(o,p)).command(()=>F1(o,p)).run()}return!n||!S||!a?l().command(()=>d().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>z1(o,p)).command(()=>F1(o,p)).run():l().command(()=>{const I=d().wrapInList(p,r),P=S.filter($=>h.includes($.type.name));return o.ensureMarks(P),I?!0:c.clearNodes()}).wrapInList(p,r).command(()=>z1(o,p)).command(()=>F1(o,p)).run()},Hae=(t,e={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=Ks(t,r.schema);return kE(r,s,e)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,e)},Kae=(t,e,n={})=>({state:r,commands:i})=>{const o=bn(t,r.schema),s=bn(e,r.schema),a=il(r,o,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?i.setNode(s,l):i.setNode(o,{...l,...n})},Gae=(t,e={})=>({state:n,commands:r})=>{const i=bn(t,n.schema);return il(n,i,e)?r.lift(i):r.wrapIn(i,e)},Jae=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(t))){if(e){const s=t.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,t.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},Yae=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:i}=n;return r||e&&i.forEach(o=>{t.removeMark(o.$from.pos,o.$to.pos)}),!0},Xae=(t,e={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=Ks(t,r.schema),{$from:c,empty:d,ranges:f}=a;if(!i)return!0;if(d&&s){let{from:h,to:p}=a;const g=(o=c.marks().find(v=>v.type===l))==null?void 0:o.attrs,m=dA(c,l,g);m&&(h=m.from,p=m.to),n.removeMark(h,p,l)}else f.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,l)});return n.removeStoredMark(l),!0},Qae=t=>({tr:e,state:n,dispatch:r})=>{const{selection:i}=n;let o,s;return typeof t=="number"?(o=t,s=t):t&&"from"in t&&"to"in t?(o=t.from,s=t.to):(o=i.from,s=i.to),r&&e.doc.nodesBetween(o,s,(a,l)=>{if(a.isText)return;const c={...a.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},Zae=(t,e={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=e0(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(o=bn(t,r.schema)),a==="mark"&&(s=Ks(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;let h,p,g,m;n.selection.empty?r.doc.nodesBetween(d,f,(v,y)=>{o&&o===v.type&&(l=!0,g=Math.max(y,d),m=Math.min(y+v.nodeSize,f),h=y,p=v)}):r.doc.nodesBetween(d,f,(v,y)=>{y<d&&o&&o===v.type&&(l=!0,g=Math.max(y,d),m=Math.min(y+v.nodeSize,f),h=y,p=v),y>=d&&y<=f&&(o&&o===v.type&&(l=!0,i&&n.setNodeMarkup(y,void 0,{...v.attrs,...e})),s&&v.marks.length&&v.marks.forEach(b=>{if(s===b.type&&(l=!0,i)){const x=Math.max(y,d),S=Math.min(y+v.nodeSize,f);n.addMark(x,S,s.create({...b.attrs,...e}))}}))}),p&&(h!==void 0&&i&&n.setNodeMarkup(h,void 0,{...p.attrs,...e}),s&&p.marks.length&&p.marks.forEach(v=>{s===v.type&&i&&n.addMark(g,m,s.create({...v.attrs,...e}))}))}),l},ele=(t,e={})=>({state:n,dispatch:r})=>{const i=bn(t,n.schema);return Tie(i,e)(n,r)},tle=(t,e={})=>({state:n,dispatch:r})=>{const i=bn(t,n.schema);return _ie(i,e)(n,r)},nle=class{constructor(){this.callbacks={}}on(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),this}emit(e,...n){const r=this.callbacks[e];return r&&r.forEach(i=>i.apply(this,n)),this}off(e,n){const r=this.callbacks[e];return r&&(n?this.callbacks[e]=r.filter(i=>i!==n):delete this.callbacks[e]),this}once(e,n){const r=(...i)=>{this.off(e,r),n.apply(this,i)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}},r0=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},rle=(t,e)=>{if(uA(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Rg(t){var e;const{editor:n,from:r,to:i,text:o,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(h=>h.type.spec.code))return!1;let d=!1;const f=Aae(c)+o;return s.forEach(h=>{if(d)return;const p=rle(f,h.find);if(!p)return;const g=l.state.tr,m=Qx({state:l.state,transaction:g}),v={from:r-(p[0].length-o.length),to:i},{commands:y,chain:b,can:x}=new Zx({editor:n,state:m});h.handler({state:m,range:v,match:p,commands:y,chain:b,can:x})===null||!g.steps.length||(h.undoable&&g.setMeta(a,{transform:g,from:r,to:i,text:o}),l.dispatch(g),d=!0)}),d}function ile(t){const{editor:e,rules:n}=t,r=new Ut({state:{init(){return null},apply(i,o,s){const a=i.getMeta(r);if(a)return a;const l=i.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:d}=l;typeof d=="string"?d=d:d=hA(Q.from(d),s.schema);const{from:f}=l,h=f+d.length;Rg({editor:e,from:f,to:h,text:d,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:o}},props:{handleTextInput(i,o,s,a){return Rg({editor:e,from:o,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&Rg({editor:e,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,o){if(o.key!=="Enter")return!1;const{$cursor:s}=i.state.selection;return s?Rg({editor:e,from:s.pos,to:s.pos,text:` 619`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function ole(t){return Object.prototype.toString.call(t).slice(8,-1)}function Ig(t){return ole(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function nF(t,e){const n={...t};return Ig(t)&&Ig(e)&&Object.keys(e).forEach(r=>{Ig(e[r])&&Ig(t[r])?n[r]=nF(t[r],e[r]):n[r]=e[r]}),n}var mA=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...ut(ke(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...ut(ke(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>nF(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},zc=class rF extends mA{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new rF(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=s.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function sle(t){return typeof t=="number"}var ale=class{constructor(t){this.find=t.find,this.handler=t.handler}},lle=(t,e,n)=>{if(uA(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=t,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function cle(t){const{editor:e,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:c,can:d}=new Zx({editor:e,state:n}),f=[];return n.doc.nodesBetween(r,i,(p,g)=>{var m,v,y,b,x;if((v=(m=p.type)==null?void 0:m.spec)!=null&&v.code||!(p.isText||p.isTextblock||p.isInline))return;const S=(x=(b=(y=p.content)==null?void 0:y.size)!=null?b:p.nodeSize)!=null?x:0,w=Math.max(r,g),k=Math.min(i,g+S);if(w>=k)return;const j=p.isText?p.text||"":p.textBetween(w-g,k-g,void 0,"");lle(j,o.find,s).forEach(_=>{if(_.index===void 0)return;const N=w+_.index+1,C=N+_[0].length,O={from:n.tr.mapping.map(N),to:n.tr.mapping.map(C)},I=o.handler({state:n,range:O,match:_,commands:l,chain:c,can:d,pasteEvent:s,dropEvent:a});f.push(I)})}),f.every(p=>p!==null)}var Dg=null,ule=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function dle(t){const{editor:e,rules:n}=t;let r=null,i=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:d,from:f,to:h,rule:p,pasteEvt:g})=>{const m=d.tr,v=Qx({state:d,transaction:m});if(!(!cle({editor:e,state:v,from:Math.max(f-1,0),to:h.b-1,rule:p,pasteEvent:g,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(d=>new Ut({view(f){const h=g=>{var m;r=(m=f.dom.parentElement)!=null&&m.contains(g.target)?f.dom.parentElement:null,r&&(Dg=e)},p=()=>{Dg&&(Dg=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(f,h)=>{if(o=r===f.dom.parentElement,a=h,!o){const p=Dg;p!=null&&p.isEditable&&setTimeout(()=>{const g=p.state.selection;g&&p.commands.deleteRange({from:g.from,to:g.to})},10)}return!1},paste:(f,h)=>{var p;const g=(p=h.clipboardData)==null?void 0:p.getData("text/html");return s=h,i=!!(g!=null&&g.includes("data-pm-slice")),!1}}},appendTransaction:(f,h,p)=>{const g=f[0],m=g.getMeta("uiEvent")==="paste"&&!i,v=g.getMeta("uiEvent")==="drop"&&!o,y=g.getMeta("applyPasteRules"),b=!!y;if(!m&&!v&&!b)return;if(b){let{text:w}=y;typeof w=="string"?w=w:w=hA(Q.from(w),p.schema);const{from:k}=y,j=k+w.length,T=ule(w);return l({rule:d,state:p,from:k,to:{b:j},pasteEvt:T})}const x=h.doc.content.findDiffStart(p.doc.content),S=h.doc.content.findDiffEnd(p.doc.content);if(!(!sle(x)||!S||x===S.b))return l({rule:d,state:p,from:x,to:S,pasteEvt:s})}}))}var i0=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=G6(t),this.schema=wae(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:zf(e.name,this.schema)},r=ke(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return Oh([...this.extensions].reverse()).flatMap(r=>{const i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:zf(r.name,this.schema)},o=[],s=ke(r,"addKeyboardShortcuts",i);let a={};if(r.type==="mark"&&ke(r,"exitable",i)&&(a.ArrowRight=()=>zc.handleExit({editor:t,mark:r})),s){const h=Object.fromEntries(Object.entries(s()).map(([p,g])=>[p,()=>g({editor:t})]));a={...a,...h}}const l=kse(a);o.push(l);const c=ke(r,"addInputRules",i);if(tM(r,t.options.enableInputRules)&&c){const h=c();if(h&&h.length){const p=ile({editor:t,rules:h}),g=Array.isArray(p)?p:[p];o.push(...g)}}const d=ke(r,"addPasteRules",i);if(tM(r,t.options.enablePasteRules)&&d){const h=d();if(h&&h.length){const p=dle({editor:t,rules:h});o.push(...p)}}const f=ke(r,"addProseMirrorPlugins",i);if(f){const h=f();o.push(...h)}return o})}get attributes(){return K6(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=xd(this.extensions);return Object.fromEntries(e.filter(n=>!!ke(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:bn(n.name,this.schema)},o=ke(n,"addNodeView",i);if(!o)return[];const s=o();if(!s)return[];const a=(l,c,d,f,h)=>{const p=Rp(l,r);return s({node:l,view:c,getPos:d,decorations:f,innerDecorations:h,editor:t,extension:n,HTMLAttributes:p})};return[n.name,a]}))}dispatchTransaction(t){const{editor:e}=this;return Oh([...this.extensions].reverse()).reduceRight((r,i)=>{const o={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:zf(i.name,this.schema)},s=ke(i,"dispatchTransaction",o);return s?a=>{s.call(o,{transaction:a,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return Oh([...this.extensions]).reduce((r,i)=>{const o={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:zf(i.name,this.schema)},s=ke(i,"transformPastedHTML",o);return s?(a,l)=>{const c=r(a,l);return s.call(o,c)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=xd(this.extensions);return Object.fromEntries(e.filter(n=>!!ke(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Ks(n.name,this.schema)},o=ke(n,"addMarkView",i);if(!o)return[];const s=(a,l,c)=>{const d=Rp(a,r);return o()({mark:a,view:l,inline:c,editor:t,extension:n,HTMLAttributes:d,updateAttributes:f=>{Tle(a,t,f)}})};return[n.name,s]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:zf(e.name,this.schema)};e.type==="mark"&&((n=ut(ke(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const i=ke(e,"onBeforeCreate",r),o=ke(e,"onCreate",r),s=ke(e,"onUpdate",r),a=ke(e,"onSelectionUpdate",r),l=ke(e,"onTransaction",r),c=ke(e,"onFocus",r),d=ke(e,"onBlur",r),f=ke(e,"onDestroy",r);i&&this.editor.on("beforeCreate",i),o&&this.editor.on("create",o),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),f&&this.editor.on("destroy",f)})}};i0.resolve=G6;i0.sort=Oh;i0.flatten=fA;var fle={};cA(fle,{ClipboardTextSerializer:()=>oF,Commands:()=>sF,Delete:()=>aF,Drop:()=>lF,Editable:()=>cF,FocusEvents:()=>dF,Keymap:()=>fF,Paste:()=>hF,Tabindex:()=>pF,TextDirection:()=>mF,focusEventsPluginKey:()=>uF});var en=class iF extends mA{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new iF(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},oF=en.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Ut({key:new _n("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:i}=e,{ranges:o}=i,s=Math.min(...o.map(d=>d.$from.pos)),a=Math.max(...o.map(d=>d.$to.pos)),l=Y6(n);return J6(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),sF=en.create({name:"commands",addCommands(){return{...L6}}}),aF=en.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,i;const o=()=>{var s,a,l,c;if((c=(l=(a=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,t))!=null?c:t.getMeta("y-sync$"))return;const d=W6(t.before,[t,...e]);Q6(d).forEach(p=>{d.mapping.mapResult(p.oldRange.from).deletedAfter&&d.mapping.mapResult(p.oldRange.to).deletedBefore&&d.before.nodesBetween(p.oldRange.from,p.oldRange.to,(g,m)=>{const v=m+g.nodeSize-2,y=p.oldRange.from<=m&&v<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:g,from:m,to:v,newFrom:d.mapping.map(m),newTo:d.mapping.map(v),deletedRange:p.oldRange,newRange:p.newRange,partial:!y,editor:this.editor,transaction:t,combinedTransform:d})})});const h=d.mapping;d.steps.forEach((p,g)=>{var m,v;if(p instanceof co){const y=h.slice(g).map(p.from,-1),b=h.slice(g).map(p.to),x=h.invert().map(y,-1),S=h.invert().map(b),w=y>0?(m=d.doc.nodeAt(y-1))==null?void 0:m.marks.some(j=>j.eq(p.mark)):!1,k=(v=d.doc.nodeAt(b))==null?void 0:v.marks.some(j=>j.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:x,to:S},newRange:{from:y,to:b},partial:!!(k||w),editor:this.editor,transaction:t,combinedTransform:d})}})};(i=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||i?setTimeout(o,0):o()}}),lF=en.create({name:"drop",addProseMirrorPlugins(){return[new Ut({key:new _n("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),cF=en.create({name:"editable",addProseMirrorPlugins(){return[new Ut({key:new _n("editable"),props:{editable:()=>this.editor.options.editable}})]}}),uF=new _n("focusEvents"),dF=en.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Ut({key:uF,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),fF=en.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:d,$anchor:f}=l,{pos:h,parent:p}=f,g=f.parent.isTextblock&&h>0?a.doc.resolve(h-1):f,m=g.parent.type.spec.isolating,v=f.pos-f.parentOffset,y=m&&g.parent.childCount===1?v===f.pos:He.atStart(c).from===h;return!d||!p.type.isTextblock||p.textContent.length||!y||y&&f.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},o={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return jy()||U6()?o:i},addProseMirrorPlugins(){return[new Ut({key:new _n("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(m=>m.getMeta("composition")))return;const r=t.some(m=>m.docChanged)&&!e.doc.eq(n.doc),i=t.some(m=>m.getMeta("preventClearDocument"));if(!r||i)return;const{empty:o,from:s,to:a}=e.selection,l=He.atStart(e.doc).from,c=He.atEnd(e.doc).to;if(o||!(s===l&&a===c)||!n0(n.doc))return;const h=n.tr,p=Qx({state:n,transaction:h}),{commands:g}=new Zx({editor:this.editor,state:p});if(g.clearNodes(),!!h.steps.length)return h}})]}}),hF=en.create({name:"paste",addProseMirrorPlugins(){return[new Ut({key:new _n("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),pF=en.create({name:"tabindex",addProseMirrorPlugins(){return[new Ut({key:new _n("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),mF=en.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=xd(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Ut({key:new _n("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),hle=class ch{constructor(e,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You canât set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new ch(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new ch(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new ch(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,o=n.isAtom&&!n.isText,s=n.isInline,a=this.pos+r+(o?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(a);if(!i&&!s&&l.depth<=this.depth)return;const c=new ch(l,this.editor,i,i||s?n:null);i&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(n).length>0){const o=i.node.attrs,s=Object.keys(n);for(let a=0;a<s.length;a+=1){const l=s[a];if(o[l]!==n[l])break}}else r=i;i=i.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let i=[];if(!this.children||this.children.length===0)return i;const o=Object.keys(n);return this.children.forEach(s=>{r&&i.length>0||(s.node.type.name===e&&o.every(l=>n[l]===s.node.attrs[l])&&i.push(s),!(r&&i.length>0)&&(i=i.concat(s.querySelectorAll(e,n,r))))}),i}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},ple=`.ProseMirror { 620 position: relative; 621} 622 623.ProseMirror { 624 word-wrap: break-word; 625 white-space: pre-wrap; 626 white-space: break-spaces; 627 -webkit-font-variant-ligatures: none; 628 font-variant-ligatures: none; 629 font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ 630} 631 632.ProseMirror [contenteditable="false"] { 633 white-space: normal; 634} 635 636.ProseMirror [contenteditable="false"] [contenteditable="true"] { 637 white-space: pre-wrap; 638} 639 640.ProseMirror pre { 641 white-space: pre-wrap; 642} 643 644img.ProseMirror-separator { 645 display: inline !important; 646 border: none !important; 647 margin: 0 !important; 648 width: 0 !important; 649 height: 0 !important; 650} 651 652.ProseMirror-gapcursor { 653 display: none; 654 pointer-events: none; 655 position: absolute; 656 margin: 0; 657} 658 659.ProseMirror-gapcursor:after {
660 content: ""; 661 display: block; 662 position: absolute; 663 top: -2px; 664 width: 20px; 665 border-top: 1px solid black; 666 animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; 667} 668 669@keyframes ProseMirror-cursor-blink { 670 to { 671 visibility: hidden; 672 } 673} 674 675.ProseMirror-hideselection *::selection { 676 background: transparent; 677} 678 679.ProseMirror-hideselection *::-moz-selection { 680 background: transparent; 681} 682 683.ProseMirror-hideselection * { 684 caret-color: transparent; 685} 686 687.ProseMirror-focused .ProseMirror-gapcursor { 688 display: block; 689}`;function mle(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}var gle=class extends nle{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Pae,createMappablePosition:Mae},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:i,moved:o})=>this.options.onDrop(r,i,o)),this.on("paste",({event:r,slice:i})=>this.options.onPaste(r,i)),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=F6(e,this.options.autofocus);this.editorState=Nu.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=mle(ple,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}
vendor: 7,333 bytes, lines 689-691
689),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=H6(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(i=>{const o=typeof i=="string"?`${i}$`:i.key;n=n.filter(s=>!s.key.startsWith(o))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const r=[...this.options.enableCoreExtensions?[cF,oF.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),sF,dF,fF,pF,lF,hF,aF,mF.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new i0(r,this)}createCommandManager(){this.commandManager=new Zx({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=SE(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),t=SE(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,o=e.transformPastedHTML,s=this.extensionManager.transformPastedHTML(o);this.editorView=new D6(t,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:i,transformPastedHTML:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const a=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(a),this.prependClass(),this.injectCSS();const l=this.view.dom;l.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(c=>{var d;return(d=this.capturedTransaction)==null?void 0:d.step(c)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),i=n.includes(t),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!i)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const s=n.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),a=s==null?void 0:s.getMeta("focus"),l=s==null?void 0:s.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:s}),l&&this.emit("blur",{editor:this,event:l.event,transaction:s}),!(t.getMeta("preventUpdate")||!n.some(c=>c.docChanged)||o.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return X6(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return Nae(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return hA(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=` 690 691`,textSerializers:n={}}=t||{};return kae(this.state.doc,{blockSeparator:e,textSerializers:{...Y6(this.schema),...n}})}get isEmpty(){return n0(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new hle(e,this)}get $doc(){return this.$pos(0)}};function wd(t){return new r0({find:t.find,handler:({state:e,range:n,match:r})=>{const i=ut(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),c=n.from+a.indexOf(s),d=c+s.length;if(pA(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(m=>m===t.type&&m!==p.mark.type)).filter(p=>p.to>c).length)return null;d<n.to&&o.delete(d,n.to),c>n.from&&o.delete(n.from+l,c);const h=n.from+l+s.length;o.addMark(n.from+l,h,t.type.create(i||{})),o.removeStoredMark(t.type)}},undoable:t.undoable})}function gF(t){return new r0({find:t.find,handler:({state:e,range:n,match:r})=>{const i=ut(t.getAttributes,void 0,r)||{},{tr:o}=e,s=n.from;let a=n.to;const l=t.type.create(i);if(r[1]){const c=r[0].lastIndexOf(r[1]);let d=s+c;d>a?d=a:a=d+r[1].length;const f=r[0][r[0].length-1];o.insertText(f,s+r[0].length-1),o.replaceWith(d,a,l)}else if(r[0]){const c=t.type.isInline?s:s-1;o.insert(c,t.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()},undoable:t.undoable})}function EE(t){return new r0({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),o=ut(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)},undoable:t.undoable})}function Sd(t){return new r0({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const o=ut(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&Y_(l,t.type,o);if(!c)return null;if(s.wrap(l,c),t.keepMarks&&t.editor){const{selection:f,storedMarks:h}=e,{splittableMarks:p}=t.editor.extensionManager,g=h||f.$to.parentOffset&&f.$from.marks();if(g){const m=g.filter(v=>
691p.includes(v.type.name));s.ensureMarks(m)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(f,o).run()}const d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&fl(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&s.join(n.from-1)},undoable:t.undoable})}var vle=t=>"touches"in t,yle=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.clientX-this.startX,c=a.clientY-this.startY;this.handleResize(l,c)},this.handleTouchMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.touches[0];if(!l)return;const c=l.clientX-this.startX,d=l.clientY-this.startY;this.handleResize(c,d)},this.handleMouseUp=()=>{if(!this.isResizing)return;const a=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(a,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,i,o,s;this.node=t.node,this.editor=t.editor,this.element=t.element,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t.options.max),(r=t==null?void 0:t.options)!=null&&r.directions&&(this.directions=t.options.directions),(i=t.options)!=null&&i.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(o=t.options)!=null&&o.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),(s=t.options)!=null&&s.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return(t=this.contentElement)!=null?t:null}handleEditorUpdate(){const t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");
691return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),i=e.includes("left"),o=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),i&&(t.style.left="0"),o&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,vle(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,t,e),o=this.applyConstraints(r,i,n);this.element.style.width=`${o.width}px`,this.element.style.height=`${o.height}px`,this.onResize&&this.onResize(o.width,o.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,i=this.startHeight;const o=t.includes("right"),s=t.includes("left"),a=t.includes("bottom"),l=t.includes("top");return o?r=this.startWidth+e:s&&(r=this.startWidth-e),a?i=this.startHeight+n:l&&(i=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(o?e:-e)),(t==="top"||t==="bottom")&&(i=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,i,t):{width:r,height:i}}applyConstraints(t,e,n){var r,i,o,s;if(!n){let c=Math.max(this.minSize.width,t),d=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(c=Math.min(this.maxSize.width,c)),(i=this.maxSize)!=null&&i.height&&(d=Math.min(this.maxSize.height,d)),{width:c,height:d}}let a=t,l=e;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),(o=this.maxSize)!=null&&o.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),(s=this.maxSize)!=null&&s.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(t,e,n){const r=n==="left"||n==="right",i=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:i?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};function ble(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof Te){const o=r.index();return r.parent.canReplaceWith(o,o+1,e)}let i=r.depth;for(;i>=0;){const o=r.index(i);if(r.node(i).contentMatchAt(o).matchType(e))return!0;
vendor: 6,376 bytes, lines 691-703
691i-=1}return!1}var xle={};cA(xle,{createAtomBlockMarkdownSpec:()=>wle,createBlockMarkdownSpec:()=>Sle,createInlineMarkdownSpec:()=>jle,parseAttributes:()=>gA,parseIndentedBlocks:()=>jE,renderNestedMarkdownContent:()=>yA,serializeAttributes:()=>vA});function gA(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,c=>(n.push(c),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(i){const c=i.map(d=>d.trim().slice(1));e.class=c.join(" ")}const o=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);o&&(e.id=o[1]);const s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,c,d])=>{var f;const h=parseInt(((f=d.match(/__QUOTED_(\d+)__/))==null?void 0:f[1])||"0",10),p=n[h];p&&(e[c]=p.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(d=>{d.match(/^[a-zA-Z][\w-]*$/)&&(e[d]=!0)}),e}function vA(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function wle(t){const{nodeName:e,name:n,parseAttributes:r=gA,serializeAttributes:i=vA,defaultAttributes:o={},requiredAttributes:s=[],allowedAttributes:a}=t,l=n||e,c=d=>{if(!a)return d;const f={};return a.forEach(h=>{h in d&&(f[h]=d[h])}),f};return{parseMarkdown:(d,f)=>{const h={...o,...d.attributes};return f.createNode(e,h,[])},markdownTokenizer:{name:e,level:"block",start(d){var f;const h=new RegExp(`^:::${l}(?:\\s|$)`,"m"),p=(f=d.match(h))==null?void 0:f.index;return p!==void 0?p:-1},tokenize(d,f,h){const p=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),g=d.match(p);if(!g)return;const m=g[1]||"",v=r(m);if(!s.find(b=>!(b in v)))return{type:e,raw:g[0],attributes:v}}},renderMarkdown:d=>{const f=c(d.attrs||{}),h=i(f),p=h?` {${h}}`:"";return`:::${l}${p} :::`}}}function Sle(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=gA,serializeAttributes:o=vA,defaultAttributes:s={},content:a="block",allowedAttributes:l}=t,c=n||e,d=f=>{if(!l)return f;const h={};return l.forEach(p=>{p in f&&(h[p]=f[p])}),h};return{parseMarkdown:(f,h)=>{let p;if(r){const m=r(f);p=typeof m=="string"?[{type:"text",text:m}]:m}else a==="block"?p=h.parseChildren(f.tokens||[]):p=h.parseInline(f.tokens||[]);const g={...s,...f.attributes};return h.createNode(e,g,p)},markdownTokenizer:{name:e,level:"block",start(f){var h;const p=new RegExp(`^:::${c}`,"m"),g=(h=f.match(p))==null?void 0:h.index;return g!==void 0?g:-1},tokenize(f,h,p){var g;const m=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),v=f.match(m);if(!v)return;const[y,b=""]=v,x=i(b);let S=1;const w=y.length;let k="";const j=/^:::([\w-]*)(\s.*)?/gm,T=f.slice(w);for(j.lastIndex=0;;){const _=j.exec(T);if(_===null)break;const N=_.index,C=_[1];if(!((g=_[2])!=null&&g.endsWith(":::"))){if(C)S+=1;else if(S-=1,S===0){const O=T.slice(0,N);k=O.trim();const I=f.slice(0,w+N+_[0].length);let P=[];if(k)if(a==="block")for(P=p.blockTokens(O),P.forEach($=>{$.text&&(!$.tokens||$.tokens.length===0)&&($.tokens=p.inlineTokens($.text))});P.length>0;){const $=P[P.length-1];if($.type==="paragraph"&&(!$.text||$.text.trim()===""))P.pop();else break}else P=p.inlineTokens(k);return{type:e,raw:I,attributes:x,content:k,tokens:P}}}}}},renderMarkdown:(f,h)=>{const p=d(f.attrs||{}),g=o(p),m=g?` {${g}}`:"",v=h.renderChildren(f.content||[],` 692 693`);return`:::${c}${m} 694 695${v} 696 697:::`}}}function kle(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,i,o,s]=r;e[i]=o||s,r=n.exec(t)}return e}function Ele(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function jle(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=kle,serializeAttributes:o=Ele,defaultAttributes:s={},selfClosing:a=!1,allowedAttributes:l}=t,c=n||e,d=h=>{if(!l)return h;const p={};return l.forEach(g=>{const m=typeof g=="string"?g:g.name,v=typeof g=="string"?void 0:g.skipIfDefault;if(m in h){const y=h[m];if(v!==void 0&&y===v)return;p[m]=y}}),p},f=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(h,p)=>{const g={...s,...h.attributes};if(a)return p.createNode(e,g);const m=r?r(h):h.content||"";return m?p.createNode(e,g,[p.createTextNode(m)]):p.createNode(e,g,[])},markdownTokenizer:{name:e,level:"inline",start(h){const p=a?new RegExp(`\\[${f}\\s*[^\\]]*\\]`):new RegExp(`\\[${f}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${f}\\]`),g=h.match(p),m=g==null?void 0:g.index;return m!==void 0?m:-1},tokenize(h,p,g){const m=a?new RegExp(`^\\[${f}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${f}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${f}\\]`),v=h.match(m);if(!v)return;let y="",b="";if(a){const[,S]=v;b=S}else{const[,S,w]=v;b=S,y=w||""}const x=i(b.trim());return{type:e,raw:v[0],content:y.trim(),attributes:x}}},renderMarkdown:h=>{let p="";r?p=r(h):h.content&&h.content.length>0&&(p=h.content.filter(y=>y.type==="text").map(y=>y.text).join(""));const g=d(h.attrs||{}),m=o(g),v=m?` ${m}`:"";return a?`[${c}${v}]`:`[${c}${v}]${p}[/${c}]`}}}function jE(t,e,n){var r,i,o,s;const a=t.split(` 698`),l=[];let c="",d=0;const f=e.baseIndentSize||2;for(;d<a.length;){const h=a[d],p=h.match(e.itemPattern);if(!p){if(l.length>0)break;if(h.trim()===""){d+=1,c=`${c}${h} 699`;continue}else return}const g=e.extractItemData(p),{indentLevel:m,mainContent:v}=g;c=`${c}${h} 700`;const y=[v];for(d+=1;d<a.length;){const w=a[d];if(w.trim()===""){const j=a.slice(d+1).findIndex(N=>N.trim()!=="");if(j===-1)break;if((((i=(r=a[d+1+j].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>m){y.push(w),c=`${c}${w} 701`,d+=1;continue}else break}if((((s=(o=w.match(/^(\s*)/))==null?void 0:o[1])==null?void 0:s.length)||0)>m)y.push(w),c=`${c}${w} 702`,d+=1;else break}let b;const x=y.slice(1);if(x.length>0){const w=x.map(k=>k.slice(m+f)).join(` 703`);w.trim()&&(e.customNestedParser?b=e.customNestedParser(w):b=n.blockTokens(w))}const S=e.createToken(g,b);l.push(S)}if(l.length!==0)return{items:l,raw:c}}function yA(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const i=typeof n=="function"?n(r):n,[o,...s]=t.content,a=e.renderChildren([o]);let l=`${i}${a}`;return s&&s.length>
7030&&s.forEach((c,d)=>{var f,h;const p=(h=(f=e.renderChild)==null?void 0:f.call(e,c,d+1))!=null?h:e.renderChildren([c]);if(p!=null){const g=p.split(` 704`).map(m=>m?e.indent(m):e.indent("")).join(` 705`);l+=c.type==="paragraph"?` 706 707${g}`:` 708${g}`}}),l}function Tle(t,e,n={}){const{state:r}=e,{doc:i,tr:o}=r,s=t;i.descendants((a,l)=>{const c=o.mapping.map(l),d=o.mapping.map(l)+a.nodeSize;let f=null;if(a.marks.forEach(p=>{if(p!==s)return!1;f=p}),!f)return;let h=!1;if(Object.keys(n).forEach(p=>{n[p]!==f.attrs[p]&&(h=!0)}),h){const p=t.type.create({...t.attrs,...n});o.removeMark(c,d,t.type),o.addMark(c,d,p)}}),o.docChanged&&e.view.dispatch(o)}var Ur=class vF extends mA{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new vF(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function Nc(t){return new ale({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const o=ut(t.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const d=l.search(/\S/),f=n.from+l.indexOf(a),h=f+a.length;if(pA(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(y=>y===t.type&&y!==m.mark.type)).filter(m=>m.to>f).length)return null;h<n.to&&s.delete(h,n.to),f>n.from&&s.delete(n.from+d,f),c=n.from+d+a.length,s.addMark(n.from+d,c,t.type.create(o||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||s.removeStoredMark(t.type)}}})}const{getOwnPropertyNames:_le,getOwnPropertySymbols:Ale}=Object,{hasOwnProperty:Nle}=Object.prototype;function q1(t,e){return function(r,i,o){return t(r,i,o)&&e(r,i,o)}}function $g(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:o}=i,s=o.get(n),a=o.get(r);if(s&&a)return s===r&&a===n;o.set(n,r),o.set(r,n);const l=t(n,r,i);return o.delete(n),o.delete(r),l}}function Cle(t){return t!=null?t[Symbol.toStringTag]:void 0}function rM(t){return _le(t).concat(Ale(t))}const Ole=Object.hasOwn||((t,e)=>Nle.call(t,e));function Fc(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const Ple="__v",Mle="__o",Rle="_owner",{getOwnPropertyDescriptor:iM,keys:oM}=Object;function Ile(t,e){return t.byteLength===e.byteLength&&Ty(new Uint8Array(t),new Uint8Array(e))}function Dle(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function $le(t,e){return t.byteLength===e.byteLength&&Ty(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Lle(t,e){return Fc(t.getTime(),e.getTime())}function Ble(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function zle(t,e){return t===e}function sM(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),o=t.entries();let s,a,l=0;for(;(s=o.next())&&!s.done;){const c=e.entries();let d=!1,f=0;for(;(a=c.next())&&!a.done;){if(i[f]){f++;continue}const h=s.value,p=a.value;if(n.equals(h[0],p[0],l,f,t,e,n)&&n.equals(h[1],p[1],h[0],p[0],t,e,n)){d=i[f]=!0;break}f++}if(!d)return!1;l++}return!0}const Fle=Fc;function qle(t,e,n){const r=oM(t);let i=r.length;if(oM(e).length!==i)return!1;for(;i-- >0;)if(!yF(t,e,n,r[i]))return!1;return!0}function Ff(t,e,n){const r=rM(t);let i=r.length;if(rM(e).length!==i)return!1;let o,s,a;for(;i-- >0;)if(o=r[i],!yF(t,e,n,o)||(s=iM(t,o),a=iM(e,o),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function Ule(t,e){return Fc(t.valueOf(),e.valueOf())}function Vle(t,e){return t.source===e.source&&t.flags===e.flags}function aM(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),o=t.values();let s,a;for(;(s=o.next())&&!s.done;){const l=e.values();let c=!1,d=0;for(;(a=l.next())&&!a.done;){if(!i[d]&&n.equals(s.value,a.value,s.value,a.value,t,e,n)){c=i[d]=!0;break}d++}if(!c)return!1}return!0}function Ty(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function Wle(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function yF(t,e,n,r){return(r===Rle||r===Mle||r===Ple)&&(t.$$typeof||e.$$typeof)?!0:Ole(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const Hle="[object ArrayBuffer]",Kle="[object Arguments]",Gle="[object Boolean]",Jle="[object DataView]",Yle="[object Date]",Xle="[object Error]",Qle="[object Map]",Zle="[object Number]",ece="[object Object]",tce="[object RegExp]",nce="[object Set]",rce="[object String]",ice={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array
708]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},oce="[object URL]",sce=Object.prototype.toString;function ace({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:f,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:g}){return function(v,y,b){if(v===y)return!0;if(v==null||y==null)return!1;const x=typeof v;if(x!==typeof y)return!1;if(x!=="object")return x==="number"?a(v,y,b):x==="function"?o(v,y,b):!1;const S=v.constructor;if(S!==y.constructor)return!1;if(S===Object)return l(v,y,b);if(Array.isArray(v))return e(v,y,b);if(S===Date)return r(v,y,b);if(S===RegExp)return d(v,y,b);if(S===Map)return s(v,y,b);if(S===Set)return f(v,y,b);const w=sce.call(v);if(w===Yle)return r(v,y,b);if(w===tce)return d(v,y,b);if(w===Qle)return s(v,y,b);if(w===nce)return f(v,y,b);if(w===ece)return typeof v.then!="function"&&typeof y.then!="function"&&l(v,y,b);if(w===oce)return p(v,y,b);if(w===Xle)return i(v,y,b);if(w===Kle)return l(v,y,b);if(ice[w])return h(v,y,b);if(w===Hle)return t(v,y,b);if(w===Jle)return n(v,y,b);if(w===Gle||w===Zle||w===rce)return c(v,y,b);if(g){let k=g[w];if(!k){const j=Cle(v);j&&(k=g[j])}if(k)return k(v,y,b)}return!1}}function lce({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:Ile,areArraysEqual:n?Ff:Dle,areDataViewsEqual:$le,areDatesEqual:Lle,areErrorsEqual:Ble,areFunctionsEqual:zle,areMapsEqual:n?q1(sM,Ff):sM,areNumbersEqual:Fle,areObjectsEqual:n?Ff:qle,arePrimitiveWrappersEqual:Ule,areRegExpsEqual:Vle,areSetsEqual:n?q1(aM,Ff):aM,areTypedArraysEqual:n?q1(Ty,Ff):Ty,areUrlsEqual:Wle,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=$g(r.areArraysEqual),o=$g(r.areMapsEqual),s=$g(r.areObjectsEqual),a=$g(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:a})}return r}function cce(t){return function(e,n,r,i,o,s,a){return t(e,n,a)}}function uce({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:c=t?new WeakMap:void 0,meta:d}=n();return e(a,l,{cache:c,equals:r,meta:d,strict:i})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return e(a,l,o)}}const dce=pl();pl({strict:!0});pl({circular:!0});pl({circular:!0,strict:!0});pl({createInternalComparator:()=>Fc});pl({strict:!0,createInternalComparator:()=>Fc});pl({circular:!0,createInternalComparator:()=>Fc});pl({circular:!0,createInternalComparator:()=>Fc,strict:!0});function pl(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,o=lce(t),s=ace(o),a=n?n(s):cce(s);return uce({circular:e,comparator:s,createState:r,equals:a,strict:i})}var bF={exports:{}},xF={};/** 709 * @license React 710 * use-sync-external-store-shim/with-selector.production.js 711 * 712 * Copyright (c) Meta Platforms, Inc. and affiliates. 713 * 714 * This source code is licensed under the MIT license found in the 715 * LICENSE file in the root directory of this source tree. 716 */var o0=E,fce=K_;function hce(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var pce=typeof Object.is=="function"?Object.is:hce,mce=fce.useSyncExternalStore,gce=o0.useRef,vce=o0.useEffect,yce=o0.useMemo,bce=o0.useDebugValue;xF.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=gce(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=yce(function(){function l(p){if(!c){if(c=!0,d=p,p=r(p),i!==void 0&&s.hasValue){var g=s.value;if(i(g,p))return f=g}return f=p}if(g=f,pce(d,p))return g;var m=r(p);return i!==void 0&&i(g,m)?(d=p,g):(d=p,f=m)}var c=!1,d,f,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=mce(t,o[0],o[1]);return vce(function(){s.hasValue=!0,s.value=a},[a]),bce(a),a};bF.exports=xF;var xce=bF.exports,wce=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},Sce=({contentComponent:t})=>{const e=K_.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return u.jsx(u.Fragment,{children:Object.values(e)})};function kce(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:m_.createPortal(r.reactElement,r.element,n)},t.forEach(i=>
716i())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(i=>i())}}}var Ece=class extends A.Component{constructor(t){super(t),this.editorContentRef=A.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=kce(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;const e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return u.jsxs(u.Fragment,{children:[u.jsx("div",{ref:wce(e,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&u.jsx(Sce,{contentComponent:t.contentComponent})]})}},jce=E.forwardRef((t,e)=>{const n=A.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return A.createElement(Ece,{key:n,innerRef:e,...t})}),wF=A.memo(jce),Tce=typeof window<"u"?E.useLayoutEffect:E.useEffect,_ce=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function Ace(t){var e;const[n]=E.useState(()=>new _ce(t.editor)),r=xce.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:dce);return Tce(()=>n.watch(t.editor),[t.editor,n]),E.useDebugValue(r),r}var Nce=!1,TE=typeof window>"u",Cce=TE||!!(typeof window<"u"&&window.next),Oce=class SF{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return TE||Cce?null:this.createEditor();if(this.options.current.immediatelyRender&&TE&&Nce)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onBeforeCreate)==null?void 0:o.call(i,...r)},onBlur:(...r)=>{var i,o;return(o=(i=this.options.current).onBlur)==null?void 0:o.call(i,...r)},onCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onCreate)==null?void 0:o.call(i,...r)},onDestroy:(...r)=>{var i,o;return(o=(i=this.options.current).onDestroy)==null?void 0:o.call(i,...r)},onFocus:(...r)=>{var i,o;return(o=(i=this.options.current).onFocus)==null?void 0:o.call(i,...r)},onSelectionUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onSelectionUpdate)==null?void 0:o.call(i,...r)},onTransaction:(...r)=>{var i,o;return(o=(i=this.options.current).onTransaction)==null?void 0:o.call(i,...r)}
716,onUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onUpdate)==null?void 0:o.call(i,...r)},onContentError:(...r)=>{var i,o;return(o=(i=this.options.current).onContentError)==null?void 0:o.call(i,...r)},onDrop:(...r)=>{var i,o;return(o=(i=this.options.current).onDrop)==null?void 0:o.call(i,...r)},onPaste:(...r)=>{var i,o;return(o=(i=this.options.current).onPaste)==null?void 0:o.call(i,...r)},onDelete:(...r)=>{var i,o;return(o=(i=this.options.current).onDelete)==null?void 0:o.call(i,...r)}};return new gle(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((i,o)=>{var s;return i===((s=n.extensions)==null?void 0:s[o])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?SF.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,i)=>r===e[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Pce(t={},e=[]){const n=E.useRef(t);n.current=t;const[r]=E.useState(()=>new Oce(n)),i=K_.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return E.useDebugValue(i),E.useEffect(r.onRender(e)),Ace({editor:i,selector:({transactionNumber:o})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&o===0?0:o+1}),i}var kF=E.createContext({editor:null});kF.Consumer;var Mce=E.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Rce=()=>E.useContext(Mce);A.forwardRef((t,e)=>{const{onDragStart:n}=Rce(),r=t.as||"div";return u.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});A.createContext({markViewContentRef:()=>{}});var bA=E.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});bA.displayName="TiptapContext";var Ice=()=>E.useContext(bA);function EF({editor:t,instance:e,children:n}){const r=t??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const i=E.useMemo(()=>({editor:r}),[r]),o=E.useMemo(()=>({editor:r}),[r]);return u.jsx(kF.Provider,{value:o,children:u.jsx(bA.Provider,{value:i,children:n})})}EF.displayName="Tiptap";function jF({...t}){const{editor:e}=Ice();return u.jsx(wF,{editor:e,...t})}jF.displayName="Tiptap.Content";Object.assign(EF,{Content:jF});var _y=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},Dce=/^\s*>\s$/,$ce=Ur.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return _y("blockquote",{...an(this.options.HTMLAttributes,t),children:_y("slot",{})})},parseMarkdown:(t,e)=>{var n;const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach((i,o)=>{var s,a;const d=((a=(s=e.renderChild)==null?void 0:s.call(e,i,o))!=null?a:e.renderChildren([i])).split(` 717`).map(f=>f.trim()===""?n:`${n} ${f}`);r.push(d.join(` 718`))}),r.join(` 719${n} 720`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}}
vendor: 10,333 bytes, lines 720-741
720,addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Sd({find:Dce,type:this.type})]}}),Lce=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Bce=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,zce=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Fce=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,qce=zc.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return _y("strong",{...an(this.options.HTMLAttributes,t),children:_y("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[wd({find:Lce,type:this.type}),wd({find:zce,type:this.type})]},addPasteRules(){return[Nc({find:Bce,type:this.type}),Nc({find:Fce,type:this.type})]}}),Uce=/(^|[^`])`([^`]+)`(?!`)$/,Vce=/(^|[^`])`([^`]+)`(?!`)/g,Wce=zc.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",an(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[wd({find:Uce,type:this.type})]},addPasteRules(){return[Nc({find:Vce,type:this.type})]}}),U1=4,Hce=/^```([a-z]+)?[\s\n]$/,Kce=/^~~~([a-z]+)?[\s\n]$/,Gce=Ur.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:U1,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const o=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",an(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const i=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${i}`,e.renderChildren(t.content),"```"].join(` 721`):r=`\`\`\`${i} 722 723\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:U1,{state:r}=t,{selection:i}=r,{$from:o,empty:s}=i;if(o.parent.type!==this.type)return!1;const a=" ".repeat(n);return s?t.commands.insertContent(a):t.commands.command(({tr:l})=>{const{from:c,to:d}=i,p=r.doc.textBetween(c,d,` 724`,` 725`).split(` 726`).map(g=>a+g).join(` 727`);return l.replaceWith(c,d,r.schema.text(p)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:U1,{state:r}=t,{selection:i}=r,{$from:o,empty:s}=i;return o.parent.type!==this.type?!1:s?t.commands.command(({tr:a})=>{var l;const{pos:c}=o,d=o.start(),f=o.end(),p=r.doc.textBetween(d,f,` 728`,` 729`).split(` 730`);let g=0,m=0;const v=c-d;for(let k=0;k<p.length;k+=1){if(m+p[k].length>=v){g=k;break}m+=p[k].length+1}const b=((l=p[g].match(/^ */))==null?void 0:l[0])||"",x=Math.min(b.length,n);if(x===0)return!0;let S=d;for(let k=0;k<g;k+=1)S+=p[k].length+1;return a.delete(S,S+x),c-S<=x&&a.setSelection(Re.create(a.doc,S)),!0}):t.commands.command(({tr:a})=>{const{from:l,to:c}=i,h=r.doc.textBetween(l,c,` 731`,` 732`).split(` 733`).map(p=>{var g;const m=((g=p.match(/^ */))==null?void 0:g[0])||"",v=Math.min(m.length,n);return p.slice(v)}).join(` 734`);return a.replaceWith(l,c,r.schema.text(h)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(` 735 736`);return!o||!s?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:c})=>(c.setSelection(He.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[EE({find:Hce,type:this.type,getAttributes:t=>({language:t[1]})}),EE({find:Kce,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Ut({key:new _n("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:s,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,` 737`));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(Re.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),Jce=Ur.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 738 739`):""}),Yce=Ur.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",an(this.options.HTMLAttributes,t)]},renderText(){return` 740`},renderMarkdown:()=>` 741`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&l&&s){const f=l.filter(h=>a.includes(h.type.name));c.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Xce=Ur.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,an(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,i="#".repeat(r);return t.content?`${i} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>EE({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),Qce=Ur.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",an(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!ble(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,i=t();return Z6(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:o,tr:s,dispatch:a})=>{if(a){const{$to:l}=s.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?s.setSelection(Re.create(s.doc,l.pos+1)):l.nodeAfter.isBlock?s.setSelection(Te.create(s.doc,l.pos)):s.setSelection(Re.create(s.doc,l.pos));else{const d=o.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,f=d==null?void 0:d.create();f&&(s.insert(c,f),s.setSelection(Re.create(s.doc,c+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[gF({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
vendor: 4,520 bytes, line 741
741ype})]}}),Zce=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,eue=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,tue=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,nue=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,rue=zc.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",an(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[wd({find:Zce,type:this.type}),wd({find:tue,type:this.type})]},addPasteRules(){return[Nc({find:eue,type:this.type}),Nc({find:nue,type:this.type})]}});const iue="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
741ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",oue="ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мÐ
741ºÐ´2он1Ñква6онлайн5Ñг3ÑÑÑ2Ñ2ÑайÑ3Ñб3ÑкÑ3Òаз3Õ°Õ¡Õµ3×שר××5×§××3Ø§Ø¨ÙØ¸Ø¨Ù5راÙ
ÙÙ5ÙØ§Ø±Ø¯Ù4Ø¨ØØ±ÙÙ5جزائر5Ø³Ø¹ÙØ¯ÙØ©6عÙÙØ§Ù5Ù
غرب5Ù
ارات5ÛØ±Ø§Ù5بارت2زار4ÙØªÙ3ھارت5تÙÙØ³4Ø³ÙØ¯Ø§Ù3Ø±ÙØ©5Ø´Ø¨ÙØ©4عراÙ2ب2Ù
اÙ4ÙÙØ³Ø·ÙÙ6ÙØ·Ø±3ÙØ§Ø«ÙÙÙÙ6ÙÙ
3Ù
صر2ÙÙØ³Ùا5ÙØ±ÙتاÙÙØ§7ÙØ¹4ÙÙ
راÙ5پاکستاÙ7ÚØ§Ø±Øª4à¤à¥à¤®3नà¥à¤3à¤à¤¾à¤°à¤¤0मà¥3à¥à¤¤5सà¤à¤à¤ न5বাà¦à¦²à¦¾5à¦à¦¾à¦°à¦¤2ৰত4à¨à¨¾à¨°à¨¤4àªàª¾àª°àª¤4à¬à¬¾à¬°à¬¤4à®à®¨à¯à®¤à®¿à®¯à®¾6லà®à¯à®à¯6à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯11à°à°¾à°°à°¤à±5à²à²¾à²°à²¤4à´à´¾à´°à´¤à´5à¶½à¶à¶à·4à¸à¸à¸¡3à¹à¸à¸¢3ລາວ3áá2ã¿ããª3ã¢ãã¾ã³4ã¯ã©ã¦ã4ã°ã¼ã°ã«4ã³ã 2ã¹ãã¢3ã»ã¼ã«3ãã¡ãã·ã§ã³6ãã¤ã³ã4ä¸ç2ä¸ä¿¡1å½1å1æç½3äºé©¬é3ä¼ä¸2ä½å±±2ä¿¡æ¯2å¥åº·2å
«å¦2å
¬å¸1ç2å°æ¹¾1ç£2åå1åº1æ 2åé0大é
åº5å¨çº¿2大æ¿2天主æ3娱ä¹2å®¶é»2广ä¸2å¾®å2æ
å2æç±ä½ 3ææº2æè2æ¿å¡1åº2æ°å å¡2é»2æ¶å°2æ¸ç±2æºæ2淡马é¡3游æ2æ¾³é2ç¹ç2ç§»å¨2ç»ç»æºæ4ç½å1åº1ç«1ç»2èé2è°·æ2è´ç©2é販2éå¢2é»è¨çç§4é£å©æµ¦3é£å2é¤å
2馿 ¼éæ3港2ë·ë·1ì»´2ì¼ì±2íêµ2",_E="numeric",AE="ascii",NE="alph
741a",Ph="asciinumeric",uh="alphanumeric",CE="domain",TF="emoji",sue="scheme",aue="slashscheme",V1="whitespace";function lue(t,e){return t in e||(e[t]=[]),e[t]}function Gl(t,e,n){e[_E]&&(e[Ph]=!0,e[uh]=!0),e[AE]&&(e[Ph]=!0,e[NE]=!0),e[Ph]&&(e[uh]=!0),e[NE]&&(e[uh]=!0),e[uh]&&(e[CE]=!0),e[TF]&&(e[CE]=!0);for(const r in e){const i=lue(r,n);i.indexOf(t)<0&&i.push(t)}}function cue(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Dr(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Dr.groups={};Dr.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const i=e.jr[r][0],o=e.jr[r][1];if(o&&i.test(t))return o}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){r=r||Dr.groups;let i;return e&&e.j?i=e:(i=new Dr(e),n&&r&&Gl(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const o=t.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(t[s]);return i.tt(t[o-1],e,n,r)},tt(t,e,n,r){r=r||Dr.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const o=e;let s,a=i.go(t);if(a?(s=new Dr,Object.assign(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Dr,o){if(r)if(s.t&&typeof s.t=="string"){const l=Object.assign(cue(s.t,r),n);Gl(o,l,r)}else n&&Gl(o,n,r);s.t=o}return i.j[t]=s,s}};const We=(t,e,n,r,i)=>t.ta(e,n,r,i),Vt=(t,e,n,r,i)=>t.tr(e,n,r,i),lM=(t,e,n,r,i)=>t.ts(e,n,r,i),ee=(t,e,n,r,i)=>t.tt(e,n,r,i),ls="WORD",OE="UWORD",_F="ASCIINUMERICAL",AF="ALPHANUMERICAL",Ip="LOCALHOST",PE="TLD",ME="UTLD",_v="SCHEME",hu="SLASH_SCHEME",xA="NUM",RE="WS",wA="NL",Mh="OPENBRACE",Rh="CLOSEBRACE",Ay="OPENBRACKET",Ny="CLOSEBRACKET",Cy="OPENPAREN",Oy="CLOSEPAREN",Py="OPENANGLEBRACKET",My="CLOSEANGLEBRACKET",Ry="FULLWIDTHLEFTPAREN",Iy="FULLWIDTHRIGHTPAREN",Dy="LEFTCORNERBRACKET",$y="RIGHTCORNERBRACKET",Ly="LEFTWHITECORNERBRACKET",By="RIGHTWHITECORNERBRACKET",zy="FULLWIDTHLESSTHAN",Fy="FULLWIDTHGREATERTHAN",qy="AMPERSAND",Uy="APOSTROPHE",Vy="ASTERISK",ua="AT",Wy="BACKSLASH",Hy="BACKTICK",Ky="CARET",ba="COLON",SA="COMMA",Gy="DOLLAR",Eo="DOT",Jy="EQUALS",kA="EXCLAMATION",gi="HYPHEN",Ih="PERCENT",Yy="PIPE",Xy="PLUS",Qy="POUND",Dh="QUERY",EA="QUOTE",NF="FULLWIDTHMIDDLEDOT",jA="SEMI",jo="SLASH",$h="TILDE",Zy="UNDERSCORE",CF="EMOJI",eb="SYM";var OF=Object.freeze({__proto__:null,ALPHANUMERICAL:AF,AMPERSAND:qy,APOSTROPHE:Uy,ASCIINUMERICAL:_F,ASTERISK:Vy,AT:ua,BACKSLASH:Wy,BACKTICK:Hy,CARET:Ky,CLOSEANGLEBRACKET:My,CLOSEBRACE:Rh,CLOSEBRACKET:Ny,CLOSEPAREN:Oy,COLON:ba,COMMA:SA,DOLLAR:Gy,DOT:Eo,EMOJI:CF,EQUALS:Jy,EXCLAMATION:kA,FULLWIDTHGREATERTHAN:Fy,FULLWIDTHLEFTPAREN:Ry,FULLWIDTHLESSTHAN:zy,FULLWIDTHMIDDLEDOT:NF,FULLWIDTHRIGHTPAREN:Iy,HYPHEN:gi,LEFTCORNERBRACKET:Dy,LEFTWHITECORNERBRACKET:Ly,LOCALHOST:Ip,NL:wA,NUM:xA,OPENANGLEBRACKET:Py,OPENBRACE:Mh,OPENBRACKET:Ay,OPENPAREN:Cy,PERCENT:Ih,PIPE:Yy,PLUS:Xy,POUND:Qy,QUERY:Dh,QUOTE:EA,RIGHTCORNERBRACKET:$y,RIGHTWHITECORNERBRACKET:By,SCHEME:_v,SEMI:jA,SLASH:jo,SLASH_SCHEME:hu,SYM:eb,TILDE:$h,TLD:PE,UNDERSCORE:Zy,UTLD:ME,UWORD:OE,WORD:ls,WS:RE});const ns=/[a-z]/,qf=new RegExp("\\p{L}","u"),W1=new RegExp("\\p{Emoji}","u"),rs=/\d/,H1=/\s/,cM="\r",K1=` 742`,uue="ï¸",due="â",G1="";let Lg=null,Bg=null;function fue(t=[]){const e={};Dr.groups=e;const n=new Dr;Lg==null&&(Lg=uM(iue)),Bg==null&&(Bg=uM(oue)),ee(n,"'",Uy),ee(n,"{",Mh),ee(n,"}",Rh),ee(n,"[",Ay),ee(n,"]",Ny),ee(n,"(",Cy),ee(n,")",Oy),ee(n,"<",Py),ee(n,">",My),ee(n,"ï¼",Ry),ee(n,"ï¼",Iy),ee(n,"ã",Dy),ee(n,"ã",$y),ee(n,"ã",Ly),ee(n,"ã",By),ee(n,"ï¼",zy),ee(n,"ï¼",Fy),ee(n,"&",qy),ee(n,"*",Vy),ee(n,"@",ua),ee(n,"`",Hy),ee(n,"^",Ky),ee(n,":",ba),ee(n,",",SA),ee(n,"$",Gy),ee(n,".",Eo),ee(n,"=",Jy),ee(n,"!",kA),ee(n,"-",gi),ee(n,"%",Ih),ee(n,"|",Yy),ee(n,"+",Xy),ee(n,"#",Qy),ee(n,"?",Dh),ee(n,'"',EA),ee(n,"/",jo),ee(n,";",jA),ee(n,"~",$h),ee(n,"_",Zy),ee(n,"\\",Wy),ee(n,"ã»",NF);const r=Vt(n,rs,xA,{[_E]:!0});Vt(r,rs,r);const i=Vt(r,ns,_F,{[Ph]:!0}),o=Vt(r,qf,AF,{[uh]:!0}),s=Vt(n,ns,ls,{[AE]:!0});Vt(s,rs,i),Vt(s,ns,s),Vt(i,rs,i),Vt(i,ns,i);const a=Vt(n,qf,OE,{[NE]:!0});Vt(a,ns),Vt(a,rs,o),Vt(a,qf,a),Vt(o,rs,o),Vt(o,ns),Vt(o,qf,o);const l=ee(n,K1,wA,{[V1]:!0}),c=ee(n,cM,RE,{[V1]:!0}),d=Vt(n,H1,RE,{[V1]:!0});ee(n,G1,d),ee(c,K1,l),ee(c,G1,d),Vt(c,H1,d),ee(d,cM),ee(d,K1),Vt(d,H1,d),ee(d,G1,d);const f=Vt(n,W1,CF,{[TF]:!0});ee(f,"#"),Vt(f,W1,f),ee(f,uue,f);const h=ee(f,due);ee(h,"#"),Vt(h,W1,f);const p=[[ns,s],[rs,i]],g=[[ns,null],[qf,a],[rs,o]];for(let m=0;m<Lg.length;m++)na(n,Lg[m],PE,ls,p);for(let m=0;m<Bg.length;m++)na(n,Bg[m],ME,OE,g);Gl(PE,{tld:!0,ascii:!0},e),Gl(ME,{utld:!0,alpha:!0},e),na(n,"file",_v,ls,p),na(n,"mailto",_v,ls,p),na(n,"http",hu,ls,p),na(n,"https",hu,ls,p),na(n,"ftp",hu,ls,p),na(n,"ftps",hu,ls,p),Gl(_v,{scheme:!0,ascii:!0},e),Gl(hu,{slashscheme:!0,ascii:!0},e),t=t.sort((m,v)=>m[0]>v[0]?1:-1);for(let m=0;m<t.length;m++){const v=t[m][0],b=t[m][1]?{[sue]:!0}:{[aue]:!0};v.indexOf("-")>=0?b[CE]=!0:ns.test(v)?rs.test(v)?b[Ph]=!0:b[AE]=!0:b[_E]=!0,lM(n,v,v,b)}return lM(n,"localhost",Ip,{ascii:!0}),n.jd=new Dr(eb),{start:n,tokens:Object.assign({groups:e},OF)}}function PF(t,e){const n=hue(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=t,l=null,c=0,d=null,f=-1,h=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(f=0,h=0,d=a):f>=0&&(f+=n[s].length,h++),c+=n[s].length,o+=n[s].length,s++;o-=f,s-=h,c-=f,i.push({t:d.t,v:e.slice(o-c,o),s:o-c,e:o})}return i}function hue(t){const e=[],n=t.length;let r=0;for(;r<n;
vendor: 8,442 bytes, lines 742-745
742){let i=t.charCodeAt(r),o,s=i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function na(t,e,n,r,i){let o;const s=e.length;for(let a=0;a<s-1;a++){const l=e[a];t.j[l]?o=t.j[l]:(o=new Dr(r),o.jr=i.slice(),t.j[l]=o),t=o}return o=new Dr(n),o.jr=i.slice(),t.j[e[s-1]]=o,o}function uM(t){const e=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let o=0;for(;i.indexOf(t[r+o])>=0;)o++;if(o>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+o),10);s>0;s--)n.pop();r+=o}else n.push(t[r]),r++}return e}const Dp={defaultProtocol:"http",events:null,format:dM,formatHref:dM,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function TA(t,e=null){let n=Object.assign({},Dp);t&&(n=Object.assign(n,t instanceof TA?t.o:t));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}TA.prototype={o:Dp,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:Dp[t],typeof i=="function"&&r&&(i=i(e,n))):typeof i=="function"&&r&&(i=i(e,n.t,n)),i)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function dM(t){return t}function MF(t,e){this.t="token",this.v=t,this.tk=e}MF.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"â¦":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Dp.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,e),o=this.toFormattedString(t),s={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),d=t.getObj("attributes",n,e),f=t.getObj("events",n,e);return s.href=r,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),d&&Object.assign(s,d),{tagName:i,attributes:s,content:o,eventListeners:f}}};function s0(t,e){class n extends MF{constructor(i,o){super(i,o),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const fM=s0("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),hM=s0("text"),pue=s0("nl"),zg=s0("url",{isLink:!0,toHref(t=Dp.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Ip&&t[1].t===ba}}),fi=t=>new Dr(t);function mue({groups:t}){const e=t.domain.concat([qy,Vy,ua,Wy,Hy,Ky,Gy,Jy,gi,xA,Ih,Yy,Xy,Qy,jo,eb,$h,Zy]),n=[Uy,ba,SA,Eo,kA,Ih,Dh,EA,jA,Py,My,Mh,Rh,Ny,Ay,Cy,Oy,Ry,Iy,Dy,$y,Ly,By,zy,Fy],r=[qy,Uy,Vy,Wy,Hy,Ky,Gy,Jy,gi,Mh,Rh,Ih,Yy,Xy,Qy,Dh,jo,eb,$h,Zy],i=fi(),o=ee(i,$h);We(o,r,o),We(o,t.domain,o);const s=fi(),a=fi(),l=fi();We(i,t.domain,s),We(i,t.scheme,a),We(i,t.slashscheme,l),We(s,r,o),We(s,t.domain,s);const c=ee(s,ua);ee(o,ua,c),ee(a,ua,c),ee(l,ua,c);const d=ee(o,Eo);We(d,r,o),We(d,t.domain,o);const f=fi();We(c,t.domain,f),We(f,t.domain,f);const h=ee(f,Eo);We(h,t.domain,f);const p=fi(fM);We(h,t.tld,p),We(h,t.utld,p),ee(c,Ip,p);const g=ee(f,gi);ee(g,gi,g),We(g,t.domain,f),We(p,t.domain,f),ee(p,Eo,h),ee(p,gi,g);const m=ee(p,ba);We(m,t.numeric,fM);const v=ee(s,gi),y=ee(s,Eo);ee(v,gi,v),We(v,t.domain,s),We(y,r,o),We(y,t.domain,s);const b=fi(zg);We(y,t.tld,b),We(y,t.utld,b),We(b,t.domain,s),We(b,r,o),ee(b,Eo,y),ee(b,gi,v),ee(b,ua,c);const x=ee(b,ba),S=fi(zg);We(x,t.numeric,S);const w=fi(zg),k=fi();We(w,e,w),We(w,n,k),We(k,e,w),We(k,n,k),ee(b,jo,w),ee(S,jo,w);const j=ee(a,ba),T=ee(l,ba),_=ee(T,jo),N=ee(_,jo);We(a,t.domain,s),ee(a,Eo,y),ee(a,gi,v),We(l,t.domain,s),ee(l,Eo,y),ee(l,gi,v),We(j,t.domain,w),ee(j,jo,w),ee(j,Dh,w),We(N,t.domain,w),We(N,e,w),ee(N,jo,w);const C=[[Mh,Rh],[Ay,Ny],[Cy,Oy],[Py,My],[Ry,Iy],[Dy,$y],[Ly,By],[zy,Fy]];for(let O=0;O<C.length;O++){const[I,P]=C[O],$=ee(w,I);ee(k,I,$),ee($,P,w);const B=fi(zg);We($,e,B);const z=fi();We($,n),We(B,e,B),We(B,n,z),We(z,e,B),We(z,n,z),ee(B,P,w),ee(z,P,w)}return ee(i,Ip,b),ee(i,wA,pue),{start:i,tokens:OF}}function gue(t,e,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let a=t,l=null,c=null,d=0,f=null,h=-1;for(;i<r&&!(l=a.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||a.go(n[i].t));)l=null,a=c,a.accepts()?(h=0,f=a):h>=0&&h++,i++,d++;if(h<0)i-=d,i<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(J1(hM,e,s)),s=[]),i-=h,d-=h;const p=f.t,g=n.slice(i-d,i);o.push(J1(p,e,g))}}return s.length>0&&o.push(J1(hM,e,s)),o}function J1(t,e,n){const r=n[0].s,i=n[n.length-1].e,o=e.slice(r,i);return new t(o,n)}const vue=typeof console<"u"&&console&&console.warn||(()=>{}),yue="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ot={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function bue(){return Dr.groups={},Ot.scanner=null,Ot.parser=null,Ot.tokenQueue=[],Ot.pluginQueue=[],Ot.customSchemes=[],Ot.initialized=!1,Ot}function pM(t,e=!1){if(Ot.initialized&&vue(`linkifyjs: already initialized - will not register custom scheme "${t}" ${yue}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format. 7431. Must only contain digits, lowercase ASCII letters or "-" 7442. Cannot start or end with "-" 7453. "-" cannot repeat`);Ot.customSchemes.push([t,e])}function xue(){Ot.scanner=fue(Ot.customSchemes);for(let t=0;t<Ot.tokenQueue.length;t++)Ot.tokenQueue[t][1]({scanner:Ot.scanner});Ot.parser=mue(Ot.scanner.tokens);for(let t=0;t<Ot.pluginQueue.length;t++)Ot.pluginQueue[t][1]({scanner:Ot.scanner,parser:Ot.parser});return Ot.initialized=!0,Ot}function _A(t){return Ot.initialized||xue(),gue(Ot.parser.start,t,PF(Ot.scanner.start,t))}_A.scan=PF;function RF(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new TA(n),i=_A(t),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!e||a.t===e)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}var AA="[\0-  áá â-\u2029âã]",wue=new RegExp(AA),Sue=new RegExp(`${AA}$`),kue=new RegExp(AA,"g");function Eue(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function jue(t){return new Ut({key:new _n("autolink"),appendTransaction:(e,n,r)=>{const i=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),o=e.some(c=>c.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=W6(n.doc,[...e]);if(Q6(a).forEach(({newRange:c})=>{const d=gae(r.doc,c,p=>p.isTextblock);let f,h;if(d.length>1)f=d[0],h=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ");else if(d.length){const p=r.doc.textBetween(c.from,c.to," "," ");if(!Sue.test(p))return;f=d[0],h=r.doc.textBetween(f.pos,c.to,void 0," ")}if(f&&h){const p=h.split(wue).filter(Boolean);if(p.length<=0)return!1;const g=p[p.length-1],m=f.pos+h.lastIndexOf(g);if(!g)return!1;const v=_A(g).map(y=>y.toObject(t.defaultProtocol));if(!Eue(v))return!1;v.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>t.validate(y.value)).filter(y=>t.shouldAutoLink(y.value)).forEach(y=>{pA(y.from,y.to,r.doc).some(b=>b.mark.type===t.type)||s.addMark(y.from,y.to,t.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function Tue(t){return new Ut({key:new _n("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,o;if(r.button!==0||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{const l=r.target;if(!l)return!1;const c=t.editor.view.dom;s=l.closest("a"),s&&!c.contains(s)&&(s=null)}if(!s)return!1;let a=!1;if(t.enableClickSelection&&(a=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const l=X6(e.state,t.type.n
vendor: 3,981 bytes, line 745
745ame),c=(i=s.href)!=null?i:l.href,d=(o=s.target)!=null?o:l.target;c&&(window.open(c,d),a=!0)}return a}}})}function _ue(t){return new Ut({key:new _n("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:i}=t,{state:o}=e,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(d=>{l+=d.textContent});const c=RF(l,{defaultProtocol:t.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!c||i!==void 0&&!i(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function Tl(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!t||t.replace(kue,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var IF=zc.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){pM(t);return}pM(t.scheme,t.optionalSlashes)})},onDestroy(){bue()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Tl(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const i=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Tl(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Tl(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",an(this.options.HTMLAttributes,t),0]:["a",an(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,i,o;const s=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",a=(o=(i=t.attrs)==null?void 0:i.title)!=null?o:"",l=e.renderChildren(t);return a?`[${l}](${s} "${a}")`:`[${l}](${s})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Tl(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Tl(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Nc({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,i=RF(t).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:s=>!!Tl(s,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(o=>{this.options.shouldAutoLink(o.value)&&e.push({text:o.value,data:{href:o.href},index:o.start})})}return e}
vendor: 14,170 bytes, lines 745-756
745,type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(jue({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!Tl(i,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(Tue({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(_ue({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),Aue=IF,Nue=Object.defineProperty,Cue=(t,e)=>{for(var n in e)Nue(t,n,{get:e[n],enumerable:!0})},Oue="listItem",mM="textStyle",gM=/^\s*([-+*])\s$/,DF=Ur.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",an(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 746`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Oue,this.editor.getAttributes(mM)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Sd({find:gM,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Sd({find:gM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(mM),editor:this.editor})),[t]}}),$F=Ur.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",an(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;let i=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(s=>s.type==="paragraph"))i=r(t.tokens);else{const s=t.tokens[0];if(s&&s.type==="text"&&s.tokens&&s.tokens.length>0){if(i=[{type:"paragraph",content:e.parseInline(s.tokens)}],t.tokens.length>1){const l=t.tokens.slice(1),c=r(l);i.push(...c)}}else i=r(t.tokens)}return i.length===0&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(t,e,n)=>yA(t,e,r=>{var i,o;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((o=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:o.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Pue={};Cue(Pue,{findListItemPos:()=>Dm,getNextListDepth:()=>NA,handleBackspace:()=>IE,handleDelete:()=>DE,hasListBefore:()=>LF,hasListItemAfter:()=>Mue,hasListItemBefore:()=>BF,listItemHasSubList:()=>zF,nextListIsDeeper:()=>FF,nextListIsHigher:()=>qF});var Dm=(t,e)=>{const{$from:n}=e.selection,r=bn(t,e.schema);let i=null,o=n.depth,s=n.pos,a=null;for(;o>0&&a===null;)i=n.node(o),i.type===r?a=o:(o-=1,s-=1);return a===null?null:{$pos:e.doc.resolve(s),depth:a}},NA=(t,e)=>{const n=Dm(t,e);if(!n)return!1;const[,r]=_ae(e,t,n.$pos.pos+4);return r},LF=(t,e,n)=>{const{$anchor:r}=t.selection,i=Math.max(0,r.pos-2),o=t.doc.resolve(i).node();return!(!o||!n.includes(o.type.name))},BF=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return!(i.index()===0||((n=i.nodeBefore)==null?void 0:n.type.name)!==t)},zF=(t,e,n)=>{if(!n)return!1;const r=bn(t,e.schema);let i=!1;return n.descendants(o=>{o.type===r&&(i=!0)}),i},IE=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!il(t.state,e)&&LF(t.state,e,n)){const{$anchor:a}=t.state.selection,l=t.state.doc.resolve(a.before()-1),c=[];l.node().descendants((h,p)=>{h.type.name===e&&c.push({node:h,pos:p})});const d=c.at(-1);if(!d)return!1;const f=t.state.doc.resolve(l.start()+d.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},f.end()).joinForward().run()}if(!il(t.state,e)||!Oae(t.state))return!1;const r=Dm(e,t.state);if(!r)return!1;const o=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=zF(e,t.state,o);return BF(e,t.state)&&!s?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},FF=(t,e)=>{const n=NA(t,e),r=Dm(t,e);return!r||!n?!1:n>r.depth},qF=(t,e)=>{const n=NA(t,e),r=Dm(t,e);return!r||!n?!1:n<r.depth},DE=(t,e)=>{if(!il(t.state,e)||!Cae(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:FF(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():qF(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},Mue=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((n=i.nodeAfter)==null?void 0:n.type.name)!==t)},UF=en.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&DE(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&DE(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&IE(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&IE(t,n,r)&&(e=!0)}),e}}}}),vM=/^(\s*)(\d+)\.\s+(.*)$/,Rue=/^\s/;function Iue(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n],o=i.match(vM);if(!o)break;const[,s,a,l]=o,c=s.length;let d=l,f=n+1;const h=[i];for(;f<t.length;){const p=t[f];if(p.match(vM))break;if(p.trim()==="")h.push(p),d+=` 747`,f+=1;else if(p.match(Rue))h.push(p),d+=` 748${p.slice(c+2)}`,f+=1;else break}e.push({indent:c,number:parseInt(a,10),content:d.trim(),raw:h.join(` 749`)}),r=f,n=f}return[e,r]}function VF(t,e,n){var r;const i=[];let o=0;for(;o<t.length;){const s=t[o];if(s.indent===e){const a=s.content.split(` 750`),l=((r=a[0])==null?void 0:r.trim())||"",c=[];l&&c.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const d=a.slice(1).join(` 751`).trim();if(d){const p=n.blockTokens(d);c.push(...p)}let f=o+1;const h=[];for(;f<t.length&&t[f].indent>e;)h.push(t[f]),f+=1;if(h.length>0){const p=Math.min(...h.map(m=>m.indent)),g=VF(h,p,n);c.push({type:"list",ordered:!0,start:h[0].number,items:g,raw:h.map(m=>m.raw).join(` 752`)})}i.push({type:"list_item",raw:s.raw,tokens:c}),o=f}else o+=1}return i}function Due(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...e.parseChildren([i]));else if(i.type==="text"&&i.tokens){const o=e.parseChildren([i]);r.push({type:"paragraph",content:o})}else{const o=e.parseChildren([i]);o.length>0&&r.push(...o)}}),{type:"listItem",content:r}})}var $ue="listItem",yM="textStyle",bM=/^(\d+)\.\s$/,WF=Ur.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",an(this.options.HTMLAttributes,n),0]:["ol",an(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?Due(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 753`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e==null?void 0:e.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const i=t.split(` 754`),[o,s]=Iue(i);if(o.length===0)return;const a=VF(o,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=o[0])==null?void 0:r.number)||1,items:a,raw:i.slice(0,s).join(` 755`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes($ue,this.editor.getAttributes(yM)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Sd({find:bM,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Sd({find:bM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(yM)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),Lue=/^\s*(\[([( |x])?\])\s$/,Bue=Ur.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",an(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const i=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return yA(t,e,i)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const i=document.createElement("li"),o=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=f=>{var h,p;a.ariaLabel=((p=(h=this.options.a11y)==null?void 0:h.checkboxLabel)==null?void 0:p.call(h,f,a.checked))||`Task item checkbox for ${f.textContent||"empty task item"}`};c(t),o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",f=>f.preventDefault()),a.addEventListener("change",f=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:h}=f.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{const g=n();if(typeof g!="number")return!1;const m=p.doc.nodeAt(g);return p.setNodeMarkup(g,void 0,{...m==null?void 0:m.attrs,checked:h}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,h)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([f,h])=>{i.setAttribute(f,h)}),i.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,o.append(a,s),i.append(o,l),Object.entries(e).forEach(([f,h])=>{i.setAttribute(f,h)});let d=new Set(Object.keys(e));return{dom:i,contentDOM:l,update:f=>{if(f.type!==this.type)return!1;i.dataset.checked=f.attrs.checked,a.checked=f.attrs.checked,c(f);const h=r.extensionManager.attributes,p=Rp(f,h),g=new Set(Object.keys(p)),m=this.options.HTMLAttributes;return d.forEach(v=>{g.has(v)||(v in m?i.setAttribute(v,m[v]):i.removeAttribute(v))}),Object.entries(p).forEach(([v,y])=>{y==null?v in m?i.setAttribute(v,m[v]):i.removeAttribute(v):i.setAttribute(v,y)}),d=g,!0}}}},addInputRules(){return[Sd({find:Lue,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),zue=Ur.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",an(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 756`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=o=>{const s=jE(o,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>
756({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(o)},i=jE(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,s)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:s}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});en.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(DF.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push($F.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(UF.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(WF.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(Bue.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(zue.configure(this.options.taskList)),t}});var Fg=" ",Y1="Â ",Fue=Ur.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",an(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===Fg||n[0].text===Fg||n[0].raw===Y1||n[0].text===Y1)&&r.length===1&&r[0].type==="text"&&(r[0].text===Fg||r[0].text===Y1)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,i;if(!t)return"";const o=Array.isArray(t.content)?t.content:[];if(o.length===0){const s=Array.isArray((r=n==null?void 0:n.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((i=n==null?void 0:n.previousNode)==null?void 0:i.type)==="paragraph"&&s.length===0?Fg:""}return e.renderChildren(o)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),que=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Uue=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Vue=zc.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",an(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[wd({find:que,type:this.type})]},addPasteRules(){return[Nc({find:Uue,type:this.type})]}}),Wue=Ur.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),HF=zc.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",an(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!i)return;const o=i[2].trim();return{type:"underline",raw:i[0],text:o,tokens:n.inlineTokens(o)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Hue=HF;function Kue(t={}){return new Ut({view(e){return new Gue(e,t)}})}class Gue{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=s=>
vendor: 4,371 bytes, line 756
756{this[i](s)};return e.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,i=this.editorView.dom,o=i.getBoundingClientRect(),s=o.width/i.offsetWidth,a=o.height/i.offsetHeight;if(n){let f=e.nodeBefore,h=e.nodeAfter;if(f||h){let p=this.editorView.nodeDOM(this.cursorPos-(f?f.nodeSize:0));if(p){let g=p.getBoundingClientRect(),m=f?g.bottom:g.top;f&&h&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let v=this.width/2*a;r={left:g.left,right:g.right,top:m-v,bottom:m+v}}}}if(!r){let f=this.editorView.coordsAtPos(this.cursorPos),h=this.width/2*s;r={left:f.left-h,right:f.left+h,top:f.top,bottom:f.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,d=-pageYOffset;else{let f=l.getBoundingClientRect(),h=f.width/l.offsetWidth,p=f.height/l.offsetHeight;c=f.left-l.scrollLeft*h,d=f.top-l.scrollTop*p}this.element.style.left=(r.left-c)/s+"px",this.element.style.top=(r.top-d)/a+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!o){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=qz(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class Yt extends He{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Yt.valid(r)?new Yt(r):He.near(r)}content(){return he.empty}eq(e){return e instanceof Yt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Yt(e.resolve(n.pos))}getBookmark(){return new CA(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!Jue(e)||!Yue(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Yt.valid(e))return e;let i=e.pos,o=null;for(let s=e.depth;;s--){let a=e.node(s);if(n>0?e.indexAfter(s)<a.childCount:e.index(s)>0){o=a.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;i+=n;let l=e.doc.resolve(i);if(Yt.valid(l))return l}for(;;){let s=n>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!Te.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*n),r=!1;continue e}break}o=s,i+=n;let a=e.doc.resolve(i);if(Yt.valid(a))return a}return null}}}Yt.prototype.visible=!1;Yt.findFrom=Yt.findGapCursorFrom;He.jsonID("gapcursor",Yt);class CA{constructor(e){this.pos=e}map(e){return new CA(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Yt.valid(n)?new Yt(n):He.near(n)}}function KF(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function Jue(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||KF(i.type))return!0;
vendor: 19,244 bytes, line 756
756if(i.inlineContent)return!1}}return!0}function Yue(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||KF(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Xue(){return new Ut({props:{decorations:tde,createSelectionBetween(t,e,n){return e.pos==n.pos&&Yt.valid(n)?new Yt(n):null},handleClick:Zue,handleKeyDown:Que,handleDOMEvents:{beforeinput:ede}}})}const Que=$6({ArrowLeft:qg("horiz",-1),ArrowRight:qg("horiz",1),ArrowUp:qg("vert",-1),ArrowDown:qg("vert",1)});function qg(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,o){let s=r.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof Re){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=Yt.findGapCursorFrom(a,e,l);return c?(i&&i(r.tr.setSelection(new Yt(c))),!0):!1}}function Zue(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Yt.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&Te.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Yt(r))),!0)}function ede(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Yt))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=Q.empty;for(let s=r.length-1;s>=0;s--)i=Q.from(r[s].createAndFill(null,i));let o=t.state.tr.replace(n.pos,n.pos,new he(i,0,0));return o.setSelection(Re.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function tde(t){if(!(t.selection instanceof Yt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Lt.create(t.doc,[mr.widget(t.selection.head,e,{key:"gapcursor"})])}var tb=200,In=function(){};In.prototype.append=function(e){return e.length?(e=In.from(e),!this.length&&e||e.length<tb&&this.leafAppend(e)||this.length<tb&&e.leafPrepend(this)||this.appendInner(e)):this};In.prototype.prepend=function(e){return e.length?In.from(e).append(this):this};In.prototype.appendInner=function(e){return new nde(this,e)};In.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?In.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};In.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};In.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};In.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},n,r),i};In.from=function(e){return e instanceof In?e:e&&e.length?new GF(e):In.empty};var GF=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,a){for(var l=o;l<s;l++)if(i(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,s,a){for(var l=o-1;l>=s;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=tb)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=tb)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(In);In.empty=new GF([]);var nde=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,o,s){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(r,Math.min(i,a),o,s)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(In);const rde=500;class oo{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=e.tr,a,l,c=[],d=[];return this.items.forEach((f,h)=>{if(!f.step){i||(i=this.remapping(r,h+1),o=i.maps.length),o--,d.push(f);return}if(i){d.push(new To(f.map));let p=f.step.map(i.slice(o)),g;p&&s.maybeStep(p).doc&&(g=s.mapping.maps[s.mapping.maps.length-1],c.push(new To(g,void 0,void 0,c.length+d.length))),o--,g&&i.appendMap(g,o)}else s.maybeStep(f.step);if(f.selection)return a=i?f.selection.map(i.slice(o)):f.selection,l=new oo(this.items.slice(0,r).append(d.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let d=0;d<e.steps.length;d++){let f=e.steps[d].invert(e.docs[d]),h=new To(e.mapping.maps[d],f,n),p;(p=l&&l.merge(h))&&(h=p,d?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(s++,n=void 0),i||(l=h)}let c=s-r.depth;return c>ode&&(a=ide(a,c),s-=c),new oo(a.append(o),s)}remapping(e,n){let r=new Ap;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new oo(this.items.append(e.map(n=>new To(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let g=o.maps[p];if(h.step){let m=e.steps[p].invert(e.docs[p]),v=h.selection&&h.selection.map(o.slice(l+1,p));v&&a++,r.push(new To(g,m,v))}else r.push(new To(g))},i);let c=[];for(let h=n;h<s;h++)c.push(new To(o.maps[h]));let d=this.items.slice(0,i).append(c).append(r),f=new oo(d,a);return f.emptyItemCount()>rde&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let d=s.selection&&s.selection.map(n.slice(r));d&&o++;let f=new To(c.invert(),l,d),h,p=i.length-1;(h=i.length&&i[p].merge(f))?i[p]=h:i.push(f)}}else s.map&&r--},this.items.length,0),new oo(In.from(i.reverse()),o)}}oo.empty=new oo(In.empty,0);function ide(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class To{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new To(n.getMap().invert(),n,this.selection)}}}class da{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const ode=20;function sde(t,e,n,r){let i=n.getMeta(mc),o;if(i)return i.historyState;n.getMeta(cde)&&(t=new da(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(mc))return s.getMeta(mc).redo?new da(t.done.addTransform(n,void 0,r,Av(e)),t.undone,xM(n.mapping.maps),t.prevTime,t.prevComposition):new da(t.done,t.undone.addTransform(n,void 0,r,Av(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!ade(n,t.prevRanges)),c=s?X1(t.prevRanges,n.mapping):xM(n.mapping.maps);return new da(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Av(e)),oo.empty,c,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new da(t.done.rebased(n,o),t.undone.rebased(n,o),X1(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new da(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),X1(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function ade(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(n=!0)}),n}function xM(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,o,s)=>e.push(o,s));return e}function X1(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}function lde(t,e,n){let r=Av(e),i=mc.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),l=new da(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(mc,{redo:n,historyState:l})}let Q1=!1,wM=null;function Av(t){let e=t.plugins;if(wM!=e){Q1=!1,wM=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Q1=!0;break}}return Q1}const mc=new _n("history"),cde=new _n("closeHistory");function ude(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Ut({key:mc,state:{init(){return new da(oo.empty,oo.empty,null,0,-1)},apply(e,n,r){return sde(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?YF:r=="historyRedo"?XF:null;return!i||!e.editable?!1:(n.preventDefault(),i(e.state,e.dispatch))}}}})}function JF(t,e){return(n,r)=>{let i=mc.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=lde(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const YF=JF(!1,!0),XF=JF(!0,!0);en.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new Ut({key:new _n("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const i=this.options.limit;if(i==null||i===0){t=!0;return}const o=this.storage.characters({node:r.doc});if(o>i){const s=o-i,a=0,l=s;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(a,l);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),o=this.storage.characters({node:e.doc});if(o<=r||i>r&&o>r&&o<=i)return!0;if(i>r&&o>r&&o>i||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=o-r,c=a-l,d=a;return e.deleteRange(c,d),!(this.storage.characters({node:e.doc})>r)}})]}});var dde=en.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Kue(this.options)]}});en.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Ut({key:new _n("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,o=[];if(!n||!r)return Lt.create(t,[]);let s=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(l.isText)return;if(!(i>=c&&i<=c+l.nodeSize-1))return!1;s+=1});let a=0;return t.descendants((l,c)=>{if(l.isText||!(i>=c&&i<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&s-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";o.push(mr.node(c,c+l.nodeSize,{class:this.options.className}))}),Lt.create(t,o)}}})]}});var fde=en.create({name:"gapCursor",addProseMirrorPlugins(){return[Xue()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=ut(ke(t,"allowGapCursor",n)))!=null?e:null}}}),SM="placeholder";function hde(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var pde=en.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:SM,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${hde(this.options.dataAttribute)}`:`data-${SM}`;return[new Ut({key:new _n("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,o=[];if(!r)return null;const s=this.editor.isEmpty;return e.descendants((a,l)=>{const c=i>=l&&i<=l+a.nodeSize,d=!a.isLeaf&&n0(a);if(!a.type.isTextblock)return this.options.includeChildren;if((c||!this.options.showOnlyCurrent)&&d){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const h=mr.node(l,l+a.nodeSize,{class:f.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:c}):this.options.placeholder});o.push(h)}return this.options.includeChildren}),Lt.create(e,o)}}})]}});en.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new Ut({key:new _n("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||Z6(n.selection)||t.view.dragging?null:Lt.create(n.doc,[mr.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});var mde="skipTrailingNode";function kM({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var gde=en.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new _n(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new Ut({key:e,appendTransaction:(i,o,s)=>{const{doc:a,tr:l,schema:c}=s,d=e.getState(s),f=a.content.size,h=c.nodes[n];if(!i.some(p=>p.getMeta(mde))&&d)return l.insert(f,h.create())},state:{init:(i,o)=>{const s=o.tr.doc.lastChild;return!kM({node:s,types:r})},apply:(i,o)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return o;const s=i.doc.lastChild;return!kM({node:s,types:r})}}})]}}),vde=en.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>YF(t,e),redo:()=>({state:t,dispatch:e})=>XF(t,e)}},addProseMirrorPlugins(){return[ude(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}}),yde=en.create({name:"starterKit",addExtensions(){var t,e,n,r;const i=[];return this.options.bold!==!1&&i.push(qce.configure(this.options.bold)),this.options.blockquote!==!1&&i.push($ce.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(DF.configure(this.options.bulletList)),this.options.code!==!1&&i.push(Wce.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(Gce.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(Jce.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(dde.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(fde.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(Yce.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(Xce.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(vde.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(Qce.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(rue.configure(this.options.italic)),this.options.listItem!==!1&&i.push($F.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(UF.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&i.push(IF.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(WF.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(Fue.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(Vue.configure(this.options.strike)),this.options.text!==!1&&i.push(Wue.configure(this.options.text)),this.options.underline!==!1&&i.push(HF.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(gde.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),bde=yde,xde=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,wde=Ur.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",an(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,i,o,s;const a=(n=(e=t.attrs)==null?void 0:e.src)!=null?n:"",l=(i=(r=t.attrs)==null?void 0:r.alt)!=null?i:"",c=(s=(o=t.attrs)==null?void 0:o.title)!=null?s:"";return c?``:``}
756,addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:o,HTMLAttributes:s,editor:a})=>{const l=document.createElement("img");Object.entries(s).forEach(([f,h])=>{if(h!=null)switch(f){case"width":case"height":break;default:l.setAttribute(f,h);break}}),l.src=s.src;const c=new yle({element:l,editor:a,node:i,getPos:o,onResize:(f,h)=>{l.style.width=`${f}px`,l.style.height=`${h}px`},onCommit:(f,h)=>{const p=o();p!==void 0&&this.editor.chain().setNodeSelection(p).updateAttributes(this.name,{width:f,height:h}).run()},onUpdate:(f,h,p)=>f.type===i.type,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),d=c.dom;return d.style.visibility="hidden",d.style.pointerEvents="none",l.onload=()=>{d.style.visibility="",d.style.pointerEvents=""},c}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[gF({find:xde,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),Sde=wde,kde=en.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Ede=kde,jde=pde;const Nn=({onClick:t,active:e,children:n,title:r})=>u.jsx(fn,{type:"button",variant:e?"default":"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:t,title:r,children:n}),Tde=({content:t,onChange:e})=>{const n=Pce({extensions:[bde.configure({heading:{levels:[2,3,4]}}),Hue,Aue.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),Sde.configure({inline:!1}),Ede.configure({types:["heading","paragraph"]}),jde.configure({placeholder:"Escribe el contenido del artÃculoâ¦"})],content:t,onUpdate:({editor:o})=>{e(o.getHTML())}});if(E.useEffect(()=>{n&&t!==n.getHTML()&&n.commands.setContent(t||"")},[t,n]),!n)return null;const r=()=>{const o=prompt("URL del enlace:");o&&n.chain().focus().extendMarkRange("link").setLink({href:o}).run()},i=()=>{const o=prompt("URL de la imagen:");o&&n.chain().focus().setImage({src:o}).run()};return u.jsxs("div",{className:"border border-input rounded-md overflow-hidden bg-background",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-0.5 p-1.5 border-b border-input bg-muted/30",children:[u.jsx(Nn,{onClick:()=>n.chain().focus().setParagraph().run(),active:n.isActive("paragraph"),title:"Párrafo",children:u.jsx(yK,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().toggleHeading({level:2}).run(),active:n.isActive("heading",{level:2}),title:"TÃtulo H2",children:u.jsx(nK,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().toggleHeading({level:3}).run(),active:n.isActive("heading",{level:3}),title:"SubtÃtulo H3",children:u.jsx(rK,{className:"w-4 h-4"})}),u.jsx("div",{className:"w-px h-6 bg-border mx-1"}),u.jsx(Nn,{onClick:()=>n.chain().focus().toggleBold().run(),active:n.isActive("bold"),title:"Negrita",children:u.jsx(Y7,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().toggleItalic().run(),active:n.isActive("italic"),title:"Cursiva",children:u.jsx(oK,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().toggleUnderline().run(),active:n.isActive("underline"),title:"Subrayado",children:u.jsx(TK,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().toggleStrike().run(),active:n.isActive("strike"),title:"Tachado",children:u.jsx(EK,{className:"w-4 h-4"})}),u.jsx("div",{className:"w-px h-6 bg-border mx-1"}),u.jsx(Nn,{onClick:()=>n.chain().focus().toggleBulletList().run(),active:n.isActive("bulletList"),title:"Lista",children:u.jsx(cK,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().toggleOrderedList().run(),active:n.isActive("orderedList"),title:"Lista numerada",children:u.jsx(lK,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().toggleBlockquote().run(),active:n.isActive("blockquote"),title:"Cita",children:u.jsx(Y3,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().setHorizontalRule().run(),title:"LÃnea horizontal",children:u.jsx(mK,{className:"w-4 h-4"})}),u.jsx("div",{className:"w-px h-6 bg-border mx-1"}),u.jsx(Nn,{onClick:()=>n.chain().focus().setTextAlign("left").run(),active:n.isActive({textAlign:"left"}),title:"Izquierda",children:u.jsx(H7,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().setTextAlign("center").run(),active:n.isActive({textAlign:"center"}),title:"Centro",children:u.jsx(W7,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().setTextAlign("right").run(),active:n.isActive({textAlign:"right"}),title:"Derecha",children:u.jsx(K7,{className:"w-4 h-4"})}),u.jsx("div",{className:"w-px h-6 bg-border mx-1"}),u.jsx(Nn,{onClick:r,active:n.isActive("link"),title:"Enlace",children:u.jsx(aK,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:i,title:"Imagen",children:u.jsx(K3,{className:"w-4 h-4"})}),u.jsx("div",{className:"w-px h-6 bg-border mx-1"}),u.jsx(Nn,{onClick:()=>
756n.chain().focus().undo().run(),title:"Deshacer",children:u.jsx(_K,{className:"w-4 h-4"})}),u.jsx(Nn,{onClick:()=>n.chain().focus().redo().run(),title:"Rehacer",children:u.jsx(wK,{className:"w-4 h-4"})})]}),u.jsx(wF,{editor:n,className:"prose prose-sm max-w-none p-4 min-h-[300px] focus-within:outline-none [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[280px] prose-headings:text-foreground prose-p:text-foreground prose-li:text-foreground prose-a:text-primary prose-blockquote:border-l-primary"})]})},_de=[{value:"noticia",label:"Noticia"},{value:"evento",label:"Evento"},{value:"prensa",label:"En los medios"},{value:"tribuna",label:"Tribuna"},{value:"resena",label:"Reseña"},{value:"prensa",label:"Prensa"}],EM={title:"",slug:"",excerpt:"",content:"",cover_image:"",published:!1,category:"noticia",published_at:""},Z1="https://sfczsdghntekkbjgghgg.supabase.co",Ade=()=>{const t=Lx(),[e,n]=E.useState([]),[r,i]=E.useState(!0),[o,s]=E.useState(!1),[a,l]=E.useState(!1),[c,d]=E.useState(null),[f,h]=E.useState(EM),[p,g]=E.useState(!1),[m,v]=E.useState(!1),[y,b]=E.useState(!1),[x,S]=E.useState(!1),[w,k]=E.useState(!1),[j,T]=E.useState([]),[_,N]=E.useState(!1),C=H=>{const ce=new DOMParser().parseFromString(H,"text/xml").querySelectorAll("item"),ge=[];return ce.forEach(K=>{var lt,xt,vt,M;if(((lt=K.querySelector("post_type"))==null?void 0:lt.textContent)!=="attachment")return;const Ee=(xt=K.querySelector("attachment_url"))==null?void 0:xt.textContent;if(!Ee)return;const Ve=((vt=Ee.split(".").pop())==null?void 0:vt.toLowerCase())||"";if(!["jpg","jpeg","png","webp","gif"].includes(Ve))return;const Ke=((M=K.querySelector("title"))==null?void 0:M.textContent)||"";ge.push({url:Ee,title:Ke})}),ge},O=async H=>{var X;const de=(X=H.target.files)==null?void 0:X[0];if(de){S(!0);try{const ce=await de.text(),ge=C(ce);if(ge.length===0){kt.error("No se encontraron imágenes en el archivo XML"),S(!1);return}kt.info(`Encontradas ${ge.length} imágenes. Importandoâ¦`);const{data:{session:K}}=await tn.auth.getSession();if(!K){kt.error("No hay sesión activa"),S(!1);return}const Ce=20;let Ee=0,Ve=0;for(let Ke=0;Ke<ge.length;Ke+=Ce){const lt=ge.slice(Ke,Ke+Ce);kt.info(`Procesando lote ${Math.floor(Ke/Ce)+1}/${Math.ceil(ge.length/Ce)}â¦`);const vt=await(await fetch(`${Z1}/functions/v1/import-wp-media`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${K.access_token}`},body:JSON.stringify({urls:lt})})).json();Ee+=vt.uploaded||0,Ve+=(vt.failed||[]).length}Ve>0?kt.warning(`Importadas ${Ee}/${ge.length}. Fallaron ${Ve}.`):kt.success(`¡${Ee} imágenes importadas correctamente al bucket wp-media!`)}catch(ce){kt.error("Error: "+ce.message)}S(!1),H.target.value=""}},I=async()=>{var H;if(confirm("¿Importar todos los posts desde posts-import.json? Esto puede crear duplicados si ya existen.")){b(!0);try{const X=await(await fetch("/posts-import.json")).json(),{data:{session:ce}}=await tn.auth.getSession();if(!ce){kt.error("No hay sesión activa"),b(!1);return}const K=await(await fetch(`${Z1}/functions/v1/import-posts`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ce.access_token}`},body:JSON.stringify(X)})).json();(H=K.errors)!=null&&H.length?kt.error(`Importados ${K.inserted}/${K.total}. Errores: ${K.errors.join(", ")}`):kt.success(`Importados ${K.inserted} artÃculos correctamente`),R()}catch(de){kt.error("Error en la importación: "+de.message)}b(!1)}},P=async()=>{N(!0);try{const{data:{session:H}}=await tn.auth.getSession();if(!H)return;const X=await(await fetch(`${Z1}/functions/v1/import-wp-media`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${H.access_token}`},body:JSON.stringify({action:"list"})})).json();
756T(X.files||[])}catch(H){kt.error("Error cargando biblioteca: "+H.message)}N(!1)},$=()=>{k(!0),P()},B=H=>{h(de=>({...de,cover_image:H})),k(!1),kt.success("Imagen seleccionada")};E.useEffect(()=>{(async()=>{await z()&&R()})()},[]);const z=async()=>{const{data:{session:H}}=await tn.auth.getSession();if(!H)return t("/admin/login"),!1;const{data:de}=await tn.from("user_roles").select("role").eq("user_id",H.user.id).eq("role","admin").maybeSingle();return de?(s(!0),!0):(kt.error("No tienes permisos de administrador"),await tn.auth.signOut(),t("/admin/login"),!1)},R=async()=>{const{data:H,error:de}=await tn.from("posts").select("*").order("created_at",{ascending:!1});!de&&H&&n(H),i(!1)},L=async()=>{await tn.auth.signOut(),t("/admin/login")},q=H=>H.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),G=()=>{d(null),h(EM),l(!0)},V=H=>{d(H.id),h({title:H.title,slug:H.slug,excerpt:H.excerpt||"",content:H.content||"",cover_image:H.cover_image||"",published:H.published??!1,category:H.category||"noticia",published_at:H.published_at?new Date(H.published_at).toISOString().slice(0,16):""}),l(!0)},Y=async H=>{var Ce;const de=(Ce=H.target.files)==null?void 0:Ce[0];if(!de)return;v(!0);const X=de.name.split(".").pop(),ce=`${Date.now()}.${X}`,{error:ge}=await tn.storage.from("blog-images").upload(ce,de,{upsert:!0});if(ge){kt.error("Error al subir imagen"),v(!1);return}const{data:K}=tn.storage.from("blog-images").getPublicUrl(ce);h(Ee=>({...Ee,cover_image:K.publicUrl})),v(!1),kt.success("Imagen subida")},pe=async()=>{if(!f.title.trim()){kt.error("El tÃtulo es obligatorio");return}g(!0);const H=f.slug||q(f.title);let de=f.published_at||null;f.published&&!de&&(de=new Date().toISOString());const X={title:f.title,slug:H,excerpt:f.excerpt||null,content:f.content||null,cover_image:f.cover_image||null,published:f.published,category:f.category,published_at:de};if(c){const{error:ce}=await tn.from("posts").update(X).eq("id",c);ce?kt.error("Error al actualizar: "+ce.message):kt.success("ArtÃculo actualizado")}else{const{error:ce}=await tn.from("posts").insert(X);ce?kt.error("Error al crear: "+ce.message):kt.success("ArtÃculo creado")}g(!1),l(!1),R()},me=async H=>{if(!confirm("¿Estás seguro de eliminar este artÃculo?"))return;const{error:de}=await tn.from("posts").delete().eq("id",H);de?kt.error("Error al eliminar"):(kt.success("ArtÃculo eliminado"),R())},Ue=H=>H?new Date(H).toLocaleDateString("es-ES",{day:"numeric",month:"short",year:"numeric"}):"â";return o?u.jsxs("div",{className:"min-h-screen bg-muted",children:[u.jsx("header",{className:"bg-background border-b border-border sticky top-0 z-40",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 flex items-center justify-between h-16",children:[u.jsx("h1",{className:"text-lg font-bold text-foreground",children:"Panel de Actualidad"}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs(fn,{variant:"outline",size:"sm",onClick:()=>window.open("/actualidad","_blank"),children:[u.jsx(tK,{className:"w-4 h-4 mr-1"})," Ver actualidad"]}),u.jsxs(fn,{variant:"ghost",size:"sm",onClick:L,children:[u.jsx(dK,{className:"w-4 h-4 mr-1"})," Salir"]})]})]})}),u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 mb-8",children:[u.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"ArtÃculos"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[u.jsxs("label",{className:"cursor-pointer",children:[u.jsx(fn,{variant:"outline",size:"sm",asChild:!0,disabled:x,children:u.jsxs("span",{children:[u.jsx(gO,{className:"w-4 h-4 mr-1"}),x?"Importando mediosâ¦":"Importar medios WP"]})}),u.jsx("input",{type:"file",accept:".xml",className:"hidden",onChange:O,disabled:x})]}),u.jsxs(fn,{variant:"outline",size:"sm",onClick:I,disabled:y,children:[u.jsx(AK,{className:"w-4 h-4 mr-1"})," ",y?"Importandoâ¦":"Importar JSON"]}),u.jsxs(fn,{onClick:G,children:[u.jsx(yO,{className:"w-4 h-4 mr-1"})," Nuevo artÃculo"]})]})]}),r?u.jsx("p",{className:"text-muted-foreground",children:"Cargandoâ¦"}):e.length===0?u.jsxs("div",{className:"text-center py-16 bg-card rounded-2xl border border-border",children:[u.jsx("p",{className:"text-muted-foreground text-lg mb-4",children:"No hay artÃculos todavÃa"}),u.jsxs(fn,{onClick:G,children:[u.jsx(yO,{className:"w-4 h-4 mr-1"})," Crear primer artÃculo"]})]}):u.jsx("div",{className:"bg-card rounded-2xl border border-border overflow-hidden",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"w-full text-sm",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[u.jsx("th",{className:"text-left px-4 py-3 font-semibold text-foreground",children:"TÃtulo"}),u.jsx("th",{className:"text-left px-4 py-3 font-semibold text-foreground hidden md:table-cell",children:"Fecha"}),u.jsx("th",{className:"text-center px-4 py-3 font-semibold text-foreground",children:"Estado"}),u.jsx("th",{className:"text-right px-4 py-3 font-semibold text-foreground",children:"Acciones"})]})}),u.jsx("tbody",{children:e.map(H=>u.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30 transition-colors",children:[u.jsx("td",{className:"px-4 py-3 font-medium text-foreground max-w-xs truncate",children:H.title}),u.jsx("td",{className:"px-4 py-3 text-muted-foreground hidden md:table-cell",children:Ue(H.created_at)}),u.jsx("td",{className:"px-4 py-3 text-center",children:u.jsx("span",{className:`inline-flex px-2.5 py-1 rounded-full text-xs font-semibold ${H.published?"bg-accent text-accent-foreground":"bg-muted text-muted-foreground"}`,children:H.published?"Publicado":"Borrador"})}),u.jsx("td",{className:"px-4 py-3",children:u.jsxs("div",{className:"flex items-center justify-end gap-2",children:[u.jsx(fn,{variant:"ghost",size:"sm",onClick:()=>
756V(H),children:u.jsx(vK,{className:"w-4 h-4"})}),u.jsx(fn,{variant:"ghost",size:"sm",onClick:()=>me(H.id),children:u.jsx(jK,{className:"w-4 h-4 text-destructive"})})]})})]},H.id))})]})})})]}),u.jsx(G2,{open:a,onOpenChange:l,children:u.jsxs(nE,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[u.jsx(rE,{children:u.jsx(iE,{children:c?"Editar artÃculo":"Nuevo artÃculo"})}),u.jsxs("div",{className:"space-y-4 mt-4",children:[u.jsxs("div",{children:[u.jsx(yi,{htmlFor:"title",children:"TÃtulo"}),u.jsx(hn,{id:"title",value:f.title,onChange:H=>{const de=H.target.value;h(X=>({...X,title:de,slug:c?X.slug:q(de)}))},placeholder:"TÃtulo del artÃculo"})]}),u.jsxs("div",{children:[u.jsx(yi,{htmlFor:"slug",children:"Slug (URL)"}),u.jsx(hn,{id:"slug",value:f.slug,onChange:H=>h(de=>({...de,slug:H.target.value})),placeholder:"titulo-del-articulo"})]}),u.jsxs("div",{children:[u.jsx(yi,{htmlFor:"category",children:"CategorÃa"}),u.jsx("select",{id:"category",value:f.category,onChange:H=>h(de=>({...de,category:H.target.value})),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
756ing-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:_de.map(H=>u.jsx("option",{value:H.value,children:H.label},H.value))})]}),u.jsxs("div",{children:[u.jsx(yi,{htmlFor:"excerpt",children:"Extracto"}),u.jsx(U_,{id:"excerpt",value:f.excerpt,onChange:H=>h(de=>({...de,excerpt:H.target.value})),placeholder:"Breve descripción del artÃculo",rows:2})]}),u.jsxs("div",{children:[u.jsx(yi,{children:"Contenido"}),u.jsx("div",{className:"mt-1",children:u.jsx(Tde,{content:f.content,onChange:H=>h(de=>({...de,content:H}))})})]}),u.jsxs("div",{children:[u.jsx(yi,{children:"Imagen de portada"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-1",children:[u.jsxs("label",{className:"cursor-pointer inline-flex items-center gap-2 px-4 py-2 rounded-lg border border-border bg-background text-sm font-medium text-muted-foreground hover:bg-muted transition-colors",children:[u.jsx(K3,{className:"w-4 h-4"}),m?"Subiendoâ¦":"Subir imagen",u.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:Y,disabled:m})]}),u.jsxs(fn,{type:"button",variant:"outline",size:"sm",onClick:$,children:[u.jsx(gO,{className:"w-4 h-4 mr-1"})," Biblioteca de medios"]}),f.cover_image&&u.jsx("img",{src:f.cover_image,alt:"Preview",className:"h-16 w-24 object-cover rounded-lg border border-border"})]}),u.jsx(hn,{value:f.cover_image,onChange:H=>h(de=>({...de,cover_image:H.target.value})),placeholder:"O pega una URL de imagen",className:"mt-2"})]}),u.jsxs("div",{children:[u.jsx(yi,{htmlFor:"published_at",children:"Fecha y hora de publicación"}),u.jsx(hn,{id:"published_at",type:"datetime-local",value:f.published_at,onChange:H=>h(de=>({...de,published_at:H.target.value}))}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:'Si se deja vacÃo, se publicará de inmediato al activar "Publicado".'})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(IB,{checked:f.published,onCheckedChange:H=>h(de=>({...de,published:H}))}),u.jsx(yi,{children:f.published?"Publicado":"Borrador"})]}),u.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[u.jsx(fn,{variant:"outline",onClick:()=>l(!1),children:"Cancelar"}),u.jsx(fn,{onClick:pe,disabled:p,children:p?"Guardandoâ¦":c?"Actualizar":"Crear"})]})]})]})}),u.jsx(G2,{open:w,onOpenChange:k,children:u.jsxs(nE,{className:"max-w-4xl max-h-[85vh] overflow-y-auto",children:[u.jsx(rE,{children:u.jsx(iE,{children:"Biblioteca de medios (wp-media)"})}),_?u.jsx("p",{className:"text-muted-foreground py-8 text-center",children:"Cargando imágenesâ¦"}):j.length===0?u.jsx("p",{className:"text-muted-foreground py-8 text-center",children:"No hay imágenes en la biblioteca. Importa medios desde un archivo XML de WordPress."}):u.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-5 gap-3 mt-4",children:j.map(H=>u.jsxs("button",{onClick:()=>B(H.url),className:"group relative aspect-square rounded-lg overflow-hidden border border-border hover:ring-2 hover:ring-primary transition-all",children:[u.jsx("img",{src:H.url,alt:H.name,className:"w-full h-full object-cover",loading:"lazy"}),u.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-end",children:u.jsx("span",{className:"text-white text-xs p-1.5 opacity-0 group-hover:opacity-100 transition-opacity truncate w-full",children:H.name})})]},H.name))})]})})]}):u.jsx("div",{className:"min-h-screen bg-muted flex items-center justify-center",children:u.jsx("p",{className:"text-muted-foreground",children:"Verificando permisosâ¦"})})},Nde=()=>{const t=Lx(),[e,n]=E.useState(""),[r,i]=E.useState(""),[o,s]=E.useState(!1);E.useEffect(()=>{const{data:{subscription:l}}=tn.auth.onAuthStateChange((c,d)=>{d&&t("/admin/blog")});return tn.auth.getSession().then(({data:{session:c}})=>{c&&t("/admin/blog")}),()=>l.unsubscribe()},[t]);const a=async l=>{l.preventDefault(),s(!0);const{error:c}=await tn.auth.signInWithPassword({email:e,password:r});c&&kt.error("Credenciales incorrectas"),s(!1)};return u.jsx("div",{className:"min-h-screen bg-muted flex items-center justify-center px-4",children:u.jsxs("div",{className:"w-full max-w-sm",children:[u.jsxs("div",{className:"text-center mb-8",children:[u.jsx(up,{className:"w-12 h-12 text-primary mx-auto mb-3"}),u.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Admin Blog"}),u.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Instituto de Smart Ageing"})]}),u.jsxs("form",{onSubmit:a,className:"bg-card rounded-2xl border border-border p-6 shadow-md space-y-4",children:[u.jsxs("div",{children:[u.jsx(yi,{htmlFor:"email",children:"Email"}
756),u.jsx(hn,{id:"email",type:"email",value:e,onChange:l=>n(l.target.value),required:!0,autoComplete:"email"})]}),u.jsxs("div",{children:[u.jsx(yi,{htmlFor:"password",children:"Contraseña"}),u.jsx(hn,{id:"password",type:"password",value:r,onChange:l=>i(l.target.value),required:!0,autoComplete:"current-password"})]}),u.jsx(fn,{type:"submit",className:"w-full",disabled:o,children:o?"Entrandoâ¦":"Iniciar sesión"})]})]})})},Cde=()=>u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto prose prose-lg text-foreground",children:[u.jsx("h1",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-8",children:"Aviso Legal y Términos y Condiciones"}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Datos de identificación"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"En cumplimiento con el deber de información recogido en el artÃculo 10 de la Ley 34/2002, de 11 de julio, de Servicios de la Sociedad de la Información y del Comercio Electrónico, a continuación, se refleja la siguiente información general:"}),u.jsxs("ul",{className:"text-muted-foreground space-y-2 list-none pl-0",children:[u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"Sitio Web:"})," www.institutodesmartageing.com"]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"Titular:"})," INSTITUTO DE INNOVACIÃN LEGAL, S.L."]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"NIF:"})," B-87590816"]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"Domicilio social:"})," C/ Alcalá 116, 6º izquierda, 28009, Madrid"]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"Inscripción:"})," Registro Mercantil de Madrid al tomo 34.783, folio 168, sección 8, Hoja M-624846, con el nº1."]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"Contacto:"})," ",u.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]})]}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Usuarios"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"El acceso y/o uso de esta web atribuye la condición de Usuario de la misma, que acepta, desde dicho acceso y/o uso, el presente Aviso Legal, asà como el resto de condiciones, PolÃticas y Avisos que pudieran reflejarse en diferentes apartados de la web."}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Con carácter general sólo podrán usar este sitio las personas fÃsicas y jurÃdicas con capacidad jurÃdica suficiente de acuerdo con la legislación aplicable. De modo excepcional ây siempre que no se contravenga ningún tipo de normativa o legislaciónâ podrán usar el sitio, menores de edad mayores de catorce años, que hayan obtenido previamente la autorización de sus padres o tutores legales."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Objeto"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"El objeto de esta Web es facilitar información sobre el Titular, asà como sobre las actividades que lleva a cabo y de los servicios que presta a través de la página Web; facilitar y gestionar las solicitudes de los productos y servicios ofrecidos a través de la web y facilitar a los clientes la gestión de los servicios y productos contratados."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Uso de la web"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"El Titular proporciona el acceso a multitud de informaciones, servicios, fotografÃas, textos y datos pertenecientes al Titular o a sus licenciantes. El Usuario asume la responsabilidad del uso de la web. El Usuario se compromete a hacer un uso adecuado de los contenidos y servicios y con carácter enunciativo pero no limitativo, a no emplearlos para incurrir en actividades ilÃcitas, ilegales o contrarias a la buena fe y al orden público."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Carácter gratuito del acceso"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"La prestación de los servicios por parte del Titular tiene carácter gratuito para todos los usuarios. No obstante, algunos de los servicios suministrados a través la Página Web están sujetos al pago de un precio determinado del que se informará adecuadamente al Usuario."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Propiedad intelectual e industrial"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"El Titular, por sà o como cesionario, es titular de todos los derechos de propiedad intelectual e industrial de la página web, asà como de los elementos contenidos en la misma. Todos los derechos están reservados y quedan expresamente prohibidas la reproducción, la distribución y la comunicación pública de la totalidad o parte de los contenidos de esta página web,
756con fines comerciales, sin la autorización del Titular."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Exclusión de garantÃas y responsabilidad"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"El Titular no se hace responsable, en ningún caso, de los daños y perjuicios de cualquier naturaleza que pudieran ocasionar, a tÃtulo enunciativo, errores u omisiones en los contenidos, falta de disponibilidad de la web o la transmisión de virus o programas maliciosos, a pesar de haber adoptado todas las medidas tecnológicas razonables para evitarlo."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Modificaciones"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"El Titular se reserva el derecho de efectuar sin previo aviso las modificaciones que considere oportunas en la página web, pudiendo cambiar, suprimir o añadir tanto los contenidos y servicios que se presten a través de la misma como la forma en la que estos aparezcan presentados o localizados en la web."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Legislación aplicable y jurisdicción"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"La relación entre el Titular y el Usuario se regirá por la normativa española vigente y cualquier controversia se someterá a los Juzgados y Tribunales de la ciudad del domicilio del Titular."}),u.jsx("p",{className:"text-sm text-muted-foreground mt-8",children:"Ãltima actualización: 13 de febrero de 2025."})]})})})]}),u.jsx(Qt,{})]}),Ode=()=>u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto prose prose-lg text-foreground",children:[u.jsx("h1",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-8",children:"PolÃtica de Privacidad"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"El Instituto de Innovación Legal (en adelante, IIL), en su condición de titular del sitio web, y conforme al deber de información establecido en el Reglamento General de Protección de datos (RGPD), la Ley Orgánica 3/2018, de Protección de Datos y GarantÃa de los Derechos Digitales (LOPDGDD), y resto de normativa aplicable, incluye en este documento la información sobre la obtención y tratamientos de datos personales que se realizan mediante este sitio web."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Responsable del tratamiento"}),u.jsxs("ul",{className:"text-muted-foreground space-y-2 list-none pl-0",children:[u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"Titular:"})," Instituto de Innovación Legal S.L."]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"CIF:"})," B-87590816"]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"Dirección postal:"})," Calle de Alcalá 116, 6º izq, 28009 â Madrid"]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"Email:"})," ",u.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]})]}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"¿Cómo obtenemos tus datos?"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Solo solicitamos los datos necesarios para la finalidad o finalidades indicadas en el momento de solicitarlos. Si obtenemos tus datos a través de terceros, mediante cesión legÃtima, o desde fuentes de acceso público, cumpliremos con el deber de facilitarte la información necesaria sobre el tratamiento que vayamos a realizar."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Responsabilidad sobre los datos"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Los datos que nos proporciones deben ser completos, exactos y actuales, siendo tu responsabilidad mantenerlos actualizados."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"¿Para qué usamos tus datos personales?"}),u.jsxs("ul",{className:"text-muted-foreground space-y-3",children:[u.jsx("li",{children:"Gestionar las consultas y solicitudes que recibimos a través del formulario de contacto o del correo electrónico. Base legal: consentimiento."}),u.jsx("li",{children:"Gestionar la contratación de eventos y actividades. Base legal: relación contractual o precontractual."}),u.jsx("li",{children:"Gestionar las preferencias de personalización de navegación del sitio web. Base legal: consentimiento o relación contractual."}),u.jsx("li",{children:"Realizar análisis estadÃsticos de uso, navegación y comportamiento de los usuarios."}),u.jsx("li",{children:"EnvÃo de comunicaciones publicitarias según tus intereses. Podrás cancelarlas en cualquier momento. Base legal: interés legÃtimo."})]}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"¿Durante cuánto tiempo conservamos los datos?"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Los mantendremos durante el tiempo estrictamente necesario para cumplir la finalidad para la que se obtuvieron, mientras persista el interés legÃtimo, hasta que retires el consentimiento, o para el cumplimiento de obligaciones legales impuestas."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"¿A quién se comunican tus datos?"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Para proporcionar los productos y servicios ofrecidos, IIL se puede apoyar en proveedores que usarán los datos necesarios para facilitar el producto o servicio solicitado, sin poder usarlos para ninguna otra finalidad. IIL podrá ceder tus datos a socios comerciales con tu consentimiento previo."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Transferencias internacionales"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Actualmente no realizamos transferencias de tus datos fuera del ámbito de aplicación del RGPD."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Protección de datos"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Tratamos los datos personales aplicando las medidas de seguridad técnicas y organizativas adecuadas para evitar el acceso, la modificación o la eliminación no autorizada, ilÃcita o accidental."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Tus derechos"}),u.jsxs("ul",{className:"text-muted-foreground space-y-2",children:[u.jsx("li",{children:"A retirar, en cualquier momento, el consentimiento otorgado para el tratamiento."}),u.jsx("li",{children:"A oponerte al tratamiento en ciertas circunstancias."}),u.jsx("li",{children:"A solicitar la limitación del tratamiento de tus datos personales."}),u.jsx("li",{children:"A obtener información sobre tus datos personales que tenemos."}),u.jsx("li",{children:"A solicitar la portabilidad de tus datos personales."}),u.jsx("li",{children:"A solicitar la rectificación o supresión de datos."})]}),u.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:'Para el ejercicio de cualquiera de estos derechos puedes dirigirte a IIL mediante comunicación postal o por correo electrónico a las direcciones indicadas, identificando el objeto como "ejercicio de derechos sobre protección de datos". El plazo máximo de respuesta es de un mes.'}),u.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["Si no recibes respuesta o
756no estás conforme, puedes presentar reclamación ante la ",u.jsx("a",{href:"https://sedeaepd.gob.es/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Agencia Española de Protección de Datos"}),"."]})]})})})]}),u.jsx(Qt,{})]}),Pde=()=>u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto prose prose-lg text-foreground",children:[u.jsx("h1",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-8",children:"PolÃtica de Cookies"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"El Instituto de Innovación Legal (en adelante IIL), en su condición de titular de este sitio web, en este documento incluye la información necesaria para que los usuarios puedan tomar decisiones informadas sobre el consentimiento de uso de las cookies utilizadas en este sitio web, en cumplimiento de la normativa sobre protección de datos personales (RGPD, LOPDGDD) y la Ley 34/2002 de Servicios de la Sociedad de la Información y Comercio Electrónico (LSSI-CE)."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"¿Qué son las cookies?"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:'Son ficheros de texto que se instalan en el dispositivo e identifican al navegador al navegar páginas web. Contienen información sobre la actividad del visitante que se usa para distintos fines. Atendiendo a su plazo de conservación, pueden ser de "sesión" (se eliminan al cerrar el navegador) o persistentes (se mantienen durante un periodo de tiempo personalizado). Atendiendo a su origen, pueden ser propias del sitio web o de terceros.'}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"¿Cómo puedes gestionar tus preferencias?"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"En el primer acceso al sitio web se muestra al visitante un banner con breve información sobre el uso de cookies, teniendo la posibilidad de rechazarlas, aceptarlas o configurar las seleccionadas a través de un panel de preferencias."}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:u.jsx("em",{children:"Nota: Deshabilitar cookies puede resultar en la imposibilidad de acceder a productos o servicios que las necesiten para funcionar."})}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Legalidad de las cookies"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Excepto las cookies técnicas o esenciales, que son imprescindibles para la carga y funcionamiento correcto del sitio web, el uso del resto de cookies depende de tu consentimiento, que puedes retirar en cualquier momento modificando las preferencias de cookies."}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Tipos de cookies utilizadas"}),u.jsxs("ul",{className:"text-muted-foreground space-y-3",children:[u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"Necesarias:"})," Cruciales para las funciones básicas del sitio web. No almacenan datos de identificación personal."]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"Funcionales:"})," Ayudan a realizar funcionalidades como compartir contenido en redes sociales y recopilar comentarios."]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"AnalÃticas:"})," Se utilizan para comprender cómo interactúan los visitantes con el sitio web (número de visitantes, porcentaje de rebote, fuente de tráfico)."]}),u.jsxs("li",{children:[u.jsx("strong",{className:"text-foreground",children:"De marketing:"})," Se utilizan para entregar a los visitantes anuncios personalizados y analizar la efectividad de las campañas publicitarias."]})]}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Tus derechos"}),u.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["Para más información sobre el ejercicio de los derechos que te reconoce la normativa de protección de datos te animamos a visitar nuestra ",u.jsx("a",{href:"/politica-de-privacidad",className:"text-primary hover:underline",children:"PolÃtica de privacidad"}),"."]}),u.jsx("h2",{className:"text-xl font-bold mt-8 mb-4",children:"Cambios de la polÃtica"}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Esta polÃtica puede ser modificada cuando haya cambios en la normativa, en las instrucciones de la AEPD o en las cookies que usa este sitio web. Le recomendamos que la visite de vez en cuando."})]})})})]}),u.jsx(Qt,{})]}),eS="https://www.amazon.es/dp/B0DKXSGSG1/ref=mp_s_a_1_1?crid=3SHIMJAAZ4V3F&dib=eyJ2IjoiMSJ9.N2I2ojCzfQWNWLMQLC7KaA.Av3unOJiE2DvsT5ZhNIo1qwsS0-ru88d9dhmUhUoJks&dib_tag=se&keywords=el+arte+de+envejecer+sabiamente&qid=1729940973&sprefix=el+
756arte+de+envejecer+sabiamente%2Caps%2C131&sr=8-1",Mde=[{num:"01",title:"Finanzas",desc:"Planificación financiera, ahorro e inversiones para una vejez tranquila."},{num:"02",title:"Seguros",desc:"Protección patrimonial y coberturas esenciales para el futuro."},{num:"03",title:"Jubilación y trabajo",desc:"Cómo afrontar la transición laboral y encontrar propósito."},{num:"04",title:"Legal",desc:"Testamentos, poderes preventivos y derechos del consumidor."},{num:"05",title:"Hogar",desc:"Adaptar tu vivienda y explorar opciones como coliving o cohousing."},{num:"06",title:"TecnologÃa",desc:"La tecnologÃa como aliada para mejorar la calidad de vida."},{num:"07",title:"Salud y bienestar",desc:"Cuidar cuerpo y mente para envejecer con vitalidad."},{num:"08",title:"Enfermedad y muerte",desc:"Afrontar con serenidad y dignidad los momentos más difÃciles."},{num:"09",title:"Cuidado del mayor",desc:"Planificar el cuidado propio y de nuestros seres queridos."}],Rde=[{title:"El envejecimiento y la generación Baby Boomer",desc:"Repensando qué significa envejecer hoy, la Silver Economy y el despertar de una nueva conciencia."},{title:"Decisiones financieras y patrimoniales",desc:"Tu 'foto' económica actual, hipoteca inversa, renta vitalicia, nuda propiedad y más soluciones."},{title:"La jubilación",desc:"Cómo convertir esta etapa en un periodo de creación, emprendimiento y propósito."},{title:"Decisiones jurÃdicas",desc:"Testamentos, poderes preventivos y todo lo que protege a tus seres queridos."},{title:"El hogar",desc:"¿Es tu casa adecuada para tu vejez? Coliving, cohousing y viviendas tuteladas."},{title:"TecnologÃa",desc:"Superar la brecha digital y usar la tecnologÃa para mejorar tu calidad de vida."},{title:"Salud y bienestar",desc:"Alimentación, ejercicio, sueño y cómo prepararse para los cambios hormonales."},{title:"La enfermedad y la muerte",desc:"Cuidados paliativos, eutanasia y decisiones para vivir y morir con dignidad."},{title:"Cuidado de los mayores",desc:"Perspectiva realista y planificación efectiva para cuidar a quien más quieres."},{title:"El proceso de toma de decisiones",desc:"Herramientas para decidir bien y a tiempo. Tú tienes el control de tu futuro."}],Ide=()=>u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsxs("section",{className:"pt-28 md:pt-36 pb-16 md:pb-24 bg-gradient-section relative overflow-hidden",id:"contenido",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 to-transparent pointer-events-none"}),u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12 md:mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:"Método «Justo a Tiempo»"}),u.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-foreground mb-6 leading-tight",children:["Los 9 pilares del"," ",u.jsx("span",{className:"text-gradient",children:"envejecimiento inteligente"})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:"El libro te propone un método propio para convertirte en el mejor estratega y planificar a la perfección tu vejez, apoyándote en 9 pilares fundamentales."})]}),u.jsx("div",{className:"flex justify-center mb-12 md:mb-16",children:u.jsx("img",{src:aB,alt:"Rueda de los 9 pilares del envejecimiento inteligente: Finanzas y Seguros, Trabajo y Jubilación, Legal, Vivienda, TecnologÃa, Salud y Bienestar, Ocio y Sociabilidad, Enfermedad y Muerte, y Cuidado del Mayor",className:"w-full max-w-lg md:max-w-xl rounded-2xl shadow-lg",loading:"eager"})}),u.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:Mde.map(t=>u.jsx("div",{className:"group bg-card rounded-2xl p-6 border border-border/50 transition-all duration-500 hover:shadow-lg hover:border-primary/30 hover:-translate-y-1",children:u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx("span",{className:"text-3xl font-bold text-primary/30 group-hover:text-primary/60 transition-colors duration-300",children:t.num}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-bold text-foreground mb-1 group-hover:text-primary transition-colors duration-300",children:t.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.desc})]})]})},t.num))})]})]}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-center",children:[u.jsxs("div",{children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-6",children:"Libro · Editorial Matura · 460 páginas"}),u.jsxs("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-foreground mb-6 leading-tight",children:["El arte de"," ",u.jsx("span",{className:"text-gradient",children:"envejecer sabiamente"})]}),u.jsx("p",{className:"text-xl text-muted-foreground mb-4 leading-relaxed",children:"GuÃa para adoptar mejores decisiones vitales y disfrutar de un futuro más pleno"}),u.jsx("p",{className:"text-muted-foreground mb-8 leading-relaxed",children:"«El libro que todos los hijos deberÃan regalar a sus padres y todos los padres deberÃan regalar a sus hijos»"}),u.jsx("div",{className:"flex flex-col sm:flex-row gap-4",children:u.jsxs("a",{href:eS,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-8 py-4 rounded-xl bg-primary text-primary-foreground text-base font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",children:["Comprar en Amazon",u.jsx(cc,{className:"w-5 h-5"})]})})]}),u.jsx("div",{className:"flex justify-center lg:justify-end",children:u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-primary/20 to-primary/5 rounded-3xl blur-2xl"}),u.jsx("img",{src:z_,alt:"Portada del libro El Arte de Envejecer Sabiamente de MarÃa Jesús González
756-Espejo",className:"relative w-72 sm:w-80 lg:w-96 rounded-2xl shadow-2xl",loading:"lazy"})]})})]})})}),u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:"¿Por qué este libro?"}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:["Un libro"," ",u.jsx("span",{className:"text-gradient",children:"imprescindible"})," para los Baby Boomers"]})]}),u.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground space-y-6",children:[u.jsx("p",{className:"text-lg leading-relaxed",children:"Los primeros baby boomers están empezando a jubilarse y en los próximos 15 años lo harán los 14,5 millones de personas que forman la generación más numerosa de la historia de España. Tienen ante sà enormes desafÃos: la longevidad, una economÃa de escaso crecimiento, un sistema de pensiones bajo presión, la saturación sanitaria, la escasez de cuidadores y la dificultad para adaptarse a la vida tras la jubilación."}),u.jsxs("p",{className:"text-lg leading-relaxed",children:["Este libro parte de una idea fundamental: ",u.jsx("strong",{className:"text-foreground",children:"ser previsor y tomar decisiones acertadas es esencial para vivir una buena vejez"}),". No es un libro sobre la vejez; es una guÃa integral que aborda cada dimensión necesaria para un futuro más pleno: desde las decisiones financieras hasta las emocionales, desde la salud hasta la tecnologÃa."]}),u.jsx("p",{className:"text-lg leading-relaxed",children:"Con casi 500 páginas, incluye ejercicios prácticos, casos reales, bibliografÃa extensa y un resumen de decisiones clave con el momento adecuado para realizarlas."})]})]})})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12 md:mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:"Contenido del libro"}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:["10 capÃtulos para"," ",u.jsx("span",{className:"text-gradient",children:"tomar el control de tu futuro"})]})]}),u.jsx("div",{className:"max-w-4xl mx-auto space-y-4",children:Rde.map((t,e)=>u.jsxs("div",{className:"group flex items-start gap-5 bg-card rounded-xl p-5 border border-border/50 transition-all duration-300 hover:shadow-md hover:border-primary/30",children:[u.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-lg bg-accent flex items-center justify-center text-sm font-bold text-accent-foreground group-hover:bg-primary group-hover:text-primary-foreground transition-all duration-300",children:e+1}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-bold text-foreground group-hover:text-primary transition-colors duration-300",children:t.title}),u.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t.desc})]})]},e))})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-center",children:[u.jsx("div",{className:"flex justify-center lg:justify-start order-2 lg:order-1",children:u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-primary/15 to-transparent rounded-3xl blur-2xl"}),u.jsx("img",{src:sB,alt:"MarÃa Jesús González-Espejo, autora de El Arte de Envejecer Sabiamente, experta en envejecimiento inteligente y longevidad",className:"relative w-full max-w-md rounded-2xl shadow-2xl",loading:"lazy"})]})}),u.jsxs("div",{className:"order-1 lg:order-2",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:"Sobre la autora"}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:["MarÃa Jesús"," ",u.
756jsx("span",{className:"text-gradient",children:"González-Espejo"})]}),u.jsx("p",{className:"text-lg text-muted-foreground mb-4 leading-relaxed",children:"CEO del Instituto de Smart Ageing y fundadora de Matura: Club de Mejor Longevidad. Experta en envejecimiento inteligente, innovación, transformación digital e inteligencia artificial."}),u.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:"Conferenciante, escritora y profesora de Derecho Digital, Inteligencia Artificial, Prevención del Envejecimiento y Longevidad. Autora de varias obras especializadas."}),u.jsxs("div",{className:"space-y-3 mb-8",children:[u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(Vn,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:["Reconocida por ",u.jsx("strong",{className:"text-foreground",children:"ILTA como una de las 5 mujeres más influyentes en LegalTech del mundo"})," (2020)"]})]}),u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(kh,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:["Reconocida como una de las mejores juristas de España por ",u.jsx("strong",{className:"text-foreground",children:"Best Lawyers e Iberian Lawyer"})]})]}),u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(Vn,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:[u.jsx("strong",{className:"text-foreground",children:"«Embajadora de Madrid»"})," por el Ayuntamiento de Madrid y premio ICEX Alumni 2023"]})]}),u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(yv,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"PolÃglota: español, inglés, francés, italiano, holandés y catalán"})]})]}),u.jsxs("a",{href:eS,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-6 py-3 rounded-lg bg-primary text-primary-foreground text-sm font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",children:["Consigue tu ejemplar",u.jsx(cc,{className:"w-4 h-4"})]})]})]})})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[u.jsx($o,{className:"w-12 h-12 text-primary mx-auto mb-6"}),u.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:"Ficha técnica"}),u.jsx("div",{className:"grid sm:grid-cols-2 gap-4 mb-10 text-left",children:[["TÃtulo","El arte de envejecer sabiamente"],["SubtÃtulo","GuÃa para adoptar mejores decisiones vitales y disfrutar de un futuro más pleno"],["Autora","MarÃa Jesús González-Espejo"],["Editorial","Editorial Matura"],["Colección","Mejor Longevidad"],["Extensión","460 páginas"],["ISBN","978-84-129429-0-3"],["Publicación","Noviembre 2024"]].map(([t,e])=>u.jsxs("div",{className:"bg-card rounded-xl p-4 border border-border/50",children:[u.jsx("p",{className:"text-xs font-semibold text-primary uppercase tracking-wider mb-1",children:t}),u.jsx("p",{className:"text-sm text-foreground font-medium",children:e})]},t))}),u.jsxs("a",{href:eS,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-10 py-4 rounded-xl bg-primary text-primary-foreground text-lg font-semibold transition-all duration-300 hover:bg-primary/90 hover:shadow-lg hover:-translate-y-1",children:["Comprar en Amazon",u.jsx(cc,{className:"w-5 h-5"})]})]})})}),u.jsx(Ws,{})]}),u.jsx(Qt,{})]});var $m=t=>t.type==="checkbox",Jl=t=>t instanceof Date,hr=t=>t==null;const QF=t=>typeof t=="object";var sn=t=>!hr(t)&&!Array.isArray(t)&&QF(t)&&!Jl(t),ZF=t=>sn(t)&&t.target?$m(t.target)?t.target.checked:t.target.value:t,Dde=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,eq=(t,e)=>t.has(Dde(e)),$de=t=>{const e=t.constructor&&t.constructor.prototype;return sn(e)&&e.hasOwnProperty("isPrototypeOf")},OA=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function kn(t){let e;const n=Array.isArray(t),r=typeof FileList<"u"?t instanceof FileList:!1;if(t instanceof Date)e=new Date(t);else if(!(OA&&(t instanceof Blob||r))&&(n||sn(t)))if(e=n?[]:{},!n&&!$de(t))e=t;else for(const i in t)t.hasOwnProperty(i)&&(e[i]=kn(t[i]));else return t;return e}var a0=t=>/^\w*$/.test(t),nn=t=>t===void 0,PA=t=>Array.isArray(t)?t.filter(Boolean):[],MA=t=>PA(t.replace(/["|']|\]/g,"").split(/\.|\[/)),le=(t,e,n)=>{if(!e||!sn(t))return n;const r=(a0(e)?[e]:MA(e)).reduce((i,o)=>hr(i)?i:i[o],t);return nn(r)||r===t?nn(t[e])?n:t[e]:r},Yr=t=>typeof t=="boolean",ct=(t,e,n)=>{let r=-1;const i=a0(e)?[e]:MA(e),o=i.length,s=o-1;for(;++r<o;){const a=i[r];let l=n;if(r!==s){const c=t[a];l=sn(c)||Array.isArray(c)?c:isNaN(+i[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;t[a]=l,t=t[a]}};const nb={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},so={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},is={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},RA=A.createContext(null);RA.displayName="HookFormContext";const l0=()=>A.useContext(RA),Lde=t=>{const{children:e,...n}=t;return A.createElement(RA.Provider,{value:n},e)};var tq=(t,e,n,r=!0)=>{const i={defaultValues:e._defaultValues};for(const o in t)Object.defineProperty(i,o,{get:()=>{const s=o;return e._proxyFormState[s]!==so.all&&(e._proxyFormState[s]=!r||so.all),n&&(n[s]=!0),t[s]}});return i};const IA=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Bde(t){const e=l0(),{control:n=e.control,disabled:r,name:i,exact:o}=t||{},[s,a]=A.useState(n._formState),l=A.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return IA(()=>n._subscribe({name:i,formState:l.current,exact:o,callback:c=>{!r&&a({...n._formState,...c})}}),[i,r,o]),A.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),A.useMemo(()=>tq(s,n,l.current,!1),[s,n])}var Mo=t=>typeof t=="string",nq=(t,e,n,r,i)=>Mo(t)?(r&&e.watch.add(t),le(n,t,i)):Array.isArray(t)?t.map(o=>(r&&e.watch.add(o),le(n,o))):(r&&(e.watchAll=!0),n),$E=t=>hr(t)||!QF(t);function ms(t,e,n=new WeakSet){if($E(t)||$E(e))return t===e;if(Jl(t)&&Jl(e))return t.getTime()===e.getTime();const r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const o of r){const s=t[o];if(!i.includes(o))return!1;if(o!=="ref"){const a=e[o];if(Jl(s)&&Jl(a)||sn(s)&&sn(a)||Array.isArray(s)&&Array.isArray(a)?!ms(s,a,n):s!==a)return!1}}return!0}function zde(t){const e=l0(),{control:n=e.control,name:r,defaultValue:i,disabled:o,exact:s,compute:a}=t||{},l=A.useRef(i),c=A.useRef(a),d=A.useRef(void 0);c.current=a;const f=A.useMemo(()=>n._getWatch(r,l.current),[n,r]),[h,p]=A.useState(c.current?c.current(f):f);return IA(()=>n._subscribe({name:r,formState:{values:!0},exact:s,callback:g=>{if(!o){const m=nq(r,n._names,g.values||n._formValues,!1,l.current);if(c.current){const v=c.current(m);
756ms(v,d.current)||(p(v),d.current=v)}else p(m)}}}),[n,o,r,s]),A.useEffect(()=>n._removeUnmounted()),h}function Fde(t){const e=l0(),{name:n,disabled:r,control:i=e.control,shouldUnregister:o,defaultValue:s}=t,a=eq(i._names.array,n),l=A.useMemo(()=>le(i._formValues,n,le(i._defaultValues,n,s)),[i,n,s]),c=zde({control:i,name:n,defaultValue:l,exact:!0}),d=Bde({control:i,name:n,exact:!0}),f=A.useRef(t),h=A.useRef(i.register(n,{...t.rules,value:c,...Yr(t.disabled)?{disabled:t.disabled}:{}}));f.current=t;const p=A.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!le(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!le(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!le(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!le(d.validatingFields,n)},error:{enumerable:!0,get:()=>le(d.errors,n)}}),[d,n]),g=A.useCallback(b=>h.current.onChange({target:{value:ZF(b),name:n},type:nb.CHANGE}),[n]),m=A.useCallback(()=>h.current.onBlur({target:{value:le(i._formValues,n),name:n},type:nb.BLUR}),[n,i._formValues]),v=A.useCallback(b=>{const x=le(i._fields,n);x&&b&&(x._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:S=>b.setCustomValidity(S),reportValidity:()=>b.reportValidity()})},[i._fields,n]),y=A.useMemo(()=>({name:n,value:c,...Yr(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:g,onBlur:m,ref:v}),[n,r,d.disabled,g,m,v,c]);return A.useEffect(()=>{const b=i._options.shouldUnregister||o;i.register(n,{...f.current.rules,...Yr(f.current.disabled)?{disabled:f.current.disabled}:{}});const x=(S,w)=>{const k=le(i._fields,S);k&&k._f&&(k._f.mount=w)};if(x(n,!0),b){const S=kn(le(i._options.defaultValues,n));ct(i._defaultValues,n,S),nn(le(i._formValues,n))&&ct(i._formValues,n,S)}return!a&&i.register(n),()=>{(a?b&&!i._state.action:b)?i.unregister(n):x(n,!1)}},[n,i,a,o]),A.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),A.useMemo(()=>({field:y,formState:d,fieldState:p}),[y,d,p])}const qde=t=>t.render(Fde(t));var rq=(t,e,n,r,i)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:i||!0}}:{},Lh=t=>Array.isArray(t)?t:[t],jM=()=>{let t=[];return{get observers(){return t},next:i=>{for(const o of t)o.next&&o.next(i)},subscribe:i=>(t.push(i),{unsubscribe:()=>{t=t.filter(o=>o!==i)}}),unsubscribe:()=>{t=[]}}},Mr=t=>sn(t)&&!Object.keys(t).length,DA=t=>t.type==="file",ao=t=>typeof t=="function",rb=t=>{if(!OA)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},iq=t=>t.type==="select-multiple",$A=t=>t.type==="radio",Ude=t=>$A(t)||$m(t),tS=t=>rb(t)&&t.isConnected;function Vde(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=nn(t)?r++:t[e[r++]];return t}function Wde(t){for(const e in t)if(t.hasOwnProperty(e)&&!nn(t[e]))return!1;return!0}function cn(t,e){const n=Array.isArray(e)?e:a0(e)?[e]:MA(e),r=n.length===1?t:Vde(t,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(sn(r)&&Mr(r)||Array.isArray(r)&&Wde(r))&&cn(t,n.slice(0,-1)),t}var oq=t=>{for(const e in t)if(ao(t[e]))return!0;return!1};function ib(t,e={}){const n=Array.isArray(t);if(sn(t)||n)for(const r in t)Array.isArray(t[r])||sn(t[r])&&!oq(t[r])?(e[r]=Array.isArray(t[r])?[]:{},ib(t[r],e[r])):hr(t[r])||(e[r]=!0);return e}function sq(t,e,n){const r=Array.isArray(t);if(sn(t)||r)for(const i in t)Array.isArray(t[i])||sn(t[i])&&!oq(t[i])?nn(e)||$E(n[i])?n[i]=Array.isArray(t[i])?ib(t[i],[]):{...ib(t[i])}:sq(t[i],hr(e)?{}:e[i],n[i]):n[i]=!ms(t[i],e[i]);return n}var Uf=(t,e)=>sq(t,e,ib(e));const TM={value:!1,isValid:!1},_M={value:!0,isValid:!0};var aq=t=>
vendor: 5,042 bytes, line 756
756{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!nn(t[0].attributes.value)?nn(t[0].value)||t[0].value===""?_M:{value:t[0].value,isValid:!0}:_M:TM}return TM},lq=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>nn(t)?t:e?t===""?NaN:t&&+t:n&&Mo(t)?new Date(t):r?r(t):t;const AM={isValid:!1,value:null};var cq=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,AM):AM;function NM(t){const e=t.ref;return DA(e)?e.files:$A(e)?cq(t.refs).value:iq(e)?[...e.selectedOptions].map(({value:n})=>n):$m(e)?aq(t.refs).value:lq(nn(e.value)?t.ref.value:e.value,t)}var Hde=(t,e,n,r)=>{const i={};for(const o of t){const s=le(e,o);s&&ct(i,o,s._f)}return{criteriaMode:n,names:[...t],fields:i,shouldUseNativeValidation:r}},ob=t=>t instanceof RegExp,Vf=t=>nn(t)?t:ob(t)?t.source:sn(t)?ob(t.value)?t.value.source:t.value:t,CM=t=>({isOnSubmit:!t||t===so.onSubmit,isOnBlur:t===so.onBlur,isOnChange:t===so.onChange,isOnAll:t===so.all,isOnTouch:t===so.onTouched});const OM="AsyncFunction";var Kde=t=>!!t&&!!t.validate&&!!(ao(t.validate)&&t.validate.constructor.name===OM||sn(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===OM)),Gde=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),PM=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const Bh=(t,e,n,r)=>{for(const i of n||Object.keys(t)){const o=le(t,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&e(s.refs[0],i)&&!r)return!0;if(s.ref&&e(s.ref,s.name)&&!r)return!0;if(Bh(a,e))break}else if(sn(a)&&Bh(a,e))break}}};function MM(t,e,n){const r=le(t,n);if(r||a0(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=le(e,o),a=le(t,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};if(a&&a.root&&a.root.type)return{name:`${o}.root`,error:a.root};i.pop()}return{name:n}}var Jde=(t,e,n,r)=>{n(t);const{name:i,...o}=t;return Mr(o)||Object.keys(o).length>=Object.keys(e).length||Object.keys(o).find(s=>e[s]===(!r||so.all))},Yde=(t,e,n)=>!t||!e||t===e||Lh(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r))),Xde=(t,e,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(e||t):(n?r.isOnBlur:i.isOnBlur)?!t:(n?r.isOnChange:i.isOnChange)?t:!0,Qde=(t,e)=>!PA(le(t,e)).length&&cn(t,e),Zde=(t,e,n)=>{const r=Lh(le(t,n));return ct(r,"root",e[n]),ct(t,n,r),t},Nv=t=>Mo(t);function RM(t,e,n="validate"){if(Nv(t)||Array.isArray(t)&&t.every(Nv)||Yr(t)&&!t)return{type:n,message:Nv(t)?t:"",ref:e}}var ou=t=>sn(t)&&!ob(t)?t:{value:t,message:""},IM=async(t,e,n,r,i,o)=>{const{ref:s,refs:a,required:l,maxLength:c,minLength:d,min:f,max:h,pattern:p,validate:g,name:m,valueAsNumber:v,mount:y}=t._f,b=le(n,m);if(!y||e.has(m))return{};const x=a?a[0]:s,S=O=>{i&&x.reportValidity&&(x.setCustomValidity(Yr(O)?"":O||""),x.reportValidity())},w={},k=$A(s),j=$m(s),T=k||j,_=(v||DA(s))&&nn(s.value)&&nn(b)||rb(s)&&s.value===""||b===""||Array.isArray(b)&&!b.length,N=rq.bind(null,m,r,w),C=(O,I,P,$=is.maxLength,B=is.minLength)=>{const z=O?I:P;w[m]={type:O?$:B,message:z,ref:s,...N(O?$:B,z)}};if(o?!Array.isArray(b)||!b.length:l&&(!T&&(_||hr(b))||Yr(b)&&!b||j&&!aq(a).isValid||k&&!cq(a).isValid)){const{value:O,message:I}=Nv(l)?{value:!!l,message:l}:ou(l);if(O&&(w[m]={type:is.required,message:I,ref:x,...N(is.required,I)},!r))return S(I),w}if(!_&&(!hr(f)||!hr(h))){let O,I;const P=ou(h),$=ou(f);if(!hr(b)&&!isNaN(b)){const B=s.valueAsNumber||b&&+b;hr(P.value)||(O=B>P.value),hr($.value)||(I=B<$.value)}else{const B=s.valueAsDate||new Date(b),z=q=>new Date(new Date().toDateString()+" "+q),R=s.type=="time",L=s.type=="week";Mo(P.value)&&b&&(O=R?z(b)>z(P.value):L?b>P.value:B>new Date(P.value)),Mo($.value)&&b&&(I=R?z(b)<z($.value):L?b<$.value:B<new Date($.value))}if((O||I)&&(C(!!O,P.message,$.message,is.max,is.min),!r))return S(w[m].message),w}if((c||d)&&!_&&(Mo(b)||o&&Array.isArray(b))){const O=ou(c),I=ou(d),P=!hr(O.value)&&b.length>+O.value,$=!hr(I.value)&&b.length<+I.value;if((P||$)&&(C(P,O.message,I.message),!r))return S(w[m].message),w}if(p&&!_&&Mo(b)){const{value:O,message:I}=ou(p);if(ob(O)&&!b.match(O)&&(w[m]={type:is.pattern,message:I,ref:s,...N(is.pattern,I)},!r))return S(I),w}if(g){if(ao(g)){const O=await g(b,n),I=RM(O,x);if(I&&(w[m]={...I,...N(is.validate,I.message)},!r))return S(I.message),w}else if(sn(g)){let O={};for(const I in g){if(!Mr(O)&&!r)break;const P=RM(await g[I](b,n),x,I);P&&(O={...P,...N(I,P.message)},S(P.message),r&&(w[m]=O))}if(!Mr(O)&&(w[m]={ref:x,...O},!r))return w}}return S(!0),w};const efe={mode:so.onSubmit,reValidateMode:so.onChange,shouldFocusError:!0};function tfe(t={}){let e={...efe,...t},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:ao(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1}
vendor: 5,589 bytes, line 756
756,r={},i=sn(e.defaultValues)||sn(e.values)?kn(e.defaultValues||e.values)||{}:{},o=e.shouldUnregister?{}:kn(i),s={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const h={array:jM(),state:jM()},p=e.criteriaMode===so.all,g=M=>F=>{clearTimeout(c),c=setTimeout(M,F)},m=async M=>{if(!e.disabled&&(d.isValid||f.isValid||M)){const F=e.resolver?Mr((await j()).errors):await _(r,!0);F!==n.isValid&&h.state.next({isValid:F})}},v=(M,F)=>{!e.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((M||Array.from(a.mount)).forEach(U=>{U&&(F?ct(n.validatingFields,U,F):cn(n.validatingFields,U))}),h.state.next({validatingFields:n.validatingFields,isValidating:!Mr(n.validatingFields)}))},y=(M,F=[],U,se,ie=!0,Z=!0)=>{if(se&&U&&!e.disabled){if(s.action=!0,Z&&Array.isArray(le(r,M))){const ue=U(le(r,M),se.argA,se.argB);ie&&ct(r,M,ue)}if(Z&&Array.isArray(le(n.errors,M))){const ue=U(le(n.errors,M),se.argA,se.argB);ie&&ct(n.errors,M,ue),Qde(n.errors,M)}if((d.touchedFields||f.touchedFields)&&Z&&Array.isArray(le(n.touchedFields,M))){const ue=U(le(n.touchedFields,M),se.argA,se.argB);ie&&ct(n.touchedFields,M,ue)}(d.dirtyFields||f.dirtyFields)&&(n.dirtyFields=Uf(i,o)),h.state.next({name:M,isDirty:C(M,F),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ct(o,M,F)},b=(M,F)=>{ct(n.errors,M,F),h.state.next({errors:n.errors})},x=M=>{n.errors=M,h.state.next({errors:n.errors,isValid:!1})},S=(M,F,U,se)=>{const ie=le(r,M);if(ie){const Z=le(o,M,nn(U)?le(i,M):U);nn(Z)||se&&se.defaultChecked||F?ct(o,M,F?Z:NM(ie._f)):P(M,Z),s.mount&&m()}},w=(M,F,U,se,ie)=>{let Z=!1,ue=!1;const Pe={name:M};if(!e.disabled){if(!U||se){(d.isDirty||f.isDirty)&&(ue=n.isDirty,n.isDirty=Pe.isDirty=C(),Z=ue!==Pe.isDirty);const et=ms(le(i,M),F);ue=!!le(n.dirtyFields,M),et?cn(n.dirtyFields,M):ct(n.dirtyFields,M,!0),Pe.dirtyFields=n.dirtyFields,Z=Z||(d.dirtyFields||f.dirtyFields)&&ue!==!et}if(U){const et=le(n.touchedFields,M);et||(ct(n.touchedFields,M,U),Pe.touchedFields=n.touchedFields,Z=Z||(d.touchedFields||f.touchedFields)&&et!==U)}Z&&ie&&h.state.next(Pe)}return Z?Pe:{}},k=(M,F,U,se)=>{const ie=le(n.errors,M),Z=(d.isValid||f.isValid)&&Yr(F)&&n.isValid!==F;if(e.delayError&&U?(l=g(()=>b(M,U)),l(e.delayError)):(clearTimeout(c),l=null,U?ct(n.errors,M,U):cn(n.errors,M)),(U?!ms(ie,U):ie)||!Mr(se)||Z){const ue={...se,...Z&&Yr(F)?{isValid:F}:{},errors:n.errors,name:M};n={...n,...ue},h.state.next(ue)}},j=async M=>{v(M,!0);const F=await e.resolver(o,e.context,Hde(M||a.mount,r,e.criteriaMode,e.shouldUseNativeValidation));return v(M),F},T=async M=>{const{errors:F}=await j(M);if(M)for(const U of M){const se=le(F,U);se?ct(n.errors,U,se):cn(n.errors,U)}else n.errors=F;return F},_=async(M,F,U={valid:!0})=>{for(const se in M){const ie=M[se];if(ie){const{_f:Z,...ue}=ie;if(Z){const Pe=a.array.has(Z.name),et=ie._f&&Kde(ie._f);et&&d.validatingFields&&v([se],!0);const $n=await IM(ie,a.disabled,o,p,e.shouldUseNativeValidation&&!F,Pe);if(et&&d.validatingFields&&v([se]),$n[Z.name]&&(U.valid=!1,F))break;!F&&(le($n,Z.name)?Pe?Zde(n.errors,$n,Z.name):ct(n.errors,Z.name,$n[Z.name]):cn(n.errors,Z.name))}!Mr(ue)&&await _(ue,F,U)}}return U.valid},N=()=>{for(const M of a.unMount){const F=le(r,M);F&&(F._f.refs?F._f.refs.every(U=>!tS(U)):!tS(F._f.ref))&&H(M)}a.unMount=new Set},C=(M,F)=>!e.disabled&&(M&&F&&ct(o,M,F),!ms(q(),i)),O=(M,F,U)=>nq(M,a,{...s.mount?o:nn(F)?i:Mo(M)?{[M]:F}:F},U,F),I=M=>PA(le(s.mount?o:i,M,e.shouldUnregister?le(i,M,[]):[])),P=(M,F,U={})=>{const se=le(r,M);let ie=F;if(se){const Z=se._f;Z&&(!Z.disabled&&ct(o,M,lq(F,Z)),ie=rb(Z.ref)&&hr(F)?"":F,iq(Z.ref)?[...Z.ref.options].forEach(ue=>ue.selected=ie.includes(ue.value)):Z.refs?$m(Z.ref)?Z.refs.forEach(ue=>{(!ue.defaultChecked||!ue.disabled)&&(Array.isArray(ie)?ue.checked=!!ie.find(Pe=>Pe===ue.value):ue.checked=ie===ue.value||!!ie)}):Z.refs.forEach(ue=>ue.checked=ue.value===ie):DA(Z.ref)?Z.ref.value="":(Z.ref.value=ie,Z.ref.type||h.state.next({name:M,values:kn(o)})))}(U.shouldDirty||U.shouldTouch)&&w(M,ie,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&L(M)},$=(M,F,U)=>{for(const se in F){if(!F.hasOwnProperty(se))return;const ie=F[se],Z=M+"."+se,ue=le(r,Z);(a.array.has(M)||sn(ie)||ue&&!ue._f)&&!Jl(ie)?$(Z,ie,U):P(Z,ie,U)}},B=(M,F,U={})=>{const se=le(r,M),ie=a.array.has(M),Z=kn(F);ct(o,M,Z),ie?(h.array.next({name:M,values:kn(o)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&U.shouldDirty&&h.state.next({name:M,dirtyFields:Uf(i,o),isDirty:C(M,Z)})):se&&!se._f&&!hr(Z)?$(M,Z,U):P(M,Z,U),PM(M,a)&&h.state.next({...n,name:M}),h.state.next({name:s.mount?M:void 0,values:kn(o)})},z=async M=>{s.mount=!0;const F=M.target;let U=F.name,se=!0;const ie=le(r,U),Z=et=>{se=Number.isNaN(et)||Jl(et)&&isNaN(et.getTime())||ms(et,le(o,U,et))},ue=CM(e.mode),Pe=CM(e.reValidateMode);if(ie){let et,$n;const ci=F.type?NM(ie._f):ZF(M),_r=M.type===nb.BLUR||M.type===nb.FOCUS_OUT,xl=!Gde(ie._f)&&!e.resolver&&!le(n.errors,U)&&!ie._f.deps||Xde(_r,le(n.touchedFields,U),n.isSubmitted,Pe,ue),ui=PM(U,a,_r);ct(o,U,ci),_r?(ie._f.onBlur&&ie._f.onBlur(M),l&&l(0)):ie._f.onChange&&ie._f.onChange(M);const cr=w(U,ci,_r),Ar=!Mr(cr)||ui;if(!_r&&h.state.next({name:U,type:M.type,values:kn(o)}),xl)return(d.isValid||f.isValid)&&(e.mode==="onBlur"?_r&&m():_r||m()),Ar&&h.state.next({name:U,...ui?{}:cr});if(!_r&&ui&&h.state.next({...n}),e.resolver){const{errors:Yn}=await j([U]);if(Z(ci),se){const wl=MM(n.errors,r,U),Qs=MM(Yn,r,wl.name||U);
vendor: 11,699 bytes, line 756
756et=Qs.error,U=Qs.name,$n=Mr(Yn)}}else v([U],!0),et=(await IM(ie,a.disabled,o,p,e.shouldUseNativeValidation))[U],v([U]),Z(ci),se&&(et?$n=!1:(d.isValid||f.isValid)&&($n=await _(r,!0)));se&&(ie._f.deps&&L(ie._f.deps),k(U,$n,et,cr))}},R=(M,F)=>{if(le(n.errors,F)&&M.focus)return M.focus(),1},L=async(M,F={})=>{let U,se;const ie=Lh(M);if(e.resolver){const Z=await T(nn(M)?M:ie);U=Mr(Z),se=M?!ie.some(ue=>le(Z,ue)):U}else M?(se=(await Promise.all(ie.map(async Z=>{const ue=le(r,Z);return await _(ue&&ue._f?{[Z]:ue}:ue)}))).every(Boolean),!(!se&&!n.isValid)&&m()):se=U=await _(r);return h.state.next({...!Mo(M)||(d.isValid||f.isValid)&&U!==n.isValid?{}:{name:M},...e.resolver||!M?{isValid:U}:{},errors:n.errors}),F.shouldFocus&&!se&&Bh(r,R,M?ie:a.mount),se},q=M=>{const F={...s.mount?o:i};return nn(M)?F:Mo(M)?le(F,M):M.map(U=>le(F,U))},G=(M,F)=>({invalid:!!le((F||n).errors,M),isDirty:!!le((F||n).dirtyFields,M),error:le((F||n).errors,M),isValidating:!!le(n.validatingFields,M),isTouched:!!le((F||n).touchedFields,M)}),V=M=>{M&&Lh(M).forEach(F=>cn(n.errors,F)),h.state.next({errors:M?n.errors:{}})},Y=(M,F,U)=>{const se=(le(r,M,{_f:{}})._f||{}).ref,ie=le(n.errors,M)||{},{ref:Z,message:ue,type:Pe,...et}=ie;ct(n.errors,M,{...et,...F,ref:se}),h.state.next({name:M,errors:n.errors,isValid:!1}),U&&U.shouldFocus&&se&&se.focus&&se.focus()},pe=(M,F)=>ao(M)?h.state.subscribe({next:U=>"values"in U&&M(O(void 0,F),U)}):O(M,F,!0),me=M=>h.state.subscribe({next:F=>{Yde(M.name,F.name,M.exact)&&Jde(F,M.formState||d,lt,M.reRenderRoot)&&M.callback({values:{...o},...n,...F,defaultValues:i})}}).unsubscribe,Ue=M=>(s.mount=!0,f={...f,...M.formState},me({...M,formState:f})),H=(M,F={})=>{for(const U of M?Lh(M):a.mount)a.mount.delete(U),a.array.delete(U),F.keepValue||(cn(r,U),cn(o,U)),!F.keepError&&cn(n.errors,U),!F.keepDirty&&cn(n.dirtyFields,U),!F.keepTouched&&cn(n.touchedFields,U),!F.keepIsValidating&&cn(n.validatingFields,U),!e.shouldUnregister&&!F.keepDefaultValue&&cn(i,U);h.state.next({values:kn(o)}),h.state.next({...n,...F.keepDirty?{isDirty:C()}:{}}),!F.keepIsValid&&m()},de=({disabled:M,name:F})=>{(Yr(M)&&s.mount||M||a.disabled.has(F))&&(M?a.disabled.add(F):a.disabled.delete(F))},X=(M,F={})=>{let U=le(r,M);const se=Yr(F.disabled)||Yr(e.disabled);return ct(r,M,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:M}},name:M,mount:!0,...F}}),a.mount.add(M),U?de({disabled:Yr(F.disabled)?F.disabled:e.disabled,name:M}):S(M,!0,F.value),{...se?{disabled:F.disabled||e.disabled}:{},...e.progressive?{required:!!F.required,min:Vf(F.min),max:Vf(F.max),minLength:Vf(F.minLength),maxLength:Vf(F.maxLength),pattern:Vf(F.pattern)}:{},name:M,onChange:z,onBlur:z,ref:ie=>{if(ie){X(M,F),U=le(r,M);const Z=nn(ie.value)&&ie.querySelectorAll&&ie.querySelectorAll("input,select,textarea")[0]||ie,ue=Ude(Z),Pe=U._f.refs||[];if(ue?Pe.find(et=>et===Z):Z===U._f.ref)return;ct(r,M,{_f:{...U._f,...ue?{refs:[...Pe.filter(tS),Z,...Array.isArray(le(i,M))?[{}]:[]],ref:{type:Z.type,name:M}}:{ref:Z}}}),S(M,!1,void 0,Z)}else U=le(r,M,{}),U._f&&(U._f.mount=!1),(e.shouldUnregister||F.shouldUnregister)&&!(eq(a.array,M)&&s.action)&&a.unMount.add(M)}}},ce=()=>e.shouldFocusError&&Bh(r,R,a.mount),ge=M=>{Yr(M)&&(h.state.next({disabled:M}),Bh(r,(F,U)=>{const se=le(r,U);se&&(F.disabled=se._f.disabled||M,Array.isArray(se._f.refs)&&se._f.refs.forEach(ie=>{ie.disabled=se._f.disabled||M}))},0,!1))},K=(M,F)=>async U=>{let se;U&&(U.preventDefault&&U.preventDefault(),U.persist&&U.persist());let ie=kn(o);if(h.state.next({isSubmitting:!0}),e.resolver){const{errors:Z,values:ue}=await j();n.errors=Z,ie=kn(ue)}else await _(r);if(a.disabled.size)for(const Z of a.disabled)cn(ie,Z);if(cn(n.errors,"root"),Mr(n.errors)){h.state.next({errors:{}});try{await M(ie,U)}catch(Z){se=Z}}else F&&await F({...n.errors},U),ce(),setTimeout(ce);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Mr(n.errors)&&!se,submitCount:n.submitCount+1,errors:n.errors}),se)throw se},Ce=(M,F={})=>{le(r,M)&&(nn(F.defaultValue)?B(M,kn(le(i,M))):(B(M,F.defaultValue),ct(i,M,kn(F.defaultValue))),F.keepTouched||cn(n.touchedFields,M),F.keepDirty||(cn(n.dirtyFields,M),n.isDirty=F.defaultValue?C(M,kn(le(i,M))):C()),F.keepError||(cn(n.errors,M),d.isValid&&m()),h.state.next({...n}))},Ee=(M,F={})=>{const U=M?kn(M):i,se=kn(U),ie=Mr(M),Z=ie?i:se;if(F.keepDefaultValues||(i=U),!F.keepValues){if(F.keepDirtyValues){const ue=new Set([...a.mount,...Object.keys(Uf(i,o))]);for(const Pe of Array.from(ue))le(n.dirtyFields,Pe)?ct(Z,Pe,le(o,Pe)):B(Pe,le(Z,Pe))}else{if(OA&&nn(M))for(const ue of a.mount){const Pe=le(r,ue);if(Pe&&Pe._f){const et=Array.isArray(Pe._f.refs)?Pe._f.refs[0]:Pe._f.ref;if(rb(et)){const $n=et.closest("form");if($n){$n.reset();break}}}}if(F.keepFieldsRef)for(const ue of a.mount)B(ue,le(Z,ue));else r={}}o=e.shouldUnregister?F.keepDefaultValues?kn(i):{}:kn(Z),h.array.next({values:{...Z}}),h.state.next({values:{...Z}})}a={mount:F.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!d.isValid||!!F.keepIsValid||!!F.keepDirtyValues,s.watch=!!e.shouldUnregister,h.state.next({submitCount:F.keepSubmitCount?n.submitCount:0,isDirty:ie?!1:F.keepDirty?n.isDirty:!!(F.keepDefaultValues&&!ms(M,i)),isSubmitted:F.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ie?{}:F.keepDirtyValues?F.keepDefaultValues&&o?Uf(i,o):n.dirtyFields:F.keepDefaultValues&&M?Uf(i,M):F.keepDirty?n.dirtyFields:{},touchedFields:F.keepTouched?n.touchedFields:{},errors:F.keepErrors?n.errors:{},isSubmitSuccessful:F.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ve=(M,F)=>Ee(ao(M)?M(o):M,F),Ke=(M,F={})=>{const U=le(r,M),se=U&&U._f;if(se){const ie=se.refs?se.refs[0]:se.ref;ie.focus&&(ie.focus(),F.shouldSelect&&ao(ie.select)&&ie.select())}},lt=M=>{n={...n,...M}},vt={control:{register:X,unregister:H,getFieldState:G,handleSubmit:K,setError:Y,_subscribe:me,_runSchema:j,_focusError:ce,_getWatch:O,_getDirty:C,_setValid:m,_setFieldArray:y,_setDisabledField:de,_setErrors:x,_getFieldArray:I,_reset:Ee,_resetDefaultValues:()=>ao(e.defaultValues)&&e.defaultValues().then(M=>{Ve(M,e.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:N,_disableForm:ge,_subjects:h,_proxyFormState:d,get _fields(){return r},get _formValues(){return o},get _state(){return s},set _state(M){s=M},get _defaultValues(){return i},get _names(){return a},set _names(M){a=M},get _formState(){return n},get _options(){return e},set _options(M){e={...e,...M}}},subscribe:Ue,trigger:L,register:X,handleSubmit:K,watch:pe,setValue:B,getValues:q,reset:Ve,resetField:Ce,clearErrors:V,unregister:H,setError:Y,setFocus:Ke,getFieldState:G};return{...vt,formControl:vt}}function uq(t={}){const e=A.useRef(void 0),n=A.useRef(void 0),[r,i]=A.useState({isDirty:!1,isValidating:!1,isLoading:ao(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:ao(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!ao(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:s,...a}=tfe(t);e.current={...a,formState:r}}const o=e.current.control;return o._options=t,IA(()=>{const s=o._subscribe({formState:o._proxyFormState,callback:()=>i({...o._formState}),reRenderRoot:!0});return i(a=>({...a,isReady:!0})),o._formState.isReady=!0,s},[o]),A.useEffect(()=>o._disableForm(t.disabled),[o,t.disabled]),A.useEffect(()=>{t.mode&&(o._options.mode=t.mode),t.reValidateMode&&(o._options.reValidateMode=t.reValidateMode)},[o,t.mode,t.reValidateMode]),A.useEffect(()=>{t.errors&&(o._setErrors(t.errors),o._focusError())},[o,t.errors]),A.useEffect(()=>{t.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,t.shouldUnregister]),A.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),A.useEffect(()=>{t.values&&!ms(t.values,n.current)?(o._reset(t.values,{keepFieldsRef:!0,...o._options.resetOptions}),n.current=t.values,i(s=>({...s}))):o._resetDefaultValues()},[o,t.values]),A.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()}),e.current.formState=tq(r,o),e.current}const DM=(t,e,n)=>{if(t&&"reportValidity"in t){const r=le(n,e);t.setCustomValidity(r&&r.message||""),t.reportValidity()}},dq=(t,e)=>{for(const n in e.fields){const r=e.fields[n];r&&r.ref&&"reportValidity"in r.ref?DM(r.ref,n,t):r.refs&&r.refs.forEach(i=>DM(i,n,t))}},nfe=(t,e)=>{e.shouldUseNativeValidation&&dq(t,e);const n={};for(const r in t){const i=le(e.fields,r),o=Object.assign(t[r]||{},{ref:i&&i.ref});if(rfe(e.names||Object.keys(t),r)){const s=Object.assign({},le(n,r));ct(s,"root",o),ct(n,r,s)}else ct(n,r,o)}return n},rfe=(t,e)=>t.some(n=>n.startsWith(e+"."));var ife=function(t,e){for(var n={};t.length;){var r=t[0],i=r.code,o=r.message,s=r.path.join(".");if(!n[s])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[s]={message:a.message,type:a.code}}else n[s]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return t.push(f)})}),e){var l=n[s].types,c=l&&l[r.code];n[s]=rq(s,e,n,i,c?[].concat(c,r.message):r.message)}t.shift()}return n},fq=function(t,e,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(s,a){try{var l=Promise.resolve(t[n.mode==="sync"?"parse":"parseAsync"](r,e)).then(function(c){return o.shouldUseNativeValidation&&dq({},o),{errors:{},values:n.raw?r:c}})}catch(c){return a(c)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(s))return{values:{},errors:nfe(ife(s.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}},nt;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const o={};for(const s of i)o[s]=s;return o},t.getValidEnumValues=i=>{const o=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(const a of o)s[a]=i[a];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},t.find=(i,o)=>{for(const s of i)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(nt||(nt={}));var $M;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})($M||($M={}));const be=nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fa=t=>{switch(typeof t){case"undefined":return be.undefined;case"string":return be.string;case"number":return Number.isNaN(t)?be.nan:be.number;case"boolean":return be.boolean;case"function":return be.function;case"bigint":return be.bigint;case"symbol":return be.symbol;case"object":return Array.isArray(t)?be.array:t===null?be.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?be.promise:typeof Map<"u"&&t instanceof Map?be.map:typeof Set<"u"&&t instanceof Set?be.set:typeof Date<"u"&&t instanceof Date?be.date:be.object;default:return be.unknown}}
vendor: 4,379 bytes, line 756
756,re=nt.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 Ls extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(o){return o.message},r={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return i(this),r}static assert(e){if(!(e instanceof Ls))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const o=i.path[0];n[o]=n[o]||[],n[o].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ls.create=t=>new Ls(t);const LE=(t,e)=>{let n;switch(t.code){case re.invalid_type:t.received===be.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,nt.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${nt.joinValues(t.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${nt.joinValues(t.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${nt.joinValues(t.options)}, received '${t.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:nt.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case re.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case re.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case re.custom:n="Invalid input";break;
vendor: 5,283 bytes, line 756
756case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=e.defaultError,nt.assertNever(t)}return{message:n}};let ofe=LE;function sfe(){return ofe}const afe=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,o=[...n,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:e,defaultError:a}).message;return{...i,path:o,message:a}};function fe(t,e){const n=sfe(),r=afe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===LE?void 0:LE].filter(i=>!!i)});t.common.issues.push(r)}class si{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return $e;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const o=await i.key,s=await i.value;r.push({key:o,value:s})}return si.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return $e;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[o.value]=s.value)}return{status:e.value,value:r}}}const $e=Object.freeze({status:"aborted"}),dh=t=>({status:"dirty",value:t}),Bi=t=>({status:"valid",value:t}),LM=t=>t.status==="aborted",BM=t=>t.status==="dirty",kd=t=>t.status==="valid",sb=t=>typeof Promise<"u"&&t instanceof Promise;var we;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(we||(we={}));class ol{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}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 zM=(t,e)=>{if(kd(e))return{success:!0,data:e.value};if(!t.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 Ls(t.common.issues);return this._error=n,this._error}}};function Je(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{const{message:l}=t;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:i}}class Ze{get description(){return this._def.description}_getType(e){return fa(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:fa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new si,ctx:{common:e.parent.common,data:e.data,parsedType:fa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(sb(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={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:e,parsedType:fa(e)},i=this._parseSync({data:e,path:r.path,parent:r});return zM(r,i)}"~validate"(e){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fa(e)};if(!this["~standard"].async)try{const o=this._parseSync({data:e,path:[],parent:n});return kd(o)?{value:o.value}:{issues:n.common.issues}}catch(o){(i=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(o=>kd(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={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:e,parsedType:fa(e)},i=this._parse({data:e,path:r.path,parent:r}),o=await(sb(i)?i:Promise.resolve(i));return zM(r,o)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const s=e(i),a=()=>o.addIssue({code:re.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,i)=>
vendor: 5,978 bytes, line 756
756e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new jd({schema:this,typeName:Le.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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 Ja.create(this,this._def)}nullable(){return Td.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Fo.create(this)}promise(){return ub.create(this,this._def)}or(e){return lb.create([this,e],this._def)}and(e){return cb.create(this,e,this._def)}transform(e){return new jd({...Je(this._def),schema:this,typeName:Le.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new FE({...Je(this._def),innerType:this,defaultValue:n,typeName:Le.ZodDefault})}brand(){return new Cfe({typeName:Le.ZodBranded,type:this,...Je(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new qE({...Je(this._def),innerType:this,catchValue:n,typeName:Le.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return LA.create(this,e)}readonly(){return UE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const lfe=/^c[^\s-]{8,}$/i,cfe=/^[0-9a-z]+$/,ufe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,dfe=/^[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,ffe=/^[a-z0-9_-]{21}$/i,hfe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,pfe=/^[-+]?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)?)??$/,mfe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,gfe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let nS;const vfe=/^(?:(?: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])$/,yfe=/^(?:(?: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])$/,bfe=/^(([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]))$/,xfe=/^(([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])$/,wfe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Sfe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,hq="((\\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])))",kfe=new RegExp(`^${hq}$`);function pq(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function Efe(t){return new RegExp(`^${pq(t)}$`)}function jfe(t){let e=`${hq}T${pq(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Tfe(t,e){return!!((e==="v4"||!e)&&vfe.test(t)||(e==="v6"||!e)&&bfe.test(t))}function _fe(t,e){if(!hfe.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function Afe(t,e){return!!((e==="v4"||!e)&&yfe.test(t)||(e==="v6"||!e)&&xfe.test(t))}class Oa extends Ze{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==be.string){const o=this._getOrReturnCtx(e);
vendor: 15,884 bytes, line 756
756return fe(o,{code:re.invalid_type,expected:be.string,received:o.parsedType}),$e}const r=new si;let i;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:re.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:re.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?fe(i,{code:re.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&fe(i,{code:re.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")mfe.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"email",code:re.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")nS||(nS=new RegExp(gfe,"u")),nS.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"emoji",code:re.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")dfe.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"uuid",code:re.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")ffe.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"nanoid",code:re.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")lfe.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid",code:re.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")cfe.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid2",code:re.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")ufe.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ulid",code:re.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),fe(i,{validation:"url",code:re.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"regex",code:re.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),fe(i,{code:re.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:re.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:re.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?jfe(o).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:re.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?kfe.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:re.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Efe(o).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:re.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?pfe.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"duration",code:re.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Tfe(e.data,o.version)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ip",code:re.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?_fe(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"jwt",code:re.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Afe(e.data,o.version)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cidr",code:re.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?wfe.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"base64",code:re.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?Sfe.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"base64url",code:re.invalid_string,message:o.message}),r.dirty()):nt.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:re.invalid_string,...we.errToObj(r)})}_addCheck(e){return new Oa({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...we.errToObj(e)})}url(e){return this._addCheck({kind:"url",...we.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...we.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...we.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...we.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...we.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...we.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...we.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...we.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...we.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...we.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...we.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...we.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...we.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...we.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...we.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...we.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...we.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...we.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...we.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...we.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...we.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...we.errToObj(n)})}nonempty(e){return this.min(1,we.errToObj(e))}trim(){return new Oa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Oa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Oa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Oa.create=t=>new Oa({checks:[],typeName:Le.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...Je(t)});function Nfe(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,o=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return o%s/10**i}class $p extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==be.number){const o=this._getOrReturnCtx(e);return fe(o,{code:re.invalid_type,expected:be.number,received:o.parsedType}),$e}let r;const i=new si;for(const o of this._def.checks)o.kind==="int"?nt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),fe(r,{code:re.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),fe(r,{code:re.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),fe(r,{code:re.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Nfe(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),fe(r,{code:re.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),fe(r,{code:re.not_finite,message:o.message}),i.dirty()):nt.assertNever(o);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,we.toString(n))}gt(e,n){return this.setLimit("min",e,!1,we.toString(n))}lte(e,n){return this.setLimit("max",e,!0,we.toString(n))}lt(e,n){return this.setLimit("max",e,!1,we.toString(n))}setLimit(e,n,r,i){return new $p({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:we.toString(i)}]})}_addCheck(e){return new $p({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:we.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:we.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:we.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:we.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:we.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:we.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:we.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:we.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:we.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&nt.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}$p.create=t=>new $p({checks:[],typeName:Le.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Je(t)});class Lp extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==be.bigint)return this._getInvalidInput(e);let r;const i=new si;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),fe(r,{code:re.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),fe(r,{code:re.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),fe(r,{code:re.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):nt.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return fe(n,{code:re.invalid_type,expected:be.bigint,received:n.parsedType}),$e}gte(e,n){return this.setLimit("min",e,!0,we.toString(n))}gt(e,n){return this.setLimit("min",e,!1,we.toString(n))}lte(e,n){return this.setLimit("max",e,!0,we.toString(n))}lt(e,n){return this.setLimit("max",e,!1,we.toString(n))}setLimit(e,n,r,i){return new Lp({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:we.toString(i)}]})}_addCheck(e){return new Lp({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:we.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:we.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:we.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:we.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:we.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Lp.create=t=>new Lp({checks:[],typeName:Le.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...Je(t)});class FM extends Ze{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==be.boolean){const r=this._getOrReturnCtx(e);return fe(r,{code:re.invalid_type,expected:be.boolean,received:r.parsedType}),$e}return Bi(e.data)}}FM.create=t=>new FM({typeName:Le.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Je(t)});class ab extends Ze{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==be.date){const o=this._getOrReturnCtx(e);return fe(o,{code:re.invalid_type,expected:be.date,received:o.parsedType}),$e}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return fe(o,{code:re.invalid_date}),$e}const r=new si;let i;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:re.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:re.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):nt.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ab({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:we.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:we.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}ab.create=t=>new ab({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Le.ZodDate,...Je(t)});class qM extends Ze{_parse(e){if(this._getType(e)!==be.symbol){const r=this._getOrReturnCtx(e);
vendor: 1,247 bytes, line 756
756return fe(r,{code:re.invalid_type,expected:be.symbol,received:r.parsedType}),$e}return Bi(e.data)}}qM.create=t=>new qM({typeName:Le.ZodSymbol,...Je(t)});class UM extends Ze{_parse(e){if(this._getType(e)!==be.undefined){const r=this._getOrReturnCtx(e);return fe(r,{code:re.invalid_type,expected:be.undefined,received:r.parsedType}),$e}return Bi(e.data)}}UM.create=t=>new UM({typeName:Le.ZodUndefined,...Je(t)});class VM extends Ze{_parse(e){if(this._getType(e)!==be.null){const r=this._getOrReturnCtx(e);return fe(r,{code:re.invalid_type,expected:be.null,received:r.parsedType}),$e}return Bi(e.data)}}VM.create=t=>new VM({typeName:Le.ZodNull,...Je(t)});class WM extends Ze{constructor(){super(...arguments),this._any=!0}_parse(e){return Bi(e.data)}}WM.create=t=>new WM({typeName:Le.ZodAny,...Je(t)});class HM extends Ze{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Bi(e.data)}}HM.create=t=>new HM({typeName:Le.ZodUnknown,...Je(t)});class sl extends Ze{_parse(e){const n=this._getOrReturnCtx(e);return fe(n,{code:re.invalid_type,expected:be.never,received:n.parsedType}),$e}}sl.create=t=>new sl({typeName:Le.ZodNever,...Je(t)});class KM extends Ze{_parse(e){if(this._getType(e)!==be.undefined){const r=this._getOrReturnCtx(e);
vendor: 5,029 bytes, line 756
756return fe(r,{code:re.invalid_type,expected:be.void,received:r.parsedType}),$e}return Bi(e.data)}}KM.create=t=>new KM({typeName:Le.ZodVoid,...Je(t)});class Fo extends Ze{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==be.array)return fe(n,{code:re.invalid_type,expected:be.array,received:n.parsedType}),$e;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(s||a)&&(fe(n,{code:s?re.too_big:re.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(fe(n,{code:re.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(fe(n,{code:re.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>i.type._parseAsync(new ol(n,s,n.path,a)))).then(s=>si.mergeArray(r,s));const o=[...n.data].map((s,a)=>i.type._parseSync(new ol(n,s,n.path,a)));return si.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new Fo({...this._def,minLength:{value:e,message:we.toString(n)}})}max(e,n){return new Fo({...this._def,maxLength:{value:e,message:we.toString(n)}})}length(e,n){return new Fo({...this._def,exactLength:{value:e,message:we.toString(n)}})}nonempty(e){return this.min(1,e)}}Fo.create=(t,e)=>new Fo({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Le.ZodArray,...Je(e)});function pu(t){if(t instanceof Kt){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Ja.create(pu(r))}return new Kt({...t._def,shape:()=>e})}else return t instanceof Fo?new Fo({...t._def,type:pu(t.element)}):t instanceof Ja?Ja.create(pu(t.unwrap())):t instanceof Td?Td.create(pu(t.unwrap())):t instanceof Cc?Cc.create(t.items.map(e=>pu(e))):t}class Kt extends Ze{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=nt.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==be.object){const c=this._getOrReturnCtx(e);return fe(c,{code:re.invalid_type,expected:be.object,received:c.parsedType}),$e}const{status:r,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof sl&&this._def.unknownKeys==="strip"))for(const c in i.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const d=o[c],f=i.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new ol(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof sl){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(c==="strict")a.length>0&&(fe(i,{code:re.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of a){const f=i.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new ol(i,f,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of l){const f=await d.key,h=await d.value;c.push({key:f,value:h,alwaysSet:d.alwaysSet})}return c}).then(c=>si.mergeObjectSync(r,c)):si.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return we.errToObj,new Kt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var o,s;const i=((s=(o=this._def).errorMap)==null?void 0:s.call(o,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:we.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new Kt({...this._def,unknownKeys:"strip"})}passthrough(){return new Kt({...this._def,unknownKeys:"passthrough"})}extend(e){return new Kt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Kt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Le.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Kt({...this._def,catchall:e})}pick(e){const n={};for(const r of nt.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Kt({...this._def,shape:()=>n})}omit(e){const n={};for(const r of nt.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new Kt({...this._def,shape:()=>n})}deepPartial(){return pu(this)}partial(e){const n={};for(const r of nt.objectKeys(this.shape)){const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}return new Kt({...this._def,shape:()=>n})}required(e){const n={};for(const r of nt.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Ja;)o=o._def.innerType;n[r]=o}return new Kt({...this._def,shape:()=>n})}
vendor: 3,861 bytes, line 756
756keyof(){return mq(nt.objectKeys(this.shape))}}Kt.create=(t,e)=>new Kt({shape:()=>t,unknownKeys:"strip",catchall:sl.create(),typeName:Le.ZodObject,...Je(e)});Kt.strictCreate=(t,e)=>new Kt({shape:()=>t,unknownKeys:"strict",catchall:sl.create(),typeName:Le.ZodObject,...Je(e)});Kt.lazycreate=(t,e)=>new Kt({shape:t,unknownKeys:"strip",catchall:sl.create(),typeName:Le.ZodObject,...Je(e)});class lb extends Ze{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(a=>new Ls(a.ctx.common.issues));return fe(n,{code:re.invalid_union,unionErrors:s}),$e}if(n.common.async)return Promise.all(r.map(async o=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let o;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(l=>new Ls(l));return fe(n,{code:re.invalid_union,unionErrors:a}),$e}}get options(){return this._def.options}}lb.create=(t,e)=>new lb({options:t,typeName:Le.ZodUnion,...Je(e)});function BE(t,e){const n=fa(t),r=fa(e);if(t===e)return{valid:!0,data:t};if(n===be.object&&r===be.object){const i=nt.objectKeys(e),o=nt.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(const a of o){const l=BE(t[a],e[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===be.array&&r===be.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let o=0;o<t.length;o++){const s=t[o],a=e[o],l=BE(s,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===be.date&&r===be.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class cb extends Ze{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(o,s)=>{if(LM(o)||LM(s))return $e;const a=BE(o.value,s.value);return a.valid?((BM(o)||BM(s))&&n.dirty(),{status:n.value,value:a.data}):(fe(r,{code:re.invalid_intersection_types}),$e)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}cb.create=(t,e,n)=>new cb({left:t,right:e,typeName:Le.ZodIntersection,...Je(n)});class Cc extends Ze{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==be.array)return fe(r,{code:re.invalid_type,expected:be.array,received:r.parsedType}),$e;if(r.data.length<this._def.items.length)return fe(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$e;!this._def.rest&&r.data.length>this._def.items.length&&(fe(r,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new ol(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(o).then(s=>si.mergeArray(n,s)):si.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new Cc({...this._def,rest:e})}}Cc.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cc({items:t,typeName:Le.ZodTuple,rest:null,...Je(e)})};class GM extends Ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);
vendor: 4,307 bytes, line 756
756if(r.parsedType!==be.map)return fe(r,{code:re.invalid_type,expected:be.map,received:r.parsedType}),$e;const i=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:i._parse(new ol(r,a,r.path,[c,"key"])),value:o._parse(new ol(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return $e;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(c.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return $e;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(c.value,d.value)}return{status:n.value,value:a}}}}GM.create=(t,e,n)=>new GM({valueType:e,keyType:t,typeName:Le.ZodMap,...Je(n)});class Bp extends Ze{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==be.set)return fe(r,{code:re.invalid_type,expected:be.set,received:r.parsedType}),$e;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(fe(r,{code:re.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(fe(r,{code:re.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function s(l){const c=new Set;for(const d of l){if(d.status==="aborted")return $e;d.status==="dirty"&&n.dirty(),c.add(d.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>o._parse(new ol(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(e,n){return new Bp({...this._def,minSize:{value:e,message:we.toString(n)}})}max(e,n){return new Bp({...this._def,maxSize:{value:e,message:we.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Bp.create=(t,e)=>new Bp({valueType:t,minSize:null,maxSize:null,typeName:Le.ZodSet,...Je(e)});class JM extends Ze{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}JM.create=(t,e)=>new JM({getter:t,typeName:Le.ZodLazy,...Je(e)});class zE extends Ze{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return fe(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),$e}return{status:"valid",value:e.data}}get value(){return this._def.value}}zE.create=(t,e)=>new zE({value:t,typeName:Le.ZodLiteral,...Je(e)});function mq(t,e){return new Ed({values:t,typeName:Le.ZodEnum,...Je(e)})}class Ed extends Ze{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return fe(n,{expected:nt.joinValues(r),received:n.parsedType,code:re.invalid_type}),$e}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return fe(n,{received:n.data,code:re.invalid_enum_value,options:r}),$e}return Bi(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Ed.create(e,{...this._def,...n})}exclude(e,n=this._def){return Ed.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Ed.create=mq;class YM extends Ze{_parse(e){const n=nt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==be.string&&r.parsedType!==be.number){const i=nt.objectValues(n);return fe(r,{expected:nt.joinValues(i),received:r.parsedType,code:re.invalid_type}),$e}if(this._cache||(this._cache=new Set(nt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=nt.objectValues(n);return fe(r,{received:r.data,code:re.invalid_enum_value,options:i}),$e}return Bi(e.data)}get enum(){return this._def.values}}YM.create=(t,e)=>new YM({values:t,typeName:Le.ZodNativeEnum,...Je(e)});class ub extends Ze{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==be.promise&&n.common.async===!1)return fe(n,{code:re.
vendor: 6,308 bytes, line 756
756invalid_type,expected:be.promise,received:n.parsedType}),$e;const r=n.parsedType===be.promise?n.data:Promise.resolve(n.data);return Bi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ub.create=(t,e)=>new ub({type:t,typeName:Le.ZodPromise,...Je(e)});class jd extends Ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Le.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{fe(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const s=i.transform(r.data,o);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return $e;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?$e:l.status==="dirty"||n.value==="dirty"?dh(l.value):l});{if(n.value==="aborted")return $e;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?$e:a.status==="dirty"||n.value==="dirty"?dh(a.value):a}}if(i.type==="refinement"){const s=a=>{const l=i.refinement(a,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?$e:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?$e:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!kd(s))return $e;const a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>kd(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:n.value,value:a})):$e);nt.assertNever(i)}}jd.create=(t,e,n)=>new jd({schema:t,typeName:Le.ZodEffects,effect:e,...Je(n)});jd.createWithPreprocess=(t,e,n)=>new jd({schema:e,effect:{type:"preprocess",transform:t},typeName:Le.ZodEffects,...Je(n)});class Ja extends Ze{_parse(e){return this._getType(e)===be.undefined?Bi(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ja.create=(t,e)=>new Ja({innerType:t,typeName:Le.ZodOptional,...Je(e)});class Td extends Ze{_parse(e){return this._getType(e)===be.null?Bi(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Td.create=(t,e)=>new Td({innerType:t,typeName:Le.ZodNullable,...Je(e)});class FE extends Ze{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===be.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}FE.create=(t,e)=>new FE({innerType:t,typeName:Le.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Je(e)});class qE extends Ze{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return sb(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ls(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ls(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}qE.create=(t,e)=>new qE({innerType:t,typeName:Le.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Je(e)});class XM extends Ze{_parse(e){if(this._getType(e)!==be.nan){const r=this._getOrReturnCtx(e);return fe(r,{code:re.invalid_type,expected:be.nan,received:r.parsedType}),$e}return{status:"valid",value:e.data}}}XM.create=t=>new XM({typeName:Le.ZodNaN,...Je(t)});class Cfe extends Ze{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class LA extends Ze{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?$e:o.status==="dirty"?(n.dirty(),dh(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?$e:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new LA({in:e,out:n,typeName:Le.ZodPipeline})}}class UE extends Ze{_parse(e){const n=this._def.innerType._parse(e),r=i=>(kd(i)&&(i.value=Object.freeze(i.value)),i);return sb(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}UE.create=(t,e)=>new UE({innerType:t,typeName:Le.ZodReadonly,...Je(e)});Kt.lazycreate;var Le;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Le||(Le={}));const eo=Oa.create;sl.create;Fo.create;const gq=Kt.create;
756Kt.strictCreate;lb.create;cb.create;Cc.create;const vq=zE.create;Ed.create;ub.create;Ja.create;Td.create;const yq=Lde,bq=E.createContext({}),to=({...t})=>u.jsx(bq.Provider,{value:{name:t.name},children:u.jsx(qde,{...t})}),c0=()=>{const t=E.useContext(bq),e=E.useContext(xq),{getFieldState:n,formState:r}=l0(),i=n(t.name,r);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:o}=e;return{id:o,name:t.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...i}},xq=E.createContext({}),xi=E.forwardRef(({className:t,...e},n)=>{const r=E.useId();return u.jsx(xq.Provider,{value:{id:r},children:u.jsx("div",{ref:n,className:qt("space-y-2",t),...e})})});xi.displayName="FormItem";const wi=E.forwardRef(({className:t,...e},n)=>{const{error:r,formItemId:i}=c0();return u.jsx(yi,{ref:n,className:qt(r&&"text-destructive",t),htmlFor:i,...e})});wi.displayName="FormLabel";const Si=E.forwardRef(({...t},e)=>{const{error:n,formItemId:r,formDescriptionId:i,formMessageId:o}=c0();return u.jsx(y3,{ref:e,id:r,"aria-describedby":n?`${i} ${o}`:`${i}`,"aria-invalid":!!n,...t})});Si.displayName="FormControl";const Ofe=E.forwardRef(({className:t,...e},n)=>{const{formDescriptionId:r}=c0();return u.jsx("p",{ref:n,id:r,className:qt("text-sm text-muted-foreground",t),...e})});Ofe.displayName="FormDescription";const ki=E.forwardRef(({className:t,children:e,...n},r)=>{const{error:i,formMessageId:o}=c0(),s=i?String(i==null?void 0:i.message):e;return s?u.jsx("p",{ref:r,id:o,className:qt("text-sm font-medium text-destructive",t),...n,children:s}):null});ki.displayName="FormMessage";const QM="https://heyzine.com/flip-book/68b8b4218d.html",Pfe="longevidad",Mfe="/libro/El_arte_de_envejecer_Capitulo1.pdf",Rfe=gq({nombre:eo().trim().min(1,"Requerido").max(100),apellidos:eo().trim().min(1,"Requerido").max(100),cargo:eo().trim().min(1,"Requerido").max(150),organizacion:eo().trim().min(1,"Requerido").max(150),email:eo().trim().email("Email no válido").max(255),telefono:eo().trim().max(30).optional().or(vq("")),palabra_clave:eo().trim().min(1,"Requerido").max(100)}),Ife=()=>{const{toast:t}=g3(),[e,n]=E.useState(!1),[r,i]=E.useState(!1),o=uq({resolver:fq(Rfe),defaultValues:{nombre:"",apellidos:"",cargo:"",organizacion:"",email:"",telefono:"",palabra_clave:""}}),s=async a=>{i(!0);const l=a.palabra_clave.trim().toLowerCase()===Pfe,c={nombre:a.nombre,apellidos:a.apellidos,cargo:a.cargo||null,organizacion:a.organizacion||null,email:a.email,telefono:a.telefono||null,palabra_clave:a.palabra_clave,acceso_concedido:l},{error:d}=await tn.from("book_access_requests").insert(c);if(d){i(!1),t({title:"Error",description:"No se pudo enviar la solicitud.",variant:"destructive"});return}try{await tn.functions.invoke("send-book-access-email",{body:c})}catch(f){console.error("Email notification error:",f)}i(!1),l?(n(!0),setTimeout(()=>{var f;(f=document.getElementById("acceso-libro"))==null||f.scrollIntoView({behavior:"smooth"})},100)):(t({title:"Solicitud recibida",description:"Tu solicitud no incluye la palabra clave correcta. Puedes descargar el primer capÃtulo de cortesÃa."}),n(!1),setTimeout(()=>{var f;(f=document.getElementById("descarga-capitulo"))==null||f.scrollIntoView({behavior:"smooth"})},100))};return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsxs("section",{className:"pt-32 md:pt-40 pb-20 md:pb-28 bg-gradient-section relative overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 to-transparent pointer-events-none"}),u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative",children:u.jsxs("div",{className:"grid md:grid-cols-2 gap-12 lg:gap-20 items-center max-w-6xl mx-auto",children:[u.jsxs("div",{children:[u.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-6",children:[u.jsx(vO,{className:"w-3.5 h-3.5"})," Acceso filtrado"]}),u.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-foreground mb-6 leading-tight",children:"Las decisiones que no tomas hoy, definirán tu vida mañana"}),u.jsxs("p",{className:"text-lg md:text-xl text-muted-foreground mb-8 leading-relaxed",children:["No todo el mund
756o está preparado para pensar en su futuro con claridad.",u.jsx("br",{}),"Este libro es para quienes sà lo están."]}),u.jsx("a",{href:"#formulario",children:u.jsxs(fn,{size:"lg",variant:"hero",className:"group",children:["Quiero acceder al libro",u.jsx(st,{className:"w-4 h-4 transition-transform group-hover:translate-x-1"})]})}),u.jsx("p",{className:"text-xs text-muted-foreground mt-4",children:"Acceso limitado a solicitudes cualificadas."})]}),u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/20 to-transparent blur-3xl"}),u.jsx("img",{src:z_,alt:"Portada del libro El arte de envejecer sabiamente",className:"relative w-full max-w-sm mx-auto rounded-2xl shadow-2xl"})]})]})})]}),u.jsx("section",{className:"py-20 md:py-28",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[u.jsxs("p",{className:"text-2xl md:text-3xl font-light text-foreground leading-relaxed mb-8",children:["Vivimos ocupados resolviendo lo urgente,",u.jsx("br",{}),u.jsx("span",{className:"font-semibold",children:"pero evitando lo importante."})]}),u.jsx("div",{className:"w-16 h-px bg-[hsl(30_30%_85%)] mx-auto my-10"}),u.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed mb-6",children:"Y lo importante casi siempre tiene que ver con el futuro."}),u.jsxs("div",{className:"space-y-2 text-lg text-foreground/80 mb-8",children:[u.jsx("p",{children:"Cómo queremos vivir."}),u.jsx("p",{children:"Cómo queremos envejecer."}),u.jsx("p",{children:"Qué decisiones estamos tomando hoy que definirán mañana."})]}),u.jsxs("p",{className:"text-xl text-foreground font-medium",children:["La mayorÃa de las personas no diseña su vida.",u.jsx("br",{}),"Simplemente la improvisa."]})]})})}),u.jsx("section",{className:"py-20 md:py-28 bg-primary text-primary-foreground",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[u.jsx(uc,{className:"w-10 h-10 mx-auto mb-8 opacity-80"}),u.jsxs("p",{className:"text-3xl md:text-4xl font-light leading-relaxed mb-8",children:["El futuro no ocurre por accidente.",u.jsx("br",{}),u.jsx("span",{className:"font-semibold",children:"Ocurre por acumulación de decisiones."})]}),u.jsxs("p",{className:"text-lg opacity-90 leading-relaxed",children:["Y muchas de esas decisiones se posponen demasiado tiempo.",u.jsx("br",{}),"No por falta de información. Sino por falta de intención."]})]})})}),u.jsx("section",{className:"py-20 md:py-28",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-6",children:"El libro"}),u.jsx("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mb-8 leading-tight",children:"Una guÃa para anticipar decisiones que otros toman demasiado tarde"}),u.jsxs("div",{className:"space-y-5 text-lg text-muted-foreground leading-relaxed",children:[u.jsx("p",{children:"Este libro no busca darte respuestas rápidas."}),u.jsx("p",{className:"text-foreground font-medium",children:"Busca ayudarte a pensar mejor sobre las decisiones que realmente importan."}),u.jsx("p",{children:"Está diseñado como una guÃa de reflexión estructurada sobre cómo construir una vida más consciente, estable y alineada con lo que quieres llegar a ser."})]})]})})}),u.jsx("section",{className:"py-20 md:py-28 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-12 text-center",children:"Qué obtendrás"}),u.jsx("div",{className:"grid md:grid-cols-2 gap-5",children:["Mayor claridad sobre decisiones crÃticas de tu futuro","Una visión más estratégica de tu vida a largo plazo","Herramientas para anticipar en lugar de reaccionar","Un marco de pensamiento para decisiones complejas","Más control sobre áreas clave: salud, finanzas, propósito"].map(a=>u.jsxs("div",{className:"flex items-start gap-4 p-6 rounded-xl bg-card border border-border",children:[u.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center",children:u.jsx(Nk,{className:"w-4 h-4 text-primary"})}),u.jsx("p",{className:"text-foreground leading-relaxed",children:a})]},a))})]})})}),u.jsx("section",{className:"py-20 md:py-28",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[u.jsxs("p",{className:"text-2xl md:text-3xl font-light text-foreground leading-relaxed mb-10",children:["Envejecer no es el problema.",u.jsx("br",{}),u.jsx("span",{className:"font-semibold",children:"El problema es no haber decidido cómo quieres hacerlo."})]}),u.jsx("div",{className:"w-16 h-px bg-[hsl(30_30%_85%)] mx-auto my-10"}),u.jsxs("p",{className:"text-xl text-muted-foreground leading-relaxed",children:["La longevidad no es solo vivir más.",u.jsx("br",{}),u.jsx("span",{className:"text-foreground font-medium",children:"Es vivir mejor durante más tiempo."})]})]})})}),u.jsx("section",{id:"formulario",className:"py-20 md:py-28 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-2xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-10",children:[u.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:[u.jsx(vO,{className:"w-3.5 h-3.5"})," Acceso restringido"]}
756),u.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-3",children:"Accede al libro"}),u.jsx("p",{className:"text-muted-foreground",children:"Completa tus datos para recibir acceso"})]}),u.jsx("div",{className:"bg-card border border-border rounded-2xl p-6 md:p-10 shadow-sm",children:u.jsx(yq,{...o,children:u.jsxs("form",{onSubmit:o.handleSubmit(s),className:"space-y-5",children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-5",children:[u.jsx(to,{control:o.control,name:"nombre",render:({field:a})=>u.jsxs(xi,{children:[u.jsx(wi,{children:"Nombre *"}),u.jsx(Si,{children:u.jsx(hn,{...a})}),u.jsx(ki,{})]})}),u.jsx(to,{control:o.control,name:"apellidos",render:({field:a})=>u.jsxs(xi,{children:[u.jsx(wi,{children:"Apellidos *"}),u.jsx(Si,{children:u.jsx(hn,{...a})}),u.jsx(ki,{})]})})]}),u.jsxs("div",{className:"grid md:grid-cols-2 gap-5",children:[u.jsx(to,{control:o.control,name:"cargo",render:({field:a})=>u.jsxs(xi,{children:[u.jsx(wi,{children:"Cargo *"}),u.jsx(Si,{children:u.jsx(hn,{...a})}),u.jsx(ki,{})]})}),u.jsx(to,{control:o.control,name:"organizacion",render:({field:a})=>u.jsxs(xi,{children:[u.jsx(wi,{children:"Organización *"}),u.jsx(Si,{children:u.jsx(hn,{...a})}),u.jsx(ki,{})]})})]}),u.jsxs("div",{className:"grid md:grid-cols-2 gap-5",children:[u.jsx(to,{control:o.control,name:"email",render:({field:a})=>u.jsxs(xi,{children:[u.jsx(wi,{children:"Email *"}),u.jsx(Si,{children:u.jsx(hn,{type:"email",...a})}),u.jsx(ki,{})]})}),u.jsx(to,{control:o.control,name:"telefono",render:({field:a})=>u.jsxs(xi,{children:[u.jsx(wi,{children:"Teléfono"}),u.jsx(Si,{children:u.jsx(hn,{type:"tel",...a})}),u.jsx(ki,{})]})})]}),u.jsx(to,{control:o.control,name:"palabra_clave",render:({field:a})=>u.jsxs(xi,{children:[u.jsx(wi,{children:"Palabra clave *"}),u.jsx(Si,{children:u.jsx(hn,{...a,placeholder:"Introduce la palabra clave"})}),u.jsx(ki,{})]})}),u.jsxs(fn,{type:"submit",size:"lg",variant:"hero",className:"w-full",disabled:r,children:[r?"Enviando...":"Acceder al libro",!r&&u.jsx(st,{className:"w-4 h-4"})]}),u.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Solo se procesarán solicitudes con la palabra clave correcta."})]})})})]})})}),e&&u.jsx("section",{id:"acceso-libro",className:"py-20 md:py-28",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-5xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-10",children:[u.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-primary/10 text-primary text-sm font-medium mb-4",children:[u.jsx(Nk,{className:"w-3.5 h-3.5"})," Acceso concedido"]}),u.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-3",children:"Tu libro está disponible"}),u.jsx("p",{className:"text-muted-foreground",children:"Comienza tu lectura ahora"})]}),u.jsx("div",{className:"rounded-2xl overflow-hidden border border-border shadow-xl bg-card aspect-[4/3]",children:u.jsx("iframe",{src:QM,title:"El arte de envejecer sabiamente",className:"w-full h-full",allow:"fullscreen"})}),u.jsx("div",{className:"text-center mt-6",children:u.jsx("a",{href:QM,target:"_blank",rel:"noopener noreferrer",children:u.jsxs(fn,{variant:"outline",children:["Abrir en pantalla completa",u.jsx(st,{className:"w-4 h-4"})]})})})]})})}),u.jsx("section",{id:"descarga-capitulo",className:"py-20 md:py-28 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[u.jsx($o,{className:"w-12 h-12 text-primary mx-auto mb-6"}),u.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"¿Aún no tienes la palabra clave?"}),u.jsx("p",{className:"text-lg text-muted-foreground mb-8 leading-relaxed",children:"Te invitamos a leer el primer capÃtulo del libro como cortesÃa. Una primera puerta hacia un nuevo modo de pensar tu futuro."}),u.jsx("a",{href:Mfe,download:!0,children:u.jsxs(fn,{size:"lg",variant:"default",children:[u.jsx(eK,{className:"w-4 h-4"}),"Descargar primer capÃtulo"]})})]})})}),u.jsx("section",{className:"py-24 md:py-32 bg-primary text-primary-foreground",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[u.jsxs("p",{className:"text-3xl md:text-4xl font-light leading-relaxed mb-8",children:["No se trata de tener más información.",u.jsx("br",{}),u.jsx("span",{className:"font-semibold",children:"Se trata de tomar mejores decisiones."})]}),u.jsxs("p",{className:"text-xl opacity-90 mb-10",children:["Y algunas de ellas",u.jsx("br",{}),"no pueden esperar."]}),u.jsx("a",{href:"#formulario",children:u.jsxs(fn,{size:"lg",variant:"hero-outline",children:["Acceder al libro",u.jsx(st,{className:"w-4 h-4"})]})})]})})})]}),u.jsx(Qt,{})]})},Dfe=gq({name:eo().trim().min(1,"Required").max(200),email:eo().trim().email("Invalid email").max(255),phone:eo().trim().max(20).optional().or(vq("")),message:eo().trim().min(1,"Required").max(5e3)}),$fe=()=>{const{t}=Zt(),[e,n]=E.useState(!1),r=uq({resolver:fq(Dfe),defaultValues:{name:"",email:"",ph
756one:"",message:""}}),i=async o=>{n(!0);try{const{data:s,error:a}=await tn.functions.invoke("send-contact-email",{body:o});if(a)throw a;if(s!=null&&s.error)throw new Error(s.error);kt.success(t("contacto.successMsg")),r.reset()}catch(s){console.error("Contact form error:",s),kt.error(t("contacto.errorMsg"))}finally{n(!1)}};return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("contacto.badge")}),u.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:u.jsx("span",{className:"text-gradient",children:t("contacto.title")})}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("contacto.sub")})]})})}),u.jsx("section",{className:"pb-20 md:pb-28 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"grid lg:grid-cols-5 gap-10 max-w-5xl mx-auto",children:[u.jsxs("div",{className:"lg:col-span-3 rounded-2xl border-2 border-border bg-card p-8 md:p-10",children:[u.jsx("h2",{className:"text-xl font-bold text-foreground mb-6",children:t("contacto.formTitle")}),u.jsx(yq,{...r,children:u.jsxs("form",{onSubmit:r.handleSubmit(i),className:"space-y-5",children:[u.jsx(to,{control:r.control,name:"name",render:({field:o})=>u.jsxs(xi,{children:[u.jsxs(wi,{children:[t("contacto.nombre")," *"]}),u.jsx(Si,{children:u.jsx(hn,{placeholder:t("contacto.placeholderNombre"),...o})}),u.jsx(ki,{})]})}),u.jsx(to,{control:r.control,name:"email",render:({field:o})=>u.jsxs(xi,{children:[u.jsxs(wi,{children:[t("contacto.email")," *"]}),u.jsx(Si,{children:u.jsx(hn,{type:"email",placeholder:t("contacto.placeholderEmail"),...o})}),u.jsx(ki,{})]})}),u.jsx(to,{control:r.control,name:"phone",render:({field:o})=>u.jsxs(xi,{children:[u.jsx(wi,{children:t("contacto.telefono")}),u.jsx(Si,{children:u.jsx(hn,{type:"tel",placeholder:t("contacto.placeholderTel"),...o})}),u.jsx(ki,{})]})}),u.jsx(to,{control:r.control,name:"message",render:({field:o})=>u.jsxs(xi,{children:[u.jsxs(wi,{children:[t("contacto.mensaje")," *"]}),u.jsx(Si,{children:u.jsx(U_,{placeholder:t("contacto.placeholderMsg"),className:"min-h-[120px] resize-y",...o})}),u.jsx(ki,{})]})}),u.jsx(fn,{type:"submit",className:"w-full",disabled:e,children:e?u.jsxs(u.Fragment,{children:[u.jsx(uK,{className:"w-4 h-4 mr-2 animate-spin"}),t("contacto.enviando")]}):u.jsxs(u.Fragment,{children:[u.jsx(SK,{className:"w-4 h-4 mr-2"}),t("contacto.enviar")]})})]})})]}),u.jsxs("div",{className:"lg:col-span-2 flex flex-col gap-6",children:[u.jsxs("a",{href:"tel:+34650781592",className:"group relative rounded-2xl border-2 border-border bg-card p-8 text-center transition-all duration-300 hover:shadow-lg hover:border-primary/30 hover:-translate-y-1",children:[u.jsx("div",{className:"w-14 h-14 rounded-2xl bg-accent flex items-center justify-center mx-auto mb-5 transition-all duration-500 group-hover:bg-primary group-hover:shadow-lg",children:u.jsx(J3,{className:"w-7 h-7 text-accent-foreground transition-colors duration-500 group-hover:text-primary-foreground"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-1 group-hover:text-primary transition-colors",children:t("contacto.llamanos")}),u.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:t("contacto.llamanosDesc")}),u.jsxs("span",{className:"inline-flex items-center gap-2 text-base font-semibold text-primary",children:["+34 650 781 592",u.jsx(st,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]}),u.jsx("div",{className:"absolute inset-0 rounded-2xl bg-gradient-to-br from-primary/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none"})]}),u.jsxs("a",{href:"mailto:[email protected]",className:"group relative rounded-2xl border-2 border-border bg-card p-8 text-center transition-all duration-300 hover:shadow-lg hover:border-primary/30 hover:-translate-y-1",children:[u.jsx("div",{className:"w-14 h-14 roun
756ded-2xl bg-accent flex items-center justify-center mx-auto mb-5 transition-all duration-500 group-hover:bg-primary group-hover:shadow-lg",children:u.jsx(G3,{className:"w-7 h-7 text-accent-foreground transition-colors duration-500 group-hover:text-primary-foreground"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-1 group-hover:text-primary transition-colors",children:t("contacto.escribenos")}),u.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:t("contacto.escribenosDesc")}),u.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-semibold text-primary",children:["[email protected]",u.jsx(st,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]}),u.jsx("div",{className:"absolute inset-0 rounded-2xl bg-gradient-to-br from-primary/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none"})]})]})]})})})]}),u.jsx(Qt,{})]})},Lfe={es:[{number:"01",title:"Análisis de necesidades",description:"Estudiamos en profundidad las necesidades de tu organización, tu público objetivo y los objetivos que quieres alcanzar con tu comunidad de longevidad.",icon:Bo},{number:"02",title:"Diseño de la comunidad",description:"Diseñamos contigo la mejor solución: tipo de comunidad, tecnologÃa de apoyo, modelo de dinamización y funcionamiento adaptado a tu contexto.",icon:Gw},{number:"03",title:"Puesta en marcha y contenidos",description:"Nos encargamos de dar vida a la comunidad con contenidos cuya periodicidad de publicación y tipo definimos juntos, garantizando el engagement y la participación activa.",icon:Vw}],en:[{number:"01",title:"Needs analysis",description:"We study in depth your organisation's needs, target audience, and the objectives you want to achieve with your longevity community.",icon:Bo},{number:"02",title:"Community design",description:"We design the best solution with you: community type, supporting technology, facilitation model, and operations adapted to your context.",icon:Gw},{number:"03",title:"Launch and content",description:"We bring the community to life with content whose publication frequency and type we define together, ensuring engagement and active participation.",icon:Vw}],fr:[{number:"01",title:"Analyse des besoins",description:"Nous étudions en profondeur les besoins de votre organisation, votre public cible et les objectifs que vous souhaitez atteindre avec votre communauté de longévité.",icon:Bo},{number:"02",title:"Conception de la communauté",description:"Nous concevons ensemble la meilleure solution : type de communauté, technologie de support, modèle de dynamisation et fonctionnement adapté à votre contexte.",icon:Gw},{number:"03",title:"Lancement et contenus",description:"Nous donnons vie à la communauté avec des contenus dont la périodicité et le type sont définis ensemble, garantissant l'engagement et la participation active.",icon:Vw}]},Bfe={es:[{title:"Diálogo intergeneracional",desc:"Fomenta el intercambio de conocimiento y experiencias entre generaciones dentro de la organización."},{title:"Sentido de comunidad",desc:"Fortalece el vÃnculo entre personas de todas las edades, creando una cultura organizacional más cohesionada."},{title:"Mentoring inverso",desc:"Permite poner en marcha programas donde los más jóvenes enseñan a los más experimentados y viceversa."},{title:"Retención del conocimiento",desc:"Facilita la transferencia de conocimiento crÃtico antes de que se pierda con la jubilación de profesionales clave."},{title:"Lucha contra el edadismo",desc:"Combate los estereotipos y prejuicios asociados a la edad, promoviendo una cultura de respeto e inclusión."},{title:"Fomento de la diversidad",desc:"La diversidad generacional es tan importante como cualquier otra forma de diversidad en las organizaciones."}],en:[{title:"Intergenerational dialogue",desc:"Foster the exchange of knowledge and experiences between generations within the organisation."},{title:"Sense of community",desc:"Strengthen the bond between people of all ages, creating a more cohesive organisational culture."},{title:"Reverse mentoring",desc:"Enable programmes where younger employees teach more experienced ones and vice versa."},{title:"Knowledge retention",desc:"Facilitate the transfer of critical knowledge before it is lost when key professionals retire."},{title:"Fighting ageism",desc:"Combat stereotypes and prejudices associated with age, promoting a culture of respect and inclusion."},{title:"Promoting diversity",desc:"Generational diversity is just as important as any other form of diversity in organisations."}],fr:[{title:"Dialogue intergénérationnel",desc:"Favoriser l'échange de connaissances et d'expérience
756s entre les générations au sein de l'organisation."},{title:"Sens de la communauté",desc:"Renforcer le lien entre les personnes de tous âges, créant une culture organisationnelle plus cohésive."},{title:"Mentorat inversé",desc:"Mettre en place des programmes où les plus jeunes enseignent aux plus expérimentés et vice versa."},{title:"Rétention des connaissances",desc:"Faciliter le transfert de connaissances critiques avant qu'elles ne soient perdues avec le départ à la retraite."},{title:"Lutte contre l'âgisme",desc:"Combattre les stéréotypes et préjugés liés à l'âge, en promouvant une culture de respect et d'inclusion."},{title:"Promotion de la diversité",desc:"La diversité générationnelle est aussi importante que toute autre forme de diversité dans les organisations."}]},zfe={es:{p1:"Numerosos estudios cientÃficos han demostrado que la pertenencia a una comunidad es uno de los factores clave para un envejecimiento saludable y satisfactorio. El aislamiento social se ha identificado como un factor de riesgo tan dañino como fumar 15 cigarrillos al dÃa.",p2:"Las personas que participan activamente en comunidades presentan mejor salud cognitiva, mayor bienestar emocional y una longevidad significativamente mayor.",proposito1Title:"Prepararse para diseñar tu mejor futuro",proposito1Desc:"Las comunidades de longevidad son espacios de aprendizaje continuo donde sus miembros adquieren los conocimientos y herramientas necesarios para tomar decisiones conscientes sobre su envejecimiento.",proposito2Title:"Red de apoyo mutuo",proposito2Desc:"En sociedades cada vez más envejecidas, donde el estado del bienestar no tendrá capacidad para atender todas las necesidades de los ciudadanos, las redes de apoyo mutuo entre pares serán cada vez más necesarias. Las comunidades de longevidad son ese espacio de soporte, acompañamiento y solidaridad.",maturaDesc1:"Nuestro Matura Club de Mejor Longevidad es una comunidad en WhatsApp formada por personas de 50+ que han decidido envejecer de forma consciente e inteligente.",maturaDesc2:"Con más de 1.000 miembros activos, es un espacio donde compartir experiencias, aprender juntos y construir una red de apoyo real para afrontar los retos del envejecimiento con conocimiento y compañÃa.",maturaCtaTitle:"¿Quieres formar parte de Matura Club de Mejor Longevidad?",maturaCtaDesc:"Ãnete a nuestra comunidad de WhatsApp y conecta con personas que, como tú, quieren diseñar su mejor futuro.",maturaCtaBtn:"Ãnete aquÃ",miembros:"Miembros activos",edad:"Edad de los miembros"},en:{p1:"Numerous scientific studies have shown that belonging to a community is one of the key factors for healthy and satisfying ageing. Social isolation has been identified as a risk factor as harmful as smoking 15 cigarettes a day.",p2:"People who actively participate in communities show better cognitive health, greater emotional wellbeing, and significantly greater longevity.",proposito1Title:"Preparing to design your best future",proposito1Desc:"Longevity communities are spaces for continuous learning where members acquire the knowledge and tools needed to make conscious decisions about their ageing.",proposito2Title:"Mutual support network",proposito2Desc:"In increasingly ageing societies, where the welfare state won't have the capacity to meet all citizens' needs, peer mutual support networks will be increasingly necessary. Longevity communities are that space of support, accompaniment, and solidarity.",maturaDesc1:"Our Matura Better Longevity Club is a WhatsApp community made up of 50+ people who have decided to age consciously and intelligently.",maturaDesc2:"With over 1,000 active members, it's a space to share experiences, learn together, and build a real support network to face the challenges of ageing with knowledge and company.",maturaCtaTitle:"Want to join the Matura Better Longevity Club?",maturaCtaDesc:"Join our WhatsApp community and connect with people who, like you, want to design their best future.",maturaCtaBtn:"Join here",miembros:"Active members",edad:"Member age"},fr:{p1:"De nombreuses études scientifiques ont démontré que l'appartenance à une communauté est l'un des facteur
756s clés d'un vieillissement sain et satisfaisant. L'isolement social a été identifié comme un facteur de risque aussi nocif que fumer 15 cigarettes par jour.",p2:"Les personnes qui participent activement dans des communautés présentent une meilleure santé cognitive, un plus grand bien-être émotionnel et une longévité significativement plus grande.",proposito1Title:"Se préparer à concevoir son meilleur avenir",proposito1Desc:"Les communautés de longévité sont des espaces d'apprentissage continu où les membres acquièrent les connaissances et outils nécessaires pour prendre des décisions conscientes sur leur vieillissement.",proposito2Title:"Réseau d'entraide",proposito2Desc:"Dans des sociétés de plus en plus vieillissantes, où l'Ãtat-providence n'aura pas la capacité de répondre à tous les besoins des citoyens, les réseaux d'entraide entre pairs seront de plus en plus nécessaires.",maturaDesc1:"Notre Club Matura de Meilleure Longévité est une communauté WhatsApp composée de personnes de 50+ qui ont décidé de vieillir de manière consciente et intelligente.",maturaDesc2:"Avec plus de 1 000 membres actifs, c'est un espace pour partager des expériences, apprendre ensemble et construire un véritable réseau de soutien.",maturaCtaTitle:"Vous voulez rejoindre le Club Matura de Meilleure Longévité ?",maturaCtaDesc:"Rejoignez notre communauté WhatsApp et connectez-vous avec des personnes qui, comme vous, veulent concevoir leur meilleur avenir.",maturaCtaBtn:"Rejoignez-nous ici",miembros:"Membres actifs",edad:"Ãge des membres"}},Ffe={es:[{title:"Tipo de comunidad",desc:"Definimos el formato más adecuado según tus objetivos: club presencial, virtual, mixto o temático."},{title:"TecnologÃa de apoyo",desc:"Seleccionamos e implementamos las herramientas digitales que mejor se adapten a tu comunidad."},{title:"Dinamización",desc:"Diseñamos el plan de actividades, eventos y dinámicas que mantienen viva y activa la comunidad."},{title:"Contenidos periódicos",desc:"Creamos y publicamos contenidos de valor con la periodicidad y formato que definimos juntos."}],en:[{title:"Community type",desc:"We define the most suitable format based on your objectives: in-person, virtual, hybrid, or thematic club."},{title:"Supporting technology",desc:"We select and implement the digital tools that best suit your community."},{title:"Facilitation",desc:"We design the plan of activities, events, and dynamics that keep the community alive and active."},{title:"Regular content",desc:"We create and publish valuable content with the frequency and format we define together."}],fr:[{title:"Type de communauté",desc:"Nous définissons le format le plus adapté selon vos objectifs : club présentiel, virtuel, mixte ou thématique."},{title:"Technologie de support",desc:"Nous sélectionnons et mettons en Åuvre les outils numériques les mieux adaptés à votre communauté."},{title:"Dynamisation",desc:"Nous concevons le plan d'activités, d'événements et de dynamiques qui maintiennent la communauté vivante et active."},{title:"Contenus réguliers",desc:"Nous créons et publions des contenus de valeur avec la périodicité et le format définis ensemble."}]},qfe=()=>{const{t,lang:e}=Zt(),n=Lfe[e],r=Bfe[e],i=zfe[e],o=Ffe[e];return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsx("div",{className:"pt-16 md:pt-20"}),u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("clubs.badge")}),u.jsxs("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground mb-6",children:[t("clubs.heroTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("clubs.heroTitle2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:t("clubs.heroSub")})]})})}),u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-6xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("clubs.porqueBadge")}),u.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground mb-6",children:t("clubs.porqueTitle")}),u.jsx("p",{className:"text-muted-foreground max-w-3xl mx-auto leading-relaxed",children:t("clubs.porqueSub")})]}),u.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6 mb-12",children:r.map(s=>
756u.jsxs("div",{className:"flex items-start gap-4 rounded-2xl border border-border bg-card p-6 shadow-sm",children:[u.jsx("div",{className:"mt-1 w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:u.jsx(st,{className:"w-4 h-4 text-primary"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground mb-1",children:s.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:s.desc})]})]},s.title))})]})})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-start max-w-6xl mx-auto",children:[u.jsxs("div",{children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("clubs.evidBadge")}),u.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground mb-6",children:t("clubs.evidTitle")}),u.jsx("p",{className:"text-muted-foreground mb-4 leading-relaxed",children:i.p1}),u.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:i.p2}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-start gap-4 roun
756ded-xl border border-border bg-card p-5",children:[u.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:u.jsx(Bo,{className:"w-5 h-5 text-primary"})}),u.jsxs("div",{children:[u.jsx("h4",{className:"font-semibold text-foreground mb-1",children:i.proposito1Title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:i.proposito1Desc})]})]}),u.jsxs("div",{className:"flex items-start gap-4 rounded-xl border border-border bg-card p-5",children:[u.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:u.jsx(xr,{className:"w-5 h-5 text-primary"})}),u.jsxs("div",{children:[u.jsx("h4",{className:"font-semibold text-foreground mb-1",children:i.proposito2Title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:i.proposito2Desc})]})]})]})]}),u.jsxs("div",{className:"rounded-2xl border border-border bg-card p-8 shadow-sm",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[u.jsx("div",{className:"w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center",children:u.jsx(vn,{className:"w-7 h-7 text-primary"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-xl font-bold text-foreground",children:t("clubs.maturaTitle")}),u.jsx("p",{className:"text-sm text-muted-foreground",children:e==="es"?"Desde 2024":e==="en"?"Since 2024":"Depuis 2024"})]})]}),u.jsx("p",{className:"text-muted-foreground mb-4 leading-relaxed",children:i.maturaDesc1}),u.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:i.maturaDesc2}),u.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-6",children:[u.jsxs("div",{className:"rounded-xl bg-accent/50 p-4 text-center",children:[u.jsx("p",{className:"text-2xl font-bold text-primary",children:"+1.000"}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i.miembros})]}),u.jsxs("div",{className:"rounded-xl bg-accent/50 p-4 text-center",children:[u.jsx("p",{className:"text-2xl font-bold text-primary",children:"50+"}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i.edad})]})]}),u.jsxs("div",{className:"rounded-xl bg-primary/5 border border-primary/20 p-5 text-center",children:[u.jsx("p",{className:"font-semibold text-foreground mb-2",children:i.maturaCtaTitle}),u.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:i.maturaCtaDesc}),u.jsxs("a",{href:"https://chat.whatsapp.com/YOUR_GROUP_LINK",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-6 py-3 rounded-xl bg-[#25D366] text-white font-semibold hover:bg-[#20bd5a] transition-all duration-200 shadow-md hover:shadow-lg",children:[u.jsx(qa,{className:"w-5 h-5"}),i.maturaCtaBtn]})]})]})]})})}),u.jsx("section",{className:"py-16 md:py-20 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("clubs.metBadge")}),u.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground mb-4",children:t("clubs.metTitle")}),u.jsx("p",{className:"text-muted-foreground",children:t("clubs.metSub")})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-8 max-w-5xl mx-auto",children:n.map(s=>u.jsxs("div",{className:"group relative bg-card rounded-2xl p-8 shadow-sm border border-border/50 transition-all duration-300 hover:shadow-md hover:-translate-y-1",children:[u.jsxs("div",{className:"absolute -top-4 left-8 px-3 py-1 bg-primary text-primary-foreground text-sm font-bold rounded-full",children:[t("common.fase")," ",s.number]}),u.jsx("div",{className:"w-12 h-12 rounded-xl bg-accent flex items-center justify-center mb-5 mt-2",children:u.jsx(s.icon,{className:"w-6 h-6 text-primary"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-3",children:s.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:s.description})]},s.number))})]})}),u.jsx("section",{className:"py-16 md:py-20 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsx("div",{className:"text-center mb-12",children:u.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground mb-4",children:t("clubs.inclTitle")})}),u.jsx("div",{className:"grid sm:grid-cols-2 gap-6",children:o.map(s=>
vendor: 9,886 bytes, lines 756-764
756u.jsxs("div",{className:"flex items-start gap-4 rounded-2xl border border-border bg-card p-6 shadow-sm",children:[u.jsx("div",{className:"mt-1 w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:u.jsx(st,{className:"w-4 h-4 text-primary"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground mb-1",children:s.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:s.desc})]})]},s.title))})]})})}),u.jsx(Ws,{})]}),u.jsx(Qt,{})]})};var Ufe=Array.isArray,Vr=Ufe,Vfe=typeof Km=="object"&&Km&&Km.Object===Object&&Km,wq=Vfe,Wfe=wq,Hfe=typeof self=="object"&&self&&self.Object===Object&&self,Kfe=Wfe||Hfe||Function("return this")(),Yo=Kfe,Gfe=Yo,Jfe=Gfe.Symbol,Lm=Jfe,ZM=Lm,Sq=Object.prototype,Yfe=Sq.hasOwnProperty,Xfe=Sq.toString,Wf=ZM?ZM.toStringTag:void 0;function Qfe(t){var e=Yfe.call(t,Wf),n=t[Wf];try{t[Wf]=void 0;var r=!0}catch{}var i=Xfe.call(t);return r&&(e?t[Wf]=n:delete t[Wf]),i}var Zfe=Qfe,ehe=Object.prototype,the=ehe.toString;function nhe(t){return the.call(t)}var rhe=nhe,eR=Lm,ihe=Zfe,ohe=rhe,she="[object Null]",ahe="[object Undefined]",tR=eR?eR.toStringTag:void 0;function lhe(t){return t==null?t===void 0?ahe:she:tR&&tR in Object(t)?ihe(t):ohe(t)}var Gs=lhe;function che(t){return t!=null&&typeof t=="object"}var Js=che,uhe=Gs,dhe=Js,fhe="[object Symbol]";function hhe(t){return typeof t=="symbol"||dhe(t)&&uhe(t)==fhe}var uf=hhe,phe=Vr,mhe=uf,ghe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vhe=/^\w*$/;function yhe(t,e){if(phe(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||mhe(t)?!0:vhe.test(t)||!ghe.test(t)||e!=null&&t in Object(e)}var BA=yhe;function bhe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ml=bhe;const df=ht(ml);var xhe=Gs,whe=ml,She="[object AsyncFunction]",khe="[object Function]",Ehe="[object GeneratorFunction]",jhe="[object Proxy]";function The(t){if(!whe(t))return!1;var e=xhe(t);return e==khe||e==Ehe||e==She||e==jhe}var zA=The;const ze=ht(zA);var _he=Yo,Ahe=_he["__core-js_shared__"],Nhe=Ahe,rS=Nhe,nR=function(){var t=/[^.]+$/.exec(rS&&rS.keys&&rS.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Che(t){return!!nR&&nR in t}var Ohe=Che,Phe=Function.prototype,Mhe=Phe.toString;function Rhe(t){if(t!=null){try{return Mhe.call(t)}catch{}try{return t+""}catch{}}return""}var kq=Rhe,Ihe=zA,Dhe=Ohe,$he=ml,Lhe=kq,Bhe=/[\\^$.*+?()[\]{}|]/g,zhe=/^\[object .+?Constructor\]$/,Fhe=Function.prototype,qhe=Object.prototype,Uhe=Fhe.toString,Vhe=qhe.hasOwnProperty,Whe=RegExp("^"+Uhe.call(Vhe).replace(Bhe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Hhe(t){if(!$he(t)||Dhe(t))return!1;var e=Ihe(t)?Whe:zhe;return e.test(Lhe(t))}var Khe=Hhe;function Ghe(t,e){return t==null?void 0:t[e]}var Jhe=Ghe,Yhe=Khe,Xhe=Jhe;function Qhe(t,e){var n=Xhe(t,e);return Yhe(n)?n:void 0}var qc=Qhe,Zhe=qc,epe=Zhe(Object,"create"),u0=epe,rR=u0;function tpe(){this.__data__=rR?rR(null):{},this.size=0}var npe=tpe;function rpe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ipe=rpe,ope=u0,spe="__lodash_hash_undefined__",ape=Object.prototype,lpe=ape.hasOwnProperty;function cpe(t){var e=this.__data__;if(ope){var n=e[t];return n===spe?void 0:n}return lpe.call(e,t)?e[t]:void 0}var upe=cpe,dpe=u0,fpe=Object.prototype,hpe=fpe.hasOwnProperty;function ppe(t){var e=this.__data__;return dpe?e[t]!==void 0:hpe.call(e,t)}var mpe=ppe,gpe=u0,vpe="__lodash_hash_undefined__";function ype(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=gpe&&e===void 0?vpe:e,this}var bpe=ype,xpe=npe,wpe=ipe,Spe=upe,kpe=mpe,Epe=bpe;function ff(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ff.prototype.clear=xpe;ff.prototype.delete=wpe;ff.prototype.get=Spe;ff.prototype.has=kpe;ff.prototype.set=Epe;var jpe=ff;function Tpe(){this.__data__=[],this.size=0}var _pe=Tpe;function Ape(t,e){return t===e||t!==t&&e!==e}var FA=Ape,Npe=FA;function Cpe(t,e){for(var n=t.length;n--;)if(Npe(t[n][0],e))return n;return-1}var d0=Cpe,Ope=d0,Ppe=Array.prototype,Mpe=Ppe.splice;function Rpe(t){var e=this.__data__,n=Ope(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Mpe.call(e,n,1),--this.size,!0}var Ipe=Rpe,Dpe=d0;function $pe(t){var e=this.__data__,n=Dpe(e,t);return n<0?void 0:e[n][1]}var Lpe=$pe,Bpe=d0;function zpe(t){return Bpe(this.__data__,t)>-1}var Fpe=zpe,qpe=d0;function Upe(t,e){var n=this.__data__,r=qpe(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var Vpe=Upe,Wpe=_pe,Hpe=Ipe,Kpe=Lpe,Gpe=Fpe,Jpe=Vpe;function hf(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}hf.prototype.clear=Wpe;hf.prototype.delete=Hpe;hf.prototype.get=Kpe;hf.prototype.has=Gpe;hf.prototype.set=Jpe;var f0=hf,Ype=qc,Xpe=Yo,Qpe=Ype(Xpe,"Map"),qA=Qpe,iR=jpe,Zpe=f0,eme=qA;function tme(){this.size=0,this.__data__={hash:new iR,map:new(eme||Zpe),string:new iR}}var nme=tme;function rme(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ime=rme,ome=ime;function sme(t,e){var n=t.__data__;return ome(e)?n[typeof e=="string"?"string":"hash"]:n.map}var h0=sme,ame=h0;function lme(t){var e=ame(this,t).delete(t);return this.size-=e?1:0,e}var cme=lme,ume=h0;function dme(t){return ume(this,t).get(t)}var fme=dme,hme=h0;function pme(t){return hme(this,t).has(t)}var mme=pme,gme=h0;function vme(t,e){var n=gme(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var yme=vme,bme=nme,xme=cme,wme=fme,Sme=mme,kme=yme;function pf(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}pf.prototype.clear=bme;pf.prototype.delete=xme;pf.prototype.get=wme;pf.prototype.has=Sme;pf.prototype.set=kme;var UA=pf,Eq=UA,Eme="Expected a function";function VA(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Eme);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(VA.Cache||Eq),n}VA.Cache=Eq;var jq=VA;const jme=ht(jq);var Tme=jq,_me=500;function Ame(t){var e=Tme(t,function(r){return n.size===_me&&n.clear(),r}),n=e.cache;return e}var Nme=Ame,Cme=Nme,Ome=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pme=/\\(\\)?/g,Mme=Cme(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Ome,function(n,r,i,o){e.push(i?o.replace(Pme,"$1"):r||n)}),e}),Rme=Mme;function Ime(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var WA=Ime,oR=Lm,Dme=WA,$me=Vr,Lme=uf,Bme=1/0,sR=oR?oR.prototype:void 0,aR=sR?sR.toString:void 0;function Tq(t){if(typeof t=="string")return t;if($me(t))return Dme(t,Tq)+"";if(Lme(t))return aR?aR.call(t):"";var e=t+"";return e=="0"&&1/t==-Bme?"-0":e}var zme=Tq,Fme=zme;function qme(t){return t==null?"":Fme(t)}var _q=qme,Ume=Vr,Vme=BA,Wme=Rme,Hme=_q;function Kme(t,e){return Ume(t)?t:Vme(t,e)?[t]:Wme(Hme(t))}var Aq=Kme,Gme=uf,Jme=1/0;function Yme(t){if(typeof t=="string"||Gme(t))return t;var e=t+"";return e=="0"&&1/t==-Jme?"-0":e}var p0=Yme,Xme=Aq,Qme=p0;function Zme(t,e){e=Xme(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Qme(e[n++])];return n&&n==r?t:void 0}var HA=Zme,ege=HA;function tge(t,e,n){var r=t==null?void 0:ege(t,e);return r===void 0?n:r}var Nq=tge;const ii=ht(Nq);function nge(t){return t==null}var rge=nge;const Ye=ht(rge);var ige=Gs,oge=Vr,sge=Js,age="[object String]";function lge(t){return typeof t=="string"||!oge(t)&&sge(t)&&ige(t)==age}var cge=lge;const Oc=ht(cge);var Cq={exports:{}},pt={};/** 757 * @license React 758 * react-is.production.min.js 759 * 760 * Copyright (c) Facebook, Inc. and its affiliates. 761 * 762 * This source code is licensed under the MIT license found in the 763 * LICENSE file in the root directory of this source tree. 764 */var KA=Symbol.for("react.element"),GA=Symbol.for("react.portal"),m0=Symbol.for("react.fragment"),g0=Symbol.for("react.strict_mode"),v0=Symbol.for("react.profiler"),y0=Symbol.for("react.provider"),b0=Symbol.for("react.context"),uge=Symbol.for("react.server_context"),x0=Symbol.for("react.forward_ref"),w0=Symbol.for("react.suspense"),S0=Symbol.for("react.suspense_list"),k0=Symbol.for("react.memo"),E0=Symbol.for("react.lazy"),dge=Symbol.for("react.offscreen"),Oq;Oq=Symbol.for("react.module.reference");function zi(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case KA:switch(t=t.type,t){case m0:case v0:case g0:case w0:case S0:return t;default:switch(t=t&&t.$$typeof,t){case uge:case b0:case x0:case E0:case k0:case y0:return t;default:return e}}case GA:return e}}}pt.ContextConsumer=b0;pt.ContextProvider=y0;pt.Element=KA;pt.ForwardRef=x0;pt.Fragment=m0;pt.Lazy=E0;pt.Memo=k0;pt.Portal=GA;pt.Profiler=v0;pt.StrictMode=g0;pt.Suspense=w0;pt.SuspenseList=S0;pt.isAsyncMode=function(){return!1};pt.isConcurrentMode=function(){return!1};pt.isContextConsumer=function(t){return zi(t)===b0};pt.isContextProvider=function(t){return zi(t)===y0};pt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===KA};pt.isForwardRef=function(t){return zi(t)===x0};pt.isFragment=function(t){return zi(t)===m0};pt.isLazy=function(t){return zi(t)===E0};pt.isMemo=function(t){return zi(t)===k0};pt.isPortal=function(t){return zi(t)===GA};pt.isProfiler=function(t){return zi(t)===v0};pt.isStrictMode=function(t){return zi(t)===g0};pt.isSuspense=function(t){return zi(t)===w0};pt.isSuspenseList=function(t){return zi(t)===S0};pt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===m0||t===v0||t===g0||t===w0||t===S0||t===dge||typeof t=="object"&&t!==null&&(t.$$typeof===E0||t.$$typeof===k0||t.$$typeof===y0||t.$$typeof===b0||t.$$typeof===x0||t.$$typeof===Oq||t.getModuleId!==void 0)};pt.typeOf=zi;Cq.exports=pt;
vendor: 6,037 bytes, line 764
764var fge=Cq.exports,hge=Gs,pge=Js,mge="[object Number]";function gge(t){return typeof t=="number"||pge(t)&&hge(t)==mge}var Pq=gge;const vge=ht(Pq);var yge=Pq;function bge(t){return yge(t)&&t!=+t}var xge=bge;const Bm=ht(xge);var gr=function(e){return e===0?0:e>0?1:-1},Yl=function(e){return Oc(e)&&e.indexOf("%")===e.length-1},ae=function(e){return vge(e)&&!Bm(e)},wge=function(e){return Ye(e)},Tn=function(e){return ae(e)||Oc(e)},Sge=0,zm=function(e){var n=++Sge;return"".concat(e||"").concat(n)},vr=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ae(e)&&!Oc(e))return r;var o;if(Yl(e)){var s=e.indexOf("%");o=n*parseFloat(e.slice(0,s))/100}else o=+e;return Bm(o)&&(o=r),i&&o>n&&(o=n),o},mu=function(e){if(!e)return null;var n=Object.keys(e);return n&&n.length?e[n[0]]:null},kge=function(e){if(!Array.isArray(e))return!1;for(var n=e.length,r={},i=0;i<n;i++)if(!r[e[i]])r[e[i]]=!0;else return!0;return!1},ha=function(e,n){return ae(e)&&ae(n)?function(r){return e+r*(n-e)}:function(){return n}};function VE(t,e,n){return!t||!t.length?null:t.find(function(r){return r&&(typeof e=="function"?e(r):ii(r,e))===n})}var Ege=function(e,n){return ae(e)&&ae(n)?e-n:Oc(e)&&Oc(n)?e.localeCompare(n):e instanceof Date&&n instanceof Date?e.getTime()-n.getTime():String(e).localeCompare(String(n))};function Ju(t,e){for(var n in t)if({}.hasOwnProperty.call(t,n)&&(!{}.hasOwnProperty.call(e,n)||t[n]!==e[n]))return!1;for(var r in e)if({}.hasOwnProperty.call(e,r)&&!{}.hasOwnProperty.call(t,r))return!1;return!0}function WE(t){"@babel/helpers - typeof";return WE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},WE(t)}var jge=["viewBox","children"],Tge=["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"],lR=["points","pathLength"],iS={svg:jge,polygon:lR,polyline:lR},JA=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
764ocus","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"],db=function(e,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(E.isValidElement(e)&&(r=e.props),!df(r))return null;var i={};return Object.keys(r).forEach(function(o){JA.includes(o)&&(i[o]=n||function(s){return r[o](r,s)})}),i},_ge=function(e,n,r){return function(i){return e(n,r,i),null}},Pc=function(e,n,r){if(!df(e)||WE(e)!=="object")return null;var i=null;return Object.keys(e).forEach(function(o){var s=e[o];JA.includes(o)&&typeof s=="function"&&(i||(i={}),i[o]=_ge(s,n,r))}),i},Age=["children"],Nge=["children"];function cR(t,e){if(t==null)return{};var n=Cge(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Cge(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var uR={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"},Ts=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},dR=null,oS=null,YA=function t(e){if(e===dR&&Array.isArray(oS))return oS;var n=[];return E.Children.forEach(e,function(r){Ye(r)||(fge.isFragment(r)?n=n.concat(t(r.props.children)):n.push(r))}),oS=n,dR=e,n};function Ri(t,e){var n=[],r=[];return Array.isArray(e)?r=e.map(function(i){return Ts(i)}):r=[Ts(e)],YA(t).forEach(function(i){var o=ii(i,"type.displayName")||ii(i,"type.n
764ame");r.indexOf(o)!==-1&&n.push(i)}),n}function Jr(t,e){var n=Ri(t,e);return n&&n[0]}var fR=function(e){if(!e||!e.props)return!1;var n=e.props,r=n.width,i=n.height;return!(!ae(r)||r<=0||!ae(i)||i<=0)},Oge=["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"],Pge=function(e){return e&&e.type&&Oc(e.type)&&Oge.indexOf(e.type)>=0},Mge=function(e,n,r,i){var o,s=(o=iS==null?void 0:iS[i])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!ze(e)&&(i&&s.includes(n)||Tge.includes(n))||r&&JA.includes(n)},Me=function(e,n,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(E.isValidElement(e)&&(i=e.props),!df(i))return null;var o={};
764return Object.keys(i).forEach(function(s){var a;Mge((a=i)===null||a===void 0?void 0:a[s],s,n,r)&&(o[s]=i[s])}),o},HE=function t(e,n){if(e===n)return!0;var r=E.Children.count(e);if(r!==E.Children.count(n))return!1;if(r===0)return!0;if(r===1)return hR(Array.isArray(e)?e[0]:e,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var o=e[i],s=n[i];if(Array.isArray(o)||Array.isArray(s)){if(!t(o,s))return!1}else if(!hR(o,s))return!1}return!0},hR=function(e,n){if(Ye(e)&&Ye(n))return!0;if(!Ye(e)&&!Ye(n)){var r=e.props||{},i=r.children,o=cR(r,Age),s=n.props||{},a=s.children,l=cR(s,Nge);return i&&a?Ju(o,l)&&HE(i,a):!i&&!a?Ju(o,l):!1}return!1},pR=function(e,n){var r=[],i={};return YA(e).forEach(function(o,s){if(Pge(o))r.push(o);else if(o){var a=Ts(o.type),l=n[a]||{},c=l.handler,d=l.once;if(c&&(!d||!i[a])){var f=c(o,a,s);r.push(f),i[a]=!0}}}),r},Rge=function(e){var n=e&&e.type;return n&&uR[n]?uR[n]:null},Ige=function(e,n){return YA(n).indexOf(e)},Dge=["children","width","height","viewBox","className","style","title","desc"];function KE(){return KE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},KE.apply(this,arguments)}function $ge(t,e){if(t==null)return{};var n=Lge(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Lge(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function GE(t){var e=t.children,n=t.width,r=t.height,i=t.viewBox,o=t.className,s=t.style,a=t.title,l=t.desc,c=$ge(t,Dge),d=i||{width:n,height:r,x:0,y:0},f=qe("recharts-surface",o);return A.createElement("svg",KE({},Me(c,!0,"svg"),{className:f,width:n,height:r,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),A.createElement("title",null,a),A.createElement("desc",null,l),e)}var Bge=["children","className"];function JE(){return JE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},JE.apply(this,arguments)}function zge(t,e){if(t==null)return{};var n=Fge(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Fge(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var dt=A.forwardRef(function(t,e){var n=t.children,r=t.className,i=zge(t,Bge),o=qe("recharts-layer",r);return A.createElement("g",JE({className:o},Me(i,!0),{ref:e}),n)}),_s=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o]};function qge(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}var Uge=qge,Vge=Uge;function Wge(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:Vge(t,e,n)}var Hge=Wge,Kge="\\ud800-\\udfff",Gge="\\u0300-\\u036f",Jge="\\ufe20-\\ufe2f",Yge="\\u20d0-\\u20ff",Xge=Gge+Jge+Yge,Qge="\\ufe0e\\ufe0f",Zge="\\u200d",eve=RegExp("["+Zge+Kge+Xge+Qge+"]");function tve(t){return eve.test(t)}var Mq=tve;function nve(t){return t.split("")}var rve=nve,Rq="\\ud800-\\udfff",ive="\\u0300-\\u036f",ove="\\ufe20-\\ufe2f",sve="\\u20d0-\\u20ff",ave=ive+ove+sve,lve="\\ufe0e\\ufe0f",cve="["+Rq+"]",YE="["+ave+"]",XE="\\ud83c[\\udffb-\\udfff]",uve="(?:"+YE+"|"+XE+")",Iq="[^"+Rq+"]",Dq="(?:\\ud83c[\\udde6-\\uddff]){2}",$q="[\\ud800-\\udbff][\\udc00-\\udfff]",dve="\\u200d",Lq=uve+"?",Bq="["+lve+"]?",fve="(?:"+dve+"(?:"+[Iq,Dq,$q].join("|")+")"+Bq+Lq+")*",hve=Bq+Lq+fve,pve="(?:"+[Iq+YE+"?",YE,Dq,$q,cve].join("|")+")",mve=RegExp(XE+"(?="+XE+")|"+pve+hve,"g");function gve(t){return t.match(mve)||[]}var vve=gve,yve=rve,bve=Mq,xve=vve;function wve(t){return bve(t)?xve(t):yve(t)}var Sve=wve,kve=Hge,Eve=Mq,jve=Sve,Tve=_q;function _ve(t){return function(e){e=Tve(e);var n=Eve(e)?jve(e):void 0,r=n?n[0]:e.charAt(0),i=n?kve(n,1).join(""):e.slice(1);return r[t]()+i}}var Ave=_ve,Nve=Ave,Cve=Nve("toUpperCase"),Ove=Cve;const j0=ht(Ove);function jt(t){return function(){return t}}const zq=Math.cos,fb=Math.sin,vo=Math.sqrt,hb=Math.PI,T0=2*hb,QE=Math.PI,ZE=2*QE,Rl=1e-6,Pve=ZE-Rl;function Fq(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Mve(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Fq;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class Rve{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Fq:Mve(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,s){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=r-e,c=i-n,d=s-e,f=a-n,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>Rl)if(!(Math.abs(f*l-c*d)>Rl)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-s,g=i-a,m=l*l+c*c,v=p*p+g*g,y=Math.sqrt(m),b=Math.sqrt(h),x=o*Math.tan((QE-Math.acos((m+h-v)/(2*y*b)))/2),S=x/b,w=x/y;Math.abs(S-1)>Rl&&this._append`L${e+S*d},${n+S*f}`,this._append`A${o},${o},0,0,${+(f*p>d*g)},${this._x1=e+w*l},${this._y1=n+w*c}`}}
764arc(e,n,r,i,o,s){if(e=+e,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),l=r*Math.sin(i),c=e+a,d=n+l,f=1^s,h=s?i-o:o-i;this._x1===null?this._append`M${c},${d}`:(Math.abs(this._x1-c)>Rl||Math.abs(this._y1-d)>Rl)&&this._append`L${c},${d}`,r&&(h<0&&(h=h%ZE+ZE),h>Pve?this._append`A${r},${r},0,1,${f},${e-a},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=d}`:h>Rl&&this._append`A${r},${r},0,${+(h>=QE)},${f},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function XA(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Rve(e)}function QA(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function qq(t){this._context=t}qq.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function _0(t){return new qq(t)}function Uq(t){return t[0]}function Vq(t){return t[1]}function Wq(t,e){var n=jt(!0),r=null,i=_0,o=null,s=XA(a);t=typeof t=="function"?t:t===void 0?Uq:jt(t),e=typeof e=="function"?e:e===void 0?Vq:jt(e);function a(l){var c,d=(l=QA(l)).length,f,h=!1,p;for(r==null&&(o=i(p=s())),c=0;c<=d;++c)!(c<d&&n(f=l[c],c,l))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(f,c,l),+e(f,c,l));if(p)return o=null,p+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:jt(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:jt(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:jt(!!l),a):n},a.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),a):i},a.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),a):r},a}function Ug(t,e,n){var r=null,i=jt(!0),o=null,s=_0,a=null,l=XA(c);t=typeof t=="function"?t:t===void 0?Uq:jt(+t),e=typeof e=="function"?e:jt(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?Vq:jt(+n);function c(f){var h,p,g,m=(f=QA(f)).length,v,y=!1,b,x=new Array(m),S=new Array(m);for(o==null&&(a=s(b=l())),h=0;h<=m;++h){if(!(h<m&&i(v=f[h],h,f))===y)if(y=!y)p=h,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),g=h-1;g>=p;--g)a.point(x[g],S[g]);a.lineEnd(),a.areaEnd()}y&&(x[h]=+t(v,h,f),S[h]=+e(v,h,f),a.point(r?+r(v,h,f):x[h],n?+n(v,h,f):S[h]))}if(b)return a=null,b+""||null}function d(){return Wq().defined(i).curve(s).context(o)}return c.x=function(f){return arguments.length?(t=typeof f=="function"?f:jt(+f),r=null,c):t},c.x0=function(f){return arguments.length?(t=typeof f=="function"?f:jt(+f),c):t},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:jt(+f),c):r},c.y=function(f){return arguments.length?(e=typeof f=="function"?f:jt(+f),n=null,c):e},c.y0=function(f){return arguments.length?(e=typeof f=="function"?f:jt(+f),c):e},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:jt(+f),c):n},c.lineX0=c.lineY0=function(){return d().x(t).y(e)},c.lineY1=function(){return d().x(t).y(n)},c.lineX1=function(){return d().x(r).y(e)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:jt(!!f),c):i},c.curve=function(f){return arguments.length?(s=f,o!=null&&(a=s(o)),c):s},c.context=function(f){return arguments.length?(f==null?o=a=null:a=s(o=f),c):o},c}class Hq{constructor(e,n){this._context=e,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(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}function Ive(t){return new Hq(t,!0)}function Dve(t){return new Hq(t,!1)}const ZA={draw(t,e){const n=vo(e/hb);t.moveTo(n,0),t.arc(0,0,n,0,T0)}},$ve={draw(t,e){const n=vo(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Kq=vo(1/3),Lve=Kq*2,Bve={draw(t,e){const n=vo(e/Lve),r=n*Kq;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},zve={draw(t,e){const n=vo(e),r=-n/2;t.rect(r,r,n,n)}},Fve=.8908130915292852,Gq=fb(hb/10)/fb(7*hb/10),qve=fb(T0/10)*Gq,Uve=-zq(T0/10)*Gq,Vve={draw(t,e){const n=vo(e*Fve),r=qve*n,i=Uve*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const s=T0*o/5,a=zq(s),l=fb(s);t.lineTo(l*n,-a*n),t.lineTo(a*r-l*i,l*r+a*i)}t.closePath()}},sS=vo(3),Wve={draw(t,e){const n=-vo(e/(sS*3));t.moveTo(0,n*2),t.lineTo(-sS*n,-n),t.lineTo(sS*n,-n),t.closePath()}},hi=-.5,pi=vo(3)/2,ej=1/vo(12),Hve=(ej/2+1)*3,Kve={draw(t,e){const n=vo(e/Hve),r=n/2,i=n*ej,o=r,s=n*ej+n,a=-o,l=s;t.moveTo(r,i),t.lineTo(o,s),t.lineTo(a,l),t.lineTo(hi*r-pi*i,pi*r
vendor: 4,895 bytes, line 764
764+hi*i),t.lineTo(hi*o-pi*s,pi*o+hi*s),t.lineTo(hi*a-pi*l,pi*a+hi*l),t.lineTo(hi*r+pi*i,hi*i-pi*r),t.lineTo(hi*o+pi*s,hi*s-pi*o),t.lineTo(hi*a+pi*l,hi*l-pi*a),t.closePath()}};function Gve(t,e){let n=null,r=XA(i);t=typeof t=="function"?t:jt(t||ZA),e=typeof e=="function"?e:jt(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:jt(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:jt(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function pb(){}function mb(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Jq(t){this._context=t}Jq.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:mb(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:mb(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Jve(t){return new Jq(t)}function Yq(t){this._context=t}Yq.prototype={areaStart:pb,areaEnd:pb,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:mb(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Yve(t){return new Yq(t)}function Xq(t){this._context=t}Xq.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(t,e){switch(t=+t,e=+e,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+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mb(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Xve(t){return new Xq(t)}function Qq(t){this._context=t}Qq.prototype={areaStart:pb,areaEnd:pb,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Qve(t){return new Qq(t)}function mR(t){return t<0?-1:1}function gR(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(mR(o)+mR(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function vR(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function aS(t,e,n){var r=t._x0,i=t._y0,o=t._x1,s=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*e,o-a,s-a*n,o,s)}function gb(t){this._context=t}gb.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:aS(this,this._t0,vR(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,aS(this,vR(this,n=gR(this,t,e)),n);break;default:aS(this,this._t0,n=gR(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Zq(t){this._context=new e8(t)}
764(Zq.prototype=Object.create(gb.prototype)).point=function(t,e){gb.prototype.point.call(this,e,t)};function e8(t){this._context=t}e8.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function Zve(t){return new gb(t)}function eye(t){return new Zq(t)}function t8(t){this._context=t}t8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=yR(t),i=yR(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function yR(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),s=new Array(n);for(i[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,s[e]-=r*s[e-1];for(i[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(s[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function tye(t){return new t8(t)}function A0(t,e){this._context=t,this._t=e}A0.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function nye(t){return new A0(t,.5)}function rye(t){return new A0(t,0)}function iye(t){return new A0(t,1)}function _d(t,e){if((s=t.length)>1)for(var n=1,r,i,o=t[e[0]],s,a=o.length;n<s;++n)for(i=o,o=t[e[n]],r=0;r<a;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function tj(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function oye(t,e){return t[e]}function sye(t){const e=[];return e.key=t,e}function aye(){var t=jt([]),e=tj,n=_d,r=oye;function i(o){var s=Array.from(t.apply(this,arguments),sye),a,l=s.length,c=-1,d;for(const f of o)for(a=0,++c;a<l;++a)(s[a][c]=[0,+r(f,s[a].key,c,o)]).data=f;for(a=0,d=QA(e(s));a<l;++a)s[d[a]].index=a;return n(s,d),s}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:jt(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:jt(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?tj:typeof o=="function"?o:jt(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??_d,i):n},i}function lye(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,s;i<o;++i){for(s=n=0;n<r;++n)s+=t[n][i][1]||0;if(s)for(n=0;n<r;++n)t[n][i][1]/=s}_d(t,e)}}function cye(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var s=0,a=0;s<i;++s)a+=t[s][n][1]||0;r[n][1]+=r[n][0]=-a/2}_d(t,e)}}function uye(t,e){if(!(!((s=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,s;r<o;++r){for(var a=0,l=0,c=0;a<s;++a){for(var d=t[e[a]],f=d[r][1]||0,h=d[r-1][1]||0,p=(f-h)/2,g=0;g<a;++g){var m=t[e[g]],v=m[r][1]||0,y=m[r-1][1]||0;p+=v-y}l+=f,c+=p*f}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,_d(t,e)}}function zp(t){"@babel/helpers - typeof";return zp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zp(t)}var dye=["type","size","sizeType"];function nj(){return nj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},nj.apply(this,arguments)}function bR(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xR(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
vendor: 7,704 bytes, lines 764-767
764e%2?bR(Object(n),!0).forEach(function(r){fye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bR(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function fye(t,e,n){return e=hye(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hye(t){var e=pye(t,"string");return zp(e)=="symbol"?e:e+""}function pye(t,e){if(zp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(zp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mye(t,e){if(t==null)return{};var n=gye(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function gye(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var n8={symbolCircle:ZA,symbolCross:$ve,symbolDiamond:Bve,symbolSquare:zve,symbolStar:Vve,symbolTriangle:Wve,symbolWye:Kve},vye=Math.PI/180,yye=function(e){var n="symbol".concat(j0(e));return n8[n]||ZA},bye=function(e,n,r){if(n==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*vye;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},xye=function(e,n){n8["symbol".concat(j0(e))]=n},eN=function(e){var n=e.type,r=n===void 0?"circle":n,i=e.size,o=i===void 0?64:i,s=e.sizeType,a=s===void 0?"area":s,l=mye(e,dye),c=xR(xR({},l),{},{type:r,size:o,sizeType:a}),d=function(){var v=yye(r),y=Gve().type(v).size(bye(o,a,r));return y()},f=c.className,h=c.cx,p=c.cy,g=Me(c,!0);return h===+h&&p===+p&&o===+o?A.createElement("path",nj({},g,{className:qe("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};eN.registerSymbol=xye;function Ad(t){"@babel/helpers - typeof";return Ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ad(t)}function rj(){return rj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},rj.apply(this,arguments)}function wR(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function wye(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wR(Object(n),!0).forEach(function(r){Fp(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wR(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Sye(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kye(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i8(r.key),r)}}function Eye(t,e,n){return e&&kye(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function jye(t,e,n){return e=vb(e),Tye(t,r8()?Reflect.construct(e,n||[],vb(t).constructor):e.apply(t,n))}function Tye(t,e){if(e&&(Ad(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _ye(t)}function _ye(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r8(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r8=function(){return!!t})()}function vb(t){return vb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vb(t)}function Aye(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ij(t,e)}function ij(t,e){return ij=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ij(t,e)}function Fp(t,e,n){return e=i8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i8(t){var e=Nye(t,"string");return Ad(e)=="symbol"?e:e+""}function Nye(t,e){if(Ad(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ad(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var mi=32,tN=function(t){function e(){return Sye(this,e),jye(this,e,arguments)}return Aye(e,t),Eye(e,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,o=mi/2,s=mi/6,a=mi/3,l=r.inactive?i:r.color;if(r.type==="plainline")return A.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:mi,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return A.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(o,"h").concat(a,` 765 A`).concat(s,",").concat(s,",0,1,1,").concat(2*a,",").concat(o,` 766 H`).concat(mi,"M").concat(2*a,",").concat(o,` 767 A`).concat(s,",").concat(s,",0,1,1,").concat(a,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return A.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(mi/8,"h").concat(mi,"v").concat(mi*3/4,"h").concat(-mi,"z"),className:"recharts-legend-icon"});if(A.isValidElement(r.legendIcon)){var c=wye({},r);return delete c.legendIcon,A.cloneElement(r.legendIcon,c)}return A.createElement(eN,{fill:l,cx:o,cy:o,size:mi,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,s=i.iconSize,a=i.layout,l=i.formatter,c=i.inactiveColor,d={x:0,y:0,width:mi,height:mi},f={display:a==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(p,g){var m=p.formatter||l,v=qe(Fp(Fp({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var y=ze(p.value)?null:p.value;_s(!ze(p.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=p.inactive?c:p.color;return A.createElement("li",rj({className:v,style:f,key:"legend-item-".concat(g)},Pc(r.props,p,g)),A.createElement(GE,{width:s,height:s,viewBox:d,style:h},r.renderIcon(p)),A.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(y,p,g):y))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,s=r.align;if(!i||!i.length)return null;var a={padding:0,margin:0,textAlign:o==="horizontal"?s:"left"};return A.createElement("ul",{className:"recharts-default-legend",style:a},this.renderItems())}}])}(E.PureComponent);Fp(tN,"displayName","Legend");Fp(tN,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});
vendor: 4,780 bytes, line 767
767var Cye=f0;function Oye(){this.__data__=new Cye,this.size=0}var Pye=Oye;function Mye(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var Rye=Mye;function Iye(t){return this.__data__.get(t)}var Dye=Iye;function $ye(t){return this.__data__.has(t)}var Lye=$ye,Bye=f0,zye=qA,Fye=UA,qye=200;function Uye(t,e){var n=this.__data__;if(n instanceof Bye){var r=n.__data__;if(!zye||r.length<qye-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fye(r)}return n.set(t,e),this.size=n.size,this}var Vye=Uye,Wye=f0,Hye=Pye,Kye=Rye,Gye=Dye,Jye=Lye,Yye=Vye;function mf(t){var e=this.__data__=new Wye(t);this.size=e.size}mf.prototype.clear=Hye;mf.prototype.delete=Kye;mf.prototype.get=Gye;mf.prototype.has=Jye;mf.prototype.set=Yye;var o8=mf,Xye="__lodash_hash_undefined__";function Qye(t){return this.__data__.set(t,Xye),this}var Zye=Qye;function ebe(t){return this.__data__.has(t)}var tbe=ebe,nbe=UA,rbe=Zye,ibe=tbe;function yb(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new nbe;++e<n;)this.add(t[e])}yb.prototype.add=yb.prototype.push=rbe;yb.prototype.has=ibe;var s8=yb;function obe(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var a8=obe;function sbe(t,e){return t.has(e)}var l8=sbe,abe=s8,lbe=a8,cbe=l8,ube=1,dbe=2;function fbe(t,e,n,r,i,o){var s=n&ube,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(t),d=o.get(e);if(c&&d)return c==e&&d==t;var f=-1,h=!0,p=n&dbe?new abe:void 0;for(o.set(t,e),o.set(e,t);++f<a;){var g=t[f],m=e[f];if(r)var v=s?r(m,g,f,e,t,o):r(g,m,f,t,e,o);if(v!==void 0){if(v)continue;h=!1;break}if(p){if(!lbe(e,function(y,b){if(!cbe(p,b)&&(g===y||i(g,y,n,r,o)))return p.push(b)})){h=!1;break}}else if(!(g===m||i(g,m,n,r,o))){h=!1;break}}return o.delete(t),o.delete(e),h}var c8=fbe,hbe=Yo,pbe=hbe.Uint8Array,mbe=pbe;function gbe(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var vbe=gbe;function ybe(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var nN=ybe,SR=Lm,kR=mbe,bbe=FA,xbe=c8,wbe=vbe,Sbe=nN,kbe=1,Ebe=2,jbe="[object Boolean]",Tbe="[object Date]",_be="[object Error]",Abe="[object Map]",Nbe="[object Number]",Cbe="[object RegExp]",Obe="[object Set]",Pbe="[object String]",Mbe="[object Symbol]",Rbe="[object ArrayBuffer]",Ibe="[object DataView]",ER=SR?SR.prototype:void 0,lS=ER?ER.valueOf:void 0;function Dbe(t,e,n,r,i,o,s){switch(n){case Ibe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Rbe:return!(t.byteLength!=e.byteLength||!o(new kR(t),new kR(e)));case jbe:case Tbe:case Nbe:return bbe(+t,+e);case _be:return t.name==e.name&&t.message==e.message;case Cbe:case Pbe:return t==e+"";case Abe:var a=wbe;case Obe:var l=r&kbe;if(a||(a=Sbe),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;r|=Ebe,s.set(t,e);var d=xbe(a(t),a(e),r,i,o,s);return s.delete(t),d;case Mbe:if(lS)return lS.call(t)==lS.call(e)}return!1}var $be=Dbe;function Lbe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var u8=Lbe,Bbe=u8,zbe=Vr;function Fbe(t,e,n){var r=e(t);return zbe(t)?r:Bbe(r,n(t))}var qbe=Fbe;function Ube(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}var Vbe=Ube;function Wbe(){return[]}var Hbe=Wbe,Kbe=Vbe,Gbe=Hbe,Jbe=Object.prototype,Ybe=Jbe.propertyIsEnumerable,jR=Object.getOwnPropertySymbols,Xbe=jR?function(t){return t==null?[]:(t=Object(t),Kbe(jR(t),function(e){return Ybe.call(t,e)}))}:Gbe,Qbe=Xbe;function Zbe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var exe=Zbe,txe=Gs,nxe=Js,rxe="[object Arguments]";function ixe(t){return nxe(t)&&txe(t)==rxe}var oxe=ixe,TR=oxe,sxe=Js,d8=Object.prototype,axe=d8.hasOwnProperty,lxe=d8.propertyIsEnumerable,cxe=TR(function(){return arguments}())?TR:function(t){return sxe(t)&&axe.call(t,"callee")&&!lxe.call(t,"callee")},rN=cxe,bb={exports:{}};function uxe(){return!1}var dxe=uxe;bb.exports;(function(t,e){var n=Yo,r=dxe,i=e&&!e.nodeType&&e,o=i&&!0&&t&&!t.nodeType&&t,s=o&&o.exports===i,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||r;t.exports=c})(bb,bb.exports);var f8=bb.exports,fxe=9007199254740991,hxe=/^(?:0|[1-9]\d*)$/;function pxe(t,e){var n=typeof t;return e=e??fxe,!!e&&(n=="number"||n!="symbol"&&hxe.test(t))&&t>-1&&t%1==0&&t<e}var iN=pxe,mxe=9007199254740991;function gxe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=mxe}var oN=gxe,vxe=Gs,yxe=oN,bxe=Js,xxe="[object Arguments]",wxe="[object Array]",Sxe="[object Boolean]",kxe="[object Date]",Exe="[object Error]",jxe="[object Function]",Txe="[object Map]",_xe="[object Number]",Axe="[object Object]",Nxe="[object RegExp]",Cxe="[object Set]",Oxe="[object String]",Pxe="[object WeakMap]",Mxe="[object ArrayBuffer]",Rxe="[object DataView]",Ixe="[object Float32Array]",Dxe="[object Float64Array
767]",$xe="[object Int8Array]",Lxe="[object Int16Array]",Bxe="[object Int32Array]",zxe="[object Uint8Array]",Fxe="[object Uint8ClampedArray]",qxe="[object Uint16Array]",Uxe="[object Uint32Array]",Ct={};Ct[Ixe]=Ct[Dxe]=Ct[$xe]=Ct[Lxe]=Ct[Bxe]=Ct[zxe]=Ct[Fxe]=Ct[qxe]=Ct[Uxe]=!0;Ct[xxe]=Ct[wxe]=Ct[Mxe]=Ct[Sxe]=Ct[Rxe]=Ct[kxe]=Ct[Exe]=Ct[jxe]=Ct[Txe]=Ct[_xe]=Ct[Axe]=Ct[Nxe]=Ct[Cxe]=Ct[Oxe]=Ct[Pxe]=!1;function Vxe(t){return bxe(t)&&yxe(t.length)&&!!Ct[vxe(t)]}var Wxe=Vxe;function Hxe(t){return function(e){return t(e)}}var h8=Hxe,xb={exports:{}};xb.exports;(function(t,e){var n=wq,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=a})(xb,xb.exports);var Kxe=xb.exports,Gxe=Wxe,Jxe=h8,_R=Kxe,AR=_R&&_R.isTypedArray,Yxe=AR?Jxe(AR):Gxe,p8=Yxe,Xxe=exe,Qxe=rN,Zxe=Vr,e0e=f8,t0e=iN,n0e=p8,r0e=Object.prototype,i0e=r0e.hasOwnProperty;function o0e(t,e){var n=Zxe(t),r=!n&&Qxe(t),i=!n&&!r&&e0e(t),o=!n&&!r&&!i&&n0e(t),s=n||r||i||o,a=s?Xxe(t.length,String):[],l=a.length;for(var c in t)(e||i0e.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||t0e(c,l)))&&a.push(c);return a}var s0e=o0e,a0e=Object.prototype;function l0e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||a0e;return t===n}var c0e=l0e;function u0e(t,e){return function(n){return t(e(n))}}var m8=u0e,d0e=m8,f0e=d0e(Object.keys,Object),h0e=f0e,p0e=c0e,m0e=h0e,g0e=Object.prototype,v0e=g0e.hasOwnProperty;function y0e(t){if(!p0e(t))return m0e(t);var e=[];for(var n in Object(t))v0e.call(t,n)&&n!="constructor"&&e.push(n);return e}var b0e=y0e,x0e=zA,w0e=oN;function S0e(t){return t!=null&&w0e(t.length)&&!x0e(t)}var N0=S0e,k0e=s0e,E0e=b0e,j0e=N0;function T0e(t){return j0e(t)?k0e(t):E0e(t)}var sN=T0e,_0e=qbe,A0e=Qbe,N0e=sN;function C0e(t){return _0e(t,N0e,A0e)}var O0e=C0e,NR=O0e,P0e=1,M0e=Object.prototype,R0e=M0e.hasOwnProperty;function I0e(t,e,n,r,i,o){var s=n&P0e,a=NR(t),l=a.length,c=NR(e),d=c.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var h=a[f];if(!(s?h in e:R0e.call(e,h)))return!1}var p=o.get(t),g=o.get(e);if(p&&g)return p==e&&g==t;var m=!0;o.set(t,e),o.set(e,t);for(var v=s;++f<l;){h=a[f];var y=t[h],b=e[h];if(r)var x=s?r(b,y,h,e,t,o):r(y,b,h,t,e,o);if(!(x===void 0?y===b||i(y,b,n,r,o):x)){m=!1;break}v||(v=h=="constructor")}if(m&&!v){var S=t.constructor,w=e.constructor;S!=w&&"constructor"in t&&"constructor"in e&&!(typeof S=="function"&&S instanceof S&&typeof w=="function"&&w instanceof w)&&(m=!1)}return o.delete(t),o.delete(e),m}var D0e=I0e,$0e=qc,L0e=Yo,B0e=$0e(L0e,"DataView"),z0e=B0e,F0e=qc,q0e=Yo,U0e=F0e(q0e,"Promise"),V0e=U0e,W0e=qc,H0e=Yo,K0e=W0e(H0e,"Set"),g8=K0e,G0e=qc,J0e=Yo,Y0e=G0e(J0e,"WeakMap"),X0e=Y0e,oj=z0e,sj=qA,aj=V0e,lj=g8,cj=X0e,v8=Gs,gf=kq,CR="[object Map]",Q0e="[object Object]",OR="[object Promise]",PR="[object Set]",MR="[object WeakMap]",RR="[object DataView]",Z0e=gf(oj),ewe=gf(sj),twe=gf(aj),nwe=gf(lj),rwe=gf(cj),Il=v8;(oj&&Il(new oj(new ArrayBuffer(1)))!=RR||sj&&Il(new sj)!=CR||aj&&Il(aj.resolve())!=OR||lj&&Il(new lj)!=PR||cj&&Il(new cj)!=MR)&&(Il=function(t){var e=v8(t),n=e==Q0e?t.constructor:void 0,r=n?gf(n):"";if(r)switch(r){case Z0e:return RR;case ewe:return CR;case twe:return OR;case nwe:return PR;case rwe:return MR}return e});var iwe=Il,cS=o8,owe=c8,swe=$be,awe=D0e,IR=iwe,DR=Vr,$R=f8,lwe=p8,cwe=1,LR="[object Arguments]",BR="[object Array]",Vg="[object Object]",uwe=Object.prototype,zR=uwe.hasOwnProperty;function dwe(t,e,n,r,i,o){var s=DR(t),a=DR(e),l=s?BR:IR(t),c=a?BR:IR(e);l=l==LR?Vg:l,c=c==LR?Vg:c;var d=l==Vg,f=c==Vg,h=l==c;if(h&&$R(t)){if(!$R(e))return!1;s=!0,d=!1}if(h&&!d)return o||(o=new cS),s||lwe(t)?owe(t,e,n,r,i,o):swe(t,e,l,n,r,i,o);if(!(n&cwe)){var p=d&&zR.call(t,"__wrapped__"),g=f&&zR.call(e,"__wrapped__");
vendor: 4,114 bytes, line 767
767if(p||g){var m=p?t.value():t,v=g?e.value():e;return o||(o=new cS),i(m,v,n,r,o)}}return h?(o||(o=new cS),awe(t,e,n,r,i,o)):!1}var fwe=dwe,hwe=fwe,FR=Js;function y8(t,e,n,r,i){return t===e?!0:t==null||e==null||!FR(t)&&!FR(e)?t!==t&&e!==e:hwe(t,e,n,r,y8,i)}var aN=y8,pwe=o8,mwe=aN,gwe=1,vwe=2;function ywe(t,e,n,r){var i=n.length,o=i,s=!r;if(t==null)return!o;for(t=Object(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=n[i];var l=a[0],c=t[l],d=a[1];if(s&&a[2]){if(c===void 0&&!(l in t))return!1}else{var f=new pwe;if(r)var h=r(c,d,l,t,e,f);if(!(h===void 0?mwe(d,c,gwe|vwe,r,f):h))return!1}}return!0}var bwe=ywe,xwe=ml;function wwe(t){return t===t&&!xwe(t)}var b8=wwe,Swe=b8,kwe=sN;function Ewe(t){for(var e=kwe(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Swe(i)]}return e}var jwe=Ewe;function Twe(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var x8=Twe,_we=bwe,Awe=jwe,Nwe=x8;function Cwe(t){var e=Awe(t);return e.length==1&&e[0][2]?Nwe(e[0][0],e[0][1]):function(n){return n===t||_we(n,t,e)}}var Owe=Cwe;function Pwe(t,e){return t!=null&&e in Object(t)}var Mwe=Pwe,Rwe=Aq,Iwe=rN,Dwe=Vr,$we=iN,Lwe=oN,Bwe=p0;function zwe(t,e,n){e=Rwe(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var s=Bwe(e[r]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++r!=i?o:(i=t==null?0:t.length,!!i&&Lwe(i)&&$we(s,i)&&(Dwe(t)||Iwe(t)))}var Fwe=zwe,qwe=Mwe,Uwe=Fwe;function Vwe(t,e){return t!=null&&Uwe(t,e,qwe)}var Wwe=Vwe,Hwe=aN,Kwe=Nq,Gwe=Wwe,Jwe=BA,Ywe=b8,Xwe=x8,Qwe=p0,Zwe=1,e1e=2;function t1e(t,e){return Jwe(t)&&Ywe(e)?Xwe(Qwe(t),e):function(n){var r=Kwe(n,t);return r===void 0&&r===e?Gwe(n,t):Hwe(e,r,Zwe|e1e)}}var n1e=t1e;function r1e(t){return t}var vf=r1e;function i1e(t){return function(e){return e==null?void 0:e[t]}}var o1e=i1e,s1e=HA;function a1e(t){return function(e){return s1e(e,t)}}var l1e=a1e,c1e=o1e,u1e=l1e,d1e=BA,f1e=p0;function h1e(t){return d1e(t)?c1e(f1e(t)):u1e(t)}var p1e=h1e,m1e=Owe,g1e=n1e,v1e=vf,y1e=Vr,b1e=p1e;function x1e(t){return typeof t=="function"?t:t==null?v1e:typeof t=="object"?y1e(t)?g1e(t[0],t[1]):m1e(t):b1e(t)}var gl=x1e;function w1e(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var S1e=w1e;function k1e(t){return t!==t}var E1e=k1e;function j1e(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}var T1e=j1e,_1e=S1e,A1e=E1e,N1e=T1e;function C1e(t,e,n){return e===e?N1e(t,e,n):_1e(t,A1e,n)}var O1e=C1e,P1e=O1e;function M1e(t,e){var n=t==null?0:t.length;return!!n&&P1e(t,e,0)>-1}var R1e=M1e;function I1e(t,e,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}var D1e=I1e;function $1e(){}var L1e=$1e,uS=g8,B1e=L1e,z1e=nN,F1e=1/0,q1e=uS&&1/z1e(new uS([,-0]))[1]==F1e?function(t){return new uS(t)}:B1e,U1e=q1e,V1e=s8,W1e=R1e,H1e=D1e,K1e=l8,G1e=U1e,J1e=nN,Y1e=200;function X1e(t,e,n){var r=-1,i=W1e,o=t.length,s=!0,a=[],l=a;if(n)s=!1,i=H1e;else if(o>=Y1e){var c=e?null:G1e(t);if(c)return J1e(c);s=!1,i=K1e,l=new V1e}else l=e?[]:a;e:for(;++r<o;){var d=t[r],f=e?e(d):d;if(d=n||d!==0?d:0,s&&f===f){for(var h=l.length;h--;)if(l[h]===f)continue e;e&&l.push(f),a.push(d)}else i(l,f,n)||(l!==a&&l.push(f),a.push(d))}return a}var Q1e=X1e,Z1e=gl,eSe=Q1e;function tSe(t,e){return t&&t.length?eSe(t,Z1e(e)):[]}var nSe=tSe;const qR=ht(nSe);function w8(t,e,n){return e===!0?qR(t,n):ze(e)?qR(t,e):t}function Nd(t){"@babel/helpers - typeof";return Nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nd(t)}var rSe=["ref"];function UR(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ss(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?UR(Object(n),!0).forEach(function(r){C0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):UR(Object(n)).forEac
vendor: 4,282 bytes, line 767
767h(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iSe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VR(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,k8(r.key),r)}}function oSe(t,e,n){return e&&VR(t.prototype,e),n&&VR(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function sSe(t,e,n){return e=wb(e),aSe(t,S8()?Reflect.construct(e,n||[],wb(t).constructor):e.apply(t,n))}function aSe(t,e){if(e&&(Nd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lSe(t)}function lSe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function S8(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(S8=function(){return!!t})()}function wb(t){return wb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wb(t)}function cSe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uj(t,e)}function uj(t,e){return uj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},uj(t,e)}function C0(t,e,n){return e=k8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k8(t){var e=uSe(t,"string");return Nd(e)=="symbol"?e:e+""}function uSe(t,e){if(Nd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Nd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dSe(t,e){if(t==null)return{};var n=fSe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function fSe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function hSe(t){return t.value}function pSe(t,e){if(A.isValidElement(t))return A.cloneElement(t,e);if(typeof t=="function")return A.createElement(t,e);e.ref;var n=dSe(e,rSe);return A.createElement(tN,n)}var WR=1,Ya=function(t){function e(){var n;iSe(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=sSe(this,e,[].concat(i)),C0(n,"lastBoundingBox",{width:-1,height:-1}),n}return cSe(e,t),oSe(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>WR||Math.abs(i.height-this.lastBoundingBox.height)>WR)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ss({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,s=i.align,a=i.verticalAlign,l=i.margin,c=i.chartWidth,d=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();f={left:((c||0)-p.width)/2}}else f=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(a==="middle"){var g=this.getBBoxSnapsh
767ot();h={top:((d||0)-g.height)/2}}else h=a==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return ss(ss({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,s=i.width,a=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,d=i.payload,f=ss(ss({position:"absolute",width:s||"auto",height:a||"auto"},this.getDefaultPosition(l)),l);return A.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},pSe(o,ss(ss({},this.props),{},{payload:w8(d,c,hSe)})))}}],[{key:"getWithHeight",value:function(r,i){var o=ss(ss({},this.defaultProps),r.props),s=o.layout;return s==="vertical"&&ae(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||i}:null}}])}(E.PureComponent);C0(Ya,"displayName","Legend");C0(Ya,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var HR=Lm,mSe=rN,gSe=Vr,KR=HR?HR.isConcatSpreadable:void 0;function vSe(t){return gSe(t)||mSe(t)||!!(KR&&t&&t[KR])}var ySe=vSe,bSe=u8,xSe=ySe;function E8(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=xSe),i||(i=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?E8(a,e-1,n,r,i):bSe(i,a):r||(i[i.length]=a)}return i}var j8=E8;function wSe(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}var SSe=wSe,kSe=SSe,ESe=kSe(),jSe=ESe,TSe=jSe,_Se=sN;function ASe(t,e){return t&&TSe(t,e,_Se)}var T8=ASe,NSe=N0;function CSe(t,e){return function(n,r){if(n==null)return n;if(!NSe(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Object(n);(e?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}var OSe=CSe,PSe=T8,MSe=OSe,RSe=MSe(PSe),lN=RSe,ISe=lN,DSe=N0;function $Se(t,e){var n=-1,r=DSe(t)?Array(t.length):[];return ISe(t,function(i,o,s){r[++n]=e(i,o,s)}),r}var _8=$Se;function LSe(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}var BSe=LSe,GR=uf;function zSe(t,e){if(t!==e){var n=t!==void 0,r=t===null,i=t===t,o=GR(t),s=e!==void 0,a=e===null,l=e===e,c=GR(e);if(!a&&!c&&!o&&t>e||o&&s&&l&&!a&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&t<e||c&&n&&i&&!r&&!o||a&&n&&i||!s&&i||!l)return-1}return 0}var FSe=zSe,qSe=FSe;function USe(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,s=i.length,a=n.length;++r<s;){var l=qSe(i[r],o[r]);if(l){if(r>=a)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return t.index-e.index}var VSe=USe,dS=WA,WSe=HA,HSe=gl,KSe=_8,GSe=BSe,JSe=h8,YSe=VSe,XSe=vf,QSe=Vr;function ZSe(t,e,n){e.length?e=dS(e,function(o){return QSe(o)?function(s){return WSe(s,o.length===1?o[0]:o)}:o}):e=[XSe];var r=-1;e=dS(e,JSe(HSe));var i=KSe(t,function(o,s,a){var l=dS(e,function(c){return c(o)});return{criteria:l,index:++r,value:o}});return GSe(i,function(o,s){return YSe(o,s,n)})}var eke=ZSe;function tke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var nke=tke,rke=nke,JR=Math.max;function ike(t,e,n){return e=JR(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=JR(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),rke(t,this,a)}}var oke=ike;function ske(t){return function(){return t}}var ake=ske,lke=qc,cke=function(){try{var t=lke(Object,"defineProperty");return t({},"",{}),t}catch{}}(),A8=cke,uke=ake,YR=A8,dke=vf,fke=YR?function(t,e){return YR(t,"toString",{configurable:!0,enumerable:!1,value:uke(e),writable:!0})}:dke,hke=fke,pke=800,mke=16,gke=Date.now;function vke(t){var e=0,n=0;return function(){var r=gke(),i=mke-(r-n);if(n=r,i>0){if(++e>=pke)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var yke=vke,bke=hke,xke=yke,wke=xke(bke),Ske=wke,kke=vf,Eke=oke,jke=Ske;function Tke(t,e){return jke(Eke(t,e,kke),t+"")}var _ke=Tke,Ake=FA,Nke=N0,Cke=iN,Oke=ml;function Pke(t,e,n){if(!Oke(n))return!1;var r=typeof e;return(r=="number"?Nke(n)&&Cke(e,n.length):r=="string"&&e in n)?Ake(n[e],t):!1}var O0=Pke,Mke=j8,Rke=eke,Ike=_ke,XR=O0,Dke=Ike(function(t,e){if(t==null)return[];var n=e.length;return n>1&&XR(t,e[0],e[1])?e=[]:n>2&&XR(e[0],e[1],e[2])&&(e=[e[0]]),Rke(t,Mke(e,1),[])}),$ke=Dke;const cN=ht($ke);function qp(t){"@babel/helpers - typeof";return qp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qp(t)}function dj(){return dj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},dj.apply(this,arguments)}function Lke(t,e){return qke(t)||Fke(t,e)||zke(t,e)||Bke()}
vendor: 33,650 bytes, lines 767-775
767function Bke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 768In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zke(t,e){if(t){if(typeof t=="string")return QR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QR(t,e)}}function QR(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Fke(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function qke(t){if(Array.isArray(t))return t}function ZR(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function fS(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ZR(Object(n),!0).forEach(function(r){Uke(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ZR(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Uke(t,e,n){return e=Vke(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vke(t){var e=Wke(t,"string");return qp(e)=="symbol"?e:e+""}function Wke(t,e){if(qp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(qp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Hke(t){return Array.isArray(t)&&Tn(t[0])&&Tn(t[1])?t.join(" ~ "):t}var Kke=function(e){var n=e.separator,r=n===void 0?" : ":n,i=e.contentStyle,o=i===void 0?{}:i,s=e.itemStyle,a=s===void 0?{}:s,l=e.labelStyle,c=l===void 0?{}:l,d=e.payload,f=e.formatter,h=e.itemSorter,p=e.wrapperClassName,g=e.labelClassName,m=e.label,v=e.labelFormatter,y=e.accessibilityLayer,b=y===void 0?!1:y,x=function(){if(d&&d.length){var O={padding:0,margin:0},I=(h?cN(d,h):d).map(function(P,$){if(P.type==="none")return null;var B=fS({display:"block",paddingTop:4,paddingBottom:4,color:P.color||"#000"},a),z=P.formatter||f||Hke,R=P.value,L=P.name,q=R,G=L;if(z&&q!=null&&G!=null){var V=z(R,L,P,$,d);if(Array.isArray(V)){var Y=Lke(V,2);q=Y[0],G=Y[1]}else q=V}return A.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:B},Tn(G)?A.createElement("span",{className:"recharts-tooltip-item-name"},G):null,Tn(G)?A.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,A.createElement("span",{className:"recharts-tooltip-item-value"},q),A.createElement("span",{className:"recharts-tooltip-item-unit"},P.unit||""))});return A.createElement("ul",{className:"recharts-tooltip-item-list",style:O},I)}return null},S=fS({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),w=fS({margin:0},c),k=!Ye(m),j=k?m:"",T=qe("recharts-default-tooltip",p),_=qe("recharts-tooltip-label",g);k&&v&&d!==void 0&&d!==null&&(j=v(m,d));var N=b?{role:"status","aria-live":"assertive"}:{};return A.createElement("div",dj({className:T,style:S},N),A.createElement("p",{className:_,style:w},A.isValidElement(j)?j:"".concat(j)),x())};function Up(t){"@babel/helpers - typeof";return Up=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Up(t)}function Wg(t,e,n){return e=Gke(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gke(t){var e=Jke(t,"string");return Up(e)=="symbol"?e:e+""}function Jke(t,e){if(Up(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Up(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Hf="recharts-tooltip-wrapper",Yke={visibility:"hidden"};function Xke(t){var e=t.coordinate,n=t.translateX,r=t.translateY;return qe(Hf,Wg(Wg(Wg(Wg({},"".concat(Hf,"-right"),ae(n)&&e&&ae(e.x)&&n>=e.x),"".concat(Hf,"-left"),ae(n)&&e&&ae(e.x)&&n<e.x),"".concat(Hf,"-bottom"),ae(r)&&e&&ae(e.y)&&r>=e.y),"".concat(Hf,"-top"),ae(r)&&e&&ae(e.y)&&r<e.y))}function eI(t){var e=t.allowEscapeViewBox,n=t.coordinate,r=t.key,i=t.offsetTopLeft,o=t.position,s=t.reverseDirection,a=t.tooltipDimension,l=t.viewBox,c=t.viewBoxDimension;if(o&&ae(o[r]))return o[r];var d=n[r]-a-i,f=n[r]+i;if(e[r])return s[r]?d:f;if(s[r]){var h=d,p=l[r];return h<p?Math.max(f,l[r]):Math.max(d,l[r])}var g=f+a,m=l[r]+c;return g>m?Math.max(d,l[r]):Math.max(f,l[r])}function Qke(t){var e=t.translateX,n=t.translateY,r=t.useTranslate3d;return{transform:r?"translate3d(".concat(e,"px, ").concat(n,"px, 0)"):"translate(".concat(e,"px, ").concat(n,"px)")}}function Zke(t){var e=t.allowEscapeViewBox,n=t.coordinate,r=t.offsetTopLeft,i=t.position,o=t.reverseDirection,s=t.tooltipBox,a=t.useTranslate3d,l=t.viewBox,c,d,f;return s.height>0&&s.width>0&&n?(d=eI({allowEscapeViewBox:e,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=eI({allowEscapeViewBox:e,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=Qke({translateX:d,translateY:f,useTranslate3d:a})):c=Yke,{cssProperties:c,cssClasses:Xke({translateX:d,translateY:f,coordinate:n})}}function Cd(t){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cd(t)}function tI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function nI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tI(Object(n),!0).forEach(function(r){hj(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function eEe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tEe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,C8(r.key),r)}}function nEe(t,e,n){return e&&tEe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function rEe(t,e,n){return e=Sb(e),iEe(t,N8()?Reflect.construct(e,n||[],Sb(t).constructor):e.apply(t,n))}function iEe(t,e){if(e&&(Cd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oEe(t)}function oEe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function N8(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N8=function(){return!!t})()}function Sb(t){return Sb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sb(t)}function sEe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fj(t,e)}function fj(t,e){return fj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},fj(t,e)}function hj(t,e,n){return e=C8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C8(t){var e=aEe(t,"string");return Cd(e)=="symbol"?e:e+""}function aEe(t,e){if(Cd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var rI=1,lEe=function(t){function e(){var n;eEe(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=rEe(this,e,[].concat(i)),hj(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),hj(n,"handleKeyDown",function(s){if(s.key==="Escape"){var a,l,c,d;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(a=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&a!==void 0?a:0,y:(c=(d=n.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&c!==void 0?c:0}})}}),n}return sEe(e,t),nEe(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>rI||Math.abs(r.height-this.state.lastBoundingBox.height)>rI)&&this.setState({lastBoundingBox:{width:r.width,height:r.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 r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,s=i.allowEscapeViewBox,a=i.animationDuration,l=i.animationEasing,c=i.children,d=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,g=i.position,m=i.reverseDirection,v=i.useTranslate3d,y=i.viewBox,b=i.wrapperStyle,x=Zke({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:p,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:y}),S=x.cssClasses,w=x.cssProperties,k=nI(nI({transition:h&&o?"transform ".concat(a,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return A.createElement("div",{tabIndex:-1,className:S,style:k,ref:function(T){r.wrapperNode=T}},c)}}])}(E.PureComponent),cEe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},As={isSsr:cEe(),get:function(e){return As[e]},set:function(e,n){if(typeof e=="string")As[e]=n;else{var r=Object.keys(e);r&&r.length&&r.forEach(function(i){As[i]=e[i]})}}};function Od(t){"@babel/helpers - typeof";return Od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Od(t)}function iI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function oI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?iI(Object(n),!0).forEach(function(r){uN(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function uEe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dEe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,P8(r.key),r)}}function fEe(t,e,n){return e&&dEe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function hEe(t,e,n){return e=kb(e),pEe(t,O8()?Reflect.construct(e,n||[],kb(t).constructor):e.apply(t,n))}function pEe(t,e){if(e&&(Od(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mEe(t)}function mEe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function O8(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(O8=function(){return!!t})()}function kb(t){return kb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kb(t)}function gEe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pj(t,e)}function pj(t,e){return pj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},pj(t,e)}function uN(t,e,n){return e=P8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function P8(t){var e=vEe(t,"string");return Od(e)=="symbol"?e:e+""}function vEe(t,e){if(Od(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Od(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yEe(t){return t.dataKey}function bEe(t,e){return A.isValidElement(t)?A.cloneElement(t,e):typeof t=="function"?A.createElement(t,e):A.createElement(Kke,e)}var no=function(t){function e(){return uEe(this,e),hEe(this,e,arguments)}return gEe(e,t),fEe(e,[{key:"render",value:function(){var r=this,i=this.props,o=i.active,s=i.allowEscapeViewBox,a=i.animationDuration,l=i.animationEasing,c=i.content,d=i.coordinate,f=i.filterNull,h=i.isAnimationActive,p=i.offset,g=i.payload,m=i.payloadUniqBy,v=i.position,y=i.reverseDirection,b=i.useTranslate3d,x=i.viewBox,S=i.wrapperStyle,w=g??[];f&&w.length&&(w=w8(g.filter(function(j){return j.value!=null&&(j.hide!==!0||r.props.includeHidden)}),m,yEe));var k=w.length>0;return A.createElement(lEe,{allowEscapeViewBox:s,animationDuration:a,animationEasing:l,isAnimationActive:h,active:o,coordinate:d,hasPayload:k,offset:p,position:v,reverseDirection:y,useTranslate3d:b,viewBox:x,wrapperStyle:S},bEe(c,oI(oI({},this.props),{},{payload:w})))}}])}(E.PureComponent);uN(no,"displayName","Tooltip");uN(no,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!As.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 xEe=Yo,wEe=function(){return xEe.Date.now()},SEe=wEe,kEe=/\s/;function EEe(t){for(var e=t.length;e--&&kEe.test(t.charAt(e)););return e}var jEe=EEe,TEe=jEe,_Ee=/^\s+/;function AEe(t){return t&&t.slice(0,TEe(t)+1).replace(_Ee,"")}var NEe=AEe,CEe=NEe,sI=ml,OEe=uf,aI=NaN,PEe=/^[-+]0x[0-9a-f]+$/i,MEe=/^0b[01]+$/i,REe=/^0o[0-7]+$/i,IEe=parseInt;function DEe(t){if(typeof t=="number")return t;if(OEe(t))return aI;if(sI(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=sI(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=CEe(t);var n=MEe.test(t);return n||REe.test(t)?IEe(t.slice(2),n?2:8):PEe.test(t)?aI:+t}var M8=DEe,$Ee=ml,hS=SEe,lI=M8,LEe="Expected a function",BEe=Math.max,zEe=Math.min;function FEe(t,e,n){var r,i,o,s,a,l,c=0,d=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(LEe);e=lI(e)||0,$Ee(n)&&(d=!!n.leading,f="maxWait"in n,o=f?BEe(lI(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function p(k){var j=r,T=i;return r=i=void 0,c=k,s=t.apply(T,j),s}function g(k){return c=k,a=setTimeout(y,e),d?p(k):s}function m(k){var j=k-l,T=k-c,_=e-j;return f?zEe(_,o-T):_}function v(k){var j=k-l,T=k-c;return l===void 0||j>=e||j<0||f&&T>=o}function y(){var k=hS();if(v(k))return b(k);a=setTimeout(y,m(k))}function b(k){return a=void 0,h&&r?p(k):(r=i=void 0,s)}function x(){a!==void 0&&clearTimeout(a),c=0,r=l=i=a=void 0}function S(){return a===void 0?s:b(hS())}function w(){var k=hS(),j=v(k);if(r=arguments,i=this,l=k,j){if(a===void 0)return g(l);if(f)return clearTimeout(a),a=setTimeout(y,e),p(l)}return a===void 0&&(a=setTimeout(y,e)),s}return w.cancel=x,w.flush=S,w}var qEe=FEe,UEe=qEe,VEe=ml,WEe="Expected a function";function HEe(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(WEe);return VEe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),UEe(t,e,{leading:r,maxWait:e,trailing:i})}var KEe=HEe;const R8=ht(KEe);function Vp(t){"@babel/helpers - typeof";return Vp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vp(t)}function cI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cI(Object(n),!0).forEach(function(r){GEe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function GEe(t,e,n){return e=JEe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function JEe(t){var e=YEe(t,"string");return Vp(e)=="symbol"?e:e+""}function YEe(t,e){if(Vp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Vp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function XEe(t,e){return tje(t)||eje(t,e)||ZEe(t,e)||QEe()}function QEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 769In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZEe(t,e){if(t){if(typeof t=="string")return uI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uI(t,e)}}function uI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function eje(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function tje(t){if(Array.isArray(t))return t}var dI=E.forwardRef(function(t,e){var n=t.aspect,r=t.initialDimension,i=r===void 0?{width:-1,height:-1}:r,o=t.width,s=o===void 0?"100%":o,a=t.height,l=a===void 0?"100%":a,c=t.minWidth,d=c===void 0?0:c,f=t.minHeight,h=t.maxHeight,p=t.children,g=t.debounce,m=g===void 0?0:g,v=t.id,y=t.className,b=t.onResize,x=t.style,S=x===void 0?{}:x,w=E.useRef(null),k=E.useRef();k.current=b,E.useImperativeHandle(e,function(){return Object.defineProperty(w.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),w.current},configurable:!0})});var j=E.useState({containerWidth:i.width,containerHeight:i.height}),T=XEe(j,2),_=T[0],N=T[1],C=E.useCallback(function(I,P){N(function($){var B=Math.round(I),z=Math.round(P);return $.containerWidth===B&&$.containerHeight===z?$:{containerWidth:B,containerHeight:z}})},[]);E.useEffect(function(){var I=function(L){var q,G=L[0].contentRect,V=G.width,Y=G.height;C(V,Y),(q=k.current)===null||q===void 0||q.call(k,V,Y)};m>0&&(I=R8(I,m,{trailing:!0,leading:!1}));var P=new ResizeObserver(I),$=w.current.getBoundingClientRect(),B=$.width,z=$.height;return C(B,z),P.observe(w.current),function(){P.disconnect()}},[C,m]);var O=E.useMemo(function(){var I=_.containerWidth,P=_.containerHeight;if(I<0||P<0)return null;_s(Yl(s)||Yl(l),`The width(%s) and height(%s) are both fixed numbers, 770 maybe you don't need to use a ResponsiveContainer.`,s,l),_s(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=Yl(s)?I:s,B=Yl(l)?P:l;n&&n>0&&($?B=$/n:B&&($=B*n),h&&B>h&&(B=h)),_s($>0||B>0,`The width(%s) and height(%s) of chart should be greater than 0, 771 please check the style of container, or the props width(%s) and height(%s), 772 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 773 height and width.`,$,B,s,l,d,f,n);var z=!Array.isArray(p)&&Ts(p.type).endsWith("Chart");return A.Children.map(p,function(R){return A.isValidElement(R)?E.cloneElement(R,Hg({width:$,height:B},z?{style:Hg({height:"100%",width:"100%",maxHeight:B,maxWidth:$},R.props.style)}:{})):R})},[n,p,l,h,f,d,_,s]);return A.createElement("div",{id:v?"".concat(v):void 0,className:qe("recharts-responsive-container",y),style:Hg(Hg({},S),{},{width:s,height:l,minWidth:d,minHeight:f,maxHeight:h}),ref:w},O)}),P0=function(e){return null};P0.displayName="Cell";function Wp(t){"@babel/helpers - typeof";return Wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wp(t)}function fI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function mj(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fI(Object(n),!0).forEach(function(r){nje(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function nje(t,e,n){return e=rje(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rje(t){var e=ije(t,"string");return Wp(e)=="symbol"?e:e+""}function ije(t,e){if(Wp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Wp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var su={widthCache:{},cacheCount:0},oje=2e3,sje={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},hI="recharts_measurement_span";function aje(t){var e=mj({},t);return Object.keys(e).forEach(function(n){e[n]||delete e[n]}),e}var zh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||As.isSsr)return{width:0,height:0};var r=aje(n),i=JSON.stringify({text:e,copyStyle:r});if(su.widthCache[i])return su.widthCache[i];try{var o=document.getElementById(hI);o||(o=document.createElement("span"),o.setAttribute("id",hI),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var s=mj(mj({},sje),r);Object.assign(o.style,s),o.textContent="".concat(e);var a=o.getBoundingClientRect(),l={width:a.width,height:a.height};return su.widthCache[i]=l,++su.cacheCount>oje&&(su.cacheCount=0,su.widthCache={}),l}catch{return{width:0,height:0}}},lje=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function Hp(t){"@babel/helpers - typeof";return Hp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hp(t)}function Eb(t,e){return fje(t)||dje(t,e)||uje(t,e)||cje()}function cje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 774In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uje(t,e){if(t){if(typeof t=="string")return pI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pI(t,e)}}function pI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function dje(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function fje(t){if(Array.isArray(t))return t}function hje(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mI(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mje(r.key),r)}}function pje(t,e,n){return e&&mI(t.prototype,e),n&&mI(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function mje(t){var e=gje(t,"string");return Hp(e)=="symbol"?e:e+""}function gje(t,e){if(Hp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Hp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var gI=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,vI=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,vje=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,yje=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,I8={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},bje=Object.keys(I8),Cu="NaN";function xje(t,e){return t*I8[e]}var Kg=function(){function t(e,n){hje(this,t),this.num=e,this.unit=n,this.num=e,this.unit=n,Number.isNaN(e)&&(this.unit=""),n!==""&&!vje.test(n)&&(this.num=NaN,this.unit=""),bje.includes(n)&&(this.num=xje(e,n),this.unit="px")}return pje(t,[{key:"add",value:function(n){return this.unit!==n.unit?new t(NaN,""):new t(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new t(NaN,""):new t(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new t(NaN,""):new t(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new t(NaN,""):new t(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 r,i=(r=yje.exec(n))!==null&&r!==void 0?r:[],o=Eb(i,3),s=o[1],a=o[2];return new t(parseFloat(s),a??"")}}])}();function D8(t){if(t.includes(Cu))return Cu;for(var e=t;e.includes("*")||e.includes("/");){var n,r=(n=gI.exec(e))!==null&&n!==void 0?n:[],i=Eb(r,4),o=i[1],s=i[2],a=i[3],l=Kg.parse(o??""),c=Kg.parse(a??""),d=s==="*"?l.multiply(c):l.divide(c);if(d.isNaN())return Cu;e=e.replace(gI,d.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var f,h=(f=vI.exec(e))!==null&&f!==void 0?f:[],p=Eb(h,4),g=p[1],m=p[2],v=p[3],y=Kg.parse(g??""),b=Kg.parse(v??""),x=m==="+"?y.add(b):y.subtract(b);if(x.isNaN())return Cu;e=e.replace(vI,x.toString())}return e}var yI=/\(([^()]*)\)/;function wje(t){for(var e=t;e.includes("(");){var n=yI.exec(e),r=Eb(n,2),i=r[1];e=e.replace(yI,D8(i))}return e}function Sje(t){var e=t.replace(/\s+/g,"");return e=wje(e),e=D8(e),e}function kje(t){try{return Sje(t)}catch{return Cu}}function pS(t){var e=kje(t.slice(5,-1));return e===Cu?"":e}var Eje=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],jje=["dx","dy","angle","className","breakAll"];function gj(){return gj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},gj.apply(this,arguments)}function bI(t,e){if(t==null)return{};var n=Tje(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Tje(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function xI(t,e){return Cje(t)||Nje(t,e)||Aje(t,e)||_je()}function _je(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 775In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aje(t,e){if(t){if(typeof t=="string")return wI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wI(t,e)}}function wI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Nje(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function Cje(t){if(Array.isArray(t))return t}var $8=/[ \f\n\r\t\v\u2028\u2029]+/,L8=function(e){var n=e.children,r=e.breakAll,i=e.style;try{var o=[];Ye(n)||(r?o=n.toString().split(""):o=n.toString().split($8));var s=o.map(function(l){return{word:l,width:zh(l,i).width}}),a=r?0:zh(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:a}}catch{return null}},Oje=function(e,n,r,i,o){var s=e.maxLines,a=e.children,l=e.style,c=e.breakAll,d=ae(s),f=a,h=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(B,z){var R=z.word,L=z.width,q=B[B.length-1];if(q&&(i==null||o||q.width+L+r<Number(i)))q.words.push(R),q.width+=L+r;else{var G={words:[R],width:L};B.push(G)}return B},[])},p=h(n),g=function($){return $.reduce(function(B,z){return B.width>z.width?B:z})};if(!d)return p;for(var m="â¦",v=function($){var B=f.slice(0,$),z=L8({breakAll:c,style:l,children:B+m}).wordsWithComputedWidth,R=h(z),L=R.length>s||g(R).width>Number(i);return[L,R]},y=0,b=f.length-1,x=0,S;y<=b&&x<=f.length-1;){var w=Math.floor((y+b)/2),k=w-1,j=v(k),T=xI(j,2),_=T[0],N=T[1],C=v(w),O=xI(C,1),I=O[0];if(!_&&!I&&(y=w+1),_&&I&&(b=w-1),!_&&I){S=N;break}x++}return S||p},SI=function(e){var n=Ye(e)?[]:e.toString().split($8);return[{words:n}]},Pje=function(e){var n=e.width,r=e.scaleToFit,i=e.children,o=e.style,s=e.breakAll,a=e.maxLines;if((n||r)&&!As.isSsr){var l,c,d=L8({breakAll:s,children:i,style:o});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;l=f,c=h}else return SI(i);return Oje({breakAll:s,children:i,maxLines:a,style:o},l,c,n,r)}return SI(i)},kI="#808080",Mc=function(e){var n=e.x,r=n===void 0?0:n,i=e.y,o=i===void 0?0:i,s=e.lineHeight,a=s===void 0?"1em":s,l=e.capHeight,c=l===void 0?"0.71em":l,d=e.scaleToFit,f=d===void 0?!1:d,h=e.textAnchor,p=h===void 0?"start":h,g=e.verticalAnchor,m=g===void 0?"end":g,v=e.fill,y=v===void 0?kI:v,b=bI(e,Eje),x=E.useMemo(function(){return Pje({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]),S=b.dx,w=b.dy,k=b.angle,j=b.className,T=b.breakAll,_=bI(b,jje);if(!Tn(r)||!Tn(o))return null;var N=r+(ae(S)?S:0),C=o+(ae(w)?w:0),O;switch(m){case"start":O=pS("calc(".concat(c,")"));break;case"middle":O=pS("calc(".concat((x.length-1)/2," * -").concat(a," + (").concat(c," / 2))"));break;default:O=pS("calc(".concat(x.length-1," * -").concat(a,")"));break}var I=[];if(f){var P=x[0].width,$=b.width;I.push("scale(".concat((ae($)?$/P:1)/P,")"))}return k&&I.push("rotate(".concat(k,", ").concat(N,", ").concat(C,")")),I.length&&(_.transform=I.join(" ")),A.createElement("text",gj({},Me(_,!0),{x:N,y:C,className:qe("recharts-text",j),textAnchor:p,fill:y.includes("url")?kI:y}),x.map(function(B,z){var R=B.words.join(T?"":" ");return A.createElement("tspan",{x:N,dy:z===0?O:a,key:"".concat(R,"-").concat(z)},R)}))};function Xa(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Mje(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function dN(t){let e,n,r;t.length!==2?(e=Xa,n=(a,l)=>Xa(t(a),l),r=(a,l)=>t(a)-l):(e=t===Xa||t===Mje?t:Rje,n=t,r=t);
775function i(a,l,c=0,d=a.length){if(c<d){if(e(l,l)!==0)return d;do{const f=c+d>>>1;n(a[f],l)<0?c=f+1:d=f}while(c<d)}return c}function o(a,l,c=0,d=a.length){if(c<d){if(e(l,l)!==0)return d;do{const f=c+d>>>1;n(a[f],l)<=0?c=f+1:d=f}while(c<d)}return c}function s(a,l,c=0,d=a.length){const f=i(a,l,c,d-1);return f>c&&r(a[f-1],l)>-r(a[f],l)?f-1:f}return{left:i,center:s,right:o}}function Rje(){return 0}function B8(t){return t===null?NaN:+t}function*Ije(t,e){for(let n of t)n!=null&&(n=+n)>=n&&(yield n)}const Dje=dN(Xa),Fm=Dje.right;dN(B8).center;class EI extends Map{constructor(e,n=Bje){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(jI(this,e))}has(e){return super.has(jI(this,e))}set(e,n){return super.set($je(this,e),n)}delete(e){return super.delete(Lje(this,e))}}function jI({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function $je({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Lje({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Bje(t){return t!==null&&typeof t=="object"?t.valueOf():t}function zje(t=Xa){if(t===Xa)return z8;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function z8(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const Fje=Math.sqrt(50),qje=Math.sqrt(10),Uje=Math.sqrt(2);function jb(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Fje?10:o>=qje?5:o>=Uje?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?jb(t,e,n*2):[a,l,c]}function vj(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,s]=r?jb(e,t,n):jb(t,e,n);if(!(o>=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(i+c)/-s;else for(let c=0;c<a;++c)l[c]=(i+c)*s;return l}function yj(t,e,n){return e=+e,t=+t,n=+n,jb(t,e,n)[2]}function bj(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?yj(e,t,n):yj(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function TI(t,e){let n;for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function _I(t,e){let n;for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function F8(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?z8:zje(i);r>n;){if(r-n>600){const l=r-n+1,c=e-n+1,d=Math.log(l),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(l-f)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(e-c*f/l+h)),g=Math.min(r,Math.floor(e+(l-c)*f/l+h));F8(t,e,p,g,i)}const o=t[e];let s=n,a=r;for(Kf(t,n,e),i(t[r],o)>0&&Kf(t,n,r);s<a;){for(Kf(t,s,a),++s,--a;i(t[s],o)<0;)++s;for(;i(t[a],o)>0;)--a}i(t[n],o)===0?Kf(t,n,a):(++a,Kf(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function Kf(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Vje(t,e,n){if(t=Float64Array.from(Ije(t)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return _I(t);if(e>=1)return TI(t);var r,i=(r-1)*e,o=Math.floor(i),s=TI(F8(t,o).subarray(0,o+1)),a=_I(t.subarray(o+1));return s+(a-s)*(i-o)}}function Wje(t,e,n=B8){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(i-o)}}function Hje(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function Fi(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Ys(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}
vendor: 7,904 bytes, line 775
775const xj=Symbol("implicit");function fN(){var t=new EI,e=[],n=[],r=xj;function i(o){let s=t.get(o);if(s===void 0){if(r!==xj)return r;t.set(o,s=e.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new EI;for(const s of o)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return fN(e,n).unknown(r)},Fi.apply(i,arguments),i}function Kp(){var t=fN().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,s,a=!1,l=0,c=0,d=.5;delete t.unknown;function f(){var h=e().length,p=i<r,g=p?i:r,m=p?r:i;o=(m-g)/Math.max(1,h-l+c*2),a&&(o=Math.floor(o)),g+=(m-g-o*(h-l))*d,s=o*(1-l),a&&(g=Math.round(g),s=Math.round(s));var v=Hje(h).map(function(y){return g+o*y});return n(p?v.reverse():v)}return t.domain=function(h){return arguments.length?(e(h),f()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,a=!0,f()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(h){return arguments.length?(a=!!h,f()):a},t.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),f()):l},t.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},t.paddingOuter=function(h){return arguments.length?(c=+h,f()):c},t.align=function(h){return arguments.length?(d=Math.max(0,Math.min(1,h)),f()):d},t.copy=function(){return Kp(e(),[r,i]).round(a).paddingInner(l).paddingOuter(c).align(d)},Fi.apply(f(),arguments)}function q8(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return q8(e())},t}function Fh(){return q8(Kp.apply(null,arguments).paddingInner(1))}function hN(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function U8(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function qm(){}var Gp=.7,Tb=1/Gp,Yu="\\s*([+-]?\\d+)\\s*",Jp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kje=/^#([0-9a-f]{3,8})$/,Gje=new RegExp(`^rgb\\(${Yu},${Yu},${Yu}\\)$`),Jje=new RegExp(`^rgb\\(${qo},${qo},${qo}\\)$`),Yje=new RegExp(`^rgba\\(${Yu},${Yu},${Yu},${Jp}\\)$`),Xje=new RegExp(`^rgba\\(${qo},${qo},${qo},${Jp}\\)$`),Qje=new RegExp(`^hsl\\(${Jp},${qo},${qo}\\)$`),Zje=new RegExp(`^hsla\\(${Jp},${qo},${qo},${Jp}\\)$`),AI={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};hN(qm,Yp,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:NI,formatHex:NI,formatHex8:eTe,formatHsl:tTe,formatRgb:CI,toString:CI});function NI(){return this.rgb().formatHex()}function eTe(){return this.rgb().formatHex8()}function tTe(){return V8(this).formatHsl()}function CI(){return this.rgb().formatRgb()}function Yp(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Kje.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?OI(e):n===3?new Lr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Gg(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Gg(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Gje.exec(t))?new Lr(e[1],e[2],e[3],1):(e=Jje.exec(t))?new Lr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Yje.exec(t))?Gg(e[1],e[2],e[3],e[4]):(e=Xje.exec(t))?Gg(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Qje.exec(t))?RI(e[1],e[2]/100,e[3]/100,1):(e=Zje.exec(t))?RI(e[1],e[2]/100,e[3]/100,e[4]):AI.hasOwnProperty(t)?OI(AI[t]):t==="transparent"?new Lr(NaN,NaN,NaN,0):null}function OI(t){return new Lr(t>>16&255,t>>8&255,t&255,1)}function Gg(t,e,n,r){return r<=0&&(t=e=n=NaN),new Lr(t,e,n,r)}function nTe(t){return t instanceof qm||(t=Yp(t)),t?(t=t.rgb(),new Lr(t.r,t.g,t.b,t.opacity)):new Lr}function wj(t,e,n,r){return arguments.length===1?nTe(t):new Lr(t,e,n,r??1)}function Lr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}hN(Lr,wj,U8(qm,{brighter(t){return t=t==null?Tb:Math.pow(Tb,t),new Lr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Gp:Math.pow(Gp,t),new Lr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Lr(gc(this.r),gc(this.g),gc(this.b),_b(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:PI,formatHex:PI,formatHex8:rTe,formatRgb:MI,toString:MI}));function PI(){return`#${Xl(this.r)}${Xl(this.g)}${Xl(this.b)}`}function rTe(){return`#${Xl(this.r)}${Xl(this.g)}${Xl(this.b)}${Xl((isNaN(this.opacity)?1:this.opacity)*255)}`}function MI(){const t=_b(this.opacity);return`${t===1?"rgb(":"rgba("}${gc(this.r)}, ${gc(this.g)}, ${gc(this.b)}${t===1?")":`, ${t})`}`}function _b(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function gc(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Xl(t){return t=gc(t),(t<16?"0":"")+t.toString(16)}function RI(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new lo(t,e,n,r)}function V8(t){if(t instanceof lo)return new lo(t.h,t.s,t.l,t.opacity);if(t instanceof qm||(t=Yp(t)),!t)return new lo;if(t instanceof lo)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;
vendor: 4,642 bytes, line 775
775return a?(e===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new lo(s,a,l,t.opacity)}function iTe(t,e,n,r){return arguments.length===1?V8(t):new lo(t,e,n,r??1)}function lo(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}hN(lo,iTe,U8(qm,{brighter(t){return t=t==null?Tb:Math.pow(Tb,t),new lo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Gp:Math.pow(Gp,t),new lo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Lr(mS(t>=240?t-240:t+120,i,r),mS(t,i,r),mS(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new lo(II(this.h),Jg(this.s),Jg(this.l),_b(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 t=_b(this.opacity);return`${t===1?"hsl(":"hsla("}${II(this.h)}, ${Jg(this.s)*100}%, ${Jg(this.l)*100}%${t===1?")":`, ${t})`}`}}));function II(t){return t=(t||0)%360,t<0?t+360:t}function Jg(t){return Math.max(0,Math.min(1,t||0))}function mS(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const pN=t=>()=>t;function oTe(t,e){return function(n){return t+n*e}}function sTe(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function aTe(t){return(t=+t)==1?W8:function(e,n){return n-e?sTe(e,n,t):pN(isNaN(e)?n:e)}}function W8(t,e){var n=e-t;return n?oTe(t,n):pN(isNaN(t)?e:t)}const DI=function t(e){var n=aTe(e);function r(i,o){var s=n((i=wj(i)).r,(o=wj(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=W8(i.opacity,o.opacity);return function(d){return i.r=s(d),i.g=a(d),i.b=l(d),i.opacity=c(d),i+""}}return r.gamma=t,r}(1);function lTe(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function cTe(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function uTe(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=yf(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function dTe(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Ab(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function fTe(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=yf(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Sj=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gS=new RegExp(Sj.source,"g");function hTe(t){return function(){return t}}function pTe(t){return function(e){return t(e)+""}}function mTe(t,e){var n=Sj.lastIndex=gS.lastIndex=0,r,i,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(r=Sj.exec(t))&&(i=gS.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ab(r,i)})),n=gS.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?pTe(l[0].x):hTe(e):(e=l.length,function(c){for(var d=0,f;d<e;++d)a[(f=l[d]).i]=f.x(c);return a.join("")})}function yf(t,e){var n=typeof e,r;return e==null||n==="boolean"?pN(e):(n==="number"?Ab:n==="string"?(r=Yp(e))?(e=r,DI):mTe:e instanceof Yp?DI:e instanceof Date?dTe:cTe(e)?lTe:Array.isArray(e)?uTe:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?fTe:Ab)(t,e)}function mN(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function gTe(t,e){e===void 0&&(e=t,t=yf);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(s){var a=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return o[a](s-a)}}function vTe(t){return function(){return t}}function Nb(t){return+t}var $I=[0,1];function yr(t){return t}function kj(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:vTe(isNaN(e)?NaN:.5)}function yTe(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function bTe(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=kj(i,r),o=n(s,o)):(r=kj(r,i),o=n(o,s)),function(a){return o(r(a))}}function xTe(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=kj(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=Fm(t,a,1,r)-1;return o[l](i[l](a))}}function Um(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function M0(){var t=$I,e=$I,n=yf,r,i,o,s=yr,a,l,c;function d(){var h=Math.min(t.length,e.length);
vendor: 4,295 bytes, line 775
775return s!==yr&&(s=yTe(t[0],t[h-1])),a=h>2?xTe:bTe,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=a(t.map(r),e,n)))(r(s(h)))}return f.invert=function(h){return s(i((c||(c=a(e,t.map(r),Ab)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Nb),d()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),d()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=mN,d()},f.clamp=function(h){return arguments.length?(s=h?!0:yr,d()):s!==yr},f.interpolate=function(h){return arguments.length?(n=h,d()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,d()}}function gN(){return M0()(yr,yr)}function wTe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Cb(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Pd(t){return t=Cb(Math.abs(t)),t?t[1]:NaN}function STe(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function kTe(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var ETe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xp(t){if(!(e=ETe.exec(t)))throw new Error("invalid format: "+t);var e;return new vN({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Xp.prototype=vN.prototype;function vN(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}vN.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 jTe(t){e:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break e;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var H8;function TTe(t,e){var n=Cb(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(H8=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Cb(t,Math.max(0,e+o-1))[0]}function LI(t,e){var n=Cb(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const BI={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:wTe,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>LI(t*100,e),r:LI,s:TTe,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function zI(t){return t}var FI=Array.prototype.map,qI=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _Te(t){var e=t.grouping===void 0||t.thousands===void 0?zI:STe(FI.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?zI:kTe(FI.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"â":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(f){f=Xp(f);var h=f.fill,p=f.align,g=f.sign,m=f.symbol,v=f.zero,y=f.width,b=f.comma,x=f.precision,S=f.trim,w=f.type;w==="n"?(b=!0,w="g"):BI[w]||(x===void 0&&(x=12),S=!0,w="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var k=m==="$"?n:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",j=m==="$"?r:/[%p]/.test(w)?s:"",T=BI[w],_=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function N(C){var O=k,I=j,P,$,B;if(w==="c")I=T(C)+I,C="";else{C=+C;
vendor: 5,257 bytes, line 775
775var z=C<0||1/C<0;if(C=isNaN(C)?l:T(Math.abs(C),x),S&&(C=jTe(C)),z&&+C==0&&g!=="+"&&(z=!1),O=(z?g==="("?g:a:g==="-"||g==="("?"":g)+O,I=(w==="s"?qI[8+H8/3]:"")+I+(z&&g==="("?")":""),_){for(P=-1,$=C.length;++P<$;)if(B=C.charCodeAt(P),48>B||B>57){I=(B===46?i+C.slice(P+1):C.slice(P))+I,C=C.slice(0,P);break}}}b&&!v&&(C=e(C,1/0));var R=O.length+C.length+I.length,L=R<y?new Array(y-R+1).join(h):"";switch(b&&v&&(C=e(L+C,L.length?y-I.length:1/0),L=""),p){case"<":C=O+C+I+L;break;case"=":C=O+L+C+I;break;case"^":C=L.slice(0,R=L.length>>1)+O+C+I+L.slice(R);break;default:C=L+O+C+I;break}return o(C)}return N.toString=function(){return f+""},N}function d(f,h){var p=c((f=Xp(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Pd(h)/3)))*3,m=Math.pow(10,-g),v=qI[8+g/3];return function(y){return p(m*y)+v}}return{format:c,formatPrefix:d}}var Yg,yN,K8;ATe({thousands:",",grouping:[3],currency:["$",""]});function ATe(t){return Yg=_Te(t),yN=Yg.format,K8=Yg.formatPrefix,Yg}function NTe(t){return Math.max(0,-Pd(Math.abs(t)))}function CTe(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Pd(e)/3)))*3-Pd(Math.abs(t)))}function OTe(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Pd(e)-Pd(t))+1}function G8(t,e,n,r){var i=bj(t,e,n),o;switch(r=Xp(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=CTe(i,s))&&(r.precision=o),K8(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=OTe(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=NTe(i))&&(r.precision=o-(r.type==="%")*2);break}}return yN(r)}function vl(t){var e=t.domain;return t.ticks=function(n){var r=e();return vj(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return G8(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,d=10;for(a<s&&(c=s,s=a,a=c,c=i,i=o,o=c);d-- >0;){if(c=yj(s,a,n),c===l)return r[i]=s,r[o]=a,e(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Ob(){var t=gN();return t.copy=function(){return Um(t,Ob())},Fi.apply(t,arguments),vl(t)}function J8(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Nb),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return J8(t).unknown(e)},t=arguments.length?Array.from(t,Nb):[0,1],vl(n)}function Y8(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],s;return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),t[n]=e.floor(i),t[r]=e.ceil(o),t}function UI(t){return Math.log(t)}function VI(t){return Math.exp(t)}function PTe(t){return-Math.log(-t)}function MTe(t){return-Math.exp(-t)}function RTe(t){return isFinite(t)?+("1e"+t):t<0?0:t}function ITe(t){return t===10?RTe:t===Math.E?Math.exp:e=>Math.pow(t,e)}function DTe(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function WI(t){return(e,n)=>-t(-e,n)}function bN(t){const e=t(UI,VI),n=e.domain;let r=10,i,o;function s(){return i=DTe(r),o=ITe(r),n()[0]<0?(i=WI(i),o=WI(o),t(PTe,MTe)):t(UI,VI),e}return e.base=function(a){return arguments.length?(r=+a,s()):r},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],d=l[l.length-1];const f=d<c;f&&([c,d]=[d,c]);let h=i(c),p=i(d),g,m;const v=a==null?10:+a;let y=[];if(!(r%1)&&p-h<v){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(g=1;g<r;++g)if(m=h<0?g/o(-h):g*o(h),!(m<c)){if(m>d)break;y.push(m)}}else for(;h<=p;++h)for(g=r-1;g>=1;--g)if(m=h>0?g/o(-h):g*o(h),!(m<c)){if(m>d)break;y.push(m)}y.length*2<v&&(y=vj(c,d,v))}else y=vj(h,p,Math.min(p-h,v)).map(o);return f?y.reverse():y},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Xp(l)).precision==null&&(l.trim=!0),l=yN(l)),a===1/0)return l;const c=Math.max(1,r*a/e.ticks().length);return d=>{let f=d/o(Math.round(i(d)));return f*r<r-.5&&(f*=r),f<=c?l(d):""}},e.nice=()=>n(Y8(n(),{floor:a=>o(Math.floor(i(a))),ceil:a=>o(Math.ceil(i(a)))})),e}function X8(){const t=bN(M0()).domain([1,10]);return t.copy=()=>Um(t,X8()).base(t.base()),Fi.apply(t,arguments),t}function HI(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function KI(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function xN(t){var e=1,n=t(HI(e),KI(e));return n.constant=function(r){return arguments.length?t(HI(e=+r),KI(e)):e},vl(n)}function Q8(){var t=xN(M0());return t.copy=function(){return Um(t,Q8()).constant(t.constant())},Fi.apply(t,arguments)}function GI(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function $Te(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function LTe(t){return t<0?-t*t:t*t}function wN(t){var e=t(yr,yr),n=1;function r(){return n===1?t(yr,yr):n===.5?t($Te,LTe):t(GI(n),GI(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},vl(e)}function SN(){var t=wN(M0());return t.copy=function(){return Um(t,SN()).exponent(t.exponent())},Fi.apply(t,arguments),t}function BTe(){return SN.apply(null,arguments).exponent(.5)}function JI(t){return Math.sign(t)*t*t}
775function zTe(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Z8(){var t=gN(),e=[0,1],n=!1,r;function i(o){var s=zTe(t(o));return isNaN(s)?r:n?Math.round(s):s}return i.invert=function(o){return t.invert(JI(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Nb)).map(JI)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Z8(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},Fi.apply(i,arguments),vl(i)}function eU(){var t=[],e=[],n=[],r;function i(){var s=0,a=Math.max(1,e.length);for(n=new Array(a-1);++s<a;)n[s-1]=Wje(t,s/a);return o}function o(s){return s==null||isNaN(s=+s)?r:e[Fm(n,s)]}return o.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},o.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(Xa),i()},o.range=function(s){return arguments.length?(e=Array.from(s),i()):e.slice()},o.unknown=function(s){return arguments.length?(r=s,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return eU().domain(t).range(e).unknown(r)},Fi.apply(o,arguments)}function tU(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function s(l){return l!=null&&l<=l?i[Fm(r,l,0,n)]:o}function a(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*e-(l-n)*t)/(n+1);return s}return s.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},s.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,a()):i.slice()},s.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return tU().domain([t,e]).range(i).unknown(o)},Fi.apply(vl(s),arguments)}function nU(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[Fm(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var s=e.indexOf(o);return[t[s-1],t[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return nU().domain(t).range(e).unknown(n)},Fi.apply(i,arguments)}const vS=new Date,yS=new Date;function An(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{const l=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(c<o&&o<s);return l},i.filter=o=>An(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(i.count=(o,s)=>(vS.setTime(+o),yS.setTime(+s),t(vS),t(yS),Math.floor(n(vS,yS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const Pb=An(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Pb.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?An(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Pb);Pb.range;const bs=1e3,Ni=bs*60,xs=Ni*60,Bs=xs*24,kN=Bs*7,YI=Bs*30,bS=Bs*365,Ql=An(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*bs)},(t,e)=>(e-t)/bs,t=>t.getUTCSeconds());Ql.range;const EN=An(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*bs)},(t,e)=>{t.setTime(+t+e*Ni)},(t,e)=>(e-t)/Ni,t=>t.getMinutes());EN.range;const jN=An(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Ni)},(t,e)=>(e-t)/Ni,t=>t.getUTCMinutes());jN.range;const TN=An(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*bs-t.getMinutes()*Ni)},(t,e)=>{t.setTime(+t+e*xs)},(t,e)=>(e-t)/xs,t=>t.getHours());TN.range;const _N=An(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*xs)},(t,e)=>(e-t)/xs,t=>t.getUTCHours());_N.range;const Vm=An(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ni)/Bs,t=>t.getDate()-1);Vm.range;const R0=An(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Bs,t=>t.getUTCDate()-1);R0.range;const rU=An(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Bs,t=>Math.floor(t/Bs));rU.range;function Uc(t){return An(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Ni)/kN)}const I0=Uc(0),Mb=Uc(1),FTe=Uc(2),qTe=Uc(3),Md=Uc(4),UTe=Uc(5),VTe=Uc(6);I0.range;Mb.range;FTe.range;qTe.range;Md.range;UTe.range;VTe.range;function Vc(t){return An(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/kN)}const D0=Vc(0),Rb=Vc(1),WTe=Vc(2),HTe=Vc(3),Rd=Vc(4),KTe=Vc(5),GTe=Vc(6);D0.range;Rb.range;WTe.range;HTe.range;Rd.range;KTe.range;GTe.range;const AN=An(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());AN.range;const NN=An(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());NN.range;const zs=An(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());zs.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:An(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});zs.range;const Fs=An(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Fs.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:An(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});Fs.range;function iU(t,e,n,r,i,o){const s=[[Ql,1,bs],[Ql,5,5*bs],[Ql,15,15*bs],[Ql,30,30*bs],[o,1,Ni],[o,5,5*Ni],[o,15,15*Ni],[o,30,30*Ni],[i,1,xs],[i,3,3*xs],[i,6,6*xs],[i,12,12*xs],[r,1,Bs],[r,2,2*Bs],[n,1,kN],[e,1,YI],[e,3,3*YI],[t,1,bS]];function a(c,d,f){const h=d<c;h&&([c,d]=[d,c]);const p=f&&typeof f.range=="function"?f:l(c,d,f),g=p?p.range(c,+d+1):[];return h?g.reverse():g}function l(c,d,f){const h=Math.abs(d-c)/f,p=dN(([,,v])=>v).right(s,h);if(p===s.length)return t.every(bj(c/bS,d/bS,f));if(p===0)return Pb.every(Math.max(bj(c,d,f),1));const[g,m]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return g.every(m)}return[a,l]}const[JTe,YTe]=iU(Fs,NN,D0,rU,_N,jN),[XTe,QTe]=iU(zs,AN,I0,Vm,TN,EN);function xS(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function wS(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Gf(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function ZTe(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Jf(i),d=Yf(i),f=Jf(o),h=Yf(o),p=Jf(s),g=Yf(s),m=Jf(a),v=Yf(a),y=Jf(l),b=Yf(l),x={a:z,A:R,b:L,B:q,c:null,d:nD,e:nD,f:S_e,g:P_e,G:R_e,H:b_e,I:x_e,j:w_e,L:oU,m:k_e,M:E_e,p:G,q:V,Q:oD,s:sD,S:j_e,u:T_e,U:__e,V:A_e,w:N_e,W:C_e,x:null,X:null,y:O_e,Y:M_e,Z:I_e,"%":iD},S={a:Y,A:pe,b:me,B:Ue,c:null,d:rD,e:rD,f:B_e,g:J_e,G:X_e,H:D_e,I:$_e,j:L_e,L:aU,m:z_e,M:F_e,p:H,q:de,Q:oD,s:sD,S:q_e,u:U_e,U:V_e,V:W_e,w:H_e,W:K_e,x:null,X:null,y:G_e,Y:Y_e,Z:Q_e,"%":iD},w={a:N,A:C,b:O,B:I,c:P,d:eD,e:eD,f:m_e,g:ZI,G:QI,H:tD,I:tD,j:d_e,L:p_e,m:u_e,M:f_e,p:_,q:c_e,Q:v_e,s:y_e,S:h_e,u:i_e,U:o_e,V:s_e,w:r_e,W:a_e,x:$,X:B,y:ZI,Y:QI,Z:l_e,"%":g_e};x.x=k(n,x),x.X=k(r,x),x.c=k(e,x),S.x=k(n,S),S.X=k(r,S),S.c=k(e,S);
vendor: 4,414 bytes, line 775
775function k(X,ce){return function(ge){var K=[],Ce=-1,Ee=0,Ve=X.length,Ke,lt,xt;for(ge instanceof Date||(ge=new Date(+ge));++Ce<Ve;)X.charCodeAt(Ce)===37&&(K.push(X.slice(Ee,Ce)),(lt=XI[Ke=X.charAt(++Ce)])!=null?Ke=X.charAt(++Ce):lt=Ke==="e"?" ":"0",(xt=ce[Ke])&&(Ke=xt(ge,lt)),K.push(Ke),Ee=Ce+1);return K.push(X.slice(Ee,Ce)),K.join("")}}function j(X,ce){return function(ge){var K=Gf(1900,void 0,1),Ce=T(K,X,ge+="",0),Ee,Ve;if(Ce!=ge.length)return null;if("Q"in K)return new Date(K.Q);if("s"in K)return new Date(K.s*1e3+("L"in K?K.L:0));if(ce&&!("Z"in K)&&(K.Z=0),"p"in K&&(K.H=K.H%12+K.p*12),K.m===void 0&&(K.m="q"in K?K.q:0),"V"in K){if(K.V<1||K.V>53)return null;"w"in K||(K.w=1),"Z"in K?(Ee=wS(Gf(K.y,0,1)),Ve=Ee.getUTCDay(),Ee=Ve>4||Ve===0?Rb.ceil(Ee):Rb(Ee),Ee=R0.offset(Ee,(K.V-1)*7),K.y=Ee.getUTCFullYear(),K.m=Ee.getUTCMonth(),K.d=Ee.getUTCDate()+(K.w+6)%7):(Ee=xS(Gf(K.y,0,1)),Ve=Ee.getDay(),Ee=Ve>4||Ve===0?Mb.ceil(Ee):Mb(Ee),Ee=Vm.offset(Ee,(K.V-1)*7),K.y=Ee.getFullYear(),K.m=Ee.getMonth(),K.d=Ee.getDate()+(K.w+6)%7)}else("W"in K||"U"in K)&&("w"in K||(K.w="u"in K?K.u%7:"W"in K?1:0),Ve="Z"in K?wS(Gf(K.y,0,1)).getUTCDay():xS(Gf(K.y,0,1)).getDay(),K.m=0,K.d="W"in K?(K.w+6)%7+K.W*7-(Ve+5)%7:K.w+K.U*7-(Ve+6)%7);return"Z"in K?(K.H+=K.Z/100|0,K.M+=K.Z%100,wS(K)):xS(K)}}function T(X,ce,ge,K){for(var Ce=0,Ee=ce.length,Ve=ge.length,Ke,lt;Ce<Ee;){if(K>=Ve)return-1;if(Ke=ce.charCodeAt(Ce++),Ke===37){if(Ke=ce.charAt(Ce++),lt=w[Ke in XI?ce.charAt(Ce++):Ke],!lt||(K=lt(X,ge,K))<0)return-1}else if(Ke!=ge.charCodeAt(K++))return-1}return K}function _(X,ce,ge){var K=c.exec(ce.slice(ge));return K?(X.p=d.get(K[0].toLowerCase()),ge+K[0].length):-1}function N(X,ce,ge){var K=p.exec(ce.slice(ge));return K?(X.w=g.get(K[0].toLowerCase()),ge+K[0].length):-1}function C(X,ce,ge){var K=f.exec(ce.slice(ge));return K?(X.w=h.get(K[0].toLowerCase()),ge+K[0].length):-1}function O(X,ce,ge){var K=y.exec(ce.slice(ge));return K?(X.m=b.get(K[0].toLowerCase()),ge+K[0].length):-1}function I(X,ce,ge){var K=m.exec(ce.slice(ge));return K?(X.m=v.get(K[0].toLowerCase()),ge+K[0].length):-1}function P(X,ce,ge){return T(X,e,ce,ge)}function $(X,ce,ge){return T(X,n,ce,ge)}function B(X,ce,ge){return T(X,r,ce,ge)}function z(X){return s[X.getDay()]}function R(X){return o[X.getDay()]}function L(X){return l[X.getMonth()]}function q(X){return a[X.getMonth()]}function G(X){return i[+(X.getHours()>=12)]}function V(X){return 1+~~(X.getMonth()/3)}function Y(X){return s[X.getUTCDay()]}function pe(X){return o[X.getUTCDay()]}function me(X){return l[X.getUTCMonth()]}function Ue(X){return a[X.getUTCMonth()]}function H(X){return i[+(X.getUTCHours()>=12)]}function de(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var ce=k(X+="",x);return ce.toString=function(){return X},ce},parse:function(X){var ce=j(X+="",!1);return ce.toString=function(){return X},ce},utcFormat:function(X){var ce=k(X+="",S);return ce.toString=function(){return X},ce},utcParse:function(X){var ce=j(X+="",!0);return ce.toString=function(){return X},ce}}}var XI={"-":"",_:" ",0:"0"},Dn=/^\s*\d+/,e_e=/^%/,t_e=/[\\^$*+?|[\]().{}]/g;function rt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function n_e(t){return t.replace(t_e,"\\$&")}function Jf(t){return new RegExp("^(?:"+t.map(n_e).join("|")+")","i")}function Yf(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function r_e(t,e,n){var r=Dn.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function i_e(t,e,n){var r=Dn.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function o_e(t,e,n){var r=Dn.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function s_e(t,e,n){var r=Dn.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function a_e(t,e,n){var r=Dn.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function QI(t,e,n){var r=Dn.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ZI(t,e,n){var r=Dn.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function l_e(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function c_e(t,e,n){var r=Dn.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function u_e(t,e,n){var r=Dn.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function eD(t,e,n){var r=Dn.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}
775function d_e(t,e,n){var r=Dn.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function tD(t,e,n){var r=Dn.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function f_e(t,e,n){var r=Dn.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function h_e(t,e,n){var r=Dn.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function p_e(t,e,n){var r=Dn.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function m_e(t,e,n){var r=Dn.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function g_e(t,e,n){var r=e_e.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function v_e(t,e,n){var r=Dn.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function y_e(t,e,n){var r=Dn.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function nD(t,e){return rt(t.getDate(),e,2)}function b_e(t,e){return rt(t.getHours(),e,2)}function x_e(t,e){return rt(t.getHours()%12||12,e,2)}function w_e(t,e){return rt(1+Vm.count(zs(t),t),e,3)}function oU(t,e){return rt(t.getMilliseconds(),e,3)}function S_e(t,e){return oU(t,e)+"000"}function k_e(t,e){return rt(t.getMonth()+1,e,2)}function E_e(t,e){return rt(t.getMinutes(),e,2)}function j_e(t,e){return rt(t.getSeconds(),e,2)}function T_e(t){var e=t.getDay();return e===0?7:e}function __e(t,e){return rt(I0.count(zs(t)-1,t),e,2)}function sU(t){var e=t.getDay();return e>=4||e===0?Md(t):Md.ceil(t)}function A_e(t,e){return t=sU(t),rt(Md.count(zs(t),t)+(zs(t).getDay()===4),e,2)}function N_e(t){return t.getDay()}function C_e(t,e){return rt(Mb.count(zs(t)-1,t),e,2)}function O_e(t,e){return rt(t.getFullYear()%100,e,2)}function P_e(t,e){return t=sU(t),rt(t.getFullYear()%100,e,2)}function M_e(t,e){return rt(t.getFullYear()%1e4,e,4)}function R_e(t,e){var n=t.getDay();return t=n>=4||n===0?Md(t):Md.ceil(t),rt(t.getFullYear()%1e4,e,4)}function I_e(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+rt(e/60|0,"0",2)+rt(e%60,"0",2)}function rD(t,e){return rt(t.getUTCDate(),e,2)}function D_e(t,e){return rt(t.getUTCHours(),e,2)}function $_e(t,e){return rt(t.getUTCHours()%12||12,e,2)}function L_e(t,e){return rt(1+R0.count(Fs(t),t),e,3)}function aU(t,e){return rt(t.getUTCMilliseconds(),e,3)}function B_e(t,e){return aU(t,e)+"000"}function z_e(t,e){return rt(t.getUTCMonth()+1,e,2)}function F_e(t,e){return rt(t.getUTCMinutes(),e,2)}function q_e(t,e){return rt(t.getUTCSeconds(),e,2)}function U_e(t){var e=t.getUTCDay();return e===0?7:e}function V_e(t,e){return rt(D0.count(Fs(t)-1,t),e,2)}function lU(t){var e=t.getUTCDay();return e>=4||e===0?Rd(t):Rd.ceil(t)}function W_e(t,e){return t=lU(t),rt(Rd.count(Fs(t),t)+(Fs(t).getUTCDay()===4),e,2)}function H_e(t){return t.getUTCDay()}function K_e(t,e){return rt(Rb.count(Fs(t)-1,t),e,2)}function G_e(t,e){return rt(t.getUTCFullYear()%100,e,2)}function J_e(t,e){return t=lU(t),rt(t.getUTCFullYear()%100,e,2)}function Y_e(t,e){return rt(t.getUTCFullYear()%1e4,e,4)}function X_e(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Rd(t):Rd.ceil(t),rt(t.getUTCFullYear()%1e4,e,4)}function Q_e(){return"+0000"}function iD(){return"%"}function oD(t){return+t}function sD(t){return Math.floor(+t/1e3)}var au,cU,uU;Z_e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","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 Z_e(t){return au=ZTe(t),cU=au.format,au.parse,uU=au.utcFormat,au.utcParse,au}function eAe(t){return new Date(t)}function tAe(t){return t instanceof Date?+t:+new Date(+t)}function CN(t,e,n,r,i,o,s,a,l,c){var d=gN(),f=d.invert,h=d.domain,p=c(".%L"),g=c(":%S"),m=c("%I:%M"),v=c("%I %p"),y=c("%a %d"),b=c("%b %d"),x=c("%B"),S=c("%Y");function w(k){return(l(k)<k?p:a(k)<k?g:s(k)<k?m:o(k)<k?v:r(k)<k?i(k)<k?y:b:n(k)<k?x:S)(k)}return d.invert=function(k){return new Date(f(k))},d.domain=function(k){return arguments.length?h(Array.from(k,tAe)):h().map(eAe)},d.ticks=function(k){var j=h();return t(j[0],j[j.length-1],k??10)},d.tickFormat=function(k,j){return j==null?w:c(j)},d.nice=function(k){var j=h();return(!k||typeof k.range!="function")&&(k=e(j[0],j[j.length-1],k??10)),k?h(Y8(j,k)):d},d.copy=function(){return Um(d,CN(t,e,n,r,i,o,s,a,l,c))},d}function nAe(){return Fi.apply(CN(XTe,QTe,zs,AN,I0,Vm,TN,EN,Ql,cU).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function rAe(){return Fi.apply(CN(JTe,YTe,Fs,NN,D0,R0,_N,jN,Ql,uU).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function $0(){var t=0,e=1,n,r,i,o,s=yr,a=!1,l;function c(f){return f==null||isNaN(f=+f)?l:s(i===0?.5:(f=(o(f)-n)*i,a?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([t,e]=f,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(f){return arguments.length?(a=!!f,c):a},c.interpolator=function(f){return arguments.length?(s=f,c):s};function d(f){return function(h){var p,g;return arguments.length?([p,g]=h,s=f(p,g),c):[s(0),s(1)]}}return c.range=d(yf),c.rangeRound=d(mN),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return o=f,n=f(t),r=f(e),i=n===r?0:1/(r-n),c}}function yl(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function dU(){var t=vl($0()(yr));return t.copy=function(){return yl(t,dU())},Ys.apply(t,arguments)}function fU(){var t=bN($0()).domain([1,10]);return t.copy=function(){return yl(t,fU()).base(t.base())},Ys.apply(t,arguments)}function hU(){var t=xN($0());return t.copy=function(){return yl(t,hU()).constant(t.constant())},Ys.apply(t,arguments)}function ON(){var t=wN($0());return t.copy=function(){return yl(t,ON()).exponent(t.exponent())},Ys.apply(t,arguments)}function iAe(){return ON.apply(null,arguments).exponent(.5)}function pU(){var t=[],e=yr;function n(r){if(r!=null&&!isNaN(r=+r))return e((Fm(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(Xa),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Vje(t,o/r))},n.copy=function(){return pU(e).domain(t)},Ys.apply(n,arguments)}function L0(){var t=0,e=.5,n=1,r=1,i,o,s,a,l,c=yr,d,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+d(m))-o)*(r*m<r*o?a:l),c(f?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([t,e,n]=m,i=d(t=+t),o=d(e=+e),s=d(n=+n),a=i===o?0:.5/(o-i),l=o===s?0:.5/(s-o),r=o<i?-1:1,p):[t,e,n]},p.clamp=function(m){return arguments.length?(f=!!m,p):f},p.interpolator=function(m){return arguments.length?(c=m,p):c};function g(m){return function(v){var y,b,x;return arguments.length?([y,b,x]=v,c=gTe(m,[y,b,x]),p):[c(0),c(.5),c(1)]}}return p.range=g(yf),p.rangeRound=g(mN),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return d=m,i=m(t),o=m(e),s=m(n),a=i===o?0:.5/(o-i),l=o===s?0:.5/(s-o),r=o<i?-1:1,p}}function mU(){var t=vl(L0()(yr));return t.copy=function(){return yl(t,mU())},Ys.apply(t,arguments)}function gU(){var t=bN(L0()).domain([.1,1,10]);return t.copy=function(){return yl(t,gU()).base(t.base())},Ys.apply(t,arguments)}function vU(){var t=xN(L0());return t.copy=function(){return yl(t,vU()).constant(t.constant())},Ys.apply(t,arguments)}function PN(){var t=wN(L0());return t.copy=function(){return yl(t,PN()).exponent(t.exponent())},Ys.apply(t,arguments)}function oAe(){return PN.apply(null,arguments).exponent(.5)}const aD=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Kp,scaleDiverging:mU,scaleDivergingLog:gU,scaleDivergingPow:PN,scaleDivergingSqrt:oAe,scaleDivergingSymlog:vU,scaleIdentity:J8,scaleImplicit:xj,scaleLinear:Ob,scaleLog:X8,scaleOrdinal:fN,scalePoint:Fh,scalePow:SN,scaleQuantile:eU,scaleQuantize:tU,scaleRadial:Z8,scaleSequential:dU,scaleSequentialLog:fU,scaleSequentialPow:ON,scaleSequentialQuantile:pU,scaleSequentialSqrt:iAe,scaleSequentialSymlog:hU,scaleSqrt:BTe,scaleSymlog:Q8,scaleThreshold:nU,scaleTime:nAe,scaleUtc:rAe,tickFormat:G8},Symbol.toStringTag,{value:"Module"}));var sAe=uf;function aAe(t,e,n){for(var r=-1,i=t.length;++r<i;
vendor: 62,845 bytes, lines 775-802
775){var o=t[r],s=e(o);if(s!=null&&(a===void 0?s===s&&!sAe(s):n(s,a)))var a=s,l=o}return l}var B0=aAe;function lAe(t,e){return t>e}var yU=lAe,cAe=B0,uAe=yU,dAe=vf;function fAe(t){return t&&t.length?cAe(t,dAe,uAe):void 0}var hAe=fAe;const z0=ht(hAe);function pAe(t,e){return t<e}var bU=pAe,mAe=B0,gAe=bU,vAe=vf;function yAe(t){return t&&t.length?mAe(t,vAe,gAe):void 0}var bAe=yAe;const F0=ht(bAe);var xAe=WA,wAe=gl,SAe=_8,kAe=Vr;function EAe(t,e){var n=kAe(t)?xAe:SAe;return n(t,wAe(e))}var jAe=EAe,TAe=j8,_Ae=jAe;function AAe(t,e){return TAe(_Ae(t,e),1)}var NAe=AAe;const CAe=ht(NAe);var OAe=aN;function PAe(t,e){return OAe(t,e)}var MAe=PAe;const q0=ht(MAe);var bf=1e9,RAe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},RN,Dt=!0,Li="[DecimalError] ",vc=Li+"Invalid argument: ",MN=Li+"Exponent out of range: ",xf=Math.floor,Dl=Math.pow,IAe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ei,Cn=1e7,Pt=7,xU=9007199254740991,Ib=xf(xU/Pt),ye={};ye.absoluteValue=ye.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};ye.comparedTo=ye.cmp=function(t){var e,n,r,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(r=o.d.length,i=t.d.length,e=0,n=r<i?r:i;e<n;++e)if(o.d[e]!==t.d[e])return o.d[e]>t.d[e]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};ye.decimalPlaces=ye.dp=function(){var t=this,e=t.d.length-1,n=(e-t.e)*Pt;if(e=t.d[e],e)for(;e%10==0;e/=10)n--;return n<0?0:n};ye.dividedBy=ye.div=function(t){return Ns(this,new this.constructor(t))};ye.dividedToIntegerBy=ye.idiv=function(t){var e=this,n=e.constructor;return bt(Ns(e,new n(t),0,1),n.precision)};ye.equals=ye.eq=function(t){return!this.cmp(t)};ye.exponent=function(){return yn(this)};ye.greaterThan=ye.gt=function(t){return this.cmp(t)>0};ye.greaterThanOrEqualTo=ye.gte=function(t){return this.cmp(t)>=0};ye.isInteger=ye.isint=function(){return this.e>this.d.length-2};ye.isNegative=ye.isneg=function(){return this.s<0};ye.isPositive=ye.ispos=function(){return this.s>0};ye.isZero=function(){return this.s===0};ye.lessThan=ye.lt=function(t){return this.cmp(t)<0};ye.lessThanOrEqualTo=ye.lte=function(t){return this.cmp(t)<1};ye.logarithm=ye.log=function(t){var e,n=this,r=n.constructor,i=r.precision,o=i+5;if(t===void 0)t=new r(10);else if(t=new r(t),t.s<1||t.eq(ei))throw Error(Li+"NaN");if(n.s<1)throw Error(Li+(n.s?"NaN":"-Infinity"));return n.eq(ei)?new r(0):(Dt=!1,e=Ns(Qp(n,o),Qp(t,o),o),Dt=!0,bt(e,i))};ye.minus=ye.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?kU(e,t):wU(e,(t.s=-t.s,t))};ye.modulo=ye.mod=function(t){var e,n=this,r=n.constructor,i=r.precision;if(t=new r(t),!t.s)throw Error(Li+"NaN");return n.s?(Dt=!1,e=Ns(n,t,0,1).times(t),Dt=!0,n.minus(e)):bt(new r(n),i)};ye.naturalExponential=ye.exp=function(){return SU(this)};ye.naturalLogarithm=ye.ln=function(){return Qp(this)};ye.negated=ye.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};ye.plus=ye.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?wU(e,t):kU(e,(t.s=-t.s,t))};ye.precision=ye.sd=function(t){var e,n,r,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(vc+t);if(e=yn(i)+1,r=i.d.length-1,n=r*Pt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return t&&e>n?e:n};ye.squareRoot=ye.sqrt=function(){var t,e,n,r,i,o,s,a=this,l=a.constructor;if(a.s<1){if(!a.s)return new l(0);throw Error(Li+"NaN")}for(t=yn(a),Dt=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=Ro(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=xf((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),r=new l(e)):r=new l(i.toString()),n=l.precision,i=s=n+3;;)if(o=r,r=o.plus(Ns(a,o,s+2)).times(.5),Ro(o.d).slice(0,s)===(e=Ro(r.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(bt(o,n+1,0),o.times(o).eq(a)){r=o;break}}else if(e!="9999")break;s+=4}return Dt=!0,bt(r,n)};ye.times=ye.mul=function(t){var e,n,r,i,o,s,a,l,c,d=this,f=d.constructor,h=d.d,p=(t=new f(t)).d;if(!d.s||!t.s)return new f(0);for(t.s*=d.s,n=d.e+t.e,l=h.length,c=p.length,l<c&&(o=h,h=p,p=o,s=l,l=c,c=s),o=[],s=l+c,r=s;r--;)o.push(0);for(r=c;--r>=0;){for(e=0,i=l+r;i>r;)a=o[i]+p[r]*h[i-r-1]+e,o[i--]=a%Cn|0,e=a/Cn|0;o[i]=(o[i]+e)%Cn|0}for(;!o[--s];)o.pop();return e?++n:o.shift(),t.d=o,t.e=n,Dt?bt(t,f.precision):t};ye.toDecimalPlaces=ye.todp=function(t,e){var n=this,r=n.constructor;return n=new r(n),t===void 0?n:(Go(t,0,bf),e===void 0?e=r.rounding:Go(e,0,8),bt(n,t+yn(n)+1,e))};ye.toExponential=function(t,e){var n,r=this,i=r.constructor;return t===void 0?n=Rc(r,!0):(Go(t,0,bf),e===void 0?e=i.rounding:Go(e,0,8),r=bt(new i(r),t+1,e),n=Rc(r,!0,t+1)),n};ye.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return t===void 0?Rc(i):(Go(t,0,bf),e===void 0?e=o.rounding:Go(e,0,8),r=bt(new o(i),t+yn(i)+1,e),n=Rc(r.abs(),!1,t+yn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ye.toInteger=ye.toint=function(){var t=this,e=t.constructor;return bt(new e(t),yn(t)+1,e.rounding)};ye.toNumber=function(){return+this};ye.toPower=ye.pow=function(t){var e,n,r,i,o,s,a=this,l=a.constructor,c=12,d=+(t=new l(t));if(!t.s)return new l(ei);if(a=new l(a),!a.s){if(t.s<1)throw Error(Li+"Infinity");return a}if(a.eq(ei))return a;if(r=l.precision,t.eq(ei))return bt(a,r);if(e=t.e,n=t.d.length-1,s=e>=n,o=a.s,s){if((n=d<0?-d:d)<=xU){for(i=new l(ei),e=Math.ceil(r/Pt+4),Dt=!1;n%2&&(i=i.times(a),cD(i.d,e)),n=xf(n/2),n!==0;)a=a.times(a),cD(a.d,e);return Dt=!0,t.s<0?new l(ei).div(i):bt(i,r)}}else if(o<0)throw Error(Li+"NaN");return o=o<0&&t.d[Math.max(e,n)]&1?-1:1,a.s=1,Dt=!1,i=t.times(Qp(a,r+c)),Dt=!0,i=SU(i),i.s=o,i};ye.toPrecision=function(t,e){var n,r,i=this,o=i.constructor;return t===void 0?(n=yn(i),r=Rc(i,n<=o.toExpNeg||n>=o.toExpPos)):(Go(t,1,bf),e===void 0?e=o.rounding:Go(e,0,8),i=bt(new o(i),t,e),n=yn(i),r=Rc(i,t<=n||n<=o.toExpNeg,t)),r};ye.toSignificantDigits=ye.tosd=function(t,e){var n=this,r=n.constructor;return t===void 0?(t=r.precision,e=r.rounding):(Go(t,1,bf),e===void 0?e=r.rounding:Go(e,0,8)),bt(new r(n),t,e)};ye.toString=ye.valueOf=ye.val=ye.toJSON=ye[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=yn(t),n=t.constructor;return Rc(t,e<=n.toExpNeg||e>=n.toExpPos)};function wU(t,e){var n,r,i,o,s,a,l,c,d=t.constructor,f=d.precision;if(!t.s||!e.s)return e.s||(e=new d(t)),Dt?bt(e,f):e;if(l=t.d,c=e.d,s=t.e,i=e.e,l=l.slice(),o=s-i,o){for(o<0?(r=l,o=-o,a=c.length):(r=c,i=s,a=l.length),s=Math.ceil(f/Pt),a=s>a?s+1:a+1,o>a&&(o=a,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(a=l.length,o=c.length,a-o<0&&(o=a,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/Cn|0,l[o]%=Cn;for(n&&(l.unshift(n),++i),a=l.length;l[--a]==0;)l.pop();return e.d=l,e.e=i,Dt?bt(e,f):e}function Go(t,e,n){if(t!==~~t||t<e||t>n)throw Error(vc+t)}function Ro(t){var e,n,r,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e<i;e++)r=t[e]+"",n=Pt-r.length,n&&(o+=pa(n)),o+=r;s=t[e],r=s+"",n=Pt-r.length,n&&(o+=pa(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}var Ns=function(){function t(r,i){var o,s=0,a=r.length;for(r=r.slice();a--;)o=r[a]*i+s,r[a]=o%Cn|0,s=o/Cn|0;return s&&r.unshift(s),r}function e(r,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;a<o;a++)if(r[a]!=i[a]){l=r[a]>i[a]?1:-1;break}return l}function n(r,i,o){for(var s=0;o--;)r[o]-=s,s=r[o]<i[o]?1:0,r[o]=s*Cn+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,s){var a,l,c,d,f,h,p,g,m,v,y,b,x,S,w,k,j,T,_=r.constructor,N=r.s==i.s?1:-1,C=r.d,O=i.d;if(!r.s)return new _(r);if(!i.s)throw Error(Li+"Division by zero");for(l=r.e-i.e,j=O.length,w=C.length,p=new _(N),g=p.d=[],c=0;O[c]==(C[c]||0);)++c;if(O[c]>(C[c]||0)&&--l,o==null?b=o=_.precision:s?b=o+(yn(r)-yn(i))+1:b=o,b<0)return new _(0);if(b=b/Pt+2|0,c=0,j==1)for(d=0,O=O[0],b++;(c<w||d)&&b--;c++)x=d*Cn+(C[c]||0),g[c]=x/O|0,d=x%O|0;else{for(d=Cn/(O[0]+1)|0,d>1&&(O=t(O,d),C=t(C,d),j=O.length,w=C.length),S=j,m=C.slice(0,j),v=m.length;v<j;)m[v++]=0;T=O.slice(),T.unshift(0),k=O[0],O[1]>=Cn/2&&++k;do d=0,a=e(O,m,j,v),a<0?(y=m[0],j!=v&&(y=y*Cn+(m[1]||0)),d=y/k|0,d>1?(d>=Cn&&(d=Cn-1),f=t(O,d),h=f.length,v=m.length,a=e(f,m,h,v),a==1&&(d--,n(f,j<h?T:O,h))):(d==0&&(a=d=1),f=O.slice()),h=f.length,h<v&&f.unshift(0),n(m,f,v),a==-1&&(v=m.length,a=e(O,m,j,v),a<1&&(d++,n(m,j<v?T:O,v))),v=m.length):a===0&&(d++,m=[0]),g[c++]=d,a&&m[0]?m[v++]=C[S]||0:(m=[C[S]],v=1);while((S++<w||m[0]!==void 0)&&b--)}return g[0]||g.shift(),p.e=l,bt(p,s?o+yn(p)+1:o)}}();function SU(t,e){var n,r,i,o,s,a,l=0,c=0,d=t.constructor,f=d.precision;if(yn(t)>16)throw Error(MN+yn(t));if(!t.s)return new d(ei);for(e==null?(Dt=!1,a=f):a=e,s=new d(.03125);t.abs().gte(.1);)t=t.times(s),c+=5;for(r=Math.log(Dl(2,c))/Math.LN10*2+5|0,a+=r,n=i=o=new d(ei),d.precision=a;;){if(i=bt(i.times(t),a),n=n.times(++l),s=o.plus(Ns(i,n,a)),Ro(s.d).slice(0,a)===Ro(o.d).slice(0,a)){for(;c--;)o=bt(o.times(o),a);return d.precision=f,e==null?(Dt=!0,bt(o,f)):o}o=s}}function yn(t){for(var e=t.e*Pt,n=t.d[0];n>=10;n/=10)e++;return e}function SS(t,e,n){if(e>t.LN10.sd())throw Dt=!0,n&&(t.precision=n),Error(Li+"LN10 precision limit exceeded");return bt(new t(t.LN10),e)}function pa(t){for(var e="";t--;)e+="0";return e}function Qp(t,e){var n,r,i,o,s,a,l,c,d,f=1,h=10,p=t,g=p.d,m=p.constructor,v=m.precision;if(p.s<1)throw Error(Li+(p.s?"NaN":"-Infinity"));if(p.eq(ei))return new m(0);if(e==null?(Dt=!1,c=v):c=e,p.eq(10))return e==null&&(Dt=!0),SS(m,c);if(c+=h,m.precision=c,n=Ro(g),r=n.charAt(0),o=yn(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(t),n=Ro(p.d),r=n.charAt(0),f++;o=yn(p),r>1?(p=new m("0."+n),o++):p=new m(r+"."+n.slice(1))}else return l=SS(m,c+2,v).times(o+""),p=Qp(new m(r+"."+n.slice(1)),c-h).plus(l),m.precision=v,e==null?(Dt=!0,bt(p,v)):p;for(a=s=p=Ns(p.minus(ei),p.plus(ei),c),d=bt(p.times(p),c),i=3;;){if(s=bt(s.times(d),c),l=a.plus(Ns(s,new m(i),c)),Ro(l.d).slice(0,c)===Ro(a.d).slice(0,c))return a=a.times(2),o!==0&&(a=a.plus(SS(m,c+2,v).times(o+""))),a=Ns(a,new m(f),c),m.precision=v,e==null?(Dt=!0,bt(a,v)):a;a=l,i+=2}}function lD(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charCodeAt(r)===48;)++r;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(r,i),e){if(i-=r,n=n-r-1,t.e=xf(n/Pt),t.d=[],r=(n+1)%Pt,n<0&&(r+=Pt),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=Pt;r<i;)t.d.push(+e.slice(r,r+=Pt));e=e.slice(r),r=Pt-e.length}else r-=i;for(;r--;)e+="0";if(t.d.push(+e),Dt&&(t.e>Ib||t.e<-Ib))throw Error(MN+n)}else t.s=0,t.e=0,t.d=[0];return t}function bt(t,e,n){var r,i,o,s,a,l,c,d,f=t.d;for(s=1,o=f[0];o>=10;o/=10)s++;if(r=e-s,r<0)r+=Pt,i=e,c=f[d=0];else{if(d=Math.ceil((r+1)/Pt),o=f.length,d>=o)return t;for(c=o=f[d],s=1;o>=10;o/=10)s++;r%=Pt,i=r-Pt+s}if(n!==void 0&&(o=Dl(10,s-i-1),a=c/o%10|0,l=e<0||f[d+1]!==void 0||c%o,l=n<4?(a||l)&&(n==0||n==(t.s<0?3:2)):a>5||a==5&&(n==4||l||n==6&&(r>0?i>0?c/Dl(10,s-i):0:f[d-1])%10&1||n==(t.s<0?8:7))),e<1||!f[0])return l?(o=yn(t),f.length=1,e=e-o-1,f[0]=Dl(10,(Pt-e%Pt)%Pt),t.e=xf(-e/Pt)||0):(f.length=1,f[0]=t.e=t.s=0),t;if(r==0?(f.length=d,o=1,d--):(f.length=d+1,o=Dl(10,Pt-r),f[d]=i>0?(c/Dl(10,s-i)%Dl(10,i)|0)*o:0),l)for(;;)if(d==0){(f[0]+=o)==Cn&&(f[0]=1,++t.e);break}else{if(f[d]+=o,f[d]!=Cn)break;f[d--]=0,o=1}for(r=f.length;f[--r]===0;)f.pop();if(Dt&&(t.e>Ib||t.e<-Ib))throw Error(MN+yn(t));return t}function kU(t,e){var n,r,i,o,s,a,l,c,d,f,h=t.constructor,p=h.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new h(t),Dt?bt(e,p):e;if(l=t.d,f=e.d,r=e.e,c=t.e,l=l.slice(),s=c-r,s){for(d=s<0,d?(n=l,s=-s,a=f.length):(n=f,r=c,a=l.length),i=Math.max(Math.ceil(p/Pt),a)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=l.length,a=f.length,d=i<a,d&&(a=i),i=0;i<a;i++)if(l[i]!=f[i]){d=l[i]<f[i];break}s=0}for(d&&(n=l,l=f,f=n,e.s=-e.s),a=l.length,i=f.length-a;i>0;--i)l[a++]=0;for(i=f.length;i>s;){if(l[--i]<f[i]){for(o=i;o&&l[--o]===0;)l[o]=Cn-1;--l[o],l[i]+=Cn}l[i]-=f[i]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(e.d=l,e.e=r,Dt?bt(e,p):e):new h(0)}function Rc(t,e,n){var r,i=yn(t),o=Ro(t.d),s=o.length;return e?(n&&(r=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+pa(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+pa(-i-1)+o,n&&(r=n-s)>0&&(o+=pa(r))):i>=s?(o+=pa(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+pa(r))):((r=i+1)<s&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(o+="."),o+=pa(r))),t.s<0?"-"+o:o}function cD(t,e){if(t.length>e)return t.length=e,!0}function EU(t){var e,n,r;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(vc+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return lD(s,o.toString())}else if(typeof o!="string")throw Error(vc+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,IAe.test(o))lD(s,o);else throw Error(vc+o)}if(i.prototype=ye,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=EU,i.config=i.set=DAe,t===void 0&&(t={}),t)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<r.length;)t.hasOwnProperty(n=r[e++])||(t[n]=this[n]);return i.config(t),i}function DAe(t){if(!t||typeof t!="object")throw Error(Li+"Object expected");var e,n,r,i=["precision",1,bf,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((r=t[n=i[e]])!==void 0)if(xf(r)===r&&r>=i[e+1]&&r<=i[e+2])this[n]=r;else throw Error(vc+n+": "+r);if((r=t[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(vc+n+": "+r);return this}var RN=EU(RAe);ei=new RN(1);const mt=RN;function $Ae(t){return FAe(t)||zAe(t)||BAe(t)||LAe()}function LAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 776In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BAe(t,e){if(t){if(typeof t=="string")return Ej(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ej(t,e)}}function zAe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function FAe(t){if(Array.isArray(t))return Ej(t)}function Ej(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var qAe=function(e){return e},jU={"@@functional/placeholder":!0},TU=function(e){return e===jU},uD=function(e){return function n(){return arguments.length===0||arguments.length===1&&TU(arguments.length<=0?void 0:arguments[0])?n:e.apply(void 0,arguments)}},UAe=function t(e,n){return e===1?n:uD(function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=i.filter(function(a){return a!==jU}).length;return s>=e?n.apply(void 0,i):t(e-s,uD(function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];var d=i.map(function(f){return TU(f)?l.shift():f});return n.apply(void 0,$Ae(d).concat(l))}))})},U0=function(e){return UAe(e.length,e)},jj=function(e,n){for(var r=[],i=e;i<n;++i)r[i-e]=i;return r},VAe=U0(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(n){return e[n]}).map(t)}),WAe=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(!n.length)return qAe;var i=n.reverse(),o=i[0],s=i.slice(1);return function(){return s.reduce(function(a,l){return l(a)},o.apply(void 0,arguments))}},Tj=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},_U=function(e){var n=null,r=null;return function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n&&o.every(function(a,l){return a===n[l]})||(n=o,r=e.apply(void 0,o)),r}};function HAe(t){var e;return t===0?e=1:e=Math.floor(new mt(t).abs().log(10).toNumber())+1,e}function KAe(t,e,n){for(var r=new mt(t),i=0,o=[];r.lt(e)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var GAe=U0(function(t,e,n){var r=+t,i=+e;return r+n*(i-r)}),JAe=U0(function(t,e,n){var r=e-+t;return r=r||1/0,(n-t)/r}),YAe=U0(function(t,e,n){var r=e-+t;return r=r||1/0,Math.max(0,Math.min(1,(n-t)/r))});const V0={rangeStep:KAe,getDigitCount:HAe,interpolateNumber:GAe,uninterpolateNumber:JAe,uninterpolateTruncation:YAe};function _j(t){return ZAe(t)||QAe(t)||AU(t)||XAe()}function XAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 777In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QAe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function ZAe(t){if(Array.isArray(t))return Aj(t)}function Zp(t,e){return nNe(t)||tNe(t,e)||AU(t,e)||eNe()}function eNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 778In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AU(t,e){if(t){if(typeof t=="string")return Aj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Aj(t,e)}}function Aj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function tNe(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=t[Symbol.iterator](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!(e&&n.length===e));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function nNe(t){if(Array.isArray(t))return t}function NU(t){var e=Zp(t,2),n=e[0],r=e[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function CU(t,e,n){if(t.lte(0))return new mt(0);var r=V0.getDigitCount(t.toNumber()),i=new mt(10).pow(r),o=t.div(i),s=r!==1?.05:.1,a=new mt(Math.ceil(o.div(s).toNumber())).add(n).mul(s),l=a.mul(i);return e?l:new mt(Math.ceil(l))}function rNe(t,e,n){var r=1,i=new mt(t);if(!i.isint()&&n){var o=Math.abs(t);o<1?(r=new mt(10).pow(V0.getDigitCount(t)-1),i=new mt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new mt(Math.floor(t)))}else t===0?i=new mt(Math.floor((e-1)/2)):n||(i=new mt(Math.floor(t)));var s=Math.floor((e-1)/2),a=WAe(VAe(function(l){return i.add(new mt(l-s).mul(r)).toNumber()}),jj);return a(0,e)}function OU(t,e,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(n-1)))return{step:new mt(0),tickMin:new mt(0),tickMax:new mt(0)};var o=CU(new mt(e).sub(t).div(n-1),r,i),s;t<=0&&e>=0?s=new mt(0):(s=new mt(t).add(e).div(2),s=s.sub(new mt(s).mod(o)));var a=Math.ceil(s.sub(t).div(o).toNumber()),l=Math.ceil(new mt(e).sub(s).div(o).toNumber()),c=a+l+1;return c>n?OU(t,e,n,r,i+1):(c<n&&(l=e>0?l+(n-c):l,a=e>0?a:a+(n-c)),{step:o,tickMin:s.sub(new mt(a).mul(o)),tickMax:s.add(new mt(l).mul(o))})}function iNe(t){var e=Zp(t,2),n=e[0],r=e[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),a=NU([n,r]),l=Zp(a,2),c=l[0],d=l[1];if(c===-1/0||d===1/0){var f=d===1/0?[c].concat(_j(jj(0,i-1).map(function(){return 1/0}))):[].concat(_j(jj(0,i-1).map(function(){return-1/0})),[d]);return n>r?Tj(f):f}if(c===d)return rNe(c,i,o);var h=OU(c,d,s,o),p=h.step,g=h.tickMin,m=h.tickMax,v=V0.rangeStep(g,m.add(new mt(.1).mul(p)),p);return n>r?Tj(v):v}function oNe(t,e){var n=Zp(t,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=NU([r,i]),a=Zp(s,2),l=a[0],c=a[1];if(l===-1/0||c===1/0)return[r,i];if(l===c)return[l];var d=Math.max(e,2),f=CU(new mt(c).sub(l).div(d-1),o,0),h=[].concat(_j(V0.rangeStep(new mt(l),new mt(c).sub(new mt(.99).mul(f)),f)),[c]);return r>i?Tj(h):h}var sNe=_U(iNe),aNe=_U(oNe),lNe="Invariant failed";function Ic(t,e){throw new Error(lNe)}var cNe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Id(t){"@babel/helpers - typeof";return Id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Id(t)}function Db(){return Db=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Db.apply(this,arguments)}function uNe(t,e){return pNe(t)||hNe(t,e)||fNe(t,e)||dNe()}function dNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 779In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fNe(t,e){if(t){if(typeof t=="string")return dD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dD(t,e)}}function dD(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function hNe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function pNe(t){if(Array.isArray(t))return t}function mNe(t,e){if(t==null)return{};var n=gNe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function gNe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function vNe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yNe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,RU(r.key),r)}}function bNe(t,e,n){return e&&yNe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function xNe(t,e,n){return e=$b(e),wNe(t,PU()?Reflect.construct(e,n||[],$b(t).constructor):e.apply(t,n))}function wNe(t,e){if(e&&(Id(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SNe(t)}function SNe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function PU(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PU=function(){return!!t})()}function $b(t){return $b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$b(t)}function kNe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nj(t,e)}function Nj(t,e){return Nj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Nj(t,e)}function MU(t,e,n){return e=RU(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function RU(t){var e=ENe(t,"string");return Id(e)=="symbol"?e:e+""}function ENe(t,e){if(Id(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Id(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var W0=function(t){function e(){return vNe(this,e),xNe(this,e,arguments)}return kNe(e,t),bNe(e,[{key:"render",value:function(){var r=this.props,i=r.offset,o=r.layout,s=r.width,a=r.dataKey,l=r.data,c=r.dataPointFormatter,d=r.xAxis,f=r.yAxis,h=mNe(r,cNe),p=Me(h,!1);this.props.direction==="x"&&d.type!=="number"&&Ic();var g=l.map(function(m){var v=c(m,a),y=v.x,b=v.y,x=v.value,S=v.errorVal;if(!S)return null;var w=[],k,j;if(Array.isArray(S)){var T=uNe(S,2);k=T[0],j=T[1]}else k=j=S;if(o==="vertical"){var _=d.scale,N=b+i,C=N+s,O=N-s,I=_(x-k),P=_(x+j);w.push({x1:P,y1:C,x2:P,y2:O}),w.push({x1:I,y1:N,x2:P,y2:N}),w.push({x1:I,y1:C,x2:I,y2:O})}else if(o==="horizontal"){var $=f.scale,B=y+i,z=B-s,R=B+s,L=$(x-k),q=$(x+j);w.push({x1:z,y1:q,x2:R,y2:q}),w.push({x1:B,y1:L,x2:B,y2:q}),w.push({x1:z,y1:L,x2:R,y2:L})}return A.createElement(dt,Db({className:"recharts-errorBar",key:"bar-".concat(w.map(function(G){return"".concat(G.x1,"-").concat(G.x2,"-").concat(G.y1,"-").concat(G.y2)}))},p),w.map(function(G){return A.createElement("line",Db({},G,{key:"line-".concat(G.x1,"-").concat(G.x2,"-").concat(G.y1,"-").concat(G.y2)}))}))});return A.createElement(dt,{className:"recharts-errorBars"},g)}}])}(A.Component);MU(W0,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});MU(W0,"displayName","ErrorBar");function em(t){"@babel/helpers - typeof";return em=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},em(t)}function fD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _l(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fD(Object(n),!0).forEach(function(r){jNe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jNe(t,e,n){return e=TNe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function TNe(t){var e=_Ne(t,"string");return em(e)=="symbol"?e:e+""}function _Ne(t,e){if(em(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(em(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var IU=function(e){var n=e.children,r=e.formattedGraphicalItems,i=e.legendWidth,o=e.legendContent,s=Jr(n,Ya);if(!s)return null;var a=Ya.defaultProps,l=a!==void 0?_l(_l({},a),s.props):{},c;return s.props&&s.props.payload?c=s.props&&s.props.payload:o==="children"?c=(r||[]).reduce(function(d,f){var h=f.item,p=f.props,g=p.sectors||p.data||[];return d.concat(g.map(function(m){return{type:s.props.iconType||h.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):c=(r||[]).map(function(d){var f=d.item,h=f.type.defaultProps,p=h!==void 0?_l(_l({},h),f.props):{},g=p.dataKey,m=p.name,v=p.legendType,y=p.hide;return{inactive:y,dataKey:g,type:l.iconType||v||"square",color:IN(f),value:m||g,payload:p}}),_l(_l(_l({},l),Ya.getWithHeight(s,i)),{},{payload:c,item:s})};function tm(t){"@babel/helpers - typeof";return tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tm(t)}function hD(t){return ONe(t)||CNe(t)||NNe(t)||ANe()}function ANe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 780In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NNe(t,e){if(t){if(typeof t=="string")return Cj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cj(t,e)}}function CNe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function ONe(t){if(Array.isArray(t))return Cj(t)}function Cj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function pD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Jt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?pD(Object(n),!0).forEach(function(r){Xu(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Xu(t,e,n){return e=PNe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function PNe(t){var e=MNe(t,"string");return tm(e)=="symbol"?e:e+""}function MNe(t,e){if(tm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(tm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function or(t,e,n){return Ye(t)||Ye(e)?n:Tn(e)?ii(t,e,n):ze(e)?e(t):n}function qh(t,e,n,r){var i=CAe(t,function(a){return or(a,e)});if(n==="number"){var o=i.filter(function(a){return ae(a)||parseFloat(a)});return o.length?[F0(o),z0(o)]:[1/0,-1/0]}var s=r?i.filter(function(a){return!Ye(a)}):i;return s.map(function(a){return Tn(a)||a instanceof Date?a:""})}var RNe=function(e){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=-1,a=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(a<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var l=o.range,c=0;c<a;c++){var d=c>0?i[c-1].coordinate:i[a-1].coordinate,f=i[c].coordinate,h=c>=a-1?i[0].coordinate:i[c+1].coordinate,p=void 0;if(gr(f-d)!==gr(h-f)){var g=[];if(gr(h-f)===gr(l[1]-l[0])){p=h;var m=f+l[1]-l[0];g[0]=Math.min(m,(m+d)/2),g[1]=Math.max(m,(m+d)/2)}else{p=d;var v=h+l[1]-l[0];g[0]=Math.min(f,(v+f)/2),g[1]=Math.max(f,(v+f)/2)}var y=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(e>y[0]&&e<=y[1]||e>=g[0]&&e<=g[1]){s=i[c].index;break}}else{var b=Math.min(d,h),x=Math.max(d,h);if(e>(b+f)/2&&e<=(x+f)/2){s=i[c].index;break}}}else for(var S=0;S<a;S++)if(S===0&&e<=(r[S].coordinate+r[S+1].coordinate)/2||S>0&&S<a-1&&e>(r[S].coordinate+r[S-1].coordinate)/2&&e<=(r[S].coordinate+r[S+1].coordinate)/2||S===a-1&&e>(r[S].coordinate+r[S-1].coordinate)/2){s=r[S].index;break}return s},IN=function(e){var n,r=e,i=r.type.displayName,o=(n=e.type)!==null&&n!==void 0&&n.defaultProps?Jt(Jt({},e.type.defaultProps),e.props):e.props,s=o.stroke,a=o.fill,l;switch(i){case"Line":l=s;break;case"Area":case"Radar":l=s&&s!=="none"?s:a;break;default:l=a;break}return l},INe=function(e){var n=e.barSize,r=e.totalSize,i=e.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var s={},a=Object.keys(o),l=0,c=a.length;l<c;l++)for(var d=o[a[l]].stackGroups,f=Object.keys(d),h=0,p=f.length;h<p;h++){var g=d[f[h]],m=g.items,v=g.cateAxisId,y=m.filter(function(j){return Ts(j.type).indexOf("Bar")>=0});if(y&&y.length){var b=y[0].type.defaultProps,x=b!==void 0?Jt(Jt({},b),y[0].props):y[0].props,S=x.barSize,w=x[v];s[w]||(s[w]=[]);var k=Ye(S)?n:S;s[w].push({item:y[0],stackList:y.slice(1),barSize:Ye(k)?void 0:vr(k,r,0)})}}return s},DNe=function(e){var n=e.barGap,r=e.barCategoryGap,i=e.bandSize,o=e.sizeList,s=o===void 0?[]:o,a=e.maxBarSize,l=s.length;if(l<1)return null;var c=vr(n,i,0,!0),d,f=[];if(s[0].barSize===+s[0].barSize){var h=!1,p=i/l,g=s.reduce(function(S,w){return S+w.barSize||0},0);g+=(l-1)*c,g>=i&&(g-=(l-1)*c,c=0),g>=i&&p>0&&(h=!0,p*=.9,g=l*p);var m=(i-g)/2>>0,v={offset:m-c,size:0};d=s.reduce(function(S,w){var k={item:w.item,position:{offset:v.offset+v.size+c,size:h?p:w.barSize}},j=[].concat(hD(S),[k]);return v=j[j.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(T){j.push({item:T,position:v})}),j},f)}else{var y=vr(r,i,0,!0);i-2*y-(l-1)*c<=0&&(c=0);var b=(i-2*y-(l-1)*c)/l;b>1&&(b>>=0);var x=a===+a?Math.min(b,a):b;d=s.reduce(function(S,w,k){var j=[].concat(hD(S),[{item:w.item,position:{offset:y+(b+c)*k+(b-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(T){j.push({item:T,position:j[j.length-1].position})}),j},f)}return d},$Ne=function(e,n,r,i){var o=r.children,s=r.width,a=r.margin,l=s-(a.left||0)-(a.right||0),c=IU({children:o,legendWidth:l});if(c){var d=i||{},f=d.width,h=d.height,p=c.align,g=c.verticalAlign,m=c.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&p!=="center"&&ae(e[p]))return Jt(Jt({},e),{},Xu({},p,e[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&g!=="middle"&&ae(e[g]))return Jt(Jt({},e),{},Xu({},g,e[g]+(h||0)))}return e},LNe=function(e,n,r){return Ye(n)?!0:e==="horizontal"?n==="yAxis":e==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},DU=function(e,n,r,i,o){var s=n.props.children,a=Ri(s,W0).filter(function(c){return LNe(i,o,c.props.direction)});if(a&&a.length){var l=a.map(function(c){return c.props.dataKey});return e.reduce(function(c,d){var f=or(d,r);if(Ye(f))return c;var h=Array.isArray(f)?[F0(f),z0(f)]:[f,f],p=l.reduce(function(g,m){var v=or(d,m,0),y=h[0]-Math.abs(Array.isArray(v)?v[0]:v),b=h[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(y,g[0]),Math.max(b,g[1])]},[1/0,-1/0]);return[Math.min(p[0],c[0]),Math.max(p[1],c[1])]},[1/0,-1/0])}return null},BNe=function(e,n,r,i,o){var s=n.map(function(a){return DU(e,a,r,o,i)}).filter(function(a){return!Ye(a)});return s&&s.length?s.reduce(function(a,l){return[Math.min(a[0],l[0]),Math.max(a[1],l[1])]},[1/0,-1/0]):null},$U=function(e,n,r,i,o){var s=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&DU(e,l,c,i)||qh(e,c,r,o)});if(r==="number")return s.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var a={};return s.reduce(function(l,c){for(var d=0,f=c.length;d<f;d++)a[c[d]]||(a[c[d]]=!0,l.push(c[d]));return l},[])},LU=function(e,n){return e==="horizontal"&&n==="xAxis"||e==="vertical"&&n==="yAxis"||e==="centric"&&n==="angleAxis"||e==="radial"&&n==="radiusAxis"},Zl=function(e,n,r){if(!e)return null;var i=e.scale,o=e.duplicateDomain,s=e.type,a=e.range,l=e.realScaleType==="scaleBand"?i.bandwidth()/2:2,c=(n||r)&&s==="category"&&i.bandwidth?i.bandwidth()/l:0;if(c=e.axisType==="angleAxis"&&(a==null?void 0:a.length)>=2?gr(a[0]-a[1])*2*c:c,n&&(e.ticks||e.niceTicks)){var d=(e.ticks||e.niceTicks).map(function(f){var h=o?o.indexOf(f):f;return{coordinate:i(h)+c,value:f,offset:c}});return d.filter(function(f){return!Bm(f.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(f,h){return{coordinate:i(f)+c,value:f,index:h,offset:c}}):i.ticks&&!r?i.ticks(e.tickCount).map(function(f){return{coordinate:i(f)+c,value:f,offset:c}}):i.domain().map(function(f,h){return{coordinate:i(f)+c,value:o?o[f]:f,index:h,offset:c}})},kS=new WeakMap,Xg=function(e,n){if(typeof n!="function")return e;kS.has(e)||kS.set(e,new WeakMap);var r=kS.get(e);if(r.has(n))return r.get(n);var i=function(){e.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},BU=function(e,n,r){var i=e.scale,o=e.type,s=e.layout,a=e.axisType;if(i==="auto")return s==="radial"&&a==="radiusAxis"?{scale:Kp(),realScaleType:"band"}:s==="radial"&&a==="angleAxis"?{scale:Ob(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Fh(),realScaleType:"point"}:o==="category"?{scale:Kp(),realScaleType:"band"}:{scale:Ob(),realScaleType:"linear"};if(Oc(i)){var l="scale".concat(j0(i));return{scale:(aD[l]||Fh)(),realScaleType:aD[l]?l:"point"}}return ze(i)?{scale:i}:{scale:Fh(),realScaleType:"point"}},mD=1e-4,zU=function(e){var n=e.domain();if(!(!n||n.length<=2)){var r=n.length,i=e.range(),o=Math.min(i[0],i[1])-mD,s=Math.max(i[0],i[1])+mD,a=e(n[0]),l=e(n[r-1]);(a<o||a>s||l<o||l>s)&&e.domain([n[0],n[r-1]])}},zNe=function(e,n){if(!e)return null;for(var r=0,i=e.length;r<i;r++)if(e[r].item===n)return e[r].position;return null},FNe=function(e,n){if(!n||n.length!==2||!ae(n[0])||!ae(n[1]))return e;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),o=[e[0],e[1]];return(!ae(e[0])||e[0]<r)&&(o[0]=r),(!ae(e[1])||e[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},qNe=function(e){var n=e.length;if(!(n<=0))for(var r=0,i=e[0].length;r<i;++r)for(var o=0,s=0,a=0;a<n;++a){var l=Bm(e[a][r][1])?e[a][r][0]:e[a][r][1];l>=0?(e[a][r][0]=o,e[a][r][1]=o+l,o=e[a][r][1]):(e[a][r][0]=s,e[a][r][1]=s+l,s=e[a][r][1])}},UNe=function(e){var n=e.length;if(!(n<=0))for(var r=0,i=e[0].length;r<i;++r)for(var o=0,s=0;s<n;++s){var a=Bm(e[s][r][1])?e[s][r][0]:e[s][r][1];a>=0?(e[s][r][0]=o,e[s][r][1]=o+a,o=e[s][r][1]):(e[s][r][0]=0,e[s][r][1]=0)}},VNe={sign:qNe,expand:lye,none:_d,silhouette:cye,wiggle:uye,positive:UNe},WNe=function(e,n,r){var i=n.map(function(a){return a.props.dataKey}),o=VNe[r],s=aye().keys(i).value(function(a,l){return+or(a,l,0)}).order(tj).offset(o);return s(e)},HNe=function(e,n,r,i,o,s){if(!e)return null;var a=s?n.reverse():n,l={},c=a.reduce(function(f,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?Jt(Jt({},h.type.defaultProps),h.props):h.props,m=g.stackId,v=g.hide;if(v)return f;var y=g[r],b=f[y]||{hasStack:!1,stackGroups:{}};if(Tn(m)){var x=b.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};x.items.push(h),b.hasStack=!0,b.stackGroups[m]=x}else b.stackGroups[zm("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return Jt(Jt({},f),{},Xu({},y,b))},l),d={};return Object.keys(c).reduce(function(f,h){var p=c[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,v){var y=p.stackGroups[v];return Jt(Jt({},m),{},Xu({},v,{numericAxisId:r,cateAxisId:i,items:y.items,stackedData:WNe(e,y.items,o)}))},g)}return Jt(Jt({},f),{},Xu({},h,p))},d)},FU=function(e,n){var r=n.realScaleType,i=n.type,o=n.tickCount,s=n.originalDomain,a=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(o&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var c=e.domain();if(!c.length)return null;var d=sNe(c,o,a);return e.domain([F0(d),z0(d)]),{niceTicks:d}}if(o&&i==="number"){var f=e.domain(),h=aNe(f,o,a);return{niceTicks:h}}return null},gD=function(e){var n=e.axis,r=e.ticks,i=e.offset,o=e.bandSize,s=e.entry,a=e.index;if(n.type==="category")return r[a]?r[a].coordinate+i:null;var l=or(s,n.dataKey,n.domain[a]);return Ye(l)?null:n.scale(l)-o/2+i},KNe=function(e){var n=e.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},GNe=function(e,n){var r,i=(r=e.type)!==null&&r!==void 0&&r.defaultProps?Jt(Jt({},e.type.defaultProps),e.props):e.props,o=i.stackId;if(Tn(o)){var s=n[o];if(s){var a=s.items.indexOf(e);return a>=0?s.stackedData[a]:null}}return null},JNe=function(e){return e.reduce(function(n,r){return[F0(r.concat([n[0]]).filter(ae)),z0(r.concat([n[1]]).filter(ae))]},[1/0,-1/0])},qU=function(e,n,r){return Object.keys(e).reduce(function(i,o){var s=e[o],a=s.stackedData,l=a.reduce(function(c,d){var f=JNe(d.slice(n,r+1));return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},vD=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yD=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Oj=function(e,n,r){if(ze(e))return e(n,r);if(!Array.isArray(e))return n;var i=[];if(ae(e[0]))i[0]=r?e[0]:Math.min(e[0],n[0]);else if(vD.test(e[0])){var o=+vD.exec(e[0])[1];i[0]=n[0]-o}else ze(e[0])?i[0]=e[0](n[0]):i[0]=n[0];if(ae(e[1]))i[1]=r?e[1]:Math.max(e[1],n[1]);else if(yD.test(e[1])){var s=+yD.exec(e[1])[1];i[1]=n[1]+s}else ze(e[1])?i[1]=e[1](n[1]):i[1]=n[1];return i},Lb=function(e,n,r){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!r||i>0)return i}if(e&&n&&n.length>=2){for(var o=cN(n,function(f){return f.coordinate}),s=1/0,a=1,l=o.length;a<l;a++){var c=o[a],d=o[a-1];s=Math.min((c.coordinate||0)-(d.coordinate||0),s)}return s===1/0?0:s}return r?void 0:0},bD=function(e,n,r){return!e||!e.length||q0(e,ii(r,"type.defaultProps.domain"))?n:e},UU=function(e,n){var r=e.type.defaultProps?Jt(Jt({},e.type.defaultProps),e.props):e.props,i=r.dataKey,o=r.name,s=r.unit,a=r.formatter,l=r.tooltipType,c=r.chartType,d=r.hide;return Jt(Jt({},Me(e,!1)),{},{dataKey:i,unit:s,formatter:a,name:o||i,color:IN(e),value:or(n,i),type:l,payload:n,chartType:c,hide:d})};function nm(t){"@babel/helpers - typeof";return nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nm(t)}function xD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function fs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xD(Object(n),!0).forEach(function(r){VU(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function VU(t,e,n){return e=YNe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function YNe(t){var e=XNe(t,"string");return nm(e)=="symbol"?e:e+""}function XNe(t,e){if(nm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(nm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function QNe(t,e){return nCe(t)||tCe(t,e)||eCe(t,e)||ZNe()}function ZNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 781In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eCe(t,e){if(t){if(typeof t=="string")return wD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wD(t,e)}}function wD(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function tCe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function nCe(t){if(Array.isArray(t))return t}var Bb=Math.PI/180,rCe=function(e){return e*180/Math.PI},_t=function(e,n,r,i){return{x:e+Math.cos(-Bb*i)*r,y:n+Math.sin(-Bb*i)*r}},WU=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},iCe=function(e,n,r,i,o){var s=e.width,a=e.height,l=e.startAngle,c=e.endAngle,d=vr(e.cx,s,s/2),f=vr(e.cy,a,a/2),h=WU(s,a,r),p=vr(e.innerRadius,h,0),g=vr(e.outerRadius,h,h*.8),m=Object.keys(n);return m.reduce(function(v,y){var b=n[y],x=b.domain,S=b.reversed,w;if(Ye(b.range))i==="angleAxis"?w=[l,c]:i==="radiusAxis"&&(w=[p,g]),S&&(w=[w[1],w[0]]);else{w=b.range;var k=w,j=QNe(k,2);l=j[0],c=j[1]}var T=BU(b,o),_=T.realScaleType,N=T.scale;N.domain(x).range(w),zU(N);var C=FU(N,fs(fs({},b),{},{realScaleType:_})),O=fs(fs(fs({},b),C),{},{range:w,radius:g,realScaleType:_,scale:N,cx:d,cy:f,innerRadius:p,outerRadius:g,startAngle:l,endAngle:c});return fs(fs({},v),{},VU({},y,O))},{})},oCe=function(e,n){var r=e.x,i=e.y,o=n.x,s=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-s,2))},sCe=function(e,n){var r=e.x,i=e.y,o=n.cx,s=n.cy,a=oCe({x:r,y:i},{x:o,y:s});if(a<=0)return{radius:a};var l=(r-o)/a,c=Math.acos(l);return i>s&&(c=2*Math.PI-c),{radius:a,angle:rCe(c),angleInRadian:c}},aCe=function(e){var n=e.startAngle,r=e.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),s=Math.min(i,o);return{startAngle:n-s*360,endAngle:r-s*360}},lCe=function(e,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),s=Math.floor(i/360),a=Math.min(o,s);return e+a*360},SD=function(e,n){var r=e.x,i=e.y,o=sCe({x:r,y:i},n),s=o.radius,a=o.angle,l=n.innerRadius,c=n.outerRadius;if(s<l||s>c)return!1;if(s===0)return!0;var d=aCe(n),f=d.startAngle,h=d.endAngle,p=a,g;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;g=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=f}return g?fs(fs({},n),{},{radius:s,angle:lCe(p,n)}):null},HU=function(e){return!E.isValidElement(e)&&!ze(e)&&typeof e!="boolean"?e.className:""};function rm(t){"@babel/helpers - typeof";return rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rm(t)}var cCe=["offset"];function uCe(t){return pCe(t)||hCe(t)||fCe(t)||dCe()}function dCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 782In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fCe(t,e){if(t){if(typeof t=="string")return Pj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pj(t,e)}}function hCe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function pCe(t){if(Array.isArray(t))return Pj(t)}function Pj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function mCe(t,e){if(t==null)return{};var n=gCe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function gCe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function kD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function wn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kD(Object(n),!0).forEach(function(r){vCe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function vCe(t,e,n){return e=yCe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yCe(t){var e=bCe(t,"string");return rm(e)=="symbol"?e:e+""}function bCe(t,e){if(rm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(rm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function im(){return im=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},im.apply(this,arguments)}var xCe=function(e){var n=e.value,r=e.formatter,i=Ye(e.children)?n:e.children;return ze(r)?r(i):i},wCe=function(e,n){var r=gr(n-e),i=Math.min(Math.abs(n-e),360);return r*i},SCe=function(e,n,r){var i=e.position,o=e.viewBox,s=e.offset,a=e.className,l=o,c=l.cx,d=l.cy,f=l.innerRadius,h=l.outerRadius,p=l.startAngle,g=l.endAngle,m=l.clockWise,v=(f+h)/2,y=wCe(p,g),b=y>=0?1:-1,x,S;i==="insideStart"?(x=p+b*s,S=m):i==="insideEnd"?(x=g-b*s,S=!m):i==="end"&&(x=g+b*s,S=m),S=y<=0?S:!S;var w=_t(c,d,v,x),k=_t(c,d,v,x+(S?1:-1)*359),j="M".concat(w.x,",").concat(w.y,` 783 A`).concat(v,",").concat(v,",0,1,").concat(S?0:1,`, 784 `).concat(k.x,",").concat(k.y),T=Ye(e.id)?zm("recharts-radial-line-"):e.id;return A.createElement("text",im({},r,{dominantBaseline:"central",className:qe("recharts-radial-bar-label",a)}),A.createElement("defs",null,A.createElement("path",{id:T,d:j})),A.createElement("textPath",{xlinkHref:"#".concat(T)},n))},kCe=function(e){var n=e.viewBox,r=e.offset,i=e.position,o=n,s=o.cx,a=o.cy,l=o.innerRadius,c=o.outerRadius,d=o.startAngle,f=o.endAngle,h=(d+f)/2;if(i==="outside"){var p=_t(s,a,c+r,h),g=p.x,m=p.y;return{x:g,y:m,textAnchor:g>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"end"};var v=(l+c)/2,y=_t(s,a,v,h),b=y.x,x=y.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},ECe=function(e){var n=e.viewBox,r=e.parentViewBox,i=e.offset,o=e.position,s=n,a=s.x,l=s.y,c=s.width,d=s.height,f=d>=0?1:-1,h=f*i,p=f>0?"end":"start",g=f>0?"start":"end",m=c>=0?1:-1,v=m*i,y=m>0?"end":"start",b=m>0?"start":"end";if(o==="top"){var x={x:a+c/2,y:l-f*i,textAnchor:"middle",verticalAnchor:p};return wn(wn({},x),r?{height:Math.max(l-r.y,0),width:c}:{})}if(o==="bottom"){var S={x:a+c/2,y:l+d+h,textAnchor:"middle",verticalAnchor:g};return wn(wn({},S),r?{height:Math.max(r.y+r.height-(l+d),0),width:c}:{})}if(o==="left"){var w={x:a-v,y:l+d/2,textAnchor:y,verticalAnchor:"middle"};return wn(wn({},w),r?{width:Math.max(w.x-r.x,0),height:d}:{})}if(o==="right"){var k={x:a+c+v,y:l+d/2,textAnchor:b,verticalAnchor:"middle"};return wn(wn({},k),r?{width:Math.max(r.x+r.width-k.x,0),height:d}:{})}var j=r?{width:c,height:d}:{};return o==="insideLeft"?wn({x:a+v,y:l+d/2,textAnchor:b,verticalAnchor:"middle"},j):o==="insideRight"?wn({x:a+c-v,y:l+d/2,textAnchor:y,verticalAnchor:"middle"},j):o==="insideTop"?wn({x:a+c/2,y:l+h,textAnchor:"middle",verticalAnchor:g},j):o==="insideBottom"?wn({x:a+c/2,y:l+d-h,textAnchor:"middle",verticalAnchor:p},j):o==="insideTopLeft"?wn({x:a+v,y:l+h,textAnchor:b,verticalAnchor:g},j):o==="insideTopRight"?wn({x:a+c-v,y:l+h,textAnchor:y,verticalAnchor:g},j):o==="insideBottomLeft"?wn({x:a+v,y:l+d-h,textAnchor:b,verticalAnchor:p},j):o==="insideBottomRight"?wn({x:a+c-v,y:l+d-h,textAnchor:y,verticalAnchor:p},j):df(o)&&(ae(o.x)||Yl(o.x))&&(ae(o.y)||Yl(o.y))?wn({x:a+vr(o.x,c),y:l+vr(o.y,d),textAnchor:"end",verticalAnchor:"end"},j):wn({x:a+c/2,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},j)},jCe=function(e){return"cx"in e&&ae(e.cx)};function Pn(t){var e=t.offset,n=e===void 0?5:e,r=mCe(t,cCe),i=wn({offset:n},r),o=i.viewBox,s=i.position,a=i.value,l=i.children,c=i.content,d=i.className,f=d===void 0?"":d,h=i.textBreakAll;if(!o||Ye(a)&&Ye(l)&&!E.isValidElement(c)&&!ze(c))return null;if(E.isValidElement(c))return E.cloneElement(c,i);var p;if(ze(c)){if(p=E.createElement(c,i),E.isValidElement(p))return p}else p=xCe(i);var g=jCe(o),m=Me(i,!0);if(g&&(s==="insideStart"||s==="insideEnd"||s==="end"))return SCe(i,p,m);var v=g?kCe(i):ECe(i);return A.createElement(Mc,im({className:qe("recharts-label",f)},m,v,{breakAll:h}),p)}Pn.displayName="Label";var KU=function(e){var n=e.cx,r=e.cy,i=e.angle,o=e.startAngle,s=e.endAngle,a=e.r,l=e.radius,c=e.innerRadius,d=e.outerRadius,f=e.x,h=e.y,p=e.top,g=e.left,m=e.width,v=e.height,y=e.clockWise,b=e.labelViewBox;if(b)return b;if(ae(m)&&ae(v)){if(ae(f)&&ae(h))return{x:f,y:h,width:m,height:v};if(ae(p)&&ae(g))return{x:p,y:g,width:m,height:v}}return ae(f)&&ae(h)?{x:f,y:h,width:0,height:0}:ae(n)&&ae(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:s||i||0,innerRadius:c||0,outerRadius:d||l||a||0,clockWise:y}:e.viewBox?e.viewBox:{}},TCe=function(e,n){return e?e===!0?A.createElement(Pn,{key:"label-implicit",viewBox:n}):Tn(e)?A.createElement(Pn,{key:"label-implicit",viewBox:n,value:e}):E.isValidElement(e)?e.type===Pn?E.cloneElement(e,{key:"label-implicit",viewBox:n}):A.createElement(Pn,{key:"label-implicit",content:e,viewBox:n}):ze(e)?A.createElement(Pn,{key:"label-implicit",content:e,viewBox:n}):df(e)?A.createElement(Pn,im({viewBox:n},e,{key:"label-implicit"})):null:null},_Ce=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var i=e.children,o=KU(e),s=Ri(i,Pn).map(function(l,c){return E.cloneElement(l,{viewBox:n||o,key:"label-".concat(c)})});if(!r)return s;var a=TCe(e.label,n||o);return[a].concat(uCe(s))};Pn.parseViewBox=KU;Pn.renderCallByParent=_Ce;function ACe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var NCe=ACe;const CCe=ht(NCe);function om(t){"@babel/helpers - typeof";return om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},om(t)}var OCe=["valueAccessor"],PCe=["data","dataKey","clockWise","id","textBreakAll"];function MCe(t){return $Ce(t)||DCe(t)||ICe(t)||RCe()}function RCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 785In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ICe(t,e){if(t){if(typeof t=="string")return Mj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mj(t,e)}}function DCe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function $Ce(t){if(Array.isArray(t))return Mj(t)}function Mj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function zb(){return zb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},zb.apply(this,arguments)}function ED(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ED(Object(n),!0).forEach(function(r){LCe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ED(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function LCe(t,e,n){return e=BCe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function BCe(t){var e=zCe(t,"string");return om(e)=="symbol"?e:e+""}function zCe(t,e){if(om(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(om(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function TD(t,e){if(t==null)return{};var n=FCe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function FCe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var qCe=function(e){return Array.isArray(e.value)?CCe(e.value):e.value};function Qa(t){var e=t.valueAccessor,n=e===void 0?qCe:e,r=TD(t,OCe),i=r.data,o=r.dataKey,s=r.clockWise,a=r.id,l=r.textBreakAll,c=TD(r,PCe);return!i||!i.length?null:A.createElement(dt,{className:"recharts-label-list"},i.map(function(d,f){var h=Ye(o)?n(d,f):or(d&&d.payload,o),p=Ye(a)?{}:{id:"".concat(a,"-").concat(f)};return A.createElement(Pn,zb({},Me(d,!0),c,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:l,viewBox:Pn.parseViewBox(Ye(s)?d:jD(jD({},d),{},{clockWise:s})),key:"label-".concat(f),index:f}))}))}Qa.displayName="LabelList";function UCe(t,e){return t?t===!0?A.createElement(Qa,{key:"labelList-implicit",data:e}):A.isValidElement(t)||ze(t)?A.createElement(Qa,{key:"labelList-implicit",data:e,content:t}):df(t)?A.createElement(Qa,zb({data:e},t,{key:"labelList-implicit"})):null:null}function VCe(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var r=t.children,i=Ri(r,Qa).map(function(s,a){return E.cloneElement(s,{data:e,key:"labelList-".concat(a)})});if(!n)return i;var o=UCe(t.label,e);return[o].concat(MCe(i))}Qa.renderCallByParent=VCe;function sm(t){"@babel/helpers - typeof";return sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sm(t)}function Rj(){return Rj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Rj.apply(this,arguments)}function _D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function AD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_D(Object(n),!0).forEach(function(r){WCe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_D(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function WCe(t,e,n){return e=HCe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function HCe(t){var e=KCe(t,"string");return sm(e)=="symbol"?e:e+""}function KCe(t,e){if(sm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(sm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var GCe=function(e,n){var r=gr(n-e),i=Math.min(Math.abs(n-e),359.999);return r*i},Qg=function(e){var n=e.cx,r=e.cy,i=e.radius,o=e.angle,s=e.sign,a=e.isExternal,l=e.cornerRadius,c=e.cornerIsExternal,d=l*(a?1:-1)+i,f=Math.asin(l/d)/Bb,h=c?o:o+s*f,p=_t(n,r,d,h),g=_t(n,r,i,h),m=c?o-s*f:o,v=_t(n,r,d*Math.cos(f*Bb),m);return{center:p,circleTangency:g,lineTangency:v,theta:f}},GU=function(e){var n=e.cx,r=e.cy,i=e.innerRadius,o=e.outerRadius,s=e.startAngle,a=e.endAngle,l=GCe(s,a),c=s+l,d=_t(n,r,o,s),f=_t(n,r,o,c),h="M ".concat(d.x,",").concat(d.y,` 786 A `).concat(o,",").concat(o,`,0, 787 `).concat(+(Math.abs(l)>180),",").concat(+(s>c),`, 788 `).concat(f.x,",").concat(f.y,` 789 `);if(i>0){var p=_t(n,r,i,s),g=_t(n,r,i,c);h+="L ".concat(g.x,",").concat(g.y,` 790 A `).concat(i,",").concat(i,`,0, 791 `).concat(+(Math.abs(l)>180),",").concat(+(s<=c),`, 792 `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},JCe=function(e){var n=e.cx,r=e.cy,i=e.innerRadius,o=e.outerRadius,s=e.cornerRadius,a=e.forceCornerRadius,l=e.cornerIsExternal,c=e.startAngle,d=e.endAngle,f=gr(d-c),h=Qg({cx:n,cy:r,radius:o,angle:c,sign:f,cornerRadius:s,cornerIsExternal:l}),p=h.circleTangency,g=h.lineTangency,m=h.theta,v=Qg({cx:n,cy:r,radius:o,angle:d,sign:-f,cornerRadius:s,cornerIsExternal:l}),y=v.circleTangency,b=v.lineTangency,x=v.theta,S=l?Math.abs(c-d):Math.abs(c-d)-m-x;if(S<0)return a?"M ".concat(g.x,",").concat(g.y,` 793 a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 794 a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 795 `):GU({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:d});var w="M ".concat(g.x,",").concat(g.y,` 796 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` 797 A`).concat(o,",").concat(o,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(y.x,",").concat(y.y,` 798 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,` 799 `);if(i>0){var k=Qg({cx:n,cy:r,radius:i,angle:c,sign:f,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),j=k.circleTangency,T=k.lineTangency,_=k.theta,N=Qg({cx:n,cy:r,radius:i,angle:d,sign:-f,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),C=N.circleTangency,O=N.lineTangency,I=N.theta,P=l?Math.abs(c-d):Math.abs(c-d)-_-I;if(P<0&&s===0)return"".concat(w,"L").concat(n,",").concat(r,"Z");w+="L".concat(O.x,",").concat(O.y,` 800 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(C.x,",").concat(C.y,` 801 A`).concat(i,",").concat(i,",0,").concat(+(P>180),",").concat(+(f>0),",").concat(j.x,",").concat(j.y,` 802 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(T.x,",").concat(T.y,"Z")}else w+="L".concat(n,",").concat(r,"Z");return w},YCe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},JU=function(e){var n=AD(AD({},YCe),e),r=n.cx,i=n.cy,o=n.innerRadius,s=n.outerRadius,a=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,d=n.startAngle,f=n.endAngle,h=n.className;if(s<o||d===f)return null;var p=qe("recharts-sector",h),g=s-o,m=vr(a,g,0,!0),v;return m>0&&Math.abs(d-f)<360?v=JCe({cx:r,cy:i,innerRadius:o,outerRadius:s,cornerRadius:Math.min(m,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:f}):v=GU({cx:r,cy:i,innerRadius:o,outerRadius:s,startAngle:d,endAngle:f}),A.createElement("path",Rj({},Me(n,!0),{className:p,d:v,role:"img"}))};function am(t){"@babel/helpers - typeof";return am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},am(t)}function Ij(){return Ij=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ij.apply(this,arguments)}function ND(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function CD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
802e%2?ND(Object(n),!0).forEach(function(r){XCe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ND(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function XCe(t,e,n){return e=QCe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function QCe(t){var e=ZCe(t,"string");return am(e)=="symbol"?e:e+""}function ZCe(t,e){if(am(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(am(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var OD={curveBasisClosed:Yve,curveBasisOpen:Xve,curveBasis:Jve,curveBumpX:Ive,curveBumpY:Dve,curveLinearClosed:Qve,curveLinear:_0,curveMonotoneX:Zve,curveMonotoneY:eye,curveNatural:tye,curveStep:nye,curveStepAfter:iye,curveStepBefore:rye},Zg=function(e){return e.x===+e.x&&e.y===+e.y},Xf=function(e){return e.x},Qf=function(e){return e.y},eOe=function(e,n){if(ze(e))return e;var r="curve".concat(j0(e));return(r==="curveMonotone"||r==="curveBump")&&n?OD["".concat(r).concat(n==="vertical"?"Y":"X")]:OD[r]||_0},tOe=function(e){var n=e.type,r=n===void 0?"linear":n,i=e.points,o=i===void 0?[]:i,s=e.baseLine,a=e.layout,l=e.connectNulls,c=l===void 0?!1:l,d=eOe(r,a),f=c?o.filter(function(m){return Zg(m)}):o,h;if(Array.isArray(s)){var p=c?s.filter(function(m){return Zg(m)}):s,g=f.map(function(m,v){return CD(CD({},m),{},{base:p[v]})});return a==="vertical"?h=Ug().y(Qf).x1(Xf).x0(function(m){return m.base.x}):h=Ug().x(Xf).y1(Qf).y0(function(m){return m.base.y}),h.defined(Zg).curve(d),h(g)}return a==="vertical"&&ae(s)?h=Ug().y(Qf).x1(Xf).x0(s):ae(s)?h=Ug().x(Xf).y1(Qf).y0(s):h=Wq().x(Xf).y(Qf),h.defined(Zg).curve(d),h(f)},Dj=function(e){var n=e.className,r=e.points,i=e.path,o=e.pathRef;if((!r||!r.length)&&!i)return null;var s=r&&r.length?tOe(e):i;return E.createElement("path",Ij({},Me(e,!1),db(e),{className:qe("recharts-curve",n),d:s,ref:o}))},YU={exports:{}},nOe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",rOe=nOe,iOe=rOe;function XU(){}function QU(){}QU.resetWarningCache=XU;var oOe=function(){function t(r,i,o,s,a,l){if(l!==iOe){var c=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 c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:QU,resetWarningCache:XU};return n.PropTypes=n,n};YU.exports=oOe();var sOe=YU.exports;const at=ht(sOe);var aOe=Object.getOwnPropertyNames,lOe=Object.getOwnPropertySymbols,cOe=Object.prototype.hasOwnProperty;function PD(t,e){return function(r,i,o){return t(r,i,o)&&e(r,i,o)}}function ev(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);var o=i.cache,s=o.get(n),a=o.get(r);if(s&&a)return s===r&&a===n;o.set(n,r),o.set(r,n);var l=t(n,r,i);return o.delete(n),o.delete(r),l}}function MD(t){return aOe(t).concat(lOe(t))}var uOe=Object.hasOwn||function(t,e){return cOe.call(t,e)};function Wc(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var dOe="__v",fOe="__o",hOe="_owner",RD=Object.getOwnPropertyDescriptor,ID=Object.keys;function pOe(t,e,n){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function mOe(t,e){return Wc(t.getTime(),e.getTime())}function gOe(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function vOe(t,e){return t===e}function DD(t,e,n){var r=t.size;if(r!==e.size)return!1;if(!r)return!0;for(var i=new Array(r),o=t.entries(),s,a,l=0;(s=o.next())&&!s.done;){for(var c=e.entries(),d=!1,f=0;(a=c.next())&&!a.done;){if(i[f]){f++;continue}var h=s.value,p=a.value;if(n.equals(h[0],p[0],l,f,t,e,n)&&n.equals(h[1],p[1],h[0],p[0],t,e,n)){d=i[f]=!0;break}f++}if(!d)return!1;l++}return!0}var yOe=Wc;function bOe(t,e,n){var r=ID(t),i=r.length;if(ID(e).length!==i)return!1;for(;i-- >0;)if(!ZU(t,e,n,r[i]))return!1;return!0}function Zf(t,e,n){var r=MD(t),i=r.length;if(MD(e).length!==i)return!1;for(var o,s,a;i-- >0;)if(o=r[i],!ZU(t,e,n,o)||(s=RD(t,o),a=RD(e,o),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function xOe(t,e){return Wc(t.valueOf(),e.valueOf())}function wOe(t,e){return t.source===e.source&&t.flags===e.flags}function $D(t,e,n){var r=t.size;if(r!==e.size)return!1;if(!r)return!0;for(var i=new Array(r),o=t.values(),s,a;(s=o.next())&&!s.done;){for(var l=e.values(),c=!1,d=0;(a=l.next())&&!a.done;){if(!i[d]&&n.equals(s.value,a.value,s.value,a.value,t,e,n)){c=i[d]=!0;break}d++}if(!c)return!1}return!0}function SOe(t,e){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function kOe(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function ZU(t,e,n,r){return(r===hOe||r===fOe||r===dOe)&&(t.$$typeof||e.$$typeof)?!0:uOe(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}var EOe="[object Arguments]",jOe="[object Boolean]",TOe="[object Date]",_Oe="[object Error]",AOe="[object Map]",NOe="[object Number]",COe="[object Object]",OOe="[object RegExp]",POe="[object Set]",MOe="[object String]",ROe="[object URL]",IOe=Array.isArray,LD=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,BD=Object.assign,DOe=Object.prototype.toString.call.bind(Object.prototype.toString);function $Oe(t){var e=t.areArraysEqual,n=t.areDatesEqual,r=t.areErrorsEqual,i=t.areFunctionsEqual,o=t.areMapsEqual,s=t.areNumbersEqual,a=t.areObjectsEqual,l=t.arePrimitiveWrappersEqual,c=t.areRegExpsEqual,d=t.areSetsEqual,f=t.areTypedArraysEqual,h=t.areUrlsEqual;return function(g,m,v){if(g===m)return!0;
802if(g==null||m==null)return!1;var y=typeof g;if(y!==typeof m)return!1;if(y!=="object")return y==="number"?s(g,m,v):y==="function"?i(g,m,v):!1;var b=g.constructor;if(b!==m.constructor)return!1;if(b===Object)return a(g,m,v);if(IOe(g))return e(g,m,v);if(LD!=null&&LD(g))return f(g,m,v);if(b===Date)return n(g,m,v);if(b===RegExp)return c(g,m,v);if(b===Map)return o(g,m,v);if(b===Set)return d(g,m,v);var x=DOe(g);return x===TOe?n(g,m,v):x===OOe?c(g,m,v):x===AOe?o(g,m,v):x===POe?d(g,m,v):x===COe?typeof g.then!="function"&&typeof m.then!="function"&&a(g,m,v):x===ROe?h(g,m,v):x===_Oe?r(g,m,v):x===EOe?a(g,m,v):x===jOe||x===NOe||x===MOe?l(g,m,v):!1}}function LOe(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,i={areArraysEqual:r?Zf:pOe,areDatesEqual:mOe,areErrorsEqual:gOe,areFunctionsEqual:vOe,areMapsEqual:r?PD(DD,Zf):DD,areNumbersEqual:yOe,areObjectsEqual:r?Zf:bOe,arePrimitiveWrappersEqual:xOe,areRegExpsEqual:wOe,areSetsEqual:r?PD($D,Zf):$D,areTypedArraysEqual:r?Zf:SOe,areUrlsEqual:kOe};if(n&&(i=BD({},i,n(i))),e){var o=ev(i.areArraysEqual),s=ev(i.areMapsEqual),a=ev(i.areObjectsEqual),l=ev(i.areSetsEqual);i=BD({},i,{areArraysEqual:o,areMapsEqual:s,areObjectsEqual:a,areSetsEqual:l})}return i}function BOe(t){return function(e,n,r,i,o,s,a){return t(e,n,a)}}function zOe(t){var e=t.circular,n=t.comparator,r=t.createState,i=t.equals,o=t.strict;if(r)return function(l,c){var d=r(),f=d.cache,h=f===void 0?e?new WeakMap:void 0:f,p=d.meta;return n(l,c,{cache:h,equals:i,meta:p,strict:o})};if(e)return function(l,c){return n(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var s={cache:void 0,equals:i,meta:void 0,strict:o};return function(l,c){return n(l,c,s)}}var FOe=bl();bl({strict:!0});bl({circular:!0});bl({circular:!0,strict:!0});bl({createInternalComparator:function(){return Wc}});bl({strict:!0,createInternalComparator:function(){return Wc}});bl({circular:!0,createInternalComparator:function(){return Wc}});bl({circular:!0,createInternalComparator:function(){return Wc},strict:!0});function bl(t){t===void 0&&(t={});var e=t.circular,n=e===void 0?!1:e,r=t.createInternalComparator,i=t.createState,o=t.strict,s=o===void 0?!1:o,a=LOe(t),l=$Oe(a),c=r?r(l):BOe(l);return zOe({circular:n,comparator:l,createState:i,equals:c,strict:s})}function qOe(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function zD(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>e?(t(o),n=-1):qOe(i)};requestAnimationFrame(r)}function $j(t){"@babel/helpers - typeof";return $j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$j(t)}function UOe(t){return KOe(t)||HOe(t)||WOe(t)||VOe()}function VOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 803In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WOe(t,e){if(t){if(typeof t=="string")return FD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FD(t,e)}}function FD(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function HOe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function KOe(t){if(Array.isArray(t))return t}function GOe(){var t={},e=function(){return null},n=!1,r=function i(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var s=o,a=UOe(s),l=a[0],c=a.slice(1);if(typeof l=="number"){zD(i.bind(null,c),l);return}i(l),zD(i.bind(null,c));return}$j(o)==="object"&&(t=o,e(t)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return e=o,function(){e=function(){return null}}}}}function lm(t){"@babel/helpers - typeof";return lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lm(t)}function qD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function UD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
vendor: 58,702 bytes, lines 803-821
803e%2?qD(Object(n),!0).forEach(function(r){eV(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function eV(t,e,n){return e=JOe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function JOe(t){var e=YOe(t,"string");return lm(e)==="symbol"?e:String(e)}function YOe(t,e){if(lm(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(lm(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var XOe=function(e,n){return[Object.keys(e),Object.keys(n)].reduce(function(r,i){return r.filter(function(o){return i.includes(o)})})},QOe=function(e){return e},ZOe=function(e){return e.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Uh=function(e,n){return Object.keys(n).reduce(function(r,i){return UD(UD({},r),{},eV({},i,e(i,n[i])))},{})},VD=function(e,n,r){return e.map(function(i){return"".concat(ZOe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function e2e(t,e){return r2e(t)||n2e(t,e)||tV(t,e)||t2e()}function t2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 804In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n2e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function r2e(t){if(Array.isArray(t))return t}function i2e(t){return a2e(t)||s2e(t)||tV(t)||o2e()}function o2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 805In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tV(t,e){if(t){if(typeof t=="string")return Lj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lj(t,e)}}function s2e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function a2e(t){if(Array.isArray(t))return Lj(t)}function Lj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Fb=1e-4,nV=function(e,n){return[0,3*e,3*n-6*e,3*e-3*n+1]},rV=function(e,n){return e.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},WD=function(e,n){return function(r){var i=nV(e,n);return rV(i,r)}},l2e=function(e,n){return function(r){var i=nV(e,n),o=[].concat(i2e(i.map(function(s,a){return s*a}).slice(1)),[0]);return rV(o,r)}},HD=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],o=n[1],s=n[2],a=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,o=0,s=1,a=1;break;case"ease":i=.25,o=.1,s=.25,a=1;break;case"ease-in":i=.42,o=0,s=1,a=1;break;case"ease-out":i=.42,o=0,s=.58,a=1;break;case"ease-in-out":i=0,o=0,s=.58,a=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),d=e2e(c,4);i=d[0],o=d[1],s=d[2],a=d[3]}}}var f=WD(i,s),h=WD(o,a),p=l2e(i,s),g=function(y){return y>1?1:y<0?0:y},m=function(y){for(var b=y>1?1:y,x=b,S=0;S<8;++S){var w=f(x)-b,k=p(x);if(Math.abs(w-b)<Fb||k<Fb)return h(x);x=g(x-w/k)}return h(x)};return m.isStepper=!1,m},c2e=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.stiff,r=n===void 0?100:n,i=e.damping,o=i===void 0?8:i,s=e.dt,a=s===void 0?17:s,l=function(d,f,h){var p=-(d-f)*r,g=h*o,m=h+(p-g)*a/1e3,v=h*a/1e3+d;return Math.abs(v-f)<Fb&&Math.abs(m)<Fb?[f,0]:[v,m]};return l.isStepper=!0,l.dt=a,l},u2e=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return HD(i);case"spring":return c2e();default:if(i.split("(")[0]==="cubic-bezier")return HD(i)}return typeof i=="function"?i:null};function cm(t){"@babel/helpers - typeof";return cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cm(t)}function KD(t){return h2e(t)||f2e(t)||iV(t)||d2e()}function d2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 806In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f2e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function h2e(t){if(Array.isArray(t))return zj(t)}function GD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Fn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?GD(Object(n),!0).forEach(function(r){Bj(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):GD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Bj(t,e,n){return e=p2e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p2e(t){var e=m2e(t,"string");return cm(e)==="symbol"?e:String(e)}function m2e(t,e){if(cm(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(cm(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function g2e(t,e){return b2e(t)||y2e(t,e)||iV(t,e)||v2e()}function v2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 807In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iV(t,e){if(t){if(typeof t=="string")return zj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zj(t,e)}}function zj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function y2e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function b2e(t){if(Array.isArray(t))return t}var qb=function(e,n,r){return e+(n-e)*r},Fj=function(e){var n=e.from,r=e.to;return n!==r},x2e=function t(e,n,r){var i=Uh(function(o,s){if(Fj(s)){var a=e(s.from,s.to,s.velocity),l=g2e(a,2),c=l[0],d=l[1];return Fn(Fn({},s),{},{from:c,velocity:d})}return s},n);return r<1?Uh(function(o,s){return Fj(s)?Fn(Fn({},s),{},{velocity:qb(s.velocity,i[o].velocity,r),from:qb(s.from,i[o].from,r)}):s},n):t(e,i,r-1)};const w2e=function(t,e,n,r,i){var o=XOe(t,e),s=o.reduce(function(v,y){return Fn(Fn({},v),{},Bj({},y,[t[y],e[y]]))},{}),a=o.reduce(function(v,y){return Fn(Fn({},v),{},Bj({},y,{from:t[y],velocity:0,to:e[y]}))},{}),l=-1,c,d,f=function(){return null},h=function(){return Uh(function(y,b){return b.from},a)},p=function(){return!Object.values(a).filter(Fj).length},g=function(y){c||(c=y);var b=y-c,x=b/n.dt;a=x2e(n,a,x),i(Fn(Fn(Fn({},t),e),h())),c=y,p()||(l=requestAnimationFrame(f))},m=function(y){d||(d=y);var b=(y-d)/r,x=Uh(function(w,k){return qb.apply(void 0,KD(k).concat([n(b)]))},s);if(i(Fn(Fn(Fn({},t),e),x)),b<1)l=requestAnimationFrame(f);else{var S=Uh(function(w,k){return qb.apply(void 0,KD(k).concat([n(1)]))},s);i(Fn(Fn(Fn({},t),e),S))}};return f=n.isStepper?g:m,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function Dd(t){"@babel/helpers - typeof";return Dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dd(t)}var S2e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function k2e(t,e){if(t==null)return{};var n=E2e(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function E2e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function ES(t){return A2e(t)||_2e(t)||T2e(t)||j2e()}function j2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 808In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T2e(t,e){if(t){if(typeof t=="string")return qj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qj(t,e)}}function _2e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function A2e(t){if(Array.isArray(t))return qj(t)}function qj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function JD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?JD(Object(n),!0).forEach(function(r){fh(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):JD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function fh(t,e,n){return e=oV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N2e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C2e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,oV(r.key),r)}}function O2e(t,e,n){return e&&C2e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function oV(t){var e=P2e(t,"string");return Dd(e)==="symbol"?e:String(e)}function P2e(t,e){if(Dd(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Dd(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function M2e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Uj(t,e)}function Uj(t,e){return Uj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Uj(t,e)}function R2e(t){var e=I2e();return function(){var r=Ub(t),i;if(e){var o=Ub(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Vj(this,i)}}function Vj(t,e){if(e&&(Dd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wj(t)}function Wj(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function I2e(){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 Ub(t){return Ub=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ub(t)}var qs=function(t){M2e(n,t);var e=R2e(n);function n(r,i){var o;N2e(this,n),o=e.call(this,r,i);var s=o.props,a=s.isActive,l=s.attributeName,c=s.from,d=s.to,f=s.steps,h=s.children,p=s.duration;if(o.handleStyleChange=o.handleStyleChange.bind(Wj(o)),o.changeStyle=o.changeStyle.bind(Wj(o)),!a||p<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:d}),Vj(o);if(f&&f.length)o.state={style:f[0].style};else if(c){if(typeof h=="function")return o.state={style:c},Vj(o);o.state={style:l?fh({},l,c):c}}else o.state={style:{}};return o}return O2e(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,s=i.canBegin;this.mounted=!0,!(!o||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isActive,a=o.canBegin,l=o.attributeName,c=o.shouldReAnimate,d=o.to,f=o.from,h=this.state.style;if(a){if(!s){var p={style:l?fh({},l,d):d};this.state&&h&&(l&&h[l]!==d||!l&&h!==d)&&this.setState(p);return}if(!(FOe(i.to,d)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||c?f:i.to;if(this.state&&h){var v={style:l?fh({},l,m):m};(l&&h[l]!==m||!l&&h!==m)&&this.setState(v)}this.runAnimation(Vi(Vi({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,s=i.from,a=i.to,l=i.duration,c=i.easing,d=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=w2e(s,a,u2e(c),l,this.changeStyle),g=function(){o.stopJSAnimation=p()};this.manager.start([h,d,g,l,f])}},{key:"runStepAnimation",value:function(i){var o=this,s=i.steps,a=i.begin,l=i.onAnimationStart,c=s[0],d=c.style,f=c.duration,h=f===void 0?0:f,p=function(m,v,y){if(y===0)return m;var b=v.duration,x=v.easing,S=x===void 0?"ease":x,w=v.style,k=v.properties,j=v.onAnimationEnd,T=y>0?s[y-1]:v,_=k||Object.keys(w);if(typeof S=="function"||S==="spring")return[].concat(ES(m),[o.runJSAnimation.bind(o,{from:T.style,to:w,duration:b,easing:S}),b]);var N=VD(_,b,S),C=Vi(Vi(Vi({},T.style),w),{},{transition:N});return[].concat(ES(m),[C,b,j]).filter(QOe)};return this.manager.start([l].concat(ES(s.reduce(p,[d,Math.max(h,a)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=GOe());var o=i.begin,s=i.duration,a=i.attributeName,l=i.to,c=i.easing,d=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof c=="function"||typeof p=="function"||c==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=a?fh({},a,l):l,v=VD(Object.keys(m),s,c);g.start([d,o,Vi(Vi({},m),{},{transition:v}),s,f])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var a=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=k2e(i,S2e),c=E.Children.count(o),d=this.state.style;if(typeof o=="function")return o(d);if(!a||c===0||s<=0)return o;var f=function(p){var g=p.props,m=g.style,v=m===void 0?{}:m,y=g.className,b=E.cloneElement(p,Vi(Vi({},l),{},{style:Vi(Vi({},v),d),className:y}));return b};return c===1?f(E.Children.only(o)):A.createElement("div",null,E.Children.map(o,function(h){return f(h)}))}}]),n}(E.PureComponent);qs.displayName="Animate";qs.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};qs.propTypes={from:at.oneOfType([at.object,at.string]),to:at.oneOfType([at.object,at.string]),attributeName:at.string,duration:at.number,begin:at.number,easing:at.oneOfType([at.string,at.func]),steps:at.arrayOf(at.shape({duration:at.number.isRequired,style:at.object.isRequired,easing:at.oneOfType([at.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),at.func]),properties:at.arrayOf("string"),onAnimationEnd:at.func})),children:at.oneOfType([at.node,at.func]),isActive:at.bool,canBegin:at.bool,onAnimationEnd:at.func,shouldReAnimate:at.bool,onAnimationStart:at.func,onAnimationReStart:at.func};function um(t){"@babel/helpers - typeof";return um=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},um(t)}function Vb(){return Vb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vb.apply(this,arguments)}function D2e(t,e){return z2e(t)||B2e(t,e)||L2e(t,e)||$2e()}function $2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 809In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L2e(t,e){if(t){if(typeof t=="string")return YD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YD(t,e)}}function YD(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function B2e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function z2e(t){if(Array.isArray(t))return t}function XD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function QD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?XD(Object(n),!0).forEach(function(r){F2e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):XD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function F2e(t,e,n){return e=q2e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q2e(t){var e=U2e(t,"string");return um(e)=="symbol"?e:e+""}function U2e(t,e){if(um(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(um(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ZD=function(e,n,r,i,o){var s=Math.min(Math.abs(r)/2,Math.abs(i)/2),a=i>=0?1:-1,l=r>=0?1:-1,c=i>=0&&r>=0||i<0&&r<0?1:0,d;if(s>0&&o instanceof Array){for(var f=[0,0,0,0],h=0,p=4;h<p;h++)f[h]=o[h]>s?s:o[h];d="M".concat(e,",").concat(n+a*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(e+l*f[0],",").concat(n)),d+="L ".concat(e+r-l*f[1],",").concat(n),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`, 810 `).concat(e+r,",").concat(n+a*f[1])),d+="L ".concat(e+r,",").concat(n+i-a*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(c,`, 811 `).concat(e+r-l*f[2],",").concat(n+i)),d+="L ".concat(e+l*f[3],",").concat(n+i),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(c,`, 812 `).concat(e,",").concat(n+i-a*f[3])),d+="Z"}else if(s>0&&o===+o&&o>0){var g=Math.min(s,o);d="M ".concat(e,",").concat(n+a*g,` 813 A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e+l*g,",").concat(n,` 814 L `).concat(e+r-l*g,",").concat(n,` 815 A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e+r,",").concat(n+a*g,` 816 L `).concat(e+r,",").concat(n+i-a*g,` 817 A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e+r-l*g,",").concat(n+i,` 818 L `).concat(e+l*g,",").concat(n+i,` 819 A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(e,",").concat(n+i-a*g," Z")}else d="M ".concat(e,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},V2e=function(e,n){if(!e||!n)return!1;var r=e.x,i=e.y,o=n.x,s=n.y,a=n.width,l=n.height;if(Math.abs(a)>0&&Math.abs(l)>0){var c=Math.min(o,o+a),d=Math.max(o,o+a),f=Math.min(s,s+l),h=Math.max(s,s+l);return r>=c&&r<=d&&i>=f&&i<=h}return!1},W2e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},DN=function(e){var n=QD(QD({},W2e),e),r=E.useRef(),i=E.useState(-1),o=D2e(i,2),s=o[0],a=o[1];E.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&a(S)}catch{}},[]);var l=n.x,c=n.y,d=n.width,f=n.height,h=n.radius,p=n.className,g=n.animationEasing,m=n.animationDuration,v=n.animationBegin,y=n.isAnimationActive,b=n.isUpdateAnimationActive;if(l!==+l||c!==+c||d!==+d||f!==+f||d===0||f===0)return null;var x=qe("recharts-rectangle",p);return b?A.createElement(qs,{canBegin:s>0,from:{width:d,height:f,x:l,y:c},to:{width:d,height:f,x:l,y:c},duration:m,animationEasing:g,isActive:b},function(S){var w=S.width,k=S.height,j=S.x,T=S.y;return A.createElement(qs,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,isActive:y,easing:g},A.createElement("path",Vb({},Me(n,!0),{className:x,d:ZD(j,T,w,k,h),ref:r})))}):A.createElement("path",Vb({},Me(n,!0),{className:x,d:ZD(l,c,d,f,h)}))},H2e=["points","className","baseLinePoints","connectNulls"];function Ou(){return Ou=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ou.apply(this,arguments)}function K2e(t,e){if(t==null)return{};var n=G2e(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function G2e(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function e$(t){return Q2e(t)||X2e(t)||Y2e(t)||J2e()}function J2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 820In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y2e(t,e){if(t){if(typeof t=="string")return Hj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hj(t,e)}}function X2e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Q2e(t){if(Array.isArray(t))return Hj(t)}function Hj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var t$=function(e){return e&&e.x===+e.x&&e.y===+e.y},Z2e=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return e.forEach(function(r){t$(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),t$(e[0])&&n[n.length-1].push(e[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Vh=function(e,n){var r=Z2e(e);n&&(r=[r.reduce(function(o,s){return[].concat(e$(o),e$(s))},[])]);var i=r.map(function(o){return o.reduce(function(s,a,l){return"".concat(s).concat(l===0?"M":"L").concat(a.x,",").concat(a.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},ePe=function(e,n,r){var i=Vh(e,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Vh(n.reverse(),r).slice(1))},tPe=function(e){var n=e.points,r=e.className,i=e.baseLinePoints,o=e.connectNulls,s=K2e(e,H2e);if(!n||!n.length)return null;var a=qe("recharts-polygon",r);if(i&&i.length){var l=s.stroke&&s.stroke!=="none",c=ePe(n,i,o);return A.createElement("g",{className:a},A.createElement("path",Ou({},Me(s,!0),{fill:c.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:c})),l?A.createElement("path",Ou({},Me(s,!0),{fill:"none",d:Vh(n,o)})):null,l?A.createElement("path",Ou({},Me(s,!0),{fill:"none",d:Vh(i,o)})):null)}var d=Vh(n,o);return A.createElement("path",Ou({},Me(s,!0),{fill:d.slice(-1)==="Z"?s.fill:"none",className:a,d}))};function Kj(){return Kj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kj.apply(this,arguments)}var $N=function(e){var n=e.cx,r=e.cy,i=e.r,o=e.className,s=qe("recharts-dot",o);return n===+n&&r===+r&&i===+i?E.createElement("circle",Kj({},Me(e,!1),db(e),{className:s,cx:n,cy:r,r:i})):null};function dm(t){"@babel/helpers - typeof";return dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dm(t)}var nPe=["x","y","top","left","width","height","className"];function Gj(){return Gj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Gj.apply(this,arguments)}function n$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rPe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?n$(Object(n),!0).forEach(function(r){iPe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):n$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iPe(t,e,n){return e=oPe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oPe(t){var e=sPe(t,"string");return dm(e)=="symbol"?e:e+""}function sPe(t,e){if(dm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(dm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function aPe(t,e){if(t==null)return{};var n=lPe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function lPe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var cPe=function(e,n,r,i,o,s){return"M".concat(e,",").concat(o,"v").concat(i,"M").concat(s,",").concat(n,"h").concat(r)},uPe=function(e){var n=e.x,r=n===void 0?0:n,i=e.y,o=i===void 0?0:i,s=e.top,a=s===void 0?0:s,l=e.left,c=l===void 0?0:l,d=e.width,f=d===void 0?0:d,h=e.height,p=h===void 0?0:h,g=e.className,m=aPe(e,nPe),v=rPe({x:r,y:o,top:a,left:c,width:f,height:p},m);return!ae(r)||!ae(o)||!ae(f)||!ae(p)||!ae(a)||!ae(c)?null:A.createElement("path",Gj({},Me(v,!0),{className:qe("recharts-cross",g),d:cPe(r,o,f,p,a,c)}))},dPe=B0,fPe=yU,hPe=gl;function pPe(t,e){return t&&t.length?dPe(t,hPe(e),fPe):void 0}var mPe=pPe;const gPe=ht(mPe);var vPe=B0,yPe=gl,bPe=bU;function xPe(t,e){return t&&t.length?vPe(t,yPe(e),bPe):void 0}var wPe=xPe;const SPe=ht(wPe);var kPe=["cx","cy","angle","ticks","axisLine"],EPe=["ticks","tick","angle","tickFormatter","stroke"];function $d(t){"@babel/helpers - typeof";return $d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$d(t)}function Wh(){return Wh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Wh.apply(this,arguments)}function r$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Al(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?r$(Object(n),!0).forEach(function(r){H0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function i$(t,e){if(t==null)return{};var n=jPe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function jPe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function TPe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,aV(r.key),r)}}function _Pe(t,e,n){return e&&o$(t.prototype,e),n&&o$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function APe(t,e,n){return e=Wb(e),NPe(t,sV()?Reflect.construct(e,n||[],Wb(t).constructor):e.apply(t,n))}function NPe(t,e){if(e&&($d(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CPe(t)}function CPe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sV=function(){return!!t})()}function Wb(t){return Wb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wb(t)}function OPe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jj(t,e)}function Jj(t,e){return Jj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Jj(t,e)}function H0(t,e,n){return e=aV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function aV(t){var e=PPe(t,"string");return $d(e)=="symbol"?e:e+""}function PPe(t,e){if($d(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if($d(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var K0=function(t){function e(){return TPe(this,e),APe(this,e,arguments)}return OPe(e,t),_Pe(e,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,o=this.props,s=o.angle,a=o.cx,l=o.cy;return _t(a,l,i,s)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,o=r.cy,s=r.angle,a=r.ticks,l=gPe(a,function(d){return d.coordinate||0}),c=SPe(a,function(d){return d.coordinate||0});return{cx:i,cy:o,startAngle:s,endAngle:s,innerRadius:c.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,s=r.angle,a=r.ticks,l=r.axisLine,c=i$(r,kPe),d=a.reduce(function(g,m){return[Math.min(g[0],m.coordinate),Math.max(g[1],m.coordinate)]},[1/0,-1/0]),f=_t(i,o,d[0],s),h=_t(i,o,d[1],s),p=Al(Al(Al({},Me(c,!1)),{},{fill:"none"},Me(l,!1)),{},{x1:f.x,y1:f.y,x2:h.x,y2:h.y});return A.createElement("line",Wh({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,s=i.tick,a=i.angle,l=i.tickFormatter,c=i.stroke,d=i$(i,EPe),f=this.getTickTextAnchor(),h=Me(d,!1),p=Me(s,!1),g=o.map(function(m,v){var y=r.getTickValueCoord(m),b=Al(Al(Al(Al({textAnchor:f,transform:"rotate(".concat(90-a,", ").concat(y.x,", ").concat(y.y,")")},h),{},{stroke:"none",fill:c},p),{},{index:v},y),{},{payload:m});return A.createElement(dt,Wh({className:qe("recharts-polar-radius-axis-tick",HU(s)),key:"tick-".concat(m.coordinate)},Pc(r.props,m,v)),e.renderTickItem(s,b,l?l(m.value,v):m.value))});return A.createElement(dt,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.axisLine,s=r.tick;return!i||!i.length?null:A.createElement(dt,{className:qe("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),s&&this.renderTicks(),Pn.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,o){var s;return A.isValidElement(r)?s=A.cloneElement(r,i):ze(r)?s=r(i):s=A.createElement(Mc,Wh({},i,{className:"recharts-polar-radius-axis-tick-value"}),o),s}}])}(E.PureComponent);H0(K0,"displayName","PolarRadiusAxis");H0(K0,"axisType","radiusAxis");H0(K0,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Ld(t){"@babel/helpers - typeof";return Ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ld(t)}function zl(){return zl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},zl.apply(this,arguments)}function s$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Nl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?s$(Object(n),!0).forEach(function(r){G0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function MPe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,cV(r.key),r)}}function RPe(t,e,n){return e&&a$(t.prototype,e),n&&a$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function IPe(t,e,n){return e=Hb(e),DPe(t,lV()?Reflect.construct(e,n||[],Hb(t).constructor):e.apply(t,n))}function DPe(t,e){if(e&&(Ld(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Pe(t)}function $Pe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lV=function(){return!!t})()}function Hb(t){return Hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hb(t)}function LPe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yj(t,e)}function Yj(t,e){return Yj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Yj(t,e)}function G0(t,e,n){return e=cV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cV(t){var e=BPe(t,"string");return Ld(e)=="symbol"?e:e+""}function BPe(t,e){if(Ld(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ld(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var zPe=Math.PI/180,l$=1e-5,J0=function(t){function e(){return MPe(this,e),IPe(this,e,arguments)}return LPe(e,t),RPe(e,[{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.cx,s=i.cy,a=i.radius,l=i.orientation,c=i.tickSize,d=c||8,f=_t(o,s,a,r.coordinate),h=_t(o,s,a+(l==="inner"?-1:1)*d,r.coordinate);return{x1:f.x,y1:f.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,o=Math.cos(-r.coordinate*zPe),s;return o>l$?s=i==="outer"?"start":"end":o<-l$?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,s=r.radius,a=r.axisLine,l=r.axisLineType,c=Nl(Nl({},Me(this.props,!1)),{},{fill:"none"},Me(a,!1));if(l==="circle")return A.createElement($N,zl({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:o,r:s}));var d=this.props.ticks,f=d.map(function(h){return _t(i,o,s,h.coordinate)});return A.createElement(tPe,zl({className:"recharts-polar-angle-axis-line"},c,{points:f}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,s=i.tick,a=i.tickLine,l=i.tickFormatter,c=i.stroke,d=Me(this.props,!1),f=Me(s,!1),h=Nl(Nl({},d),{},{fill:"none"},Me(a,!1)),p=o.map(function(g,m){var v=r.getTickLineCoord(g),y=r.getTickTextAnchor(g),b=Nl(Nl(Nl({textAnchor:y},d),{},{stroke:"none",fill:c},f),{},{index:m,payload:g,x:v.x2,y:v.y2});return A.createElement(dt,zl({className:qe("recharts-polar-angle-axis-tick",HU(s)),key:"tick-".concat(g.coordinate)},Pc(r.props,g,m)),a&&A.createElement("line",zl({className:"recharts-polar-angle-axis-tick-line"},h,v)),s&&e.renderTickItem(s,b,l?l(g.value,m):g.value))});return A.createElement(dt,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.radius,s=r.axisLine;return o<=0||!i||!i.length?null:A.createElement(dt,{className:qe("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,o){var s;return A.isValidElement(r)?s=A.cloneElement(r,i):ze(r)?s=r(i):s=A.createElement(Mc,zl({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),s}}])}(E.PureComponent);G0(J0,"displayName","PolarAngleAxis");G0(J0,"axisType","angleAxis");G0(J0,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var FPe=m8,qPe=FPe(Object.getPrototypeOf,Object),UPe=qPe,VPe=Gs,WPe=UPe,HPe=Js,KPe="[object Object]",GPe=Function.prototype,JPe=Object.prototype,uV=GPe.toString,YPe=JPe.hasOwnProperty,XPe=uV.call(Object);function QPe(t){if(!HPe(t)||VPe(t)!=KPe)return!1;var e=WPe(t);if(e===null)return!0;var n=YPe.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&uV.call(n)==XPe}var ZPe=QPe;const eMe=ht(ZPe);var tMe=Gs,nMe=Js,rMe="[object Boolean]";function iMe(t){return t===!0||t===!1||nMe(t)&&tMe(t)==rMe}var oMe=iMe;const sMe=ht(oMe);function fm(t){"@babel/helpers - typeof";return fm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fm(t)}function Kb(){return Kb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kb.apply(this,arguments)}function aMe(t,e){return dMe(t)||uMe(t,e)||cMe(t,e)||lMe()}function lMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 821In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cMe(t,e){if(t){if(typeof t=="string")return c$(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c$(t,e)}}function c$(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function uMe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function dMe(t){if(Array.isArray(t))return t}function u$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function d$(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?u$(Object(n),!0).forEach(function(r){fMe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function fMe(t,e,n){return e=hMe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hMe(t){var e=pMe(t,"string");return fm(e)=="symbol"?e:e+""}function pMe(t,e){if(fm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(fm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var f$=function(e,n,r,i,o){var s=r-i,a;return a="M ".concat(e,",").concat(n),a+="L ".concat(e+r,",").concat(n),a+="L ".concat(e+r-s/2,",").concat(n+o),a+="L ".concat(e+r-s/2-i,",").concat(n+o),a+="L ".concat(e,",").concat(n," Z"),a},mMe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},gMe=function(e){var n=d$(d$({},mMe),e),r=E.useRef(),i=E.useState(-1),o=aMe(i,2),s=o[0],a=o[1];E.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var x=r.current.getTotalLength();x&&a(x)}catch{}},[]);var l=n.x,c=n.y,d=n.upperWidth,f=n.lowerWidth,h=n.height,p=n.className,g=n.animationEasing,m=n.animationDuration,v=n.animationBegin,y=n.isUpdateAnimationActive;if(l!==+l||c!==+c||d!==+d||f!==+f||h!==+h||d===0&&f===0||h===0)return null;var b=qe("recharts-trapezoid",p);return y?A.createElement(qs,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:d,lowerWidth:f,height:h,x:l,y:c},duration:m,animationEasing:g,isActive:y},function(x){var S=x.upperWidth,w=x.lowerWidth,k=x.height,j=x.x,T=x.y;return A.createElement(qs,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,easing:g},A.createElement("path",Kb({},Me(n,!0),{className:b,d:f$(j,T,S,w,k),ref:r})))}):A.createElement("g",null,A.createElement("path",Kb({},Me(n,!0),{className:b,d:f$(l,c,d,f,h)})))},vMe=["option","shapeType","propTransformer","activeClassName","isActive"];function hm(t){"@babel/helpers - typeof";return hm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hm(t)}function yMe(t,e){if(t==null)return{};var n=bMe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function bMe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function h$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Gb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?h$(Object(n),!0).forEach(function(r){xMe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function xMe(t,e,n){return e=wMe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wMe(t){var e=SMe(t,"string");return hm(e)=="symbol"?e:e+""}function SMe(t,e){if(hm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(hm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kMe(t,e){return Gb(Gb({},e),t)}function EMe(t,e){return t==="symbols"}function p$(t){var e=t.shapeType,n=t.elementProps;switch(e){case"rectangle":return A.createElement(DN,n);case"trapezoid":return A.createElement(gMe,n);case"sector":return A.createElement(JU,n);case"symbols":if(EMe(e))return A.createElement(eN,n);break;default:return null}}function jMe(t){return E.isValidElement(t)?t.props:t}function dV(t){var e=t.option,n=t.shapeType,r=t.propTransformer,i=r===void 0?kMe:r,o=t.activeClassName,s=o===void 0?"recharts-active-shape":o,a=t.isActive,l=yMe(t,vMe),c;if(E.isValidElement(e))c=E.cloneElement(e,Gb(Gb({},l),jMe(e)));else if(ze(e))c=e(l);else if(eMe(e)&&!sMe(e)){var d=i(e,l);c=A.createElement(p$,{shapeType:n,elementProps:d})}else{var f=l;c=A.createElement(p$,{shapeType:n,elementProps:f})}return a?A.createElement(dt,{className:s},c):c}function Y0(t,e){return e!=null&&"trapezoids"in t.props}function X0(t,e){return e!=null&&"sectors"in t.props}function pm(t,e){return e!=null&&"points"in t.props}function TMe(t,e){var n,r,i=t.x===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.x)||t.x===e.x,o=t.y===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.y)||t.y===e.y;return i&&o}function _Me(t,e){var n=t.endAngle===e.endAngle,r=t.startAngle===e.startAngle;return n&&r}function AMe(t,e){var n=t.x===e.x,r=t.y===e.y,i=t.z===e.z;return n&&r&&i}function NMe(t,e){var n;return Y0(t,e)?n=TMe:X0(t,e)?n=_Me:pm(t,e)&&(n=AMe),n}function CMe(t,e){var n;return Y0(t,e)?n="trapezoids":X0(t,e)?n="sectors":pm(t,e)&&(n="points"),n}function OMe(t,e){if(Y0(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(X0(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return pm(t,e)?e.payload:{}}function PMe(t){var e=t.activeTooltipItem,n=t.graphicalItem,r=t.itemData,i=CMe(n,e),o=OMe(n,e),s=r.filter(function(l,c){var d=q0(o,l),f=n.props[i].filter(function(g){var m=NMe(n,e);return m(g,e)}),h=n.props[i].indexOf(f[f.length-1]),p=c===h;return d&&p}),a=r.indexOf(s[s.length-1]);return a}var Cv;function Bd(t){"@babel/helpers - typeof";return Bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bd(t)}function Pu(){return Pu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Pu.apply(this,arguments)}function m$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Et(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?m$(Object(n),!0).forEach(function(r){_i(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function MMe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,hV(r.key),r)}}function RMe(t,e,n){return e&&g$(t.prototype,e),n&&g$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function IMe(t,e,n){return e=Jb(e),DMe(t,fV()?Reflect.construct(e,n||[],Jb(t).constructor):e.apply(t,n))}function DMe(t,e){if(e&&(Bd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Me(t)}function $Me(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fV=function(){return!!t})()}function Jb(t){return Jb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jb(t)}function LMe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xj(t,e)}function Xj(t,e){return Xj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Xj(t,e)}function _i(t,e,n){return e=hV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hV(t){var e=BMe(t,"string");return Bd(e)=="symbol"?e:e+""}function BMe(t,e){if(Bd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Bd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Xs=function(t){function e(n){var r;return MMe(this,e),r=IMe(this,e,[n]),_i(r,"pieRef",null),_i(r,"sectorRefs",[]),_i(r,"id",zm("recharts-pie-")),_i(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ze(i)&&i()}),_i(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ze(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return LMe(e,t),RMe(e,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var o=this.props,s=o.label,a=o.labelLine,l=o.dataKey,c=o.valueKey,d=Me(this.props,!1),f=Me(s,!1),h=Me(a,!1),p=s&&s.offsetRadius||20,g=r.map(function(m,v){var y=(m.startAngle+m.endAngle)/2,b=_t(m.cx,m.cy,m.outerRadius+p,y),x=Et(Et(Et(Et({},d),m),{},{stroke:"none"},f),{},{index:v,textAnchor:e.getTextAnchor(b.x,m.cx)},b),S=Et(Et(Et(Et({},d),m),{},{fill:"none",stroke:m.fill},h),{},{index:v,points:[_t(m.cx,m.cy,m.outerRadius,y),b]}),w=l;return Ye(l)&&Ye(c)?w="value":Ye(l)&&(w=c),A.createElement(dt,{key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(v)},a&&e.renderLabelLineItem(a,S,"line"),e.renderLabelItem(s,x,or(m,w)))});return A.createElement(dt,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(r){var i=this,o=this.props,s=o.activeShape,a=o.blendStroke,l=o.inactiveShape;return r.map(function(c,d){if((c==null?void 0:c.startAngle)===0&&(c==null?void 0:c.endAngle)===0&&r.length!==1)return null;var f=i.isActiveIndex(d),h=l&&i.hasActiveIndex()?l:null,p=f?s:h,g=Et(Et({},c),{},{stroke:a?c.fill:c.stroke,tabIndex:-1});return A.createElement(dt,Pu({ref:function(v){v&&!i.sectorRefs.includes(v)&&i.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},Pc(i.props,c,d),{key:"sector-".concat(c==null?void 0:c.startAngle,"-").concat(c==null?void 0:c.endAngle,"-").concat(c.midAngle,"-").concat(d)}),A.createElement(dV,Pu({option:p,isActive:f,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,o=i.sectors,s=i.isAnimationActive,a=i.animationBegin,l=i.animationDuration,c=i.animationEasing,d=i.animationId,f=this.state,h=f.prevSectors,p=f.prevIsAnimationActive;return A.createElement(qs,{begin:a,duration:l,isActive:s,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var m=g.t,v=[],y=o&&o[0],b=y.startAngle;return o.forEach(function(x,S){var w=h&&h[S],k=S>0?ii(x,"paddingAngle",0):0;if(w){var j=ha(w.endAngle-w.startAngle,x.endAngle-x.startAngle),T=Et(Et({},x),{},{startAngle:b+k,endAngle:b+j(m)+k});v.push(T),b=T.endAngle}else{var _=x.endAngle,N=x.startAngle,C=ha(0,_-N),O=C(m),I=Et(Et({},x),{},{startAngle:b+k,endAngle:b+O+k});v.push(I),b=I.endAngle}}),A.createElement(dt,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var a=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,o=r.isAnimationActive,s=this.state.prevSectors;return o&&i&&i.length&&(!s||!q0(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,o=i.hide,s=i.sectors,a=i.className,l=i.label,c=i.cx,d=i.cy,f=i.innerRadius,h=i.outerRadius,p=i.isAnimationActive,g=this.state.isAnimationFinished;if(o||!s||!s.length||!ae(c)||!ae(d)||!ae(f)||!ae(h))return null;var m=qe("recharts-pie",a);return A.createElement(dt,{tabIndex:this.props.rootTabIndex,className:m,ref:function(y){r.pieRef=y}},this.renderSectors(),l&&this.renderLabels(s),Pn.renderCallByParent(this.props,null,!1),(!p||g)&&Qa.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,o){if(A.isValidElement(r))return A.cloneElement(r,i);if(ze(r))return r(i);var s=qe("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return A.createElement(Dj,Pu({},i,{key:o,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(r,i,o){if(A.isValidElement(r))return A.cloneElement(r,i);var s=o;if(ze(r)&&(s=r(i),A.isValidElement(s)))return s;var a=qe("recharts-pie-label-text",typeof r!="boolean"&&!ze(r)?r.className:"");return A.createElement(Mc,Pu({},i,{alignmentBaseline:"middle",className:a}),s)}}])}(E.PureComponent);Cv=Xs;_i(Xs,"displayName","Pie");_i(Xs,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!As.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});_i(Xs,"parseDeltaAngle",function(t,e){var n=gr(e-t),r=Math.min(Math.abs(e-t),360);return n*r});_i(Xs,"getRealPieData",function(t){var e=t.data,n=t.children,r=Me(t,!1),i=Ri(n,P0);return e&&e.length?e.map(function(o,s){return Et(Et(Et({payload:o},r),o),i&&i[s]&&i[s].props)}):i&&i.length?i.map(function(o){return Et(Et({},r),o.props)}):[]});_i(Xs,"parseCoordinateOfPie",function(t,e){var n=e.top,r=e.left,i=e.width,o=e.height,s=WU(i,o),a=r+vr(t.cx,i,i/2),l=n+vr(t.cy,o,o/2),c=vr(t.innerRadius,s,0),d=vr(t.outerRadius,s,s*.8),f=t.maxRadius||Math.sqrt(i*i+o*o)/2;return{cx:a,cy:l,innerRadius:c,outerRadius:d,maxRadius:f}});_i(Xs,"getComposedData",function(t){var e=t.item,n=t.offset,r=e.type.defaultProps!==void 0?Et(Et({},e.type.defaultProps),e.props):e.props,i=Cv.getRealPieData(r);if(!i||!i.length)return null;var o=r.cornerRadius,s=r.startAngle,a=r.endAngle,l=r.paddingAngle,c=r.dataKey,d=r.nameKey,f=r.valueKey,h=r.tooltipType,p=Math.abs(r.minAngle),g=Cv.parseCoordinateOfPie(r,n),m=Cv.parseDeltaAngle(s,a),v=Math.abs(m),y=c;Ye(c)&&Ye(f)?(_s(!1,`Use "dataKey" to specify the value of pie,
822 the props "valueKey" will be deprecated in 1.1.0`),y="value"):Ye(c)&&(_s(!1,`Use "dataKey" to specify the value of pie, 823 the props "valueKey" will be deprecated in 1.1.0`),y=f);var b=i.filter(function(T){return or(T,y,0)!==0}).length,x=(v>=360?b:b-1)*l,S=v-b*p-x,w=i.reduce(function(T,_){var N=or(_,y,0);return T+(ae(N)?N:0)},0),k;if(w>0){var j;k=i.map(function(T,_){var N=or(T,y,0),C=or(T,d,_),O=(ae(N)?N:0)/w,I;_?I=j.endAngle+gr(m)*l*(N!==0?1:0):I=s;var P=I+gr(m)*((N!==0?p:0)+O*S),$=(I+P)/2,B=(g.innerRadius+g.outerRadius)/2,z=[{name:C,value:N,payload:T,dataKey:y,type:h}],R=_t(g.cx,g.cy,B,$);return j=Et(Et(Et({percent:O,cornerRadius:o,name:C,tooltipPayload:z,midAngle:$,middleRadius:B,tooltipPosition:R},T),g),{},{value:or(T,y),startAngle:I,endAngle:P,payload:T,paddingAngle:gr(m)*l}),j})}return Et(Et({},g),{},{sectors:k,data:i})});var zMe=Math.ceil,FMe=Math.max;function qMe(t,e,n,r){for(var i=-1,o=FMe(zMe((e-t)/(n||1)),0),s=Array(o);o--;)s[r?o:++i]=t,t+=n;return s}var UMe=qMe,VMe=M8,v$=1/0,WMe=17976931348623157e292;function HMe(t){if(!t)return t===0?t:0;if(t=VMe(t),t===v$||t===-v$){var e=t<0?-1:1;return e*WMe}return t===t?t:0}var KMe=HMe,GMe=UMe,JMe=O0,jS=KMe;function YMe(t){return function(e,n,r){return r&&typeof r!="number"&&JMe(e,n,r)&&(n=r=void 0),e=jS(e),n===void 0?(n=e,e=0):n=jS(n),r=r===void 0?e<n?1:-1:jS(r),GMe(e,n,r,t)}}var XMe=YMe,QMe=XMe,ZMe=QMe(),eRe=ZMe;const Yb=ht(eRe);function mm(t){"@babel/helpers - typeof";return mm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mm(t)}function y$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function b$(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?y$(Object(n),!0).forEach(function(r){pV(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function pV(t,e,n){return e=tRe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tRe(t){var e=nRe(t,"string");return mm(e)=="symbol"?e:e+""}function nRe(t,e){if(mm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(mm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var rRe=["Webkit","Moz","O","ms"],iRe=function(e,n){var r=e.replace(/(\w)/,function(o){return o.toUpperCase()}),i=rRe.reduce(function(o,s){return b$(b$({},o),{},pV({},s+r,n))},{});return i[e]=n,i};function zd(t){"@babel/helpers - typeof";return zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zd(t)}function Xb(){return Xb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xb.apply(this,arguments)}function x$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function TS(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?x$(Object(n),!0).forEach(function(r){Kr(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function oRe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,gV(r.key),r)}}function sRe(t,e,n){return e&&w$(t.prototype,e),n&&w$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function aRe(t,e,n){return e=Qb(e),lRe(t,mV()?Reflect.construct(e,n||[],Qb(t).constructor):e.apply(t,n))}function lRe(t,e){if(e&&(zd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cRe(t)}function cRe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mV=function(){return!!t})()}function Qb(t){return Qb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qb(t)}
vendor: 9,816 bytes, line 823
823function uRe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qj(t,e)}function Qj(t,e){return Qj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Qj(t,e)}function Kr(t,e,n){return e=gV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gV(t){var e=dRe(t,"string");return zd(e)=="symbol"?e:e+""}function dRe(t,e){if(zd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(zd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var fRe=function(e){var n=e.data,r=e.startIndex,i=e.endIndex,o=e.x,s=e.width,a=e.travellerWidth;if(!n||!n.length)return{};var l=n.length,c=Fh().domain(Yb(0,l)).range([o,o+s-a]),d=c.domain().map(function(f){return c(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(r),endX:c(i),scale:c,scaleValues:d}},S$=function(e){return e.changedTouches&&!!e.changedTouches.length},Fd=function(t){function e(n){var r;return oRe(this,e),r=aRe(this,e,[n]),Kr(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Kr(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Kr(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,s=i.onDragEnd,a=i.startIndex;s==null||s({endIndex:o,startIndex:a})}),r.detachDragEndListener()}),Kr(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Kr(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Kr(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Kr(r,"handleSlideDragStart",function(i){var o=S$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return uRe(e,t),sRe(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,s=this.state.scaleValues,a=this.props,l=a.gap,c=a.data,d=c.length-1,f=Math.min(i,o),h=Math.max(i,o),p=e.getIndexInRange(s,f),g=e.getIndexInRange(s,h);return{startIndex:p-p%l,endIndex:g===d?d:g-g%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,s=i.tickFormatter,a=i.dataKey,l=or(o[r],a,r);return ze(s)?s(l,r):l}},{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(r){var i=this.state,o=i.slideMoveStartX,s=i.startX,a=i.endX,l=this.props,c=l.x,d=l.width,f=l.travellerWidth,h=l.startIndex,p=l.endIndex,g=l.onChange,m=r.pageX-o;m>0?m=Math.min(m,c+d-f-a,c+d-f-s):m<0&&(m=Math.max(m,c-s,c-a));var v=this.getIndex({startX:s+m,endX:a+m});(v.startIndex!==h||v.endIndex!==p)&&g&&g(v),this.setState({startX:s+m,endX:a+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=S$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,s=i.movingTravellerId,a=i.endX,l=i.startX,c=this.state[s],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,g=d.onChange,m=d.gap,v=d.data,y={startX:this.state.startX,endX:this.state.endX},b=r.pageX-o;b>0?b=Math.min(b,f+h-p-c):b<0&&(b=Math.max(b,f-c)),y[s]=c+b;var x=this.getIndex(y),S=x.startIndex,w=x.endIndex,k=function(){var T=v.length-1;return s==="startX"&&(a>l?S%m===0:w%m===0)||a<l&&w===T||s==="endX"&&(a>l?w%m===0:S%m===0)||a>l&&w===T};this.setState(Kr(Kr({},s,c+b),"brushMoveStartX",r.pageX),function(){g&&k()&&g(x)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,s=this.state,a=s.scaleValues,l=s.startX,c=s.endX,d=this.state[i],f=a.indexOf(d);if(f!==-1){var h=f+r;if(!(h===-1||h>=a.length)){var p=a[h];i==="startX"&&p>=c||i==="endX"&&p<=l||this.setState(Kr({},i,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,a=r.height,l=r.fill,c=r.stroke;return A.createElement("rect",{stroke:c,fill:l,x:i,y:o,width:s,height:a})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,a=r.height,l=r.data,c=r.children,d=r.padding,f=E.Children.only(c);return f?A.cloneElement(f,{x:i,y:o,width:s,height:a,margin:d,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,s,a=this,l=this.props,c=l.y,d=l.travellerWidth,f=l.height,h=l.traveller,p=l.ariaLabel,g=l.data,m=l.startIndex,v=l.endIndex,y=Math.max(r,this.props.x),b=TS(TS({},Me(this.props,!1)),{},{x:y,y:c,width:d,height:f}),x=p||"Min value: ".concat((o=g[m])===null||o===void 0?void 0:o.name,", Max value: ").concat((s=g[v])===null||s===void 0?void 0:s.name);return A.createElement(dt,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),a.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(h,b))}},{key:"renderSlide",value:function(r,i){var o=this.props,s=o.y,a=o.height,l=o.stroke,c=o.travellerWidth,d=Math.min(r,i)+c,f=Math.max(Math.abs(i-r)-c,0);return A.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:d,y:s,width:f,height:a})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,s=r.y,a=r.height,l=r.travellerWidth,c=r.stroke,d=this.state,f=d.startX,h=d.endX,p=5,g={pointerEvents:"none",fill:c};return A.createElement(dt,{className:"recharts-brush-texts"},A.createElement(Mc,Xb({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:s+a/2},g),this.getTextOfTick(i)),A.createElement(Mc,Xb({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+p,y:s+a/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,s=r.children,a=r.x,l=r.y,c=r.width,d=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,g=h.endX,m=h.isTextActive,v=h.isSlideMoving,y=h.isTravellerMoving,b=h.isTravellerFocused;if(!i||!i.length||!ae(a)||!ae(l)||!ae(c)||!ae(d)||c<=0||d<=0)return null;var x=qe("recharts-brush",o),S=A.Children.count(s)===1,w=iRe("userSelect","none");return A.createElement(dt,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(m||v||y||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,s=r.width,a=r.height,l=r.stroke,c=Math.floor(o+a/2)-1;return A.createElement(A.Fragment,null,A.createElement("rect",{x:i,y:o,width:s,height:a,fill:l,stroke:"none"}),A.createElement("line",{x1:i+1,y1:c,x2:i+s-1,y2:c,fill:"none",stroke:"#fff"}),A.createElement("line",{x1:i+1,y1:c+2,x2:i+s-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return A.isValidElement(r)?o=A.cloneElement(r,i):ze(r)?o=r(i):o=e.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,s=r.width,a=r.x,l=r.travellerWidth,c=r.updateId,d=r.startIndex,f=r.endIndex;if(o!==i.prevData||c!==i.prevUpdateId)return TS({prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:a,prevWidth:s},o&&o.length?fRe({data:o,width:s,x:a,travellerWidth:l,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||a!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([a,a+s-l]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:a,prevWidth:s,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,s=0,a=o-1;a-s>1;){var l=Math.floor((s+a)/2);r[l]>i?a=l:s=l}return i>=r[a]?a:s}}])}(E.PureComponent);Kr(Fd,"displayName","Brush");Kr(Fd,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});
823var hRe=lN;function pRe(t,e){var n;return hRe(t,function(r,i,o){return n=e(r,i,o),!n}),!!n}var mRe=pRe,gRe=a8,vRe=gl,yRe=mRe,bRe=Vr,xRe=O0;function wRe(t,e,n){var r=bRe(t)?gRe:yRe;return n&&xRe(t,e,n)&&(e=void 0),r(t,vRe(e))}var SRe=wRe;const kRe=ht(SRe);var Uo=function(e,n){var r=e.alwaysShow,i=e.ifOverflow;return r&&(i="extendDomain"),i===n},k$=A8;function ERe(t,e,n){e=="__proto__"&&k$?k$(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var jRe=ERe,TRe=jRe,_Re=T8,ARe=gl;function NRe(t,e){var n={};return e=ARe(e),_Re(t,function(r,i,o){TRe(n,i,e(r,i,o))}),n}var CRe=NRe;const ORe=ht(CRe);function PRe(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}var MRe=PRe,RRe=lN;function IRe(t,e){var n=!0;return RRe(t,function(r,i,o){return n=!!e(r,i,o),n}),n}var DRe=IRe,$Re=MRe,LRe=DRe,BRe=gl,zRe=Vr,FRe=O0;function qRe(t,e,n){var r=zRe(t)?$Re:LRe;return n&&FRe(t,e,n)&&(e=void 0),r(t,BRe(e))}var URe=qRe;const VRe=ht(URe);var WRe=["x","y"];function gm(t){"@babel/helpers - typeof";return gm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gm(t)}function Zj(){return Zj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Zj.apply(this,arguments)}function E$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function eh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?E$(Object(n),!0).forEach(function(r){HRe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function HRe(t,e,n){return e=KRe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function KRe(t){var e=GRe(t,"string");return gm(e)=="symbol"?e:e+""}function GRe(t,e){if(gm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(gm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function JRe(t,e){if(t==null)return{};var n=YRe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function YRe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function XRe(t,e){var n=t.x,r=t.y,i=JRe(t,WRe),o="".concat(n),s=parseInt(o,10),a="".concat(r),l=parseInt(a,10),c="".concat(e.height||i.height),d=parseInt(c,10),f="".concat(e.width||i.width),h=parseInt(f,10);return eh(eh(eh(eh(eh({},e),i),s?{x:s}:{}),l?{y:l}:{}),{},{height:d,width:h,name:e.name,radius:e.radius})}function j$(t){return A.createElement(dV,Zj({shapeType:"rectangle",propTransformer:XRe,activeClassName:"recharts-active-bar"},t))}var QRe=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof e=="number")return e;var o=ae(r)||wge(r);return o?e(r,i):(o||Ic(),n)}},ZRe=["value","background"],vV;function qd(t){"@babel/helpers - typeof";return qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qd(t)}function eIe(t,e){if(t==null)return{};var n=tIe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function tIe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Zb(){return Zb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Zb.apply(this,arguments)}function T$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function un(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
vendor: 89,764 bytes, lines 823-827
823e%2?T$(Object(n),!0).forEach(function(r){Pa(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function nIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,bV(r.key),r)}}function rIe(t,e,n){return e&&_$(t.prototype,e),n&&_$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function iIe(t,e,n){return e=ex(e),oIe(t,yV()?Reflect.construct(e,n||[],ex(t).constructor):e.apply(t,n))}function oIe(t,e){if(e&&(qd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sIe(t)}function sIe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yV=function(){return!!t})()}function ex(t){return ex=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ex(t)}function aIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&eT(t,e)}function eT(t,e){return eT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},eT(t,e)}function Pa(t,e,n){return e=bV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bV(t){var e=lIe(t,"string");return qd(e)=="symbol"?e:e+""}function lIe(t,e){if(qd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(qd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Cs=function(t){function e(){var n;nIe(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=iIe(this,e,[].concat(i)),Pa(n,"state",{isAnimationFinished:!1}),Pa(n,"id",zm("recharts-bar-")),Pa(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),s&&s()}),Pa(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),s&&s()}),n}return aIe(e,t),rIe(e,[{key:"renderRectanglesStatically",value:function(r){var i=this,o=this.props,s=o.shape,a=o.dataKey,l=o.activeIndex,c=o.activeBar,d=Me(this.props,!1);return r&&r.map(function(f,h){var p=h===l,g=p?c:s,m=un(un(un({},d),f),{},{isActive:p,option:g,index:h,dataKey:a,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return A.createElement(dt,Zb({className:"recharts-bar-rectangle"},Pc(i.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(h)}),A.createElement(j$,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,o=i.data,s=i.layout,a=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,d=i.animationEasing,f=i.animationId,h=this.state.prevData;return A.createElement(qs,{begin:l,duration:c,isActive:a,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,m=o.map(function(v,y){var b=h&&h[y];if(b){var x=ha(b.x,v.x),S=ha(b.y,v.y),w=ha(b.width,v.width),k=ha(b.height,v.height);return un(un({},v),{},{x:x(g),y:S(g),width:w(g),height:k(g)})}if(s==="horizontal"){var j=ha(0,v.height),T=j(g);return un(un({},v),{},{y:v.y+v.height-T,height:T})}var _=ha(0,v.width),N=_(g);return un(un({},v),{},{width:N})});return A.createElement(dt,null,r.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,o=r.isAnimationActive,s=this.state.prevData;return o&&i&&i.length&&(!s||!q0(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,o=i.data,s=i.dataKey,a=i.activeIndex,l=Me(this.props.background,!1);return o.map(function(c,d){c.value;var f=c.background,h=eIe(c,ZRe);if(!f)return null;var p=un(un(un(un(un({},h),{},{fill:"#eee"},f),l),Pc(r.props,c,d)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:s,index:d,className:"recharts-bar-background-rectangle"});return A.createElement(j$,Zb({key:"background-bar-".concat(d),option:r.props.background,isActive:d===a},p))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,s=o.data,a=o.xAxis,l=o.yAxis,c=o.layout,d=o.children,f=Ri(d,W0);if(!f)return null;var h=c==="vertical"?s[0].height/2:s[0].width/2,p=function(v,y){var b=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:b,errorVal:or(v,y)}},g={clipPath:r?"url(#clipPath-".concat(i,")"):null};return A.createElement(dt,g,f.map(function(m){return A.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:s,xAxis:a,yAxis:l,layout:c,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,o=r.data,s=r.className,a=r.xAxis,l=r.yAxis,c=r.left,d=r.top,f=r.width,h=r.height,p=r.isAnimationActive,g=r.background,m=r.id;if(i||!o||!o.length)return null;var v=this.state.isAnimationFinished,y=qe("recharts-bar",s),b=a&&a.allowDataOverflow,x=l&&l.allowDataOverflow,S=b||x,w=Ye(m)?this.id:m;return A.createElement(dt,{className:y},b||x?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(w)},A.createElement("rect",{x:b?c:c-f/2,y:x?d:d-h/2,width:b?f:f*2,height:x?h:h*2}))):null,A.createElement(dt,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(w,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,w),(!p||v)&&Qa.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(E.PureComponent);vV=Cs;Pa(Cs,"displayName","Bar");Pa(Cs,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!As.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Pa(Cs,"getComposedData",function(t){var e=t.props,n=t.item,r=t.barPosition,i=t.bandSize,o=t.xAxis,s=t.yAxis,a=t.xAxisTicks,l=t.yAxisTicks,c=t.stackedData,d=t.dataStartIndex,f=t.displayedData,h=t.offset,p=zNe(r,n);if(!p)return null;var g=e.layout,m=n.type.defaultProps,v=m!==void 0?un(un({},m),n.props):n.props,y=v.dataKey,b=v.children,x=v.minPointSize,S=g==="horizontal"?s:o,w=c?S.scale.domain():null,k=KNe({numericAxis:S}),j=Ri(b,P0),T=f.map(function(_,N){var C,O,I,P,$,B;c?C=FNe(c[d+N],w):(C=or(_,y),Array.isArray(C)||(C=[k,C]));var z=QRe(x,vV.defaultProps.minPointSize)(C[1],N);if(g==="horizontal"){var R,L=[s.scale(C[0]),s.scale(C[1])],q=L[0],G=L[1];O=gD({axis:o,ticks:a,bandSize:i,offset:p.offset,entry:_,index:N}),I=(R=G??q)!==null&&R!==void 0?R:void 0,P=p.size;var V=q-G;if($=Number.isNaN(V)?0:V,B={x:O,y:s.y,width:P,height:s.height},Math.abs(z)>0&&Math.abs($)<Math.abs(z)){var Y=gr($||z)*(Math.abs(z)-Math.abs($));I-=Y,$+=Y}}else{var pe=[o.scale(C[0]),o.scale(C[1])],me=pe[0],Ue=pe[1];if(O=me,I=gD({axis:s,ticks:l,bandSize:i,offset:p.offset,entry:_,index:N}),P=Ue-me,$=p.size,B={x:o.x,y:I,width:o.width,height:$},Math.abs(z)>0&&Math.abs(P)<Math.abs(z)){var H=gr(P||z)*(Math.abs(z)-Math.abs(P));P+=H}}return un(un(un({},_),{},{x:O,y:I,width:P,height:$,value:c?C:C[1],payload:_,background:B},j&&j[N]&&j[N].props),{},{tooltipPayload:[UU(n,_)],tooltipPosition:{x:O+P/2,y:I+$/2}})});return un({data:T,layout:g},h)});function vm(t){"@babel/helpers - typeof";return vm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vm(t)}function cIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xV(r.key),r)}}function uIe(t,e,n){return e&&A$(t.prototype,e),n&&A$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function N$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ro(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?N$(Object(n),!0).forEach(function(r){Q0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Q0(t,e,n){return e=xV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xV(t){var e=dIe(t,"string");return vm(e)=="symbol"?e:e+""}function dIe(t,e){if(vm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(vm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var fIe=function(e,n,r,i,o){var s=e.width,a=e.height,l=e.layout,c=e.children,d=Object.keys(n),f={left:r.left,leftMirror:r.left,right:s-r.right,rightMirror:s-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},h=!!Jr(c,Cs);return d.reduce(function(p,g){var m=n[g],v=m.orientation,y=m.domain,b=m.padding,x=b===void 0?{}:b,S=m.mirror,w=m.reversed,k="".concat(v).concat(S?"Mirror":""),j,T,_,N,C;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var O=y[1]-y[0],I=1/0,P=m.categoricalDomain.sort(Ege);if(P.forEach(function(pe,me){me>0&&(I=Math.min((pe||0)-(P[me-1]||0),I))}),Number.isFinite(I)){var $=I/O,B=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(j=$*B/2),m.padding==="no-gap"){var z=vr(e.barCategoryGap,$*B),R=$*B/2;j=R-z-(R-z)/B*z}}}i==="xAxis"?T=[r.left+(x.left||0)+(j||0),r.left+r.width-(x.right||0)-(j||0)]:i==="yAxis"?T=l==="horizontal"?[r.top+r.height-(x.bottom||0),r.top+(x.top||0)]:[r.top+(x.top||0)+(j||0),r.top+r.height-(x.bottom||0)-(j||0)]:T=m.range,w&&(T=[T[1],T[0]]);var L=BU(m,o,h),q=L.scale,G=L.realScaleType;q.domain(y).range(T),zU(q);var V=FU(q,ro(ro({},m),{},{realScaleType:G}));i==="xAxis"?(C=v==="top"&&!S||v==="bottom"&&S,_=r.left,N=f[k]-C*m.height):i==="yAxis"&&(C=v==="left"&&!S||v==="right"&&S,_=f[k]-C*m.width,N=r.top);var Y=ro(ro(ro({},m),V),{},{realScaleType:G,x:_,y:N,scale:q,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return Y.bandSize=Lb(Y,V),!m.hide&&i==="xAxis"?f[k]+=(C?-1:1)*Y.height:m.hide||(f[k]+=(C?-1:1)*Y.width),ro(ro({},p),{},Q0({},g,Y))},{})},wV=function(e,n){var r=e.x,i=e.y,o=n.x,s=n.y;return{x:Math.min(r,o),y:Math.min(i,s),width:Math.abs(o-r),height:Math.abs(s-i)}},hIe=function(e){var n=e.x1,r=e.y1,i=e.x2,o=e.y2;return wV({x:n,y:r},{x:i,y:o})},SV=function(){function t(e){cIe(this,t),this.scale=e}return uIe(t,[{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 r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(n)+a}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new t(n)}}])}();Q0(SV,"EPS",1e-4);var LN=function(e){var n=Object.keys(e).reduce(function(r,i){return ro(ro({},r),{},Q0({},i,SV.create(e[i])))},{});return ro(ro({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=o.bandAware,a=o.position;return ORe(i,function(l,c){return n[c].apply(l,{bandAware:s,position:a})})},isInRange:function(i){return VRe(i,function(o,s){return n[s].isInRange(o)})}})};function pIe(t){return(t%180+180)%180}var mIe=function(e){var n=e.width,r=e.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=pIe(i),s=o*Math.PI/180,a=Math.atan(r/n),l=s>a&&s<Math.PI-a?r/Math.sin(s):n/Math.cos(s);return Math.abs(l)},gIe=jme(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),kV=E.createContext(void 0),EV=E.createContext(void 0),jV=E.createContext(void 0),vIe=E.createContext({}),TV=E.createContext(void 0),_V=E.createContext(0),AV=E.createContext(0),C$=function(e){var n=e.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,s=e.clipPathId,a=e.children,l=e.width,c=e.height,d=gIe(o);return A.createElement(kV.Provider,{value:r},A.createElement(EV.Provider,{value:i},A.createElement(vIe.Provider,{value:o},A.createElement(jV.Provider,{value:d},A.createElement(TV.Provider,{value:s},A.createElement(_V.Provider,{value:c},A.createElement(AV.Provider,{value:l},a)))))))},yIe=function(){return E.useContext(TV)},NV=function(e){var n=E.useContext(kV);n==null&&Ic();var r=n[e];return r==null&&Ic(),r},CV=function(e){var n=E.useContext(EV);n==null&&Ic();var r=n[e];return r==null&&Ic(),r},bIe=function(){var e=E.useContext(jV);return e},OV=function(){return E.useContext(AV)},PV=function(){return E.useContext(_V)};function Ud(t){"@babel/helpers - typeof";return Ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ud(t)}function xIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wIe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,RV(r.key),r)}}function SIe(t,e,n){return e&&wIe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function kIe(t,e,n){return e=tx(e),EIe(t,MV()?Reflect.construct(e,n||[],tx(t).constructor):e.apply(t,n))}function EIe(t,e){if(e&&(Ud(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jIe(t)}function jIe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function MV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MV=function(){return!!t})()}function tx(t){return tx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tx(t)}function TIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tT(t,e)}function tT(t,e){return tT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tT(t,e)}function O$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function P$(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?O$(Object(n),!0).forEach(function(r){BN(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function BN(t,e,n){return e=RV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function RV(t){var e=_Ie(t,"string");return Ud(e)=="symbol"?e:e+""}function _Ie(t,e){if(Ud(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ud(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function AIe(t,e){return PIe(t)||OIe(t,e)||CIe(t,e)||NIe()}function NIe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 824In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CIe(t,e){if(t){if(typeof t=="string")return M$(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M$(t,e)}}function M$(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function OIe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function PIe(t){if(Array.isArray(t))return t}function nT(){return nT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},nT.apply(this,arguments)}var MIe=function(e,n){var r;return A.isValidElement(e)?r=A.cloneElement(e,n):ze(e)?r=e(n):r=A.createElement("line",nT({},n,{className:"recharts-reference-line-line"})),r},RIe=function(e,n,r,i,o,s,a,l,c){var d=o.x,f=o.y,h=o.width,p=o.height;if(r){var g=c.y,m=e.y.apply(g,{position:s});if(Uo(c,"discard")&&!e.y.isInRange(m))return null;var v=[{x:d+h,y:m},{x:d,y:m}];return l==="left"?v.reverse():v}if(n){var y=c.x,b=e.x.apply(y,{position:s});if(Uo(c,"discard")&&!e.x.isInRange(b))return null;var x=[{x:b,y:f+p},{x:b,y:f}];return a==="top"?x.reverse():x}if(i){var S=c.segment,w=S.map(function(k){return e.apply(k,{position:s})});return Uo(c,"discard")&&kRe(w,function(k){return!e.isInRange(k)})?null:w}return null};function IIe(t){var e=t.x,n=t.y,r=t.segment,i=t.xAxisId,o=t.yAxisId,s=t.shape,a=t.className,l=t.alwaysShow,c=yIe(),d=NV(i),f=CV(o),h=bIe();if(!c||!h)return null;_s(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=LN({x:d.scale,y:f.scale}),g=Tn(e),m=Tn(n),v=r&&r.length===2,y=RIe(p,g,m,v,h,t.position,d.orientation,f.orientation,t);if(!y)return null;var b=AIe(y,2),x=b[0],S=x.x,w=x.y,k=b[1],j=k.x,T=k.y,_=Uo(t,"hidden")?"url(#".concat(c,")"):void 0,N=P$(P$({clipPath:_},Me(t,!0)),{},{x1:S,y1:w,x2:j,y2:T});return A.createElement(dt,{className:qe("recharts-reference-line",a)},MIe(s,N),Pn.renderCallByParent(t,hIe({x1:S,y1:w,x2:j,y2:T})))}var zN=function(t){function e(){return xIe(this,e),kIe(this,e,arguments)}return TIe(e,t),SIe(e,[{key:"render",value:function(){return A.createElement(IIe,this.props)}}])}(A.Component);BN(zN,"displayName","ReferenceLine");BN(zN,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function rT(){return rT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},rT.apply(this,arguments)}function Vd(t){"@babel/helpers - typeof";return Vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vd(t)}function R$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function I$(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?R$(Object(n),!0).forEach(function(r){Z0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function DIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,DV(r.key),r)}}function LIe(t,e,n){return e&&$Ie(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function BIe(t,e,n){return e=nx(e),zIe(t,IV()?Reflect.construct(e,n||[],nx(t).constructor):e.apply(t,n))}function zIe(t,e){if(e&&(Vd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FIe(t)}function FIe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function IV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IV=function(){return!!t})()}function nx(t){return nx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nx(t)}function qIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iT(t,e)}function iT(t,e){return iT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iT(t,e)}function Z0(t,e,n){return e=DV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function DV(t){var e=UIe(t,"string");return Vd(e)=="symbol"?e:e+""}function UIe(t,e){if(Vd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Vd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var VIe=function(e){var n=e.x,r=e.y,i=e.xAxis,o=e.yAxis,s=LN({x:i.scale,y:o.scale}),a=s.apply({x:n,y:r},{bandAware:!0});return Uo(e,"discard")&&!s.isInRange(a)?null:a},ew=function(t){function e(){return DIe(this,e),BIe(this,e,arguments)}return qIe(e,t),LIe(e,[{key:"render",value:function(){var r=this.props,i=r.x,o=r.y,s=r.r,a=r.alwaysShow,l=r.clipPathId,c=Tn(i),d=Tn(o);if(_s(a===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!d)return null;var f=VIe(this.props);if(!f)return null;var h=f.x,p=f.y,g=this.props,m=g.shape,v=g.className,y=Uo(this.props,"hidden")?"url(#".concat(l,")"):void 0,b=I$(I$({clipPath:y},Me(this.props,!0)),{},{cx:h,cy:p});return A.createElement(dt,{className:qe("recharts-reference-dot",v)},e.renderDot(m,b),Pn.renderCallByParent(this.props,{x:h-s,y:p-s,width:2*s,height:2*s}))}}])}(A.Component);Z0(ew,"displayName","ReferenceDot");Z0(ew,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Z0(ew,"renderDot",function(t,e){var n;return A.isValidElement(t)?n=A.cloneElement(t,e):ze(t)?n=t(e):n=A.createElement($N,rT({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),n});function oT(){return oT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},oT.apply(this,arguments)}function Wd(t){"@babel/helpers - typeof";return Wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wd(t)}function D$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function $$(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?D$(Object(n),!0).forEach(function(r){tw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function WIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HIe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,LV(r.key),r)}}function KIe(t,e,n){return e&&HIe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function GIe(t,e,n){return e=rx(e),JIe(t,$V()?Reflect.construct(e,n||[],rx(t).constructor):e.apply(t,n))}function JIe(t,e){if(e&&(Wd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return YIe(t)}function YIe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $V(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($V=function(){return!!t})()}function rx(t){return rx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rx(t)}function XIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sT(t,e)}function sT(t,e){return sT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sT(t,e)}function tw(t,e,n){return e=LV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function LV(t){var e=QIe(t,"string");return Wd(e)=="symbol"?e:e+""}function QIe(t,e){if(Wd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Wd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ZIe=function(e,n,r,i,o){var s=o.x1,a=o.x2,l=o.y1,c=o.y2,d=o.xAxis,f=o.yAxis;if(!d||!f)return null;var h=LN({x:d.scale,y:f.scale}),p={x:e?h.x.apply(s,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(l,{position:"start"}):h.y.rangeMin},g={x:n?h.x.apply(a,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(c,{position:"end"}):h.y.rangeMax};return Uo(o,"discard")&&(!h.isInRange(p)||!h.isInRange(g))?null:wV(p,g)},nw=function(t){function e(){return WIe(this,e),GIe(this,e,arguments)}return XIe(e,t),KIe(e,[{key:"render",value:function(){var r=this.props,i=r.x1,o=r.x2,s=r.y1,a=r.y2,l=r.className,c=r.alwaysShow,d=r.clipPathId;_s(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Tn(i),h=Tn(o),p=Tn(s),g=Tn(a),m=this.props.shape;if(!f&&!h&&!p&&!g&&!m)return null;var v=ZIe(f,h,p,g,this.props);if(!v&&!m)return null;var y=Uo(this.props,"hidden")?"url(#".concat(d,")"):void 0;return A.createElement(dt,{className:qe("recharts-reference-area",l)},e.renderRect(m,$$($$({clipPath:y},Me(this.props,!0)),v)),Pn.renderCallByParent(this.props,v))}}])}(A.Component);tw(nw,"displayName","ReferenceArea");tw(nw,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});tw(nw,"renderRect",function(t,e){var n;return A.isValidElement(t)?n=A.cloneElement(t,e):ze(t)?n=t(e):n=A.createElement(DN,oT({},e,{className:"recharts-reference-area-rect"})),n});function BV(t,e,n){if(e<1)return[];if(e===1&&n===void 0)return t;for(var r=[],i=0;i<t.length;i+=e)r.push(t[i]);return r}function eDe(t,e,n){var r={width:t.width+e.width,height:t.height+e.height};return mIe(r,n)}function tDe(t,e,n){var r=n==="width",i=t.x,o=t.y,s=t.width,a=t.height;return e===1?{start:r?i:o,end:r?i+s:o+a}:{start:r?i+s:o+a,end:r?i:o}}function ix(t,e,n,r,i){if(t*e<t*r||t*e>t*i)return!1;var o=n();return t*(e-t*o/2-r)>=0&&t*(e+t*o/2-i)<=0}function nDe(t,e){return BV(t,e+1)}function rDe(t,e,n,r,i){for(var o=(r||[]).slice(),s=e.start,a=e.end,l=0,c=1,d=s,f=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:BV(r,c)};var m=l,v,y=function(){return v===void 0&&(v=n(g,m)),v},b=g.coordinate,x=l===0||ix(t,b,y,d,a);x||(l=0,d=s,c+=1),x&&(d=b+t*(y()/2+i),l+=c)},h;c<=o.length;)if(h=f(),h)return h.v;return[]}function ym(t){"@babel/helpers - typeof";return ym=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ym(t)}function L$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?L$(Object(n),!0).forEach(function(r){iDe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iDe(t,e,n){return e=oDe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oDe(t){var e=sDe(t,"string");return ym(e)=="symbol"?e:e+""}function sDe(t,e){if(ym(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(ym(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function aDe(t,e,n,r,i){for(var o=(r||[]).slice(),s=o.length,a=e.start,l=e.end,c=function(h){var p=o[h],g,m=function(){return g===void 0&&(g=n(p,h)),g};if(h===s-1){var v=t*(p.coordinate+t*m()/2-l);o[h]=p=rr(rr({},p),{},{tickCoord:v>0?p.coordinate-v*t:p.coordinate})}else o[h]=p=rr(rr({},p),{},{tickCoord:p.coordinate});var y=ix(t,p.tickCoord,m,a,l);y&&(l=p.tickCoord-t*(m()/2+i),o[h]=rr(rr({},p),{},{isShow:!0}))},d=s-1;d>=0;d--)c(d);return o}function lDe(t,e,n,r,i,o){var s=(r||[]).slice(),a=s.length,l=e.start,c=e.end;if(o){var d=r[a-1],f=n(d,a-1),h=t*(d.coordinate+t*f/2-c);s[a-1]=d=rr(rr({},d),{},{tickCoord:h>0?d.coordinate-h*t:d.coordinate});var p=ix(t,d.tickCoord,function(){return f},l,c);p&&(c=d.tickCoord-t*(f/2+i),s[a-1]=rr(rr({},d),{},{isShow:!0}))}for(var g=o?a-1:a,m=function(b){var x=s[b],S,w=function(){return S===void 0&&(S=n(x,b)),S};if(b===0){var k=t*(x.coordinate-t*w()/2-l);s[b]=x=rr(rr({},x),{},{tickCoord:k<0?x.coordinate-k*t:x.coordinate})}else s[b]=x=rr(rr({},x),{},{tickCoord:x.coordinate});var j=ix(t,x.tickCoord,w,l,c);j&&(l=x.tickCoord+t*(w()/2+i),s[b]=rr(rr({},x),{},{isShow:!0}))},v=0;v<g;v++)m(v);return s}function cDe(t,e,n){var r=t.tick,i=t.ticks,o=t.viewBox,s=t.minTickGap,a=t.orientation,l=t.interval,c=t.tickFormatter,d=t.unit,f=t.angle;if(!i||!i.length||!r)return[];if(ae(l)||As.isSsr)return nDe(i,typeof l=="number"&&ae(l)?l:0);var h=[],p=a==="top"||a==="bottom"?"width":"height",g=d&&p==="width"?zh(d,{fontSize:e,letterSpacing:n}):{width:0,height:0},m=function(x,S){var w=ze(c)?c(x.value,S):x.value;return p==="width"?eDe(zh(w,{fontSize:e,letterSpacing:n}),g,f):zh(w,{fontSize:e,letterSpacing:n})[p]},v=i.length>=2?gr(i[1].coordinate-i[0].coordinate):1,y=tDe(o,v,p);return l==="equidistantPreserveStart"?rDe(v,y,m,i,s):(l==="preserveStart"||l==="preserveStartEnd"?h=lDe(v,y,m,i,s,l==="preserveStartEnd"):h=aDe(v,y,m,i,s),h.filter(function(b){return b.isShow}))}var uDe=["viewBox"],dDe=["viewBox"],fDe=["ticks"];function Hd(t){"@babel/helpers - typeof";return Hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hd(t)}function Mu(){return Mu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mu.apply(this,arguments)}function B$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?B$(Object(n),!0).forEach(function(r){FN(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _S(t,e){if(t==null)return{};var n=hDe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hDe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function pDe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,FV(r.key),r)}}function mDe(t,e,n){return e&&z$(t.prototype,e),n&&z$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function gDe(t,e,n){return e=ox(e),vDe(t,zV()?Reflect.construct(e,n||[],ox(t).constructor):e.apply(t,n))}function vDe(t,e){if(e&&(Hd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yDe(t)}function yDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zV=function(){return!!t})()}function ox(t){return ox=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ox(t)}function bDe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&aT(t,e)}function aT(t,e){return aT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},aT(t,e)}function FN(t,e,n){return e=FV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function FV(t){var e=xDe(t,"string");return Hd(e)=="symbol"?e:e+""}function xDe(t,e){if(Hd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Hd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var rw=function(t){function e(n){var r;return pDe(this,e),r=gDe(this,e,[n]),r.state={fontSize:"",letterSpacing:""},r}return bDe(e,t),mDe(e,[{key:"shouldComponentUpdate",value:function(r,i){var o=r.viewBox,s=_S(r,uDe),a=this.props,l=a.viewBox,c=_S(a,dDe);return!Ju(o,l)||!Ju(s,c)||!Ju(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.x,s=i.y,a=i.width,l=i.height,c=i.orientation,d=i.tickSize,f=i.mirror,h=i.tickMargin,p,g,m,v,y,b,x=f?-1:1,S=r.tickSize||d,w=ae(r.tickCoord)?r.tickCoord:r.coordinate;switch(c){case"top":p=g=r.coordinate,v=s+ +!f*l,m=v-x*S,b=m-x*h,y=w;break;case"left":m=v=r.coordinate,g=o+ +!f*a,p=g-x*S,y=p-x*h,b=w;break;case"right":m=v=r.coordinate,g=o+ +f*a,p=g+x*S,y=p+x*h,b=w;break;default:p=g=r.coordinate,v=s+ +f*l,m=v+x*S,b=m+x*h,y=w;break}return{line:{x1:p,y1:m,x2:g,y2:v},tick:{x:y,y:b}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,s;switch(i){case"left":s=o?"start":"end";break;case"right":s=o?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=o?"start":"end";break;default:s=o?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,a=r.height,l=r.orientation,c=r.mirror,d=r.axisLine,f=xn(xn(xn({},Me(this.props,!1)),Me(d,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!c||l==="bottom"&&c);f=xn(xn({},f),{},{x1:i,y1:o+h*a,x2:i+s,y2:o+h*a})}else{var p=+(l==="left"&&!c||l==="right"&&c);f=xn(xn({},f),{},{x1:i+p*s,y1:o,x2:i+p*s,y2:o+a})}return A.createElement("line",Mu({},f,{className:qe("recharts-cartesian-axis-line",ii(d,"className"))}))}},{key:"renderTicks",value:function(r,i,o){var s=this,a=this.props,l=a.tickLine,c=a.stroke,d=a.tick,f=a.tickFormatter,h=a.unit,p=cDe(xn(xn({},this.props),{},{ticks:r}),i,o),g=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),v=Me(this.props,!1),y=Me(d,!1),b=xn(xn({},v),{},{fill:"none"},Me(l,!1)),x=p.map(function(S,w){var k=s.getTickLineCoord(S),j=k.line,T=k.tick,_=xn(xn(xn(xn({textAnchor:g,verticalAnchor:m},v),{},{stroke:"none",fill:c},y),T),{},{index:w,payload:S,visibleTicksCount:p.length,tickFormatter:f});return A.createElement(dt,Mu({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},Pc(s.props,S,w)),l&&A.createElement("line",Mu({},b,j,{className:qe("recharts-cartesian-axis-tick-line",ii(l,"className"))})),d&&e.renderTickItem(d,_,"".concat(ze(f)?f(S.value,w):S.value).concat(h||"")))});return A.createElement("g",{className:"recharts-cartesian-axis-ticks"},x)}},{key:"render",value:function(){var r=this,i=this.props,o=i.axisLine,s=i.width,a=i.height,l=i.ticksGenerator,c=i.className,d=i.hide;if(d)return null;var f=this.props,h=f.ticks,p=_S(f,fDe),g=h;return ze(l)&&(g=h&&h.length>0?l(this.props):l(p)),s<=0||a<=0||!g||!g.length?null:A.createElement(dt,{className:qe("recharts-cartesian-axis",c),ref:function(v){r.layerReference=v}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Pn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var s,a=qe(i.className,"recharts-cartesian-axis-tick-value");return A.isValidElement(r)?s=A.cloneElement(r,xn(xn({},i),{},{className:a})):ze(r)?s=r(xn(xn({},i),{},{className:a})):s=A.createElement(Mc,Mu({},i,{className:"recharts-cartesian-axis-tick-value"}),o),s}}])}(E.Component);FN(rw,"displayName","CartesianAxis");FN(rw,"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"});function Kd(t){"@babel/helpers - typeof";return Kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kd(t)}function wDe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SDe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,VV(r.key),r)}}function kDe(t,e,n){return e&&SDe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function EDe(t,e,n){return e=sx(e),jDe(t,qV()?Reflect.construct(e,n||[],sx(t).constructor):e.apply(t,n))}function jDe(t,e){if(e&&(Kd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TDe(t)}function TDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qV=function(){return!!t})()}function sx(t){return sx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sx(t)}function _De(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lT(t,e)}function lT(t,e){return lT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},lT(t,e)}function UV(t,e,n){return e=VV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function VV(t){var e=ADe(t,"string");return Kd(e)=="symbol"?e:e+""}function ADe(t,e){if(Kd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Kd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function cT(){return cT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},cT.apply(this,arguments)}function NDe(t){var e=t.xAxisId,n=OV(),r=PV(),i=NV(e);return i==null?null:E.createElement(rw,cT({},i,{className:qe("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(s){return Zl(s,!0)}}))}var iw=function(t){function e(){return wDe(this,e),EDe(this,e,arguments)}return _De(e,t),kDe(e,[{key:"render",value:function(){return E.createElement(NDe,this.props)}}])}(E.Component);UV(iw,"displayName","XAxis");UV(iw,"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 Gd(t){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gd(t)}function CDe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ODe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,KV(r.key),r)}}function PDe(t,e,n){return e&&ODe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function MDe(t,e,n){return e=ax(e),RDe(t,WV()?Reflect.construct(e,n||[],ax(t).constructor):e.apply(t,n))}function RDe(t,e){if(e&&(Gd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IDe(t)}function IDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function WV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WV=function(){return!!t})()}function ax(t){return ax=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ax(t)}function DDe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uT(t,e)}function uT(t,e){return uT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},uT(t,e)}function HV(t,e,n){return e=KV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function KV(t){var e=$De(t,"string");return Gd(e)=="symbol"?e:e+""}function $De(t,e){if(Gd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Gd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dT(){return dT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},dT.apply(this,arguments)}var LDe=function(e){var n=e.yAxisId,r=OV(),i=PV(),o=CV(n);return o==null?null:E.createElement(rw,dT({},o,{className:qe("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(a){return Zl(a,!0)}}))},ow=function(t){function e(){return CDe(this,e),MDe(this,e,arguments)}return DDe(e,t),PDe(e,[{key:"render",value:function(){return E.createElement(LDe,this.props)}}])}(E.Component);HV(ow,"displayName","YAxis");HV(ow,"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 F$(t){return qDe(t)||FDe(t)||zDe(t)||BDe()}function BDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 825In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zDe(t,e){if(t){if(typeof t=="string")return fT(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fT(t,e)}}function FDe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function qDe(t){if(Array.isArray(t))return fT(t)}function fT(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var hT=function(e,n,r,i,o){var s=Ri(e,zN),a=Ri(e,ew),l=[].concat(F$(s),F$(a)),c=Ri(e,nw),d="".concat(i,"Id"),f=i[0],h=n;if(l.length&&(h=l.reduce(function(m,v){if(v.props[d]===r&&Uo(v.props,"extendDomain")&&ae(v.props[f])){var y=v.props[f];return[Math.min(m[0],y),Math.max(m[1],y)]}return m},h)),c.length){var p="".concat(f,"1"),g="".concat(f,"2");h=c.reduce(function(m,v){if(v.props[d]===r&&Uo(v.props,"extendDomain")&&ae(v.props[p])&&ae(v.props[g])){var y=v.props[p],b=v.props[g];return[Math.min(m[0],y,b),Math.max(m[1],y,b)]}return m},h)}return o&&o.length&&(h=o.reduce(function(m,v){return ae(v)?[Math.min(m[0],v),Math.max(m[1],v)]:m},h)),h},GV={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function o(l,c,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new i(d,f||l,h),g=n?n+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],p]:l._events[g].push(p):(l._events[g]=p,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],d,f;if(this._eventsCount===0)return c;for(f in d=this._events)e.call(d,f)&&c.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},a.prototype.listeners=function(c){var d=n?n+c:c,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,p=f.length,g=new Array(p);h<p;h++)g[h]=f[h].fn;return g},a.prototype.listenerCount=function(c){var d=n?n+c:c,f=this._events[d];return f?f.fn?1:f.length:0},a.prototype.emit=function(c,d,f,h,p,g){var m=n?n+c:c;if(!this._events[m])return!1;var v=this._events[m],y=arguments.length,b,x;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),y){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,f),!0;case 4:return v.fn.call(v.context,d,f,h),!0;case 5:return v.fn.call(v.context,d,f,h,p),!0;case 6:return v.fn.call(v.context,d,f,h,p,g),!0}for(x=1,b=new Array(y-1);x<y;x++)b[x-1]=arguments[x];v.fn.apply(v.context,b)}else{var S=v.length,w;for(x=0;x<S;x++)switch(v[x].once&&this.removeListener(c,v[x].fn,void 0,!0),y){case 1:v[x].fn.call(v[x].context);break;case 2:v[x].fn.call(v[x].context,d);break;case 3:v[x].fn.call(v[x].context,d,f);break;case 4:v[x].fn.call(v[x].context,d,f,h);break;default:if(!b)for(w=1,b=new Array(y-1);w<y;w++)b[w-1]=arguments[w];v[x].fn.apply(v[x].context,b)}}return!0},a.prototype.on=function(c,d,f){return o(this,c,d,f,!1)},a.prototype.once=function(c,d,f){return o(this,c,d,f,!0)},a.prototype.removeListener=function(c,d,f,h){var p=n?n+c:c;if(!this._events[p])return this;if(!d)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===d&&(!h||g.once)&&(!f||g.context===f)&&s(this,p);else{for(var m=0,v=[],y=g.length;m<y;m++)(g[m].fn!==d||h&&!g[m].once||f&&g[m].context!==f)&&v.push(g[m]);v.length?this._events[p]=v.length===1?v[0]:v:s(this,p)}return this},a.prototype.removeAllListeners=function(c){var d;return c?(d=n?n+c:c,this._events[d]&&s(this,d)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(GV);var UDe=GV.exports;const VDe=ht(UDe);var AS=new VDe,NS="recharts.syncMouseEvents";function bm(t){"@babel/helpers - typeof";return bm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bm(t)}function WDe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HDe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,JV(r.key),r)}}function KDe(t,e,n){return e&&HDe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function CS(t,e,n){return e=JV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function JV(t){var e=GDe(t,"string");return bm(e)=="symbol"?e:e+""}function GDe(t,e){if(bm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(bm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var JDe=function(){function t(){WDe(this,t),CS(this,"activeIndex",0),CS(this,"coordinateList",[]),CS(this,"layout","horizontal")}return KDe(t,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,o=i===void 0?null:i,s=n.container,a=s===void 0?null:s,l=n.layout,c=l===void 0?null:l,d=n.offset,f=d===void 0?null:d,h=n.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=a??this.container,this.layout=c??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=p??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,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),o=i.x,s=i.y,a=i.height,l=this.coordinateList[this.activeIndex].coordinate,c=((n=window)===null||n===void 0?void 0:n.scrollX)||0,d=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=o+l+c,h=s+this.offset.top+a/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function YDe(t,e,n){if(n==="number"&&e===!0&&Array.isArray(t)){var r=t==null?void 0:t[0],i=t==null?void 0:t[1];if(r&&i&&ae(r)&&ae(i))return!0}return!1}function XDe(t,e,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:n.left+.5,y:t==="horizontal"?n.top+.5:e.y-i,width:t==="horizontal"?r:n.width-1,height:t==="horizontal"?n.height-1:r}}function YV(t){var e=t.cx,n=t.cy,r=t.radius,i=t.startAngle,o=t.endAngle,s=_t(e,n,r,i),a=_t(e,n,r,o);return{points:[s,a],cx:e,cy:n,radius:r,startAngle:i,endAngle:o}}function QDe(t,e,n){var r,i,o,s;if(t==="horizontal")r=e.x,o=r,i=n.top,s=n.top+n.height;else if(t==="vertical")i=e.y,s=i,r=n.left,o=n.left+n.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var a=e.cx,l=e.cy,c=e.innerRadius,d=e.outerRadius,f=e.angle,h=_t(a,l,c,f),p=_t(a,l,d,f);r=h.x,i=h.y,o=p.x,s=p.y}else return YV(e);return[{x:r,y:i},{x:o,y:s}]}function xm(t){"@babel/helpers - typeof";return xm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xm(t)}function q$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tv(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?q$(Object(n),!0).forEach(function(r){ZDe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):q$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ZDe(t,e,n){return e=e$e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function e$e(t){var e=t$e(t,"string");return xm(e)=="symbol"?e:e+""}function t$e(t,e){if(xm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(xm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function n$e(t){var e,n,r=t.element,i=t.tooltipEventType,o=t.isActive,s=t.activeCoordinate,a=t.activePayload,l=t.offset,c=t.activeTooltipIndex,d=t.tooltipAxisBandSize,f=t.layout,h=t.chartName,p=(e=r.props.cursor)!==null&&e!==void 0?e:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!p||!o||!s||h!=="ScatterChart"&&i!=="axis")return null;var g,m=Dj;if(h==="ScatterChart")g=s,m=uPe;else if(h==="BarChart")g=XDe(f,s,l,d),m=DN;else if(f==="radial"){var v=YV(s),y=v.cx,b=v.cy,x=v.radius,S=v.startAngle,w=v.endAngle;g={cx:y,cy:b,startAngle:S,endAngle:w,innerRadius:x,outerRadius:x},m=JU}else g={points:QDe(f,s,l)},m=Dj;var k=tv(tv(tv(tv({stroke:"#ccc",pointerEvents:"none"},l),g),Me(p,!1)),{},{payload:a,payloadIndex:c,className:qe("recharts-tooltip-cursor",p.className)});return E.isValidElement(p)?E.cloneElement(p,k):E.createElement(m,k)}var r$e=["item"],i$e=["children","className","width","height","style","compact","title","desc"];function Jd(t){"@babel/helpers - typeof";return Jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jd(t)}function Ru(){return Ru=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ru.apply(this,arguments)}function U$(t,e){return a$e(t)||s$e(t,e)||QV(t,e)||o$e()}function o$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 826In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s$e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function a$e(t){if(Array.isArray(t))return t}function V$(t,e){if(t==null)return{};var n=l$e(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function l$e(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function c$e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u$e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ZV(r.key),r)}}function d$e(t,e,n){return e&&u$e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function f$e(t,e,n){return e=lx(e),h$e(t,XV()?Reflect.construct(e,n||[],lx(t).constructor):e.apply(t,n))}function h$e(t,e){if(e&&(Jd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p$e(t)}function p$e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function XV(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XV=function(){return!!t})()}function lx(t){return lx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lx(t)}function m$e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pT(t,e)}function pT(t,e){return pT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},pT(t,e)}function Yd(t){return y$e(t)||v$e(t)||QV(t)||g$e()}function g$e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 827In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QV(t,e){if(t){if(typeof t=="string")return mT(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mT(t,e)}}function v$e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function y$e(t){if(Array.isArray(t))return mT(t)}function mT(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function W$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?W$(Object(n),!0).forEach(function(r){Ae(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):W$(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ae(t,e,n){return e=ZV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ZV(t){var e=b$e(t,"string");return Jd(e)=="symbol"?e:e+""}function b$e(t,e){if(Jd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Jd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var x$e={xAxis:["bottom","top"],yAxis:["left","right"]},w$e={width:"100%",height:"100%"},eW={x:0,y:0};function nv(t){return t}var S$e=function(e,n){return n==="horizontal"?e.x:n==="vertical"?e.y:n==="centric"?e.angle:e.radius},k$e=function(e,n,r,i){var o=n.find(function(d){return d&&d.index===r});if(o){if(e==="horizontal")return{x:o.coordinate,y:i.y};if(e==="vertical")return{x:i.x,y:o.coordinate};if(e==="centric"){var s=o.coordinate,a=i.radius;return W(W(W({},i),_t(i.cx,i.cy,a,s)),{},{angle:s,radius:a})}var l=o.coordinate,c=i.angle;return W(W(W({},i),_t(i.cx,i.cy,l,c)),{},{angle:c,radius:l})}return eW},sw=function(e,n){var r=n.graphicalItems,i=n.dataStartIndex,o=n.dataEndIndex,s=(r??[]).reduce(function(a,l){var c=l.props.data;return c&&c.length?[].concat(Yd(a),Yd(c)):a},[]);return s.length>0?s:e&&e.length&&ae(i)&&ae(o)?e.slice(i,o+1):[]};function tW(t){return t==="number"?[0,"auto"]:void 0}var gT=function(e,n,r,i){var o=e.graphicalItems,s=e.tooltipAxis,a=sw(n,e);return r<0||!o||!o.length||r>=a.length?null:o.reduce(function(l,c){var d,f=(d=c.props.data)!==null&&d!==void 0?d:n;f&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=r&&(f=f.slice(e.dataStartIndex,e.dataEndIndex+1));var h;if(s.dataKey&&!s.allowDuplicatedCategory){var p=f===void 0?a:f;h=VE(p,s.dataKey,i)}else h=f&&f[r]||a[r];return h?[].concat(Yd(l),[UU(c,h)]):l},[])},H$=function(e,n,r,i){var o=i||{x:e.chartX,y:e.chartY},s=S$e(o,r),a=e.orderedTooltipTicks,l=e.tooltipAxis,c=e.tooltipTicks,d=RNe(s,a,c,l);if(d>=0&&c){var f=c[d]&&c[d].value,h=gT(e,n,d,f),p=k$e(r,a,d,o);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},E$e=function(e,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,s=n.axisIdKey,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,d=e.layout,f=e.children,h=e.stackOffset,p=LU(d,o);return r.reduce(function(g,m){var v,y=m.type.defaultProps!==void 0?W(W({},m.type.defaultProps),m.props):m.props,b=y.type,x=y.dataKey,S=y.allowDataOverflow,w=y.allowDuplicatedCategory,k=y.scale,j=y.ticks,T=y.includeHidden,_=y[s];if(g[_])return g;var N=sw(e.data,{graphicalItems:i.filter(function(V){var Y,pe=s in V.props?V.props[s]:(Y=V.type.defaultProps)===null||Y===void 0?void 0:Y[s];return pe===_}),dataStartIndex:l,dataEndIndex:c}),C=N.length,O,I,P;YDe(y.domain,S,b)&&(O=Oj(y.domain,null,S),p&&(b==="number"||k!=="auto")&&(P=qh(N,x,"category")));var $=tW(b);if(!O||O.length===0){var B,z=(B=y.domain)!==null&&B!==void 0?B:$;if(x){if(O=qh(N,x,b),b==="category"&&p){var R=kge(O);w&&R?(I=O,O=Yb(0,C)):w||(O=bD(z,O,m).reduce(function(V,Y){return V.indexOf(Y)>=0?V:[].concat(Yd(V),[Y])},[]))}else if(b==="category")w?O=O.filter(function(V){return V!==""&&!Ye(V)}):O=bD(z,O,m).reduce(function(V,Y){return V.indexOf(Y)>=0||Y===""||Ye(Y)?V:[].concat(Yd(V),[Y])},[]);else if(b==="number"){var L=BNe(N,i.filter(function(V){var Y,pe,me=s in V.props?V.props[s]:(Y=V.type.defaultProps)===null||Y===void 0?void 0:Y[s],Ue="hide"in V.props?V.props.hide:(pe=V.type.defaultProps)===null||pe===void 0?void 0:pe.hide;return me===_&&(T||!Ue)}),x,o,d);L&&(O=L)}p&&(b==="number"||k!=="auto")&&(P=qh(N,x,"category"))}else p?O=Yb(0,C):a&&a[_]&&a[_].hasStack&&b==="number"?O=h==="expand"?[0,1]:qU(a[_].stackGroups,l,c):O=$U(N,i.filter(function(V){var Y=s in V.props?V.props[s]:V.type.defaultProps[s],pe="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return Y===_&&(T||!pe)}),b,d,!0);if(b==="number")O=hT(f,O,_,o,j),z&&(O=Oj(z,O,S));else if(b==="category"&&z){var q=z,G=O.every(function(V){return q.indexOf(V)>=0});G&&(O=q)}}return W(W({},g),{},Ae({},_,W(W({},y),{},{axisType:o,domain:O,categoricalDomain:P,duplicateDomain:I,originalDomain:(v=y.domain)!==null&&v!==void 0?v:$,isCategorical:p,layout:d})))},{})},j$e=function(e,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,s=n.axisIdKey,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,d=e.layout,f=e.children,h=sw(e.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),p=h.length,g=LU(d,o),m=-1;return r.reduce(function(v,y){var b=y.type.defaultProps!==void 0?W(W({},y.type.defaultProps),y.props):y.props,x=b[s],S=tW("number");if(!v[x]){m++;var w;return g?w=Yb(0,p):a&&a[x]&&a[x].hasStack?(w=qU(a[x].stackGroups,l,c),w=hT(f,w,x,o)):(w=Oj(S,$U(h,r.filter(function(k){var j,T,_=s in k.props?k.props[s]:(j=k.type.defaultProps)===null||j===void 0?void 0:j[s],N="hide"in k.props?k.props.hide:(T=k.type.defaultProps)===null||T===void 0?void 0:T.hide;return _===x&&!N}),"number",d),i.defaultProps.allowDataOverflow),w=hT(f,w,x,o)),W(W({},v),{},Ae({},x,W(W({axisType:o},i.defaultProps),{},{hide:!0,orientation:ii(x$e,"".concat(o,".").concat(m%2),null),domain:w,originalDomain:S,isCategorical:g,layout:d})))}return v},{})},T$e=function(e,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,s=n.graphicalItems,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,d=e.children,f="".concat(i,"Id"),h=Ri(d,o),p={};return h&&h.length?p=E$e(e,{axes:h,graphicalItems:s,axisType:i,axisIdKey:f,stackGroups:a,dataStartIndex:l,dataEndIndex:c}):s&&s.length&&(p=j$e(e,{Axis:o,graphicalItems:s,axisType:i,axisIdKey:f,stackGroups:a,dataStartIndex:l,dataEndIndex:c})),p},_$e=function(e){var n=mu(e),r=Zl(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:cN(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Lb(n,r)}},K$=function(e){var n=e.children,r=e.defaultShowTooltip,i=Jr(n,Fd),o=0,s=0;return e.data&&e.data.length!==0&&(s=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!r}},A$e=function(e){return!e||!e.length?!1:e.some(function(n){var r=Ts(n&&n.type);return r&&r.indexOf("Bar")>=0})},G$=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},N$e=function(e,n){var r=e.props,i=e.graphicalItems,o=e.xAxisMap,s=o===void 0?{}:o,a=e.yAxisMap,l=a===void 0?{}:a,c=r.width,d=r.height,f=r.children,h=r.margin||{},p=Jr(f,Fd),g=Jr(f,Ya),m=Object.keys(l).reduce(function(w,k){var j=l[k],T=j.orientation;return!j.mirror&&!j.hide?W(W({},w),{},Ae({},T,w[T]+j.width)):w},{left:h.left||0,right:h.right||0}),v=Object.keys(s).reduce(function(w,k){var j=s[k],T=j.orientation;return!j.mirror&&!j.hide?W(W({},w),{},Ae({},T,ii(w,"".concat(T))+j.height)):w},{top:h.top||0,bottom:h.bottom||0}),y=W(W({},v),m),b=y.bottom;p&&(y.bottom+=p.props.height||Fd.defaultProps.height),g&&n&&(y=$Ne(y,i,r,n));var x=c-y.left-y.right,S=d-y.top-y.bottom;return W(W({brushBottom:b},y),{},{width:Math.max(x,0),height:Math.max(S,0)})},C$e=function(e,n){if(n==="xAxis")return e[n].width;if(n==="yAxis")return e[n].height},nW=function(e){var n=e.chartName,r=e.GraphicalChild,i=e.defaultTooltipEventType,o=i===void 0?"axis":i,s=e.validateTooltipEventTypes,a=s===void 0?["axis"]:s,l=e.axisComponents,c=e.legendContent,d=e.formatAxisMap,f=e.defaultProps,h=function(y,b){var x=b.graphicalItems,S=b.stackGroups,w=b.offset,k=b.updateId,j=b.dataStartIndex,T=b.dataEndIndex,_=y.barSize,N=y.layout,C=y.barGap,O=y.barCategoryGap,I=y.maxBarSize,P=G$(N),$=P.numericAxisName,B=P.cateAxisName,z=A$e(x),R=[];return x.forEach(function(L,q){var G=sw(y.data,{graphicalItems:[L],dataStartIndex:j,dataEndIndex:T}),V=L.type.defaultProps!==void 0?W(W({},L.type.defaultProps),L.props):L.props,Y=V.dataKey,pe=V.maxBarSize,me=V["".concat($,"Id")],Ue=V["".concat(B,"Id")],H={},de=l.reduce(function(F,U){var se=b["".concat(U.axisType,"Map")],ie=V["".concat(U.axisType,"Id")];se&&se[ie]||U.axisType==="zAxis"||Ic();var Z=se[ie];return W(W({},F),{},Ae(Ae({},U.axisType,Z),"".concat(U.axisType,"Ticks"),Zl(Z)))},H),X=de[B],ce=de["".concat(B,"Ticks")],ge=S&&S[me]&&S[me].hasStack&&GNe(L,S[me].stackGroups),K=Ts(L.type).indexOf("Bar")>=0,Ce=Lb(X,ce),Ee=[],Ve=z&&INe({barSize:_,stackGroups:S,totalSize:C$e(de,B)});if(K){var Ke,lt,xt=Ye(pe)?I:pe,vt=(Ke=(lt=Lb(X,ce,!0))!==null&<!==void 0?lt:xt)!==null&&Ke!==void 0?Ke:0;Ee=DNe({barGap:C,barCategoryGap:O,bandSize:vt!==Ce?vt:Ce,sizeList:Ve[Ue],maxBarSize:xt}),vt!==Ce&&(Ee=Ee.map(function(F){return W(W({},F),{},{position:W(W({},F.position),{},{offset:F.position.offset-vt/2})})}))}var M=L&&L.type&&L.type.getComposedData;M&&R.push({props:W(W({},M(W(W({},de),{},{displayedData:G,props:y,dataKey:Y,item:L,bandSize:Ce,barPosition:Ee,offset:w,stackedData:ge,layout:N,dataStartIndex:j,dataEndIndex:T}))),{},Ae(Ae(Ae({key:L.key||"item-".concat(q)},$,de[$]),B,de[B]),"animationId",k)),childIndex:Ige(L,y.children),item:L})}),R},p=function(y,b){var x=y.props,S=y.dataStartIndex,w=y.dataEndIndex,k=y.updateId;if(!fR({props:x}))return null;var j=x.children,T=x.layout,_=x.stackOffset,N=x.data,C=x.reverseStackOrder,O=G$(T),I=O.numericAxisName,P=O.cateAxisName,$=Ri(j,r),B=HNe(N,$,"".concat(I,"Id"),"".concat(P,"Id"),_,C),z=l.reduce(function(V,Y){var pe="".concat(Y.axisType,"Map");return W(W({},V),{},Ae({},pe,T$e(x,W(W({},Y),{},{graphicalItems:$,stackGroups:Y.axisType===I&&B,dataStartIndex:S,dataEndIndex:w}))))},{}),R=N$e(W(W({},z),{},{props:x,graphicalItems:$}),b==null?void 0:b.legendBBox);Object.keys(z).forEach(function(V){z[V]=d(x,z[V],R,V.replace("Map",""),n)});var L=z["".concat(P,"Map")],q=_$e(L),G=h(x,W(W({},z),{},{dataStartIndex:S,dataEndIndex:w,updateId:k,graphicalItems:$,stackGroups:B,offset:R}));return W(W({formattedGraphicalItems:G,graphicalItems:$,offset:R,stackGroups:B},q),z)},g=function(v){function y(b){var x,S,w;return c$e(this,y),w=f$e(this,y,[b]),Ae(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ae(w,"accessibilityManager",new JDe),Ae(w,"handleLegendBBoxUpdate",function(k){if(k){var j=w.state,T=j.dataStartIndex,_=j.dataEndIndex,N=j.updateId;w.setState(W({legendBBox:k},p({props:w.props,dataStartIndex:T,dataEndIndex:_,updateId:N},W(W({},w.state),{},{legendBBox:k}))))}}),Ae(w,"handleReceiveSyncEvent",function(k,j,T){if(w.props.syncId===k){if(T===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(j)}}),Ae(w,"handleBrushChange",function(k){var j=k.startIndex,T=k.endIndex;if(j!==w.state.dataStartIndex||T!==w.state.dataEndIndex){var _=w.state.updateId;w.setState(function(){return W({dataStartIndex:j,dataEndIndex:T},p({props:w.props,dataStartIndex:j,dataEndIndex:T,updateId:_},w.state))}),w.triggerSyncEvent({dataStartIndex:j,dataEndIndex:T})}}),Ae(w,"handleMouseEnter",function(k){var j=w.getMouseInfo(k);if(j){var T=W(W({},j),{},{isTooltipActive:!0});w.setState(T),w.triggerSyncEvent(T);var _=w.props.onMouseEnter;ze(_)&&_(T,k)}}),Ae(w,"triggeredAfterMouseMove",function(k){var j=w.getMouseInfo(k),T=j?W(W({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(T),w.triggerSyncEvent(T);var _=w.props.onMouseMove;ze(_)&&_(T,k)}),Ae(w,"handleItemMouseEnter",function(k){w.setState(function(){return{isTooltipActive:!0,activeItem:k,activePayload:k.tooltipPayload,activeCoordinate:k.tooltipPosition||{x:k.cx,y:k.cy}}})}),Ae(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),Ae(w,"handleMouseMove",function(k){k.persist(),w.throttleTriggeredAfterMouseMove(k)}),Ae(w,"handleMouseLeave",function(k){w.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};w.setState(j),w.triggerSyncEvent(j);var T=w.props.onMouseLeave;ze(T)&&T(j,k)}),Ae(w,"handleOuterEvent",function(k){var j=Rge(k),T=ii(w.props,"".concat(j));if(j&&ze(T)){var _,N;/.*touch.*/i.test(j)?N=w.getMouseInfo(k.changedTouches[0]):N=w.getMouseInfo(k),T((_=N)!==null&&_!==void 0?_:{},k)}}),Ae(w,"handleClick",function(k){var j=w.getMouseInfo(k);if(j){var T=W(W({},j),{},{isTooltipActive:!0});w.setState(T),w.triggerSyncEvent(T);var _=w.props.onClick;ze(_)&&_(T,k)}}),Ae(w,"handleMouseDown",function(k){var j=w.props.onMouseDown;if(ze(j)){var T=w.getMouseInfo(k);j(T,k)}}),Ae(w,"handleMouseUp",function(k){var j=w.props.onMouseUp;if(ze(j)){var T=w.getMouseInfo(k);j(T,k)}}),Ae(w,"handleTouchMove",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(k.changedTouches[0])}),Ae(w,"handleTouchStart",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&w.handleMouseDown(k.changedTouches[0])}),Ae(w,"handleTouchEnd",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&w.handleMouseUp(k.changedTouches[0])}),Ae(w,"handleDoubleClick",function(k){var j=w.props.onDoubleClick;if(ze(j)){var T=w.getMouseInfo(k);j(T,k)}}),Ae(w,"handleContextMenu",function(k){var j=w.props.onContextMenu;if(ze(j)){var T=w.getMouseInfo(k);j(T,k)}}),Ae(w,"triggerSyncEvent",function(k){w.props.syncId!==void 0&&AS.emit(NS,w.props.syncId,k,w.eventEmitterSymbol)}),Ae(w,"applySyncEvent",function(k){var j=w.props,T=j.layout,_=j.syncMethod,N=w.state.updateId,C=k.dataStartIndex,O=k.dataEndIndex;if(k.dataStartIndex!==void 0||k.dataEndIndex!==void 0)w.setState(W({dataStartIndex:C,dataEndIndex:O},p({props:w.props,dataStartIndex:C,dataEndIndex:O,updateId:N},w.state)));else if(k.activeTooltipIndex!==void 0){var I=k.chartX,P=k.chartY,$=k.activeTooltipIndex,B=w.state,z=B.offset,R=B.tooltipTicks;if(!z)return;if(typeof _=="function")$=_(R,k);else if(_==="value"){$=-1;for(var L=0;L<R.length;L++)if(R[L].value===k.activeLabel){$=L;break}}var q=W(W({},z),{},{x:z.left,y:z.top}),G=Math.min(I,q.x+q.width),V=Math.min(P,q.y+q.height),Y=R[$]&&R[$].value,pe=gT(w.state,w.props.data,$),me=R[$]?{x:T==="horizontal"?R[$].coordinate:G,y:T==="horizontal"?V:R[$].coordinate}:eW;w.setState(W(W({},k),{},{activeLabel:Y,activeCoordinate:me,activePayload:pe,activeTooltipIndex:$}))}else w.setState(k)}),Ae(w,"renderCursor",function(k){var j,T=w.state,_=T.isTooltipActive,N=T.activeCoordinate,C=T.activePayload,O=T.offset,I=T.activeTooltipIndex,P=T.tooltipAxisBandSize,$=w.getTooltipEventType(),B=(j=k.props.active)!==null&&j!==void 0?j:_,z=w.props.layout,R=k.key||"_recharts-cursor";return A.createElement(n$e,{key:R,activeCoordinate:N,activePayload:C,activeTooltipIndex:I,chartName:n,element:k,isActive:B,layout:z,offset:O,tooltipAxisBandSize:P,tooltipEventType:$})}),Ae(w,"renderPolarAxis",function(k,j,T){var _=ii(k,"type.axisType"),N=ii(w.state,"".concat(_,"Map")),C=k.type.defaultProps,O=C!==void 0?W(W({},C),k.props):k.props,I=N&&N[O["".concat(_,"Id")]];return E.cloneElement(k,W(W({},I),{},{className:qe(_,I.className),key:k.key||"".concat(j,"-").concat(T),ticks:Zl(I,!0)}))}),Ae(w,"renderPolarGrid",function(k){var j=k.props,T=j.radialLines,_=j.polarAngles,N=j.polarRadius,C=w.state,O=C.radiusAxisMap,I=C.angleAxisMap,P=mu(O),$=mu(I),B=$.cx,z=$.cy,R=$.innerRadius,L=$.outerRadius;return E.cloneElement(k,{polarAngles:Array.isArray(_)?_:Zl($,!0).map(function(q){return q.coordinate}),polarRadius:Array.isArray(N)?N:Zl(P,!0).map(function(q){return q.coordinate}),cx:B,cy:z,innerRadius:R,outerRadius:L,key:k.key||"polar-grid",radialLines:T})}),Ae(w,"renderLegend",function(){var k=w.state.formattedGraphicalItems,j=w.props,T=j.children,_=j.width,N=j.height,C=w.props.margin||{},O=_-(C.left||0)-(C.right||0),I=IU({children:T,formattedGraphicalItems:k,legendWidth:O,legendContent:c});if(!I)return null;var P=I.item,$=V$(I,r$e);return E.cloneElement(P,W(W({},$),{},{chartWidth:_,chartHeight:N,margin:C,onBBoxUpdate:w.handleLegendBBoxUpdate}))}),Ae(w,"renderTooltip",function(){var k,j=w.props,T=j.children,_=j.accessibilityLayer,N=Jr(T,no);if(!N)return null;var C=w.state,O=C.isTooltipActive,I=C.activeCoordinate,P=C.activePayload,$=C.activeLabel,B=C.offset,z=(k=N.props.active)!==null&&k!==void 0?k:O;return E.cloneElement(N,{viewBox:W(W({},B),{},{x:B.left,y:B.top}),active:z,label:$,payload:z?P:[],coordinate:I,accessibilityLayer:_})}),Ae(w,"renderBrush",function(k){var j=w.props,T=j.margin,_=j.data,N=w.state,C=N.offset,O=N.dataStartIndex,I=N.dataEndIndex,P=N.updateId;return E.cloneElement(k,{key:k.key||"_recharts-brush",onChange:Xg(w.handleBrushChange,k.props.onChange),data:_,x:ae(k.props.x)?k.props.x:C.left,y:ae(k.props.y)?k.props.y:C.top+C.height+C.brushBottom-(T.bottom||0),width:ae(k.props.width)?k.props.width:C.width,startIndex:O,endIndex:I,updateId:"brush-".concat(P)})}),Ae(w,"renderReferenceElement",function(k,j,T){if(!k)return null;var _=w,N=_.clipPathId,C=w.state,O=C.xAxisMap,I=C.yAxisMap,P=C.offset,$=k.type.defaultProps||{},B=k.props,z=B.xAxisId,R=z===void 0?$.xAxisId:z,L=B.yAxisId,q=L===void 0?$.yAxisId:L;return E.cloneElement(k,{key:k.key||"".concat(j,"-").concat(T),xAxis:O[R],yAxis:I[q],viewBox:{x:P.left,y:P.top,width:P.width,height:P.height},clipPathId:N})}),Ae(w,"renderActivePoints",function(k){var j=k.item,T=k.activePoint,_=k.basePoint,N=k.childIndex,C=k.isRange,O=[],I=j.props.key,P=j.item.type.defaultProps!==void 0?W(W({},j.item.type.defaultProps),j.item.props):j.item.props,$=P.activeDot,B=P.dataKey,z=W(W({index:N,dataKey:B,cx:T.x,cy:T.y,r:4,fill:IN(j.item),strokeWidth:2,stroke:"#fff",payload:T.payload,value:T.value},Me($,!1)),db($));return O.push(y.renderActiveDot($,z,"".concat(I,"-activePoint-").concat(N))),_?O.push(y.renderActiveDot($,W(W({},z),{},{cx:_.x,cy:_.y}),"".concat(I,"-basePoint-").concat(N))):C&&O.push(null),O}),Ae(w,"renderGraphicChild",function(k,j,T){var _=w.filterFormatItem(k,j,T);if(!_)return null;var N=w.getTooltipEventType(),C=w.state,O=C.isTooltipActive,I=C.tooltipAxis,P=C.activeTooltipIndex,$=C.activeLabel,B=w.props.children,z=Jr(B,no),R=_.props,L=R.points,q=R.isRange,G=R.baseLine,V=_.item.type.defaultProps!==void 0?W(W({},_.item.type.defaultProps),_.item.props):_.item.props,Y=V.activeDot,pe=V.hide,me=V.activeBar,Ue=V.activeShape,H=!!(!pe&&O&&z&&(Y||me||Ue)),de={};N!=="axis"&&z&&z.props.trigger==="click"?de={onClick:Xg(w.handleItemMouseEnter,k.props.onClick)}:N!=="axis"&&(de={onMouseLeave:Xg(w.handleItemMouseLeave,k.props.onMouseLeave),onMouseEnter:Xg(w.handleItemMouseEnter,k.props.onMouseEnter)});var X=E.cloneElement(k,W(W({},_.props),de));function ce(U){return typeof I.dataKey=="function"?I.dataKey(U.payload):null}if(H)if(P>=0){var ge,K;if(I.dataKey&&!I.allowDuplicatedCategory){var Ce=typeof I.dataKey=="function"?ce:"payload.".concat(I.dataKey.toString());ge=VE(L,Ce,$),K=q&&G&&VE(G,Ce,$)}else ge=L==null?void 0:L[P],K=q&&G&&G[P];if(Ue||me){var Ee=k.props.activeIndex!==void 0?k.props.activeIndex:P;return[E.cloneElement(k,W(W(W({},_.props),de),{},{activeIndex:Ee})),null,null]}if(!Ye(ge))return[X].concat(Yd(w.renderActivePoints({item:_,activePoint:ge,basePoint:K,childIndex:P,isRange:q})))}else{var Ve,Ke=(Ve=w.getItemByXY(w.state.activeCoordinate))!==null&&Ve!==void 0?Ve:{graphicalItem:X},lt=Ke.graphicalItem,xt=lt.item,vt=xt===void 0?k:xt,M=lt.childIndex,F=W(W(W({},_.props),de),{},{activeIndex:M});return[E.cloneElement(vt,F),null,null]}return q?[X,null,null]:[X,null]}),Ae(w,"renderCustomized",function(k,j,T){return E.cloneElement(k,W(W({key:"recharts-customized-".concat(T)},w.props),w.state))}),Ae(w,"renderMap",{CartesianGrid:{handler:nv,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:nv},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:nv},YAxis:{handler:nv},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=b.id)!==null&&x!==void 0?x:zm("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=R8(w.triggeredAfterMouseMove,(S=b.throttleDelay)!==null&&S!==void 0?S:1e3/60),w.state={},w}return m$e(y,v),d$e(y,[{key:"componentDidMount",value:function(){var x,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,S=x.children,w=x.data,k=x.height,j=x.layout,T=Jr(S,no);if(T){var _=T.props.defaultIndex;if(!(typeof _!="number"||_<0||_>this.state.tooltipTicks.length-1)){var N=this.state.tooltipTicks[_]&&this.state.tooltipTicks[_].value,C=gT(this.state,w,_,N),O=this.state.tooltipTicks[_].coordinate,I=(this.state.offset.top+k)/2,P=j==="horizontal",$=P?{x:O,y:I}:{y:O,x:I},B=this.state.formattedGraphicalItems.find(function(R){var L=R.item;return L.type.name==="Scatter"});B&&($=W(W({},$),B.props.points[_].tooltipPosition),C=B.props.points[_].tooltipPayload);var z={activeTooltipIndex:_,isTooltipActive:!0,activeLabel:N,activePayload:C,activeCoordinate:$};this.setState(z),this.renderCursor(T),this.accessibilityManager.setIndex(_)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,k;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(k=this.props.margin.top)!==null&&k!==void 0?k:0}})}return null}},{key:"componentDidUpdate",value:function(x){HE([Jr(x.children,no)],[Jr(this.props.children,no)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=Jr(this.props.children,no);if(x&&typeof x.props.shared=="boolean"){var S=x.props.shared?"axis":"item";return a.indexOf(S)>=0?S:o}return o}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var S=this.container,w=S.getBoundingClientRect(),k=lje(w),j={chartX:Math.round(x.pageX-k.left),chartY:Math.round(x.pageY-k.top)},T=w.width/S.offsetWidth||1,_=this.inRange(j.chartX,j.chartY,T);if(!_)return null;var N=this.state,C=N.xAxisMap,O=N.yAxisMap,I=this.getTooltipEventType(),P=H$(this.state,this.props.data,this.props.layout,_);if(I!=="axis"&&C&&O){var $=mu(C).scale,B=mu(O).scale,z=$&&$.invert?$.invert(j.chartX):null,R=B&&B.invert?B.invert(j.chartY):null;return W(W({},j),{},{xValue:z,yValue:R},P)}return P?W(W({},j),P):null}},{key:"inRange",value:function(x,S){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,k=this.props.layout,j=x/w,T=S/w;if(k==="horizontal"||k==="vertical"){var _=this.state.offset,N=j>=_.left&&j<=_.left+_.width&&T>=_.top&&T<=_.top+_.height;return N?{x:j,y:T}:null}var C=this.state,O=C.angleAxisMap,I=C.radiusAxisMap;if(O&&I){var P=mu(O);return SD({x:j,y:T},P)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,S=this.getTooltipEventType(),w=Jr(x,no),k={};w&&S==="axis"&&(w.props.trigger==="click"?k={onClick:this.handleClick}:k={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var j=db(this.props,this.handleOuterEvent);return W(W({},j),k)}},{key:"addListener",value:function(){AS.on(NS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){AS.removeListener(NS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,S,w){for(var k=this.state.formattedGraphicalItems,j=0,T=k.length;j<T;j++){var _=k[j];if(_.item===x||_.props.key===x.key||S===Ts(_.item.type)&&w===_.childIndex)return _}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,S=this.state.offset,w=S.left,k=S.top,j=S.height,T=S.width;return A.createElement("defs",null,A.createElement("clipPath",{id:x},A.createElement("rect",{x:w,y:k,height:j,width:T})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(S,w){var k=U$(w,2),j=k[0],T=k[1];return W(W({},S),{},Ae({},j,T.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(S,w){var k=U$(w,2),j=k[0],T=k[1];return W(W({},S),{},Ae({},j,T.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[x])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(x){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[x])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(x){var S=this.state,w=S.formattedGraphicalItems,k=S.activeItem;if(w&&w.length)for(var j=0,T=w.length;j<T;j++){var _=w[j],N=_.props,C=_.item,O=C.type.defaultProps!==void 0?W(W({},C.type.defaultProps),C.props):C.props,I=Ts(C.type);if(I==="Bar"){var P=(N.data||[]).find(function(R){return V2e(x,R)});if(P)return{graphicalItem:_,payload:P}}else if(I==="RadialBar"){var $=(N.data||[]).find(function(R){return SD(x,R)});if($)return{graphicalItem:_,payload:$}}else if(Y0(_,k)||X0(_,k)||pm(_,k)){var B=PMe({graphicalItem:_,activeTooltipItem:k,itemData:O.data}),z=O.activeIndex===void 0?B:O.activeIndex;return{graphicalItem:W(W({},_),{},{childIndex:z}),payload:pm(_,k)?O.data[B]:_.props.data[B]}}}return null}},{key:"render",value:function(){var x=this;if(!fR(this))return null;var S=this.props,w=S.children,k=S.className,j=S.width,T=S.height,_=S.style,N=S.compact,C=S.title,O=S.desc,I=V$(S,i$e),P=Me(I,!1);if(N)return A.createElement(C$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement(GE,Ru({},P,{width:j,height:T,title:C,desc:O}),this.renderClipPath(),pR(w,this.renderMap)));if(this.props.accessibilityLayer){var $,B;P.tabIndex=($=this.props.tabIndex)!==null&&$!==void 0?$:0,P.role=(B=this.props.role)!==null&&B!==void 0?B:"application",P.onKeyDown=function(R){x.accessibilityManager.keyboardEvent(R)},P.onFocus=function(){x.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return A.createElement(C$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement("div",Ru({className:qe("recharts-wrapper",k),style:W({position:"relative",cursor:"default",width:j,height:T},_)},z,{ref:function(L){x.container=L}}),A.createElement(GE,Ru({},P,{width:j,height:T,title:C,desc:O,style:w$e}),this.renderClipPath(),pR(w,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(E.Component);Ae(g,"displayName",n),Ae(g,"defaultProps",W({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),Ae(g,"getDerivedStateFromProps",function(v,y){var b=v.dataKey,x=v.data,S=v.children,w=v.width,k=v.height,j=v.layout,T=v.stackOffset,_=v.margin,N=y.dataStartIndex,C=y.dataEndIndex;if(y.updateId===void 0){var O=K$(v);return W(W(W({},O),{},{updateId:0},p(W(W({props:v},O),{},{updateId:0}),y)),{},{prevDataKey:b,prevData:x,prevWidth:w,prevHeight:k,prevLayout:j,prevStackOffset:T,prevMargin:_,prevChildren:S})}if(b!==y.prevDataKey||x!==y.prevData||w!==y.prevWidth||k!==y.prevHeight||j!==y.prevLayout||T!==y.prevStackOffset||!Ju(_,y.prevMargin)){var I=K$(v),P={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},$=W(W({},H$(y,x,j)),{},{updateId:y.updateId+1}),B=W(W(W({},I),P),$);return W(W(W({},B),p(W({props:v},B),y)),{},{prevDataKey:b,prevData:x,prevWidth:w,prevHeight:k,prevLayout:j,prevStackOffset:T,prevMargin:_,prevChildren:S})}if(!HE(S,y.prevChildren)){var z,R,L,q,G=Jr(S,Fd),V=G&&(z=(R=G.props)===null||R===void 0?void 0:R.startIndex)!==null&&z!==void 0?z:N,Y=G&&(L=(q=G.props)===null||q===void 0?void 0:q.endIndex)!==null&&L!==void 0?L:C,pe=V!==N||Y!==C,me=!Ye(x),Ue=me&&!pe?y.updateId:y.updateId+1;return W(W({updateId:Ue},p(W(W({props:v},y),{},{updateId:Ue,dataStartIndex:V,dataEndIndex:Y}),y)),{},{prevChildren:S,dataStartIndex:V,dataEndIndex:Y})}return null}),Ae(g,"renderActiveDot",function(v,y,b){var x;return E.isValidElement(v)?x=E.cloneElement(v,y):ze(v)?x=v(y):x=A.createElement($N,y),A.createElement(dt,{className:"recharts-active-dot",ke
827y:b},x)});var m=E.forwardRef(function(y,b){return A.createElement(g,Ru({},y,{ref:b}))});return m.displayName=g.displayName,m},O$e=nW({chartName:"BarChart",GraphicalChild:Cs,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:iw},{axisType:"yAxis",AxisComp:ow}],formatAxisMap:fIe}),P$e=nW({chartName:"PieChart",GraphicalChild:Xs,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:J0},{axisType:"radiusAxis",AxisComp:K0}],formatAxisMap:iCe,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});function rW(t,[e,n]){return Math.min(n,Math.max(e,t))}var M$e=E.createContext(void 0);function R$e(t){const e=E.useContext(M$e);return t||e||"ltr"}var iW=["PageUp","PageDown"],oW=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],sW={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},wf="Slider",[vT,I$e,D$e]=x3(wf),[aW,bLe]=Lc(wf,[D$e]),[$$e,aw]=aW(wf),lW=E.forwardRef((t,e)=>{const{name:n,min:r=0,max:i=100,step:o=1,orientation:s="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:g,...m}=t,v=E.useRef(new Set),y=E.useRef(0),x=s==="horizontal"?L$e:B$e,[S=[],w]=Nm({prop:d,defaultProp:c,onChange:C=>{var I;(I=[...v.current][y.current])==null||I.focus(),f(C)}}),k=E.useRef(S);function j(C){const O=V$e(S,C);N(C,O)}function T(C){N(C,y.current)}function _(){const C=k.current[y.current];S[y.current]!==C&&h(S)}function N(C,O,{commit:I}={commit:!1}){const P=G$e(o),$=J$e(Math.round((C-r)/o)*o+r,P),B=rW($,[r,i]);w((z=[])=>{const R=q$e(z,B,O);if(K$e(R,l*o)){y.current=R.indexOf(B);const L=String(R)!==String(z);return L&&I&&h(R),L?R:z}else return z})}return u.jsx($$e,{scope:t.__scopeSlider,name:n,disabled:a,min:r,max:i,valueIndexToChangeRef:y,thumbs:v.current,values:S,orientation:s,form:g,children:u.jsx(vT.Provider,{scope:t.__scopeSlider,children:u.jsx(vT.Slot,{scope:t.__scopeSlider,children:u.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...m,ref:e,onPointerDown:ot(m.onPointerDown,()=>{a||(k.current=S)}),min:r,max:i,inverted:p,onSlideStart:a?void 0:j,onSlideMove:a?void 0:T,onSlideEnd:a?void 0:_,onHomeKeyDown:()=>!a&&N(r,0,{commit:!0}),onEndKeyDown:()=>!a&&N(i,S.length-1,{commit:!0}),onStepKeyDown:({event:C,direction:O})=>{if(!a){const $=iW.includes(C.key)||C.shiftKey&&oW.includes(C.key)?10:1,B=y.current,z=S[B],R=o*$*O;N(z+R,B,{commit:!0})}}})})})})});
827lW.displayName=wf;var[cW,uW]=aW(wf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),L$e=E.forwardRef((t,e)=>{const{min:n,max:r,dir:i,inverted:o,onSlideStart:s,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...d}=t,[f,h]=E.useState(null),p=Ft(e,x=>h(x)),g=E.useRef(void 0),m=R$e(i),v=m==="ltr",y=v&&!o||!v&&o;function b(x){const S=g.current||f.getBoundingClientRect(),w=[0,S.width],j=qN(w,y?[n,r]:[r,n]);return g.current=S,j(x-S.left)}return u.jsx(cW,{scope:t.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:u.jsx(dW,{dir:m,"data-orientation":"horizontal",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=b(x.clientX);s==null||s(S)},onSlideMove:x=>{const S=b(x.clientX);a==null||a(S)},onSlideEnd:()=>{g.current=void 0,l==null||l()},onStepKeyDown:x=>{const w=sW[y?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:w?-1:1})}})})}),B$e=E.forwardRef((t,e)=>{const{min:n,max:r,inverted:i,onSlideStart:o,onSlideMove:s,onSlideEnd:a,onStepKeyDown:l,...c}=t,d=E.useRef(null),f=Ft(e,d),h=E.useRef(void 0),p=!i;function g(m){const v=h.current||d.current.getBoundingClientRect(),y=[0,v.height],x=qN(y,p?[r,n]:[n,r]);return h.current=v,x(m-v.top)}return u.jsx(cW,{scope:t.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:u.jsx(dW,{"data-orientation":"vertical",...c,ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const v=g(m.clientY);o==null||o(v)},onSlideMove:m=>{const v=g(m.clientY);s==null||s(v)},onSlideEnd:()=>{h.current=void 0,a==null||a()},onStepKeyDown:m=>{const y=sW[p?"from-bottom":"from-top"].includes(m.key);l==null||l({event:m,direction:y?-1:1})}})})}),dW=E.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:s,onEndKeyDown:a,onStepKeyDown:l,...c}=t,d=aw(wf,n);return u.jsx(gt.span,{...c,ref:e,onKeyDown:ot(t.onKeyDown,f=>{f.key==="Home"?(s(f),f.preventDefault()):f.key==="End"?(a(f),f.preventDefault()):iW.concat(oW).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:ot(t.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():r(f)}),onPointerMove:ot(t.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&i(f)}),onPointerUp:ot(t.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),o(f))})})}),fW="SliderTrack",hW=E.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,i=aw(fW,n);return u.jsx(gt.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:e})});hW.displayName=fW;var yT="SliderRange",pW=E.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,i=aw(yT,n),o=uW(yT,n),s=E.useRef(null),a=Ft(e,s),l=i.values.length,c=i.values.map(h=>vW(h,i.min,i.max)),d=l>1?Math.min(...c):0,f=100-Math.max(...c);return u.jsx(gt.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:a,style:{...t.style,[o.startEdge]:d+"%",[o.endEdge]:f+"%"}})});pW.displayName=yT;var bT="SliderThumb",mW=E.forwardRef((t,e)=>{const n=I$e(t.__scopeSlider),[r,i]=E.useState(null),o=Ft(e,a=>i(a)),s=E.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return u.jsx(z$e,{...t,ref:o,index:s})}),z$e=E.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:i,...o}=t,s=aw(bT,n),a=uW(bT,n),[l,c]=E.useState(null),d=Ft(e,b=>c(b)),f=l?s.form||!!l.closest("form"):!0,h=C_(l),p=s.values[r],g=p===void 0?0:vW(p,s.min,s.max),m=U$e(r,s.values.length),v=h==null?void 0:h[a.size],y=v?W$e(v,g,a.direction):0;return E.useEffect(()=>{if(l)return s.thumbs.add(l),()=>{s.thumbs.delete(l)}},[l,s.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${g}% + ${y}px)`},children:[u.jsx(vT.ItemSlot,{scope:t.__scopeSlider,children:u.jsx(gt.span,{role:"slider","aria-label":t["aria-label"]||m,"aria-valuemin":s.min,"aria-valuenow":p,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...o,ref:d,style:p===void 0?{display:"none"}:t.style,onFocus:ot(t.onFocus,()=>{s.valueIndexToChangeRef.current=r})})}),f&&u.jsx(gW,{name:i??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:p},r)]})});mW.displayName=bT;var F$e="RadioBubbleInput",gW=E.forwardRef(({__scopeSlider:t,value:e,...n},r)=>{const i=E.useRef(null),o=Ft(i,r),s=AB(e);return E.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==e&&d){const f=new Event("input",{bubbles:!0});d.call(a,e),a.dispatchEvent(f)}},[s,e]),u.jsx(gt.input,{style:{display:"none"},...n,ref:o,defaultValue:e})});gW.displayName=F$e;function q$e(t=[],e,n){const r=[...t];return r[n]=e,r.sort((i,o)=>i-o)}function vW(t,e,n){const o=100/(n-e)*(t-e);return rW(o,[0,100])}function U$e(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function V$e(t,e){if(t.length===1)return 0;const n=t.map(i=>Math.abs(i-e)),r=Math.min(...n);return n.indexOf(r)}function W$e(t,e,n){const r=t/2,o=qN([0,50],[0,r]);return(r-o(e)*n)*n}function H$e(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function K$e(t,e){if(e>0){const n=H$e(t);return Math.min(...n)>=e}return!0}function qN(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function G$e(t){return(String(t).split(".")[1]||"").length}function J$e(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var yW=lW,Y$e=hW,X$e=pW,Q$e=mW;const Ov=E.forwardRef(({className:t,...e},n)=>u.jsxs(yW,{ref:n,className:qt("relative flex w-full touch-none select-none items-center",t),...e,children:[u.jsx(Y$e,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:u.jsx(X$e,{className:"absolute h-full bg-primary"})}),u.jsx(Q$e,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background 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"})]}));Ov.displayName=yW.displayName;function Z$e(t,e=1200){const[n,r]=E.useState(0),i=E.useRef();return E.useEffect(()=>{const o=performance.now(),s=0,a=l=>{const c=l-o,d=Math.min(c/e,1),f=1-Math.pow(1-d,3);r(Math.round(s+(t-s)*f)),d<1&&(i.current=requestAnimationFrame(a))};return i.current=requestAnimationFrame(a),()=>{i.current&&cancelAnimationFrame(i.current)}},[t,e]),n}function rv({value:t,suffix:e="â¬"}){const n=Z$e(t);
827return u.jsxs(u.Fragment,{children:[n.toLocaleString("es-ES")," ",e]})}const Cl=["hsl(145, 63%, 42%)","hsl(210, 70%, 50%)","hsl(35, 90%, 50%)"],OS=[dp,Ax,vn],eLe=()=>{const{t}=Zt(),[e,n]=E.useState(100),[r,i]=E.useState(45),[o,s]=E.useState(35),[a,l]=E.useState(!1),c=E.useRef(null),d=Math.min(Math.max((r-30)/30,.5),1.5),f=Math.min(Math.max(o/50,.6),1.4),h=(d+f)/2,p={absenteeism:1e3,productivity:2e3,retention:1500},g={absenteeism:[.15,.3],productivity:[.1,.2],retention:[.2,.4]},m=(N,C)=>[Math.round(e*N*C[0]*h),Math.round(e*N*C[1]*h)],v=m(p.absenteeism,g.absenteeism),y=m(p.productivity,g.productivity),b=m(p.retention,g.retention),x=v[0]+y[0]+b[0],S=v[1]+y[1]+b[1],w=[t("roi.reducAbsentismo"),t("roi.mejoraProductividad"),t("roi.retencionTalento")],k=[{name:w[0],value:v[1]},{name:w[1],value:y[1]},{name:w[2],value:b[1]}],j=[{name:t("roi.minimo"),absentismo:v[0],productividad:y[0],retención:b[0]},{name:t("roi.maximo"),absentismo:v[1],productividad:y[1],retención:b[1]}],T=E.useCallback(()=>{l(!0),setTimeout(()=>{var N;(N=c.current)==null||N.scrollIntoView({behavior:"smooth",block:"start"})},100)},[]),_=[{label:t("roi.reducAbsentismo"),range:"15â30%",min:v[0],max:v[1],icon:OS[0],color:Cl[0]},{label:t("roi.mejoraProductividad"),range:"10â20%",min:y[0],max:y[1],icon:OS[1],color:Cl[1]},{label:t("roi.retencionTalento"),range:"20â40%",min:b[0],max:b[1],icon:OS[2],color:Cl[2]}];return u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",id:"calculadora-roi",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:[u.jsx(Q7,{className:"w-4 h-4"}),t("roi.badge")]}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-4",children:[t("roi.title1")," ",u.jsx("span",{className:"text-gradient",children:t("roi.title2")})," ",t("roi.title3")]}),u.jsxs("p",{className:"text-lg text-muted-foreground",children:[t("roi.sub"),u.jsx(F5,{children:u.jsxs(PY,{children:[u.jsx(MY,{asChild:!0,children:u.jsx("button",{className:"inline-flex items-center ml-2 text-primary hover:text-primary/80 transition-colors",children:u.jsx(iK,{className:"w-4 h-4"})})}),u.jsx(q5,{className:"max-w-xs",children:u.jsxs("p",{className:"text-sm",children:[u.jsx("strong",{children:t("roi.tooltipTitle")}),": ",t("roi.tooltipDesc")]})})]})})]})]}),u.jsxs("div",{className:"max-w-4xl mx-auto bg-card rounded-2xl p-8 border border-border/50 shadow-lg mb-10",children:[u.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[u.jsxs("div",{className:"space-y-3",children:[u.jsx("label",{className:"block text-sm font-semibold text-foreground",children:t("roi.labelEmpleados")}),u.jsx(hn,{type:"number",min:10,max:1e4,value:e,onChange:N=>n(Math.max(10,Number(N.target.value)||10)),className:"text-lg font-medium"}),u.jsx(Ov,{value:[e],onValueChange:([N])=>n(N),min:10,max:2e3,step:10,className:"mt-2"}),u.jsxs("span",{className:"text-xs text-muted-foreground",children:[e," ",t("roi.empleados")]})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsx("label",{className:"block text-sm font-semibold text-foreground",children:t("roi.labelEdad")}),u.jsx(hn,{type:"number",min:25,max:65,value:r,onChange:N=>i(Math.min(65,Math.max(25,Number(N.target.value)||25))),className:"text-lg font-medium"}),u.jsx(Ov,{value:[r],onValueChange:([N])=>i(N),min:25,max:65,step:1,className:"mt-2"}),u.jsxs("span",{className:"text-xs text-muted-foreground",children:[r," ",t("roi.anos")]})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsx("label",{className:"block text-sm font-semibold text-foreground",children:t("roi.labelSenior")}),u.jsx(hn,{type:"number",min:0,max:100,value:o,onChange:N=>s(Math.min(100,Math.max(0,Number(N.target.value)||0))),className:"text-lg font-medium"}),u.jsx(Ov,{value:[o],onValueChange:([N])=>s(N),min:0,max:100,step:1,className:"mt-2"}),u.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,"% ",t("roi.senior")]})]})]}),u.jsx("div",{className:"mt-8 text-center",children:u.jsxs("button",{onClick:T,className:"inline-flex items-center justify-center gap-2 h-14 px-10 rounded-xl bg-gradient-hero text-primary-foreground font-semibold text-lg shadow-lg transition-all duration-300 hover:shadow-glow hover:-translate-y-1",children:[t("roi.calcBtn"),u.jsx(st,{className:"w-5 h-5"})]})})]}),a&&u.jsxs("div",{ref:c,className:"max-w-5xl mx-auto animate-fade-up",children:[u.jsx("div",{className:"grid md:grid-cols-3 gap-6 mb-10",children:_.map(N=>u.jsxs("div",{className:"bg-card rounded-2xl p-6 border border-border/50 transition-all duration-300 hover:shadow-lg hover:border-primary/30",children:[u.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center",style:{backgroundColor:N.color+"20"},children:u.jsx(N.icon,{className:"w-5 h-5",style:{color:N.color}})}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-semibold text-foreground",children:N.label}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:[t("roi.rango"),": ",N.range]})]})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsxs("div",{className:"flex justify-between text-sm",children:[u.jsx("span",{className:"text-muted-foreground",children:t("roi.minimo")}),u.jsx("span",{className:"font-bold text-foreground",children:u.jsx(rv,{value:N.min})})]}),u.jsxs("div",{className:"flex justify-between text-sm",children:[u.jsx("span",{className:"text-muted-foreground",children:t("roi.maximo")}),u.jsx("span",{className:"font-bold",style:{color:N.color},children:u.jsx(rv,{value:N.max})})]}),u.jsx("div",{className:"h-2 rounded-full bg-muted mt-2 overflow-hidden",children:u.jsx("div",{className:"h-full rounded-full transition-all duration-1000 ease-out",style:{width:`${N.max/S*100}%`,backgroundColor:N.color}})})]})]},N.label))}),u.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 mb-10",children:[u.jsxs("div",{className:"bg-card rounded-2xl p-6 border border-border/50",children:[u.jsx("h3",{className:"text-lg font-bold text-foreground mb-4",children:t("roi.distribTitle")}),u.jsx("div",{className:"h-64",children:u.jsx(dI,{width:"100%",height:"100%",children:u.jsxs(P$e,{children:[u.jsx(Xs,{data:k,cx:"50%",cy:"50%",innerRadius:60,outerRadius:95,paddingAngle:4,dataKey:"value",animationBegin:0,animationDuration:1200,children:k.map((N,C)=>u.jsx(P0,{fill:Cl[C]},`cell-${C}`))}),u.jsx(no,{formatter:N=>
827[`${N.toLocaleString("es-ES")} â¬`,""],contentStyle:{borderRadius:"12px",border:"1px solid hsl(var(--border))",backgroundColor:"hsl(var(--card))"}}),u.jsx(Ya,{formatter:N=>u.jsx("span",{className:"text-sm text-foreground",children:N})})]})})})]}),u.jsxs("div",{className:"bg-card rounded-2xl p-6 border border-border/50",children:[u.jsx("h3",{className:"text-lg font-bold text-foreground mb-4",children:t("roi.rangoTitle")}),u.jsx("div",{className:"h-64",children:u.jsx(dI,{width:"100%",height:"100%",children:u.jsxs(O$e,{data:j,children:[u.jsx(iw,{dataKey:"name",tick:{fill:"hsl(var(--muted-foreground))",fontSize:13}}),u.jsx(ow,{tickFormatter:N=>`${(N/1e3).toFixed(0)}k`,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12}}),u.jsx(no,{formatter:(N,C)=>[`${N.toLocaleString("es-ES")} â¬`,C],contentStyle:{borderRadius:"12px",border:"1px solid hsl(var(--border))",backgroundColor:"hsl(var(--card))"}}),u.jsx(Cs,{dataKey:"absentismo",stackId:"a",fill:Cl[0],radius:[0,0,0,0],name:t("roi.absentismo")}),u.jsx(Cs,{dataKey:"productividad",stackId:"a",fill:Cl[1],name:t("roi.productividad")}),u.jsx(Cs,{dataKey:"retención",stackId:"a",fill:Cl[2],radius:[6,6,0,0],name:t("roi.retencion")}),u.jsx(Ya,{formatter:N=>u.jsx("span",{className:"text-sm text-foreground",children:N})})]})})})]})]}),u.jsxs("div",{className:"bg-card rounded-2xl p-8 border border-border/50 shadow-lg",children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-8 items-center",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t("roi.totalLabel")}),u.jsxs("p",{className:"text-4xl sm:text-5xl font-bold text-primary mb-1",children:[u.jsx(rv,{value:x})," â ",u.jsx(rv,{value:S})]}),u.jsx("p",{className:"text-sm text-muted-foreground",children:t("roi.porAno")})]}),u.jsx("div",{className:"bg-accent rounded-xl p-6",children:u.jsxs("p",{className:"text-foreground leading-relaxed",children:[t("roi.msgP1")," ",u.jsxs("strong",{children:[e," ",t("roi.msgP2")]})," ",t("roi.msgP3")," ",u.jsxs("strong",{children:[r," ",t("roi.msgP4")]})," ",t("roi.msgP5")," ",u.jsxs("strong",{children:[o,"%"]})," ",t("roi.msgP6")," ",u.jsxs("strong",{children:[x.toLocaleString("es-ES")," â¬"]})," ",t("roi.msgP7")," ",u.jsxs("strong",{children:[S.toLocaleString("es-ES")," â¬/año"]})," ",t("roi.msgP8")]})})]}),u.jsxs("div",{className:"mt-8 flex flex-col sm:flex-row gap-4 justify-center",children:[u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl bg-gradient-hero text-primary-foreground font-semibold shadow-lg transition-all duration-300 hover:shadow-glow hover:-translate-y-1",children:[t("roi.ctaInfo"),u.jsx(st,{className:"w-5 h-5"})]}),u.jsx(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl border-2 border-primary text-primary font-semibold transition-all duration-300 hover:bg-primary hover:text-primary-foreground",children:t("roi.ctaExplorar")})]})]})]})]})})},UN=({variant:t="default"})=>{const{lang:e}=Zt(),n=(o,s,a)=>e==="fr"?a:e==="en"?s:o,r=t==="public",i=[{icon:Fu,title:n("Smart Ageing Para Todos","Smart Ageing For All","Smart Ageing Pour Tous"),audience:r?n("Personas +30 años","People 30+","Personnes de +30 ans"):n("Empleados +30 años","Employees 30+","Employés de +30 ans"),desc:r?n("Programa integral para que cualquier persona mayor de 30 años aprenda a diseñar su mejor futuro y disfrutar de una buena longevidad.","Comprehensive programme for anyone over 30 to design their best future and enjoy good longevity.","Programme complet pour toute personne de plus de 30 ans souhaitant concevoir son meilleur avenir et profiter d'une bonne longévité."):n("Programa integral para que cualquier profesional mayor de 30 años aprenda a diseñar su mejor futuro y mejorar su rendimiento.","Comprehensive programme for any professional over 30 to design their best future and improve performance.","Programme complet pour tout professionnel de plus de 30 ans souhaitant concevoir son meilleur avenir et améliorer sa performance.")},{icon:xr,title:n("Smart Ageing en Femenino","Smart Ageing for Women","Smart Ageing au Féminin"),audience:n("Mujeres +40","Women 40+","Femmes de +40 ans"),desc:r?n("Diseñado para mujeres que quieren superar con éxito los retos especÃficos que el envejecimiento tiene para ellas y diseñar su mejor futuro.","Designed for women who want to successfully overcome the specific challenges that ageing brings and design their best future.","Conçu pour les femmes qui veulent surmonter avec succès les défis spécifiques du vieillissement et concevoir leur meilleur avenir."):n("Diseñado para mujeres que quieren superar con éxito los retos especÃficos que el envejecimiento tiene para ellas.","Designed for women who want to successfully overcome the specific challenges that ageing brings.","Conçu pour les femmes qui veulent surmonter avec succès les défis spécifiques du vieillissement.")},{icon:Vn,title:n("Plan Legado","Legacy Plan","Plan Héritage"),audience:r?n("Personas en fase de pre-jubilación","People approaching retirement","Personnes en pré-retraite"):n("Pre-jubilados","Pre-retirees","Pré-retraités"),desc:r?n("Para personas que quieren que la jubilación sea la mejor etapa de su vida, con una transición activa y conectada.","For people who want retirement to be the best stage of their life, with an active and connected transition.","Pour les personnes qui veulent que la retraite soit la meilleure étape de leur vie, avec une transition active et connectée."):n("Para profesionales que quieren que la jubilación sea la mejor etapa de su vida, con una transición activa y conectada.","For professionals who want retirement to be the best stage of their life, with an active and connected transition.","Pour les professionnels qui veulent que la retraite soit la meilleure étape de leur vie, avec une transition active et connectée.")}];return u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:n("Planes de formación","Training plans","Plans de formation")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-4",children:[n("Tres plane
827s diseñados para ","Three plans designed for ","Trois plans conçus pour "),u.jsx("span",{className:"text-primary",children:n("tres colectivos clave","three key segments","trois segments clés")})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:n("Cada segmento de tu organización tiene retos diferentes ante el envejecimiento. Por eso hemos creado un plan especÃfico para cada uno.","Each segment of your organisation faces different ageing challenges. That's why we've created a specific plan for each.","Chaque segment de votre organisation fait face à des défis différents liés au vieillissement. C'est pourquoi nous avons créé un plan spécifique pour chacun.")})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-5xl mx-auto mb-10",children:i.map(o=>u.jsxs("div",{className:"bg-card rounded-2xl p-6 border border-border/50 hover:shadow-lg hover:border-primary/30 transition-all duration-300 group",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-accent flex items-center justify-center mb-4 group-hover:bg-primary transition-colors duration-300",children:u.jsx(o.icon,{className:"w-6 h-6 text-accent-foreground group-hover:text-primary-foreground transition-colors duration-300"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-1",children:o.title}),u.jsx("span",{className:"text-sm font-medium text-primary",children:o.audience}),u.jsx("p",{className:"text-sm text-muted-foreground mt-3 leading-relaxed",children:o.desc})]},o.title))}),u.jsx("div",{className:"text-center",children:u.jsxs(De,{to:"/planes",className:"inline-flex items-center justify-center gap-2 h-12 px-8 rounded-xl bg-gradient-hero text-primary-foreground font-semibold shadow-lg transition-all duration-300 hover:shadow-glow hover:-translate-y-1",children:[n("Explorar los planes","Explore plans","Explorer les plans"),u.jsx(st,{className:"w-5 h-5"})]})})]})})},tLe=()=>{const{t,lang:e}=Zt(),n=(l,c,d)=>e==="fr"?d:e==="en"?c:l,r=[{icon:dp,titleEs:"Absentismo creciente",titleEn:"Rising absenteeism",titleFr:"Absentéisme croissant",descEs:"Los empleados mayores de 50 no gestionados generan hasta un 65% más de dÃas de baja que la media.",descEn:"Unmanaged employees over 50 generate up to 65% more sick days than average.",descFr:"Les employés de plus de 50 ans non accompagnés génèrent jusqu'à 65 % de jours d'arrêt de plus que la moyenne."},{icon:Ak,titleEs:"Productividad en declive",titleEn:"Declining productivity",titleFr:"Productivité en déclin",descEs:"Sin programas de prevención, la productividad individual puede caer entre un 10% y un 20% a partir de los 50 años.",descEn:"Without prevention programmes, individual productivity can drop 10â20% after age 50.",descFr:"Sans programmes de prévention, la productivité individuelle peut chuter de 10 à 20 % après 50 ans."},{icon:vn,titleEs:"Fuga de talento y conocimiento",titleEn:"Talent and knowledge drain",titleFr:"Fuite de talents et de connaissances",descEs:"Cada empleado senior que se va se lleva décadas de conocimiento organizacional. El coste medio de reemplazo: 6â9 meses de salario.",descEn:"Every senior employee who leaves takes decades of organisational knowledge. Average replacement cost: 6â9 months' salary.",descFr:"Chaque employé senior qui part emporte des décennies de savoir organisationnel. Coût moyen de remplacement : 6 à 9 mois de salaire."}],i=[{es:"Pérdida irreversible de conocimiento organizacional cuando se van los más experimentados",en:"Irreversible loss of organisational knowledge when the most experienced leave",fr:"Perte irréversible de connaissances organisationnelles lorsque les plus expérimentés partent"},{es:"Desengagement progresivo de los profesionales mayores de 50",en:"Progressive disengagement of professionals over 50",fr:"Désengagement progressif des professionnels de plus de 50 ans"},{es:"Desajuste de habilidades entre lo que el mercado necesita y lo que la plantilla ofrece",en:"Skills mismatch between what the market needs and what the workforce offers",fr:"Décalage entre ce que le marché demande et ce que les effectifs proposent"},{es:"Conflictos intergeneracionales no gestionados que erosionan la cultura",en:"Unmanaged intergenerational conflicts that erode culture",fr:"Conflits intergénérationnels non gérés qui érodent la culture"},{es:"Incapacidad para atraer talento joven que valora la diversidad generacional",en:"Inability to attract young talent that values generational diversity",fr:"Incapacité à attirer les jeunes talents qui valorisent la diversité générationnelle"},{es:"Falta de planificación sucesoria que deja vacÃos crÃticos en la dirección",en:"Lack of succession planning that leaves critical gaps in leadership",fr:"Manque de planification de la rel
827ève laissant des vides critiques dans la direction"}],o=[{icon:X3,titleEs:"Diagnóstico organizacional",titleEn:"Organisational diagnosis",titleFr:"Diagnostic organisationnel",descEs:"Evaluamos el impacto real del envejecimiento en tu empresa: costes ocultos, riesgos operativos y oportunidades de mejora.",descEn:"We assess the real impact of ageing on your company: hidden costs, operational risks, and improvement opportunities.",descFr:"Nous évaluons l'impact réel du vieillissement sur votre entreprise : coûts cachés, risques opérationnels et opportunités d'amélioration.",resultEs:"Mapa claro del coste actual",resultEn:"Clear map of current costs",resultFr:"Carte claire des coûts actuels"},{icon:$o,titleEs:"Programas de formación",titleEn:"Training programmes",titleFr:"Programmes de formation",descEs:"Diplomados especializados para toda la plantilla, mujeres y pre-jubilados. Basados en los 9 pilares del envejecimiento inteligente.",descEn:"Specialised diplomas for all staff, women, and pre-retirees. Based on the 9 pillars of smart ageing.",descFr:"Diplômes spécialisés pour tout le personnel, les femmes et les pré-retraités. Basés sur les 9 piliers du vieillissement intelligent.",resultEs:"Empleados más preparados y comprometidos",resultEn:"Better prepared and engaged employees",resultFr:"Employés mieux préparés et engagés"},{icon:bK,titleEs:"Eventos inmersivos (Maturatones)",titleEn:"Immersive events (Maturathons)",titleFr:"Ãvénements immersifs (Maturathons)",descEs:"Jornadas transformadoras con talleres prácticos que c
827ambian la forma en que tu equipo entiende y se prepara para el futuro.",descEn:"Transformative sessions with hands-on workshops that change how your team understands and prepares for the future.",descFr:"Journées transformatrices avec des ateliers pratiques qui changent la façon dont votre équipe comprend et se prépare pour l'avenir.",resultEs:"Cambio cultural real y medible",resultEn:"Real and measurable cultural change",resultFr:"Changement culturel réel et mesurable"},{icon:Fu,titleEs:"Estrategia de longevidad corporativa",titleEn:"Corporate longevity strategy",titleFr:"Stratégie de longévité d'entreprise",descEs:"Diseñamos un plan integral de gestión del envejecimiento alineado con los objetivos de negocio de tu organización.",descEn:"We design a comprehensive ageing management plan aligned with your organisation's business objectives.",descFr:"Nous concevons un plan complet de gestion du vieillissement aligné sur les objectifs business de votre organisation.",resultEs:"Ventaja competitiva sostenible",resultEn:"Sustainable competitive advantage",resultFr:"Avantage compétitif durable"}],s=[{icon:dp,value:"â 15â30%",es:"Reducción del absentismo",en:"Absenteeism reduction",fr:"Réduction de l'absentéisme"},{icon:Ax,value:"â 10â20%",es:"Mejora de productividad",en:"Productivity improvement",fr:"Amélioration de la productivité"},{icon:vn,value:"â 20â40%",es:"Reducción de la rotación",en:"Turnover reduction",fr:"Réduction de la rotation"},{icon:up,value:"100%",es:"Comprensión del impacto en negocio",en:"Understanding of business impact",fr:"Compréhension de l'impact business"},{icon:qa,value:"+",es:"Diálogo intergeneracional",en:"Intergenerational dialogue",fr:"Dialogue intergénérationnel"},{icon:Bo,value:"ROI",es:"Retorno medible de la inversión",en:"Measurable return on investment",fr:"Retour sur investissement mesurable"}],a=[{es:"El 30% de la fuerza laboral en España ya supera los 50 años",en:"30% of Spain's workforce is already over 50",fr:"30 % de la main-d'Åuvre espagnole a déjà plus de 50 ans"},{es:"En 2030, el 40% de los empleados en Europa tendrá más de 55 años",en:"By 2030, 40% of European employees will be over 55",fr:"En 2030, 40 % des employés européens auront plus de 55 ans"},{es:"El coste del absentismo por envejecimiento no gestionado crece un 12% anual",en:"The cost of absenteeism from unmanaged ageing grows 12% annually",fr:"Le coût de l'absentéisme dû au vieillissement non géré croît de 12 % par an"},{es:"Las empresas con programas de longevidad retienen un 35% más de talento senior",en:"Companies with longevity programmes retain 35% more senior talent",fr:"Les entreprises dotées de programmes de longévité retiennent 35 % de talents seniors en plus"}];return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsxs("section",{className:"pt-28 md:pt-36 pb-16 md:pb-24 bg-foreground relative overflow-hidden",children:[u.jsxs("div",{className:"absolute inset-0 opacity-10",children:[u.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-primary rounded-full blur-3xl"}),u.jsx("div",{className:"absolute bottom-0 right-1/3 w-80 h-80 bg-primary rounded-full blur-3xl"})]}),u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:u.jsxs("div",{className:"max-w-4xl",children:[u.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-background/15 text-primary-foreground text-sm font-medium mb-6",children:[u.jsx(Z3,{className:"w-4 h-4"}),n("El envejecimiento no gestionado ya está costando dinero a tu empresa","Unmanaged ageing is already costing your company money","Le vieillissement non géré coûte déjà de l'argent à votre entreprise")]}),u.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-primary-foreground mb-6 leading-tight",children:[n("Cada año sin actuar, tu organización pierde entre ","Every year without action, your organisation loses between ","Chaque année sans agir, votre organisation perd entre "),u.jsx("span",{className:"text-background",children:"145.000â¬"}),n(" y "," and "," et "),u.jsx("span",{className:"text-background",children:"420.000â¬"})]}
827),u.jsx("p",{className:"text-xl text-primary-foreground/80 leading-relaxed mb-4 max-w-3xl",children:n("Por cada 100 empleados. Por absentismo, productividad perdida y rotación no planificada. Son costes reales que puedes reducir.","Per 100 employees. Through absenteeism, lost productivity, and unplanned turnover. These are real costs you can reduce.","Pour 100 employés. Par l'absentéisme, la productivité perdue et la rotation non planifiée. Ce sont des coûts réels que vous pouvez réduire.")}),u.jsx("p",{className:"text-lg text-primary-foreground/60 mb-10 max-w-2xl",children:n("Somos el primer instituto especializado en convertir la gestión del envejecimiento en ventaja competitiva.","We are the first institute specialised in turning ageing management into competitive advantage.","Nous sommes le premier institut spécialisé dans la transformation de la gestion du vieillissement en avantage compétitif.")}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[u.jsxs("a",{href:"#calculadora-roi",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl bg-background text-foreground font-semibold text-lg shadow-lg transition-all duration-300 hover:bg-background/90 hover:-translate-y-1",children:[n("Calcular impacto en mi organización","Calculate impact on my organisation","Calculer l'impact sur mon organisation"),u.jsx(st,{className:"w-5 h-5"})]}),u.jsxs("a",{href:"https://wa.me/34650781592",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl border-2 border-primary-foreground/30 text-primary-foreground font-semibold transition-all duration-300 hover:bg-primary-foreground/10",children:[u.jsx(qa,{className:"w-5 h-5"}),n("Contactar","Contact us","Nous contacter")]})]})]})})]}),u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-destructive/10 text-destructive text-sm font-medium mb-4",children:n("El problema que ignoras","The problem you're ignoring","Le problème que vous ignorez")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-4",children:[n("¿Cuánto está perdiendo tu empresa ","How much is your company losing ","Combien perd votre entreprise "),u.jsx("span",{className:"text-primary",children:n("ahora mismo?","right now?","en ce moment ?")})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:n("El envejecimiento de la plantilla no es un problema de RRHH. Es un problema de cuenta de resultados.","Workforce ageing is not an HR problem. It's a bottom-line problem.","Le vieillissement des effectifs n'est pas un problème RH. C'est un problème de résultat net.")})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:r.map(l=>u.jsxs("div",{className:"bg-card rounded-2xl p-8 border border-border/50 hover:shadow-lg hover:border-destructive/30 transition-all duration-300",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-destructive/10 flex items-center justify-center mb-4",children:u.jsx(l.icon,{className:"w-6 h-6 text-destructive"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-2",children:n(l.titleEs,l.titleEn,l.titleFr)}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n(l.descEs,l.descEn,l.descFr)})]},l.titleEs))})]})}),u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-background shadow-md flex items-center justify-center",children:u.jsx(Q3,{className:"w-6 h-6 text-primary"})}),u.jsx("div",{children:u.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground",children:n("Lo que no ves te está costando más","What you can't see is costing you more","Ce que vous ne voyez pas vous coûte davantage")})})]}),u.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:n("Más allá de los números, el envejecimiento no gestionado genera consecuencias que erosionan tu organización desde dentro.","Beyond the numbers, unmanaged ageing generates consequences that erode your organisation from within.","Au-delà des chiffres, le vieillissement non géré génère des conséquences qui érodent votre organisation de l'intérieur.")}),u.jsx("div",{className:"grid sm:grid-cols-2 gap-3",children:i.map((l,c)=>u.jsxs("div",{className:"flex items-start gap-3 bg-card rounded-xl p-4 border border-border/50",children:[u.jsx("span",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center text-primary font-bold text-sm mt-0.5",children:c+1}),u.jsx("p",{className:"text-foreground text-sm leading-relaxed",children:n(l.es,l.en,l.fr)})]},c))})]})})}),u.jsxs("section",{className:"py-16 md:py-24 bg-foreground relative overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 opacity-5",children:u.jsx("div",{className:"absolute top-1/4 right-0 w-96 h-96 bg-primary rounded-full blur-3xl"})}),u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:u.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[u.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-background/15 text-primary-foreground text-sm font-medium mb-6",children:[u.jsx(ks,{className:"w-4 h-4"}),n("Ventana de oportunidad","Window of opportunity","Fenêtre d'opportunité")]}),u.jsxs("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-primary-foreground mb-6",children:[n("Si no actúas a
827hora, en ","If you don't act now, in ","Si vous n'agissez pas maintenant, dans "),u.jsx("span",{className:"text-background",children:n("3 años","3 years","3 ans")}),n(" será un problema irreversible"," it will be an irreversible problem"," ce sera un problème irréversible")]}),u.jsxs("div",{className:"grid sm:grid-cols-3 gap-6 mt-12",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"text-4xl font-bold text-background mb-2",children:"2027"}),u.jsx("p",{className:"text-primary-foreground/80 text-sm",children:n("Los baby boomers superarán el 35% de la plantilla media","Baby boomers will exceed 35% of average workforce","Les baby-boomers dépasseront 35 % des effectifs moyens")})]}),u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"text-4xl font-bold text-background mb-2",children:"+40%"}),u.jsx("p",{className:"text-primary-foreground/80 text-sm",children:n("Incremento estimado en costes de absentismo para 2030","Estimated increase in absenteeism costs by 2030","Augmentation estimée des coûts d'absentéisme d'ici 2030")})]}),u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"text-4xl font-bold text-background mb-2",children:"x3"}),u.jsx("p",{className:"text-primary-foreground/80 text-sm",children:n("El coste de actuar tarde vs. actuar ahora","The cost of acting late vs. acting now","Le coût d'agir tard vs. agir maintenant")})]})]}),u.jsx("p",{className:"text-primary-foreground/60 text-sm mt-8 max-w-2xl mx-auto",children:n("Las organizaciones que actúan hoy obtienen ventaja competitiva. Las que esperan, asumen costes crecientes.","Organisations that act today gain competitive advantage. Those that wait absorb growing costs.","Les organisations qui agissent aujourd'hui gagnent un avantage compétitif. Celles qui attendent absorbent des coûts croissants.")})]})})]}),u.jsxs("section",{className:"py-16 md:py-20 bg-primary relative overflow-hidden",children:[u.jsxs("div",{className:"absolute inset-0 opacity-10",children:[u.jsx("div",{className:"absolute -top-20 -left-20 w-60 h-60 bg-background rounded-full blur-3xl"}),u.jsx("div",{className:"absolute -bottom-20 -right-20 w-60 h-60 bg-background rounded-full blur-3xl"})]}),u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:u.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[u.jsx(Y3,{className:"w-12 h-12 text-primary-foreground/30 mx-auto mb-6"}),u.jsx("blockquote",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold text-primary-foreground leading-tight mb-6",children:n("El envejecimiento de la plantilla no es un problema demográfico. Es un problema de negocio. Y como todo problema de negocio, tiene solución.","Workforce ageing is not a demographic problem. It's a business problem. And like every business problem, it has a solution.","Le vieillissement des effectifs n'est pas un problème démographique. C'est un problème business. Et comme tout problème business, il a une solution.")}),u.jsx("p",{className:"text-primary-foreground/70 text-lg",children:n("â La pregunta no es si afecta a tu empresa. La pregunta es cuánto te está costando no hacer nada.","â The question is not whether it affects your company. The question is how much doing nothing is costing you.","â La question n'est pas si cela affecte votre entreprise. La question est combien ne rien faire vous coûte.")})]})})]}),u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[u.jsxs("div",{children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:n("Nuestro enfoque","Our approach","Notre approche")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:[n("No vendemos bienestar. ","We don't sell wellness. ","Nous ne vendons pas du bien-être. "),u.jsx("span",{className:"text-primary",children:n("Generamos eficiencia.","We generate efficiency.","Nous générons de l'efficacité.")})]}),u.jsx("p",{className:"text-lg text-muted-foreground mb-6 leading-relaxed",children:n("Mientras otros se centran solo en salud y bienestar, nuestro enfoque es holÃstico: abordamos las 9 dimensiones del envejecimiento que afectan al rendimiento organizacional.","While others focu
827s only on health and wellness, our approach is holistic: we address the 9 dimensions of ageing that affect organisational performance.","Alors que d'autres se concentrent uniquement sur la santé et le bien-être, notre approche est holistique : nous abordons les 9 dimensions du vieillissement qui affectent la performance organisationnelle.")}),u.jsx("p",{className:"text-muted-foreground mb-8 leading-relaxed",children:n("Finanzas, trabajo, derecho, vivienda, tecnologÃa, salud, relaciones sociales, final de vida y cuidado del mayor. Porque un empleado preocupado por su futuro no rinde igual que uno que lo tiene planificado.","Finance, work, law, housing, technology, health, social relationships, end of life, and elder care. Because an employee worried about their future doesn't perform the same as one who has it planned.","Finances, travail, droit, logement, technologie, santé, relations sociales, fin de vie et soins aux aînés. Car un employé inquiet pour son avenir ne performe pas comme un qui l'a planifié.")}),u.jsx("div",{className:"flex flex-col gap-3",children:[{es:"Enfoque basado en impacto económico, no en procesos",en:"Approach based on economic impact, not processes",fr:"Approche basée sur l'impact économique, pas les processus"},{es:"MetodologÃa propia validada: los 9 pilares del envejecimiento inteligente",en:"Validated proprietary methodology: the 9 pillars of smart ageing",fr:"Méthodologie propre validée : les 9 piliers du vieillissement intelligent"},{es:"Resultados medibles desde el primer trimestre",en:"Measurable results from the first quarter",fr:"Résultats mesurables dès le premier trimestre"},{es:"Ãnico instituto especializado en gestión del envejecimiento corporativo",en:"Only institute specialised in corporate ageing management",fr:"Seul institut spécialisé dans la gestion du vieillissement corporate"}].map((l,c)=>u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(H3,{className:"w-5 h-5 text-primary flex-shrink-0"}),u.jsx("span",{className:"text-foreground",children:n(l.es,l.en,l.fr)})]},c))})]}),u.jsx("div",{className:"grid grid-cols-2 gap-4",children:[{icon:up,es:"9 pilares del envejecimiento",en:"9 pillars of ageing",fr:"9 piliers du vieillissement"},{icon:e5,es:"Impacto desde el dÃa 1",en:"Impact from day 1",fr:"Impact dès le jour 1"},{icon:Bo,es:"Orientado a ROI",en:"ROI-oriented",fr:"Orienté ROI"},{icon:Lo,es:"Innovación constante",en:"Constant innovation",fr:"Innovation constante"}].map((l,c)=>u.jsxs("div",{className:"bg-card rounded-2xl p-6 border border-border/50 text-center hover:shadow-lg hover:border-primary/30 transition-all duration-300",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-background shadow-md flex items-center justify-center mx-auto mb-3",children:u.jsx(l.icon,{className:"w-6 h-6 text-primary"})}),u.jsx("p",{className:"text-sm font-bold text-foreground",children:n(l.es,l.en,l.fr)})]},c))})]})})}),u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:n("Soluciones","Solutions","Solutions")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-4",children:[n("Qué hacemos por ","What we do for ","Ce que nous faisons pour "),u.jsx("span",{className:"text-primary",children:n("tu empresa","your company","votre entreprise")})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:n("Cuatro lÃneas de actuación orientadas a resultados medibles.","Four lines of action oriented towards measurable results.","Quatre axes d'action orientés vers des résultats mesurables.")})]}),u.jsx("div",{className:"grid md:grid-cols-2 gap-6 max-w-5xl mx-auto",children:o.map(l=>u.jsxs("div",{className:"bg-card rounded-2xl p-8 border border-border/50 hover:shadow-lg hover:border-primary/30 transition-all duration-300 group",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-background shadow-md flex items-center justify-center group-hover:bg-primary/10 transition-colors",children:u.jsx(l.icon,{className:"w-6 h-6 text-primary"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground",children:n(l.titleEs,l.titleEn,l.titleFr)})]}),u.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:n(l.descEs,l.descEn,l.descFr)}),u.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-primary",children:[u.jsx(J7,{className:"w-4 h-4"}),n(l.resultEs,l.resultEn,l.resultFr)]})]}
827,l.titleEs))})]})}),u.jsx(UN,{}),u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:n("Resultados medibles","Measurable results","Résultats mesurables")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-4",children:[n("Lo que puedes esperar ","What you can expect ","Ce que vous pouvez attendre "),u.jsx("span",{className:"text-primary",children:n("de nosotros","from us","de nous")})]})]}),u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 max-w-5xl mx-auto",children:s.map((l,c)=>u.jsxs("div",{className:"bg-card rounded-2xl p-5 border border-border/50 text-center hover:shadow-lg hover:border-primary/30 transition-all duration-300",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-background shadow-md flex items-center justify-center mx-auto mb-3",children:u.jsx(l.icon,{className:"w-5 h-5 text-primary"})}),u.jsx("p",{className:"text-xl font-bold text-primary mb-1",children:l.value}),u.jsx("p",{className:"text-xs text-muted-foreground",children:n(l.es,l.en,l.fr)})]},c))})]})}),u.jsx(eLe,{}),u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:n("Datos del mercado","Market data","Données du marché")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-4",children:[n("No lo decimos nosotros. ","Don't take our word for it. ","Ce n'est pas nous qui le disons. "),u.jsx("span",{className:"text-primary",children:n("Lo dicen los datos.","The data speaks.","Les données parlent.")})]})]}),u.jsx("div",{className:"grid sm:grid-cols-2 gap-4",children:a.map((l,c)=>u.jsxs("div",{className:"flex items-start gap-4 bg-card rounded-xl p-5 border border-border/50 hover:border-primary/30 transition-all duration-300",children:[u.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:u.jsx(Ak,{className:"w-4 h-4 text-primary"})}),u.jsx("p",{className:"text-foreground leading-relaxed",children:n(l.es,l.en,l.fr)})]},c))})]})})}),u.jsxs("section",{className:"py-16 md:py-24 bg-foreground relative overflow-hidden",children:[u.jsxs("div",{className:"absolute inset-0 opacity-10",children:[u.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-primary rounded-full blur-3xl"}),u.jsx("div",{className:"absolute bottom-0 right-1/4 w-96 h-96 bg-primary rounded-full blur-3xl"})]}),u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:u.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[u.jsxs("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-primary-foreground mb-6",children:[n("Tu competencia ya está actuando.","Your competitors are already acting.","Vos concurrents agissent déjà ."),u.jsx("br",{}),u.jsx("span",{className:"text-background",children:n("¿Y tú?","Are you?","Et vous ?")})]}),u.jsx("p",{className:"text-xl text-primary-foreground/70 mb-10 max-w-2xl mx-auto",children:n("Descubre cuánto puede ahorrar tu organización gestionando el envejecimiento de forma inteligente.","Discover how much your organisation can save by managing ageing intelligently.","Découvrez combien votre organisation peut économiser en gérant le vieillissement intelligemment.")}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[u.jsxs("a",{href:"#calculadora-roi",className:"inline-flex items-center justify-center gap-2 h-16 px-10 rounded-xl bg-background text-foreground text-lg font-semibold shadow-lg transition-all duration-300 hover:bg-background/90 hover:-translate-y-1",children:[n("Calcular impacto en mi organización","Calculate impact on my organisation","Calculer l'impact sur mon organisation"),u.jsx(st,{className:"w-5 h-5"})]}),u.jsxs("a",{href:"https://wa.me/34650781592",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 h-16 px-10 rounded-xl border-2 border-primary-foreground
827/30 text-primary-foreground text-lg font-semibold transition-all duration-300 hover:bg-primary-foreground/10",children:[u.jsx(qa,{className:"w-5 h-5"}),n("Contactar","Contact us","Nous contacter")]})]}),u.jsx("p",{className:"text-primary-foreground/40 text-sm mt-6",children:n("Sin compromiso · Respuesta en 24h · Confidencial","No obligation · Response within 24h · Confidential","Sans engagement · Réponse sous 24h · Confidentiel")})]})})]})]}),u.jsx(Qt,{})]})},nLe={es:[{icon:Hw,title:"Ahorro en costes sociosanitarios",description:"Los programas de prevención reducen significativamente el gasto público asociado a la atención de personas dependientes.",kpi:"6.000â¬â10.000⬠ahorro por persona/año"},{icon:ks,title:"Retraso de la dependencia",description:"Intervenciones tempranas que prolongan la autonomÃa personal y retrasan la necesidad de recursos asistenciales.",kpi:"Hasta 5 años de autonomÃa adicional"},{icon:xr,title:"Mejora del envejecimiento activo",description:"Ciudadanos más sanos, activos y participativos contribuyen a una sociedad más cohesionada y productiva.",kpi:"Mejora en indicadores de bienestar"},{icon:vn,title:"Cohesión social e intergeneracional",description:"Programas que fomentan la conexión entre generaciones y fortalecen el tejido social de la comunidad.",kpi:"Mayor participación ciudadana"}],en:[{icon:Hw,title:"Social healthcare cost savings",description:"Prevention programmes significantly reduce public spending associated with dependent care.",kpi:"â¬6,000ââ¬10,000 savings per person/year"},{icon:ks,title:"Delayed dependency",description:"Early interventions that extend personal autonomy and delay the need for care resources.",kpi:"Up to 5 additional years of autonomy"},{icon:xr,title:"Improved active ageing",description:"Healthier, more active, and participatory citizens contribute to a more cohesive and productive society.",kpi:"Improved wellbeing indicators"},{icon:vn,title:"Social and intergenerational cohesion",description:"Programmes that foster connection between generations and strengthen the social fabric.",kpi:"Greater citizen participation"}],fr:[{icon:Hw,title:"Ãconomies en coûts socio-sanitaires",description:"Les programmes de prévention réduisent considérablement les dépenses publiques liées à la prise en charge des personnes dépendantes.",kpi:"6 000 ⬠â 10 000 ⬠d'économies par personne/an"},{icon:ks,title:"Retard de la dépendance",description:"Des interventions précoces qui prolongent l'autonomie personnelle et retardent le besoin de ressources d'assistance.",kpi:"Jusqu'à 5 ans d'autonomie supplémentaire"},{icon:xr,title:"Amélioration du vieillissement actif",description:"Des citoyens plus sains, actifs et participatifs contribuent à une société plus cohésive et productive.",kpi:"Amélioration des indicateurs de bien-être"},{icon:vn,title:"Cohésion sociale et intergénérationnelle",description:"Des programmes qui favorisent les liens entre les générations et renforcent le tissu social.",kpi:"Plus grande participation citoyenne"}]},rLe={es:[{title:"Talleres de envejecimiento inteligente",description:"Sesiones formativas para ciudadanos sobre los 9 pilares: finanzas, salud, tecnologÃa, vivienda, legalidad y más."},{title:"Programas de prevención comunitaria",description:"Intervenciones diseñadas para reducir factores de riesgo y promover hábitos saludables a nivel municipal."},{title:"Asesoramiento a técnicos municipales",description:"Formación especializada para equipos de servicios sociales en metodologÃas de envejecimiento activo."},{title:"Clubs de Mejor Longevidad",description:"Espacios de encuentro para mayores activos que combinan formación, socialización y acompañamiento."}],en:[{title:"Smart ageing workshops",description:"Training sessions for citizens on the 9 pillars: finance, health, technology, housing, law, and more."},{title:"Community prevention programmes",description:"Interventions designed to reduce risk factors and promote healthy habits at the municipal level."},{title:"Municipal staff advisory",description:"Specialised training for social services teams in active ageing methodologies."}
827,{title:"Better Longevity Clubs",description:"Meeting spaces for active seniors combining training, socialisation, and support."}],fr:[{title:"Ateliers de vieillissement intelligent",description:"Sessions de formation pour les citoyens sur les 9 piliers : finances, santé, technologie, logement, droit et plus."},{title:"Programmes de prévention communautaire",description:"Interventions conçues pour réduire les facteurs de risque et promouvoir des habitudes saines au niveau municipal."},{title:"Conseil aux techniciens municipaux",description:"Formation spécialisée pour les équipes de services sociaux aux méthodologies de vieillissement actif."},{title:"Clubs de Meilleure Longévité",description:"Espaces de rencontre pour les seniors actifs combinant formation, socialisation et accompagnement."}]},iLe=()=>{const{t,lang:e}=Zt(),n=nLe[e],r=rLe[e];return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsxs("section",{className:"pt-28 md:pt-36 pb-16 md:pb-24 bg-gradient-section relative overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 to-transparent pointer-events-none"}),u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative",children:u.jsxs("div",{className:"max-w-3xl",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-6",children:t("admin.badge")}),u.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-foreground mb-6 leading-tight",children:[t("admin.heroTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("admin.heroTitle2")})]}),u.jsx("p",{className:"text-xl text-muted-foreground leading-relaxed mb-8",children:t("admin.heroSub")}),u.jsx("div",{className:"flex flex-col sm:flex-row gap-4",children:u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl bg-gradient-hero text-primary-foreground font-semibold shadow-lg transition-all duration-300 hover:shadow-glow hover:-translate-y-1",children:[t("admin.cta"),u.jsx(st,{className:"w-5 h-5"})]})})]})})]}),u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("admin.benefBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:[t("admin.benefTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("admin.benefTitle2")})]}),u.jsx("p",{className:"text-lg text-muted-foreground",children:t("admin.benefSub")})]}),u.jsx("div",{className:"grid md:grid-cols-2 gap-6 lg:gap-8",children:n.map(i=>u.jsxs("div",{className:"bg-card rounded-2xl p-8 border border-border/50 transition-all duration-300 hover:shadow-lg hover:border-primary/30",children:[u.jsx("div",{className:"w-14 h-14 rounded-xl bg-accent flex items-center justify-center mb-4",children:u.jsx(i.icon,{className:"w-7 h-7 text-accent-foreground"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-2",children:i.title}),u.jsx("p",{className:"text-muted-foreground mb-4",children:i.description}),u.jsx("span",{className:"inline-block px-3 py-1 rounded-full bg-accent text-accent-foreground text-xs font-semibold",children:i.kpi})]},i.title))})]})}),u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:t("admin.progBadge")}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:[t("admin.progTitle1")," ",u.jsx("span",{className:"text-gradient",children:t("admin.progTitle2")})]})]}
827),u.jsx("div",{className:"max-w-3xl mx-auto space-y-4",children:r.map((i,o)=>u.jsxs("div",{className:"group flex items-start gap-5 bg-card rounded-xl p-6 border border-border/50 transition-all duration-300 hover:shadow-md hover:border-primary/30",children:[u.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-lg bg-accent flex items-center justify-center text-sm font-bold text-accent-foreground group-hover:bg-primary group-hover:text-primary-foreground transition-all duration-300",children:o+1}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-bold text-foreground group-hover:text-primary transition-colors duration-300",children:i.title}),u.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:i.description})]})]},o))})]})}),u.jsx(UN,{variant:"public"}),u.jsx("section",{className:"py-16 md:py-20 bg-foreground",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[u.jsx("div",{className:"w-14 h-14 rounded-xl bg-background shadow-md flex items-center justify-center mx-auto mb-6",children:u.jsx(kK,{className:"w-7 h-7 text-primary"})}),u.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-primary-foreground mb-6",children:t("admin.msgTitle")}),u.jsx("p",{className:"text-lg text-primary-foreground/70 mb-8",children:t("admin.msgSub")}),u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-14 px-10 rounded-xl bg-gradient-hero text-primary-foreground font-semibold shadow-lg transition-all duration-300 hover:shadow-glow hover:-translate-y-1",children:[t("admin.msgCta"),u.jsx(st,{className:"w-5 h-5"})]})]})})})]}),u.jsx(Qt,{})]})},oLe={es:{badge:"Para colegios profesionales",heroTitle1:"Acompañamos a vuestro colegio a seguir siendo",heroTitleAccent:"relevante",heroTitle2:"en una sociedad que vive más años",heroSub:"Os ayudamos a diseñar nuevos servicios, comunidades y programas que conectan con vuestros colegiados en cada etapa de su vida profesional. Sin recetas genéricas: una mirada especÃfica para colegios que quieren adaptarse a la longevidad.",ctaPrimary:"Hablemos sin compromiso",ctaSecondary:"Ver cómo trabajamos",situacionBadge:"El punto de partida",situacionTitle:"Lo que muchos colegios nos cuentan",situacionIntro:"No son problemas urgentes, pero sà preguntas que aparecen cada vez con más fuerza en las juntas de gobierno y en las conversaciones con los colegiados.",situacionItems:[{title:"Cómo seguir siendo relevantes",description:"Los colegiados esperan algo más que la cuota y los servicios tradicionales. Buscan que el colegio aporte sentido a lo largo de toda su trayectoria, no solo en los inicios."},{title:"Cómo acompañar todas las etapas profesionales",description:"Las necesidades de un colegiado de 30 años no son las mismas que las de uno de 55 o 70. La longevidad multiplica las etapas vitales y profesionales que el colegio quiere atender."},{title:"Cómo generar nuevos servicios con sentido",description:"Hay ganas de innovar, pero no siempre es fácil saber por dónde empezar, qué temas tratar y cómo conectar con colegiados que ya tienen mucha información a su alcance."}],oportunidadBadge:"El cambio de enfoque",oportunidadTitle1:"La longevidad no es un problema, es una",oportunidadTitleAccent:"oportunidad",oportunidadIntro:"Una sociedad más longeva abre un espacio nuevo para los colegios que quieran ocuparlo. No se trata de añadir más actividades, sino de ampliar el papel del colegio en la vida de sus miembros.",oportunidadItems:[{icon:Lo,title:"Nuevas lÃneas de actividad",description:"Programas, comunidades y formaciones que abren conversaciones que antes el colegio no tenÃa con sus colegiados."},{icon:vn,title:"Servicios para cada etapa profesional",description:"Propuestas pensadas para quien empieza, para quien está en plena madurez profesional y para quien se acerca a una nueva etapa vital."},{icon:Uw,title:"Más conexión con los colegiados",description:"Espacios donde compartir experiencias y aprender entre pares, que refuerzan el vÃnculo con la institución."},{icon:uc,title:"Posicionamiento diferencial",description:"Un colegio que se ocupa de la longevidad de sus miembros se posiciona como referente y se diferencia con naturalidad."}],comoBadge:"Cómo trabajamos",comoTitle1:"Una colaboración",comoTitleAccent:"sencilla y a vuestro ritmo",comoIntro:"No imponemos un modelo cerrado. Escuchamos lo que ya estáis haciendo, entendemos vuestro contexto y construimos contigo lo que mejor encaja con vuestro colegio.",comoSteps:[{title:"Una primera conversación",description:"Una reunión inicial para conoceros, entender cómo es vuestro colegio, qué inquietudes tenéis y dónde veis oportunidades. Sin propuestas comerciales en frÃo."},{title:"Una propuesta a medida",description:"Diseñamos juntos un planteamiento adaptado a vuestro tamaño, presupuesto y prioridades. Puede empezar con algo concreto y crecer poco a poco."},{title:"Implementación acompañada",description:"Llevamos a cabo las acciones contigo: contenidos, sesiones, comunidad, formación. Os acompañamos en la coordinación y en la comunicación con los colegiados."},{title:"Seguimiento y evolución",description:"Revisamos lo que está funcionando, ajustamos lo que conviene y ampliamos a nuevos formatos cuando tiene sentido. Una relación que crece con vosotros."}],servBadge:"Cómo os ayudamos",servTitle1:"Lo que ponemos a disposición de vuestro",servTitleAccent:"colegio",servIntro:"Más que servicios sueltos, son piezas que se combinan para ampliar el valor del c
827olegio y abrir nuevas formas de relación con vuestros colegiados.",servicios:[{icon:Ss,title:"Conferencias y encuentros para colegiados",description:"Sesiones presenciales y online sobre longevidad, planificación vital, salud, propósito y nuevas etapas profesionales. Adaptadas al perfil de vuestros colegiados.",outcome:"Una nueva razón para acudir al colegio."},{icon:Fa,title:"Programas formativos sobre envejecimiento inteligente",description:"Itinerarios formativos basados en los 9 pilares del Smart Ageing, pensados para que los profesionales acompañen mejor a sus propios clientes y a sà mismos.",outcome:"Una formación diferencial que el colegio puede ofrecer en exclusiva."},{icon:Ww,title:"Clubs de Mejor Longevidad",description:"Comunidades activas de colegiados que se reúnen para compartir experiencias, aprender entre pares y construir respuestas a los retos de una vida más larga.",outcome:"Una comunidad viva alrededor del colegio, más allá de las cuotas."},{icon:$o,title:"Contenidos y recursos para vuestros colegiados",description:"Webinarios, materiales y recursos prácticos que el colegio puede ofrecer como ventaja exclusiva, sin tener que producirlos internamente.",outcome:"Más valor percibido sin sobrecargar a vuestro equipo."},{icon:Es,title:"Acompañamiento estratégico al colegio",description:"Apoyo a la junta y al equipo para integrar la longevidad en el plan estratég
827ico, en la oferta de servicios y en la comunicación con los colegiados.",outcome:"Una hoja de ruta clara, no acciones aisladas."}],cambiaBadge:"Qué cambia",cambiaTitle1:"Lo que notaréis en el dÃa a dÃa del",cambiaTitleAccent:"colegio",cambiaIntro:"Más que un cuadro de indicadores, lo que solemos escuchar después de un tiempo trabajando juntos es esto:",cambiaItems:["Más actividad y más participación de colegiados que antes no aparecÃan.","Conversaciones nuevas dentro del colegio sobre el futuro de la profesión y de quienes la ejercen.","Servicios concretos que diferencian al colegio frente a otros del sector.","Una relación más cercana y continuada con los colegiados, no solo en momentos puntuales.","Un equipo del colegio que se siente acompañado y con más recursos para innovar."],difBadge:"En qué nos diferenciamos",difTitle:"Esto no es formación tradicional ni consultorÃa genérica",difIntro:"Es un enfoque especÃfico, pensado desde el primer dÃa para colegios profesionales que quieren responder a la realidad de una sociedad longeva.",difNot:["No es un catálogo de cursos sueltos.","No es una consultorÃa genérica que aplica el mismo modelo a cualquier sector.","No es un programa de bienestar al uso."],difYes:"Es una mirada propia sobre cómo el colegio puede convertirse en un referente para sus colegiados a lo largo de toda su vida profesional, en un mundo donde vivir más años cambia las reglas.",finalBadge:"Cómo empezar",finalTitle:"Empecemos por una conversación",finalSub1:"El primer paso es sencillo: una conversación de unos 30 minutos para conocernos, entender vuestro colegio y ver si tiene sentido seguir explorando juntos.",finalSub2:"Sin presentaciones cerradas, sin presión comercial. Si encaja, seguimos. Si no, seguro que nos llevamos buenas ideas mutuas.",finalCta:"Solicitar una conversación inicial",finalNote:"Os respondemos personalmente en menos de 48 horas laborables."},en:{badge:"For professional associations",heroTitle1:"We help your association stay",heroTitleAccent:"relevant",heroTitle2:"in a society that lives longer",heroSub:"We help you design new services, communities, and programmes that connect with your members at every stage of their professional life. No generic recipes: a specific approach for associations that want to adapt to longevity.",ctaPrimary:"Let's talk, no commitment",ctaSecondary:"See how we work",situacionBadge:"The starting point",situacionTitle:"What many associations tell us",situacionIntro:"These are not urgent problems, but they are questions that come up more and more often in board meetings and conversations with members.",situacionItems:[{title:"How to remain relevant",description:"Members expect more than fees and traditional services. They want the association to add meaning throughout their entire career, not just at the beginning."},{title:"How to support every professional stage",description:"The needs of a 30-year-old member are not those of a 55- or 70-year-old. Longevity multiplies the life and professional stages an association wants to serve."},{title:"How to create new services that make sense",description:"There is appetite to innovate, but it is not always easy to know where to start, what topics to address, and how to connect with members who already have plenty of information."}],oportunidadBadge:"A shift in perspective",oportunidadTitle1:"Longevity is not a problem, it is an",oportunidadTitleAccent:"opportunity",oportunidadIntro:"A longer-living society opens a new space for associations willing to step into it. Not by adding more activities, but by expanding the role of the association in the lives of its members.",oportunidadItems:[{icon:Lo,title:"New lines of activity",description:"Programmes, communities, and training that open conversations the association did not have before with its members."},{icon:vn,title:"Services for every career stage",description:"Proposals designed for those starting out, those in full professional maturity, and those approaching a new life stage."},{icon:Uw,title:"Stronger connection with members",description:"Spaces to share experiences and learn from peers, strengthening the bond with the institution."},{icon:uc,title:"Differential positioning",description:"An association that takes care of its members' longevity naturally stands out as a reference in the sector."}
827],comoBadge:"How we work",comoTitle1:"A simple collaboration,",comoTitleAccent:"at your own pace",comoIntro:"We do not impose a closed model. We listen to what you are already doing, understand your context, and build with you what fits your association best.",comoSteps:[{title:"A first conversation",description:"An initial meeting to get to know you, understand your association, your concerns, and where you see opportunities. No cold sales pitches."},{title:"A tailored proposal",description:"We design together an approach adapted to your size, budget, and priorities. It can start with something concrete and grow gradually."},{title:"Hands-on implementation",description:"We carry out the actions with you: content, sessions, community, training. We support coordination and communication with members."},{title:"Follow-up and evolution",description:"We review what is working, adjust what needs adjusting, and expand into new formats when it makes sense. A relationship that grows with you."}],servBadge:"How we help",servTitle1:"What we bring to your",servTitleAccent:"association",servIntro:"More than isolated services, these are pieces that combine to expand the value of the association and open new ways to connect with your members.",servicios:[{icon:Ss,title:"Conferences and gatherings for members",description:"In-person and online sessions on longevity, life planning, health, purpose, and new professional stages. Tailored to your members' profiles.",outcome:"A new reason for members to engage with the association."},{icon:Fa,title:"Training programmes on smart ageing",description:"Learning paths based on the 9 pillars of Smart Ageing, designed to help professionals better support their own clients and themselves.",outcome:"A differential training that the association can offer exclusively."},{icon:Ww,title:"Better Longevity Clubs",description:"Active communities of members meeting to share experiences, learn from peers, and build answers to the challenges of a longer life.",outcome:"A living community around the association, beyond the membership fee."},{icon:$o,title:"Content and resources for your members",description:"Webinars, materials, and practical resources that the association can offer as an exclusive advantage, without producing them internally.",outcome:"More perceived value without overloading your team."},{icon:Es,title:"Strategic support for the association",description:"Support for the board and team to integrate longevity into the strategic plan, the service offering, and member communication.",outcome:"A clear roadmap, not isolated actions."}],cambiaBadge:"What changes",cambiaTitle1:"What you will notice in the day-to-day of your",camb
827iaTitleAccent:"association",cambiaIntro:"More than a dashboard of indicators, this is what we usually hear after some time working together:",cambiaItems:["More activity and participation from members who were not engaging before.","New conversations within the association about the future of the profession.","Concrete services that set the association apart from others in the sector.","A closer, more continuous relationship with members, beyond one-off moments.","An association team that feels supported and better equipped to innovate."],difBadge:"What sets us apart",difTitle:"This is not traditional training or generic consulting",difIntro:"It is a specific approach, designed from day one for professional associations that want to respond to the reality of a longer-living society.",difNot:["It is not a catalogue of stand-alone courses.","It is not generic consulting applying the same model to any sector.","It is not a standard wellbeing programme."],difYes:"It is a unique perspective on how an association can become a reference for its members throughout their entire professional life, in a world where living longer changes the rules.",finalBadge:"How to start",finalTitle:"Let's start with a conversation",finalSub1:"The first step is simple: a 30-minute conversation to get to know each other, understand your association, and see whether it makes sense to keep exploring together.",finalSub2:"No closed presentations, no sales pressure. If it fits, we move forward. If not, we are sure we will both walk away with good ideas.",finalCta:"Request an initial conversation",finalNote:"We reply personally within 48 working hours."},fr:{badge:"Pour les ordres professionnels",heroTitle1:"Nous aidons votre ordre à rester",heroTitleAccent:"pertinent",heroTitle2:"dans une société qui vit plus longtemps",heroSub:"Nous vous aidons à concevoir de nouveaux services, communautés et programmes qui touchent vos membres à chaque étape de leur vie professionnelle. Pas de recettes génériques : une approche spécifique pour les ordres qui veulent s'adapter à la longévité.",ctaPrimary:"Discutons sans engagement",ctaSecondary:"Voir comment nous travaillons",situacionBadge:"Le point de départ",situacionTitle:"Ce que de nombreux ordres nous disent",situacionIntro:"Ce ne sont pas des problèmes urgents, mais des questions qui reviennent de plus en plus dans les conseils d'administration et dans les échanges avec les membres.",situacionItems:[{title:"Comment rester pertinents",description:"Les membres attendent plus que la cotisation et les services traditionnels. Ils veulent que l'ordre apporte du sens tout au long de leur parcours, et pas seulement au début."},{title:"Comment accompagner toutes les étapes professionnelles",description:"Les besoins d'un membre de 30 ans ne sont pas ceux d'un membre de 55 ou 70 ans. La longévité multiplie les étapes de vie et de carrière à accompagner."},{title:"Comment créer de nouveaux services qui ont du sens",description:"Il y a une vraie envie d'innover, mais il n'est pas toujours facile de savoir par où commencer ni comment toucher des membres déjà très bien informés."}],oportunidadBadge:"Un changement de regard",oportunidadTitle1:"La longévité n'est pas un problème, c'est une",oportunidadTitleAccent:"opportunité",oportunidadIntro:"Une société qui vit plus longtemps ouvre un nouvel espace pour les ordres qui veulent l'occuper. Pas en multipliant les activités, mais en élargissant le rôle de l'ordre dans la vie de ses membres.",oportunidadItems:[{icon:Lo,title:"De nouvelles lignes d'activité",description:"Des programmes, communautés et formations qui ouvrent des conversations que l'ordre n'avait pas auparavant avec ses membres."},{icon:vn,title:"Des services pour chaque étape professionnelle",description:"Des propositions pensées pour celles et ceux qui débutent, qui sont en pleine maturité ou qui abordent une nouvelle étape de vie."},{icon:Uw,title:"Un lien plus fort avec les membres",description:"Des espaces pour partager des expériences et apprendre entre pairs, qui renforcent le lien avec l'institution."},{icon:uc,title:"Un positionnement différenciant",description:"Un ordre qui se préoccupe de la longévité de ses membres devient naturellement une référence dans son secteur."}
827],comoBadge:"Comment nous travaillons",comoTitle1:"Une collaboration simple,",comoTitleAccent:"à votre rythme",comoIntro:"Nous n'imposons pas de modèle fermé. Nous écoutons ce que vous faites déjà , comprenons votre contexte et construisons avec vous ce qui convient le mieux à votre ordre.",comoSteps:[{title:"Une première conversation",description:"Une réunion initiale pour vous découvrir, comprendre votre ordre, vos préoccupations et les opportunités que vous identifiez. Sans démarche commerciale froide."},{title:"Une proposition sur mesure",description:"Nous concevons ensemble une approche adaptée à votre taille, à votre budget et à vos priorités. Elle peut commencer petit et grandir progressivement."},{title:"Une mise en Åuvre accompagnée",description:"Nous menons les actions avec vous : contenus, sessions, communauté, formation. Nous accompagnons la coordination et la communication auprès des membres."},{title:"Un suivi et une évolution",description:"Nous revoyons ce qui fonctionne, ajustons ce qui doit l'être et étendons à de nouveaux formats quand cela a du sens. Une relation qui grandit avec vous."}],servBadge:"Comment nous vous aidons",servTitle1:"Ce que nous mettons à disposition de votre",servTitleAccent:"ordre",servIntro:"Plus que des services isolés, ce sont des éléments qui se combinent pour élargir la valeur de l'ordre et ouvrir de nouvelles façons d'être en relation avec vos membres.",servicios:[{icon:Ss,title:"Conférences et rencontres pour les membres",description:"Sessions présentielles et en ligne sur la longévité, la planification de vie, la santé, le sens et les nouvelles étapes professionnelles. Adaptées au profil de vos membres.",outcome:"Une nouvelle raison de s'investir dans l'ordre."},{icon:Fa,title:"Programmes de formation sur le vieillissement intelligent",description:"Parcours de formation fondés sur les 9 piliers du Smart Ageing, pour aider les professionnels à mieux accompagner leurs clients et eux-mêmes.",outcome:"Une formation différenciante que l'ordre peut proposer en exclusivité."},{icon:Ww,title:"Clubs de Meilleure Longévité",description:"Communautés actives de membres qui se réunissent pour partager des expériences, apprendre entre pairs et construire des réponses aux défis d'une vie plus longue.",outcome:"Une communauté vivante autour de l'ordre, au-delà de la cotisation."},{icon:$o,title:"Contenus et ressources pour vos membres",description:"Webinaires, matériaux et ressources pratiques que l'ordre peut proposer comme avantage exclusif, sans avoir à les produire en interne.",outcome:"Plus de valeur perçue sans surcharger votre équipe."},{icon:Es,title:"Accompagnement stratégique de l'ordre",description:"Soutien au conseil et à l'équipe pour intégrer la longévité dans le plan stratégique, l'offre de services et la communication aux membres.",outcome:"Une feuille de route claire, pas des actions isolées."}],cambiaBadge:"Ce qui change",cambiaTitle1:"Ce que vous remarquerez au quotidien dans votre",cambiaTitleAccent:"ordre",cambiaIntro:"Plus qu'un tableau d'indicateurs, voici ce que nous entendons généralement après un certain temps de collaboration :",cambiaItems:["Plus d'activité et plus de participation de membres qui n'étaient pas présents auparavant.","De nouvelles conversations au sein de l'ordre sur l'avenir de la profession.","Des services concrets qui distinguent l'ordre des autres du secteur.","Une relation plus proche et continue avec les membres, au-delà des moments ponctuels.","Une équipe de l'ordre qui se sent accompagnée et mieux outillée pour innover."],difBadge:"Ce qui nous distingue",difTitle:"Ce n'est ni de la formation traditionnelle, ni du conseil générique",difIntro:"C'est une approche spécifique, pensée dès le départ pour les ordres professionnels qui veulent répondre à la réalité d'une société plus longévive.",difNot:["Ce n'est pas un catalogue de cours isolés.","Ce n'est pas un conseil générique appliquant le même modèle à n'importe quel secteur.","Ce n'est pas un programme de bien-être classique."],difYes:"C'est un regard propre sur la façon dont un ordre peut devenir une référence pour ses membres tout au long de leur vie professionnelle, dans un monde où vivre plus longtemps change les règles.",finalBadge:"Comment commencer",finalTitle:"Commençons par une conversation",finalSub1:"La première
827étape est simple : une conversation d'environ 30 minutes pour faire connaissance, comprendre votre ordre et voir si cela a du sens d'aller plus loin ensemble.",finalSub2:"Pas de présentations toutes faites, pas de pression commerciale. Si cela correspond, nous continuons. Sinon, nous repartirons à coup sûr avec de bonnes idées partagées.",finalCta:"Demander une première conversation",finalNote:"Nous vous répondons personnellement sous 48 heures ouvrées."}},sLe=()=>{const{lang:t}=Zt(),e=oLe[t];return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(Xt,{}),u.jsxs("main",{children:[u.jsxs("section",{className:"pt-28 md:pt-36 pb-16 md:pb-24 bg-gradient-section relative overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 to-transparent pointer-events-none"}),u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative",children:u.jsxs("div",{className:"max-w-3xl",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-6",children:e.badge}),u.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-foreground mb-6 leading-tight",children:[e.heroTitle1," ",u.jsx("span",{className:"text-gradient",children:e.heroTitleAccent})," ",e.heroTitle2]}),u.jsx("p",{className:"text-xl text-muted-foreground leading-relaxed mb-8",children:e.heroSub}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl bg-gradient-hero text-primary-foreground font-semibold shadow-lg transition-all duration-300 hover:shadow-glow hover:-translate-y-1",children:[e.ctaPrimary,u.jsx(st,{className:"w-5 h-5"})]}),u.jsx("a",{href:"#como-trabajamos",className:"inline-flex items-center justify-center gap-2 h-14 px-8 rounded-xl border-2 border-border bg-card text-foreground font-semibold transition-all duration-300 hover:border-primary hover:text-primary",children:e.ctaSecondary})]})]})})]}),u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:e.situacionBadge}),u.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:e.situacionTitle}),u.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:e.situacionIntro})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-6 lg:gap-8 max-w-6xl mx-auto",children:e.situacionItems.map(n=>u.jsxs("div",{className:"bg-card rounded-2xl p-7 border border-border/50 transition-all duration-300 hover:shadow-lg hover:border-primary/30",children:[u.jsx("h3",{className:"text-lg font-bold text-foreground mb-3",children:n.title}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n.description})]},n.title))})]})}),u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:e.oportunidadBadge}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:[e.oportunidadTitle1," ",u.jsx("span",{className:"text-gradient",children:e.oportunidadTitleAccent})]}),u.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:e.oportunidadIntro})]}),u.jsx("div",{className:"grid md:grid-cols-2 gap-6 lg:gap-8 max-w-5xl mx-auto",children:e.oportunidadItems.map(n=>u.jsxs("div",{className:"bg-card rounded-2xl p-7 border border-border/50 transition-all duration-300 hover:shadow-lg hover:border-primary/30",children:[u.jsx("div",{className:"w-14 h-14 rounded-xl bg-accent flex items-center justify-center mb-4",children:u.jsx(n.icon,{className:"w-7 h-7 text-accent-foreground"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-2",children:n.title}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n.description})]},n.title))})]})}),u.jsx("section",{id:"como-trabajamos",className:"py-16 md:py-24 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:e.comoBadge}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:[e.comoTitle1," ",u.jsx("span",{className:"text-gradient",children:e.comoTitleAccent})]}),u.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:e.comoIntro})]}),u.jsx("div",{className:"max-w-4xl mx-auto",children:u.jsx("ol",{className:"relative space-y-6 md:space-y-8",children:e.comoSteps.map((n,r)=>u.jsxs("li",{className:"group flex items-start gap-5 bg-card rounded-2xl p-6 md:p-7 border border-border/50 transition-all duration-300 hover:shadow-md hover:border-primary/30",children:[u.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-xl bg-accent flex items-center justify-center text-base font-bold text-accent-foreground group-hover:bg-primary group-hover:text-primary-foreground transition-all duration-300",children:r+1}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-bold text-foreground text-lg group-hover:text-primary transition-colors duration-300",children:n.title}),u.jsx("p",{className:"text-muted-foreground mt-1.5 leading-relaxed",children:n.description})]})]},n.title))})})]})}),u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",children:u.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:e.servBadge}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:[e.servTitle1," ",u.jsx("span",{className:"text-gradient",children:e.servTitleAccent})]}),u.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:e.servIntro})]}),u.jsx("div",{className:"grid md:grid-cols-2 gap-6 lg:gap-8 max-w-6xl mx-auto",children:e.servicios.map(n=>u.jsxs("div",{className:"bg-card rounded-2xl p-7 border border-border/50 transition-all duration-300 hover:shadow-lg hover:border-primary/30 flex flex-col",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-accent flex items-center justify-center mb-4",children:u.jsx(n.icon,{className:"w-6 h-6 text-accent-foreground"})}),u.jsx("h3",{className:"text-lg font-bold text-foreground mb-2",children:n.title}),u.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4 flex-1",children:n.description}),u.jsx("div",{className:"pt-4 border-t border-border/60",children:u.jsxs("p",{className:"text-sm text-foreground
827/80 italic",children:["â ",n.outcome]})})]},n.title))})]})}),u.jsx("section",{className:"py-16 md:py-24 bg-background",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-10",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:e.cambiaBadge}),u.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:[e.cambiaTitle1," ",u.jsx("span",{className:"text-gradient",children:e.cambiaTitleAccent})]}),u.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:e.cambiaIntro})]}),u.jsx("ul",{className:"space-y-4",children:e.cambiaItems.map((n,r)=>u.jsxs("li",{className:"flex items-start gap-4 bg-card rounded-xl p-5 border border-border/50",children:[u.jsx(lc,{className:"w-6 h-6 text-primary flex-shrink-0 mt-0.5"}),u.jsx("span",{className:"text-foreground leading-relaxed",children:n})]},r))})]})})}),u.jsx("section",{className:"py-16 md:py-24 bg-gradient-section",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-10",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-accent text-accent-foreground text-sm font-medium mb-4",children:e.difBadge}),u.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-6",children:e.difTitle}),u.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:e.difIntro})]}),u.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[u.jsx("div",{className:"bg-card rounded-2xl p-7 border border-border/50",children:u.jsx("ul",{className:"space-y-3",children:e.difNot.map(n=>u.jsxs("li",{className:"flex items-start gap-3 text-muted-foreground",children:[u.jsx("span",{className:"text-destructive flex-shrink-0 mt-0.5",children:"â"}),u.jsx("span",{children:n})]},n))})}),u.jsx("div",{className:"bg-card rounded-2xl p-7 border border-primary/30 shadow-md",children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(uc,{className:"w-6 h-6 text-primary flex-shrink-0 mt-0.5"}),u.jsx("p",{className:"text-foreground leading-relaxed font-medium",children:e.difYes})]})})]})]})})}),u.jsx(UN,{}),u.jsx("section",{className:"py-16 md:py-20 bg-foreground",children:u.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[u.jsx("div",{className:"w-14 h-14 rounded-xl bg-background shadow-md flex items-center justify-center mx-auto mb-6",children:u.jsx(qa,{className:"w-7 h-7 text-primary"})}),u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-background/15 text-primary-foreground text-sm font-medium mb-6",children:e.finalBadge}),u.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-primary-foreground mb-6",children:e.finalTitle}),u.jsx("p",{className:"text-lg text-primary-foreground/80 mb-4 leading-relaxed",children:e.finalSub1}),u.jsx("p",{className:"text-primary-foreground/70 mb-8 leading-relaxed",children:e.finalSub2}),u.jsxs(De,{to:"/contactanos",className:"inline-flex items-center justify-center gap-2 h-14 px-10 rounded-xl bg-gradient-hero text-primary-foreground font-semibold shadow-lg transition-all duration-300 hover:shadow-glow hover:-translate-y-1",children:[e.finalCta,u.jsx(st,{className:"w-5 h-5"})]}),u.jsx("p",{className:"text-primary-foreground/60 text-sm mt-6",children:e.finalNote})]})})})]}),u.jsx(Qt,{})]})},aLe=()=>{const t=dl();return E.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:u.jsxs("div",{className:"text-center",children:[u.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),u.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),u.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},lLe=new nX,cLe=()=>u.jsx(iX,{client:lLe,children:u.jsx(lQ,{children:u.jsxs(F5,{children:[u.jsx(uG,{}),u.jsx(qG,{}),u.jsxs(tQ,{children:[u.jsx(cQ,{}),u.jsxs(GX,{children:[u.jsx(wt,{path:"/",element:u.jsx(vQ,{})}),u.jsx(wt,{path:"/sobre-nosotros",element:u.jsx(xQ,{})}),u.jsx(wt,{path:"/soluciones",element:u.jsx(SQ,{})}),u.jsx(wt,{path:"/metodo",element:u.jsx(_Q,{})}),u.jsx(wt,{path:"/beneficios",element:u.jsx(NQ,{})}),u.jsx(wt,{path:"/planes",element:u.jsx(OQ,{})}),u.jsx(wt,{path:"/academia",element:u.jsx(PQ,{})}),u.jsx(wt,{path:"/eventos",element:u.jsx(IQ,{})}),u.jsx(wt,{path:"/actualidad",element:u.jsx(vte,{})}),u.jsx(wt,{path:"/actualidad/:slug",element:u.jsx(Fte,{})}),u.jsx(wt,{path:"/admin/blog",element:u.jsx(Ade,{})}),u.jsx(wt,{path:"/admin/login",element:u.jsx(Nde,{})}),u.jsx(wt,{path:"/empresas",element:u.jsx(tLe,{})}),u.jsx(wt,{path:"/administraciones-publicas",element:u.jsx(iLe,{})}),u.jsx(wt,{path:"/colegios-profesionales",element:u.jsx(sLe,{})}),u.jsx(wt,{path:"/aviso-legal",element:u.jsx(Cde,{})}),u.jsx(wt,{path:"/politica-de-privacidad",element:u.jsx(Ode,{})}
827),u.jsx(wt,{path:"/politica-de-cookies",element:u.jsx(Pde,{})}),u.jsx(wt,{path:"/libro-acceso",element:u.jsx(Ife,{})}),u.jsx(wt,{path:"/libro",element:u.jsx(Ide,{})}),u.jsx(wt,{path:"/contactanos",element:u.jsx($fe,{})}),u.jsx(wt,{path:"/clubs",element:u.jsx(qfe,{})}),u.jsx(wt,{path:"/blog",element:u.jsx(WO,{to:"/actualidad",replace:!0})}),u.jsx(wt,{path:"/blog/:slug",element:u.jsx(WO,{to:"/actualidad",replace:!0})}),u.jsx(wt,{path:"*",element:u.jsx(aLe,{})})]}),u.jsx(uQ,{})]})]})})});m3(document.getElementById("root")).render(u.jsx(cLe,{}));
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.