PageSourceSearch

https://abba-renaissance-landing.lovable.app/assets/index-DvNMir6c.js

js abba-renaissance-landing.lovable.app collected 2026-10-03 03:17:57 UTC 1,079,138 bytes, 1,034 lines download raw bytes

vendor: 5,808 bytes, lines 1-9
1var Ry=e=>{throw TypeError(e)};var Zh=(e,t,n)=>t.has(e)||Ry("Cannot "+n);var D=(e,t,n)=>(Zh(e,t,"read from private field"),n?n.call(e):t.get(e)),ye=(e,t,n)=>t.has(e)?Ry("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ae=(e,t,n,r)=>(Zh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Re=(e,t,n)=>(Zh(e,t,"access private method"),n);var Zc=(e,t,n,r)=>({set _(i){ae(e,t,i,n)},get _(){return D(e,t,r)}});function VE(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).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 WE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nw={exports:{}},Md={},Cw={exports:{}},Le={};/**
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 pc=Symbol.for("react.element"),HE=Symbol.for("react.portal"),GE=Symbol.for("react.fragment"),KE=Symbol.for("react.strict_mode"),ZE=Symbol.for("react.profiler"),QE=Symbol.for("react.provider"),YE=Symbol.for("react.context"),JE=Symbol.for("react.forward_ref"),XE=Symbol.for("react.suspense"),eT=Symbol.for("react.memo"),tT=Symbol.for("react.lazy"),Iy=Symbol.iterator;function nT(e){return e===null||typeof e!="object"?null:(e=Iy&&e[Iy]||e["@@iterator"],typeof e=="function"?e:null)}var Ew={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Tw=Object.assign,kw={};function Ta(e,t,n){this.props=e,this.context=t,this.refs=kw,this.updater=n||Ew}Ta.prototype.isReactComponent={};Ta.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ta.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pw(){}Pw.prototype=Ta.prototype;function Dp(e,t,n){this.props=e,this.context=t,this.refs=kw,this.updater=n||Ew}var Fp=Dp.prototype=new Pw;Fp.constructor=Dp;Tw(Fp,Ta.prototype);Fp.isPureReactComponent=!0;var Ly=Array.isArray,Aw=Object.prototype.hasOwnProperty,Bp={current:null},Ow={key:!0,ref:!0,__self:!0,__source:!0};function Rw(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)Aw.call(t,r)&&!Ow.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){for(var d=Array(u),f=0;f<u;f++)d[f]=arguments[f+2];i.children=d}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)i[r]===void 0&&(i[r]=u[r]);return{$$typeof:pc,type:e,key:o,ref:l,props:i,_owner:Bp.current}}function rT(e,t){return{$$typeof:pc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function $p(e){return typeof e=="object"&&e!==null&&e.$$typeof===pc}function iT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var zy=/\/+/g;function Qh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?iT(""+e.key):t.toString(36)}function Eu(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case pc:case HE:l=!0}}if(l)return l=e,i=i(l),e=r===""?"."+Qh(l,0):r,Ly(i)?(n="",e!=null&&(n=e.replace(zy,"$&/")+"/"),Eu(i,t,n,"",function(f){return f})):i!=null&&($p(i)&&(i=rT(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(zy,"$&/")+"/")+e)),t.push(i)),1;if(l=0,r=r===""?".":r+":",Ly(e))for(var u=0;u<e.length;u++){o=e[u];var d=r+Qh(o,u);l+=Eu(o,t,n,d,i)}else if(d=nT(e),typeof d=="function")for(e=d.call(e),u=0;!(o=e.next()).done;)o=o.value,d=r+Qh(o,u++),l+=Eu(o,t,n,d,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function Qc(e,t,n){if(e==null)return e;var r=[],i=0;return Eu(e,r,"","",function(o){return t.call(n,o,i++)}),r}function sT(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Yt={current:null},Tu={transition:null},oT={ReactCurrentDispatcher:Yt,ReactCurrentBatchConfig:Tu,ReactCurrentOwner:Bp};function Iw(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,403 bytes, lines 9-25
9Le.Children={map:Qc,forEach:function(e,t,n){Qc(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Qc(e,function(){t++}),t},toArray:function(e){return Qc(e,function(t){return t})||[]},only:function(e){if(!$p(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Le.Component=Ta;Le.Fragment=GE;Le.Profiler=ZE;Le.PureComponent=Dp;Le.StrictMode=KE;Le.Suspense=XE;Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oT;Le.act=Iw;Le.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Tw({},e.props),i=e.key,o=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,l=Bp.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(d in t)Aw.call(t,d)&&!Ow.hasOwnProperty(d)&&(r[d]=t[d]===void 0&&u!==void 0?u[d]:t[d])}var d=arguments.length-2;if(d===1)r.children=n;else if(1<d){u=Array(d);for(var f=0;f<d;f++)u[f]=arguments[f+2];r.children=u}return{$$typeof:pc,type:e.type,key:i,ref:o,props:r,_owner:l}};Le.createContext=function(e){return e={$$typeof:YE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:QE,_context:e},e.Consumer=e};Le.createElement=Rw;Le.createFactory=function(e){var t=Rw.bind(null,e);return t.type=e,t};Le.createRef=function(){return{current:null}};Le.forwardRef=function(e){return{$$typeof:JE,render:e}};Le.isValidElement=$p;Le.lazy=function(e){return{$$typeof:tT,_payload:{_status:-1,_result:e},_init:sT}};Le.memo=function(e,t){return{$$typeof:eT,type:e,compare:t===void 0?null:t}};Le.startTransition=function(e){var t=Tu.transition;Tu.transition={};try{e()}finally{Tu.transition=t}};Le.unstable_act=Iw;Le.useCallback=function(e,t){return Yt.current.useCallback(e,t)};Le.useContext=function(e){return Yt.current.useContext(e)};Le.useDebugValue=function(){};Le.useDeferredValue=function(e){return Yt.current.useDeferredValue(e)};Le.useEffect=function(e,t){return Yt.current.useEffect(e,t)};Le.useId=function(){return Yt.current.useId()};Le.useImperativeHandle=function(e,t,n){return Yt.current.useImperativeHandle(e,t,n)};Le.useInsertionEffect=function(e,t){return Yt.current.useInsertionEffect(e,t)};Le.useLayoutEffect=function(e,t){return Yt.current.useLayoutEffect(e,t)};Le.useMemo=function(e,t){return Yt.current.useMemo(e,t)};Le.useReducer=function(e,t,n){return Yt.current.useReducer(e,t,n)};Le.useRef=function(e){return Yt.current.useRef(e)};Le.useState=function(e){return Yt.current.useState(e)};Le.useSyncExternalStore=function(e,t,n){return Yt.current.useSyncExternalStore(e,t,n)};Le.useTransition=function(){return Yt.current.useTransition()};Le.version="18.3.1";Cw.exports=Le;var x=Cw.exports;const ne=Mp(x),Lw=VE({__proto__:null,default:ne},[x]);/**
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 aT=x,lT=Symbol.for("react.element"),cT=Symbol.for("react.fragment"),uT=Object.prototype.hasOwnProperty,dT=aT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hT={key:!0,ref:!0,__self:!0,__source:!0};function zw(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)uT.call(t,r)&&!hT.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:lT,type:e,key:o,ref:l,props:i,_owner:dT.current}}Md.Fragment=cT;Md.jsx=zw;Md.jsxs=zw;Nw.exports=Md;var a=Nw.exports,Mw={exports:{}},wn={},Dw={exports:{}},Fw={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(F,K){var H=F.length;F.push(K);e:for(;0<H;){var Z=H-1>>>1,ee=F[Z];if(0<i(ee,K))F[Z]=K,F[H]=ee,H=Z;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var K=F[0],H=F.pop();if(H!==K){F[0]=H;e:for(var Z=0,ee=F.length,ue=ee>>>1;Z<ue;){var V=2*(Z+1)-1,z=F[V],W=V+1,te=F[W];if(0>i(z,H))W<ee&&0>i(te,z)?(F[Z]=te,F[W]=H,Z=W):(F[Z]=z,F[V]=H,Z=V);else if(W<ee&&0>i(te,H))F[Z]=te,F[W]=H,Z=W;else break e}}return K}function i(F,K){var H=F.sortIndex-K.sortIndex;return H!==0?H:F.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],p=1,m=null,g=3,y=!1,w=!1,b=!1,C=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(F){for(var K=n(f);K!==null;){if(K.callback===null)r(f);else if(K.startTime<=F)r(f),K.sortIndex=K.expirationTime,t(d,K);else break;K=n(f)}}function A(F){if(b=!1,N(F),!w)if(n(d)!==null)w=!0,Y(k);else{var K=n(f);K!==null&&le(A,K.startTime-F)}}function k(F,K){w=!1,b&&(b=!1,j(P),P=-1),y=!0;var H=g;
vendor: 9,260 bytes, lines 25-34
25try{for(N(K),m=n(d);m!==null&&(!(m.expirationTime>K)||F&&!B());){var Z=m.callback;if(typeof Z=="function"){m.callback=null,g=m.priorityLevel;var ee=Z(m.expirationTime<=K);K=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),N(K)}else r(d);m=n(d)}if(m!==null)var ue=!0;else{var V=n(f);V!==null&&le(A,V.startTime-K),ue=!1}return ue}finally{m=null,g=H,y=!1}}var T=!1,R=null,P=-1,I=5,O=-1;function B(){return!(e.unstable_now()-O<I)}function U(){if(R!==null){var F=e.unstable_now();O=F;var K=!0;try{K=R(!0,F)}finally{K?ie():(T=!1,R=null)}}else T=!1}var ie;if(typeof _=="function")ie=function(){_(U)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,se=G.port2;G.port1.onmessage=U,ie=function(){se.postMessage(null)}}else ie=function(){C(U,0)};function Y(F){R=F,T||(T=!0,ie())}function le(F,K){P=C(function(){F(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,Y(k))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var K=3;break;default:K=g}var H=g;g=K;try{return F()}finally{g=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,K){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var H=g;g=F;try{return K()}finally{g=H}},e.unstable_scheduleCallback=function(F,K,H){var Z=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?Z+H:Z):H=Z,F){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=H+ee,F={id:p++,callback:K,priorityLevel:F,startTime:H,expirationTime:ee,sortIndex:-1},H>Z?(F.sortIndex=H,t(f,F),n(d)===null&&F===n(f)&&(b?(j(P),P=-1):b=!0,le(A,H-Z))):(F.sortIndex=ee,t(d,F),w||y||(w=!0,Y(k))),F},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(F){var K=g;return function(){var H=g;g=K;try{return F.apply(this,arguments)}finally{g=H}}}})(Fw);Dw.exports=Fw;var fT=Dw.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 mT=x,bn=fT;function J(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Bw=new Set,Rl={};function Ds(e,t){ta(e,t),ta(e+"Capture",t)}function ta(e,t){for(Rl[e]=t,e=0;e<t.length;e++)Bw.add(t[e])}var Vr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qf=Object.prototype.hasOwnProperty,pT=/^[: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]*$/,My={},Dy={};function gT(e){return Qf.call(Dy,e)?!0:Qf.call(My,e)?!1:pT.test(e)?Dy[e]=!0:(My[e]=!0,!1)}function vT(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function yT(e,t,n,r){if(t===null||typeof t>"u"||vT(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Jt(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var Mt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mt[e]=new Jt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mt[t]=new Jt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mt[e]=new Jt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mt[e]=new Jt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mt[e]=new Jt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mt[e]=new Jt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mt[e]=new Jt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mt[e]=new Jt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mt[e]=new Jt(e,5,!1,e.toLowerCase(),null,!1,!1)});var qp=/[\-:]([a-z])/g;function Up(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(qp,Up);Mt[t]=new Jt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(qp,Up);Mt[t]=new Jt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(qp,Up);Mt[t]=new Jt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mt[e]=new Jt(e,1,!1,e.toLowerCase(),null,!1,!1)});Mt.xlinkHref=new Jt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mt[e]=new Jt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vp(e,t,n,r){var i=Mt.hasOwnProperty(t)?Mt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(yT(t,n,i,r)&&(n=null),r||i===null?gT(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Yr=mT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Yc=Symbol.for("react.element"),go=Symbol.for("react.portal"),vo=Symbol.for("react.fragment"),Wp=Symbol.for("react.strict_mode"),Yf=Symbol.for("react.profiler"),$w=Symbol.for("react.provider"),qw=Symbol.for("react.context"),Hp=Symbol.for("react.forward_ref"),Jf=Symbol.for("react.suspense"),Xf=Symbol.for("react.suspense_list"),Gp=Symbol.for("react.memo"),di=Symbol.for("react.lazy"),Uw=Symbol.for("react.offscreen"),Fy=Symbol.iterator;function nl(e){return e===null||typeof e!="object"?null:(e=Fy&&e[Fy]||e["@@iterator"],typeof e=="function"?e:null)}var lt=Object.assign,Yh;function hl(e){if(Yh===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Yh=t&&t[1]||""}return`
34`+Yh+e}var Jh=!1;function Xh(e,t){if(!e||Jh)return"";Jh=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}
vendor: 4,111 bytes, lines 34-37
34catch(f){if(f&&r&&typeof f.stack=="string"){for(var i=f.stack.split(`
35`),o=r.stack.split(`
36`),l=i.length-1,u=o.length-1;1<=l&&0<=u&&i[l]!==o[u];)u--;for(;1<=l&&0<=u;l--,u--)if(i[l]!==o[u]){if(l!==1||u!==1)do if(l--,u--,0>u||i[l]!==o[u]){var d=`
37`+i[l].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=l&&0<=u);break}}}finally{Jh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hl(e):""}function xT(e){switch(e.tag){case 5:return hl(e.type);case 16:return hl("Lazy");case 13:return hl("Suspense");case 19:return hl("SuspenseList");case 0:case 2:case 15:return e=Xh(e.type,!1),e;case 11:return e=Xh(e.type.render,!1),e;case 1:return e=Xh(e.type,!0),e;default:return""}}function em(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case vo:return"Fragment";case go:return"Portal";case Yf:return"Profiler";case Wp:return"StrictMode";case Jf:return"Suspense";case Xf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qw:return(e.displayName||"Context")+".Consumer";case $w:return(e._context.displayName||"Context")+".Provider";case Hp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gp:return t=e.displayName||null,t!==null?t:em(e.type)||"Memo";case di:t=e._payload,e=e._init;try{return em(e(t))}catch{}}return null}function bT(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return em(t);case 8:return t===Wp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Di(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wT(e){var t=Vw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jc(e){e._valueTracker||(e._valueTracker=wT(e))}function Ww(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Vw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Wu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function tm(e,t){var n=t.checked;return lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function By(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Di(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hw(e,t){t=t.checked,t!=null&&Vp(e,"checked",t,!1)}function nm(e,t){Hw(e,t);var n=Di(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}
vendor: 4,366 bytes, line 37
37t.hasOwnProperty("value")?rm(e,t.type,n):t.hasOwnProperty("defaultValue")&&rm(e,t.type,Di(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $y(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function rm(e,t,n){(t!=="number"||Wu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var fl=Array.isArray;function ko(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Di(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function im(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(J(91));return lt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function qy(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(J(92));if(fl(n)){if(1<n.length)throw Error(J(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Di(n)}}function Gw(e,t){var n=Di(t.value),r=Di(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Uy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Kw(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function sm(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Kw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xc,Zw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Xc=Xc||document.createElement("div"),Xc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Il(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xl={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},_T=["Webkit","ms","Moz","O"];Object.keys(xl).forEach(function(e){_T.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xl[t]=xl[e]})});function Qw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xl.hasOwnProperty(e)&&xl[e]?(""+t).trim():t+"px"}function Yw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Qw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var ST=lt({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 om(e,t){if(t){if(ST[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(J(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(J(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(J(61))}if(t.style!=null&&typeof t.style!="object")throw Error(J(62))}}function am(e,t){if(e.indexOf("-")===-1)return typeof t.is=="str
37ing";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lm=null;function Kp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cm=null,Po=null,Ao=null;function Vy(e){if(e=yc(e)){if(typeof cm!="function")throw Error(J(280));var t=e.stateNode;t&&(t=qd(t),cm(e.stateNode,e.type,t))}}function Jw(e){Po?Ao?Ao.push(e):Ao=[e]:Po=e}function Xw(){if(Po){var e=Po,t=Ao;if(Ao=Po=null,Vy(e),t)for(e=0;e<t.length;e++)Vy(t[e])}}function e_(e,t){return e(t)}function t_(){}var ef=!1;function n_(e,t,n){if(ef)return e(t,n);ef=!0;try{return e_(e,t,n)}finally{ef=!1,(Po!==null||Ao!==null)&&(t_(),Xw())}}function Ll(e,t){var n=e.stateNode;if(n===null)return null;var r=qd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(J(231,t,typeof n));return n}var um=!1;if(Vr)try{var rl={};Object.defineProperty(rl,"passive",{get:function(){um=!0}}),window.addEventListener("test",rl,rl),window.removeEventListener("test",rl,rl)}catch{um=!1}function jT(e,t,n,r,i,o,l,u,d){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(p){this.onError(p)}}var bl=!1,Hu=null,Gu=!1,dm=null,NT={onError:function(e){bl=!0,Hu=e}};function CT(e,t,n,r,i,o,l,u,d){bl=!1,Hu=null,jT.apply(NT,arguments)}function ET(e,t,n,r,i,o,l,u,d){if(CT.apply(this,arguments),bl){if(bl){var f=Hu;bl=!1,Hu=null}else throw Error(J(198));Gu||(Gu=!0,dm=f)}}function Fs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function r_(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Wy(e){if(Fs(e)!==e)throw Error(J(188))}function TT(e){var t=e.alternate;if(!t){if(t=Fs(e),t===null)throw Error(J(188));return t!==e?null:e}for(var n=e,r=t;;){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 Wy(i),e;if(o===r)return Wy(i),t;o=o.sibling}throw Error(J(188))}if(n.return!==r.return)n=i,r=o;else{for(var l=!1,u=i.child;u;){if(u===n){l=!0,n=i,r=o;break}if(u===r){l=!0,r=i,n=o;break}u=u.sibling}if(!l){for(u=o.child;u;){if(u===n){l=!0,n=o,r=i;break}if(u===r){l=!0,r=o,n=i;break}u=u.sibling}if(!l)throw Error(J(189))}}if(n.alternate!==r)throw Error(J(190))}if(n.tag!==3)throw Error(J(188));return n.stateNode.current===n?e:t}function i_(e){return e=TT(e),e!==null?s_(e):null}function s_(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=s_(e);if(t!==null)return t;e=e.sibling}return null}var o_=bn.unstable_scheduleCallback,Hy=bn.unstable_cancelCallback,kT=bn.unstable_shouldYield,PT=bn.unstable_requestPaint,ft=bn.unstable_now,AT=bn.unstable_getCurrentPriorityLevel,Zp=bn.unstable_ImmediatePriority,a_=bn.unstable_UserBlockingPriority,Ku=bn.unstable_NormalPriority,OT=bn.unstable_LowPriority,l_=bn.unstable_IdlePriority,Dd=null,wr=null;function RT(e){if(wr&&typeof wr.onCommitFiberRoot=="function")try{wr.onCommitFiberRoot(Dd,e,void 0,(e.current.flags&128)===128)}catch{}}var Xn=Math.clz32?Math.clz32:zT,IT=Math.log,LT=Math.LN2;function zT(e){return e>>>=0,e===0?32:31-(IT(e)/LT|0)|0}var eu=64,tu=4194304;function ml(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Zu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var u=l&~i;u!==0?r=ml(u):(o&=l,o!==0&&(r=ml(o)))}else l=n&~i,l!==0?r=ml(l):o!==0&&(r=ml(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Xn(t),i=1<<n,r|=e[n],t&=~i;return r}function MT(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function DT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var l=31-Xn(o),u=1<<l,d=i[l];d===-1?(!(u&n)||u&r)&&(i[l]=MT(u,t)):d<=t&&(e.expiredLanes|=u),o&=~u}}function hm(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function c_(){var e=eu;return eu<<=1,!(eu&4194240)&&(eu=64),e}function tf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function gc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xn(t),e[t]=n}function FT(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Xn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Qp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var He=0;function u_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var d_,Yp,h_,f_,m_,fm=!1,nu=[],ki=null,Pi=null,Ai=null,zl=new Map,Ml=new Map,mi=[],BT="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 Gy(e,t){switch(e){case"focusin":case"focusout":ki=null;break;case"dragenter":case"dragleave":Pi=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":zl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ml.delete(t.pointerId)}}function il(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=yc(t),t!==null&&Yp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function $T(e,t,n,r,i){switch(t){case"focusin":return ki=il(ki,e,t,n,r,i),!0;case"dragenter":return Pi=il(Pi,e,t,n,r,i),!0;case"mouseover":return Ai=il(Ai,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return zl.set(o,il(zl.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Ml.set(o,il(Ml.get(o)||null,e,t,n,r,i)),!0}return!1}function p_(e){var t=ds(e.target);if(t!==null){var n=Fs(t);if(n!==null){if(t=n.tag,t===13){if(t=r_(n),t!==null){e.blockedOn=t,m_(e.priority,function(){h_(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ku(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);lm=r,n.target.dispatchEvent(r),lm=null}else return t=yc(n),t!==null&&Yp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ky(e,t,n){ku(e)&&n.delete(t)}function qT(){fm=!1,ki!==null&&ku(ki)&&(ki=null),Pi!==null&&ku(Pi)&&(Pi=null),Ai!==null&&ku(Ai)&&(Ai=null),zl.forEach(Ky),Ml.forEach(Ky)}function sl(e,t){e.blockedOn===t&&(e.blockedOn=null,fm||(fm=!0,bn.unstable_scheduleCallback(bn.unstable_NormalPriority,qT)))}function Dl(e){function t(i){return sl(i,e)}if(0<nu.length){sl(nu[0],e);for(var n=1;n<nu.length;n++){var r=nu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ki!==null&&sl(ki,e),Pi!==null&&sl(Pi,e),Ai!==null&&sl(Ai,e),zl.forEach(t),Ml.forEach(t),n=0;n<mi.length;n++)r=mi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<mi.length&&(n=mi[0],n.blockedOn===null);)p_(n),n.blockedOn===null&&mi.shift()}var Oo=Yr.ReactCurrentBatchConfig,Qu=!0;function UT(e,t,n,r){var i=He,o=Oo.transition;Oo.transition=null;try{He=1,Jp(e,t,n,r)}finally{He=i,Oo.transition=o}}function VT(e,t,n,r){var i=He,o=Oo.transition;Oo.transition=null;try{He=4,Jp(e,t,n,r)}finally{He=i,Oo.transition=o}}function Jp(e,t,n,r){if(Qu){var i=mm(e,t,n,r);if(i===null)hf(e,t,r,Yu,n),Gy(e,r);else if($T(i,e,t,n,r))r.stopPropagation();else if(Gy(e,r),t&4&&-1<BT.indexOf(e)){for(;i!==null;){var o=yc(i);if(o!==null&&d_(o),o=mm(e,t,n,r),o===null&&hf(e,t,r,Yu,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else hf(e,t,r,null,n)}}var Yu=null;function mm(e,t,n,r){if(Yu=null,e=Kp(r),e=ds(e),e!==null)if(t=Fs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=r_(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yu=e,null}
vendor: 10,081 bytes, line 37
37function g_(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(AT()){case Zp:return 1;case a_:return 4;case Ku:case OT:return 16;case l_:return 536870912;default:return 16}default:return 16}}var Ci=null,Xp=null,Pu=null;function v_(){if(Pu)return Pu;var e,t=Xp,n=t.length,r,i="value"in Ci?Ci.value:Ci.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[o-r];r++);return Pu=i.slice(e,1<r?1-r:void 0)}function Au(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ru(){return!0}function Zy(){return!1}function _n(e){function t(n,r,i,o,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(o):o[u]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ru:Zy,this.isPropagationStopped=Zy,this}return lt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ru)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ru)},persist:function(){},isPersistent:ru}),t}var ka={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eg=_n(ka),vc=lt({},ka,{view:0,detail:0}),WT=_n(vc),nf,rf,ol,Fd=lt({},vc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ol&&(ol&&e.type==="mousemove"?(nf=e.screenX-ol.screenX,rf=e.screenY-ol.screenY):rf=nf=0,ol=e),nf)},movementY:function(e){return"movementY"in e?e.movementY:rf}}),Qy=_n(Fd),HT=lt({},Fd,{dataTransfer:0}),GT=_n(HT),KT=lt({},vc,{relatedTarget:0}),sf=_n(KT),ZT=lt({},ka,{animationName:0,elapsedTime:0,pseudoElement:0}),QT=_n(ZT),YT=lt({},ka,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),JT=_n(YT),XT=lt({},ka,{data:0}),Yy=_n(XT),ek={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tk={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"},nk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nk[e])?!!t[e]:!1}function tg(){return rk}var ik=lt({},vc,{key:function(e){if(e.key){var t=ek[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Au(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tk[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tg,charCode:function(e){return e.type==="keypress"?Au(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Au(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sk=_n(ik),ok=lt({},Fd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jy=_n(ok),ak=lt({},vc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tg}),lk=_n(ak),ck=lt({},ka,{propertyName:0,elapsedTime:0,pseudoElement:0}),uk=_n(ck),dk=lt({},Fd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),hk=_n(dk),fk=[9,13,27,32],ng=Vr&&"CompositionEvent"in window,wl=null;Vr&&"documentMode"in document&&(wl=document.documentMode);var mk=Vr&&"TextEvent"in window&&!wl,y_=Vr&&(!ng||wl&&8<wl&&11>=wl),Xy=" ",ex=!1;function x_(e,t){switch(e){case"keyup":return fk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function b_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yo=!1;function pk(e,t){switch(e){case"compositionend":return b_(t);case"keypress":return t.which!==32?null:(ex=!0,Xy);case"textInput":return e=t.data,e===Xy&&ex?null:e;default:return null}}function gk(e,t){if(yo)return e==="compositionend"||!ng&&x_(e,t)?(e=v_(),Pu=Xp=Ci=null,yo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return y_&&t.locale!=="ko"?null:t.data;default:return null}}var vk={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 tx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vk[e.type]:t==="textarea"}function w_(e,t,n,r){Jw(r),t=Ju(t,"onChange"),0<t.length&&(n=new eg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var _l=null,Fl=null;function yk(e){O_(e,0)}function Bd(e){var t=wo(e);if(Ww(t))return e}function xk(e,t){if(e==="change")return t}var __=!1;if(Vr){var of;if(Vr){var af="oninput"in document;if(!af){var nx=document.createElement("div");nx.setAttribute("oninput","return;"),af=typeof nx.oninput=="function"}of=af}else of=!1;__=of&&(!document.documentMode||9<document.documentMode)}function rx(){_l&&(_l.detachEvent("onpropertychange",S_),Fl=_l=null)}function S_(e){if(e.propertyName==="value"&&Bd(Fl)){var t=[];w_(t,Fl,e,Kp(e)),n_(yk,t)}}function bk(e,t,n){e==="focusin"?(rx(),_l=t,Fl=n,_l.attachEvent("onpropertychange",S_)):e==="focusout"&&rx()}function wk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bd(Fl)}function _k(e,t){if(e==="click")return Bd(t)}function Sk(e,t){if(e==="input"||e==="change")return Bd(t)}function jk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tr=typeof Object.is=="function"?Object.is:jk;function Bl(e,t){if(tr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Qf.call(t,i)||!tr(e[i],t[i]))return!1}return!0}function ix(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sx(e,t){var n=ix(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ix(n)}}function j_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?j_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function N_(){for(var e=window,t=Wu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wu(e.document)}return t}function rg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Nk(e){var t=N_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&j_(n.ownerDocument.documentElement,n)){if(r!==null&&rg(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=sx(n,o);var l=sx(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ck=Vr&&"documentMode"in document&&11>=document.documentMode,xo=null,pm=null,Sl=null,gm=!1;
vendor: 4,821 bytes, line 37
37function ox(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;gm||xo==null||xo!==Wu(r)||(r=xo,"selectionStart"in r&&rg(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}),Sl&&Bl(Sl,r)||(Sl=r,r=Ju(pm,"onSelect"),0<r.length&&(t=new eg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=xo)))}function iu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bo={animationend:iu("Animation","AnimationEnd"),animationiteration:iu("Animation","AnimationIteration"),animationstart:iu("Animation","AnimationStart"),transitionend:iu("Transition","TransitionEnd")},lf={},C_={};Vr&&(C_=document.createElement("div").style,"AnimationEvent"in window||(delete bo.animationend.animation,delete bo.animationiteration.animation,delete bo.animationstart.animation),"TransitionEvent"in window||delete bo.transitionend.transition);function $d(e){if(lf[e])return lf[e];if(!bo[e])return e;var t=bo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in C_)return lf[e]=t[n];return e}var E_=$d("animationend"),T_=$d("animationiteration"),k_=$d("animationstart"),P_=$d("transitionend"),A_=new Map,ax="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 Wi(e,t){A_.set(e,t),Ds(t,[e])}for(var cf=0;cf<ax.length;cf++){var uf=ax[cf],Ek=uf.toLowerCase(),Tk=uf[0].toUpperCase()+uf.slice(1);Wi(Ek,"on"+Tk)}Wi(E_,"onAnimationEnd");Wi(T_,"onAnimationIteration");Wi(k_,"onAnimationStart");Wi("dblclick","onDoubleClick");Wi("focusin","onFocus");Wi("focusout","onBlur");Wi(P_,"onTransitionEnd");ta("onMouseEnter",["mouseout","mouseover"]);ta("onMouseLeave",["mouseout","mouseover"]);ta("onPointerEnter",["pointerout","pointerover"]);ta("onPointerLeave",["pointerout","pointerover"]);Ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ds("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pl="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(" "),kk=new Set("cancel close invalid load scroll toggle".split(" ").concat(pl));function lx(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ET(r,t,void 0,e),e.currentTarget=null}function O_(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var l=r.length-1;0<=l;l--){var u=r[l],d=u.instance,f=u.currentTarget;if(u=u.listener,d!==o&&i.isPropagationStopped())break e;lx(i,u,f),o=d}else for(l=0;l<r.length;l++){if(u=r[l],d=u.instance,f=u.currentTarget,u=u.listener,d!==o&&i.isPropagationStopped())break e;lx(i,u,f),o=d}}}if(Gu)throw e=dm,Gu=!1,dm=null,e}function Xe(e,t){var n=t[wm];n===void 0&&(n=t[wm]=new Set);var r=e+"__bubble";n.has(r)||(R_(t,e,2,!1),n.add(r))}function df(e,t,n){var r=0;t&&(r|=4),R_(n,e,r,t)}var su="_reactListening"+Math.random().toString(36).slice(2);function $l(e){if(!e[su]){e[su]=!0,Bw.forEach(function(n){n!=="selectionchange"&&(kk.has(n)||df(n,!1,e),df(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[su]||(t[su]=!0,df("selectionchange",!1,t))}}function R_(e,t,n,r){switch(g_(t)){case 1:var i=UT;break;case 4:i=VT;break;default:i=Jp}n=i.bind(null,t,n,e),i=void 0,!um||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function hf(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var u=r.stateNode.containerInfo;
vendor: 2,527 bytes, line 37
37if(u===i||u.nodeType===8&&u.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var d=l.tag;if((d===3||d===4)&&(d=l.stateNode.containerInfo,d===i||d.nodeType===8&&d.parentNode===i))return;l=l.return}for(;u!==null;){if(l=ds(u),l===null)return;if(d=l.tag,d===5||d===6){r=o=l;continue e}u=u.parentNode}}r=r.return}n_(function(){var f=o,p=Kp(n),m=[];e:{var g=A_.get(e);if(g!==void 0){var y=eg,w=e;switch(e){case"keypress":if(Au(n)===0)break e;case"keydown":case"keyup":y=sk;break;case"focusin":w="focus",y=sf;break;case"focusout":w="blur",y=sf;break;case"beforeblur":case"afterblur":y=sf;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":y=Qy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=GT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=lk;break;case E_:case T_:case k_:y=QT;break;case P_:y=uk;break;case"scroll":y=WT;break;case"wheel":y=hk;break;case"copy":case"cut":case"paste":y=JT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Jy}var b=(t&4)!==0,C=!b&&e==="scroll",j=b?g!==null?g+"Capture":null:g;b=[];for(var _=f,N;_!==null;){N=_;var A=N.stateNode;if(N.tag===5&&A!==null&&(N=A,j!==null&&(A=Ll(_,j),A!=null&&b.push(ql(_,A,N)))),C)break;_=_.return}0<b.length&&(g=new y(g,w,null,n,p),m.push({event:g,listeners:b}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",g&&n!==lm&&(w=n.relatedTarget||n.fromElement)&&(ds(w)||w[Wr]))break e;if((y||g)&&(g=p.window===p?p:(g=p.ownerDocument)?g.defaultView||g.parentWindow:window,y?(w=n.relatedTarget||n.toElement,y=f,w=w?ds(w):null,w!==null&&(C=Fs(w),w!==C||w.tag!==5&&w.tag!==6)&&(w=null)):(y=null,w=f),y!==w)){if(b=Qy,A="onMouseLeave",j="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(b=Jy,A="onPointerLeave",j="onPointerEnter",_="pointer"),C=y==null?g:wo(y),N=w==null?g:wo(w),g=new b(A,_+"leave",y,n,p),g.target=C,g.relatedTarget=N,A=null,ds(p)===f&&(b=new b(j,_+"enter",w,n,p),b.target=N,b.relatedTarget=C,A=b),C=A,y&&w)t:{for(b=y,j=w,_=0,N=b;N;N=no(N))_++;for(N=0,A=j;A;A=no(A))N++;for(;0<_-N;)b=no(b),_--;for(;0<N-_;)j=no(j),N--;for(;_--;){if(b===j||j!==null&&b===j.alternate)break t;b=no(b),j=no(j)}b=null}else b=null;y!==null&&cx(m,g,y,b,!1),w!==null&&C!==null&&cx(m,C,w,b,!0)}}
vendor: 4,435 bytes, lines 37-38
37e:{if(g=f?wo(f):window,y=g.nodeName&&g.nodeName.toLowerCase(),y==="select"||y==="input"&&g.type==="file")var k=xk;else if(tx(g))if(__)k=Sk;else{k=wk;var T=bk}else(y=g.nodeName)&&y.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(k=_k);if(k&&(k=k(e,f))){w_(m,k,n,p);break e}T&&T(e,g,f),e==="focusout"&&(T=g._wrapperState)&&T.controlled&&g.type==="number"&&rm(g,"number",g.value)}switch(T=f?wo(f):window,e){case"focusin":(tx(T)||T.contentEditable==="true")&&(xo=T,pm=f,Sl=null);break;case"focusout":Sl=pm=xo=null;break;case"mousedown":gm=!0;break;case"contextmenu":case"mouseup":case"dragend":gm=!1,ox(m,n,p);break;case"selectionchange":if(Ck)break;case"keydown":case"keyup":ox(m,n,p)}var R;if(ng)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else yo?x_(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(y_&&n.locale!=="ko"&&(yo||P!=="onCompositionStart"?P==="onCompositionEnd"&&yo&&(R=v_()):(Ci=p,Xp="value"in Ci?Ci.value:Ci.textContent,yo=!0)),T=Ju(f,P),0<T.length&&(P=new Yy(P,e,null,n,p),m.push({event:P,listeners:T}),R?P.data=R:(R=b_(n),R!==null&&(P.data=R)))),(R=mk?pk(e,n):gk(e,n))&&(f=Ju(f,"onBeforeInput"),0<f.length&&(p=new Yy("onBeforeInput","beforeinput",null,n,p),m.push({event:p,listeners:f}),p.data=R))}O_(m,t)})}function ql(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ju(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Ll(e,n),o!=null&&r.unshift(ql(e,o,i)),o=Ll(e,t),o!=null&&r.push(ql(e,o,i))),e=e.return}return r}function no(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function cx(e,t,n,r,i){for(var o=t._reactName,l=[];n!==null&&n!==r;){var u=n,d=u.alternate,f=u.stateNode;if(d!==null&&d===r)break;u.tag===5&&f!==null&&(u=f,i?(d=Ll(n,o),d!=null&&l.unshift(ql(n,d,u))):i||(d=Ll(n,o),d!=null&&l.push(ql(n,d,u)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Pk=/\r\n?/g,Ak=/\u0000|\uFFFD/g;function ux(e){return(typeof e=="string"?e:""+e).replace(Pk,`
38`).replace(Ak,"")}function ou(e,t,n){if(t=ux(t),ux(e)!==t&&n)throw Error(J(425))}function Xu(){}var vm=null,ym=null;function xm(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bm=typeof setTimeout=="function"?setTimeout:void 0,Ok=typeof clearTimeout=="function"?clearTimeout:void 0,dx=typeof Promise=="function"?Promise:void 0,Rk=typeof queueMicrotask=="function"?queueMicrotask:typeof dx<"u"?function(e){return dx.resolve(null).then(e).catch(Ik)}:bm;function Ik(e){setTimeout(function(){throw e})}function ff(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Dl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Dl(t)}function Oi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function hx(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Pa=Math.random().toString(36).slice(2),xr="__reactFiber$"+Pa,Ul="__reactProps$"+Pa,Wr="__reactContainer$"+Pa,wm="__reactEvents$"+Pa,Lk="__reactListeners$"+Pa,zk="__reactHandles$"+Pa;function ds(e){var t=e[xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Wr]||n[xr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hx(e);e!==null;){if(n=e[xr])return n;e=hx(e)}return t}e=n,n=e.parentNode}return null}function yc(e){return e=e[xr]||e[Wr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function wo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(J(33))}function qd(e){return e[Ul]||null}var _m=[],_o=-1;function Hi(e){return{current:e}}function et(e){0>_o||(e.current=_m[_o],_m[_o]=null,_o--)}function Ye(e,t){_o++,_m[_o]=e.current,e.current=t}var Fi={},Ut=Hi(Fi),sn=Hi(!1),Ns=Fi;function na(e,t){var n=e.type.contextTypes;if(!n)return Fi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;
vendor: 14,751 bytes, line 38
38for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function on(e){return e=e.childContextTypes,e!=null}function ed(){et(sn),et(Ut)}function fx(e,t,n){if(Ut.current!==Fi)throw Error(J(168));Ye(Ut,t),Ye(sn,n)}function I_(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(J(108,bT(e)||"Unknown",i));return lt({},n,r)}function td(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fi,Ns=Ut.current,Ye(Ut,e),Ye(sn,sn.current),!0}function mx(e,t,n){var r=e.stateNode;if(!r)throw Error(J(169));n?(e=I_(e,t,Ns),r.__reactInternalMemoizedMergedChildContext=e,et(sn),et(Ut),Ye(Ut,e)):et(sn),Ye(sn,n)}var Mr=null,Ud=!1,mf=!1;function L_(e){Mr===null?Mr=[e]:Mr.push(e)}function Mk(e){Ud=!0,L_(e)}function Gi(){if(!mf&&Mr!==null){mf=!0;var e=0,t=He;try{var n=Mr;for(He=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Mr=null,Ud=!1}catch(i){throw Mr!==null&&(Mr=Mr.slice(e+1)),o_(Zp,Gi),i}finally{He=t,mf=!1}}return null}var So=[],jo=0,nd=null,rd=0,kn=[],Pn=0,Cs=null,Fr=1,Br="";function os(e,t){So[jo++]=rd,So[jo++]=nd,nd=e,rd=t}function z_(e,t,n){kn[Pn++]=Fr,kn[Pn++]=Br,kn[Pn++]=Cs,Cs=e;var r=Fr;e=Br;var i=32-Xn(r)-1;r&=~(1<<i),n+=1;var o=32-Xn(t)+i;if(30<o){var l=i-i%5;o=(r&(1<<l)-1).toString(32),r>>=l,i-=l,Fr=1<<32-Xn(t)+i|n<<i|r,Br=o+e}else Fr=1<<o|n<<i|r,Br=e}function ig(e){e.return!==null&&(os(e,1),z_(e,1,0))}function sg(e){for(;e===nd;)nd=So[--jo],So[jo]=null,rd=So[--jo],So[jo]=null;for(;e===Cs;)Cs=kn[--Pn],kn[Pn]=null,Br=kn[--Pn],kn[Pn]=null,Fr=kn[--Pn],kn[Pn]=null}var yn=null,vn=null,rt=!1,Qn=null;function M_(e,t){var n=An(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function px(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,yn=e,vn=Oi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yn=e,vn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Cs!==null?{id:Fr,overflow:Br}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=An(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,yn=e,vn=null,!0):!1;default:return!1}}function Sm(e){return(e.mode&1)!==0&&(e.flags&128)===0}function jm(e){if(rt){var t=vn;if(t){var n=t;if(!px(e,t)){if(Sm(e))throw Error(J(418));t=Oi(n.nextSibling);var r=yn;t&&px(e,t)?M_(r,n):(e.flags=e.flags&-4097|2,rt=!1,yn=e)}}else{if(Sm(e))throw Error(J(418));e.flags=e.flags&-4097|2,rt=!1,yn=e}}}function gx(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yn=e}function au(e){if(e!==yn)return!1;if(!rt)return gx(e),rt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!xm(e.type,e.memoizedProps)),t&&(t=vn)){if(Sm(e))throw D_(),Error(J(418));for(;t;)M_(e,t),t=Oi(t.nextSibling)}if(gx(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(J(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){vn=Oi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}vn=null}}else vn=yn?Oi(e.stateNode.nextSibling):null;return!0}function D_(){for(var e=vn;e;)e=Oi(e.nextSibling)}function ra(){vn=yn=null,rt=!1}function og(e){Qn===null?Qn=[e]:Qn.push(e)}var Dk=Yr.ReactCurrentBatchConfig;function al(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(J(309));var r=n.stateNode}if(!r)throw Error(J(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(l){var u=i.refs;l===null?delete u[o]:u[o]=l},t._stringRef=o,t)}if(typeof e!="string")throw Error(J(284));if(!n._owner)throw Error(J(290,e))}return e}function lu(e,t){throw e=Object.prototype.toString.call(t),Error(J(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function vx(e){var t=e._init;return t(e._payload)}function F_(e){function t(j,_){if(e){var N=j.deletions;N===null?(j.deletions=[_],j.flags|=16):N.push(_)}}function n(j,_){if(!e)return null;for(;_!==null;)t(j,_),_=_.sibling;return null}function r(j,_){for(j=new Map;_!==null;)_.key!==null?j.set(_.key,_):j.set(_.index,_),_=_.sibling;return j}function i(j,_){return j=zi(j,_),j.index=0,j.sibling=null,j}function o(j,_,N){return j.index=N,e?(N=j.alternate,N!==null?(N=N.index,N<_?(j.flags|=2,_):N):(j.flags|=2,_)):(j.flags|=1048576,_)}function l(j){return e&&j.alternate===null&&(j.flags|=2),j}function u(j,_,N,A){return _===null||_.tag!==6?(_=wf(N,j.mode,A),_.return=j,_):(_=i(_,N),_.return=j,_)}function d(j,_,N,A){var k=N.type;return k===vo?p(j,_,N.props.children,A,N.key):_!==null&&(_.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===di&&vx(k)===_.type)?(A=i(_,N.props),A.ref=al(j,_,N),A.return=j,A):(A=Du(N.type,N.key,N.props,null,j.mode,A),A.ref=al(j,_,N),A.return=j,A)}function f(j,_,N,A){return _===null||_.tag!==4||_.stateNode.containerInfo!==N.containerInfo||_.stateNode.implementation!==N.implementation?(_=_f(N,j.mode,A),_.return=j,_):(_=i(_,N.children||[]),_.return=j,_)}function p(j,_,N,A,k){return _===null||_.tag!==7?(_=Ss(N,j.mode,A,k),_.return=j,_):(_=i(_,N),_.return=j,_)}function m(j,_,N){if(typeof _=="string"&&_!==""||typeof _=="number")return _=wf(""+_,j.mode,N),_.return=j,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Yc:return N=Du(_.type,_.key,_.props,null,j.mode,N),N.ref=al(j,null,_),N.return=j,N;case go:return _=_f(_,j.mode,N),_.return=j,_;case di:var A=_._init;return m(j,A(_._payload),N)}if(fl(_)||nl(_))return _=Ss(_,j.mode,N,null),_.return=j,_;lu(j,_)}return null}function g(j,_,N,A){var k=_!==null?_.key:null;if(typeof N=="string"&&N!==""||typeof N=="number")return k!==null?null:u(j,_,""+N,A);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Yc:return N.key===k?d(j,_,N,A):null;case go:return N.key===k?f(j,_,N,A):null;case di:return k=N._init,g(j,_,k(N._payload),A)}if(fl(N)||nl(N))return k!==null?null:p(j,_,N,A,null);lu(j,N)}return null}function y(j,_,N,A,k){if(typeof A=="string"&&A!==""||typeof A=="number")return j=j.get(N)||null,u(_,j,""+A,k);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case Yc:return j=j.get(A.key===null?N:A.key)||null,d(_,j,A,k);case go:return j=j.get(A.key===null?N:A.key)||null,f(_,j,A,k);case di:var T=A._init;return y(j,_,N,T(A._payload),k)}if(fl(A)||nl(A))return j=j.get(N)||null,p(_,j,A,k,null);lu(_,A)}return null}function w(j,_,N,A){for(var k=null,T=null,R=_,P=_=0,I=null;R!==null&&P<N.length;P++){R.index>P?(I=R,R=null):I=R.sibling;var O=g(j,R,N[P],A);if(O===null){R===null&&(R=I);break}e&&R&&O.alternate===null&&t(j,R),_=o(O,_,P),T===null?k=O:T.sibling=O,T=O,R=I}if(P===N.length)return n(j,R),rt&&os(j,P),k;if(R===null){for(;P<N.length;P++)R=m(j,N[P],A),R!==null&&(_=o(R,_,P),T===null?k=R:T.sibling=R,T=R);return rt&&os(j,P),k}for(R=r(j,R);P<N.length;P++)I=y(R,j,P,N[P],A),I!==null&&(e&&I.alternate!==null&&R.delete(I.key===null?P:I.key),_=o(I,_,P),T===null?k=I:T.sibling=I,T=I);return e&&R.forEach(function(B){return t(j,B)}),rt&&os(j,P),k}function b(j,_,N,A){var k=nl(N);if(typeof k!="function")throw Error(J(150));if(N=k.call(N),N==null)throw Error(J(151));for(var T=k=null,R=_,P=_=0,I=null,O=N.next();R!==null&&!O.done;P++,O=N.next()){R.index>P?(I=R,R=null):I=R.sibling;var B=g(j,R,O.value,A);if(B===null){R===null&&(R=I);break}e&&R&&B.alternate===null&&t(j,R),_=o(B,_,P),T===null?k=B:T.sibling=B,T=B,R=I}if(O.done)return n(j,R),rt&&os(j,P),k;if(R===null){for(;!O.done;P++,O=N.next())O=m(j,O.value,A),O!==null&&(_=o(O,_,P),T===null?k=O:T.sibling=O,T=O);return rt&&os(j,P),k}for(R=r(j,R);!O.done;P++,O=N.next())O=y(R,j,P,O.value,A),O!==null&&(e&&O.alternate!==null&&R.delete(O.key===null?P:O.key),_=o(O,_,P),T===null?k=O:T.sibling=O,T=O);return e&&R.forEach(function(U){return t(j,U)}),rt&&os(j,P),k}function C(j,_,N,A){if(typeof N=="object"&&N!==null&&N.type===vo&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case Yc:e:{for(var k=N.key,T=_;T!==null;){if(T.key===k){if(k=N.type,k===vo){if(T.tag===7){n(j,T.sibling),_=i(T,N.props.children),_.return=j,j=_;break e}}else if(T.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===di&&vx(k)===T.type){n(j,T.sibling),_=i(T,N.props),_.ref=al(j,T,N),_.return=j,j=_;break e}n(j,T);break}else t(j,T);T=T.sibling}N.type===vo?(_=Ss(N.props.children,j.mode,A,N.key),_.return=j,j=_):(A=Du(N.type,N.key,N.props,null,j.mode,A),A.ref=al(j,_,N),A.return=j,j=A)}return l(j);case go:e:{for(T=N.key;_!==null;){if(_.key===T)if(_.tag===4&&_.stateNode.containerInfo===N.containerInfo&&_.stateNode.implementation===N.implementation){n(j,_.sibling),_=i(_,N.children||[]),_.return=j,j=_;break e}else{n(j,_);break}else t(j,_);_=_.sibling}_=_f(N,j.mode,A),_.return=j,j=_}return l(j);case di:return T=N._init,C(j,_,T(N._payload),A)}if(fl(N))return w(j,_,N,A);if(nl(N))return b(j,_,N,A);lu(j,N)}return typeof N=="string"&&N!==""||typeof N=="number"?(N=""+N,_!==null&&_.tag===6?(n(j,_.sibling),_=i(_,N),_.return=j,j=_):(n(j,_),_=wf(N,j.mode,A),_.return=j,j=_),l(j)):n(j,_)}return C}var ia=F_(!0),B_=F_(!1),id=Hi(null),sd=null,No=null,ag=null;function lg(){ag=No=sd=null}function cg(e){var t=id.current;et(id),e._currentValue=t}function Nm(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ro(e,t){sd=e,ag=No=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(rn=!0),e.firstContext=null)}function Rn(e){var t=e._currentValue;if(ag!==e)if(e={context:e,memoizedValue:t,next:null},No===null){if(sd===null)throw Error(J(308));No=e,sd.dependencies={lanes:0,firstContext:e}}else No=No.next=e;return t}var hs=null;function ug(e){hs===null?hs=[e]:hs.push(e)}function $_(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ug(t)):(n.next=i.next,i.next=n),t.interleaved=n,Hr(e,r)}function Hr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var hi=!1;function dg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function q_(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $r(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ri(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Be&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Hr(e,n)}return i=r.interleaved,i===null?(t.next=t,ug(r)):(t.next=i.next,i.next=t),r.interleaved=t,Hr(e,n)}function Ou(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qp(e,n)}}function yx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function od(e,t,n,r){var i=e.updateQueue;hi=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var d=u,f=d.next;d.next=null,l===null?o=f:l.next=f,l=d;var p=e.alternate;p!==null&&(p=p.updateQueue,u=p.lastBaseUpdate,u!==l&&(u===null?p.firstBaseUpdate=f:u.next=f,p.lastBaseUpdate=d))}if(o!==null){var m=i.baseState;l=0,p=f=d=null,u=o;do{var g=u.lane,y=u.eventTime;if((r&g)===g){p!==null&&(p=p.next={eventTime:y,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var w=e,b=u;switch(g=t,y=n,b.tag){case 1:if(w=b.payload,typeof w=="function"){m=w.call(y,m,g);break e}m=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=b.payload,g=typeof w=="function"?w.call(y,m,g):w,g==null)break e;m=lt({},m,g);break e;case 2:hi=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,g=i.effects,g===null?i.effects=[u]:g.push(u))}else y={eventTime:y,lane:g,tag:u.tag,payload:u.payload,callback:u.callback,next:null},p===null?(f=p=y,d=m):p=p.next=y,l|=g;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;g=u,u=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(p===null&&(d=m),i.baseState=d,i.firstBaseUpdate=f,i.lastBaseUpdate=p,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ts|=l,e.lanes=l,e.memoizedState=m}}function xx(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(J(191,i));i.call(r)}}}var xc={},_r=Hi(xc),Vl=Hi(xc),Wl=Hi(xc);function fs(e){if(e===xc)throw Error(J(174));return e}function hg(e,t){switch(Ye(Wl,t),Ye(Vl,e),Ye(_r,xc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sm(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sm(t,e)}et(_r),Ye(_r,t)}function sa(){et(_r),et(Vl),et(Wl)}function U_(e){fs(Wl.current);var t=fs(_r.current),n=sm(t,e.type);t!==n&&(Ye(Vl,e),Ye(_r,n))}function fg(e){Vl.current===e&&(et(_r),et(Vl))}var ot=Hi(0);function ad(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var pf=[];function mg(){for(var e=0;e<pf.length;e++)pf[e]._workInProgressVersionPrimary=null;pf.length=0}var Ru=Yr.ReactCurrentDispatcher,gf=Yr.ReactCurrentBatchConfig,Es=0,at=null,St=null,Et=null,ld=!1,jl=!1,Hl=0,Fk=0;function Dt(){throw Error(J(321))}function pg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tr(e[n],t[n]))return!1;return!0}function gg(e,t,n,r,i,o){if(Es=o,at=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ru.current=e===null||e.memoizedState===null?Uk:Vk,e=n(r,i),jl){o=0;
vendor: 4,705 bytes, line 38
38do{if(jl=!1,Hl=0,25<=o)throw Error(J(301));o+=1,Et=St=null,t.updateQueue=null,Ru.current=Wk,e=n(r,i)}while(jl)}if(Ru.current=cd,t=St!==null&&St.next!==null,Es=0,Et=St=at=null,ld=!1,t)throw Error(J(300));return e}function vg(){var e=Hl!==0;return Hl=0,e}function mr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Et===null?at.memoizedState=Et=e:Et=Et.next=e,Et}function In(){if(St===null){var e=at.alternate;e=e!==null?e.memoizedState:null}else e=St.next;var t=Et===null?at.memoizedState:Et.next;if(t!==null)Et=t,St=e;else{if(e===null)throw Error(J(310));St=e,e={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Et===null?at.memoizedState=Et=e:Et=Et.next=e}return Et}function Gl(e,t){return typeof t=="function"?t(e):t}function vf(e){var t=In(),n=t.queue;if(n===null)throw Error(J(311));n.lastRenderedReducer=e;var r=St,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var l=i.next;i.next=o.next,o.next=l}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var u=l=null,d=null,f=o;do{var p=f.lane;if((Es&p)===p)d!==null&&(d=d.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var m={lane:p,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};d===null?(u=d=m,l=r):d=d.next=m,at.lanes|=p,Ts|=p}f=f.next}while(f!==null&&f!==o);d===null?l=r:d.next=u,tr(r,t.memoizedState)||(rn=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=d,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,at.lanes|=o,Ts|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function yf(e){var t=In(),n=t.queue;if(n===null)throw Error(J(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do o=e(o,l.action),l=l.next;while(l!==i);tr(o,t.memoizedState)||(rn=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function V_(){}function W_(e,t){var n=at,r=In(),i=t(),o=!tr(r.memoizedState,i);if(o&&(r.memoizedState=i,rn=!0),r=r.queue,yg(K_.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Et!==null&&Et.memoizedState.tag&1){if(n.flags|=2048,Kl(9,G_.bind(null,n,r,i,t),void 0,null),kt===null)throw Error(J(349));Es&30||H_(n,t,i)}return i}function H_(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=at.updateQueue,t===null?(t={lastEffect:null,stores:null},at.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function G_(e,t,n,r){t.value=n,t.getSnapshot=r,Z_(t)&&Q_(e)}function K_(e,t,n){return n(function(){Z_(t)&&Q_(e)})}function Z_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tr(e,n)}catch{return!0}}function Q_(e){var t=Hr(e,1);t!==null&&er(t,e,1,-1)}function bx(e){var t=mr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gl,lastRenderedState:e},t.queue=e,e=e.dispatch=qk.bind(null,at,e),[t.memoizedState,e]}function Kl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=at.updateQueue,t===null?(t={lastEffect:null,stores:null},at.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Y_(){return In().memoizedState}function Iu(e,t,n,r){var i=mr();at.flags|=e,i.memoizedState=Kl(1|t,n,void 0,r===void 0?null:r)}function Vd(e,t,n,r){var i=In();r=r===void 0?null:r;var o=void 0;if(St!==null){var l=St.memoizedState;if(o=l.destroy,r!==null&&pg(r,l.deps)){i.memoizedState=Kl(t,n,o,r);return}}at.flags|=e,i.memoizedState=Kl(1|t,n,o,r)}function wx(e,t){return Iu(8390656,8,e,t)}function yg(e,t){return Vd(2048,8,e,t)}function J_(e,t){return Vd(4,2,e,t)}function X_(e,t){return Vd(4,4,e,t)}function e0(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function t0(e,t,n){return n=n!=null?n.concat([e]):null,Vd(4,4,e0.bind(null,t,e),n)}function xg(){}function n0(e,t){var n=In();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function r0(e,t){var n=In();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function i0(e,t,n){return Es&21?(tr(n,t)||(n=c_(),at.lanes|=n,Ts|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,rn=!0),e.memoizedState=n)}function Bk(e,t){var n=He;He=n!==0&&4>n?n:4,e(!0);var r=gf.transition;gf.transition={};try{e(!1),t()}finally{He=n,gf.transition=r}}function s0(){return In().memoizedState}
vendor: 7,965 bytes, lines 38-40
38function $k(e,t,n){var r=Li(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},o0(e))a0(t,n);else if(n=$_(e,t,n,r),n!==null){var i=Qt();er(n,e,r,i),l0(n,t,r)}}function qk(e,t,n){var r=Li(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(o0(e))a0(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,u=o(l,n);if(i.hasEagerState=!0,i.eagerState=u,tr(u,l)){var d=t.interleaved;d===null?(i.next=i,ug(t)):(i.next=d.next,d.next=i),t.interleaved=i;return}}catch{}finally{}n=$_(e,t,i,r),n!==null&&(i=Qt(),er(n,e,r,i),l0(n,t,r))}}function o0(e){var t=e.alternate;return e===at||t!==null&&t===at}function a0(e,t){jl=ld=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function l0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qp(e,n)}}var cd={readContext:Rn,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useInsertionEffect:Dt,useLayoutEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useMutableSource:Dt,useSyncExternalStore:Dt,useId:Dt,unstable_isNewReconciler:!1},Uk={readContext:Rn,useCallback:function(e,t){return mr().memoizedState=[e,t===void 0?null:t],e},useContext:Rn,useEffect:wx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Iu(4194308,4,e0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Iu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Iu(4,2,e,t)},useMemo:function(e,t){var n=mr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$k.bind(null,at,e),[r.memoizedState,e]},useRef:function(e){var t=mr();return e={current:e},t.memoizedState=e},useState:bx,useDebugValue:xg,useDeferredValue:function(e){return mr().memoizedState=e},useTransition:function(){var e=bx(!1),t=e[0];return e=Bk.bind(null,e[1]),mr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=at,i=mr();if(rt){if(n===void 0)throw Error(J(407));n=n()}else{if(n=t(),kt===null)throw Error(J(349));Es&30||H_(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,wx(K_.bind(null,r,o,e),[e]),r.flags|=2048,Kl(9,G_.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=mr(),t=kt.identifierPrefix;if(rt){var n=Br,r=Fr;n=(r&~(1<<32-Xn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Hl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Fk++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Vk={readContext:Rn,useCallback:n0,useContext:Rn,useEffect:yg,useImperativeHandle:t0,useInsertionEffect:J_,useLayoutEffect:X_,useMemo:r0,useReducer:vf,useRef:Y_,useState:function(){return vf(Gl)},useDebugValue:xg,useDeferredValue:function(e){var t=In();return i0(t,St.memoizedState,e)},useTransition:function(){var e=vf(Gl)[0],t=In().memoizedState;return[e,t]},useMutableSource:V_,useSyncExternalStore:W_,useId:s0,unstable_isNewReconciler:!1},Wk={readContext:Rn,useCallback:n0,useContext:Rn,useEffect:yg,useImperativeHandle:t0,useInsertionEffect:J_,useLayoutEffect:X_,useMemo:r0,useReducer:yf,useRef:Y_,useState:function(){return yf(Gl)},useDebugValue:xg,useDeferredValue:function(e){var t=In();return St===null?t.memoizedState=e:i0(t,St.memoizedState,e)},useTransition:function(){var e=yf(Gl)[0],t=In().memoizedState;return[e,t]},useMutableSource:V_,useSyncExternalStore:W_,useId:s0,unstable_isNewReconciler:!1};function Wn(e,t){if(e&&e.defaultProps){t=lt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Cm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:lt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wd={isMounted:function(e){return(e=e._reactInternals)?Fs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qt(),i=Li(e),o=$r(r,i);o.payload=t,n!=null&&(o.callback=n),t=Ri(e,o,i),t!==null&&(er(t,e,i,r),Ou(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qt(),i=Li(e),o=$r(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Ri(e,o,i),t!==null&&(er(t,e,i,r),Ou(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qt(),r=Li(e),i=$r(n,r);i.tag=2,t!=null&&(i.callback=t),t=Ri(e,i,r),t!==null&&(er(t,e,r,n),Ou(t,e,r))}};function _x(e,t,n,r,i,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,l):t.prototype&&t.prototype.isPureReactComponent?!Bl(n,r)||!Bl(i,o):!0}function c0(e,t,n){var r=!1,i=Fi,o=t.contextType;return typeof o=="object"&&o!==null?o=Rn(o):(i=on(t)?Ns:Ut.current,r=t.contextTypes,o=(r=r!=null)?na(e,i):Fi),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Sx(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Wd.enqueueReplaceState(t,t.state,null)}function Em(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},dg(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Rn(o):(o=on(t)?Ns:Ut.current,i.context=na(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Cm(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Wd.enqueueReplaceState(i,i.state,null),od(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function oa(e,t){try{var n="",r=t;do n+=xT(r),r=r.return;while(r);var i=n}catch(o){i=`
39Error generating stack: `+o.message+`
40`+o.stack}return{value:e,source:t,stack:i,digest:null}}function xf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Tm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Hk=typeof WeakMap=="function"?WeakMap:Map;function u0(e,t,n){n=$r(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){dd||(dd=!0,Dm=r),Tm(e,t)},n}function d0(e,t,n){n=$r(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Tm(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Tm(e,t),typeof r!="function"&&(Ii===null?Ii=new Set([this]):Ii.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function jx(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hk;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=oP.bind(null,e,t,n),t.then(e,e))}function Nx(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Cx(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$r(-1,1),t.tag=2,Ri(n,t,1))),n.lanes|=1),e)}var Gk=Yr.ReactCurrentOwner,rn=!1;function Gt(e,t,n,r){t.child=e===null?B_(t,null,n,r):ia(t,e.child,n,r)}function Ex(e,t,n,r,i){n=n.render;var o=t.ref;return Ro(t,i),r=gg(e,t,n,r,o,i),n=vg(),e!==null&&!rn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Gr(e,t,i)):(rt&&n&&ig(t),t.flags|=1,Gt(e,t,r,i
vendor: 10,099 bytes, line 40
40),t.child)}function Tx(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Eg(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,h0(e,t,o,r,i)):(e=Du(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Bl,n(l,r)&&e.ref===t.ref)return Gr(e,t,i)}return t.flags|=1,e=zi(o,r),e.ref=t.ref,e.return=t,t.child=e}function h0(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Bl(o,r)&&e.ref===t.ref)if(rn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(rn=!0);else return t.lanes=e.lanes,Gr(e,t,i)}return km(e,t,n,r,i)}function f0(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ye(Eo,fn),fn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ye(Eo,fn),fn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Ye(Eo,fn),fn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ye(Eo,fn),fn|=r;return Gt(e,t,i,n),t.child}function m0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function km(e,t,n,r,i){var o=on(n)?Ns:Ut.current;return o=na(t,o),Ro(t,i),n=gg(e,t,n,r,o,i),r=vg(),e!==null&&!rn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Gr(e,t,i)):(rt&&r&&ig(t),t.flags|=1,Gt(e,t,n,i),t.child)}function kx(e,t,n,r,i){if(on(n)){var o=!0;td(t)}else o=!1;if(Ro(t,i),t.stateNode===null)Lu(e,t),c0(t,n,r),Em(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,u=t.memoizedProps;l.props=u;var d=l.context,f=n.contextType;typeof f=="object"&&f!==null?f=Rn(f):(f=on(n)?Ns:Ut.current,f=na(t,f));var p=n.getDerivedStateFromProps,m=typeof p=="function"||typeof l.getSnapshotBeforeUpdate=="function";m||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==r||d!==f)&&Sx(t,l,r,f),hi=!1;var g=t.memoizedState;l.state=g,od(t,r,l,i),d=t.memoizedState,u!==r||g!==d||sn.current||hi?(typeof p=="function"&&(Cm(t,n,p,r),d=t.memoizedState),(u=hi||_x(t,n,u,r,g,d,f))?(m||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=d),l.props=r,l.state=d,l.context=f,r=u):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,q_(e,t),u=t.memoizedProps,f=t.type===t.elementType?u:Wn(t.type,u),l.props=f,m=t.pendingProps,g=l.context,d=n.contextType,typeof d=="object"&&d!==null?d=Rn(d):(d=on(n)?Ns:Ut.current,d=na(t,d));var y=n.getDerivedStateFromProps;(p=typeof y=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==m||g!==d)&&Sx(t,l,r,d),hi=!1,g=t.memoizedState,l.state=g,od(t,r,l,i);var w=t.memoizedState;u!==m||g!==w||sn.current||hi?(typeof y=="function"&&(Cm(t,n,y,r),w=t.memoizedState),(f=hi||_x(t,n,f,r,g,w,d)||!1)?(p||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,w,d),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,w,d)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||u===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),l.props=r,l.state=w,l.context=d,r=f):(typeof l.componentDidUpdate!="function"||u===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return Pm(e,t,n,r,o,i)}function Pm(e,t,n,r,i,o){m0(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&mx(t,n,!1),Gr(e,t,o);r=t.stateNode,Gk.current=t;var u=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=ia(t,e.child,null,o),t.child=ia(t,null,u,o)):Gt(e,t,u,o),t.memoizedState=r.state,i&&mx(t,n,!0),t.child}function p0(e){var t=e.stateNode;t.pendingContext?fx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fx(e,t.context,!1),hg(e,t.containerInfo)}function Px(e,t,n,r,i){return ra(),og(i),t.flags|=256,Gt(e,t,n,r),t.child}var Am={dehydrated:null,treeContext:null,retryLane:0};function Om(e){return{baseLanes:e,cachePool:null,transitions:null}}function g0(e,t,n){var r=t.pendingProps,i=ot.current,o=!1,l=(t.flags&128)!==0,u;if((u=l)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!==0),u?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ye(ot,i&1),e===null)return jm(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=Kd(l,r,0,null),e=Ss(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Om(n),t.memoizedState=Am,e):bg(t,l));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return Kk(e,t,l,r,u,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,u=i.sibling;var d={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=d,t.deletions=null):(r=zi(i,d),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?o=zi(u,o):(o=Ss(o,l,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=e.child.memoizedState,l=l===null?Om(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Am,r}return o=e.child,e=o.sibling,r=zi(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function bg(e,t){return t=Kd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function cu(e,t,n,r){return r!==null&&og(r),ia(t,e.child,null,n),e=bg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kk(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=xf(Error(J(422))),cu(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Kd({mode:"visible",children:r.children},i,0,null),o=Ss(o,i,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&ia(t,e.child,null,l),t.child.memoizedState=Om(l),t.memoizedState=Am,o);if(!(t.mode&1))return cu(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error(J(419)),r=xf(o,r,void 0),cu(e,t,l,r)}if(u=(l&e.childLanes)!==0,rn||u){if(r=kt,r!==null){switch(l&-l){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|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Hr(e,i),er(r,e,i,-1))}return Cg(),r=xf(Error(J(421))),cu(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=aP.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,vn=Oi(i.nextSibling),yn=t,rt=!0,Qn=null,e!==null&&(kn[Pn++]=Fr,kn[Pn++]=Br,kn[Pn++]=Cs,Fr=e.id,Br=e.overflow,Cs=t),t=bg(t,r.children),t.flags|=4096,t)}function Ax(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Nm(e.return,t,n)}function bf(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function v0(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Gt(e,t,r.children,n),r=ot.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ax(e,n,t);else if(e.tag===19)Ax(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ye(ot,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ad(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),bf(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ad(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}bf(t,!0,n,null,o);break;case"together":bf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Lu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ts|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(J(153));if(t.child!==null){for(e=t.child,n=zi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Zk(e,t,n){switch(t.tag){case 3:p0(t),ra();break;case 5:U_(t);break;case 1:on(t.type)&&td(t);break;case 4:hg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ye(id,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ye(ot,ot.current&1),t.flags|=128,null):n&t.child.childLanes?g0(e,t,n
vendor: 4,883 bytes, line 40
40):(Ye(ot,ot.current&1),e=Gr(e,t,n),e!==null?e.sibling:null);Ye(ot,ot.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return v0(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ye(ot,ot.current),r)break;return null;case 22:case 23:return t.lanes=0,f0(e,t,n)}return Gr(e,t,n)}var y0,Rm,x0,b0;y0=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Rm=function(){};x0=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,fs(_r.current);var o=null;switch(n){case"input":i=tm(e,i),r=tm(e,r),o=[];break;case"select":i=lt({},i,{value:void 0}),r=lt({},r,{value:void 0}),o=[];break;case"textarea":i=im(e,i),r=im(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xu)}om(n,r);var l;n=null;for(f in i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&i[f]!=null)if(f==="style"){var u=i[f];for(l in u)u.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Rl.hasOwnProperty(f)?o||(o=[]):(o=o||[]).push(f,null));for(f in r){var d=r[f];if(u=i!=null?i[f]:void 0,r.hasOwnProperty(f)&&d!==u&&(d!=null||u!=null))if(f==="style")if(u){for(l in u)!u.hasOwnProperty(l)||d&&d.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in d)d.hasOwnProperty(l)&&u[l]!==d[l]&&(n||(n={}),n[l]=d[l])}else n||(o||(o=[]),o.push(f,n)),n=d;else f==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,u=u?u.__html:void 0,d!=null&&u!==d&&(o=o||[]).push(f,d)):f==="children"?typeof d!="string"&&typeof d!="number"||(o=o||[]).push(f,""+d):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(Rl.hasOwnProperty(f)?(d!=null&&f==="onScroll"&&Xe("scroll",e),o||u===d||(o=[])):(o=o||[]).push(f,d))}n&&(o=o||[]).push("style",n);var f=o;(t.updateQueue=f)&&(t.flags|=4)}};b0=function(e,t,n,r){n!==r&&(t.flags|=4)};function ll(e,t){if(!rt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ft(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Qk(e,t,n){var r=t.pendingProps;switch(sg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ft(t),null;case 1:return on(t.type)&&ed(),Ft(t),null;case 3:return r=t.stateNode,sa(),et(sn),et(Ut),mg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(au(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qn!==null&&($m(Qn),Qn=null))),Rm(e,t),Ft(t),null;case 5:fg(t);var i=fs(Wl.current);if(n=t.type,e!==null&&t.stateNode!=null)x0(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(J(166));return Ft(t),null}if(e=fs(_r.current),au(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[xr]=t,r[Ul]=o,e=(t.mode&1)!==0,n){case"dialog":Xe("cancel",r),Xe("close",r);break;case"iframe":case"object":case"embed":Xe("load",r);break;case"video":case"audio":for(i=0;i<pl.length;i++)Xe(pl[i],r);break;case"source":Xe("error",r);break;case"img":case"image":case"link":Xe("error",r),Xe("load",r);break;case"details":Xe("toggle",r);break;case"input":By(r,o),Xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Xe("invalid",r);break;case"textarea":qy(r,o),Xe("invalid",r)}om(n,o),i=null;for(var l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="children"?typeof u=="string"?r.textContent!==u&&(o.suppressHydrationWarning!==!0&&ou(r.textContent,u,e),i=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(o.suppressHydrationWarning!==!0&&ou(r.textContent,u,e),i=["children",""+u]):Rl.hasOwnProperty(l)&&u!=null&&l==="onScroll"&&Xe("scroll",r)}switch(n){case"input":Jc(r),$y(r,o,!0);break;case"textarea":Jc(r),Uy(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Xu)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Kw(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[xr]=t,e[Ul]=r,y0(e,t,!1,!1),t.stateNode=e;e:{switch(l=am(n,r),n){case"dialog":Xe("cancel",e),Xe("close",e),i=r;break;case"iframe":case"object":case"embed":Xe("load",e),i=r;break;case"video":case"audio":for(i=0;i<pl.length;i++)Xe(pl[i],e);i=r;break;case"source":Xe("error",e),i=r;break;case"img":case"image":case"link":Xe("error",e),Xe("load",e),i=r;break;case"details":Xe("toggle",e),i=r;break;case"input":By(e,r),i=tm(e,r),Xe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=lt({},r,{value:void 0}),Xe("invalid",e);break;case"textarea":qy(e,r),i=im(e,r),Xe("invalid",e);break;default:i=r}om(n,i),u=i;for(o in u)if(u.hasOwnProperty(o)){var d=u[o];o==="style"?Yw(e,d):o==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,d!=null&&Zw(e,d)):o==="children"?typeof d=="string"?(n!=="textarea"||d!=="")&&Il(e,d):typeof d=="number"&&Il(e,""+d):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Rl.hasOwnProperty(o)?d!=null&&o==="onScroll"&&Xe("scroll",e):d!=null&&Vp(e,o,d,l))}switch(n){case"input":Jc(e),$y(e,r,!1);break;case"textarea":Jc(e),Uy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Di(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?ko(e,!!r.multiple,o,!1):r.defaultValue!=null&&ko(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Xu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ft(t),null;case 6:if(e&&t.stateNode!=null)b0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(J(166));if(n=fs(Wl.current),fs(_r.current),au(t)){if(r=t.stateNode,n=t.memoizedProps,r[xr]=t,(o=r.nodeValue!==n)&&(e=yn,e!==null))switch(e.tag){case 3:ou(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ou(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[xr]=t,t.stateNode=r}return Ft(t),null;case 13:if(et(ot),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(rt&&vn!==null&&t.mode&1&&!(t.flags&128))D_(),ra(),t.flags|=98560,o=!1;else if(o=au(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(J(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(J(317));o[xr]=t}else ra(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ft(t),o=!1}else Qn!==null&&($m(Qn),Qn=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ot.current&1?Nt===0&&(Nt=3):Cg())),t.updateQueue!==null&&(t.flags|=4),Ft(t),null);case 4:return sa(),Rm(e,t),e===null&&$l(t.stateNode.containerInfo),Ft(t),null;case 10:return cg(t.type._context),Ft(t),null;case 17:return on(t.type)&&ed(),Ft(t),null;case 19:if(et(ot),o=t.memoizedState,o===null)return Ft(t),null;if(r=(t.flags&128)!==0,l=o.rendering,l===null)if(r)ll(o,!1);else{if(Nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=ad(e),l!==null){for(t.flags|=128,ll(o,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,l=o.alternate,l===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ye(ot,ot.current&1|2),t.child}e=e.sibling}o.tail!==null&&ft()>aa&&(t.flags|=128,r=!0,ll(o,!1),t.lanes=4194304)}else{if(!r)if(e=ad(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ll(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!rt)return Ft(t),null}else 2*ft()-o.renderingStartTime>aa&&n!==1073741824&&(t.flags|=128,r=!0,ll(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ft(),t.sibling=null,n=ot.current,Ye(ot,r?n&1|2:n&1),t):(Ft(t),null);case 22:case 23:return Ng(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?fn&1073741824&&(Ft(t),t.subtreeFlags&6&&(t.flags|=8192)):Ft(t),null;case 24:return null;case 25:return null}throw Error(J(156,t.tag))}function Yk(e,t){switch(sg(t),t.tag){case 1:return on(t.type)&&ed(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 25,826 bytes, line 40
40case 3:return sa(),et(sn),et(Ut),mg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return fg(t),null;case 13:if(et(ot),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(J(340));ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return et(ot),null;case 4:return sa(),null;case 10:return cg(t.type._context),null;case 22:case 23:return Ng(),null;case 24:return null;default:return null}}var uu=!1,$t=!1,Jk=typeof WeakSet=="function"?WeakSet:Set,ce=null;function Co(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){dt(e,t,r)}else n.current=null}function Im(e,t,n){try{n()}catch(r){dt(e,t,r)}}var Ox=!1;function Xk(e,t){if(vm=Qu,e=N_(),rg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,u=-1,d=-1,f=0,p=0,m=e,g=null;t:for(;;){for(var y;m!==n||i!==0&&m.nodeType!==3||(u=l+i),m!==o||r!==0&&m.nodeType!==3||(d=l+r),m.nodeType===3&&(l+=m.nodeValue.length),(y=m.firstChild)!==null;)g=m,m=y;for(;;){if(m===e)break t;if(g===n&&++f===i&&(u=l),g===o&&++p===r&&(d=l),(y=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=y}n=u===-1||d===-1?null:{start:u,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(ym={focusedElem:e,selectionRange:n},Qu=!1,ce=t;ce!==null;)if(t=ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ce=e;else for(;ce!==null;){t=ce;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var b=w.memoizedProps,C=w.memoizedState,j=t.stateNode,_=j.getSnapshotBeforeUpdate(t.elementType===t.type?b:Wn(t.type,b),C);j.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var N=t.stateNode.containerInfo;N.nodeType===1?N.textContent="":N.nodeType===9&&N.documentElement&&N.removeChild(N.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(J(163))}}catch(A){dt(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,ce=e;break}ce=t.return}return w=Ox,Ox=!1,w}function Nl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Im(t,n,o)}i=i.next}while(i!==r)}}function Hd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Lm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function w0(e){var t=e.alternate;t!==null&&(e.alternate=null,w0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[xr],delete t[Ul],delete t[wm],delete t[Lk],delete t[zk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _0(e){return e.tag===5||e.tag===3||e.tag===4}function Rx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xu));else if(r!==4&&(e=e.child,e!==null))for(zm(e,t,n),e=e.sibling;e!==null;)zm(e,t,n),e=e.sibling}function Mm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Mm(e,t,n),e=e.sibling;e!==null;)Mm(e,t,n),e=e.sibling}var It=null,Kn=!1;function si(e,t,n){for(n=n.child;n!==null;)S0(e,t,n),n=n.sibling}function S0(e,t,n){if(wr&&typeof wr.onCommitFiberUnmount=="function")try{wr.onCommitFiberUnmount(Dd,n)}catch{}switch(n.tag){case 5:$t||Co(n,t);case 6:var r=It,i=Kn;It=null,si(e,t,n),It=r,Kn=i,It!==null&&(Kn?(e=It,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):It.removeChild(n.stateNode));break;case 18:It!==null&&(Kn?(e=It,n=n.stateNode,e.nodeType===8?ff(e.parentNode,n):e.nodeType===1&&ff(e,n),Dl(e)):ff(It,n.stateNode));break;case 4:r=It,i=Kn,It=n.stateNode.containerInfo,Kn=!0,si(e,t,n),It=r,Kn=i;break;case 0:case 11:case 14:case 15:if(!$t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Im(n,t,l),i=i.next}while(i!==r)}si(e,t,n);break;case 1:if(!$t&&(Co(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){dt(n,t,u)}si(e,t,n);break;case 21:si(e,t,n);break;case 22:n.mode&1?($t=(r=$t)||n.memoizedState!==null,si(e,t,n),$t=r):si(e,t,n);break;default:si(e,t,n)}}function Ix(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Jk),t.forEach(function(r){var i=lP.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function qn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,l=t,u=l;e:for(;u!==null;){switch(u.tag){case 5:It=u.stateNode,Kn=!1;break e;case 3:It=u.stateNode.containerInfo,Kn=!0;break e;case 4:It=u.stateNode.containerInfo,Kn=!0;break e}u=u.return}if(It===null)throw Error(J(160));S0(o,l,i),It=null,Kn=!1;var d=i.alternate;d!==null&&(d.return=null),i.return=null}catch(f){dt(i,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)j0(t,e),t=t.sibling}function j0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qn(t,e),fr(e),r&4){try{Nl(3,e,e.return),Hd(3,e)}catch(b){dt(e,e.return,b)}try{Nl(5,e,e.return)}catch(b){dt(e,e.return,b)}}break;case 1:qn(t,e),fr(e),r&512&&n!==null&&Co(n,n.return);break;case 5:if(qn(t,e),fr(e),r&512&&n!==null&&Co(n,n.return),e.flags&32){var i=e.stateNode;try{Il(i,"")}catch(b){dt(e,e.return,b)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,l=n!==null?n.memoizedProps:o,u=e.type,d=e.updateQueue;if(e.updateQueue=null,d!==null)try{u==="input"&&o.type==="radio"&&o.name!=null&&Hw(i,o),am(u,l);var f=am(u,o);for(l=0;l<d.length;l+=2){var p=d[l],m=d[l+1];p==="style"?Yw(i,m):p==="dangerouslySetInnerHTML"?Zw(i,m):p==="children"?Il(i,m):Vp(i,p,m,f)}switch(u){case"input":nm(i,o);break;case"textarea":Gw(i,o);break;case"select":var g=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?ko(i,!!o.multiple,y,!1):g!==!!o.multiple&&(o.defaultValue!=null?ko(i,!!o.multiple,o.defaultValue,!0):ko(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ul]=o}catch(b){dt(e,e.return,b)}}break;case 6:if(qn(t,e),fr(e),r&4){if(e.stateNode===null)throw Error(J(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(b){dt(e,e.return,b)}}break;case 3:if(qn(t,e),fr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Dl(t.containerInfo)}catch(b){dt(e,e.return,b)}break;case 4:qn(t,e),fr(e);break;case 13:qn(t,e),fr(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Sg=ft())),r&4&&Ix(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?($t=(f=$t)||p,qn(t,e),$t=f):qn(t,e),fr(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!p&&e.mode&1)for(ce=e,p=e.child;p!==null;){for(m=ce=p;ce!==null;){switch(g=ce,y=g.child,g.tag){case 0:case 11:case 14:case 15:Nl(4,g,g.return);break;case 1:Co(g,g.return);var w=g.stateNode;if(typeof w.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(b){dt(r,n,b)}}break;case 5:Co(g,g.return);break;case 22:if(g.memoizedState!==null){zx(m);continue}}y!==null?(y.return=g,ce=y):zx(m)}p=p.sibling}e:for(p=null,m=e;;){if(m.tag===5){if(p===null){p=m;try{i=m.stateNode,f?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(u=m.stateNode,d=m.memoizedProps.style,l=d!=null&&d.hasOwnProperty("display")?d.display:null,u.style.display=Qw("display",l))}catch(b){dt(e,e.return,b)}}}else if(m.tag===6){if(p===null)try{m.stateNode.nodeValue=f?"":m.memoizedProps}catch(b){dt(e,e.return,b)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;p===m&&(p=null),m=m.return}p===m&&(p=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:qn(t,e),fr(e),r&4&&Ix(e);break;case 21:break;default:qn(t,e),fr(e)}}function fr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(_0(n)){var r=n;break e}n=n.return}throw Error(J(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Il(i,""),r.flags&=-33);var o=Rx(e);Mm(e,o,i);break;case 3:case 4:var l=r.stateNode.containerInfo,u=Rx(e);zm(e,u,l);break;default:throw Error(J(161))}}catch(d){dt(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function eP(e,t,n){ce=e,N0(e)}function N0(e,t,n){for(var r=(e.mode&1)!==0;ce!==null;){var i=ce,o=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||uu;if(!l){var u=i.alternate,d=u!==null&&u.memoizedState!==null||$t;u=uu;var f=$t;if(uu=l,($t=d)&&!f)for(ce=i;ce!==null;)l=ce,d=l.child,l.tag===22&&l.memoizedState!==null?Mx(i):d!==null?(d.return=l,ce=d):Mx(i);for(;o!==null;)ce=o,N0(o),o=o.sibling;ce=i,uu=u,$t=f}Lx(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,ce=o):Lx(e)}}function Lx(e){for(;ce!==null;){var t=ce;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:$t||Hd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!$t)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Wn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&xx(t,o,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xx(t,l,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var d=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":d.autoFocus&&n.focus();break;case"img":d.src&&(n.src=d.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var p=f.memoizedState;if(p!==null){var m=p.dehydrated;m!==null&&Dl(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(J(163))}$t||t.flags&512&&Lm(t)}catch(g){dt(t,t.return,g)}}if(t===e){ce=null;break}if(n=t.sibling,n!==null){n.return=t.return,ce=n;break}ce=t.return}}function zx(e){for(;ce!==null;){var t=ce;if(t===e){ce=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ce=n;break}ce=t.return}}function Mx(e){for(;ce!==null;){var t=ce;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Hd(4,t)}catch(d){dt(t,n,d)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(d){dt(t,i,d)}}var o=t.return;try{Lm(t)}catch(d){dt(t,o,d)}break;case 5:var l=t.return;try{Lm(t)}catch(d){dt(t,l,d)}}}catch(d){dt(t,t.return,d)}if(t===e){ce=null;break}var u=t.sibling;if(u!==null){u.return=t.return,ce=u;break}ce=t.return}}var tP=Math.ceil,ud=Yr.ReactCurrentDispatcher,wg=Yr.ReactCurrentOwner,On=Yr.ReactCurrentBatchConfig,Be=0,kt=null,xt=null,zt=0,fn=0,Eo=Hi(0),Nt=0,Zl=null,Ts=0,Gd=0,_g=0,Cl=null,nn=null,Sg=0,aa=1/0,Lr=null,dd=!1,Dm=null,Ii=null,du=!1,Ei=null,hd=0,El=0,Fm=null,zu=-1,Mu=0;function Qt(){return Be&6?ft():zu!==-1?zu:zu=ft()}function Li(e){return e.mode&1?Be&2&&zt!==0?zt&-zt:Dk.transition!==null?(Mu===0&&(Mu=c_()),Mu):(e=He,e!==0||(e=window.event,e=e===void 0?16:g_(e.type)),e):1}function er(e,t,n,r){if(50<El)throw El=0,Fm=null,Error(J(185));gc(e,n,r),(!(Be&2)||e!==kt)&&(e===kt&&(!(Be&2)&&(Gd|=n),Nt===4&&pi(e,zt)),an(e,r),n===1&&Be===0&&!(t.mode&1)&&(aa=ft()+500,Ud&&Gi()))}function an(e,t){var n=e.callbackNode;DT(e,t);var r=Zu(e,e===kt?zt:0);if(r===0)n!==null&&Hy(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Hy(n),t===1)e.tag===0?Mk(Dx.bind(null,e)):L_(Dx.bind(null,e)),Rk(function(){!(Be&6)&&Gi()}),n=null;else{switch(u_(r)){case 1:n=Zp;break;case 4:n=a_;break;case 16:n=Ku;break;case 536870912:n=l_;break;default:n=Ku}n=R0(n,C0.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function C0(e,t){if(zu=-1,Mu=0,Be&6)throw Error(J(327));var n=e.callbackNode;if(Io()&&e.callbackNode!==n)return null;var r=Zu(e,e===kt?zt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=fd(e,r);else{t=r;var i=Be;Be|=2;var o=T0();(kt!==e||zt!==t)&&(Lr=null,aa=ft()+500,_s(e,t));do try{iP();break}catch(u){E0(e,u)}while(!0);lg(),ud.current=o,Be=i,xt!==null?t=0:(kt=null,zt=0,t=Nt)}if(t!==0){if(t===2&&(i=hm(e),i!==0&&(r=i,t=Bm(e,i))),t===1)throw n=Zl,_s(e,0),pi(e,r),an(e,ft()),n;if(t===6)pi(e,r);else{if(i=e.current.alternate,!(r&30)&&!nP(i)&&(t=fd(e,r),t===2&&(o=hm(e),o!==0&&(r=o,t=Bm(e,o))),t===1))throw n=Zl,_s(e,0),pi(e,r),an(e,ft()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(J(345));case 2:as(e,nn,Lr);break;case 3:if(pi(e,r),(r&130023424)===r&&(t=Sg+500-ft(),10<t)){if(Zu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Qt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=bm(as.bind(null,e,nn,Lr),t);break}as(e,nn,Lr);break;case 4:if(pi(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-Xn(r);o=1<<l,l=t[l],l>i&&(i=l),r&=~o}if(r=i,r=ft()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tP(r/1960))-r,10<r){e.timeoutHandle=bm(as.bind(null,e,nn,Lr),r);break}as(e,nn,Lr);break;case 5:as(e,nn,Lr);break;default:throw Error(J(329))}}}return an(e,ft()),e.callbackNode===n?C0.bind(null,e):null}function Bm(e,t){var n=Cl;return e.current.memoizedState.isDehydrated&&(_s(e,t).flags|=256),e=fd(e,t),e!==2&&(t=nn,nn=n,t!==null&&$m(t)),e}function $m(e){nn===null?nn=e:nn.push.apply(nn,e)}function nP(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!tr(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function pi(e,t){for(t&=~_g,t&=~Gd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Xn(t),r=1<<n;e[n]=-1,t&=~r}}function Dx(e){if(Be&6)throw Error(J(327));Io();var t=Zu(e,0);if(!(t&1))return an(e,ft()),null;var n=fd(e,t);if(e.tag!==0&&n===2){var r=hm(e);r!==0&&(t=r,n=Bm(e,r))}if(n===1)throw n=Zl,_s(e,0),pi(e,t),an(e,ft()),n;if(n===6)throw Error(J(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,as(e,nn,Lr),an(e,ft()),null}function jg(e,t){var n=Be;Be|=1;try{return e(t)}finally{Be=n,Be===0&&(aa=ft()+500,Ud&&Gi())}}function ks(e){Ei!==null&&Ei.tag===0&&!(Be&6)&&Io();var t=Be;Be|=1;var n=On.transition,r=He;try{if(On.transition=null,He=1,e)return e()}finally{He=r,On.transition=n,Be=t,!(Be&6)&&Gi()}}function Ng(){fn=Eo.current,et(Eo)}function _s(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ok(n)),xt!==null)for(n=xt.return;n!==null;){var r=n;switch(sg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ed();break;case 3:sa(),et(sn),et(Ut),mg();break;case 5:fg(r);break;case 4:sa();break;case 13:et(ot);break;case 19:et(ot);break;case 10:cg(r.type._context);break;case 22:case 23:Ng()}n=n.return}if(kt=e,xt=e=zi(e.current,null),zt=fn=t,Nt=0,Zl=null,_g=Gd=Ts=0,nn=Cl=null,hs!==null){for(t=0;t<hs.length;t++)if(n=hs[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var l=o.next;o.next=i,r.next=l}n.pending=r}hs=null}return e}function E0(e,t){do{var n=xt;try{if(lg(),Ru.current=cd,ld){for(var r=at.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ld=!1}if(Es=0,Et=St=at=null,jl=!1,Hl=0,wg.current=null,n===null||n.return===null){Nt=1,Zl=t,xt=null;break}e:{var o=e,l=n.return,u=n,d=t;if(t=zt,u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){var f=d,p=u,m=p.tag;if(!(p.mode&1)&&(m===0||m===11||m===15)){var g=p.alternate;g?(p.updateQueue=g.updateQueue,p.memoizedState=g.memoizedState,p.lanes=g.lanes):(p.updateQueue=null,p.memoizedState=null)}var y=Nx(l);if(y!==null){y.flags&=-257,Cx(y,l,u,o,t),y.mode&1&&jx(o,f,t),t=y,d=f;var w=t.updateQueue;if(w===null){var b=new Set;b.add(d),t.updateQueue=b}else w.add(d);break e}else{if(!(t&1)){jx(o,f,t),Cg();break e}d=Error(J(426))}}else if(rt&&u.mode&1){var C=Nx(l);if(C!==null){!(C.flags&65536)&&(C.flags|=256),Cx(C,l,u,o,t),og(oa(d,u));break e}}o=d=oa(d,u),Nt!==4&&(Nt=2),Cl===null?Cl=[o]:Cl.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var j=u0(o,d,t);yx(o,j);break e;case 1:u=d;var _=o.type,N=o.stateNode;if(!(o.flags&128)&&(typeof _.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Ii===null||!Ii.has(N)))){o.flags|=65536,t&=-t,o.lanes|=t;var A=d0(o,u,t);yx(o,A);break e}}o=o.return}while(o!==null)}P0(n)}catch(k){t=k,xt===n&&n!==null&&(xt=n=n.return);continue}break}while(!0)}function T0(){var e=ud.current;return ud.current=cd,e===null?cd:e}function Cg(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),kt===null||!(Ts&268435455)&&!(Gd&268435455)||pi(kt,zt)}function fd(e,t){var n=Be;Be|=2;var r=T0();(kt!==e||zt!==t)&&(Lr=null,_s(e,t));do try{rP();break}catch(i){E0(e,i)}while(!0);if(lg(),Be=n,ud.current=r,xt!==null)throw Error(J(261));return kt=null,zt=0,Nt}function rP(){for(;xt!==null;)k0(xt)}function iP(){for(;xt!==null&&!kT();)k0(xt)}function k0(e){var t=O0(e.alternate,e,fn);e.memoizedProps=e.pendingProps,t===null?P0(e):xt=t,wg.current=null}function P0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Yk(n,t),n!==null){n.flags&=32767,xt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Nt=6,xt=null;return}}else if(n=Qk(n,t,fn),n!==null){xt=n;return}if(t=t.sibling,t!==null){xt=t;return}xt=t=e}while(t!==null);Nt===0&&(Nt=5)}function as(e,t,n){var r=He,i=On.transition;try{On.transition=null,He=1,sP(e,t,n,r)}finally{On.transition=i,He=r}return null}function sP(e,t,n,r){do Io();while(Ei!==null);if(Be&6)throw Error(J(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(J(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(FT(e,o),e===kt&&(xt=kt=null,zt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||du||(du=!0,R0(Ku,function(){return Io(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=On.transition,On.transition=null;var l=He;He=1;var u=Be;Be|=4,wg.current=null,Xk(e,n),j0(n,e),Nk(ym),Qu=!!vm,ym=vm=null,e.current=n,eP(n),PT(),Be=u,He=l,On.transition=o}else e.current=n;if(du&&(du=!1,Ei=e,hd=i),o=e.pendingLanes,o===0&&(Ii=null),RT(n.stateNode),an(e,ft()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(dd)throw dd=!1,e=Dm,Dm=null,e;return hd&1&&e.tag!==0&&Io(),o=e.pendingLanes,o&1?e===Fm?El++:(El=0,Fm=e):El=0,Gi(),null}function Io(){if(Ei!==null){var e=u_(hd),t=On.transition,n=He;try{if(On.transition=null,He=16>e?16:e,Ei===null)var r=!1;else{if(e=Ei,Ei=null,hd=0,Be&6)throw Error(J(331));var i=Be;for(Be|=4,ce=e.current;ce!==null;){var o=ce,l=o.child;if(ce.flags&16){var u=o.deletions;if(u!==null){for(var d=0;d<u.length;d++){var f=u[d];for(ce=f;ce!==null;){var p=ce;switch(p.tag){case 0:case 11:case 15:Nl(8,p,o)}var m=p.child;if(m!==null)m.return=p,ce=m;else for(;ce!==null;){p=ce;var g=p.sibling,y=p.return;if(w0(p),p===f){ce=null;break}if(g!==null){g.return=y,ce=g;break}ce=y}}}var w=o.alternate;if(w!==null){var b=w.child;if(b!==null){w.child=null;do{var C=b.sibling;b.sibling=null,b=C}while(b!==null)}}ce=o}}if(o.subtreeFlags&2064&&l!==null)l.return=o,ce=l;else e:for(;ce!==null;){if(o=ce,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Nl(9,o,o.return)}var j=o.sibling;if(j!==null){j.return=o.return,ce=j;break e}ce=o.return}}var _=e.current;for(ce=_;ce!==null;){l=ce;var N=l.child;if(l.subtreeFlags&2064&&N!==null)N.return=l,ce=N;else e:for(l=_;ce!==null;){if(u=ce,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Hd(9,u)}}catch(k){dt(u,u.return,k)}if(u===l){ce=null;break e}var A=u.sibling;if(A!==null){A.return=u.return,ce=A;break e}ce=u.return}}if(Be=i,Gi(),wr&&typeof wr.onPostCommitFiberRoot=="function")try{wr.onPostCommitFiberRoot(Dd,e)}catch{}r=!0}return r}finally{He=n,On.transition=t}}return!1}function Fx(e,t,n){t=oa(n,t),t=u0(e,t,1),e=Ri(e,t,1),t=Qt(),e!==null&&(gc(e,1,t),an(e,t))}function dt(e,t,n){if(e.tag===3)Fx(e,e,n);else for(;t!==null;){if(t.tag===3){Fx(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ii===null||!Ii.has(r))){e=oa(n,e),e=d0(t,e,1),t=Ri(t,e,1),e=Qt(),t!==null&&(gc(t,1,e),an(t,e));break}}t=t.return}}function oP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Qt(),e.pingedLanes|=e.suspendedLanes&n,kt===e&&(zt&n)===n&&(Nt===4||Nt===3&&(zt&130023424)===zt&&500>ft()-Sg?_s(e,0):_g|=n),an(e,t)}function A0(e,t){t===0&&(e.mode&1?(t=tu,tu<<=1,!(tu&130023424)&&(tu=4194304)):t=1);var n=Qt();e=Hr(e,t),e!==null&&(gc(e,t,n),an(e,n))}function aP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),A0(e,n)}function lP(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(J(314))}r!==null&&r.delete(t),A0(e,n)}var O0;O0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||sn.current)rn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rn=!1,Zk(e,t,n);rn=!!(e.flags&131072)}else rn=!1,rt&&t.flags&1048576&&z_(t,rd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Lu(e,t),e=t.pendingProps;var i=na(t,Ut.current);Ro(t,n),i=gg(null,t,r,e,i,n);var o=vg();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,on(r)?(o=!0,td(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,dg(t),i.updater=Wd,t.stateNode=i,i._reactInternals=t,Em(t,r,e,n),t=Pm(null,t,r,!0,o,n)):(t.tag=0,rt&&o&&ig(t),Gt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Lu(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=uP(r),e=Wn(r,e),i){case 0:t=km(null,t,r,e,n);break e;case 1:t=kx(null,t,r,e,n);break e;case 11:t=Ex(null,t,r,e,n);break e;case 14:t=Tx(null,t,r,Wn(r.type,e),n);break e}throw Error(J(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wn(r,i),km(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wn(r,i),kx(e,t,r,i,n);case 3:e:{if(p0(t),e===null)throw Error(J(387));r=t.pendingProps,o=t.memoizedState,i=o.element,q_(e,t),od(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=oa(Error(J(423)),t),t=Px(e,t,r,n,i);break e}else if(r!==i){i=oa(Error(J(424)),t),t=Px(e,t,r,n,i);break e}else for(vn=Oi(t.stateNode.containerInfo.firstChild),yn=t,rt=!0,Qn=null,n=B_(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ra(),r===i){t=Gr(e,t,n);break e}Gt(e,t,r,n)}t=t.child}return t;case 5:return U_(t),e===null&&jm(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,xm(r,i)?l=null:o!==null&&xm(r,o)&&(t.flags|=32),m0(e,t),Gt(e,t,l,n),t.child;case 6:return e===null&&jm(t),null;case 13:return g0(e,t,n);case 4:return hg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ia(t,null,r,n):Gt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wn(r,i),Ex(e,t,r,i,n);case 7:return Gt(e,t,t.pendingProps,n),t.child;case 8:return Gt(e,t,t.pendingProps.children,n),t.child;case 12:return Gt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Ye(id,r._currentValue),r._currentValue=l,o!==null)if(tr(o.value,l)){if(o.children===i.children&&!sn.current){t=Gr(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){l=o.child;for(var d=u.firstContext;d!==null;){if(d.context===r){if(o.tag===1){d=$r(-1,n&-n),d.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var p=f.pending;p===null?d.next=d:(d.next=p.next,p.next=d),f.pending=d}}o.lanes|=n,d=o.alternate,d!==null&&(d.lanes|=n),Nm(o.return,n,t),u.lanes|=n;break}d=d.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(J(341));l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Nm(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}Gt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ro(t,n),i=Rn(i),r=r(i),t.flags|=1,Gt(e,t,r,n),t.child;case 14:return r=t.type,i=Wn(r,t.pendingProps),i=Wn(r.type,i),Tx(e,t,r,i,n);case 15:return h0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wn(r,i),Lu(e,t),t.tag=1,on(r)?(e=!0,td(t)):e=!1,Ro(t,n),c0(t,r,i),Em(t,r,i,n),Pm(null,t,r,!0,e,n);case 19:return v0(e,t,n);
vendor: 7,750 bytes, line 40
40case 22:return f0(e,t,n)}throw Error(J(156,t.tag))};function R0(e,t){return o_(e,t)}function cP(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(e,t,n,r){return new cP(e,t,n,r)}function Eg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uP(e){if(typeof e=="function")return Eg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hp)return 11;if(e===Gp)return 14}return 2}function zi(e,t){var n=e.alternate;return n===null?(n=An(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Du(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")Eg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case vo:return Ss(n.children,i,o,t);case Wp:l=8,i|=8;break;case Yf:return e=An(12,n,t,i|2),e.elementType=Yf,e.lanes=o,e;case Jf:return e=An(13,n,t,i),e.elementType=Jf,e.lanes=o,e;case Xf:return e=An(19,n,t,i),e.elementType=Xf,e.lanes=o,e;case Uw:return Kd(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $w:l=10;break e;case qw:l=9;break e;case Hp:l=11;break e;case Gp:l=14;break e;case di:l=16,r=null;break e}throw Error(J(130,e==null?e:typeof e,""))}return t=An(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ss(e,t,n,r){return e=An(7,e,r,t),e.lanes=n,e}function Kd(e,t,n,r){return e=An(22,e,r,t),e.elementType=Uw,e.lanes=n,e.stateNode={isHidden:!1},e}function wf(e,t,n){return e=An(6,e,null,t),e.lanes=n,e}function _f(e,t,n){return t=An(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function dP(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=tf(0),this.expirationTimes=tf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Tg(e,t,n,r,i,o,l,u,d){return e=new dP(e,t,n,u,d),t===1?(t=1,o===!0&&(t|=8)):t=0,o=An(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},dg(o),e}function hP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:go,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function I0(e){if(!e)return Fi;e=e._reactInternals;e:{if(Fs(e)!==e||e.tag!==1)throw Error(J(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(on(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(J(171))}if(e.tag===1){var n=e.type;if(on(n))return I_(e,n,t)}return t}function L0(e,t,n,r,i,o,l,u,d){return e=Tg(n,r,!0,e,i,o,l,u,d),e.context=I0(null),n=e.current,r=Qt(),i=Li(n),o=$r(r,i),o.callback=t??null,Ri(n,o,i),e.current.lanes=i,gc(e,i,r),an(e,r),e}function Zd(e,t,n,r){var i=t.current,o=Qt(),l=Li(i);return n=I0(n),t.context===null?t.context=n:t.pendingContext=n,t=$r(o,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ri(i,t,l),e!==null&&(er(e,i,l,o),Ou(e,i,l)),l}function md(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Bx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kg(e,t){Bx(e,t),(e=e.alternate)&&Bx(e,t)}function fP(){return null}var z0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Pg(e){this._internalRoot=e}Qd.prototype.render=Pg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(J(409));Zd(e,t,null,null)};Qd.prototype.unmount=Pg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ks(function(){Zd(null,e,null,null)}),t[Wr]=null}};function Qd(e){this._internalRoot=e}Qd.prototype.unstable_scheduleHydration=function(e){if(e){var t=f_();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mi.length&&t!==0&&t<mi[n].priority;n++);mi.splice(n,0,e),n===0&&p_(e)}};function Ag(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Yd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $x(){}function mP(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var f=md(l);o.call(f)}}var l=L0(t,r,e,0,null,!1,!1,"",$x);return e._reactRootContainer=l,e[Wr]=l.current,$l(e.nodeType===8?e.parentNode:e),ks(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var u=r;r=function(){var f=md(d);u.call(f)}}var d=Tg(e,0,!1,null,null,!1,!1,"",$x);return e._reactRootContainer=d,e[Wr]=d.current,$l(e.nodeType===8?e.parentNode:e),ks(function(){Zd(t,d,n,r)}),d}function Jd(e,t,n,r,i){var o=n._reactRootContainer;if(o){var l=o;if(typeof i=="function"){var u=i;i=function(){var d=md(l);u.call(d)}}Zd(t,l,e,i)}else l=mP(n,t,e,i,r);return md(l)}d_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ml(t.pendingLanes);n!==0&&(Qp(t,n|1),an(t,ft()),!(Be&6)&&(aa=ft()+500,Gi()))}break;case 13:ks(function(){var r=Hr(e,1);if(r!==null){var i=Qt();er(r,e,1,i)}}),kg(e,1)}};Yp=function(e){if(e.tag===13){var t=Hr(e,134217728);if(t!==null){var n=Qt();er(t,e,134217728,n)}kg(e,134217728)}};h_=function(e){if(e.tag===13){var t=Li(e),n=Hr(e,t);if(n!==null){var r=Qt();er(n,e,t,r)}kg(e,t)}};f_=function(){return He};m_=function(e,t){var n=He;try{return He=e,t()}finally{He=n}};cm=function(e,t,n){switch(t){case"input":if(nm(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=qd(r);if(!i)throw Error(J(90));Ww(r),nm(r,i)}}}break;case"textarea":Gw(e,n);break;case"select":t=n.value,t!=null&&ko(e,!!n.multiple,t,!1)}};e_=jg;t_=ks;var pP={usingClientEntryPoint:!1,Events:[yc,wo,qd,Jw,Xw,jg]},cl={findFiberByHostInstance:ds,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gP={bundleType:cl.bundleType,version:cl.version,rendererPackageName:cl.rendererPackageName,rendererConfig:cl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=i_(e),e===null?null:e.stateNode},findFiberByHostInstance:cl.findFiberByHostInstance||fP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hu.isDisabled&&hu.supportsFiber)try{Dd=hu.inject(gP),wr=hu}catch{}}wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pP;wn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ag(t))throw Error(J(200));return hP(e,t,null,n)};wn.createRoot=function(e,t){if(!Ag(e))throw Error(J(299));var n=!1,r="",i=z0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Tg(e,1,!1,null,null,n,!1,r,i),e[Wr]=t.current,$l(e.nodeType===8?e.parentNode:e),new Pg(t)};wn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(J(188)):(e=Object.keys(e).join(","),Error(J(268,e)));return e=i_(t),e=e===null?null:e.stateNode,e};wn.flushSync=function(e){return ks(e)};wn.hydrate=function(e,t,n){if(!Yd(t))throw Error(J(200));return Jd(null,e,t,!0,n)};wn.hydrateRoot=function(e,t,n){if(!Ag(e))throw Error(J(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",l=z0;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=L0(t,null,e,1,n??null,i,!1,o,l),e[Wr]=t.current,$l(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Qd(t)};wn.render=function(e,t,n){if(!Yd(t))throw Error(J(200));return Jd(null,e,t,!1,n)};wn.unmountComponentAtNode=function(e){if(!Yd(e))throw Error(J(40));return e._reactRootContainer?(ks(function(){Jd(null,null,e,!1,function(){e._reactRootContainer=null,e[Wr]=null})}),!0):!1};wn.unstable_batchedUpdates=jg;wn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Yd(n))throw Error(J(200));if(e==null||e._reactInternals===void 0)throw Error(J(38));return Jd(e,t,n,!1,r)};wn.version="18.3.1-next-f1338f8080-20240426";function M0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(M0)}catch(e){console.error(e)}}M0(),Mw.exports=wn;var Bs=Mw.exports;const D0=Mp(Bs);var F0,qx=Bs;F0=qx.createRoot,qx.hydrateRoot;const vP=1,yP=1e6;let Sf=0;function xP(){return Sf=(Sf+1)%Number.MAX_SAFE_INTEGER,Sf.toString()}const jf=new Map,Ux=e=>{if(jf.has(e))return;const t=setTimeout(()=>{jf.delete(e),Tl({type:"REMOVE_TOAST",toastId:e})},yP);jf.set(e,t)},bP=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,vP)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Ux(n):e.toasts.forEach(r=>{Ux(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Fu=[];let Bu={toasts:[]};function Tl(e){Bu=bP(Bu,e),Fu.forEach(t=>{t(Bu)})}function wP({...e}){const t=xP(),n=i=>Tl({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Tl({type:"DISMISS_TOAST",toastId:t});return Tl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function bc(){const[e,t]=x.useState(Bu);return x.useEffect(()=>(Fu.push(t),()=>{const n=Fu.indexOf(t);n>-1&&Fu.splice(n,1)}),[e]),{...e,toast:wP,dismiss:n=>Tl({type:"DISMISS_TOAST",toastId:n})}}function de(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function _P(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function B0(...e){return t=>e.forEach(n=>_P(n,t))}function ze(...e){return x.useCallback(B0(...e),e)}function SP(e,t=[]){let n=[];function r(o,l){const u=x.createContext(l),d=n.length;n=[...n,l];function f(m){const{scope:g,children:y,...w}=m,b=(g==null?void 0:g[e][d])||u,C=x.useMemo(()=>w,Object.values(w));return a.jsx(b.Provider,{value:C,children:y})}function p(m,g){const y=(g==null?void 0:g[e][d])||u,w=x.useContext(y);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return f.displayName=o+"Provider",[f,p]}const i=()=>{const o=n.map(l=>x.createContext(l));
vendor: 8,577 bytes, line 40
40return function(u){const d=(u==null?void 0:u[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[r,jP(i,...t)]}function jP(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const m=d(o)[`__scope${f}`];return{...u,...m}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Ps=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),o=i.find(NP);if(o){const l=o.props.children,u=i.map(d=>d===o?x.Children.count(l)>1?x.Children.only(null):x.isValidElement(l)?l.props.children:null:d);return a.jsx(qm,{...r,ref:t,children:x.isValidElement(l)?x.cloneElement(l,void 0,u):null})}return a.jsx(qm,{...r,ref:t,children:n})});Ps.displayName="Slot";var qm=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=EP(n);return x.cloneElement(n,{...CP(r,n.props),ref:t?B0(t,i):i})}return x.Children.count(n)>1?x.Children.only(null):null});qm.displayName="SlotClone";var Og=({children:e})=>a.jsx(a.Fragment,{children:e});function NP(e){return x.isValidElement(e)&&e.type===Og}function CP(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{o(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function EP(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Rg(e){const t=e+"CollectionProvider",[n,r]=SP(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=y=>{const{scope:w,children:b}=y,C=ne.useRef(null),j=ne.useRef(new Map).current;return a.jsx(i,{scope:w,itemMap:j,collectionRef:C,children:b})};l.displayName=t;const u=e+"CollectionSlot",d=ne.forwardRef((y,w)=>{const{scope:b,children:C}=y,j=o(u,b),_=ze(w,j.collectionRef);return a.jsx(Ps,{ref:_,children:C})});d.displayName=u;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=ne.forwardRef((y,w)=>{const{scope:b,children:C,...j}=y,_=ne.useRef(null),N=ze(w,_),A=o(f,b);return ne.useEffect(()=>(A.itemMap.set(_,{ref:_,...j}),()=>void A.itemMap.delete(_))),a.jsx(Ps,{[p]:"",ref:N,children:C})});m.displayName=f;function g(y){const w=o(e+"CollectionConsumer",y);return ne.useCallback(()=>{const C=w.collectionRef.current;if(!C)return[];const j=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((A,k)=>j.indexOf(A.ref.current)-j.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:d,ItemSlot:m},g,r]}function TP(e,t){const n=x.createContext(t),r=o=>{const{children:l,...u}=o,d=x.useMemo(()=>u,Object.values(u));return a.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function i(o){const l=x.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Jr(e,t=[]){let n=[];function r(o,l){const u=x.createContext(l),d=n.length;n=[...n,l];const f=m=>{var j;const{scope:g,children:y,...w}=m,b=((j=g==null?void 0:g[e])==null?void 0:j[d])||u,C=x.useMemo(()=>w,Object.values(w));return a.jsx(b.Provider,{value:C,children:y})};f.displayName=o+"Provider";function p(m,g){var b;const y=((b=g==null?void 0:g[e])==null?void 0:b[d])||u,w=x.useContext(y);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[f,p]}const i=()=>{const o=n.map(l=>x.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[r,kP(i,...t)]}function kP(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const m=d(o)[`__scope${f}`];return{...u,...m}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var PP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],je=PP.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:o,...l}=r,u=o?Ps:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $0(e,t){e&&Bs.flushSync(()=>e.dispatchEvent(t))}function mt(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function AP(e,t=globalThis==null?void 0:globalThis.document){const n=mt(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var OP="DismissableLayer",Um="dismissableLayer.update",RP="dismissableLayer.pointerDownOutside",IP="dismissableLayer.focusOutside",Vx,q0=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wc=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,f=x.useContext(q0),[p,m]=x.useState(null),g=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=x.useState({}),w=ze(t,R=>m(R)),b=Array.from(f.layers),[C]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),j=b.indexOf(C),_=p?b.indexOf(p):-1,N=f.layersWithOutsidePointerEventsDisabled.size>0,A=_>=j,k=zP(R=>{const P=R.target,I=[...f.branches].some(O=>O.contains(P));!A||I||(i==null||i(R),l==null||l(R),R.defaultPrevented||u==null||u())},g),T=MP(R=>{const P=R.target;[...f.branches].some(O=>O.contains(P))||(o==null||o(R),l==null||l(R),R.defaultPrevented||u==null||u())},g);return AP(R=>{_===f.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&u&&(R.preventDefault(),u()))},g),x.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Vx=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),Wx(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Vx)}},[p,g,n,f]),x.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),Wx())},[p,f]),x.useEffect(()=>{const R=()=>y({});return document.addEventListener(Um,R),()=>document.removeEventListener(Um,R)},[]),a.jsx(je.div,{...d,ref:w,style:{pointerEvents:N?A?"auto":"none":void 0,...e.style},onFocusCapture:de(e.onFocusCapture,T.onFocusCapture),onBlurCapture:de(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:de(e.onPointerDownCapture,k.onPointerDownCapture)})});wc.displayName=OP;var LP="DismissableLayerBranch",U0=x.forwardRef((e,t)=>{const n=x.useContext(q0),r=x.useRef(null),i=ze(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),a.jsx(je.div,{...e,ref:i})});U0.displayName=LP;function zP(e,t=globalThis==null?void 0:globalThis.document){const n=mt(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){V0(RP,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function MP(e,t=globalThis==null?void 0:globalThis.document){const n=mt(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&V0(IP,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Wx(){const e=new CustomEvent(Um);document.dispatchEvent(e)}function V0(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?$0(i,o):i.dispatchEvent(o)}var DP=wc,FP=U0,Pt=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},BP="Portal",Xd=x.forwardRef((e,t)=>
40{var u;const{container:n,...r}=e,[i,o]=x.useState(!1);Pt(()=>o(!0),[]);const l=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?D0.createPortal(a.jsx(je.div,{...r,ref:t}),l):null});Xd.displayName=BP;function $P(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Mn=e=>{const{present:t,children:n}=e,r=qP(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=ze(r.ref,UP(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};Mn.displayName="Presence";function qP(e){const[t,n]=x.useState(),r=x.useRef({}),i=x.useRef(e),o=x.useRef("none"),l=e?"mounted":"unmounted",[u,d]=$P(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const f=fu(r.current);o.current=u==="mounted"?f:"none"},[u]),Pt(()=>{const f=r.current,p=i.current;if(p!==e){const g=o.current,y=fu(f);e?d("MOUNT"):y==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(p&&g!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),Pt(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,m=y=>{const b=fu(r.current).includes(y.animationName);if(y.target===t&&b&&(d("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},g=y=>{y.target===t&&(o.current=fu(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:x.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function fu(e){return(e==null?void 0:e.animationName)||"none"}function UP(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Bi({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=VP({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:r,u=mt(n),d=x.useCallback(f=>{if(o){const m=typeof f=="function"?f(e):f;m!==e&&u(m)}else i(f)},[o,e,i,u]);return[l,d]}function VP({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,i=x.useRef(r),o=mt(t);return x.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var WP="VisuallyHidden",_c=x.forwardRef((e,t)=>a.jsx(je.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));_c.displayName=WP;var HP=_c,Ig="ToastProvider",[Lg,GP,KP]=Rg("Toast"),[W0,eF]=Jr("Toast",[KP]),[ZP,eh]=W0(Ig),H0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:o=50,children:l}=e,[u,d]=x.useState(null),[f,p]=x.useState(0),m=x.useRef(!1),g=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ig}\`. Expected non-empty \`string\`.`),a.jsx(Lg.Provider,{scope:t,children:a.jsx(ZP,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:o,toastCount:f,viewport:u,onViewportChange:d,onToastAdd:x.useCallback(()=>p(y=>y+1),[]),onToastRemove:x.useCallback(()=>p(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:g,children:l})})};H0.displayName=Ig;var G0="ToastViewport",QP=["F8"],Vm="toast.viewportPause",Wm="toast.viewportResume",K0=x.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=QP,label:i="Notifications ({hotkey})",...o}=e,l=eh(G0,n),u=GP(n),d=x.useRef(null),f=x.useRef(null),p=x.useRef(null),m=x.useRef(null),g=ze(t,m,l.onViewportChange),y=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=l.toastCount>0;x.useEffect(()=>{const C=j=>{var N;r.length!==0&&r.every(A=>j[A]||j.code===A)&&((N=m.current)==null||N.focus())};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[r]),x.useEffect(()=>{const C=d.current,j=m.current;if(w&&C&&j){const _=()=>{if(!l.isClosePausedRef.current){const T=new CustomEvent(Vm);
40j.dispatchEvent(T),l.isClosePausedRef.current=!0}},N=()=>{if(l.isClosePausedRef.current){const T=new CustomEvent(Wm);j.dispatchEvent(T),l.isClosePausedRef.current=!1}},A=T=>{!C.contains(T.relatedTarget)&&N()},k=()=>{C.contains(document.activeElement)||N()};return C.addEventListener("focusin",_),C.addEventListener("focusout",A),C.addEventListener("pointermove",_),C.addEventListener("pointerleave",k),window.addEventListener("blur",_),window.addEventListener("focus",N),()=>{C.removeEventListener("focusin",_),C.removeEventListener("focusout",A),C.removeEventListener("pointermove",_),C.removeEventListener("pointerleave",k),window.removeEventListener("blur",_),window.removeEventListener("focus",N)}}},[w,l.isClosePausedRef]);const b=x.useCallback(({tabbingDirection:C})=>{const _=u().map(N=>{const A=N.ref.current,k=[A,...c2(A)];return C==="forwards"?k:k.reverse()});return(C==="forwards"?_.reverse():_).flat()},[u]);return x.useEffect(()=>{const C=m.current;if(C){const j=_=>{var k,T,R;const N=_.altKey||_.ctrlKey||_.metaKey;if(_.key==="Tab"&&!N){const P=document.activeElement,I=_.shiftKey;if(_.target===C&&I){(k=f.current)==null||k.focus();return}const U=b({tabbingDirection:I?"backwards":"forwards"}),ie=U.findIndex(G=>G===P);Nf(U.slice(ie+1))?_.preventDefault():I?(T=f.current)==null||T.focus():(R=p.current)==null||R.focus()}};return C.addEventListener("keydown",j),()=>C.removeEventListener("keydown",j)}},[u,b]),a.jsxs(FP,{ref:d,role:"region","aria-label":i.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&a.jsx(Hm,{ref:f,onFocusFromOutsideViewport:()=>{const C=b({tabbingDirection:"forwards"});Nf(C)}}),a.jsx(Lg.Slot,{scope:n,children:a.jsx(je.ol,{tabIndex:-1,...o,ref:g})}),w&&a.jsx(Hm,{ref:p,onFocusFromOutsideViewport:()=>{const C=b({tabbingDirection:"backwards"});Nf(C)}})]})});K0.displayName=G0;var Z0="ToastFocusProxy",Hm=x.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,o=eh(Z0,n);return a.jsx(_c,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:l=>{var f;const u=l.relatedTarget;!((f=o.viewport)!=null&&f.contains(u))&&r()}})});Hm.displayName=Z0;var th="Toast",YP="toast.swipeStart",JP="toast.swipeMove",XP="toast.swipeCancel",e2="toast.swipeEnd",Q0=x.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:o,...l}=e,[u=!0,d]=Bi({prop:r,defaultProp:i,onChange:o});return a.jsx(Mn,{present:n||u,children:a.jsx(r2,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:mt(e.onPause),onResume:mt(e.onResume),onSwipeStart:de(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:de(e.onSwipeMove,f=>{const{x:p,y:m}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:de(e.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:de(e.onSwipeEnd,f=>{const{x:p,y:m}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),d(!1)})})})});Q0.displayName=th;var[t2,n2]=W0(th,{onClose(){}}),r2=x.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:o,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:f,onSwipeStart:p,onSwipeMove:m,onSwipeCancel:g,onSwipeEnd:y,...w}=e,b=eh(th,n),[C,j]=x.useState(null),_=ze(t,G=>j(G)),N=x.useRef(null),A=x.useRef(null),k=i||b.duration,T=x.useRef(0),R=x.useRef(k),P=x.useRef(0),{onToastAdd:I,onToastRemove:O}=b,B=mt(()=>{var se;
40(C==null?void 0:C.contains(document.activeElement))&&((se=b.viewport)==null||se.focus()),l()}),U=x.useCallback(G=>{!G||G===1/0||(window.clearTimeout(P.current),T.current=new Date().getTime(),P.current=window.setTimeout(B,G))},[B]);x.useEffect(()=>{const G=b.viewport;if(G){const se=()=>{U(R.current),f==null||f()},Y=()=>{const le=new Date().getTime()-T.current;R.current=R.current-le,window.clearTimeout(P.current),d==null||d()};return G.addEventListener(Vm,Y),G.addEventListener(Wm,se),()=>{G.removeEventListener(Vm,Y),G.removeEventListener(Wm,se)}}},[b.viewport,k,d,f,U]),x.useEffect(()=>{o&&!b.isClosePausedRef.current&&U(k)},[o,k,b.isClosePausedRef,U]),x.useEffect(()=>(I(),()=>O()),[I,O]);const ie=x.useMemo(()=>C?r1(C):null,[C]);return b.viewport?a.jsxs(a.Fragment,{children:[ie&&a.jsx(i2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:ie}),a.jsx(t2,{scope:n,onClose:B,children:Bs.createPortal(a.jsx(Lg.ItemSlot,{scope:n,children:a.jsx(DP,{asChild:!0,onEscapeKeyDown:de(u,()=>{b.isFocusedToastEscapeKeyDownRef.current||B(),b.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(je.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":b.swipeDirection,...w,ref:_,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:de(e.onKeyDown,G=>{G.key==="Escape"&&(u==null||u(G.nativeEvent),G.nativeEvent.defaultPrevented||(b.is
40FocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:de(e.onPointerDown,G=>{G.button===0&&(N.current={x:G.clientX,y:G.clientY})}),onPointerMove:de(e.onPointerMove,G=>{if(!N.current)return;const se=G.clientX-N.current.x,Y=G.clientY-N.current.y,le=!!A.current,F=["left","right"].includes(b.swipeDirection),K=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,H=F?K(0,se):0,Z=F?0:K(0,Y),ee=G.pointerType==="touch"?10:2,ue={x:H,y:Z},V={originalEvent:G,delta:ue};le?(A.current=ue,mu(JP,m,V,{discrete:!1})):Hx(ue,b.swipeDirection,ee)?(A.current=ue,mu(YP,p,V,{discrete:!1}),G.target.setPointerCapture(G.pointerId)):(Math.abs(se)>ee||Math.abs(Y)>ee)&&(N.current=null)}),onPointerUp:de(e.onPointerUp,G=>{const se=A.current,Y=G.target;if(Y.hasPointerCapture(G.pointerId)&&Y.releasePointerCapture(G.pointerId),A.current=null,N.current=null,se){const le=G.currentTarget,F={originalEvent:G,delta:se};Hx(se,b.swipeDirection,b.swipeThreshold)?mu(e2,y,F,{discrete:!0}):mu(XP,g,F,{discrete:!0}),le.addEventListener("click",K=>K.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null}),i2=e=>{const{__scopeToast:t,children:n,...r}=e,i=eh(th,t),[o,l]=x.useState(!1),[u,d]=x.useState(!1);return a2(()=>l(!0)),x.useEffect(()=>{const f=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(f)},[]),u?null:a.jsx(Xd,{asChild:!0,children:a.jsx(_c,{...r,children:o&&a.jsxs(a.Fragment,{children:[i.label," ",n]})})})},s2="ToastTitle",Y0=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(je.div,{...r,ref:t})});Y0.displayName=s2;var o2="ToastDescription",J0=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(je.div,{...r,ref:t})});J0.displayName=o2;var X0="ToastAction",e1=x.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?a.jsx(n1,{altText:n,asChild:!0,children:a.jsx(zg,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${X0}\`. Expected non-empty \`string\`.`),null)});e1.displayName=X0;var t1="ToastClose",zg=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=n2(t1,n);return a.jsx(n1,{asChild:!0,children:a.jsx(je.button,{type:"button",...r,ref:t,onClick:de(e.onClick,i.onClose)})})});zg.displayName=t1;var n1=x.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return a.jsx(je.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function r1(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),l2(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!i)if(o){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...r1(r))}}),t}function mu(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?$0(i,o):i.dispatchEvent(o)}var Hx=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),o=r>i;return t==="left"||t==="right"?o&&r>n:!o&&i>n};function a2(e=()=>{}){const t=mt(e);Pt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function l2(e){return e.nodeType===e.ELEMENT_NODE}function c2(e){const t=[],n=document.createTreeWalker(e,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();)t.push(n.currentNode);return t}function Nf(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var u2=H0,i1=K0,s1=Q0,o1=Y0,a1=J0,l1=e1,c1=zg;function u1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=u1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function d1(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=u1(e))&&(r&&(r+=" "),r+=t);return r}const Gx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kx=d1,Mg=(e,t)=>
vendor: 4,653 bytes, lines 40-94
40n=>{var r;if((t==null?void 0:t.variants)==null)return Kx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(f=>{const p=n==null?void 0:n[f],m=o==null?void 0:o[f];if(p===null)return null;const g=Gx(p)||Gx(m);return i[f][g]}),u=n&&Object.entries(n).reduce((f,p)=>{let[m,g]=p;return g===void 0||(f[m]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:m,className:g,...y}=p;return Object.entries(y).every(w=>{let[b,C]=w;return Array.isArray(C)?C.includes({...o,...u}[b]):{...o,...u}[b]===C})?[...f,m,g]:f},[]);return Kx(e,l,d,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 d2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),h1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===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 h2={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 f2=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...u},d)=>x.createElement("svg",{ref:d,...h2,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:h1("lucide",i),...u},[...l.map(([f,p])=>x.createElement(f,p)),...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 he=(e,t)=>{const n=x.forwardRef(({className:r,...i},o)=>x.createElement(f2,{ref:o,iconNode:t,className:h1(`lucide-${d2(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const m2=he("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
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 f1=he("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
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 m1=he("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
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 Dg=he("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"}]]);/**
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 la=he("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"}]]);/**
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 p2=he("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/**
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 kl=he("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"}]]);/**
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 li=he("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
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 Kr=he("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 Fg=he("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
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 Bg=he("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
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 g2=he("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
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 p1=he("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
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 Pl=he("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
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 v2=he("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
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 pd=he("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"}]]);/**
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 y2=he("Euro",[["path",{d:"M4 10h12",key:"1y6xl8"}],["path",{d:"M4 14h9",key:"1loblj"}],["path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",key:"1j6lzo"}]]);/**
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 gd=he("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"}]]);/**
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 g1=he("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
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 x2=he("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
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 Sr=he("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
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 $g=he("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"}]]);/**
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 b2=he("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"}]]);/**
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 w2=he("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
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 nr=he("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"}]]);/**
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 qg=he("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"}]]);/**
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 _2=he("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
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 Lt=he("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
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 S2=he("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
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 v1=he("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"}]]);/**
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 qe=he("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 j2=he("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"}]]);/**
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 N2=he("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"}]]);/**
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 ca=he("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"}]]);/**
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 Lo=he("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"}]]);/**
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 y1=he("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"}]]);/**
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 C2=he("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
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 vd=he("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/**
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 Ql=he("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"}]]);/**
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 yd=he("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"}]]);/**
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 Zx=he("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
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 ua=he("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 E2=he("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"}]]);/**
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 x1=he("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}
280],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
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 T2=he("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 k2=he("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"}]]);/**
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 P2=he("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
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 A2=he("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
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 Qx=he("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
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 O2=he("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"}]]);/**
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 da=he("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"}]]);/**
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 Yx=he("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
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 R2=he("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
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 b1=he("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"}]]);/**
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 Gm=he("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
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 js=he("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"}]]);/**
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 Ug=he("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
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 w1=he("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
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 $s=he("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 8,464 bytes, lines 355-360
355],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
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 _1=he("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),Vg="-",I2=e=>{const t=z2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Vg);return u[0]===""&&u.length!==1&&u.shift(),S1(u,t)||L2(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},S1=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?S1(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Vg);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},Jx=/^\[(.+)\]$/,L2=e=>{if(Jx.test(e)){const t=Jx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},z2=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return D2(Object.entries(e.classGroups),n).forEach(([o,l])=>{Km(l,r,o,t)}),r},Km=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Xx(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(M2(i)){Km(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,l])=>{Km(l,Xx(t,o),n,r)})})},Xx=(e,t)=>{let n=e;return t.split(Vg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},M2=e=>e.isThemeGetter,D2=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([l,u])=>[t+l,u])):o);return[n,i]}):e,F2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return i(o,l),l},set(o,l){n.has(o)?n.set(o,l):i(o,l)}}},j1="!",B2=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,l=u=>{const d=[];let f=0,p=0,m;for(let C=0;C<u.length;C++){let j=u[C];if(f===0){if(j===i&&(r||u.slice(C,C+o)===t)){d.push(u.slice(p,C)),p=C+o;continue}if(j==="/"){m=C;continue}}j==="["?f++:j==="]"&&f--}const g=d.length===0?u:u.substring(p),y=g.startsWith(j1),w=y?g.substring(1):g,b=m&&m>p?m-p:void 0;return{modifiers:d,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:b}};return n?u=>n({className:u,parseClassName:l}):l},$2=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},q2=e=>({cache:F2(e.cacheSize),parseClassName:B2(e),...I2(e)}),U2=/\s+/,V2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],l=e.trim().split(U2);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:y}=n(f);let w=!!y,b=r(w?g.substring(0,y):g);if(!b){if(!w){u=f+(u.length>0?" "+u:u);continue}if(b=r(g),!b){u=f+(u.length>0?" "+u:u);continue}w=!1}const C=$2(p).join(":"),j=m?C+j1:C,_=j+b;if(o.includes(_))continue;o.push(_);const N=i(b,w);for(let A=0;A<N.length;++A){const k=N[A];o.push(j+k)}u=f+(u.length>0?" "+u:u)}return u};function W2(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=N1(t))&&(r&&(r+=" "),r+=n);return r}const N1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=N1(e[r]))&&(n&&(n+=" "),n+=t);return n};function H2(e,...t){let n,r,i,o=l;function l(d){const f=t.reduce((p,m)=>m(p),e());return n=q2(f),r=n.cache.get,i=n.cache.set,o=u,u(d)}function u(d){const f=r(d);if(f)return f;const p=V2(d,n);return i(d,p),p}return function(){return o(W2.apply(null,arguments))}}const Je=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},C1=/^\[(?:([a-z-]+):)?(.+)\]$/i,G2=/^\d+\/\d+$/,K2=new Set(["px","full","screen"]),Z2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Q2=/\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$/,Y2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,J2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,X2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rr=e=>zo(e)||K2.has(e)||G2.test(e),oi=e=>Aa(e,"length",aA),zo=e=>!!e&&!Number.isNaN(Number(e)),Cf=e=>Aa(e,"number",zo),ul=e=>!!e&&Number.isInteger(Number(e)),eA=e=>e.endsWith("%")&&zo(e.slice(0,-1)),Ae=e=>C1.test(e),ai=e=>Z2.test(e),tA=new Set(["length","size","percentage"]),nA=e=>Aa(e,tA,E1),rA=e=>Aa(e,"position",E1),iA=new Set(["image","url"]),sA=e=>Aa(e,iA,cA),oA=e=>Aa(e,"",lA),dl=()=>!0,Aa=(e,t,n)=>{const r=C1.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},aA=e=>Q2.test(e)&&!Y2.test(e),E1=()=>!1,lA=e=>J2.test(e),cA=e=>X2.test(e),uA=()=>{const e=Je("colors"),t=Je("spacing"),n=Je("blur"),r=Je("brightness"),i=Je("borderColor"),o=Je("borderRadius"),l=Je("borderSpacing"),u=Je("borderWidth"),d=Je("contrast"),f=Je("grayscale"),p=Je("hueRotate"),m=Je("invert"),g=Je("gap"),y=Je("gradientColorStops"),w=Je("gradientColorStopPositions"),b=Je("inset"),C=Je("margin"),j=Je("opacity"),_=Je("padding"),N=Je("saturate"),A=Je("scale"),k=Je("sepia"),T=Je("skew"),R=Je("space"),P=Je("translate"),I=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",Ae,t],U=()=>[Ae,t],ie=()=>["",Rr,oi],G=()=>["auto",zo,Ae],se=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",Ae],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[zo,Ae];return{cacheSize:500,separator:":",theme:{colors:[dl],spacing:[Rr,oi],blur:["none","",ai,Ae],brightness:Z(),borderColor:[e],borderRadius:["none","","full",ai,Ae],borderSpacing:U(),borderWidth:ie(),contrast:Z(),grayscale:K(),hueRotate:Z(),invert:K(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[eA,oi],inset:B(),margin:B(),opacity:Z(),padding:U(),saturate:Z(),scale:Z(),sepia:K(),skew:Z(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",Ae]}],container:["container"],columns:[{columns:[ai]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"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:[...se(),Ae]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ul,Ae]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ae]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",ul,Ae]}],"grid-cols":[{"grid-cols":[dl]}],"col-start-end":[{col:["auto",{span:["full",ul,Ae]},Ae]}],"col-start":[{"col-start":G()}
vendor: 9,423 bytes, line 360
360],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[dl]}],"row-start-end":[{row:["auto",{span:[ul,Ae]},Ae]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ae]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ae,t]}],"min-w":[{"min-w":[Ae,t,"min","max","fit"]}],"max-w":[{"max-w":[Ae,t,"none","full","min","max","fit","prose",{screen:[ai]},ai]}],h:[{h:[Ae,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ae,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ae,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ae,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ai,oi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Cf]}],"font-family":[{font:[dl]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ae]}],"line-clamp":[{"line-clamp":["none",zo,Cf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Rr,Ae]}],"list-image":[{"list-image":["none",Ae]}],"list-style-type":[{list:["none","disc","decimal",Ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[j]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[j]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Rr,oi]}],"underline-offset":[{"underline-offset":["auto",Rr,Ae]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae]}],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",Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[j]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...se(),rA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sA]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],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:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[j]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[j]}],"divide-style":[{divide:Y()}],"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:["",...Y()]}],"outline-offset":[{"outline-offset":[Rr,Ae]}],"outline-w":[{outline:[Rr,oi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[j]}],"ring-offset-w":[{"ring-offset":[Rr,oi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ai,oA]}],"shadow-color":[{shadow:[dl]}],opacity:[{opacity:[j]}],"mix-blend":[{"mix-blend":[...le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",ai,Ae]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[N]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[j]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ae]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",Ae]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[ul,Ae]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ae]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,647 bytes, line 360
360],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",Ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Rr,oi,Cf]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},dA=H2(uA);function Ce(...e){return dA(d1(e))}const hA=u2,T1=x.forwardRef(({className:e,...t},n)=>a.jsx(i1,{ref:n,className:Ce("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));T1.displayName=i1.displayName;const fA=Mg("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"}}),k1=x.forwardRef(({className:e,variant:t,...n},r)=>a.jsx(s1,{ref:r,className:Ce(fA({variant:t}),e),...n}));k1.displayName=s1.displayName;const mA=x.forwardRef(({className:e,...t},n)=>a.jsx(l1,{ref:n,className:Ce("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 hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));mA.displayName=l1.displayName;const P1=x.forwardRef(({className:e,...t},n)=>a.jsx(c1,{ref:n,className:Ce("absolute right-2 top-2 rounded-md p-1 text-foreground
360/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx($s,{className:"h-4 w-4"})}));P1.displayName=c1.displayName;const A1=x.forwardRef(({className:e,...t},n)=>a.jsx(o1,{ref:n,className:Ce("text-sm font-semibold",e),...t}));A1.displayName=o1.displayName;const O1=x.forwardRef(({className:e,...t},n)=>a.jsx(a1,{ref:n,className:Ce("text-sm opacity-90",e),...t}));O1.displayName=a1.displayName;function pA(){const{toasts:e}=bc();return a.jsxs(hA,{children:[e.map(function({id:t,title:n,description:r,action:i,...o}){return a.jsxs(k1,{...o,children:[a.jsxs("div",{className:"grid gap-1",children:[n&&a.jsx(A1,{children:n}),r&&a.jsx(O1,{children:r})]}),i,a.jsx(P1,{})]},t)}),a.jsx(T1,{})]})}var eb=["light","dark"],gA="(prefers-color-scheme: dark)",vA=x.createContext(void 0),yA={setTheme:e=>{},themes:[]},xA=()=>{var e;return(e=x.useContext(vA))!=null?e:yA};x.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:l,attrs:u,nonce:d})=>{let f=o==="system",p=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${u.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,m=i?eb.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",g=(w,b=!1,C=!0)=>{let j=l?l[w]:w,_=b?w+"|| ''":`'${j}'`,N="";return i&&C&&!b&&eb.includes(w)&&(N+=`d.style.colorScheme = '${w}';`),n==="class"?b||j?N+=`c.add(${_})`:N+="null":j&&(N+=`d[s](n,${_})`),N},y=e?`!function(){${p}${g(e)}}()`:r?`!function(){try{${p}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${f})){var t='${gA}',m=window.matchMedia(t);if(m.media!==t||m.matches){${g("dark")}}else{${g("light")}}}else if(e){${l?`var x=${JSON.stringify(l)};`:""}${g(l?"x[e]":"e",!0)}}${f?"":"else{"+g(o,!1,!1)+"}"}${m}}catch(e){}}()`:`!function(){try{${p}var e=localStorage.getItem('${t}');if(e){${l?`var x=${JSON.stringify(l)};`:""}${g(l?"x[e]":"e",!0)}}else{${g(o,!1,!1)};}${m}}catch(t){}}();`;return x.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:y}})});var bA=e=>{switch(e){case"success":return SA;case"info":return NA;case"warning":return jA;case"error":return CA;default:return null}},wA=Array(12).fill(0),_A=({visible:e})=>ne.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},ne.createElement("div",{className:"sonner-spinner"},wA.map((t,n)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),SA=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.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"})),jA=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.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"})),NA=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.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"})),CA=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.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"})),EA=()=>{let[e,t]=ne.useState(document.hidden);return ne.useEffect(()=>{let n=()=>{t(document.hidden)};
360return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Zm=1,TA=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Zm++,o=this.toasts.find(u=>u.id===i),l=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...e,id:i,title:n}),{...u,...e,id:i,dismissible:l,title:n}):u):this.addToast({title:n,...r,dismissible:l,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
360this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0;return r.then(async o=>{if(PA(o)&&!o.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${o.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${o.status}`):t.description;this.create({id:n,type:"error",message:l,description:u})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(o):t.success,u=typeof t.description=="function"?await t.description(o):t.description;this.create({id:n,type:"success",message:l,description:u})}}).catch(async o=>{if(t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(o):t.error,u=typeof t.description=="function"?await t.description(o):t.description;this.create({id:n,type:"error",message:l,description:u})}}).finally(()=>{var o;i&&(this.dismiss(n),n=void 0),(o=t.finally)==null||o.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Zm++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},hn=new TA,kA=(e,t)=>{let n=(t==null?void 0:t.id)||Zm++;return hn.addToast({title:e,...t,id:n}),n},PA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",AA=kA,OA=()=>hn.toasts,re=Object.assign(AA,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:OA});function RA(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}RA(`: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}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-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;
360left: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;background:var(--gray1);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}: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:0;right:0;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}
360: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, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);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-border: hsl(0, 0%, 20%);--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%);--error-text: hsl(358, 100%, 81%)}[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%)}
361`);function pu(e){return e.label!==void 0}var IA=3,LA="32px",zA=4e3,MA=356,DA=14,FA=20,BA=200;function $A(...e){return e.filter(Boolean).join(" ")}var qA=e=>{var t,n,r,i,o,l,u,d,f,p;let{invert:m,toast:g,unstyled:y,interacting:w,setHeights:b,visibleToasts:C,heights:j,index:_,toasts:N,expanded:A,removeToast:k,defaultRichColors:T,closeButton:R,style:P,cancelButtonStyle:I,actionButtonStyle:O,className:B="",descriptionClassName:U="",duration:ie,position:G,gap:se,loadingIcon:Y,expandByDefault:le,classNames:F,icons:K,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:Z,cn:ee}=e,[ue,V]=ne.useState(!1),[z,W]=ne.useState(!1),[te,ve]=ne.useState(!1),[ke,ge]=ne.useState(!1),[Ee,Ne]=ne.useState(0),[Ge,tt]=ne.useState(0),pt=ne.useRef(null),nt=ne.useRef(null),Fn=_===0,ti=_+1<=C,wt=g.type,Er=g.dismissible!==!1,Fa=g.className||"",Ec=g.descriptionClassName||"",Qi=ne.useMemo(()=>j.findIndex(Te=>Te.toastId===g.id)||0,[j,g.id]),bh=ne.useMemo(()=>{var Te;return(Te=g.closeButton)!=null?Te:R},[g.closeButton,R]),Tc=ne.useMemo(()=>g.duration||ie||zA,[g.duration,ie]),Yi=ne.useRef(0),Tr=ne.useRef(0),Ba=ne.useRef(0),ni=ne.useRef(null),[$a,kc]=G.split("-"),Pc=ne.useMemo(()=>j.reduce((Te,Ke,We)=>We>
361=Qi?Te:Te+Ke.height,0),[j,Qi]),qa=EA(),Ua=g.invert||m,Ws=wt==="loading";Tr.current=ne.useMemo(()=>Qi*se+Pc,[Qi,Pc]),ne.useEffect(()=>{V(!0)},[]),ne.useLayoutEffect(()=>{if(!ue)return;let Te=nt.current,Ke=Te.style.height;Te.style.height="auto";let We=Te.getBoundingClientRect().height;Te.style.height=Ke,tt(We),b(ln=>ln.find(cn=>cn.toastId===g.id)?ln.map(cn=>cn.toastId===g.id?{...cn,height:We}:cn):[{toastId:g.id,height:We,position:g.position},...ln])},[ue,g.title,g.description,b,g.id]);let lr=ne.useCallback(()=>{W(!0),Ne(Tr.current),b(Te=>Te.filter(Ke=>Ke.toastId!==g.id)),setTimeout(()=>{k(g)},BA)},[g,k,b,Tr]);ne.useEffect(()=>{if(g.promise&&wt==="loading"||g.duration===1/0||g.type==="loading")return;let Te,Ke=Tc;return A||w||Z&&qa?(()=>{if(Ba.current<Yi.current){let We=new Date().getTime()-Yi.current;Ke=Ke-We}Ba.current=new Date().getTime()})():Ke!==1/0&&(Yi.current=new Date().getTime(),Te=setTimeout(()=>{var We;(We=g.onAutoClose)==null||We.call(g,g),lr()},Ke)),()=>clearTimeout(Te)},[A,w,le,g,Tc,lr,g.promise,wt,Z,qa]),ne.useEffect(()=>{let Te=nt.current;if(Te){let Ke=Te.getBoundingClientRect().height;return tt(Ke),b(We=>[{toastId:g.id,height:Ke,position:g.position},...We]),()=>b(We=>We.filter(ln=>ln.toastId!==g.id))}},[b,g.id]),ne.useEffect(()=>{g.delete&&lr()},[lr,g.delete]);function Ji(){return K!=null&&K.loading?ne.createElement("div",{className:"sonner-loader","data-visible":wt==="loading"},K.loading):Y?ne.createElement("div",{className:"sonner-loader","data-visible":wt==="loading"},Y):ne.createElement(_A,{visible:wt==="loading"})}return ne.createElement("li",{"aria-live":g.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:nt,className:ee(B,Fa,F==null?void 0:F.toast,(t=g==null?void 0:g.classNames)==null?void 0:t.toast,F==null?void 0:F.default,F==null?void 0:F[wt],(n=g==null?void 0:g.classNames)==null?void 0:n[wt]),"data-sonner-toast":"","data-rich-colors":(r=g.richColors)!=null?r:T,"data-styled":!(g.jsx||g.unstyled||y),"data-mounted":ue,"data-promise":!!g.promise,"data-removed":z,"data-visible":ti,"data-y-position":$a,"data-x-position":kc,"data-index":_,"data-front":Fn,"data-swiping":te,"data-dismissible":Er,"data-type":wt,"data-invert":Ua,"data-swipe-out":ke,"data-expanded":!!(A||le&&ue),style:{"--index":_,"--toasts-before":_,"--z-index":N.length-_,"--offset":`${z?Ee:Tr.current}px`,"--initial-height":le?"auto":`${Ge}px`,...P,...g.style},onPointerDown:Te=>{Ws||!Er||(pt.current=new Date,Ne(Tr.current),Te.target.setPointerCapture(Te.pointerId),Te.target.tagName!=="BUTTON"&&(ve(!0),ni.current={x:Te.clientX,y:Te.clientY}))},onPointerUp:()=>{var Te,Ke,We,ln;if(ke||!Er)return;ni.current=null;let cn=Number(((Te=nt.current)==null?void 0:Te.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Hs=new Date().getTime()-((Ke=pt.current)==null?void 0:Ke.getTime()),wh=Math.abs(cn)/Hs;if(Math.abs(cn)>=FA||wh>.11){Ne(Tr.current),(We=g.onDismiss)==null||We.call(g,g),lr(),ge(!0);return}(ln=nt.current)==null||ln.style.setProperty("--swipe-amount","0px"),ve(!1)},onPointerMove:Te=>{var Ke;if(!ni.current||!Er)return;let We=Te.clientY-ni.current.y,ln=Te.clientX-ni.current.x,cn=($a==="top"?Math.min:Math.max)(0,We),Hs=Te.pointerType==="touch"?10:2;Math.abs(cn)>Hs?(Ke=nt.current)==null||Ke.style.setProperty("--swipe-amount",`${We}px`):Math.abs(ln)>Hs&&(ni.current=null)}},bh&&!g.jsx?ne.createElement("button",{"aria-label":H,"data-disabled":Ws,"data-close-button":!0,onClick:Ws||!Er?()=>{}:()=>{var Te;lr(),(Te=g.onDismiss)==null||Te.call(g,g)},className:ee(F==null?void 0:F.closeButton,(i=g==null?void 0:g.classNames)==null?void 0:i.closeButton)},ne.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"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,g.jsx||ne.isValidElement(g.title)?g.jsx||g.title:ne.createElement(ne.Fragment,null,wt||g.icon||g.promise?ne.createElement("div",{"data-icon":"",className:ee(F==null?void 0:F.icon,(o=g==null?void 0:g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Ji():null,g.type!=="loading"?g.icon||(K==null?void 0:K[wt])||bA(wt):null):null,ne.createElement("div",{"data-content":"",className:ee(F==null?void 0:F.content,(l=g==null?void 0:g.classNames)==null?void 0:l.content)},ne.createElement("div",{"data-title":"",className:ee(F==null?void 0:F.title,(u=g==null?void 0:g.classNames)==null?void 0:u.title)},g.title),g.description?ne.createElement("div",{"data-description":"",className:ee(U,Ec,F==null?void 0:F.description,(d=g==null?void 0:g.classNames)==null?void 0:d.description)},g.description):null),ne.isValidElement(g.cancel)?g.cancel:g.cancel&&pu(g.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||I,onClick:Te=>{var Ke,We;pu(g.cancel)&&Er&&((We=(Ke=g.cancel).onClick)==null||We.call(Ke,Te),lr())},className:ee(F==null?void 0:F.cancelButton,(f=g==null?void 0:g.classNames)==null?void 0:f.cancelButton)},g.cancel.label):null,ne.isValidElement(g.action)?g.action:g.action&&pu(g.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||O,onClick:Te=>{var Ke,We;pu(g.action)&&(Te.defaultPrevented||((We=(Ke=g.action).onClick)==null||We.call(Ke,Te),lr()))},className:ee(F==null?void 0:F.actionButton,(p=g==null?void 0:g.classNames)==null?void 0:p.actionButton)},g.action.label):null))};function tb(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var UA=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:u,theme:d="light",richColors:f,duration:p,style:m,visibleToasts:g=IA,toastOptions:y,dir:w=tb(),gap:b=DA,loadingIcon:C,icons:j,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:N,cn:A=$A}=e,[k,T]=ne.useState([]),R=ne.useMemo(()=>Array.from(new Set([n].concat(k.filter(Z=>Z.position).map(Z=>Z.position)))),[k,n]),[P,I]=ne.useState([]),[O,B]=ne.useState(!1),[U,ie]=ne.useState(!1),[G,se]=ne.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
361k":"light"),Y=ne.useRef(null),le=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=ne.useRef(null),K=ne.useRef(!1),H=ne.useCallback(Z=>{var ee;(ee=k.find(ue=>ue.id===Z.id))!=null&&ee.delete||hn.dismiss(Z.id),T(ue=>ue.filter(({id:V})=>V!==Z.id))},[k]);return ne.useEffect(()=>hn.subscribe(Z=>{if(Z.dismiss){T(ee=>ee.map(ue=>ue.id===Z.id?{...ue,delete:!0}:ue));return}setTimeout(()=>{D0.flushSync(()=>{T(ee=>{let ue=ee.findIndex(V=>V.id===Z.id);return ue!==-1?[...ee.slice(0,ue),{...ee[ue],...Z},...ee.slice(ue+1)]:[Z,...ee]})})})}),[]),ne.useEffect(()=>{if(d!=="system"){se(d);return}d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?se("dark"):se("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:Z})=>{se(Z?"dark":"light")})},[d]),ne.useEffect(()=>{k.length<=1&&B(!1)},[k]),ne.useEffect(()=>{let Z=ee=>{var ue,V;r.every(z=>ee[z]||ee.code===z)&&(B(!0),(ue=Y.current)==null||ue.focus()),ee.code==="Escape"&&(document.activeElement===Y.current||(V=Y.current)!=null&&V.contains(document.activeElement))&&B(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[r]),ne.useEffect(()=>{if(Y.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,K.current=!1)}},[Y.current]),k.length?ne.createElement("section",{"aria-label":`${_} ${le}`,tabIndex:-1},R.map((Z,ee)=>{var ue;let[V,z]=Z.split("-");return ne.createElement("ol",{key:Z,dir:w==="auto"?tb():w,tabIndex:-1,ref:Y,className:l,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":V,"data-x-position":z,style:{"--front-toast-height":`${((ue=P[0])==null?void 0:ue.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||LA,"--width":`${MA}px`,"--gap":`${b}px`,...m},onBlur:W=>{K.current&&!W.currentTarget.contains(W.relatedTarget)&&(K.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||K.current||(K.current=!0,F.current=W.relatedTarget)},onMouseEnter:()=>B(!0),onMouseMove:()=>B(!0),onMouseLeave:()=>{U||B(!1)},onPointerDown:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},k.filter(W=>!W.position&&ee===0||W.position===Z).map((W,te)=>{var ve,ke;return ne.createElement(qA,{key:W.id,icons:j,index:te,toast:W,defaultRichColors:f,duration:(ve=y==null?void 0:y.duration)!=null?ve:p,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:t,visibleToasts:g,closeButton:(ke=y==null?void 0:y.closeButton)!=null?ke:o,interacting:U,position:Z,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:H,toasts:k.filter(ge=>ge.position==W.position),heights:P.filter(ge=>ge.position==W.position),setHeights:I,expandByDefault:i,gap:b,loadingIcon:C,expanded:O,pauseWhenPageIsHidden:N,cn:A})}))})):null};const VA=({...e})=>{const{theme:t="system"}=xA();return a.jsx(UA,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var WA=Lw.useId||(()=>{}),HA=0;function qr(e){const[t,n]=x.useState(WA());return Pt(()=>{n(r=>r??String(HA++))},[e]),t?`radix-${t}`:""}const GA=["top","right","bottom","left"],$i=Math.min,mn=Math.max,xd=Math.round,gu=Math.floor,qi=e=>({x:e,y:e}),KA={left:"right",right:"left",bottom:"top",top:"bottom"},ZA={start:"end",end:"start"};function Qm(e,t,n){return mn(e,$i(t,n))}function Zr(e,t){return typeof e=="function"?e(t):e}function Qr(e){return e.split("-")[0]}function Oa(e){return e.split("-")[1]}function Wg(e){return e==="x"?"y":"x"}function Hg(e){return e==="y"?"height":"width"}function Ui(e){return["top","bottom"].includes(Qr(e))?"y":"x"}function Gg(e){return Wg(Ui(e))}function QA(e,t,n){n===void 0&&(n=!1);const r=Oa(e),i=Gg(e),o=Hg(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=bd(l)),[l,bd(l)]}function YA(e){const t=bd(e);return[Ym(e),t,Ym(t)]}function Ym(e){return e.replace(/start|end/g,t=>ZA[t])}function JA(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:l;default:return[]}}function XA(e,t,n,r){const i=Oa(e);let o=JA(Qr(e),n==="start",r);
vendor: 4,571 bytes, line 361
361return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Ym)))),o}function bd(e){return e.replace(/left|right|bottom|top/g,t=>KA[t])}function eO(e){return{top:0,right:0,bottom:0,left:0,...e}}function R1(e){return typeof e!="number"?eO(e):{top:e,right:e,bottom:e,left:e}}function wd(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function nb(e,t,n){let{reference:r,floating:i}=e;const o=Ui(t),l=Gg(t),u=Hg(l),d=Qr(t),f=o==="y",p=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,g=r[u]/2-i[u]/2;let y;switch(d){case"top":y={x:p,y:r.y-i.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-i.width,y:m};break;default:y={x:r.x,y:r.y}}switch(Oa(t)){case"start":y[l]-=g*(n&&f?-1:1);break;case"end":y[l]+=g*(n&&f?-1:1);break}return y}const tO=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:m}=nb(f,r,d),g=r,y={},w=0;for(let b=0;b<u.length;b++){const{name:C,fn:j}=u[b],{x:_,y:N,data:A,reset:k}=await j({x:p,y:m,initialPlacement:r,placement:g,strategy:i,middlewareData:y,rects:f,platform:l,elements:{reference:e,floating:t}});p=_??p,m=N??m,y={...y,[C]:{...y[C],...A}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(g=k.placement),k.rects&&(f=k.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:p,y:m}=nb(f,g,d)),b=-1)}return{x:p,y:m,placement:g,strategy:i,middlewareData:y}};async function Yl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:y=0}=Zr(t,e),w=R1(y),C=u[g?m==="floating"?"reference":"floating":m],j=wd(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:p,strategy:d})),_=m==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,N=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),A=await(o.isElement==null?void 0:o.isElement(N))?await(o.getScale==null?void 0:o.getScale(N))||{x:1,y:1}:{x:1,y:1},k=wd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:N,strategy:d}):_);return{top:(j.top-k.top+w.top)/A.y,bottom:(k.bottom-j.bottom+w.bottom)/A.y,left:(j.left-k.left+w.left)/A.x,right:(k.right-j.right+w.right)/A.x}}const nO=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:p=0}=Zr(e,t)||{};if(f==null)return{};const m=R1(p),g={x:n,y:r},y=Gg(i),w=Hg(y),b=await l.getDimensions(f),C=y==="y",j=C?"top":"left",_=C?"bottom":"right",N=C?"clientHeight":"clientWidth",A=o.reference[w]+o.reference[y]-g[y]-o.floating[w],k=g[y]-o.reference[y],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let R=T?T[N]:0;(!R||!await(l.isElement==null?void 0:l.isElement(T)))&&(R=u.floating[N]||o.floating[w]);const P=A/2-k/2,I=R/2-b[w]/2-1,O=$i(m[j],I),B=$i(m[_],I),U=O,ie=R-b[w]-B,G=R/2-b[w]/2+P,se=Qm(U,G,ie),Y=!d.arrow&&Oa(i)!=null&&G!==se&&o.reference[w]/2-(G<U?O:B)-b[w]/2<0,le=Y?G<U?G-U:G-ie:0;return{[y]:g[y]+le,data:{[y]:se,centerOffset:G-se-le,...Y&&{alignmentOffset:le}},reset:Y}}}),rO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:b=!0,...C}=Zr(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const j=Qr(i),_=Ui(u),N=Qr(u)===u,A=await(d.isRTL==null?void 0:d.isRTL(f.floating)),k=g||(N||!b?[bd(u)]:YA(u)),T=w!=="none";!g&&T&&k.push(...XA(u,b,w,A));const R=[u,...k],P=await Yl(t,C),I=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(p&&I.push(P[j]),m){const G=QA(i,l,A);I.push(P[G[0]],P[G[1]])}if(O=[...O,{placement:i,overflows:I}],!I.every(G=>G<=0)){var B,U;const G=(((B=o.flip)==null?void 0:B.index)||0)+1,se=R[G];if(se)return{data:{index:G,overflows:O},reset:{placement:se}};let Y=(U=O.filter(le=>le.overflows[0]<=0).sort((le,F)=>le.overflows[1]-F.overflows[1])[0])==null?void 0:U.placement;if(!Y)switch(y){case"bestFit":{var ie;
vendor: 4,457 bytes, line 361
361const le=(ie=O.filter(F=>{if(T){const K=Ui(F.placement);return K===_||K==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(K=>K>0).reduce((K,H)=>K+H,0)]).sort((F,K)=>F[1]-K[1])[0])==null?void 0:ie[0];le&&(Y=le);break}case"initialPlacement":Y=u;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}};function rb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ib(e){return GA.some(t=>e[t]>=0)}const iO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Zr(e,t);switch(r){case"referenceHidden":{const o=await Yl(t,{...i,elementContext:"reference"}),l=rb(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:ib(l)}}}case"escaped":{const o=await Yl(t,{...i,altBoundary:!0}),l=rb(o,n.floating);return{data:{escapedOffsets:l,escaped:ib(l)}}}default:return{}}}}};async function sO(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=Qr(n),u=Oa(n),d=Ui(n)==="y",f=["left","top"].includes(l)?-1:1,p=o&&d?-1:1,m=Zr(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return u&&typeof w=="number"&&(y=u==="end"?w*-1:w),d?{x:y*p,y:g*f}:{x:g*f,y:y*p}}const oO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:u}=t,d=await sO(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:o+d.y,data:{...d,placement:l}}}}},aO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:C=>{let{x:j,y:_}=C;return{x:j,y:_}}},...d}=Zr(e,t),f={x:n,y:r},p=await Yl(t,d),m=Ui(Qr(i)),g=Wg(m);let y=f[g],w=f[m];if(o){const C=g==="y"?"top":"left",j=g==="y"?"bottom":"right",_=y+p[C],N=y-p[j];y=Qm(_,y,N)}if(l){const C=m==="y"?"top":"left",j=m==="y"?"bottom":"right",_=w+p[C],N=w-p[j];w=Qm(_,w,N)}const b=u.fn({...t,[g]:y,[m]:w});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[g]:o,[m]:l}}}}}},lO=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Zr(e,t),p={x:n,y:r},m=Ui(i),g=Wg(m);let y=p[g],w=p[m];const b=Zr(u,t),C=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(d){const N=g==="y"?"height":"width",A=o.reference[g]-o.floating[N]+C.mainAxis,k=o.reference[g]+o.reference[N]-C.mainAxis;y<A?y=A:y>k&&(y=k)}if(f){var j,_;const N=g==="y"?"width":"height",A=["top","left"].includes(Qr(i)),k=o.reference[m]-o.floating[N]+(A&&((j=l.offset)==null?void 0:j[m])||0)+(A?0:C.crossAxis),T=o.reference[m]+o.reference[N]+(A?0:((_=l.offset)==null?void 0:_[m])||0)-(A?C.crossAxis:0);w<k?w=k:w>T&&(w=T)}return{[g]:y,[m]:w}}}},cO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Zr(e,t),p=await Yl(t,f),m=Qr(i),g=Oa(i),y=Ui(i)==="y",{width:w,height:b}=o.floating;let C,j;m==="top"||m==="bottom"?(C=m,j=g===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(j=m,C=g==="end"?"top":"bottom");const _=b-p.top-p.bottom,N=w-p.left-p.right,A=$i(b-p[C],_),k=$i(w-p[j],N),T=!t.middlewareData.shift;let R=A,P=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=_),T&&!g){const O=mn(p.left,0),B=mn(p.right,0),U=mn(p.top,0),ie=mn(p.bottom,0);y?P=w-2*(O!==0||B!==0?O+B:mn(p.left,p.right)):R=b-2*(U!==0||ie!==0?U+ie:mn(p.top,p.bottom))}await d({...t,availableWidth:P,availableHeight:R});const I=await l.getDimensions(u.floating);return w!==I.width||b!==I.height?{reset:{rects:!0}}:{}}}};function nh(){return typeof window<"u"}function Ra(e){return I1(e)?(e.nodeName||"").toLowerCase():"#document"}function xn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nr(e){var t;return(t=(I1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function I1(e){return nh()?e instanceof Node||e instanceof xn(e).Node:!1}function rr(e){return nh()?e instanceof Element||e instanceof xn(e).Element:!1}function jr(e){return nh()?e instanceof HTMLElement||e instanceof xn(e).HTMLElement:!1}
vendor: 7,545 bytes, line 361
361function sb(e){return!nh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xn(e).ShadowRoot}function Sc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ir(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function uO(e){return["table","td","th"].includes(Ra(e))}function rh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Kg(e){const t=Zg(),n=rr(e)?ir(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function dO(e){let t=Vi(e);for(;jr(t)&&!ha(t);){if(Kg(t))return t;if(rh(t))return null;t=Vi(t)}return null}function Zg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ha(e){return["html","body","#document"].includes(Ra(e))}function ir(e){return xn(e).getComputedStyle(e)}function ih(e){return rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vi(e){if(Ra(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sb(e)&&e.host||Nr(e);return sb(t)?t.host:t}function L1(e){const t=Vi(e);return ha(t)?e.ownerDocument?e.ownerDocument.body:e.body:jr(t)&&Sc(t)?t:L1(t)}function Jl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=L1(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=xn(i);if(o){const u=Jm(l);return t.concat(l,l.visualViewport||[],Sc(i)?i:[],u&&n?Jl(u):[])}return t.concat(i,Jl(i,[],n))}function Jm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function z1(e){const t=ir(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=jr(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,u=xd(n)!==o||xd(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function Qg(e){return rr(e)?e:e.contextElement}function Mo(e){const t=Qg(e);if(!jr(t))return qi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=z1(t);let l=(o?xd(n.width):n.width)/r,u=(o?xd(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const hO=qi(0);function M1(e){const t=xn(e);return!Zg()||!t.visualViewport?hO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xn(e)?!1:t}function As(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Qg(e);let l=qi(1);t&&(r?rr(r)&&(l=Mo(r)):l=Mo(e));const u=fO(o,n,r)?M1(o):qi(0);let d=(i.left+u.x)/l.x,f=(i.top+u.y)/l.y,p=i.width/l.x,m=i.height/l.y;if(o){const g=xn(o),y=r&&rr(r)?xn(r):r;let w=g,b=Jm(w);for(;b&&r&&y!==w;){const C=Mo(b),j=b.getBoundingClientRect(),_=ir(b),N=j.left+(b.clientLeft+parseFloat(_.paddingLeft))*C.x,A=j.top+(b.clientTop+parseFloat(_.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,m*=C.y,d+=N,f+=A,w=xn(b),b=Jm(w)}}return wd({width:p,height:m,x:d,y:f})}function mO(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=Nr(r),u=t?rh(t.floating):!1;if(r===l||u&&o)return n;let d={scrollLeft:0,scrollTop:0},f=qi(1);const p=qi(0),m=jr(r);if((m||!m&&!o)&&((Ra(r)!=="body"||Sc(l))&&(d=ih(r)),jr(r))){const g=As(r);f=Mo(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x,y:n.y*f.y-d.scrollTop*f.y+p.y}}function pO(e){return Array.from(e.getClientRects())}function Xm(e,t){const n=ih(e).scrollLeft;return t?t.left+n:As(Nr(e)).left+n}function gO(e){const t=Nr(e),n=ih(e),r=e.ownerDocument.body,i=mn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=mn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Xm(e);const u=-n.scrollTop;return ir(r).direction==="rtl"&&(l+=mn(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:u}}function vO(e,t){const n=xn(e),r=Nr(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,d=0;if(i){o=i.width,l=i.height;const f=Zg();(!f||f&&t==="fixed")&&(u=i.offsetLeft,d=i.offsetTop)}return{width:o,height:l,x:u,y:d}}function yO(e,t){const n=As(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=jr(e)?Mo(e):qi(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,d=i*o.x,f=r*o.y;return{width:l,height:u,x:d,y:f}}function ob(e,t,n){let r;if(t==="viewport")r=vO(e,n);else if(t==="document")r=gO(Nr(e));else if(rr(t))r=yO(t,n);else{const i=M1(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return wd(r)}function D1(e,t){const n=Vi(e);return n===t||!rr(n)||ha(n)?!1:ir(n).position==="fixed"||D1(n,t)}function xO(e,t){const n=t.get(e);if(n)return n;let r=Jl(e,[],!1).filter(u=>rr(u)&&Ra(u)!=="body"),i=null;const o=ir(e).position==="fixed";let l=o?Vi(e):e;for(;rr(l)&&!ha(l);){const u=ir(l),d=Kg(l);!d&&u.position==="fixed"&&(i=null),(o?!d&&!i:!d&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Sc(l)&&!d&&D1(e,l))?r=r.filter(p=>p!==l):i=u,l=Vi(l)}return t.set(e,r),r}function bO(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?rh(t)?[]:xO(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,p)=>{const m=ob(t,p,i);return f.top=mn(m.top,f.top),f.right=$i(m.right,f.right),f.bottom=$i(m.bottom,f.bottom),f.left=mn(m.left,f.left),f},ob(t,u,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function wO(e){const{width:t,height:n}=z1(e);return{width:t,height:n}}function _O(e,t,n){const r=jr(t),i=Nr(t),o=n==="fixed",l=As(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const d=qi(0);if(r||!r&&!o)if((Ra(t)!=="body"||Sc(i))&&(u=ih(t)),r){const y=As(t,!0,o,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else i&&(d.x=Xm(i));let f=0,p=0;if(i&&!r&&!o){const y=i.getBoundingClientRect();p=y.top+u.scrollTop,f=y.left+u.scrollLeft-Xm(i,y)}const m=l.left+u.scrollLeft-d.x-f,g=l.top+u.scrollTop-d.y-p;return{x:m,y:g,width:l.width,height:l.height}}function Ef(e){return ir(e).position==="static"}function ab(e,t){if(!jr(e)||ir(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Nr(e)===n&&(n=n.ownerDocument.body),n}function F1(e,t){const n=xn(e);if(rh(e))return n;if(!jr(e)){let i=Vi(e);for(;i&&!ha(i);){if(rr(i)&&!Ef(i))return i;i=Vi(i)}return n}let r=ab(e,t);for(;r&&uO(r)&&Ef(r);)r=ab(r,t);return r&&ha(r)&&Ef(r)&&!Kg(r)?n:r||dO(e)||n}const SO=async function(e){const t=this.getOffsetParent||F1,n=this.getDimensions,r=await n(e.floating);return{reference:_O(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jO(e){return ir(e).direction==="rtl"}const NO={convertOffsetParentRelativeRectToViewportRelativeRect:mO,getDocumentElement:Nr,getClippingRect:bO,getOffsetParent:F1,getElementRects:SO,getClientRects:pO,getDimensions:wO,getScale:Mo,isElement:rr,isRTL:jO};function CO(e,t){let n=null,r;const i=Nr(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),o();const{left:f,top:p,width:m,height:g}=e.getBoundingClientRect();if(u||t(),!m||!g)return;const y=gu(p),w=gu(i.clientWidth-(f+m)),b=gu(i.clientHeight-(p+g)),C=gu(f),_={rootMargin:-y+"px "+-w+"px "+-b+"px "+-C+"px",threshold:mn(0,$i(1,d))||1};let N=!0;function A(k){const T=k[0].intersectionRatio;if(T!==d){if(!N)return l();T?l(!1,T):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N=!1}try{n=new IntersectionObserver(A,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,_)}
vendor: 8,754 bytes, line 361
361n.observe(e)}return l(!0),o}function EO(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Qg(e),p=i||o?[...f?Jl(f):[],...Jl(t)]:[];p.forEach(j=>{i&&j.addEventListener("scroll",n,{passive:!0}),o&&j.addEventListener("resize",n)});const m=f&&u?CO(f,n):null;let g=-1,y=null;l&&(y=new ResizeObserver(j=>{let[_]=j;_&&_.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var N;(N=y)==null||N.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let w,b=d?As(e):null;d&&C();function C(){const j=As(e);b&&(j.x!==b.x||j.y!==b.y||j.width!==b.width||j.height!==b.height)&&n(),b=j,w=requestAnimationFrame(C)}return n(),()=>{var j;p.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),m==null||m(),(j=y)==null||j.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const TO=oO,kO=aO,PO=rO,AO=cO,OO=iO,lb=nO,RO=lO,IO=(e,t,n)=>{const r=new Map,i={platform:NO,...n},o={...i.platform,_c:r};return tO(e,t,{...i,platform:o})};var $u=typeof document<"u"?x.useLayoutEffect:x.useEffect;function _d(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_d(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!_d(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function B1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cb(e,t){const n=B1(e);return Math.round(t*n)/n}function Tf(e){const t=x.useRef(e);return $u(()=>{t.current=e}),t}function LO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[p,m]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=x.useState(r);_d(g,r)||y(r);const[w,b]=x.useState(null),[C,j]=x.useState(null),_=x.useCallback(F=>{F!==T.current&&(T.current=F,b(F))},[]),N=x.useCallback(F=>{F!==R.current&&(R.current=F,j(F))},[]),A=o||w,k=l||C,T=x.useRef(null),R=x.useRef(null),P=x.useRef(p),I=d!=null,O=Tf(d),B=Tf(i),U=Tf(f),ie=x.useCallback(()=>{if(!T.current||!R.current)return;const F={placement:t,strategy:n,middleware:g};B.current&&(F.platform=B.current),IO(T.current,R.current,F).then(K=>{const H={...K,isPositioned:U.current!==!1};G.current&&!_d(P.current,H)&&(P.current=H,Bs.flushSync(()=>{m(H)}))})},[g,t,n,B,U]);$u(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(F=>({...F,isPositioned:!1})))},[f]);const G=x.useRef(!1);$u(()=>(G.current=!0,()=>{G.current=!1}),[]),$u(()=>{if(A&&(T.current=A),k&&(R.current=k),A&&k){if(O.current)return O.current(A,k,ie);ie()}},[A,k,ie,O,I]);const se=x.useMemo(()=>({reference:T,floating:R,setReference:_,setFloating:N}),[_,N]),Y=x.useMemo(()=>({reference:A,floating:k}),[A,k]),le=x.useMemo(()=>{const F={position:n,left:0,top:0};if(!Y.floating)return F;const K=cb(Y.floating,p.x),H=cb(Y.floating,p.y);return u?{...F,transform:"translate("+K+"px, "+H+"px)",...B1(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:H}},[n,u,Y.floating,p.x,p.y]);return x.useMemo(()=>({...p,update:ie,refs:se,elements:Y,floatingStyles:le}),[p,ie,se,Y,le])}const zO=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?lb({element:r.current,padding:i}).fn(n):{}:r?lb({element:r,padding:i}).fn(n):{}}}},MO=(e,t)=>({...TO(e),options:[e,t]}),DO=(e,t)=>({...kO(e),options:[e,t]}),FO=(e,t)=>({...RO(e),options:[e,t]}),BO=(e,t)=>({...PO(e),options:[e,t]}),$O=(e,t)=>({...AO(e),options:[e,t]}),qO=(e,t)=>({...OO(e),options:[e,t]}),UO=(e,t)=>({...zO(e),options:[e,t]});var VO="Arrow",$1=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return a.jsx(je.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});$1.displayName=VO;var WO=$1;function HO(e,t=[]){let n=[];function r(o,l){const u=x.createContext(l),d=n.length;n=[...n,l];function f(m){const{scope:g,children:y,...w}=m,b=(g==null?void 0:g[e][d])||u,C=x.useMemo(()=>w,Object.values(w));return a.jsx(b.Provider,{value:C,children:y})}function p(m,g){const y=(g==null?void 0:g[e][d])||u,w=x.useContext(y);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return f.displayName=o+"Provider",[f,p]}const i=()=>{const o=n.map(l=>x.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[r,GO(i,...t)]}function GO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const m=d(o)[`__scope${f}`];return{...u,...m}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function q1(e){const[t,n]=x.useState(void 0);return Pt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,u;if("borderBoxSize"in o){const d=o.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Yg="Popper",[U1,sh]=HO(Yg),[KO,V1]=U1(Yg),W1=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return a.jsx(KO,{scope:t,anchor:r,onAnchorChange:i,children:n})};W1.displayName=Yg;var H1="PopperAnchor",G1=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=V1(H1,n),l=x.useRef(null),u=ze(t,l);return x.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:a.jsx(je.div,{...i,ref:u})});G1.displayName=H1;var Jg="PopperContent",[ZO,QO]=U1(Jg),K1=x.forwardRef((e,t)=>{var te,ve,ke,ge,Ee,Ne;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:w,...b}=e,C=V1(Jg,n),[j,_]=x.useState(null),N=ze(t,Ge=>_(Ge)),[A,k]=x.useState(null),T=q1(A),R=(T==null?void 0:T.width)??0,P=(T==null?void 0:T.height)??0,I=r+(o!=="center"?"-"+o:""),O=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},B=Array.isArray(f)?f:[f],U=B.length>0,ie={padding:O,boundary:B.filter(JO),altBoundary:U},{refs:G,floatingStyles:se,placement:Y,isPositioned:le,middlewareData:F}=LO({strategy:"fixed",placement:I,whileElementsMounted:(...Ge)=>EO(...Ge,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[MO({mainAxis:i+P,alignmentAxis:l}),d&&DO({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?FO():void 0,...ie}),d&&BO({...ie}),$O({...ie,apply:({elements:Ge,rects:tt,availableWidth:pt,availableHeight:nt})=>{const{width:Fn,height:ti}=tt.reference,wt=Ge.floating.style;wt.setProperty("--radix-popper-available-width",`${pt}px`),wt.setProperty("--radix-popper-available-height",`${nt}px`),wt.setProperty("--radix-popper-anchor-width",`${Fn}px`),wt.setProperty("--radix-popper-anchor-height",`${ti}px`)}}),A&&UO({element:A,padding:u}),XO({arrowWidth:R,arrowHeight:P}),g&&qO({strategy:"referenceHidden",...ie})]}),[K,H]=Y1(Y),Z=mt(w);Pt(()=>{le&&(Z==null||Z())},[le,Z]);const ee=(te=F.arrow)==null?void 0:te.x,ue=(ve=F.arrow)==null?void 0:ve.y,V=((ke=F.arrow)==null?void 0:ke.centerOffset)!==0,[z,W]=x.useState();return Pt(()=>{j&&W(window.getComputedStyle(j).zIndex)},[j]),a.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...se,transform:le?se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(ge=F.transformOrigin)==null?void 0:ge.x,(Ee=F.transformOrigin)==null?void 0:Ee.y].join(" "),...((Ne=F.hide)==null?void 0:Ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(ZO,{scope:n,placedSide:K,onArrowChange:k,arrowX:ee,arrowY:ue,shouldHideArrow:V,children:a.jsx(je.div,{"data-side":K,"data-align":H,...b,ref:N,style:{...b.style,animation:le?void 0:"none"}})})})});K1.displayName=Jg;var Z1="PopperArrow",YO={top:"bottom",right:"left",bottom:"top",left:"r
361ight"},Q1=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=QO(Z1,r),l=YO[o.placedSide];return a.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:a.jsx(WO,{...i,ref:n,style:{...i.style,display:"block"}})})});Q1.displayName=Z1;function JO(e){return e!==null}var XO=e=>({name:"transformOrigin",options:e,fn(t){var C,j,_;const{placement:n,rects:r,middlewareData:i}=t,l=((C=i.arrow)==null?void 0:C.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,p]=Y1(n),m={start:"0%",center:"50%",end:"100%"}[p],g=(((j=i.arrow)==null?void 0:j.x)??0)+u/2,y=(((_=i.arrow)==null?void 0:_.y)??0)+d/2;let w="",b="";return f==="bottom"?(w=l?m:`${g}px`,b=`${-d}px`):f==="top"?(w=l?m:`${g}px`,b=`${r.floating.height+d}px`):f==="right"?(w=`${-d}px`,b=l?m:`${y}px`):f==="left"&&(w=`${r.floating.width+d}px`,b=l?m:`${y}px`),{data:{x:w,y:b}}}});function Y1(e){const[t,n="center"]=e.split("-");return[t,n]}var eR=W1,J1=G1,X1=K1,eS=Q1,[oh,tF]=Jr("Tooltip",[sh]),Xg=sh(),tS="TooltipProvider",tR=700,ub="tooltip.open",[nR,nS]=oh(tS),rS=e=>{const{__scopeTooltip:t,delayDuration:n=tR,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[l,u]=x.useState(!0),d=x.useRef(!1),f=x.useRef(0);return x.useEffect(()=>{const p=f.current;return()=>window.clearTimeout(p)},[]),a.jsx(nR,{scope:t,isOpenDelayed:l,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(f.current),u(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:x.useCallback(p=>{d.current=p},[]),disableHoverableContent:i,children:o})};rS.displayName=tS;var iS="Tooltip",[nF,ah]=oh(iS),ep="TooltipTrigger",rR=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ah(ep,n),o=nS(ep,n),l=Xg(n),u=x.useRef(null),d=ze(t,u,i.onTriggerChange),f=x.useRef(!1),p=x.useRef(!1),m=x.useCallback(()=>f.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),a.jsx(J1,{asChild:!0,...l,children:a.jsx(je.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:d,onPointerMove:de(e.onPointerMove,g=>{g.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),p.current=!0)}),onPointerLeave:de(e.onPointerLeave,()=>{i.onTriggerLeave(),p.current=!1}),onPointerDown:de(e.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:de(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:de(e.onBlur,i.onClose),onClick:de(e.onClick,i.onClose)})})});rR.displayName=ep;var iR="TooltipPortal",[rF,sR]=oh(iR,{forceMount:void 0}),fa="TooltipContent",sS=x.forwardRef((e,t)=>{const n=sR(fa,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,l=ah(fa,e.__scopeTooltip);return a.jsx(Mn,{present:r||l.open,children:l.disableHoverableContent?a.jsx(oS,{side:i,...o,ref:t}):a.jsx(oR,{side:i,...o,ref:t})})}),oR=x.forwardRef((e,t)=>{const n=ah(fa,e.__scopeTooltip),r=nS(fa,e.__scopeTooltip),i=x.useRef(null),o=ze(t,i),[l,u]=x.useState(null),{trigger:d,onClose:f}=n,p=i.current,{onPointerInTransitChange:m}=r,g=x.useCallback(()=>{u(null),m(!1)},[m]),y=x.useCallback((w,b)=>{const C=w.currentTarget,j={x:w.clientX,y:w.clientY},_=uR(j,C.getBoundingClientRect()),N=dR(j,_),A=hR(b.getBoundingClientRect()),k=mR([...N,...A]);u(k),m(!0)},[m]);return x.useEffect(()=>()=>g(),[g]),x.useEffect(()=>{if(d&&p){const w=C=>y(C,p),b=C=>y(C,d);return d.addEventListener("pointerleave",w),p.addEventListener("pointerleave",b),()=>{d.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",b)}}},[d,p,y,g]),x.useEffect(()=>{if(l){const w=b=>{const C=b.target,j={x:b.clientX,y:b.clientY},_=(d==null?void 0:d.contains(C))||(p==null?void 0:p.contains(C)),N=!fR(j,l);_?g():N&&(g(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,p,l,f,g]),a.jsx(oS,{...e,ref:o})}),[aR,lR]=oh(iS,{isInside:!1}),oS=x.forwardRef((e,t)=>
vendor: 6,560 bytes, line 361
361{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,d=ah(fa,n),f=Xg(n),{onClose:p}=d;return x.useEffect(()=>(document.addEventListener(ub,p),()=>document.removeEventListener(ub,p)),[p]),x.useEffect(()=>{if(d.trigger){const m=g=>{const y=g.target;y!=null&&y.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),a.jsx(wc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:a.jsxs(X1,{"data-state":d.stateAttribute,...f,...u,ref:t,style:{...u.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:[a.jsx(Og,{children:r}),a.jsx(aR,{scope:n,isInside:!0,children:a.jsx(HP,{id:d.contentId,role:"tooltip",children:i||r})})]})})});sS.displayName=fa;var aS="TooltipArrow",cR=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Xg(n);return lR(aS,n).isInside?null:a.jsx(eS,{...i,...r,ref:t})});cR.displayName=aS;function uR(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.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 dR(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function hR(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function fR(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o].x,d=t[o].y,f=t[l].x,p=t[l].y;d>r!=p>r&&n<(f-u)*(r-d)/(p-d)+u&&(i=!i)}return i}function mR(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),pR(t)}function pR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var gR=rS,lS=sS;const vR=gR,yR=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(lS,{ref:r,sideOffset:t,className:Ce("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));yR.displayName=lS.displayName;var Ia=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Os=typeof window>"u"||"Deno"in globalThis;function Tn(){}function xR(e,t){return typeof e=="function"?e(t):e}function tp(e){return typeof e=="number"&&e>=0&&e!==1/0}function cS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Do(e,t){return typeof e=="function"?e(t):e}function Yn(e,t){return typeof e=="function"?e(t):e}function db(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==ev(l,t.options))return!1}else if(!Xl(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function hb(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Rs(t.options.mutationKey)!==Rs(o))return!1}else if(!Xl(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ev(e,t){return((t==null?void 0:t.queryKeyHashFn)||Rs)(e)}function Rs(e){return JSON.stringify(e,(t,n)=>np(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Xl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Xl(e[n],t[n])):!1}function uS(e,t){if(e===t)return e;const n=fb(e)&&fb(t);if(n||np(e)&&np(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),l=o.length,u=n?[]:{};let d=0;for(let f=0;f<l;f++){const p=n?f:o[f];(!n&&r.includes(p)||n)&&e[p]===void 0&&t[p]===void 0?(u[p]=void 0,d++):(u[p]=uS(e[p],t[p]),u[p]===e[p]&&e[p]!==void 0&&d++)}return i===l&&d===i?e:u}return t}function Sd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function fb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function np(e){if(!mb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!mb(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function mb(e){return Object.prototype.toString.call(e)==="[object Object]"}function bR(e){return new Promise(t=>{setTimeout(t,e)})}function rp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?uS(e,t):t}function wR(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function _R(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var tv=Symbol();function dS(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===tv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ps,vi,qo,pw,SR=(pw=class extends Ia{constructor(){super();ye(this,ps);ye(this,vi);ye(this,qo);ae(this,qo,t=>{if(!Os&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}
vendor: 34,930 bytes, line 361
361onSubscribe(){D(this,vi)||this.setEventListener(D(this,qo))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,vi))==null||t.call(this),ae(this,vi,void 0))}setEventListener(t){var n;ae(this,qo,t),(n=D(this,vi))==null||n.call(this),ae(this,vi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){D(this,ps)!==t&&(ae(this,ps,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof D(this,ps)=="boolean"?D(this,ps):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ps=new WeakMap,vi=new WeakMap,qo=new WeakMap,pw),nv=new SR,Uo,yi,Vo,gw,jR=(gw=class extends Ia{constructor(){super();ye(this,Uo,!0);ye(this,yi);ye(this,Vo);ae(this,Vo,t=>{if(!Os&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){D(this,yi)||this.setEventListener(D(this,Vo))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,yi))==null||t.call(this),ae(this,yi,void 0))}setEventListener(t){var n;ae(this,Vo,t),(n=D(this,yi))==null||n.call(this),ae(this,yi,t(this.setOnline.bind(this)))}setOnline(t){D(this,Uo)!==t&&(ae(this,Uo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return D(this,Uo)}},Uo=new WeakMap,yi=new WeakMap,Vo=new WeakMap,gw),jd=new jR;function ip(){let e,t;const n=new Promise((i,o)=>{e=i,t=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}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function NR(e){return Math.min(1e3*2**e,3e4)}function hS(e){return(e??"online")==="online"?jd.isOnline():!0}var fS=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function kf(e){return e instanceof fS}function mS(e){let t=!1,n=0,r=!1,i;const o=ip(),l=b=>{var C;r||(g(new fS(b)),(C=e.abort)==null||C.call(e))},u=()=>{t=!0},d=()=>{t=!1},f=()=>nv.isFocused()&&(e.networkMode==="always"||jd.isOnline())&&e.canRun(),p=()=>hS(e.networkMode)&&e.canRun(),m=b=>{var C;r||(r=!0,(C=e.onSuccess)==null||C.call(e,b),i==null||i(),o.resolve(b))},g=b=>{var C;r||(r=!0,(C=e.onError)==null||C.call(e,b),i==null||i(),o.reject(b))},y=()=>new Promise(b=>{var C;i=j=>{(r||f())&&b(j)},(C=e.onPause)==null||C.call(e)}).then(()=>{var b;i=void 0,r||(b=e.onContinue)==null||b.call(e)}),w=()=>{if(r)return;let b;const C=n===0?e.initialPromise:void 0;try{b=C??e.fn()}catch(j){b=Promise.reject(j)}Promise.resolve(b).then(m).catch(j=>{var T;if(r)return;const _=e.retry??(Os?0:3),N=e.retryDelay??NR,A=typeof N=="function"?N(n,j):N,k=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,j);if(t||!k){g(j);return}n++,(T=e.onFail)==null||T.call(e,n,j),bR(A).then(()=>f()?void 0:y()).then(()=>{t?g(j):w()})})};return{promise:o,cancel:l,continue:()=>(i==null||i(),o),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?w():y().then(w),o)}}function CR(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=u=>setTimeout(u,0);const o=u=>{t?e.push(u):i(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||l()}return d},batchCalls:u=>(...d)=>{o(()=>{u(...d)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var jt=CR(),gs,vw,pS=(vw=class{constructor(){ye(this,gs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tp(this.gcTime)&&ae(this,gs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Os?1/0:5*60*1e3))}clearGcTimeout(){D(this,gs)&&(clearTimeout(D(this,gs)),ae(this,gs,void 0))}},gs=new WeakMap,vw),Wo,Ho,En,Bt,dc,vs,Gn,Ir,yw,ER=(yw=class extends pS{constructor(t){super();ye(this,Gn);ye(this,Wo);ye(this,Ho);ye(this,En);ye(this,Bt);ye(this,dc);ye(this,vs);ae(this,vs,!1),ae(this,dc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ae(this,En,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ae(this,Wo,TR(this.options)),this.state=t.state??D(this,Wo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=D(this,Bt))==null?void 0:t.promise}setOptions(t){this.options={...D(this,dc),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,En).remove(this)}setData(t,n){const r=rp(this.state.data,t,this.options);return Re(this,Gn,Ir).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Re(this,Gn,Ir).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=D(this,Bt))==null?void 0:r.promise;return(i=D(this,Bt))==null||i.cancel(t),n?n.then(Tn).catch(Tn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,Wo))}isActive(){return this.observers.some(t=>Yn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===tv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!cS(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,Bt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,Bt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),D(this,En).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(D(this,Bt)&&(D(this,vs)?D(this,Bt).cancel({revert:!0}):D(this,Bt).cancelRetry()),this.scheduleGc()),D(this,En).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Re(this,Gn,Ir).call(this,{type:"invalidate"})}fetch(t,n){var d,f,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(D(this,Bt))return D(this,Bt).continueRetry(),D(this,Bt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,i=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(ae(this,vs,!0),r.signal)})},o=()=>{const m=dS(this.options,n),g={queryKey:this.queryKey,meta:this.meta};return i(g),ae(this,vs,!1),this.options.persister?this.options.persister(m,g,this):m(g)},l={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(l),(d=this.options.behavior)==null||d.onFetch(l,this),ae(this,Ho,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&Re(this,Gn,Ir).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta});const u=m=>{var g,y,w,b;kf(m)&&m.silent||Re(this,Gn,Ir).call(this,{type:"error",error:m}),kf(m)||((y=(g=D(this,En).config).onError)==null||y.call(g,m,this),(b=(w=D(this,En).config).onSettled)==null||b.call(w,this.state.data,m,this)),this.scheduleGc()};return ae(this,Bt,mS({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var g,y,w,b;if(m===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(C){u(C);return}(y=(g=D(this,En).config).onSuccess)==null||y.call(g,m,this),(b=(w=D(this,En).config).onSettled)==null||b.call(w,m,this.state.error,this),this.scheduleGc()},onError:u,onFail:(m,g)=>{Re(this,Gn,Ir).call(this,{type:"failed",failureCount:m,error:g})},onPause:()=>{Re(this,Gn,Ir).call(this,{type:"pause"})},onContinue:()=>{Re(this,Gn,Ir).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),D(this,Bt).start()}},Wo=new WeakMap,Ho=new WeakMap,En=new WeakMap,Bt=new WeakMap,dc=new WeakMap,vs=new WeakMap,Gn=new WeakSet,Ir=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...gS(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return kf(i)&&i.revert&&D(this,Ho)?{...D(this,Ho),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,...t.state}}};this.state=n(this.state),jt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),D(this,En).notify({query:this,type:"updated",action:t})})},yw);function gS(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function TR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,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 pr,xw,kR=(xw=class extends Ia{constructor(t={}){super();ye(this,pr);this.config=t,ae(this,pr,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??ev(i,n);let l=this.get(o);return l||(l=new ER({cache:this,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){D(this,pr).has(t.queryHash)||(D(this,pr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=D(this,pr).get(t.queryHash);n&&(t.destroy(),n===t&&D(this,pr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return D(this,pr).get(t)}getAll(){return[...D(this,pr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>db(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>db(t,r)):n}notify(t){jt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){jt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){jt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},pr=new WeakMap,xw),gr,Wt,ys,vr,ci,bw,PR=(bw=class extends pS{constructor(t){super();ye(this,vr);ye(this,gr);ye(this,Wt);ye(this,ys);this.mutationId=t.mutationId,ae(this,Wt,t.mutationCache),ae(this,gr,[]),this.state=t.state||vS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){D(this,gr).includes(t)||(D(this,gr).push(t),this.clearGcTimeout(),D(this,Wt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ae(this,gr,D(this,gr).filter(n=>n!==t)),this.scheduleGc(),D(this,Wt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){D(this,gr).length||(this.state.status==="pending"?this.scheduleGc():D(this,Wt).remove(this))}continue(){var t;return((t=D(this,ys))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,l,u,d,f,p,m,g,y,w,b,C,j,_,N,A,k,T,R;ae(this,ys,mS({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,I)=>{Re(this,vr,ci).call(this,{type:"failed",failureCount:P,error:I})},onPause:()=>{Re(this,vr,ci).call(this,{type:"pause"})},onContinue:()=>{Re(this,vr,ci).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,Wt).canRun(this)}));const n=this.state.status==="pending",r=!D(this,ys).canStart();try{if(!n){Re(this,vr,ci).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(i=D(this,Wt).config).onMutate)==null?void 0:o.call(i,t,this));const I=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t));I!==this.state.context&&Re(this,vr,ci).call(this,{type:"pending",context:I,variables:t,isPaused:r})}const P=await D(this,ys).start();return await((f=(d=D(this,Wt).config).onSuccess)==null?void 0:f.call(d,P,t,this.state.context,this)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,P,t,this.state.context)),await((y=(g=D(this,Wt).config).onSettled)==null?void 0:y.call(g,P,null,this.state.variables,this.state.context,this)),await((b=(w=this.options).onSettled)==null?void 0:b.call(w,P,null,t,this.state.context)),Re(this,vr,ci).call(this,{type:"success",data:P}),P}catch(P){try{throw await((j=(C=D(this,Wt).config).onError)==null?void 0:j.call(C,P,t,this.state.context,this)),await((N=(_=this.options).onError)==null?void 0:N.call(_,P,t,this.state.context)),await((k=(A=D(this,Wt).config).onSettled)==null?void 0:k.call(A,void 0,P,this.state.variables,this.state.context,this)),await((R=(T=this.options).onSettled)==null?void 0:R.call(T,void 0,P,t,this.state.context)),P}finally{Re(this,vr,ci).call(this,{type:"error",error:P})}}finally{D(this,Wt).runNext(this)}}},gr=new WeakMap,Wt=new WeakMap,ys=new WeakMap,vr=new WeakSet,ci=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),jt.batch(()=>{D(this,gr).forEach(r=>{r.onMutationUpdate(t)}),D(this,Wt).notify({mutation:this,type:"updated",action:t})})},bw);function vS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var dn,hc,ww,AR=(ww=class extends Ia{constructor(t={}){super();ye(this,dn);ye(this,hc);this.config=t,ae(this,dn,new Map),ae(this,hc,Date.now())}build(t,n,r){const i=new PR({mutationCache:this,mutationId:++Zc(this,hc)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=vu(t),r=D(this,dn).get(n)??[];r.push(t),D(this,dn).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=vu(t);if(D(this,dn).has(n)){const i=(r=D(this,dn).get(n))==null?void 0:r.filter(o=>o!==t);i&&(i.length===0?D(this,dn).delete(n):D(this,dn).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=D(this,dn).get(vu(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=D(this,dn).get(vu(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...D(this,dn).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>hb(n,r))}findAll(t={}){return this.getAll().filter(n=>hb(t,n))}notify(t){jt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return jt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Tn))))}},dn=new WeakMap,hc=new WeakMap,ww);function vu(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function pb(e){return{onFetch:(t,n)=>{var p,m,g,y,w;const r=t.options,i=(g=(m=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:g.direction,o=((y=t.state.data)==null?void 0:y.pages)||[],l=((w=t.state.data)==null?void 0:w.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let b=!1;const C=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(t.signal.aborted?b=!0:t.signal.addEventListener("abort",()=>{b=!0}),t.signal)})},j=dS(t.options,t.fetchOptions),_=async(N,A,k)=>{if(b)return Promise.reject();if(A==null&&N.pages.length)return Promise.resolve(N);const T={queryKey:t.queryKey,pageParam:A,direction:k?"backward":"forward",meta:t.options.meta};C(T);const R=await j(T),{maxPages:P}=t.options,I=k?_R:wR;return{pages:I(N.pages,R,P),pageParams:I(N.pageParams,A,P)}};if(i&&o.length){const N=i==="backward",A=N?OR:gb,k={pages:o,pageParams:l},T=A(r,k);u=await _(k,T,N)}else{const N=e??o.length;do{const A=d===0?l[0]??r.initialPageParam:gb(r,u);if(d>0&&A==null)break;u=await _(u,A),d++}while(d<N)}return u};t.options.persister?t.fetchFn=()=>{var b,C;return(C=(b=t.options).persister)==null?void 0:C.call(b,f,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function gb(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function OR(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var ct,xi,bi,Go,Ko,wi,Zo,Qo,_w,RR=(_w=class{constructor(e={}){ye(this,ct);ye(this,xi);ye(this,bi);ye(this,Go);ye(this,Ko);ye(this,wi);ye(this,Zo);ye(this,Qo);ae(this,ct,e.queryCache||new kR),ae(this,xi,e.mutationCache||new AR),ae(this,bi,e.defaultOptions||{}),ae(this,Go,new Map),ae(this,Ko,new Map),ae(this,wi,0)}mount(){Zc(this,wi)._++,D(this,wi)===1&&(ae(this,Zo,nv.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,ct).onFocus())})),ae(this,Qo,jd.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,ct).onOnline())})))}unmount(){var e,t;Zc(this,wi)._--,D(this,wi)===0&&((e=D(this,Zo))==null||e.call(this),ae(this,Zo,void 0),(t=D(this,Qo))==null||t.call(this),ae(this,Qo,void 0))}isFetching(e){return D(this,ct).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return D(this,xi).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,ct).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=D(this,ct).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Do(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return D(this,ct).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=D(this,ct).get(r.queryHash),o=i==null?void 0:i.state.data,l=xR(t,o);if(l!==void 0)return D(this,ct).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return jt.batch(()=>D(this,ct).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,ct).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=D(this,ct);jt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=D(this,ct),r={type:"active",...e};return jt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=jt.batch(()=>D(this,ct).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Tn).catch(Tn)}invalidateQueries(e={},t={}){return jt.batch(()=>{if(D(this,ct).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=jt.batch(()=>D(this,ct).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Tn)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Tn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=D(this,ct).build(this,t);return n.isStaleByTime(Do(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Tn).catch(Tn)}fetchInfiniteQuery(e){return e.behavior=pb(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Tn).catch(Tn)}ensureInfiniteQueryData(e){return e.behavior=pb(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jd.isOnline()?D(this,xi).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,ct)}getMutationCache(){return D(this,xi)}getDefaultOptions(){return D(this,bi)}setDefaultOptions(e){ae(this,bi,e)}setQueryDefaults(e,t){D(this,Go).set(Rs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...D(this,Go).values()];let n={};return t.forEach(r=>{Xl(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){D(this,Ko).set(Rs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...D(this,Ko).values()];let n={};return t.forEach(r=>{Xl(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...D(this,bi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ev(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===tv&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...D(this,bi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){D(this,ct).clear(),D(this,xi).clear()}},ct=new WeakMap,xi=new WeakMap,bi=new WeakMap,Go=new WeakMap,Ko=new WeakMap,wi=new WeakMap,Zo=new WeakMap,Qo=new WeakMap,_w),en,Me,fc,Ht,xs,Yo,_i,yr,mc,Jo,Xo,bs,ws,Si,ea,Ve,gl,sp,op,ap,lp,cp,up,dp,yS,Sw,IR=(Sw=class extends Ia{constructor(t,n){super();ye(this,Ve);ye(this,en);ye(this,Me);ye(this,fc);ye(this,Ht);ye(this,xs);ye(this,Yo);ye(this,_i);ye(this,yr);ye(this,mc);ye(this,Jo);ye(this,Xo);ye(this,bs);ye(this,ws);ye(this,Si);ye(this,ea,new Set);this.options=n,ae(this,en,t),ae(this,yr,null),ae(this,_i,ip()),this.options.experimental_prefetchInRender||D(this,_i).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(D(this,Me).addObserver(this),vb(D(this,Me),this.options)?Re(this,Ve,gl).call(this):this.updateResult(),Re(this,Ve,lp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hp(D(this,Me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hp(D(this,Me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Re(this,Ve,cp).call(this),Re(this,Ve,up).call(this),D(this,Me).removeObserver(this)}setOptions(t,n){const r=this.options,i=D(this,Me);if(this.options=D(this,en).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Yn(this.options.enabled,D(this,Me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Re(this,Ve,dp).call(this),D(this,Me).setOptions(this.options),r._defaulted&&!Sd(this.options,r)&&D(this,en).getQueryCache().notify({type:"observerOptionsUpdated",query:D(this,Me),observer:this});const o=this.hasListeners();o&&yb(D(this,Me),i,this.options,r)&&Re(this,Ve,gl).call(this),this.updateResult(n),o&&(D(this,Me)!==i||Yn(this.options.enabled,D(this,Me))!==Yn(r.enabled,D(this,Me))||Do(this.options.staleTime,D(this,Me))!==Do(r.staleTime,D(this,Me)))&&Re(this,Ve,sp).call(this);const l=Re(this,Ve,op).call(this);o&&(D(this,Me)!==i||Yn(this.options.enabled,D(this,Me))!==Yn(r.enabled,D(this,Me))||l!==D(this,Si))&&Re(this,Ve,ap).call(this,l)}getOptimisticResult(t){const n=D(this,en).getQueryCache().build(D(this,en),t),r=this.createResult(n,t);return zR(this,r)&&(ae(this,Ht,r),ae(this,Yo,this.options),ae(this,xs,D(this,Me).state)),r}getCurrentResult(){return D(this,Ht)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){D(this,ea).add(t)}getCurrentQuery(){return D(this,Me)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=D(this,en).defaultQueryOptions(t),r=D(this,en).getQueryCache().build(D(this,en),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Re(this,Ve,gl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),D(this,Ht)))}createResult(t,n){var P;const r=D(this,Me),i=this.options,o=D(this,Ht),l=D(this,xs),u=D(this,Yo),f=t!==r?t.state:D(this,fc),{state:p}=t;let m={...p},g=!1,y;if(n._optimisticResults){const I=this.hasListeners(),O=!I&&vb(t,n),B=I&&yb(t,r,n,i);(O||B)&&(m={...m,...gS(p.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:w,errorUpdatedAt:b,status:C}=m;if(n.select&&m.data!==void 0)if(o&&m.data===(l==null?void 0:l.data)&&n.select===D(this,mc))y=D(this,Jo);else try{ae(this,mc,n.select),y=n.select(m.data),y=rp(o==null?void 0:o.data,y,n),ae(this,Jo,y),ae(this,yr,null)}catch(I){ae(this,yr,I)}else y=m.data;if(n.placeholderData!==void 0&&y===void 0&&C==="pending"){let I;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData))I=o.data;else if(I=typeof n.placeholderData=="function"?n.placeholderData((P=D(this,Xo))==null?void 0:P.state.data,D(this,Xo)):n.placeholderData,n.select&&I!==void 0)try{I=n.select(I),ae(this,yr,null)}catch(O){ae(this,yr,O)}I!==void 0&&(C="success",y=rp(o==null?void 0:o.data,I,n),g=!0)}D(this,yr)&&(w=D(this,yr),y=D(this,Jo),b=Date.now(),C="error");const j=m.fetchStatus==="fetching",_=C==="pending",N=C==="error",A=_&&j,k=y!==void 0,R={status:C,fetchStatus:m.fetchStatus,isPending:_,isSuccess:C==="success",isError:N,isInitialLoading:A,isLoading:A,data:y,dataUpdatedAt:m.dataUpdatedAt,error:w,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:j,isRefetching:j&&!_,isLoadingError:N&&!k,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:N&&k,isStale:rv(t,n),refetch:this.refetch,promise:D(this,_i)};if(this.options.experimental_prefetchInRender){const I=U=>{R.status==="error"?U.reject(R.error):R.data!==void 0&&U.resolve(R.data)},O=()=>{const U=ae(this,_i,R.promise=ip());I(U)},B=D(this,_i);switch(B.status){case"pending":t.queryHash===r.queryHash&&I(B);break;case"fulfilled":(R.status==="error"||R.data!==B.value)&&O();break;case"rejected":(R.status!=="error"||R.error!==B.reason)&&O();break}}return R}updateResult(t){const n=D(this,Ht),r=this.createResult(D(this,Me),this.options);if(ae(this,xs,D(this,Me).state),ae(this,Yo,this.options),D(this,xs).data!==void 0&&ae(this,Xo,D(this,Me)),Sd(r,n))return;ae(this,Ht,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,u=typeof l=="function"?l():l;if(u==="all"||!u&&!D(this,ea).size)return!0;const d=new Set(u??D(this,ea));return this.options.throwOnError&&d.add("error"),Object.keys(D(this,Ht)).some(f=>{const p=f;return D(this,Ht)[p]!==n[p]&&d.has(p)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),Re(this,Ve,yS).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Re(this,Ve,lp).call(this)}},en=new WeakMap,Me=new WeakMap,fc=new WeakMap,Ht=new WeakMap,xs=new WeakMap,Yo=new WeakMap,_i=new WeakMap,yr=new WeakMap,mc=new WeakMap,Jo=new WeakMap,Xo=new WeakMap,bs=new WeakMap,ws=new WeakMap,Si=new WeakMap,ea=new WeakMap,Ve=new WeakSet,gl=function(t){Re(this,Ve,dp).call(this);let n=D(this,Me).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Tn)),n},sp=function(){Re(this,Ve,cp).call(this);const t=Do(this.options.staleTime,D(this,Me));if(Os||D(this,Ht).isStale||!tp(t))return;const r=cS(D(this,Ht).dataUpdatedAt,t)+1;ae(this,bs,setTimeout(()=>{D(this,Ht).isStale||this.updateResult()},r))},op=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(D(this,Me)):this.options.refetchInterval)??!1},ap=function(t){Re(this,Ve,up).call(this),ae(this,Si,t),!(Os||Yn(this.options.enabled,D(this,Me))===!1||!tp(D(this,Si))||D(this,Si)===0)&&ae(this,ws,setInterval(()=>{(this.options.refetchIntervalInBackground||nv.isFocused())&&Re(this,Ve,gl).call(this)},D(this,Si)))},lp=function(){Re(this,Ve,sp).call(this),Re(this,Ve,ap).call(this,Re(this,Ve,op).call(this))},cp=function(){D(this,bs)&&(clearTimeout(D(this,bs)),ae(this,bs,void 0))},up=function(){D(this,ws)&&(clearInterval(D(this,ws)),ae(this,ws,void 0))},dp=function(){const t=D(this,en).getQueryCache().build(D(this,en),this.options);if(t===D(this,Me))return;const n=D(this,Me);ae(this,Me,t),ae(this,fc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},yS=function(t){jt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(D(this,Ht))}),D(this,en).getQueryCache().notify({query:D(this,Me),type:"observerResultsUpdated"})})},Sw);function LR(e,t){return Yn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function vb(e,t){return LR(e,t)||e.state.data!==void 0&&hp(e,t,t.refetchOnMount)}function hp(e,t,n){if(Yn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&rv(e,t)}return!1}function yb(e,t,n,r){return(e!==t||Yn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&rv(e,n)}function rv(e,t){return Yn(t.enabled,e)!==!1&&e.isStaleByTime(Do(t.staleTime,e))}function zR(e,t){return!Sd(e.getCurrentResult(),t)}var ji,Ni,tn,Dr,Ur,qu,fp,jw,MR=(jw=class extends Ia{constructor(n,r){super();ye(this,Ur);ye(this,ji);ye(this,Ni);ye(this,tn);ye(this,Dr);ae(this,ji,n),this.setOptions(r),this.bindMethods(),Re(this,Ur,qu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=D(this,ji).defaultMutationOptions(n),Sd(this.options,r)||D(this,ji).getMutationCache().notify({type:"observerOptionsUpdated",mutation:D(this,tn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Rs(r.mutationKey)!==Rs(this.options.mutationKey)?this.reset():((i=D(this,tn))==null?void 0:i.state.status)==="pending"&&D(this,tn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=D(this,tn))==null||n.removeObserver(this)}onMutationUpdate(n){Re(this,Ur,qu).call(this),Re(this,Ur,fp).call(this,n)}getCurrentResult(){return D(this,Ni)}reset(){var n;(n=D(this,tn))==null||n.removeObserver(this),ae(this,tn,void 0),Re(this,Ur,qu).call(this),Re(this,Ur,fp).call(this)}mutate(n,r){var i;return ae(this,Dr,r),(i=D(this,tn))==null||i.removeObserver(this),ae(this,tn,D(this,ji).getMutationCache().build(D(this,ji),this.options)),D(this,tn).addObserver(this),D(this,tn).execute(n)}},ji=new WeakMap,Ni=new WeakMap,tn=new WeakMap,Dr=new WeakMap,Ur=new WeakSet,qu=function(){var r;const n=((r=D(this,tn))==null?void 0:r.state)??vS();ae(this,Ni,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},fp=function(n){jt.batch(()=>{var r,i,o,l,u,d,f,p;if(D(this,Dr)&&this.hasListeners()){const m=D(this,Ni).variables,g=D(this,Ni).context;(n==null?void 0:n.type)==="success"?((i=(r=D(this,Dr)).onSuccess)==null||i.call(r,n.data,m,g),(l=(o=D(this,Dr)).onSettled)==null||l.call(o,n.data,null,m,g)):(n==null?void 0:n.type)==="error"&&((d=(u=D(this,Dr)).onError)==null||d.call(u,n.error,m,g),(p=(f=D(this,Dr)).onSettled)==null||p.call(f,void 0,n.error,m,g))}this.listeners.forEach(m=>{m(D(this,Ni))})})},jw),xS=x.createContext(void 0),qs=e=>{const t=x.useContext(xS);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},DR=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(xS.Provider,{value:e,children:t})),bS=x.createContext(!1),FR=()=>x.useContext(bS);bS.Provider;function BR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $R=x.createContext(BR()),qR=()=>x.useContext($R);function wS(e,t){return typeof e=="function"?e(...t):!!e}function _S(){}var UR=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},VR=e=>{x.useEffect(()=>{e.clearReset()},[e])},WR=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&wS(n,[e.error,r]),HR=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},GR=(e,t)=>e.isLoading&&e.isFetching&&!t,KR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,xb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ZR(e,t,n){var p,m,g,y,w;const r=qs(),i=FR(),o=qR(),l=r.defaultQueryOptions(e);(m=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||m.call(p,l),l._optimisticResults=i?"isRestoring":"optimistic",HR(l),UR(l,o),VR(o);const u=!r.getQueryCache().get(l.queryHash),[d]=x.useState(()=>new t(r,l)),f=d.getOptimisticResult(l);if(x.useSyncExternalStore(x.useCallback(b=>{const C=i?()=>{}:d.subscribe(jt.batchCalls(b));return d.updateResult(),C},[d,i]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),x.useEffect(()=>{d.setOptions(l,{listeners:!1})},[l,d]),KR(l,f))throw xb(l,d,o);if(WR({result:f,errorResetBoundary:o,throwOnError:l.throwOnError,query:r.getQueryCache().get(l.queryHash)}))throw f.error;if((y=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||y.call(g,l,f),l.experimental_prefetchInRender&&!Os&&GR(f,i)){const b=u?xb(l,d,o):(w=r.getQueryCache().get(l.queryHash))==null?void 0:w.promise;b==null||b.catch(_S).finally(()=>{d.updateResult()})}return l.notifyOnChangeProps?f:d.trackResult(f)}function qt(e,t){return ZR(e,IR)}
vendor: 4,098 bytes, lines 361-370
361function Tt(e,t){const n=qs(),[r]=x.useState(()=>new MR(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const i=x.useSyncExternalStore(x.useCallback(l=>r.subscribe(jt.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=x.useCallback((l,u)=>{r.mutate(l,u).catch(_S)},[r]);if(i.error&&wS(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}/**
362 * @remix-run/router v1.20.0
363 *
364 * Copyright (c) Remix Software Inc.
365 *
366 * This source code is licensed under the MIT license found in the
367 * LICENSE.md file in the root directory of this source tree.
368 *
369 * @license MIT
370 */function ec(){return ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ec.apply(this,arguments)}var Ti;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ti||(Ti={}));const bb="popstate";function QR(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:l,hash:u}=r.location;return mp("",{pathname:o,search:l,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Nd(i)}return JR(t,n,null,e)}function bt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function SS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function YR(){return Math.random().toString(36).substr(2,8)}function wb(e,t){return{usr:e.state,key:e.key,idx:t}}function mp(e,t,n,r){return n===void 0&&(n=null),ec({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?La(t):t,{state:n,key:t&&t.key||r||YR()})}function Nd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function La(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function JR(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,u=Ti.Pop,d=null,f=p();f==null&&(f=0,l.replaceState(ec({},l.state,{idx:f}),""));function p(){return(l.state||{idx:null}).idx}function m(){u=Ti.Pop;let C=p(),j=C==null?null:C-f;f=C,d&&d({action:u,location:b.location,delta:j})}function g(C,j){u=Ti.Push;let _=mp(b.location,C,j);f=p()+1;let N=wb(_,f),A=b.createHref(_);try{l.pushState(N,"",A)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(A)}o&&d&&d({action:u,location:b.location,delta:1})}function y(C,j){u=Ti.Replace;let _=mp(b.location,C,j);f=p();let N=wb(_,f),A=b.createHref(_);l.replaceState(N,"",A),o&&d&&d({action:u,location:b.location,delta:0})}function w(C){let j=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof C=="string"?C:Nd(C);return _=_.replace(/ $/,"%20"),bt(j,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,j)}let b={get action(){return u},get location(){return e(i,l)},listen(C){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(bb,m),d=C,()=>{i.removeEventListener(bb,m),d=null}},createHref(C){return t(i,C)},createURL:w,encodeLocation(C){let j=w(C);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:g,replace:y,go(C){return l.go(C)}};return b}var _b;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(_b||(_b={}));function XR(e,t,n){return n===void 0&&(n="/"),eI(e,t,n,!1)}function eI(e,t,n,r){let i=typeof t=="string"?La(t):t,o=iv(i.pathname||"/",n);if(o==null)return null;let l=jS(e);tI(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let f=hI(o);u=uI(l[d],f,r)}return u}function jS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,l,u)=>{let d={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};d.relativePath.startsWith("/")&&(bt(d.relativePath.startsWith(r),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+r+'" is not val
370id. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(r.length));let f=Mi([r,d.relativePath]),p=n.concat(d);o.children&&o.children.length>0&&(bt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),jS(o.children,t,p,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:lI(f,o.index),routesMeta:p})};return e.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,l);else for(let d of NS(o.path))i(o,l,d)}),t}function NS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=NS(r.join("/")),u=[];return u.push(...l.map(d=>d===""?o:[o,d].join("/"))),i&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function tI(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:cI(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const nI=/^:[\w-]+$/,rI=3,iI=2,sI=1,oI=10,aI=-2,Sb=e=>e==="*";function lI(e,t){let n=e.split("/"),r=n.length;return n.some(Sb)&&(r+=aI),t&&(r+=iI),n.filter(i=>!Sb(i)).reduce((i,o)=>i+(nI.test(o)?rI:o===""?sI:oI),r)}function cI(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function uI(e,t,n){let{routesMeta:r}=e,i={},o="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,p=o==="/"?t:t.slice(o.length)||"/",m=jb({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},p),g=d.route;if(!m&&f&&n&&!r[r.length-1].route.index&&(m=jb({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},p)),!m)return null;
vendor: 6,834 bytes, lines 370-379
370Object.assign(i,m.params),l.push({params:i,pathname:Mi([o,m.pathname]),pathnameBase:gI(Mi([o,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(o=Mi([o,m.pathnameBase]))}return l}function jb(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=dI(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],l=o.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:r.reduce((f,p,m)=>{let{paramName:g,isOptional:y}=p;if(g==="*"){let b=u[m]||"";l=o.slice(0,o.length-b.length).replace(/(.)\/+$/,"$1")}const w=u[m];return y&&!w?f[g]=void 0:f[g]=(w||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:l,pattern:e}}function dI(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),SS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function hI(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return SS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function iv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function fI(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?La(e):e;return{pathname:n?n.startsWith("/")?n:mI(n,t):t,search:vI(r),hash:yI(i)}}function mI(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Pf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` 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 pI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function CS(e,t){let n=pI(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ES(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=La(e):(i=ec({},e),bt(!i.pathname||!i.pathname.includes("?"),Pf("?","pathname","search",i)),bt(!i.pathname||!i.pathname.includes("#"),Pf("#","pathname","hash",i)),bt(!i.search||!i.search.includes("#"),Pf("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,u;if(l==null)u=n;else{let m=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),m-=1;i.pathname=g.join("/")}u=m>=0?t[m]:"/"}let d=fI(i,u),f=l&&l!=="/"&&l.endsWith("/"),p=(o||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||p)&&(d.pathname+="/"),d}const Mi=e=>e.join("/").replace(/\/\/+/g,"/"),gI=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),vI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function xI(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const TS=["post","put","patch","delete"];new Set(TS);const bI=["get",...TS];new Set(bI);/**
371 * React Router v6.27.0
372 *
373 * Copyright (c) Remix Software Inc.
374 *
375 * This source code is licensed under the MIT license found in the
376 * LICENSE.md file in the root directory of this source tree.
377 *
378 * @license MIT
379 */function tc(){return tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tc.apply(this,arguments)}const sv=x.createContext(null),wI=x.createContext(null),Us=x.createContext(null),lh=x.createContext(null),Vs=x.createContext({outlet:null,matches:[],isDataRoute:!1}),kS=x.createContext(null);function _I(e,t){let{relative:n}=t===void 0?{}:t;jc()||bt(!1);let{basename:r,navigator:i}=x.useContext(Us),{hash:o,pathname:l,search:u}=AS(e,{relative:n}),d=l;return r!=="/"&&(d=l==="/"?r:Mi([r,l])),i.createHref({pathname:d,search:u,hash:o})}function jc(){return x.useContext(lh)!=null}function za(){return jc()||bt(!1),x.useContext(lh).location}function PS(e){x.useContext(Us).static||x.useLayoutEffect(e)}function ov(){let{isDataRoute:e}=x.useContext(Vs);return e?LI():SI()}function SI(){jc()||bt(!1);let e=x.useContext(sv),{basename:t,future:n,navigator:r}=x.useContext(Us),{matches:i}=x.useContext(Vs),{pathname:o}=za(),l=JSON.stringify(CS(i,n.v7_relativeSplatPath)),u=x.useRef(!1);return PS(()=>{u.current=!0}),x.useCallback(function(f,p){if(p===void 0&&(p={}),!u.current)return;if(typeof f=="number"){r.go(f);return}let m=ES(f,JSON.parse(l),o,p.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Mi([t,m.pathname])),(p.replace?r.replace:r.push)(m,p.state,p)},[t,r,l,o,e])}function AS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Us),{matches:i}=x.useContext(Vs),{pathname:o}=za(),l=JSON.stringify(CS(i,r.v7_relativeSplatPath));return x.useMemo(()=>ES(e,JSON.parse(l),o,n==="path"),[e,l,o,n])}function jI(e,t){return NI(e,t)}function NI(e,t,n,r){jc()||bt(!1);let{navigator:i}=x.useContext(Us),{matches:o}=x.useContext(Vs),l=o[o.length-1],u=l?l.params:{};l&&l.pathname;let d=l?l.pathnameBase:"/";l&&l.route;let f=za(),p;if(t){var m;let C=typeof t=="string"?La(t):t;d==="/"||(m=C.pathname)!=null&&m.startsWith(d)||bt(!1),p=C}else p=f;let g=p.pathname||"/",y=g;if(d!=="/"){let C=d.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(C.length).join("/")}let w=XR(e,{pathname:y}),b=PI(w&&w.map(C=>Object.assign({},C,{params:Object.assign({},u,C.params),pathname:Mi([d,i.encodeLocation?i.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?d:Mi([d,i.encodeLocation?i.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),o,n,r);return t&&b?x.createElement(lh.Provider,{value:{location:tc({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Ti.Pop}},b):b}function CI(){let e=II(),t=xI(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application 
379Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,null)}const EI=x.createElement(CI,null);class TI extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(Vs.Provider,{value:this.props.routeContext},x.createElement(kS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function kI(e){let{routeContext:t,match:n,children:r}=e,i=x.useContext(sv);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Vs.Provider,{value:t},r)}function PI(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let p=l.findIndex(m=>m.route.id&&(u==null?void 0:u[m.route.id])!==void 0);p>=0||bt(!1),l=l.slice(0,Math.min(l.length,p+1))}let d=!1,f=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p<l.length;p++){let m=l[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=p),m.route.id){let{loaderData:g,errors:y}=n,w=m.route.loader&&g[m.route.id]===void 0&&(!y||y[m.route.id]===void 0);if(m.route.lazy||w){d=!0,f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}return l.reduceRight((p,m,g)=>{let y,w=!1,b=null,C=null;n&&(y=u&&m.route.id?u[m.route.id]:void 0,b=m.route.errorElement||EI,d&&(f<0&&g===0?(w=!0,C=null):f===g&&(w=!0,C=m.route.hydrateFallbackElement||null)));let j=t.concat(l.slice(0,g+1)),_=()=>{let N;return y?N=b:w?N=C:m.route.Component?N=x.createElement(m.route.Component,null):m.route.element?N=m.route.element:N=p,x.createElement(kI,{match:m,routeContext:{outlet:p,matches:j,isDataRoute:n!=null},children:N})};return n&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?x.createElement(TI,{location:n.location,revalidation:n.revalidation,component:b,error:y,children:_(),routeContext:{outlet:null,matches:j,isDataRoute:!0}}):_()},null)}var OS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(OS||{}),Cd=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Cd||{});function AI(e){let t=x.useContext(sv);return t||bt(!1),t}function OI(e){let t=x.useContext(wI);return t||bt(!1),t}function RI(e){let t=x.useContext(Vs);return t||bt(!1),t}function RS(e){let t=RI(),n=t.matches[t.matches.length-1];return n.route.id||bt(!1),n.route.id}function II(){var e;let t=x.useContext(kS),n=OI(Cd.UseRouteError),r=RS(Cd.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function LI(){let{router:e}=AI(OS.UseNavigateStable),t=RS(Cd.UseNavigateStable),n=x.useRef(!1);return PS(()=>{n.current=!0}),x.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,tc({fromRouteId:t},o)))},[e,t])}function Jn(e){bt(!1)}function zI(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Ti.Pop,navigator:o,static:l=!1,future:u}=e;jc()&&bt(!1);let d=t.replace(/^\/*/,"/"),f=x.useMemo(()=>({basename:d,navigator:o,static:l,future:tc({v7_relativeSplatPath:!1},u)}),[d,u,o,l]);typeof r=="string"&&(r=La(r));let{pathname:p="/",search:m="",hash:g="",state:y=null,key:w="default"}=r,b=x.useMemo(()=>{let C=iv(p,d);return C==null?null:{location:{pathname:C,search:m,hash:g,state:y,key:w},navigationType:i}},[d,p,m,g,y,w,i]);return b==null?null:x.createElement(Us.Provider,{value:f},x.createElement(lh.Provider,{children:n,value:b}))}function IS(e){let{children:t,location:n}=e;return jI(pp(t),n)}new Promise(()=>{});
379function pp(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,i)=>{if(!x.isValidElement(r))return;let o=[...t,i];if(r.type===x.Fragment){n.push.apply(n,pp(r.props.children,o));return}r.type!==Jn&&bt(!1),!r.props.index||!r.props.children||bt(!1);let l={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&&(l.children=pp(r.props.children,o)),n.push(l)}),n}/**
380 * React Router DOM v6.27.0
381 *
382 * Copyright (c) Remix Software Inc.
383 *
384 * This source code is licensed under the MIT license found in the
385 * LICENSE.md file in the root directory of this source tree.
386 *
387 * @license MIT
388 */function gp(){return gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gp.apply(this,arguments)}function MI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function DI(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function FI(e,t){return e.button===0&&(!t||t==="_self")&&!DI(e)}const BI=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],$I="6";try{window.__reactRouterVersion=$I}catch{}const qI="startTransition",Nb=Lw[qI];function UI(e){let{basename:t,children:n,future:r,window:i}=e,o=x.useRef();o.current==null&&(o.current=QR({window:i,v5Compat:!0}));let l=o.current,[u,d]=x.useState({action:l.action,location:l.location}),{v7_startTransition:f}=r||{},p=x.useCallback(m=>{f&&Nb?Nb(()=>d(m)):d(m)},[d,f]);return x.useLayoutEffect(()=>l.listen(p),[l,p]),x.createElement(zI,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:r})}const VI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",WI=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Af=x.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:l,state:u,target:d,to:f,preventScrollReset:p,viewTransition:m}=t,g=MI(t,BI),{basename:y}=x.useContext(Us),w,b=!1;if(typeof f=="string"&&WI.test(f)&&(w=f,VI))try{let N=new URL(window.location.href),A=f.startsWith("//")?new URL(N.protocol+f):new URL(f),k=iv(A.pathname,y);A.origin===N.origin&&k!=null?f=k+A.search+A.hash:b=!0}catch{}let C=_I(f,{relative:i}),j=HI(f,{replace:l,state:u,target:d,preventScrollReset:p,relative:i,viewTransition:m});function _(N){r&&r(N),N.defaultPrevented||j(N)}return x.createElement("a",gp({},g,{href:w||C,onClick:b||o?r:_,ref:n,target:d}))});var Cb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Cb||(Cb={}));var Eb;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Eb||(Eb={}));function HI(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:l,viewTransition:u}=t===void 0?{}:t,d=ov(),f=za(),p=AS(e,{relative:l});return x.useCallback(m=>{if(FI(m,n)){m.preventDefault();let g=r!==void 0?r:Nd(f)===Nd(p);d(e,{replace:g,state:i,preventScrollReset:o,relative:l,viewTransition:u})}},[f,d,p,r,i,n,e,o,l,u])}var br=function(){return br=Object.assign||function(t){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)&&(t[o]=n[o])}return t},br.apply(this,arguments)};function Ma(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function GI(e,t,n,r){function i(o){return o instanceof n?o:new n(function(l){l(o)})}
388return new(n||(n=Promise))(function(o,l){function u(p){try{f(r.next(p))}catch(m){l(m)}}function d(p){try{f(r.throw(p))}catch(m){l(m)}}function f(p){p.done?o(p.value):i(p.value).then(u,d)}f((r=r.apply(e,t||[])).next())})}function KI(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}const ZI=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class av extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class QI extends av{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Tb extends av{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class kb extends av{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var vp;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(vp||(vp={}));class YI{constructor(t,{headers:n={},customFetch:r,region:i=vp.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=ZI(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return GI(this,arguments,void 0,function*(n,r={}){var i;let o,l;try{const{headers:u,method:d,body:f,signal:p,timeout:m}=r;let g={},{region:y}=r;y||(y=this.region);const w=new URL(`${this.url}/${n}`);y&&y!=="any"&&(g["x-region"]=y,w.searchParams.set("forceFunctionRegion",y));let b;f&&(u&&!Object.prototype.hasOwnProperty.call(u,"Content-Type")||!u)?typeof Blob<"u"&&f instanceof Blob||f instanceof ArrayBuffer?(g["Content-Type"]="application/octet-stream",b=f):typeof f=="string"?(g["Content-Type"]="text/plain",b=f):typeof FormData<"u"&&f instanceof FormData?b=f:(g["Content-Type"]="application/json",b=JSON.stringify(f)):b=f;let C=p;m&&(l=new AbortController,o=setTimeout(()=>l.abort(),m),p?(C=l.signal,p.addEventListener("abort",()=>l.abort())):C=l.signal);const j=yield this.fetch(w.toString(),{method:d||"POST",headers:Object.assign(Object.assign(Object.assign({},g),this.headers),u),body:b,signal:C}).catch(k=>{throw new QI(k)}),_=j.headers.get("x-relay-error");if(_&&_==="true")throw new Tb(j);if(!j.ok)throw new kb(j);let N=((i=j.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),A;return N==="application/json"?A=yield j.json():N==="application/octet-stream"||N==="application/pdf"?A=yield j.blob():N==="text/event-stream"?A=j:N==="multipart/form-data"?A=yield j.formData():A=yield j.text(),{data:A,error:null,response:j}}catch(u){return{data:null,error:u,response:u instanceof kb||u instanceof Tb?u.context:void 0}}finally{o&&clearTimeout(o)}})}}var JI=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
388de=e.code}},XI=class{constructor(e){var t,n;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var 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 l=null,u=null,d=null,f=o.status,p=o.statusText;if(o.ok){var m,g;if(n.method!=="HEAD"){var y;const j=await o.text();j===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((y=n.headers.get("Accept"))===null||y===void 0)&&y.includes("application/vnd.pgrst.plan+text"))?u=j:u=JSON.parse(j))}const b=(m=n.headers.get("Prefer"))===null||m===void 0?void 0:m.match(/count=(exact|planned|estimated)/),C=(g=o.headers.get("content-range"))===null||g===void 0?void 0:g.split("/");b&&C&&C.length>1&&(d=parseInt(C[1])),n.isMaybeSingle&&n.method==="GET"&&Array.isArray(u)&&(u.length>1?(l={code:"PGRST116",details:`Results contain ${u.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},u=null,d=null,f=406,p="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{var w;const b=await o.text();try{l=JSON.parse(b),Array.isArray(l)&&o.status===404&&(u=[],l=null,f=200,p="OK")}catch{o.status===404&&b===""?(f=204,p="No Content"):l={message:b}}if(l&&n.isMaybeSingle&&(!(l==null||(w=l.details)===null||w===void 0)&&w.includes("0 rows"))&&(l=null,f=200,p="OK"),l&&n.shouldThrowOnError)throw new JI(l)}return{error:l,data:u,count:d,status:f,statusText:p}});return this.shouldThrowOnError||(i=i.catch(o=>{var l;let u="";const d=o==null?void 0:o.cause;if(d){var f,p,m,g;const w=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",b=(p=d==null?void 0:d.code)!==null&&p!==void 0?p:"";u=`${(m=o==null?void 0:o.name)!==null&&m!==void 0?m:"FetchError"}: ${o==null?void 0:o.message}`,u+=`
389
390Caused by: ${(g=d==null?void 0:d.name)!==null&&g!==void 0?g:"Error"}: ${w}`,b&&(u+=` (${b})`),d!=null&&d.stack&&(u+=`
391${d.stack}`)}else{var y;u=(y=o==null?void 0:o.stack)!==null&&y!==void 0?y:""}return{error:{message:`${(l=o==null?void 0:o.name)!==null&&l!==void 0?l:"FetchError"}: ${o==null?void 0:o.message}`,details:u,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),i.then(e,t)}returns(){return this}overrideTypes(){return this}},eL=class extends XI{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){const o=i?`${i}.order`:"order",l=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${l?`${l},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{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,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
391explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:o="text"}={}){var l;const u=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),d=(l=this.headers.get("Accept"))!==null&&l!==void 0?l:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${d}"; options=${u};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Pb=new RegExp("[,()]");var fo=class extends eL{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Pb.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Pb.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config: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(e,`${i}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},tL=class{constructor(e,{headers:t={},schema:n,fetch:r}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r}select(e,t){const{head:n=!1,count:r}=t??{},i=n?"HEAD":"GET";let o=!1;const l=(e??"*").split("").map(u=>/\s/.test(u)&&!o?"":(u==='"'&&(o=!o),u)).join("");return this.url.searchParams.set("select",l),r&&this.headers.append("Prefer",`count=${r}`),new fo({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const i="POST";if(t&&this.headers.append("Prefer",`count=${t}`),n||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const o=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(o.length>0){const l=[...new Set(o)].map(u=>`"${u}"`);this.url.searchParams.set("columns",l.join(","))}}return new fo({method:i,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){var o;const l="POST";if(this.headers.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&this.url.searchParams.set("on_conflict",t),r&&this.headers.append("Prefer",`count=${r}`),i||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,f)=>d.concat(Object.keys(f)),[]);if(u.length>0){const d=[...new Set(u)].map(f=>`"${f}"`);this.url.searchParams.set("columns",d.join(","))}}return new fo({method:l,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(e,{count:t}={}){var n;const r="PATCH";return t&&this.headers.append("Prefer",`count=${t}`),new fo({method:r,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}delete({count:e}={}){var t;const n="DELETE";return e&&this.headers.append("Prefer",`count=${e}`),new fo({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},nL=class LS{constructor(t,{headers:n={},schema:r,fetch:i}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.fetch=i}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new tL(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new LS(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:i=!1,count:o}={}){var l;let u;const d=new URL(`${this.url}/rpc/${t}`);let f;r||i?(u=r?"HEAD":"GET",Object.entries(n).filter(([m,g])=>g!==void 0).map(([m,g])=>[m,Array.isArray(g)?`{${g.join(",")}}`:`${g}
391`]).forEach(([m,g])=>{d.searchParams.append(m,g)})):(u="POST",f=n);const p=new Headers(this.headers);return o&&p.set("Prefer",`count=${o}`),new fo({method:u,url:d,headers:p,schema:this.schemaName,body:f,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch})}};class rL{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const n=process.versions;if(n&&n.node){const r=n.node,i=parseInt(r.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
392import ws from "ws"
393new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
394
395Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const iL="2.89.0",sL=`realtime-js/${iL}`,zS="1.0.0",oL="2.0.0",Ab=zS,yp=1e4,aL=1e3,lL=100;var fi;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(fi||(fi={}));var _t;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(_t||(_t={}));var Zn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Zn||(Zn={}));var xp;(function(e){e.websocket="websocket"})(xp||(xp={}));var cs;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(cs||(cs={}));class cL{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const i=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(t){var n,r;const i=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},l=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,l)}_encodeUserBroadcastPush(t,n,r){var i,o;const l=t.topic,u=(i=t.ref)!==null&&i!==void 0?i:"",d=(o=t.join_ref)!==null&&o!==void 0?o:"",f=t.payload.event,p=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},m=Object.keys(p).length===0?"":JSON.stringify(p);if(d.length>255)throw new Error(`joinRef length ${d.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`ref length ${u.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`topic length ${l.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`userEvent length ${f.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`metadata length ${m.length} exceeds maximum of 255`);const g=this.USER_BROADCAST_PUSH_META_LENGTH+d.length+u.length+l.length+f.length+m.length,y=new ArrayBuffer(this.HEADER_LENGTH+g);let w=new DataView(y),b=0;w.setUint8(b++,this.KINDS.userBroadcastPush),w.setUint8(b++,d.length),w.setUint8(b++,u.length),w.setUint8(b++,l.length),w.setUint8(b++,f.length),w.setUint8(b++,m.length),w.setUint8(b++,n),Array.from(d,j=>
395w.setUint8(b++,j.charCodeAt(0))),Array.from(u,j=>w.setUint8(b++,j.charCodeAt(0))),Array.from(l,j=>w.setUint8(b++,j.charCodeAt(0))),Array.from(f,j=>w.setUint8(b++,j.charCodeAt(0))),Array.from(m,j=>w.setUint8(b++,j.charCodeAt(0)));var C=new Uint8Array(y.byteLength+r.byteLength);return C.set(new Uint8Array(y),0),C.set(new Uint8Array(r),y.byteLength),C.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[i,o,l,u,d]=r;return n({join_ref:i,ref:o,topic:l,event:u,payload:d})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),i=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,i)}}_decodeUserBroadcast(t,n,r){const i=n.getUint8(1),o=n.getUint8(2),l=n.getUint8(3),u=n.getUint8(4);let d=this.HEADER_LENGTH+4;const f=r.decode(t.slice(d,d+i));d=d+i;const p=r.decode(t.slice(d,d+o));d=d+o;const m=r.decode(t.slice(d,d+l));d=d+l;const g=t.slice(d,t.byteLength),y=u===this.JSON_ENCODING?JSON.parse(r.decode(g)):g,w={type:this.BROADCAST_EVENT,event:p,payload:y};return l>0&&(w.meta=JSON.parse(m)),{join_ref:null,ref:null,topic:f,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}class MS{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,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 Qe;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Qe||(Qe={}));const Ob=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((o,l)=>(o[l]=uL(l,e,t,i),o),{}):{}},uL=(e,t,n,r)=>{const i=t.find(u=>u.name===e),o=i==null?void 0:i.type,l=n[e];return o&&!r.includes(o)?DS(o,l):bp(l)},DS=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return mL(t,n)}switch(e){case Qe.bool:return dL(t);case Qe.float4:case Qe.float8:case Qe.int2:case Qe.int4:case Qe.int8:case Qe.numeric:case Qe.oid:return hL(t);case Qe.json:case Qe.jsonb:return fL(t);case Qe.timestamp:return pL(t);case Qe.abstime:case Qe.date:case Qe.daterange:case Qe.int4range:case Qe.int8range:case Qe.money:case Qe.reltime:case Qe.text:case Qe.time:case Qe.timestamptz:case Qe.timetz:case Qe.tsrange:case Qe.tstzrange:return bp(t);default:return bp(t)}},bp=e=>e,dL=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},hL=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},fL=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},mL=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let o;const l=e.slice(1,n);try{o=JSON.parse("["+l+"]")}catch{o=l?l.split(","):[]}return o.map(u=>DS(t,u))}return e},pL=e=>typeof e=="string"?e.replace(" ","T"):e,FS=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class Of{constructor(t,n,r={},i=yp){this.channel=t,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(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,j
395oin_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,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:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Rb;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Rb||(Rb={}));class Al{constructor(t,n){this.channel=t,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:l,onSync:u}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Al.syncState(this.state,i,o,l),this.pendingDiffs.forEach(d=>{this.state=Al.syncDiff(this.state,d,o,l)}),this.pendingDiffs=[],u()}),this.channel._on(r.diff,{},i=>{const{onJoin:o,onLeave:l,onSync:u}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Al.syncDiff(this.state,i,o,l),u())}),this.onJoin((i,o,l)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:o,newPresences:l})}),this.onLeave((i,o,l)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:o,leftPresences:l})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,i){const o=this.cloneDeep(t),l=this.transformState(n),u={},d={};return this.map(o,(f,p)=>{l[f]||(d[f]=p)}),this.map(l,(f,p)=>{const m=o[f];if(m){const g=p.map(C=>C.presence_ref),y=m.map(C=>C.presence_ref),w=p.filter(C=>y.indexOf(C.presence_ref)<0),b=m.filter(C=>g.indexOf(C.presence_ref)<0);w.length>0&&(u[f]=w),b.length>0&&(d[f]=b)}else u[f]=p}),this.syncDiff(o,{joins:u,leaves:d},r,i)}static syncDiff(t,n,r,i){const{joins:o,leaves:l}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(o,(u,d)=>{var f;const p=(f=t[u])!==null&&f!==void 0?f:[];if(t[u]=this.cloneDeep(d),p.length>0){const m=t[u].map(y=>y.presence_ref),g=p.filter(y=>m.indexOf(y.presence_ref)<0);t[u].unshift(...g)}r(u,p,d)}),this.map(l,(u,d)=>{let f=t[u];if(!f)return;const p=d.map(m=>m.presence_ref);f=f.filter(m=>p.indexOf(m.presence_ref)<0),t[u]=f,i(u,f,d),f.length===0&&delete t[u]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[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(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Ib;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Ib||(Ib={}));var Ol;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Ol||(Ol={}));var zr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(zr||(zr={}));class To{constructor(t,n={config:{}},r){var i,o;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=_t.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Of(this,Zn.join,this.params,this.timeout),this.rejoinTimer=new MS(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=_t.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(l=>l.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=_t.closed,this.socket._remove(this)}),this._onError(l=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,l),this.state=_t.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=_t.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",l=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,l),this.state=_t.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Zn.reply,{},(l,u)=>{this._trigger(this._replyEventName(u),l)}),this.presence=new Al(this),this.broadcastEndpointURL=FS(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(t,n=this.timeout){var r,i,o;if(this.socket.isConnected()||this.socket.connect(),this.state==_t.closed){const{config:{broadcast:l,presence:u,private:d}}=this.params,f=(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(y=>y.filter))!==null&&i!==void 0?i:[],p=!!this.bindings[Ol.PRESENCE]&&this.bindings[Ol.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,m={},g={broadcast:l,presence:Object.assign(Object.assign({},u),{enabled:p}),postgres_changes:f,private:d};this.socket.accessTokenValue&&(m.access_token=this.socket.accessTokenValue),this._onError(y=>t==null?void 0:t(zr.CHANNEL_ERROR,y)),this._onClose(()=>t==null?void 0:t(zr.CLOSED)),this.updateJoinPayload(Object.assign({config:g},m)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:y})=>{var w;if(this.socket._isManualToken()||this.socket.setAuth(),y===void 0){t==null||t(zr.SUBSCRIBED);return}else{const b=this.bindings.postgres_changes,C=(w=b==null?void 0:b.length)!==null&&w!==void 0?w:0,j=[];for(let _=0;_<C;_++){const N=b[_],{filter:{event:A,schema:k,table:T,filter:R}}=N,P=y&&y[_];
395if(P&&P.event===A&&To.isFilterValueEqual(P.schema,k)&&To.isFilterValueEqual(P.table,T)&&To.isFilterValueEqual(P.filter,R))j.push(Object.assign(Object.assign({},N),{id:P.id}));else{this.unsubscribe(),this.state=_t.errored,t==null||t(zr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=j,t&&t(zr.SUBSCRIBED);return}}).receive("error",y=>{this.state=_t.errored,t==null||t(zr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(y).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(zr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===_t.joined&&t===Ol.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,n,r)}async httpSend(t,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 l={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(i=r.timeout)!==null&&i!==void 0?i:this.timeout);if(u.status===202)return{success:!0};let d=u.statusText;try{const f=await u.json();d=f.error||f.message||d}catch{}return Promise.reject(new Error(d))}async send(t,n={}){var r,i;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
395in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:l}=t,u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:l,private:this.private}]})};try{const f=await this._fetchWithTimeout(this.broadcastEndpointURL,d,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=f.body)===null||i===void 0?void 0:i.cancel()),f.ok?"ok":"error"}catch(f){return f.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var l,u,d;const f=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((d=(u=(l=this.params)===null||l===void 0?void 0:l.config)===null||u===void 0?void 0:u.broadcast)===null||d===void 0)&&d.ack)&&o("ok"),f.receive("ok",()=>o("ok")),f.receive("error",()=>o("error")),f.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=_t.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Zn.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(i=>{r=new Of(this,Zn.leave,{},t),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(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=_t.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const i=new AbortController,o=setTimeout(()=>i.abort(),r),l=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(o),l}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new Of(this,t,n,r);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>lL){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var i,o;const l=t.toLocaleLowerCase(),{close:u,error:d,leave:f,join:p}=Zn;if(r&&[u,d,f,p].indexOf(l)>=0&&r!==this._joinRef())return;let g=this._onMessage(l,n,r);if(n&&!g)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(l)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(y=>{var w,b,C;return((w=y.filter)===null||w===void 0?void 0:w.event)==="*"||((C=(b=y.filter)===null||b===void 0?void 0:b.event)===null||C===void 0?void 0:C.toLocaleLowerCase())===l}).map(y=>y.callback(g,r)):(o=this.bindings[l])===null||o===void 0||o.filter(y=>{var w,b,C,j,_,N;if(["broadcast","presence","postgres_changes"].includes(l))if("id"in y){const A=y.id,k=(w=y.filter)===null||w===void 0?void 0:w.event;return A&&((b=n.ids)===null||b===void 0?void 0:b.includes(A))&&(k==="*"||(k==null?void 0:k.toLocaleLowerCase())===((C=n.data)===null||C===void 0?void 0:C.type.toLocaleLowerCase()))}else{const A=(_=(j=y==null?void 0:y.filter)===null||j===void 0?void 0:j.event)===null||_===void 0?void 0:_.toLocaleLowerCase();return A==="*"||A===((N=n==null?void 0:n.event)===null||N===void 0?void 0:N.toLocaleLowerCase())}else return y.type.toLocaleLowerCase()===l}).map(y=>{if(typeof g=="object"&&"ids"in g){const w=g.data,{schema:b,table:C,commit_timestamp:j,type:_,errors:N}=w;g=Object.assign(Object.assign({},{schema:b,table:C,commit_timestamp:j,eventType:_,new:{},old:{},errors:N}),this._getPayloadRecords(w))}y.callback(g,r)})}_isClosed(){return this.state===_t.closed}_isJoined(){return this.state===_t.joined}_isJoining(){return this.state===_t.joining}_isLeaving(){return this.state===_t.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const i=t.toLocaleLowerCase(),o={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(o):this.bindings[i]=[o],this}_off(t,n){const r=t.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&&To.isEqual(i.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Zn.close,{},t)}_onError(t){this._on(Zn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=_t.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Ob(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Ob(t.columns,t.old_record)),n}}const Rf=()=>{},yu={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},gL=[1e3,2e3,5e3,1e4],vL=1e4,yL=`
396  addEventListener("message", (e) => {
397    if (e.data.event === "start") {
398      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
399    }
400  });`;class xL{constructor(t,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=yp,this.transport=null,this.heartbeatIntervalMs=yu.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Rf,this.ref=0,this.reconnectTimer=null,this.vsn=Ab,this.logger=Rf,this.conn=null,this.sendBuffer=[],this.serializer
400=new cL,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=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=`${t}/${xp.websocket}`,this.httpEndpoint=FS(t),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=rL.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n}
401
402To use Realtime in Node.js, you need to provide a WebSocket implementation:
403
404Option 1: Use Node.js 22+ which has native WebSocket support
405Option 2: Install and provide the "ws" package:
406
407  npm install ws
408
409  import ws from "ws"
410  const client = new RealtimeClient(url, {
411    ...options,
412    transport: ws
413  })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,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"&&(t?this.conn.close(t,n??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case fi.connecting:return cs.Connecting;case fi.open:return cs.Open;case fi.closing:return cs.Closing;default:return cs.Closed}}isConnected(){return this.connectionState()===cs.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,i=this.getChannels().find(o=>o.topic===r);if(i)return i;{const o=new To(`realtime:${t}`,n,this);return this.channels.push(o),o}}push(t){const{topic:n,event:r,payload:i,ref:o}=t,l=()=>{this.encode(t,u=>{var d;(d=this.conn)===null||d===void 0||d.send(u)})};this.log("push",`${n} ${r} (${o})`,i),this.isConnected()?l():this.sendBuffer.push(l)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=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,(t=this.conn)===null||t===void 0||t.close(aL,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},yu.HEARTBEAT_TIMEOUT_FALLBACK);return}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(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>
413{if(n.topic==="phoenix"&&n.event==="phx_reply")try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error")}catch(f){this.log("error","error in heartbeat callback",f)}n.ref&&n.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:r,event:i,payload:o,ref:l}=n,u=l?`(${l})`:"",d=o.status||"";this.log("receive",`${d} ${r} ${i} ${u}`.trim(),o),this.channels.filter(f=>f._isMember(r)).forEach(f=>f._trigger(i,o,l)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="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=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===fi.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===fi.open||this.conn.readyState===fi.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(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 t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),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(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(Zn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${t}${r}${i}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([yL],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n,r=!1;if(t)n=t,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.forEach(i=>{const o={access_token:n,version:sL};n&&i.updateJoinPayload(o),i.joinedOnce&&i._isJoined()&&i._push(Zn.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new MS(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},yu.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,i,o,l,u,d,f,p,m,g,y;switch(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.t
413imeout)!==null&&r!==void 0?r:yp,this.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:yu.HEARTBEAT_INTERVAL,this.worker=(o=t==null?void 0:t.worker)!==null&&o!==void 0?o:!1,this.accessToken=(l=t==null?void 0:t.accessToken)!==null&&l!==void 0?l:null,this.heartbeatCallback=(u=t==null?void 0:t.heartbeatCallback)!==null&&u!==void 0?u:Rf,this.vsn=(d=t==null?void 0:t.vsn)!==null&&d!==void 0?d:Ab,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(f=t==null?void 0:t.reconnectAfterMs)!==null&&f!==void 0?f:w=>gL[w-1]||vL,this.vsn){case zS:this.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:(w,b)=>b(JSON.stringify(w)),this.decode=(m=t==null?void 0:t.decode)!==null&&m!==void 0?m:(w,b)=>b(JSON.parse(w));break;case oL:this.encode=(g=t==null?void 0:t.encode)!==null&&g!==void 0?g:this.serializer.encode.bind(this.serializer),this.decode=(y=t==null?void 0:t.decode)!==null&&y!==void 0?y:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var nc=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function bL(e,t,n){const r=new URL(t,e);if(n)for(const[i,o]of Object.entries(n))o!==void 0&&r.searchParams.set(i,o);return r.toString()}async function wL(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function _L(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:o,headers:l}){const u=bL(e.baseUrl,r,i),d=await wL(e.auth),f=await t(u,{method:n,headers:{...o?{"Content-Type":"application/json"}:{},...d,...l},body:o?JSON.stringify(o):void 0}),p=await f.text(),m=(f.headers.get("content-type")||"").includes("application/json"),g=m&&p?JSON.parse(p):p;if(!f.ok){const y=m?g:void 0,w=y==null?void 0:y.error;throw new nc((w==null?void 0:w.message)??`Request failed with status ${f.status}`,{status:f.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:y})}return{status:f.status,headers:f.headers,data:g}}}}function xu(e){return e.join("�")}var SL=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:xu(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${xu(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${xu(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${xu(e.namespace)}`}),!0}catch(t){if(t instanceof nc&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof nc&&n.status===409)return;throw n}}};function ro(e){return e.join("�")}var jL=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ro(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ro(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ro(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ro(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ro(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ro(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof nc&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof nc&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},NL=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=_L({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new SL(this.client,t),this.tableOps=new jL(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
413async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},ch=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function st(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var CL=class extends ch{constructor(e,t,n){super(e),this.name="StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},wp=class extends ch{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const lv=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),EL=()=>Response,_p=e=>{if(Array.isArray(e))return e.map(n=>_p(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const i=n.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[i]=_p(r)}),t},TL=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},kL=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}function PL(e,t){if(rc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function AL(e){var t=PL(e,"string");return rc(t)=="symbol"?t:t+""}function OL(e,t,n){return(t=AL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lb(Object(n),!0).forEach(function(r){OL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const If=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},RL=async(e,t,n)=>{e instanceof await EL()&&!(n!=null&&n.noResolveJson)?e.json().then(r=>{const i=e.status||500,o=(r==null?void 0:r.statusCode)||i+"";t(new CL(If(r),i,o))}).catch(r=>{t(new wp(If(r),r))}):t(new wp(If(e),e))},IL=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!r?i:(TL(r)?(i.headers=we({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(r)):i.body=r,t!=null&&t.duplex&&(i.duplex=t.duplex),we(we({},i),n))};async function Nc(e,t,n,r,i,o){return new Promise((l,u)=>{e(n,IL(t,r,i,o)).then(d=>{if(!d.ok)throw d;return r!=null&&r.noResolveJson?d:d.json()}).then(d=>l(d)).catch(d=>RL(d,u,r))})}async function ic(e,t,n,r){return Nc(e,"GET",t,n,r)}async function Hn(e,t,n,r,i){return Nc(e,"POST",t,r,i,n)}async function Sp(e,t,n,r,i){return Nc(e,"PUT",t,r,i,n)}async function LL(e,t,n,r){return Nc(e,"HEAD",t,we(we({},n),{},{noResolveJson:!0}),r)}async function cv(e,t,n,r,i){return Nc(e,"DELETE",t,r,i,n)}var zL=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(st(t))return{data:null,error:t};throw t}}};let BS;BS=Symbol.toStringTag;var ML=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[BS]="BlobDownloadBuilder",this.promise=null}asStream(){return new zL(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(st(t))return{data:null,error:t};throw t}}};const DL={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},zb={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var FL=class{constructor(e,t={},n,r){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=n,this.fetch=lv(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,n,r){var i=this;try{let o;const l=we(we({},zb),r);let u=we(we({},i.headers),e==="POST"&&{"x-upsert":String(l.upsert)});const d=l.metadata;typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",l.cacheControl),d&&o.append("metadata",i.encodeMetadata(d)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.has("cacheControl")||o.append("cacheControl",l.cacheControl),d&&!o.has("metadata")&&o.append("metadata",i.encodeMetadata(d))):(o=n,u["cache-control"]=`max-age=${l.cacheControl}`,u["content-type"]=l.contentType,d&&(u["x-metadata"]=i.toBase64(i.encodeMetadata(d))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!l.duplex&&(l.duplex="half")),r!=null&&r.headers&&(u=we(we({},u),r.headers));const f=i._removeEmptyFolders(t),p=i._getFinalPath(f),m=await(e=="PUT"?Sp:Hn)(i.fetch,`${i.url}/object/${p}`,o,we({headers:u},l!=null&&l.duplex?{duplex:l.duplex}:{}));return{data:{path:f,id:m.Id,fullPath:m.Key},error:null}}catch(o){if(i.shouldThrowOnError)throw o;if(st(o))return{data:null,error:o};throw o}}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;const o=i._removeEmptyFolders(e),l=i._getFinalPath(o),u=new URL(i.url+`/object/upload/sign/${l}`);u.searchParams.set("token",t);try{let d;const f=we({upsert:zb.upsert},r),p=we(we({},i.headers),{"x-upsert":String(f.upsert)});return typeof Blob<"u"&&n instanceof Blob?(d=new FormData,d.append("cacheControl",f.cacheControl),d.append("",n)):typeof FormData<"u"&&n instanceof FormData?(d=n,d.append("cacheControl",f.cacheControl)):(d=n,p["cache-control"]=`max-age=${f.cac
413heControl}`,p["content-type"]=f.contentType),{data:{path:o,fullPath:(await Sp(i.fetch,u.toString(),d,{headers:p})).Key},error:null}}catch(d){if(i.shouldThrowOnError)throw d;if(st(d))return{data:null,error:d};throw d}}async createSignedUploadUrl(e,t){var n=this;try{let r=n._getFinalPath(e);const i=we({},n.headers);t!=null&&t.upsert&&(i["x-upsert"]="true");const o=await Hn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),l=new URL(n.url+o.url),u=l.searchParams.get("token");if(!u)throw new ch("No token returned by API");return{data:{signedUrl:l.toString(),path:e,token:u},error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;try{return{data:await Hn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}),error:null}}catch(i){if(r.shouldThrowOnError)throw i;if(st(i))return{data:null,error:i};throw i}}async copy(e,t,n){var r=this;try{return{data:{path:(await Hn(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
413stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key},error:null}}catch(i){if(r.shouldThrowOnError)throw i;if(st(i))return{data:null,error:i};throw i}}async createSignedUrl(e,t,n){var r=this;try{let i=r._getFinalPath(e),o=await Hn(r.fetch,`${r.url}/object/sign/${i}`,we({expiresIn:t},n!=null&&n.transform?{transform:n.transform}:{}),{headers:r.headers});const l=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return o={signedUrl:encodeURI(`${r.url}${o.signedURL}${l}`)},{data:o,error:null}}catch(i){if(r.shouldThrowOnError)throw i;if(st(i))return{data:null,error:i};throw i}}async createSignedUrls(e,t,n){var r=this;try{const i=await Hn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:i.map(l=>we(we({},l),{},{signedUrl:l.signedURL?encodeURI(`${r.url}${l.signedURL}${o}`):null})),error:null}}catch(i){if(r.shouldThrowOnError)throw i;if(st(i))return{data:null,error:i};throw i}}download(e,t){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",r=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=r?`?${r}`:"",o=this._getFinalPath(e),l=()=>ic(this.fetch,`${this.url}/${n}/${o}${i}`,{headers:this.headers,noResolveJson:!0});return new ML(l,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);try{return{data:_p(await ic(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await LL(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(st(r)&&r instanceof wp){const i=r.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:r}}throw r}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],i=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";i!==""&&r.push(i);const o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});l!==""&&r.push(l);let u=r.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${u}`)}}}async remove(e){var t=this;try{return{data:await cv(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}async list(e,t,n){var r=this;try{const i=we(we(we({},DL),t),{},{prefix:e||""});return{data:await Hn(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n),error:null}}catch(i){if(r.shouldThrowOnError)throw i;if(st(i))return{data:null,error:i};throw i}}async listV2(e,t){var n=this;try{const r=we({},e);return{data:await Hn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t),error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const $S="2.89.0",qS={"X-Client-Info":`storage-js/${$S}`};var BL=class{constructor(e,t={},n,r){this.shouldThrowOnError=!1;const i=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href.replace(/\/$/,""),this.headers=we(we({},qS),t),this.fetch=lv(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const n=t.listBucketOptionsToQueryString(e);return{data:await ic(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}async getBucket(e){var t=this;try{return{data:await ic(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}async createBucket(e,t={public:!1}){var n=this;try{return{data:await Hn(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}),error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}async updateBucket(e,t){var n=this;try{return{data:await Sp(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}),error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}async emptyBucket(e){var t=this;try{return{data:await Hn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}async deleteBucket(e){var t=this;try{return{data:await cv(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},$L=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=we(we({},qS),t),this.fetch=lv(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Hn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}async listBuckets(e){var t=this;try{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return{data:await ic(t.fetch,i,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}async deleteBucket(e){var t=this;try{return{data:await cv(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}from(e){var t=this;if(!kL(e))throw new ch("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 NL({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
413),r=this.shouldThrowOnError;return new Proxy(n,{get(i,o){const l=i[o];return typeof l!="function"?l:async(...u)=>{try{return{data:await l.apply(i,u),error:null}}catch(d){if(r)throw d;return{data:null,error:d}}}}})}};const uv={"X-Client-Info":`storage-js/${$S}`,"Content-Type":"application/json"};var US=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function pn(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var Lf=class extends US{constructor(e,t,n){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},qL=class extends US{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const dv=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),UL=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Mb=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),VL=async(e,t,n)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(n!=null&&n.noResolveJson)){const r=e.status||500,i=e;if(typeof i.json=="function")i.json().then(o=>{const l=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||r+"";t(new Lf(Mb(o),r,l))}).catch(()=>{const o=r+"";t(new Lf(i.statusText||`HTTP ${r} error`,r,o))});else{const o=r+"";t(new Lf(i.statusText||`HTTP ${r} error`,r,o))}}else t(new qL(Mb(e),e))},WL=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return r?(UL(r)?(i.headers=we({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(r)):i.body=r,we(we({},i),n)):i};async function HL(e,t,n,r,i,o){return new Promise((l,u)=>{e(n,WL(t,r,i,o)).then(d=>{if(!d.ok)throw d;if(r!=null&&r.noResolveJson)return d;const f=d.headers.get("content-type");return!f||!f.includes("application/json")?{}:d.json()}).then(d=>l(d)).catch(d=>VL(d,u,r))})}async function gn(e,t,n,r,i){return HL(e,"POST",t,r,i,n)}var GL=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=we(we({},uv),t),this.fetch=dv(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await gn(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}async getIndex(e,t){var n=this;try{return{data:await gn(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}),error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(pn(r))return{data:null,error:r};throw r}}async listIndexes(e){var t=this;try{return{data:await gn(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}async deleteIndex(e,t){var n=this;try{return{data:await gn(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{},error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(pn(r))return{data:null,error:r};throw r}}},KL=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=we(we({},uv),t),this.fetch=dv(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(e){var t=this;try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await gn(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}async getVectors(e){var t=this;try{return{data:await gn(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}async listVectors(e){var t=this;try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
413if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:await gn(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}async queryVectors(e){var t=this;try{return{data:await gn(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}async deleteVectors(e){var t=this;try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await gn(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}},ZL=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=we(we({},uv),t),this.fetch=dv(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await gn(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}async getBucket(e){var t=this;try{return{data:await gn(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}async listBuckets(e={}){var t=this;try{return{data:await gn(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}async deleteBucket(e){var t=this;try{return{data:await gn(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pn(n))return{data:null,error:n};throw n}}},QL=class extends ZL{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new YL(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},YL=class extends GL{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,we(we({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,we(we({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new JL(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},JL=class extends KL{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,we(we({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,we(we({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,we(we({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,we(we({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,we(we({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},XL=class extends BL{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new FL(this.url,this.headers,e,this.fetch)}get vectors(){return new QL(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new $L(this.url+"/iceberg",this.headers,this.fetch)}};const VS="2.89.0",mo=30*1e3,jp=3,zf=jp*mo,ez="http://localhost:9999",tz="supabase.auth.token",nz={"X-Client-Info":`gotrue-js/${VS}`},Np="X-Supabase-Api-Version",WS={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}}
413,rz=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,iz=10*60*1e3;class sc extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function fe(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class sz extends sc{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function oz(e){return fe(e)&&e.name==="AuthApiError"}class us extends sc{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Xr extends sc{constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class un extends Xr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function az(e){return fe(e)&&e.name==="AuthSessionMissingError"}class io extends Xr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class bu extends Xr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class wu extends Xr{constructor(t,n=null){super(t,"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 lz(e){return fe(e)&&e.name==="AuthImplicitGrantRedirectError"}class Db extends Xr{constructor(t,n=null){super(t,"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 cz extends Xr{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 Cp extends Xr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Mf(e){return fe(e)&&e.name==="AuthRetryableFetchError"}class Fb extends Xr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class Ep extends Xr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ed="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Bb=` 	
414\r=`.split(""),uz=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Bb.length;t+=1)e[Bb[t].charCodeAt(0)]=-2;for(let t=0;t<Ed.length;t+=1)e[Ed[t].charCodeAt(0)]=t;return e})();function $b(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Ed[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Ed[r]),t.queuedBits-=6}}function HS(e,t,n){const r=uz[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function qb(e){const t=[],n=l=>{t.push(String.fromCodePoint(l))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},o=l=>{fz(l,r,n)};for(let l=0;l<e.length;l+=1)HS(e.charCodeAt(l),i,o);return t.join("")}function dz(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function hz(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const i=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}dz(r,t)}}function fz(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Fo(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)HS(e.charCodeAt(i),n,r);return new Uint8Array(t)}function mz(e){const t=[];return hz(e,n=>t.push(n)),new Uint8Array(t)}function ms(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};return e.forEach(i=>
414$b(i,n,r)),$b(null,n,r),t.join("")}function pz(e){return Math.round(Date.now()/1e3)+e}function gz(){return Symbol("auth-callback")}const Rt=()=>typeof window<"u"&&typeof document<"u",is={tested:!1,writable:!1},GS=()=>{if(!Rt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(is.tested)return is.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),is.tested=!0,is.writable=!0}catch{is.tested=!0,is.writable=!1}return is.writable};function vz(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,o)=>{t[o]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const KS=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),yz=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",po=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},ss=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Ot=async(e,t)=>{await e.removeItem(t)};class uh{constructor(){this.promise=new uh.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}uh.promiseConstructor=Promise;function Df(e){const t=e.split(".");if(t.length!==3)throw new Ep("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!rz.test(t[r]))throw new Ep("JWT not in base64url format");return{header:JSON.parse(qb(t[0])),payload:JSON.parse(qb(t[1])),signature:Fo(t[2]),raw:{header:t[0],payload:t[1]}}}async function xz(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function bz(e,t){return new Promise((r,i)=>{(async()=>{for(let o=0;o<1/0;o++)try{const l=await e(o);if(!t(o,null,l)){r(l);return}}catch(l){if(!t(o,l)){i(l);return}}})()})}function wz(e){return("0"+e.toString(16)).substr(-2)}function _z(){const t=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(t),Array.from(t,wz).join("")}async function Sz(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(o=>String.fromCharCode(o)).join("")}async function jz(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await Sz(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function so(e,t,n=!1){const r=_z();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await po(e,`${t}-code-verifier`,i);const o=await jz(r);return[o,r===o?"plain":"s256"]}const Nz=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Cz(e){const t=e.headers.get(Np);if(!t||!t.match(Nz))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Ez(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function Tz(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const kz=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function oo(e){if(!kz.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Ff(){const e={};return new Proxy(e,{get:(t,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:(t,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:(t,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 Pz(e,t){return new Proxy(e,{get:(n,r,i)=>{if(r==="__isInsecureUserWarningProxy")return!0;
414if(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!t.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."),t.value=!0),Reflect.get(n,r,i)}})}function Ub(e){return JSON.parse(JSON.stringify(e))}const ls=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),Az=[502,503,504];async function Vb(e){var t;if(!yz(e))throw new Cp(ls(e),0);if(Az.includes(e.status))throw new Cp(ls(e),e.status);let n;try{n=await e.json()}catch(o){throw new us(ls(o),o)}let r;const i=Cz(e);if(i&&i.getTime()>=WS["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 Fb(ls(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new un}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((o,l)=>o&&typeof l=="string",!0))throw new Fb(ls(n),e.status,n.weak_password.reasons);throw new sz(ls(n),e.status||500,r)}const Oz=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function be(e,t,n,r){var i;const o=Object.assign({},r==null?void 0:r.headers);o[Np]||(o[Np]=WS["2024-01-01"].name),r!=null&&r.jwt&&(o.Authorization=`Bearer ${r.jwt}`);const l=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(l.redirect_to=r.redirectTo);const u=Object.keys(l).length?"?"+new URLSearchParams(l).toString():"",d=await Rz(e,t,n+u,{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(d):{data:Object.assign({},d),error:null}}async function Rz(e,t,n,r,i,o){const l=Oz(t,r,i,o);let u;try{u=await e(n,Object.assign({},l))}catch(d){throw console.error(d),new Cp(ls(d),0)}if(u.ok||await Vb(u),r!=null&&r.noResolveJson)return u;try{return await u.json()}catch(d){await Vb(d)}}function Un(e){var t;let n=null;zz(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=pz(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Wb(e){const t=Un(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function gi(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function Iz(e){return{data:e,error:null}}function Lz(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:o}=e,l=Ma(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),u={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:o},d=Object.assign({},l);return{data:{properties:u,user:d},error:null}}function Hb(e){return e}function zz(e){return e.access_token&&e.refresh_token&&e.expires_in}const Bf=["global","local","others"];class Mz{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=KS(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(t,n=Bf[0]){if(Bf.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Bf.join(", ")}`);try{return await be(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(fe(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await be(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:gi})}catch(r){if(fe(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Ma(t,["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 be(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:Lz,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(fe(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await be(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:gi})}catch(n){if(fe(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,i,o,l,u,d;try{const f={nextPage:null,lastPage:0,total:0},p=await be(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(o=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:""},xform:Hb});if(p.error)throw p.error;
414const m=await p.json(),g=(l=p.headers.get("x-total-count"))!==null&&l!==void 0?l:0,y=(d=(u=p.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&d!==void 0?d:[];return y.length>0&&(y.forEach(w=>{const b=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),C=JSON.parse(w.split(";")[1].split("=")[1]);f[`${C}Page`]=b}),f.total=parseInt(g)),{data:Object.assign(Object.assign({},m),f),error:null}}catch(f){if(fe(f))return{data:{users:[]},error:f};throw f}}async getUserById(t){oo(t);try{return await be(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:gi})}catch(n){if(fe(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){oo(t);try{return await be(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:gi})}catch(r){if(fe(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){oo(t);try{return await be(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:gi})}catch(r){if(fe(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){oo(t.userId);try{const{data:n,error:r}=await be(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(fe(n))return{data:null,error:n};throw n}}async _deleteFactor(t){oo(t.userId),oo(t.id);try{return{data:await be(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(fe(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,i,o,l,u,d;try{const f={nextPage:null,lastPage:0,total:0},p=await be(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(o=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:""},xform:Hb});if(p.error)throw p.error;const m=await p.json(),g=(l=p.headers.get("x-total-count"))!==null&&l!==void 0?l:0,y=(d=(u=p.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&d!==void 0?d:[];return y.length>0&&(y.forEach(w=>{const b=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),C=JSON.parse(w.split(";")[1].split("=")[1]);f[`${C}Page`]=b}),f.total=parseInt(g)),{data:Object.assign(Object.assign({},m),f),error:null}}catch(f){if(fe(f))return{data:{clients:[]},error:f};throw f}}async _createOAuthClient(t){try{return await be(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(fe(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await be(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(fe(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await be(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(fe(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await be(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(fe(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await be(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(fe(n))return{data:null,error:n};throw n}}}function Gb(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const ao={debug:!!(globalThis&&GS()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class ZS extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Dz extends ZS{}async function Fz(e,t,n){ao.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),ao.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>
414globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){ao.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{ao.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw ao.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Dz(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(ao.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()}}))}function Bz(){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 QS(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function $z(e){return parseInt(e,16)}function qz(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function Uz(e){var t;const{chainId:n,domain:r,expirationTime:i,issuedAt:o=new Date,nonce:l,notBefore:u,requestId:d,resources:f,scheme:p,uri:m,version:g}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(l&&l.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${l}`);if(!m)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(g!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${g}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
415`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const y=QS(e.address),w=p?`${p}://${r}`:r,b=e.statement?`${e.statement}
416`:"",C=`${w} wants you to sign in with your Ethereum account:
417${y}
418
419${b}`;let j=`URI: ${m}
420Version: ${g}
421Chain ID: ${n}${l?`
422Nonce: ${l}`:""}
423Issued At: ${o.toISOString()}`;if(i&&(j+=`
424Expiration Time: ${i.toISOString()}`),u&&(j+=`
425Not Before: ${u.toISOString()}`),d&&(j+=`
426Request ID: ${d}`),f){let _=`
427Resources:`;for(const N of f){if(!N||typeof N!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${N}`);_+=`
428- ${N}`}j+=_}return`${C}
429${j}`}class yt extends Error{constructor({message:t,code:n,cause:r,name:i}){var o;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(o=i??(r instanceof Error?r.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=n}}class Td extends yt{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function Vz({error:e,options:t}){var n,r,i;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new yt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=o.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new yt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=o.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new yt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=o.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new yt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new yt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new yt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(u=>u.type==="public-key").length===0?new yt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new yt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const l=window.location.hostname;if(YS(l)){if(o.rp.id!==l)return new yt({message:`The RP ID "${o.rp.id}
429" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new yt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new yt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new yt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new yt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function Wz({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new yt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new yt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(YS(r)){if(n.rpId!==r)return new yt({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new yt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new yt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new yt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class Hz{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Gz=new Hz;function Kz(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,i=Ma(e,["challenge","user","excludeCredentials"]),o=Fo(t).buffer,l=Object.assign(Object.assign({},n),{id:Fo(n.id).buffer}),u=Object.assign(Object.assign({},i),{challenge:o,user:l});if(r&&r.length>0){u.excludeCredentials=new Array(r.length);for(let d=0;d<r.length;d++){const f=r[d];u.excludeCredentials[d]=Object.assign(Object.assign({},f),{id:Fo(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return u}function Zz(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Ma(e,["challenge","allowCredentials"]),i=Fo(t).buffer,o=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){o.allowCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];o.allowCredentials[l]=Object.assign(Object.assign({},u),{id:Fo(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return o}function Qz(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:ms(new Uint8Array(e.response.attestationObject)),clientDataJSON:ms(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Yz(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:ms(new Uint8Array(i.authenticatorData)),clientDataJSON:ms(new Uint8Array(i.clientDataJSON)),signature:ms(new Uint8Array(i.signature)),userHandle:i.userHandle?ms(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function YS(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Kb(){var e,t;return!!(Rt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function Jz(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Td("Browser returned unexpected credential type",t)}:{data:null,error:new Td("Empty credential response",t)}}
429catch(t){return{data:null,error:Vz({error:t,options:e})}}}async function Xz(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Td("Browser returned unexpected credential type",t)}:{data:null,error:new Td("Empty credential response",t)}}catch(t){return{data:null,error:Wz({error:t,options:e})}}}const eM={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},tM={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function kd(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),n=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),r={};for(const i of e)if(i)for(const o in i){const l=i[o];if(l!==void 0)if(Array.isArray(l))r[o]=l;else if(n(l))r[o]=l;else if(t(l)){const u=r[o];t(u)?r[o]=kd(u,l):r[o]=kd(l)}else r[o]=l}return r}function nM(e,t){return kd(eM,e,t||{})}function rM(e,t){return kd(tM,e,t||{})}class iM{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:i},o){try{const{data:l,error:u}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!l)return{data:null,error:u};const d=i??Gz.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:f}=l.webauthn.credential_options.publicKey;f.name||(f.name=`${f.id}:${r}`),f.displayName||(f.displayName=f.name)}switch(l.webauthn.type){case"create":{const f=nM(l.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:p,error:m}=await Jz({publicKey:f,signal:d});return p?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:p}},error:null}:{data:null,error:m}}case"request":{const f=rM(l.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:p,error:m}=await Xz(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:f,signal:d}));return p?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:p}},error:null}:{data:null,error:m}}}}catch(l){return fe(l)?{data:null,error:l}:{data:null,error:new us("Unexpected error in challenge",l)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,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 sc("rpId is required for WebAuthn authentication")};try{if(!Kb())return{data:null,error:new us("Browser does not support WebAuthn",null)};const{data:l,error:u}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:i},{request:o});if(!l)return{data:null,error:u};const{webauthn:d}=l;return this._verify({factorId:t,challengeId:l.challengeId,webauthn:{type:d.type,rpId:n,rpOrigins:r,credential_response:d.credential_response}})}catch(l){return fe(l)?{data:null,error:l}:{data:null,error:new us("Unexpected error in authenticate",l)}}}async _register({friendlyName:t,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 sc("rpId is required for WebAuthn registration")};try{if(!Kb())return{data:null,error:new us("Browser does not support WebAuthn",null)};const{data:l,error:u}=await this._enroll({friendlyName:t});if(!l)return await this.client.mfa.listFactors().then(p=>{var m;return(m=p.data)===null||m===void 0?void 0:m.all.find(g=>g.factor_type==="webauthn"&&g.friendly_name===t&&g.status!=="unverified")}).then(p=>p?this.client.mfa.unenroll({factorId:p==null?void 0:p.id}):void 0),{data:null,error:u};const{data:d,error:f}=await this._challenge({factorId:l.id,friendlyName:l.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:i},{create:o});return d?this._verify({factorId:l.id,challengeId:d.challengeId,webauthn:{rpId:n,rpOrigins:r,type:d.webauthn.type,credential_response:d.webauthn.credential_response}}):{data:null,error:f}}catch(l){return fe(l)?{data:null,error:l}:{data:null,error:new us("Unexpected error in register",l)}}}}Bz();const sM={url:ez,storageKey:tz,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:nz,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function Zb(e,t,n){return await n()}const lo={};class oc{get jwks(){var t,n;return(n=(t=lo[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){lo[this.storageKey]=Object.assign(Object.assign({},lo[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=lo[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){lo[this.storageKey]=Object.assign(Object.assign({},lo[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=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({},sM),t);if(this.storageKey=o.storageKey,this.instanceID=(n=oc.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,oc.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&Rt()){const l=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(l),this.logDebugMessages&&console.trace(l)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new Mz({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=KS(o.fetch),this.lock=o.lock||Zb,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,o.lock?this.lock=o.lock:this.persistSession&&Rt()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=Fz:this.lock=Zb,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 iM(this)}
429,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:GS()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Gb(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=Gb(this.memoryStorage)),Rt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(l){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",l)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async l=>{this._debug("received broadcast notification from other tab or client",l),await this._notifyAllSubscribers(l.data.event,l.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${VS}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(Rt()&&(n=vz(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Rt()&&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),lz(o)){const d=(t=o.details)===null||t===void 0?void 0:t.code;if(d==="identity_already_exists"||d==="identity_not_found"||d==="single_identity_not_deletable")return{error:o}}return await this._removeSession(),{error:o}}const{session:l,redirectType:u}=i;return this._debug("#_initialize()","detected session in URL",l,"redirect type",u),await this._saveSession(l),setTimeout(async()=>{u==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",l):await this._notifyAllSubscribers("SIGNED_IN",l)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return fe(n)?this._returnResult({error:n}):this._returnResult({error:new us("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{const o=await be(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Un}),{data:l,error:u}=o;if(u||!l)return this._returnResult({data:{user:null,session:null},error:u});const d=l.session,f=l.user;return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",d)),this._returnResult({data:{user:f,session:d},error:null})}catch(o){if(fe(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var n,r,i;try{let o;if("email"in t){const{email:p,password:m,options:g}=t;let y=null,w=null;this.flowType==="pkce"&&([y,w]=await so(this.storage,this.storageKey)),o=await be(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:g==null?void 0:g.emailRedirectTo,body:{email:p,password:m,data:(n=g==null?void 0:g.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken},code_challenge:y,code_challenge_method:w},xform:Un})}else if("phone"in t){const{phone:p,password:m,options:g}=t;o=await be(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:p,password:m,data:(r=g==null?void 0:g.data)!==null&&r!==void 0?r:{},channel:(i=g==null?void 0:g.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken}},xform:Un})}else throw new bu("You must provide either an email or phone number and a password");const{data:l,error:u}=o;if(u||!l)return await Ot(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:u});const d=l.session,f=l.user;return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",d)),this._returnResult({data:{user:f,session:d},error:null})}catch(o){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),fe(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let n;if("email"in t){const{email:o,password:l,options:u}=t;n=await be(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:l,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},xform:Wb})}else if("phone"in t){const{phone:o,password:l,options:u}=t;n=await be(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:l,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},xform:Wb})}else throw new bu("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 io;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(fe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,i,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(o=t.o
429ptions)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,i,o,l,u,d,f,p,m,g;let y,w;if("message"in t)y=t.message,w=t.signature;else{const{chain:b,wallet:C,statement:j,options:_}=t;let N;if(Rt())if(typeof C=="object")N=C;else{const I=window;if("ethereum"in I&&typeof I.ethereum=="object"&&"request"in I.ethereum&&typeof I.ethereum.request=="function")N=I.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 C!="object"||!(_!=null&&_.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");N=C}const A=new URL((n=_==null?void 0:_.url)!==null&&n!==void 0?n:window.location.href),k=await N.request({method:"eth_requestAccounts"}).then(I=>I).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const T=QS(k[0]);let R=(r=_==null?void 0:_.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!R){const I=await N.request({method:"eth_chainId"});R=$z(I)}const P={domain:A.host,address:T,statement:j,uri:A.href,version:"1",chainId:R,nonce:(i=_==null?void 0:_.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(l=(o=_==null?void 0:_.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&l!==void 0?l:new Date,expirationTime:(u=_==null?void 0:_.signInWithEthereum)===null||u===void 0?void 0:u.expirationTime,notBefore:(d=_==null?void 0:_.signInWithEthereum)===null||d===void 0?void 0:d.notBefore,requestId:(f=_==null?void 0:_.signInWithEthereum)===null||f===void 0?void 0:f.requestId,resources:(p=_==null?void 0:_.signInWithEthereum)===null||p===void 0?void 0:p.resources};y=Uz(P),w=await N.request({method:"personal_sign",params:[qz(y),T]})}try{const{data:b,error:C}=await be(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:y,signature:w},!((m=t.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(g=t.options)===null||g===void 0?void 0:g.captchaToken}}:null),xform:Un});if(C)throw C;if(!b||!b.session||!b.user){const j=new io;return this._returnResult({data:{user:null,session:null},error:j})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:C})}catch(b){if(fe(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async signInWithSolana(t){var n,r,i,o,l,u,d,f,p,m,g,y;let w,b;if("message"in t)w=t.message,b=t.signature;else{const{chain:C,wallet:j,statement:_,options:N}=t;let A;if(Rt())if(typeof j=="object")A=j;else{const T=window;if("solana"in T&&typeof T.solana=="object"&&("signIn"in T.solana&&typeof T.solana.signIn=="function"||"signMessage"in T.solana&&typeof T.solana.signMessage=="function"))A=T.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 j!="object"||!(N!=null&&N.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");A=j}const k=new URL((n=N==null?void 0:N.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in A&&A.signIn){const T=await A.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},N==null?void 0:N.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),_?{statement:_}:null));let R;if(Array.isArray(T)&&T[0]&&typeof T[0]=="object")R=T[0];else if(T&&typeof T=="object"&&"signedMessage"in T&&"signature"in T)R=T;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in R&&"signature"in R&&(typeof R.signedMessage=="string"||R.signedMessage instanceof Uint8Array)&&R.signature instanceof Uint8Array)w=typeof R.signedMessage=="string"?R.signedMessage:new TextDecoder().decode(R.signedMessage),b=R.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in A)||typeof A.signMessage!="function"||!("publicKey"in A)||typeof A!="object"||!A.publicKey||!("toBase58"in A.publicKey)||typeof A.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${k.host} wants you to sign in with your Solana account:`,A.publicKey.toBase58(),..._?["",_,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(i=(r=N==null?void 0:N.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((o=N==null?void 0:N.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${N.signInWithSolana.notBefore}`]:[],...!((l=N==null?void 0:N.signInWithSolana)===null||l===void 0)&&l.expirationTime?[`Expiration Time: ${N.signInWithSolana.expirationTime}`]:[],...!((u=N==null?void 0:N.signInWithSolana)===null||u===void 0)&&u.chainId?[`Chain ID: ${N.signInWithSolana.chainId}`]:[],...!((d=N==null?void 0:N.signInWithSolana)===null||d===void 0)&&d.nonce?[`Nonce: ${N.signInWithSolana.nonce}`]:[],...!((f=N==null?void 0:N.signInWithSolana)===null||f===void 0)&&f.requestId?[`Request ID: ${N.signInWithSolana.requestId}`]:[],...!((m=(p=N==null?void 0:N.signInWithSolana)===null||p===void 0?void 0:p.resources)===null||m===void 0)&&m.length?["Resources",...N.signInWithSolana.resources.map(R=>`- ${R}`)]:[]].join(`
430`);const T=await A.signMessage(new TextEncoder().encode(w),"utf8");if(!T||!(T instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");b=T}}try{const{data:C,error:j}=await be(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:ms(b)},!((g=t.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(y=t.options)===null||y===void 0?void 0:y.captchaToken}}:null),xform:Un});if(j)throw j;if(!C||!C.session||!C.user){const _=new io;return this._returnResult({data:{user:null,session:null},error:_})}return C.session&&(await this._saveSession(C.session),await this._notifyAllSubscribers("SIGNED_IN",C.session)),this._returnResult({data:Object.assign({},C),error:j})}catch(C){if(fe(C))return this._returnResult({data:{user:null,session:null},error:C});throw C}}async _exchangeCodeForSession(t){const n=await ss(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new cz;const{data:o,error:l}=await be(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Un});if(await Ot(this.storage,`${this.storageKey}-code-verifier`),l)throw l;if(!o||!o.session||!o.user){const u=new io;return this._returnResult({data:{user:null,session:null,redirectType:null},error:u})}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:l})}catch(o){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),fe(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:n,provider:r,token:i,access_token:o,nonce:l}=t,u=await be(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:o,nonce:l,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Un}),{data:d,error:f}=u;if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!d||!d.session||!d.user){const p=new io;return this._returnResult({data:{user:null,session:null},error:p})}return d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("SIGNED_IN",d.session)),this._returnResult({data:d,error:f})}catch(n){if(fe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,i,o,l;try{if("email"in t){const{email:u,options:d}=t;let f=null,p=null;this.flowType==="pkce"&&([f,p]=await so(this.storage,this.storageKey));const{error:m}=await be(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:u,data:(n=d==null?void 0:d.data)!==null&&n!==void 0?n:{},create_user:(r=d==null?void 0:d.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:f,code_challenge_method:p},redirectTo:d==null?void 0:d.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:m})}if("phone"in t){const{phone:u,options:d}=t,{data:f,error:p}=await be(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:u,data:(i=d==null?void 0:d.data)!==null&&i!==void 0?i:{},create_user:(o=d==null?void 0:d.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},channel:(l=d==null?void 0:d.channel)!==null&&l!==void 0?l:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:f==null?void 0:f.message_id},error:p})}throw new bu("You must provide either an email or phone number.")}catch(u){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),fe(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async verifyOtp(t){var n,r;try{let i,o;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,o=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:l,error:u}=await be(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:i,xform:Un});if(u)throw u;if(!l)throw new Error("An error occurred on token verification.");const d=l.session,f=l.user;return d!=null&&d.access_token&&(await this._saveSession(d),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",d)),this._returnResult({data:{user:f,session:d},error:null})}catch(i){if(fe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(t){var n,r,i,o,l;try{let u=null,d=null;this.flowType==="pkce"&&([u,d]=await so(this.storage,this.storageKey));const f=await be(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:u,code_challenge_method:d}),headers:this.headers,xform:Iz});return!((o=f.data)===null||o===void 0)&&o.url&&Rt()&&!(!((l=t.options)===null||l===void 0)&&l.skipBrowserRedirect)&&window.location.assign(f.data.url),this._returnResult(f)}catch(u){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),fe(u))return this._returnResult({data:null,error:u});throw u}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new un;const{error:i}=await be(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(t){if(fe(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:o}=t,{error:l}=await be(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:l})}else if("phone"in t){const{phone:r,type:i,options:o}=t,{data:l,error:u}=await be(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:l==null?void 0:l.message_id},error:u})}throw new bu("You must provide either an email or phone number and a type")}catch(n){if(fe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);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}`,t,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(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(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 t=null;const n=await ss(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
430id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<zf:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const l=await ss(this.userStorage,this.storageKey+"-user");l!=null&&l.user?t.user=l.user:t.user=Ff()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const l={value:this.suppressGetSessionWarning};t.user=Pz(t.user,l),l.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:o}=await this._callRefreshToken(t.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(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(-1,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await be(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:gi}):await this._useSession(async n=>{var r,i,o;const{data:l,error:u}=n;if(u)throw u;return!(!((r=l.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new un}:await be(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(i=l.session)===null||i===void 0?void 0:i.access_token)!==null&&o!==void 0?o:void 0,xform:gi})})}catch(n){if(fe(n))return az(n)&&(await this._removeSession(),await Ot(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:i,error:o}=r;if(o)throw o;if(!i.session)throw new un;const l=i.session;let u=null,d=null;this.flowType==="pkce"&&t.email!=null&&([u,d]=await so(this.storage,this.storageKey));const{data:f,error:p}=await be(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:u,code_challenge_method:d}),jwt:l.access_token,xform:gi});if(p)throw p;return l.user=f.user,await this._saveSession(l),await this._notifyAllSubscribers("USER_UPDATED",l),this._returnResult({data:{user:l.user},error:null})})}catch(r){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),fe(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new un;const n=Date.now()/1e3;let r=n,i=!0,o=null;const{payload:l}=Df(t.access_token);if(l.exp&&(r=l.exp,i=r<=n),i){const{data:u,error:d}=await this._callRefreshToken(t.refresh_token);if(d)return this._returnResult({data:{user:null,session:null},error:d});if(!u)return{data:{user:null,session:null},error:null};o=u}else{const{data:u,error:d}=await this._getUser(t.access_token);if(d)throw d;o={access_token:t.access_token,refresh_token:t.refresh_token,user:u.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(fe(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:l,error:u}=n;if(u)throw u;t=(r=l.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new un;const{data:i,error:o}=await this._callRefreshToken(t.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(fe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}
430async _getSessionFromURL(t,n){try{if(!Rt())throw new wu("No browser detected.");if(t.error||t.error_description||t.error_code)throw new wu(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Db("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new wu("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Db("No code detected.");const{data:_,error:N}=await this._exchangeCodeForSession(t.code);if(N)throw N;const A=new URL(window.location.href);return A.searchParams.delete("code"),window.history.replaceState(window.history.state,"",A.toString()),{data:{session:_.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:i,access_token:o,refresh_token:l,expires_in:u,expires_at:d,token_type:f}=t;if(!o||!u||!l||!f)throw new wu("No session defined in URL");const p=Math.round(Date.now()/1e3),m=parseInt(u);let g=p+m;d&&(g=parseInt(d));const y=g-p;y*1e3<=mo&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${m}s`);const w=g-m;p-w>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",w,g,p):p-w<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",w,g,p);const{data:b,error:C}=await this._getUser(o);if(C)throw C;const j={provider_token:r,provider_refresh_token:i,access_token:o,expires_in:m,expires_at:g,refresh_token:l,token_type:f,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:j,redirectType:t.type},error:null})}catch(r){if(fe(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await ss(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:i,error:o}=n;if(o)return this._returnResult({error:o});const l=(r=i.session)===null||r===void 0?void 0:r.access_token;if(l){const{error:u}=await this.admin.signOut(l,t);if(u&&!(oz(u)&&(u.status===404||u.status===401||u.status===403)))return this._returnResult({error:u})}return t!=="others"&&(await this._removeSession(),await Ot(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=gz(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:o},error:l}=n;if(l)throw l;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await so(this.storage,this.storageKey,!0));try{return await be(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),fe(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(fe(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:i}=await this._useSession(async o=>{var l,u,d,f,p;const{data:m,error:g}=o;if(g)throw g;const y=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(l=t.options)===null||l===void 0?void 0:l.redirectTo,scopes:(u=t.options)===null||u===void 0?void 0:u.scopes,queryParams:(d=t.options)===null||d===void 0?void 0:d.queryParams,skipBrowserRedirect:!0});return await be(this.fetch,"GET",y,{headers:this.headers,jwt:(p=(f=m.session)===null||f===void 0?void 0:f.access_token)!==null&&p!==void 0?p:void 0})});if(i)throw i;return Rt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(fe(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:i,data:{session:o}}=n;if(i)throw i;const{options:l,provider:u,token:d,access_token:f,nonce:p}=t,m=await be(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:u,id_token:d,access_token:f,nonce:p,link_identity:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Un}),{data:g,error:y}=m;return y?this._returnResult({data:{user:null,session:null},error:y}):!g||!g.session||!g.user?this._returnResult({data:{user:null,session:null},error:new io}):(g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("USER_UPDATED",g.session)),this._returnResult({data:g,error:y}))}catch(i){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),fe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:o,error:l}=n;if(l)throw l;
430return await be(this.fetch,"DELETE",`${this.url}/user/identities/${t.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(fe(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await bz(async i=>(i>0&&await xz(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await be(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Un})),(i,o)=>{const l=200*Math.pow(2,i);return o&&Mf(o)&&Date.now()+l-r<mo})}catch(r){if(this._debug(n,"error",r),fe(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Rt()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const i=await ss(this.storage,this.storageKey);if(i&&this.userStorage){let l=await ss(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!l&&(l={user:i.user},await po(this.userStorage,this.storageKey+"-user",l)),i.user=(t=l==null?void 0:l.user)!==null&&t!==void 0?t:Ff()}else if(i&&!i.user&&!i.user){const l=await ss(this.storage,this.storageKey+"-user");l&&(l!=null&&l.user)?(i.user=l.user,await Ot(this.storage,this.storageKey+"-user"),await po(this.storage,this.storageKey,i)):i.user=Ff()}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()<zf;if(this._debug(r,`session has${o?"":" not"} expired with margin of ${zf}s`),o){if(this.autoRefreshToken&&i.refresh_token){const{error:l}=await this._callRefreshToken(i.refresh_token);l&&(console.error(l),Mf(l)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",l),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:l,error:u}=await this._getUser(i.access_token);!u&&(l!=null&&l.user)?(i.user=l.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(l){console.error("Error getting user data:",l),this._debug(r,"error getting user data, skipping SIGNED_IN notification",l)}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(t){var n,r;if(!t)throw new un;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new uh;const{data:o,error:l}=await this._refreshAccessToken(t);if(l)throw l;if(!o.session)throw new un;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const u={data:o.session,error:null};return this.refreshingDeferred.resolve(u),u}catch(o){if(this._debug(i,"error",o),fe(o)){const l={data:null,error:o};return Mf(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(l),l}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(o),o}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,n,r=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const o=[],l=Array.from(this.stateChangeEmitters.values()).map(async u=>{try{await u.callback(t,n)}catch(d){o.push(d)}});if(await Promise.all(l),o.length>0){for(let u=0;u<o.length;u+=1)console.error(o[u]);throw o[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Ot(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await po(this.userStorage,this.storageKey+"-user",{user:n.user});const i=Object.assign({},n);delete i.user;const o=Ub(i);await po(this.storage,this.storageKey,o)}else{const i=Ub(n);await po(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ot(this.storage,this.storageKey),await Ot(this.storage,this.storageKey+"-code-verifier"),await Ot(this.storage,this.storageKey+"-user"),this.userStorage&&await Ot(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Rt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
430catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),mo);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async 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-t)/mo);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${mo}ms, refresh threshold is ${jp} ticks`),i<=jp&&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(t){if(t.isAcquireTimeout||t instanceof ZS)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Rt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,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,l]=await so(this.storage,this.storageKey),u=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(l)}`});i.push(u.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}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:o}=n;return o?this._returnResult({data:null,error:o}):await be(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(fe(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:o,error:l}=n;if(l)return this._returnResult({data:null,error:l});const u=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:d,error:f}=await be(this.fetch,"POST",`${this.url}/factors`,{body:u,headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return f?this._returnResult({data:null,error:f}):(t.factorType==="totp"&&d.type==="totp"&&(!((i=d==null?void 0:d.totp)===null||i===void 0)&&i.qr_code)&&(d.totp.qr_code=`data:image/svg+xml;utf-8,${d.totp.qr_code}`),this._returnResult({data:d,error:null}))})}catch(n){if(fe(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:o}=n;
430if(o)return this._returnResult({data:null,error:o});const l=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Qz(t.webauthn.credential_response):Yz(t.webauthn.credential_response)})}:{code:t.code}),{data:u,error:d}=await be(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:l,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return d?this._returnResult({data:null,error:d}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+u.expires_in},u)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",u),this._returnResult({data:u,error:d}))})}catch(n){if(fe(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(-1,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 l=await be(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});if(l.error)return l;const{data:u}=l;if(u.type!=="webauthn")return{data:u,error:null};switch(u.webauthn.type){case"create":return{data:Object.assign(Object.assign({},u),{webauthn:Object.assign(Object.assign({},u.webauthn),{credential_options:Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:Kz(u.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},u),{webauthn:Object.assign(Object.assign({},u.webauthn),{credential_options:Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:Zz(u.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(fe(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;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(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])i.all.push(o),o.status==="verified"&&i[o.factor_type].push(o);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(){var t,n;const{data:{session:r},error:i}
430=await this.getSession();if(i)return this._returnResult({data:null,error:i});if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=Df(r.access_token);let l=null;o.aal&&(l=o.aal);let u=l;((n=(t=r.user.factors)===null||t===void 0?void 0:t.filter(p=>p.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(u="aal2");const f=o.amr||[];return{data:{currentLevel:l,nextLevel:u,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?await be(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new un})})}catch(n){if(fe(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,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 un});const l=await be(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:u=>({data:u,error:null})});return l.data&&l.data.redirect_url&&Rt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(l.data.redirect_url),l})}catch(r){if(fe(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,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 un});const l=await be(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:u=>({data:u,error:null})});return l.data&&l.data.redirect_url&&Rt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(l.data.redirect_url),l})}catch(r){if(fe(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await be(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 un})})}catch(t){if(fe(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?(await be(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new un})})}catch(n){if(fe(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(u=>u.kid===t);if(r)return r;const i=Date.now();if(r=this.jwks.keys.find(u=>u.kid===t),r&&this.jwks_cached_at+iz>i)return r;const{data:o,error:l}=await be(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(l)throw l;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=i,r=o.keys.find(u=>u.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:y,error:w}
430=await this.getSession();if(w||!y.session)return this._returnResult({data:null,error:w});r=y.session.access_token}const{header:i,payload:o,signature:l,raw:{header:u,payload:d}}=Df(r);n!=null&&n.allowExpired||Ez(o.exp);const f=!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(!f){const{error:y}=await this.getUser(r);if(y)throw y;return{data:{claims:o,header:i,signature:l},error:null}}const p=Tz(i.alg),m=await crypto.subtle.importKey("jwk",f,p,!0,["verify"]);if(!await crypto.subtle.verify(p,m,l,mz(`${u}.${d}`)))throw new Ep("Invalid JWT signature");return{data:{claims:o,header:i,signature:l},error:null}}catch(r){if(fe(r))return this._returnResult({data:null,error:r});throw r}}}oc.nextInstanceID={};const oM=oc,aM="2.89.0";let vl="";typeof Deno<"u"?vl="deno":typeof document<"u"?vl="web":typeof navigator<"u"&&navigator.product==="ReactNative"?vl="react-native":vl="node";const lM={"X-Client-Info":`supabase-js-${vl}/${aM}`},cM={headers:lM},uM={schema:"public"},dM={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},hM={};function ac(e){"@babel/helpers - typeof";return ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(e)}function fM(e,t){if(ac(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ac(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mM(e){var t=fM(e,"string");return ac(t)=="symbol"?t:t+""}function pM(e,t,n){return(t=mM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ut(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qb(Object(n),!0).forEach(function(r){pM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const gM=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),vM=()=>Headers,yM=(e,t,n)=>{const r=gM(n),i=vM();return async(o,l)=>{var u;const d=(u=await t())!==null&&u!==void 0?u:e;let f=new i(l==null?void 0:l.headers);return f.has("apikey")||f.set("apikey",e),f.has("Authorization")||f.set("Authorization",`Bearer ${d}`),r(o,ut(ut({},l),{},{headers:f}))}};function xM(e){return e.endsWith("/")?e:e+"/"}function bM(e,t){var n,r;const{db:i,auth:o,realtime:l,global:u}=e,{db:d,auth:f,realtime:p,global:m}
430=t,g={db:ut(ut({},d),i),auth:ut(ut({},f),o),realtime:ut(ut({},p),l),storage:{},global:ut(ut(ut({},m),u),{},{headers:ut(ut({},(n=m==null?void 0:m.headers)!==null&&n!==void 0?n:{}),(r=u==null?void 0:u.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?g.accessToken=e.accessToken:delete g.accessToken,g}function wM(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(xM(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var _M=class extends oM{constructor(e){super(e)}},SM=class{constructor(e,t,n){var r,i;this.supabaseUrl=e,this.supabaseKey=t;const o=wM(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const l=`sb-${o.hostname.split(".")[0]}-auth-token`,u={db:uM,realtime:hM,auth:ut(ut({},dM),{},{storageKey:l}),global:cM},d=bM(n??{},u);if(this.storageKey=(r=d.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(i=d.global.headers)!==null&&i!==void 0?i:{},d.accessToken)this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(p,m)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(m)} is not possible`)}});else{var f;this.auth=this._initSupabaseAuthClient((f=d.auth)!==null&&f!==void 0?f:{},this.headers,d.global.fetch)}this.fetch=yM(t,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(ut({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.accessToken&&this.accessToken().then(p=>this.realtime.setAuth(p)).catch(p=>console.warn("Failed to set initial Realtime auth token:",p)),this.rest=new nL(new URL("rest/v1",o).href,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),this.storage=new XL(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),d.accessToken||this._listenForAuthEvents()}get functions(){return new YI(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:o,flowType:l,lock:u,debug:d,throwOnError:f},p,m){const g={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new _M({url:this.authUrl.href,headers:ut(ut({},g),p),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:l,lock:u,debug:d,throwOnError:f,fetch:m,hasCustomAuthorizationHeader:Object.keys(this.headers).some(y=>y.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new xL(this.realtimeUrl.href,ut(ut({},e),{},{params:ut(ut({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const jM=(e,t,n)=>new SM(e,t,n);function NM(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}NM()&&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 N
430ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const CM="https://rqstnjqjueazgsuqqyqr.supabase.co",EM="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJxc3RuanFqdWVhemdzdXFxeXFyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjY0MzE0OTksImV4cCI6MjA4MjAwNzQ5OX0.oaW_DMkOhRoOUe65OIJKb3mCpiskC5X-j1a06YKwGHM",me=jM(CM,EM,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),JS=x.createContext(void 0),TM=({children:e})=>{const[t,n]=x.useState(null),[r,i]=x.useState(null),[o,l]=x.useState(!0),[u,d]=x.useState(!1),[f,p]=x.useState(!1);x.useEffect(()=>{const{data:{subscription:b}}=me.auth.onAuthStateChange((C,j)=>{i(j),n((j==null?void 0:j.user)??null),j!=null&&j.user?(p(!0),setTimeout(()=>{m(j.user.id)},0)):d(!1)});return me.auth.getSession().then(({data:{session:C}})=>{i(C),n((C==null?void 0:C.user)??null),C!=null&&C.user&&(p(!0),m(C.user.id)),l(!1)}),()=>b.unsubscribe()},[]);const m=async b=>{p(!0);try{const{data:C,error:j}=await me.rpc("has_role",{_user_id:b,_role:"admin"});j?(console.error("Error checking admin role:",j),d(!1)):d(C===!0)}catch(C){console.error("Error in checkAdminRole:",C),d(!1)}finally{p(!1)}},g=async(b,C)=>{const{error:j}=await me.auth.signInWithPassword({email:b,password:C});return{error:j}},y=async(b,C)=>{const j=`${window.location.origin}/`,{error:_}=await me.auth.signUp({email:b,password:C,options:{emailRedirectTo:j}});return{error:_}},w=async()=>{await me.auth.signOut(),d(!1)};return a.jsx(JS.Provider,{value:{user:t,session:r,loading:o,isAdmin:u,adminCheckLoading:f,signIn:g,signUp:y,signOut:w},children:e})},XS=()=>{const e=x.useContext(JS);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e},$f=[{code:"it",name:"Italiano",flag:"🇮🇹"},{code:"en",name:"English",flag:"🇬🇧"},{code:"es",name:"Español",flag:"🇪🇸"},{code:"pt",name:"Português",flag:"🇧🇷"}],kM="it",PM={it:{nav:{home:"Home",about:"Chi Siamo",projects:"Progetti",stories:"Storie",news:"News",transparency:"Trasparenza",gallery:"Galleria",media:"Media",contact:"Contatti",supportNow:"Sostieni Ora"},hero:{slides:[{title:"salvami la vita, mandami a scuola",subtitle:"Aiutiamo i bambini a diventare adulti attraverso l'istruzione",cta:"Sostieni un bambino"},{title:"Abbà è il Padre che si prende cura",subtitle:"della formazione umana e culturale di bambini in situazioni di disagio",cta:"Scopri i nostri progetti"},{title:"la cultura come strumento",subtitle:"per l'elevazione spirituale e umana dei bambini nel mondo",cta:"Leggi le nostre storie"}],supportChild:"Sostieni un bambino",discoverWhatWeDo:"Scopri cosa facciamo",stats:{childrenSupported:"Bambini sostenuti",diplomasAchieved:"Diplomi conseguiti",countriesOfIntervention:"Paesi di intervento"}},about:{helpChildren:"Aiutiamo i bambini a diventare adulti",subtitle:"Abbà si occupa della formazione dei bambini in condizioni disagiate",ourHistory:"La nostra storia",historyText1:"L'associazione Abbà nasce nel 1993 ed è stata pensata e voluta da padre Giuseppe Paparone OP (1946-2021), sacerdote domenicano, per accompagnare bambini e ragazzi in condizioni economiche molto disagiate nel loro percorso di crescita, come un padre per i figli.",historyText2:"Il filo rosso che ha guidato i vari passaggi della Associazione negli anni, è stato la parola Abbà, «padre», meglio, «papà», in aramaico: tutta la vita sacerdotale di padre Giuseppe ha avuto l'unico scopo di portare al prossimo l'Amore del Padre, Abbà.",historyText3:"Nello specifico l'obiettivo dell'Associazione Abbà si realizza nel sostegn
430o all'istruzione, dalle elementari all'università, al bambino che non ha i mezzi per farlo, perché possa affacciarsi alla vita come tanti suoi coetanei in altre zone del mondo, per contribuire alla sua formazione morale e scolastica e, in futuro, al progresso della società in cui vive. L'Associazione Abbà opera in vari Paesi prevalentemente attraverso missioni domenicane in loco.",founder:"Fondatore dell'Associazione Abbà",orgChart:"Organigramma",president:"Presidente",vicePresident:"Vicepresidente",board:"Consiglio Direttivo",yearsOfCommitment:"anni di impegno",forBetterFuture:"per un futuro migliore",features:{mission:{title:"La nostra Mission",description:"L'Associazione Abbà, nata nel 1993, ha scelto l'istruzione come strumento privilegiato per la difesa e la promozione dei bambini e dei giovani."},education:{title:"Istruzione e Formazione",description:"Crediamo nella cultura come strumento per l'elevazione spirituale e umana, accompagnando i bambini verso un futuro migliore."},support:{title:"Sostegno a Distanza",description:"Più di 1000 studenti si sono diplomati e oltre cinquanta si sono laureati grazie al nostro programma di sostegno."},international:{title:"Presenza Internazionale",description:"Operiamo in 8 paesi diversi, portando speranza e opportunità educative ai bambini più bisognosi."},results:{title:"Risultati Tangibili",description:"Trentacinque anni di esperienza ci hanno permesso di cambiare la vita di centinaia di bambini e delle loro famiglie."},objective:{title:"Obiettivo Chiaro",description:"Accompagnare i bambini nel loro sviluppo, oscurato spesso dai gravi condizionamenti locali, attraverso l'istruzione."}},whatCanYouDo:"Cosa puoi fare tu?",supportDescription:"Il sostegno a distanza permette a ogni bambino di avere vicino a sé qualcuno che si occupi della sua vita anche in mancanza di una famiglia o in presenza di condizioni disagiate o gravi difficoltà economiche.",supportChildDistance:"Sostieni un bambino a distanza",discoverHowToHelp:"Scopri come aiutare"},stories:{title:"Le nostre storie di successo",subtitle:"Ogni bambino ha una storia da raccontare. Queste sono le voci di chi ha trovato speranza attraverso l'istruzione.",storyOf:"La storia di",age:"Età",years:"anni",supportChildLike:"Sostieni un bambino come",stats:{graduates:"Studenti diplomati",universityGraduates:"Laureati",countries:"Paesi",yearsExperience:"Anni di esperienza"},cta:{title:"Sostieni un bambino a distanza... e diventi grande anche tu!",subtitle:"Scopri come fare per sostenere un bambino a distanza e cambiare una vita per sempre.",button:"Inizia ora il tuo sostegno"}},projects:{title:"I nostri progetti nel mondo",subtitle:"Operiamo in 8 paesi diversi, portando istruzione e speranza ai bambini più bisognosi",countriesOfIntervention:"Paesi di intervento",childrenSupported:"Bambini sostenuti",activeProjects:"Progetti attivi",students:"Studenti",ourResults:"I nostri risultati",supportThisProject:"Sostieni questo progetto",learnMore:"Scopri di più",worldPresence:"La nostra presenza nel mondo",cta:{title:"Vuoi supportare un progetto specifico?",subtitle:"Scegli il paese che più ti sta a cuore e inizia a fare la differenza nella vita di un bambino.",chooseProject:"Scegli un progetto",generalDonation:"Fai una donazione generale"},inquiryForm:{title:"Richiedi informazioni",projectLabel:"Progetto:",nameLabel:"Nome e Cognome",namePlaceholder:"Il tuo nome completo",emailLabel:"Email",emailPlaceholder:"[email protected]",phoneLabel:"Telefono",phonePlaceholder:"+39 123 456 7890",messageLabel:"Messaggio",messagePlaceholder:"Scrivi qui il tuo messaggio...",optional:"opzionale",defaultMessage:"Sono interessato/a a sostenere un bambino in {country}. Vorrei ricevere maggiori informazioni.",submit:"Invia richiesta",sending:"Invio...",cancel:"Annulla",close:"Chiudi",successTitle:"Richiesta inviata!",successMessage:"La tua richiesta di informazioni sul progetto in {country} è stata inviata con successo. Ti contatteremo al più presto.",errorTitle:"Errore",errorRequired:"Per favore compila nome e email.",errorEmail:"Per favore inserisci un indirizzo email valido.",errorSending:"Si è verificato un errore nell'invio della richiesta. Riprova più tardi."},countries:{brazil:{name:"Brasile",city:"Goiânia",since:"1995",de
430scription:"Supportiamo bambini e ragazzi provenienti da famiglie estremamente povere, residenti per lo più nella baraccopoli della città, offrendo loro un accompagnamento umano e educativo.",achievements:["100+ diplomati","12 laureati","2 master"],fullDescription:`ABBÀ ODV è presente nella missione di Goiânia fin dal 1995.
431
432Goiânia è la capitale dello stato brasiliano di Goiás, ubicato nella regione centrale del Brasile; ha una superficie di 729 km² e una popolazione di circa 1,2 milioni di abitanti.
433
434Sebbene non tutti a Goiânia vivano nelle "favelas", il quadro è quello di una città gravata da un'acuta disparità socio-economica. L'inflazione – che, insieme alla concentrazione della ricchezza nazionale nelle mani di pochi, ha reso questo stato di cose stabile negli anni – fa sì che difficilmente le categorie in difficoltà possano riuscire a migliorare le proprie condizioni di vita avvalendosi solo delle loro forze.
435
436I bambini e ragazzi assistiti da Abbà provengono da famiglie estremamente povere, residenti per lo più nella baraccopoli della città. Molti sono figli di giovani tossicodipendenti o alcolizzati segnalati dai servizi sociali e vivono temporaneamente con nonne, zie o vicine di casa in attesa di tornare in famiglia qualora i genitori riescano a disintossicarsi.
437
438Grazie all'aiuto che ricevono da Abbà, i bambini possono andare a scuola e avere tutto il materiale necessario. Una piccola percentuale dell'aiuto viene utilizzata per l'acquisto di vestiario, medicinali o altre necessità particolari. In caso di estrema povertà della famiglia, sono le suore stesse a dare un aiuto ulteriore integrando quello ricevuto da Abbà, in modo da evitare che i minori finiscano per rinunciare agli studi per destinare alla famiglia quanto per essi previsto.
439
440Il denaro viene inoltre distribuito alle famiglie in diverse rate durante l'anno, in modo da controllare che il bambino venga iscritto a scuola e poi che frequenti regolarmente le lezioni.
441
442A Goiânia, Abbà ha collaborato fino al 2022 in modo strettissimo con suor Lucia Delvecchio (ordine delle Suore Domenicane del Santo Rosario), la quale seguiva il Progetto 
442sia per la parte economica e gestionale, sia per il monitoraggio dei bambini e ragazzi, recandosi spesso di persona nelle varie regioni dove essi vivevano; l'Associazione è arrivata a sostenere una punta di 119 ragazzi, quasi tutti diplomati, qualcuno persino laureato.
443
444Tra i traguardi più belli: Sanoete, Ingegnere civile, lavora in un'importante impresa edile della città; Fabiana, laureata in Amministrazione, ha vinto un Concorso pubblico federale; Vanderleia e Juliana, entrambe laureate in Scienze Infermieristiche, sono impiegate in ospedale.
445
446Nel 2022, suor Lucia ha purtroppo dovuto ritirarsi per motivi di età e di salute, e il Progetto ha visto una temporanea sospensione per poi riprendere nel 2024 (in seguito al difficile reperimento di una nuova referente locale, suor Vania de Oliveira) con 35 bambini/ragazzi, tra cui 5 studenti universitari.
447
448Si è sempre cercato di coinvolgere, per quanto possibile, le famiglie dei ragazzi, in modo che esse potessero diventare preziose alleate nel loro percorso educativo e scolastico.
449
450Le difficoltà sono comunque tante, ma si è notato un certo entusiasmo laddove, prima dell'arrivo delle Suore, la scuola era spesso priva di valore e sui volti si leggeva solo miseria e tristezza.`,successStories:["Sanoete: Ingegnere civile, lavora in un'importante impresa edile della città","Fabiana: Laureata in Amministrazione, vincitrice concorso pubblico federale","Vanderleia e Juliana: Laureate in Scienze Infermieristiche, impiegate in ospedale"]},cameroon:{name:"Camerun",city:"Bertoua – Djangané – Yaoundé – Balikumbat",since:"1995",description:"Supportiamo bambini e ragazzi provenienti da famiglie in condizioni socio-economiche molto difficili. In molti casi si tratta di famiglie monoparentali a unico reddito o di bambini orfani a causa dell'AIDS accolti da un parente o un conoscente.",achievements:["200+ diplomati","30 laureati","2 master"],fullDescription:`ABBÀ ODV ha attivato diversi progetti in Camerun fin dal 1995: a Yaoundé (la capitale), Bertoua, Djangané e Balikumbat, l'Associazione segue diversi programmi di sostegno a distanza per bambini dalla scuola materna a quella superiore. Per i più meritevoli sono inoltre previste borse di studio universitarie o parauniversitarie.
451
452Tutti questi progetti vengono realizzati da Abbà in collaborazione con le Suore Domenicane della Beata Imelda.
453
454Per quanto riguarda la scolarizzazione in Camerun, il fattore economico risulta ancora il limite maggiore che non consente alle famiglie di mandare i propri figli a scuola. La situazione economica del Paese è infatti molto difficile, con un livello molto alto di disoccupazione ed emigrazione (soprattutto verso Francia e Italia). Fino al 1993 il governo pagava il 55% delle tasse scolastiche (il restante 45% spettava alle famiglie), ma con l'attuale crisi mondiale gli aiuti sono diventati sporadici e molto inferiori.
455
456L'aiuto di Abbà risulta quindi molto importante perché permette alle Suore di seguire un bambino dalla scuola materna fino al certificato di studi primari, il brevetto di studi di primo ciclo (generale o professionale), oppure il baccellierato – a seconda del percorso scolastico – e quindi di crescerlo e formarlo umanamente, togliendolo dalla strada e offrendogli la possibilità di frequentare la scuola e avere almeno un livello minimo di preparazione. Un problema rilevante è spesso la mancanza di libri per molti studenti (sempre più costosi a causa dell'aumento del costo della vita) che, viste le classi sempre molto numerose, rende ancora più difficile per i bambini seguire con profitto le lezioni e, come è facile immaginare, rallenta il processo di apprendimento.
457
458A questi problemi si deve aggiungere il fatto che la diffusione dell'AIDS ha portato a un incremento del numero di bambini senza famiglia, che nella maggior parte dei casi vengono accolti da nonni, zii, parenti lontani o vicini di casa che hanno altri figli o nipoti e spesso una già difficile situazione economica alle spalle. Un altro flagello locale è il "paludismo", o malaria, che colpisce in modo più o meno forte tutti i piccoli camerunensi ed è ormai considerata una malattia endemica.
459
460In particolare nella capitale, alcolismo, violenze fisiche, uso di droghe ecc. spingono inoltre molti ragazzi ad abbandonare le proprie case e i propri villaggi e a trovare "rifugio" nelle strade della città, in spazi pubblici, diventando così preda di bande criminali o di pedofili. Il lavoro di Abbà risulta fondamentale per prevenire queste situazioni; l'inserimento in un programma di studio contribuisce, sebbene in minima parte, a limitare disastrose conseguenze.
461
462Quella camerunese rappresenta dunque una delle sfide più difficili, i cui buoni risultati danno ancora più gioia.`,successStories:["Blanche (Yaoundé): Laureata in Medicina, lavora in ospedale e visita periodicamente i piccoli assistiti dalla missione","Justine (Djangané): Di
462plomata in Agronomia, ha avviato un'azienda agricola locale che offre formazione e lavoro","Damien (Bertoua): Diplomato in Agronomia, ha seguito formazione per diventare Gendarme","Marinese (Balikumbat): Diplomata al Corso professionale per insegnanti, ora abilitata all'insegnamento"]},ivoryCoast:{name:"Costa d'Avorio",city:"Man",since:"2022",description:"Supportiamo bambini e ragazzi provenienti da villaggi estremamente modesti, consentendo loro di frequentare la scuola con il necessario materiale scolastico e offrendo loro un accompagnamento educativo.",achievements:["Fornitura materiale scolastico di base","Servizio aiuto-compiti e accompagnamento","Servizio moto-taxi per alunni lontani"],fullDescription:`Il progetto in Costa d'Avorio nasce a fine 2022 a Man e coinvolge i tre villaggi di Siebly, Gbeibly e Bahtiebly.
463
464Capoluogo del distretto di Montagnes, Man è una città rurale rannicchiata sulle vette dei monti Toura, nel cuore della campagna della Costa d'Avorio. È circondata da fattorie e piantagioni di cacao a perdita d'occhio. Famose sono anche le sue foreste di bambù e le sue cascate naturali.
465
466In questo progetto, Abbà sostiene una trentina di bambini e ragazzi che non potevano frequentare la scuola regolarmente per le cattive condizioni economiche della famiglia. Il sostegno di Abbà è fondamentale in quanto si è rilevato che molti alunni, in particolare nel villaggio di Siebly, non disponevano nemmeno del materiale scolastico di base.
467
468Vengono quindi forniti i necessari strumenti didattici: i libri essenziali di francese, inglese e matematica, lavagnette e scatole di gessetti. In collaborazione con il team di lavoro e gli insegnanti locali, è stata stabilita la creazione di gruppi di studio che mirano a massimizzare l'utilizzo dei libri offerti, favorendo uno studio approfondito e collaborativo.
469
470L'obiettivo finale è quello di affrontare le sfide educative locali creando un ambiente di apprendimento interattivo e accessibile a tutti.
471
472Per questo, il Progetto prevede inoltre che dei volontari locali competenti (tra cui ex insegnanti in pensione) seguano i piccoli beneficiari nei compiti, con particolare attenzione al francese, alla matematica, alle strategie di lettura, e per i bambini che abitano molto lontano dalle scuole è stato organizzato un servizio di moto-taxi (mezzo veloce ed economico molto utilizzato in Africa).
473
474Referente del Progetto a Man è Florent Seahe, cittadino ivoriano a capo della ONG Ansê C.I., che condivide il progetto educativo di Abbà e molto ben conosce la situazione e le esigenze locali.`,successStories:[]},philippines:{name:"Filippine",city:"Calabanga – Manila – Rosario",since:"2002",description:"Supportiamo bambini e ragazzi provenienti da famiglie in difficoltà, residenti nelle baraccopoli, in casette di materiali semplici, o nelle aree rurali, offrendo loro un accompagnamento umano e educativo.",achievements:["50+ diplomati","20+ laureati"],fullDescription:`Il supporto di Abbà nelle Filippine arriva in quattro località: Manila-San Juan; Manila-Quezon City; Calabanga e Rosario. L'attività si realizza con la collaborazione delle Suore Domenicane della Beata Imelda.
475
476Questi progetti funzionano particolarmente bene in virtù della precisione e della puntualità delle Referenti locali e anche dell'amore dei filippini per l'istruzione e la cultura.
477
478Sebbene nelle Filippine il tasso di scolarizzazione sia alto rispetto alla media dei Paesi Emergenti, si registra una certa dispersione scolastica causata dalla necessità di lavorare.
479
480Quello a Manila-San Juan è il primo progetto realizzato nel 2002. Abbà sostiene qui una trentina di giovani. "San Juan" è una contrazione del nome tradizionale della città, "San Juan del Monte". È il comune più piccolo di Metro Manila e per estensione territoriale perfino delle Filippine, ma è ricco di storia e cultura. Qui la comunità delle Suore con l'aiuto di Abbà promuove attività educative-formative per ragazzi le cui condizioni economiche non permettono un'adeguata scolarizzazione. Offre inoltre un programma di alimentazione e accoglienza diurna (day care) per una ventina di bambini in età prescolare, denominato "Batang Pinoy" (bimbi filippini).
481
482Anche il progetto a Manila-Quezon City sostiene una trentina di bambini e ragazzi ed è strutturato allo stesso modo. Quezon City è una città moderna nata all'inizio del XX secolo. Molti bambini inseriti in questo Progetto provengono dalle aree di squatter, e i loro genitori, per sopravvivere, fanno gli scavengers (rovistatori nelle discariche) per rivendere i materiali di recupero.
483
484A Calabanga è iniziata, nel 1991, l'attività delle Suore Domenicane nelle Filippine. Nel 1993, hanno fondato la "San Lorenzo Ruiz Catholic School", rinominata nel 2001 "Dominican School of Calabanga". In collaborazione con la comunità imeldina, Abbà sostiene qui una quarantina di giovani provenienti da famiglie in difficoltà. Per diversi anni, Abbà ha inoltre sponsorizzato un corso di Alfabetizzazione Informatica per i ragazzi.
485
486Infine, a Rosario, vivace comune agricolo nella regione di Ilocos, Abbà sostiene una quindicina di ragazzi particolarmente bisognosi: i loro genitori svolgono lavori molto umili e hanno spesso problemi di salute. I fondi vengono utilizzati per coprire le spese scolastiche (tasse, materiale, trasporto). Una parte degli oneri rimane a carico delle famiglie, al fine di promuovere un coinvolgimento diretto ed evitare un'eccessiva dipendenza dagli aiuti esterni.`,successStories:[]},italy:{name:"Italia",city:"Milano (FaTA ODV – Qiqajon ODV)",since:"2015",description:`Attraverso questi "mini-progetti" sosteniamo le spese per l'istruzione e l'educazione di bambini e ragazzi allontanati dalle famiglie d'origine o a rischio devianza accolti nelle strutture milanesi di FaTA e di Qiqajon.`,achievements:["Un'ottantina di bambini e ragazzi supportati ogni anno"],fullDescription:`Nel 2015, Abbà ha deciso di ampliare la propria attività, avviando un primo progetto sul territorio locale. Alla luce dell'esperienza maturata negli anni e del cambiamento socio-economico del Paese, Abbà ha ritenuto importante essere un fattore di promozione sociale dell'infanzia e della gioventù anche in Italia, attraverso la partnership con un'associazione locale, FaTA ODV, che condivide i valori e il progetto educativo di Abbà.
487
488FaTA (Famiglie Temporanea Accoglienza) è un'associazione che gestisce 3 comunità educative e un semiconvitto in cui sono accolti bambini e adolescenti che il Tribunale dei Minori allontana dalla famiglia di origine per maltrattamento, violenza o grave disagio, e minori inviati dai Servizi Sociali perché a rischio marginalità e devianza.
489
490Il ruolo di FaTA, così come quello di Abbà in molti Paesi in cui opera, è di accompagnare il bambino o ragazzo da una situazione di grave disagio a una situazione di cura, tutela e promozione.
491
492Abbà si è impegnata a versare un contributo finanziario per la copertura delle spese relative ai libri e al materiale scolastico per i bambini e ragazzi accolti, circa una trentina.
493
494Un secondo progetto sul territorio locale è stato avviato nel 2024, con il sostegno alla formazione dei bambini e ragazzi di Qiqajon, che, allo stesso modo di FaTA, condivide i valori e il progetto educativo di Abbà.
495
496Qiqajon (Associazione Francescana) è una comunità residenziale di famiglie che vuole «essere risorsa per far fronte alle diverse situazioni di vita dei minori accolti». Al suo interno si trova la comunità educativa Momo, che accoglie 5 minori di età compresa tra i 4 ed i 13 anni allontanati dalle famiglie in seguito a provvedimento del Tribunale dei Minori o ospitati con il consenso della famiglia in accordo con i Servizi Sociali di riferimento.
497
498Qiqajon ospita inoltre il centro diurno Giona, che si propone di rispondere alle esigenze di ragazzi/e frequentanti la scuola media inferiore (attualmente 45/50) che necessitano di un sostegno educativo in un ambiente protetto.
499
500Abbà si è impegnata a sostenere le spese scolastiche dei bambini della comunità educativa Momo e le attività sportive, altrettanto educative, del centro diurno Giona.`,successStories:[]},mexico:{name:"Messico",city:"San Luis Potosí",since:"2019",description:"Offriamo accompagnamento scolastico e umano a un gruppo di bambini e ragazzi della difficile zona di Peñasquito, nella periferia della città di San Luis Potosí.",achievements:["10+ diplomati","2 laureati"],fullDescription:`Il Progetto è nato nel 2019 in partnership con la comunità imeldina in Messico, e offre accompagnamento scolastico e umano a un gruppo di bambini e di ragazzi della difficile zona di Peñasquito, nella periferia della città di San Luis Potosí.
501
502Si tratta di un'area povera, con molta violenza, e purtroppo segnata dal lavoro minorile, in particolare nel settore della costruzione dei mattoni. Qui, numerosi bambini e ragazzi sono costretti a lavorare per fornire un sostegno finanziario alle loro famiglie, a discapito della frequenza scolastica.
503
504Il Progetto mira a eradicare questa tendenza, offrendo ai giovani studenti un prezioso contributo a copertura delle spese scolastiche ma anche un accompagnamento nella crescita umana e spirituale, secondo l'obiettivo di Abbà.
505
506Il Progetto coinvolge una trentina di bambini e ragazzi dalle elementari all'università. Sono infatti previste, per gli studenti meritevoli, anche borse di studio universitarie.`,successStories:["Yazmin: Prima laureata grazie ad Abbà in Amministrazione e gestione d'Impresa","Gerardo: Laureato in Ingegneria industriale"]},pakistan:{name:"Pakistan",city:"Lahore",since:"2024",description:"Attraverso questo progetto di gruppo, promuoviamo la scolarizzazione di un centinaio di bambini e ragazzi di Lahore.",achievements:["10+ diplomati","2 laureati"],fullDescription:`In Pakistan, a Okara, Abbà ha sostenuto dal 2006 al 2021 le studentesse del primo college universitario femminile della regi
506one del Punjab, fondato da un missionario domenicano, Padre Aldino Amato; un supporto importantissimo per le giovani pakistane, dal momento che il loro è tra gli ultimi 10 Paesi al mondo per istruzione femminile. Numerose ragazze si sono diplomate al college negli anni e la maggior parte di esse lavora ora come insegnante locale. Il progetto a Okara si è nostro malgrado dovuto concludere nel 2021 con la scomparsa del Missionario; tuttavia, le suore referenti di Okara, inviate a Lahore, hanno ivi aperto in sua memoria una nuova Missione, che dal 2024 siamo lieti di supportare.
507
508A Gohawa, distretto di Lahore, suor Najma e suor Balqees, a capo della Aldino's Charity Foundation, hanno fondato una scuola aperta a tutti, la Kindergarten School of Lahore (KSL). In Pakistan il 70% dei minori non ha un'istruzione. L'istruzione femminile solitamente non è contemplata.
509
510Attraverso quest'opera si intende dunque «elevare le aree arretrate del Paese fornendo un'istruzione di qualità basata su valori di uguaglianza e trasparenza», che accolga tutti e con un'attenzione particolare verso le ragazze, per le quali sono stati previsti anche corsi superiori.
511
512Gli studenti che con il contributo di Abbà possono frequentare la scuola sono un centinaio, in gran parte cristiani ma anche musulmani, e provengono per lo più da famiglie povere e dal lavoro nelle fornaci di mattoni.
513
514Altre difficoltà che gli studenti pakistani devono affrontare oltre a quelle socio-economiche sono quelle legate al clima, con temperature che d'estate raggiungono i 50° C. Per fare fronte alla situazione, le Suore prevedono campus estivi mattutini (dalle 7 alle 9.30 del mattino) per consentire agli alunni di continuare a studiare. La Regione è inoltre sovente colpita da gravi alluvioni che distruggono campi, abitazioni e bestiame, rendendo difficile per le famiglie soddisfare anche i bisogni primari.
515
516Suor Balqees afferma che la collaborazione di Abbà permette loro di «mantenere aperte le porte dell'istruzione ai bambini svantaggiati, anche in mezzo a tali crisi.»`,successStories:[]},congo:{name:"Rep. Dem. del Congo",city:"Kilomoni - Uvira",since:"2019",description:`Supportiamo bambini del poverissimo quartiere di Kilomoni (Uvira), offrendo loro la possibilità di frequentare l'ottimo complesso scolastico "Annunciata Cocchetti".`,achievements:["Supporto a 25 bambini","Donazione di un pulmino"],fullDescription:`Nel quartiere di Kilomoni, situato a nord della città di Uvira, sulle rive del lago Tanganica, Abbà ODV sostiene dal 2019 venticinque bambini, dando loro la possibilità di frequentare la scuola materna e quella elementare. L'Associazione ha inoltre donato alla Missione un pulmino che ha consentito di risolvere le difficoltà legate alla lontananza dagli istituti.
517
518A Kilomoni, le missionarie Dorotee hanno costruito prima la scuola materna (2013), poi la scuola elementare (2022) e infine la scuola superiore a indirizzo commerciale e scientifico (2023).
519
520Si tratta di una zona in cui vivono circa 500.000 persone, in abitazioni semplici, costruite con mattoni cotti o in terra battuta. La popolazione è per lo più costituita da famiglie sfollate dal Burundi a causa della guerra, o dalle montagne circostanti, e la loro attività economica si basa quasi esclusivamente sul piccolo commercio lungo la strada principale, nei quartieri o con il vicino Burundi, mentre i campi per la coltivazione sono lontani, difficilmente raggiungibili anche a seguito delle frequenti inondazioni che colpiscono la zona.
521
522Referente locale di questo Progetto è suor Giuliana Fadani, direttrice del "Complesso Scolastico Madre Annunciata Cocchetti". Suor Giuliana opera in Congo, nel settore scolastico, da trent'anni, e ora dirige questa nuova struttura. È un complesso che risponde alla richiesta di molte famiglie che desiderano mandare qui i loro bambini, sicuri di ricevere un'assistenza e un'istruzione di buon livello.
523
524Tanti sono purtroppo i problemi all'ordine del giorno nella Repubblica Democratica del Congo: dalle guerre ai disordini naturali e di ordine sanitario (malaria).`,successStories:[]}}},faq:{sectionTitle:"Sezione FAQ",title:"Tutto ciò che vorresti sapere",questions:[{question:"Quanto costa un sostegno a distanza?",answer:"Il costo viene calcolato in funzione del bisogno, situazione personale, situazione Paese età."},{question:"L'impegno che decido di prendere nei confronti di un bambino ha una durata?",answer:"Nella assunzione di un impegno educativo e formativo nei confronti di una difficoltà, la durata è a medio/lungo termina e impegna il tempo necessario ai percorsi di studio fino all'inserimento lavorativo. Tuttavia il sostenitore può interrompere il contributo in qualsiasi momento."},{question:"Il bambino verso cui mi impegno potrebbe essermi sostituito?",answer:"È possibile. È una situazione che può verificarsi quando per cause di forza maggiore (come lo spostamento del nucleo famigliare per necessità di lavoro) diventi problematico se non impossibile seguire il soggetto assistito e tracciare il contributo erogato."},{question:"Quali informazioni riceverò sul bambino e con quale frequenza?",answer:"Gli aggiornamenti sulla situazione familiare, sociale e scolastica del bambino hanno cadenza semestrale, inoltre come per ogni Associazione che si occupa di sostegno, vengono fornite ai propri sostenitori informazioni sul Paese e sui corrispondenti locali attraverso newsletter e notiziari associativi."},{question:"Come posso comunicare con il beneficiario?",answer:`Tramite i suoi uffici di Milano l'Associazione permette al sostenitore che lo desideri di corrispondere con il minore attraverso l'invio della sua corrispondenza alla sede del partner della associazione in loco che provvederà a consegnarla ed eventualmente tradurla al bambino.
525
526Abbà richiede rapporti regolari e dettagliati ai propri corrispondenti locali, sia dal punto di vista educativo che economico, per darne poi 
526informazione ai sostenitori. Questo avviene semestralmente attraverso una scheda di rendicontazione economica con la descrizione delle spese di gestione del progetto sostenute dal partner nel periodo insieme ad informazioni sulla vita familiare e i progressi scolastici del bambino. Altra fonte di informazione per i sostenitori è la pubblicazione del bilancio associativo.`},{question:"Chi controlla l'andamento locale del sostegno a distanza?",answer:"Oltre al contatto per le vie ordinarie quotidiane, telefono, corrispondenza, con i corrispondenti locali nei vari Paesi, incaricati della Associazione si recano periodicamente sul posto per verificarne l'operato, conoscere le realtà e problematiche sociali e familiari a beneficio dei beneficiari e della informazione ai sostenitori."}]},donate:{title:"Sostieni i nostri bambini",subtitle:"La tua donazione può cambiare la vita di un bambino. Scegli come aiutare i nostri progetti educativi nel mondo.",singleDonation:"Donazione Singola",monthlyDonation:"Donazione Mensile",chooseAmount:"Scegli un importo",customAmount:"O inserisci un importo personalizzato",customAmountPlaceholder:"Importo personalizzato",whereDonation:"Dove vuoi che vada la tua donazione?",donateNow:"Dona",perMonth:"al mese",now:"ora",selectAmount:"Seleziona un importo",securePayment:"Pagamento sicuro tramite Stripe",taxDeductible:"La tua donazione è deducibile fiscalmente",causes:{general:{title:"Sostegno Generale",description:"Aiuta dove c'è più bisogno"},education:{title:"Istruzione",description:"Libri, materiali scolastici e formazione"},infrastructure:{title:"Strutture",description:"Costruzione e mantenimento scuole"}},amounts:{25:"Contributo spese scolastiche di un bambino",50:"Contributo spese scolastiche di un bambino",100:"Contributo di 1 semestre di scuola materna per un bambino",200:"Copertura di 1 anno di scuola materna per un bambino"},impact:{title:"L'impatto della tua donazione",with25:"Con 25€ - 50€",with25desc:"Fornisci parte del materiale scolastico a 1 bambino",with100:"Con 100€",with100desc:"Sostieni completamente l'istruzione di un bambino della scuola materna per 1 semestre",with200:"Con 200€",with200desc:"Sostieni completamente l'istruzione di un bambino della scuola materna per 1 anno"},testimonial:{title:"Una testimonianza",text:"Grazie alle donazioni ricevute, Maria da São Paulo è riuscita a completare gli studi superiori e ora frequenta l'università di ingegneria. La vostra generosità ha cambiato il suo futuro."},howToSupport:{title:"Come sostenere Abbà",specialProjects:"Progetti Speciali: I regali solidali!",description:'Abbà ti propone diversi modi per dimostrare il tuo sostegno e il tuo impegno a favore dei nostri progetti e dei bambini bisognosi del mondo: non solo sostegni a distanza ma anche donazioni in occasioni di battesimi, comunioni, lauree e matrimoni ("bomboniere solidali") o per iniziative mirate a specifiche necessità.',legacy:"È possibile inoltre effettuare donazioni o lasciti testamentari a favore dei nostri bambini.",supportWith:"Puoi sostenere Abbà con:",methods:{check:"Assegno intestato ad Abbà",bank:"Bonifico bancario presso Intesa Sanpaolo con le seguenti coordinate: IBAN IT18 X030 69096 06100 000015544 intestato a ABBA' ASSOCIAZIONE PER IL SOSTEGNO E L'ASSISTENZA ALL'INFANZIA",postal:"Versamento su Conto corrente postale n. 27382209 intestato ad Abbà",paypal:"Versamento tramite PayPal ([email protected])"}},whyDonate:{title:"Perché donare con noi",reason1:"Rapporti semestrali di aggiornamento",reason2:"35 anni di esperienza nel settore"}},gallery:{title:"La nostra galleria",subtitle:"Immagini che raccontano il nostro impegno e i successi dei bambini che sosteniamo nel mondo",allPhotos:"Tutte le foto",filters:{education:"Istruzione",achievements:"Successi",infrastructure:"Strutture",events:"Eventi",training:"Formazione",moments:"Momenti",missions:"Missioni",travels:"Viaggi"},noImages:"Nessuna immagine trovata",tryOtherCategory:"Prova a selezionare un'altra categoria.",share:"Condividi",download:"Scarica",of:"di",cta:{title:"Vuoi vedere più foto dei nostri progetti?",subtitle:"Seguici sui social media per rimanere aggiornato con nuove foto e storie dai nostri progetti nel mondo.",facebook:"Seguici su Facebook",instagram:"Seguici su Instagram"}},news:{title:"News e Aggiornamenti",subtitle:"Resta aggiornato su tutte le nostre attività, progetti e storie di successo",search:"
526Cerca nelle news...",featured:"News in Evidenza",inEvidence:"In Evidenza",readAll:"Leggi tutto",noNews:"Nessuna news trovata",tryModifyFilters:"Prova a modificare i filtri di ricerca o la categoria selezionata.",categories:{all:"Tutte le news",events:"Eventi",projects:"Progetti",stories:"Storie",updates:"Aggiornamenti"},newsletter:{title:"Rimani sempre aggiornato",subtitle:"Iscriviti alla nostra newsletter per ricevere tutte le novità sui nostri progetti e le storie dei bambini che aiutiamo.",placeholder:"La tua email",subscribe:"Iscriviti alla Newsletter",privacy:"Rispettiamo la tua privacy. Nessun spam, solo aggiornamenti importanti.",sending:"Invio...",successTitle:"Iscrizione completata!",successMessage:"Grazie per esserti iscritto alla nostra newsletter. Ti terremo aggiornato sulle nostre attività.",errorTitle:"Errore",errorRequired:"Per favore inserisci un indirizzo email.",errorEmail:"Per favore inserisci un indirizzo email valido.",errorSending:"Si è verificato un errore. Riprova più tardi."}},media:{title:"I nostri contenuti",subtitle:"Video, pubblicazioni e materiali per conoscere meglio le nostre attività e rimanere sempre aggiornati.",videos:"Video",newsletter:"Il Giornalino",noVideos:"Nessun video disponibile al momento.",noNewsletter:"Nessun giornalino disponibile al momento.",downloadSemestrale:"Scarica il Semestrale",downloadInserto:"Scarica l'inserto Serata dei Soci"},transparency:{badge:"Trasparenza",title:"La nostra trasparenza",subtitle:"Crediamo nella trasparenza come valore fondamentale. Qui puoi consultare e scaricare tutti i documenti relativi alla nostra attività e gestione.",downloadDocument:"Scarica documento",documentNotAvailable:"Documento non disponibile",info:"Per qualsiasi informazione aggiuntiva sui nostri documenti o per richiedere copie certificate, non esitare a",contactUs:"contattarci"},contact:{title:"Contattaci",subtitle:"Hai domande sui nostri progetti? Vuoi sostenere un bambino? Siamo qui per aiutarti.",howToReachUs:"Come raggiungerci",headquarters:"Sede Principale",phone:"Telefono",email:"Email",openingHours:"Orari di apertura",followUs:"Seguici sui social",sendMessage:"Invia un messaggio",form:{requestType:"Tipo di richiesta",fullName:"Nome completo",yourName:"Il tuo nome",emailAddress:"Email",emailPlaceholder:"[email protected]",phonePlaceholder:"+39 123 456 7890",subject:"Oggetto",subjectPlaceholder:"Oggetto del messaggio",message:"Messaggio",messagePlaceholder:"Scrivi qui il tuo messaggio...",privacy:"Ho letto e accetto l'informativa sulla privacy e autorizzo il trattamento dei miei dati personali.",privacyLink:"informativa sulla privacy",submit:"Invia messaggio",sendButton:"Invia messaggio",required:"*"},requestTypes:{general:"Informazioni generali",adoption:"Sostegno a distanza",donation:"Donazioni",volunteer:"Volontariato",partnership:"Partnership",media:"Ufficio stampa"},contactEmail:"Email di contatto",forGeneralInfo:"Per informazioni generali:",phoneSupport:"Supporto telefonico",monFri:"Lun-Ven 9:00-18:00:",responseTime:"Tempi di risposta",responseTimeText:"Ti risponderemo entro 24 ore nei giorni lavorativi",messageSent:"Messaggio inviato!",thankYou:"Grazie per averci contattato. Ti risponderemo al più presto."},footer:{description:"Dal 1990 ci prendiamo cura della formazione esistenziale e culturale di bambini nati in situazioni di disagio, attraverso l'istruzione e il sostegno a distanza.",quickLinks:"Link Rapidi",howToHelp:"Come Aiutare",legalInfo:"Informazioni Legali",whereWeOperate:"Dove Operiamo",links:{about:"Chi Siamo",projects:"I nostri Progetti",stories:"Storie di Successo",news:"News",gallery:"Galleria",contact:"Contatti"}
526,support:{distanceSupport:"Sostegno a Distanza",donations:"Donazioni",volunteering:"Volontariato",partnership:"Partnership",fivePerMille:"Donazione 5x1000",legacy:"Lasciti Testamentari"},legal:{privacy:"Privacy Policy",cookies:"Cookie Policy",terms:"Termini di Servizio",transparency:"Trasparenza",reports:"Bilanci"},stats:{yearsExperience:"Anni di esperienza",childrenSupported:"Bambini sostenuti",graduates:"Diplomati",countries:"Paesi di intervento"},newsletter:{title:"Rimani aggiornato sulle nostre attività",subtitle:"Iscriviti alla nostra newsletter per ricevere notizie sui progetti e le storie dei bambini che aiutiamo.",placeholder:"La tua email",subscribe:"Iscriviti"},copyright:"© {year} Abbà ODV. Tutti i diritti riservati.",madeWith:"Fatto con ❤️ per i bambini del mondo",legalText:"Abbà ODV - Associazione per il sostegno e l'assistenza all'infanzia e alla gioventù ODV | Codice Fiscale: 97131900157 | Iscritta al Registro delle ODV"},common:{loading:"Caricamento...",error:"Si è verificato un errore",retry:"Riprova",close:"Chiudi",save:"Salva",cancel:"Annulla",delete:"Elimina",edit:"Modifica",add:"Aggiungi",search:"Cerca",filter:"Filtra",all:"Tutti",yes:"Sì",no:"No"}},en:{nav:{home:"Home",about:"About Us",projects:"Projects",stories:"Stories",news:"News",transparency:"Transparency",gallery:"Gallery",media:"Media",contact:"Contact",supportNow:"Support Now"},hero:{slides:[{title:"save my life, send me to school",subtitle:"We help children become adults through education",cta:"Support a child"},{title:"Abbà is the Father who takes care",subtitle:"of the human and cultural formation of children in difficult situations",cta:"Discover our projects"},{title:"culture as a tool",subtitle:"for the spiritual and human elevation of children around the world",cta:"Read our stories"}],supportChild:"Support a child",discoverWhatWeDo:"Discover what we do",stats:{childrenSupported:"Children supported",diplomasAchieved:"Diplomas achieved",countriesOfIntervention:"Countries of intervention"}},about:{helpChildren:"We help children become adults",subtitle:"Abbà takes care of the education of children in disadvantaged conditions",ourHistory:"Our history",historyText1:"The Abbà association was founded in 1993 and was conceived and desired by Father Giuseppe Paparone OP (1946-2021), a Dominican priest, to accompany children and young people in very difficult economic conditions on their path of growth, like a father for his children.",historyText2:`The common thread that has guided the various stages of the Association over the years has been the word Abbà, "father", or better, "dad", in Aramaic: Father Giuseppe's entire priestly life had the sole purpose of bringing the Father's Love, Abbà, to others.`,historyText3:"Specifically, the objective of the Abbà Association is realized in supporting education, from elementary school to university, for children who do not have the means to do so, so that they can face life like many of their peers in other parts of the world, to contribute to their moral and educational formation and, in the future, to the progress of the society in which they live. The Abbà Association operates in various countries mainly through local Dominican missions.",founder:"Founder of the Abbà Association",orgChart:"Organization Chart",president:"President",vicePresident:"Vice President",board:"Board of Directors",yearsOfCommitment:"years of commitment",forBetterFuture:"for a better future",features:{mission:{title:"Our Mission",description:"The Abbà Association, founded in 1993, has chosen education as a privileged tool for the defense and promotion of children and young people."},education:{title:"Education and Training",description:"We believe in culture as a tool for spiritual and human elevation, accompanying children towards a better future."},support:{title:"Distance Support",description:"More than 1000 students have graduated and over fifty have obtained a degree thanks to our support program."},international:{title:"International Presence",description:"We operate in 8 different countries, bringing hope and educational opportunities to the most needy children."},results:{title:"Tangible Results",description:"Thirty-five years of experience have allowed us to change the lives of hundreds of children and their families."},objective:{title:"Clear Objective",description:"Accompanying children in their development, often obscured by severe local constraints, through education."}},whatCanYouDo:"What can you do?",supportDescription:"Distance support allows each child to have someone close to them who takes care of their life even in the absence of a family or in the presence of disadvantaged conditions or severe economic difficulties.",supportChildDistance:"Support a child at distance",discoverHowToHelp:"Discover how to help"},stories:{title:"Our success stories",subtitle:"Every child has a story to tell. These are the voices of those who found hope through education.",storyOf:"The story of",age:"Age",years:"years old",supp
526ortChildLike:"Support a child like",stats:{graduates:"Graduated students",universityGraduates:"University graduates",countries:"Countries",yearsExperience:"Years of experience"},cta:{title:"Support a child at distance... and you grow too!",subtitle:"Find out how to support a child at distance and change a life forever.",button:"Start your support now"}},projects:{title:"Our projects around the world",subtitle:"We operate in 8 different countries, bringing education and hope to the most needy children",countriesOfIntervention:"Countries of intervention",childrenSupported:"Children supported",activeProjects:"Active projects",students:"Students",ourResults:"Our results",supportThisProject:"Support this project",learnMore:"Learn more",worldPresence:"Our presence in the world",cta:{title:"Want to support a specific project?",subtitle:"Choose the country closest to your heart and start making a difference in a child's life.",chooseProject:"Choose a project",generalDonation:"Make a general donation"},inquiryForm:{title:"Request information",projectLabel:"Project:",nameLabel:"Full Name",namePlaceholder:"Your full name",emailLabel:"Email",emailPlaceholder:"[email protected]",phoneLabel:"Phone",phonePlaceholder:"+1 123 456 7890",messageLabel:"Message",messagePlaceholder:"Write your message here...",optional:"optional",defaultMessage:"I am interested in supporting a child in {country}. I would like to receive more information.",submit:"Send request",sending:"Sending...",cancel:"Cancel",close:"Close",successTitle:"Request sent!",successMessage:"Your request for information about the project in {country} has been sent successfully. We will contact you soon.",errorTitle:"Error",errorRequired:"Please fill in name and email.",errorEmail:"Please enter a valid email address.",errorSending:"An error occurred while sending the request. Please try again later."},countries:{brazil:{name:"Brazil",city:"Goiânia",since:"1995",description:"We support children and young people from extremely poor families, mostly living in the city's slums, offering them human and educational accompaniment.",achievements:["100+ high school graduates","12 university graduates","2 masters degrees"],fullDescription:`ABBÀ ODV has been present in the Goiânia mission since 1995.
527
528Goiânia is the capital of the Brazilian state of Goiás, located in central Brazil; it has an area of 729 km² and a population of about 1.2 million inhabitants.
529
530Although not everyone in Goiânia lives in "favelas", the picture is that of a city burdened by acute socio-economic disparity. Inflation – which, together with the concentration of national wealth in the hands of a few, has made this state of affairs stable over the years – means that it is difficult for disadvantaged categories to improve their living conditions using only their own strength.
531
532The children and young people assisted by Abbà come from extremely poor families, mostly living in the city's slums. Many are children of young drug addicts or alcoholics reported by social services and live temporarily with grandmothers, aunts or neighbors while waiting to return to their families if their parents manage to detoxify.
533
534Thanks to the help they receive from Abbà, children can go to school and have all the necessary materials. A small percentage of the aid is used for purchasing clothing, medicines or other special needs. In cases of extreme family poverty, the nuns themselves provide additional help by supplementing what they receive from Abbà, to prevent minors from giving up their studies to allocate what was intended for them to the family.
535
536The money is also distributed to families in several installments during the year, to check that the child is enrolled in school and then regularly attends classes.
537
538In Goiânia, Abbà collaborated very closely until 2022 with Sister Lucia Delvecchio (Order of the Dominican Sisters of the Holy Rosary), who followed the Project both for the economic and management side, and for monitoring the children and young people, often going in person to the various regions where they lived;
538 the Association came to support a peak of 119 young people, almost all high school graduates, some even university graduates.
539
540Among the most beautiful achievements: Sanoete, Civil Engineer, works in an important construction company in the city; Fabiana, graduated in Administration, won a federal public competition; Vanderleia and Juliana, both graduated in Nursing Sciences, are employed in hospitals.
541
542In 2022, Sister Lucia unfortunately had to retire for age and health reasons, and the Project saw a temporary suspension before resuming in 2024 (following the difficult search for a new local coordinator, Sister Vania de Oliveira) with 35 children/young people, including 5 university students.
543
544Efforts have always been made to involve, as much as possible, the families of the young people, so that they could become precious allies in their educational and school journey.
545
546The difficulties are many, but a certain enthusiasm has been noted where, before the arrival of the Sisters, school was often worthless and faces showed only misery and sadness.`,successStories:["Sanoete: Civil Engineer, works in an important construction company","Fabiana: Graduated in Administration, winner of federal public competition","Vanderleia and Juliana: Graduated in Nursing Sciences, employed in hospitals"]},cameroon:{name:"Cameroon",city:"Bertoua – Djangané – Yaoundé – Balikumbat",since:"1995",description:"We support children and young people from families in very difficult socio-economic conditions. In many cases these are single-parent, single-income families or children orphaned by AIDS taken in by a relative or acquaintance.",achievements:["200+ high school graduates","30 university graduates","2 masters degrees"],fullDescription:`ABBÀ ODV has been running various projects in Cameroon since 1995: in Yaoundé (the capital), Bertoua, Djangané and Balikumbat, the Association runs several distance support programs for children from kindergarten to high school. University or para-university scholarships are also available for the most deserving students.
547
548All these projects are carried out by Abbà in collaboration with the Dominican Sisters of Blessed Imelda.
549
550Regarding schooling in Cameroon, the economic factor is still the major limitation that prevents families from sending their children to school. The country's economic situation is very difficult, with a very high level of unemployment and emigration (especially to France and Italy). Until 1993, the government paid 55% of school fees (the remaining 45% was paid by families), but with the current global crisis, aid has become sporadic and much lower.
551
552Abbà's help is therefore very important because it allows the Sisters to follow a child from kindergarten to the primary school certificate, the first cycle diploma (general or professional), or the baccalaureate – depending on the school path – and therefore to raise and train them humanely, taking them off the streets and offering them the opportunity to attend school and have at least a minimum level of education. A significant problem is often the lack of books for many students (increasingly expensive due to the rising cost of living) which, given the always very large classes, makes it even more difficult for children to follow lessons profitably and, as one can easily imagine, slows down the learning process.
553
554Added to these problems is the fact that the spread of AIDS has led to an increase in the number of children without families, who in most cases are taken in by grandparents, uncles, distant relatives or neighbors who have other children or grandchildren and often an already difficult economic situation behind them. Another local scourge is "paludism", or malaria, which affects all young Cameroonians to a greater or lesser extent and is now considered an endemic disease.
555
556Particularly in the capital, alcoholism, physical violence, drug use, etc. also push many young people to abandon their homes and villages and find "refuge" in the city streets, in public spaces, thus becoming prey to criminal gangs or pedophiles. Abbà's work is fundamental in preventing these situations; enrollment in a study program contributes, albeit minimally, to limiting disastrous consequences.
557
558The Cameroonian situation is therefore one of the most difficult challenges, whose good results bring even more joy.`,successStories:["Blanche (Yaoundé): Medical graduate, works in hospital and periodically visits children assisted by the mission","Justine (Djangané): Agronomy diploma, started a local farm that offers training and work","Damien (Bertoua): Agronomy diploma, trained to become a Gendarme","Marinese (Balikumbat): Teaching diploma, now certified to teach"]},ivoryCoast:{name:"Ivory Coast",city:"Man",since:"2022",description:"We support children and young people from extremely modest villages, enabling them to attend school with the necessary school supplies and offering them educational accompaniment.",achievements:["Basic school supplies","Homework help and tutoring service","Moto-taxi service for distant students"],fullDescription:`The project in Ivory Coast was born at the end of 2022 in Man and involves the three villages of Siebly, Gbeibly and Bahtiebly.
559
560Capital of the Montagnes district, Man is a rural town nestled on the peaks of the Toura mountains, in the heart of the Ivory Coast countryside. It is surrounded by farms and cocoa plantations as far as the eye can see. Its bamboo forests and natural waterfalls are also famous.
561
562In this project, Abbà supports about thirty children and young people who could not attend school regularly due to their family's poor economic conditions. Abbà's support is fundamental as it was found that many students, particularly in the village of Siebly, did n
562ot even have basic school supplies.
563
564The necessary teaching tools are therefore provided: essential books in French, English and mathematics, small blackboards and boxes of chalk. In collaboration with the work team and local teachers, the creation of study groups was established to maximize the use of the books offered, promoting in-depth and collaborative study.
565
566The ultimate goal is to address local educational challenges by creating an interactive and accessible learning environment for all.
567
568For this reason, the Project also provides for competent local volunteers (including retired former teachers) to follow the young beneficiaries in their homework, with particular attention to French, mathematics, reading strategies, and for children who live very far from schools, a moto-taxi service has been organized (a fast and economical vehicle widely used in Africa).
569
570The Project coordinator in Man is Florent Seahe, an Ivorian citizen heading the NGO Ansê C.I., who shares Abbà's educational project and knows the local situation and needs very well.`,successStories:[]},philippines:{name:"Philippines",city:"Calabanga – Manila – Rosario",since:"2002",description:"We support children and young people from families in difficulty, living in slums, simple material houses, or rural areas, offering them human and educational accompaniment.",achievements:["50+ high school graduates","20+ university graduates"],fullDescription:`Abbà's support in the Philippines reaches four locations: Manila-San Juan; Manila-Quezon City; Calabanga and Rosario. The activity is carried out in collaboration with the Dominican Sisters of Blessed Imelda.
571
572These projects work particularly well thanks to the precision and punctuality of local coordinators and also the Filipinos' love for education and culture.
573
574Although the schooling rate in the Philippines is high compared to the average of Emerging Countries, there is some school dropout caused by the need to work.
575
576The Manila-San Juan project was the first one launched in 2002. Abbà supports about thirty young people here. "San Juan" is a contraction of the traditional city name, "San Juan del Monte". It is the smallest municipality in Metro Manila and even in the Philippines by territorial extension, but it is rich in history and culture. Here the community of Sisters with Abbà's help promotes educational-training activities for children whose economic conditions do not allow adequate schooling. It also offers a food and day care program for about twenty preschool children, called "Batang Pinoy" (Filipino children).
577
578The Manila-Quezon City project also supports about thirty children and young people and is structured in the same way. Quezon City is a modern city born at the beginning of the 20th century. Many children in this Project come from squatter areas, and their parents, to survive, work as scavengers (rummaging in landfills) to resell recovered materials.
579
580In Calabanga, the activity of the Dominican Sisters in the Philippines began in 1991. In 1993, they founded the "San Lorenzo Ruiz Catholic School", renamed in 2001 "Dominican School of Calabanga". In collaboration with the Imeldine community, Abbà supports about forty young people from families in difficulty here. For several years, Abbà has also sponsored a Computer Literacy course for the children.
581
582Finally, in Rosario, a lively agricultural town in the Ilocos region, Abbà supports about fifteen particularly needy children: their parents do very humble jobs and often have health problems. The funds are used to cover school expenses (fees, materials, transportation). Part of the costs remains with the families, in order to promote direct involvement and avoid excessive dependence on external aid.`,successStories:[]},italy:{name:"Italy",city:"Milan (FaTA ODV – Qiqajon ODV)",since:"2015",description:'Through these "mini-projects" we support the education expenses of children and young people removed from their families of origin or at risk of deviance, hosted in the Milanese facilities of FaTA and Qiqajon.',achievements:["About eighty children and young people supported every year"],fullDescription:`In 2015, Abbà decided to expand its activities by launching a first project on local territory. In light of the experience gained over the years and the socio-economic changes in the country, Abbà considered it important to be a factor of social promotion for childhood and youth also in Italy, through partnership with a local association, FaTA ODV, which shares Abbà's values and educational project.
583
584FaTA (Temporary Foster Families) is an association that manages 3 educational communities and a semi-boarding school where children and adolescents are hosted after being removed from their families of origin by the Juvenile Court due to abuse, violence or serious hardship, and minors sent by Social Services because they are at risk of marginalization and deviance.
585
586The role of FaTA, like that of Abbà in many countries where it operates, is to accompany the child or young person from a situation of serious hardship to a 
586situation of care, protection and promotion.
587
588Abbà has committed to providing a financial contribution to cover expenses related to books and school materials for the hosted children and young people, approximately thirty.
589
590A second local project was launched in 2024, supporting the education of children and young people at Qiqajon, which, like FaTA, shares Abbà's values and educational project.
591
592Qiqajon (Franciscan Association) is a residential community of families that wants to "be a resource to address the various life situations of the hosted minors." Within it is the Momo educational community, which hosts 5 minors aged between 4 and 13 years removed from their families following a Juvenile Court order or hosted with family consent in agreement with the relevant Social Services.
593
594Qiqajon also hosts the Giona day center, which aims to meet the needs of boys/girls attending middle school (currently 45-50) who need educational support in a protected environment.
595
596Abbà has committed to supporting the school expenses of the children in the Momo educational community and the sports activities, equally educational, of the Giona day center.`,successStories:[]},mexico:{name:"Mexico",city:"San Luis Potosí",since:"2019",description:"We offer school and human accompaniment to a group of children and young people from the difficult area of Peñasquito, on the outskirts of San Luis Potosí city.",achievements:["10+ high school graduates","2 university graduates"],fullDescription:`The Project was born in 2019 in partnership with the Imeldine community in Mexico, and offers school and human accompaniment to a group of children and young people from the difficult area of Peñasquito, on the outskirts of San Luis Potosí city.
597
598This is a poor area, with a lot of violence, and unfortunately marked by child labor, particularly in the brick-making sector. Here, many children and young people are forced to work to provide financial support to their families, to the detriment of school attendance.
599
600The Project aims to eradicate this trend, offering young students a valuable contribution to cover school expenses but also accompaniment in human and spiritual growth, according to Abbà's objective.
601
602The Project involves about thirty children and young people from elementary school to university. In fact, university scholarships are also available for deserving students.`,successStories:["Yazmin: First graduate thanks to Abbà in Business Administration and Management","Gerardo: Graduate in Industrial Engineering"]},pakistan:{name:"Pakistan",city:"Lahore",since:"2024",description:"Through this group project, we promote the schooling of about a hundred children and young people in Lahore.",achievements:["10+ high school graduates","2 university graduates"],fullDescription:`In Pakistan, in Okara, Abbà supported from 2006 to 2021 the students of the first women's university college in the Punjab region, founded by a Dominican missionary, Father Aldino Amato; a very important support for young Pakistani women, since theirs is among the last 10 countries in the world for female education. Many girls graduated from the college over the years and most of them now work as local teachers. The project in Okara unfortunately had to end in 2021 with the passing of the Missionary; however, the coordinating sisters from Okara, sent to Lahore, opened a new Mission there in his memory, which we are pleased to support since 2024.
603
604In Gohawa, Lahore district, Sister Najma and Sister Balqees, heading the Aldino's Charity Foundation, founded a school open to all, the Kindergarten School of Lahore (KSL). In Pakistan, 70% of minors have no education. Female education is usually not considered.
605
606Through this work, the aim is therefore to "elevate the backward areas of the country by providing quality education based on values of equality and transparency", welcoming everyone with particular attention to girls, for whom higher courses have also been planned.
607
608The students who can attend school with Abbà's contribution are about a hundred, mostly Christians but also Muslims, and come mostly from poor families and brick kiln work.
609
610Other difficulties that Pakistani students face besides socio-economic ones are those related to climate, with summer temperatures reaching 50°C. To cope with the situation, the Sisters provide morning summer camps (from 7 to 9:30 am) to allow students to continue studying. The Region is also often hit by severe floods that destroy fields, homes and livestock, making it difficult for families to meet even basic needs.
611
612Sister Balqees states that Abbà's collaboration allows them to "keep the doors of education open to disadvantaged children, even in the midst of such crises."`,successStories:[]},congo:{name:"Dem. Rep. of Congo",city:"Kilomoni - Uvira",since:"2019",description:'We support children from the very poor Kilomoni neighborhood (Uvira), offering them the opportunity to attend the excellent "Annunciata Cocchetti" school 
612complex.',achievements:["Support for 25 children","Donation of a minibus"],fullDescription:`In the Kilomoni neighborhood, located north of the city of Uvira on the shores of Lake Tanganyika, Abbà ODV has been supporting twenty-five children since 2019, giving them the opportunity to attend kindergarten and elementary school. The Association also donated a minibus to the Mission, which helped solve the difficulties related to the distance from the schools.
613
614In Kilomoni, the Dorothean missionaries built first the kindergarten (2013), then the elementary school (2022), and finally the high school with commercial and scientific tracks (2023).
615
616This is an area where about 500,000 people live in simple homes built with baked bricks or mud. The population mostly consists of families displaced from Burundi due to war, or from the surrounding mountains, and their economic activity is based almost exclusively on small commerce along the main road, in the neighborhoods, or with neighboring Burundi, while the fields for cultivation are far away and difficult to reach, especially following the frequent floods that affect the area.
617
618The local coordinator of this Project is Sister Giuliana Fadani, director of the "Madre Annunciata Cocchetti School Complex." Sister Giuliana has been working in Congo in the education sector for thirty years and now directs this new facility. It is a complex that responds to the request of many families who want to send their children here, confident they will receive good care and quality education.
619
620Unfortunately, many problems are on the daily agenda in the Democratic Republic of Congo: from wars to natural disasters and health issues (malaria).`,successStories:[]}}},faq:{sectionTitle:"FAQ Section",title:"Everything you want to know",questions:[{question:"How much does distance support cost?",answer:"The cost is calculated based on need, personal situation, country situation, and age."},{question:"Does the commitment I decide to make towards a child have a duration?",answer:"In assuming an educational and formative commitment towards a difficulty, the duration is medium/long term and requires the time necessary for study paths until job placement. However, the supporter can stop the contribution at any time."},{question:"Could the child I commit to be replaced?",answer:"It is possible. This is a situation that can occur when, due to force majeure (such as the movement of the family unit for work needs), it becomes problematic if not impossible to follow the assisted subject and track the contribution provided."},{question:"What information will I receive about the child and how often?",answer:"Updates on the child's family, social and school situation are provided twice a year, and as with any association that deals with support, supporters are provided with information about the country and local correspondents through newsletters and association newsletters."},{question:"How can I communicate with the beneficiary?",answer:`Through its Milan offices, the Association allows supporters who wish to correspond with the minor by sending their correspondence to the headquarters of the association's local partner who will deliver it and possibly translate it to the child.
621
622Abbà requires regular and detailed reports from its local correspondents, both from an educational and economic point of view, to then provide information to supporters. This happens twice a year through an economic reporting form with the description of project management expenses incurred by the partner in the period together with information on family life and the child's school progress. Another source of information for supporters is the publication of the association's budget.`},{question:"Who controls the local progress of distance support?",answer:"In addition to contact through ordinary daily channels, telephone, 
622correspondence, with local correspondents in various countries, Association representatives periodically go to the site to verify their work, learn about social and family realities and problems for the benefit of beneficiaries and information to supporters."}]},donate:{title:"Support our children",subtitle:"Your donation can change a child's life. Choose how to help our educational projects around the world.",singleDonation:"Single Donation",monthlyDonation:"Monthly Donation",chooseAmount:"Choose an amount",customAmount:"Or enter a custom amount",customAmountPlaceholder:"Custom amount",whereDonation:"Where do you want your donation to go?",donateNow:"Donate",perMonth:"per month",now:"now",selectAmount:"Select an amount",securePayment:"Secure payment via Stripe",taxDeductible:"Your donation is tax deductible",causes:{general:{title:"General Support",description:"Help where it's most needed"},education:{title:"Education",description:"Books, school supplies and training"},infrastructure:{title:"Infrastructure",description:"Construction and maintenance of schools"}},amounts:{25:"Contribution to school expenses for a child",50:"Contribution to school expenses for a child",100:"Contribution for 1 semester of kindergarten for a child",200:"Coverage of 1 year of kindergarten for a child"},impact:{title:"The impact of your donation",with25:"With €25 - €50",with25desc:"You provide part of the school supplies for 1 child",with100:"With €100",with100desc:"You fully support a kindergarten child's education for 1 semester",with200:"With €200",with200desc:"You fully support a kindergarten child's education for 1 year"},testimonial:{title:"A testimonial",text:"Thanks to donations received, Maria from São Paulo was able to complete high school and is now attending engineering university. Your generosity has changed her future."},howToSupport:{title:"How to support Abbà",specialProjects:"Special Projects: Solidarity gifts!",description:'Abbà offers you various ways to demonstrate your support and commitment to our projects and needy children around the world: not only distance support but also donations on occasions of baptisms, communions, graduations and weddings ("solidarity favors") or for initiatives aimed at specific needs.',legacy:"It is also possible to make donations or bequests in favor of our children.",supportWith:"You can support Abbà with:",methods:{check:"Check payable to Abbà",bank:"Bank transfer to Intesa Sanpaolo with the following coordinates: IBAN IT18 X030 69096 06100 000015544 payable to ABBA' ASSOCIAZIONE PER IL SOSTEGNO E L'ASSISTENZA ALL'INFANZIA",postal:"Payment to Postal current account n. 27382209 payable to Abbà",paypal:"Payment via PayPal ([email protected])"}},whyDonate:{title:"Why donate with us",reason1:"Six-monthly update reports",reason2:"35 years of experience in the sector"}},gallery:{title:"Our gallery",subtitle:"Images that tell our commitment and the successes of the children we support around the world",allPhotos:"All photos",filters:{education:"Education",achievements:"Achievements",infrastructure:"Infrastructure",events:"Events",training:"Training",moments:"Moments",missions:"Missions",travels:"Travels"},noImages:"No images found",tryOtherCategory:"Try selecting another category.",share:"Share",download:"Download",of:"of",cta:{title:"Want to see more photos of our projects?",subtitle:"Follow us on social media to stay updated with new photos and stories from our projects around the world.",facebook:"Follow us on Facebook",instagram:"Follow us on Instagram"}},news:{title:"News and Updates",subtitle:"Stay updated on all our activities, projects and success stories",search:"Search news...",featured:"Featured News",inEvidence:"Featured",readAll:"Read all",noNews:"No news found",tryModifyFilters:"Try modifying search filters or selected category.",categories:{all:"All news",events:"Events",projects:"Projects",stories:"Stories",updates:"Updates"},newsletter:{title:"Stay always updated",subtitle:"Subscribe to our newsletter to receive all the news about our projects and the stories of the children we help.",placeholder:"Your email",subscribe:"Subscribe to Newsletter",privacy:"We respect your privacy. No spam, only important updates.",sending:"Sending...",successTitle:"Subscription completed!",successMessage:"Thank y
622ou for subscribing to our newsletter. We will keep you updated on our activities.",errorTitle:"Error",errorRequired:"Please enter an email address.",errorEmail:"Please enter a valid email address.",errorSending:"An error occurred. Please try again later."}},media:{title:"Our content",subtitle:"Videos, publications and materials to better understand our activities and always stay updated.",videos:"Videos",newsletter:"The Newsletter",noVideos:"No videos available at the moment.",noNewsletter:"No newsletter available at the moment.",downloadSemestrale:"Download the Semester Edition",downloadInserto:"Download the Members' Evening Insert"},transparency:{badge:"Transparency",title:"Our transparency",subtitle:"We believe in transparency as a fundamental value. Here you can consult and download all documents related to our activity and management.",downloadDocument:"Download document",documentNotAvailable:"Document not available",info:"For any additional information about our documents or to request certified copies, don't hesitate to",contactUs:"contact us"},contact:{title:"Contact Us",subtitle:"Do you have questions about our projects? Want to support a child? We are here to help you.",howToReachUs:"How to reach us",headquarters:"Headquarters",phone:"Phone",email:"Email",openingHours:"Opening hours",followUs:"Follow us on social media",sendMessage:"Send a message",form:{requestType:"Request type",fullName:"Full name",yourName:"Your name",emailAddress:"Email",emailPlaceholder:"[email protected]",phonePlaceholder:"+39 123 456 7890",subject:"Subject",subjectPlaceholder:"Message subject",message:"Message",messagePlaceholder:"Write your message here...",privacy:"I have read and accept the privacy policy and authorize the processing of my personal data.",privacyLink:"privacy policy",submit:"Send message",sendButton:"Send message",required:"*"},requestTypes:{general:"General information",adoption:"Distance support",donation:"Donations",volunteer:"Volunteering",partnership:"Partnership",media:"Press office"},contactEmail:"Contact email",forGeneralInfo:"For general information:",phoneSupport:"Phone support",monFri:"Mon-Fri 9:00-18:00:",responseTime:"Response times",responseTimeText:"We will respond within 24 hours on business days",messageSent:"Message sent!",thankYou:"Thank you for contacting us. We will respond as soon as possible."},footer:{description:"Since 1990 we take care of the existential and cultural formation of children born in difficult situations, through education and distance support.",quickLinks:"Quick Links",howToHelp:"How to Help",legalInfo:"Legal Information",whereWeOperate:"Where We Operate",links:{about:"About Us",projects:"Our Projects",stories:"Success Stories",news:"News",gallery:"Gallery",contact:"Contact"},support:{distanceSupport:"Distance Support",donations:"Donations",volunteering:"Volunteering",partnership:"Partnership",fivePerMille:"5x1000 Donation",legacy:"Testamentary Bequests"},legal:{privacy:"Privacy Policy",cookies:"Cookie Policy",terms:"Terms of Service",transparency:"Transparency",reports:"Financial Reports"},stats:{yearsExperience:"Years of experience",childrenSupported:"Children supported",graduates:"Graduates",countries:"Countries of intervention"},newsletter:{title:"Stay updated on our activities",subtitle:"Subscribe to our newsletter to receive news about projects and stories of the children we help.",placeholder:"Your email",subscribe:"Subscribe"},copyright:"© {year} Abbà ODV. All rights reserved.",madeWith:"Made with ❤️ for children around the world",legalText:"Abbà ODV - Association for the support and assistance of childhood and youth ODV | Tax Code: 97131900157 | Registered in the ODV Registry"},common:{loading:"Loading...",error:"An error occurred",retry:"Retry",close:"Close",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",search:"Search",filter:"Filter",all:"All",yes:"Yes",no:"No"}},es:{nav:{home:"Inicio",about:"Quiénes Somos",projects:"Proyectos",stories:"Historias",news:"Noticias",transparency:"Transparencia",gallery:"Galería",media:"Media",contact:"Contacto",supportNow:"Apoya Ahora"}
622,hero:{slides:[{title:"sálvame la vida, mándame a la escuela",subtitle:"Ayudamos a los niños a convertirse en adultos a través de la educación",cta:"Apoya a un niño"},{title:"Abbà es el Padre que cuida",subtitle:"de la formación humana y cultural de niños en situaciones de desventaja",cta:"Descubre nuestros proyectos"},{title:"la cultura como herramienta",subtitle:"para la elevación espiritual y humana de los niños en el mundo",cta:"Lee nuestras historias"}],supportChild:"Apoya a un niño",discoverWhatWeDo:"Descubre lo que hacemos",stats:{childrenSupported:"Niños apoyados",diplomasAchieved:"Diplomas obtenidos",countriesOfIntervention:"Países de intervención"}},about:{helpChildren:"Ayudamos a los niños a convertirse en adultos",subtitle:"Abbà se ocupa de la formación de niños en condiciones desfavorecidas",ourHistory:"Nuestra historia",historyText1:"La asociación Abbà nace en 1993 y fue pensada y deseada por el padre Giuseppe Paparone OP (1946-2021), sacerdote dominico, para acompañar a niños y jóvenes en condiciones económicas muy difíciles en su camino de crecimiento, como un padre para sus hijos.",historyText2:'El hilo conductor que ha guiado las diversas etapas de la Asociación a lo largo de los años ha sido la palabra Abbà, "padre", o mejor, "papá", en arameo: toda la vida sacerdotal del padre Giuseppe tuvo el único propósito de llevar el Amor del Padre, Abbà, a los demás.',historyText3:"Específicamente, el objetivo de la Asociación Abbà se realiza en el apoyo a la educación, desde la primaria hasta la universidad, para niños que no tienen los medios para hacerlo, para que puedan enfrentar la vida como muchos de sus compañeros en otras partes del mundo, contribuir a su formación moral y educativa y, en el futuro, al progreso de la sociedad en la que viven. La Asociación Abbà opera en varios países principalmente a través de misiones dominicanas locales.",founder:"Fundador de la Asociación Abbà",orgChart:"Organigrama",president:"Presidente",vicePresident:"Vicepresidente",board:"Consejo Directivo",yearsOfCommitment:"años de compromiso",forBetterFuture:"por un futuro mejor",features:{mission:{title:"Nuestra Misión",description:"La Asociación Abbà, fundada en 1993, ha elegido la educación como herramienta privilegiada para la defensa y promoción de niños y jóvenes."},education:{title:"Educación y Formación",description:"Creemos en la cultura como herramienta para la elevación espiritual y humana, acompañando a los niños hacia un futuro mejor."},support:{title:"Apoyo a Distancia",description:"Más de 1000 estudiantes se han graduado y más de cincuenta han obtenido un título gracias a nuestro programa de apoyo."},international:{title:"Presencia Internacional",description:"Operamos en 8 países diferentes, llevando esperanza y oportunidades educativas a los niños más necesitados."},results:{title:"Resultados Tangibles",description:"Treinta y cinco años de experiencia nos han permitido cambiar la vida de cientos de niños y sus familias."},objective:{title:"Objetivo Claro",description:"Acompañar a los niños en su desarrollo, a menudo oscurecido por graves condicionamientos locales, a través de la educación."}},whatCanYouDo:"¿Qué puedes hacer tú?",supportDescription:"El apoyo a distancia permite que cada niño tenga a alguien cerca que se ocupe de su vida incluso en ausencia de una familia o en presencia de condiciones desfavorecidas o graves dificultades económicas.",supportChildDistance:"Apoya a un niño a distancia",discoverHowToHelp:"Descubre cómo ayudar"},stories:{title:"Nuestras historias de éxito",subtitle:"Cada niño tiene una historia que contar. Estas son las voces de quienes encontraron esperanza a través de la educación.",storyOf:"La historia de",age:"Ed
622ad",years:"años",supportChildLike:"Apoya a un niño como",stats:{graduates:"Estudiantes graduados",universityGraduates:"Universitarios",countries:"Países",yearsExperience:"Años de experiencia"},cta:{title:"¡Apoya a un niño a distancia... y tú también creces!",subtitle:"Descubre cómo apoyar a un niño a distancia y cambiar una vida para siempre.",button:"Comienza tu apoyo ahora"}},projects:{title:"Nuestros proyectos en el mundo",subtitle:"Operamos en 8 países diferentes, llevando educación y esperanza a los niños más necesitados",countriesOfIntervention:"Países de intervención",childrenSupported:"Niños apoyados",activeProjects:"Proyectos activos",students:"Estudiantes",ourResults:"Nuestros resultados",supportThisProject:"Apoya este proyecto",learnMore:"Más información",worldPresence:"Nuestra presencia en el mundo",cta:{title:"¿Quieres apoyar un proyecto específico?",subtitle:"Elige el país más cercano a tu corazón y comienza a marcar la diferencia en la vida de un niño.",chooseProject:"Elige un proyecto",generalDonation:"Haz una donación general"},inquiryForm:{title:"Solicitar información",projectLabel:"Proyecto:",nameLabel:"Nombre completo",namePlaceholder:"Tu nombre completo",emailLabel:"Correo electrónico",emailPlaceholder:"[email protected]",phoneLabel:"Teléfono",phonePlaceholder:"+34 123 456 789",messageLabel:"Mensaje",messagePlaceholder:"Escribe tu mensaje aquí...",optional:"opcional",defaultMessage:"Estoy interesado/a en apoyar a un niño en {country}. Me gustaría recibir más información.",submit:"Enviar solicitud",sending:"Enviando...",cancel:"Cancelar",close:"Cerrar",successTitle:"¡Solicitud enviada!",successMessage:"Tu solicitud de información sobre el proyecto en {country} ha sido enviada con éxito. Te contactaremos pronto.",errorTitle:"Error",errorRequired:"Por favor completa nombre y correo electrónico.",errorEmail:"Por favor ingresa un correo electrónico válido.",errorSending:"Ocurrió un error al enviar la solicitud. Por favor intenta más tarde."},countries:{brazil:{name:"Brasil",city:"Goiânia",since:"1995",description:"Apoyamos a niños y jóvenes de familias extremadamente pobres, residentes principalmente en los barrios marginales de la ciudad, ofreciéndoles acompañamiento humano y educativo.",achievements:["100+ graduados de secundaria","12 universitarios","2 maestrías"],fullDescription:`ABBÀ ODV está presente en la misión de Goiânia desde 1995.
623
624Goiânia es la capital del estado brasileño de Goiás, ubicado en la región central de Brasil; tiene una superficie de 729 km² y una población de aproximadamente 1,2 millones de habitantes.
625
626Aunque no todos en Goiânia viven en "favelas", el panorama es el de una ciudad agobiada por una aguda disparidad socioeconómica. La inflación – que, junto con la concentración de la riqueza nacional en manos de unos pocos, ha hecho que este estado de cosas sea estable a lo largo de los años – significa que es difícil para las categorías desfavorecidas mejorar sus condiciones de vida utilizando solo sus propias fuerzas.
627
628Los niños y jóvenes asistidos por Abbà provienen de familias extremadamente pobres, residentes principalmente en los barrios marginales de la ciudad. Muchos son hijos de jóvenes drogadictos o alcohólicos reportados por los servicios sociales y viven temporalmente con abuelas, tías o vecinas mientras esperan regresar a sus familias si sus padres logran desintoxicarse.
629
630Gracias a la ayuda que reciben de Abbà, los niños pueden ir a la escuela y tener todo el material necesario. Un pequeño porcentaje de la ayuda se utiliza para la compra de ropa, medicamentos u otras necesidades especiales. En casos de extrema pobreza familiar, las propias monjas brindan ayuda adicional complementando lo que reciben de Abbà, para evitar que los menores abandonen sus estudios para destinar a la familia lo que estaba previsto para ellos.
631
632El dinero también se distribuye a las familias en varias cuotas durante el año, para verificar que el niño esté inscrito en la escuela y luego asista regularmente a las clases.
633
634En Goiânia, Abbà colaboró muy estrechamente hasta 2022 con Sor Lucía Delvecchio (Orden de las Hermanas Dominicas del Santo Rosario), quien siguió el Proyecto tanto en la parte económica 
634y de gestión, como en el seguimiento de los niños y jóvenes, acudiendo a menudo personalmente a las diversas regiones donde vivían; la Asociación llegó a apoyar un máximo de 119 jóvenes, casi todos graduados de secundaria, algunos incluso universitarios.
635
636Entre los logros más hermosos: Sanoete, Ingeniero Civil, trabaja en una importante empresa constructora de la ciudad; Fabiana, graduada en Administración, ganó un concurso público federal; Vanderleia y Juliana, ambas graduadas en Ciencias de Enfermería, trabajan en hospitales.
637
638En 2022, Sor Lucía lamentablemente tuvo que retirarse por motivos de edad y salud, y el Proyecto vio una suspensión temporal para luego reanudarse en 2024 (tras la difícil búsqueda de una nueva coordinadora local, Sor Vania de Oliveira) con 35 niños/jóvenes, entre ellos 5 estudiantes universitarios.
639
640Siempre se ha tratado de involucrar, en la medida de lo posible, a las familias de los jóvenes, para que pudieran convertirse en preciadas aliadas en su recorrido educativo y escolar.
641
642Las dificultades son muchas, pero se ha notado cierto entusiasmo donde, antes de la llegada de las Hermanas, la escuela a menudo no tenía valor y en los rostros solo se leía miseria y tristeza.`,successStories:["Sanoete: Ingeniero Civil, trabaja en una importante empresa constructora","Fabiana: Graduada en Administración, ganadora de concurso público federal","Vanderleia y Juliana: Graduadas en Ciencias de Enfermería, empleadas en hospitales"]},cameroon:{name:"Camerún",city:"Bertoua – Djangané – Yaoundé – Balikumbat",since:"1995",description:"Apoyamos a niños y jóvenes de familias en condiciones socioeconómicas muy difíciles. En muchos casos se trata de familias monoparentales con un solo ingreso o de niños huérfanos por el SIDA acogidos por un pariente o conocido.",achievements:["200+ graduados de secundaria","30 universitarios","2 maestrías"],fullDescription:`ABBÀ ODV ha estado realizando varios proyectos en Camerún desde 1995: en Yaoundé (la capital), Bertoua, Djangané y Balikumbat, la Asociación lleva a cabo varios programas de apoyo a distancia para niños desde el jardín de infancia hasta la escuela secundaria. También hay becas universitarias o parauniversitarias disponibles para los estudiantes más merecedores.
643
644Todos estos proyectos son realizados por Abbà en colaboración con las Hermanas Dominicas de la Beata Imelda.
645
646En cuanto a la escolarización en Camerún, el factor económico sigue siendo la principal limitación que impide a las familias enviar a sus hijos a la escuela. La situación económica del país es muy difícil, con un nivel muy alto de desempleo y emigración (especialmente hacia Francia e Italia). Hasta 1993, el gobierno pagaba el 55% de las tasas escolares (el 45% restante correspondía a las familias), pero con la actual crisis mundial, las ayudas se han vuelto esporádicas y mucho menores.
647
648La ayuda de Abbà es por tanto muy importante porque permite a las Hermanas seguir a un niño desde el jardín de infancia hasta el certificado de estudios primarios, el diploma de primer ciclo (general o profesional), o el bachillerato – según el itinerario escolar – y por tanto criarlo y formarlo humanamente, sacándolo de la calle y ofreciéndole la oportunidad de asistir a la escuela y tener al menos un nivel mínimo de preparación. Un problema significativo es a menudo la falta de libros para muchos estudiantes (cada vez más caros debido al aumento del costo de vida) que, dadas las clases siempre muy numerosas, hace aún más difícil para los niños seguir las lecciones con provecho y, como es fácil imaginar, ralentiza el proceso de aprendizaje.
649
650A estos problemas hay que añadir el hecho de que la propagación del SIDA ha provocado un aumento del número de niños sin familia, que en la mayoría de los casos son acogidos por abuelos, tíos, parientes lejanos o vecinos que tienen otros hijos o nietos y a menudo una situación económica ya difícil a sus espaldas. Otro flagelo local es el "paludismo", o malaria, que afecta en mayor o menor medida a todos los pequeños cameruneses y ya se considera una enfermedad endémica.
651
652Particularmente en la capital, el alcoholismo, la violencia física, el uso de drogas, etc. también empujan a muchos jóvenes a abandonar sus hogares y pueblos y encontrar "refugio" en las calles de la ciudad, en espacios públicos, convirtién
652dose así en presa de bandas criminales o pedófilos. El trabajo de Abbà es fundamental para prevenir estas situaciones; la inscripción en un programa de estudios contribuye, aunque mínimamente, a limitar consecuencias desastrosas.
653
654La situación camerunesa es por tanto uno de los desafíos más difíciles, cuyos buenos resultados dan aún más alegría.`,successStories:["Blanche (Yaoundé): Graduada en Medicina, trabaja en hospital y visita periódicamente a los niños asistidos por la misión","Justine (Djangané): Diploma en Agronomía, inició una granja local que ofrece formación y trabajo","Damien (Bertoua): Diploma en Agronomía, se formó para ser Gendarme","Marinese (Balikumbat): Diploma de profesora, ahora certificada para enseñar"]},ivoryCoast:{name:"Costa de Marfil",city:"Man",since:"2022",description:"Apoyamos a niños y jóvenes de aldeas extremadamente modestas, permitiéndoles asistir a la escuela con el material escolar necesario y ofreciéndoles acompañamiento educativo.",achievements:["Material escolar básico","Servicio de ayuda con tareas y tutoría","Servicio de moto-taxi para estudiantes lejanos"],fullDescription:`El proyecto en Costa de Marfil nació a finales de 2022 en Man e involucra a los tres pueblos de Siebly, Gbeibly y Bahtiebly.
655
656Capital del distrito de Montagnes, Man es una ciudad rural enclavada en las cumbres de los montes Toura, en el corazón del campo de Costa de Marfil. Está rodeada de granjas y plantaciones de cacao hasta donde alcanza la vista. También son famosos sus bosques de bambú y sus cascadas naturales.
657
658En este proyecto, Abbà apoya a una treintena de niños y jóvenes que no podían asistir a la escuela regularmente debido a las malas condiciones económicas de su familia. El apoyo de Abbà es fundamental ya que se encontró que muchos estudiantes, particularmente en el pueblo de Siebly, ni siquiera tenían material escolar básico.
659
660Por lo tanto, se proporcionan las herramientas didácticas necesarias: libros esenciales de francés, inglés y matemáticas, pizarras pequeñas y cajas de tiza. En colaboración con el equipo de trabajo y los profesores locales, se estableció la creación de grupos de estudio para maximizar el uso de los libros ofrecidos, promoviendo un estudio profundo y colaborativo.
661
662El objetivo final es abordar los desafíos educativos locales creando un entorno de aprendizaje interactivo y accesible para todos.
663
664Por esta razón, el Proyecto también prevé que voluntarios locales competentes (incluidos antiguos profesores jubilados) sigan a los pequeños beneficiarios en sus tareas, con especial atención al francés, las matemáticas, las estrategias de lectura, y para los niños que viven muy lejos de las escuelas, se ha organizado un servicio de moto-taxi (un vehículo rápido y económico muy utilizado en África).
665
666El coordinador del Proyecto en Man es Florent Seahe, ciudadano marfileñ
666o al frente de la ONG Ansê C.I., que comparte el proyecto educativo de Abbà y conoce muy bien la situación y las necesidades locales.`,successStories:[]},philippines:{name:"Filipinas",city:"Calabanga – Manila – Rosario",since:"2002",description:"Apoyamos a niños y jóvenes de familias en dificultades, residentes en barrios marginales, en casas de materiales simples o en áreas rurales, ofreciéndoles acompañamiento humano y educativo.",achievements:["50+ graduados de secundaria","20+ universitarios"],fullDescription:`El apoyo de Abbà en Filipinas llega a cuatro localidades: Manila-San Juan; Manila-Quezon City; Calabanga y Rosario. La actividad se realiza en colaboración con las Hermanas Dominicas de la Beata Imelda.
667
668Estos proyectos funcionan particularmente bien gracias a la precisión y puntualidad de las coordinadoras locales y también al amor de los filipinos por la educación y la cultura.
669
670Aunque la tasa de escolarización en Filipinas es alta en comparación con el promedio de los Países Emergentes, hay cierta deserción escolar causada por la necesidad de trabajar.
671
672El de Manila-San Juan es el primer proyecto realizado en 2002. Abbà apoya aquí a una treintena de jóvenes. "San Juan" es una contracción del nombre tradicional de la ciudad, "San Juan del Monte". Es el municipio más pequeño de Metro Manila y por extensión territorial incluso de Filipinas, pero es rico en historia y cultura. Aquí la comunidad de Hermanas con la ayuda de Abbà promueve actividades educativo-formativas para jóvenes cuyas condiciones económicas no permiten una escolarización adecuada. Ofrece además un programa de alimentación y acogida diurna (day care) para una veintena de niños en edad preescolar, denominado "Batang Pinoy" (niños filipinos).
673
674También el proyecto en Manila-Quezon City apoya a una treintena de niños y jóvenes y está estructurado de la misma manera. Quezon City es una ciudad moderna nacida a principios del siglo XX. Muchos niños de este Proyecto provienen de áreas de ocupantes ilegales, y sus padres, para sobrevivir, trabajan como recolectores (rebuscando en basureros) para revender materiales recuperados.
675
676En Calabanga comenzó, en 1991, la actividad de las Hermanas Dominicas en Filipinas. En 1993, fundaron la "San Lorenzo Ruiz Catholic School", renombrada en 2001 "Dominican School of Calabanga". En colaboración con la comunidad imeldina, Abbà apoya aquí a una cuarentena de jóvenes de familias en dificultades. Durante varios años, Abbà también ha patrocinado un curso de Alfabetización Informática para los niños.
677
678Finalmente, en Rosario, un vibrante municipio agrícola en la región de Ilocos, Abbà apoya a unos quince jóvenes particularmente necesitados: sus padres realizan trabajos muy humildes y a menudo tienen problemas de salud. Los fondos se utilizan para cubrir los gastos escolares (tasas, material, transporte). Parte de los gastos queda a cargo de las familias, para promover una participación directa y evitar una dependencia excesiva de las ayudas externas.`,successStories:[]},italy:{name:"Italia",city:"Milán (FaTA ODV – Qiqajon ODV)",since:"2015",description:'A través de estos "mini-proyectos" apoyamos los gastos de educación de niños y jóvenes alejados de sus familias de origen o en riesgo de desviación, acogidos en las estructuras milanesas de FaTA y Qiqajon.',achievements:["Unos ochenta niños y jóvenes apoyados cada año"],fullDescription:`En 2015, Abbà decidió ampliar sus actividades, iniciando un primer proyecto en el territorio local. A la luz de la experiencia adquirida a lo largo de los años y del cambio socioeconómico del país, Abbà consideró importante ser un factor de promoción social de la infancia y la juventud también en Italia, a través de la asociación con una organización local, FaTA ODV, que comparte los valores y el proyecto educativo de Abbà.
679
680FaTA (Familias de Acogida Temporal) es una asociación que gestiona 3 comunidades educativas y un semi-internado donde se acogen niños y adolescentes que el Tribunal de Menores aleja de su familia de origen por maltrato, violencia o grave malestar, y menores enviados por los Servicios Sociales por estar en riesgo de marginalidad y desviación.
681
682El papel de FaTA, al igual que el de Abbà en muchos países donde opera, es acompañar al niño o joven desde una situación de grave malestar a una situación de cuidado, tutela y promoción.
683
684Abbà se ha comprometido a aportar una contribución financiera para cubrir los gastos relativos a los libros y el material escolar de los niños y jóvenes acogidos, aproximadamente una treintena.
685
686Un segundo proyecto en el territorio local se inició en 2024, con el apoyo a la formación de los niños y jóvenes de Qiqajon, que, al igual que FaTA, comparte los valores y el proyecto educativo de Abbà.
687
688Qiqajon (Asociación Franciscana) es una comunidad residencial de familias que quiere «ser un recurso para hacer frente a las diversas situaciones de vida de los menores acogidos». En su interior se encuentra la comunidad educativa Momo, que acoge a 5 menores de edades comprendidas entre 4 y 13 años alejados de sus familias por orden del Tribunal de Menores u hospedados con el consentimiento de la familia de acuerdo con los Servicios Sociales de referencia.
689
690Qiqajon también alberga el centro diurno Giona, que se propone responder a las necesidades de chicos/as que cursan la escuela secundaria (actualmente 45/50) que necesitan apoyo educativo en un ambiente protegido.
691
692Abbà se ha comprometido a apoyar los gastos escolares de los niños de la comunidad educativa Momo y las actividades deportivas, igualmente educativas, del centro diurno Giona.`,successStories:[]},mexico:{name:"México",city:"San Luis Potosí",since:"2019",description:"Ofrecemos acompañamiento escolar y humano a un grupo de niños y jóvenes de la difícil zona de Peñasquito, en las afueras de la ciudad de San Luis Potosí.",achievements:["10+ graduados de secundaria","2 universitarios"],fullDescription:`El Proyecto nació en 2019 en asociación con la comunidad imeldina en México, y ofrece acompañamiento escolar y humano a un grupo de niños y jóvenes de la difícil zona de Peñasquito, en las afueras de la ciudad de San Luis Potosí.
693
694Se trata de un área pobre, con mucha violencia, y lamentablemente marcada por el trabajo infantil, particularmente en el sector de la fabricación de ladrillos. Aquí, numerosos niños y jóvenes se ven obligados a trabajar para proporcionar apoyo financiero a sus familias, en detrimento de la asistencia escolar.
695
696El Proyecto tiene como objetivo erradicar esta tendencia, ofreciendo a los jóvenes estudiantes una valiosa contribución para cubrir los gastos escolares pero también un acompañamiento en el crecimiento humano y espiritual, según el objetivo de Abbà.
697
698El Proyecto involucra a una treintena de niños y jóvenes desde primaria hasta la universidad. De hecho, también hay becas universitarias disponibles para los estudiantes meritorios.`,successStories:["Yazmin: Primera graduada gracias a Abbà en Administración y gestión de Empresas","Gerardo: Graduado en Ingeniería industrial"]},pakistan:{name:"Pakistán",city:"Lahore",since:"2024",description:"A través de este proyecto grupal, promovemos la escolarización de un centenar de niños y jóvenes de Lahore.",achievements:["10+ graduados de secundaria","2 universitarios"],fullDescription:`En Pakistán, en Okara, Abbà apoyó desde 2006 hasta 2021 a las estudiantes del primer colegio universitario femenino de la región de Punjab, fundado por un misionero dominico, el Padre Aldino Amato; un apoyo importantísimo para las jóvenes pakistaníes, ya que su país está entre los últimos 10 del mundo en educación femenina. Muchas jóvenes se graduaron del colegio a lo largo de los años y la mayoría de ellas trabaja ahora como profesora local. El proyecto en Okara lamentablemente tuvo que concluir en 2021 con el fallecimiento del Misionero; sin embargo, las hermanas coordinadoras de Okara, enviadas a Lahore, abrieron allí una nueva Misión en su memoria, que desde 2024 nos complace apoyar.
699
700En Gohawa, distrito de Lahore, la hermana Najma y la hermana Balqees, al frente de la Aldino's Charity Foundation, fundaron una escuela abierta a todos, la Kindergarten School of Lahore (KSL). En Pakistán, el 70% de los menores no tiene educación. La educación femenina normalmente no se contempla.
701
702A través de esta obra se pretende, por tanto, «elevar las áreas atrasadas del país proporcionando una educación de calida
702d basada en valores de igualdad y transparencia», que acoja a todos y con especial atención hacia las niñas, para las cuales también se han previsto cursos superiores.
703
704Los estudiantes que con la contribución de Abbà pueden asistir a la escuela son un centenar, en su mayoría cristianos pero también musulmanes, y provienen principalmente de familias pobres y del trabajo en hornos de ladrillos.
705
706Otras dificultades que los estudiantes pakistaníes deben enfrentar además de las socioeconómicas son las relacionadas con el clima, con temperaturas que en verano alcanzan los 50°C. Para hacer frente a la situación, las Hermanas organizan campamentos de verano matutinos (de 7 a 9:30 de la mañana) para permitir a los alumnos seguir estudiando. La Región además es frecuentemente afectada por graves inundaciones que destruyen campos, hogares y ganado, dificultando que las familias satisfagan incluso las necesidades básicas.
707
708La hermana Balqees afirma que la colaboración de Abbà les permite «mantener abiertas las puertas de la educación a los niños desfavorecidos, incluso en medio de tales crisis.»`,successStories:[]},congo:{name:"Rep. Dem. del Congo",city:"Kilomoni - Uvira",since:"2019",description:'Apoyamos a niños del muy pobre barrio de Kilomoni (Uvira), ofreciéndoles la posibilidad de asistir al excelente complejo escolar "Annunciata Cocchetti".',achievements:["Apoyo a 25 niños","Donación de un autobús"],fullDescription:`En el barrio de Kilomoni, situado al norte de la ciudad de Uvira, a orillas del lago Tanganica, Abbà ODV apoya desde 2019 a veinticinco niños, dándoles la posibilidad de asistir a la escuela de infancia y primaria. La Asociación también donó a la Misión un autobús que ha permitido resolver las dificultades relacionadas con la distancia de los institutos.
709
710En Kilomoni, las misioneras Doroteas construyeron primero la escuela de infancia (2013), luego la escuela primaria (2022) y finalmente la escuela secundaria con orientación comercial y científica (2023).
711
712Se trata de una zona en la que viven aproximadamente 500.000 personas, en viviendas sencillas construidas con ladrillos cocidos o tierra apisonada. La población está constituida principalmente por familias desplazadas de Burundi a causa de la guerra, o de las montañas circundantes, y su actividad económica se basa casi exclusivamente en el pequeño comercio a lo largo de la carretera principal, en los barrios o con el vecino Burundi, mientras que los campos de cultivo están lejos y son difícilmente accesibles también debido a las frecuentes inundaciones que afectan la zona.
713
714Referente local de este Proyecto es sor Giuliana Fadani, directora del "Complejo Escolar Madre Annunciata Cocchetti". Sor Giuliana trabaja en Congo, en el sector escolar, desde hace treinta años, y ahora dirige esta nueva estructura. Es un complejo que responde a la solicitud de muchas familias que desean enviar aquí a sus hijos, seguros de recibir una asistencia y una instrucción de buen nivel.
715
716Lamentablemente, muchos son los problemas a la orden del día en la República Democrática del Congo: desde las guerras hasta los desórdenes naturales y sanitarios (malaria).`,successStories:[]}}},faq:{sectionTitle:"Sección FAQ",title:"Todo lo que quieres saber",questions:[{question:"¿Cuánto cuesta un apoyo a distancia?",answer:"El costo se calcula en función de la necesidad, situación personal, situación del país y edad."},{question:"¿El compromiso que decido asumir hacia un niño tiene una duración?",answer:"Al asumir un compromiso educativo y formativo frente a una dificultad, la duración es a medio/largo plazo y requiere el tiempo necesario para los estudios hasta la inserción laboral. Sin embargo, el colaborador puede interrumpir la contribución en cualquier momento."},{question:"¿El niño con el que me comprometo podría ser reemplazado?",answer:"Es posible. Esta es una situación que puede ocurrir cuando, por fuerza mayor (como el desplazamiento del núcleo fam
716iliar por necesidades laborales), resulta problemático si no imposible seguir al sujeto asistido y rastrear la contribución proporcionada."},{question:"¿Qué información recibiré sobre el niño y con qué frecuencia?",answer:"Las actualizaciones sobre la situación familiar, social y escolar del niño se proporcionan dos veces al año, y como cualquier asociación que se ocupa de apoyo, se proporciona a los colaboradores información sobre el país y los corresponsales locales a través de boletines y noticias asociativas."},{question:"¿Cómo puedo comunicarme con el beneficiario?",answer:`A través de sus oficinas de Milán, la Asociación permite a los colaboradores que lo deseen corresponder con el menor enviando su correspondencia a la sede del socio local de la asociación que la entregará y posiblemente la traducirá al niño.
717
718Abbà requiere informes regulares y detallados de sus corresponsales locales, tanto desde el punto de vista educativo como económico, para luego proporcionar información a los colaboradores. Esto sucede semestralmente a través de un formulario de rendición de cuentas económico con la descripción de los gastos de gestión del proyecto incurridos por el socio en el período junto con información sobre la vida familiar y el progreso escolar del niño.`},{question:"¿Quién controla el progreso local del apoyo a distancia?",answer:"Además del contacto a través de canales ordinarios diarios, teléfono, correspondencia, con corresponsales locales en varios países, representantes de la Asociación van periódicamente al lugar para verificar su trabajo, conocer las realidades y problemas sociales y familiares para beneficio de los beneficiarios e información a los colaboradores."}]},donate:{title:"Apoya a nuestros niños",subtitle:"Tu donación puede cambiar la vida de un niño. Elige cómo ayudar a nuestros proyectos educativos en el mundo.",singleDonation:"Donación Única",monthlyDonation:"Donación Mensual",chooseAmount:"Elige un importe",customAmount:"O ingresa un importe personalizado",customAmountPlaceholder:"Importe personalizado",whereDonation:"¿Dónde quieres que vaya tu donación?",donateNow:"Dona",perMonth:"al mes",now:"ahora",selectAmount:"Selecciona un importe",securePayment:"Pago seguro vía Stripe",taxDeductible:"Tu donación es deducible de impuestos",causes:{general:{title:"Apoyo General",description:"Ayuda donde más se necesita"},education:{title:"Educación",description:"Libros, materiales escolares y formación"},infrastructure:{title:"Infraestructura",description:"Construcción y mantenimiento de escuelas"}},amounts:{25:"Contribución a gastos escolares de un niño",50:"Contribución a gastos escolares de un niño",100:"Contribución de 1 semestre de jardín de infantes para un niño",200:"Cobertura de 1 año de jardín de infantes para un niño"},impact:{title:"El impacto de tu donación",with25:"Con 25€ - 50€",with25desc:"Proporcionas parte del material escolar para 1 niño",with100:"Con 100€",with100desc:"Apoyas completamente la educación de un niño de jardín de infantes por 1 semestre",with200:"Con 200€",with200desc:"Apoyas completamente la educación de un niño de jardín de infantes por 1 año"},testimonial:{title:"Un testimonio",text:"Gracias a las donaciones recibidas, María de São Paulo pudo completar la escuela secundaria y ahora asiste a la universidad de ingeniería. Tu generosidad ha cambiado su futuro."},howToSupport:{title:"Cómo apoyar a Abbà",specialProjects:"Proyectos Especiales: ¡Regalos solidarios!",description:'Abbà te ofrece varias formas de demostrar tu apoyo y compromiso con nuestros proyectos y niños necesitados del mundo: no solo apoyo a distancia sino también donaciones en ocasiones de bautismos, comuniones, graduaciones y bodas ("recuerdos solidarios") o para iniciativas dirigidas a necesidades específicas.',legacy:"También es posible realizar donaciones o legados a favor de nuestros niños.",supportWith:"Puedes apoyar a Abbà con:",methods:{check:"Cheque a nombre de Abbà",bank:"Transferencia bancaria a Intesa Sanpaolo: IBAN IT18 X030 69096 06100 000015544 a nombre de ABBA' ASSOCIAZIONE PER IL SOSTEGNO E L'ASSISTENZA ALL'INFANZIA",postal:"Pago a cuenta corriente postal n. 27382209 a nombre de Abbà",paypal:"Pago vía PayPal ([email protected])"}},whyDonate:{title:"Por qué donar con nosotros",reason1:"Informes de actualización semestrales",reason2:"35 años de experiencia en el sector"}},gallery:{title:"Nuestra galería",subtitle:"Imágenes que cuentan nuestro compromiso y los éxitos de los niños que apoyamos en el mund
718o",allPhotos:"Todas las fotos",filters:{education:"Educación",achievements:"Logros",infrastructure:"Infraestructura",events:"Eventos",training:"Formación",moments:"Momentos",missions:"Misiones",travels:"Viajes"},noImages:"No se encontraron imágenes",tryOtherCategory:"Intenta seleccionar otra categoría.",share:"Compartir",download:"Descargar",of:"de",cta:{title:"¿Quieres ver más fotos de nuestros proyectos?",subtitle:"Síguenos en redes sociales para estar al día con nuevas fotos e historias de nuestros proyectos en el mundo.",facebook:"Síguenos en Facebook",instagram:"Síguenos en Instagram"}},news:{title:"Noticias y Actualizaciones",subtitle:"Mantente al día sobre todas nuestras actividades, proyectos e historias de éxito",search:"Buscar noticias...",featured:"Noticias Destacadas",inEvidence:"Destacado",readAll:"Leer todo",noNews:"No se encontraron noticias",tryModifyFilters:"Intenta modificar los filtros de búsqueda o la categoría seleccionada.",categories:{all:"Todas las noticias",events:"Eventos",projects:"Proyectos",stories:"Historias",updates:"Actualizaciones"},newsletter:{title:"Mantente siempre actualizado",subtitle:"Suscríbete a nuestro boletín para recibir todas las novedades sobre nuestros proyectos y las historias de los niños que ayudamos.",placeholder:"Tu email",subscribe:"Suscribirse al Boletín",privacy:"Respetamos tu privacidad. Sin spam, solo actualizaciones importantes.",sending:"Enviando...",successTitle:"¡Suscripción completada!",successMessage:"Gracias por suscribirte a nuestro boletín. Te mantendremos actualizado sobre nuestras actividades.",errorTitle:"Error",errorRequired:"Por favor ingresa un correo electrónico.",errorEmail:"Por favor ingresa un correo electrónico válido.",errorSending:"Ocurrió un error. Por favor intenta más tarde."}},media:{title:"Nuestros contenidos",subtitle:"Videos, publicaciones y materiales para conocer mejor nuestras actividades y estar siempre actualizado.",videos:"Videos",newsletter:"El Boletín",noVideos:"No hay videos disponibles en este momento.",noNewsletter:"No hay boletín disponible en este momento.",downloadSemestrale:"Descargar la Edición Semestral",downloadInserto:"Descargar el Inserto de la Velada de Socios"},transparency:{badge:"Transparencia",title:"Nuestra transparencia",subtitle:"Creemos en la transparencia como valor fundamental. Aquí puedes consultar y descargar todos los documentos relacionados con nuestra actividad y gestión.",downloadDocument:"Descargar documento",documentNotAvailable:"Documento no disponible",info:"Para cualquier información adicional sobre nuestros documentos o para solicitar copias certificadas, no dudes en",contactUs:"contactarnos"},contact:{title:"Contáctanos",subtitle:"¿Tienes preguntas sobre nuestros proyectos? ¿Quieres apoyar a un niño? Estamos aquí para ayudarte.",howToReachUs:"Cómo encontrarnos",headquarters:"Sede Principal",phone:"Teléfono",email:"Email",openingHours:"Horario de apertura",followUs:"Síguenos en redes sociales",sendMessage:"Enviar un mensaje",form:{requestType:"Tipo de solicitud",fullName:"Nombre completo",yourName:"Tu nombre",emailAddress:"Email",emailPlaceholder:"[email protected]",phonePlaceholder:"+39 123 456 7890",subject:"Asunto",subjectPlaceholder:"Asunto del mensaje",message:"Mensaje",messagePlaceholder:"Escribe tu mensaje aquí...",privacy:"He leído y acepto la política de privacidad y autorizo el tratamiento de mis datos personales.",privacyLink:"política de privacidad",submit:"Enviar mensaje",sendButton:"Enviar mensaje",required:"*"},requestTypes:{general:"Información general",adoption:"Apoyo a distancia",donation:"Donaciones",volunteer:"Voluntariado",partnership:"Asociación",media:"Oficina de prensa"},contactEmail:"Email de contacto",forGeneralInfo:"Para información general:",phoneSupport:"Soporte telefónico",monFri:"Lun-Vie 9:00-18:00:",responseTime:"Tiempos de respuesta",responseTimeText:"Responderemos dentro de 24 horas en días laborables",messageSent:"¡Mensaje enviado!",thankYou:"Gracias por contactarnos. Responderemos lo antes posible."},footer:{description:"Desde 1990 nos ocupamos de la formación existencial y cultural de niños nacidos en situaciones difíciles, a través de la educación y el apoyo a distancia.",quickLinks:"Enlaces Rápidos",howToHelp:"Cómo Ayudar",legalInfo:"Información Legal",whereWeOperate:"Dónde Operamos",links:{about:"Quiénes Somos",projects:"Nuestros Proyectos",stories:"Historias de Éxito",news:"Noticias",gallery:"Galería",contact:"Contacto"},support:{distanceSupport:"Apoyo a Distancia",donations:"Donaciones",volunteering:"Voluntariado",partnership:"Asociación",fivePerMille:"Donación 5x1000",legacy:"Legados Testamentarios"},legal:{privacy:"Política de Privacidad",cookies:"Política de Cookies",terms:"Términos de Servicio",transparency:"Transparencia",reports:"Informes Financieros"},stats:{yearsExperience:"Años de experiencia",childrenSupported:"Niños apoyados",graduates:"Graduados",countries:"Paí
718ses de intervención"},newsletter:{title:"Mantente actualizado sobre nuestras actividades",subtitle:"Suscríbete a nuestro boletín para recibir noticias sobre proyectos e historias de los niños que ayudamos.",placeholder:"Tu email",subscribe:"Suscribirse"},copyright:"© {year} Abbà ODV. Todos los derechos reservados.",madeWith:"Hecho con ❤️ para los niños del mundo",legalText:"Abbà ODV - Asociación para el apoyo y asistencia a la infancia y juventud ODV | Código Fiscal: 97131900157 | Inscrita en el Registro de ODV"},common:{loading:"Cargando...",error:"Se produjo un error",retry:"Reintentar",close:"Cerrar",save:"Guardar",cancel:"Cancelar",delete:"Eliminar",edit:"Editar",add:"Añadir",search:"Buscar",filter:"Filtrar",all:"Todos",yes:"Sí",no:"No"}},pt:{nav:{home:"Início",about:"Sobre Nós",projects:"Projetos",stories:"Histórias",news:"Notícias",transparency:"Transparência",gallery:"Galeria",media:"Mídia",contact:"Contato",supportNow:"Apoie Agora"},hero:{slides:[{title:"salve minha vida, mande-me para a escola",subtitle:"Ajudamos crianças a se tornarem adultos através da educação",cta:"Apoie uma criança"},{title:"Abbà é o Pai que cuida",subtitle:"da formação humana e cultural de crianças em situações de desvantagem",cta:"Descubra nossos projetos"},{title:"a cultura como ferramenta",subtitle:"para a elevação espiritual e humana das crianças no mundo",cta:"Leia nossas histórias"}],supportChild:"Apoie uma criança",discoverWhatWeDo:"Descubra o que fazemos",stats:{childrenSupported:"Crianças apoiadas",diplomasAchieved:"Diplomas obtidos",countriesOfIntervention:"Países de atuação"}},about:{helpChildren:"Ajudamos crianças a se tornarem adultos",subtitle:"Abbà cuida da formação de crianças em condições desfavorecidas",ourHistory:"Nossa história",historyText1:"A associação Abbà nasceu em 1993 e foi pensada e desejada pelo padre Giuseppe Paparone OP (1946-2021), sacerdote dominicano, para acompanhar crianças e jovens em condições econômicas muito difíceis em seu caminho de crescimento, como um pai para seus filhos.",historyText2:'O fio condutor que guiou as diversas etapas da Associação ao longo dos anos foi a palavra Abbà, "pai", ou melhor, "papai", em aramaico: toda a vida sacerdotal do padre Giuseppe teve o único propósito de levar o Amor do Pai, Abbà, aos outros.',historyText3:"Especificamente, o objetivo da Associação Abbà se realiza no apoio à educação, do ensino fundamental à universidade, para crianças que não têm os meios para fazê-lo, para que possam enfrentar a vida como muitos de seus colegas em outras partes do mundo, contribuir para sua formação moral e educacional e, no futuro, para o progresso da sociedade em que vivem. A Associação Abbà opera em vários países principalmente através de missões dominicanas locais.",founder:"Fundador da Associação Abbà",orgChart:"Organograma",president:"Presidente",vicePresident:"Vice-Presidente",board:"Conselho Diretivo",yearsOfCommitment:"anos de compromisso",forBetterFuture:"por um futuro melhor",features:{mission:{title:"Nossa Missão",description:"A Associação Abbà, fundada em 1993, escolheu a educação como ferramenta privilegiada para a defesa e promoção de crianças e jovens."},education:{title:"Educação e Formação",description:"Acreditamos na cultura como ferramenta para a elevação espiritual e humana, acompanhando crianças rumo a um futuro melhor."},support:{title:"Apoio a Distância",description:"Mais de 1000 estudantes se formaram e mais de cinquenta obtiveram diploma universitário graças ao nosso programa de apoio."},international:{title:"Presença Internacional",description:"Operamos em 8 países diferentes, levando esperança e oportunidades educacionais às crianças mais necessitadas."},results:{title:"Resultados Tangíveis",description:"Trinta e cinco anos de experiência nos permitiram mudar a vida de centenas de crianças e suas famílias."},objective:{title:"Objetivo Claro",description:"Acompanhar crianças em seu desenvolvimento, muitas vezes obscurecido por graves condicionamentos locais, através da educação."}},whatCanYouDo:"O que você pode fazer?",supportDescription:"O apoio a distância permite que cada criança tenha alguém próximo que cuide de sua vida mesmo na ausência de uma família ou na presença de condições desfavorecidas ou graves dificuldades econômicas.",supportChildDistance:"Apoie uma criança a distância",discoverHowToHelp:"Descubra como ajudar"},stories:{title:"Nossas histórias de sucesso",subtitle:"Cada criança tem uma história para contar. Estas são as vozes daqueles que encontraram esperança através da educação.",storyOf:"A história de",age:"Idade",years:"anos",supportChildLike:"Apoie uma criança como",stats:{graduates:"Estudantes formados",universityGraduates:"Universitários",countries:"Paí
718ses",yearsExperience:"Anos de experiência"},cta:{title:"Apoie uma criança a distância... e você também cresce!",subtitle:"Descubra como apoiar uma criança a distância e mudar uma vida para sempre.",button:"Comece seu apoio agora"}},projects:{title:"Nossos projetos no mundo",subtitle:"Operamos em 8 países diferentes, levando educação e esperança às crianças mais necessitadas",countriesOfIntervention:"Países de atuação",childrenSupported:"Crianças apoiadas",activeProjects:"Projetos ativos",students:"Estudantes",ourResults:"Nossos resultados",supportThisProject:"Apoie este projeto",learnMore:"Saiba mais",worldPresence:"Nossa presença no mundo",cta:{title:"Quer apoiar um projeto específico?",subtitle:"Escolha o país mais próximo do seu coração e comece a fazer a diferença na vida de uma criança.",chooseProject:"Escolha um projeto",generalDonation:"Faça uma doação geral"},inquiryForm:{title:"Solicitar informações",projectLabel:"Projeto:",nameLabel:"Nome completo",namePlaceholder:"Seu nome completo",emailLabel:"E-mail",emailPlaceholder:"[email protected]",phoneLabel:"Telefone",phonePlaceholder:"+55 11 98765 4321",messageLabel:"Mensagem",messagePlaceholder:"Escreva sua mensagem aqui...",optional:"opcional",defaultMessage:"Estou interessado/a em apoiar uma criança em {country}. Gostaria de receber mais informações.",submit:"Enviar solicitação",sending:"Enviando...",cancel:"Cancelar",close:"Fechar",successTitle:"Solicitação enviada!",successMessage:"Sua solicitação de informações sobre o projeto em {country} foi enviada com sucesso. Entraremos em contato em breve.",errorTitle:"Erro",errorRequired:"Por favor preencha nome e e-mail.",errorEmail:"Por favor insira um endereço de e-mail válido.",errorSending:"Ocorreu um erro ao enviar a solicitação. Por favor tente novamente mais tarde."},countries:{brazil:{name:"Brasil",city:"Goiânia",since:"1995",description:"Apoiamos crianças e jovens de famílias extremamente pobres, residentes principalmente nas favelas da cidade, oferecendo-lhes acompanhamento humano e educativo.",achievements:["100+ formados no ensino médio","12 universitários","2 mestrados"],fullDescription:`ABBÀ ODV está presente na missão de Goiânia desde 1995.
719
720Goiânia é a capital do estado brasileiro de Goiás, localizada na região central do Brasil; tem uma área de 729 km² e uma população de cerca de 1,2 milhão de habitantes.
721
722Embora nem todos em Goiânia vivam em "favelas", o quadro é de uma cidade sobrecarregada por uma aguda disparidade socioeconômica. A inflação – que, junto com a concentração da riqueza nacional nas mãos de poucos, tornou esse estado de coisas estável ao longo dos anos – significa que é difícil para as categorias desfavorecidas melhorar suas condições de vida usando apenas suas próprias forças.
723
724As crianças e jovens assistidos pela Abbà vêm de famílias extremamente pobres, residentes principalmente nas favelas da cidade. Muitos são filhos de jovens dependentes químicos ou alcoólatras encaminhados pelos serviços sociais e vivem temporariamente com avós, tias ou vizinhas enquanto aguardam retornar às suas famílias caso seus pais consigam se desintoxicar.
725
726Graças à ajuda que recebem da Abbà, as crianças podem ir à escola e ter todo o material necessário. Uma pequena porcentagem da ajuda é usada para compra de roupas, medicamentos ou outras necessidades especiais. Em casos de extrema pobreza familiar, as próprias freiras fornecem ajuda adicional complementando o que recebem da Abbà, para evitar que os menores abandonem seus estudos para destinar à família o que era destinado a eles.
727
728O dinheiro também é distribuído às famílias em várias parcelas durante o ano, para verificar se a criança está matriculada na escola e depois frequenta regularmente as aulas.
729
730Em Goiânia, Abbà colaborou muito estreitamente até 2022 com Irmã Lucia Delvecchio (Ordem das Irmãs Dominicanas do Santo Rosário), que acompanhou o Projeto tanto na parte econômica e de gestão, quanto no monitoramento das crianças e jovens, indo frequentemente pessoalmente às várias regiões onde viviam; a Associação chegou a apoiar um pico de 119 jovens, quase todos formados no ensino médio, alguns até universitários.
731
732Entre as conquistas mais bonitas: Sanoete, Engenheiro Civil, trabalha em uma importante empresa de construção da cidade; Fabiana, formada em Administração, venceu um concurso público federal; Vanderleia e Juliana, ambas formadas em Ciências de Enfermagem, trabalham em hospitais.
733
734Em 2022, Irmã Lucia infelizmente teve que se aposentar por motivos de idade e saúde, e o Projeto viu uma suspensão temporária para depois retomar em 2024 (após a difícil busca por uma nova coordenadora local, Irmã Vania de Oliveira) com 35 crianças/jovens, incluindo 5 estudantes universitários.
735
736Sempre se buscou envolver, na medida do possível, as famílias dos jovens, para que pudessem se tornar aliadas preciosas em sua jornada educacional e escolar.
737
738As dificuldades são muitas, mas notou-se certo entusiasmo onde, antes da chegada das Irmãs, a escola muitas vezes não tinha valor e nos rostos só se lia miséria e tristeza.`,successStories:["Sanoete: Engenheiro Civil, trabalha em uma importante construtora","Fabiana: Formada em Administração, vencedora de concurso público federal","Vanderleia e Juliana: Formadas em Ciências de Enfermagem, empregadas em hospitais"]},cameroon:{name:"Camarões",city:"Bertoua – Djangané – Yaoundé – Balikumbat",since:"1995",de
738scription:"Apoiamos crianças e jovens de famílias em condições socioeconômicas muito difíceis. Em muitos casos são famílias monoparentais com uma única renda ou crianças órfãs pela AIDS acolhidas por um parente ou conhecido.",achievements:["200+ formados no ensino médio","30 universitários","2 mestrados"],fullDescription:`ABBÀ ODV tem realizado vários projetos em Camarões desde 1995: em Yaoundé (a capital), Bertoua, Djangané e Balikumbat, a Associação desenvolve vários programas de apoio a distância para crianças desde o jardim de infância até o ensino médio. Também há bolsas universitárias ou parauniversitárias disponíveis para os alunos mais merecedores.
739
740Todos esses projetos são realizados pela Abbà em colaboração com as Irmãs Dominicanas da Beata Imelda.
741
742Quanto à escolarização em Camarões, o fator econômico ainda é a principal limitação que impede as famílias de enviar seus filhos à escola. A situação econômica do país é muito difícil, com um nível muito alto de desemprego e emigração (especialmente para França e Itália). Até 1993, o governo pagava 55% das taxas escolares (os 45% restantes cabiam às famílias), mas com a atual crise mundial, as ajudas se tornaram esporádicas e muito menores.
743
744A ajuda da Abbà é portanto muito importante porque permite às Irmãs acompanhar uma criança desde o jardim de infância até o certificado de estudos primários, o diploma de primeiro ciclo (geral ou profissional), ou o bacharelado – dependendo do percurso escolar – e portanto criá-la e formá-la humanamente, tirando-a da rua e oferecendo-lhe a oportunidade de frequentar a escola e ter pelo menos um nível mínimo de preparação. Um problema significativo é frequentemente a falta de livros para muitos estudantes (cada vez mais caros devido ao aumento do custo de vida) que, dadas as turmas sempre muito numerosas, torna ainda mais difícil para as crianças acompanhar as aulas com proveito e, como é fácil imaginar, retarda o processo de aprendizagem.
745
746A esses problemas deve-se acrescentar o fato de que a disseminação da AIDS levou a um aumento do número de crianças sem família, que na maioria dos casos são acolhidas por avós, tios, parentes distantes ou vizinhos que têm outros filhos ou netos e frequentemente uma situação econômica já difícil às suas costas. Outro flagelo local é o "paludismo", ou malária, que afeta em maior ou menor grau todas as crianças camaronesas e já é considerada uma doença endêmica.
747
748Particularmente na capital, o alcoolismo, a violência física, o uso de drogas, etc. também empurram muitos jovens a abandonar suas casas e aldeias e encontrar "refúgio" nas ruas da cidade, em espaços públicos, tornando-se assim presas de gangues criminosas ou pedófilos. O trabalho da Abbà é fund
748amental na prevenção dessas situações; a inscrição em um programa de estudos contribui, embora minimamente, para limitar consequências desastrosas.
749
750A situação camaronesa é portanto um dos desafios mais difíceis, cujos bons resultados trazem ainda mais alegria.`,successStories:["Blanche (Yaoundé): Formada em Medicina, trabalha em hospital e visita periodicamente as crianças assistidas pela missão","Justine (Djangané): Diploma em Agronomia, iniciou uma fazenda local que oferece formação e trabalho","Damien (Bertoua): Diploma em Agronomia, treinou para se tornar Gendarme","Marinese (Balikumbat): Diploma de professora, agora certificada para ensinar"]},ivoryCoast:{name:"Costa do Marfim",city:"Man",since:"2022",description:"Apoiamos crianças e jovens de aldeias extremamente modestas, permitindo-lhes frequentar a escola com o material escolar necessário e oferecendo-lhes acompanhamento educativo.",achievements:["Material escolar básico","Serviço de ajuda nos deveres e tutoria","Serviço de moto-táxi para alunos distantes"],fullDescription:`O projeto na Costa do Marfim nasceu no final de 2022 em Man e envolve as três aldeias de Siebly, Gbeibly e Bahtiebly.
751
752Capital do distrito de Montagnes, Man é uma cidade rural aninhada nos picos das montanhas Toura, no coração do campo da Costa do Marfim. É cercada por fazendas e plantações de cacau até onde a vista alcança. Suas florestas de bambu e cachoeiras naturais também são famosas.
753
754Neste projeto, Abbà apoia cerca de trinta crianças e jovens que não podiam frequentar a escola regularmente devido às más condições econômicas de suas famílias. O apoio da Abbà é fund
754amental, pois foi constatado que muitos alunos, particularmente na aldeia de Siebly, não tinham nem mesmo material escolar básico.
755
756São portanto fornecidas as ferramentas didáticas necessárias: livros essenciais de francês, inglês e matemática, pequenos quadros-negros e caixas de giz. Em colaboração com a equipe de trabalho e os professores locais, foi estabelecida a criação de grupos de estudo para maximizar o uso dos livros oferecidos, promovendo um estudo aprofundado e colaborativo.
757
758O objetivo final é enfrentar os desafios educacionais locais criando um ambiente de aprendizagem interativo e acessível a todos.
759
760Por esta razão, o Projeto também prevê que voluntários locais competentes (incluindo antigos professores aposentados) acompanhem os pequenos beneficiários nos deveres de casa, com especial atenção ao francês, à matemática, às estratégias de leitura, e para as crianças que moram muito longe das escolas, foi organizado um serviço de moto-táxi (um veículo rápido e econômico muito utilizado na África).
761
762O coordenador do Projeto em Man é Florent Seahe, cidadão marfinense à frente da ONG Ansê C.I., que compartilha o projeto educativo da Abbà e conhece muito bem a situação e as necessidades locais.`,successStories:[]},philippines:{name:"Filipinas",city:"Calabanga – Manila – Rosario",since:"2002",description:"Apoiamos crianças e jovens de famílias em dificuldades, residentes em favelas, em casas de materiais simples ou em áreas rurais, oferecendo-lhes acompanhamento humano e educativo.",achievements:["50+ formados no ensino médio","20+ universitários"],fullDescription:`O apoio da Abbà nas Filipinas chega a quatro localidades: Manila-San Juan; Manila-Quezon City; Calabanga e Rosario. A atividade é realizada em colaboração com as Irmãs Dominicanas da Beata Imelda.
763
764Esses projetos funcionam particularmente bem graças à precisão e pontualidade das coordenadoras locais e também ao amor dos filipinos pela educação e cultura.
765
766Embora a taxa de escolarização nas Filipinas seja alta em comparação com a média dos Países Emergentes, há certa evasão escolar causada pela necessidade de trabalhar.
767
768O de Manila-San Juan é o primeiro projeto realizado em 2002. Abbà apoia aqui cerca de trinta jovens. "San Juan" é uma contração do nome tradicional da cidade, "San Juan del Monte". É o município mais pequeno de Metro Manila e por extensão territorial até das Filipinas, mas é rico em história e cultura. Aqui a comunidade de Irmãs com a ajuda de Abbà promove atividades educativo-formativas para jovens cujas condições econômicas não permitem uma escolarização adequada. Oferece também um programa de alimentação e acolhimento diurno (day care) para cerca de vinte crianças em idade pré-escolar, denominado "Batang Pinoy" (crianças filipinas).
769
770Também o projeto em Manila-Quezon City apoia cerca de trinta crianças e jovens e está estruturado da mesma forma. Quezon City é uma cidade moderna nascida no início do século XX. Muitas crianças deste Projeto vêm de áreas de ocupantes ilegais, e seus pais, para sobreviver, trabalham como catadores (vasculhando em lixões) para revender materiais recuperados.
771
772Em Calabanga começou, em 1991, a atividade das Irmãs Dominicanas nas Filipinas. Em 1993, fundaram a "San Lorenzo Ruiz Catholic School", renomeada em 2001 "Dominican School of Calabanga". Em colaboração com a comunidade imeldina, Abbà apoia aqui cerca de quarenta jovens de famílias em dificuldades. Por vários anos, Abbà também patrocinou um curso de Alfabetização em Informática para as crianças.
773
774Finalmente, em Rosario, um vibrante município agrícola na região de Ilocos, Abbà apoia cerca de quinze jovens particularmente necessitados: seus pais fazem trabalhos muito humildes e frequentemente têm problemas de saúde. Os fundos são usados para cobrir despesas escolares (taxas, material, transporte). Parte dos custos permanece com as famílias, a fim de promover o envolvimento direto e evitar dependência excessiva de ajuda externa.`,successStories:[]},italy:{name:"Itália",city:"Milão (FaTA ODV – Qiqajon ODV)",since:"2015",description:'Através destes "mini-projetos" apoiamos as despesas de educação de crianças e jovens afastados de suas famílias de origem ou em risco de desvio, acolhidos nas estruturas milanesas de FaTA e Qiqajon.',achievements:["Cerca de oitenta crianças e jovens apoiados todos os anos"],fullDescription:`Em 2015, Abbà decidiu ampliar suas atividades, iniciando um primeiro projeto no território local. À luz da experiência adquirida ao longo dos anos e da mudança socioeconômica do país, Abbà considerou importante ser um fator de promoção social da infância e da juventude também na Itáli
774a, através da parceria com uma associação local, FaTA ODV, que compartilha os valores e o projeto educativo de Abbà.
775
776FaTA (Famílias de Acolhimento Temporário) é uma associação que gere 3 comunidades educativas e um semi-internato onde são acolhidas crianças e adolescentes que o Tribunal de Menores afasta da família de origem por maus-tratos, violência ou grave desconforto, e menores enviados pelos Serviços Sociais por estarem em risco de marginalização e desvio.
777
778O papel de FaTA, assim como o de Abbà em muitos países onde opera, é acompanhar a criança ou jovem de uma situação de grave desconforto para uma situação de cuidado, tutela e promoção.
779
780Abbà comprometeu-se a fornecer uma contribuição financeira para cobrir as despesas relativas a livros e material escolar das crianças e jovens acolhidos, aproximadamente trinta.
781
782Um segundo projeto no território local foi iniciado em 2024, com o apoio à formação das crianças e jovens de Qiqajon, que, assim como FaTA, compartilha os valores e o projeto educativo de Abbà.
783
784Qiqajon (Associação Franciscana) é uma comunidade residencial de famílias que quer «ser um recurso para enfrentar as diversas situações de vida dos menores acolhidos». Em seu interior encontra-se a comunidade educativa Momo, que acolhe 5 menores com idades entre 4 e 13 anos afastados de suas famílias por ordem do Tribunal de Menores ou hospedados com o consentimento da família de acordo com os Serviços Sociais de referência.
785
786Qiqajon também abriga o centro diurno Giona, que se propõe a responder às necessidades de meninos/meninas que frequentam o ensino fundamental II (atualmente 45/50) que precisam de apoio educativo em um ambiente protegido.
787
788Abbà comprometeu-se a apoiar as despesas escolares das crianças da comunidade educativa Momo e as atividades esportivas, igualmente educativas, do centro diurno Giona.`,successStories:[]},mexico:{name:"México",city:"San Luis Potosí",since:"2019",description:"Oferecemos acompanhamento escolar e humano a um grupo de crianças e jovens da difícil zona de Peñasquito, nos arredores da cidade de San Luis Potosí.",achievements:["10+ formados no ensino médio","2 universitários"],fullDescription:`O Projeto nasceu em 2019 em parceria com a comunidade imeldina no México, e oferece acompanhamento escolar e humano a um grupo de crianças e jovens da difícil zona de Peñasquito, nos arredores da cidade de San Luis Potosí.
789
790Trata-se de uma área pobre, com muita violência, e infelizmente marcada pelo trabalho infantil, particularmente no setor de fabricação de tijolos. Aqui, numerosas crianças e jovens são forçados a trabalhar para fornecer apoio financeiro às suas famílias, em detrimento da frequência escolar.
791
792O Projeto visa erradicar essa tendência, oferecendo aos jovens estudantes uma contribuição valiosa para cobrir as despesas escolares, mas também um acompanhamento no crescimento humano e espiritual, de acordo com o objetivo da Abbà.
793
794O Projeto envolve cerca de trinta crianças e jovens do ensino fundamental à universidade. De fato, também há bolsas universitárias disponíveis para estudantes meritórios.`,successStories:["Yazmin: Primeira graduada graças à Abbà em Administração e gestão de Empresas","Gerardo: Graduado em Engenharia industrial"]},pakistan:{name:"Paquistão",city:"Lahore",since:"2024",description:"Através deste projeto em grupo, promovemos a escolarização de cerca de cem crianças e jovens de Lahore.",achievements:["10+ formados no ensino médio","2 universitários"],fullDescription:`No Paquistão, em Okara, Abbà apoiou de 2006 a 2021 as estudantes da primeira faculdade universitária feminina da região de Punjab, fundada por um missionário dominicano, Padre Aldino Amato; um apoio importantíssimo para as jovens paquistanesas, já que seu país está entre os últimos 10 do mundo em educação feminina. Muitas jovens se formaram na faculdade ao longo dos anos e a maioria delas trabalha agora como professora local. O projeto em Okara infelizmente teve que terminar em 2021 com o falecimento do Missionário; no entanto, as irmãs coordenadoras de Okara, enviadas a Lahore, abriram lá uma nova Missão em sua memória, que desde 2024 temos o prazer de apoiar.
795
796Em Gohawa, distrito de Lahore, a irmã Najma e a irmã Balqees, à frente da Aldino's Charity Foundation, fundaram uma escola aberta a todos, a Kindergarten School of Lahore (KSL). No Paquistão, 70% dos menores não têm educação. A educação feminina geralmente não é 
796considerada.
797
798Através desta obra, pretende-se, portanto, «elevar as áreas atrasadas do país fornecendo uma educação de qualidade baseada em valores de igualdade e transparência», que acolha a todos e com atenção especial às meninas, para as quais também foram previstos cursos superiores.
799
800Os estudantes que com a contribuição de Abbà podem frequentar a escola são cerca de cem, em sua maioria cristãos mas também muçulmanos, e vêm principalmente de famílias pobres e do trabalho em fornos de tijolos.
801
802Outras dificuldades que os estudantes paquistaneses devem enfrentar além das socioeconômicas são as relacionadas ao clima, com temperaturas que no verão atingem 50°C. Para lidar com a situação, as Irmãs organizam acampamentos de verão matinais (das 7 às 9:30 da manhã) para permitir aos alunos continuar estudando. A Região também é frequentemente atingida por graves inundações que destroem campos, casas e gado, dificultando para as famílias satisfazer até mesmo as necessidades básicas.
803
804A irmã Balqees afirma que a colaboração de Abbà permite-lhes «manter abertas as portas da educação às crianças desfavorecidas, mesmo em meio a tais crises.»`,successStories:[]},congo:{name:"Rep. Dem. do Congo",city:"Kilomoni - Uvira",since:"2019",description:'Apoiamos crianças do muito pobre bairro de Kilomoni (Uvira), oferecendo-lhes a possibilidade de frequentar o excelente complexo escolar "Annunciata Cocchetti".',achievements:["Apoio a 25 crianças","Doação de um ônibus"],fullDescription:`No bairro de Kilomoni, situado ao norte da cidade de Uvira, às margens do lago Tanganica, Abbà ODV apoia desde 2019 vinte e cinco crianças, dando-lhes a possibilidade de frequentar a escola maternal e primária. A Associação também doou à Missão um ônibus que permitiu resolver as dificuldades relacionadas à distância dos institutos.
805
806Em Kilomoni, as missionárias Dorotéias construíram primeiro a escola maternal (2013), depois a escola primária (2022) e finalmente a escola secundária com orientação comercial e científica (2023).
807
808Trata-se de uma zona onde vivem aproximadamente 500.000 pessoas, em habitações simples construídas com tijolos cozidos ou terra batida. A população é constituída principalmente por famílias deslocadas do Burundi por causa da guerra, ou das montanhas circundantes, e sua atividade econômica baseia-se quase exclusivamente no pequeno comércio ao longo da estrada principal, nos bairros ou com o vizinho Burundi, enquanto os campos de cultivo ficam longe e são dificilmente alcançáveis também devido às frequentes inundações que atingem a zona.
809
810Referente local deste Projeto é irmã Giuliana Fadani, diretora do "Complexo Escolar Madre Annunciata Cocchetti". Irmã Giuliana trabalha no Congo, no setor escolar, há trinta anos, e agora dirige esta nova estrutura. É um complexo que responde ao pedido de muitas famílias que desejam enviar aqui seus filhos, seguros de receber uma assistência e uma instrução de bom nível.
811
812Infelizmente, muitos são os problemas na ordem do dia na República Democrática do Congo: desde as guerras até as desordens naturais e sanitárias (malária).`,successStories:[]}}},faq:{sectionTitle:"Seção FAQ",title:"Tudo o que você quer saber",questions:[{question:"Quanto custa um apoio a distância?",answer:"O custo é calculado com base na necessidade, situação pessoal, situação do país e idade."},{question:"O compromisso que decido assumir com uma criança tem duração?",answer:"Ao assumir um compromisso educacional e formativo diante de uma dificuldade, a duração é de médio/longo prazo e requer o tempo necessário para os estudos até a inserção profissional. No entanto, o apoiador pode interromper a contribuição a qualquer momento."},{question:"A criança com quem me comprometo pode ser substituída?",answer:"É possível. Esta é uma situação que pode ocorrer quando, por força maior (como o deslocamento do núcleo familiar por necessidades de trabalho), se torna problemático, se não impossível, acompanhar o sujeito assistido e rastrear a contribuição fornecida."},{question:"Que informações receberei sobre a criança e com que frequência?",answer:"As atualizações sobre a situação familiar, social e escolar da criança são fornecidas semestralmente, e como qualquer associação que lida com apoio, os apoiadores recebem informações sobre o país e correspondentes locais através de boletins e notícias associativas."},{question:"Como posso me comunicar com o beneficiário?",answer:`Através de seus escritórios em Milão, a Associação permite aos apoiadores que desejem corresponder-se com o menor enviando sua correspondência à sede do parceiro local da associação que a entregará e possivelmente a traduzirá para a criança.
813
814Abbà exige relatórios regulares e detalhados de seus correspondentes locais, tanto do ponto de vista educacional quanto econômico, para então fornecer informações aos apoiadores. Isso acontece semestralmente através de um formulário de prestação de contas econômico com a descrição das despesas de gestão do projeto incorridas pelo parceiro no período, junto com informações sobre a vida familiar e o progresso escolar da criança.`},{question:"Quem controla o progresso local do apoio a distância?",answer:"Além do contato através de canais ordinários diários, telefone, correspondência, com correspondentes locais em vários países, representantes da Associação vão periodicamente ao local para verificar seu trabalho, conhecer as realidades e problemas sociais e familiares para benefício dos beneficiários e informação aos apoiadores."}]},donate:{title:"Apoie nossas crianças",subtitle:"Sua doação pode mudar a vida de uma criança. Escolha como ajudar nossos projetos educacionais no mundo.",singleDonation:"Doação Única",monthlyDonation:"Doação Mensal",chooseAmount:"Escolha um valor",customAmount:"Ou insira um valor personalizado",customAmountPlaceholder:"Valor personalizado",whereDonation:"Para onde você quer que sua doação vá?",donateNow:"Doe",perMonth:"por mês",now:"agora",selectAmount:"Selecione um valor",securePayment:"Pagamento seguro via Stripe",taxDeductible:"Sua doação é dedutível de impostos",causes:{general:{title:"Apoio Geral",description:"Ajude onde mais precisa"},education:{title:"Educação",description:"Livros, materiais escolares e formação"}
814,infrastructure:{title:"Infraestrutura",description:"Construção e manutenção de escolas"}},amounts:{25:"Contribuição para despesas escolares de uma criança",50:"Contribuição para despesas escolares de uma criança",100:"Contribuição de 1 semestre de jardim de infância para uma criança",200:"Cobertura de 1 ano de jardim de infância para uma criança"},impact:{title:"O impacto da sua doação",with25:"Com 25€ - 50€",with25desc:"Você fornece parte do material escolar para 1 criança",with100:"Com 100€",with100desc:"Você apoia completamente a educação de uma criança do jardim de infância por 1 semestre",with200:"Com 200€",with200desc:"Você apoia completamente a educação de uma criança do jardim de infância por 1 ano"},testimonial:{title:"Um testemunho",text:"Graças às doações recebidas, Maria de São Paulo conseguiu completar o ensino médio e agora frequenta a universidade de engenharia. Sua generosidade mudou o futuro dela."},howToSupport:{title:"Como apoiar Abbà",specialProjects:"Projetos Especiais: Presentes solidários!",description:'Abbà oferece várias formas de demonstrar seu apoio e compromisso com nossos projetos e crianças necessitadas do mundo: não apenas apoio a distância, mas também doações em ocasiões de batismos, comunhões, formaturas e casamentos ("lembrancinhas solidárias") ou para iniciativas voltadas a necessidades específicas.',legacy:"Também é possível fazer doações ou legados em favor de nossas crianças.",supportWith:"Você pode apoiar Abbà com:",methods:{check:"Cheque nominal à Abbà",bank:"Transferência bancária para Intesa Sanpaolo: IBAN IT18 X030 69096 06100 000015544 nominal a ABBA' ASSOCIAZIONE PER IL SOSTEGNO E L'ASSISTENZA ALL'INFANZIA",postal:"Pagamento em conta corrente postal n. 27382209 nominal à Abbà",paypal:"Pagamento via PayPal ([email protected])"}},whyDonate:{title:"Por que doar conosco",reason1:"Relatórios de atualização semestrais",reason2:"35 anos de experiência no setor"}},gallery:{title:"Nossa galeria",subtitle:"Imagens que contam nosso compromisso e os sucessos das crianças que apoiamos no mundo",allPhotos:"Todas as fotos",filters:{education:"Educação",achievements:"Conquistas",infrastructure:"Infraestrutura",events:"Eventos",training:"Formação",moments:"Momentos",missions:"Missões",travels:"Viagens"},noImages:"Nenhuma imagem encontrada",tryOtherCategory:"Tente selecionar outra categoria.",share:"Compartilhar",download:"Baixar",of:"de",cta:{title:"Quer ver mais fotos dos nossos projetos?",subtitle:"Siga-nos nas redes sociais para ficar atualizado com novas fotos e histórias dos nossos projetos no mundo.",facebook:"Siga-nos no Facebook",instagram:"Siga-nos no Instagram"}},news:{title:"Notícias e Atualizações",subtitle:"Fique atualizado sobre todas as nossas atividades, projetos e histórias de sucesso",search:"Buscar notícias...",featured:"Notícias em Destaque",inEvidence:"Em Destaque",readAll:"Ler tudo",noNews:"Nenhuma notícia encontrada",tryModifyFilters:"Tente modificar os filtros de busca ou a categoria selecionada.",categories:{all:"Todas as notícias",events:"Eventos",projects:"Projetos",stories:"Histórias",updates:"Atualizações"},newsletter:{title:"Fique sempre atualizado",subtitle:"Inscreva-se em nossa newsletter para receber todas as novidades sobre nossos projetos e as histórias das crianças que ajudamos.",placeholder:"Seu email",subscribe:"Inscrever-se na Newsletter",privacy:"Respeitamos sua privacidade. Sem spam, apenas atualizações importantes.",sending:"Enviando...",successTitle:"Inscrição concluída!",successMessage:"Obrigado por se inscrever em nossa newsletter. Manteremos você atualizado sobre nossas atividades.",errorTitle:"Erro",errorRequired:"Por favor insira um endereço de e-mail.",errorEmail:"Por favor insira um endereço de e-mail válido.",errorSending:"Ocorreu um erro. Por favor tente novamente mais tarde."}},media:{title:"Nossos conteúdos",subtitle:"Vídeos, publicações e materiais para conhecer melhor nossas atividades e ficar sempre atualizado.",videos:"Vídeos",newsletter:"O Jornal",noVideos:"Nenhum vídeo disponível no momento.",n
814oNewsletter:"Nenhum jornal disponível no momento.",downloadSemestrale:"Baixar a Edição Semestral",downloadInserto:"Baixar o Encarte da Noite dos Sócios"},transparency:{badge:"Transparência",title:"Nossa transparência",subtitle:"Acreditamos na transparência como valor fundamental. Aqui você pode consultar e baixar todos os documentos relacionados à nossa atividade e gestão.",downloadDocument:"Baixar documento",documentNotAvailable:"Documento não disponível",info:"Para qualquer informação adicional sobre nossos documentos ou para solicitar cópias certificadas, não hesite em",contactUs:"nos contatar"},contact:{title:"Entre em Contato",subtitle:"Tem perguntas sobre nossos projetos? Quer apoiar uma criança? Estamos aqui para ajudá-lo.",howToReachUs:"Como nos encontrar",headquarters:"Sede Principal",phone:"Telefone",email:"Email",openingHours:"Horário de funcionamento",followUs:"Siga-nos nas redes sociais",sendMessage:"Enviar uma mensagem",form:{requestType:"Tipo de solicitação",fullName:"Nome completo",yourName:"Seu nome",emailAddress:"Email",emailPlaceholder:"[email protected]",phonePlaceholder:"+39 123 456 7890",subject:"Assunto",subjectPlaceholder:"Assunto da mensagem",message:"Mensagem",messagePlaceholder:"Escreva sua mensagem aqui...",privacy:"Li e aceito a política de privacidade e autorizo o tratamento dos meus dados pessoais.",privacyLink:"política de privacidade",submit:"Enviar mensagem",sendButton:"Enviar mensagem",required:"*"},requestTypes:{general:"Informações gerais",adoption:"Apoio a distância",donation:"Doações",volunteer:"Voluntariado",partnership:"Parceria",media:"Assessoria de imprensa"},contactEmail:"Email de contato",forGeneralInfo:"Para informações gerais:",phoneSupport:"Suporte telefônico",monFri:"Seg-Sex 9:00-18:00:",responseTime:"Tempo de resposta",responseTimeText:"Responderemos em até 24 horas em dias úteis",messageSent:"Mensagem enviada!",thankYou:"Obrigado por nos contatar. Responderemos o mais breve possível."},footer:{description:"Desde 1990 cuidamos da formação existencial e cultural de crianças nascidas em situações difíceis, através da educação e apoio a distância.",quickLinks:"Links Rápidos",howToHelp:"Como Ajudar",legalInfo:"Informações Legais",whereWeOperate:"Onde Atuamos",links:{about:"Sobre Nós",projects:"Nossos Projetos",stories:"Histórias de Sucesso",news:"Notícias",gallery:"Galeria",contact:"Contato"},support:{distanceSupport:"Apoio a Distância",donations:"Doações",volunteering:"Voluntariado",partnership:"Parceria",fivePerMille:"Doação 5x1000",legacy:"Legados Testamentários"},legal:{privacy:"Política de Privacidade",cookies:"Política de Cookies",terms:"Termos de Serviço",transparency:"Transparência",reports:"Relatórios Financeiros"},stats:{yearsExperience:"Anos de experiência",childrenSupported:"Crianças apoiadas",graduates:"Formados",countries:"Países de atuação"},newsletter:{title:"Fique atualizado sobre nossas atividades",subtitle:"Inscreva-se em nossa newsletter para receber notícias sobre projetos e histórias das crianças que ajudamos.",placeholder:"Seu email",subscribe:"Inscrever-se"},copyright:"© {year} Abbà ODV. Todos os direitos reservados.",madeWith:"Feito com ❤️ para as crianças do mundo",legalText:"Abbà ODV - Associação para apoio e assistência à infância e juventude ODV | Código Fiscal: 97131900157 | Registrada no Registro de ODV"},common:{loading:"Carregando...",error:"Ocorreu um erro",retry:"Tentar novamente",close:"Fechar",save:"Salvar",cancel:"Cancelar",delete:"Excluir",edit:"Editar",add:"Adicionar",search:"Buscar",filter:"Filtrar",all:"Todos",yes:"Sim",no:"Não"}}},ej=x.createContext(void 0),Yb="abba-language";function AM(){return kM}function OM({children:e}){const[t,n]=x.useState(()=>{const o=localStorage.getItem(Yb);return o&&["it","en","es","pt"].includes(o)?o:AM()});x.useEffect(()=>{localStorage.setItem(Yb,t),document.documentElement.lang=t},[t]);const r=o=>{n(o)},i=PM[t];return a.jsx(ej.Provider,{value:{language:t,setLanguage:r,t:i},children:e})}function tj(){const e=x.useContext(ej);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e}function Sn(){const{language:e,setLanguage:t,t:n}=tj();return{t:n,language:e,setLanguage:t}}function Ue(e,t,n){if(n==="it")return e[t]||"";const r=`${t}_${n}`;return e[r]||e[t]||""}const Jb=({isScrolled:e=!1})=>{const{language:t,setLanguage:n}=tj(),[r,i]=x.useState(!1),o=$f.find(u=>u.code===t)||$f[0],l=u=>{n(u),i(!1)};return a.jsxs("div",{className:"relative",children:[a.jsxs("button",{onClick:()=>i(!r),className:`flex items-center gap-1.5 px-3 py-2 rounded-lg transition-all duration-300 ${e?"text-foreground hover:bg-muted":"text-white hover:bg-white/20"}`,style:e?{}:{textShadow:"1px 1px 2px rgba(0,0,0,0.5)"},children:[a.jsx("span",{className:"text-lg",children:o.flag}),a.jsx("span",{className:"text-sm font-medium hidden sm:inline",children:o.code.toUpperCase()}),a.jsx(Kr,{className:`w-4 h-4 transition-transform ${r?"rotate-180":""}`})]}),r&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),a.jsx("div",{className:"absolute right-0 top-full mt-2 z-50 bg-background border border-border rounded-lg shadow-xl overflow-hidden min-w-[140px]",children:$f.map(u=>a.jsxs("button",{onClick:()=>l(u.code),className:`w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors ${t===u.code?"bg-primary/10 text-primary":"text-foreground hover:bg-muted"}`,children:[a.jsx("span",{className:"text-lg",children:u.flag}),a.jsx("span",{className:"text-sm font-medium",children:u.name})]},u.code))})]})]})},RM=()=>
814{const[e,t]=x.useState(!1),[n,r]=x.useState(!1),{t:i}=Sn();x.useEffect(()=>{const u=()=>{r(window.scrollY>50)};return window.addEventListener("scroll",u),()=>window.removeEventListener("scroll",u)},[]);const o=[{label:i.nav.home,href:"#home"},{label:i.nav.about,href:"#about"},{label:i.nav.projects,href:"#projects"},{label:i.nav.stories,href:"#stories"},{label:i.nav.news,href:"#news"},{label:i.nav.transparency,href:"#transparency"},{label:i.nav.gallery,href:"#gallery"},{label:i.nav.media,href:"#media"},{label:i.nav.contact,href:"#contact"}],l=u=>{const d=document.querySelector(u);d&&(d.scrollIntoView({behavior:"smooth"}),t(!1))};return a.jsx("nav",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${n?"bg-background/95 backdrop-blur-md shadow-lg":"bg-transparent"}`,children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"flex items-center justify-between h-16 lg:h-20",children:[a.jsxs("div",{className:"flex items-center space-x-3",children:[n&&a.jsx("img",{src:"/lovable-uploads/ef3da3f9-ba4a-46ec-b4c1-34a8b45328cb.png",alt:"ABBÀ Logo",className:"h-8 lg:h-10 w-auto hover-lift transition-all duration-300 animate-fade-in"}),a.jsx("span",{className:`text-xl lg:text-2xl font-bold ${n?"text-gradient":"text-white"}`,style:n?{}:{textShadow:"2px 2px 4px rgba(0,0,0,0.8)"},children:"ABBÀ"})]}),a.jsxs("div",{className:"hidden lg:flex items-center space-x-3 ml-8",children:[o.map(u=>a.jsx("button",{onClick:()=>l(u.href),className:`relative py-2 px-4 text-base font-semibold transition-all duration-300 ${n?"text-foreground hover:text-primary":"text-white hover:text-white/80 text-shadow-lg"} hover:scale-105`,style:n?{}:{textShadow:"2px 2px 4px rgba(0,0,0,0.8)"},children:u.label},u.href)),a.jsx(Jb,{}),a.jsx("button",{onClick:()=>l("#donate"),className:`px-6 py-3 rounded-full font-semibold text-base transition-all duration-300 hover:scale-105 ${n?"bg-primary text-primary-foreground hover:bg-primary/90 shadow-lg":"bg-white/20 backdrop-blur-sm text-white border-2 border-white hover:bg-white hover:text-primary shadow-2xl"}`,style:n?{}:{boxShadow:"0 10px 30px -5px rgba(255, 255, 255, 0.3)"},children:i.nav.supportNow})]}),a.jsxs("div",{className:"lg:hidden flex items-center gap-2",children:[a.jsx(Jb,{}),a.jsx("button",{onClick:()=>t(!e),className:"text-foreground hover:text-primary transition-colors duration-200",children:e?a.jsx($s,{size:24}):a.jsx(y1,{size:24})})]})]}),e&&a.jsx("div",{className:"lg:hidden",children:a.jsxs("div",{className:"px-2 pt-2 pb-3 space-y-1 bg-background/95 backdrop-blur-md rounded-lg mt-2 shadow-lg",children:[o.map(u=>a.jsx("button",{onClick:()=>l(u.href),className:"block w-full text-left px-3 py-2 text-base font-medium nav-link",children:u.label},u.href)),a.jsx("button",{onClick:()=>l("#donate"),className:"btn-primary w-full mt-4",children:i.nav.supportNow})]})})]})})},IM="/assets/hero-banner-D2Mg46G3.jpg",LM="/assets/hero-education-_x1gE3Yo.jpg",zM="/assets/graduation-celebration-C46VQpkW.jpg",MM=()=>{const[e,t]=x.useState(0),{t:n}=Sn(),r=[LM,IM,zM];n.hero.stats.childrenSupported,n.hero.stats.diplomasAchieved,n.hero.stats.countriesOfIntervention,x.useEffect(()=>{const d=setInterval(()=>{t(f=>(f+1)%n.hero.slides.length)},8e3);return()=>clearInterval(d)},[n.hero.slides.length]);const i=()=>{t(d=>(d+1)%n.hero.slides.length)},o=()=>{t(d=>(d-1+n.hero.slides.length)%n.hero.slides.length)},l=d=>{const f=document.querySelector(d);f&&f.scrollIntoView({behavior:"smooth"})},u=n.hero.slides[e];return a.jsxs("section",{id:"home",className:"relative min-h-screen flex flex-col overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0",children:r.map((d,f)=>a.jsxs("div",{className:`absolute inset-0 transition-opacity duration-1000 ${f===e?"opacity-100":"opacity-0"}`,children:[a.jsx("img",{src:d,alt:(u==null?void 0:u.title)||"",className:"w-full h-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-black/40"})]},f))}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary/80 via-transparent to-accent/60"}),a.jsx("div",{className:"relative z-10 pt-16 lg:pt-20 flex justify-start px-6 lg:px-12",children:a.jsx("img",{src:"/lovable-uploads/73bdbc87-55d8-494e-a575-c97141e7ef38.png",alt:"ABBÀ Logo",className:"h-40 lg:h-56 w-auto"})}),a.jsx("div",{className:"relative z-10 text-center text-white px-4 sm:px-6 lg:px-8 max-w-4xl mx-auto mb-20 mt-auto",children:a.jsxs("div",{className:"animate-fade-in",children:[a.jsx("h1",{className:"text-hero text-white/85 mb-6 leading-tight text-5xl",children:u==null?void 0:u.title}),a.jsx("p",{className:"text-xl md:text-2xl mb-8 text-white/90 max-w-3xl mx-auto leading-relaxed",children:u==null?void 0:u.subtitle}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center mb-12",children:[a.jsx("button",{onClick:()=>l("#donate"),className:"bg-primary/90 backdrop-blur-sm text-primary-foreground border-2 border-primary hover:bg-primary hover:shadow-xl rounded-full text-lg px-8 py-4 font-semibold shadow-2xl transition-all duration-300 hover:scale-105",style:{boxShadow:"0 10px 30px -5px hsl(var(--primary) / 0.4)"},children:n.hero.supportChild}),a.jsx("button",{onClick:()=>l("#about"),className:"bg-white/20 backdrop-blur-sm text-white border-2 border-white hover:bg-white hover:text-primary rounded-full text-lg px-8 py-4 font-semibold shadow-2xl hover:shadow-xl transition-all duration-300 hover:scale-105",style:{boxShadow:"0 10px 30px -5px rgba(255, 255, 255, 0.3)"},children:n.hero.discoverWhatWeDo})]})]})}),a.jsx("button",{onClick:o,className:"absolute left-4 top-1/2 transform -translate-y-1/2 z-20 p-2 rounded-full bg-white/20 hover:bg-white/30 transition-all duration-300 hover-lift",children:a.jsx(Fg,{className:"w-6 h-6 text-white"})}),a.jsx("button",{onClick:i,className:"absolute right-4 top-1/2 transform -translate-y-1/2 z-20 p-2 rounded-full bg-white/20 hover:bg-white/30 transition-all duration-300 hover-lift",children:a.jsx(Bg,{className:"w-6 h-6 text-white"})}),a.jsx("div",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 z-20 flex space-x-2",children:n.hero.slides.map((d,f)=>a.jsx("button",{onClick:()=>t(f),className:`w-3 h-3 rounded-full transition-all duration-300 ${f===e?"bg-white":"bg-white/50"}`},f))})]})},DM="/assets/about-children-BLGB-VZe.jpg",FM="/assets/padre-giuseppe-paparone-BzTjXmIv.png";var qf="focusScope.autoFocusOnMount",Uf="focusScope.autoFocusOnUnmount",Xb={bubbles:!1,cancelable:!0},BM="FocusScope",hv=x.forwardRef((e,t)=>
vendor: 4,257 bytes, line 814
814{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[u,d]=x.useState(null),f=mt(i),p=mt(o),m=x.useRef(null),g=ze(t,b=>d(b)),y=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let b=function(N){if(y.paused||!u)return;const A=N.target;u.contains(A)?m.current=A:ui(m.current,{select:!0})},C=function(N){if(y.paused||!u)return;const A=N.relatedTarget;A!==null&&(u.contains(A)||ui(m.current,{select:!0}))},j=function(N){if(document.activeElement===document.body)for(const k of N)k.removedNodes.length>0&&ui(u)};document.addEventListener("focusin",b),document.addEventListener("focusout",C);const _=new MutationObserver(j);return u&&_.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",C),_.disconnect()}}},[r,u,y.paused]),x.useEffect(()=>{if(u){tw.add(y);const b=document.activeElement;if(!u.contains(b)){const j=new CustomEvent(qf,Xb);u.addEventListener(qf,f),u.dispatchEvent(j),j.defaultPrevented||($M(HM(nj(u)),{select:!0}),document.activeElement===b&&ui(u))}return()=>{u.removeEventListener(qf,f),setTimeout(()=>{const j=new CustomEvent(Uf,Xb);u.addEventListener(Uf,p),u.dispatchEvent(j),j.defaultPrevented||ui(b??document.body,{select:!0}),u.removeEventListener(Uf,p),tw.remove(y)},0)}}},[u,f,p,y]);const w=x.useCallback(b=>{if(!n&&!r||y.paused)return;const C=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,j=document.activeElement;if(C&&j){const _=b.currentTarget,[N,A]=qM(_);N&&A?!b.shiftKey&&j===A?(b.preventDefault(),n&&ui(N,{select:!0})):b.shiftKey&&j===N&&(b.preventDefault(),n&&ui(A,{select:!0})):j===_&&b.preventDefault()}},[n,r,y.paused]);return a.jsx(je.div,{tabIndex:-1,...l,ref:g,onKeyDown:w})});hv.displayName=BM;function $M(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ui(r,{select:t}),document.activeElement!==n)return}function qM(e){const t=nj(e),n=ew(t,e),r=ew(t.reverse(),e);return[n,r]}function nj(e){const t=[],n=document.createTreeWalker(e,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();)t.push(n.currentNode);return t}function ew(e,t){for(const n of e)if(!UM(n,{upTo:t}))return n}function UM(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function VM(e){return e instanceof HTMLInputElement&&"select"in e}function ui(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&VM(e)&&t&&e.select()}}var tw=WM();function WM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=nw(e,t),e.unshift(t)},remove(t){var n;e=nw(e,t),(n=e[0])==null||n.resume()}}}function nw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function HM(e){return e.filter(t=>t.tagName!=="A")}var Vf=0;function rj(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rw()),document.body.insertAdjacentElement("beforeend",e[1]??rw()),Vf++,()=>{Vf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vf--}},[])}function rw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Uu="right-scroll-bar-position",Vu="width-before-scroll-bar",GM="with-scroll-bars-hidden",KM="--removed-body-scroll-bar-size";function Wf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ZM(e,t){var n=x.useState(function(){return{value:e,callback:t,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=t,n.facade}var QM=typeof window<"u"?x.useLayoutEffect:x.useEffect,iw=new WeakMap;function YM(e,t){var n=ZM(null,function(r){return e.forEach(function(i){return Wf(i,r)})});return QM(function(){var r=iw.get(n);if(r){var i=new Set(r),o=new Set(e),l=n.current;
vendor: 4,155 bytes, lines 814-829
814i.forEach(function(u){o.has(u)||Wf(u,null)}),o.forEach(function(u){i.has(u)||Wf(u,l)})}iw.set(n,e)},[e]),n}function JM(e){return e}function XM(e,t){t===void 0&&(t=JM);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]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var d=function(){var p=l;l=[],p.forEach(o)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(p){l.push(p),f()},filter:function(p){return l=l.filter(p),n}}}};return i}function eD(e){e===void 0&&(e={});var t=XM(null);return t.options=br({async:!0,ssr:!1},e),t}var ij=function(e){var t=e.sideCar,n=Ma(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,br({},n))};ij.isSideCarExport=!0;function tD(e,t){return e.useMedium(t),ij}var sj=eD(),Hf=function(){},dh=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:Hf,onWheelCapture:Hf,onTouchMoveCapture:Hf}),i=r[0],o=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,m=e.shards,g=e.sideCar,y=e.noIsolation,w=e.inert,b=e.allowPinchZoom,C=e.as,j=C===void 0?"div":C,_=e.gapMode,N=Ma(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=g,k=YM([n,t]),T=br(br({},N),i);return x.createElement(x.Fragment,null,p&&x.createElement(A,{sideCar:sj,removeScrollBar:f,shards:m,noIsolation:y,inert:w,setCallbacks:o,allowPinchZoom:!!b,lockRef:n,gapMode:_}),l?x.cloneElement(x.Children.only(u),br(br({},T),{ref:k})):x.createElement(j,br({},T,{className:d,ref:k}),u))});dh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};dh.classNames={fullWidth:Vu,zeroRight:Uu};var nD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nD();return t&&e.setAttribute("nonce",t),e}function iD(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function sD(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var oD=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rD())&&(iD(t,n),sD(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},aD=function(){var e=oD();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},oj=function(){var e=aD(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},lD={left:0,top:0,right:0,gap:0},Gf=function(e){return parseInt(e||"",10)||0},cD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Gf(n),Gf(r),Gf(i)]},uD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lD;var t=cD(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},dD=oj(),Bo="data-scroll-locked",hD=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
815  .`.concat(GM,` {
816   overflow: hidden `).concat(r,`;
817   padding-right: `).concat(u,"px ").concat(r,`;
818  }
819  body[`).concat(Bo,`] {
820    overflow: hidden `).concat(r,`;
821    overscroll-behavior: contain;
822    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
823    padding-left: `.concat(i,`px;
824    padding-top: `).concat(o,`px;
825    padding-right: `).concat(l,`px;
826    margin-left:0;
827    margin-top:0;
828    margin-right: `).concat(u,"px ").concat(r,`;
829    `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";
829")].filter(Boolean).join(""),`
830  }
831  
832  .`).concat(Uu,` {
833    right: `).concat(u,"px ").concat(r,`;
834  }
835  
836  .`).concat(Vu,` {
837    margin-right: `).concat(u,"px ").concat(r,`;
838  }
839  
840  .`).concat(Uu," .").concat(Uu,` {
841    right: 0 `).concat(r,`;
842  }
843  
844  .`).concat(Vu," .").concat(Vu,` {
845    margin-right: 0 `).concat(r,`;
846  }
847  
848  body[`).concat(Bo,`] {
849    `).concat(KM,": ").concat(u,`px;
850  }
851`)},sw=function(){var e=parseInt(document.body.getAttribute(Bo)||"0",10);return isFinite(e)?e:0},fD=function(){x.useEffect(function(){return document.body.setAttribute(Bo,(sw()+1).toString()),function(){var e=sw()-1;e<=0?document.body.removeAttribute(Bo):document.body.setAttribute(Bo,e.toString())}},[])},mD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;fD();var o=x.useMemo(function(){return uD(i)},[i]);return x.createElement(dD,{styles:hD(o,!t,i,n?"":"!important")})},Tp=!1;if(typeof window<"u")try{var _u=Object.defineProperty({},"passive",{get:function(){return Tp=!0,!0}});window.addEventListener("test",_u,_u),window.removeEventListener("test",_u,_u)}catch{Tp=!1}var co=Tp?{passive:!1}:!1,pD=function(e){return e.tagName==="TEXTAREA"},aj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!pD(e)&&n[t]==="visible")},gD=function(e){return aj(e,"overflowY")},vD=function(e){return aj(e,"overflowX")},ow=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=lj(e,r);if(i){var o=cj(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},yD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},xD=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},lj=function(e,t){return e==="v"?gD(t):vD(t)},cj=function(e,t){return e==="v"?yD(t):xD(t)},bD=function(e,t){return e==="h"&&t==="rtl"?-1:1},wD=function(e,t,n,r,i){var o=bD(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,d=t.contains(u),f=!1,p=l>0,m=0,g=0;do{var y=cj(e,u),w=y[0],b=y[1],C=y[2],j=b-C-o*w;(w||j)&&lj(e,u)&&(m+=j,g+=w),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(p&&(Math.abs(m)<1||!i)||!p&&(Math.abs(g)<1||!i))&&(f=!0),f},Su=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},aw=function(e){return[e.deltaX,e.deltaY]},lw=function(e){return e&&"current"in e?e.current:e},_D=function(e,t){return e[0]===t[0]&&e[1]===t[1]},SD=function(e){return`
852  .block-interactivity-`.concat(e,` {pointer-events: none;}
853  .allow-interactivity-`).concat(e,` {pointer-events: all;}
854`)},jD=0,uo=[];function ND(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(jD++)[0],o=x.use
vendor: 4,759 bytes, line 854
854State(oj)[0],l=x.useRef(e);x.useEffect(function(){l.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=KI([e.lockRef.current],(e.shards||[]).map(lw),!0).filter(Boolean);return b.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=x.useCallback(function(b,C){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!l.current.allowPinchZoom;var j=Su(b),_=n.current,N="deltaX"in b?b.deltaX:_[0]-j[0],A="deltaY"in b?b.deltaY:_[1]-j[1],k,T=b.target,R=Math.abs(N)>Math.abs(A)?"h":"v";if("touches"in b&&R==="h"&&T.type==="range")return!1;var P=ow(R,T);if(!P)return!0;if(P?k=R:(k=R==="v"?"h":"v",P=ow(R,T)),!P)return!1;if(!r.current&&"changedTouches"in b&&(N||A)&&(r.current=k),!k)return!0;var I=r.current||k;return wD(I,C,b,I==="h"?N:A,!0)},[]),d=x.useCallback(function(b){var C=b;if(!(!uo.length||uo[uo.length-1]!==o)){var j="deltaY"in C?aw(C):Su(C),_=t.current.filter(function(k){return k.name===C.type&&(k.target===C.target||C.target===k.shadowParent)&&_D(k.delta,j)})[0];if(_&&_.should){C.cancelable&&C.preventDefault();return}if(!_){var N=(l.current.shards||[]).map(lw).filter(Boolean).filter(function(k){return k.contains(C.target)}),A=N.length>0?u(C,N[0]):!l.current.noIsolation;A&&C.cancelable&&C.preventDefault()}}},[]),f=x.useCallback(function(b,C,j,_){var N={name:b,delta:C,target:j,should:_,shadowParent:CD(j)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(A){return A!==N})},1)},[]),p=x.useCallback(function(b){n.current=Su(b),r.current=void 0},[]),m=x.useCallback(function(b){f(b.type,aw(b),b.target,u(b,e.lockRef.current))},[]),g=x.useCallback(function(b){f(b.type,Su(b),b.target,u(b,e.lockRef.current))},[]);x.useEffect(function(){return uo.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",d,co),document.addEventListener("touchmove",d,co),document.addEventListener("touchstart",p,co),function(){uo=uo.filter(function(b){return b!==o}),document.removeEventListener("wheel",d,co),document.removeEventListener("touchmove",d,co),document.removeEventListener("touchstart",p,co)}},[]);var y=e.removeScrollBar,w=e.inert;return x.createElement(x.Fragment,null,w?x.createElement(o,{styles:SD(i)}):null,y?x.createElement(mD,{gapMode:e.gapMode}):null)}function CD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ED=tD(sj,ND);var fv=x.forwardRef(function(e,t){return x.createElement(dh,br({},e,{ref:t,sideCar:ED}))});fv.classNames=dh.classNames;var TD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ho=new WeakMap,ju=new WeakMap,Nu={},Kf=0,uj=function(e){return e&&(e.host||uj(e.parentNode))},kD=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=uj(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},PD=function(e,t,n,r){var i=kD(t,Array.isArray(e)?e:[e]);Nu[n]||(Nu[n]=new WeakMap);var o=Nu[n],l=[],u=new Set,d=new Set(i),f=function(m){!m||u.has(m)||(u.add(m),f(m.parentNode))};i.forEach(f);var p=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(g){if(u.has(g))p(g);else try{var y=g.getAttribute(r),w=y!==null&&y!=="false",b=(ho.get(g)||0)+1,C=(o.get(g)||0)+1;ho.set(g,b),o.set(g,C),l.push(g),b===1&&w&&ju.set(g,!0),C===1&&g.setAttribute(n,"true"),w||g.setAttribute(r,"true")}catch(j){console.error("aria-hidden: cannot operate on ",g,j)}})};return p(t),u.clear(),Kf++,function(){l.forEach(function(m){var g=ho.get(m)-1,y=o.get(m)-1;ho.set(m,g),o.set(m,y),g||(ju.has(m)||m.removeAttribute(r),ju.delete(m)),y||m.removeAttribute(n)}),Kf--,Kf||(ho=new WeakMap,ho=new WeakMap,ju=new WeakMap,Nu={})}},dj=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=TD(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),PD(r,i,n,"aria-hidden")):function(){return null}},mv="Dialog",[hj,fj]=Jr(mv),[AD,ar]=hj(mv),mj=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,u=x.useRef(null),d=x.useRef(null),[f=!1,p]=Bi({prop:r,defaultProp:i,onChange:o});return a.jsx(AD,{scope:t,triggerRef:u,contentRef:d,contentId:qr(),titleId:qr(),descriptionId:qr(),open:f,onOpenChange:p,onOpenToggle:x.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};mj.displayName=mv;var pj="DialogTrigger",gj=x.forwardRef((e,t)=>
vendor: 5,489 bytes, lines 854-858
854{const{__scopeDialog:n,...r}=e,i=ar(pj,n),o=ze(t,i.triggerRef);return a.jsx(je.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":vv(i.open),...r,ref:o,onClick:de(e.onClick,i.onOpenToggle)})});gj.displayName=pj;var pv="DialogPortal",[OD,vj]=hj(pv,{forceMount:void 0}),yj=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=ar(pv,t);return a.jsx(OD,{scope:t,forceMount:n,children:x.Children.map(r,l=>a.jsx(Mn,{present:n||o.open,children:a.jsx(Xd,{asChild:!0,container:i,children:l})}))})};yj.displayName=pv;var Pd="DialogOverlay",xj=x.forwardRef((e,t)=>{const n=vj(Pd,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ar(Pd,e.__scopeDialog);return o.modal?a.jsx(Mn,{present:r||o.open,children:a.jsx(RD,{...i,ref:t})}):null});xj.displayName=Pd;var RD=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ar(Pd,n);return a.jsx(fv,{as:Ps,allowPinchZoom:!0,shards:[i.contentRef],children:a.jsx(je.div,{"data-state":vv(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Is="DialogContent",bj=x.forwardRef((e,t)=>{const n=vj(Is,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ar(Is,e.__scopeDialog);return a.jsx(Mn,{present:r||o.open,children:o.modal?a.jsx(ID,{...i,ref:t}):a.jsx(LD,{...i,ref:t})})});bj.displayName=Is;var ID=x.forwardRef((e,t)=>{const n=ar(Is,e.__scopeDialog),r=x.useRef(null),i=ze(t,n.contentRef,r);return x.useEffect(()=>{const o=r.current;if(o)return dj(o)},[]),a.jsx(wj,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:de(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:de(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:de(e.onFocusOutside,o=>o.preventDefault())})}),LD=x.forwardRef((e,t)=>{const n=ar(Is,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return a.jsx(wj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),wj=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,u=ar(Is,n),d=x.useRef(null),f=ze(t,d);return rj(),a.jsxs(a.Fragment,{children:[a.jsx(hv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:a.jsx(wc,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":vv(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(MD,{titleId:u.titleId}),a.jsx(FD,{contentRef:d,descriptionId:u.descriptionId})]})]})}),gv="DialogTitle",_j=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ar(gv,n);return a.jsx(je.h2,{id:i.titleId,...r,ref:t})});_j.displayName=gv;var Sj="DialogDescription",jj=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ar(Sj,n);return a.jsx(je.p,{id:i.descriptionId,...r,ref:t})});jj.displayName=Sj;var Nj="DialogClose",Cj=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ar(Nj,n);return a.jsx(je.button,{type:"button",...r,ref:t,onClick:de(e.onClick,()=>i.onOpenChange(!1))})});Cj.displayName=Nj;function vv(e){return e?"open":"closed"}var Ej="DialogTitleWarning",[zD,Tj]=TP(Ej,{contentName:Is,titleName:gv,docsSlug:"dialog"}),MD=({titleId:e})=>{const t=Tj(Ej),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
855
856If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
857
858For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DD="DialogDescriptionWarning",FD=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Tj(DD).contentName}}.`;return x.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},kj=mj,Pj=gj,Aj=yj,yv=xj,xv=bj,bv=_j,wv=jj,_v=Cj;const sr=kj,Oj=Pj,BD=Aj,Rj=x.forwardRef(({className:e,...t},n)=>a.jsx(yv,{ref:n,className:Ce("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Rj.displayName=yv.displayName;const Ln=x.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(BD,{children:[a.jsx(Rj,{}),a.jsxs(xv,{ref:r,className:Ce("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
858nded-lg",e),...n,children:[t,a.jsxs(_v,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx($s,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ln.displayName=xv.displayName;const or=({className:e,...t})=>a.jsx("div",{className:Ce("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});or.displayName="DialogHeader";const zn=x.forwardRef(({className:e,...t},n)=>a.jsx(bv,{ref:n,className:Ce("text-lg font-semibold leading-none tracking-tight",e),...t}));zn.displayName=bv.displayName;const $D=x.forwardRef(({className:e,...t},n)=>a.jsx(wv,{ref:n,className:Ce("text-sm text-muted-foreground",e),...t}));$D.displayName=wv.displayName;const qD=()=>{const[e,t]=x.useState(!1),{t:n}=Sn(),r=[{icon:nr,title:n.about.features.mission.title,description:n.about.features.mission.description},{icon:la,title:n.about.features.education.title,description:n.about.features.education.description},{icon:js,title:n.about.features.support.title,description:n.about.features.support.description},{icon:$g,title:n.about.features.international.title,description:n.about.features.international.description},{icon:Dg,title:n.about.features.results.title,description:n.about.features.results.description},{icon:O2,title:n.about.features.objective.title,description:n.about.features.objective.description}];return a.jsx("section",{id:"about",className:"py-20 bg-pattern-waves",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 mb-20",children:[a.jsxs("div",{className:"text-center animate-slide-in-up",children:[a.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-primary/10 rounded-full mb-4 hover-glow",children:a.jsx(js,{className:"w-8 h-8 text-primary"})}),a.jsx("div",{className:"text-3xl font-bold text-primary mb-2",children:"734"}),a.jsx("div",{className:"text-muted-foreground",children:n.hero.stats.childrenSupported})]}),a.jsxs("div",{className:"text-center animate-slide-in-up",style:{animationDelay:"0.2s"},children:[a.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-primary/10 rounded-full mb-4 hover-glow",children:a.jsx(la,{className:"w-8 h-8 text-primary"})}),a.jsx("div",{className:"text-3xl font-bold text-primary mb-2",children:"1000+"}),a.jsx("div",{className:"text-muted-foreground",children:n.hero.stats.diplomasAchieved})]}),a.jsxs("div",{className:"text-center animate-slide-in-up",style:{animationDelay:"0.4s"},children:[a.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-primary/10 rounded-full mb-4 hover-glow",children:a.jsx(nr,{className:"w-8 h-8 text-primary"})}),a.jsx("div",{className:"text-3xl font-bold text-primary mb-2",children:"8"}),a.jsx("div",{className:"text-muted-foreground",children:n.hero.stats.countriesOfIntervention})]})]}),a.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[a.jsx("h2",{className:"text-section-title text-gradient",children:n.about.helpChildren}),a.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto leading-relaxed",children:n.about.subtitle})]}),a.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 items-center mb-20",children:[a.jsxs("div",{className:"animate-slide-in-up",children:[a.jsx("h3",{className:"text-3xl font-semibold mb-6 text-foreground",children:n.about.ourHistory}),a.jsxs("div",{className:"space-y-6 text-lg text-muted-foreground leading-relaxed",children:[a.jsx("p",{children:n.about.historyText1}),a.jsx("p",{children:n.about.historyText2}),a.jsx("p",{children:n.about.historyText3})]}),a.jsxs("div",{className:"mt-8 flex items-center gap-6",children:[a.jsx("img",{src:FM,alt:"Padre Giuseppe Paparone OP",className:"w-48 h-60 object-cover rounded-lg shadow-lg"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-lg font-semibold text-foreground",children:"Padre Giuseppe Paparone OP"}),a.jsx("p",{className:"text-muted-foreground",children:"1946 - 2021"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:n.about.founder})]})]}),a.jsx("div",{className:"mt-8",children:a.jsxs(sr,{open:e,onOpenChange:t,children:[a.jsx(Oj,{asChild:!0,children:a.jsxs("button",{className:"btn-primary inline-flex items-center gap-2",children:[a.jsx(js,{className:"w-5 h-5"}),n.about.orgChart]})}),a.jsxs(Ln,{className:"sm:max-w-lg",children:[a.jsx(or,{children:a.jsx(zn,{className:"text-2xl text-center mb-6",children:n.about.orgChart})}),a.jsxs("div",{className:"space-y-8",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("h4",{className:"text-sm font-semibold text-primary uppercase tracking-wider mb-2",children:n.about.president}),a.jsx("p",{className:"text-lg font-medium text-foreground",children:"Dott.ssa Ebe Faini Gatteschi"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("h4",{className:"text-sm font-semibold text-primary uppercase tracking-wider mb-2",children:n.about.vicePresident}),a.jsx("p",{className:"text-lg font-medium text-foreground",children:"Dott. Marco Barbaro"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("h4",{className:"text-sm font-semibold text-primary uppercase tracking-wider mb-3",children:n.about.board}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2 text-muted-foreground",children:[a.jsx("p",{children:"Ebe Faini Gatteschi"}),a.jsx("p",{children:"Marco Barbaro"}),a.jsx("p",{children:"Stella Curti"}),a.jsx("p",{children:"Roberto Cellina"}),a.jsx("p",{children:"Giuliana Belloni"}),a.jsx("p",{children:"Giulio Fezzardini"}),a.jsx("p",{children:"Elisabetta Gatteschi"}),a.jsx("p",{children:"Luisa Manzoni"}),a.jsx("p",{children:"Maura Rota"})]})]})]})]})]})})]}),a.jsx("div",{className:"animate-scale-in",children:a.jsxs("div",{className:"relative",children:[a.jsx("img",{src:DM,alt:"Bambini a scuola",className:"rounded-xl shadow-2xl hover-lift"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-primary/20 to-transparent roun
858ded-xl"}),a.jsxs("div",{className:"absolute bottom-6 left-6 text-white",children:[a.jsxs("p",{className:"text-lg font-semibold",children:["35 ",n.about.yearsOfCommitment]}),a.jsx("p",{className:"text-sm opacity-90",children:n.about.forBetterFuture})]})]})})]}),a.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:r.map((i,o)=>a.jsx("div",{className:"card-warm animate-slide-in-up hover-glow",style:{animationDelay:`${o*.1}s`},children:a.jsxs("div",{className:"flex items-start space-x-4",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center",children:a.jsx(i.icon,{className:"w-6 h-6 text-primary"})})}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-lg font-semibold mb-2 text-foreground",children:i.title}),a.jsx("p",{className:"text-muted-foreground leading-relaxed",children:i.description})]})]})},o))}),a.jsx("div",{className:"mt-20 text-center",children:a.jsxs("div",{className:"card-elegant max-w-4xl mx-auto",children:[a.jsx("h3",{className:"text-2xl font-semibold mb-4 text-foreground",children:n.about.whatCanYouDo}),a.jsx("p",{className:"text-lg text-muted-foreground mb-8 leading-relaxed",children:n.about.supportDescription}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[a.jsx("a",{href:"#donate",className:"btn-primary text-lg",children:n.about.supportChildDistance}),a.jsx("a",{href:"#donate",className:"btn-accent text-lg",children:n.about.discoverHowToHelp})]})]})})]})})},UD="/assets/brazilian-girl-portrait-lLXJ83Ia.jpg",VD="/assets/filipino-girl-portrait-FXEVz-qF.jpg",WD="/assets/roberta-brazilian-portrait-Dx4VlIkK.jpg",HD="/assets/fernanda-brazilian-portrait-CxRSh0E2.jpg",GD="/assets/cameroonian-girl-portrait-5kQE_bdt.jpg",KD=()=>{const[e,t]=x.useState(0),{t:n}=Sn(),r=[{name:"Jasmine",age:6,country:"Filippine",location:"Calabanga",image:VD,quote:"Io sono Jasmine e ho 6 anni. Quando ero piccola volevo già essere a scuola perché, secondo mio papà, a scuola potevo fare molte cose: potevo avere tanti amici per giocare, imparare a scrivere il mio nome, imparare a contare le monete nelle tasche di mio papà!",story:"Ma, dentro il cuore, avevo paura. Avevo paura che non sarei mai potuta andare a scuola perché i soldi all'interno della tasca di mio papà non erano mai abbastanza. Un giorno però papà è tornato a casa con una buona notizia. Ha detto che c'erano persone che volevano aiutarmi ad andare a scuola! Anche se sono lontano da me, voglio dire a loro GRAZIE",color:"bg-gradient-to-br from-pink-100 to-purple-100"},{name:"Cecilia",age:25,country:"Brasile",location:"San Paolo",image:UD,quote:"Mi chiamo Cecilia e abito a San Paolo. Grazie al progetto Abbà ho sempre potuto acquistare il materiale didattico, libri, l'uniforme e ho potuto pagare i trasporti a scuola.",story:"Ho superato il test di ingresso in una università privata di giornalismo e oggi coordino una struttura di assistenza psichiatrica con 500 pazienti e 25 dipendenti. Il progetto ha cambiato davvero la mia vita, mi ha dato l'opportunità di studiare e migliorarmi e mi ha insegnato che è importante aiutare il prossimo.",achievement:"Assistente Sociale",color:"bg-gradient-to-br from-green-100 to-emerald-100"},{name:"Roberta",age:19,country:"Brasile",location:"San Paolo",image:WD,quote:"Sono Roberta, ho 19 anni. Ho iniziato a studiare a sei anni e le suore mi parlavano dell'Associazione Abbà ma non riuscivo a capire perché delle persone lontane volevano aiutare chi non conoscevano.",story:"Grazie all'aiuto che ricevevo i miei genitori sono riusciti a vedere una prospettiva diversa per le loro vite. Hanno smesso entrambi di bere e hanno iniziato a dedicarsi di più ai figli. Io attualmente sto terminando le scuole superiori e grazie a voi posso realizzare il mio sogno di entrare in una università.",color:"bg-gradient-to-br from-blue-100 to-indigo-100"},{name:"Fernanda",age:24,country:"Brasile",location:"San Paolo",image:HD,quote:"Faccio parte del Progetto Abbà da quando avevo 9 anni e quando ho terminato la scuola volevo frequentare un corso universitario di Infermeria.",story:"A dicembre 2006 mi sono laureata ed è stata la mia maggior conquista. Attualmente sono molto felice perché sono infermiera nell'Ospedale Albert Einstein di Alphaville e mi occupo del trasporto aeromedico dei pazienti. Ringrazio Dio per avermi fatto incontrare Abbà.",achievement:"Infermiera Specializzata",color:"bg-gradient-to-br from-orange-100 to-red-100"},{name:"Mariane",age:22,country:"Camerun",location:"Bertoua",image:GD,quote:"Mariane ha avuto una vita molto dura: dopo la morte della madre per AIDS e poi del padre, ha vissuto a lungo con la nonna e la sorella handicappata.",story:"Nel 2007 ha terminato il biennio di informatica. Attualmente lavora come educatrice in una scuola materna ed è molto brava con i bambini. Lo stipendio le permette di provvedere alle sue necessità, alla figlioletta e di sua sorella disabile. Voglio ringraziarvi per tutto quello che fate per tutti i bambini del mondo.",achievement:"Educatrice",color:"bg-gradient-to-br from-yellow-100 to-amber-100"}],i=()=>{t(l=>(l+1)%r.length)},o=()=>{t(l=>(l-1+r.length)%r.length)};return a.jsx("section",{id:"stories",className:"py-20 bg-background",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[a.jsx("h2",{className:"text-section-title text-gradient",children:n.stories.title}),a.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:n.stories.subtitle})]}),a.jsxs("div",{className:"relative mb-12",children:[a.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[a.jsx("div",{className:"animate-scale-in",children:a.jsxs("div",{className:`rounded-2xl p-8 ${r[e].color} shadow-2xl hover-lift`,children:[a.jsxs("div",{className:"flex items-center mb-6",children:[a.jsx("img",{src:r[e].image,alt:r[e].name,className:"w-20 h-20 rounded-full object-cover border-4 border-white shadow-lg"}),a.jsxs("div",{className:"ml-4",children:[a.jsx("h3",{className:"text-2xl font-bold text-foreground",children:r[e].name}),a.jsxs("div",{className:"flex items-center text-muted-foreground",children:[a.jsx(Lo,{className:"w-4 h-4 mr-1"}),a.jsxs("span",{children:[r[e].location,", ",r[e].country]})]}),r[e].achievement&&a.jsxs("div",{className:"flex items-center text-primary font-medium mt
858-1",children:[a.jsx(b2,{className:"w-4 h-4 mr-1"}),a.jsx("span",{children:r[e].achievement})]})]})]}),a.jsxs("div",{className:"relative",children:[a.jsx(E2,{className:"absolute -top-2 -left-2 w-8 h-8 text-primary/20"}),a.jsxs("p",{className:"text-lg italic text-foreground/80 pl-6",children:['"',r[e].quote,'"']})]})]})}),a.jsx("div",{className:"animate-slide-in-up",children:a.jsxs("div",{className:"card-elegant",children:[a.jsxs("h4",{className:"text-xl font-semibold mb-4 text-foreground",children:[n.stories.storyOf," ",r[e].name]}),a.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed mb-6",children:r[e].story}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"text-sm text-muted-foreground",children:[n.stories.age,": ",r[e].age," ",n.stories.years]}),a.jsxs("button",{className:"btn-primary",children:[n.stories.supportChildLike," ",r[e].name]})]})]})})]}),a.jsx("button",{onClick:o,className:"absolute left-4 top-1/2 transform -translate-y-1/2 p-3 rounded-full bg-white shadow-lg hover:shadow-xl transition-all duration-300 hover-lift",children:a.jsx(Fg,{className:"w-6 h-6 text-primary"})}),a.jsx("button",{onClick:i,className:"absolute right-4 top-1/2 transform -translate-y-1/2 p-3 rounded-full bg-white shadow-lg hover:shadow-xl transition-all duration-300 hover-lift",children:a.jsx(Bg,{className:"w-6 h-6 text-primary"})})]}),a.jsx("div",{className:"flex justify-center space-x-4 mb-12",children:r.map((l,u)=>a.jsx("button",{onClick:()=>t(u),className:`group relative p-4 rounded-xl transition-all duration-300 ${u===e?"bg-primary text-primary-foreground shadow-lg scale-105":"bg-muted hover:bg-muted/80"}`,children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-sm font-medium",children:l.name}),a.jsx("div",{className:"text-xs opacity-80",children:l.country})]})},u))}),a.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mt-16",children:[a.jsxs("div",{className:"text-center card-warm animate-slide-in-up",children:[a.jsx("div",{className:"text-3xl font-bold text-primary mb-2",children:"1000+"}),a.jsx("div",{className:"text-muted-foreground",children:n.stories.stats.graduates})]}),a.jsxs("div",{className:"text-center card-warm animate-slide-in-up",style:{animationDelay:"0.1s"},children:[a.jsx("div",{className:"text-3xl font-bold text-accent mb-2",children:"50+"}),a.jsx("div",{className:"text-muted-foreground",children:n.stories.stats.universityGraduates})]}),a.jsxs("div",{className:"text-center card-warm animate-slide-in-up",style:{animationDelay:"0.2s"},children:[a.jsx("div",{className:"text-3xl font-bold text-growth mb-2",children:"8"}),a.jsx("div",{className:"text-muted-foreground",children:n.stories.stats.countries})]}),a.jsxs("div",{className:"text-center card-warm animate-slide-in-up",style:{animationDelay:"0.3s"},children:[a.jsx("div",{className:"text-3xl font-bold text-hope mb-2",children:"35"}),a.jsx("div",{className:"text-muted-foreground",children:n.stories.stats.yearsExperience})]})]}),a.jsx("div",{className:"text-center mt-16",children:a.jsxs("div",{className:"card-elegant max-w-3xl mx-auto",children:[a.jsx("h3",{className:"text-2xl font-semibold mb-4 text-foreground",children:n.stories.cta.title}),a.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:n.stories.cta.subtitle}),a.jsx("button",{className:"btn-primary text-lg",children:n.stories.cta.button})]})})]})})};var kp={exports:{}};/* @preserve
859 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
860 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
861 */(function(e,t){(function(n,r){r(t)})(WE,function(n){var r="1.9.4";function i(s){var c,h,v,S;for(h=1,v=arguments.length;h<v;h++){S=arguments[h];for(c in S)s[c]=S[c]}return s}var o=Object.create||function(){function s(){}return function(c){return s.prototype=c,new s}}();function l(s,c){var h=Array.prototype.slice;if(s.bind)return s.bind.apply(s,h.call(arguments,1));var v=h.call(arguments,2);return function(){return s.apply(c,v.length?v.concat(h.call(arguments)):arguments)}}var u=0;function d(s){return"_leaflet_id"in s||(s._leaflet_id=++u),s._leaflet_id}function f(s,c,h){var v,S,E,M;return M=function(){v=!1,S&&(E.apply(h,S),S=!1)}
861,E=function(){v?S=arguments:(s.apply(h,arguments),setTimeout(M,c),v=!0)},E}function p(s,c,h){var v=c[1],S=c[0],E=v-S;return s===v&&h?s:((s-S)%E+E)%E+S}function m(){return!1}function g(s,c){if(c===!1)return s;var h=Math.pow(10,c===void 0?6:c);return Math.round(s*h)/h}function y(s){return s.trim?s.trim():s.replace(/^\s+|\s+$/g,"")}function w(s){return y(s).split(/\s+/)}function b(s,c){Object.prototype.hasOwnProperty.call(s,"options")||(s.options=s.options?o(s.options):{});for(var h in c)s.options[h]=c[h];return s.options}function C(s,c,h){var v=[];for(var S in s)v.push(encodeURIComponent(h?S.toUpperCase():S)+"="+encodeURIComponent(s[S]));return(!c||c.indexOf("?")===-1?"?":"&")+v.join("&")}var j=/\{ *([\w_ -]+) *\}/g;function _(s,c){return s.replace(j,function(h,v){var S=c[v];if(S===void 0)throw new Error("No value provided for variable "+h);return typeof S=="function"&&(S=S(c)),S})}var N=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"};function A(s,c){for(var h=0;h<s.length;h++)if(s[h]===c)return h;return-1}var k="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function T(s){return window["webkit"+s]||window["moz"+s]||window["ms"+s]}var R=0;function P(s){var c=+new Date,h=Math.max(0,16-(c-R));return R=c+h,window.setTimeout(s,h)}var I=window.requestAnimationFrame||T("RequestAnimationFrame")||P,O=window.cancelAnimationFrame||T("CancelAnimationFrame")||T("CancelRequestAnimationFrame")||function(s){window.clearTimeout(s)};function B(s,c,h){if(h&&I===P)s.call(c);else return I.call(window,l(s,c))}function U(s){s&&O.call(window,s)}var ie={__proto__:null,extend:i,create:o,bind:l,get lastId(){return u},stamp:d,throttle:f,wrapNum:p,falseFn:m,formatNum:g,trim:y,splitWords:w,setOptions:b,getParamString:C,template:_,isArray:N,indexOf:A,emptyImageUrl:k,requestFn:I,cancelFn:O,requestAnimFrame:B,cancelAnimFrame:U};function G(){}G.extend=function(s){var c=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},h=c.__super__=this.prototype,v=o(h);v.constructor=c,c.prototype=v;for(var S in this)Object.prototype.hasOwnProperty.call(this,S)&&S!=="prototype"&&S!=="__super__"&&(c[S]=this[S]);return s.statics&&i(c,s.statics),s.includes&&(se(s.includes),i.apply(null,[v].concat(s.includes))),i(v,s),delete v.statics,delete v.includes,v.options&&(v.options=h.options?o(h.options):{},i(v.options,s.options)),v._initHooks=[],v.callInitHooks=function(){if(!this._initHooksCalled){h.callInitHooks&&h.callInitHooks.call(this),this._initHooksCalled=!0;for(var E=0,M=v._initHooks.length;E<M;E++)v._initHooks[E].call(this)}},c},G.include=function(s){var c=this.prototype.options;return i(this.prototype,s),s.options&&(this.prototype.options=c,this.mergeOptions(s.options)),this},G.mergeOptions=function(s){return i(this.prototype.options,s),this},G.addInitHook=function(s){var c=Array.prototype.slice.call(arguments,1),h=typeof s=="function"?s:function(){this[s].apply(this,c)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(h),this};function se(s){if(!(typeof L>"u"||!L||!L.Mixin)){s=N(s)?s:[s];for(var c=0;c<s.length;
861c++)s[c]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var Y={on:function(s,c,h){if(typeof s=="object")for(var v in s)this._on(v,s[v],c);else{s=w(s);for(var S=0,E=s.length;S<E;S++)this._on(s[S],c,h)}return this},off:function(s,c,h){if(!arguments.length)delete this._events;else if(typeof s=="object")for(var v in s)this._off(v,s[v],c);else{s=w(s);for(var S=arguments.length===1,E=0,M=s.length;E<M;E++)S?this._off(s[E]):this._off(s[E],c,h)}return this},_on:function(s,c,h,v){if(typeof c!="function"){console.warn("wrong listener type: "+typeof c);return}if(this._listens(s,c,h)===!1){h===this&&(h=void 0);var S={fn:c,ctx:h};v&&(S.once=!0),this._events=this._events||{},this._events[s]=this._events[s]||[],this._events[s].push(S)}},_off:function(s,c,h){var v,S,E;if(this._events&&(v=this._events[s],!!v)){if(arguments.length===1){if(this._firingCount)for(S=0,E=v.length;S<E;S++)v[S].fn=m;delete this._events[s];return}if(typeof c!="function"){console.warn("wrong listener type: "+typeof c);return}var M=this._listens(s,c,h);if(M!==!1){var $=v[M];this._firingCount&&($.fn=m,this._events[s]=v=v.slice()),v.splice(M,1)}}},fire:function(s,c,h){if(!this.listens(s,h))return this;var v=i({},c,{type:s,target:this,sourceTarget:c&&c.sourceTarget||this});if(this._events){var S=this._events[s];if(S){this._firingCount=this._firingCount+1||1;for(var E=0,M=S.length;E<M;E++){var $=S[E],q=$.fn;$.once&&this.off(s,q,$.ctx),q.call($.ctx||this,v)}this._firingCount--}}return h&&this._propagateEvent(v),this},listens:function(s,c,h,v){typeof s!="string"&&console.warn('"string" type argument expected');var S=c;typeof c!="function"&&(v=!!c,S=void 0,h=void 0);var E=this._events&&this._events[s];if(E&&E.length&&this._listens(s,S,h)!==!1)return!0;if(v){for(var M in this._eventParents)if(this._eventParents[M].listens(s,c,h,v))return!0}return!1},_listens:function(s,c,h){if(!this._events)return!1;var v=this._events[s]||[];if(!c)return!!v.length;h===this&&(h=void 0);for(var S=0,E=v.length;S<E;S++)if(v[S].fn===c&&v[S].ctx===h)return S;return!1},once:function(s,c,h){if(typeof s=="object")for(var v in s)this._on(v,s[v],c,!0);else{s=w(s);for(var S=0,E=s.length;S<E;S++)this._on(s[S],c,h,!0)}return this},addEventParent:function(s){return this._eventParents=this._eventParents||{},this._eventParents[d(s)]=s,this},removeEventParent:function(s){return this._eventParents&&delete this._eventParents[d(s)],this},_propagateEvent:function(s){for(var c in this._eventParents)this._eventParents[c].fire(s.type,i({layer:s.target,propagatedFrom:s.target},s),!0)}};Y.addEventListener=Y.on,Y.removeEventListener=Y.clearAllEventListeners=Y.off,Y.addOneTimeEventListener=Y.once,Y.fireEvent=Y.fire,Y.hasEventListeners=Y.listens;var le=G.extend(Y);function F(s,c,h){this.x=h?Math.round(s):s,this.y=h?Math.round(c):c}var K=Math.trunc||function(s){return s>0?Math.floor(s):Math.ceil(s)};F.prototype={clone:function(){return new F(this.x,this.y)},add:function(s){return this.clone()._add(H(s))},_add:function(s){return this.x+=s.x,this.y+=s.y,this},subtract:function(s){return this.clone()._subtract(H(s))},_subtract:function(s){return this.x-=s.x,this.y-=s.y,this},divideBy:function(s){return this.clone()._divideBy(s)},_divideBy:function(s){return this.x/=s,this.y/=s,this},multiplyBy:function(s){return this.clone()._multiplyBy(s)},_multiplyBy:function(s){return this.x*=s,this.y*=s,this},scaleBy:function(s){return new F(this.x*s.x,this.y*s.y)},unscaleBy:function(s){return new F(this.x/s.x,this.y/s.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=K(this.x),this.y=K(this.y),this},distanceTo:function(s){s=H(s);var c=s.x-this.x,h=s.y-this.y;return Math.sqrt(c*c+h*h)},equals:function(s){return s=H(s),s.x===this.x&&s.y===this.y},contains:function(s){return s=H(s),Math.abs(s.x)<=Math.abs(this.x)&&Math.abs(s.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function H(s,c,h){return s instanceof F?s:N(s)?new F(s[0],s[1]):s==null?s:typeof s=="object"&&"x"in s&&"y"in s?new F(s.x,s.y):new F(s,c,h)}function Z(s,c){if(s)for(var h=c?[s,c]:s,v=0,S=h.length;v<S;v++)this.extend(h[v])}Z.prototype={extend:function(s){var c,h;if(!s)return this;if(s instanceof F||typeof s[0]=="number"||"x"in s)c=h=H(s);else if(s=ee(s),c=s.min,h=s.max,!c||!h)return this;return!this.min&&!this.max?(this.min=c.clone(),this.max=h.clone()):(this.min.x=Math.min(c.x,this.min.x),this.max.x=Math.max(h.x,this.max.x),this.min.y=Math.min(c.y,this.min.y),this.max.y=Math.max(h.y,this.max.y)),this},getCenter:function(s){return H((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,s)},getBottomLeft:function(){return H(this.min.x,this.max.y)},getTopRight:function(){return H(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(s){var c,h;return typeof s[0]=="number"||s instanceof F?s=H(s):s=ee(s),s instanceof Z?(c=s.min,h=s.max):c=h=s,c.x>=this.min.x&&h.x<=this.max.x&&c.y>=this.min.y&&h.y<=this.max.y},intersects:function(s){s=ee(s);var c=this.min,h=this.max,v=s.min,S=s.max,E=S.x>=c.x&&v.x<=h.x,M=S.y>=c.y&&v.y<=h.y;return E&&M},overlaps:function(s){s=ee(s);var c=this.min,h=this.max,v=s.min,S=s.max,E=S.x>c.x&&v.x<h.x,M=S.y>c.y&&v.y<h.y;return E&&M},isValid:function(){return!!(this.min&&this.max)},pad:function(s){var c=this.min,h=this.max,v=Math.abs(c.x-h.x)*s,S=Math.abs(c.y-h.y)*s;return ee(H(c.x-v,c.y-S),H(h.x+v,h.y+S))},equals:function(s){return s?(s=ee(s),this.min.equals(s.getTopLeft())&&this.max.equals(s.getBottomRight())):!1}};function ee(s,c){return!s||s instanceof Z?s:new Z(s,c)}function ue(s,c){if(s)for(var h=c?[s,c]:s,v=0,S=h.length;v<S;v++)this.extend(h[v])}ue.prototype={extend:function(s){var c=this._southWest,h=this._northEast,v,S;if(s instanceof z)v=s,S=s;else if(s instanceof ue){if(v=s._southWest,S=s._northEast,!v||!S)return this}else return s?this.extend(W(s)||V(s)):this;return!c&&!h?(this._southWest=new z(v.lat,v.lng),this._northEast=new z(S.lat,S.lng)):(c.lat=Math.min(v.lat,c.lat),c.lng=Math.min(v.lng,c.lng),h.lat=Math.max(S.lat,h.lat),h.lng=Math.max(S.lng,h.lng)),this},pad:function(s){var c=this._southWest,h=this._northEast,v=Math.abs(c.lat-h.lat)*s,S=Math.abs(c.lng-h.lng)*s;return new ue(new z(c.lat-v,c.lng-S),new z(h.lat+v,h.lng+S))},getCenter:function(){return new z((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new z(this.getNorth(),this.getWest())},getSouthEast:function(){return new z(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat}
861,getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(s){typeof s[0]=="number"||s instanceof z||"lat"in s?s=W(s):s=V(s);var c=this._southWest,h=this._northEast,v,S;return s instanceof ue?(v=s.getSouthWest(),S=s.getNorthEast()):v=S=s,v.lat>=c.lat&&S.lat<=h.lat&&v.lng>=c.lng&&S.lng<=h.lng},intersects:function(s){s=V(s);var c=this._southWest,h=this._northEast,v=s.getSouthWest(),S=s.getNorthEast(),E=S.lat>=c.lat&&v.lat<=h.lat,M=S.lng>=c.lng&&v.lng<=h.lng;return E&&M},overlaps:function(s){s=V(s);var c=this._southWest,h=this._northEast,v=s.getSouthWest(),S=s.getNorthEast(),E=S.lat>c.lat&&v.lat<h.lat,M=S.lng>c.lng&&v.lng<h.lng;return E&&M},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(s,c){return s?(s=V(s),this._southWest.equals(s.getSouthWest(),c)&&this._northEast.equals(s.getNorthEast(),c)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function V(s,c){return s instanceof ue?s:new ue(s,c)}function z(s,c,h){if(isNaN(s)||isNaN(c))throw new Error("Invalid LatLng object: ("+s+", "+c+")");this.lat=+s,this.lng=+c,h!==void 0&&(this.alt=+h)}z.prototype={equals:function(s,c){if(!s)return!1;s=W(s);var h=Math.max(Math.abs(this.lat-s.lat),Math.abs(this.lng-s.lng));return h<=(c===void 0?1e-9:c)},toString:function(s){return"LatLng("+g(this.lat,s)+", "+g(this.lng,s)+")"},distanceTo:function(s){return ve.distance(this,W(s))},wrap:function(){return ve.wrapLatLng(this)},toBounds:function(s){var c=180*s/40075017,h=c/Math.cos(Math.PI/180*this.lat);return V([this.lat-c,this.lng-h],[this.lat+c,this.lng+h])},clone:function(){return new z(this.lat,this.lng,this.alt)}};function W(s,c,h){return s instanceof z?s:N(s)&&typeof s[0]!="object"?s.length===3?new z(s[0],s[1],s[2]):s.length===2?new z(s[0],s[1]):null:s==null?s:typeof s=="object"&&"lat"in s?new z(s.lat,"lng"in s?s.lng:s.lon,s.alt):c===void 0?null:new z(s,c,h)}var te={latLngToPoint:function(s,c){var h=this.projection.project(s),v=this.scale(c);return this.transformation._transform(h,v)},pointToLatLng:function(s,c){var h=this.scale(c),v=this.transformation.untransform(s,h);return this.projection.unproject(v)},project:function(s){return this.projection.project(s)},unproject:function(s){return this.projection.unproject(s)},scale:function(s){return 256*Math.pow(2,s)},zoom:function(s){return Math.log(s/256)/Math.LN2},getProjectedBounds:function(s){if(this.infinite)return null;var c=this.projection.bounds,h=this.scale(s),v=this.transformation.transform(c.min,h),S=this.transformation.transform(c.max,h);return new Z(v,S)},infinite:!1,wrapLatLng:function(s){var c=this.wrapLng?p(s.lng,this.wrapLng,!0):s.lng,h=this.wrapLat?p(s.lat,this.wrapLat,!0):s.lat,v=s.alt;return new z(h,c,v)},wrapLatLngBounds:function(s){var c=s.getCenter(),h=this.wrapLatLng(c),v=c.lat-h.lat,S=c.lng-h.lng;if(v===0&&S===0)return s;
861var E=s.getSouthWest(),M=s.getNorthEast(),$=new z(E.lat-v,E.lng-S),q=new z(M.lat-v,M.lng-S);return new ue($,q)}},ve=i({},te,{wrapLng:[-180,180],R:6371e3,distance:function(s,c){var h=Math.PI/180,v=s.lat*h,S=c.lat*h,E=Math.sin((c.lat-s.lat)*h/2),M=Math.sin((c.lng-s.lng)*h/2),$=E*E+Math.cos(v)*Math.cos(S)*M*M,q=2*Math.atan2(Math.sqrt($),Math.sqrt(1-$));return this.R*q}}),ke=6378137,ge={R:ke,MAX_LATITUDE:85.0511287798,project:function(s){var c=Math.PI/180,h=this.MAX_LATITUDE,v=Math.max(Math.min(h,s.lat),-h),S=Math.sin(v*c);return new F(this.R*s.lng*c,this.R*Math.log((1+S)/(1-S))/2)},unproject:function(s){var c=180/Math.PI;return new z((2*Math.atan(Math.exp(s.y/this.R))-Math.PI/2)*c,s.x*c/this.R)},bounds:function(){var s=ke*Math.PI;return new Z([-s,-s],[s,s])}()};function Ee(s,c,h,v){if(N(s)){this._a=s[0],this._b=s[1],this._c=s[2],this._d=s[3];return}this._a=s,this._b=c,this._c=h,this._d=v}Ee.prototype={transform:function(s,c){return this._transform(s.clone(),c)},_transform:function(s,c){return c=c||1,s.x=c*(this._a*s.x+this._b),s.y=c*(this._c*s.y+this._d),s},untransform:function(s,c){return c=c||1,new F((s.x/c-this._b)/this._a,(s.y/c-this._d)/this._c)}};function Ne(s,c,h,v){return new Ee(s,c,h,v)}var Ge=i({},ve,{code:"EPSG:3857",projection:ge,transformation:function(){var s=.5/(Math.PI*ge.R);return Ne(s,.5,-s,.5)}()}),tt=i({},Ge,{code:"EPSG:900913"});function pt(s){return document.createElementNS("http://www.w3.org/2000/svg",s)}function nt(s,c){var h="",v,S,E,M,$,q;for(v=0,E=s.length;v<E;v++){for($=s[v],S=0,M=$.length;S<M;S++)q=$[S],h+=(S?"L":"M")+q.x+" "+q.y;h+=c?pe.svg?"z":"x":""}return h||"M0 0"}var Fn=document.documentElement.style,ti="ActiveXObject"in window,wt=ti&&!document.addEventListener,Er="msLaunchUri"in navigator&&!("documentMode"in document),Fa=cr("webkit"),Ec=cr("android"),Qi=cr("android 2")||cr("android 3"),bh=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Tc=Ec&&cr("Google")&&bh<537&&!("AudioNode"in window),Yi=!!window.opera,Tr=!Er&&cr("chrome"),Ba=cr("gecko")&&!Fa&&!Yi&&!ti,ni=!Tr&&cr("safari"),$a=cr("phantom"),kc="OTransition"in Fn,Pc=navigator.platform.indexOf("Win")===0,qa=ti&&"transition"in Fn,Ua="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Qi,Ws="MozPerspective"in Fn,lr=!window.L_DISABLE_3D&&(qa||Ua||Ws)&&!kc&&!$a,Ji=typeof orientation<"u"||cr("mobile"),Te=Ji&&Fa,Ke=Ji&&Ua,We=!window.PointerEvent&&window.MSPointerEvent,ln=!!(window.PointerEvent||We),cn="ontouchstart"in window||!!window.TouchEvent,Hs=!window.L_NO_TOUCH&&(cn||ln),wh=Ji&&Yi,AC=Ji&&Ba,OC=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,RC=function(){var s=!1;try{var c=Object.defineProperty({},"passive",{get:function(){s=!0}});window.addEventListener("testPassiveEventSupport",m,c),window.removeEventListener("testPassiveEventSupport",m,c)}catch{}return s}(),IC=function(){return!!document.createElement("canvas").getContext}(),_h=!!(document.createElementNS&&pt("svg").createSVGRect),LC=!!_h&&function(){var s=document.createElement("div");return s.innerHTML="<svg/>",(s.firstChild&&s.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),zC=!_h&&function(){try{var s=document.createElement("div");s.innerHTML='<v:shape adj="1"/>';var c=s.firstChild;return c.style.behavior="url(#default#VML)",c&&typeof c.adj=="object"}catch{return!1}}(),MC=navigator.platform.indexOf("Mac")===0,DC=navigator.platform.indexOf("Linux")===0;function cr(s){return navigator.userAgent.toLowerCase().indexOf(s)>=0}var pe={ie:ti,ielt9:wt,edge:Er,webkit:Fa,android:Ec,android23:Qi,androidStock:Tc,opera:Yi,chrome:Tr,gecko:Ba,safari:ni,phantom:$a,opera12:kc,win:Pc,ie3d:qa,webkit3d:Ua,gecko3d:Ws,any3d:lr,mobile:Ji,mobileWebkit:Te,mobileWebkit3d:Ke,msPointer:We,pointer:ln,touch:Hs,touchNative:cn,mobileOpera:wh,mobileGecko:AC,retina:OC,passiveEvents:RC,canvas:IC,svg:_h,vml:zC,inlineSvg:LC,mac:MC,linux:DC},Dv=pe.msPointer?"MSPointerDown":"pointerdown",Fv=pe.msPointer?"MSPointerMove":"pointermove",Bv=pe.msPointer?"MSPointerUp":"pointerup",$v=pe.msPointer?"MSPointerCancel":"pointercancel",Sh={touchstart:Dv,touchmove:Fv,touchend:Bv,touchcancel:$v},qv={touchstart:VC,touchmove:Ac,touchend:Ac,touchcancel:Ac},Gs={},Uv=!1;function FC(s,c,h){return c==="touchstart"&&UC(),qv[c]?(h=qv[c].bind(this,h),s.addEventListener(Sh[c],h,!1),h):(console.warn("wrong event specified:",c),m)}function BC(s,c,h){if(!Sh[c]){console.warn("wrong event specified:",c);return}s.removeEventListener(Sh[c],h,!1)}function $C(s){Gs[s.pointerId]=s}function qC(s){Gs[s.pointerId]&&(Gs[s.pointerId]=s)}function Vv(s){delete Gs[s.pointerId]}
861function UC(){Uv||(document.addEventListener(Dv,$C,!0),document.addEventListener(Fv,qC,!0),document.addEventListener(Bv,Vv,!0),document.addEventListener($v,Vv,!0),Uv=!0)}function Ac(s,c){if(c.pointerType!==(c.MSPOINTER_TYPE_MOUSE||"mouse")){c.touches=[];for(var h in Gs)c.touches.push(Gs[h]);c.changedTouches=[c],s(c)}}function VC(s,c){c.MSPOINTER_TYPE_TOUCH&&c.pointerType===c.MSPOINTER_TYPE_TOUCH&&At(c),Ac(s,c)}function WC(s){var c={},h,v;for(v in s)h=s[v],c[v]=h&&h.bind?h.bind(s):h;return s=c,c.type="dblclick",c.detail=2,c.isTrusted=!1,c._simulated=!0,c}var HC=200;function GC(s,c){s.addEventListener("dblclick",c);var h=0,v;function S(E){if(E.detail!==1){v=E.detail;return}if(!(E.pointerType==="mouse"||E.sourceCapabilities&&!E.sourceCapabilities.firesTouchEvents)){var M=Zv(E);if(!(M.some(function(q){return q instanceof HTMLLabelElement&&q.attributes.for})&&!M.some(function(q){return q instanceof HTMLInputElement||q instanceof HTMLSelectElement}))){var $=Date.now();$-h<=HC?(v++,v===2&&c(WC(E))):v=1,h=$}}}return s.addEventListener("click",S),{dblclick:c,simDblclick:S}}function KC(s,c){s.removeEventListener("dblclick",c.dblclick),s.removeEventListener("click",c.simDblclick)}var jh=Ic(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Va=Ic(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Wv=Va==="webkitTransition"||Va==="OTransition"?Va+"End":"transitionend";function Hv(s){return typeof s=="string"?document.getElementById(s):s}function Wa(s,c){var h=s.style[c]||s.currentStyle&&s.currentStyle[c];if((!h||h==="auto")&&document.defaultView){var v=document.defaultView.getComputedStyle(s,null);h=v?v[c]:null}return h==="auto"?null:h}function $e(s,c,h){var v=document.createElement(s);return v.className=c||"",h&&h.appendChild(v),v}function it(s){var c=s.parentNode;c&&c.removeChild(s)}function Oc(s){for(;s.firstChild;)s.removeChild(s.firstChild)}function Ks(s){var c=s.parentNode;c&&c.lastChild!==s&&c.appendChild(s)}function Zs(s){var c=s.parentNode;c&&c.firstChild!==s&&c.insertBefore(s,c.firstChild)}function Nh(s,c){if(s.classList!==void 0)return s.classList.contains(c);var h=Rc(s);return h.length>0&&new RegExp("(^|\\s)"+c+"(\\s|$)").test(h)}function Oe(s,c){if(s.classList!==void 0)for(var h=w(c),v=0,S=h.length;v<S;v++)s.classList.add(h[v]);else if(!Nh(s,c)){var E=Rc(s);Ch(s,(E?E+" ":"")+c)}}function ht(s,c){s.classList!==void 0?s.classList.remove(c):Ch(s,y((" "+Rc(s)+" ").replace(" "+c+" "," ")))}function Ch(s,c){s.className.baseVal===void 0?s.className=c:s.className.baseVal=c}function Rc(s){return s.correspondingElement&&(s=s.correspondingElement),s.className.baseVal===void 0?s.className:s.className.baseVal}function jn(s,c){"opacity"in s.style?s.style.opacity=c:"filter"in s.style&&ZC(s,c)}function ZC(s,c){var h=!1,v="DXImageTransform.Microsoft.Alpha";try{h=s.filters.item(v)}catch{if(c===1)return}c=Math.round(c*100),h?(h.Enabled=c!==100,h.Opacity=c):s.style.filter+=" progid:"+v+"(opacity="+c+")"}function Ic(s){for(var c=document.documentElement.style,h=0;h<s.length;h++)if(s[h]in c)return s[h];return!1}function Xi(s,c,h){var v=c||new F(0,0);s.style[jh]=(pe.ie3d?"translate("+v.x+"px,"+v.y+"px)":"translate3d("+v.x+"px,"+v.y+"px,0)")+(h?" scale("+h+")":"")}function gt(s,c){s._leaflet_pos=c,pe.any3d?Xi(s,c):(s.style.left=c.x+"px",s.style.top=c.y+"px")}function es(s){return s._leaflet_pos||new F(0,0)}var Ha,Ga,Eh;if("onselectstart"in document)Ha=function(){Pe(window,"selectstart",At)},Ga=function(){Ze(window,"selectstart",At)};else{var Ka=Ic(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Ha=function(){if(Ka){var s=document.documentElement.style;Eh=s[Ka],s[Ka]="none"}},Ga=function(){Ka&&(document.documentElement.style[Ka]=Eh,Eh=void 0)}}function Th(){Pe(window,"dragstart",At)}function kh(){Ze(window,"dragstart",At)}var Lc,Ph;function Ah(s){for(;s.tabIndex===-1;)s=s.parentNode;s.style&&(zc(),Lc=s,Ph=s.style.outlineStyle,s.style.outlineStyle="none",Pe(window,"keydown",zc))}function zc(){Lc&&(Lc.style.outlineStyle=Ph,Lc=void 0,Ph=void 0,Ze(window,"keydown",zc))}function Gv(s){do s=s.parentNode;while((!s.offsetWidth||!s.offsetHeight)&&s!==document.body);return s}function Oh(s){var c=s.getBoundingClientRect();return{x:c.width/s.offsetWidth||1,y:c.height/s.offsetHeight||1,boundingClientRect:c}}var QC={__proto__:null,TRANSFORM:jh,TRANSITION:Va,TRANSITION_END:Wv,get:Hv,getStyle:Wa,create:$e,remove:it,empty:Oc,toFront:Ks,toBack:Zs,hasClass:Nh,addClass:Oe,removeClass:ht,setClass:Ch,getClass:Rc,setOpacity:jn,testProp:Ic,setTransform:Xi,setPosition:gt,getPosition:es,get disableTextSelection(){return Ha},get enableTextSelection(){return Ga},disableImageDrag:Th,enableImageDrag:kh,preventOutline:Ah,restoreOutline:zc,getSizedParentNode:Gv,getScale:Oh};function Pe(s,c,h,v){if(c&&typeof c=="object")for(var S in c)Ih(s,S,c[S],h);else{c=w(c);for(var E=0,M=c.length;E<M;E++)Ih(s,c[E],h,v)}return this}var ur="_leaflet_events";
861function Ze(s,c,h,v){if(arguments.length===1)Kv(s),delete s[ur];else if(c&&typeof c=="object")for(var S in c)Lh(s,S,c[S],h);else if(c=w(c),arguments.length===2)Kv(s,function($){return A(c,$)!==-1});else for(var E=0,M=c.length;E<M;E++)Lh(s,c[E],h,v);return this}function Kv(s,c){for(var h in s[ur]){var v=h.split(/\d/)[0];(!c||c(v))&&Lh(s,v,null,null,h)}}var Rh={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ih(s,c,h,v){var S=c+d(h)+(v?"_"+d(v):"");if(s[ur]&&s[ur][S])return this;var E=function($){return h.call(v||s,$||window.event)},M=E;!pe.touchNative&&pe.pointer&&c.indexOf("touch")===0?E=FC(s,c,E):pe.touch&&c==="dblclick"?E=GC(s,E):"addEventListener"in s?c==="touchstart"||c==="touchmove"||c==="wheel"||c==="mousewheel"?s.addEventListener(Rh[c]||c,E,pe.passiveEvents?{passive:!1}:!1):c==="mouseenter"||c==="mouseleave"?(E=function($){$=$||window.event,Mh(s,$)&&M($)},s.addEventListener(Rh[c],E,!1)):s.addEventListener(c,M,!1):s.attachEvent("on"+c,E),s[ur]=s[ur]||{},s[ur][S]=E}function Lh(s,c,h,v,S){S=S||c+d(h)+(v?"_"+d(v):"");var E=s[ur]&&s[ur][S];if(!E)return this;!pe.touchNative&&pe.pointer&&c.indexOf("touch")===0?BC(s,c,E):pe.touch&&c==="dblclick"?KC(s,E):"removeEventListener"in s?s.removeEventListener(Rh[c]||c,E,!1):s.detachEvent("on"+c,E),s[ur][S]=null}function ts(s){return s.stopPropagation?s.stopPropagation():s.originalEvent?s.originalEvent._stopped=!0:s.cancelBubble=!0,this}function zh(s){return Ih(s,"wheel",ts),this}function Za(s){return Pe(s,"mousedown touchstart dblclick contextmenu",ts),s._leaflet_disable_click=!0,this}function At(s){return s.preventDefault?s.preventDefault():s.returnValue=!1,this}function ns(s){return At(s),ts(s),this}function Zv(s){if(s.composedPath)return s.composedPath();for(var c=[],h=s.target;h;)c.push(h),h=h.parentNode;return c}function Qv(s,c){if(!c)return new F(s.clientX,s.clientY);var h=Oh(c),v=h.boundingClientRect;return new F((s.clientX-v.left)/h.x-c.clientLeft,(s.clientY-v.top)/h.y-c.clientTop)}var YC=pe.linux&&pe.chrome?window.devicePixelRatio:pe.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Yv(s){return pe.edge?s.wheelDeltaY/2:s.deltaY&&s.deltaMode===0?-s.deltaY/YC:s.deltaY&&s.deltaMode===1?-s.deltaY*20:s.deltaY&&s.deltaMode===2?-s.deltaY*60:s.deltaX||s.deltaZ?0:s.wheelDelta?(s.wheelDeltaY||s.wheelDelta)/2:s.detail&&Math.abs(s.detail)<32765?-s.detail*20:s.detail?s.detail/-32765*60:0}function Mh(s,c){var h=c.relatedTarget;if(!h)return!0;try{for(;h&&h!==s;)h=h.parentNode}catch{return!1}return h!==s}var JC={__proto__:null,on:Pe,off:Ze,stopPropagation:ts,disableScrollPropagation:zh,disableClickPropagation:Za,preventDefault:At,stop:ns,getPropagationPath:Zv,getMousePosition:Qv,getWheelDelta:Yv,isExternalTarget:Mh,addListener:Pe,removeListener:Ze},Jv=le.extend({run:function(s,c,h,v){this.stop(),this._el=s,this._inProgress=!0,this._duration=h||.25,this._easeOutPower=1/Math.max(v||.5,.2),this._startPos=es(s),this._offset=c.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=B(this._animate,this),this._step()},_step:function(s){var c=+new Date-this._startTime,h=this._duration*1e3;c<h?this._runFrame(this._easeOut(c/h),s):(this._runFrame(1),this._complete())},_runFrame:function(s,c){var h=this._startPos.add(this._offset.multiplyBy(s));c&&h._round(),gt(this._el,h),this.fire("step")},_complete:function(){U(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(s){return 1-Math.pow(1-s,this._easeOutPower)}}),De=le.extend({options:{crs:Ge,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(s,c){c=b(this,c),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(s),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),c.maxBounds&&this.setMaxBounds(c.maxBounds),c.zoom!==void 0&&(this._zoom=this._limitZoom(c.zoom)),c.center&&c.zoom!==void 0&&this.setView(W(c.center),c.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Va&&pe.any3d&&!pe.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Pe(this._proxy,Wv,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
vendor: 1,352 bytes, line 861
861,setView:function(s,c,h){if(c=c===void 0?this._zoom:this._limitZoom(c),s=this._limitCenter(W(s),c,this.options.maxBounds),h=h||{},this._stop(),this._loaded&&!h.reset&&h!==!0){h.animate!==void 0&&(h.zoom=i({animate:h.animate},h.zoom),h.pan=i({animate:h.animate,duration:h.duration},h.pan));var v=this._zoom!==c?this._tryAnimatedZoom&&this._tryAnimatedZoom(s,c,h.zoom):this._tryAnimatedPan(s,h.pan);if(v)return clearTimeout(this._sizeTimer),this}return this._resetView(s,c,h.pan&&h.pan.noMoveStart),this},setZoom:function(s,c){return this._loaded?this.setView(this.getCenter(),s,{zoom:c}):(this._zoom=s,this)},zoomIn:function(s,c){return s=s||(pe.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+s,c)},zoomOut:function(s,c){return s=s||(pe.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-s,c)},setZoomAround:function(s,c,h){var v=this.getZoomScale(c),S=this.getSize().divideBy(2),E=s instanceof F?s:this.latLngToContainerPoint(s),M=E.subtract(S).multiplyBy(1-1/v),$=this.containerPointToLatLng(S.add(M));return this.setView($,c,{zoom:h})},_getBoundsCenterZoom:function(s,c){c=c||{},s=s.getBounds?s.getBounds():V(s);var h=H(c.paddingTopLeft||c.padding||[0,0]),v=H(c.paddingBottomRight||c.padding||[0,0]),S=this.getBoundsZoom(s,!1,h.add(v));if(S=typeof c.maxZoom=="number"?Math.min(c.maxZoom,S):S,S===1/0)return{center:s.getCenter(),zoom:S};
861var E=v.subtract(h).divideBy(2),M=this.project(s.getSouthWest(),S),$=this.project(s.getNorthEast(),S),q=this.unproject(M.add($).divideBy(2).add(E),S);return{center:q,zoom:S}},fitBounds:function(s,c){if(s=V(s),!s.isValid())throw new Error("Bounds are not valid.");var h=this._getBoundsCenterZoom(s,c);return this.setView(h.center,h.zoom,c)},fitWorld:function(s){return this.fitBounds([[-90,-180],[90,180]],s)},panTo:function(s,c){return this.setView(s,this._zoom,{pan:c})},panBy:function(s,c){if(s=H(s).round(),c=c||{},!s.x&&!s.y)return this.fire("moveend");if(c.animate!==!0&&!this.getSize().contains(s))return this._resetView(this.unproject(this.project(this.getCenter()).add(s)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Jv,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),c.noMoveStart||this.fire("movestart"),c.animate!==!1){Oe(this._mapPane,"leaflet-pan-anim");var h=this._getMapPanePos().subtract(s).round();this._panAnim.run(this._mapPane,h,c.duration||.25,c.easeLinearity)}else this._rawPanBy(s),this.fire("move").fire("moveend");return this},flyTo:function(s,c,h){if(h=h||{},h.animate===!1||!pe.any3d)return this.setView(s,c,h);this._stop();var v=this.project(this.getCenter()),S=this.project(s),E=this.getSize(),M=this._zoom;s=W(s),c=c===void 0?M:c;var $=Math.max(E.x,E.y),q=$*this.getZoomScale(M,c),Q=S.distanceTo(v)||1,oe=1.42,_e=oe*oe;function Ie(vt){var Kc=vt?-1:1,BE=vt?q:$,$E=q*q-$*$+Kc*_e*_e*Q*Q,qE=2*BE*_e*Q,Kh=$E/qE,Oy=Math.sqrt(Kh*Kh+1)-Kh,UE=Oy<1e-9?-18:Math.log(Oy);return UE}function Vt(vt){return(Math.exp(vt)-Math.exp(-vt))/2}function Ct(vt){return(Math.exp(vt)+Math.exp(-vt))/2}function Cn(vt){return Vt(vt)/Ct(vt)}var Xt=Ie(0);function to(vt){return $*(Ct(Xt)/Ct(Xt+oe*vt))}function zE(vt){return $*(Ct(Xt)*Cn(Xt+oe*vt)-Vt(Xt))/_e}function ME(vt){return 1-Math.pow(1-vt,1.5)}var DE=Date.now(),Py=(Ie(1)-Xt)/oe,FE=h.duration?1e3*h.duration:1e3*Py*.8;function Ay(){var vt=(Date.now()-DE)/FE,Kc=ME(vt)*Py;vt<=1?(this._flyToFrame=B(Ay,this),this._move(this.unproject(v.add(S.subtract(v).multiplyBy(zE(Kc)/Q)),M),this.get
vendor: 5,146 bytes, line 861
861ScaleZoom($/to(Kc),M),{flyTo:!0})):this._move(s,c)._moveEnd(!0)}return this._moveStart(!0,h.noMoveStart),Ay.call(this),this},flyToBounds:function(s,c){var h=this._getBoundsCenterZoom(s,c);return this.flyTo(h.center,h.zoom,c)},setMaxBounds:function(s){return s=V(s),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),s.isValid()?(this.options.maxBounds=s,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(s){var c=this.options.minZoom;return this.options.minZoom=s,this._loaded&&c!==s&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(s):this},setMaxZoom:function(s){var c=this.options.maxZoom;return this.options.maxZoom=s,this._loaded&&c!==s&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(s):this},panInsideBounds:function(s,c){this._enforcingBounds=!0;var h=this.getCenter(),v=this._limitCenter(h,this._zoom,V(s));return h.equals(v)||this.panTo(v,c),this._enforcingBounds=!1,this},panInside:function(s,c){c=c||{};var h=H(c.paddingTopLeft||c.padding||[0,0]),v=H(c.paddingBottomRight||c.padding||[0,0]),S=this.project(this.getCenter()),E=this.project(s),M=this.getPixelBounds(),$=ee([M.min.add(h),M.max.subtract(v)]),q=$.getSize();if(!$.contains(E)){this._enforcingBounds=!0;var Q=E.subtract($.getCenter()),oe=$.extend(E).getSize().subtract(q);S.x+=Q.x<0?-oe.x:oe.x,S.y+=Q.y<0?-oe.y:oe.y,this.panTo(this.unproject(S),c),this._enforcingBounds=!1}return this},invalidateSize:function(s){if(!this._loaded)return this;s=i({animate:!1,pan:!0},s===!0?{animate:!0}:s);var c=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var h=this.getSize(),v=c.divideBy(2).round(),S=h.divideBy(2).round(),E=v.subtract(S);return!E.x&&!E.y?this:(s.animate&&s.pan?this.panBy(E):(s.pan&&this._rawPanBy(E),this.fire("move"),s.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:c,newSize:h}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(s){if(s=this._locateOptions=i({timeout:1e4,watch:!1},s),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var c=l(this._handleGeolocationResponse,this),h=l(this._handleGeolocationError,this);return s.watch?this._locationWatchId=navigator.geolocation.watchPosition(c,h,s):navigator.geolocation.getCurrentPosition(c,h,s),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(s){if(this._container._leaflet_id){var c=s.code,h=s.message||(c===1?"permission denied":c===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:c,message:"Geolocation error: "+h+"."})}},_handleGeolocationResponse:function(s){if(this._container._leaflet_id){var c=s.coords.latitude,h=s.coords.longitude,v=new z(c,h),S=v.toBounds(s.coords.accuracy*2),E=this._locateOptions;if(E.setView){var M=this.getBoundsZoom(S);this.setView(v,E.maxZoom?Math.min(M,E.maxZoom):M)}var $={latlng:v,bounds:S,timestamp:s.timestamp};for(var q in s.coords)typeof s.coords[q]=="number"&&($[q]=s.coords[q]);this.fire("locationfound",$)}},addHandler:function(s,c){if(!c)return this;var h=this[s]=new c(this);return this._handlers.push(h),this.options[s]&&h.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),it(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(U(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var s;for(s in this._layers)this._layers[s].remove();for(s in this._panes)it(this._panes[s]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(s,c){var h="leaflet-pane"+(s?" leaflet-"+s.replace("Pane","")+"-pane":""),v=$e("div",h,c||this._mapPane);return s&&(this._panes[s]=v),v},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var s=this.getPixelBounds(),c=this.unproject(s.getBottomLeft()),h=this.unproject(s.getTopRight());return new ue(c,h)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZo
861om===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(s,c,h){s=V(s),h=H(h||[0,0]);var v=this.getZoom()||0,S=this.getMinZoom(),E=this.getMaxZoom(),M=s.getNorthWest(),$=s.getSouthEast(),q=this.getSize().subtract(h),Q=ee(this.project($,v),this.project(M,v)).getSize(),oe=pe.any3d?this.options.zoomSnap:1,_e=q.x/Q.x,Ie=q.y/Q.y,Vt=c?Math.max(_e,Ie):Math.min(_e,Ie);return v=this.getScaleZoom(Vt,v),oe&&(v=Math.round(v/(oe/100))*(oe/100),v=c?Math.ceil(v/oe)*oe:Math.floor(v/oe)*oe),Math.max(S,Math.min(E,v))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new F(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(s,c){var h=this._getTopLeftPoint(s,c);return new Z(h,h.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(s){return this.options.crs.getProjectedBounds(s===void 0?this.getZoom():s)},getPane:function(s){return typeof s=="string"?this._panes[s]:s},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(s,c){var h=this.options.crs;return c=c===void 0?this._zoom:c,h.scale(s)/h.scale(c)},getScaleZoom:function(s,c){var h=this.options.crs;c=c===void 0?this._zoom:c;var v=h.zoom(s*h.scale(c));return isNaN(v)?1/0:v},project:function(s,c){return c=c===void 0?this._zoom:c,this.options.crs.latLngToPoint(W(s),c)},unproject:function(s,c){return c=c===void 0?this._zoom:c,this.options.crs.pointToLatLng(H(s),c)},layerPointToLatLng:function(s){var c=H(s).add(this.getPixelOrigin());return this.unproject(c)},latLngToLayerPoint:function(s){var c=this.project(W(s))._round();return c._subtract(this.getPixelOrigin())},wrapLatLng:function(s){return this.options.crs.wrapLatLng(W(s))},wrapLatLngBounds:function(s){return this.options.crs.wrapLatLngBounds(V(s))},distance:function(s,c){return this.options.crs.distance(W(s),W(c))},containerPointToLayerPoint:function(s){return H(s).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(s){return H(s).add(this._getMapPanePos())},containerPointToLatLng:function(s){var c=this.containerPointToLayerPoint(H(s));return this.layerPointToLatLng(c)},latLngToContainerPoint:function(s){return this.layerPointToContainerPoint(this.latLngToLayerPoint(W(s)))},mouseEventToContainerPoint:function(s){return Qv(s,this._container)},mouseEventToLayerPoint:function(s){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(s))},mouseEventToLatLng:function(s){return this.layerPointToLatLng(this.mouseEventToLayerPoint(s))},_initContainer:function(s){var c=this._container=Hv(s);if(c){if(c._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Pe(c,"scroll",this._onScroll,this),this._containerId=d(c)},_initLayout:function(){var s=this._container;this._fadeAnimated=this.options.fadeAnimation&&pe.any3d,Oe(s,"leaflet-container"+(pe.touch?" leaflet-touch":"")+(pe.retina?" leaflet-retina":"")+(pe.ielt9?" leaflet-oldie":"")+(pe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var c=Wa(s,"position");c!=="absolute"&&c!=="relative"&&c!=="fixed"&&c!=="sticky"&&(s.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var s=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),gt(this._mapPane,new F(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Oe(s.markerPane,"leaflet-zoom-hide"),Oe(s.shadowPane,"leaflet-zoom-hide"))},_resetView:function(s,c,h){gt(this._mapPane,new F(0,0));var v=!this._loaded;this._loaded=!0,c=this._limitZoom(c),this.fire("viewprereset");var S=this._zoom!==c;this._moveStart(S,h)._move(s,c)._moveEnd(S),this.fire("viewreset"),v&&this.fire("load")},_moveStart:function(s,c){return s&&this.fire("zoomstart"),c||this.fire("movestart"),this},_move:function(s,c,h,v){c===void 0&&(c=this._zoom);var S=this._zoom!==c;return this._zoom=c,this._lastCenter=s,this._pixelOrigin=this._getNewPixelOrigin(s),v?h&&h.pinch&&this.fire("zoom",h):((S||h&&h.pinch)&&this.fire("zoom",h),this.fire("move",h)),this},_moveEnd:function(s){return s&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return U(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(s){gt(this._mapPane,this._getMapPanePos().subtract(s))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(s){this._targets={},this._targets[d(this._container)]=this;var c=s?Ze:Pe;c(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&c(window,"resize",this._onResize,this),pe.any3d&&this.options.transform3DLimit&&(s?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){U(this._resizeRequest),this._resizeRequest=B(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var s=this._getMapPanePos();Math.max(Math.abs(s.x),Math.abs(s.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(s,c){for(var h=[],v,S=c==="mouseout"||c==="mouseover",E=s.target||s.srcElement,M=!1;E;){if(v=this._targets[d(E)],v&&(c==="click"||c==="preclick")&&this._draggableMoved(v)){M=!0;break}if(v&&v.listens(c,!0)&&(S&&!Mh(E,s)||(h.push(v),S))||E===this._container)break;E=E.parentNode}return!h.length&&!M&&!S&&this.listens(c,!0)&&(h=[this]),h},_isClickDisabled:function(s){for(;s&&s!==this._container;){if(s._leaflet_disable_click)return!0;s=s.parentNode}},_handleDOMEvent:function(s){var c=s.target||s.srcElement;if(!(!this._loaded||c._leaflet_disable_events||s.type==="click"&&this._isCl
861ickDisabled(c))){var h=s.type;h==="mousedown"&&Ah(c),this._fireDOMEvent(s,h)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(s,c,h){if(s.type==="click"){var v=i({},s);v.type="preclick",this._fireDOMEvent(v,v.type,h)}var S=this._findEventTargets(s,c);if(h){for(var E=[],M=0;M<h.length;M++)h[M].listens(c,!0)&&E.push(h[M]);S=E.concat(S)}if(S.length){c==="contextmenu"&&At(s);var $=S[0],q={originalEvent:s};if(s.type!=="keypress"&&s.type!=="keydown"&&s.type!=="keyup"){var Q=$.getLatLng&&(!$._radius||$._radius<=10);q.containerPoint=Q?this.latLngToContainerPoint($.getLatLng()):this.mouseEventToContainerPoint(s),q.layerPoint=this.containerPointToLayerPoint(q.containerPoint),q.latlng=Q?$.getLatLng():this.layerPointToLatLng(q.layerPoint)}for(M=0;M<S.length;M++)if(S[M].fire(c,q,!0),q.originalEvent._stopped||S[M].options.bubblingMouseEvents===!1&&A(this._mouseEvents,c)!==-1)return}},_draggableMoved:function(s){return s=s.dragging&&s.dragging.enabled()?s:this,s.dragging&&s.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var s=0,c=this._handlers.length;s<c;s++)this._handlers[s].disable()},whenReady:function(s,c){return this._loaded?s.call(c||this,{target:this}):this.on("load",s,c),this},_getMapPanePos:function(){return es(this._mapPane)||new F(0,0)},_moved:function(){var s=this._getMapPanePos();return s&&!s.equals([0,0])},_getTopLeftPoint:function(s,c){var h=s&&c!==void 0?this._getNewPixelOrigin(s,c):this.getPixelOrigin();return h.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(s,c){var h=this.getSize()._divideBy(2);return this.project(s,c)._subtract(h)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(s,c,h){var v=this._getNewPixelOrigin(h,c);return this.project(s,c)._subtract(v)},_latLngBoundsToNewLayerBounds:function(s,c,h){var v=this._getNewPixelOrigin(h,c);
vendor: 14,315 bytes, line 861
861return ee([this.project(s.getSouthWest(),c)._subtract(v),this.project(s.getNorthWest(),c)._subtract(v),this.project(s.getSouthEast(),c)._subtract(v),this.project(s.getNorthEast(),c)._subtract(v)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(s){return this.latLngToLayerPoint(s).subtract(this._getCenterLayerPoint())},_limitCenter:function(s,c,h){if(!h)return s;var v=this.project(s,c),S=this.getSize().divideBy(2),E=new Z(v.subtract(S),v.add(S)),M=this._getBoundsOffset(E,h,c);return Math.abs(M.x)<=1&&Math.abs(M.y)<=1?s:this.unproject(v.add(M),c)},_limitOffset:function(s,c){if(!c)return s;var h=this.getPixelBounds(),v=new Z(h.min.add(s),h.max.add(s));return s.add(this._getBoundsOffset(v,c))},_getBoundsOffset:function(s,c,h){var v=ee(this.project(c.getNorthEast(),h),this.project(c.getSouthWest(),h)),S=v.min.subtract(s.min),E=v.max.subtract(s.max),M=this._rebound(S.x,-E.x),$=this._rebound(S.y,-E.y);return new F(M,$)},_rebound:function(s,c){return s+c>0?Math.round(s-c)/2:Math.max(0,Math.ceil(s))-Math.max(0,Math.floor(c))},_limitZoom:function(s){var c=this.getMinZoom(),h=this.getMaxZoom(),v=pe.any3d?this.options.zoomSnap:1;return v&&(s=Math.round(s/v)*v),Math.max(c,Math.min(h,s))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ht(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(s,c){var h=this._getCenterOffset(s)._trunc();return(c&&c.animate)!==!0&&!this.getSize().contains(h)?!1:(this.panBy(h,c),!0)},_createAnimProxy:function(){var s=this._proxy=$e("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(s),this.on("zoomanim",function(c){var h=jh,v=this._proxy.style[h];Xi(this._proxy,this.project(c.center,c.zoom),this.getZoomScale(c.zoom,1)),v===this._proxy.style[h]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){it(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var s=this.getCenter(),c=this.getZoom();Xi(this._proxy,this.project(s,c),this.getZoomScale(c,1))},_catchTransitionEnd:function(s){this._animatingZoom&&s.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(s,c,h){if(this._animatingZoom)return!0;if(h=h||{},!this._zoomAnimated||h.animate===!1||this._nothingToAnimate()||Math.abs(c-this._zoom)>this.options.zoomAnimationThreshold)return!1;var v=this.getZoomScale(c),S=this._getCenterOffset(s)._divideBy(1-1/v);return h.animate!==!0&&!this.getSize().contains(S)?!1:(B(function(){this._moveStart(!0,h.noMoveStart||!1)._animateZoom(s,c,!0)},this),!0)},_animateZoom:function(s,c,h,v){this._mapPane&&(h&&(this._animatingZoom=!0,this._animateToCenter=s,this._animateToZoom=c,Oe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:s,zoom:c,noUpdate:v}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ht(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function XC(s,c){return new De(s,c)}var Bn=G.extend({options:{position:"topright"},initialize:function(s){b(this,s)},getPosition:function(){return this.options.position},setPosition:function(s){var c=this._map;return c&&c.removeControl(this),this.options.position=s,c&&c.addControl(this),this},getContainer:function(){return this._container},addTo:function(s){this.remove(),this._map=s;var c=this._container=this.onAdd(s),h=this.getPosition(),v=s._controlCorners[h];return Oe(c,"leaflet-control"),h.indexOf("bottom")!==-1?v.insertBefore(c,v.firstChild):v.appendChild(c),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(it(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(s){this._map&&s&&s.screenX>0&&s.screenY>0&&this._map.getContainer().focus()}}),Qa=function(s){return new Bn(s)};De.include({addControl:function(s){return s.addTo(this),this},removeControl:function(s){return s.remove(),this},_initControlPos:function(){var s=this._controlCorners={},c="leaflet-",h=this._controlContainer=$e("div",c+"control-container",this._container);function v(S,E){var M=c+S+" "+c+E;s[S+E]=$e("div",M,h)}v("top","left"),v("top","right"),v("bottom","left"),v("bottom","right")},_clearControlPos:function(){for(var s in this._controlCorners)it(this._controlCorners[s]);it(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Xv=Bn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(s,c,h,v){return h<v?-1:v<h?1:0}},initialize:function(s,c,h){b(this,h),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var v in s)this._addLayer(s[v],v);for(v in c)this._addLayer(c[v],v,!0)},onAdd:function(s){this._initLayout(),this._update(),this._map=s,s.on("zoomend",this._checkDisabledLayers,this);for(var c=0;c<this._layers.length;c++)this._layers[c].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(s){return Bn.prototype.addTo.call(this,s),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var s=0;s<this._layers.length;s++)this._layers[s].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(s,c){return this._addLayer(s,c),this._map?this._update():this},addOverlay:function(s,c){return this._addLayer(s,c,!0),this._map?this._update():this},removeLayer:function(s){s.off("add remove",this._onLayerChange,this);var c=this._getLayer(d(s));return c&&this._layers.splice(this._layers.indexOf(c),1),this._map?this._update():this},expand:function(){Oe(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var s=this._map.getSize().y-(this._container.offsetTop+50);return s<this._section.clientHeight?(Oe(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=s+"px"):ht(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ht(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var s="leaflet-control-layers",c=this._container=$e("div",s),h=this.options.collapsed;c.setAttribute("aria-haspopup",!0),Za(c),zh(c);var v=this._section=$e("section",s+"-list");h&&(this._map.on("click",this.collapse,this),Pe(c,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var S=this._layersLink=$e("a",s+"-toggle",c);S.href="#",S.title="Layers",S.setAttribute("role","button"),Pe(S,{keydown:function(E){E.keyCode===13&&this._expandSafely()},click:function(E){At(E),this._expandSafely()}},this),h||this.expand(),this._baseLayersList=$e("div",s+"-base",v),this._separator=$e("div",s+"-separator",v),this._overlaysList=$e("div",s+"-overlays",v),c.appendChild(v)},_getLayer:function(s){for(var c=0;c<this._layers.length;c++)if(this._layers[c]&&d(this._layers[c].layer)===s)return this._layers[c]},_addLayer:function(s,c,h){this._map&&s.on("add remove",this._onLayerChange,this),this._layers.push({layer:s,name:c,overlay:h}),this.options.sortLayers&&this._layers.sort(l(function(v,S){return this.options.sortFunction(v.layer,S.layer,v.name,S.name)},this)),this.options.autoZIndex&&s.setZIndex&&(this._lastZIndex++,s.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Oc(this._baseLayersList),Oc(this._overlaysList),this._layerControlInputs=[];var s,c,h,v,S=0;for(h=0;h<this._layers.length;h++)v=this._layers[h],this._addItem(v),c=c||v.overlay,s=s||!v.overlay,S+=v.overlay?0:1;return this.options.hideSingleBase&&(s=s&&S>1,this._baseLayersList.style.display=s?"":"none"),this._separator.style.display=c&&s?"":"none",this},_onLayerChange:function(s){this._handlingClick||this._update();var c=this._getLayer(d(s.target)),h=c.overlay?s.type==="add"?"overlayadd":"overlayremove":s.type==="add"?"baselayerchange":null;h&&this._map.fire(h,c)},_createRadioElement:function(s,c){var h='<input type="radio" class="leaflet-control-layers-selector" name="'+s+'"'+(c?' checked="checked"':"")+"/>",v=document.createElement("div");return v.innerHTML=h,v.firstChild},_addItem:function(s){var c=document.createElement("label"),h=this._map.hasLayer(s.layer),v;s.overlay?(v=document.createElement("input"),v.type="checkbox",v.className="leaflet-control-layers-selector",v.defaultChecked=h):v=this._createRadioElement("leaflet-base-layers_"+d(this),h),this._layerControlInputs.push(v),v.layerId=d(s.layer),Pe(v,"click",this._onInputClick,this);var S=document.createElement("span");S.innerHTML=" "+s.name;var E=document.createElement("span");c.appendChild(E),E.appendChild(v),E.appendChild(S);var M=s.overlay?this._overlaysList:this._baseLayersList;return M.appendChild(c),this._checkDisabledLayers(),c},_onInputClick:function(){if(!this._preventClick){var s=this._layerControlInputs,c,h,v=[],S=[];this._handlingClick=!0;for(var E=s.length-1;E>=0;E--)c=s[E],h=this._getLayer(c.layerId).layer,c.checked?v.push(h):c.checked||S.push(h);for(E=0;E<S.length;E++)this._map.hasLayer(S[E])&&this._map.removeLayer(S[E]);for(E=0;E<v.length;E++)this._map.hasLayer(v[E])||this._map.addLayer(v[E]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var s=this._layerControlInputs,c,h,v=this._map.getZoom(),S=s.length-1;S>=0;S--)c=s[S],h=this._getLayer(c.layerId).layer,c.disabled=h.options.minZoom!==void 0&&v<h.options.minZoom||h.options.maxZoom!==void 0&&v>h.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var s=this._section;this._preventClick=!0,Pe(s,"click",At),this.expand();var c=this;setTimeout(function(){Ze(s,"click",At),c._preventClick=!1})}}),eE=function(s,c,h){return new Xv(s,c,h)},Dh=Bn.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(s){var c="leaflet-control-zoom",h=$e("div",c+" leaflet-bar"),v=this.options;return this._zoomInButton=this._createButton(v.zoomInText,v.zoomInTitle,c+"-in",h,this._zoomIn),this._zoomOutButton=this._createButton(v.zoomOutText,v.zoomOutTitle,c+"-out",h,this._zoomOut),this._updateDisabled(),s.on("zoomend zoomlevelschange",this._updateDisabled,this),h},onRemove:function(s){s.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(s){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(s.shiftKey?3:1))},_zoomOut:function(s){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(s.shiftKey?3:1))},_createButton:function(s,c,h,v,S){var E=$e("a",h,v);return E.innerHTML=s,E.href="#",E.title=c,E.setAttribute("role","button"),E.setAttribute("aria-label",c),Za(E),Pe(E,"click",ns),Pe(E,"click",S,this),Pe(E,"click",this._refocusOnMap,this),E},_updateDisabled:function(){var s=this._map,c="leaflet-disabled";ht(this._zoomInButton,c),ht(this._zoomOutButton,c),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||s._zoom===s.getMinZoom())&&(Oe(this._zoomOutButton,c),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||s._zoom===s.getMaxZoom())&&(Oe(this._zoomInButton,c),this._zoomInButton.setAttribute("aria-disabled","true"))}});De.mergeOptions({zoomControl:!0}),De.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Dh,this.addControl(this.zoomControl))});var tE=function(s){return new Dh(s)},ey=Bn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(s){var c="leaflet-control-scale",h=$e("div",c),v=this.options;return this._addScales(v,c+"-line",h),s.on(v.updateWhenIdle?"moveend":"move",this._update,this),s.whenReady(this._update,this),h},onRemove:function(s){s.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(s,c,h){s.metric&&(this._mScale=$e("div",c,h)),s.imperial&&(this._iScale=$e("div",c,h))},_update:function(){var s=this._map,c=s.getSize().y/2,h=s.distance(s.containerPointToLatLng([0,c]),s.containerPointToLatLng([this.options.maxWidth,c]));this._updateScales(h)},_updateScales:function(s){this.options.metric&&s&&this._updateMetric(s),this.options.imperial&&s&&this._updateImperial(s)},_updateMetric:function(s){var c=this._getRoundNum(s),h=c<1e3?c+" m":c/1e3+" km";this._updateScale(this._mScale,h,c/s)},_updateImperial:function(s){var c=s*3.2808399,h,v,S;c>5280?(h=c/5280,v=this._getRoundNum(h),this._updateScale(this._iScale,v+" mi",v/h)):(S=this._getRoundNum(c),this._updateScale(this._iScale,S+" ft",S/c))},_updateScale:function(s,c,h){s.style.width=Math.round(this.options.maxWidth*h)+"px",s.innerHTML=c},_getRoundNum:function(s){var c=Math.pow(10,(Math.floor(s)+"").length-1),h=s/c;return h=h>=10?10:h>=5?5:h>=3?3:h>=2?2:1,c*h}}),nE=function(s){return new ey(s)},rE='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Fh=Bn.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(pe.inlineSvg?rE+" ":"")+"Leaflet</a>"},initialize:function(s){b(this,s),this._attributions={}}
861,onAdd:function(s){s.attributionControl=this,this._container=$e("div","leaflet-control-attribution"),Za(this._container);for(var c in s._layers)s._layers[c].getAttribution&&this.addAttribution(s._layers[c].getAttribution());return this._update(),s.on("layeradd",this._addAttribution,this),this._container},onRemove:function(s){s.off("layeradd",this._addAttribution,this)},_addAttribution:function(s){s.layer.getAttribution&&(this.addAttribution(s.layer.getAttribution()),s.layer.once("remove",function(){this.removeAttribution(s.layer.getAttribution())},this))},setPrefix:function(s){return this.options.prefix=s,this._update(),this},addAttribution:function(s){return s?(this._attributions[s]||(this._attributions[s]=0),this._attributions[s]++,this._update(),this):this},removeAttribution:function(s){return s?(this._attributions[s]&&(this._attributions[s]--,this._update()),this):this},_update:function(){if(this._map){var s=[];for(var c in this._attributions)this._attributions[c]&&s.push(c);var h=[];this.options.prefix&&h.push(this.options.prefix),s.length&&h.push(s.join(", ")),this._container.innerHTML=h.join(' <span aria-hidden="true">|</span> ')}}});De.mergeOptions({attributionControl:!0}),De.addInitHook(function(){this.options.attributionControl&&new Fh().addTo(this)});var iE=function(s){return new Fh(s)};Bn.Layers=Xv,Bn.Zoom=Dh,Bn.Scale=ey,Bn.Attribution=Fh,Qa.layers=eE,Qa.zoom=tE,Qa.scale=nE,Qa.attribution=iE;var dr=G.extend({initialize:function(s){this._map=s},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});dr.addTo=function(s,c){return s.addHandler(c,this),this};var sE={Events:Y},ty=pe.touch?"touchstart mousedown":"mousedown",ri=le.extend({options:{clickTolerance:3},initialize:function(s,c,h,v){b(this,v),this._element=s,this._dragStartTarget=c||s,this._preventOutline=h},enable:function(){this._enabled||(Pe(this._dragStartTarget,ty,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ri._dragging===this&&this.finishDrag(!0),Ze(this._dragStartTarget,ty,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(s){if(this._enabled&&(this._moved=!1,!Nh(this._element,"leaflet-zoom-anim"))){if(s.touches&&s.touches.length!==1){ri._dragging===this&&this.finishDrag();return}if(!(ri._dragging||s.shiftKey||s.which!==1&&s.button!==1&&!s.touches)&&(ri._dragging=this,this._preventOutline&&Ah(this._element),Th(),Ha(),!this._moving)){this.fire("down");var c=s.touches?s.touches[0]:s,h=Gv(this._element);this._startPoint=new F(c.clientX,c.clientY),this._startPos=es(this._element),this._parentScale=Oh(h);var v=s.type==="mousedown";Pe(document,v?"mousemove":"touchmove",this._onMove,this),Pe(document,v?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(s){if(this._enabled){if(s.touches&&s.touches.length>1){this._moved=!0;return}var c=s.touches&&s.touches.length===1?s.touches[0]:s,h=new F(c.clientX,c.clientY)._subtract(this._startPoint);!h.x&&!h.y||Math.abs(h.x)+Math.abs(h.y)<this.options.clickTolerance||(h.x/=this._parentScale.x,h.y/=this._parentScale.y,At(s),this._moved||(this.fire("dragstart"),this._moved=!0,Oe(document.body,"leaflet-dragging"),this._lastTarget=s.target||s.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Oe(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(h),this._moving=!0,this._lastEvent=s,this._updatePosition())}},_updatePosition:function(){var s={originalEvent:this._lastEvent};this.fire("predrag",s),gt(this._element,this._newPos),this.fire("drag",s)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(s){ht(document.body,"leaflet-dragging"),this._lastTarget&&(ht(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ze(document,"mousemove touchmove",this._onMove,this),Ze(document,"mouseup touchend touchcancel",this._onUp,this),kh(),Ga();var c=this._moved&&this._moving;this._moving=!1,ri._dragging=!1,c&&this.fire("dragend",{noInertia:s,distance:this._newPos.distanceTo(this._startPos)})}});function ny(s,c,h){var v,S=[1,4,2,8],E,M,$,q,Q,oe,_e,Ie;for(E=0,oe=s.length;E<oe;E++)s[E]._code=rs(s[E],c);for($=0;$<4;$++){for(_e=S[$],v=[],E=0,oe=s.length,M=oe-1;E<oe;M=E++)q=s[E],Q=s[M],q._code&_e?Q._code&_e||(Ie=Mc(Q,q,_e,c,h),Ie._code=rs(Ie,c),v.push(Ie)):(Q._code&_e&&(Ie=Mc(Q,q,_e,c,h),Ie._code=rs(Ie,c),v.push(Ie)),v.push(q));s=v}return s}function ry(s,c){var h,v,S,E,M,$,q,Q,oe;if(!s||s.length===0)throw new Error("latlngs not passed");Nn(s)||(console.warn("latlngs are not flat! Only the first ring will be used"),s=s[0]);var _e=W([0,0]),Ie=V(s),Vt=Ie.getNorthWest().distanceTo(Ie.getSouthWest
861())*Ie.getNorthEast().distanceTo(Ie.getNorthWest());Vt<1700&&(_e=Bh(s));var Ct=s.length,Cn=[];for(h=0;h<Ct;h++){var Xt=W(s[h]);Cn.push(c.project(W([Xt.lat-_e.lat,Xt.lng-_e.lng])))}for($=q=Q=0,h=0,v=Ct-1;h<Ct;v=h++)S=Cn[h],E=Cn[v],M=S.y*E.x-E.y*S.x,q+=(S.x+E.x)*M,Q+=(S.y+E.y)*M,$+=M*3;$===0?oe=Cn[0]:oe=[q/$,Q/$];var to=c.unproject(H(oe));return W([to.lat+_e.lat,to.lng+_e.lng])}function Bh(s){for(var c=0,h=0,v=0,S=0;S<s.length;S++){var E=W(s[S]);c+=E.lat,h+=E.lng,v++}return W([c/v,h/v])}var oE={__proto__:null,clipPolygon:ny,polygonCenter:ry,centroid:Bh};function iy(s,c){if(!c||!s.length)return s.slice();var h=c*c;return s=cE(s,h),s=lE(s,h),s}function sy(s,c,h){return Math.sqrt(Ya(s,c,h,!0))}function aE(s,c,h){return Ya(s,c,h)}function lE(s,c){var h=s.length,v=typeof Uint8Array<"u"?Uint8Array:Array,S=new v(h);S[0]=S[h-1]=1,$h(s,S,c,0,h-1);var E,M=[];for(E=0;E<h;E++)S[E]&&M.push(s[E]);return M}function $h(s,c,h,v,S){var E=0,M,$,q;for($=v+1;$<=S-1;$++)q=Ya(s[$],s[v],s[S],!0),q>E&&(M=$,E=q);E>h&&(c[M]=1,$h(s,c,h,v,M),$h(s,c,h,M,S))}function cE(s,c){for(var h=[s[0]],v=1,S=0,E=s.length;v<E;v++)uE(s[v],s[S])>c&&(h.push(s[v]),S=v);return S<E-1&&h.push(s[E-1]),h}var oy;function ay(s,c,h,v,S){var E=v?oy:rs(s,h),M=rs(c,h),$,q,Q;for(oy=M;;){if(!(E|M))return[s,c];if(E&M)return!1;$=E||M,q=Mc(s,c,$,h,S),Q=rs(q,h),$===E?(s=q,E=Q):(c=q,M=Q)}}function Mc(s,c,h,v,S){var E=c.x-s.x,M=c.y-s.y,$=v.min,q=v.max,Q,oe;return h&8?(Q=s.x+E*(q.y-s.y)/M,oe=q.y):h&4?(Q=s.x+E*($.y-s.y)/M,oe=$.y):h&2?(Q=q.x,oe=s.y+M*(q.x-s.x)/E):h&1&&(Q=$.x,oe=s.y+M*($.x-s.x)/E),new F(Q,oe,S)}function rs(s,c){var h=0;return s.x<c.min.x?h|=1:s.x>c.max.x&&(h|=2),s.y<c.min.y?h|=4:s.y>c.max.y&&(h|=8),h}function uE(s,c){var h=c.x-s.x,v=c.y-s.y;return h*h+v*v}function Ya(s,c,h,v){var S=c.x,E=c.y,M=h.x-S,$=h.y-E,q=M*M+$*$,Q;return q>0&&(Q=((s.x-S)*M+(s.y-E)*$)/q,Q>1?(S=h.x,E=h.y):Q>0&&(S+=M*Q,E+=$*Q)),M=s.x-S,$=s.y-E,v?M*M+$*$:new F(S,E)}function Nn(s){return!N(s[0])||typeof s[0][0]!="object"&&typeof s[0][0]<"u"}function ly(s){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Nn(s)}function cy(s,c){var h,v,S,E,M,$,q,Q;if(!s||s.length===0)throw new Error("latlngs not passed");Nn(s)||(console.warn("latlngs are not flat! Only the first ring will be used"),s=s[0]);var oe=W([0,0]),_e=V(s),Ie=_e.getNorthWest().distanceTo(_e.getSouthWest
vendor: 4,217 bytes, line 861
861())*_e.getNorthEast().distanceTo(_e.getNorthWest());Ie<1700&&(oe=Bh(s));var Vt=s.length,Ct=[];for(h=0;h<Vt;h++){var Cn=W(s[h]);Ct.push(c.project(W([Cn.lat-oe.lat,Cn.lng-oe.lng])))}for(h=0,v=0;h<Vt-1;h++)v+=Ct[h].distanceTo(Ct[h+1])/2;if(v===0)Q=Ct[0];else for(h=0,E=0;h<Vt-1;h++)if(M=Ct[h],$=Ct[h+1],S=M.distanceTo($),E+=S,E>v){q=(E-v)/S,Q=[$.x-q*($.x-M.x),$.y-q*($.y-M.y)];break}var Xt=c.unproject(H(Q));return W([Xt.lat+oe.lat,Xt.lng+oe.lng])}var dE={__proto__:null,simplify:iy,pointToSegmentDistance:sy,closestPointOnSegment:aE,clipSegment:ay,_getEdgeIntersection:Mc,_getBitCode:rs,_sqClosestPointOnSegment:Ya,isFlat:Nn,_flat:ly,polylineCenter:cy},qh={project:function(s){return new F(s.lng,s.lat)},unproject:function(s){return new z(s.y,s.x)},bounds:new Z([-180,-90],[180,90])},Uh={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Z([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(s){var c=Math.PI/180,h=this.R,v=s.lat*c,S=this.R_MINOR/h,E=Math.sqrt(1-S*S),M=E*Math.sin(v),$=Math.tan(Math.PI/4-v/2)/Math.pow((1-M)/(1+M),E/2);return v=-h*Math.log(Math.max($,1e-10)),new F(s.lng*c*h,v)},unproject:function(s){for(var c=180/Math.PI,h=this.R,v=this.R_MINOR/h,S=Math.sqrt(1-v*v),E=Math.exp(-s.y/h),M=Math.PI/2-2*Math.atan(E),$=0,q=.1,Q;$<15&&Math.abs(q)>1e-7;$++)Q=S*Math.sin(M),Q=Math.pow((1-Q)/(1+Q),S/2),q=Math.PI/2-2*Math.atan(E*Q)-M,M+=q;return new z(M*c,s.x*c/h)}},hE={__proto__:null,LonLat:qh,Mercator:Uh,SphericalMercator:ge},fE=i({},ve,{code:"EPSG:3395",projection:Uh,transformation:function(){var s=.5/(Math.PI*Uh.R);return Ne(s,.5,-s,.5)}()}),uy=i({},ve,{code:"EPSG:4326",projection:qh,transformation:Ne(1/180,1,-1/180,.5)}),mE=i({},te,{projection:qh,transformation:Ne(1,0,-1,0),scale:function(s){return Math.pow(2,s)},zoom:function(s){return Math.log(s)/Math.LN2},distance:function(s,c){var h=c.lng-s.lng,v=c.lat-s.lat;return Math.sqrt(h*h+v*v)},infinite:!0});te.Earth=ve,te.EPSG3395=fE,te.EPSG3857=Ge,te.EPSG900913=tt,te.EPSG4326=uy,te.Simple=mE;var $n=le.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(s){return s.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(s){return s&&s.removeLayer(this),this},getPane:function(s){return this._map.getPane(s?this.options[s]||s:this.options.pane)},addInteractiveTarget:function(s){return this._map._targets[d(s)]=this,this},removeInteractiveTarget:function(s){return delete this._map._targets[d(s)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(s){var c=s.target;if(c.hasLayer(this)){if(this._map=c,this._zoomAnimated=c._zoomAnimated,this.getEvents){var h=this.getEvents();c.on(h,this),this.once("remove",function(){c.off(h,this)},this)}this.onAdd(c),this.fire("add"),c.fire("layeradd",{layer:this})}}});De.include({addLayer:function(s){if(!s._layerAdd)throw new Error("The provided object is not a Layer.");var c=d(s);return this._layers[c]?this:(this._layers[c]=s,s._mapToAdd=this,s.beforeAdd&&s.beforeAdd(this),this.whenReady(s._layerAdd,s),this)},removeLayer:function(s){var c=d(s);return this._layers[c]?(this._loaded&&s.onRemove(this),delete this._layers[c],this._loaded&&(this.fire("layerremove",{layer:s}),s.fire("remove")),s._map=s._mapToAdd=null,this):this},hasLayer:function(s){return d(s)in this._layers},eachLayer:function(s,c){for(var h in this._layers)s.call(c,this._layers[h]);return this},_addLayers:function(s){s=s?N(s)?s:[s]:[];for(var c=0,h=s.length;c<h;c++)this.addLayer(s[c])},_addZoomLimit:function(s){(!isNaN(s.options.maxZoom)||!isNaN(s.options.minZoom))&&(this._zoomBoundLayers[d(s)]=s,this._updateZoomLevels())},_removeZoomLimit:function(s){var c=d(s);this._zoomBoundLayers[c]&&(delete this._zoomBoundLayers[c],this._updateZoomLevels())},_updateZoomLevels:function(){var s=1/0,c=-1/0,h=this._getZoomSpan();for(var v in this._zoomBoundLayers){var S=this._zoomBoundLayers[v].options;s=S.minZoom===void 0?s:Math.min(s,S.minZoom),c=S.maxZoom===void 0?c:Math.max(c,S.maxZoom)}this._layersMaxZoom=c===-1/0?void 0:c,this._layersMinZoom=s===1/0?void 0:s,h!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZo
vendor: 13,921 bytes, line 861
861om&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Qs=$n.extend({initialize:function(s,c){b(this,c),this._layers={};var h,v;if(s)for(h=0,v=s.length;h<v;h++)this.addLayer(s[h])},addLayer:function(s){var c=this.getLayerId(s);return this._layers[c]=s,this._map&&this._map.addLayer(s),this},removeLayer:function(s){var c=s in this._layers?s:this.getLayerId(s);return this._map&&this._layers[c]&&this._map.removeLayer(this._layers[c]),delete this._layers[c],this},hasLayer:function(s){var c=typeof s=="number"?s:this.getLayerId(s);return c in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(s){var c=Array.prototype.slice.call(arguments,1),h,v;for(h in this._layers)v=this._layers[h],v[s]&&v[s].apply(v,c);return this},onAdd:function(s){this.eachLayer(s.addLayer,s)},onRemove:function(s){this.eachLayer(s.removeLayer,s)},eachLayer:function(s,c){for(var h in this._layers)s.call(c,this._layers[h]);return this},getLayer:function(s){return this._layers[s]},getLayers:function(){var s=[];return this.eachLayer(s.push,s),s},setZIndex:function(s){return this.invoke("setZIndex",s)},getLayerId:function(s){return d(s)}}),pE=function(s,c){return new Qs(s,c)},kr=Qs.extend({addLayer:function(s){return this.hasLayer(s)?this:(s.addEventParent(this),Qs.prototype.addLayer.call(this,s),this.fire("layeradd",{layer:s}))},removeLayer:function(s){return this.hasLayer(s)?(s in this._layers&&(s=this._layers[s]),s.removeEventParent(this),Qs.prototype.removeLayer.call(this,s),this.fire("layerremove",{layer:s})):this},setStyle:function(s){return this.invoke("setStyle",s)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var s=new ue;for(var c in this._layers){var h=this._layers[c];s.extend(h.getBounds?h.getBounds():h.getLatLng())}return s}}),gE=function(s,c){return new kr(s,c)},Ys=G.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(s){b(this,s)},createIcon:function(s){return this._createIcon("icon",s)},createShadow:function(s){return this._createIcon("shadow",s)},_createIcon:function(s,c){var h=this._getIconUrl(s);if(!h){if(s==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var v=this._createImg(h,c&&c.tagName==="IMG"?c:null);return this._setIconStyles(v,s),(this.options.crossOrigin||this.options.crossOrigin==="")&&(v.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),v},_setIconStyles:function(s,c){var h=this.options,v=h[c+"Size"];typeof v=="number"&&(v=[v,v]);var S=H(v),E=H(c==="shadow"&&h.shadowAnchor||h.iconAnchor||S&&S.divideBy(2,!0));s.className="leaflet-marker-"+c+" "+(h.className||""),E&&(s.style.marginLeft=-E.x+"px",s.style.marginTop=-E.y+"px"),S&&(s.style.width=S.x+"px",s.style.height=S.y+"px")},_createImg:function(s,c){return c=c||document.createElement("img"),c.src=s,c},_getIconUrl:function(s){return pe.retina&&this.options[s+"RetinaUrl"]||this.options[s+"Url"]}});function vE(s){return new Ys(s)}var Ja=Ys.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(s){return typeof Ja.imagePath!="string"&&(Ja.imagePath=this._detectIconPath()),(this.options.imagePath||Ja.imagePath)+Ys.prototype._getIconUrl.call(this,s)},_stripUrl:function(s){var c=function(h,v,S){var E=v.exec(h);return E&&E[S]};return s=c(s,/^url\((['"])?(.+)\1\)$/,2),s&&c(s,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var s=$e("div","leaflet-default-icon-path",document.body),c=Wa(s,"background-image")||Wa(s,"backgroundImage");if(document.body.removeChild(s),c=this._stripUrl(c),c)return c;var h=document.querySelector('link[href$="leaflet.css"]');return h?h.href.substring(0,h.href.length-11-1):""}}),dy=dr.extend({initialize:function(s){this._marker=s},addHooks:function(){var s=this._marker._icon;this._draggable||(this._draggable=new ri(s,s,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Oe(s,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ht(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(s){var c=this._marker,h=c._map,v=this._marker.options.autoPanSpeed,S=this._marker.options.autoPanPadding,E=es(c._icon),M=h.getPixelBounds(),$=h.getPixelOrigin(),q=ee(M.min._subtract($).add(S),M.max._subtract($).subtract(S));if(!q.contains(E)){var Q=H((Math.max(q.max.x,E.x)-q.max.x)/(M.max.x-q.max.x)-(Math.min(q.min.x,E.x)-q.min.x)/(M.min.x-q.min.x),(Math.max(q.max.y,E.y)-q.max.y)/(M.max.y-q.max.y)-(Math.min(q.min.y,E.y)-q.min.y)/(M.min.y-q.min.y)).multiplyBy(v);h.panBy(Q,{animate:!1}),this._draggable._newPos._add(Q),this._draggable._startPos._add(Q),gt(c._icon,this._draggable._newPos),this._onDrag(s),this._panRequest=B(this._adjustPan.bind(this,s))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(s){this._marker.options.autoPan&&(U(this._panRequest),this._panRequest=B(this._adjustPan.bind(this,s)))},_onDrag:function(s){var c=this._marker,h=c._shadow,v=es(c._icon),S=c._map.layerPointToLatLng(v);h&&gt(h,v),c._latlng=S,s.latlng=S,s.oldLatLng=this._oldLatLng,c.fire("move",s).fire("drag",s)},_onDragEnd:function(s){U(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",s)}}),Dc=$n.extend({options:{icon:new Ja,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(s,c){b(this,c),this._latlng=W(s)},onAdd:function(s){this._zoomAnimated=this._zoomAnimated&&s.options.markerZoomAnimation,this._zoomAnimated&&s.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(s){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&s.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(s){var c=this._latlng;return this._latlng=W(s),this.update(),this.fire("move",{oldLatLng:c,latlng:this._latlng})},setZIndexOffset:function(s){return this.options.zIndexOffset=s,this.update()},getIcon:function(){return this.options.icon},setIcon:function(s){return this.options.icon=s,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var s=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(s)}return this},_initIcon:function(){var s=this.options,c="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),h=s.icon.createIcon(this._icon),v=!1;h!==this._icon&&(this._icon&&this._removeIcon(),v=!0,s.title&&(h.title=s.title),h.tagName==="IMG"&&(h.alt=s.alt||"")),Oe(h,c),s.keyboard&&(h.tabIndex="0",h.setAttribute("role","button")),this._icon=h,s.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Pe(h,"focus",this._panOnFocus,this);var S=s.icon.createShadow(this._shadow),E=!1;S!==this._shadow&&(this._removeShadow(),E=!0),S&&(Oe(S,c),S.alt=""),this._shadow=S,s.opacity<1&&this._updateOpacity(),v&&this.getPane().appendChild(this._icon),this._initInteraction(),S&&E&&this.getPane(s.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ze(this._icon,"focus",this._panOnFocus,this),it(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&it(this._shadow),this._shadow=null},_setPos:function(s){this._icon&&gt(this._icon,s),this._shadow&&gt(this._shadow,s),this._zIndex=s.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(s){this._icon&&(this._icon.style.zIndex=this._zIndex+s)},_animateZoom:function(s){var c=this._map._latLngToNewLayerPoint(this._latlng,s.zoom,s.center).round();this._setPos(c)},_initInteraction:function(){if(this.options.interactive&&(Oe(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),dy)){var s=this.options.draggable;this.dragging&&(s=this.dragging.enabled(),this.dragging.disable()),this.dragging=new dy(this),s&&this.dragging.enable()}},setOpacity:function(s){return this.options.opacity=s,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var s=this.options.opacity;this._icon&&jn(this._icon,s),this._shadow&&jn(this._shadow,s)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var s=this._map;if(s){var c=this.options.icon.options,h=c.iconSize?H(c.iconSize):H(0,0),v=c.iconAnchor?H(c.iconAnchor):H(0,0);s.panInside(this._latlng,{paddingTopLeft:v,paddingBottomRight:h.subtract(v)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function yE(s,c){return new Dc(s,c)}var ii=$n.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(s){this._renderer=s.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(s){return b(this,s),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&s&&Object.prototype.hasOwnProperty.call(s,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Fc=ii.extend({options:{fill:!0,radius:10},initialize:function(s,c){b(this,c),this._latlng=W(s),this._radius=this.options.radius},setLatLng:function(s){var c=this._latlng;return this._latlng=W(s),this.redraw(),this.fire("move",{oldLatLng:c,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(s){return this.options.radius=this._radius=s,this.redraw()},getRadius:function(){return this._radius},setStyle:function(s){var c=s&&s.radius||this._radius;return ii.prototype.setStyle.call(this,s),this.setRadius(c),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var s=this._radius,c=this._radiusY||s,h=this._clickTolerance(),v=[s+h,c+h];this._pxBounds=new Z(this._point.subtract(v),this._point.add(v))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(s){return s.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function xE(s,c){return new Fc(s,c)}var Vh=Fc.extend({initialize:function(s,c,h){if(typeof c=="number"&&(c=i({},h,{radius:c})),b(this,c),this._latlng=W(s),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(s){return this._mRadius=s,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var s=[this._radius,this._radiusY||this._radius];return new ue(this._map.layerPointToLatLng(this._point.subtract(s)),this._map.layerPointToLatLng(this._point.add(s)))},setStyle:ii.prototype.setStyle,_project:function(){var s=this._latlng.lng,c=this._latlng.lat,h=this._map,v=h.options.crs;if(v.distance===ve.distance){var S=Math.PI/180,E=this._mRadius/ve.R/S,M=h.project([c+E,s]),$=h.project([c-E,s]),q=M.add($).divideBy(2),Q=h.unproject(q).lat,oe=Math.acos((Math.cos(E*S)-Math.sin(c*S)*Math.sin(Q*S))/(Math.cos(c*S)*Math.cos(Q*S)))/S;(isNaN(oe)||oe===0)&&(oe=E/Math.cos(Math.PI/180*c)),this._point=q.subtract(h.getPixelOrigin()),this._radius=isNaN(oe)?0:q.x-h.project([Q,s-oe]).x,this._radiusY=q.y-M.y}else{var _e=v.unproject(v.project(this._latlng).subtract([this._mRadius,0]));this._point=h.latLngToLayerPoint(this._latlng),this._radius=this._point.x-h.latLngToLayerPoint(_e).x}this._updateBounds()}});function bE(s,c,h){return new Vh(s,c,h)}var Pr=ii.extend({options:{smoothFactor:1,noClip:!1},initialize:function(s,c){b(this,c),this._setLatLngs(s)},getLatLngs:function(){return this._latlngs},setLatLngs:function(s){return this._setLatLngs(s),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(s){for(var c=1/0,h=null,v=Ya,S,E,M=0,$=this._parts.length;M<$;M++)for(var q=this._parts[M],Q=1,oe=q.length;Q<oe;Q++){S=q[Q-1],E=q[Q];var _e=v(s,S,E,!0);_e<c&&(c=_e,h=v(s,S,E))}return h&&(h.distance=Math.sqrt(c)),h}
861,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return cy(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(s,c){return c=c||this._defaultShape(),s=W(s),c.push(s),this._bounds.extend(s),this.redraw()},_setLatLngs:function(s){this._bounds=new ue,this._latlngs=this._convertLatLngs(s)},_defaultShape:function(){return Nn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(s){for(var c=[],h=Nn(s),v=0,S=s.length;v<S;v++)h?(c[v]=W(s[v]),this._bounds.extend(c[v])):c[v]=this._convertLatLngs(s[v]);return c},_project:function(){var s=new Z;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,s),this._bounds.isValid()&&s.isValid()&&(this._rawPxBounds=s,this._updateBounds())},_updateBounds:function(){var s=this._clickTolerance(),c=new F(s,s);this._rawPxBounds&&(this._pxBounds=new Z([this._rawPxBounds.min.subtract(c),this._rawPxBounds.max.add(c)]))},_projectLatlngs:function(s,c,h){var v=s[0]instanceof z,S=s.length,E,M;if(v){for(M=[],E=0;E<S;E++)M[E]=this._map.latLngToLayerPoint(s[E]),h.extend(M[E]);c.push(M)}else for(E=0;E<S;E++)this._projectLatlngs(s[E],c,h)},_clipPoints:function(){var s=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(s))){if(this.options.noClip){this._parts=this._rings;return}var c=this._parts,h,v,S,E,M,$,q;for(h=0,S=0,E=this._rings.length;h<E;h++)for(q=this._rings[h],v=0,M=q.length;v<M-1;v++)$=ay(q[v],q[v+1],s,v,!0),$&&(c[S]=c[S]||[],c[S].push($[0]),($[1]!==q[v+1]||v===M-2)&&(c[S].push($[1]),S++))}},_simplifyPoints:function(){for(var s=this._parts,c=this.options.smoothFactor,h=0,v=s.length;h<v;h++)s[h]=iy(s[h],c)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(s,c){var h,v,S,E,M,$,q=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(s))return!1;for(h=0,E=this._parts.length;h<E;h++)for($=this._parts[h],v=0,M=$.length,S=M-1;v<M;S=v++)if(!(!c&&v===0)&&sy(s,$[S],$[v])<=q)return!0;return!1}});function wE(s,c){return new Pr(s,c)}Pr._flat=ly;var Js=Pr.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
861,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return ry(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(s){var c=Pr.prototype._convertLatLngs.call(this,s),h=c.length;return h>=2&&c[0]instanceof z&&c[0].equals(c[h-1])&&c.pop(),c},_setLatLngs:function(s){Pr.prototype._setLatLngs.call(this,s),Nn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Nn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var s=this._renderer._bounds,c=this.options.weight,h=new F(c,c);if(s=new Z(s.min.subtract(h),s.max.add(h)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(s))){if(this.options.noClip){this._parts=this._rings;return}for(var v=0,S=this._rings.length,E;v<S;v++)E=ny(this._rings[v],s,!0),E.length&&this._parts.push(E)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(s){var c=!1,h,v,S,E,M,$,q,Q;if(!this._pxBounds||!this._pxBounds.contains(s))return!1;for(E=0,q=this._parts.length;E<q;E++)for(h=this._parts[E],M=0,Q=h.length,$=Q-1;M<Q;$=M++)v=h[M],S=h[$],v.y>s.y!=S.y>s.y&&s.x<(S.x-v.x)*(s.y-v.y)/(S.y-v.y)+v.x&&(c=!c);return c||Pr.prototype._containsPoint.call(this,s,!0)}});function _E(s,c){return new Js(s,c)}var Ar=kr.extend({initialize:function(s,c){b(this,c),this._layers={},s&&this.addData(s)},addData:function(s){var c=N(s)?s:s.features,h,v,S;if(c){for(h=0,v=c.length;h<v;h++)S=c[h],(S.geometries||S.geometry||S.features||S.coordinates)&&this.addData(S);return this}var E=this.options;if(E.filter&&!E.filter(s))return this;var M=Bc(s,E);return M?(M.feature=Uc(s),M.defaultOptions=M.options,this.resetStyle(M),E.onEachFeature&&E.onEachFeature(s,M),this.addLayer(M)):this},resetStyle:function(s){return s===void 0?this.eachLayer(this.resetStyle,this):(s.options=i({},s.defaultOptions),this._setLayerStyle(s,this.options.style),this)},setStyle:function(s){return this.eachLayer(function(c){this._setLayerStyle(c,s)},this)},_setLayerStyle:function(s,c){s.setStyle&&(typeof c=="function"&&(c=c(s.feature)),s.setStyle(c))}});function Bc(s,c){var h=s.type==="Feature"?s.geometry:s,v=h?h.coordinates:null,S=[],E=c&&c.pointToLayer,M=c&&c.coordsToLatLng||Wh,$,q,Q,oe;if(!v&&!h)return null;switch(h.type){case"Point":return $=M(v),hy(E,s,$,c);case"MultiPoint":for(Q=0,oe=v.length;Q<oe;Q++)$=M(v[Q]),S.push(hy(E,s,$,c));return new kr(S);case"LineString":case"MultiLineString":return q=$c(v,h.type==="LineString"?0:1,M),new Pr(q,c);case"Polygon":case"MultiPolygon":return q=$c(v,h.type==="Polygon"?1:2,M),new Js(q,c);case"GeometryCollection":for(Q=0,oe=h.geometries.length;Q<oe;Q++){var _e=Bc({geometry:h.geometries[Q],type:"Feature",properties:s.properties},c);_e&&S.push(_e)}return new kr(S);case"FeatureCollection":for(Q=0,oe=h.features.length;Q<oe;Q++){var Ie=Bc(h.features[Q],c);Ie&&S.push(Ie)}return new kr(S);default:throw new Error("Invalid GeoJSON object.")}}function hy(s,c,h,v){return s?s(c,h):new Dc(h,v&&v.markersInheritOptions&&v)}function Wh(s){return new z(s[1],s[0],s[2])}function $c(s,c,h){for(var v=[],S=0,E=s.length,M;S<E;S++)M=c?$c(s[S],c-1,h):(h||Wh)(s[S]),v.push(M);return v}function Hh(s,c){return s=W(s),s.alt!==void 0?[g(s.lng,c),g(s.lat,c),g(s.alt,c)]:[g(s.lng,c),g(s.lat,c)]}function qc(s,c,h,v){for(var S=[],E=0,M=s.length;E<M;E++)S.push(c?qc(s[E],Nn(s[E])?0:c-1,h,v):Hh(s[E],v));return!c&&h&&S.length>0&&S.push(S[0].slice()),S}function Xs(s,c){return s.feature?i({},s.feature,{geometry:c}):Uc(c)}function Uc(s){return s.type==="Feature"||s.type==="FeatureCollection"?s:{type:"Feature",properties:{},geometry:s}}var Gh={toGeoJSON:function(s){return Xs(this,{type:"Point",coordinates:Hh(this.getLatLng(),s)})}};Dc.include(Gh),Vh.include(Gh),Fc.include(Gh),Pr.include({toGeoJSON:function(s){var c=!Nn(this._latlngs),h=qc(this._latlngs,c?1:0,!1,s);return Xs(this,{type:(c?"Multi":"")+"LineString",coordinates:h})}}),Js.include({toGeoJSON:function(s){var c=!Nn(this._latlngs),h=c&&!Nn(this._latlngs[0]),v=qc(this._latlngs,h?2:c?1:0,!0,s);return c||(v=[v]),Xs(this,{type:(h?"Multi":"")+"Polygon",coordinates:v})}}),Qs.include({toMultiPoint:function(s){var c=[];return this.eachLayer(function(h){c.push(h.toGeoJSON(s).geometry.coordinates)}),Xs(this,{type:"MultiPoint",coordinates:c})},toGeoJSON:function(s){var c=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(c==="MultiPoint")return this.toMultiPoint(s);var h=c==="GeometryCollection",v=[];return this.eachLayer(function(S){if(S.toGeoJSON){var E=S.toGeoJSON(s);if(h)v.push(E.geometry);else{var M=Uc(E);M.type==="FeatureCollection"?v.push.apply(v,M.features):v.push(M)}}}),h?Xs(this,{geometries:v,type:"GeometryCollection"}):{type:"FeatureCollection",features:v}}});function fy(s,c){return new Ar(s,c)}var SE=fy,Vc=$n.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(s,c,h){this._url=s,this._bounds=V(c),b(this,h)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Oe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){it(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(s){return this.options.opacity=s,this._image&&this._updateOpacity(),this},setStyle:function(s){return s.opacity&&this.setOpacity(s.opacity),this},bringToFront:function(){return this._map&&Ks(this._image),this},bringToBack:function(){return this._map&&Zs(this._image),this},setUrl:function(s){return this._url=s,this._image&&(this._image.src=s),this},setBounds:function(s){return this._bounds=V(s),this._map&&this._reset(),this},getEvents:function(){var s={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(s.zoomanim=this._animateZoom),s},setZIndex:function(s){return this.options.zIndex=s,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var s=this._url.tagName==="IMG",c=this._image=s?this._url:$e("img");if(Oe(c,"leaflet-image-layer"),this._zoomAnimated&&Oe(c,"leaflet-zoom-animated"),this.options.className&&Oe(c,this.options.className),c.onselectstart=m,c.onmousemove=m,c.onload=l(this.fire,this,"load"),c.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(c.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),s){this._url=c.src;return}c.src=this._url,c.alt=this.options.alt},_animateZoom:function(s){var c=this._map.getZoomScale(s.zoom),h=this._map._latLngBoundsToNewLayerBounds(this._bounds,s.zoom,s.center).min;Xi(this._image,h,c)},_reset:function(){var s=this._image,c=new Z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),h=c.getSize();gt(s,c.min),s.style.width=h.x+"px",s.style.height=h.y+"px"},_updateOpacity:function(){jn(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var s=this.options.errorOverlayUrl;s&&this._url!==s&&(this._url=s,this._image.src=s)},getCenter:function(){return this._bounds.getCenter()}}),jE=function(s,c,h){return new Vc(s,c,h)},my=Vc.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInl
vendor: 10,334 bytes, line 861
861ine:!0},_initImage:function(){var s=this._url.tagName==="VIDEO",c=this._image=s?this._url:$e("video");if(Oe(c,"leaflet-image-layer"),this._zoomAnimated&&Oe(c,"leaflet-zoom-animated"),this.options.className&&Oe(c,this.options.className),c.onselectstart=m,c.onmousemove=m,c.onloadeddata=l(this.fire,this,"load"),s){for(var h=c.getElementsByTagName("source"),v=[],S=0;S<h.length;S++)v.push(h[S].src);this._url=h.length>0?v:[c.src];return}N(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(c.style,"objectFit")&&(c.style.objectFit="fill"),c.autoplay=!!this.options.autoplay,c.loop=!!this.options.loop,c.muted=!!this.options.muted,c.playsInline=!!this.options.playsInline;for(var E=0;E<this._url.length;E++){var M=$e("source");M.src=this._url[E],c.appendChild(M)}}});function NE(s,c,h){return new my(s,c,h)}var py=Vc.extend({_initImage:function(){var s=this._image=this._url;Oe(s,"leaflet-image-layer"),this._zoomAnimated&&Oe(s,"leaflet-zoom-animated"),this.options.className&&Oe(s,this.options.className),s.onselectstart=m,s.onmousemove=m}});function CE(s,c,h){return new py(s,c,h)}var hr=$n.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(s,c){s&&(s instanceof z||N(s))?(this._latlng=W(s),b(this,c)):(b(this,s),this._source=c),this.options.content&&(this._content=this.options.content)},openOn:function(s){return s=arguments.length?s:this._source._map,s.hasLayer(this)||s.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(s){return this._map?this.close():(arguments.length?this._source=s:s=this._source,this._prepareOpen(),this.openOn(s._map)),this},onAdd:function(s){this._zoomAnimated=s._zoomAnimated,this._container||this._initLayout(),s._fadeAnimated&&jn(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),s._fadeAnimated&&jn(this._container,1),this.bringToFront(),this.options.interactive&&(Oe(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(s){s._fadeAnimated?(jn(this._container,0),this._removeTimeout=setTimeout(l(it,void 0,this._container),200)):it(this._container),this.options.interactive&&(ht(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(s){return this._latlng=W(s),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(s){return this._content=s,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var s={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(s.zoomanim=this._animateZoom),s},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Ks(this._container),this},bringToBack:function(){return this._map&&Zs(this._container),this},_prepareOpen:function(s){var c=this._source;if(!c._map)return!1;if(c instanceof kr){c=null;var h=this._source._layers;for(var v in h)if(h[v]._map){c=h[v];break}if(!c)return!1;this._source=c}if(!s)if(c.getCenter)s=c.getCenter();else if(c.getLatLng)s=c.getLatLng();else if(c.getBounds)s=c.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(s),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var s=this._contentNode,c=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof c=="string")s.innerHTML=c;else{for(;s.hasChildNodes();)s.removeChild(s.firstChild);s.appendChild(c)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var s=this._map.latLngToLayerPoint(this._latlng),c=H(this.options.offset),h=this._getAnchor();this._zoomAnimated?gt(this._container,s.add(h)):c=c.add(s).add(h);var v=this._containerBottom=-c.y,S=this._containerLeft=-Math.round(this._containerWidth/2)+c.x;this._container.style.bottom=v+"px",this._container.style.left=S+"px"}},_getAnchor:function(){return[0,0]}});De.include({_initOverlay:function(s,c,h,v){var S=c;return S instanceof s||(S=new s(v).setContent(c)),h&&S.setLatLng(h),S}}),$n.include({_initOverlay:function(s,c,h,v){var S=h;return S instanceof s?(b(S,v),S._source=this):(S=c&&!v?c:new s(v,this),S.setContent(h)),S}});var Wc=hr.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(s){return s=arguments.length?s:this._source._map,!s.hasLayer(this)&&s._popup&&s._popup.options.autoClose&&s.removeLayer(s._popup),s._popup=this,hr.prototype.openOn.call(this,s)},onAdd:function(s){hr.prototype.onAdd.call(this,s),s.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ii||this._source.on("preclick",ts))},onRemove:function(s){hr.prototype.onRemove.call(this,s),s.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ii||this._source.off("preclick",ts))},getEvents:function(){var s=hr.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(s.preclick=this.close),this.options.keepInView&&(s.moveend=this._adjustPan),s},_initLayout:function(){var s="leaflet-popup",c=this._container=$e("div",s+" "+(this.options.className||"")+" leaflet-zoom-animated"),h=this._wrapper=$e("div",s+"-content-wrapper",c);if(this._contentNode=$e("div",s+"-content",h),Za(c),zh(this._contentNode),Pe(c,"contextmenu",ts),this._tipContainer=$e("div",s+"-tip-container",c),this._tip=$e("div",s+"-tip",this._tipContainer),this.options.closeButton){var v=this._closeButton=$e("a",s+"-close-button",c);v.setAttribute("role","button"),v.setAttribute("aria-label","Close popup"),v.href="#close",v.innerHTML='<span aria-hidden="true">&#215;</span>',Pe(v,"click",function(S){At(S),this.close()},this)}},_updateLayout:function(){var s=this._contentNode,c=s.style;c.width="",c.whiteSpace="nowrap";var h=s.offsetWidth;h=Math.min(h,this.options.maxWidth),h=Math.max(h,this.options.minWidth),c.width=h+1+"px",c.whiteSpace="",c.height="";var v=s.offsetHeight,S=this.options.maxHeight,E="leaflet-popup-scrolled";S&&v>S?(c.height=S+"px",Oe(s,E)):ht(s,E),this._containerWidth=this._container.offsetWidth},_animateZoom:function(s){var c=this._map._latLngToNewLayerPoint(this._latlng,s.zoom,s.center),h=this._getAnchor();gt(this._container,c.add(h))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var s=this._map,c=parseInt(Wa(this._container,"marginBottom"),10)||0,h=this._container.offsetHeight+c,v=this._containerWidth,S=new F(this._containerLeft,-h-this._containerBottom);S._add(es(this._container));var E=s.layerPointToContainerPoint(S),M=H(this.options.autoPanPadding),$=H(this.options.autoPanPaddingTopLeft||M),q=H(this.options.autoPanPaddingBottomRight||M),Q=s.getSize(),oe=0,_e=0;E.x+v+q.x>Q.x&&(oe=E.x+v-Q.x+q.x),E.x-oe-$.x<0&&(oe=E.x-$.x),E.y+h+q.y>Q.y&&(_e=E.y+h-Q.y+q.y),E.y-_e-$.y<0&&(_e=E.y-$.y),(oe||_e)&&(this.options.keepInView&&(this._autopanning=!0),s.fire("autopanstart").panBy([oe,_e]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),EE=function(s,c){return new Wc(s,c)};De.mergeOptions({closePopupOnClick:!0}),De.include({openPopup:function(s,c,h){return this._initOverlay(Wc,s,c,h).openOn(this),this},closePopup:function(s){return s=arguments.length?s:this._popup,s&&s.close(),this}}),$n.include({bindPopup:function(s,c){return this._popup=this._initOverlay(Wc,this._popup,s,c),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(s){return this._popup&&(this instanceof kr||(this._popup._source=this),this._popup._prepareOpen(s||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(s){return this._popup&&this._popup.setContent(s),this},getPopup:function(){return this._popup},_openPopup:function(s){if(!(!this._popup||!this._map)){ns(s);var c=s.layer||s.target;if(this._popup._source===c&&!(c instanceof ii)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(s.latlng);return}this._popup._source=c,this.openPopup(s.latlng)}},_movePopup:function(s){this._popup.setLatLng(s.latlng)},_onKeyPress:function(s){s.originalEvent.keyCode===13&&this._openPopup(s)}});var Hc=hr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(s){hr.prototype.onAdd.call(this,s),this.setOpacity(this.options.opacity),s.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(s){hr.prototype.onRemove.call(this,s),s.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var s=hr.prototype.getEvents.call(this);return this.options.permanent||(s.preclick=this.close),s},_initLayout:function(){var s="leaflet-tooltip",c=s+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=$e("div",c),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+
861d(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(s){var c,h,v=this._map,S=this._container,E=v.latLngToContainerPoint(v.getCenter()),M=v.layerPointToContainerPoint(s),$=this.options.direction,q=S.offsetWidth,Q=S.offsetHeight,oe=H(this.options.offset),_e=this._getAnchor();$==="top"?(c=q/2,h=Q):$==="bottom"?(c=q/2,h=0):$==="center"?(c=q/2,h=Q/2):$==="right"?(c=0,h=Q/2):$==="left"?(c=q,h=Q/2):M.x<E.x?($="right",c=0,h=Q/2):($="left",c=q+(oe.x+_e.x)*2,h=Q/2),s=s.subtract(H(c,h,!0)).add(oe).add(_e),ht(S,"leaflet-tooltip-right"),ht(S,"leaflet-tooltip-left"),ht(S,"leaflet-tooltip-top"),ht(S,"leaflet-tooltip-bottom"),Oe(S,"leaflet-tooltip-"+$),gt(S,s)},_updatePosition:function(){var s=this._map.latLngToLayerPoint(this._latlng);this._setPosition(s)},setOpacity:function(s){this.options.opacity=s,this._container&&jn(this._container,s)},_animateZoom:function(s){var c=this._map._latLngToNewLayerPoint(this._latlng,s.zoom,s.center);this._setPosition(c)},_getAnchor:function(){return H(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),TE=function(s,c){return new Hc(s,c)};De.include({openTooltip:function(s,c,h){return this._initOverlay(Hc,s,c,h).openOn(this),this},closeTooltip:function(s){return s.close(),this}}),$n.include({bindTooltip:function(s,c){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Hc,this._tooltip,s,c),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(s){if(!(!s&&this._tooltipHandlersAdded)){var c=s?"off":"on",h={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?h.add=this._openTooltip:(h.mouseover=this._openTooltip,h.mouseout=this.closeTooltip,h.click=this._openTooltip,this._map?this._addFocusListeners():h.add=this._addFocusListeners),this._tooltip.options.sticky&&(h.mousemove=this._moveTooltip),this[c](h),this._tooltipHandlersAdded=!s}},openTooltip:function(s){return this._tooltip&&(this instanceof kr||(this._tooltip._source=this),this._tooltip._prepareOpen(s)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(s){return this._tooltip&&this._tooltip.setContent(s),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(s){var c=typeof s.getElement=="function"&&s.getElement();c&&(Pe(c,"focus",function(){this._tooltip._source=s,this.openTooltip()},this),Pe(c,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(s){var c=typeof s.getElement=="function"&&s.getElement();c&&c.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(s){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var c=this;this._map.once("moveend",function(){c._openOnceFlag=!1,c._openTooltip(s)});return}this._tooltip._source=s.layer||s.target,this.openTooltip(this._tooltip.options.sticky?s.latlng:void 0)}},_moveTooltip:function(s){var c=s.latlng,h,v;this._tooltip.options.sticky&&s.originalEvent&&(h=this._map.mouseEventToContainerPoint(s.originalEvent),v=this._map.containerPointToLayerPoint(h),c=this._map.layerPointToLatLng(v)),this._tooltip.setLatLng(c)}});var gy=Ys.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(s){var c=s&&s.tagName==="DIV"?s:document.createElement("div"),h=this.options;if(h.html instanceof Element?(Oc(c),c.appendChild(h.html)):c.innerHTML=h.html!==!1?h.html:"",h.bgPos){var v=H(h.bgPos);c.style.backgroundPosition=-v.x+"px "+-v.y+"px"}
vendor: 4,909 bytes, line 861
861return this._setIconStyles(c,"icon"),c},createShadow:function(){return null}});function kE(s){return new gy(s)}Ys.Default=Ja;var Xa=$n.extend({options:{tileSize:256,opacity:1,updateWhenIdle:pe.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(s){b(this,s)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(s){s._addZoomLimit(this)},onRemove:function(s){this._removeAllTiles(),it(this._container),s._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ks(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Zs(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(s){return this.options.opacity=s,this._updateOpacity(),this},setZIndex:function(s){return this.options.zIndex=s,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var s=this._clampZoom(this._map.getZoom());s!==this._tileZoom&&(this._tileZoom=s,this._updateLevels()),this._update()}return this},getEvents:function(){var s={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=f(this._onMoveEnd,this.options.updateInterval,this)),s.move=this._onMove),this._zoomAnimated&&(s.zoomanim=this._animateZoom),s},createTile:function(){return document.createElement("div")},getTileSize:function(){var s=this.options.tileSize;return s instanceof F?s:new F(s,s)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(s){for(var c=this.getPane().children,h=-s(-1/0,1/0),v=0,S=c.length,E;v<S;v++)E=c[v].style.zIndex,c[v]!==this._container&&E&&(h=s(h,+E));isFinite(h)&&(this.options.zIndex=h+s(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!pe.ielt9){jn(this._container,this.options.opacity);var s=+new Date,c=!1,h=!1;for(var v in this._tiles){var S=this._tiles[v];if(!(!S.current||!S.loaded)){var E=Math.min(1,(s-S.loaded)/200);jn(S.el,E),E<1?c=!0:(S.active?h=!0:this._onOpaqueTile(S),S.active=!0)}}h&&!this._noPrune&&this._pruneTiles(),c&&(U(this._fadeFrame),this._fadeFrame=B(this._updateOpacity,this))}},_onOpaqueTile:m,_initContainer:function(){this._container||(this._container=$e("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var s=this._tileZoom,c=this.options.maxZoom;if(s!==void 0){for(var h in this._levels)h=Number(h),this._levels[h].el.children.length||h===s?(this._levels[h].el.style.zIndex=c-Math.abs(s-h),this._onUpdateLevel(h)):(it(this._levels[h].el),this._removeTilesAtZoom(h),this._onRemoveLevel(h),delete this._levels[h]);var v=this._levels[s],S=this._map;return v||(v=this._levels[s]={},v.el=$e("div","leaflet-tile-container leaflet-zoom-animated",this._container),v.el.style.zIndex=c,v.origin=S.project(S.unproject(S.getPixelOrigin()),s).round(),v.zoom=s,this._setZoomTransform(v,S.getCenter(),S.getZoom()),m(v.el.offsetWidth),this._onCreateLevel(v)),this._level=v,v}},_onUpdateLevel:m,_onRemoveLevel:m,_onCreateLevel:m,_pruneTiles:function(){if(this._map){var s,c,h=this._map.getZoom();if(h>this.options.maxZoom||h<this.options.minZoom){this._removeAllTiles();return}for(s in this._tiles)c=this._tiles[s],c.retain=c.current;for(s in this._tiles)if(c=this._tiles[s],c.current&&!c.active){var v=c.coords;this._retainParent(v.x,v.y,v.z,v.z-5)||this._retainChildren(v.x,v.y,v.z,v.z+2)}for(s in this._tiles)this._tiles[s].retain||this._removeTile(s)}},_removeTilesAtZoom:function(s){for(var c in this._tiles)this._tiles[c].coords.z===s&&this._removeTile(c)},_removeAllTiles:function(){for(var s in this._tiles)this._removeTile(s)},_invalidateAll:function(){for(var s in this._levels)it(this._levels[s].el),this._onRemoveLevel(Number(s)),delete this._levels[s];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(s,c,h,v){var S=Math.floor(s/2),E=Math.floor(c/2),M=h-1,$=new F(+S,+E);$.z=+M;var q=this._tileCoordsToKey($),Q=this._tiles[q];return Q&&Q.active?(Q.retain=!0,!0):(Q&&Q.loaded&&(Q.retain=!0),M>v?this._retainParent(S,E,M,v):!1)},_retainChildren:function(s,c,h,v){for(var S=2*s;S<2*s+2;S++)for(var E=2*c;E<2*c+2;E++){var M=new F(S,E);M.z=h+1;var $=this._tileCoordsToKey(M),q=this._tiles[$];if(q&&q.active){q.retain=!0;continue}else q&&q.loaded&&(q.retain=!0);h+1<v&&this._retainChildren(S,E,h+1,v)}},_resetView:function(s){var c=s&&(s.pinch||s.flyTo);
vendor: 5,905 bytes, line 861
861this._setView(this._map.getCenter(),this._map.getZoom(),c,c)},_animateZoom:function(s){this._setView(s.center,s.zoom,!0,s.noUpdate)},_clampZoom:function(s){var c=this.options;return c.minNativeZoom!==void 0&&s<c.minNativeZoom?c.minNativeZoom:c.maxNativeZoom!==void 0&&c.maxNativeZoom<s?c.maxNativeZoom:s},_setView:function(s,c,h,v){var S=Math.round(c);this.options.maxZoom!==void 0&&S>this.options.maxZoom||this.options.minZoom!==void 0&&S<this.options.minZoom?S=void 0:S=this._clampZoom(S);var E=this.options.updateWhenZooming&&S!==this._tileZoom;(!v||E)&&(this._tileZoom=S,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),S!==void 0&&this._update(s),h||this._pruneTiles(),this._noPrune=!!h),this._setZoomTransforms(s,c)},_setZoomTransforms:function(s,c){for(var h in this._levels)this._setZoomTransform(this._levels[h],s,c)},_setZoomTransform:function(s,c,h){var v=this._map.getZoomScale(h,s.zoom),S=s.origin.multiplyBy(v).subtract(this._map._getNewPixelOrigin(c,h)).round();pe.any3d?Xi(s.el,S,v):gt(s.el,S)},_resetGrid:function(){var s=this._map,c=s.options.crs,h=this._tileSize=this.getTileSize(),v=this._tileZoom,S=this._map.getPixelWorldBounds(this._tileZoom);S&&(this._globalTileRange=this._pxBoundsToTileRange(S)),this._wrapX=c.wrapLng&&!this.options.noWrap&&[Math.floor(s.project([0,c.wrapLng[0]],v).x/h.x),Math.ceil(s.project([0,c.wrapLng[1]],v).x/h.y)],this._wrapY=c.wrapLat&&!this.options.noWrap&&[Math.floor(s.project([c.wrapLat[0],0],v).y/h.x),Math.ceil(s.project([c.wrapLat[1],0],v).y/h.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(s){var c=this._map,h=c._animatingZoom?Math.max(c._animateToZoom,c.getZoom()):c.getZoom(),v=c.getZoomScale(h,this._tileZoom),S=c.project(s,this._tileZoom).floor(),E=c.getSize().divideBy(v*2);return new Z(S.subtract(E),S.add(E))},_update:function(s){var c=this._map;if(c){var h=this._clampZoom(c.getZoom());if(s===void 0&&(s=c.getCenter()),this._tileZoom!==void 0){var v=this._getTiledPixelBounds(s),S=this._pxBoundsToTileRange(v),E=S.getCenter(),M=[],$=this.options.keepBuffer,q=new Z(S.getBottomLeft().subtract([$,-$]),S.getTopRight().add([$,-$]));if(!(isFinite(S.min.x)&&isFinite(S.min.y)&&isFinite(S.max.x)&&isFinite(S.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var Q in this._tiles){var oe=this._tiles[Q].coords;(oe.z!==this._tileZoom||!q.contains(new F(oe.x,oe.y)))&&(this._tiles[Q].current=!1)}if(Math.abs(h-this._tileZoom)>1){this._setView(s,h);return}for(var _e=S.min.y;_e<=S.max.y;_e++)for(var Ie=S.min.x;Ie<=S.max.x;Ie++){var Vt=new F(Ie,_e);if(Vt.z=this._tileZoom,!!this._isValidTile(Vt)){var Ct=this._tiles[this._tileCoordsToKey(Vt)];Ct?Ct.current=!0:M.push(Vt)}}if(M.sort(function(Xt,to){return Xt.distanceTo(E)-to.distanceTo(E)}),M.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Cn=document.createDocumentFragment();for(Ie=0;Ie<M.length;Ie++)this._addTile(M[Ie],Cn);this._level.el.appendChild(Cn)}}}},_isValidTile:function(s){var c=this._map.options.crs;if(!c.infinite){var h=this._globalTileRange;if(!c.wrapLng&&(s.x<h.min.x||s.x>h.max.x)||!c.wrapLat&&(s.y<h.min.y||s.y>h.max.y))return!1}if(!this.options.bounds)return!0;var v=this._tileCoordsToBounds(s);return V(this.options.bounds).overlaps(v)},_keyToBounds:function(s){return this._tileCoordsToBounds(this._keyToTileCoords(s))},_tileCoordsToNwSe:function(s){var c=this._map,h=this.getTileSize(),v=s.scaleBy(h),S=v.add(h),E=c.unproject(v,s.z),M=c.unproject(S,s.z);return[E,M]},_tileCoordsToBounds:function(s){var c=this._tileCoordsToNwSe(s),h=new ue(c[0],c[1]);return this.options.noWrap||(h=this._map.wrapLatLngBounds(h)),h},_tileCoordsToKey:function(s){return s.x+":"+s.y+":"+s.z},_keyToTileCoords:function(s){var c=s.split(":"),h=new F(+c[0],+c[1]);return h.z=+c[2],h},_removeTile:function(s){var c=this._tiles[s];c&&(it(c.el),delete this._tiles[s],this.fire("tileunload",{tile:c.el,coords:this._keyToTileCoords(s)}))},_initTile:function(s){Oe(s,"leaflet-tile");var c=this.getTileSize();s.style.width=c.x+"px",s.style.height=c.y+"px",s.onselectstart=m,s.onmousemove=m,pe.ielt9&&this.options.opacity<1&&jn(s,this.options.opacity)},_addTile:function(s,c){var h=this._getTilePos(s),v=this._tileCoordsToKey(s),S=this.createTile(this._wrapCoords(s),l(this._tileReady,this,s));this._initTile(S),this.createTile.length<2&&B(l(this._tileReady,this,s,null,S)),gt(S,h),this._tiles[v]={el:S,coords:s,current:!0},c.appendChild(S),this.fire("tileloadstart",{tile:S,coords:s})},_tileReady:function(s,c,h){c&&this.fire("tileerror",{error:c,tile:h,coords:s});var v=this._tileCoordsToKey(s);h=this._tiles[v],h&&(h.loaded=+new Date,this._map._fadeAnimated?(jn(h.el,0),U(this._fadeFrame),this._fadeFrame=B(this._updateOpacity,this)):(h.active=!0,this._pruneTiles()),c||(Oe(h.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:h.el,coords:s})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),pe.ielt9||!this._map._fadeAnimated?B(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(s){return s.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(s){var c=new F(this._wrapX?p(s.x,this._wrapX):s.x,this._wrapY?p(s.y,this._wrapY):s.y);return c.z=s.z,c},_pxBoundsToTileRange:function(s){var c=this.getTileSize();return new Z(s.min.unscaleBy(c).floor(),s.max.unscaleBy(c).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var s in this._tiles)if(!this._tiles[s].loaded)return!1;return!0}});function PE(s){return new Xa(s)}var eo=Xa.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(s,c){this._url=s,c=b(this,c),c.detectRetina&&pe.retina&&c.maxZoom>0?(c.tileSize=Math.floor(c.tileSize/2),c.zoomReverse?(c.zoomOffset--,c.minZoom=Math.min(c.maxZoom,c.minZ
vendor: 4,670 bytes, line 861
861oom+1)):(c.zoomOffset++,c.maxZoom=Math.max(c.minZoom,c.maxZoom-1)),c.minZoom=Math.max(0,c.minZoom)):c.zoomReverse?c.minZoom=Math.min(c.maxZoom,c.minZoom):c.maxZoom=Math.max(c.minZoom,c.maxZoom),typeof c.subdomains=="string"&&(c.subdomains=c.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(s,c){return this._url===s&&c===void 0&&(c=!0),this._url=s,c||this.redraw(),this},createTile:function(s,c){var h=document.createElement("img");return Pe(h,"load",l(this._tileOnLoad,this,c,h)),Pe(h,"error",l(this._tileOnError,this,c,h)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(h.referrerPolicy=this.options.referrerPolicy),h.alt="",h.src=this.getTileUrl(s),h},getTileUrl:function(s){var c={r:pe.retina?"@2x":"",s:this._getSubdomain(s),x:s.x,y:s.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var h=this._globalTileRange.max.y-s.y;this.options.tms&&(c.y=h),c["-y"]=h}return _(this._url,i(c,this.options))},_tileOnLoad:function(s,c){pe.ielt9?setTimeout(l(s,this,null,c),0):s(null,c)},_tileOnError:function(s,c,h){var v=this.options.errorTileUrl;v&&c.getAttribute("src")!==v&&(c.src=v),s(h,c)},_onTileRemove:function(s){s.tile.onload=null},_getZoomForUrl:function(){var s=this._tileZoom,c=this.options.maxZoom,h=this.options.zoomReverse,v=this.options.zoomOffset;return h&&(s=c-s),s+v},_getSubdomain:function(s){var c=Math.abs(s.x+s.y)%this.options.subdomains.length;return this.options.subdomains[c]},_abortLoading:function(){var s,c;for(s in this._tiles)if(this._tiles[s].coords.z!==this._tileZoom&&(c=this._tiles[s].el,c.onload=m,c.onerror=m,!c.complete)){c.src=k;var h=this._tiles[s].coords;it(c),delete this._tiles[s],this.fire("tileabort",{tile:c,coords:h})}},_removeTile:function(s){var c=this._tiles[s];if(c)return c.el.setAttribute("src",k),Xa.prototype._removeTile.call(this,s)},_tileReady:function(s,c,h){if(!(!this._map||h&&h.getAttribute("src")===k))return Xa.prototype._tileReady.call(this,s,c,h)}});function vy(s,c){return new eo(s,c)}var yy=eo.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(s,c){this._url=s;var h=i({},this.defaultWmsParams);for(var v in c)v in this.options||(h[v]=c[v]);c=b(this,c);var S=c.detectRetina&&pe.retina?2:1,E=this.getTileSize();h.width=E.x*S,h.height=E.y*S,this.wmsParams=h},onAdd:function(s){this._crs=this.options.crs||s.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var c=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[c]=this._crs.code,eo.prototype.onAdd.call(this,s)},getTileUrl:function(s){var c=this._tileCoordsToNwSe(s),h=this._crs,v=ee(h.project(c[0]),h.project(c[1])),S=v.min,E=v.max,M=(this._wmsVersion>=1.3&&this._crs===uy?[S.y,S.x,E.y,E.x]:[S.x,S.y,E.x,E.y]).join(","),$=eo.prototype.getTileUrl.call(this,s);return $+C(this.wmsParams,$,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+M},setParams:function(s,c){return i(this.wmsParams,s),c||this.redraw(),this}});function AE(s,c){return new yy(s,c)}eo.WMS=yy,vy.wms=AE;var Or=$n.extend({options:{padding:.1},initialize:function(s){b(this,s),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Oe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var s={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(s.zoomanim=this._onAnimZoom),s},_onAnimZoom:function(s){this._updateTransform(s.center,s.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(s,c){var h=this._map.getZoomScale(c,this._zoom),v=this._map.getSize().multiplyBy(.5+this.options.padding),S=this._map.project(this._center,c),E=v.multiplyBy(-h).add(S).subtract(this._map._getNewPixelOrigin(s,c));pe.any3d?Xi(this._container,E,h):gt(this._container,E)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var s in this._layers)this._layers[s]._reset()},_onZoomEnd:function(){for(var s in this._layers)this._layers[s]._project()},_updatePaths:function(){for(var s in this._layers)this._layers[s]._update()},_update:function(){var s=this.options.padding,c=this._map.getSize(),h=this._map.containerPointToLayerPoint(c.multiplyBy(-s)).round();
vendor: 3,977 bytes, line 861
861this._bounds=new Z(h,h.add(c.multiplyBy(1+s*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),xy=Or.extend({options:{tolerance:0},getEvents:function(){var s=Or.prototype.getEvents.call(this);return s.viewprereset=this._onViewPreReset,s},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Or.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var s=this._container=document.createElement("canvas");Pe(s,"mousemove",this._onMouseMove,this),Pe(s,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Pe(s,"mouseout",this._handleMouseOut,this),s._leaflet_disable_events=!0,this._ctx=s.getContext("2d")},_destroyContainer:function(){U(this._redrawRequest),delete this._ctx,it(this._container),Ze(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var s;this._redrawBounds=null;for(var c in this._layers)s=this._layers[c],s._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Or.prototype._update.call(this);var s=this._bounds,c=this._container,h=s.getSize(),v=pe.retina?2:1;gt(c,s.min),c.width=v*h.x,c.height=v*h.y,c.style.width=h.x+"px",c.style.height=h.y+"px",pe.retina&&this._ctx.scale(2,2),this._ctx.translate(-s.min.x,-s.min.y),this.fire("update")}},_reset:function(){Or.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(s){this._updateDashArray(s),this._layers[d(s)]=s;var c=s._order={layer:s,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=c),this._drawLast=c,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(s){this._requestRedraw(s)},_removePath:function(s){var c=s._order,h=c.next,v=c.prev;h?h.prev=v:this._drawLast=v,v?v.next=h:this._drawFirst=h,delete s._order,delete this._layers[d(s)],this._requestRedraw(s)},_updatePath:function(s){this._extendRedrawBounds(s),s._project(),s._update(),this._requestRedraw(s)},_updateStyle:function(s){this._updateDashArray(s),this._requestRedraw(s)},_updateDashArray:function(s){if(typeof s.options.dashArray=="string"){var c=s.options.dashArray.split(/[, ]+/),h=[],v,S;for(S=0;S<c.length;S++){if(v=Number(c[S]),isNaN(v))return;h.push(v)}s.options._dashArray=h}else s.options._dashArray=s.options.dashArray},_requestRedraw:function(s){this._map&&(this._extendRedrawBounds(s),this._redrawRequest=this._redrawRequest||B(this._redraw,this))},_extendRedrawBounds:function(s){if(s._pxBounds){var c=(s.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Z,this._redrawBounds.extend(s._pxBounds.min.subtract([c,c])),this._redrawBounds.extend(s._pxBounds.max.add([c,c]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var s=this._redrawBounds;if(s){var c=s.getSize();this._ctx.clearRect(s.min.x,s.min.y,c.x,c.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var s,c=this._redrawBounds;if(this._ctx.save(),c){var h=c.getSize();this._ctx.beginPath(),this._ctx.rect(c.min.x,c.min.y,h.x,h.y),this._ctx.clip()}this._drawing=!0;for(var v=this._drawFirst;v;v=v.next)s=v.layer,(!c||s._pxBounds&&s._pxBounds.intersects(c))&&s._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(s,c){if(this._drawing){var h,v,S,E,M=s._parts,$=M.length,q=this._ctx;if($){for(q.beginPath(),h=0;h<$;h++){for(v=0,S=M[h].length;v<S;v++)E=M[h][v],q[v?"lineTo":"moveTo"](E.x,E.y);c&&q.closePath()}this._fillStroke(q,s)}}},_updateCircle:function(s){if(!(!this._drawing||s._empty())){var c=s._point,h=this._ctx,v=Math.max(Math.round(s._radius),1),S=(Math.max(Math.round(s._radiusY),1)||v)/v;S!==1&&(h.save(),h.scale(1,S)),h.beginPath(),h.arc(c.x,c.y/S,v,0,Math.PI*2,!1),S!==1&&h.restore(
vendor: 6,860 bytes, line 861
861),this._fillStroke(h,s)}},_fillStroke:function(s,c){var h=c.options;h.fill&&(s.globalAlpha=h.fillOpacity,s.fillStyle=h.fillColor||h.color,s.fill(h.fillRule||"evenodd")),h.stroke&&h.weight!==0&&(s.setLineDash&&s.setLineDash(c.options&&c.options._dashArray||[]),s.globalAlpha=h.opacity,s.lineWidth=h.weight,s.strokeStyle=h.color,s.lineCap=h.lineCap,s.lineJoin=h.lineJoin,s.stroke())},_onClick:function(s){for(var c=this._map.mouseEventToLayerPoint(s),h,v,S=this._drawFirst;S;S=S.next)h=S.layer,h.options.interactive&&h._containsPoint(c)&&(!(s.type==="click"||s.type==="preclick")||!this._map._draggableMoved(h))&&(v=h);this._fireEvent(v?[v]:!1,s)},_onMouseMove:function(s){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var c=this._map.mouseEventToLayerPoint(s);this._handleMouseHover(s,c)}},_handleMouseOut:function(s){var c=this._hoveredLayer;c&&(ht(this._container,"leaflet-interactive"),this._fireEvent([c],s,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(s,c){if(!this._mouseHoverThrottled){for(var h,v,S=this._drawFirst;S;S=S.next)h=S.layer,h.options.interactive&&h._containsPoint(c)&&(v=h);v!==this._hoveredLayer&&(this._handleMouseOut(s),v&&(Oe(this._container,"leaflet-interactive"),this._fireEvent([v],s,"mouseover"),this._hoveredLayer=v)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,s),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(s,c,h){this._map._fireDOMEvent(c,h||c.type,s)},_bringToFront:function(s){var c=s._order;if(c){var h=c.next,v=c.prev;if(h)h.prev=v;else return;v?v.next=h:h&&(this._drawFirst=h),c.prev=this._drawLast,this._drawLast.next=c,c.next=null,this._drawLast=c,this._requestRedraw(s)}},_bringToBack:function(s){var c=s._order;if(c){var h=c.next,v=c.prev;if(v)v.next=h;else return;h?h.prev=v:v&&(this._drawLast=v),c.prev=null,c.next=this._drawFirst,this._drawFirst.prev=c,this._drawFirst=c,this._requestRedraw(s)}}});function by(s){return pe.canvas?new xy(s):null}var el=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(s){return document.createElement("<lvml:"+s+' class="lvml">')}}catch{}return function(s){return document.createElement("<"+s+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),OE={_initContainer:function(){this._container=$e("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Or.prototype._update.call(this),this.fire("update"))},_initPath:function(s){var c=s._container=el("shape");Oe(c,"leaflet-vml-shape "+(this.options.className||"")),c.coordsize="1 1",s._path=el("path"),c.appendChild(s._path),this._updateStyle(s),this._layers[d(s)]=s},_addPath:function(s){var c=s._container;this._container.appendChild(c),s.options.interactive&&s.addInteractiveTarget(c)},_removePath:function(s){var c=s._container;it(c),s.removeInteractiveTarget(c),delete this._layers[d(s)]},_updateStyle:function(s){var c=s._stroke,h=s._fill,v=s.options,S=s._container;S.stroked=!!v.stroke,S.filled=!!v.fill,v.stroke?(c||(c=s._stroke=el("stroke")),S.appendChild(c),c.weight=v.weight+"px",c.color=v.color,c.opacity=v.opacity,v.dashArray?c.dashStyle=N(v.dashArray)?v.dashArray.join(" "):v.dashArray.replace(/( *, *)/g," "):c.dashStyle="",c.endcap=v.lineCap.replace("butt","flat"),c.joinstyle=v.lineJoin):c&&(S.removeChild(c),s._stroke=null),v.fill?(h||(h=s._fill=el("fill")),S.appendChild(h),h.color=v.fillColor||v.color,h.opacity=v.fillOpacity):h&&(S.removeChild(h),s._fill=null)},_updateCircle:function(s){var c=s._point.round(),h=Math.round(s._radius),v=Math.round(s._radiusY||h);this._setPath(s,s._empty()?"M0 0":"AL "+c.x+","+c.y+" "+h+","+v+" 0,"+65535*360)},_setPath:function(s,c){s._path.v=c},_bringToFront:function(s){Ks(s._container)},_bringToBack:function(s){Zs(s._container)}},Gc=pe.vml?el:pt,tl=Or.extend({_initContainer:function(){this._container=Gc("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Gc("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){it(this._container),Ze(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Or.prototype._update.call(this);var s=this._bounds,c=s.getSize(),h=this._container;(!this._svgSize||!this._svgSize.equals(c))&&(this._svgSize=c,h.setAttribute("width",c.x),h.setAttribute("height",c.y)),gt(h,s.min),h.setAttribute("viewBox",[s.min.x,s.min.y,c.x,c.y].join(" ")),this.fire("update")}},_initPath:function(s){var c=s._path=Gc("path");s.options.className&&Oe(c,s.options.className),s.options.interactive&&Oe(c,"leaflet-interactive"),this._updateStyle(s),this._layers[d(s)]=s},_addPath:function(s){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(s._path),s.addInteractiveTarget(s._path)},_removePath:function(s){it(s._path),s.removeInteractiveTarget(s._path),delete this._layers[d(s)]},_updatePath:function(s){s._project(),s._update()},_updateStyle:function(s){var c=s._path,h=s.options;c&&(h.stroke?(c.setAttribute("stroke",h.color),c.setAttribute("stroke-opacity",h.opacity),c.setAttribute("stroke-width",h.weight),c.setAttribute("stroke-linecap",h.lineCap),c.setAttribute("stroke-linejoin",h.lineJoin),h.dashArray?c.setAttribute("stroke-dasharray",h.dashArray):c.removeAttribute("stroke-dasharray"),h.dashOffset?c.setAttribute("stroke-dashoffset",h.dashOffset):c.removeAttribute("stroke-dashoffset")):c.setAttribute("stroke","none"),h.fill?(c.setAttribute("fill",h.fillColor||h.color),c.setAttribute("fill-opacity",h.fillOpacity),c.setAttribute("fill-rule",h.fillRule||"evenodd")):c.setAttribute("fill","none"))},_updatePoly:function(s,c){this._setPath(s,nt(s._parts,c))},_updateCircle:function(s){var c=s._point,h=Math.max(Math.round(s._radius),1),v=Math.max(Math.round(s._radiusY),1)||h,S="a"+h+","+v+" 0 1,0 ",E=s._empty()?"M0 0":"M"+(c.x-h)+","+c.y+S+h*2+",0 "+S+-h*2+",0 ";this._setPath(s,E)},_setPath:function(s,c){s._path.setAttribute("d",c)},_bringToFront:function(s){Ks(s._path)},_bringToBack:function(s){Zs(s._path)}});pe.vml&&tl.include(OE);function wy(s){return pe.svg||pe.vml?new tl(s):null}De.include({getRenderer:function(s){var c=s.options.renderer||this._getPaneRenderer(s.options.pane)||this.options.renderer||this._renderer;return c||(c=this._renderer=this._createRenderer()),this.hasLayer(c)||this.addLayer(c),c},_getPaneRenderer:function(s){if(s==="overlayPane"||s===void 0)return!1;var c=this._paneRenderers[s];return c===void 0&&(c=this._createRenderer({pane:s}),this._paneRenderers[s]=c),c},_createRenderer:function(s){return this.options.preferCanvas&&by(s)||wy(s)}});var _y=Js.extend({initialize:function(s,c){Js.prototype.initialize.call(this,this._boundsToLatLngs(s),c)},setBounds:function(s){return this.setLatLngs(this._boundsToLatLngs(s))}
vendor: 11,596 bytes, line 861
861,_boundsToLatLngs:function(s){return s=V(s),[s.getSouthWest(),s.getNorthWest(),s.getNorthEast(),s.getSouthEast()]}});function RE(s,c){return new _y(s,c)}tl.create=Gc,tl.pointsToPath=nt,Ar.geometryToLayer=Bc,Ar.coordsToLatLng=Wh,Ar.coordsToLatLngs=$c,Ar.latLngToCoords=Hh,Ar.latLngsToCoords=qc,Ar.getFeature=Xs,Ar.asFeature=Uc,De.mergeOptions({boxZoom:!0});var Sy=dr.extend({initialize:function(s){this._map=s,this._container=s._container,this._pane=s._panes.overlayPane,this._resetStateTimeout=0,s.on("unload",this._destroy,this)},addHooks:function(){Pe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){it(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(s){if(!s.shiftKey||s.which!==1&&s.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Ha(),Th(),this._startPoint=this._map.mouseEventToContainerPoint(s),Pe(document,{contextmenu:ns,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(s){this._moved||(this._moved=!0,this._box=$e("div","leaflet-zoom-box",this._container),Oe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(s);var c=new Z(this._point,this._startPoint),h=c.getSize();gt(this._box,c.min),this._box.style.width=h.x+"px",this._box.style.height=h.y+"px"},_finish:function(){this._moved&&(it(this._box),ht(this._container,"leaflet-crosshair")),Ga(),kh(),Ze(document,{contextmenu:ns,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(s){if(!(s.which!==1&&s.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0);var c=new ue(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(c).fire("boxzoomend",{boxZoomBounds:c})}},_onKeyDown:function(s){s.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});De.addInitHook("addHandler","boxZoom",Sy),De.mergeOptions({doubleClickZoom:!0});var jy=dr.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(s){var c=this._map,h=c.getZoom(),v=c.options.zoomDelta,S=s.originalEvent.shiftKey?h-v:h+v;c.options.doubleClickZoom==="center"?c.setZoom(S):c.setZoomAround(s.containerPoint,S)}});De.addInitHook("addHandler","doubleClickZoom",jy),De.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ny=dr.extend({addHooks:function(){if(!this._draggable){var s=this._map;this._draggable=new ri(s._mapPane,s._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),s.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),s.on("zoomend",this._onZoomEnd,this),s.whenReady(this._onZoomEnd,this))}Oe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ht(this._map._container,"leaflet-grab"),ht(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var s=this._map;if(s._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var c=V(this._map.options.maxBounds);this._offsetLimit=ee(this._map.latLngToContainerPoint(c.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(c.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;s.fire("movestart").fire("dragstart"),s.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(s){if(this._map.options.inertia){var c=this._lastTime=+new Date,h=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(h),this._times.push(c),this._prunePositions(c)}this._map.fire("move",s).fire("drag",s)},_prunePositions:function(s){for(;this._positions.length>1&&s-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var s=this._map.getSize().divideBy(2),c=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=c.subtract(s).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(s,c){return s-(s-c)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var s=this._draggable._newPos.subtract(this._draggable._startPos),c=this._offsetLimit;s.x<c.min.x&&(s.x=this._viscousLimit(s.x,c.min.x)),s.y<c.min.y&&(s.y=this._viscousLimit(s.y,c.min.y)),s.x>c.max.x&&(s.x=this._viscousLimit(s.x,c.max.x)),s.y>c.max.y&&(s.y=this._viscousLimit(s.y,c.max.y)),this._draggable._newPos=this._draggable._startPos.add(s)}},_onPreDragWrap:function(){var s=this._worldWidth,c=Math.round(s/2),h=this._initialWorldOffset,v=this._draggable._newPos.x,S=(v-c+h)%s+c-h,E=(v+c+h)%s-c-h,M=Math.abs(S+h)<Math.abs(E+h)?S:E;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=M},_onDragEnd:function(s){var c=this._map,h=c.options,v=!h.inertia||s.noInertia||this._times.length<2;if(c.fire("dragend",s),v)c.fire("moveend");else{this._prunePositions(+new Date);var S=this._lastPos.subtract(this._positions[0]),E=(this._lastTime-this._times[0])/1e3,M=h.easeLinearity,$=S.multiplyBy(M/E),q=$.distanceTo([0,0]),Q=Math.min(h.inertiaMaxSpeed,q),oe=$.multiplyBy(Q/q),_e=Q/(h.inertiaDeceleration*M),Ie=oe.multiplyBy(-_e/2).round();!Ie.x&&!Ie.y?c.fire("moveend"):(Ie=c._limitOffset(Ie,c.options.maxBounds),B(function(){c.panBy(Ie,{duration:_e,easeLinearity:M,noMoveStart:!0,animate:!0})}))}}});De.addInitHook("addHandler","dragging",Ny),De.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Cy=dr.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(s){this._map=s,this._setPanDelta(s.options.keyboardPanDelta),this._setZoomDelta(s.options.zoomDelta)},addHooks:function(){var s=this._map._container;s.tabIndex<=0&&(s.tabIndex="0"),Pe(s,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ze(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var s=document.body,c=document.documentElement,h=s.scrollTop||c.scrollTop,v=s.scrollLeft||c.scrollLeft;this._map._container.focus(),window.scrollTo(v,h)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(s){var c=this._panKeys={},h=this.keyCodes,v,S;for(v=0,S=h.left.length;v<S;v++)c[h.left[v]]=[-1*s,0];for(v=0,S=h.right.length;v<S;v++)c[h.right[v]]=[s,0];for(v=0,S=h.down.length;v<S;v++)c[h.down[v]]=[0,s];for(v=0,S=h.up.length;v<S;v++)c[h.up[v]]=[0,-1*s]},_setZoomDelta:function(s){var c=this._zoomKeys={},h=this.keyCodes,v,S;for(v=0,S=h.zoomIn.length;v<S;v++)c[h.zoomIn[v]]=s;for(v=0,S=h.zoomOut.length;v<S;v++)c[h.zoomOut[v]]=-s},_addHooks:function(){Pe(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ze(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(s){if(!(s.altKey||s.ctrlKey||s.metaKey)){var c=s.keyCode,h=this._map,v;if(c in this._panKeys){if(!h._panAnim||!h._panAnim._inProgress)if(v=this._panKeys[c],s.shiftKey&&(v=H(v).multiplyBy(3)),h.options.maxBounds&&(v=h._limitOffset(H(v),h.options.maxBounds)),h.options.worldCopyJump){var S=h.wrapLatLng(h.unproject(h.project(h.getCenter()).add(v)));h.panTo(S)}else h.panBy(v)}else if(c in this._zoomKeys)h.setZoom(h.getZoom()+(s.shiftKey?3:1)*this._zoomKeys[c]);else if(c===27&&h._popup&&h._popup.options.closeOnEscapeKey)h.closePopup();else return;ns(s)}}});De.addInitHook("addHandler","keyboard",Cy),De.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Ey=dr.extend({addHooks:function(){Pe(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ze(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(s){var c=Yv(s),h=this._map.options.wheelDebounceTime;this._delta+=c,this._lastMousePos=this._map.mouseEventToContainerPoint(s),this._startTime||(this._startTime=+new Date);var v=Math.max(h-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),v),ns(s)},_performZoom:function(){var s=this._map,c=s.getZoom(),h=this._map.options.zoomSnap||0;s._stop();var v=this._delta/(this._map.options.wheelPxPerZoomLevel*4),S=4*Math.log(2/(1+Math.exp(-Math.abs(v))))/Math.LN2,E=h?Math.ceil(S/h)*h:S,M=s._limitZoom(c+(this._delta>0?E:-E))-c;this._delta=0,this._startTime=null,M&&(s.options.scrollWheelZoom==="center"?s.setZoom(c+M):s.setZoomAround(this._lastMousePos,c+M))}});De.addInitHook("addHandler","scrollWheelZoom",Ey);var IE=600;De.mergeOptions({tapHold:pe.touchNative&&pe.safari&&pe.mobile,tapTolerance:15});var Ty=dr.extend({addHooks:function(){Pe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},_onDown:function(s){if(clearTimeout(this._holdTimeout),s.touches.length===1){var c=s.touches[0];this._startPos=this._newPos=new F(c.clientX,c.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(Pe(document,"touchend",At),Pe(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",c))},this),IE),Pe(document,"touchend touchcancel contextmenu",this._cancel,this),Pe(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function s(){Ze(document,"touchend",At),Ze(document,"touchend touchcancel",s)},_cancel:function(){clearTimeout(this._holdTimeout),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(document,"touchmove",this._onMove,this)},_onMove:function(s){var c=s.touches[0];this._newPos=new F(c.clientX,c.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(s,c){var h=new MouseEvent(s,{bubbles:!0,cancelable:!0,view:window,screenX:c.screenX,screenY:c.screenY,clientX:c.clientX,clientY:c.clientY});h._simulated=!0,c.target.dispatchEvent(h)}});De.addInitHook("addHandler","tapHold",Ty),De.mergeOptions({touchZoom:pe.touch,bounceAtZoomLimits:!0});var ky=dr.extend({addHooks:function(){Oe(this._map._container,"leaflet-touch-zoom"),Pe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ht(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(s){var c=this._map;if(!(!s.touches||s.touches.length!==2||c._animatingZoom||this._zooming)){var h=c.mouseEventToContainerPoint(s.touches[0]),v=c.mouseEventToContainerPoint(s.touches[1]);
861this._centerPoint=c.getSize()._divideBy(2),this._startLatLng=c.containerPointToLatLng(this._centerPoint),c.options.touchZoom!=="center"&&(this._pinchStartLatLng=c.containerPointToLatLng(h.add(v)._divideBy(2))),this._startDist=h.distanceTo(v),this._startZoom=c.getZoom(),this._moved=!1,this._zooming=!0,c._stop(),Pe(document,"touchmove",this._onTouchMove,this),Pe(document,"touchend touchcancel",this._onTouchEnd,this),At(s)}},_onTouchMove:function(s){if(!(!s.touches||s.touches.length!==2||!this._zooming)){var c=this._map,h=c.mouseEventToContainerPoint(s.touches[0]),v=c.mouseEventToContainerPoint(s.touches[1]),S=h.distanceTo(v)/this._startDist;if(this._zoom=c.getScaleZoom(S,this._startZoom),!c.options.bounceAtZoomLimits&&(this._zoom<c.getMinZoom()&&S<1||this._zoom>c.getMaxZoom()&&S>1)&&(this._zoom=c._limitZoom(this._zoom)),c.options.touchZoom==="center"){if(this._center=this._startLatLng,S===1)return}else{var E=h._add(v)._divideBy(2)._subtract(this._centerPoint);if(S===1&&E.x===0&&E.y===0)return;this._center=c.unproject(c.project(this._pinchStartLatLng,this._zoom).subtract(E),this._zoom)}this._moved||(c._moveStart(!0,!1),this._moved=!0),U(this._animRequest);var M=l(c._move,c,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=B(M,this,!0),At(s)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,U(this._animRequest),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});De.addInitHook("addHandler","touchZoom",ky),De.BoxZoom=Sy,De.DoubleClickZoom=jy,De.Drag=Ny,De.Keyboard=Cy,De.ScrollWheelZoom=Ey,De.TapHold=Ty,De.TouchZoom=ky,n.Bounds=Z,n.Browser=pe,n.CRS=te,n.Canvas=xy,n.Circle=Vh,n.CircleMarker=Fc,n.Class=G,n.Control=Bn,n.DivIcon=gy,n.DivOverlay=hr,n.DomEvent=JC,n.DomUtil=QC,n.Draggable=ri,n.Evented=le,n.FeatureGroup=kr,n.GeoJSON=Ar,n.GridLayer=Xa,n.Handler=dr,n.Icon=Ys,n.ImageOverlay=Vc,n.LatLng=z,n.LatLngBounds=ue,n.Layer=$n,n.LayerGroup=Qs,n.LineUtil=dE,n.Map=De,n.Marker=Dc,n.Mixin=sE,n.Path=ii,n.Point=F,n.PolyUtil=oE,n.Polygon=Js,n.Polyline=Pr,n.Popup=Wc,n.PosAnimation=Jv,n.Projection=hE,n.Rectangle=_y,n.Renderer=Or,n.SVG=tl,n.SVGOverlay=py,n.TileLayer=eo,n.Tooltip=Hc,n.Transformation=Ee,n.Util=ie,n.VideoOverlay=my,n.bind=l,n.bounds=ee,n.canvas=by,n.circle=bE,n.circleMarker=xE,n.control=Qa,n.divIcon=kE,n.extend=i,n.featureGroup=gE,n.geoJSON=fy,n.geoJson=SE,n.gridLayer=PE,n.icon=vE,n.imageOverlay=jE,n.latLng=W,n.latLngBounds=V,n.layerGroup=pE,n.map=XC,n.marker=yE,n.point=H,n.polygon=_E,n.polyline=wE,n.popup=EE,n.rectangle=RE,n.setOptions=b,n.stamp=d,n.svg=wy,n.svgOverlay=CE,n.tileLayer=vy,n.tooltip=TE,n.transformation=Ne,n.version=r,n.videoOverlay=NE;var LE=window.L;n.noConflict=function(){return window.L=LE,this},window.L=n})})(kp,kp.exports);var ZD=kp.exports;const Cu=Mp(ZD),QD=[{name:"Brasile",flag:"🇧🇷",lat:-14.235,lng:-51.9253,city:"Ananindeua"},{name:"Camerun",flag:"🇨🇲",lat:5.9527,lng:10.1469,city:"Yaoundé"},{name:"Costa d'Avorio",flag:"🇨🇮",lat:7.539989,lng:-5.54708,city:"Abidjan"},{name:"Filippine",flag:"🇵🇭",lat:14.5995,lng:120.9842,city:"Manila"},{name:"Italia",flag:"🇮🇹",lat:41.9028,lng:12.4964,city:"Roma"},{name:"Messico",flag:"🇲🇽",lat:23.6345,lng:-102.5528,city:"Ciudad de México"},{name:"Pakistan",flag:"🇵🇰",lat:30.3753,lng:69.3451,city:"Islamabad"},{name:"Rep. Dem. Congo",flag:"🇨🇩",lat:-4.0383,lng:21.7587,city:"Kinshasa"}],YD=({countries:e}={})=>{const t=(e&&e.length>0?e:QD).filter(i=>i.lat!=null&&i.lng!=null),n=x.useRef(null),r=x.useRef(null);return x.useEffect(()=>{if(!n.current||r.current)return;const i=Cu.map(n.current,{center:[20,10],zoom:2,minZoom:2,maxZoom:6,scrollWheelZoom:!1,zoomControl:!0});r.current=i,Cu.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:19}).addTo(i);const o=l=>Cu.divIcon({className:"custom-marker",html:`
862          <div class="marker-container">
863            <div class="marker-pulse"></div>
864            <div class="marker-icon">${l}</div>
865          </div>
866        `,iconSize:[40,40],iconAnchor:[20,20]});return t.forEach(l=>{Cu.marker([l.lat,l.lng],{icon:o(l.flag)}).addTo(i).bindPopup(`
867        <div class="custom-popup">
868          <div class="popup-flag">${l.flag}</div>
869          <div class="popup-content">
870            <strong>${l.name}</strong>
871            <span>${l.city}</span>
872          </div>
873        </div>
874      `,{className:"custom-popup-container"})}),()=>{r.current&&(r.current.remove(),r.current=null)}},[JSON.stringify(t)]),a.jsxs("div",{className:"w-full",children:[a.jsx("div",{ref:n,className:"w-full h-[400px] md:h-[500px] rounded-xl overflow-hidden shadow-lg border border-border/30",style:{zIndex:1}}),a.jsx("div",{className:"mt-6 flex flex-wrap justify-center gap-3",children:t.map(i=>a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-card rounded-full border border-border/50 shadow-sm hover:shadow-md transition-all duration-200 hover:scale-105 cursor-default",children:[a.jsx("span",{className:"text-xl",children:i.flag}),a.jsx("span",{className:"text-sm font-medium text-foreground",children:i.name})]},i.name))}),a.jsx("style",{children:`
875        .custom-marker {
876          background: transparent !important;
877          border: none !important;
878        }
879        
880        .marker-container {
881          position: relative;
882          width: 40px;
883          height: 40px;
884          display: flex;
885          align-items: center;
886          justify-content: center;
887        }
888        
889        .marker-pulse {
890          position: absolute;
891          width: 40px;
892          height: 40px;
893          border-radius: 50%;
894          background: hsl(var(--primary) / 0.3);
895          animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
896        }
897        
898        .marker-icon {
899          position: relative;
900          z-index: 2;
901          font-size: 24px;
902          filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
903          transition: transform 0.2s ease;
904        }
905        
906        .marker-container:hover .marker-icon {
907          transform: scale(1.2);
908        }
909        
910        @keyframes pulse-ring {
911          0% {
912            transform: scale(0.5);
913            opacity: 1;
914          }
915          100% {
916            transform: scale(1.5);
917            opacity: 0;
918          }
919        }
920        
921        .custom-popup-container .leaflet-popup-content-wrapper {
922          background: hsl(var(--card));
923          color: hsl(var(--card-foreground));
924          border-radius: 12px;
925          box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
926          border: 1px solid hsl(var(--border) / 0.5);
927          padding: 0;
928        }
929        
930        .custom-popup-container .leaflet-popup-content {
931          margin: 0;
932          padding: 12px 16px;
933        }
934        
935        .custom-popup-container .leaflet-popup-tip {
936          background: hsl(var(--card));
937          border: 1px solid hsl(var(--border) / 0.5);
938        }
939        
940        .custom-popup {
941          display: flex;
942          align-items: center;
943          gap: 12px;
944        }
945        
946        .popup-flag {
947          font-size: 28px;
948        }
949        
950        .popup-content {
951          display: flex;
952          flex-direction: column;
953          gap: 2px;
954        }
955        
956        .popup-content strong {
957          font-size: 14px;
958          font-weight: 600;
959          color: hsl(var(--foreground));
960        }
961        
962        .popup-content span {
963          font-size: 12px;
964          color: hsl(var(--muted-foreground));
965        }
966        
967        .leaflet-control-zoom {
968          border: none !important;
969          box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
970        }
971        
972        .leaflet-control-zoom a {
973          background: hsl(var(--card)) !important;
974          color: hsl(var(--foreground)) !important;
975          border: 1px solid hsl(var(--border) / 0.5) !important;
976        }
977        
978        .leaflet-control-zoom a:hover {
979          background: hsl(var(--muted)) !important;
980        }
981      `})]})};var JD=x.createContext(void 0);function hh(e){const t=x.useContext(JD);return e||t||"ltr"}function Pp(e,[t,n]){return Math.min(n,Math.max(t,e))}function XD(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Sv="ScrollArea",[Ij,sF]=Jr(Sv),[e4,Dn]=Ij(Sv),Lj=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...l}
vendor: 1,188 bytes, lines 981-987
981=e,[u,d]=x.useState(null),[f,p]=x.useState(null),[m,g]=x.useState(null),[y,w]=x.useState(null),[b,C]=x.useState(null),[j,_]=x.useState(0),[N,A]=x.useState(0),[k,T]=x.useState(!1),[R,P]=x.useState(!1),I=ze(t,B=>d(B)),O=hh(i);return a.jsx(e4,{scope:n,type:r,dir:O,scrollHideDelay:o,scrollArea:u,viewport:f,onViewportChange:p,content:m,onContentChange:g,scrollbarX:y,onScrollbarXChange:w,scrollbarXEnabled:k,onScrollbarXEnabledChange:T,scrollbarY:b,onScrollbarYChange:C,scrollbarYEnabled:R,onScrollbarYEnabledChange:P,onCornerWidthChange:_,onCornerHeightChange:A,children:a.jsx(je.div,{dir:O,...l,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":N+"px",...e.style}})})});Lj.displayName=Sv;var zj="ScrollAreaViewport",Mj=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,asChild:i,nonce:o,...l}=e,u=Dn(zj,n),d=x.useRef(null),f=ze(t,d,u.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:`
982[data-radix-scroll-area-viewport] {
983  scrollbar-width: none;
984  -ms-overflow-style: none;
985  -webkit-overflow-scrolling: touch;
986}
987[data-radix-scroll-area-viewport]::-webkit-scrollbar {
988  display: none;
989}
990:where([data-radix-scroll-area-viewport]) {
991  display: flex;
992  flex-direction: column;
993  align-items: stretch;
994}
995:where([data-radix-scroll-area-content]) {
996  flex-grow: 1;
997}
998`},nonce:o}),a.jsx(je.div,{"data-radix-scroll-area-viewport":"",...l,asChild:i,ref:f,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u4({asChild:i,children:r},p=>a.jsx("div",{"data-radix-scroll-area-content":"",ref:u.onContentChange,style:{minWidth:u.scrollbarXEnabled?"fit-content":void 0},children:p}))})]})});Mj.displayName=zj;var Cr="ScrollAreaScrollbar",jv=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Dn(Cr,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=i,u=e.orientation==="horizontal";return x.useEffect(()=>(u?o(!0):l(!0),()=>{u?o(!1):l(!1)}),[u,o,l]),i.type==="hover"?a.jsx(t4,{...r,ref:t,forceMount:n}):i.type==="scroll"?a.jsx(n4,{...r,ref:t,forceMount:n}):i.type==="auto"?a.jsx(Dj,{...r,ref:t,forceMount:n}):i.type==="always"?a.jsx(Nv,{...r,ref:t}):null});jv.displayName=Cr;var t4=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Dn(Cr,e.__scopeScrollArea),[o,l]=x.useState(!1);return x.useEffect(()=>{const u=i.scrollArea;let d=0;if(u){const f=()=>{window.clearTimeout(d),l(!0)},p=()=>{d=window.setTimeout(()=>l(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",p)}}},[i.scrollArea,i.scrollHideDelay]),a.jsx(Mn,{present:n||o,children:a.jsx(Dj,{"data-state":o?"visible":"hidden",...r,ref:t})})}),n4=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Dn(Cr,e.__scopeScrollArea),o=e.orientation==="horizontal",l=mh(()=>d("SCROLL_END"),100),[u,d]=XD("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>d("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,i.scrollHideDelay,d]),x.useEffect(()=>{const f=i.viewport,p=o?"scrollLeft":"scrollTop";if(f){let m=f[p];const g=()=>{const y=f[p];m!==y&&(d("SCROLL"),l()),m=y}
vendor: 4,266 bytes, line 998
998;return f.addEventListener("scroll",g),()=>f.removeEventListener("scroll",g)}},[i.viewport,o,d,l]),a.jsx(Mn,{present:n||u!=="hidden",children:a.jsx(Nv,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:de(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:de(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),Dj=x.forwardRef((e,t)=>{const n=Dn(Cr,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,l]=x.useState(!1),u=e.orientation==="horizontal",d=mh(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?f:p)}},10);return ma(n.viewport,d),ma(n.content,d),a.jsx(Mn,{present:r||o,children:a.jsx(Nv,{"data-state":o?"visible":"hidden",...i,ref:t})})}),Nv=x.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=Dn(Cr,e.__scopeScrollArea),o=x.useRef(null),l=x.useRef(0),[u,d]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=Uj(u.viewport,u.content),p={...r,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:g=>l.current=g};function m(g,y){return l4(g,l.current,u,y)}return n==="horizontal"?a.jsx(r4,{...p,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const g=i.viewport.scrollLeft,y=cw(g,u,i.dir);o.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:g=>{i.viewport&&(i.viewport.scrollLeft=g)},onDragScroll:g=>{i.viewport&&(i.viewport.scrollLeft=m(g,i.dir))}}):n==="vertical"?a.jsx(i4,{...p,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const g=i.viewport.scrollTop,y=cw(g,u);o.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:g=>{i.viewport&&(i.viewport.scrollTop=g)},onDragScroll:g=>{i.viewport&&(i.viewport.scrollTop=m(g))}}):null}),r4=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=Dn(Cr,e.__scopeScrollArea),[l,u]=x.useState(),d=x.useRef(null),f=ze(t,d,o.onScrollbarXChange);return x.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),a.jsx(Bj,{"data-orientation":"horizontal",...i,ref:f,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":fh(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,m)=>{if(o.viewport){const g=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(g),Wj(g,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Od(l.paddingLeft),paddingEnd:Od(l.paddingRight)}})}})}),i4=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=Dn(Cr,e.__scopeScrollArea),[l,u]=x.useState(),d=x.useRef(null),f=ze(t,d,o.onScrollbarYChange);return x.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),a.jsx(Bj,{"data-orientation":"vertical",...i,ref:f,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":fh(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,m)=>{if(o.viewport){const g=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(g),Wj(g,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Od(l.paddingTop),paddingEnd:Od(l.paddingBottom)}})}})}),[s4,Fj]=Ij(Cr),Bj=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:p,onResize:m,...g}=e,y=Dn(Cr,n),[w,b]=x.useState(null),C=ze(t,I=>b(I)),j=x.useRef(null),_=x.useRef(""),N=y.viewport,A=r.content-r.viewport,k=mt(p),T=mt(d),R=mh(m,10);function P(I){if(j.current){const O=I.clientX-j.current.left,B=I.clientY-j.current.top;f({x:O,y:B})}}return x.useEffect(()=>{const I=O=>{const B=O.target;(w==null?void 0:w.contains(B))&&k(O,A)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})}
vendor: 5,601 bytes, line 998
998,[N,w,A,k]),x.useEffect(T,[r,T]),ma(w,R),ma(y.content,R),a.jsx(s4,{scope:n,scrollbar:w,hasThumb:i,onThumbChange:mt(o),onThumbPointerUp:mt(l),onThumbPositionChange:T,onThumbPointerDown:mt(u),children:a.jsx(je.div,{...g,ref:C,style:{position:"absolute",...g.style},onPointerDown:de(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),j.current=w.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),P(I))}),onPointerMove:de(e.onPointerMove,P),onPointerUp:de(e.onPointerUp,I=>{const O=I.target;O.hasPointerCapture(I.pointerId)&&O.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=_.current,y.viewport&&(y.viewport.style.scrollBehavior=""),j.current=null})})})}),Ad="ScrollAreaThumb",$j=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Fj(Ad,e.__scopeScrollArea);return a.jsx(Mn,{present:n||i.hasThumb,children:a.jsx(o4,{ref:t,...r})})}),o4=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=Dn(Ad,n),l=Fj(Ad,n),{onThumbPositionChange:u}=l,d=ze(t,m=>l.onThumbChange(m)),f=x.useRef(),p=mh(()=>{f.current&&(f.current(),f.current=void 0)},100);return x.useEffect(()=>{const m=o.viewport;if(m){const g=()=>{if(p(),!f.current){const y=c4(m,u);f.current=y,u()}};return u(),m.addEventListener("scroll",g),()=>m.removeEventListener("scroll",g)}},[o.viewport,p,u]),a.jsx(je.div,{"data-state":l.hasThumb?"visible":"hidden",...i,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:de(e.onPointerDownCapture,m=>{const y=m.target.getBoundingClientRect(),w=m.clientX-y.left,b=m.clientY-y.top;l.onThumbPointerDown({x:w,y:b})}),onPointerUp:de(e.onPointerUp,l.onThumbPointerUp)})});$j.displayName=Ad;var Cv="ScrollAreaCorner",qj=x.forwardRef((e,t)=>{const n=Dn(Cv,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?a.jsx(a4,{...e,ref:t}):null});qj.displayName=Cv;var a4=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=Dn(Cv,n),[o,l]=x.useState(0),[u,d]=x.useState(0),f=!!(o&&u);return ma(i.scrollbarX,()=>{var m;const p=((m=i.scrollbarX)==null?void 0:m.offsetHeight)||0;i.onCornerHeightChange(p),d(p)}),ma(i.scrollbarY,()=>{var m;const p=((m=i.scrollbarY)==null?void 0:m.offsetWidth)||0;i.onCornerWidthChange(p),l(p)}),f?a.jsx(je.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Od(e){return e?parseInt(e,10):0}function Uj(e,t){const n=e/t;return isNaN(n)?0:n}function fh(e){const t=Uj(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function l4(e,t,n,r="ltr"){const i=fh(n),o=i/2,l=t||o,u=i-l,d=n.scrollbar.paddingStart+l,f=n.scrollbar.size-n.scrollbar.paddingEnd-u,p=n.content-n.viewport,m=r==="ltr"?[0,p]:[p*-1,0];return Vj([d,f],m)(e)}function cw(e,t,n="ltr"){const r=fh(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,l=t.content-t.viewport,u=o-r,d=n==="ltr"?[0,l]:[l*-1,0],f=Pp(e,d);return Vj([0,l],[0,u])(f)}function Vj(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Wj(e,t){return e>0&&e<t}var c4=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,u=n.top!==o.top;(l||u)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function mh(e,t){const n=mt(e),r=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),x.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ma(e,t){const n=mt(t);Pt(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}function u4(e,t){const{asChild:n,children:r}=e;if(!n)return typeof t=="function"?t(r):t;const i=x.Children.only(r);return x.cloneElement(i,{children:typeof t=="function"?t(i.props.children):t})}var Hj=Lj,d4=Mj,h4=qj;const Gj=x.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(Hj,{ref:r,className:Ce("relative overflow-hidden",e),...n,children:[a.jsx(d4,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(Kj,{}),a.jsx(h4,{})]}));Gj.displayName=Hj.displayName;const Kj=x.forwardRef(({className:e,orientation:t="vertical",...n},r)=>a.jsx(jv,{ref:r,orientation:t,className:Ce("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:a.jsx($j,{className:"relative flex-1 rounded-full bg-border"})}));Kj.displayName=jv.displayName;const Se=x.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:Ce("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Se.displayName="Input";const Fe=x.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:Ce("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
998ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Fe.displayName="Textarea";var f4="Label",Zj=x.forwardRef((e,t)=>a.jsx(je.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Zj.displayName=f4;var Qj=Zj;const m4=Mg("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),X=x.forwardRef(({className:e,...t},n)=>a.jsx(Qj,{ref:n,className:Ce(m4(),e),...t}));X.displayName=Qj.displayName;function uw({className:e,...t}){return a.jsx("div",{className:Ce("animate-pulse rounded-md bg-muted",e),...t})}const p4=()=>{var P,I,O,B,U,ie,G,se,Y,le,F,K,H,Z,ee,ue;const[e,t]=x.useState(0),[n,r]=x.useState(!1),[i,o]=x.useState(!1),[l,u]=x.useState(!1),[d,f]=x.useState({name:"",email:"",phone:"",message:""}),{t:p,language:m}=Sn(),{toast:g}=bc(),{data:y=[],isLoading:w}=qt({queryKey:["public-missions"],queryFn:async()=>{const{data:V,error:z}=await me.from("missions").select("*").order("display_order",{ascending:!0});if(z)throw z;return V}}),b=x.useMemo(()=>y.map(V=>{const z=(()=>{if(m==="it")return V.achievements||[];const te=`achievements_${m}`,ve=V[te];return ve&&ve.length>0?ve:V.achievements||[]})(),W=Array.isArray(V.success_stories)?V.success_stories:[];return{id:V.id,name:Ue(V,"name",m)||V.name,flag:V.flag,city:Ue(V,"city",m)||V.city,since:V.since||"",students:V.students,projects:V.projects,description:Ue(V,"description",m)||V.description||"",fullDescription:Ue(V,"full_description",m)||V.full_description||"",achievements:z,successStories:W,image:V.image_url||"/placeholder.svg",color:V.color_gradient||"from-primary to-accent",lat:V.latitude!=null?Number(V.latitude):null,lng:V.longitude!=null?Number(V.longitude):null}}),[y,m]),C=x.useMemo(()=>b.map(V=>({name:V.name,flag:V.flag,lat:V.lat,lng:V.lng,city:V.city})),[b]),j=V=>V?V.split(`
999
1000`)[0]||V.substring(0,300)+"...":"",_=V=>{var z,W;f({name:"",email:"",phone:"",message:((W=(z=p.projects.inquiryForm)==null?void 0:z.defaultMessage)==null?void 0:W.replace("{country}",V.name))||`Sono interessato/a a sostenere un bambino in ${V.name}. Vorrei ricevere maggiori informazioni.`}),o(!0)},N=async V=>{var W,te,ve,ke,ge,Ee,Ne,Ge,tt,pt;if(!d.name.trim()||!d.email.trim()){g({title:((W=p.projects.inquiryForm)==null?void 0:W.errorTitle)||"Campi obbligatori",description:((te=p.projects.inquiryForm)==null?void 0:te.errorRequired)||"Per favore compila nome e email.",variant:"destructive"});return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d.email)){g({title:((ve=p.projects.inquiryForm)==null?void 0:ve.errorTitle)||"Email non valida",description:((ke=p.projects.inquiryForm)==null?void 0:ke.errorEmail)||"Per favore inserisci un indirizzo email valido.",variant:"destructive"});return}u(!0);try{const{error:nt}=await me.functions.invoke("send-project-inquiry",{body:{countryName:V.name,city:V.city,students:V.students,since:V.since,senderName:d.name,senderEmail:d.email,senderPhone:d.phone,message:d.message}});if(nt){g({title:((ge=p.projects.inquiryForm)==null?void 0:ge.errorTitle)||"Errore",description:((Ee=p.projects.inquiryForm)==null?void 0:Ee.errorSending)||"Si è verificato un errore. Riprova più tardi.",variant:"destructive"});return}g({title:((Ne=p.projects.inquiryForm)==null?void 0:Ne.successTitle)||"Richiesta inviata!",description:(((Ge=p.projects.inquiryForm)==null?void 0:Ge.successMessage)||`La tua richiesta di informazioni sul progetto in ${V.name} è stata inviata con successo.`).replace("{country}",V.name)}),o(!1),f({name:"",email:"",phone:"",message:""})}catch{g({title:((tt=p.projects.inquiryForm)==null?void 0:tt.errorTitle)||"Errore",description:((pt=p.projects.inquiryForm)==null?void 0:pt.errorSending)||"Si è verificato un errore. Riprova più tardi.",variant:"destructive"})}finally{u(!1)}},A={students:734,projects:b.reduce((V,z)=>V+z.projects,0),countries:b.length||8};if(w||b.length===0)return a.jsx("section",{id:"projects",className:"py-20 bg-pattern-dots",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16",children:[a.jsx("h2",{className:"text-section-title text-gradient",children:p.projects.title}),a.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:p.projects.subtitle})]}),w?a.jsxs("div",{className:"grid lg:grid-cols-2 gap-12",children:[a.jsx(uw,{className:"w-full h-96 rounded-2xl"}),a.jsx(uw,{className:"w-full h-96 rounded-2xl"})]}):a.jsx("p",{className:"text-center text-muted-foreground",children:"Nessuna missione disponibile."})]})});const k=Math.min(e,b.length-1),T=b[k],R=T.fullDescription&&T.fullDescription.length>0;return a.jsxs("section",{id:"projects",className:"py-20 bg-pattern-dots",children:[a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[a.jsx("h2",{className:"text-section-title text-gradient",children:p.projects.title}),a.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:p.projects.subtitle})]}),a.jsxs("div",{className:"grid md:grid-cols-3 gap-8 mb-16",children:[a.jsxs("div",{className:"card-elegant text-center animate-slide-in-up",children:[a.jsx($g,{className:"w-12 h-12 text-primary mx-auto mb-4"}),a.jsx("div",{className:"text-3xl font-bold text-primary mb-2",children:A.countries}),a.jsx("div",{className:"text-muted-foreground",children:p.projects.countriesOfIntervention})]}),a.jsxs("div",{className:"card-elegant text-center animate-slide-in-up",style:{animationDelay:"0.1s"},children:[a.jsx(js,{className:"w-12 h-12 text-accent mx-auto mb-4"}),a.jsx("div",{className:"text-3xl font-bold text-accent mb-2",children:A.students}),a.jsx("div",{className:"text-muted-foreground",children:p.projects.childrenSupported})]}),a.jsxs("div",{className:"card-elegant text-center animate-slide-in-up",style:{animationDelay:"0.2s"},children:[a.jsx(p2,{className:"w-12 h-12 text-growth mx-auto mb-4"}),a.jsx("div",{className:"text-3xl font-bold text-growth mb-2",children:A.projects}),a.jsx("div",{className:"text-muted-foreground",children:p.projects.activeProjects})]})]}),a.jsx("div",{className:"flex flex-wrap justify-center gap-4 mb-12",children:b.map((V,z)=>a.jsxs("button",{onClick:()=>t(z),className:`flex items-center space-x-2 px-6 py-3 rounded-lg transition-all duration-300 ${z===k?"bg-primary text-primary-foreground shadow-lg scale-105":"bg-muted hover:bg-muted/80 text-muted-foreground hover:text-foreground"}`,children:[a.jsx("span",{className:"text-2xl",children:V.flag}),a.jsx("span",{className:"font-medium",children:V.name})]},V.id))}),a.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center mb-16",children:[a.jsx("div",{className:"animate-scale-in",children:a.jsxs("div",{className:"relative group",children:[a.jsx("img",{src:T.image,alt:`Progetto in ${T.name}`,className:"w-full h-96 object-cover rounded-2xl shadow-2xl group-hover:scale-105 transition-transform duration-500"}),a.jsx("div",{className:`absolute inset-0 bg-gradient-to-t ${T.color} opacity-20 rounded-2xl`}),a.jsx("div",{className:"absolute top-6 left-6 bg-white/90 backdrop-blur-sm rounded-lg px-4 py-2",children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("span",{className:"text-2xl",children:T.flag}),a.jsxs("div",{children:[a.jsx("div",{className:"font-bold text-foreground",children:T.name}),a.jsxs("div",{className:"text-sm text-muted-foreground flex items-center",children:[a.jsx(Lo,{className:"w-3 h-3 mr-1"}),T.city]})]})]})}),a.jsxs("div",{className:"absolute bottom-6 right-6 grid grid-cols-2 gap-4",children:[a.jsxs("div",{className:"bg-white/90 backdrop-blur-sm rounded-lg px-3 py-2 text-center",children:[a.jsx("div",{className:"text-xl font-bold text-primary",children:T.students}),a.jsx("div",{className:"text-xs text-muted-foreground",children:p.projects.students})]}),a.jsxs("div",{className:"bg-white/90 backdrop-blur-sm rounded-lg px-3 py-2 text-center",children:[a.jsx("div",{className:"text-xl font-bold text-accent",children:T.projects}),a.jsx("div",{className:"text-xs text-muted-foreground",children:p.projects.activeProjects})]})]})]})}),a.jsx("div",{className:"animate-slide-in-up",children:a.jsxs("div",{className:"card-warm",children:[a.jsxs("h3",{className:"text-3xl font-bold mb-4 text-foreground flex items-center",children:[a.jsx("span",{className:"text-4xl mr-3",children:T.flag}),T.name]}),a.jsxs("div",{className:"flex items-center text-muted-foreground mb-6",children:[a.jsx(Lo,{className:"w-5 h-5 mr-2"}),a.jsx("span",{className:"text-lg",children:T.city})]}),a.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed mb-8",children:T.fullDescription?j(T.fullDescription):T.description}),a.jsxs("div",{className:"mb-8",children:[a.jsxs("h4",{className:"text-xl font-semibold mb-4 text-foreground flex items-center",children:[a.jsx(nr,{className:"w-5 h-5 mr-2 text-primary"}),p.projects.ourResults]}),a.jsx("ul",{className:"space-y-2",children:T.achievements.map((V,z)=>a.jsxs("li",{className:"flex items-center text-muted-foreground",children:[a.jsx(la,{className:"w-4 h-4 mr-3 text-accent flex-shrink-0"}),V]},z))})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[a.jsx("button",{onClick:()=>_(T),className:"btn-primary text-center flex items-center justify-center",children:p.projects.supportThisProject}),R&&a.jsxs("button",{className:"bg-accent/20 hover:bg-accent/30 text-accent border-2 border-accent rounded-full px-6 py-3 font-semibold transition-all duration-300 hover:shadow-lg hover:shadow-accent/25 flex items-center justify-center gap-2",onClick:()=>r(!0),children:[p.projects.learnMore,a.jsx(f1,{className:"w-4 h-4"})]})]})]})})]}),a.jsxs("div",{className:"card-elegant mb-16",children:[a.jsx("h3",{className:"text-2xl font-semibold mb-6 text-center text-foreground",children:p.projects.worldPresence}),a.jsx(YD,{countries:C})]}),a.jsx("div",{className:"text-center",children:a.jsxs("div",{className:"card-elegant max-w-4xl mx-auto",children:[a.jsx("h3",{className:"text-2xl font-semibold mb-4 text-foreground",children:p.projects.cta.title}),a.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:p.projects.cta.subtitle}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[a.jsx("a",{href:"#projects",className:"btn-primary text-lg",children:p.projects.cta.chooseProject}),a.jsx("a",{href:"#donate",className:"btn-accent text-lg",children:p.projects.cta.generalDonation})]})]})})]}),a.jsx(sr,{open:n,onOpenChange:r,children:a.jsx(Ln,{className:"max-w-4xl max-h-[90vh] p-0 overflow-hidden",children:a.jsxs("div",{className:"relative",children:[a.jsxs("div",{className:"relative h-48 sm:h-64 overflow-hidden",children:[a.jsx("img",{src:T.image,alt:T.name,className:"w-full h-full object-cover"}),a.jsx("div",{className:`absolute inset-0 bg-gradient-to-t ${T.color} opacity-40`}),a.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-6 bg-gradient-to-t from-black/80 to-transparent",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"text-4xl",children:T.flag}),a.jsxs("div",{children:[a.jsx(zn,{className:"text-2xl sm:text-3xl font-bold text-white",children:T.name}),a.jsxs("div",{className:"flex items-center gap-4 text-white/80 text-sm mt-1",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Lo,{className:"w-4 h-4"}),T.city]}),T.since&&a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(kl,{className:"w-4 h-4"}),"Dal ",T.since]})]})]})]})})]}),a.jsxs(Gj,{className:"h-[calc(90vh-16rem)] p-6",children:[a.jsx("div",{className:"flex flex-wrap gap-3 mb-6",children:T.achievements.map((V,z)=>a.jsxs("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-primary/10 text-primary rounded-full text-sm font-medium",children:[a.jsx(Yx,{className:"w-4 h-4"}),V]},z))}),a.jsx("div",{className:"prose prose-lg max-w-none text-muted-foreground",children:T.fullDescription.split(`
1001
1002`).map((V,z)=>a.jsx("p",{className:"mb-4 leading-relaxed",children:V},z))}),T.successStories.length>0&&a.jsxs("div",{className:"mt-8 p-6 bg-accent/5 rounded-xl border border-accent/20",children:[a.jsxs("h4",{className:"text-xl font-semibold mb-4 text-foreground flex items-center gap-2",children:[a.jsx(Yx,{className:"w-5 h-5 text-accent"}),"Storie di successo"]}),a.jsx("ul",{className:"space-y-3",children:T.successStories.map((V,z)=>a.jsxs("li",{className:"flex items-start gap-3 text-muted-foreground",children:[a.jsx(nr,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),a.jsx("span",{children:V})]},z))})]}),a.jsxs("div",{className:"mt-8 flex flex-col sm:flex-row gap-4",children:[a.jsx("button",{onClick:()=>{r(!1),_(T)},className:"btn-primary flex-1 text-center flex items-center justify-center",children:p.projects.supportThisProject}),a.jsx("button",{className:"btn-ghost",onClick:()=>r(!1),children:((P=p.projects.inquiryForm)==null?void 0:P.close)||"Chiudi"})]})]})]})})}),a.jsx(sr,{open:i,onOpenChange:o,children:a.jsxs(Ln,{className:"max-w-lg",children:[a.jsx(or,{children:a.jsxs(zn,{className:"text-2xl font-bold flex items-center gap-3",children:[a.jsx("span",{className:"text-3xl",children:T.flag}),((I=p.projects.inquiryForm)==null?void 0:I.title)||"Richiedi informazioni"]})}
1002),a.jsxs("div",{className:"space-y-4 mt-4",children:[a.jsx("div",{className:"p-4 bg-primary/5 rounded-lg border border-primary/10",children:a.jsxs("p",{className:"text-sm text-muted-foreground",children:[((O=p.projects.inquiryForm)==null?void 0:O.projectLabel)||"Progetto:"," ",a.jsxs("span",{className:"font-semibold text-foreground",children:[T.name," - ",T.city]})]})}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs(X,{htmlFor:"inquiry-name",className:"flex items-center gap-2",children:[a.jsx(Gm,{className:"w-4 h-4 text-muted-foreground"}),((B=p.projects.inquiryForm)==null?void 0:B.nameLabel)||"Nome e Cognome"," ",a.jsx("span",{className:"text-destructive",children:"*"})]}),a.jsx(Se,{id:"inquiry-name",value:d.name,onChange:V=>f(z=>({...z,name:V.target.value})),placeholder:((U=p.projects.inquiryForm)==null?void 0:U.namePlaceholder)||"Il tuo nome completo"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs(X,{htmlFor:"inquiry-email",className:"flex items-center gap-2",children:[a.jsx(ca,{className:"w-4 h-4 text-muted-foreground"}),((ie=p.projects.inquiryForm)==null?void 0:ie.emailLabel)||"Email"," ",a.jsx("span",{className:"text-destructive",children:"*"})]}),a.jsx(Se,{id:"inquiry-email",type:"email",value:d.email,onChange:V=>f(z=>({...z,email:V.target.value})),placeholder:((G=p.projects.inquiryForm)==null?void 0:G.emailPlaceholder)||"[email protected]"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs(X,{htmlFor:"inquiry-phone",className:"flex items-center gap-2",children:[a.jsx(yd,{className:"w-4 h-4 text-muted-foreground"}),((se=p.projects.inquiryForm)==null?void 0:se.phoneLabel)||"Telefono"," ",a.jsxs("span",{className:"text-muted-foreground text-sm",children:["(",((Y=p.projects.inquiryForm)==null?void 0:Y.optional)||"opzionale",")"]})]}),a.jsx(Se,{id:"inquiry-phone",type:"tel",value:d.phone,onChange:V=>f(z=>({...z,phone:V.target.value})),placeholder:((le=p.projects.inquiryForm)==null?void 0:le.phonePlaceholder)||"+39 123 456 7890"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs(X,{htmlFor:"inquiry-message",className:"flex items-center gap-2",children:[a.jsx(C2,{className:"w-4 h-4 text-muted-foreground"}),((F=p.projects.inquiryForm)==null?void 0:F.messageLabel)||"Messaggio"," ",a.jsxs("span",{className:"text-muted-foreground text-sm",children:["(",((K=p.projects.inquiryForm)==null?void 0:K.optional)||"opzionale",")"]})]}),a.jsx(Fe,{id:"inquiry-message",value:d.message,onChange:V=>f(z=>({...z,message:V.target.value})),placeholder:((H=p.projects.inquiryForm)==null?void 0:H.messagePlaceholder)||"Scrivi qui il tuo messaggio...",rows:4})]})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-4",children:[a.jsx("button",{onClick:()=>N(T),disabled:l,className:"btn-primary flex-1 flex items-center justify-center disabled:opacity-50",children:l?a.jsxs(a.Fragment,{children:[a.jsx(qe,{className:"w-4 h-4 mr-2 animate-spin"}),((Z=p.projects.inquiryForm)==null?void 0:Z.sending)||"Invio..."]}):((ee=p.projects.inquiryForm)==null?void 0:ee.submit)||"Invia richiesta"}),a.jsx("button",{className:"btn-ghost",onClick:()=>o(!1),children:((ue=p.projects.inquiryForm)==null?void 0:ue.cancel)||"Annulla"})]})]})]})})]})},g4=()=>{const[e,t]=x.useState("all"),[n,r]=x.useState(""),[i,o]=x.useState(null),[l,u]=x.useState(""),[d,f]=x.useState(!1),{t:p,language:m}=Sn(),{toast:g}=bc(),y=async()=>{if(!l.trim()){g({title:p.news.newsletter.errorTitle||"Errore",description:p.news.newsletter.errorRequired||"Per favore inserisci un indirizzo email.",variant:"destructive"});return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)){g({title:p.news.newsletter.errorTitle||"Errore",description:p.news.newsletter.errorEmail||"Per favore inserisci un indirizzo email valido.",variant:"destructive"});return}f(!0);try{const{data:T,error:R}=await me.functions.invoke("subscribe-newsletter",{body:{email:l}});if(R){console.error("Error subscribing:",R),g({title:p.news.newsletter.errorTitle||"Errore",description:p.news.newsletter.errorSending||"Si è verificato un errore. Riprova più tardi.",variant:"destructive"});return}g({title:p.news.newsletter.successTitle||"Iscrizione completata!",description:p.news.newsletter.successMessage||"Grazie per esserti iscritto alla nostra newsletter."}),u("")}catch(T){console.error("Error:",T),g({title:p.news.newsletter.errorTitle||"Errore",description:p.news.newsletter.errorSending||"Si è verificato un errore. Riprova più tardi.",variant:"destructive"})}finally{f(!1)}},w=[{id:"all",name:p.news.categories.all,color:"bg-primary"}
1002,{id:"events",name:p.news.categories.events,color:"bg-accent"},{id:"projects",name:p.news.categories.projects,color:"bg-growth"},{id:"stories",name:p.news.categories.stories,color:"bg-hope"},{id:"updates",name:p.news.categories.updates,color:"bg-trust"}],{data:b=[],isLoading:C}=qt({queryKey:["public-news"],queryFn:async()=>{const{data:k,error:T}=await me.from("news").select("*").order("date",{ascending:!1});if(T)throw T;return k}}),j=b.filter(k=>{var O;const T=Ue(k,"title",m),R=Ue(k,"excerpt",m),P=e==="all"||k.category===e,I=T.toLowerCase().includes(n.toLowerCase())||R.toLowerCase().includes(n.toLowerCase())||((O=k.tags)==null?void 0:O.some(B=>B.toLowerCase().includes(n.toLowerCase())));return P&&I}),_=b.filter(k=>k.featured),N=j.filter(k=>!k.featured),A=k=>new Date(k).toLocaleDateString(m==="it"?"it-IT":m==="es"?"es-ES":m==="pt"?"pt-BR":"en-US",{year:"numeric",month:"long",day:"numeric"});return C?a.jsx("section",{id:"news",className:"py-20 bg-background",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex justify-center",children:a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"})})}):a.jsxs("section",{id:"news",className:"py-20 bg-background",children:[a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[a.jsx("h2",{className:"text-section-title text-gradient",children:p.news.title}),a.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:p.news.subtitle})]}),a.jsxs("div",{className:"flex flex-col lg:flex-row gap-6 mb-12",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(T2,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-5 h-5"}),a.jsx("input",{type:"text",placeholder:p.news.search,value:n,onChange:k=>r(k.target.value),className:"w-full pl-10 pr-4 py-3 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 bg-background"})]}),a.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(k=>a.jsx("button",{onClick:()=>t(k.id),className:`px-4 py-2 rounded-lg font-medium transition-all duration-300 ${e===k.id?`${k.color} text-white shadow-lg scale-105`:"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:k.name},k.id))})]}),e==="all"&&_.length>0&&a.jsxs("div",{className:"mb-16",children:[a.jsx("h3",{className:"text-2xl font-semibold mb-8 text-foreground",children:p.news.featured}),a.jsx("div",{className:"grid lg:grid-cols-2 gap-8",children:_.map((k,T)=>a.jsxs("article",{className:"card-elegant hover-glow animate-slide-in-up",style:{animationDelay:`${T*.1}s`},children:[a.jsxs("div",{className:"relative",children:[k.image_url&&a.jsx("img",{src:k.image_url,alt:Ue(k,"title",m),className:"w-full h-64 object-cover rounded-lg mb-6"}),a.jsx("div",{className:"absolute top-4 left-4 bg-primary text-primary-foreground px-3 py-1 rounded-full text-sm font-medium",children:p.news.inEvidence})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(kl,{className:"w-4 h-4 mr-1"}),A(k.date)]}),k.read_time&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(Pl,{className:"w-4 h-4 mr-1"}),k.read_time]}),k.author&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(Gm,{className:"w-4 h-4 mr-1"}),k.author]})]}),a.jsx("h3",{className:"text-xl font-bold text-foreground line-clamp-2",children:Ue(k,"title",m)}),a.jsx("p",{className:"text-muted-foreground line-clamp-3",children:Ue(k,"excerpt",m)}),k.tags&&k.tags.length>0&&a.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:k.tags.map((R,P)=>a.jsxs("span",{className:"inline-flex items-center px-2 py-1 bg-accent/10 text-accent text-xs rounded-full",children:[a.jsx(Qx,{className:"w-3 h-3 mr-1"}),R]},P))}),a.jsxs("button",{onClick:()=>o(k),className:"btn-primary w-full flex items-center justify-center",children:[p.news.readAll,a.jsx(f1,{className:"w-4 h-4 ml-2"})]})]})]},k.id))})]}),a.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:N.map((k,T)=>a.jsxs("article",{className:"card-warm hover-lift animate-slide-in-up",style:{animationDelay:`${T*.1}s`},children:[k.image_url&&a.jsx("img",{src:k.image_url,alt:Ue(k,"title",m),className:"w-full h-48 object-cover rounded-lg mb-4"}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(kl,{className:"w-4 h-4 mr-1"}),A(k.date)]}),k.read_time&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(Pl,{className:"w-4 h-4 mr-1"}),k.read_time]})]}),a.jsx("h3",{className:"text-lg font-semibold text-foreground line-clamp-2",children:Ue(k,"title",m)}),a.jsx("p",{className:"text-muted-foreground text-sm line-clamp-3",children:Ue(k,"excerpt",m)}),k.tags&&k.tags.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:k.tags.slice(0,2).map((R,P)=>a.jsx("span",{className:"inline-flex items-center px-2 py-1 bg-primary/10 text-primary text-xs rounded-full",children:R},P))}),a.jsx("button",{onClick:()=>o(k),className:"btn-ghost w-full text-sm",children:p.news.readAll})]})]},k.id))}),j.length===0&&a.jsxs("div",{className:"text-center py-16",children:[a.jsx("div",{className:"text-6xl mb-4",children:"📰"}),a.jsx("h3",{className:"text-xl font-semibold text-foreground mb-2",children:p.news.noNe
1002ws}),a.jsx("p",{className:"text-muted-foreground",children:p.news.tryModifyFilters})]}),a.jsx("div",{className:"mt-20",children:a.jsxs("div",{className:"card-elegant max-w-4xl mx-auto text-center",children:[a.jsx("h3",{className:"text-2xl font-semibold mb-4 text-foreground",children:p.news.newsletter.title}),a.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:p.news.newsletter.subtitle}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 max-w-md mx-auto",children:[a.jsx("input",{type:"email",value:l,onChange:k=>u(k.target.value),placeholder:p.news.newsletter.placeholder,className:"flex-1 px-4 py-3 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50",onKeyDown:k=>k.key==="Enter"&&y()}),a.jsx("button",{onClick:y,disabled:d,className:"btn-primary whitespace-nowrap flex items-center justify-center gap-2 disabled:opacity-50",children:d?a.jsxs(a.Fragment,{children:[a.jsx(qe,{className:"w-4 h-4 animate-spin"}),p.news.newsletter.sending||"Invio..."]}):a.jsxs(a.Fragment,{children:[a.jsx(ca,{className:"w-4 h-4"}),p.news.newsletter.subscribe]})})]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:p.news.newsletter.privacy})]})})]}),a.jsx(sr,{open:!!i,onOpenChange:()=>o(null),children:a.jsx(Ln,{className:"max-w-4xl max-h-[90vh] overflow-y-auto p-0",children:i&&a.jsxs(a.Fragment,{children:[i.image_url&&a.jsxs("div",{className:"relative w-full h-64 md:h-80",children:[a.jsx("img",{src:i.image_url,alt:Ue(i,"title",m),className:"w-full h-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/80 to-transparent"})]}),a.jsxs("div",{className:"p-6 space-y-6",children:[a.jsx(or,{children:a.jsx(zn,{className:"text-2xl md:text-3xl font-bold text-foreground leading-tight",children:Ue(i,"title",m)})}),a.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm text-muted-foreground border-b border-border pb-4",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(kl,{className:"w-4 h-4 mr-2"}),A(i.date)]}),i.author&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(Gm,{className:"w-4 h-4 mr-2"}),i.author]}),i.read_time&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(Pl,{className:"w-4 h-4 mr-2"}),i.read_time]})]}),i.tags&&i.tags.length>0&&a.jsx("div",{className:"flex flex-wrap gap-2",children:i.tags.map((k,T)=>a.jsxs("span",{className:"inline-flex items-center px-3 py-1 bg-primary/10 text-primary text-sm rounded-full",children:[a.jsx(Qx,{className:"w-3 h-3 mr-1"}),k]},T))}),a.jsx("div",{className:"prose prose-lg max-w-none text-foreground",children:Ue(i,"content",m)||Ue(i,"excerpt",m)}),(i.external_url||i.attachment_url)&&a.jsxs("div",{className:"flex flex-wrap gap-3 pt-4 border-t border-border",children:[i.external_url&&a.jsxs("a",{href:i.external_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:[a.jsx(gd,{className:"w-4 h-4"}),"Approfondisci"]}),i.attachment_url&&a.jsxs("a",{href:i.attachment_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 bg-accent text-accent-foreground rounded-lg hover:bg-accent/90 transition-colors",children:[a.jsx(Sr,{className:"w-4 h-4"}),"Scarica allegato"]})]})]})]})})})]})},v4={FileText:Sr,Scale:x1,Heart:nr,ClipboardList:p1,Award:Dg},y4=()=>{const{t:e,language:t}=Sn(),{data:n,isLoading:r}=qt({queryKey:["transparency-documents"],queryFn:async()=>{const{data:i,error:o}=await me.from("transparency_documents").select("*").order("display_order",{ascending:!0});if(o)throw o;return i}});return a.jsx("section",{id:"transparency",className:"py-20 bg-muted/30",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16",children:[a.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-semibold mb-4",children:e.transparency.badge}),a.jsxs("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mb-6",children:[e.transparency.title.split(" ").slice(0,-1).join(" ")," ",a.jsx("span",{className:"text-gradient",children:e.transparency.title.split(" ").slice(-1)})]}),a.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl mx-auto",children:e.transparency.subtitle})]}),r?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(5)].map((i,o)=>a.jsxs("div",{className:"bg-card rounded-2xl p-6 shadow-lg border border-border/50 animate-pulse",children:[a.jsx("div",{className:"w-14 h-14 roun
1002ded-xl bg-muted mb-4"}),a.jsx("div",{className:"h-6 bg-muted rounded w-3/4 mb-2"}),a.jsx("div",{className:"h-4 bg-muted rounded w-full mb-4"}),a.jsx("div",{className:"h-4 bg-muted rounded w-1/3"})]},o))}):a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:n==null?void 0:n.map((i,o)=>{const l=v4[i.icon_name]||Sr;return a.jsxs("div",{className:"group bg-card rounded-2xl p-6 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border border-border/50",style:{animationDelay:`${o*100}ms`},children:[a.jsx("div",{className:`w-14 h-14 rounded-xl bg-gradient-to-br ${i.color_gradient} flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300`,children:a.jsx(l,{className:"w-7 h-7 text-white"})}),a.jsx("h3",{className:"text-xl font-bold text-foreground mb-2 group-hover:text-primary transition-colors",children:Ue(i,"title",t)}),a.jsx("p",{className:"text-muted-foreground mb-4 text-sm",children:Ue(i,"description",t)}),i.file_url?a.jsxs("a",{href:i.file_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-primary font-semibold hover:gap-3 transition-all duration-300",children:[a.jsx(pd,{className:"w-4 h-4"}),a.jsx("span",{children:e.transparency.downloadDocument}),a.jsx(gd,{className:"w-4 h-4 opacity-0 group-hover:opacity-100 transition-opacity"})]}):a.jsxs("span",{className:"inline-flex items-center gap-2 text-muted-foreground text-sm",children:[a.jsx(Sr,{className:"w-4 h-4"}),a.jsx("span",{children:e.transparency.documentNotAvailable})]})]},i.id)})}),a.jsx("div",{className:"mt-12 bg-primary/5 border border-primary/20 rounded-2xl p-6 md:p-8 text-center",children:a.jsxs("p",{className:"text-muted-foreground",children:[e.transparency.info," ",a.jsx("a",{href:"#contact",className:"text-primary font-semibold hover:underline",children:e.transparency.contactUs}),"."]})})]})})},x4=()=>{const[e,t]=x.useState(null),[n,r]=x.useState("all"),{t:i,language:o}=Sn(),{data:l=[],isLoading:u}=qt({queryKey:["public-gallery"],queryFn:async()=>{const{data:w,error:b}=await me.from("gallery_images").select("*").order("created_at",{ascending:!1});if(b)throw b;return w}}),d=[{id:"all",name:i.gallery.allPhotos,count:l.length},{id:"education",name:i.gallery.filters.education,count:l.filter(w=>w.category==="education").length},{id:"achievements",name:i.gallery.filters.achievements,count:l.filter(w=>w.category==="achievements").length}
1002,{id:"infrastructure",name:i.gallery.filters.infrastructure,count:l.filter(w=>w.category==="infrastructure").length},{id:"events",name:i.gallery.filters.events,count:l.filter(w=>w.category==="events").length},{id:"training",name:i.gallery.filters.training,count:l.filter(w=>w.category==="training").length},{id:"missions",name:i.gallery.filters.missions||"Missioni",count:l.filter(w=>w.category==="missions").length},{id:"travels",name:i.gallery.filters.travels||"Viaggi",count:l.filter(w=>w.category==="travels").length}],f=n==="all"?l:l.filter(w=>w.category===n),p=w=>{t(w)},m=()=>{t(null)},g=()=>{e!==null&&t((e+1)%f.length)},y=()=>{e!==null&&t((e-1+f.length)%f.length)};return u?a.jsx("section",{id:"gallery",className:"py-20 bg-pattern-dots",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex justify-center",children:a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"})})}):a.jsx("section",{id:"gallery",className:"py-20 bg-pattern-dots",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[a.jsx("h2",{className:"text-section-title text-gradient",children:i.gallery.title}),a.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:i.gallery.subtitle})]}),a.jsx("div",{className:"flex flex-wrap justify-center gap-4 mb-12",children:d.map(w=>a.jsxs("button",{onClick:()=>r(w.id),className:`px-6 py-3 rounded-lg font-medium transition-all duration-300 ${n===w.id?"bg-primary text-primary-foreground shadow-lg scale-105":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:[w.name,a.jsxs("span",{className:"ml-2 text-sm opacity-75",children:["(",w.count,")"]})]},w.id))}),f.length===0?a.jsxs("div",{className:"text-center py-16",children:[a.jsx("div",{className:"text-6xl mb-4",children:"🖼️"}),a.jsx("h3",{className:"text-xl font-semibold text-foreground mb-2",children:i.gallery.noImages}),a.jsx("p",{className:"text-muted-foreground",children:i.gallery.tryOtherCategory})]}):a.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:f.map((w,b)=>{var C;return a.jsxs("div",{className:"group relative overflow-hidden rounded-xl bg-muted animate-scale-in hover-lift cursor-pointer",style:{animationDelay:`${b*.1}s`},onClick:()=>p(b),children:[a.jsx("img",{src:w.src_url,alt:Ue(w,"title",o),className:"w-full h-64 object-cover transition-transform duration-500 group-hover:scale-110"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:a.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[w.country&&a.jsx("span",{className:"bg-primary text-primary-foreground px-2 py-1 rounded-full text-xs font-medium",children:w.country}),a.jsxs("div",{className:"flex items-center text-white text-sm",children:[a.jsx(nr,{className:"w-4 h-4 mr-1"}),w.likes||0]})]}),a.jsx("h3",{className:"text-white font-semibold text-lg mb-1",children:Ue(w,"title",o)}),a.jsx("p",{className:"text-white/80 text-sm",children:Ue(w,"description",o)})]})}),a.jsx("div",{className:"absolute top-4 left-4 bg-white/90 backdrop-blur-sm px-3 py-1 rounded-full text-xs font-medium text-foreground",children:(C=d.find(j=>j.id===w.category))==null?void 0:C.name})]},w.id)})}),e!==null&&f[e]&&a.jsx("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",children:a.jsxs("div",{className:"relative max-w-5xl max-h-full",children:[a.jsx("button",{onClick:m,className:"absolute top-4 right-4 z-10 p-2 bg-white/20 hover:bg-white/30 rounded-full transition-colors duration-200",children:a.jsx($s,{className:"w-6 h-6 text-white"})}),a.jsx("button",{onClick:y,className:"absolute left-4 top-1/2 transform -translate-y-1/2 z-10 p-2 bg-white/20 hover:bg-white/30 rounded-full transition-colors duration-200",children:a.jsx(Fg,{className:"w-6 h-6 text-white"})}),a.jsx("button",{onClick:g,className:"absolute right-4 top-1/2 transform -translate-y-1/2 z-10 p-2 bg-white/20 hover:bg-white/30 rounded-full transition-colors duration-200",children:a.jsx(Bg,{className:"w-6 h-6 text-white"})}),a.jsx("img",{src:f[e].src_url,alt:Ue(f[e],"title",o),className:"max-w-full max-h-[80vh] object-contain rounded-lg"}),a.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent p-6 rounded-b-lg",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f[e].country&&a.jsx("span",{className:"bg-primary text-primary-foreground px-3 py-1 rounded-full text-sm font-medium",children:f[e].country}),a.jsxs("div",{className:"flex items-center space-x-4",children:[a.jsxs("button",{className:"flex items-center text-white hover:text-primary transition-colors",children:[a.jsx(nr,{className:"w-5 h-5 mr-1"}),f[e].likes||0]}),a.jsxs("button",{className:"flex items-center text-white hover:text-primary transition-colors",children:[a.jsx(P2,{className:"w-5 h-5 mr-1"}),i.gallery.share]}),a.jsxs("button",{className:"flex items-center text-white hover:text-primary transition-colors",children:[a.jsx(pd,{className:"w-5 h-5 mr-1"}),i.gallery.download]})]})]}),a.jsx("h3",{className:"text-white text-xl font-semibold mb-1",children:Ue(f[e],"title",o)}),a.jsx("p",{className:"text-white/80",children:Ue(f[e],"description",o)})]}),a.jsxs("div",{className:"absolute top-4 left-4 bg-white/20 backdrop-blur-sm px-3 py-1 rounded-full text-white text-sm",children:[e
1002+1," ",i.gallery.of," ",f.length]})]})}),a.jsx("div",{className:"mt-20 text-center",children:a.jsxs("div",{className:"card-elegant max-w-4xl mx-auto",children:[a.jsx("h3",{className:"text-2xl font-semibold mb-4 text-foreground",children:i.gallery.cta.title}),a.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:i.gallery.cta.subtitle}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[a.jsx("button",{className:"btn-primary",children:i.gallery.cta.facebook}),a.jsx("button",{className:"btn-accent",children:i.gallery.cta.instagram})]})]})})]})})},b4=({isOpen:e,onClose:t,youtubeId:n,title:r})=>a.jsx(sr,{open:e,onOpenChange:t,children:a.jsxs(Ln,{className:"max-w-4xl p-0 bg-black border-none overflow-hidden",children:[a.jsx(or,{className:"sr-only",children:a.jsx(zn,{children:r})}),a.jsx("div",{className:"aspect-video w-full",children:e&&a.jsx("iframe",{src:`https://www.youtube.com/embed/${n}?autoplay=1&rel=0`,title:r,className:"w-full h-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})]})}),w4=()=>{const[e,t]=x.useState(null),{t:n,language:r}=Sn(),{data:i=[],isLoading:o}=qt({queryKey:["public-videos"],queryFn:async()=>{const{data:m,error:g}=await me.from("videos").select("*").order("created_at",{ascending:!1});if(g)throw g;return m}}),{data:l=[],isLoading:u}=qt({queryKey:["public-giornalini"],queryFn:async()=>{const{data:m,error:g}=await me.from("giornalini").select("*").order("published_at",{ascending:!1});if(g)throw g;return m}}),d=m=>{t({youtubeId:m.youtube_id,title:Ue(m,"title",r)})},f=()=>{t(null)};return o||u?a.jsx("section",{id:"media",className:"py-20 bg-background",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex justify-center",children:a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"})})}):a.jsxs("section",{id:"media",className:"py-20 bg-background",children:[a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16",children:[a.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-semibold mb-4",children:"Media"}),a.jsxs("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mb-6",children:[n.media.title.split(" ").slice(0,-1).join(" ")," ",a.jsx("span",{className:"text-gradient",children:n.media.title.split(" ").slice(-1)})]}),a.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl mx-auto",children:n.media.subtitle})]}),a.jsxs("div",{className:"mb-20",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-red-500/10 flex items-center justify-center",children:a.jsx(Zx,{className:"w-5 h-5 text-red-500"})}),a.jsx("h3",{className:"text-2xl font-bold text-foreground",children:n.media.videos})]}),i.length===0?a.jsx("div",{className:"text-center py-12 bg-muted/30 rounded-xl",children:a.jsx("p",{className:"text-muted-foreground",children:n.media.noVideos})}):a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:i.map((m,g)=>a.jsxs("div",{onClick:()=>d(m),className:"group bg-card rounded-2xl overflow-hidden shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border border-border/50 cursor-pointer",style:{animationDelay:`${g*100}ms`},children:[a.jsxs("div",{className:"relative aspect-video bg-muted overflow-hidden",children:[a.jsx("img",{src:`https://img.youtube.com/vi/${m.youtube_id}/hqdefault.jpg`,alt:Ue(m,"title",r),className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",onError:y=>{const w=y.target;w.src=`https://img.youtube.com/vi/${m.youtube_id}/mqdefault.jpg`}}),a.jsx("div",{className:"absolute inset-0 bg-black/30 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:a.jsx("div",{className:"w-16 h-16 rounded-full bg-red-600 flex items-center justify-center shadow-lg transform group-hover:scale-110 transition-transform",children:a.jsx(Zx,{className:"w-8 h-8 text-white ml-1",fill:"white"})})}),m.date_label&&a.jsx("div",{className:"absolute top-3 left-3 px-3 py-1 bg-black/60 backdrop-blur-sm rounded-full text-white text-xs font-medium",children:m.date_label})]}),a.jsxs("div",{className:"p-5",children:[a.jsx("h4",{className:"text-lg font-bold text-foreground mb-2 group-hover:text-primary transition-colors",children:Ue(m,"title",r)}),a.jsx("p",{className:"text-muted-foreground text-sm line-clamp-2",children:Ue(m,"description",r)}
1002)]})]},m.id))})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center",children:a.jsx(vd,{className:"w-5 h-5 text-primary"})}),a.jsx("h3",{className:"text-2xl font-bold text-foreground",children:n.media.newsletter})]}),l.length===0?a.jsx("div",{className:"text-center py-12 bg-muted/30 rounded-xl",children:a.jsx("p",{className:"text-muted-foreground",children:n.media.noNewsletter})}):a.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:l.map((m,g)=>a.jsxs("div",{className:"group bg-card rounded-2xl p-6 md:p-8 shadow-lg hover:shadow-xl transition-all duration-300 border border-border/50",style:{animationDelay:`${g*100}ms`},children:[a.jsxs("div",{className:"flex items-start justify-between mb-4",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"text-xl md:text-2xl font-bold text-foreground group-hover:text-primary transition-colors",children:Ue(m,"title",r)}),m.published_at&&a.jsxs("div",{className:"flex items-center gap-2 mt-2 text-muted-foreground text-sm",children:[a.jsx(kl,{className:"w-4 h-4"}),a.jsx("span",{children:new Date(m.published_at).toLocaleDateString(r==="it"?"it-IT":r==="es"?"es-ES":r==="pt"?"pt-BR":"en-US",{month:"long",year:"numeric"})})]})]}),a.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-primary to-primary/70 flex items-center justify-center flex-shrink-0",children:a.jsx(vd,{className:"w-6 h-6 text-primary-foreground"})})]}),a.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:Ue(m,"description",r)}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[m.semestrale_url&&m.semestrale_url!=="#"&&a.jsxs("a",{href:m.semestrale_url,target:"_blank",rel:"noopener noreferrer",className:"flex-1 inline-flex items-center justify-center gap-2 px-5 py-3 bg-primary text-primary-foreground rounded-xl font-semibold hover:bg-primary/90 transition-all duration-300 hover:shadow-lg",children:[a.jsx(pd,{className:"w-4 h-4"}),a.jsx("span",{children:n.media.downloadSemestrale})]}),m.inserto_url&&m.inserto_url!=="#"&&a.jsxs("a",{href:m.inserto_url,target:"_blank",rel:"noopener noreferrer",className:"flex-1 inline-flex items-center justify-center gap-2 px-5 py-3 bg-secondary text-secondary-foreground rounded-xl font-semibold hover:bg-secondary/80 transition-all duration-300 hover:shadow-lg border border-border",children:[a.jsx(pd,{className:"w-4 h-4"}),a.jsx("span",{children:n.media.downloadInserto})]})]})]},m.id))})]})]}),a.jsx(b4,{isOpen:!!e,onClose:f,youtubeId:(e==null?void 0:e.youtubeId)||"",title:(e==null?void 0:e.title)||""})]})},_4=()=>{const{t:e}=Sn();return a.jsx("section",{id:"faq",className:"py-20 bg-background",children:a.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[a.jsxs("div",{className:"text-center mb-12",children:[a.jsx("span",{className:"text-primary font-semibold text-sm uppercase tracking-wider",children:e.faq.sectionTitle}),a.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mt-2",children:e.faq.title})]}),a.jsx("div",{className:"space-y-8",children:e.faq.questions.map((t,n)=>a.jsxs("div",{className:"border-b border-border pb-6 last:border-b-0",children:[a.jsx("h3",{className:"text-lg font-bold text-foreground mb-3",children:t.question}),a.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-line",children:t.answer})]},n))})]})})},S4=()=>{const[e,t]=x.useState(null),[n,r]=x.useState(""),[i,o]=x.useState("once"),[l,u]=x.useState("general"),{t:d}=Sn(),f=[{value:25,label:"25€",description:d.donate.amounts[25]},{value:50,label:"50€",description:d.donate.amounts[50]},{value:100,label:"100€",description:d.donate.amounts[100]},{value:200,label:"200€",description:d.donate.amounts[200]}],p=[{id:"general",title:d.donate.causes.general.title,description:d.donate.causes.general.description,icon:nr,color:"text-red-500"},{id:"education",title:d.donate.causes.education.title,description:d.donate.causes.education.description,icon:la,color:"text-blue-500"}
1002,{id:"infrastructure",title:d.donate.causes.infrastructure.title,description:d.donate.causes.infrastructure.description,icon:js,color:"text-green-500"}],m=b=>{t(b),r("")},g=b=>{r(b),t(null)},y=()=>e||(n?parseInt(n):0),w=()=>{const b=y();b>0&&(console.log("Donazione:",{amount:b,type:i,cause:l}),alert(`Funzionalità di pagamento da implementare con Stripe. Importo: ${b}€, Tipo: ${i}`))};return a.jsx("section",{id:"donate",className:"py-20 bg-gradient-to-br from-primary/5 via-background to-accent/5",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[a.jsx("h2",{className:"text-section-title text-gradient mb-6",children:d.donate.title}),a.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto leading-relaxed",children:d.donate.subtitle})]}),a.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-start",children:[a.jsxs("div",{className:"bg-card rounded-2xl shadow-2xl p-8 border border-border/50 animate-scale-in",children:[a.jsxs("div",{className:"flex bg-muted/50 rounded-xl p-1 mb-8",children:[a.jsx("button",{onClick:()=>o("once"),className:`flex-1 py-3 px-4 rounded-lg font-semibold transition-all duration-300 ${i==="once"?"bg-primary text-primary-foreground shadow-lg":"text-muted-foreground hover:text-foreground"}`,children:d.donate.singleDonation}),a.jsx("button",{onClick:()=>o("monthly"),className:`flex-1 py-3 px-4 rounded-lg font-semibold transition-all duration-300 ${i==="monthly"?"bg-primary text-primary-foreground shadow-lg":"text-muted-foreground hover:text-foreground"}`,children:d.donate.monthlyDonation})]}),a.jsxs("div",{className:"mb-8",children:[a.jsx("h3",{className:"text-lg font-semibold mb-4 text-foreground",children:d.donate.chooseAmount}),a.jsx("div",{className:"grid grid-cols-2 gap-3",children:f.map(b=>a.jsxs("button",{onClick:()=>m(b.value),className:`p-4 rounded-xl border-2 transition-all duration-300 text-left hover:scale-105 ${e===b.value?"border-primary bg-primary/10 shadow-lg":"border-border hover:border-primary/50 bg-background"}`,children:[a.jsx("div",{className:"font-bold text-lg text-foreground",children:b.label}),a.jsx("div",{className:"text-sm text-muted-foreground mt-1",children:b.description})]},b.value))})]}),a.jsxs("div",{className:"mb-8",children:[a.jsx("h3",{className:"text-lg font-semibold mb-4 text-foreground",children:d.donate.customAmount}),a.jsxs("div",{className:"relative",children:[a.jsx(y2,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-5 h-5"}),a.jsx("input",{type:"number",min:"1",placeholder:d.donate.customAmountPlaceholder,value:n,onChange:b=>g(b.target.value),className:"w-full pl-10 pr-4 py-3 bg-background border-2 border-border rounded-xl focus:border-primary focus:outline-none text-lg font-semibold transition-colors duration-300"})]})]}),a.jsxs("div",{className:"mb-8",children:[a.jsx("h3",{className:"text-lg font-semibold mb-4 text-foreground",children:d.donate.whereDonation}),a.jsx("div",{className:"space-y-3",children:p.map(b=>a.jsx("button",{onClick:()=>u(b.id),className:`w-full p-4 rounded-xl border-2 transition-all duration-300 text-left hover:scale-[1.02] ${l===b.id?"border-primary bg-primary/10 shadow-lg":"border-border hover:border-primary/50 bg-background"}`,children:a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx(b.icon,{className:`w-6 h-6 ${b.color}`}),a.jsxs("div",{children:[a.jsx("div",{className:"font-semibold text-foreground",children:b.title}),a.jsx("div",{className:"text-sm text-muted-foreground",children:b.description})]}),l===b.id&&a.jsx(li,{className:"w-5 h-5 text-primary ml-auto"})]})},b.id))})]}),a.jsx("button",{onClick:w,disabled:y()===0,className:`w-full py-4 px-6 rounded-xl font-bold text-lg transition-all duration-300 ${y()>0?"bg-primary text-primary-foreground hover:bg-primary/90 hover:scale-105 shadow-2xl":"bg-muted text-muted-foreground cursor-not-allowed"}`,style:y()>0?{boxShadow:"0 10px 30px -5px hsl(var(--primary) / 0.4)"}:{},children:a.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[a.jsx(v2,{className:"w-5 h-5"}),a.jsx("span",{children:y()>0?`${d.donate.donateNow} ${y()}€ ${i==="monthly"?d.donate.perMonth:d.donate.now}`:d.donate.selectAmount})]})}),a.jsxs("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:[a.jsxs("p",{children:["🔒 ",d.donate.securePayment]}),a.jsx("p",{children:d.donate.taxDeductible})]})]}),a.jsxs("div",{className:"space-y-8",children:[a.jsxs("div",{className:"bg-card rounded-2xl p-8 border border-border/50 shadow-xl animate-slide-in-up",children:[a.jsx("h3",{className:"text-2xl font-bold mb-6 text-foreground",children:d.donate.impact.title}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start space-x-4",children:[a.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx(la,{className:"w-6 h-6 text-primary"})}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-foreground mb-2",children:d.donate.impact.with25}),a.jsx("p",{className:"text-muted-foreground",children:d.donate.impact.with25desc})]})]}),a.jsxs("div",{className:"flex items-start space-x-4",children:[a.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx(js,{className:"w-6 h-6 text-primary"})}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-foreground mb-2",children:d.donate.impact.with100}),a.jsx("p",{className:"text-muted-foreground",children:d.donate.impact.with100desc})]})]}),a.jsxs("div",{className:"flex items-start space-x-4",children:[a.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx(nr,{className:"w-6 h-6 text-primary"})}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-foreground mb-2",children:d.donate.impact.with200}),a.jsx("p",{className:"text-muted-foreground",children:d.donate.impact.with200desc})]})]})]})]}),a.jsxs("div",{className:"bg-gradient-to-br from-accent/20 to-primary/10 rounded-2xl p-8 border border-border/50 shadow-xl animate-scale-in",children:[a.jsx("h3",{className:"text-xl font-bold mb-4 text-foreground",children:d.donate.testimonial.title}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:['"',d.donate.testimonial.text,'"']}),a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx("div",{className:"w-10 h-10 bg-primary rounded-full flex items-center justify-center",children:a.jsx("span",{className:"text-primary-foreground font-bold text-sm",children:"M"})}),a.jsxs("div",{children:[a.jsx("div",{className:"font-semibold text-foreground",children:"Maria Santos"}),a.jsx("div",{className:"text-sm text-muted-foreground",children:"São Paulo, Brasile"})]})]})]})]}),a.jsxs("div",{className:"bg-card rounded-2xl p-6 border border-border/50 shadow-xl",children:[a.jsx("h4",{className:"font-semibold mb-4 text-foreground",children:d.donate.howToSupport.title}),a.jsxs("div",{className:"space-y-4 text-sm text-muted-foreground",children:[a.jsx("h5",{className:"font-semibold text-foreground text-base mb-2",children:d.donate.howToSupport.specialProjects}),a.jsx("p",{className:"leading-relaxed",children:d.donate.howToSupport.description}),a.jsx("p",{className:"leading-relaxed",children:d.donate.howToSupport.legacy}),a.jsxs("div",{className:"mt-4",children:[a.jsx("p",{className:"font-semibold text-foreground mb-3",children:d.donate.howToSupport.supportWith}),a.jsxs("ul",{className:"space-y-2",children:[a.jsxs("li",{className:"flex items-start space-x-2",children:[a.jsx(li,{className:"w-4 h-4 text-green-500 mt-0.5 flex-shrink-0"}),a.jsx("span",{children:d.donate.howToSupport.methods.check})]}),a.jsxs("li",{className:"flex items-start space-x-2",children:[a.jsx(li,{className:"w-4 h-4 text-green-500 mt-0.5 flex-shrink-0"}),a.jsx("span",{children:d.donate.howToSupport.methods.bank})]}),a.jsxs("li",{className:"flex items-start space-x-2",children:[a.jsx(li,{className:"w-4 h-4 text-green-500 mt-0.5 flex-shrink-0"}),a.jsx("span",{children:d.donate.howToSupport.methods.postal})]}),a.jsxs("li",{className:"flex items-start space-x-2",children:[a.jsx(li,{className:"w-4 h-4 text-green-500 mt-0.5 flex-shrink-0"}),a.jsx("span",{children:d.donate.howToSupport.methods.paypal})]})]})]})]})]}),a.jsxs("div",{className:"bg-card rounded-2xl p-6 border border-border/50 shadow-xl",children:[a.jsx("h4",{className:"font-semibold mb-4 text-foreground",children:d.donate.whyDonate.title}),a.jsxs("div",{className:"space-y-3 text-sm",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(li,{className:"w-4 h-4 text-green-500"}),a.jsx("span",{className:"text-muted-foreground",children:d.donate.whyDonate.reason1})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(li,{className:"w-4 h-4 text-green-500"}),a.jsx("span",{className:"text-muted-foreground",children:d.donate.whyDonate.reason2})]})]})]})]})]})]})})},j4=()=>{const{toast:e}=bc(),{t}
1002=Sn(),[n,r]=x.useState(!1),[i,o]=x.useState({name:"",email:"",phone:"",subject:"",message:"",type:"general"}),l=[{icon:Lo,title:t.contact.headquarters,content:`Via Olona 12
100320123 – Milano`,link:"https://maps.google.com/?q=Via+Olona+12+Milano"},{icon:yd,title:t.contact.phone,content:`02/48100073
1004Fax 02/43512014`,link:"tel:+390248100073"},{icon:ca,title:t.contact.email,content:"[email protected]",link:"mailto:[email protected]"},{icon:Pl,title:t.contact.openingHours,content:`Lun-Ven: 9:00-18:00
1005Sab: 9:00-13:00`,link:null}],u=[{icon:g1,name:"Facebook",url:"#",color:"hover:text-blue-600"},{icon:_2,name:"Instagram",url:"#",color:"hover:text-pink-600"},{icon:R2,name:"Twitter",url:"#",color:"hover:text-blue-400"},{icon:_1,name:"YouTube",url:"#",color:"hover:text-red-600"}];t.contact.form.requestType,t.contact.form.requestType,t.contact.form.requestType,t.contact.form.requestType,t.contact.form.requestType,t.contact.form.requestType;const d=p=>{const{name:m,value:g}=p.target;o(y=>({...y,[m]:g}))},f=async p=>{if(p.preventDefault(),i.name.length>100){e({title:"Errore",description:"Il nome deve essere massimo 100 caratteri",variant:"destructive"});return}if(i.subject.length>200){e({title:"Errore",description:"L'oggetto deve essere massimo 200 caratteri",variant:"destructive"});return}if(i.message.length>5e3){e({title:"Errore",description:"Il messaggio deve essere massimo 5000 caratteri",variant:"destructive"});return}r(!0);try{const{data:m,error:g}=await me.functions.invoke("send-contact-email",{body:{name:i.name.trim(),email:i.email.trim(),phone:i.phone.trim()||void 0,subject:i.subject.trim(),message:i.message.trim()}});if(g){console.error("Error sending email:",g),e({title:"Errore",description:"Si è verificato un errore nell'invio del messaggio. Riprova più tardi.",variant:"destructive"});return}e({title:t.contact.thankYou,description:"Ti risponderemo al più presto!"}),o({name:"",email:"",phone:"",subject:"",message:"",type:"general"})}catch(m){console.error("Error:",m),e({title:"Errore",description:"Si è verificato un errore. Riprova più tardi.",variant:"destructive"})}finally{r(!1)}};return a.jsx("section",{id:"contact",className:"py-20 bg-pattern-waves",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[a.jsx("h2",{className:"text-section-title text-gradient",children:t.contact.title}),a.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:t.contact.subtitle})]}),a.jsxs("div",{className:"grid lg:grid-cols-2 gap-16",children:[a.jsxs("div",{className:"space-y-8",children:[a.jsxs("div",{className:"animate-slide-in-up",children:[a.jsx("h3",{className:"text-2xl font-semibold mb-6 text-foreground",children:t.contact.howToReachUs}),a.jsx("div",{className:"space-y-6",children:l.map((p,m)=>a.jsx("div",{className:"card-warm hover-lift",children:a.jsxs("div",{className:"flex items-start space-x-4",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center",children:a.jsx(p.icon,{className:"w-6 h-6 text-primary"})})}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-lg font-semibold text-foreground mb-1",children:p.title}),p.link?a.jsx("a",{href:p.link,className:"text-muted-foreground hover:text-primary transition-colors duration-200 whitespace-pre-line",children:p.content}):a.jsx("p",{className:"text-muted-foreground whitespace-pre-line",children:p.content})]})]})},m))})]}),a.jsxs("div",{className:"animate-slide-in-up",style:{animationDelay:"0.2s"},children:[a.jsx("h3",{className:"text-xl font-semibold mb-4 text-foreground",children:t.contact.followUs}),a.jsx("div",{className:"flex space-x-4",children:u.map((p,m)=>a.jsx("a",{href:p.url,className:`w-12 h-12 bg-muted rounded-full flex items-center justify-center text-muted-foreground transition-all duration-300 hover:scale-110 ${p.color}`,"aria-label":p.name,children:a.jsx(p.icon,{className:"w-5 h-5"})},m))})]})]}),a.jsx("div",{className:"animate-scale-in",children:a.jsxs("div",{className:"card-elegant",children:[a.jsx("h3",{className:"text-2xl font-semibold mb-6 text-foreground",children:t.contact.sendMessage}),a.jsxs("form",{onSubmit:f,className:"space-y-6",children:[a.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"name",className:"block text-sm font-medium text-foreground mb-2",children:[t.contact.form.fullName," *"]}),a.jsx("input",{type:"text",id:"name",name:"name",value:i.name,onChange:d,required:!0,className:"w-full px-4 py-3 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 bg-background",placeholder:t.contact.form.yourName})]}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"email",className:"block text-sm font-medium text-foreground mb-2",children:[t.contact.form.emailAddress," *"]}),a.jsx("input",{type:"email",id:"email",name:"email",value:i.email,onChange:d,required:!0,className:"w-full px-4 py-3 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 bg-background",placeholder:t.contact.form.emailPlaceholder})]})]}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"phone",className:"block text-sm font-medium text-foreground mb-2",children:t.contact.phone}),a.jsx("input",{type:"tel",id:"phone",name:"phone",value:i.phone,onChange:d,className:"w-full px-4 py-3 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 bg-background",placeholder:t.contact.form.phonePlaceholder})]}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"subject",className:"block text-sm font-medium text-foreground mb-2",children:[t.contact.form.subject," *"]}),a.jsx("input",{type:"text",id:"subject",name:"subject",value:i.subject,onChange:d,required:!0,className:"w-full px-4 py-3 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 bg-background",placeholder:t.contact.form.subjectPlaceholder})]})]}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"message",className:"block text-sm font-medium text-foreground mb-2",children:[t.contact.form.message," *"]}),a.jsx("textarea",{id:"message",name:"message",value:i.message,onChange:d,required:!0,rows:6,className:"w-full px-4 py-3 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 bg-background resize-none",placeholder:t.contact.form.messagePlaceholder})]}),a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx("input",{type:"checkbox",id:"privacy",required:!0,className:"mt-1 h-4 w-4 text-primary focus:ring-primary border-border rounded"}),a.jsxs("label",{htmlFor:"privacy",className:"text-sm text-muted-foreground",children:[t.contact.form.privacy," *"]})]}),a.jsx("button",{type:"submit",disabled:n,className:"btn-primary w-full text-lg flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed",children:n?a.jsxs(a.Fragment,{children:[a.jsx(qe,{className:"w-5 h-5 mr-2 animate-spin"}),"Invio in corso..."]}):a.jsxs(a.Fragment,{children:[a.jsx(k2,{className:"w-5 h-5 mr-2"}),t.contact.form.sendButton]})})]})]})})]}),a.jsxs("div",{className:"mt-20 grid md:grid-cols-3 gap-8",children:[a.jsxs("div",{className:"card-warm text-center animate-slide-in-up",children:[a.jsx(ca,{className:"w-12 h-12 text-primary mx-auto mb-4"}),a.jsx("h4",{className:"text-lg font-semibold mb-2 text-foreground",children:t.contact.email}),a.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]}),a.jsxs("div",{className:"card-warm text-center animate-slide-in-up",style:{animationDelay:"0.1s"},children:[a.jsx(yd,{className:"w-12 h-12 text-accent mx-auto mb-4"}),a.jsx("h4",{className:"text-lg font-semibold mb-2 text-foreground",children:t.contact.phone}),a.jsx("a",{href:"tel:+390248100073",className:"text-accent hover:underline",children:"02/48100073"})]}),a.jsxs("div",{className:"card-warm text-center animate-slide-in-up",style:{animationDelay:"0.2s"},children:[a.jsx(Pl,{className:"w-12 h-12 text-growth mx-auto mb-4"}),a.jsx("h4",{className:"text-lg font-semibold mb-2 text-foreground",children:t.contact.openingHours}),a.jsx("p",{className:"text-muted-foreground",children:t.contact.responseTime})]})]})]})})},N4=()=>{const{t:e}=Sn(),{toast:t}
1005=bc(),[n,r]=x.useState(""),[i,o]=x.useState(!1),l=async()=>{if(!n){t({title:e.news.newsletter.errorTitle,description:e.news.newsletter.errorRequired,variant:"destructive"});return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){t({title:e.news.newsletter.errorTitle,description:e.news.newsletter.errorEmail,variant:"destructive"});return}o(!0);try{const{data:b,error:C}=await me.functions.invoke("subscribe-newsletter",{body:{email:n}});if(C)throw C;t({title:e.news.newsletter.successTitle,description:e.news.newsletter.successMessage}),r("")}catch(b){console.error("Newsletter subscription error:",b),t({title:e.news.newsletter.errorTitle,description:e.news.newsletter.errorSending,variant:"destructive"})}finally{o(!1)}},u=()=>{window.scrollTo({top:0,behavior:"smooth"})},d=[{name:e.nav.about,href:"#about"},{name:e.nav.projects,href:"#projects"},{name:e.nav.stories,href:"#stories"},{name:e.nav.news,href:"#news"},{name:e.nav.gallery,href:"#gallery"},{name:e.nav.contact,href:"#contact"}],f=[{name:e.footer.support.distanceSupport,href:"#adoption"},{name:e.footer.support.donations,href:"#donate"},{name:e.footer.support.volunteering,href:"#volunteer"},{name:e.footer.support.partnership,href:"#partnership"},{name:e.footer.support.fivePerMille,href:"#5x1000"},{name:e.footer.support.legacy,href:"#legacy"}],p=[{name:e.footer.legal.privacy,href:"/privacy"},{name:e.footer.legal.cookies,href:"/cookies"},{name:e.footer.legal.terms,href:"/terms"},{name:e.footer.legal.transparency,href:"/transparency"},{name:e.footer.legal.reports,href:"/reports"}],m=[{icon:g1,name:"Facebook",url:"https://www.facebook.com/p/ABBA-ODV-100092246659730",color:"hover:text-blue-400"},{icon:_1,name:"YouTube",url:"https://www.youtube.com/@ASSOCIAZIONEABBAonlus",color:"hover:text-red-400"}],g=[{name:"Brasile",flag:"🇧🇷"},{name:"Filippine",flag:"🇵🇭"},{name:"Camerun",flag:"🇨🇲"},{name:"Albania",flag:"🇦🇱"},{name:"India",flag:"🇮🇳"},{name:"Perù",flag:"🇵🇪"},{name:"Madagascar",flag:"🇲🇬"}],y=w=>{const b=document.querySelector(w);b&&b.scrollIntoView({behavior:"smooth"})};return a.jsxs("footer",{className:"bg-gradient-to-br from-primary/5 via-background to-accent/5 relative",children:[a.jsx("button",{onClick:u,className:"absolute -top-6 left-1/2 transform -translate-x-1/2 w-12 h-12 bg-primary text-primary-foreground rounded-full shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-110 flex items-center justify-center",children:a.jsx(m1,{className:"w-5 h-5"})}),a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-16 pb-8",children:[a.jsxs("div",{className:"grid lg:grid-cols-4 gap-12 mb-12",children:[a.jsxs("div",{className:"lg:col-span-1",children:[a.jsxs("div",{className:"flex items-center space-x-3 mb-6",children:[a.jsx("img",{src:"/lovable-uploads/ef3da3f9-ba4a-46ec-b4c1-34a8b45328cb.png",alt:"ABBÀ Logo",className:"h-12 w-auto"}),a.jsx("span",{className:"text-2xl font-bold text-gradient",children:"ABBÀ"})]}),a.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:e.footer.description}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center text-muted-foreground",children:[a.jsx(Lo,{className:"w-4 h-4 mr-3 text-primary flex-shrink-0"}),a.jsx("span",{className:"text-sm",children:"Via Olona 12, 20123 Milano"})]}),a.jsxs("div",{className:"flex items-center text-muted-foreground",children:[a.jsx(yd,{className:"w-4 h-4 mr-3 text-primary flex-shrink-0"}),a.jsxs("div",{className:"text-sm",children:[a.jsx("a",{href:"tel:+390248100073",className:"hover:text-primary transition-colors",children:"02/48100073"}),a.jsx("span",{className:"mx-1",children:"-"}),a.jsx("span",{children:"Fax 02/43512014"})]})]}),a.jsxs("div",{className:"flex items-center text-muted-foreground",children:[a.jsx(ca,{className:"w-4 h-4 mr-3 text-primary flex-shrink-0"}),a.jsx("a",{href:"mailto:[email protected]",className:"text-sm hover:text-primary transition-colors",children:"[email protected]"})]})]}),a.jsx("div",{className:"flex space-x-4 mt-6",children:m.map((w,b)=>a.jsx("a",{href:w.url,className:`w-10 h-10 bg-muted rounded-full flex items-center justify-center text-muted-foreground transition-all duration-300 hover:scale-110 ${w.color}`,"aria-label":w.name,children:a.jsx(w.icon,{className:"w-4 h-4"})},b))})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-foreground mb-6",children:e.footer.quickLinks}),a.jsx("ul",{className:"space-y-3",children:d.map((w,b)=>a.jsx("li",{children:a.jsx("button",{onClick:()=>y(w.href),className:"text-muted-foreground hover:text-primary transition-colors duration-200 text-sm",children:w.name})},b))})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-foreground mb-6",children:e.footer.howToHelp}),a.jsx("ul",{className:"space-y-3",children:f.map((w,b)=>a.jsx("li",{children:a.jsx("a",{href:w.href,className:"text-muted-foreground hover:text-primary transition-colors duration-200 text-sm",children:w.name})},b))})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-foreground mb-6",children:e.footer.legalInfo}),a.jsx("ul",{className:"space-y-3 mb-8",children:p.map((w,b)=>a.jsx("li",{children:a.jsx("a",{href:w.href,className:"text-muted-foreground hover:text-primary transition-colors duration-200 text-sm",children:w.name})},b))}),a.jsx("h4",{className:"text-md font-semibold text-foreground mb-4",children:e.footer.whereWeOperate}),a.jsx("div",{className:"grid grid-cols-2 gap-2",children:g.map((w,b)=>a.jsxs("div",{className:"flex items-center text-muted-foreground text-sm",children:[a.jsx("span",{className:"mr-2",children:w.flag}),w.name]},b))})]})]}),a.jsx("div",{className:"bg-gradient-to-r from-primary/10 to-accent/10 rounded-2xl p-8 mb-12",children:a.jsxs("div",{className:"grid md:grid-cols-4 gap-8 text-center",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-3xl font-bold text-primary mb-2",children:"35"}),a.jsx("div",{className:"text-sm text-muted-foreground",children:e.footer.stats.yearsExperience})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-3xl font-bold text-accent mb-2",children:"734"}),a.jsx("div",{className:"text-sm text-muted-foreground",children:e.footer.stats.childrenSupported})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-3xl font-bold text-growth mb-2",children:"1000+"}),a.jsx("div",{className:"text-sm text-muted-foreground",children:e.footer.stats.graduates})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-3xl font-bold text-hope mb-2",children:"8"}),a.jsx("div",{className:"text-sm text-muted-foreground",children:e.footer.stats.countries})]})]})}),a.jsxs("div",{className:"bg-card rounded-2xl p-8 mb-12 text-center",children:[a.jsx("h3",{className:"text-xl font-semibold text-foreground mb-4",children:e.footer.newsletter.title}),a.jsx("p",{className:"text-muted-foreground mb-6",children:e.footer.newsletter.subt
1005itle}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 max-w-md mx-auto",children:[a.jsx("input",{type:"email",placeholder:e.footer.newsletter.placeholder,className:"flex-1 px-4 py-3 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 bg-background",value:n,onChange:w=>r(w.target.value),disabled:i}),a.jsx("button",{className:"btn-primary whitespace-nowrap flex items-center justify-center gap-2",onClick:l,disabled:i,children:i?a.jsxs(a.Fragment,{children:[a.jsx(qe,{className:"w-4 h-4 animate-spin"}),e.news.newsletter.sending]}):e.footer.newsletter.subscribe})]})]}),a.jsxs("div",{className:"border-t border-border pt-8",children:[a.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between",children:[a.jsxs("div",{className:"text-muted-foreground text-sm mb-4 md:mb-0",children:["© ",new Date().getFullYear()," Abbà ODV."]}),a.jsx("div",{className:"flex items-center text-muted-foreground text-sm",children:a.jsx("span",{children:e.footer.madeWith})})]}),a.jsx("div",{className:"mt-6 pt-6 border-t border-border text-center",children:a.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:e.footer.legalText})})]})]})]})},C4=()=>a.jsxs("div",{className:"min-h-screen bg-background scroll-smooth",children:[a.jsx(RM,{}),a.jsx(MM,{}),a.jsx(qD,{}),a.jsx(KD,{}),a.jsx(p4,{}),a.jsx(g4,{}),a.jsx(y4,{}),a.jsx(x4,{}),a.jsx(w4,{}),a.jsx(_4,{}),a.jsx(S4,{}),a.jsx(j4,{}),a.jsx(N4,{})]}),E4=()=>{const e=za();return x.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),a.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),a.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),a.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},Ev=Mg("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),xe=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const l=r?Ps:"button";return a.jsx(l,{className:Ce(Ev({variant:t,size:n,className:e})),ref:o,...i})});xe.displayName="Button";const Kt=x.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ce("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Kt.displayName="Card";const Rd=x.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ce("flex flex-col space-y-1.5 p-6",e),...t}));Rd.displayName="CardHeader";const Id=x.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:Ce("text-2xl font-semibold leading-none tracking-tight",e),...t}));Id.displayName="CardTitle";const Yj=x.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:Ce("text-sm text-muted-foreground",e),...t}));Yj.displayName="CardDescription";const Zt=x.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ce("p-6 pt-0",e),...t}));Zt.displayName="CardContent";const T4=x.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ce("flex items-center p-6 pt-0",e),...t}));T4.displayName="CardFooter";const Jj="/assets/abba-logo-B9G7A5ti.png",k4=()=>
1005{const[e,t]=x.useState(!0),[n,r]=x.useState(""),[i,o]=x.useState(""),[l,u]=x.useState(!1),{signIn:d,signUp:f,user:p,isAdmin:m,loading:g,adminCheckLoading:y}=XS(),w=ov();x.useEffect(()=>{!g&&!y&&p&&w(m?"/admin":"/")},[p,m,g,y,w]);const b=async C=>{if(C.preventDefault(),!n||!i){re.error("Inserisci email e password");return}if(i.length<6){re.error("La password deve essere di almeno 6 caratteri");return}u(!0);try{if(e){const{error:j}=await d(n,i);j?j.message.includes("Invalid login credentials")?re.error("Email o password non corretti"):re.error(j.message):re.success("Accesso effettuato con successo!")}else{const{error:j}=await f(n,i);j?j.message.includes("User already registered")?re.error("Questa email è già registrata. Prova ad accedere."):re.error(j.message):(re.success("Registrazione completata! Ora puoi accedere."),t(!0))}}catch{re.error("Si è verificato un errore. Riprova.")}finally{u(!1)}};return g||y?a.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"})}):a.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background via-secondary/30 to-background px-4",children:a.jsxs(Kt,{className:"w-full max-w-md 
1005shadow-xl border-border/50",children:[a.jsxs(Rd,{className:"text-center space-y-4",children:[a.jsx("div",{className:"mx-auto w-20 h-20 flex items-center justify-center",children:a.jsx("img",{src:Jj,alt:"Abbà ODV",className:"w-full h-full object-contain"})}),a.jsxs("div",{children:[a.jsx(Id,{className:"text-2xl font-bold text-foreground",children:e?"Accedi al Pannello Admin":"Registrati"}),a.jsx(Yj,{className:"text-muted-foreground mt-2",children:e?"Inserisci le tue credenziali per accedere":"Crea un nuovo account"})]})]}),a.jsxs(Zt,{children:[a.jsxs("form",{onSubmit:b,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"email",className:"text-foreground",children:"Email"}),a.jsxs("div",{className:"relative",children:[a.jsx(ca,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),a.jsx(Se,{id:"email",type:"email",placeholder:"[email protected]",value:n,onChange:C=>r(C.target.value),className:"pl-10",required:!0})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"password",className:"text-foreground",children:"Password"}),a.jsxs("div",{className:"relative",children:[a.jsx(j2,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),a.jsx(Se,{id:"password",type:"password",placeholder:"••••••••",value:i,onChange:C=>o(C.target.value),className:"pl-10",required:!0,minLength:6})]})]}),a.jsx(xe,{type:"submit",className:"w-full",disabled:l,children:l?a.jsxs(a.Fragment,{children:[a.jsx(qe,{className:"w-4 h-4 mr-2 animate-spin"}),e?"Accesso in corso...":"Registrazione..."]}):e?"Accedi":"Registrati"})]}),a.jsx("div",{className:"mt-6 text-center",children:a.jsx("button",{type:"button",onClick:()=>t(!e),className:"text-sm text-primary hover:underline",children:e?"Non hai un account? Registrati":"Hai già un account? Accedi"})}),a.jsx("div",{className:"mt-4 text-center",children:a.jsx("button",{type:"button",onClick:()=>w("/"),className:"text-sm text-muted-foreground hover:text-foreground",children:"← Torna al sito"})})]})]})})},P4=()=>{const{data:e=0}=qt({queryKey:["news-count"],queryFn:async()=>{const{count:o}=await me.from("news").select("*",{count:"exact",head:!0});return o||0}}),{data:t=0}=qt({queryKey:["gallery-count"],queryFn:async()=>{const{count:o}=await me.from("gallery_images").select("*",{count:"exact",head:!0});return o||0}}),{data:n=0}=qt({queryKey:["videos-count"],queryFn:async()=>{const{count:o}=await me.from("videos").select("*",{count:"exact",head:!0});return o||0}}),{data:r=0}=qt({queryKey:["giornalini-count"],queryFn:async()=>{const{count:o}=await me.from("giornalini").select("*",{count:"exact",head:!0});return o||0}}),i=[{title:"News",value:e,icon:vd,color:"bg-blue-500"},{title:"Immagini Galleria",value:t,icon:qg,color:"bg-green-500"},{title:"Video",value:n,icon:Ug,color:"bg-red-500"},{title:"Giornalini",value:r,icon:Sr,color:"bg-purple-500"}];return a.jsxs("div",{className:"space-y-8",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-2xl font-bold text-foreground mb-2",children:"Benvenuto nel Pannello Admin"}),a.jsx("p",{className:"text-muted-foreground",children:"Gestisci i contenuti del sito di Abbà ODV da qui."})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:i.map(o=>a.jsxs(Kt,{className:"hover:shadow-lg transition-shadow",children:[a.jsxs(Rd,{className:"flex flex-row items-center justify-between pb-2",children:[a.jsx(Id,{className:"text-sm font-medium text-muted-foreground",children:o.title}),a.jsx("div",{className:`p-2 rounded-lg ${o.color}`,children:a.jsx(o.icon,{className:"w-4 h-4 text-white"})})]}),a.jsx(Zt,{children:a.jsx("div",{className:"text-3xl font-bold text-foreground",children:o.value})})]},o.title))}),a.jsxs(Kt,{children:[a.jsx(Rd,{children:a.jsx(Id,{children:"Guida Rapida"})}),a.jsxs(Zt,{className:"space-y-4 text-muted-foreground",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-foreground mb-1",children:"📰 Gestione News"}),a.jsx("p",{children:'Aggiungi, modifica o elimina gli articoli delle news. Puoi marcare articoli come "in evidenza" per mostrarli nella sezione principale.'})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-foreground mb-1",children:"🖼️ Gestione Galleria"}),a.jsx("p",{children:"Carica nuove immagini, organizzale per categoria e paese. Le immagini verranno mostrate nella galleria pubblica del sito."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-foreground mb-1",children:"🎬 Gestione Media"}),a.jsx("p",{children:"Aggiungi video YouTube e gestisci i numeri del Giornalino con i relativi PDF da scaricare."})]})]})]})]})};function Xj(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Tv="Switch",[A4,oF]=Jr(Tv),[O4,R4]=A4(Tv),eN=x.forwardRef((e,t)=>
vendor: 4,371 bytes, line 1005
1005{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:l,disabled:u,value:d="on",onCheckedChange:f,form:p,...m}=e,[g,y]=x.useState(null),w=ze(t,N=>y(N)),b=x.useRef(!1),C=g?p||!!g.closest("form"):!0,[j=!1,_]=Bi({prop:i,defaultProp:o,onChange:f});return a.jsxs(O4,{scope:n,checked:j,disabled:u,children:[a.jsx(je.button,{type:"button",role:"switch","aria-checked":j,"aria-required":l,"data-state":rN(j),"data-disabled":u?"":void 0,disabled:u,value:d,...m,ref:w,onClick:de(e.onClick,N=>{_(A=>!A),C&&(b.current=N.isPropagationStopped(),b.current||N.stopPropagation())})}),C&&a.jsx(I4,{control:g,bubbles:!b.current,name:r,value:d,checked:j,required:l,disabled:u,form:p,style:{transform:"translateX(-100%)"}})]})});eN.displayName=Tv;var tN="SwitchThumb",nN=x.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=R4(tN,n);return a.jsx(je.span,{"data-state":rN(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});nN.displayName=tN;var I4=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=x.useRef(null),l=Xj(n),u=q1(t);return x.useEffect(()=>{const d=o.current,f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const g=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(g)}},[l,n,r]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function rN(e){return e?"checked":"unchecked"}var iN=eN,L4=nN;const sN=x.forwardRef(({className:e,...t},n)=>a.jsx(iN,{className:Ce("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors 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 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:a.jsx(L4,{className:Ce("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")})}));sN.displayName=iN.displayName;var z4=[" ","Enter","ArrowUp","ArrowDown"],M4=[" ","Enter"],Cc="Select",[ph,gh,D4]=Rg(Cc),[Da,aF]=Jr(Cc,[D4,sh]),vh=sh(),[F4,Ki]=Da(Cc),[B4,$4]=Da(Cc),oN=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:u,onValueChange:d,dir:f,name:p,autoComplete:m,disabled:g,required:y,form:w}=e,b=vh(t),[C,j]=x.useState(null),[_,N]=x.useState(null),[A,k]=x.useState(!1),T=hh(f),[R=!1,P]=Bi({prop:r,defaultProp:i,onChange:o}),[I,O]=Bi({prop:l,defaultProp:u,onChange:d}),B=x.useRef(null),U=C?w||!!C.closest("form"):!0,[ie,G]=x.useState(new Set),se=Array.from(ie).map(Y=>Y.props.value).join(";");return a.jsx(eR,{...b,children:a.jsxs(F4,{required:y,scope:t,trigger:C,onTriggerChange:j,valueNode:_,onValueNodeChange:N,valueNodeHasChildren:A,onValueNodeHasChildrenChange:k,contentId:qr(),value:I,onValueChange:O,open:R,onOpenChange:P,dir:T,triggerPointerDownPosRef:B,disabled:g,children:[a.jsx(ph.Provider,{scope:t,children:a.jsx(B4,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(Y=>{G(le=>new Set(le).add(Y))},[]),onNativeOptionRemove:x.useCallback(Y=>{G(le=>{const F=new Set(le);return F.delete(Y),F})},[]),children:n})}),U?a.jsxs(AN,{"aria-hidden":!0,required:y,tabIndex:-1,name:p,autoComplete:m,value:I,onChange:Y=>O(Y.target.value),disabled:g,form:w,children:[I===void 0?a.jsx("option",{value:""}):null,Array.from(ie)]},se):null]})})};oN.displayName=Cc;var aN="SelectTrigger",lN=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=vh(n),l=Ki(aN,n),u=l.disabled||r,d=ze(t,l.onTriggerChange),f=gh(n),p=x.useRef("touch"),[m,g,y]=ON(b=>{const C=f().filter(N=>!N.disabled),j=C.find(N=>N.value===l.value),_=RN(C,b,j);_!==void 0&&l.onValueChange(_.value)}),w=b=>{u||(l.onOpenChange(!0),y()),b&&(l.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return a.jsx(J1,{asChild:!0,...o,children:a.jsx(je.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":PN(l.value)?"":void 0,...i,ref:d,onClick:de(i.onClick,b=>
vendor: 16,057 bytes, line 1005
1005{b.currentTarget.focus(),p.current!=="mouse"&&w(b)}),onPointerDown:de(i.onPointerDown,b=>{p.current=b.pointerType;const C=b.target;C.hasPointerCapture(b.pointerId)&&C.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(w(b),b.preventDefault())}),onKeyDown:de(i.onKeyDown,b=>{const C=m.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&g(b.key),!(C&&b.key===" ")&&z4.includes(b.key)&&(w(),b.preventDefault())})})})});lN.displayName=aN;var cN="SelectValue",uN=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...u}=e,d=Ki(cN,n),{onValueNodeHasChildrenChange:f}=d,p=o!==void 0,m=ze(t,d.onValueNodeChange);return Pt(()=>{f(p)},[f,p]),a.jsx(je.span,{...u,ref:m,style:{pointerEvents:"none"},children:PN(d.value)?a.jsx(a.Fragment,{children:l}):o})});uN.displayName=cN;var q4="SelectIcon",dN=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return a.jsx(je.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});dN.displayName=q4;var U4="SelectPortal",hN=e=>a.jsx(Xd,{asChild:!0,...e});hN.displayName=U4;var Ls="SelectContent",fN=x.forwardRef((e,t)=>{const n=Ki(Ls,e.__scopeSelect),[r,i]=x.useState();if(Pt(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Bs.createPortal(a.jsx(mN,{scope:e.__scopeSelect,children:a.jsx(ph.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),o):null}return a.jsx(pN,{...e,ref:t})});fN.displayName=Ls;var Vn=10,[mN,Zi]=Da(Ls),V4="SelectContentImpl",pN=x.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:d,align:f,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:y,sticky:w,hideWhenDetached:b,avoidCollisions:C,...j}=e,_=Ki(Ls,n),[N,A]=x.useState(null),[k,T]=x.useState(null),R=ze(t,te=>A(te)),[P,I]=x.useState(null),[O,B]=x.useState(null),U=gh(n),[ie,G]=x.useState(!1),se=x.useRef(!1);x.useEffect(()=>{if(N)return dj(N)},[N]),rj();const Y=x.useCallback(te=>{const[ve,...ke]=U().map(Ne=>Ne.ref.current),[ge]=ke.slice(-1),Ee=document.activeElement;for(const Ne of te)if(Ne===Ee||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===ve&&k&&(k.scrollTop=0),Ne===ge&&k&&(k.scrollTop=k.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==Ee))return},[U,k]),le=x.useCallback(()=>Y([P,N]),[Y,P,N]);x.useEffect(()=>{ie&&le()},[ie,le]);const{onOpenChange:F,triggerPointerDownPosRef:K}=_;x.useEffect(()=>{if(N){let te={x:0,y:0};const ve=ge=>{var Ee,Ne;te={x:Math.abs(Math.round(ge.pageX)-(((Ee=K.current)==null?void 0:Ee.x)??0)),y:Math.abs(Math.round(ge.pageY)-(((Ne=K.current)==null?void 0:Ne.y)??0))}},ke=ge=>{te.x<=10&&te.y<=10?ge.preventDefault():N.contains(ge.target)||F(!1),document.removeEventListener("pointermove",ve),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",ke,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",ke,{capture:!0})}}},[N,F,K]),x.useEffect(()=>{const te=()=>F(!1);return window.addEventListener("blur",te),window.addEventListener("resize",te),()=>{window.removeEventListener("blur",te),window.removeEventListener("resize",te)}},[F]);const[H,Z]=ON(te=>{const ve=U().filter(Ee=>!Ee.disabled),ke=ve.find(Ee=>Ee.ref.current===document.activeElement),ge=RN(ve,te,ke);ge&&setTimeout(()=>ge.ref.current.focus())}),ee=x.useCallback((te,ve,ke)=>{const ge=!se.current&&!ke;(_.value!==void 0&&_.value===ve||ge)&&(I(te),ge&&(se.current=!0))},[_.value]),ue=x.useCallback(()=>N==null?void 0:N.focus(),[N]),V=x.useCallback((te,ve,ke)=>{const ge=!se.current&&!ke;(_.value!==void 0&&_.value===ve||ge)&&B(te)},[_.value]),z=r==="popper"?Ap:gN,W=z===Ap?{side:u,sideOffset:d,align:f,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:y,sticky:w,hideWhenDetached:b,avoidCollisions:C}:{};return a.jsx(mN,{scope:n,content:N,viewport:k,onViewportChange:T,itemRefCallback:ee,selectedItem:P,onItemLeave:ue,itemTextRefCallback:V,focusSelectedItem:le,selectedItemText:O,position:r,isPositioned:ie,searchRef:H,children:a.jsx(fv,{as:Ps,allowPinchZoom:!0,children:a.jsx(hv,{asChild:!0,trapped:_.open,onMountAutoFocus:te=>{te.preventDefault()},onUnmountAutoFocus:de(i,te=>{var ve;(ve=_.trigger)==null||ve.focus({preventScroll:!0}),te.preventDefault()}),children:a.jsx(wc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:te=>te.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:a.jsx(z,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:te=>te.preventDefault(),...j,...W,onPlaced:()=>G(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:de(j.onKeyDown,te=>{const ve=te.ctrlKey||te.altKey||te.metaKey;if(te.key==="Tab"&&te.preventDefault(),!ve&&te.key.length===1&&Z(te.key),["ArrowUp","ArrowDown","Home","End"].includes(te.key)){let ge=U().filter(Ee=>!Ee.disabled).map(Ee=>Ee.ref.current);if(["ArrowUp","End"].includes(te.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(te.key)){const Ee=te.target,Ne=ge.indexOf(Ee);ge=ge.slice(Ne+1)}setTimeout(()=>Y(ge)),te.preventDefault()}})})})})})})});pN.displayName=V4;var W4="SelectItemAlignedPosition",gN=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Ki(Ls,n),l=Zi(Ls,n),[u,d]=x.useState(null),[f,p]=x.useState(null),m=ze(t,R=>p(R)),g=gh(n),y=x.useRef(!1),w=x.useRef(!0),{viewport:b,selectedItem:C,selectedItemText:j,focusSelectedItem:_}=l,N=x.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&f&&b&&C&&j){const R=o.trigger.getBoundingClientRect(),P=f.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),O=j.getBoundingClientRect();if(o.dir!=="rtl"){const Ee=O.left-P.left,Ne=I.left-Ee,Ge=R.left-Ne,tt=R.width+Ge,pt=Math.max(tt,P.width),nt=window.innerWidth-Vn,Fn=Pp(Ne,[Vn,Math.max(Vn,nt-pt)]);u.style.minWidth=tt+"px",u.style.left=Fn+"px"}else{const Ee=P.right-O.right,Ne=window.innerWidth-I.right-Ee,Ge=window.innerWidth-R.right-Ne,tt=R.width+Ge,pt=Math.max(tt,P.width),nt=window.innerWidth-Vn,Fn=Pp(Ne,[Vn,Math.max(Vn,nt-pt)]);u.style.minWidth=tt+"px",u.style.right=Fn+"px"}const B=g(),U=window.innerHeight-Vn*2,ie=b.scrollHeight,G=window.getComputedStyle(f),se=parseInt(G.borderTopWidth,10),Y=parseInt(G.paddingTop,10),le=parseInt(G.borderBottomWidth,10),F=parseInt(G.paddingBottom,10),K=se+Y+ie+F+le,H=Math.min(C.offsetHeight*5,K),Z=window.getComputedStyle(b),ee=parseInt(Z.paddingTop,10),ue=parseInt(Z.paddingBottom,10),V=R.top+R.height/2-Vn,z=U-V,W=C.offsetHeight/2,te=C.offsetTop+W,ve=se+Y+te,ke=K-ve;if(ve<=V){const Ee=B.length>0&&C===B[B.length-1].ref.current;u.style.bottom="0px";const Ne=f.clientHeight-b.offsetTop-b.offsetHeight,Ge=Math.max(z,W+(Ee?ue:0)+Ne+le),tt=ve+Ge;u.style.height=tt+"px"}else{const Ee=B.length>0&&C===B[0].ref.current;u.style.top="0px";const Ge=Math.max(V,se+b.offsetTop+(Ee?ee:0)+W)+ke;u.style.height=Ge+"px",b.scrollTop=ve-V+b.offsetTop}u.style.margin=`${Vn}px 0`,u.style.minHeight=H+"px",u.style.maxHeight=U+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[g,o.trigger,o.valueNode,u,f,b,C,j,o.dir,r]);Pt(()=>N(),[N]);const[A,k]=x.useState();Pt(()=>{f&&k(window.getComputedStyle(f).zIndex)},[f]);const T=x.useCallback(R=>{R&&w.current===!0&&(N(),_==null||_(),w.current=!1)},[N,_]);return a.jsx(G4,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:a.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:a.jsx(je.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});gN.displayName=W4;var H4="SelectPopperPosition",Ap=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Vn,...o}=e,l=vh(n);return a.jsx(X1,{...l,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ap.displayName=H4;var[G4,kv]=Da(Ls,{}),Op="SelectViewport",vN=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Zi(Op,n),l=kv(Op,n),u=ze(t,o.onViewportChange),d=x.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),a.jsx(ph.Slot,{scope:n,children:a.jsx(je.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:de(i.onScroll,f=>{const p=f.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&m){const y=Math.abs(d.current-p.scrollTop);if(y>0){const w=window.innerHeight-Vn*2,b=parseFloat(m.style.minHeight),C=parseFloat(m.style.height),j=Math.max(b,C);if(j<w){const _=j+y,N=Math.min(w,_),A=_-N;m.style.height=N+"px",m.style.bottom==="0px"&&(p.scrollTop=A>0?A:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});vN.displayName=Op;var yN="SelectGroup",[K4,Z4]=Da(yN),Q4=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=qr();return a.jsx(K4,{scope:n,id:i,children:a.jsx(je.div,{role:"group","aria-labelledby":i,...r,ref:t})})});Q4.displayName=yN;var xN="SelectLabel",bN=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Z4(xN,n);return a.jsx(je.div,{id:i.id,...r,ref:t})});bN.displayName=xN;var Ld="SelectItem",[Y4,wN]=Da(Ld),_N=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,u=Ki(Ld,n),d=Zi(Ld,n),f=u.value===r,[p,m]=x.useState(o??""),[g,y]=x.useState(!1),w=ze(t,_=>{var N;return(N=d.itemRefCallback)==null?void 0:N.call(d,_,r,i)}),b=qr(),C=x.useRef("touch"),j=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(Y4,{scope:n,value:r,disabled:i,textId:b,isSelected:f,onItemTextChange:x.useCallback(_=>{m(N=>N||((_==null?void 0:_.textContent)??"").trim())},[]),children:a.jsx(ph.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:a.jsx(je.div,{role:"option","aria-labelledby":b,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:w,onFocus:de(l.onFocus,()=>y(!0)),onBlur:de(l.onBlur,()=>y(!1)),onClick:de(l.onClick,()=>{C.current!=="mouse"&&j()}),onPointerUp:de(l.onPointerUp,()=>{C.current==="mouse"&&j()}),onPointerDown:de(l.onPointerDown,_=>{C.current=_.pointerType}),onPointerMove:de(l.onPointerMove,_=>{var N;C.current=_.pointerType,i?(N=d.onItemLeave)==null||N.call(d):C.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:de(l.onPointerLeave,_=>{var N;_.currentTarget===document.activeElement&&((N=d.onItemLeave)==null||N.call(d))}),onKeyDown:de(l.onKeyDown,_=>{var A;((A=d.searchRef)==null?void 0:A.current)!==""&&_.key===" "||(M4.includes(_.key)&&j(),_.key===" "&&_.preventDefault())})})})})});_N.displayName=Ld;var yl="SelectItemText",SN=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=Ki(yl,n),u=Zi(yl,n),d=wN(yl,n),f=$4(yl,n),[p,m]=x.useState(null),g=ze(t,j=>m(j),d.onItemTextChange,j=>{var _;return(_=u.itemTextRefCallback)==null?void 0:_.call(u,j,d.value,d.disabled)}),y=p==null?void 0:p.textContent,w=x.useMemo(()=>a.jsx("option",{value:d.value,disabled:d.disabled,children:y},d.value),[d.disabled,d.value,y]),{onNativeOptionAdd:b,onNativeOptionRemove:C}=f;return Pt(()=>(b(w),()=>C(w)),[b,C,w]),a.jsxs(a.Fragment,{children:[a.jsx(je.span,{id:d.textId,...o,ref:g}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Bs.createPortal(o.children,l.valueNode):null]})});SN.displayName=yl;var jN="SelectItemIndicator",NN=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return wN(jN,n).isSelected?a.jsx(je.span,{"aria-hidden":!0,...r,ref:t}):null});NN.displayName=jN;var Rp="SelectScrollUpButton",CN=x.forwardRef((e,t)=>{const n=Zi(Rp,e.__scopeSelect),r=kv(Rp,e.__scopeSelect),[i,o]=x.useState(!1),l=ze(t,r.onScrollButtonChange);return Pt(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;o(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?a.jsx(TN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});CN.displayName=Rp;var Ip="SelectScrollDownButton",EN=x.forwardRef((e,t)=>{const n=Zi(Ip,e.__scopeSelect),r=kv(Ip,e.__scopeSelect),[i,o]=x.useState(!1),l=ze(t,r.onScrollButtonChange);return Pt(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<f;o(p)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?a.jsx(TN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});EN.displayName=Ip;var TN=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Zi("SelectScrollButton",n),l=x.useRef(null),u=gh(n),d=x.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return x.useEffect(()=>()=>d(),[d]),Pt(()=>{var p;const f=u().find(m=>m.ref.current===document.activeElement);(p=f==null?void 0:f.ref.current)==null||p.scrollIntoView({block:"nearest"})},[u]),a.jsx(je.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:de(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:de(i.onPointerMove,()=>{var f;(f=o.onItemLeave)==null||f.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:de(i.onPointerLeave,()=>{d()})})}),J4="SelectSeparator",kN=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(je.div,{"aria-hidden":!0,...r,ref:t})});kN.displayName=J4;var Lp="SelectArrow",X4=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=vh(n),o=Ki(Lp,n),l=Zi(Lp,n);return o.open&&l.position==="popper"?a.jsx(eS,{...i,...r,ref:t}):null});X4.displayName=Lp;function PN(e){return e===""||e===void 0}var AN=x.forwardRef((e,t)=>{const{value:n,...r}=e,i=x.useRef(null),o=ze(t,i),l=Xj(n);return x.useEffect(()=>{const u=i.current,d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==n&&p){const m=new Event("change",{bubbles:!0});p.call(u,n),u.dispatchEvent(m)}},[l,n]),a.jsx(_c,{asChild:!0,children:a.jsx("select",{...r,ref:o,defaultValue:n})})});AN.displayName="BubbleSelect";function ON(e){const t=mt(e),n=x.useRef(""),r=x.useRef(0),i=x.useCallback(l=>{const u=n.current+l;t(u),function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(u)},[t]),o=x.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function RN(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=e3(e,Math.max(o,0));i.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function e3(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var t3=oN,IN=lN,n3=uN,r3=dN,i3=hN,LN=fN,s3=vN,zN=bN,MN=_N,o3=SN,a3=NN,DN=CN,FN=EN,BN=kN;const lc=t3,cc=n3,pa=x.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(IN,{ref:r,className:Ce("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
1005ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,a.jsx(r3,{asChild:!0,children:a.jsx(Kr,{className:"h-4 w-4 opacity-50"})})]}));pa.displayName=IN.displayName;const $N=x.forwardRef(({className:e,...t},n)=>a.jsx(DN,{ref:n,className:Ce("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(g2,{className:"h-4 w-4"})}));$N.displayName=DN.displayName;const qN=x.forwardRef(({className:e,...t},n)=>a.jsx(FN,{ref:n,className:Ce("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Kr,{className:"h-4 w-4"})}));qN.displayName=FN.displayName;const ga=x.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>a.jsx(i3,{children:a.jsxs(LN,{ref:i,className:Ce("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[a.jsx($N,{}),a.jsx(s3,{className:Ce("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(qN,{})]})}));ga.displayName=LN.displayName;const l3=x.forwardRef(({className:e,...t},n)=>a.jsx(zN,{ref:n,className:Ce("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));l3.displayName=zN.displayName;const va=x.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(MN,{ref:r,className:Ce("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(a3,{children:a.jsx(li,{className:"h-4 w-4"})})}),a.jsx(o3,{children:t})]}));va.displayName=MN.displayName;const c3=x.forwardRef(({className:e,...t},n)=>a.jsx(BN,{ref:n,className:Ce("-mx-1 my-1 h-px bg-muted",e),...t}));c3.displayName=BN.displayName;var Pv="Collapsible",[u3,lF]=Jr(Pv),[d3,Av]=u3(Pv),UN=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:l,...u}=e,[d=!1,f]=Bi({prop:r,defaultProp:i,onChange:l});return a.jsx(d3,{scope:n,disabled:o,contentId:qr(),open:d,onOpenToggle:x.useCallback(()=>f(p=>!p),[f]),children:a.jsx(je.div,{"data-state":Rv(d),"data-disabled":o?"":void 0,...u,ref:t})})});UN.displayName=Pv;var VN="CollapsibleTrigger",WN=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Av(VN,n);return a.jsx(je.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Rv(i.open
vendor: 4,594 bytes, line 1005
1005),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:de(e.onClick,i.onOpenToggle)})});WN.displayName=VN;var Ov="CollapsibleContent",HN=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Av(Ov,e.__scopeCollapsible);return a.jsx(Mn,{present:n||i.open,children:({present:o})=>a.jsx(h3,{...r,ref:t,present:o})})});HN.displayName=Ov;var h3=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,l=Av(Ov,n),[u,d]=x.useState(r),f=x.useRef(null),p=ze(t,f),m=x.useRef(0),g=m.current,y=x.useRef(0),w=y.current,b=l.open||u,C=x.useRef(b),j=x.useRef();return x.useEffect(()=>{const _=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(_)},[]),Pt(()=>{const _=f.current;if(_){j.current=j.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const N=_.getBoundingClientRect();m.current=N.height,y.current=N.width,C.current||(_.style.transitionDuration=j.current.transitionDuration,_.style.animationName=j.current.animationName),d(r)}},[l.open,r]),a.jsx(je.div,{"data-state":Rv(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!b,...o,ref:p,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:b&&i})});function Rv(e){return e?"open":"closed"}var f3=UN;const ya=f3,xa=WN,ba=HN;function m3(e,t=[]){let n=[];function r(o,l){const u=x.createContext(l),d=n.length;n=[...n,l];function f(m){const{scope:g,children:y,...w}=m,b=(g==null?void 0:g[e][d])||u,C=x.useMemo(()=>w,Object.values(w));return a.jsx(b.Provider,{value:C,children:y})}function p(m,g){const y=(g==null?void 0:g[e][d])||u,w=x.useContext(y);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return f.displayName=o+"Provider",[f,p]}const i=()=>{const o=n.map(l=>x.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[r,p3(i,...t)]}function p3(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const m=d(o)[`__scope${f}`];return{...u,...m}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Zf="rovingFocusGroup.onEntryFocus",g3={bubbles:!1,cancelable:!0},yh="RovingFocusGroup",[zp,GN,v3]=Rg(yh),[y3,KN]=m3(yh,[v3]),[x3,b3]=y3(yh),ZN=x.forwardRef((e,t)=>a.jsx(zp.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(zp.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(w3,{...e,ref:t})})}));ZN.displayName=yh;var w3=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...m}=e,g=x.useRef(null),y=ze(t,g),w=hh(o),[b=null,C]=Bi({prop:l,defaultProp:u,onChange:d}),[j,_]=x.useState(!1),N=mt(f),A=GN(n),k=x.useRef(!1),[T,R]=x.useState(0);return x.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(Zf,N),()=>P.removeEventListener(Zf,N)},[N]),a.jsx(x3,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:b,onItemFocus:x.useCallback(P=>C(P),[C]),onItemShiftTab:x.useCallback(()=>_(!0),[]),onFocusableItemAdd:x.useCallback(()=>R(P=>P+1),[]),onFocusableItemRemove:x.useCallback(()=>R(P=>P-1),[]),children:a.jsx(je.div,{tabIndex:j||T===0?-1:0,"data-orientation":r,...m,ref:y,style:{outline:"none",...e.style},onMouseDown:de(e.onMouseDown,()=>{k.current=!0}),onFocus:de(e.onFocus,P=>{const I=!k.current;if(P.target===P.currentTarget&&I&&!j){const O=new CustomEvent(Zf,g3);if(P.currentTarget.dispatchEvent(O),!O.defaultPrevented){const B=A().filter(Y=>Y.focusable),U=B.find(Y=>Y.active),ie=B.find(Y=>Y.id===b),se=[U,ie,...B].filter(Boolean).map(Y=>Y.ref.current);JN(se,p)}}k.current=!1}),onBlur:de(e.onBlur,()=>_(!1))})})}),QN="RovingFocusGroupItem",YN=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...l}=e,u=qr(),d=o||u,f=b3(QN,n),p=f.currentTabStopId===d,m=GN(n),{onFocusableItemAdd:g,onFocusableItemRemove:y}=f;return x.useEffect(()=>{if(r)return g(),()=>y()},[r,g,y]),a.jsx(zp.ItemSlot,{scope:n,id:d,focusable:r,active:i,children:a.jsx(je.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:de(e.onMouseDown,w=>{r?f.onItemFocus(d):w.preventDefault()}),onFocus:de(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:de(e.onKeyDown,w=>
vendor: 4,169 bytes, line 1005
1005{if(w.key==="Tab"&&w.shiftKey){f.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const b=j3(w,f.orientation,f.dir);if(b!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let j=m().filter(_=>_.focusable).map(_=>_.ref.current);if(b==="last")j.reverse();else if(b==="prev"||b==="next"){b==="prev"&&j.reverse();const _=j.indexOf(w.currentTarget);j=f.loop?N3(j,_+1):j.slice(_+1)}setTimeout(()=>JN(j))}})})})});YN.displayName=QN;var _3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function S3(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function j3(e,t,n){const r=S3(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return _3[r]}function JN(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function N3(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var C3=ZN,E3=YN,Iv="Tabs",[T3,cF]=Jr(Iv,[KN]),XN=KN(),[k3,Lv]=T3(Iv),eC=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:u,activationMode:d="automatic",...f}=e,p=hh(u),[m,g]=Bi({prop:r,onChange:i,defaultProp:o});return a.jsx(k3,{scope:n,baseId:qr(),value:m,onValueChange:g,orientation:l,dir:p,activationMode:d,children:a.jsx(je.div,{dir:p,"data-orientation":l,...f,ref:t})})});eC.displayName=Iv;var tC="TabsList",nC=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=Lv(tC,n),l=XN(n);return a.jsx(C3,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:a.jsx(je.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});nC.displayName=tC;var rC="TabsTrigger",iC=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=Lv(rC,n),u=XN(n),d=aC(l.baseId,r),f=lC(l.baseId,r),p=r===l.value;return a.jsx(E3,{asChild:!0,...u,focusable:!i,active:p,children:a.jsx(je.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:d,...o,ref:t,onMouseDown:de(e.onMouseDown,m=>{!i&&m.button===0&&m.ctrlKey===!1?l.onValueChange(r):m.preventDefault()}),onKeyDown:de(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(r)}),onFocus:de(e.onFocus,()=>{const m=l.activationMode!=="manual";!p&&!i&&m&&l.onValueChange(r)})})})});iC.displayName=rC;var sC="TabsContent",oC=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,u=Lv(sC,n),d=aC(u.baseId,r),f=lC(u.baseId,r),p=r===u.value,m=x.useRef(p);return x.useEffect(()=>{const g=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(g)},[]),a.jsx(Mn,{present:i||p,children:({present:g})=>a.jsx(je.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":d,hidden:!g,id:f,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:g&&o})})});oC.displayName=sC;function aC(e,t){return`${e}-trigger-${t}`}function lC(e,t){return`${e}-content-${t}`}var P3=eC,cC=nC,uC=iC,dC=oC;const zv=P3,xh=x.forwardRef(({className:e,...t},n)=>a.jsx(cC,{ref:n,className:Ce("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));xh.displayName=cC.displayName;const zs=x.forwardRef(({className:e,...t},n)=>a.jsx(uC,{ref:n,className:Ce("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));zs.displayName=uC.displayName;const Ms=x.forwardRef(({className:e,...t},n)=>a.jsx(dC,{ref:n,className:Ce("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ms.displayName=dC.displayName;
1005const Mv=({value:e,onChange:t,label:n="Immagine",folder:r="images",accept:i="image/*"})=>{const[o,l]=x.useState(!1),[u,d]=x.useState(!1),f=x.useRef(null),p=async C=>{if(C){if(!C.type.startsWith("image/")&&!C.type.includes("pdf")){re.error("Tipo di file non supportato. Usa immagini o PDF.");return}if(C.size>10*1024*1024){re.error("File troppo grande. Massimo 10MB.");return}l(!0);try{const j=C.name.split(".").pop(),_=`${r}/${Date.now()}-${Math.random().toString(36).substring(7)}.${j}`,{data:N,error:A}=await me.storage.from("media").upload(_,C,{cacheControl:"3600",upsert:!1});if(A)throw A;const{data:k}=me.storage.from("media").getPublicUrl(N.path);t(k.publicUrl),re.success("File caricato con successo!")}catch(j){console.error("Upload error:",j),re.error("Errore durante il caricamento: "+j.message)}finally{l(!1)}}},m=C=>{var _;const j=(_=C.target.files)==null?void 0:_[0];j&&p(j)},g=C=>{var _;C.preventDefault(),d(!1);const j=(_=C.dataTransfer.files)==null?void 0:_[0];j&&p(j)},y=C=>{C.preventDefault(),d(!0)},w=()=>{d(!1)},b=()=>{t(""),f.current&&(f.current.value="")};return a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:n}),a.jsxs(zv,{defaultValue:"upload",className:"w-full",children:[a.jsxs(xh,{className:"grid w-full grid-cols-2 h-9",children:[a.jsxs(zs,{value:"upload",className:"text-xs gap-1",children:[a.jsx(b1,{className:"w-3 h-3"}),"Carica"]}),a.jsxs(zs,{value:"url",className:"text-xs gap-1",children:[a.jsx(v1,{className:"w-3 h-3"}),"URL"]})]}),a.jsxs(Ms,{value:"upload",className:"mt-2",children:[e?a.jsxs("div",{className:"relative rounded-lg overflow-hidden border border-border bg-muted",children:[a.jsx("img",{src:e,alt:"Preview",className:"w-full h-40 object-cover",onError:C=>{C.target.src="/placeholder.svg"}}),a.jsx(xe,{type:"button",variant:"destructive",size:"icon",className:"absolute top-2 right-2 w-8 h-8",onClick:b,children:a.jsx($s,{className:"w-4 h-4"})})]}):a.jsx("div",{className:`
1006                border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition-colors
1007                ${u?"border-primary bg-primary/5":"border-border hover:border-primary/50"}
1008                ${o?"pointer-events-none opacity-50":""}
1009              `,onClick:()=>{var C;return(C=f.current)==null?void 0:C.click()},onDrop:g,onDragOver:y,onDragLeave:w,children:o?a.jsxs("div",{className:"flex flex-col items-center gap-2",children:[a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"Caricamento..."})]}):a.jsxs("div",{className:"flex flex-col items-center gap-2",children:[a.jsx(qg,{className:"w-8 h-8 text-muted-foreground"}),a.jsxs("div",{className:"text-sm text-muted-foreground",children:[a.jsx("span",{className:"text-primary font-medium",children:"Clicca"})," o trascina un file"]}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"PNG, JPG, GIF fino a 10MB"})]})}),a.jsx("input",{ref:f,type:"file",accept:i,onChange:m,className:"hidden"})]}),a.jsx(Ms,{value:"url",className:"mt-2",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx(Se,{value:e,onChange:C=>t(C.target.value),placeholder:"https://esempio.com/immagine.jpg"}),e&&a.jsx("div",{className:"relative rounded-lg overflow-hidden border border-border bg-muted",children:a.jsx("img",{src:e,alt:"Preview",className:"w-full h-32 object-cover",onError:C=>{C.target.src="/placeholder.svg"}})})]})})]})]})},zd=({value:e,onChange:t,label:n="File",folder:r="documents",accept:i=".pdf",maxSizeMB:o=20})=>{const[l,u]=x.useState(!1),[d,f]=x.useState(!1),p=x.useRef(null),m=async _=>{if(_){if(_.size>o*1024*1024){re.error(`File troppo grande. Massimo ${o}MB.`);return}u(!0);try{const N=_.name.split(".").pop(),A=`${r}/${Date.now()}-${Math.random().toString(36).substring(7)}.${N}`,{data:k,error:T}=await me.storage.from("media").upload(A,_,{cacheControl:"3600",upsert:!1});if(T)throw T;const{data:R}=me.storage.from("media").getPublicUrl(k.path);t(R.publicUrl),re.success("File caricato con successo!")}catch(N){console.error("Upload error:",N),re.error("Errore durante il caricamento: "+N.message)}finally{u(!1)}}},g=_=>{var A;const N=(A=_.target.files)==null?void 0:A[0];N&&m(N)},y=_=>{var A;_.preventDefault(),f(!1);const N=(A=_.dataTransfer.files)==null?void 0:A[0];N&&m(N)},w=_=>{_.preventDefault(),f(!0)},b=()=>{f(!1)},C=()=>{t(""),p.current&&(p.current.value="")},j=_=>{try{const N=_.split("/");return N[N.length-1]}catch{return"file"}};return a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:n}),a.jsxs(zv,{defaultValue:"upload",className:"w-full",children:[a.jsxs(xh,{className:"grid w-full grid-cols-2 h-9",children:[a.jsxs(zs,{value:"upload",className:"text-xs gap-1",children:[a.jsx(b1,{className:"w-3 h-3"}),"Carica"]}),a.jsxs(zs,{value:"url",className:"text-xs gap-1",children:[a.jsx(v1,{className:"w-3 h-3"}),"URL"]})]}),a.jsxs(Ms,{value:"upload",className:"mt-2",children:[e?a.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg border border-border bg-muted/50",children:[a.jsx(Sr,{className:"w-8 h-8 text-primary flex-shrink-0"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium truncate",children:j(e)}),a.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline flex items-center gap-1",children:["Apri file ",a.jsx(gd,{className:"w-3 h-3"})]})]}),a.jsx(xe,{type:"button",variant:"ghost",size:"icon",className:"w-8 h-8 text-muted-foreground hover:text-destructive",onClick:C,children:a.jsx($s,{className:"w-4 h-4"})})]}):a.jsx("div",{className:`
1010                border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition-colors
1011                ${d?"border-primary bg-primary/5":"border-border hover:border-primary/50"}
1012                ${l?"pointer-events-none opacity-50":""}
1013              `,onClick:()=>{var _;return(_=p.current)==null?void 0:_.click()},onDrop:y,onDragOver:w,onDragLeave:b,children:l?a.jsxs("div",{className:"flex flex-col items-center gap-2",children:[a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"Caricamento..."})]}):a.jsxs("div",{className:"flex flex-col items-center gap-2",children:[a.jsx(Sr,{className:"w-8 h-8 text-muted-foreground"}),a.jsxs("div",{className:"text-sm text-muted-foreground",children:[a.jsx("span",{className:"text-primary font-medium",children:"Clicca"})," o trascina un file"]}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["PDF fino a ",o,"MB"]})]})}),a.jsx("input",{ref:p,type:"file",accept:i,onChange:g,className:"hidden"})]}),a.jsxs(Ms,{value:"url",className:"mt-2",children:[a.jsx(Se,{value:e,onCh
1013ange:_=>t(_.target.value),placeholder:"https://esempio.com/documento.pdf"}),e&&a.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary hover:underline flex items-center gap-1 mt-2",children:["Apri file ",a.jsx(gd,{className:"w-3 h-3"})]})]})]})]})};var hC="AlertDialog",[A3,uF]=Jr(hC,[fj]),ei=fj(),fC=e=>{const{__scopeAlertDialog:t,...n}=e,r=ei(t);return a.jsx(kj,{...r,...n,modal:!0})};fC.displayName=hC;var O3="AlertDialogTrigger",R3=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ei(n);return a.jsx(Pj,{...i,...r,ref:t})});R3.displayName=O3;var I3="AlertDialogPortal",mC=e=>{const{__scopeAlertDialog:t,...n}=e,r=ei(t);return a.jsx(Aj,{...r,...n})};mC.displayName=I3;var L3="AlertDialogOverlay",pC=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ei(n);return a.jsx(yv,{...i,...r,ref:t})});pC.displayName=L3;var $o="AlertDialogContent",[z3,M3]=A3($o),gC=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=ei(n),l=x.useRef(null),u=ze(t,l),d=x.useRef(null);return a.jsx(zD,{contentName:$o,titleName:vC,docsSlug:"alert-dialog",children:a.jsx(z3,{scope:n,cancelRef:d,children:a.jsxs(xv,{role:"alertdialog",...o,...i,ref:u,onOpenAutoFocus:de(i.onOpenAutoFocus,f=>{var p;f.preventDefault(),(p=d.current)==null||p.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[a.jsx(Og,{children:r}),a.jsx(F3,{contentRef:l})]})})})});gC.displayName=$o;var vC="AlertDialogTitle",yC=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ei(n);return a.jsx(bv,{...i,...r,ref:t})});yC.displayName=vC;var xC="AlertDialogDescription",bC=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ei(n);return a.jsx(wv,{...i,...r,ref:t})});bC.displayName=xC;var D3="AlertDialogAction",wC=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ei(n);return a.jsx(_v,{...i,...r,ref:t})});wC.displayName=D3;var _C="AlertDialogCancel",SC=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=M3(_C,n),o=ei(n),l=ze(t,i);return a.jsx(_v,{...o,...r,ref:l})});SC.displayName=_C;var F3=({contentRef:e})=>{const t=`\`${$o}\` requires a description for the component to be accessible for screen reader users.
1014
1015You can add a description to the \`${$o}\` by passing a \`${xC}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
1016
1017Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${$o}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
1018
1019For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return x.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},B3=fC,$3=mC,jC=pC,NC=gC,CC=wC,EC=SC,TC=yC,kC=bC;const uc=B3,q3=$3,PC=x.forwardRef(({className:e,...t},n)=>a.jsx(jC,{className:Ce("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));PC.displayName=jC.displayName;const wa=x.forwardRef(({className:e,...t},n)=>a.jsxs(q3,{children:[a.jsx(PC,{}),a.jsx(NC,{ref:n,className:Ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));wa.displayName=NC.displayName;const _a=({className:e,...t})=>a.jsx("div",{className:Ce("flex flex-col space-y-2 text-center sm:text-left",e),...t});_a.displayName="AlertDialogHeader";const Sa=({className:e,...t})=>a.jsx("div",{className:Ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Sa.displayName="AlertDialogFooter";const ja=x.forwardRef(({className:e,...t},n)=>a.jsx(TC,{ref:n,className:Ce("text-lg font-semibold",e),...t}));ja.displayName=TC.displayName;const Na=x.forwardRef(({className:e,...t},n)=>a.jsx(kC,{ref:n,className:Ce("text-sm text-muted-foreground",e),...t}));
1019Na.displayName=kC.displayName;const Ca=x.forwardRef(({className:e,...t},n)=>a.jsx(CC,{ref:n,className:Ce(Ev(),e),...t}));Ca.displayName=CC.displayName;const Ea=x.forwardRef(({className:e,...t},n)=>a.jsx(EC,{ref:n,className:Ce(Ev({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ea.displayName=EC.displayName;const dw=[{id:"events",name:"Eventi"},{id:"projects",name:"Progetti"},{id:"stories",name:"Storie"},{id:"updates",name:"Aggiornamenti"}],U3=()=>{const e=qs(),[t,n]=x.useState(!1),[r,i]=x.useState(null),[o,l]=x.useState(null),[u,d]=x.useState(!1),[f,p]=x.useState(!1),[m,g]=x.useState(!1),[y,w]=x.useState({title:"",excerpt:"",content:"",date:new Date().toISOString().split("T")[0],category:"updates",author:"",read_time:"",image_url:"",featured:!1,tags:"",external_url:"",attachment_url:"",title_en:"",title_es:"",title_pt:"",excerpt_en:"",excerpt_es:"",excerpt_pt:"",content_en:"",content_es:"",content_pt:""}),{data:b=[],isLoading:C}=qt({queryKey:["admin-news"],queryFn:async()=>{const{data:O,error:B}=await me.from("news").select("*").order("date",{ascending:!1});if(B)throw B;return O}}),j=Tt({mutationFn:async O=>{const{error:B}=await me.from("news").insert([O]);if(B)throw B},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-news"]}),e.invalidateQueries({queryKey:["news-count"]}),re.success("News creata con successo!"),T()},onError:O=>{re.error("Errore: "+O.message)}}),_=Tt({mutationFn:async({id:O,data:B})=>{const{error:U}=await me.from("news").update(B).eq("id",O);if(U)throw U},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-news"]}),re.success("News aggiornata con successo!"),T()},onError:O=>{re.error("Errore: "+O.message)}}),N=Tt({mutationFn:async O=>{const{error:B}=await me.from("news").delete().eq("id",O);if(B)throw B},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-news"]}),e.invalidateQueries({queryKey:["news-count"]}),re.success("News eliminata con successo!"),i(null)},onError:O=>{re.error("Errore: "+O.message)}}),A=async()=>{if(!y.title&&!y.excerpt&&!y.content){re.error("Inserisci almeno un campo in italiano da tradurre");return}d(!0);try{const O=[];y.title&&O.push({field:"title",value:y.title}),y.excerpt&&O.push({field:"excerpt",value:y.excerpt}),y.content&&O.push({field:"content",value:y.content});const{data:B,error:U}=await me.functions.invoke("translate",{body:{texts:O,targetLanguages:["en","es","pt"]}});if(U)throw U;const ie=B.translations;w(G=>{var se,Y,le,F,K,H,Z,ee,ue;return{...G,title_en:((se=ie.en)==null?void 0:se.title)||G.title_en,title_es:((Y=ie.es)==null?void 0:Y.title)||G.title_es,title_pt:((le=ie.pt)==null?void 0:le.title)||G.title_pt,excerpt_en:((F=ie.en)==null?void 0:F.excerpt)||G.excerpt_en,excerpt_es:((K=ie.es)==null?void 0:K.excerpt)||G.excerpt_es,excerpt_pt:((H=ie.pt)==null?void 0:H.excerpt)||G.excerpt_pt,content_en:((Z=ie.en)==null?void 0:Z.content)||G.content_en,content_es:((ee=ie.es)==null?void 0:ee.content)||G.content_es,content_pt:((ue=ie.pt)==null?void 0:ue.content)||G.content_pt}}),p(!0),re.success("Traduzioni generate con successo!")}catch(O){console.error("Translation error:",O),re.error("Errore durante la traduzione")}finally{d(!1)}},k=O=>{var B;O?(l(O),w({title:O.title,excerpt:O.excerpt||"",content:O.content||"",date:O.date,category:O.category,author:O.author||"",read_time:O.read_time||"",image_url:O.image_url||"",featured:O.featured||!1,tags:((B=O.tags)==null?void 0:B.join(", "))||"",external_url:O.external_url||"",attachment_url:O.attachment_url||"",title_en:O.title_en||"",title_es:O.title_es||"",title_pt:O.title_pt||"",excerpt_en:O.excerpt_en||"",excerpt_es:O.excerpt_es||"",excerpt_pt:O.excerpt_pt||"",content_en:O.content_en||"",content_es:O.content_es||"",content_pt:O.content_pt||""}),p(!!(O.title_en||O.title_es||O.title_pt))):(l(null),w({title:"",excerpt:"",content:"",date:new Date().toISOString().split("T")[0],category:"updates",author:"",read_time:"",image_url:"",featured:!1,tags:"",external_url:"",attachment_url:"",title_en:"",title_es:"",title_pt:"",excerpt_en:"",excerpt_es:"",excerpt_pt:"",content_en:"",content_es:"",content_pt:""}),p(!1)),n(!0)},T=()=>{n(!1),l(null),p(!1)},R=O=>{O.preventDefault();const B={title:y.title,excerpt:y.excerpt||null,content:y.content||null,date:y.date,category:y.category,author:y.author||null,read_time:y.read_time||null,image_url:y.image_url||null,featured:y.featured,tags:y.tags?y.tags.split(",").map(U=>
1019U.trim()).filter(Boolean):null,external_url:y.external_url||null,attachment_url:y.attachment_url||null,title_en:y.title_en||null,title_es:y.title_es||null,title_pt:y.title_pt||null,excerpt_en:y.excerpt_en||null,excerpt_es:y.excerpt_es||null,excerpt_pt:y.excerpt_pt||null,content_en:y.content_en||null,content_es:y.content_es||null,content_pt:y.content_pt||null};o?_.mutate({id:o.id,data:B}):j.mutate(B)},P=O=>!!(O.title_en||O.title_es||O.title_pt),I=async()=>{if(!y.title){re.error("Inserisci almeno il titolo per generare un'immagine");return}g(!0);try{const{data:O,error:B}=await me.functions.invoke("generate-news-image",{body:{title:y.title,excerpt:y.excerpt,category:y.category,newsId:(o==null?void 0:o.id)||"new"}});if(B)throw B;if(O.imageUrl)w(U=>({...U,image_url:O.imageUrl})),re.success("Immagine generata con successo!");else throw new Error(O.error||"Nessuna immagine generata")}catch(O){console.error("Image generation error:",O);const B=(O==null?void 0:O.message)||(O==null?void 0:O.error)||"Errore sconosciuto";B.includes("multiple attempts")?re.error("Generazione fallita dopo più tentativi. Riprova tra qualche secondo."):B.includes("Rate limit")?re.error("Troppe richieste. Riprova tra qualche minuto."):B.includes("credits")?re.error("Crediti AI esauriti. Contatta l'amministratore."):re.error(`Errore: ${B}`)}finally{g(!1)}};return C?a.jsx("div",{className:"flex items-center justify-center py-12",children:a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"})}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Gestione News"}),a.jsx("p",{className:"text-muted-foreground",children:"Aggiungi, modifica o elimina le news del sito."})]}),a.jsxs(xe,{onClick:()=>k(),className:"gap-2",children:[a.jsx(ua,{className:"w-4 h-4"}),"Nuova News"]})]}),b.length===0?a.jsx(Kt,{children:a.jsx(Zt,{className:"py-12 text-center",children:a.jsx("p",{className:"text-muted-foreground",children:'Nessuna news presente. Clicca "Nuova News" per iniziare.'})})}):a.jsx("div",{className:"grid gap-4",children:b.map(O=>{var B;return a.jsx(Kt,{className:"hover:shadow-md transition-shadow",children:a.jsx(Zt,{className:"p-4",children:a.jsxs("div",{className:"flex items-start gap-4",children:[O.image_url&&a.jsx("img",{src:O.image_url,alt:O.title,className:"w-24 h-24 object-cover rounded-lg flex-shrink-0"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[O.featured&&a.jsx("span",{className:"px-2 py-0.5 bg-primary text-primary-foreground text-xs rounded-full",children:"In evidenza"}),a.jsx("span",{className:"px-2 py-0.5 bg-muted text-muted-foreground text-xs rounded-full",children:((B=dw.find(U=>U.id===O.category))==null?void 0:B.name)||O.category}),P(O)&&a.jsxs("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-700 text-xs rounded-full flex items-center gap-1",children:[a.jsx(Lt,{className:"w-3 h-3"}),"Traduzioni"]})]}),a.jsx("h3",{className:"font-semibold text-foreground truncate",children:O.title}),a.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:O.excerpt}),a.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[new Date(O.date).toLocaleDateString("it-IT"),O.author&&` • ${O.author}`]})]}),a.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[a.jsx(xe,{variant:"outline",size:"icon",onClick:()=>k(O),children:a.jsx(Ql,{className:"w-4 h-4"})}),a.jsx(xe,{variant:"outline",size:"icon",className:"text-destructive hover:text-destructive",onClick:()=>i(O.id),children:a.jsx(da,{className:"w-4 h-4"})})]})]})})},O.id)})}),a.jsx(sr,{open:t,onOpenChange:n,children:a.jsxs(Ln,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[a.jsx(or,{children:a.jsx(zn,{children:o?"Modifica News":"Nuova News"})}),a.jsxs("form",{onSubmit:R,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"title",children:"Titolo *"}),a.jsx(Se,{id:"title",value:y.title,onChange:O=>w({...y,title:O.target.value}),required:!0})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"date",children:"Data *"}),a.jsx(Se,{id:"date",type:"date",value:y.date,onChange:O=>w({...y,date:O.target.value}),required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"category",children:"Categoria *"}),a.jsxs(lc,{value:y.category,onValueChange:O=>w({...y,category:O}),children:[a.jsx(pa,{children:a.jsx(cc,{})}),a.jsx(ga,{children:dw.map(O=>a.jsx(va,{value:O.id,children:O.name},O.id))})]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"excerpt",children:"Estratto"}),a.jsx(Fe,{id:"excerpt",value:y.excerpt,onChange:O=>w({...y,excerpt:O.target.value}),rows:2})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"content",children:"Contenuto"}),a.jsx(Fe,{id:"content",value:y.content,onChange:O=>w({...y,content:O.target.value}),rows:5})]}),a.jsxs(xe,{type:"button",variant:"outline",onClick:A,disabled:u,className:"w-full gap-2",children:[u?a.jsx(qe,{className:"w-4 h-4 animate-spin"}):a.jsx(Lt,{className:"w-4 h-4"}),"Traduci automaticamente"]}),a.jsxs(ya,{open:f,onOpenChange:p,children:[a.jsx(xa,{asChild:!0,children:a.jsxs(xe,{variant:"ghost",type:"button",className:"w-full justify-between",children:[a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(Lt,{className:"w-4 h-4"}),"Traduzioni"]}),a.jsx(Kr,{className:`w-4 h-4 transition-transform ${f?"rotate-180":""}`})]})}),a.jsxs(ba,{className:"space-y-4 pt-4",children:[a.jsxs("div",{className:"space-y-3 p-4 border rounded-lg",children:[a.jsx("h4",{className:"font-medium text-sm flex items-center gap-2",children:"🇬🇧 Inglese"}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"title_en",children:"Titolo EN"}),a.jsx(Se,{id:"title_en",value:y.title_en,onChange:O=>w({...y,title_en:O.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"excerpt_en",children:"Estratto EN"}),a.jsx(Fe,{id:"excerpt_en",value:y.excerpt_en,onChange:O=>w({...y,excerpt_en:O.target.value}),rows:2})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"content_en",children:"Contenuto EN"}),a.jsx(Fe,{id:"content_en",value:y.content_en,onChange:O=>w({...y,content_en:O.target.value}),rows:4})]})]}),a.jsxs("div",{className:"space-y-3 p-4 border rounded-lg",children:[a.jsx("h4",{className:"font-medium text-sm flex items-center gap-2",children:"🇪🇸 Spagnolo"}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"title_es",children:"Titolo ES"}),a.jsx(Se,{id:"title_es",value:y.title_es,onChange:O=>w({...y,title_es:O.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"excerpt_es",children:"Estratto ES"}),a.jsx(Fe,{id:"excerpt_es",value:y.excerpt_es,onChange:O=>w({...y,excerpt_es:O.target.value}),rows:2})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"content_es",children:"Contenuto ES"}),a.jsx(Fe,{id:"content_es",value:y.content_es,onChange:O=>w({...y,content_es:O.target.value}),rows:4})]})]}),a.jsxs("div",{className:"space-y-3 p-4 border rounded-lg",children:[a.jsx("h4",{className:"font-medium text-sm flex items-center gap-2",children:"🇧🇷 Portoghese"}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"title_pt",children:"Titolo PT"}),a.jsx(Se,{id:"title_pt",value:y.title_pt,onChange:O=>w({...y,title_pt:O.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"excerpt_pt",children:"Estratto PT"}),a.jsx(Fe,{id:"excerpt_pt",value:y.excerpt_pt,onChange:O=>w({...y,excerpt_pt:O.target.value}),rows:2})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"content_pt",children:"Contenuto PT"}),a.jsx(Fe,{id:"content_pt",value:y.content_pt,onChange:O=>w({...y,content_pt:O.target.value}),rows:4})]})]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"author",children:"Autore"}),a.jsx(Se,{id:"author",value:y.author,onChange:O=>w({...y,author:O.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"read_time",children:'Tempo di lettura (es: "5 min")'}),a.jsx(Se,{id:"read_time",value:y.read_time,onChange:O=>w({...y,read_time:O.target.value})})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Mv,{label:"Immagine",value:y.image_url,onChange:O=>w({...y,image_url:O}),folder:"news"}),a.jsxs(xe,{type:"button",variant:"outline",onClick:I,disabled:m||!y.title,className:"w-full gap-2",children:[m?a.jsx(qe,{className:"w-4 h-4 animate-spin"}):a.jsx(w1,{className:"w-4 h-4"}),m?"Generazione in corso...":"Genera immagine AI"]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"tags",children:"Tags (separati da virgola)"}),a.jsx(Se,{id:"tags",value:y.tags,onChange:O=>w({...y,tags:O.target.value}),placeholder:"tag1, tag2, tag3"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"external_url",children:"URL esterno (link di approfondimento)"}),a.jsx(Se,{id:"external_url",type:"url",value:y.external_url,onChange:O=>w({...y,external_url:O.target.value}),placeholder:"https://esempio.com/articolo"})]}),a.jsx(zd,{label:"File allegato (PDF)",value:y.attachment_url,onChange:O=>w({...y,attachment_url:O}),folder:"news-attachments",accept:".pdf,.doc,.docx"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(sN,{id:"featured",checked:y.featured,onCheckedChange:O=>w({...y,featured:O})}),a.jsx(X,{htmlFor:"featured",children:"In evidenza"})]}),a.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[a.jsx(xe,{type:"button",variant:"outline",onClick:T,children:"Annulla"}),a.jsxs(xe,{type:"submit",disabled:j.isPending||_.isPending,children:[(j.isPending||_.isPending)&&a.jsx(qe,{className:"w-4 h-4 mr-2 animate-spin"}),o?"Salva Modifiche":"Crea News"]})]})]})]})}),a.jsx(uc,{open:!!r,onOpenChange:()=>i(null),children:a.jsxs(wa,{children:[a.jsxs(_a,{children:[a.jsx(ja,{children:"Sei sicuro?"}),a.jsx(Na,{children:"Questa azione non può essere annullata. La news verrà eliminata permanentemente."})]}),a.jsxs(Sa,{children:[a.jsx(Ea,{children:"Annulla"}),a.jsx(Ca,{onClick:()=>r&&N.mutate(r),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:N.isPending?a.jsx(qe,{className:"w-4 h-4 animate-spin"}):"Elimina"})]})]})})]})},hw=[{id:"education",name:"Istruzione"},{id:"achievements",name:"Successi"}
1019,{id:"infrastructure",name:"Strutture"},{id:"events",name:"Eventi"},{id:"training",name:"Formazione"},{id:"moments",name:"Momenti"},{id:"missions",name:"Missioni"},{id:"travels",name:"Viaggi"}],V3=["Brasile","Filippine","Camerun","Albania","Madagascar","Perù","India","Rep. Dem. Congo","Costa d'Avorio"],W3=()=>{const e=qs(),[t,n]=x.useState(!1),[r,i]=x.useState(null),[o,l]=x.useState(null),[u,d]=x.useState(!1),[f,p]=x.useState(!1),[m,g]=x.useState(!1),[y,w]=x.useState({src_url:"",title:"",description:"",category:"moments",country:"",likes:0,title_en:"",title_es:"",title_pt:"",description_en:"",description_es:"",description_pt:""}),{data:b=[],isLoading:C}=qt({queryKey:["admin-gallery"],queryFn:async()=>{const{data:I,error:O}=await me.from("gallery_images").select("*").order("created_at",{ascending:!1});if(O)throw O;return I}}),j=Tt({mutationFn:async I=>{const{error:O}=await me.from("gallery_images").insert([I]);if(O)throw O},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-gallery"]}),e.invalidateQueries({queryKey:["gallery-count"]}),re.success("Immagine aggiunta con successo!"),k()},onError:I=>{re.error("Errore: "+I.message)}}),_=Tt({mutationFn:async({id:I,data:O})=>{const{error:B}=await me.from("gallery_images").update(O).eq("id",I);if(B)throw B},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-gallery"]}),re.success("Immagine aggiornata con successo!"),k()},onError:I=>{re.error("Errore: "+I.message)}}),N=Tt({mutationFn:async I=>{const{error:O}=await me.from("gallery_images").delete().eq("id",I);if(O)throw O},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-gallery"]}),e.invalidateQueries({queryKey:["gallery-count"]}),re.success("Immagine eliminata con successo!"),i(null)},onError:I=>{re.error("Errore: "+I.message)}}),A=I=>
1019{I?(l(I),w({src_url:I.src_url,title:I.title,description:I.description||"",category:I.category,country:I.country||"",likes:I.likes||0,title_en:I.title_en||"",title_es:I.title_es||"",title_pt:I.title_pt||"",description_en:I.description_en||"",description_es:I.description_es||"",description_pt:I.description_pt||""}),p(!!(I.title_en||I.title_es||I.title_pt))):(l(null),w({src_url:"",title:"",description:"",category:"moments",country:"",likes:0,title_en:"",title_es:"",title_pt:"",description_en:"",description_es:"",description_pt:""}),p(!1)),n(!0)},k=()=>{n(!1),l(null),p(!1)},T=async()=>{if(!y.title){re.error("Inserisci almeno il titolo in italiano per tradurre");return}d(!0);try{const I=[{field:"title",value:y.title}];y.description&&I.push({field:"description",value:y.description});const{data:O,error:B}=await me.functions.invoke("translate",{body:{texts:I,targetLanguages:["en","es","pt"]}});if(B)throw B;O!=null&&O.translations&&(w(U=>{var ie,G,se,Y,le,F;return{...U,title_en:((ie=O.translations.en)==null?void 0:ie.title)||U.title_en,title_es:((G=O.translations.es)==null?void 0:G.title)||U.title_es,title_pt:((se=O.translations.pt)==null?void 0:se.title)||U.title_pt,description_en:((Y=O.translations.en)==null?void 0:Y.description)||U.description_en,description_es:((le=O.translations.es)==null?void 0:le.description)||U.description_es,description_pt:((F=O.translations.pt)==null?void 0:F.description)||U.description_pt}}),p(!0),re.success("Traduzioni generate con successo!"))}catch(I){console.error("Translation error:",I),re.error("Errore durante la traduzione automatica")}finally{d(!1)}},R=async()=>{var I,O;if(!y.title){re.error("Inserisci almeno il titolo per generare l'immagine");return}g(!0);try{const{data:B,error:U}=await me.functions.invoke("generate-news-image",{body:{title:y.title,excerpt:y.description||"",category:y.category,newsId:(o==null?void 0:o.id)||"gallery-new"}});if(U)throw U;if(B!=null&&B.imageUrl)w(ie=>({...ie,src_url:B.imageUrl})),re.success("Immagine generata con successo!");else throw new Error("Nessuna immagine generata")}catch(B){console.error("Image generation error:",B),(I=B.message)!=null&&I.includes("Rate limit")?re.error("Limite di richieste raggiunto. Riprova più tardi."):(O=B.message)!=null&&O.includes("credits")?re.error("Crediti AI esauriti. Aggiungi crediti al workspace."):re.error("Errore durante la generazione dell'immagine")}finally{g(!1)}},P=I=>{I.preventDefault();const O={src_url:y.src_url,title:y.title,description:y.description||null,category:y.category,country:y.country||null,likes:y.likes,title_en:y.title_en||null,title_es:y.title_es||null,title_pt:y.title_pt||null,description_en:y.description_en||null,description_es:y.description_es||null,description_pt:y.description_pt||null};o?_.mutate({id:o.id,data:O}):j.mutate(O)};return C?a.jsx("div",{className:"flex items-center justify-center py-12",children:a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"})}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Gestione Galleria"}),a.jsx("p",{className:"text-muted-foreground",children:"Aggiungi, modifica o elimina le immagini della galleria."})]}),a.jsxs(xe,{onClick:()=>A(),className:"gap-2",children:[a.jsx(ua,{className:"w-4 h-4"}),"Nuova Immagine"]})]}),b.length===0?a.jsx(Kt,{children:a.jsx(Zt,{className:"py-12 text-center",children:a.jsx("p",{className:"text-muted-foreground",children:'Nessuna immagine presente. Clicca "Nuova Immagine" per iniziare.'})})}):a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:b.map(I=>{var O;return a.jsxs(Kt,{className:"overflow-hidden hover:shadow-md transition-shadow group",children:[a.jsxs("div",{className:"relative aspect-square",children:[a.jsx("img",{src:I.src_url,alt:I.title,className:"w-full h-full object-cover"}),a.jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:[a.jsx(xe,{variant:"secondary",size:"icon",onClick:()=>A(I),children:a.jsx(Ql,{className:"w-4 h-4"})}),a.jsx(xe,{variant:"destructive",size:"icon",onClick:()=>i(I.id),children:a.jsx(da,{className:"w-4 h-4"})})]})]}),a.jsxs(Zt,{className:"p-3",children:[a.jsx("h3",{className:"font-medium text-sm text-foreground truncate",children:I.title}),a.jsxs("div",{className:"flex items-center justify-between mt-1",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:(O=hw.find(B=>B.id===I.category))==null?void 0:O.name}),a.jsxs("div",{className:"flex items-center gap-1",children:[(I.title_en||I.title_es||I.title_pt)&&a.jsx("span",{className:"inline-flex items-center gap-1 text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded",children:a.jsx(Lt,{className:"w-3 h-3"})}),I.country&&a.jsx("span",{className:"text-xs text-primary",children:I.country})]})]})]})]},I.id)})}),a.jsx(sr,{open:t,onOpenChange:n,children:a.jsxs(Ln,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[a.jsx(or,{children:a.jsx(zn,{children:o?"Modifica Immagine":"Nuova Immagine"})}),a.jsxs("form",{onSubmit:P,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Mv,{label:"Immagine *",value:y.src_url,onChange:I=>w({...y,src_url:I}),folder:"gallery"}),a.jsxs(xe,{type:"button",variant:"outline",onClick:R,disabled:m||!y.title,className:"w-full gap-2",children:[m?a.jsx(qe,{className:"w-4 h-4 animate-spin"}):a.jsx(w1,{className:"w-4 h-4"}),"Genera immagine AI"]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"title",children:"Titolo *"}),a.jsx(Se,{id:"title",value:y.title,onChange:I=>w({...y,title:I.target.value}),required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"description",children:"Descrizione"}),a.jsx(Fe,{id:"description",value:y.description,onChange:I=>w({...y,description:I.target.value}),rows:2})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"category",children:"Categoria *"}),a.jsxs(lc,{value:y.category,onValueChange:I=>w({...y,category:I}),children:[a.jsx(pa,{children:a.jsx(cc,{})}),a.jsx(ga,{children:hw.map(I=>
1019a.jsx(va,{value:I.id,children:I.name},I.id))})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"country",children:"Paese"}),a.jsxs(lc,{value:y.country,onValueChange:I=>w({...y,country:I}),children:[a.jsx(pa,{children:a.jsx(cc,{placeholder:"Seleziona..."})}),a.jsx(ga,{children:V3.map(I=>a.jsx(va,{value:I,children:I},I))})]})]})]}),a.jsxs(xe,{type:"button",variant:"outline",onClick:T,disabled:u||!y.title,className:"w-full gap-2",children:[u?a.jsx(qe,{className:"w-4 h-4 animate-spin"}):a.jsx(Lt,{className:"w-4 h-4"}),"Traduci automaticamente"]}),a.jsxs(ya,{open:f,onOpenChange:p,children:[a.jsx(xa,{asChild:!0,children:a.jsxs(xe,{variant:"ghost",className:"w-full justify-between",children:[a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(Lt,{className:"w-4 h-4"}),"Traduzioni"]}),a.jsx(Kr,{className:`w-4 h-4 transition-transform ${f?"rotate-180":""}`})]})}),a.jsxs(ba,{className:"space-y-4 pt-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{className:"text-muted-foreground",children:"Titolo (EN)"}),a.jsx(Se,{value:y.title_en,onChange:I=>w({...y,title_en:I.target.value}),placeholder:"English title"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{className:"text-muted-foreground",children:"Descrizione (EN)"}),a.jsx(Fe,{value:y.description_en,onChange:I=>w({...y,description_en:I.target.value}),placeholder:"English description",rows:2})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{className:"text-muted-foreground",children:"Titolo (ES)"}),a.jsx(Se,{value:y.title_es,onChange:I=>w({...y,title_es:I.target.value}),placeholder:"Título en español"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{className:"text-muted-foreground",children:"Descrizione (ES)"}),a.jsx(Fe,{value:y.description_es,onChange:I=>w({...y,description_es:I.target.value}),placeholder:"Descripción en español",rows:2})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{className:"text-muted-foreground",children:"Titolo (PT)"}),a.jsx(Se,{value:y.title_pt,onChange:I=>w({...y,title_pt:I.target.value}),placeholder:"Título em português"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{className:"text-muted-foreground",children:"Descrizione (PT)"}),a.jsx(Fe,{value:y.description_pt,onChange:I=>w({...y,description_pt:I.target.value}),placeholder:"Descrição em português",rows:2})]})]})]}),a.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[a.jsx(xe,{type:"button",variant:"outline",onClick:k,children:"Annulla"}),a.jsxs(xe,{type:"submit",disabled:j.isPending||_.isPending,children:[(j.isPending||_.isPending)&&a.jsx(qe,{className:"w-4 h-4 mr-2 animate-spin"}),o?"Salva Modifiche":"Aggiungi Immagine"]})]})]})]})}),a.jsx(uc,{open:!!r,onOpenChange:()=>i(null),children:a.jsxs(wa,{children:[a.jsxs(_a,{children:[a.jsx(ja,{children:"Sei sicuro?"}),a.jsx(Na,{children:"Questa azione non può essere annullata. L'immagine verrà eliminata permanentemente."})]}),a.jsxs(Sa,{children:[a.jsx(Ea,{children:"Annulla"}),a.jsx(Ca,{onClick:()=>r&&N.mutate(r),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:N.isPending?a.jsx(qe,{className:"w-4 h-4 animate-spin"}):"Elimina"})]})]})})]})},H3=()=>{const e=qs(),[t,n]=x.useState(!1),[r,i]=x.useState(!1),[o,l]=x.useState(null),[u,d]=x.useState(null),[f,p]=x.useState(null),[m,g]=x.useState(null),[y,w]=x.useState(!1),[b,C]=x.useState(!1),[j,_]=x.useState(!1),[N,A]=x.useState(!1),[k,T]=x.useState({title:"",title_en:"",title_es:"",title_pt:"",description:"",description_en:"",description_es:"",description_pt:"",youtube_id:"",date_label:""}
1019),[R,P]=x.useState({title:"",title_en:"",title_es:"",title_pt:"",description:"",description_en:"",description_es:"",description_pt:"",semestrale_url:"",inserto_url:"",published_at:""}),{data:I=[],isLoading:O}=qt({queryKey:["admin-videos"],queryFn:async()=>{const{data:z,error:W}=await me.from("videos").select("*").order("created_at",{ascending:!1});if(W)throw W;return z}}),{data:B=[],isLoading:U}=qt({queryKey:["admin-giornalini"],queryFn:async()=>{const{data:z,error:W}=await me.from("giornalini").select("*").order("published_at",{ascending:!1});if(W)throw W;return z}}),ie=async()=>{var z;if(!k.title.trim()){re.error("Inserisci almeno il titolo per tradurre");return}w(!0);try{const W=[{field:"title",value:k.title}];(z=k.description)!=null&&z.trim()&&W.push({field:"description",value:k.description});const{data:te,error:ve}=await me.functions.invoke("translate",{body:{texts:W,targetLanguages:["en","es","pt"]}});if(ve)throw ve;const ke=te.translations;T(ge=>{var Ee,Ne,Ge,tt,pt,nt;return{...ge,title_en:((Ee=ke.en)==null?void 0:Ee.title)||ge.title_en,title_es:((Ne=ke.es)==null?void 0:Ne.title)||ge.title_es,title_pt:((Ge=ke.pt)==null?void 0:Ge.title)||ge.title_pt,description_en:((tt=ke.en)==null?void 0:tt.description)||ge.description_en,description_es:((pt=ke.es)==null?void 0:pt.description)||ge.description_es,description_pt:((nt=ke.pt)==null?void 0:nt.description)||ge.description_pt}}),_(!0),re.success("Traduzioni generate con successo!")}catch(W){console.error("Translation error:",W),re.error("Errore durante la traduzione")}finally{w(!1)}},G=async()=>{var z;if(!R.title.trim()){re.error("Inserisci almeno il titolo per tradurre");return}C(!0);try{const W=[{field:"title",value:R.title}];(z=R.description)!=null&&z.trim()&&W.push({field:"description",value:R.description});const{data:te,error:ve}=await me.functions.invoke("translate",{body:{texts:W,targetLanguages:["en","es","pt"]}});if(ve)throw ve;const ke=te.translations;P(ge=>{var Ee,Ne,Ge,tt,pt,nt;return{...ge,title_en:((Ee=ke.en)==null?void 0:Ee.title)||ge.title_en,title_es:((Ne=ke.es)==null?void 0:Ne.title)||ge.title_es,title_pt:((Ge=ke.pt)==null?void 0:Ge.title)||ge.title_pt,description_en:((tt=ke.en)==null?void 0:tt.description)||ge.description_en,description_es:((pt=ke.es)==null?void 0:pt.description)||ge.description_es,description_pt:((nt=ke.pt)==null?void 0:nt.description)||ge.description_pt}}),A(!0),re.success("Traduzioni generate con successo!")}catch(W){console.error("Translation error:",W),re.error("Errore durante la traduzione")}finally{C(!1)}},se=Tt({mutationFn:async z=>{const{error:W}=await me.from("videos").insert([z]);if(W)throw W},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-videos"]}),e.invalidateQueries({queryKey:["videos-count"]}),re.success("Video aggiunto con successo!"),n(!1),p(null),_(!1)},onError:z=>re.error("Errore: "+z.message)}),Y=Tt({mutationFn:async({id:z,data:W})=>{const{error:te}=await me.from("videos").update(W).eq("id",z);if(te)throw te},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-videos"]}),re.success("Video aggiornato con successo!"),n(!1),p(null),_(!1)},onError:z=>re.error("Errore: "+z.message)}),le=Tt({mutationFn:async z=>{const{error:W}=await me.from("videos").delete().eq("id",z);if(W)throw W},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-videos"]}),e.invalidateQueries({queryKey:["videos-count"]}),re.success("Video eliminato con successo!"),l(null)},onError:z=>re.error("Errore: "+z.message)}),F=Tt({mutationFn:async z=>{const{error:W}=await me.from("giornalini").insert([z]);if(W)throw W},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-giornalini"]}),e.invalidateQueries({queryKey:["giornalini-count"]}),re.success("Giornalino aggiunto con successo!"),i(!1),g(null),A(!1)},onError:z=>re.error("Errore: "+z.message)}),K=Tt({mutationFn:async({id:z,data:W})=>{const{error:te}=await me.from("giornalini").update(W).eq("id",z);if(te)throw te},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-giornalini"]}),re.success("Giornalino aggiornato con successo!"),i(!1),g(null),A(!1)},onError:z=>re.error("Errore: "+z.message)}),H=Tt({mutationFn:async z=>{const{error:W}=await me.from("giornalini").delete().eq("id",z);if(W)throw W},onSuccess:()=>
1019{e.invalidateQueries({queryKey:["admin-giornalini"]}),e.invalidateQueries({queryKey:["giornalini-count"]}),re.success("Giornalino eliminato con successo!"),d(null)},onError:z=>re.error("Errore: "+z.message)}),Z=z=>{z?(p(z),T({title:z.title,title_en:z.title_en||"",title_es:z.title_es||"",title_pt:z.title_pt||"",description:z.description||"",description_en:z.description_en||"",description_es:z.description_es||"",description_pt:z.description_pt||"",youtube_id:z.youtube_id,date_label:z.date_label||""}),_(!!(z.title_en||z.title_es||z.title_pt||z.description_en||z.description_es||z.description_pt))):(p(null),T({title:"",title_en:"",title_es:"",title_pt:"",description:"",description_en:"",description_es:"",description_pt:"",youtube_id:"",date_label:""}),_(!1)),n(!0)},ee=z=>{z?(g(z),P({title:z.title,title_en:z.title_en||"",title_es:z.title_es||"",title_pt:z.title_pt||"",description:z.description||"",description_en:z.description_en||"",description_es:z.description_es||"",description_pt:z.description_pt||"",semestrale_url:z.semestrale_url||"",inserto_url:z.inserto_url||"",published_at:z.published_at||""}),A(!!(z.title_en||z.title_es||z.title_pt||z.description_en||z.description_es||z.description_pt))):(g(null),P({title:"",title_en:"",title_es:"",title_pt:"",description:"",description_en:"",description_es:"",description_pt:"",semestrale_url:"",inserto_url:"",published_at:""}),A(!1)),i(!0)},ue=z=>{z.preventDefault();const W={title:k.title,title_en:k.title_en||null,title_es:k.title_es||null,title_pt:k.title_pt||null,description:k.description||null,description_en:k.description_en||null,description_es:k.description_es||null,description_pt:k.description_pt||null,youtube_id:k.youtube_id,date_label:k.date_label||null};f?Y.mutate({id:f.id,data:W}):se.mutate(W)},V=z=>{z.preventDefault();const W={title:R.title,title_en:R.title_en||null,title_es:R.title_es||null,title_pt:R.title_pt||null,description:R.description||null,description_en:R.description_en||null,description_es:R.description_es||null,description_pt:R.description_pt||null,semestrale_url:R.semestrale_url||null,inserto_url:R.inserto_url||null,published_at:R.published_at||null};m?K.mutate({id:m.id,data:W}):F.mutate(W)};return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Gestione Media"}),a.jsx("p",{className:"text-muted-foreground",children:"Gestisci video e giornalini del sito."})]}),a.jsxs(zv,{defaultValue:"videos",className:"w-full",children:[a.jsxs(xh,{className:"grid w-full grid-cols-2 max-w-md",children:[a.jsxs(zs,{value:"videos",className:"gap-2",children:[a.jsx(Ug,{className:"w-4 h-4"}),"Video"]}),a.jsxs(zs,{value:"giornalini",className:"gap-2",children:[a.jsx(Sr,{className:"w-4 h-4"}),"Giornalini"]})]}),a.jsxs(Ms,{value:"videos",className:"mt-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h3",{className:"text-lg font-semibold",children:"Video YouTube"}),a.jsxs(xe,{onClick:()=>Z(),className:"gap-2",children:[a.jsx(ua,{className:"w-4 h-4"}),"Nuovo Video"]})]}),O?a.jsx("div",{className:"flex justify-center py-8",children:a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"})}):I.length===0?a.jsx(Kt,{children:a.jsx(Zt,{className:"py-12 text-center",children:a.jsx("p",{className:"text-muted-foreground",children:"Nessun video presente."})})}):a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:I.map(z=>a.jsxs(Kt,{className:"overflow-hidden",children:[a.jsx("div",{className:"aspect-video bg-muted",children:a.jsx("img",{src:`https://img.youtube.com/vi/${z.youtube_id}/hqdefault.jpg`,alt:z.title,className:"w-full h-full object-cover"})}),a.jsx(Zt,{className:"p-4",children:a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h4",{className:"font-semibold truncate",children:z.title}),a.jsx("p",{className:"text-sm text-muted-foreground truncate",children:z.description}),z.date_label&&a.jsx("p",{className:"text-xs text-primary mt-1",children:z.date_label}),(z.title_en||z.title_es||z.title_pt)&&a.jsxs("p",{className:"text-xs text-green-600 mt-1 flex items-center gap-1",children:[a.jsx(Lt,{className:"w-3 h-3"}),"Traduzioni disponibili"]})]}),a.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[a.jsx(xe,{variant:"outline",size:"icon",onClick:()=>Z(z),children:a.jsx(Ql,{className:"w-4 h-4"})}),a.jsx(xe,{variant:"outline",size:"icon",className:"text-destructive",onClick:()=>l(z.id),children:a.jsx(da,{className:"w-4 h-4"})})]})]})})]},z.id))})]}),a.jsxs(Ms,{value:"giornalini",className:"mt-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h3",{className:"text-lg font-semibold",children:"Numeri del Giornalino"}),a.jsxs(xe,{onClick:()=>ee(),className:"gap-2",children:[a.jsx(ua,{className:"w-4 h-4"}),"Nuovo Giornalino"]})]}),U?a.jsx("div",{className:"flex justify-center py-8",children:a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"})}):B.length===0?a.jsx(Kt,{children:a.jsx(Zt,{className:"py-12 text-center",children:a.jsx("p",{className:"text-muted-foreground",children:"Nessun giornalino presente."})})}):a.jsx("div",{className:"grid gap-4",children:B.map(z=>a.jsx(Kt,{children:a.jsx(Zt,{className:"p-4",children:a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h4",{className:"font-semibold",children:z.title}),a.jsx("p",{className:"text-sm text-muted-foreground",children:z.description}),z.published_at&&a.jsxs("p",{className:"text-xs text-primary mt-1",children:["Pubblicato: ",new Date(z.published_at).toLocaleDateString("it-IT")]}),a.jsxs("div",{className:"flex gap-2 mt-2 flex-wrap",children:[z.semestrale_url&&a.jsx("span",{className:"text-xs bg-muted px-2 py-1 rounded",children:"Semestrale ✓"}),z.inserto_url&&a.jsx("span",{className:"text-xs bg-muted px-2 py-1 rounded",children:"Inserto ✓"}),(z.title_en||z.title_es||z.title_pt)&&a.jsxs("span",{className:"text-xs bg-green-100 text-green-700 px-2 py-1 rounded flex items-center gap-1",children:[a.jsx(Lt,{className:"w-3 h-3"}),"Traduzioni"]})]})]}),a.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[a.jsx(xe,{variant:"outline",size:"icon",onClick:()=>ee(z),children:a.jsx(Ql,{className:"w-4 h-4"})}),a.jsx(xe,{variant:"outline",size:"icon",className:"text-destructive",onClick:()=>d(z.id),children:a.jsx(da,{className:"w-4 h-4"})})]})]})})},z.id))})]})]}),a.jsx(sr,{open:t,onOpenChange:n,children:a.jsxs(Ln,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[a.jsx(or,{children:a.jsx(zn,{children:f?"Modifica Video":"Nuovo Video"})}),a.jsxs("form",{onSubmit:ue,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"video_title",children:"Titolo (IT) *"}),a.jsx(Se,{id:"video_title",value:k.title,onChange:z=>T({...k,title:z.target.value}),required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"youtube_id",children:"ID YouTube *"}),a.jsx(Se,{id:"youtube_id",value:k.youtube_id,onChange:z=>T({...k,youtube_id:z.target.value}),placeholder:"es: XJkGO-wZd0c",required:!0}),a.jsx("p",{className:"text-xs text-muted-foreground",children:`L'ID è la parte dopo "v=" nell'URL di YouTube`})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"video_description",children:"Descrizione (IT)"}),a.jsx(Fe,{id:"video_description",value:k.description,onChange:z=>T({...k,description:z.target.value}),rows:2})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"date_label",children:"Data/Periodo"}),a.jsx(Se,{id:"date_label",value:k.date_label,onChange:z=>T({...k,date_label:z.target.value}),placeholder:"es: Dicembre 2024"})]}),a.jsxs(xe,{type:"button",variant:"outline",className:"w-full gap-2",onClick:ie,disabled:y||!k.title.trim(),children:[y?a.jsx(qe,{className:"w-4 h-4 animate-spin"}):a.jsx(Lt,{className:"w-4 h-4"}),"Traduci automaticamente"]}),a.jsxs(ya,{open:j,onOpenChange:_,children:[a.jsx(xa,{asChild:!0,children:a.jsxs(xe,{type:"button",variant:"ghost",className:"w-full justify-between",children:[a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(Lt,{className:"w-4 h-4"}),"Traduzioni"]}),a.jsx(Kr,{className:`w-4 h-4 transition-transform ${j?"rotate-180":""}`})]})}),a.jsxs(ba,{className:"space-y-4 pt-2",children:[a.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"video_title_en",children:"Titolo (EN)"}),a.jsx(Se,{id:"video_title_en",value:k.title_en,onChange:z=>T({...k,title_en:z.target.value}),placeholder:"English title"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"video_description_en",children:"Descrizione (EN)"}),a.jsx(Fe,{id:"video_description_en",value:k.description_en,onChange:z=>T({...k,description_en:z.target.value}),rows:2,placeholder:"English description"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"video_title_es",children:"Titolo (ES)"}),a.jsx(Se,{id:"video_title_es",value:k.title_es,onChange:z=>T({...k,title_es:z.target.value}),placeholder:"Título en español"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"video_description_es",children:"Descrizione (ES)"}),a.jsx(Fe,{id:"video_description_es",value:k.description_es,onChange:z=>T({...k,description_es:z.target.value}),rows:2,placeholder:"Descripción en español"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"video_title_pt",children:"Titolo (PT)"}),a.jsx(Se,{id:"video_title_pt",value:k.title_pt,onChange:z=>T({...k,title_pt:z.target.value}),placeholder:"Título em português"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"video_description_pt",children:"Descrizione (PT)"}),a.jsx(Fe,{id:"video_description_pt",value:k.description_pt,onChange:z=>T({...k,description_pt:z.target.value}),rows:2,placeholder:"Descrição em português"})]})]})]})]}),a.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[a.jsx(xe,{type:"button",variant:"outline",onClick:()=>n(!1),children:"Annulla"}),a.jsxs(xe,{type:"submit",disabled:se.isPending||Y.isPending,children:[(se.isPending||Y.isPending)&&a.jsx(qe,{className:"w-4 h-4 mr-2 animate-spin"}
1019),f?"Salva":"Aggiungi"]})]})]})]})}),a.jsx(sr,{open:r,onOpenChange:i,children:a.jsxs(Ln,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[a.jsx(or,{children:a.jsx(zn,{children:m?"Modifica Giornalino":"Nuovo Giornalino"})}),a.jsxs("form",{onSubmit:V,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"g_title",children:"Titolo (IT) *"}),a.jsx(Se,{id:"g_title",value:R.title,onChange:z=>P({...R,title:z.target.value}),required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"g_description",children:"Descrizione (IT)"}),a.jsx(Fe,{id:"g_description",value:R.description,onChange:z=>P({...R,description:z.target.value}),rows:2})]}),a.jsxs(xe,{type:"button",variant:"outline",className:"w-full gap-2",onClick:G,disabled:b||!R.title.trim(),children:[b?a.jsx(qe,{className:"w-4 h-4 animate-spin"}):a.jsx(Lt,{className:"w-4 h-4"}),"Traduci automaticamente"]}),a.jsxs(ya,{open:N,onOpenChange:A,children:[a.jsx(xa,{asChild:!0,children:a.jsxs(xe,{type:"button",variant:"ghost",className:"w-full justify-between",children:[a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(Lt,{className:"w-4 h-4"}),"Traduzioni"]}),a.jsx(Kr,{className:`w-4 h-4 transition-transform ${N?"rotate-180":""}`})]})}),a.jsxs(ba,{className:"space-y-4 pt-2",children:[a.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"g_title_en",children:"Titolo (EN)"}),a.jsx(Se,{id:"g_title_en",value:R.title_en,onChange:z=>P({...R,title_en:z.target.value}),placeholder:"English title"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"g_description_en",children:"Descrizione (EN)"}),a.jsx(Fe,{id:"g_description_en",value:R.description_en,onChange:z=>P({...R,description_en:z.target.value}),rows:2,placeholder:"English description"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"g_title_es",children:"Titolo (ES)"}),a.jsx(Se,{id:"g_title_es",value:R.title_es,onChange:z=>P({...R,title_es:z.target.value}),placeholder:"Título en español"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"g_description_es",children:"Descrizione (ES)"}),a.jsx(Fe,{id:"g_description_es",value:R.description_es,onChange:z=>P({...R,description_es:z.target.value}),rows:2,placeholder:"Descripción en español"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"g_title_pt",children:"Titolo (PT)"}),a.jsx(Se,{id:"g_title_pt",value:R.title_pt,onChange:z=>P({...R,title_pt:z.target.value}),placeholder:"Título em português"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"g_description_pt",children:"Descrizione (PT)"}),a.jsx(Fe,{id:"g_description_pt",value:R.description_pt,onChange:z=>P({...R,description_pt:z.target.value}),rows:2,placeholder:"Descrição em português"})]})]})]})]}),a.jsx(zd,{label:"Semestrale (PDF)",value:R.semestrale_url,onChange:z=>P({...R,semestrale_url:z}),folder:"giornalini"}),a.jsx(zd,{label:"Inserto Serata Soci (PDF)",value:R.inserto_url,onChange:z=>P({...R,inserto_url:z}),folder:"giornalini"}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"published_at",children:"Data Pubblicazione"}),a.jsx(Se,{id:"published_at",type:"date",value:R.published_at,onChange:z=>P({...R,published_at:z.target.value})})]}),a.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[a.jsx(xe,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Annulla"}),a.jsxs(xe,{type:"submit",disabled:F.isPending||K.isPending,children:[(F.isPending||K.isPending)&&a.jsx(qe,{className:"w-4 h-4 mr-2 animate-spin"}),m?"Salva":"Aggiungi"]})]})]})]})}),a.jsx(uc,{open:!!o,onOpenChange:()=>l(null),children:a.jsxs(wa,{children:[a.jsxs(_a,{children:[a.jsx(ja,{children:"Eliminare questo video?"}),a.jsx(Na,{children:"Questa azione non può essere annullata."})]}),a.jsxs(Sa,{children:[a.jsx(Ea,{children:"Annulla"}),a.jsx(Ca,{onClick:()=>o&&le.mutate(o),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Elimina"})]})]})}),a.jsx(uc,{open:!!u,onOpenChange:()=>d(null),children:a.jsxs(wa,{children:[a.jsxs(_a,{children:[a.jsx(ja,{children:"Eliminare questo giornalino?"}),a.jsx(Na,{children:"Questa azione non può essere annullata."})]}),a.jsxs(Sa,{children:[a.jsx(Ea,{children:"Annulla"}),a.jsx(Ca,{onClick:()=>u&&H.mutate(u),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Elimina"})]})]})})]})},fw=[{value:"FileText",label:"Documento",icon:Sr},{value:"Scale",label:"Bilancia",icon:x1},{value:"Heart",label:"Cuore",icon:nr},{value:"ClipboardList",label:"Lista",icon:p1},{value:"Award",label:"Premio",icon:Dg}],G3=[{value:"from-blue-500 to-blue-600",label:"Blu"}
1019,{value:"from-amber-500 to-amber-600",label:"Ambra"},{value:"from-rose-500 to-rose-600",label:"Rosa"},{value:"from-emerald-500 to-emerald-600",label:"Verde"},{value:"from-purple-500 to-purple-600",label:"Viola"}],K3=()=>{const e=qs(),[t,n]=x.useState(!1),[r,i]=x.useState(null),[o,l]=x.useState(!1),[u,d]=x.useState(!1),[f,p]=x.useState({title:"",description:"",title_en:"",title_es:"",title_pt:"",description_en:"",description_es:"",description_pt:"",icon_name:"FileText",color_gradient:"from-blue-500 to-blue-600",file_url:"",display_order:0}),{data:m,isLoading:g}=qt({queryKey:["transparency-documents-admin"],queryFn:async()=>{const{data:T,error:R}=await me.from("transparency_documents").select("*").order("display_order",{ascending:!0});if(R)throw R;return T}}),y=Tt({mutationFn:async T=>{const{error:R}=await me.from("transparency_documents").insert([T]);if(R)throw R},onSuccess:()=>{e.invalidateQueries({queryKey:["transparency-documents-admin"]}),e.invalidateQueries({queryKey:["transparency-documents"]}),re.success("Documento creato con successo!"),C()},onError:T=>{re.error("Errore: "+T.message)}}),w=Tt({mutationFn:async({id:T,data:R})=>{const{error:P}=await me.from("transparency_documents").update(R).eq("id",T);if(P)throw P},onSuccess:()=>{e.invalidateQueries({queryKey:["transparency-documents-admin"]}),e.invalidateQueries({queryKey:["transparency-documents"]}),re.success("Documento aggiornato!"),C()},onError:T=>{re.error("Errore: "+T.message)}}),b=Tt({mutationFn:async T=>{const{error:R}=await me.from("transparency_documents").delete().eq("id",T);if(R)throw R},onSuccess:()=>{e.invalidateQueries({queryKey:["transparency-documents-admin"]}),e.invalidateQueries({queryKey:["transparency-documents"]}),re.success("Documento eliminato!")},onError:T=>{re.error("Errore: "+T.message)}}),C=()=>{p({title:"",description:"",title_en:"",title_es:"",title_pt:"",description_en:"",description_es:"",description_pt:"",icon_name:"FileText",color_gradient:"from-blue-500 to-blue-600",file_url:"",display_order:0}),i(null),n(!1),d(!1)},j=T=>{i(T),p({title:T.title,description:T.description||"",title_en:T.title_en||"",title_es:T.title_es||"",title_pt:T.title_pt||"",description_en:T.description_en||"",description_es:T.description_es||"",description_pt:T.description_pt||"",icon_name:T.icon_name,color_gradient:T.color_gradient,file_url:T.file_url||"",display_order:T.display_order}),d(!!(T.title_en||T.title_es||T.title_pt)),n(!0)},_=async()=>{if(!f.title&&!f.description){re.error("Inserisci almeno un campo in italiano da tradurre");return}l(!0);try{const T=[];f.title&&T.push({field:"title",value:f.title}),f.description&&T.push({field:"description",value:f.description});const{data:R,error:P}=await me.functions.invoke("translate",{body:{texts:T,targetLanguages:["en","es","pt"]}});if(P)throw P;const I=R.translations;p(O=>{var B,U,ie,G,se,Y;return{...O,title_en:((B=I.en)==null?void 0:B.title)||O.title_en,title_es:((U=I.es)==null?void 0:U.title)||O.title_es,title_pt:((ie=I.pt)==null?void 0:ie.title)||O.title_pt,description_en:((G=I.en)==null?void 0:G.description)||O.description_en,description_es:((se=I.es)==null?void 0:se.description)||O.description_es,description_pt:((Y=I.pt)==null?void 0:Y.description)||O.description_pt}}),d(!0),re.success("Traduzioni generate con successo!")}catch(T){console.error("Translation error:",T),re.error("Errore durante la traduzione")}finally{l(!1)}},N=T=>!!(T.title_en||T.title_es||T.title_pt),A=T=>{T.preventDefault();const R={title:f.title,description:f.description||null,title_en:f.title_en||null,title_es:f.title_es||null,title_pt:f.title_pt||null,description_en:f.description_en||null,description_es:f.description_es||null,description_pt:f.description_pt||null,icon_name:f.icon_name,color_gradient:f.color_gradient,file_url:f.file_url||null,display_order:f.display_order};r?w.mutate({id:r.id,data:R}):y.mutate(R)},k=T=>{const R=fw.find(P=>P.value===T);return R?R.icon:Sr};return g?a.jsx("div",{className:"text-center py-8",children:"Caricamento..."}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("h2",{className:"text-2xl font-bold",children:"Documenti Trasparenza"}),a.jsxs(sr,{open:t,onOpenChange:n,children:[a.jsx(Oj,{asChild:!0,children:a.jsxs(xe,{onClick:()=>C(),children:[a.jsx(ua,{className:"w-4 h-4 mr-2"}),"Nuovo Documento"]})}),a.jsxs(Ln,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[a.jsx(or,{children:a.jsx(zn,{children:r?"Modifica Documento":"Nuovo Documento"})}),a.jsxs("form",{onSubmit:A,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(X,{htmlFor:"title",children:"Titolo *"}),a.jsx(Se,{id:"title",value:f.title,onChange:T=>p({...f,title:T.target.value}),required:!0})]}),a.jsxs("div",{children:[a.jsx(X,{htmlFor:"description",children:"Descrizione"}),a.jsx(Fe,{id:"description",value:f.description,onChange:T=>p({...f,description:T.target.value}),rows:2})]}),a.jsxs(xe,{type:"button",variant:"outline",onClick:_,disabled:o,className:"w-full gap-2",children:[o?a.jsx(qe,{className:"w-4 h-4 animate-spin"}):a.jsx(Lt,{className:"w-4 h-4"}),"Traduci automaticamente"]}),a.jsxs(ya,{open:u,onOpenChange:d,children:[a.jsx(xa,{asChild:!0,children:a.jsxs(xe,{variant:"ghost",type:"button",className:"w-full justify-between",children:[a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(Lt,{className:"w-4 h-4"}),"Traduzioni"]}),a.jsx(Kr,{className:`w-4 h-4 transition-transform ${u?"rotate-180":""}`})]})}),a.jsxs(ba,{className:"space-y-4 pt-4",children:[a.jsxs("div",{className:"space-y-3 p-3 border rounded-lg",children:[a.jsx("h4",{className:"font-medium text-sm",children:"🇬🇧 Inglese"}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"title_en",children:"Titolo EN"}),a.jsx(Se,{id:"title_en",value:f.title_en,onChange:T=>p({...f,title_en:T.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"description_en",children:"Descrizione EN"}),a.jsx(Fe,{id:"description_en",value:f.description_en,onChange:T=>p({...f,description_en:T.target.value}),rows:2})]})]}),a.jsxs("div",{className:"space-y-3 p-3 border rounded-lg",children:[a.jsx("h4",{className:"font-medium text-sm",children:"🇪🇸 Spagnolo"}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"title_es",children:"Titolo ES"}),a.jsx(Se,{id:"title_es",value:f.title_es,onChange:T=>p({...f,title_es:T.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"description_es",children:"Descrizione ES"}),a.jsx(Fe,{id:"description_es",value:f.description_es,onChange:T=>p({...f,description_es:T.target.value}),rows:2})]})]}),a.jsxs("div",{className:"space-y-3 p-3 border rounded-lg",children:[a.jsx("h4",{className:"font-medium text-sm",children:"🇧🇷 Portoghese"}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"title_pt",children:"Titolo PT"}),a.jsx(Se,{id:"title_pt",value:f.title_pt,onChange:T=>p({...f,title_pt:T.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{htmlFor:"description_pt",children:"Descrizione PT"}),a.jsx(Fe,{id:"description_pt",value:f.description_pt,onChange:T=>p({...f,description_pt:T.target.value}),rows:2})]})]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(X,{children:"Icona"}),a.jsxs(lc,{value:f.icon_name,onValueChange:T=>p({...f,icon_name:T}),children:[a.jsx(pa,{children:a.jsx(cc,{})}),a.jsx(ga,{children:fw.map(T=>{const R=T.icon;return a.jsx(va,{value:T.value,children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(R,{className:"w-4 h-4"}),T.label]})},T.value)})})]})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Colore"}),a.jsxs(lc,{value:f.color_gradient,onValueChange:T=>p({...f,color_gradient:T}),children:[a.jsx(pa,{children:a.jsx(cc,{})}),a.jsx(ga,{children:G3.map(T=>a.jsx(va,{value:T.value,children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:`w-4 h-4 rounded bg-gradient-to-br ${T.value}`}),T.label]})},T.value))})]})]})]}),a.jsxs("div",{children:[a.jsx(X,{htmlFor:"display_order",children:"Ordine visualizzazione"}),a.jsx(Se,{id:"display_order",type:"number",value:f.display_order,onChange:T=>
1019p({...f,display_order:parseInt(T.target.value)||0})})]}),a.jsx(zd,{value:f.file_url,onChange:T=>p({...f,file_url:T}),label:"File (PDF o Immagine)",folder:"transparency",accept:".pdf,.jpg,.jpeg,.png,.webp",maxSizeMB:20}),a.jsxs("div",{className:"flex gap-2 justify-end",children:[a.jsx(xe,{type:"button",variant:"outline",onClick:C,children:"Annulla"}),a.jsx(xe,{type:"submit",disabled:y.isPending||w.isPending,children:r?"Salva Modifiche":"Crea Documento"})]})]})]})]})]}),a.jsxs("div",{className:"grid gap-4",children:[m==null?void 0:m.map(T=>{const R=k(T.icon_name);return a.jsx(Kt,{children:a.jsxs(Zt,{className:"flex items-center gap-4 p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[a.jsx(w2,{className:"w-4 h-4"}),a.jsx("span",{className:"text-sm font-mono w-6",children:T.display_order})]}),a.jsx("div",{className:`w-10 h-10 rounded-lg bg-gradient-to-br ${T.color_gradient} flex items-center justify-center flex-shrink-0`,children:a.jsx(R,{className:"w-5 h-5 text-white"})}),a.jsxs("div",{className:"flex-1 min-w-0 overflow-hidden",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("h3",{className:"font-semibold truncate",children:T.title}),N(T)&&a.jsxs("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-700 text-xs rounded-full flex items-center gap-1 flex-shrink-0",children:[a.jsx(Lt,{className:"w-3 h-3"}),"Traduzioni"]})]}),a.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:T.description}),T.file_url&&a.jsx("a",{href:T.file_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline",children:"Visualizza file"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(xe,{variant:"outline",size:"icon",onClick:()=>j(T),children:a.jsx(A2,{className:"w-4 h-4"})}),a.jsx(xe,{variant:"destructive",size:"icon",onClick:()=>{confirm("Sei sicuro di voler eliminare questo documento?")&&b.mutate(T.id)},children:a.jsx(da,{className:"w-4 h-4"})})]})]})},T.id)}),(m==null?void 0:m.length)===0&&a.jsx("div",{className:"text-center py-12 text-muted-foreground",children:'Nessun documento. Clicca "Nuovo Documento" per aggiungerne uno.'})]})]})},mw={name:"",flag:"",city:"",since:"",students:0,projects:1,description:"",full_description:"",achievements:"",success_stories:"",image_url:"",color_gradient:"from-primary to-accent",latitude:"",longitude:"",display_order:0,name_en:"",name_es:"",name_pt:"",city_en:"",city_es:"",city_pt:"",description_en:"",description_es:"",description_pt:"",full_description_en:"",full_description_es:"",full_description_pt:"",achievements_en:"",achievements_es:"",achievements_pt:""},Z3=()=>{const e=qs(),[t,n]=x.useState(!1),[r,i]=x.useState(null),[o,l]=x.useState(null),[u,d]=x.useState(!1),[f,p]=x.useState(!1),[m,g]=x.useState(mw),{data:y=[],isLoading:w}=qt({queryKey:["admin-missions"],queryFn:async()=>{const{data:P,error:I}=await me.from("missions").select("*").order("display_order",{ascending:!0});if(I)throw I;return P}}),b=Tt({mutationFn:async P=>{const{error:I}=await me.from("missions").insert([P]);if(I)throw I},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-missions"]}),e.invalidateQueries({queryKey:["public-missions"]}),re.success("Missione creata con successo!"),k()},onError:P=>re.error("Errore: "+P.message)}),C=Tt({mutationFn:async({id:P,data:I})=>{const{error:O}=await me.from("missions").update(I).eq("id",P);if(O)throw O},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-missions"]}),e.invalidateQueries({queryKey:["public-missions"]}),re.success("Missione aggiornata!"),k()},onError:P=>re.error("Errore: "+P.message)}),j=Tt({mutationFn:async P=>{const{error:I}=await me.from("missions").delete().eq("id",P);if(I)throw I},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-missions"]}),e.invalidateQueries({queryKey:["public-missions"]}),re.success("Missione eliminata!"),i(null)},onError:P=>re.error("Errore: "+P.message)}),_=async(P,I)=>{const O=y.findIndex(ie=>ie.id===P.id),B=I==="up"?O-1:O+1;if(B<0||B>=y.length)return;const U=y[B];await me.from("missions").update({display_order:U.display_order}).eq("id",P.id),await me.from("missions").update({display_order:P.display_order}
1019).eq("id",U.id),e.invalidateQueries({queryKey:["admin-missions"]}),e.invalidateQueries({queryKey:["public-missions"]})},N=async()=>{if(!m.name&&!m.description){re.error("Inserisci almeno nome o descrizione in italiano");return}d(!0);try{const P=[];m.name&&P.push({field:"name",value:m.name}),m.city&&P.push({field:"city",value:m.city}),m.description&&P.push({field:"description",value:m.description}),m.full_description&&P.push({field:"full_description",value:m.full_description}),m.achievements&&P.push({field:"achievements",value:m.achievements});const{data:I,error:O}=await me.functions.invoke("translate",{body:{texts:P,targetLanguages:["en","es","pt"]}});if(O)throw O;const B=I.translations;g(U=>{var ie,G,se,Y,le,F,K,H,Z,ee,ue,V,z,W,te;return{...U,name_en:((ie=B.en)==null?void 0:ie.name)||U.name_en,name_es:((G=B.es)==null?void 0:G.name)||U.name_es,name_pt:((se=B.pt)==null?void 0:se.name)||U.name_pt,city_en:((Y=B.en)==null?void 0:Y.city)||U.city_en,city_es:((le=B.es)==null?void 0:le.city)||U.city_es,city_pt:((F=B.pt)==null?void 0:F.city)||U.city_pt,description_en:((K=B.en)==null?void 0:K.description)||U.description_en,description_es:((H=B.es)==null?void 0:H.description)||U.description_es,description_pt:((Z=B.pt)==null?void 0:Z.description)||U.description_pt,full_description_en:((ee=B.en)==null?void 0:ee.full_description)||U.full_description_en,full_description_es:((ue=B.es)==null?void 0:ue.full_description)||U.full_description_es,full_description_pt:((V=B.pt)==null?void 0:V.full_description)||U.full_description_pt,achievements_en:((z=B.en)==null?void 0:z.achievements)||U.achievements_en,achievements_es:((W=B.es)==null?void 0:W.achievements)||U.achievements_es,achievements_pt:((te=B.pt)==null?void 0:te.achievements)||U.achievements_pt}}),p(!0),re.success("Traduzioni generate!")}catch(P){console.error(P),re.error("Errore traduzione")}finally{d(!1)}},A=P=>{var I,O;if(P){l(P);const B=Array.isArray(P.success_stories)?P.success_stories.join(`
1020`):"";g({name:P.name,flag:P.flag||"",city:P.city||"",since:P.since||"",students:P.students,projects:P.projects,description:P.description||"",full_description:P.full_description||"",achievements:(P.achievements||[]).join(`
1021`),success_stories:B,image_url:P.image_url||"",color_gradient:P.color_gradient,latitude:((I=P.latitude)==null?void 0:I.toString())||"",longitude:((O=P.longitude)==null?void 0:O.toString())||"",display_order:P.display_order,name_en:P.name_en||"",name_es:P.name_es||"",name_pt:P.name_pt||"",city_en:P.city_en||"",city_es:P.city_es||"",city_pt:P.city_pt||"",description_en:P.description_en||"",description_es:P.description_es||"",description_pt:P.description_pt||"",full_description_en:P.full_description_en||"",full_description_es:P.full_description_es||"",full_description_pt:P.full_description_pt||"",achievements_en:(P.achievements_en||[]).join(`
1022`),achievements_es:(P.achievements_es||[]).join(`
1023`),achievements_pt:(P.achievements_pt||[]).join(`
1024`)}),p(!!(P.name_en||P.name_es||P.name_pt))}else l(null),g({...mw,display_order:y.length+1}),p(!1);n(!0)},k=()=>{n(!1),l(null),p(!1)},T=P=>P.split(`
1025`).map(I=>I.trim()).filter(Boolean),R=P=>{P.preventDefault();const I=T(m.success_stories),O={name:m.name,flag:m.flag,city:m.city,since:m.since||null,students:Number(m.students)||0,projects:Number(m.projects)||1,description:m.description||null,full_description:m.full_description||null,achievements:T(m.achievements),success_stories:I,image_url:m.image_url||null,color_gradient:m.color_gradient||"from-primary to-accent",latitude:m.latitude?Number(m.latitude):null,longitude:m.longitude?Number(m.longitude):null,display_order:Number(m.dis
1025play_order)||0,name_en:m.name_en||null,name_es:m.name_es||null,name_pt:m.name_pt||null,city_en:m.city_en||null,city_es:m.city_es||null,city_pt:m.city_pt||null,description_en:m.description_en||null,description_es:m.description_es||null,description_pt:m.description_pt||null,full_description_en:m.full_description_en||null,full_description_es:m.full_description_es||null,full_description_pt:m.full_description_pt||null,achievements_en:m.achievements_en?T(m.achievements_en):null,achievements_es:m.achievements_es?T(m.achievements_es):null,achievements_pt:m.achievements_pt?T(m.achievements_pt):null};o?C.mutate({id:o.id,data:O}):b.mutate(O)};return w?a.jsx("div",{className:"flex items-center justify-center py-12",children:a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"})}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Gestione Missioni"}),a.jsx("p",{className:"text-muted-foreground",children:"Crea, modifica, riordina ed elimina i paesi/missioni mostrati sul sito."})]}),a.jsxs(xe,{onClick:()=>A(),className:"gap-2",children:[a.jsx(ua,{className:"w-4 h-4"})," Nuova Missione"]})]}),y.length===0?a.jsx(Kt,{children:a.jsx(Zt,{className:"py-12 text-center",children:a.jsx("p",{className:"text-muted-foreground",children:"Nessuna missione presente."})})}):a.jsx("div",{className:"grid gap-4",children:y.map((P,I)=>a.jsx(Kt,{className:"hover:shadow-md transition-shadow",children:a.jsx(Zt,{className:"p-4",children:a.jsxs("div",{className:"flex items-start gap-4",children:[P.image_url&&a.jsx("img",{src:P.image_url,alt:P.name,className:"w-24 h-24 object-cover rounded-lg flex-shrink-0"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("span",{className:"text-2xl",children:P.flag}),a.jsx("h3",{className:"font-semibold text-foreground",children:P.name}),(P.name_en||P.name_es)&&a.jsxs("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-700 text-xs rounded-full flex items-center gap-1",children:[a.jsx(Lt,{className:"w-3 h-3"})," Traduzioni"]})]}),a.jsx("p",{className:"text-sm text-muted-foreground",children:P.city}),a.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[P.students," bambini · ",P.projects," progetti · dal ",P.since||"N/D"," · ordine #",P.display_order]})]}),a.jsxs("div",{className:"flex flex-col gap-1 flex-shrink-0",children:[a.jsxs("div",{className:"flex gap-1",children:[a.jsx(xe,{variant:"outline",size:"icon",disabled:I===0,onClick:()=>_(P,"up"),children:a.jsx(m1,{className:"w-4 h-4"})}),a.jsx(xe,{variant:"outline",size:"icon",disabled:I===y.length-1,onClick:()=>_(P,"down"),children:a.jsx(m2,{className:"w-4 h-4"})})]}),a.jsxs("div",{className:"flex gap-1",children:[a.jsx(xe,{variant:"outline",size:"icon",onClick:()=>A(P),children:a.jsx(Ql,{className:"w-4 h-4"})}),a.jsx(xe,{variant:"outline",size:"icon",className:"text-destructive hover:text-destructive",onClick:()=>i(P.id),children:a.jsx(da,{className:"w-4 h-4"})})]})]})]})})},P.id))}),a.jsx(sr,{open:t,onOpenChange:n,children:a.jsxs(Ln,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[a.jsx(or,{children:a.jsx(zn,{children:o?"Modifica Missione":"Nuova Missione"})}),a.jsxs("form",{onSubmit:R,className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a.jsxs("div",{className:"space-y-2 md:col-span-2",children:[a.jsx(X,{children:"Nome paese *"}),a.jsx(Se,{value:m.name,onChange:P=>g({...m,name:P.target.value}),required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Bandiera (emoji)"}),a.jsx(Se,{value:m.flag,onChange:P=>g({...m,flag:P.target.value}),placeholder:"🇧🇷"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Città / Località"}),a.jsx(Se,{value:m.city,onChange:P=>g({...m,city:P.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Anno inizio attività"}),a.jsx(Se,{value:m.since,onChange:P=>g({...m,since:P.target.value}),placeholder:"1995"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"N° bambini sostenuti"}),a.jsx(Se,{type:"number",value:m.students,onChange:P=>g({...m,students:Number(P.target.value)})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"N° progetti attivi"}),a.jsx(Se,{type:"number",value:m.projects,onChange:P=>g({...m,projects:Number(P.target.value)})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Ordine visualizzazione"}
1025),a.jsx(Se,{type:"number",value:m.display_order,onChange:P=>g({...m,display_order:Number(P.target.value)})})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Descrizione breve"}),a.jsx(Fe,{rows:3,value:m.description,onChange:P=>g({...m,description:P.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Descrizione estesa (separa i paragrafi con righe vuote)"}),a.jsx(Fe,{rows:8,value:m.full_description,onChange:P=>g({...m,full_description:P.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Risultati raggiunti (uno per riga)"}),a.jsx(Fe,{rows:3,value:m.achievements,onChange:P=>g({...m,achievements:P.target.value}),placeholder:`100+ diplomati
102612 laureati`})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Storie di successo (una per riga)"}),a.jsx(Fe,{rows:3,value:m.success_stories,onChange:P=>g({...m,success_stories:P.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Immagine"}),a.jsx(Mv,{value:m.image_url,onChange:P=>g({...m,image_url:P})})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a.jsxs("div",{className:"space-y-2 md:col-span-1",children:[a.jsx(X,{children:"Gradiente Tailwind"}),a.jsx(Se,{value:m.color_gradient,onChange:P=>g({...m,color_gradient:P.target.value}),placeholder:"from-green-400 to-blue-500"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Latitudine"}),a.jsx(Se,{type:"number",step:"any",value:m.latitude,onChange:P=>g({...m,latitude:P.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Longitudine"}),a.jsx(Se,{type:"number",step:"any",value:m.longitude,onChange:P=>g({...m,longitude:P.target.value})})]})]}),a.jsxs(xe,{type:"button",variant:"outline",onClick:N,disabled:u,className:"w-full gap-2",children:[u?a.jsx(qe,{className:"w-4 h-4 animate-spin"}):a.jsx(Lt,{className:"w-4 h-4"}),u?"Traduzione in corso...":"Traduci con AI in EN/ES/PT"]}),a.jsxs(ya,{open:f,onOpenChange:p,children:[a.jsx(xa,{asChild:!0,children:a.jsxs(xe,{type:"button",variant:"ghost",className:"w-full justify-between",children:["Traduzioni ",a.jsx(Kr,{className:`w-4 h-4 transition-transform ${f?"rotate-180":""}`})]})}),a.jsx(ba,{className:"space-y-4 pt-2",children:["en","es","pt"].map(P=>a.jsxs("div",{className:"border border-border rounded-lg p-3 space-y-2",children:[a.jsx("h4",{className:"font-semibold uppercase text-sm",children:P}),a.jsx(Se,{placeholder:"Nome",value:m[`name_${P}`],onChange:I=>g({...m,[`name_${P}`]:I.target.value})}),a.jsx(Se,{placeholder:"Città",value:m[`city_${P}`],onChange:I=>g({...m,[`city_${P}`]:I.target.value})}),a.jsx(Fe,{rows:2,placeholder:"Descrizione breve",value:m[`description_${P}`],onChange:I=>g({...m,[`description_${P}`]:I.target.value})}),a.jsx(Fe,{rows:5,placeholder:"Descrizione estesa",value:m[`full_description_${P}`],onChange:I=>g({...m,[`full_description_${P}`]:I.target.value})}),a.jsx(Fe,{rows:2,placeholder:"Risultati (uno per riga)",value:m[`achievements_${P}`],onChange:I=>g({...m,[`achievements_${P}`]:I.target.value})})]},P))})]}),a.jsxs("div",{className:"flex gap-3 pt-4",children:[a.jsx(xe,{type:"button",variant:"outline",onClick:k,className:"flex-1",children:"Annulla"}),a.jsxs(xe,{type:"submit",disabled:b.isPending||C.isPending,className:"flex-1",children:[(b.isPending||C.isPending)&&a.jsx(qe,{className:"w-4 h-4 animate-spin mr-2"}),o?"Aggiorna":"Crea"]})]})]})]})}),a.jsx(uc,{open:!!r,onOpenChange:P=>!P&&i(null),children:a.jsxs(wa,{children:[a.jsxs(_a,{children:[a.jsx(ja,{children:"Sei sicuro?"}),a.jsx(Na,{children:"Questa missione sarà eliminata permanentemente."})]}),a.jsxs(Sa,{children:[a.jsx(Ea,{children:"Annulla"}),a.jsx(Ca,{onClick:()=>r&&j.mutate(r),className:"bg-destructive text-destructive-foreground",children:"Elimina"})]})]})})]})},Q3=()=>{var g;const{user:e,isAdmin:t,loading:n,adminCheckLoading:r,signOut:i}=XS(),o=ov(),l=za(),[u,d]=x.useState(!1);x.useEffect(()=>{!n&&!r&&(!e||!t)&&o("/auth")},[e,t,n,r,o]);const f=async()=>{await i(),o("/")};if(n||r)return a.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:a.jsx(qe,{className:"w-8 h-8 animate-spin text-primary"})});if(!e||!t)return null;const p=[{path:"/admin",icon:S2,label:"Dashboard",exact:!0},{path:"/admin/news",icon:vd,label:"News"},{path:"/admin/gallery",icon:qg,label:"Galleria"},{path:"/admin/media",icon:Ug,label:"Media"},{path:"/admin/missions",icon:$g,label:"Missioni"},{path:"/admin/transparency",icon:x2,label:"Trasparenza"}],m=(y,w=!1)=>w?l.pathname===y:l.pathname.startsWith(y);return a.jsxs("div",{className:"min-h-screen bg-background flex",children:[u&&a.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 lg:hidden",onClick:()=>d(!1)}),a.jsx("aside",{className:`
1027        fixed lg:static inset-y-0 left-0 z-50
1028        w-64 bg-card border-r border-border
1029        transform transition-transform duration-300
1030        ${u?"translate-x-0":"-translate-x-full lg:translate-x-0"}
1031      `,children:a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsxs("div",{className:"p-6 border-b border-border flex items-center justify-between",children:[a.jsxs(Af,{to:"/",className:"flex items-center gap-3",children:[a.jsx("img",{src:Jj,alt:"Abbà ODV",className:"w-10 h-10 object-contain"}),a.jsx("span",{className:"font-semibold text-foreground",children:"Admin Panel"})]}),a.jsx("button",{onClick:()=>d(!1),className:"lg:hidden p-2 hover:bg-muted rounded-lg",children:a.jsx($s,{className:"w-5 h-5"})})]}),a.jsx("nav",{className:"flex-1 p-4 space-y-2",children:p.map(y=>a.jsxs(Af,{to:y.path,onClick:()=>d(!1),className:`
1032                  flex items-center gap-3 px-4 py-3 rounded-lg transition-all
1033                  ${m(y.path,y.exact)?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"}
1034                `,children:[a.jsx(y.icon,{className:"w-5 h-5"}),a.jsx("span",{className:"font-medium",children:y.label})]},y.path))}),a.jsxs("div",{className:"p-4 border-t border-border",children:[a.jsxs("div",{className:"mb-4 px-4 py-2",children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:"Loggato come"}),a.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:e.email})]}),a.jsxs(xe,{variant:"outline",className:"w-full justify-start gap-3",onClick:f,children:[a.jsx(N2,{className:"w-4 h-4"}),"Esci"]})]})]})}),a.jsxs("main",{className:"flex-1 flex flex-col min-h-screen",children:[a.jsx("header",{className:"sticky top-0 z-30 bg-card border-b border-border px-4 lg:px-8 py-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("button",{onClick:()=>d(!0),className:"lg:hidden p-2 hover:bg-muted rounded-lg",children:a.jsx(y1,{className:"w-5 h-5"})}),a.jsx("h1",{className:"text-lg font-semibold text-foreground lg:hidden",children:"Admin Panel"}),a.jsx("div",{className:"hidden lg:block",children:a.jsx("h1",{className:"text-xl font-semibold text-foreground",children:((g=p.find(y=>m(y.path,y.exact)))==null?void 0:g.label)||"Admin"})}),a.jsx(Af,{to:"/",className:"text-sm text-primary hover:underline",children:"Vai al sito →"})]})}),a.jsx("div",{className:"flex-1 p-4 lg:p-8",children:a.jsxs(IS,{children:[a.jsx(Jn,{index:!0,element:a.jsx(P4,{})}),a.jsx(Jn,{path:"news/*",element:a.jsx(U3,{})}),a.jsx(Jn,{path:"gallery/*",element:a.jsx(W3,{})}),a.jsx(Jn,{path:"media/*",element:a.jsx(H3,{})}),a.jsx(Jn,{path:"missions/*",element:a.jsx(Z3,{})}),a.jsx(Jn,{path:"transparency/*",element:a.jsx(K3,{})})]})})]})]})},Y3=new RR,J3=()=>a.jsx(DR,{client:Y3,children:a.jsx(OM,{children:a.jsx(TM,{children:a.jsxs(vR,{children:[a.jsx(pA,{}),a.jsx(VA,{}),a.jsx(UI,{children:a.jsxs(IS,{children:[a.jsx(Jn,{path:"/",element:a.jsx(C4,{})}),a.jsx(Jn,{path:"/auth",element:a.jsx(k4,{})}),a.jsx(Jn,{path:"/admin/*",element:a.jsx(Q3,{})}),a.jsx(Jn,{path:"*",element:a.jsx(E4,{})})]})})]})})})});F0(document.getElementById("root")).render(a.jsx(J3,{}));

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.