PageSourceSearch

https://moonalps.lovable.app/assets/index-BqZNJQJh.js

js moonalps.lovable.app collected 2026-10-03 03:33:19 UTC 790,207 bytes, 325 lines download raw bytes

vendor: 4,254 bytes, lines 1-9
1var Hg=e=>{throw TypeError(e)};var zd=(e,t,n)=>t.has(e)||Hg("Cannot "+n);var U=(e,t,n)=>(zd(e,t,"read from private field"),n?n.call(e):t.get(e)),Ne=(e,t,n)=>t.has(e)?Hg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ve=(e,t,n,r)=>(zd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),wt=(e,t,n)=>(zd(e,t,"access private method"),n);var Dl=(e,t,n,r)=>({set _(s){ve(e,t,s,n)},get _(){return U(e,t,r)}});function lT(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)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(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var uT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var j_={exports:{}},gc={},D_={exports:{}},ke={};/**
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 rl=Symbol.for("react.element"),cT=Symbol.for("react.portal"),dT=Symbol.for("react.fragment"),hT=Symbol.for("react.strict_mode"),fT=Symbol.for("react.profiler"),pT=Symbol.for("react.provider"),mT=Symbol.for("react.context"),gT=Symbol.for("react.forward_ref"),vT=Symbol.for("react.suspense"),yT=Symbol.for("react.memo"),_T=Symbol.for("react.lazy"),Vg=Symbol.iterator;function wT(e){return e===null||typeof e!="object"?null:(e=Vg&&e[Vg]||e["@@iterator"],typeof e=="function"?e:null)}var z_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B_=Object.assign,$_={};function xo(e,t,n){this.props=e,this.context=t,this.refs=$_,this.updater=n||z_}xo.prototype.isReactComponent={};xo.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")};xo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function F_(){}F_.prototype=xo.prototype;function wp(e,t,n){this.props=e,this.context=t,this.refs=$_,this.updater=n||z_}var xp=wp.prototype=new F_;xp.constructor=wp;B_(xp,xo.prototype);xp.isPureReactComponent=!0;var Wg=Array.isArray,U_=Object.prototype.hasOwnProperty,bp={current:null},H_={key:!0,ref:!0,__self:!0,__source:!0};function V_(e,t,n){var r,s={},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)U_.call(t,r)&&!H_.hasOwnProperty(r)&&(s[r]=t[r]);var u=arguments.length-2;if(u===1)s.children=n;else if(1<u){for(var c=Array(u),h=0;h<u;h++)c[h]=arguments[h+2];s.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)s[r]===void 0&&(s[r]=u[r]);return{$$typeof:rl,type:e,key:o,ref:l,props:s,_owner:bp.current}}function xT(e,t){return{$$typeof:rl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Sp(e){return typeof e=="object"&&e!==null&&e.$$typeof===rl}function bT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Gg=/\/+/g;function Bd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bT(""+e.key):t.toString(36)}
vendor: 11,022 bytes, lines 9-33
9function gu(e,t,n,r,s){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 rl:case cT:l=!0}}if(l)return l=e,s=s(l),e=r===""?"."+Bd(l,0):r,Wg(s)?(n="",e!=null&&(n=e.replace(Gg,"$&/")+"/"),gu(s,t,n,"",function(h){return h})):s!=null&&(Sp(s)&&(s=xT(s,n+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(Gg,"$&/")+"/")+e)),t.push(s)),1;if(l=0,r=r===""?".":r+":",Wg(e))for(var u=0;u<e.length;u++){o=e[u];var c=r+Bd(o,u);l+=gu(o,t,n,c,s)}else if(c=wT(e),typeof c=="function")for(e=c.call(e),u=0;!(o=e.next()).done;)o=o.value,c=r+Bd(o,u++),l+=gu(o,t,n,c,s);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 zl(e,t,n){if(e==null)return e;var r=[],s=0;return gu(e,r,"","",function(o){return t.call(n,o,s++)}),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 Ot={current:null},vu={transition:null},ET={ReactCurrentDispatcher:Ot,ReactCurrentBatchConfig:vu,ReactCurrentOwner:bp};function W_(){throw Error("act(...) is not supported in production builds of React.")}ke.Children={map:zl,forEach:function(e,t,n){zl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return zl(e,function(){t++}),t},toArray:function(e){return zl(e,function(t){return t})||[]},only:function(e){if(!Sp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Component=xo;ke.Fragment=dT;ke.Profiler=fT;ke.PureComponent=wp;ke.StrictMode=hT;ke.Suspense=vT;ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ET;ke.act=W_;ke.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=B_({},e.props),s=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&&(s=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)U_.call(t,c)&&!H_.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&u!==void 0?u[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){u=Array(c);for(var h=0;h<c;h++)u[h]=arguments[h+2];r.children=u}return{$$typeof:rl,type:e.type,key:s,ref:o,props:r,_owner:l}};ke.createContext=function(e){return e={$$typeof:mT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:pT,_context:e},e.Consumer=e};ke.createElement=V_;ke.createFactory=function(e){var t=V_.bind(null,e);return t.type=e,t};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:gT,render:e}};ke.isValidElement=Sp;ke.lazy=function(e){return{$$typeof:_T,_payload:{_status:-1,_result:e},_init:ST}};ke.memo=function(e,t){return{$$typeof:yT,type:e,compare:t===void 0?null:t}};ke.startTransition=function(e){var t=vu.transition;vu.transition={};try{e()}finally{vu.transition=t}};ke.unstable_act=W_;ke.useCallback=function(e,t){return Ot.current.useCallback(e,t)};ke.useContext=function(e){return Ot.current.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e){return Ot.current.useDeferredValue(e)};ke.useEffect=function(e,t){return Ot.current.useEffect(e,t)};ke.useId=function(){return Ot.current.useId()};ke.useImperativeHandle=function(e,t,n){return Ot.current.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return Ot.current.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return Ot.current.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return Ot.current.useMemo(e,t)};ke.useReducer=function(e,t,n){return Ot.current.useReducer(e,t,n)};ke.useRef=function(e){return Ot.current.useRef(e)};ke.useState=function(e){return Ot.current.useState(e)};ke.useSyncExternalStore=function(e,t,n){return Ot.current.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return Ot.current.useTransition()};ke.version="18.3.1";D_.exports=ke;var w=D_.exports;const J=_p(w),Ep=lT({__proto__:null,default:J},[w]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var TT=w,kT=Symbol.for("react.element"),CT=Symbol.for("react.fragment"),PT=Object.prototype.hasOwnProperty,RT=TT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,AT={key:!0,ref:!0,__self:!0,__source:!0};function G_(e,t,n){var r,s={},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)PT.call(t,r)&&!AT.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:kT,type:e,key:o,ref:l,props:s,_owner:RT.current}}gc.Fragment=CT;gc.jsx=G_;gc.jsxs=G_;j_.exports=gc;var m=j_.exports,q_={exports:{}},en={},K_={exports:{}},Z_={};/**
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(I,$){var F=I.length;I.push($);e:for(;0<F;){var X=F-1>>>1,ee=I[X];if(0<s(ee,$))I[X]=$,I[F]=ee,F=X;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var $=I[0],F=I.pop();if(F!==$){I[0]=F;e:for(var X=0,ee=I.length,le=ee>>>1;X<le;){var se=2*(X+1)-1,Y=I[se],ie=se+1,Z=I[ie];if(0>s(Y,F))ie<ee&&0>s(Z,Y)?(I[X]=Z,I[ie]=F,X=ie):(I[X]=Y,I[se]=F,X=se);else if(ie<ee&&0>s(Z,F))I[X]=Z,I[ie]=F,X=ie;else break e}}return $}function s(I,$){var F=I.sortIndex-$.sortIndex;return F!==0?F:I.id-$.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 c=[],h=[],p=1,g=null,v=3,_=!1,k=!1,y=!1,T=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(I){for(var $=n(h);$!==null;){if($.callback===null)r(h);else if($.startTime<=I)r(h),$.sortIndex=$.expirationTime,t(c,$);else break;$=n(h)}}function P(I){if(y=!1,x(I),!k)if(n(c)!==null)k=!0,W(R);else{var $=n(h);$!==null&&Q(P,$.startTime-I)}}function R(I,$){k=!1,y&&(y=!1,E(z),z=-1),_=!0;var F=v;try{for(x($),g=n(c);g!==null&&(!(g.expirationTime>$)||I&&!V());){var X=g.callback;if(typeof X=="function"){g.callback=null,v=g.priorityLevel;var ee=X(g.expirationTime<=$);$=e.unstable_now(),typeof ee=="function"?g.callback=ee:g===n(c)&&r(c),x($)}else r(c);g=n(c)}if(g!==null)var le=!0;else{var se=n(h);se!==null&&Q(P,se.startTime-$),le=!1}return le}finally{g=null,v=F,_=!1}}var N=!1,O=null,z=-1,D=5,j=-1;function V(){return!(e.unstable_now()-j<D)}function H(){if(O!==null){var I=e.unstable_now();j=I;var $=!0;try{$=O(!0,I)}finally{$?te():(N=!1,O=null)}}else N=!1}var te;if(typeof S=="function")te=function(){S(H)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,ne=G.port2;G.port1.onmessage=H,te=function(){ne.postMessage(null)}}else te=function(){T(H,0)};function W(I){O=I,N||(N=!0,te())}function Q(I,$){z=T(function(){I(e.unstable_now())},$)}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(I){I.callback=null},e.unstable_continueExecution=function(){k||_||(k=!0,W(R))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(I){switch(v){case 1:case 2:case 3:var $=3;break;default:$=v}var F=v;v=$;try{return I()}finally{v=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,$){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var F=v;v=I;try{return $()}finally{v=F}},e.unstable_scheduleCallback=function(I,$,F){var X=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?X+F:X):F=X,I){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=F+ee,I={id:p++,callback:$,priorityLevel:I,startTime:F,expirationTime:ee,sortIndex:-1},F>X?(I.sortIndex=F,t(h,I),n(c)===null&&I===n(h)&&(y?(E(z),z=-1):y=!0,Q(P,F-X))):(I.sortIndex=ee,t(c,I),k||_||(k=!0,W(R))),I},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(I){var $=v;return function(){var F=v;v=$;try{return I.apply(this,arguments)}finally{v=F}}}})(Z_);K_.exports=Z_;var NT=K_.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 OT=w,Xt=NT;function K(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 Y_=new Set,Ea={};function rs(e,t){co(e,t),co(e+"Capture",t)}function co(e,t){for(Ea[e]=t,e=0;e<t.length;e++)Y_.add(t[e])}var Sr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bh=Object.prototype.hasOwnProperty,LT=/^[: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]*$/,qg={},Kg={};function IT(e){return Bh.call(Kg,e)?!0:Bh.call(qg,e)?!1:LT.test(e)?Kg[e]=!0:(qg[e]=!0,!1)}function MT(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 jT(e,t,n,r){if(t===null||typeof t>"u"||MT(e,t,n,r))return!0;
vendor: 5,200 bytes, lines 33-34
33if(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 Lt(e,t,n,r,s,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var yt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){yt[e]=new Lt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];yt[t]=new Lt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){yt[e]=new Lt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){yt[e]=new Lt(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){yt[e]=new Lt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){yt[e]=new Lt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){yt[e]=new Lt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){yt[e]=new Lt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){yt[e]=new Lt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Tp=/[\-:]([a-z])/g;function kp(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(Tp,kp);yt[t]=new Lt(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(Tp,kp);yt[t]=new Lt(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(Tp,kp);yt[t]=new Lt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){yt[e]=new Lt(e,1,!1,e.toLowerCase(),null,!1,!1)});yt.xlinkHref=new Lt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){yt[e]=new Lt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Cp(e,t,n,r){var s=yt.hasOwnProperty(t)?yt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(jT(t,n,s,r)&&(n=null),r||s===null?IT(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Rr=OT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Bl=Symbol.for("react.element"),Ns=Symbol.for("react.portal"),Os=Symbol.for("react.fragment"),Pp=Symbol.for("react.strict_mode"),$h=Symbol.for("react.profiler"),J_=Symbol.for("react.provider"),Q_=Symbol.for("react.context"),Rp=Symbol.for("react.forward_ref"),Fh=Symbol.for("react.suspense"),Uh=Symbol.for("react.suspense_list"),Ap=Symbol.for("react.memo"),Ur=Symbol.for("react.lazy"),X_=Symbol.for("react.offscreen"),Zg=Symbol.iterator;function Go(e){return e===null||typeof e!="object"?null:(e=Zg&&e[Zg]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Object.assign,$d;function na(e){if($d===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$d=t&&t[1]||""}return`
34`+$d+e}var Fd=!1;function Ud(e,t){if(!e||Fd)return"";Fd=!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(h){var r=h}Reflect.construct(e,[],t)}else{try{t.call()}catch(h){r=h}e.call(t.prototype)}else{try{throw Error()}catch(h){r=h}e()}}
vendor: 15,597 bytes, lines 34-37
34catch(h){if(h&&r&&typeof h.stack=="string"){for(var s=h.stack.split(`
35`),o=r.stack.split(`
36`),l=s.length-1,u=o.length-1;1<=l&&0<=u&&s[l]!==o[u];)u--;for(;1<=l&&0<=u;l--,u--)if(s[l]!==o[u]){if(l!==1||u!==1)do if(l--,u--,0>u||s[l]!==o[u]){var c=`
37`+s[l].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=l&&0<=u);break}}}finally{Fd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?na(e):""}function DT(e){switch(e.tag){case 5:return na(e.type);case 16:return na("Lazy");case 13:return na("Suspense");case 19:return na("SuspenseList");case 0:case 2:case 15:return e=Ud(e.type,!1),e;case 11:return e=Ud(e.type.render,!1),e;case 1:return e=Ud(e.type,!0),e;default:return""}}function Hh(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 Os:return"Fragment";case Ns:return"Portal";case $h:return"Profiler";case Pp:return"StrictMode";case Fh:return"Suspense";case Uh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Q_:return(e.displayName||"Context")+".Consumer";case J_:return(e._context.displayName||"Context")+".Provider";case Rp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ap:return t=e.displayName||null,t!==null?t:Hh(e.type)||"Memo";case Ur:t=e._payload,e=e._init;try{return Hh(e(t))}catch{}}return null}function zT(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 Hh(t);case 8:return t===Pp?"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 ew(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function BT(e){var t=ew(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 s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.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 $l(e){e._valueTracker||(e._valueTracker=BT(e))}function tw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ew(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lu(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 Vh(e,t){var n=t.checked;return qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yg(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 nw(e,t){t=t.checked,t!=null&&Cp(e,"checked",t,!1)}function Wh(e,t){nw(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}t.hasOwnProperty("value")?Gh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Gh(e,t.type,di(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jg(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 Gh(e,t,n){(t!=="number"||Lu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ra=Array.isArray;function Vs(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+di(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function qh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(K(91));return qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(K(92));if(ra(n)){if(1<n.length)throw Error(K(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:di(n)}}function rw(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 Xg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function iw(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 Kh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?iw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Fl,sw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Fl=Fl||document.createElement("div"),Fl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Fl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ta(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ua={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(ua).forEach(function(e){$T.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ua[t]=ua[e]})});function ow(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ua.hasOwnProperty(e)&&ua[e]?(""+t).trim():t+"px"}function aw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=ow(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var FT=qe({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 Zh(e,t){if(t){if(FT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function Yh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jh=null;function Np(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qh=null,Ws=null,Gs=null;function ev(e){if(e=ol(e)){if(typeof Qh!="function")throw Error(K(280));var t=e.stateNode;t&&(t=xc(t),Qh(e.stateNode,e.type,t))}}function lw(e){Ws?Gs?Gs.push(e):Gs=[e]:Ws=e}function uw(){if(Ws){var e=Ws,t=Gs;if(Gs=Ws=null,ev(e),t)for(e=0;e<t.length;e++)ev(t[e])}}function cw(e,t){return e(t)}function dw(){}var Hd=!1;function hw(e,t,n){if(Hd)return e(t,n);Hd=!0;try{return cw(e,t,n)}finally{Hd=!1,(Ws!==null||Gs!==null)&&(dw(),uw())}}function ka(e,t){var n=e.stateNode;if(n===null)return null;var r=xc(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(K(231,t,typeof n));return n}var Xh=!1;if(Sr)try{var qo={};Object.defineProperty(qo,"passive",{get:function(){Xh=!0}}),window.addEventListener("test",qo,qo),window.removeEventListener("test",qo,qo)}catch{Xh=!1}function UT(e,t,n,r,s,o,l,u,c){var h=Array.prototype.slice.call(arguments,3);try{t.apply(n,h)}catch(p){this.onError(p)}}var ca=!1,Iu=null,Mu=!1,ef=null,HT={onError:function(e){ca=!0,Iu=e}};function VT(e,t,n,r,s,o,l,u,c){ca=!1,Iu=null,UT.apply(HT,arguments)}function WT(e,t,n,r,s,o,l,u,c){if(VT.apply(this,arguments),ca){if(ca){var h=Iu;ca=!1,Iu=null}else throw Error(K(198));Mu||(Mu=!0,ef=h)}}function is(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 fw(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 tv(e){if(is(e)!==e)throw Error(K(188))}function GT(e){var t=e.alternate;if(!t){if(t=is(e),t===null)throw Error(K(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return tv(s),e;if(o===r)return tv(s),t;o=o.sibling}throw Error(K(188))}if(n.return!==r.return)n=s,r=o;else{for(var l=!1,u=s.child;u;){if(u===n){l=!0,n=s,r=o;break}if(u===r){l=!0,r=s,n=o;break}u=u.sibling}if(!l){for(u=o.child;u;){if(u===n){l=!0,n=o,r=s;break}if(u===r){l=!0,r=o,n=s;break}u=u.sibling}if(!l)throw Error(K(189))}}if(n.alternate!==r)throw Error(K(190))}if(n.tag!==3)throw Error(K(188));return n.stateNode.current===n?e:t}function pw(e){return e=GT(e),e!==null?mw(e):null}function mw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=mw(e);if(t!==null)return t;e=e.sibling}return null}var gw=Xt.unstable_scheduleCallback,nv=Xt.unstable_cancelCallback,qT=Xt.unstable_shouldYield,KT=Xt.unstable_requestPaint,Xe=Xt.unstable_now,ZT=Xt.unstable_getCurrentPriorityLevel,Op=Xt.unstable_ImmediatePriority,vw=Xt.unstable_UserBlockingPriority,ju=Xt.unstable_NormalPriority,YT=Xt.unstable_LowPriority,yw=Xt.unstable_IdlePriority,vc=null,er=null;function JT(e){if(er&&typeof er.onCommitFiberRoot=="function")try{er.onCommitFiberRoot(vc,e,void 0,(e.current.flags&128)===128)}catch{}}var An=Math.clz32?Math.clz32:ek,QT=Math.log,XT=Math.LN2;function ek(e){return e>>>=0,e===0?32:31-(QT(e)/XT|0)|0}var Ul=64,Hl=4194304;function ia(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 Du(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var u=l&~s;u!==0?r=ia(u):(o&=l,o!==0&&(r=ia(o)))}else l=n&~s,l!==0?r=ia(l):o!==0&&(r=ia(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===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-An(t),s=1<<n,r|=e[n],t&=~s;return r}function tk(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 nk(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var l=31-An(o),u=1<<l,c=s[l];c===-1?(!(u&n)||u&r)&&(s[l]=tk(u,t)):c<=t&&(e.expiredLanes|=u),o&=~u}}function tf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _w(){var e=Ul;return Ul<<=1,!(Ul&4194240)&&(Ul=64),e}function Vd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function il(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-An(t),e[t]=n}function rk(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 s=31-An(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function Lp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-An(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Ie=0;function ww(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var xw,Ip,bw,Sw,Ew,nf=!1,Vl=[],ri=null,ii=null,si=null,Ca=new Map,Pa=new Map,Gr=[],ik="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 rv(e,t){switch(e){case"focusin":case"focusout":ri=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":Ca.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pa.delete(t.pointerId)}}function Ko(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=ol(t),t!==null&&Ip(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 12,661 bytes, line 37
37function sk(e,t,n,r,s){switch(t){case"focusin":return ri=Ko(ri,e,t,n,r,s),!0;case"dragenter":return ii=Ko(ii,e,t,n,r,s),!0;case"mouseover":return si=Ko(si,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return Ca.set(o,Ko(Ca.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Pa.set(o,Ko(Pa.get(o)||null,e,t,n,r,s)),!0}return!1}function Tw(e){var t=Mi(e.target);if(t!==null){var n=is(t);if(n!==null){if(t=n.tag,t===13){if(t=fw(n),t!==null){e.blockedOn=t,Ew(e.priority,function(){bw(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 yu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=rf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Jh=r,n.target.dispatchEvent(r),Jh=null}else return t=ol(n),t!==null&&Ip(t),e.blockedOn=n,!1;t.shift()}return!0}function iv(e,t,n){yu(e)&&n.delete(t)}function ok(){nf=!1,ri!==null&&yu(ri)&&(ri=null),ii!==null&&yu(ii)&&(ii=null),si!==null&&yu(si)&&(si=null),Ca.forEach(iv),Pa.forEach(iv)}function Zo(e,t){e.blockedOn===t&&(e.blockedOn=null,nf||(nf=!0,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,ok)))}function Ra(e){function t(s){return Zo(s,e)}if(0<Vl.length){Zo(Vl[0],e);for(var n=1;n<Vl.length;n++){var r=Vl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ri!==null&&Zo(ri,e),ii!==null&&Zo(ii,e),si!==null&&Zo(si,e),Ca.forEach(t),Pa.forEach(t),n=0;n<Gr.length;n++)r=Gr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Gr.length&&(n=Gr[0],n.blockedOn===null);)Tw(n),n.blockedOn===null&&Gr.shift()}var qs=Rr.ReactCurrentBatchConfig,zu=!0;function ak(e,t,n,r){var s=Ie,o=qs.transition;qs.transition=null;try{Ie=1,Mp(e,t,n,r)}finally{Ie=s,qs.transition=o}}function lk(e,t,n,r){var s=Ie,o=qs.transition;qs.transition=null;try{Ie=4,Mp(e,t,n,r)}finally{Ie=s,qs.transition=o}}function Mp(e,t,n,r){if(zu){var s=rf(e,t,n,r);if(s===null)eh(e,t,r,Bu,n),rv(e,r);else if(sk(s,e,t,n,r))r.stopPropagation();else if(rv(e,r),t&4&&-1<ik.indexOf(e)){for(;s!==null;){var o=ol(s);if(o!==null&&xw(o),o=rf(e,t,n,r),o===null&&eh(e,t,r,Bu,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else eh(e,t,r,null,n)}}var Bu=null;function rf(e,t,n,r){if(Bu=null,e=Np(r),e=Mi(e),e!==null)if(t=is(e),t===null)e=null;else if(n=t.tag,n===13){if(e=fw(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 Bu=e,null}function kw(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(ZT()){case Op:return 1;case vw:return 4;case ju:case YT:return 16;case yw:return 536870912;default:return 16}default:return 16}}var ei=null,jp=null,_u=null;function Cw(){if(_u)return _u;var e,t=jp,n=t.length,r,s="value"in ei?ei.value:ei.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===s[o-r];r++);return _u=s.slice(e,1<r?1-r:void 0)}function wu(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 Wl(){return!0}function sv(){return!1}function tn(e){function t(n,r,s,o,l){this._reactName=n,this._targetInst=s,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)?Wl:sv,this.isPropagationStopped=sv,this}return qe(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=Wl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),t}var bo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dp=tn(bo),sl=qe({},bo,{view:0,detail:0}),uk=tn(sl),Wd,Gd,Yo,yc=qe({},sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zp,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!==Yo&&(Yo&&e.type==="mousemove"?(Wd=e.screenX-Yo.screenX,Gd=e.screenY-Yo.screenY):Gd=Wd=0,Yo=e),Wd)},movementY:function(e){return"movementY"in e?e.movementY:Gd}}),ov=tn(yc),ck=qe({},yc,{dataTransfer:0}),dk=tn(ck),hk=qe({},sl,{relatedTarget:0}),qd=tn(hk),fk=qe({},bo,{animationName:0,elapsedTime:0,pseudoElement:0}),pk=tn(fk),mk=qe({},bo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gk=tn(mk),vk=qe({},bo,{data:0}),av=tn(vk),yk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_k={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"},wk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wk[e])?!!t[e]:!1}function zp(){return xk}var bk=qe({},sl,{key:function(e){if(e.key){var t=yk[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=wu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_k[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zp,charCode:function(e){return e.type==="keypress"?wu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Sk=tn(bk),Ek=qe({},yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lv=tn(Ek),Tk=qe({},sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zp}),kk=tn(Tk),Ck=qe({},bo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pk=tn(Ck),Rk=qe({},yc,{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}),Ak=tn(Rk),Nk=[9,13,27,32],Bp=Sr&&"CompositionEvent"in window,da=null;Sr&&"documentMode"in document&&(da=document.documentMode);var Ok=Sr&&"TextEvent"in window&&!da,Pw=Sr&&(!Bp||da&&8<da&&11>=da),uv=" ",cv=!1;function Rw(e,t){switch(e){case"keyup":return Nk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Aw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function Lk(e,t){switch(e){case"compositionend":return Aw(t);case"keypress":return t.which!==32?null:(cv=!0,uv);case"textInput":return e=t.data,e===uv&&cv?null:e;default:return null}}function Ik(e,t){if(Ls)return e==="compositionend"||!Bp&&Rw(e,t)?(e=Cw(),_u=jp=ei=null,Ls=!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 Pw&&t.locale!=="ko"?null:t.data;default:return null}}var Mk={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 dv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Mk[e.type]:t==="textarea"}function Nw(e,t,n,r){lw(r),t=$u(t,"onChange"),0<t.length&&(n=new Dp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ha=null,Aa=null;function jk(e){Uw(e,0)}function _c(e){var t=js(e);if(tw(t))return e}function Dk(e,t){if(e==="change")return t}var Ow=!1;if(Sr){var Kd;if(Sr){var Zd="oninput"in document;if(!Zd){var hv=document.createElement("div");hv.setAttribute("oninput","return;"),Zd=typeof hv.oninput=="function"}Kd=Zd}else Kd=!1;Ow=Kd&&(!document.documentMode||9<document.documentMode)}function fv(){ha&&(ha.detachEvent("onpropertychange",Lw),Aa=ha=null)}function Lw(e){if(e.propertyName==="value"&&_c(Aa)){var t=[];Nw(t,Aa,e,Np(e)),hw(jk,t)}}function zk(e,t,n){e==="focusin"?(fv(),ha=t,Aa=n,ha.attachEvent("onpropertychange",Lw)):e==="focusout"&&fv()}function Bk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _c(Aa)}function $k(e,t){if(e==="click")return _c(t)}function Fk(e,t){if(e==="input"||e==="change")return _c(t)}function Uk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var On=typeof Object.is=="function"?Object.is:Uk;function Na(e,t){if(On(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 s=n[r];if(!Bh.call(t,s)||!On(e[s],t[s]))return!1}return!0}function pv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mv(e,t){var n=pv(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=pv(n)}}function Iw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Iw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mw(){for(var e=window,t=Lu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lu(e.document)}return t}function $p(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 Hk(e){var t=Mw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Iw(n.ownerDocument.documentElement,n)){if(r!==null&&$p(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 s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=mv(n,o);var l=mv(n,r);s&&l&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(s.node,s.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 Vk=Sr&&"documentMode"in document&&11>=document.documentMode,Is=null,sf=null,fa=null,of=!1;
vendor: 4,672 bytes, line 37
37function gv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;of||Is==null||Is!==Lu(r)||(r=Is,"selectionStart"in r&&$p(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}),fa&&Na(fa,r)||(fa=r,r=$u(sf,"onSelect"),0<r.length&&(t=new Dp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Is)))}function Gl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ms={animationend:Gl("Animation","AnimationEnd"),animationiteration:Gl("Animation","AnimationIteration"),animationstart:Gl("Animation","AnimationStart"),transitionend:Gl("Transition","TransitionEnd")},Yd={},jw={};Sr&&(jw=document.createElement("div").style,"AnimationEvent"in window||(delete Ms.animationend.animation,delete Ms.animationiteration.animation,delete Ms.animationstart.animation),"TransitionEvent"in window||delete Ms.transitionend.transition);function wc(e){if(Yd[e])return Yd[e];if(!Ms[e])return e;var t=Ms[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jw)return Yd[e]=t[n];return e}var Dw=wc("animationend"),zw=wc("animationiteration"),Bw=wc("animationstart"),$w=wc("transitionend"),Fw=new Map,vv="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 mi(e,t){Fw.set(e,t),rs(t,[e])}for(var Jd=0;Jd<vv.length;Jd++){var Qd=vv[Jd],Wk=Qd.toLowerCase(),Gk=Qd[0].toUpperCase()+Qd.slice(1);mi(Wk,"on"+Gk)}mi(Dw,"onAnimationEnd");mi(zw,"onAnimationIteration");mi(Bw,"onAnimationStart");mi("dblclick","onDoubleClick");mi("focusin","onFocus");mi("focusout","onBlur");mi($w,"onTransitionEnd");co("onMouseEnter",["mouseout","mouseover"]);co("onMouseLeave",["mouseout","mouseover"]);co("onPointerEnter",["pointerout","pointerover"]);co("onPointerLeave",["pointerout","pointerover"]);rs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));rs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));rs("onBeforeInput",["compositionend","keypress","textInput","paste"]);rs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));rs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));rs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sa="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(" "),qk=new Set("cancel close invalid load scroll toggle".split(" ").concat(sa));function yv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,WT(r,t,void 0,e),e.currentTarget=null}function Uw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=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],c=u.instance,h=u.currentTarget;if(u=u.listener,c!==o&&s.isPropagationStopped())break e;yv(s,u,h),o=c}else for(l=0;l<r.length;l++){if(u=r[l],c=u.instance,h=u.currentTarget,u=u.listener,c!==o&&s.isPropagationStopped())break e;yv(s,u,h),o=c}}}if(Mu)throw e=ef,Mu=!1,ef=null,e}function $e(e,t){var n=t[df];n===void 0&&(n=t[df]=new Set);var r=e+"__bubble";n.has(r)||(Hw(t,e,2,!1),n.add(r))}function Xd(e,t,n){var r=0;t&&(r|=4),Hw(n,e,r,t)}var ql="_reactListening"+Math.random().toString(36).slice(2);function Oa(e){if(!e[ql]){e[ql]=!0,Y_.forEach(function(n){n!=="selectionchange"&&(qk.has(n)||Xd(n,!1,e),Xd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ql]||(t[ql]=!0,Xd("selectionchange",!1,t))}}function Hw(e,t,n,r){switch(kw(t)){case 1:var s=ak;break;case 4:s=lk;break;default:s=Mp}n=s.bind(null,t,n,e),s=void 0,!Xh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}
vendor: 4,454 bytes, line 37
37function eh(e,t,n,r,s){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;if(u===s||u.nodeType===8&&u.parentNode===s)break;if(l===4)for(l=r.return;l!==null;){var c=l.tag;if((c===3||c===4)&&(c=l.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;l=l.return}for(;u!==null;){if(l=Mi(u),l===null)return;if(c=l.tag,c===5||c===6){r=o=l;continue e}u=u.parentNode}}r=r.return}hw(function(){var h=o,p=Np(n),g=[];e:{var v=Fw.get(e);if(v!==void 0){var _=Dp,k=e;switch(e){case"keypress":if(wu(n)===0)break e;case"keydown":case"keyup":_=Sk;break;case"focusin":k="focus",_=qd;break;case"focusout":k="blur",_=qd;break;case"beforeblur":case"afterblur":_=qd;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":_=ov;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=dk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=kk;break;case Dw:case zw:case Bw:_=pk;break;case $w:_=Pk;break;case"scroll":_=uk;break;case"wheel":_=Ak;break;case"copy":case"cut":case"paste":_=gk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=lv}var y=(t&4)!==0,T=!y&&e==="scroll",E=y?v!==null?v+"Capture":null:v;y=[];for(var S=h,x;S!==null;){x=S;var P=x.stateNode;if(x.tag===5&&P!==null&&(x=P,E!==null&&(P=ka(S,E),P!=null&&y.push(La(S,P,x)))),T)break;S=S.return}0<y.length&&(v=new _(v,k,null,n,p),g.push({event:v,listeners:y}))}}if(!(t&7)){e:{if(v=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",v&&n!==Jh&&(k=n.relatedTarget||n.fromElement)&&(Mi(k)||k[Er]))break e;if((_||v)&&(v=p.window===p?p:(v=p.ownerDocument)?v.defaultView||v.parentWindow:window,_?(k=n.relatedTarget||n.toElement,_=h,k=k?Mi(k):null,k!==null&&(T=is(k),k!==T||k.tag!==5&&k.tag!==6)&&(k=null)):(_=null,k=h),_!==k)){if(y=ov,P="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(y=lv,P="onPointerLeave",E="onPointerEnter",S="pointer"),T=_==null?v:js(_),x=k==null?v:js(k),v=new y(P,S+"leave",_,n,p),v.target=T,v.relatedTarget=x,P=null,Mi(p)===h&&(y=new y(E,S+"enter",k,n,p),y.target=x,y.relatedTarget=T,P=y),T=P,_&&k)t:{for(y=_,E=k,S=0,x=y;x;x=vs(x))S++;for(x=0,P=E;P;P=vs(P))x++;for(;0<S-x;)y=vs(y),S--;for(;0<x-S;)E=vs(E),x--;for(;S--;){if(y===E||E!==null&&y===E.alternate)break t;y=vs(y),E=vs(E)}y=null}else y=null;_!==null&&_v(g,v,_,y,!1),k!==null&&T!==null&&_v(g,T,k,y,!0)}}e:{if(v=h?js(h):window,_=v.nodeName&&v.nodeName.toLowerCase(),_==="select"||_==="input"&&v.type==="file")var R=Dk;else if(dv(v))if(Ow)R=Fk;else{R=Bk;var N=zk}else(_=v.nodeName)&&_.toLowerCase()==="input"&&(v.type==="checkbox"||v.type==="radio")&&(R=$k);if(R&&(R=R(e,h))){Nw(g,R,n,p);break e}N&&N(e,v,h),e==="focusout"&&(N=v._wrapperState)&&N.controlled&&v.type==="number"&&Gh(v,"number",v.value)}switch(N=h?js(h):window,e){case"focusin":(dv(N)||N.contentEditable==="true")&&(Is=N,sf=h,fa=null);break;case"focusout":fa=sf=Is=null;break;case"mousedown":of=!0;break;case"contextmenu":case"mouseup":case"dragend":of=!1,gv(g,n,p);break;case"selectionchange":if(Vk)break;case"keydown":case"keyup":gv(g,n,p)}var O;if(Bp)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else Ls?Rw(e,n)&&(z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&(Pw&&n.locale!=="ko"&&(Ls||z!=="onCompositionStart"?z==="onCompositionEnd"&&Ls&&(O=Cw()):(ei=p,jp="value"in ei?ei.value:ei.textContent,Ls=!0)),N=$u(h,z),0<N.length&&(z=new av(z,e,null,n,p),g.push({event:z,listeners:N}),O?z.data=O:(O=Aw(n),O!==null&&(z.data=O)))),(O=Ok?Lk(e,n):Ik(e,n))&&(h=$u(h,"onBeforeInput"),0<h.length&&(p=new av("onBeforeInput","beforeinput",null,n,p),g.push({event:p,listeners:h}),p.data=O))}Uw(g,t)})}function La(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $u(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=ka(e,n),o!=null&&r.unshift(La(e,o,s)),o=ka(e,t),o!=null&&r.push(La(e,o,s))),e=e.return}return r}function vs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}
vendor: 4,594 bytes, lines 37-38
37function _v(e,t,n,r,s){for(var o=t._reactName,l=[];n!==null&&n!==r;){var u=n,c=u.alternate,h=u.stateNode;if(c!==null&&c===r)break;u.tag===5&&h!==null&&(u=h,s?(c=ka(n,o),c!=null&&l.unshift(La(n,c,u))):s||(c=ka(n,o),c!=null&&l.push(La(n,c,u)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Kk=/\r\n?/g,Zk=/\u0000|\uFFFD/g;function wv(e){return(typeof e=="string"?e:""+e).replace(Kk,`
38`).replace(Zk,"")}function Kl(e,t,n){if(t=wv(t),wv(e)!==t&&n)throw Error(K(425))}function Fu(){}var af=null,lf=null;function uf(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 cf=typeof setTimeout=="function"?setTimeout:void 0,Yk=typeof clearTimeout=="function"?clearTimeout:void 0,xv=typeof Promise=="function"?Promise:void 0,Jk=typeof queueMicrotask=="function"?queueMicrotask:typeof xv<"u"?function(e){return xv.resolve(null).then(e).catch(Qk)}:cf;function Qk(e){setTimeout(function(){throw e})}function th(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Ra(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Ra(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 bv(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 So=Math.random().toString(36).slice(2),Jn="__reactFiber$"+So,Ia="__reactProps$"+So,Er="__reactContainer$"+So,df="__reactEvents$"+So,Xk="__reactListeners$"+So,eC="__reactHandles$"+So;function Mi(e){var t=e[Jn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Er]||n[Jn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bv(e);e!==null;){if(n=e[Jn])return n;e=bv(e)}return t}e=n,n=e.parentNode}return null}function ol(e){return e=e[Jn]||e[Er],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function js(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(K(33))}function xc(e){return e[Ia]||null}var hf=[],Ds=-1;function gi(e){return{current:e}}function Fe(e){0>Ds||(e.current=hf[Ds],hf[Ds]=null,Ds--)}function ze(e,t){Ds++,hf[Ds]=e.current,e.current=t}var hi={},Tt=gi(hi),Bt=gi(!1),Ki=hi;function ho(e,t){var n=e.type.contextTypes;if(!n)return hi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function $t(e){return e=e.childContextTypes,e!=null}function Uu(){Fe(Bt),Fe(Tt)}function Sv(e,t,n){if(Tt.current!==hi)throw Error(K(168));ze(Tt,t),ze(Bt,n)}function Vw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(K(108,zT(e)||"Unknown",s));return qe({},n,r)}function Hu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hi,Ki=Tt.current,ze(Tt,e),ze(Bt,Bt.current),!0}function Ev(e,t,n){var r=e.stateNode;if(!r)throw Error(K(169));n?(e=Vw(e,t,Ki),r.__reactInternalMemoizedMergedChildContext=e,Fe(Bt),Fe(Tt),ze(Tt,e)):Fe(Bt),ze(Bt,n)}var yr=null,bc=!1,nh=!1;function Ww(e){yr===null?yr=[e]:yr.push(e)}function tC(e){bc=!0,Ww(e)}function vi(){if(!nh&&yr!==null){nh=!0;var e=0,t=Ie;try{var n=yr;for(Ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}yr=null,bc=!1}catch(s){throw yr!==null&&(yr=yr.slice(e+1)),gw(Op,vi),s}finally{Ie=t,nh=!1}}return null}var zs=[],Bs=0,Vu=null,Wu=0,an=[],ln=0,Zi=null,wr=1,xr="";function Ai(e,t){zs[Bs++]=Wu,zs[Bs++]=Vu,Vu=e,Wu=t}function Gw(e,t,n){an[ln++]=wr,an[ln++]=xr,an[ln++]=Zi,Zi=e;var r=wr;e=xr;var s=32-An(r)-1;r&=~(1<<s),n+=1;var o=32-An(t)+s;if(30<o){var l=s-s%5;o=(r&(1<<l)-1).toString(32),r>>=l,s-=l,wr=1<<32-An(t)+s|n<<s|r,xr=o+e}else wr=1<<o|n<<s|r,xr=e}function Fp(e){e.return!==null&&(Ai(e,1),Gw(e,1,0))}function Up(e){for(;e===Vu;)Vu=zs[--Bs],zs[Bs]=null,Wu=zs[--Bs],zs[Bs]=null;for(;e===Zi;)Zi=an[--ln],an[ln]=null,xr=an[--ln],an[ln]=null,wr=an[--ln],an[ln]=null}var Jt=null,Yt=null,Ue=!1,Rn=null;function qw(e,t){var n=un(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 Tv(e,t){switch(e.tag){case 5:var n=e.type;
vendor: 16,528 bytes, line 38
38return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Jt=e,Yt=oi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Jt=e,Yt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Zi!==null?{id:wr,overflow:xr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=un(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Jt=e,Yt=null,!0):!1;default:return!1}}function ff(e){return(e.mode&1)!==0&&(e.flags&128)===0}function pf(e){if(Ue){var t=Yt;if(t){var n=t;if(!Tv(e,t)){if(ff(e))throw Error(K(418));t=oi(n.nextSibling);var r=Jt;t&&Tv(e,t)?qw(r,n):(e.flags=e.flags&-4097|2,Ue=!1,Jt=e)}}else{if(ff(e))throw Error(K(418));e.flags=e.flags&-4097|2,Ue=!1,Jt=e}}}function kv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Jt=e}function Zl(e){if(e!==Jt)return!1;if(!Ue)return kv(e),Ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!uf(e.type,e.memoizedProps)),t&&(t=Yt)){if(ff(e))throw Kw(),Error(K(418));for(;t;)qw(e,t),t=oi(t.nextSibling)}if(kv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(K(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Yt=oi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Yt=null}}else Yt=Jt?oi(e.stateNode.nextSibling):null;return!0}function Kw(){for(var e=Yt;e;)e=oi(e.nextSibling)}function fo(){Yt=Jt=null,Ue=!1}function Hp(e){Rn===null?Rn=[e]:Rn.push(e)}var nC=Rr.ReactCurrentBatchConfig;function Jo(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(K(309));var r=n.stateNode}if(!r)throw Error(K(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(l){var u=s.refs;l===null?delete u[o]:u[o]=l},t._stringRef=o,t)}if(typeof e!="string")throw Error(K(284));if(!n._owner)throw Error(K(290,e))}return e}function Yl(e,t){throw e=Object.prototype.toString.call(t),Error(K(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Cv(e){var t=e._init;return t(e._payload)}function Zw(e){function t(E,S){if(e){var x=E.deletions;x===null?(E.deletions=[S],E.flags|=16):x.push(S)}}function n(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function r(E,S){for(E=new Map;S!==null;)S.key!==null?E.set(S.key,S):E.set(S.index,S),S=S.sibling;return E}function s(E,S){return E=ci(E,S),E.index=0,E.sibling=null,E}function o(E,S,x){return E.index=x,e?(x=E.alternate,x!==null?(x=x.index,x<S?(E.flags|=2,S):x):(E.flags|=2,S)):(E.flags|=1048576,S)}function l(E){return e&&E.alternate===null&&(E.flags|=2),E}function u(E,S,x,P){return S===null||S.tag!==6?(S=uh(x,E.mode,P),S.return=E,S):(S=s(S,x),S.return=E,S)}function c(E,S,x,P){var R=x.type;return R===Os?p(E,S,x.props.children,P,x.key):S!==null&&(S.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ur&&Cv(R)===S.type)?(P=s(S,x.props),P.ref=Jo(E,S,x),P.return=E,P):(P=Cu(x.type,x.key,x.props,null,E.mode,P),P.ref=Jo(E,S,x),P.return=E,P)}function h(E,S,x,P){return S===null||S.tag!==4||S.stateNode.containerInfo!==x.containerInfo||S.stateNode.implementation!==x.implementation?(S=ch(x,E.mode,P),S.return=E,S):(S=s(S,x.children||[]),S.return=E,S)}function p(E,S,x,P,R){return S===null||S.tag!==7?(S=qi(x,E.mode,P,R),S.return=E,S):(S=s(S,x),S.return=E,S)}function g(E,S,x){if(typeof S=="string"&&S!==""||typeof S=="number")return S=uh(""+S,E.mode,x),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Bl:return x=Cu(S.type,S.key,S.props,null,E.mode,x),x.ref=Jo(E,null,S),x.return=E,x;case Ns:return S=ch(S,E.mode,x),S.return=E,S;case Ur:var P=S._init;return g(E,P(S._payload),x)}if(ra(S)||Go(S))return S=qi(S,E.mode,x,null),S.return=E,S;Yl(E,S)}return null}function v(E,S,x,P){var R=S!==null?S.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return R!==null?null:u(E,S,""+x,P);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Bl:return x.key===R?c(E,S,x,P):null;case Ns:return x.key===R?h(E,S,x,P):null;case Ur:return R=x._init,v(E,S,R(x._payload),P)}if(ra(x)||Go(x))return R!==null?null:p(E,S,x,P,null);Yl(E,x)}return null}function _(E,S,x,P,R){if(typeof P=="string"&&P!==""||typeof P=="number")return E=E.get(x)||null,u(S,E,""+P,R);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case Bl:return E=E.get(P.key===null?x:P.key)||null,c(S,E,P,R);case Ns:return E=E.get(P.key===null?x:P.key)||null,h(S,E,P,R);case Ur:var N=P._init;return _(E,S,x,N(P._payload),R)}if(ra(P)||Go(P))return E=E.get(x)||null,p(S,E,P,R,null);Yl(S,P)}return null}function k(E,S,x,P){for(var R=null,N=null,O=S,z=S=0,D=null;O!==null&&z<x.length;z++){O.index>z?(D=O,O=null):D=O.sibling;var j=v(E,O,x[z],P);if(j===null){O===null&&(O=D);break}e&&O&&j.alternate===null&&t(E,O),S=o(j,S,z),N===null?R=j:N.sibling=j,N=j,O=D}if(z===x.length)return n(E,O),Ue&&Ai(E,z),R;if(O===null){for(;z<x.length;z++)O=g(E,x[z],P),O!==null&&(S=o(O,S,z),N===null?R=O:N.sibling=O,N=O);return Ue&&Ai(E,z),R}for(O=r(E,O);z<x.length;z++)D=_(O,E,z,x[z],P),D!==null&&(e&&D.alternate!==null&&O.delete(D.key===null?z:D.key),S=o(D,S,z),N===null?R=D:N.sibling=D,N=D);return e&&O.forEach(function(V){return t(E,V)}),Ue&&Ai(E,z),R}function y(E,S,x,P){var R=Go(x);if(typeof R!="function")throw Error(K(150));if(x=R.call(x),x==null)throw Error(K(151));for(var N=R=null,O=S,z=S=0,D=null,j=x.next();O!==null&&!j.done;z++,j=x.next()){O.index>z?(D=O,O=null):D=O.sibling;var V=v(E,O,j.value,P);if(V===null){O===null&&(O=D);break}e&&O&&V.alternate===null&&t(E,O),S=o(V,S,z),N===null?R=V:N.sibling=V,N=V,O=D}if(j.done)return n(E,O),Ue&&Ai(E,z),R;if(O===null){for(;!j.done;z++,j=x.next())j=g(E,j.value,P),j!==null&&(S=o(j,S,z),N===null?R=j:N.sibling=j,N=j);return Ue&&Ai(E,z),R}for(O=r(E,O);!j.done;z++,j=x.next())j=_(O,E,z,j.value,P),j!==null&&(e&&j.alternate!==null&&O.delete(j.key===null?z:j.key),S=o(j,S,z),N===null?R=j:N.sibling=j,N=j);return e&&O.forEach(function(H){return t(E,H)}),Ue&&Ai(E,z),R}function T(E,S,x,P){if(typeof x=="object"&&x!==null&&x.type===Os&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Bl:e:{for(var R=x.key,N=S;N!==null;){if(N.key===R){if(R=x.type,R===Os){if(N.tag===7){n(E,N.sibling),S=s(N,x.props.children),S.return=E,E=S;break e}}else if(N.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ur&&Cv(R)===N.type){n(E,N.sibling),S=s(N,x.props),S.ref=Jo(E,N,x),S.return=E,E=S;break e}n(E,N);break}else t(E,N);N=N.sibling}x.type===Os?(S=qi(x.props.children,E.mode,P,x.key),S.return=E,E=S):(P=Cu(x.type,x.key,x.props,null,E.mode,P),P.ref=Jo(E,S,x),P.return=E,E=P)}return l(E);case Ns:e:{for(N=x.key;S!==null;){if(S.key===N)if(S.tag===4&&S.stateNode.containerInfo===x.containerInfo&&S.stateNode.implementation===x.implementation){n(E,S.sibling),S=s(S,x.children||[]),S.return=E,E=S;break e}else{n(E,S);break}else t(E,S);S=S.sibling}S=ch(x,E.mode,P),S.return=E,E=S}return l(E);case Ur:return N=x._init,T(E,S,N(x._payload),P)}if(ra(x))return k(E,S,x,P);if(Go(x))return y(E,S,x,P);Yl(E,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,S!==null&&S.tag===6?(n(E,S.sibling),S=s(S,x),S.return=E,E=S):(n(E,S),S=uh(x,E.mode,P),S.return=E,E=S),l(E)):n(E,S)}return T}var po=Zw(!0),Yw=Zw(!1),Gu=gi(null),qu=null,$s=null,Vp=null;function Wp(){Vp=$s=qu=null}function Gp(e){var t=Gu.current;Fe(Gu),e._currentValue=t}function mf(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 Ks(e,t){qu=e,Vp=$s=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(zt=!0),e.firstContext=null)}function dn(e){var t=e._currentValue;if(Vp!==e)if(e={context:e,memoizedValue:t,next:null},$s===null){if(qu===null)throw Error(K(308));$s=e,qu.dependencies={lanes:0,firstContext:e}}else $s=$s.next=e;return t}var ji=null;function qp(e){ji===null?ji=[e]:ji.push(e)}function Jw(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,qp(t)):(n.next=s.next,s.next=n),t.interleaved=n,Tr(e,r)}function Tr(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 Hr=!1;function Kp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qw(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 br(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ai(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Re&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Tr(e,n)}return s=r.interleaved,s===null?(t.next=t,qp(r)):(t.next=s.next,s.next=t),r.interleaved=t,Tr(e,n)}function xu(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,Lp(e,n)}}function Pv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=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?s=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,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 Ku(e,t,n,r){var s=e.updateQueue;Hr=!1;var o=s.firstBaseUpdate,l=s.lastBaseUpdate,u=s.shared.pending;if(u!==null){s.shared.pending=null;var c=u,h=c.next;c.next=null,l===null?o=h:l.next=h,l=c;var p=e.alternate;p!==null&&(p=p.updateQueue,u=p.lastBaseUpdate,u!==l&&(u===null?p.firstBaseUpdate=h:u.next=h,p.lastBaseUpdate=c))}if(o!==null){var g=s.baseState;l=0,p=h=c=null,u=o;do{var v=u.lane,_=u.eventTime;if((r&v)===v){p!==null&&(p=p.next={eventTime:_,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var k=e,y=u;switch(v=t,_=n,y.tag){case 1:if(k=y.payload,typeof k=="function"){g=k.call(_,g,v);break e}g=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=y.payload,v=typeof k=="function"?k.call(_,g,v):k,v==null)break e;g=qe({},g,v);break e;case 2:Hr=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,v=s.effects,v===null?s.effects=[u]:v.push(u))}else _={eventTime:_,lane:v,tag:u.tag,payload:u.payload,callback:u.callback,next:null},p===null?(h=p=_,c=g):p=p.next=_,l|=v;if(u=u.next,u===null){if(u=s.shared.pending,u===null)break;v=u,u=v.next,v.next=null,s.lastBaseUpdate=v,s.shared.pending=null}}while(!0);if(p===null&&(c=g),s.baseState=c,s.firstBaseUpdate=h,s.lastBaseUpdate=p,t=s.shared.interleaved,t!==null){s=t;do l|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Ji|=l,e.lanes=l,e.memoizedState=g}}function Rv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(K(191,s));s.call(r)}}}var al={},tr=gi(al),Ma=gi(al),ja=gi(al);function Di(e){if(e===al)throw Error(K(174));return e}function Zp(e,t){switch(ze(ja,t),ze(Ma,e),ze(tr,al),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Kh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Kh(t,e)}Fe(tr),ze(tr,t)}function mo(){Fe(tr),Fe(Ma),Fe(ja)}function Xw(e){Di(ja.current);var t=Di(tr.current),n=Kh(t,e.type);t!==n&&(ze(Ma,e),ze(tr,n))}function Yp(e){Ma.current===e&&(Fe(tr),Fe(Ma))}var We=gi(0);function Zu(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 rh=[];function Jp(){for(var e=0;e<rh.length;e++)rh[e]._workInProgressVersionPrimary=null;rh.length=0}var bu=Rr.ReactCurrentDispatcher,ih=Rr.ReactCurrentBatchConfig,Yi=0,Ge=null,ot=null,ct=null,Yu=!1,pa=!1,Da=0,rC=0;function xt(){throw Error(K(321))}function Qp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!On(e[n],t[n]))return!1;return!0}function Xp(e,t,n,r,s,o){if(Yi=o,Ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bu.current=e===null||e.memoizedState===null?aC:lC,e=n(r,s),pa){o=0;do{if(pa=!1,Da=0,25<=o)throw Error(K(301));o+=1,ct=ot=null,t.updateQueue=null,bu.current=uC,e=n(r,s)}while(pa)}if(bu.current=Ju,t=ot!==null&&ot.next!==null,Yi=0,ct=ot=Ge=null,Yu=!1,t)throw Error(K(300));return e}function em(){var e=Da!==0;return Da=0,e}function qn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?Ge.memoizedState=ct=e:ct=ct.next=e,ct}function hn(){if(ot===null){var e=Ge.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=ct===null?Ge.memoizedState:ct.next;if(t!==null)ct=t,ot=e;else{if(e===null)throw Error(K(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},ct===null?Ge.memoizedState=ct=e:ct=ct.next=e}return ct}function za(e,t){return typeof t=="function"?t(e):t}function sh(e){var t=hn(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=ot,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var l=s.next;s.next=o.next,o.next=l}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var u=l=null,c=null,h=o;do{var p=h.lane;if((Yi&p)===p)c!==null&&(c=c.next={lane:0,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null}),r=h.hasEagerState?h.eagerState:e(r,h.action);else{var g={lane:p,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null};c===null?(u=c=g,l=r):c=c.next=g,Ge.lanes|=p,Ji|=p}h=h.next}while(h!==null&&h!==o);c===null?l=r:c.next=u,On(r,t.memoizedState)||(zt=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,Ge.lanes|=o,Ji|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function oh(e){var t=hn(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var l=s=s.next;do o=e(o,l.action),l=l.next;while(l!==s);On(o,t.memoizedState)||(zt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function e0(){}function t0(e,t){var n=Ge,r=hn(),s=t(),o=!On(r.memoizedState,s);if(o&&(r.memoizedState=s,zt=!0),r=r.queue,tm(i0.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ct!==null&&ct.memoizedState.tag&1){if(n.flags|=2048,Ba(9,r0.bind(null,n,r,s,t),void 0,null),dt===null)throw Error(K(349));Yi&30||n0(n,t,s)}return s}function n0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores:null},Ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function r0(e,t,n,r){t.value=n,t.getSnapshot=r,s0(t)&&o0(e)}function i0(e,t,n){return n(function(){s0(t)&&o0(e)})}function s0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!On(e,n)}catch{return!0}}function o0(e){var t=Tr(e,1);t!==null&&Nn(t,e,1,-1)}function Av(e){var t=qn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:za,lastRenderedState:e},t.queue=e,e=e.dispatch=oC.bind(null,Ge,e),[t.memoizedState,e]}function Ba(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores:null},Ge.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 a0(){return hn().memoizedState}function Su(e,t,n,r){var s=qn();Ge.flags|=e,s.memoizedState=Ba(1|t,n,void 0,r===void 0?null:r)}function Sc(e,t,n,r){var s=hn();r=r===void 0?null:r;var o=void 0;if(ot!==null){var l=ot.memoizedState;if(o=l.destroy,r!==null&&Qp(r,l.deps)){s.memoizedState=Ba(t,n,o,r);return}}Ge.flags|=e,s.memoizedState=Ba(1|t,n,o,r)}
vendor: 4,340 bytes, line 38
38function Nv(e,t){return Su(8390656,8,e,t)}function tm(e,t){return Sc(2048,8,e,t)}function l0(e,t){return Sc(4,2,e,t)}function u0(e,t){return Sc(4,4,e,t)}function c0(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 d0(e,t,n){return n=n!=null?n.concat([e]):null,Sc(4,4,c0.bind(null,t,e),n)}function nm(){}function h0(e,t){var n=hn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Qp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function f0(e,t){var n=hn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Qp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function p0(e,t,n){return Yi&21?(On(n,t)||(n=_w(),Ge.lanes|=n,Ji|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,zt=!0),e.memoizedState=n)}function iC(e,t){var n=Ie;Ie=n!==0&&4>n?n:4,e(!0);var r=ih.transition;ih.transition={};try{e(!1),t()}finally{Ie=n,ih.transition=r}}function m0(){return hn().memoizedState}function sC(e,t,n){var r=ui(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},g0(e))v0(t,n);else if(n=Jw(e,t,n,r),n!==null){var s=Nt();Nn(n,e,r,s),y0(n,t,r)}}function oC(e,t,n){var r=ui(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(g0(e))v0(t,s);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(s.hasEagerState=!0,s.eagerState=u,On(u,l)){var c=t.interleaved;c===null?(s.next=s,qp(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=Jw(e,t,s,r),n!==null&&(s=Nt(),Nn(n,e,r,s),y0(n,t,r))}}function g0(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function v0(e,t){pa=Yu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function y0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lp(e,n)}}var Ju={readContext:dn,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},aC={readContext:dn,useCallback:function(e,t){return qn().memoizedState=[e,t===void 0?null:t],e},useContext:dn,useEffect:Nv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Su(4194308,4,c0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Su(4194308,4,e,t)},useInsertionEffect:function(e,t){return Su(4,2,e,t)},useMemo:function(e,t){var n=qn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qn();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=sC.bind(null,Ge,e),[r.memoizedState,e]},useRef:function(e){var t=qn();return e={current:e},t.memoizedState=e},useState:Av,useDebugValue:nm,useDeferredValue:function(e){return qn().memoizedState=e},useTransition:function(){var e=Av(!1),t=e[0];return e=iC.bind(null,e[1]),qn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ge,s=qn();if(Ue){if(n===void 0)throw Error(K(407));n=n()}else{if(n=t(),dt===null)throw Error(K(349));Yi&30||n0(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Nv(i0.bind(null,r,o,e),[e]),r.flags|=2048,Ba(9,r0.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=qn(),t=dt.identifierPrefix;if(Ue){var n=xr,r=wr;n=(r&~(1<<32-An(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Da++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=rC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lC={readContext:dn,useCallback:h0,useContext:dn,useEffect:tm,useImperativeHandle:d0,useInsertionEffect:l0,useLayoutEffect:u0,useMemo:f0,useReducer:sh,useRef:a0,useState:function(){return sh(za)},useDebugValue:nm,useDeferredValue:function(e){var t=hn();return p0(t,ot.memoizedState,e)},useTransition:function(){var e=sh(za)[0],t=hn().memoizedState;return[e,t]},useMutableSource:e0,useSyncExternalStore:t0,useId:m0,unstable_isNewReconciler:!1},uC={readContext:dn,useCallback:h0,useContext:dn,useEffect:tm,useImperativeHandle:d0,useInsertionEffect:l0,useLayoutEffect:u0,useMemo:f0,useReducer:oh,useRef
vendor: 4,086 bytes, lines 38-40
38:a0,useState:function(){return oh(za)},useDebugValue:nm,useDeferredValue:function(e){var t=hn();return ot===null?t.memoizedState=e:p0(t,ot.memoizedState,e)},useTransition:function(){var e=oh(za)[0],t=hn().memoizedState;return[e,t]},useMutableSource:e0,useSyncExternalStore:t0,useId:m0,unstable_isNewReconciler:!1};function bn(e,t){if(e&&e.defaultProps){t=qe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function gf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ec={isMounted:function(e){return(e=e._reactInternals)?is(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Nt(),s=ui(e),o=br(r,s);o.payload=t,n!=null&&(o.callback=n),t=ai(e,o,s),t!==null&&(Nn(t,e,s,r),xu(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Nt(),s=ui(e),o=br(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ai(e,o,s),t!==null&&(Nn(t,e,s,r),xu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Nt(),r=ui(e),s=br(n,r);s.tag=2,t!=null&&(s.callback=t),t=ai(e,s,r),t!==null&&(Nn(t,e,r,n),xu(t,e,r))}};function Ov(e,t,n,r,s,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,l):t.prototype&&t.prototype.isPureReactComponent?!Na(n,r)||!Na(s,o):!0}function _0(e,t,n){var r=!1,s=hi,o=t.contextType;return typeof o=="object"&&o!==null?o=dn(o):(s=$t(t)?Ki:Tt.current,r=t.contextTypes,o=(r=r!=null)?ho(e,s):hi),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ec,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Lv(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&&Ec.enqueueReplaceState(t,t.state,null)}function vf(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Kp(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=dn(o):(o=$t(t)?Ki:Tt.current,s.context=ho(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(gf(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Ec.enqueueReplaceState(s,s.state,null),Ku(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function go(e,t){try{var n="",r=t;do n+=DT(r),r=r.return;while(r);var s=n}catch(o){s=`
39Error generating stack: `+o.message+`
40`+o.stack}return{value:e,source:t,stack:s,digest:null}}function ah(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function yf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var cC=typeof WeakMap=="function"?WeakMap:Map;function w0(e,t,n){n=br(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xu||(Xu=!0,Pf=r),yf(e,t)},n}function x0(e,t,n){n=br(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){yf(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){yf(e,t),typeof r!="function"&&(li===null?li=new Set([this]):li.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Iv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new cC;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=EC.bind(null,e,t,n),t.then(e,e))}function Mv(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}
vendor: 10,242 bytes, line 40
40function jv(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,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=br(-1,1),t.tag=2,ai(n,t,1))),n.lanes|=1),e)}var dC=Rr.ReactCurrentOwner,zt=!1;function Rt(e,t,n,r){t.child=e===null?Yw(t,null,n,r):po(t,e.child,n,r)}function Dv(e,t,n,r,s){n=n.render;var o=t.ref;return Ks(t,s),r=Xp(e,t,n,r,o,s),n=em(),e!==null&&!zt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,kr(e,t,s)):(Ue&&n&&Fp(t),t.flags|=1,Rt(e,t,r,s),t.child)}function zv(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!cm(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,b0(e,t,o,r,s)):(e=Cu(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Na,n(l,r)&&e.ref===t.ref)return kr(e,t,s)}return t.flags|=1,e=ci(o,r),e.ref=t.ref,e.return=t,t.child=e}function b0(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(Na(o,r)&&e.ref===t.ref)if(zt=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(zt=!0);else return t.lanes=e.lanes,kr(e,t,s)}return _f(e,t,n,r,s)}function S0(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ze(Us,Gt),Gt|=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,ze(Us,Gt),Gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ze(Us,Gt),Gt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ze(Us,Gt),Gt|=r;return Rt(e,t,s,n),t.child}function E0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _f(e,t,n,r,s){var o=$t(n)?Ki:Tt.current;return o=ho(t,o),Ks(t,s),n=Xp(e,t,n,r,o,s),r=em(),e!==null&&!zt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,kr(e,t,s)):(Ue&&r&&Fp(t),t.flags|=1,Rt(e,t,n,s),t.child)}function Bv(e,t,n,r,s){if($t(n)){var o=!0;Hu(t)}else o=!1;if(Ks(t,s),t.stateNode===null)Eu(e,t),_0(t,n,r),vf(t,n,r,s),r=!0;else if(e===null){var l=t.stateNode,u=t.memoizedProps;l.props=u;var c=l.context,h=n.contextType;typeof h=="object"&&h!==null?h=dn(h):(h=$t(n)?Ki:Tt.current,h=ho(t,h));var p=n.getDerivedStateFromProps,g=typeof p=="function"||typeof l.getSnapshotBeforeUpdate=="function";g||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==r||c!==h)&&Lv(t,l,r,h),Hr=!1;var v=t.memoizedState;l.state=v,Ku(t,r,l,s),c=t.memoizedState,u!==r||v!==c||Bt.current||Hr?(typeof p=="function"&&(gf(t,n,p,r),c=t.memoizedState),(u=Hr||Ov(t,n,u,r,v,c,h))?(g||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=c),l.props=r,l.state=c,l.context=h,r=u):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Qw(e,t),u=t.memoizedProps,h=t.type===t.elementType?u:bn(t.type,u),l.props=h,g=t.pendingProps,v=l.context,c=n.contextType,typeof c=="object"&&c!==null?c=dn(c):(c=$t(n)?Ki:Tt.current,c=ho(t,c));var _=n.getDerivedStateFromProps;(p=typeof _=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==g||v!==c)&&Lv(t,l,r,c),Hr=!1,v=t.memoizedState,l.state=v,Ku(t,r,l,s);var k=t.memoizedState;u!==g||v!==k||Bt.current||Hr?(typeof _=="function"&&(gf(t,n,_,r),k=t.memoizedState),(h=Hr||Ov(t,n,h,r,v,k,c)||!1)?(p||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,k,c),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,k,c)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||u===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),l.props=r,l.state=k,l.context=c,r=h):(typeof l.componentDidUpdate!="function"||u===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),r=!1)}return wf(e,t,n,r,o,s)}function wf(e,t,n,r,s,o){E0(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return s&&Ev(t,n,!1),kr(e,t,o);r=t.stateNode,dC.current=t;var u=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=po(t,e.child,null,o),t.child=po(t,null,u,o)):Rt(e,t,u,o),t.memoizedState=r.state,s&&Ev(t,n,!0),t.child}function T0(e){var t=e.stateNode;t.pendingContext?Sv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Sv(e,t.context,!1),Zp(e,t.containerInfo)}function $v(e,t,n,r,s){return fo(),Hp(s),t.flags|=256,Rt(e,t,n,r),t.child}var xf={dehydrated:null,treeContext:null,retryLane:0};function bf(e){return{baseLanes:e,cachePool:null,transitions:null}}function k0(e,t,n){var r=t.pendingProps,s=We.current,o=!1,l=(t.flags&128)!==0,u;if((u=l)||(u=e!==null&&e.memoizedState===null?!1:(s&2)!==0),u?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ze(We,s&1),e===null)return pf(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=Cc(l,r,0,null),e=qi(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=bf(n),t.memoizedState=xf,e):rm(t,l));if(s=e.memoizedState,s!==null&&(u=s.dehydrated,u!==null))return hC(e,t,l,r,u,s,n);if(o){o=r.fallback,l=t.mode,s=e.child,u=s.sibling;var c={mode:"hidden",children:r.children};return!(l&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ci(s,c),r.subtreeFlags=s.subtreeFlags&14680064),u!==null?o=ci(u,o):(o=qi(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?bf(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=xf,r}return o=e.child,e=o.sibling,r=ci(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 rm(e,t){return t=Cc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Jl(e,t,n,r){return r!==null&&Hp(r),po(t,e.child,null,n),e=rm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hC(e,t,n,r,s,o,l){if(n)return t.flags&256?(t.flags&=-257,r=ah(Error(K(422))),Jl(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Cc({mode:"visible",children:r.children},s,0,null),o=qi(o,s,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&po(t,e.child,null,l),t.child.memoizedState=bf(l),t.memoizedState=xf,o);if(!(t.mode&1))return Jl(e,t,l,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error(K(419)),r=ah(o,r,void 0),Jl(e,t,l,r)}if(u=(l&e.childLanes)!==0,zt||u){if(r=dt,r!==null){switch(l&-l){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|l)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Tr(e,s),Nn(r,e,s,-1))}return um(),r=ah(Error(K(421))),Jl(e,t,l,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=TC.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Yt=oi(s.nextSibling),Jt=t,Ue=!0,Rn=null,e!==null&&(an[ln++]=wr,an[ln++]=xr,an[ln++]=Zi,wr=e.id,xr=e.overflow,Zi=t),t=rm(t,r.children),t.flags|=4096,t)}function Fv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),mf(e.return,t,n)}function lh(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function C0(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(Rt(e,t,r.children,n),r=We.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&&Fv(e,n,t);else if(e.tag===19)Fv(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(ze(We,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Zu(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),lh(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Zu(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}lh(t,!0,n,null,o);break;case"together":lh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Eu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function kr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ji|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(K(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}
vendor: 5,270 bytes, line 40
40function fC(e,t,n){switch(t.tag){case 3:T0(t),fo();break;case 5:Xw(t);break;case 1:$t(t.type)&&Hu(t);break;case 4:Zp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ze(Gu,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ze(We,We.current&1),t.flags|=128,null):n&t.child.childLanes?k0(e,t,n):(ze(We,We.current&1),e=kr(e,t,n),e!==null?e.sibling:null);ze(We,We.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return C0(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ze(We,We.current),r)break;return null;case 22:case 23:return t.lanes=0,S0(e,t,n)}return kr(e,t,n)}var P0,Sf,R0,A0;P0=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}};Sf=function(){};R0=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Di(tr.current);var o=null;switch(n){case"input":s=Vh(e,s),r=Vh(e,r),o=[];break;case"select":s=qe({},s,{value:void 0}),r=qe({},r,{value:void 0}),o=[];break;case"textarea":s=qh(e,s),r=qh(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Fu)}Zh(n,r);var l;n=null;for(h in s)if(!r.hasOwnProperty(h)&&s.hasOwnProperty(h)&&s[h]!=null)if(h==="style"){var u=s[h];for(l in u)u.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else h!=="dangerouslySetInnerHTML"&&h!=="children"&&h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(Ea.hasOwnProperty(h)?o||(o=[]):(o=o||[]).push(h,null));for(h in r){var c=r[h];if(u=s!=null?s[h]:void 0,r.hasOwnProperty(h)&&c!==u&&(c!=null||u!=null))if(h==="style")if(u){for(l in u)!u.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in c)c.hasOwnProperty(l)&&u[l]!==c[l]&&(n||(n={}),n[l]=c[l])}else n||(o||(o=[]),o.push(h,n)),n=c;else h==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,u=u?u.__html:void 0,c!=null&&u!==c&&(o=o||[]).push(h,c)):h==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(h,""+c):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&(Ea.hasOwnProperty(h)?(c!=null&&h==="onScroll"&&$e("scroll",e),o||u===c||(o=[])):(o=o||[]).push(h,c))}n&&(o=o||[]).push("style",n);var h=o;(t.updateQueue=h)&&(t.flags|=4)}};A0=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qo(e,t){if(!Ue)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 bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pC(e,t,n){var r=t.pendingProps;switch(Up(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(t),null;case 1:return $t(t.type)&&Uu(),bt(t),null;case 3:return r=t.stateNode,mo(),Fe(Bt),Fe(Tt),Jp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Zl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Rn!==null&&(Nf(Rn),Rn=null))),Sf(e,t),bt(t),null;case 5:Yp(t);var s=Di(ja.current);if(n=t.type,e!==null&&t.stateNode!=null)R0(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(K(166));return bt(t),null}if(e=Di(tr.current),Zl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Jn]=t,r[Ia]=o,e=(t.mode&1)!==0,n){case"dialog":$e("cancel",r),$e("close",r);break;case"iframe":case"object":case"embed":$e("load",r);break;case"video":case"audio":for(s=0;s<sa.length;s++)$e(sa[s],r);break;case"source":$e("error",r);break;case"img":case"image":case"link":$e("error",r),$e("load",r);break;case"details":$e("toggle",r);break;case"input":Yg(r,o),$e("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},$e("invalid",r);break;case"textarea":Qg(r,o),$e("invalid",r)}Zh(n,o),s=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&&Kl(r.textContent,u,e),s=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(o.suppressHydrationWarning!==!0&&Kl(r.textContent,u,e),s=["children",""+u]):Ea.hasOwnProperty(l)&&u!=null&&l==="onScroll"&&$e("scroll",r)}switch(n){case"input":$l(r),Jg(r,o,!0);break;case"textarea":$l(r),Xg(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Fu)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=iw(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[Jn]=t,e[Ia]=r,P0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Yh(n,r),n){case"dialog":$e("cancel",e),$e("close",e),s=r;break;case"iframe":case"object":case"embed":$e("load",e),s=r;break;case"video":case"audio":for(s=0;s<sa.length;s++)$e(sa[s],e);s=r;break;case"source":$e("error",e),s=r;break;case"img":case"image":case"link":$e("error",e),$e("load",e),s=r;break;case"details":$e("toggle",e),s=r;break;case"input":Yg(e,r),s=Vh(e,r),$e("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=qe({},r,{value:void 0}),$e("invalid",e);break;case"textarea":Qg(e,r),s=qh(e,r),$e("invalid",e);break;default:s=r}Zh(n,s),u=s;for(o in u)if(u.hasOwnProperty(o)){var c=u[o];o==="style"?aw(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&sw(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Ta(e,c):typeof c=="number"&&Ta(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ea.hasOwnProperty(o)?c!=null&&o==="onScroll"&&$e("scroll",e):c!=null&&Cp(e,o,c,l))}switch(n){case"input":$l(e),Jg(e,r,!1);break;case"textarea":$l(e),Xg(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?Vs(e,!!r.multiple,o,!1):r.defaultValue!=null&&Vs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Fu)}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 bt(t),null;case 6:if(e&&t.stateNode!=null)A0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(K(166));if(n=Di(ja.current),Di(tr.current),Zl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Jn]=t,(o=r.nodeValue!==n)&&(e=Jt,e!==null))switch(e.tag){case 3:Kl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Kl(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Jn]=t,t.stateNode=r}return bt(t),null;case 13:if(Fe(We),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&Yt!==null&&t.mode&1&&!(t.flags&128))Kw(),fo(),t.flags|=98560,o=!1;else if(o=Zl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(K(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(K(317));o[Jn]=t}else fo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bt(t),o=!1}else Rn!==null&&(Nf(Rn),Rn=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||We.current&1?lt===0&&(lt=3):um())),t.updateQueue!==null&&(t.flags|=4),bt(t),null);case 4:return mo(),Sf(e,t),e===null&&Oa(t.stateNode.containerInfo),bt(t),null;case 10:return Gp(t.type._context),bt(t),null;case 17:return $t(t.type)&&Uu(),bt(t),null;case 19:if(Fe(We),o=t.memoizedState,o===null)return bt(t),null;if(r=(t.flags&128)!==0,l=o.rendering,l===null)if(r)Qo(o,!1);else{if(lt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=Zu(e),l!==null){for(t.flags|=128,Qo(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 ze(We,We.current&1|2),t.child}e=e.sibling}o.tail!==null&&Xe()>vo&&(t.flags|=128,r=!0,Qo(o,!1),t.lanes=4194304)}else{if(!r)if(e=Zu(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Ue)return bt(t),null}else 2*Xe()-o.renderingStartTime>vo&&n!==1073741824&&(t.flags|=128,r=!0,Qo(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=Xe(),t.sibling=null,n=We.current,ze(We,r?n&1|2:n&1),t):(bt(t),null);case 22:case 23:return lm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Gt&1073741824&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function mC(e,t){switch(Up(t),t.tag){case 1:return $t(t.type)&&Uu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 23,211 bytes, line 40
40case 3:return mo(),Fe(Bt),Fe(Tt),Jp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Yp(t),null;case 13:if(Fe(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));fo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fe(We),null;case 4:return mo(),null;case 10:return Gp(t.type._context),null;case 22:case 23:return lm(),null;case 24:return null;default:return null}}var Ql=!1,Et=!1,gC=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Fs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Je(e,t,r)}else n.current=null}function Ef(e,t,n){try{n()}catch(r){Je(e,t,r)}}var Uv=!1;function vC(e,t){if(af=zu,e=Mw(),$p(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 s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,u=-1,c=-1,h=0,p=0,g=e,v=null;t:for(;;){for(var _;g!==n||s!==0&&g.nodeType!==3||(u=l+s),g!==o||r!==0&&g.nodeType!==3||(c=l+r),g.nodeType===3&&(l+=g.nodeValue.length),(_=g.firstChild)!==null;)v=g,g=_;for(;;){if(g===e)break t;if(v===n&&++h===s&&(u=l),v===o&&++p===r&&(c=l),(_=g.nextSibling)!==null)break;g=v,v=g.parentNode}g=_}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(lf={focusedElem:e,selectionRange:n},zu=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var y=k.memoizedProps,T=k.memoizedState,E=t.stateNode,S=E.getSnapshotBeforeUpdate(t.elementType===t.type?y:bn(t.type,y),T);E.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(P){Je(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return k=Uv,Uv=!1,k}function ma(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Ef(t,n,o)}s=s.next}while(s!==r)}}function Tc(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 Tf(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 N0(e){var t=e.alternate;t!==null&&(e.alternate=null,N0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jn],delete t[Ia],delete t[df],delete t[Xk],delete t[eC])),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 O0(e){return e.tag===5||e.tag===3||e.tag===4}function Hv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||O0(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 kf(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=Fu));else if(r!==4&&(e=e.child,e!==null))for(kf(e,t,n),e=e.sibling;e!==null;)kf(e,t,n),e=e.sibling}function Cf(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(Cf(e,t,n),e=e.sibling;e!==null;)Cf(e,t,n),e=e.sibling}var gt=null,Cn=!1;function Mr(e,t,n){for(n=n.child;n!==null;)L0(e,t,n),n=n.sibling}function L0(e,t,n){if(er&&typeof er.onCommitFiberUnmount=="function")try{er.onCommitFiberUnmount(vc,n)}catch{}switch(n.tag){case 5:Et||Fs(n,t);case 6:var r=gt,s=Cn;gt=null,Mr(e,t,n),gt=r,Cn=s,gt!==null&&(Cn?(e=gt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):gt.removeChild(n.stateNode));break;case 18:gt!==null&&(Cn?(e=gt,n=n.stateNode,e.nodeType===8?th(e.parentNode,n):e.nodeType===1&&th(e,n),Ra(e)):th(gt,n.stateNode));break;case 4:r=gt,s=Cn,gt=n.stateNode.containerInfo,Cn=!0,Mr(e,t,n),gt=r,Cn=s;break;case 0:case 11:case 14:case 15:if(!Et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Ef(n,t,l),s=s.next}while(s!==r)}Mr(e,t,n);break;case 1:if(!Et&&(Fs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Je(n,t,u)}Mr(e,t,n);break;case 21:Mr(e,t,n);break;case 22:n.mode&1?(Et=(r=Et)||n.memoizedState!==null,Mr(e,t,n),Et=r):Mr(e,t,n);break;default:Mr(e,t,n)}}function Vv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gC),t.forEach(function(r){var s=kC.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function yn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,l=t,u=l;e:for(;u!==null;){switch(u.tag){case 5:gt=u.stateNode,Cn=!1;break e;case 3:gt=u.stateNode.containerInfo,Cn=!0;break e;case 4:gt=u.stateNode.containerInfo,Cn=!0;break e}u=u.return}if(gt===null)throw Error(K(160));L0(o,l,s),gt=null,Cn=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(h){Je(s,t,h)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)I0(t,e),t=t.sibling}function I0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yn(t,e),Gn(e),r&4){try{ma(3,e,e.return),Tc(3,e)}catch(y){Je(e,e.return,y)}try{ma(5,e,e.return)}catch(y){Je(e,e.return,y)}}break;case 1:yn(t,e),Gn(e),r&512&&n!==null&&Fs(n,n.return);break;case 5:if(yn(t,e),Gn(e),r&512&&n!==null&&Fs(n,n.return),e.flags&32){var s=e.stateNode;try{Ta(s,"")}catch(y){Je(e,e.return,y)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,l=n!==null?n.memoizedProps:o,u=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{u==="input"&&o.type==="radio"&&o.name!=null&&nw(s,o),Yh(u,l);var h=Yh(u,o);for(l=0;l<c.length;l+=2){var p=c[l],g=c[l+1];p==="style"?aw(s,g):p==="dangerouslySetInnerHTML"?sw(s,g):p==="children"?Ta(s,g):Cp(s,p,g,h)}switch(u){case"input":Wh(s,o);break;case"textarea":rw(s,o);break;case"select":var v=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var _=o.value;_!=null?Vs(s,!!o.multiple,_,!1):v!==!!o.multiple&&(o.defaultValue!=null?Vs(s,!!o.multiple,o.defaultValue,!0):Vs(s,!!o.multiple,o.multiple?[]:"",!1))}s[Ia]=o}catch(y){Je(e,e.return,y)}}break;case 6:if(yn(t,e),Gn(e),r&4){if(e.stateNode===null)throw Error(K(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(y){Je(e,e.return,y)}}break;case 3:if(yn(t,e),Gn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ra(t.containerInfo)}catch(y){Je(e,e.return,y)}break;case 4:yn(t,e),Gn(e);break;case 13:yn(t,e),Gn(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(om=Xe())),r&4&&Vv(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(Et=(h=Et)||p,yn(t,e),Et=h):yn(t,e),Gn(e),r&8192){if(h=e.memoizedState!==null,(e.stateNode.isHidden=h)&&!p&&e.mode&1)for(oe=e,p=e.child;p!==null;){for(g=oe=p;oe!==null;){switch(v=oe,_=v.child,v.tag){case 0:case 11:case 14:case 15:ma(4,v,v.return);break;case 1:Fs(v,v.return);var k=v.stateNode;if(typeof k.componentWillUnmount=="function"){r=v,n=v.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(y){Je(r,n,y)}}break;case 5:Fs(v,v.return);break;case 22:if(v.memoizedState!==null){Gv(g);continue}}_!==null?(_.return=v,oe=_):Gv(g)}p=p.sibling}e:for(p=null,g=e;;){if(g.tag===5){if(p===null){p=g;try{s=g.stateNode,h?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(u=g.stateNode,c=g.memoizedProps.style,l=c!=null&&c.hasOwnProperty("display")?c.display:null,u.style.display=ow("display",l))}catch(y){Je(e,e.return,y)}}}else if(g.tag===6){if(p===null)try{g.stateNode.nodeValue=h?"":g.memoizedProps}catch(y){Je(e,e.return,y)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;p===g&&(p=null),g=g.return}p===g&&(p=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:yn(t,e),Gn(e),r&4&&Vv(e);break;case 21:break;default:yn(t,e),Gn(e)}}function Gn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(O0(n)){var r=n;break e}n=n.return}throw Error(K(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ta(s,""),r.flags&=-33);var o=Hv(e);Cf(e,o,s);break;case 3:case 4:var l=r.stateNode.containerInfo,u=Hv(e);kf(e,u,l);break;default:throw Error(K(161))}}catch(c){Je(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yC(e,t,n){oe=e,M0(e)}function M0(e,t,n){for(var r=(e.mode&1)!==0;oe!==null;){var s=oe,o=s.child;if(s.tag===22&&r){var l=s.memoizedState!==null||Ql;if(!l){var u=s.alternate,c=u!==null&&u.memoizedState!==null||Et;u=Ql;var h=Et;if(Ql=l,(Et=c)&&!h)for(oe=s;oe!==null;)l=oe,c=l.child,l.tag===22&&l.memoizedState!==null?qv(s):c!==null?(c.return=l,oe=c):qv(s);for(;o!==null;)oe=o,M0(o),o=o.sibling;oe=s,Ql=u,Et=h}Wv(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,oe=o):Wv(e)}}function Wv(e){for(;oe!==null;){var t=oe;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Et||Tc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Et)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:bn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Rv(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}Rv(t,l,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var h=t.alternate;if(h!==null){var p=h.memoizedState;if(p!==null){var g=p.dehydrated;g!==null&&Ra(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(K(163))}Et||t.flags&512&&Tf(t)}catch(v){Je(t,t.return,v)}}if(t===e){oe=null;break}if(n=t.sibling,n!==null){n.return=t.return,oe=n;break}oe=t.return}}function Gv(e){for(;oe!==null;){var t=oe;if(t===e){oe=null;break}var n=t.sibling;if(n!==null){n.return=t.return,oe=n;break}oe=t.return}}function qv(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Tc(4,t)}catch(c){Je(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){Je(t,s,c)}}var o=t.return;try{Tf(t)}catch(c){Je(t,o,c)}break;case 5:var l=t.return;try{Tf(t)}catch(c){Je(t,l,c)}}}catch(c){Je(t,t.return,c)}if(t===e){oe=null;break}var u=t.sibling;if(u!==null){u.return=t.return,oe=u;break}oe=t.return}}var _C=Math.ceil,Qu=Rr.ReactCurrentDispatcher,im=Rr.ReactCurrentOwner,cn=Rr.ReactCurrentBatchConfig,Re=0,dt=null,it=null,vt=0,Gt=0,Us=gi(0),lt=0,$a=null,Ji=0,kc=0,sm=0,ga=null,Dt=null,om=0,vo=1/0,gr=null,Xu=!1,Pf=null,li=null,Xl=!1,ti=null,ec=0,va=0,Rf=null,Tu=-1,ku=0;function Nt(){return Re&6?Xe():Tu!==-1?Tu:Tu=Xe()}function ui(e){return e.mode&1?Re&2&&vt!==0?vt&-vt:nC.transition!==null?(ku===0&&(ku=_w()),ku):(e=Ie,e!==0||(e=window.event,e=e===void 0?16:kw(e.type)),e):1}function Nn(e,t,n,r){if(50<va)throw va=0,Rf=null,Error(K(185));il(e,n,r),(!(Re&2)||e!==dt)&&(e===dt&&(!(Re&2)&&(kc|=n),lt===4&&qr(e,vt)),Ft(e,r),n===1&&Re===0&&!(t.mode&1)&&(vo=Xe()+500,bc&&vi()))}function Ft(e,t){var n=e.callbackNode;nk(e,t);var r=Du(e,e===dt?vt:0);if(r===0)n!==null&&nv(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&nv(n),t===1)e.tag===0?tC(Kv.bind(null,e)):Ww(Kv.bind(null,e)),Jk(function(){!(Re&6)&&vi()}),n=null;else{switch(ww(r)){case 1:n=Op;break;case 4:n=vw;break;case 16:n=ju;break;case 536870912:n=yw;break;default:n=ju}n=H0(n,j0.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function j0(e,t){if(Tu=-1,ku=0,Re&6)throw Error(K(327));var n=e.callbackNode;if(Zs()&&e.callbackNode!==n)return null;var r=Du(e,e===dt?vt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=tc(e,r);else{t=r;var s=Re;Re|=2;var o=z0();(dt!==e||vt!==t)&&(gr=null,vo=Xe()+500,Gi(e,t));do try{bC();break}catch(u){D0(e,u)}while(!0);Wp(),Qu.current=o,Re=s,it!==null?t=0:(dt=null,vt=0,t=lt)}if(t!==0){if(t===2&&(s=tf(e),s!==0&&(r=s,t=Af(e,s))),t===1)throw n=$a,Gi(e,0),qr(e,r),Ft(e,Xe()),n;if(t===6)qr(e,r);else{if(s=e.current.alternate,!(r&30)&&!wC(s)&&(t=tc(e,r),t===2&&(o=tf(e),o!==0&&(r=o,t=Af(e,o))),t===1))throw n=$a,Gi(e,0),qr(e,r),Ft(e,Xe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(K(345));case 2:Ni(e,Dt,gr);break;case 3:if(qr(e,r),(r&130023424)===r&&(t=om+500-Xe(),10<t)){if(Du(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Nt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=cf(Ni.bind(null,e,Dt,gr),t);break}Ni(e,Dt,gr);break;case 4:if(qr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var l=31-An(r);o=1<<l,l=t[l],l>s&&(s=l),r&=~o}if(r=s,r=Xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_C(r/1960))-r,10<r){e.timeoutHandle=cf(Ni.bind(null,e,Dt,gr),r);break}Ni(e,Dt,gr);break;case 5:Ni(e,Dt,gr);break;default:throw Error(K(329))}}}return Ft(e,Xe()),e.callbackNode===n?j0.bind(null,e):null}function Af(e,t){var n=ga;return e.current.memoizedState.isDehydrated&&(Gi(e,t).flags|=256),e=tc(e,t),e!==2&&(t=Dt,Dt=n,t!==null&&Nf(t)),e}function Nf(e){Dt===null?Dt=e:Dt.push.apply(Dt,e)}function wC(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 s=n[r],o=s.getSnapshot;s=s.value;try{if(!On(o(),s))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 qr(e,t){for(t&=~sm,t&=~kc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-An(t),r=1<<n;e[n]=-1,t&=~r}}function Kv(e){if(Re&6)throw Error(K(327));Zs();var t=Du(e,0);if(!(t&1))return Ft(e,Xe()),null;var n=tc(e,t);if(e.tag!==0&&n===2){var r=tf(e);r!==0&&(t=r,n=Af(e,r))}if(n===1)throw n=$a,Gi(e,0),qr(e,t),Ft(e,Xe()),n;if(n===6)throw Error(K(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ni(e,Dt,gr),Ft(e,Xe()),null}function am(e,t){var n=Re;Re|=1;try{return e(t)}finally{Re=n,Re===0&&(vo=Xe()+500,bc&&vi())}}function Qi(e){ti!==null&&ti.tag===0&&!(Re&6)&&Zs();var t=Re;Re|=1;var n=cn.transition,r=Ie;try{if(cn.transition=null,Ie=1,e)return e()}finally{Ie=r,cn.transition=n,Re=t,!(Re&6)&&vi()}}function lm(){Gt=Us.current,Fe(Us)}function Gi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Yk(n)),it!==null)for(n=it.return;n!==null;){var r=n;switch(Up(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Uu();break;case 3:mo(),Fe(Bt),Fe(Tt),Jp();break;case 5:Yp(r);break;case 4:mo();break;case 13:Fe(We);break;case 19:Fe(We);break;case 10:Gp(r.type._context);break;case 22:case 23:lm()}n=n.return}if(dt=e,it=e=ci(e.current,null),vt=Gt=t,lt=0,$a=null,sm=kc=Ji=0,Dt=ga=null,ji!==null){for(t=0;t<ji.length;t++)if(n=ji[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var l=o.next;o.next=s,r.next=l}n.pending=r}ji=null}return e}function D0(e,t){do{var n=it;try{if(Wp(),bu.current=Ju,Yu){for(var r=Ge.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Yu=!1}if(Yi=0,ct=ot=Ge=null,pa=!1,Da=0,im.current=null,n===null||n.return===null){lt=1,$a=t,it=null;break}e:{var o=e,l=n.return,u=n,c=t;if(t=vt,u.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var h=c,p=u,g=p.tag;if(!(p.mode&1)&&(g===0||g===11||g===15)){var v=p.alternate;v?(p.updateQueue=v.updateQueue,p.memoizedState=v.memoizedState,p.lanes=v.lanes):(p.updateQueue=null,p.memoizedState=null)}var _=Mv(l);if(_!==null){_.flags&=-257,jv(_,l,u,o,t),_.mode&1&&Iv(o,h,t),t=_,c=h;var k=t.updateQueue;if(k===null){var y=new Set;y.add(c),t.updateQueue=y}else k.add(c);break e}else{if(!(t&1)){Iv(o,h,t),um();break e}c=Error(K(426))}}else if(Ue&&u.mode&1){var T=Mv(l);if(T!==null){!(T.flags&65536)&&(T.flags|=256),jv(T,l,u,o,t),Hp(go(c,u));break e}}o=c=go(c,u),lt!==4&&(lt=2),ga===null?ga=[o]:ga.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var E=w0(o,c,t);Pv(o,E);break e;case 1:u=c;var S=o.type,x=o.stateNode;if(!(o.flags&128)&&(typeof S.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(li===null||!li.has(x)))){o.flags|=65536,t&=-t,o.lanes|=t;var P=x0(o,u,t);Pv(o,P);break e}}o=o.return}while(o!==null)}$0(n)}catch(R){t=R,it===n&&n!==null&&(it=n=n.return);continue}break}while(!0)}function z0(){var e=Qu.current;return Qu.current=Ju,e===null?Ju:e}function um(){(lt===0||lt===3||lt===2)&&(lt=4),dt===null||!(Ji&268435455)&&!(kc&268435455)||qr(dt,vt)}function tc(e,t){var n=Re;Re|=2;var r=z0();(dt!==e||vt!==t)&&(gr=null,Gi(e,t));do try{xC();break}catch(s){D0(e,s)}while(!0);if(Wp(),Re=n,Qu.current=r,it!==null)throw Error(K(261));return dt=null,vt=0,lt}function xC(){for(;it!==null;)B0(it)}function bC(){for(;it!==null&&!qT();)B0(it)}function B0(e){var t=U0(e.alternate,e,Gt);e.memoizedProps=e.pendingProps,t===null?$0(e):it=t,im.current=null}function $0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=mC(n,t),n!==null){n.flags&=32767,it=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{lt=6,it=null;return}}else if(n=pC(n,t,Gt),n!==null){it=n;return}if(t=t.sibling,t!==null){it=t;return}it=t=e}while(t!==null);lt===0&&(lt=5)}function Ni(e,t,n){var r=Ie,s=cn.transition;try{cn.transition=null,Ie=1,SC(e,t,n,r)}finally{cn.transition=s,Ie=r}return null}function SC(e,t,n,r){do Zs();while(ti!==null);if(Re&6)throw Error(K(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(K(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(rk(e,o),e===dt&&(it=dt=null,vt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Xl||(Xl=!0,H0(ju,function(){return Zs(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=cn.transition,cn.transition=null;var l=Ie;Ie=1;var u=Re;Re|=4,im.current=null,vC(e,n),I0(n,e),Hk(lf),zu=!!af,lf=af=null,e.current=n,yC(n),KT(),Re=u,Ie=l,cn.transition=o}else e.current=n;if(Xl&&(Xl=!1,ti=e,ec=s),o=e.pendingLanes,o===0&&(li=null),JT(n.stateNode),Ft(e,Xe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Xu)throw Xu=!1,e=Pf,Pf=null,e;return ec&1&&e.tag!==0&&Zs(),o=e.pendingLanes,o&1?e===Rf?va++:(va=0,Rf=e):va=0,vi(),null}function Zs(){if(ti!==null){var e=ww(ec),t=cn.transition,n=Ie;try{if(cn.transition=null,Ie=16>e?16:e,ti===null)var r=!1;else{if(e=ti,ti=null,ec=0,Re&6)throw Error(K(331));var s=Re;for(Re|=4,oe=e.current;oe!==null;){var o=oe,l=o.child;if(oe.flags&16){var u=o.deletions;if(u!==null){for(var c=0;c<u.length;c++){var h=u[c];for(oe=h;oe!==null;){var p=oe;switch(p.tag){case 0:case 11:case 15:ma(8,p,o)}var g=p.child;if(g!==null)g.return=p,oe=g;else for(;oe!==null;){p=oe;var v=p.sibling,_=p.return;if(N0(p),p===h){oe=null;break}if(v!==null){v.return=_,oe=v;break}oe=_}}}var k=o.alternate;if(k!==null){var y=k.child;if(y!==null){k.child=null;do{var T=y.sibling;y.sibling=null,y=T}while(y!==null)}}oe=o}}if(o.subtreeFlags&2064&&l!==null)l.return=o,oe=l;else e:for(;oe!==null;){if(o=oe,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ma(9,o,o.return)}var E=o.sibling;if(E!==null){E.return=o.return,oe=E;break e}oe=o.return}}var S=e.current;for(oe=S;oe!==null;){l=oe;var x=l.child;if(l.subtreeFlags&2064&&x!==null)x.return=l,oe=x;else e:for(l=S;oe!==null;){if(u=oe,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Tc(9,u)}}catch(R){Je(u,u.return,R)}if(u===l){oe=null;break e}var P=u.sibling;if(P!==null){P.return=u.return,oe=P;break e}oe=u.return}}if(Re=s,vi(),er&&typeof er.onPostCommitFiberRoot=="function")try{er.onPostCommitFiberRoot(vc,e)}catch{}r=!0}return r}finally{Ie=n,cn.transition=t}}return!1}function Zv(e,t,n){t=go(n,t),t=w0(e,t,1),e=ai(e,t,1),t=Nt(),e!==null&&(il(e,1,t),Ft(e,t))}function Je(e,t,n){if(e.tag===3)Zv(e,e,n);else for(;t!==null;){if(t.tag===3){Zv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(li===null||!li.has(r))){e=go(n,e),e=x0(t,e,1),t=ai(t,e,1),e=Nt(),t!==null&&(il(t,1,e),Ft(t,e));break}}t=t.return}}function EC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Nt(),e.pingedLanes|=e.suspendedLanes&n,dt===e&&(vt&n)===n&&(lt===4||lt===3&&(vt&130023424)===vt&&500>Xe()-om?Gi(e,0):sm|=n),Ft(e,t)}function F0(e,t){t===0&&(e.mode&1?(t=Hl,Hl<<=1,!(Hl&130023424)&&(Hl=4194304)):t=1);var n=Nt();e=Tr(e,t),e!==null&&(il(e,t,n),Ft(e,n))}function TC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),F0(e,n)}function kC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(K(314))}r!==null&&r.delete(t),F0(e,n)}var U0;U0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Bt.current)zt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zt=!1,fC(e,t,n);zt=!!(e.flags&131072)}else zt=!1,Ue&&t.flags&1048576&&Gw(t,Wu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Eu(e,t),e=t.pendingProps;var s=ho(t,Tt.current);Ks(t,n),s=Xp(null,t,r,e,s,n);var o=em();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$t(r)?(o=!0,Hu(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Kp(t),s.updater=Ec,t.stateNode=s,s._reactInternals=t,vf(t,r,e,n),t=wf(null,t,r,!0,o,n)):(t.tag=0,Ue&&o&&Fp(t),Rt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Eu(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=PC(r),e=bn(r,e),s){case 0:t=_f(null,t,r,e,n);break e;case 1:t=Bv(null,t,r,e,n);break e;case 11:t=Dv(null,t,r,e,n);break e;case 14:t=zv(null,t,r,bn(r.type,e),n);break e}throw Error(K(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bn(r,s),_f(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bn(r,s),Bv(e,t,r,s,n);case 3:e:{if(T0(t),e===null)throw Error(K(387));
vendor: 4,332 bytes, line 40
40r=t.pendingProps,o=t.memoizedState,s=o.element,Qw(e,t),Ku(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){s=go(Error(K(423)),t),t=$v(e,t,r,n,s);break e}else if(r!==s){s=go(Error(K(424)),t),t=$v(e,t,r,n,s);break e}else for(Yt=oi(t.stateNode.containerInfo.firstChild),Jt=t,Ue=!0,Rn=null,n=Yw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fo(),r===s){t=kr(e,t,n);break e}Rt(e,t,r,n)}t=t.child}return t;case 5:return Xw(t),e===null&&pf(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,l=s.children,uf(r,s)?l=null:o!==null&&uf(r,o)&&(t.flags|=32),E0(e,t),Rt(e,t,l,n),t.child;case 6:return e===null&&pf(t),null;case 13:return k0(e,t,n);case 4:return Zp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=po(t,null,r,n):Rt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bn(r,s),Dv(e,t,r,s,n);case 7:return Rt(e,t,t.pendingProps,n),t.child;case 8:return Rt(e,t,t.pendingProps.children,n),t.child;case 12:return Rt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,l=s.value,ze(Gu,r._currentValue),r._currentValue=l,o!==null)if(On(o.value,l)){if(o.children===s.children&&!Bt.current){t=kr(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 c=u.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=br(-1,n&-n),c.tag=2;var h=o.updateQueue;if(h!==null){h=h.shared;var p=h.pending;p===null?c.next=c:(c.next=p.next,p.next=c),h.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),mf(o.return,n,t),u.lanes|=n;break}c=c.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(K(341));l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),mf(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}Rt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Ks(t,n),s=dn(s),r=r(s),t.flags|=1,Rt(e,t,r,n),t.child;case 14:return r=t.type,s=bn(r,t.pendingProps),s=bn(r.type,s),zv(e,t,r,s,n);case 15:return b0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bn(r,s),Eu(e,t),t.tag=1,$t(r)?(e=!0,Hu(t)):e=!1,Ks(t,n),_0(t,r,s),vf(t,r,s,n),wf(null,t,r,!0,e,n);case 19:return C0(e,t,n);case 22:return S0(e,t,n)}throw Error(K(156,t.tag))};function H0(e,t){return gw(e,t)}function CC(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 un(e,t,n,r){return new CC(e,t,n,r)}function cm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PC(e){if(typeof e=="function")return cm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Rp)return 11;if(e===Ap)return 14}return 2}function ci(e,t){var n=e.alternate;return n===null?(n=un(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 Cu(e,t,n,r,s,o){var l=2;if(r=e,typeof e=="function")cm(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Os:return qi(n.children,s,o,t);case Pp:l=8,s|=8;break;case $h:return e=un(12,n,t,s|2),e.elementType=$h,e.lanes=o,e;case Fh:return e=un(13,n,t,s),e.elementType=Fh,e.lanes=o,e;case Uh:return e=un(19,n,t,s),e.elementType=Uh,e.lanes=o,e;case X_:return Cc(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case J_:l=10;break e;
vendor: 4,456 bytes, line 40
40case Q_:l=9;break e;case Rp:l=11;break e;case Ap:l=14;break e;case Ur:l=16,r=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=un(l,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function qi(e,t,n,r){return e=un(7,e,r,t),e.lanes=n,e}function Cc(e,t,n,r){return e=un(22,e,r,t),e.elementType=X_,e.lanes=n,e.stateNode={isHidden:!1},e}function uh(e,t,n){return e=un(6,e,null,t),e.lanes=n,e}function ch(e,t,n){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function RC(e,t,n,r,s){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=Vd(0),this.expirationTimes=Vd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vd(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function dm(e,t,n,r,s,o,l,u,c){return e=new RC(e,t,n,u,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=un(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kp(o),e}function AC(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ns,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function V0(e){if(!e)return hi;e=e._reactInternals;e:{if(is(e)!==e||e.tag!==1)throw Error(K(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($t(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(K(171))}if(e.tag===1){var n=e.type;if($t(n))return Vw(e,n,t)}return t}function W0(e,t,n,r,s,o,l,u,c){return e=dm(n,r,!0,e,s,o,l,u,c),e.context=V0(null),n=e.current,r=Nt(),s=ui(n),o=br(r,s),o.callback=t??null,ai(n,o,s),e.current.lanes=s,il(e,s,r),Ft(e,r),e}function Pc(e,t,n,r){var s=t.current,o=Nt(),l=ui(s);return n=V0(n),t.context===null?t.context=n:t.pendingContext=n,t=br(o,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ai(s,t,l),e!==null&&(Nn(e,s,l,o),xu(e,s,l)),l}function nc(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 Yv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hm(e,t){Yv(e,t),(e=e.alternate)&&Yv(e,t)}function NC(){return null}var G0=typeof reportError=="function"?reportError:function(e){console.error(e)};function fm(e){this._internalRoot=e}Rc.prototype.render=fm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(K(409));Pc(e,t,null,null)};Rc.prototype.unmount=fm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qi(function(){Pc(null,e,null,null)}),t[Er]=null}};function Rc(e){this._internalRoot=e}Rc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Gr.length&&t!==0&&t<Gr[n].priority;n++);Gr.splice(n,0,e),n===0&&Tw(e)}};function pm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ac(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jv(){}function OC(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var h=nc(l);o.call(h)}}var l=W0(t,r,e,0,null,!1,!1,"",Jv);return e._reactRootContainer=l,e[Er]=l.current,Oa(e.nodeType===8?e.parentNode:e),Qi(),l}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var u=r;r=function(){var h=nc(c);u.call(h)}}var c=dm(e,0,!1,null,null,!1,!1,"",Jv);return e._reactRootContainer=c,e[Er]=c.current,Oa(e.nodeType===8?e.parentNode:e),Qi(function(){Pc(t,c,n,r)}),c}function Nc(e,t,n,r,s){var o=n._reactRootContainer;if(o){var l=o;if(typeof s=="function"){var u=s;s=function(){var c=nc(l);u.call(c)}}Pc(t,l,e,s)}else l=OC(n,t,e,s,r);return nc(l)}xw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ia(t.pendingLanes);n!==0&&(Lp(t,n|1),Ft(t,Xe()),!(Re&6)&&(vo=Xe()+500,vi()))}break;case 13:Qi(function(){var r=Tr(e,1);if(r!==null){var s=Nt();Nn(r,e,1,s)}}),hm(e,1)}};
vendor: 4,449 bytes, line 40
40Ip=function(e){if(e.tag===13){var t=Tr(e,134217728);if(t!==null){var n=Nt();Nn(t,e,134217728,n)}hm(e,134217728)}};bw=function(e){if(e.tag===13){var t=ui(e),n=Tr(e,t);if(n!==null){var r=Nt();Nn(n,e,t,r)}hm(e,t)}};Sw=function(){return Ie};Ew=function(e,t){var n=Ie;try{return Ie=e,t()}finally{Ie=n}};Qh=function(e,t,n){switch(t){case"input":if(Wh(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 s=xc(r);if(!s)throw Error(K(90));tw(r),Wh(r,s)}}}break;case"textarea":rw(e,n);break;case"select":t=n.value,t!=null&&Vs(e,!!n.multiple,t,!1)}};cw=am;dw=Qi;var LC={usingClientEntryPoint:!1,Events:[ol,js,xc,lw,uw,am]},Xo={findFiberByHostInstance:Mi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},IC={bundleType:Xo.bundleType,version:Xo.version,rendererPackageName:Xo.rendererPackageName,rendererConfig:Xo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Rr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=pw(e),e===null?null:e.stateNode},findFiberByHostInstance:Xo.findFiberByHostInstance||NC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!eu.isDisabled&&eu.supportsFiber)try{vc=eu.inject(IC),er=eu}catch{}}en.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=LC;en.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!pm(t))throw Error(K(200));return AC(e,t,null,n)};en.createRoot=function(e,t){if(!pm(e))throw Error(K(299));var n=!1,r="",s=G0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=dm(e,1,!1,null,null,n,!1,r,s),e[Er]=t.current,Oa(e.nodeType===8?e.parentNode:e),new fm(t)};en.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(K(188)):(e=Object.keys(e).join(","),Error(K(268,e)));return e=pw(t),e=e===null?null:e.stateNode,e};en.flushSync=function(e){return Qi(e)};en.hydrate=function(e,t,n){if(!Ac(t))throw Error(K(200));return Nc(null,e,t,!0,n)};en.hydrateRoot=function(e,t,n){if(!pm(e))throw Error(K(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",l=G0;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=W0(t,null,e,1,n??null,s,!1,o,l),e[Er]=t.current,Oa(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Rc(t)};en.render=function(e,t,n){if(!Ac(t))throw Error(K(200));return Nc(null,e,t,!1,n)};en.unmountComponentAtNode=function(e){if(!Ac(e))throw Error(K(40));return e._reactRootContainer?(Qi(function(){Nc(null,null,e,!1,function(){e._reactRootContainer=null,e[Er]=null})}),!0):!1};en.unstable_batchedUpdates=am;en.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ac(n))throw Error(K(200));if(e==null||e._reactInternals===void 0)throw Error(K(38));return Nc(e,t,n,!1,r)};en.version="18.3.1-next-f1338f8080-20240426";function q0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q0)}catch(e){console.error(e)}}q0(),q_.exports=en;var ss=q_.exports;const K0=_p(ss);var Z0,Qv=ss;Z0=Qv.createRoot,Qv.hydrateRoot;const MC=1,jC=1e6;let dh=0;function DC(){return dh=(dh+1)%Number.MAX_SAFE_INTEGER,dh.toString()}const hh=new Map,Xv=e=>{if(hh.has(e))return;const t=setTimeout(()=>{hh.delete(e),ya({type:"REMOVE_TOAST",toastId:e})},jC);hh.set(e,t)},zC=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,MC)};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;
40return n?Xv(n):e.toasts.forEach(r=>{Xv(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)}}},Pu=[];let Ru={toasts:[]};function ya(e){Ru=zC(Ru,e),Pu.forEach(t=>{t(Ru)})}function BC({...e}){const t=DC(),n=s=>ya({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>ya({type:"DISMISS_TOAST",toastId:t});return ya({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function $C(){const[e,t]=w.useState(Ru);return w.useEffect(()=>(Pu.push(t),()=>{const n=Pu.indexOf(t);n>-1&&Pu.splice(n,1)}),[e]),{...e,toast:BC,dismiss:n=>ya({type:"DISMISS_TOAST",toastId:n})}}function ae(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function ey(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Y0(...e){return t=>{let n=!1;const r=e.map(s=>{const o=ey(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():ey(e[s],null)}}}}function Te(...e){return w.useCallback(Y0(...e),e)}function ir(e,t=[]){let n=[];function r(o,l){const u=w.createContext(l),c=n.length;n=[...n,l];const h=g=>{var E;const{scope:v,children:_,...k}=g,y=((E=v==null?void 0:v[e])==null?void 0:E[c])||u,T=w.useMemo(()=>k,Object.values(k));return m.jsx(y.Provider,{value:T,children:_})};h.displayName=o+"Provider";function p(g,v){var y;const _=((y=v==null?void 0:v[e])==null?void 0:y[c])||u,k=w.useContext(_);if(k)return k;if(l!==void 0)return l;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,p]}const s=()=>{const o=n.map(l=>w.createContext(l));return function(u){const c=(u==null?void 0:u[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return s.scopeName=e,[r,FC(s,...t)]}function FC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const l=r.reduce((u,{useScope:c,scopeName:h})=>{const g=c(o)[`__scope${h}`];return{...u,...g}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Fa(e){const t=HC(e),n=w.forwardRef((r,s)=>{const{children:o,...l}=r,u=w.Children.toArray(o),c=u.find(WC);if(c){const h=c.props.children,p=u.map(g=>g===c?w.Children.count(h)>1?w.Children.only(null):w.isValidElement(h)?h.props.children:null:g);return m.jsx(t,{...l,ref:s,children:w.isValidElement(h)?w.cloneElement(h,void 0,p):null})}return m.jsx(t,{...l,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var UC=Fa("Slot");function HC(e){const t=w.forwardRef((n,r)=>{const{children:s,...o}=n;if(w.isValidElement(s)){const l=qC(s),u=GC(o,s.props);return s.type!==w.Fragment&&(u.ref=r?Y0(r,l):l),w.cloneElement(s,u)}return w.Children.count(s)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var J0=Symbol("radix.slottable");function VC(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=J0,t}function WC(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===J0}function GC(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...u)=>{const c=o(...u);return s(...u),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function qC(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Oc(e){const t=e+"CollectionProvider",[n,r]=ir(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=y=>{const{scope:T,children:E}=y,S=J.useRef(null),x=J.useRef(new Map).current;return m.jsx(s,{scope:T,itemMap:x,collectionRef:S,children:E})};l.displayName=t;const u=e+"CollectionSlot",c=Fa(u),h=J.forwardRef((y,T)=>{const{scope:E,children:S}=y,x=o(u,E),P=Te(T,x.collectionRef);return m.jsx(c,{ref:P,children:S})});h.displayName=u;const p=e+"CollectionItemSlot",g="data-radix-collection-item",v=Fa(p),_=J.forwardRef((y,T)=>{const{scope:E,children:S,...x}=y,P=J.useRef(null),R=Te(T,P),N=o(p,E);return J.useEffect(()=>(N.itemMap.set(P,{ref:P,...x}
vendor: 8,972 bytes, line 40
40),()=>void N.itemMap.delete(P))),m.jsx(v,{[g]:"",ref:R,children:S})});_.displayName=p;function k(y){const T=o(e+"CollectionConsumer",y);return J.useCallback(()=>{const S=T.collectionRef.current;if(!S)return[];const x=Array.from(S.querySelectorAll(`[${g}]`));return Array.from(T.itemMap.values()).sort((N,O)=>x.indexOf(N.ref.current)-x.indexOf(O.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:l,Slot:h,ItemSlot:_},k,r]}var KC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pe=KC.reduce((e,t)=>{const n=Fa(`Primitive.${t}`),r=w.forwardRef((s,o)=>{const{asChild:l,...u}=s,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Q0(e,t){e&&ss.flushSync(()=>e.dispatchEvent(t))}function at(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function ZC(e,t=globalThis==null?void 0:globalThis.document){const n=at(e);w.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var YC="DismissableLayer",Of="dismissableLayer.update",JC="dismissableLayer.pointerDownOutside",QC="dismissableLayer.focusOutside",ty,X0=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lc=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...c}=e,h=w.useContext(X0),[p,g]=w.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=w.useState({}),k=Te(t,O=>g(O)),y=Array.from(h.layers),[T]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),E=y.indexOf(T),S=p?y.indexOf(p):-1,x=h.layersWithOutsidePointerEventsDisabled.size>0,P=S>=E,R=eP(O=>{const z=O.target,D=[...h.branches].some(j=>j.contains(z));!P||D||(s==null||s(O),l==null||l(O),O.defaultPrevented||u==null||u())},v),N=tP(O=>{const z=O.target;[...h.branches].some(j=>j.contains(z))||(o==null||o(O),l==null||l(O),O.defaultPrevented||u==null||u())},v);return ZC(O=>{S===h.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&u&&(O.preventDefault(),u()))},v),w.useEffect(()=>{if(p)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ty=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),ny(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ty)}},[p,v,n,h]),w.useEffect(()=>()=>{p&&(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),ny())},[p,h]),w.useEffect(()=>{const O=()=>_({});return document.addEventListener(Of,O),()=>document.removeEventListener(Of,O)},[]),m.jsx(pe.div,{...c,ref:k,style:{pointerEvents:x?P?"auto":"none":void 0,...e.style},onFocusCapture:ae(e.onFocusCapture,N.onFocusCapture),onBlurCapture:ae(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:ae(e.onPointerDownCapture,R.onPointerDownCapture)})});Lc.displayName=YC;var XC="DismissableLayerBranch",ex=w.forwardRef((e,t)=>{const n=w.useContext(X0),r=w.useRef(null),s=Te(t,r);return w.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),m.jsx(pe.div,{...e,ref:s})});ex.displayName=XC;function eP(e,t=globalThis==null?void 0:globalThis.document){const n=at(e),r=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let c=function(){tx(JC,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function tP(e,t=globalThis==null?void 0:globalThis.document){const n=at(e),r=w.useRef(!1);return w.useEffect(()=>{const s=o=>{o.target&&!r.current&&tx(QC,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ny(){const e=new CustomEvent(Of);document.dispatchEvent(e)}function tx(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Q0(s,o):s.dispatchEvent(o)}var nP=Lc,rP=ex,ht=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},iP="Portal",mm=w.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[s,o]=w.useState(!1);ht(()=>o(!0),[]);const l=n||s&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?K0.createPortal(m.jsx(pe.div,{...r,ref:t}),l):null});mm.displayName=iP;function sP(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var yi=e=>{const{present:t,children:n}=e,r=oP(t),s=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=Te(r.ref,aP(s));return typeof n=="function"||r.isPresent?w.cloneElement(s,{ref:o}):null};yi.displayName="Presence";function oP(e){const[t,n]=w.useState(),r=w.useRef(null),s=w.useRef(e),o=w.useRef("none"),l=e?"mounted":"unmounted",[u,c]=sP(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const h=tu(r.current);o.current=u==="mounted"?h:"none"},[u]),ht(()=>{const h=r.current,p=s.current;if(p!==e){const v=o.current,_=tu(h);e?c("MOUNT"):_==="none"||(h==null?void 0:h.display)==="none"?c("UNMOUNT"):c(p&&v!==_?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),ht(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,g=_=>{const y=tu(r.current).includes(_.animationName);if(_.target===t&&y&&(c("ANIMATION_END"),!s.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},v=_=>{_.target===t&&(o.current=tu(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:w.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function tu(e){return(e==null?void 0:e.animationName)||"none"}function aP(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var lP=Ep[" useInsertionEffect ".trim().toString()]||ht;function Xi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,l]=uP({defaultProp:t,onChange:n}),u=e!==void 0,c=u?e:s;{const p=w.useRef(e!==void 0);w.useEffect(()=>{const g=p.current;g!==u&&console.warn(`${r} is changing from ${g?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=u},[u,r])}const h=w.useCallback(p=>{var g;if(u){const v=cP(p)?p(e):p;v!==e&&((g=l.current)==null||g.call(l,v))}else o(p)},[u,e,o,l]);return[c,h]}function uP({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),s=w.useRef(n),o=w.useRef(t);return lP(()=>{o.current=t},[t]),w.useEffect(()=>{var l;s.current!==n&&((l=o.current)==null||l.call(o,n),s.current=n)},[n,s]),[n,r,o]}function cP(e){return typeof e=="function"}var nx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),dP="VisuallyHidden",Ic=w.forwardRef((e,t)=>m.jsx(pe.span,{...e,ref:t,style:{...nx,...e.style}}));Ic.displayName=dP;var hP=Ic,gm="ToastProvider",[vm,fP,pP]=Oc("Toast"),[rx,cz]=ir("Toast",[pP]),[mP,Mc]=rx(gm),ix=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:l}=e,[u,c]=w.useState(null),[h,p]=w.useState(0),g=w.useRef(!1),v=w.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${gm}\`. Expected non-empty \`string\`.`),m.jsx(vm.Provider,{scope:t,children:m.jsx(mP,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:h,viewport:u,onViewportChange:c,onToastAdd:w.useCallback(()=>p(_=>_+1),[]),onToastRemove:w.useCallback(()=>p(_=>
40_-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:v,children:l})})};ix.displayName=gm;var sx="ToastViewport",gP=["F8"],Lf="toast.viewportPause",If="toast.viewportResume",ox=w.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=gP,label:s="Notifications ({hotkey})",...o}=e,l=Mc(sx,n),u=fP(n),c=w.useRef(null),h=w.useRef(null),p=w.useRef(null),g=w.useRef(null),v=Te(t,g,l.onViewportChange),_=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=l.toastCount>0;w.useEffect(()=>{const T=E=>{var x;r.length!==0&&r.every(P=>E[P]||E.code===P)&&((x=g.current)==null||x.focus())};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[r]),w.useEffect(()=>{const T=c.current,E=g.current;if(k&&T&&E){const S=()=>{if(!l.isClosePausedRef.current){const N=new CustomEvent(Lf);E.dispatchEvent(N),l.isClosePausedRef.current=!0}},x=()=>{if(l.isClosePausedRef.current){const N=new CustomEvent(If);E.dispatchEvent(N),l.isClosePausedRef.current=!1}},P=N=>{!T.contains(N.relatedTarget)&&x()},R=()=>{T.contains(document.activeElement)||x()};return T.addEventListener("focusin",S),T.addEventListener("focusout",P),T.addEventListener("pointermove",S),T.addEventListener("pointerleave",R),window.addEventListener("blur",S),window.addEventListener("focus",x),()=>{T.removeEventListener("focusin",S),T.removeEventListener("focusout",P),T.removeEventListener("pointermove",S),T.removeEventListener("pointerleave",R),window.removeEventListener("blur",S),window.removeEventListener("focus",x)}}},[k,l.isClosePausedRef]);const y=w.useCallback(({tabbingDirection:T})=>{const S=u().map(x=>{const P=x.ref.current,R=[P,...RP(P)];return T==="forwards"?R:R.reverse()});return(T==="forwards"?S.reverse():S).flat()},[u]);return w.useEffect(()=>{const T=g.current;if(T){const E=S=>{var R,N,O;const x=S.altKey||S.ctrlKey||S.metaKey;if(S.key==="Tab"&&!x){const z=document.activeElement,D=S.shiftKey;if(S.target===T&&D){(R=h.current)==null||R.focus();return}const H=y({tabbingDirection:D?"backwards":"forwards"}),te=H.findIndex(G=>G===z);fh(H.slice(te+1))?S.preventDefault():D?(N=h.current)==null||N.focus():(O=p.current)==null||O.focus()}};return T.addEventListener("keydown",E),()=>T.removeEventListener("keydown",E)}},[u,y]),m.jsxs(rP,{ref:c,role:"region","aria-label":s.replace("{hotkey}",_),tabIndex:-1,style:{pointerEvents:k?void 0:"none"},children:[k&&m.jsx(Mf,{ref:h,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"forwards"});fh(T)}}),m.jsx(vm.Slot,{scope:n,children:m.jsx(pe.ol,{tabIndex:-1,...o,ref:v})}),k&&m.jsx(Mf,{ref:p,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"backwards"});fh(T)}})]})});ox.displayName=sx;var ax="ToastFocusProxy",Mf=w.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Mc(ax,n);return m.jsx(Ic,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:l=>{var h;const u=l.relatedTarget;!((h=o.viewport)!=null&&h.contains(u))&&r()}})});Mf.displayName=ax;var ll="Toast",vP="toast.swipeStart",yP="toast.swipeMove",_P="toast.swipeCancel",wP="toast.swipeEnd",lx=w.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...l}=e,[u,c]=Xi({prop:r,defaultProp:s??!0,onChange:o,caller:ll});return m.jsx(yi,{present:n||u,children:m.jsx(SP,{open:u,...l,ref:t,onClose:()=>c(!1),onPause:at(e.onPause),onResume:at(e.onResume),onSwipeStart:ae(e.onSwipeStart,h=>{h.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ae(e.onSwipeMove,h=>{const{x:p,y:g}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","move"),h.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:ae(e.onSwipeCancel,h=>{h.currentTarget.setAttribute("data-swipe","cancel"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ae(e.onSwipeEnd,h=>{const{x:p,y:g}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","end"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),c(!1)})})})});lx.displayName=ll;var[xP,bP]=rx(ll,{onClose(){}}),SP=w.forwardRef((e,t)=>
40{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:l,onEscapeKeyDown:u,onPause:c,onResume:h,onSwipeStart:p,onSwipeMove:g,onSwipeCancel:v,onSwipeEnd:_,...k}=e,y=Mc(ll,n),[T,E]=w.useState(null),S=Te(t,G=>E(G)),x=w.useRef(null),P=w.useRef(null),R=s||y.duration,N=w.useRef(0),O=w.useRef(R),z=w.useRef(0),{onToastAdd:D,onToastRemove:j}=y,V=at(()=>{var ne;(T==null?void 0:T.contains(document.activeElement))&&((ne=y.viewport)==null||ne.focus()),l()}),H=w.useCallback(G=>{!G||G===1/0||(window.clearTimeout(z.current),N.current=new Date().getTime(),z.current=window.setTimeout(V,G))},[V]);w.useEffect(()=>{const G=y.viewport;if(G){const ne=()=>{H(O.current),h==null||h()},W=()=>{const Q=new Date().getTime()-N.current;O.current=O.current-Q,window.clearTimeout(z.current),c==null||c()};return G.addEventListener(Lf,W),G.addEventListener(If,ne),()=>{G.removeEventListener(Lf,W),G.removeEventListener(If,ne)}}},[y.viewport,R,c,h,H]),w.useEffect(()=>{o&&!y.isClosePausedRef.current&&H(R)},[o,R,y.isClosePausedRef,H]),w.useEffect(()=>(D(),()=>j()),[D,j]);const te=w.useMemo(()=>T?mx(T):null,[T]);return y.viewport?m.jsxs(m.Fragment,{children:[te&&m.jsx(EP,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:te}),m.jsx(xP,{scope:n,onClose:V,children:ss.createPortal(m.jsx(vm.ItemSlot,{scope:n,children:m.jsx(nP,{asChild:!0,onEscapeKeyDown:ae(u,()=>{y.isFocusedToastEscapeKeyDownRef.current||V(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(pe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":y.swipeDirection,...k,ref:S,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ae(e.onKeyDown,G=>{G.key==="Escape"&&(u==null||u(G.nativeEvent),G.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,V()))}),onPointerDown:ae(e.onPointerDown,G=>{G.button===0&&(x.current={x:G.clientX,y:G.clientY})}),onPointerMove:ae(e.onPointerMove,G=>{if(!x.current)return;const ne=G.clientX-x.current.x,W=G.clientY-x.current.y,Q=!!P.current,I=["left","right"].includes(y.swipeDirection),$=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=I?$(0,ne):0,X=I?0:$(0,W),ee=G.pointerType==="touch"?10:2,le={x:F,y:X},se={originalEvent:G,delta:le};Q?(P.current=le,nu(yP,g,se,{discrete:!1})):ry(le,y.swipeDirection,ee)?(P.current=le,nu(vP,p,se,{discrete:!1}),G.target.setPointerCapture(G.pointerId)):(Math.abs(ne)>ee||Math.abs(W)>ee)&&(x.current=null)}),onPointerUp:ae(e.onPointerUp,G=>{const ne=P.current,W=G.target;if(W.hasPointerCapture(G.pointerId)&&W.releasePointerCapture(G.pointerId),P.current=null,x.current=null,ne){const Q=G.currentTarget,I={originalEvent:G,delta:ne};ry(ne,y.swipeDirection,y.swipeThreshold)?nu(wP,_,I,{discrete:!0}):nu(_P,v,I,{discrete:!0}),Q.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),EP=e=>{const{__scopeToast:t,children:n,...r}=e,s=Mc(ll,t),[o,l]=w.useState(!1),[u,c]=w.useState(!1);return CP(()=>l(!0)),w.useEffect(()=>{const h=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(h)},[]),u?null:m.jsx(mm,{asChild:!0,children:m.jsx(Ic,{...r,children:o&&m.jsxs(m.Fragment,{children:[s.label," ",n]})})})},TP="ToastTitle",ux=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(pe.div,{...r,ref:t})});ux.displayName=TP;var kP="ToastDescription",cx=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(pe.div,{...r,ref:t})});cx.displayName=kP;var dx="ToastAction",hx=w.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(px,{altText:n,asChild:!0,children:m.jsx(ym,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${dx}\`. Expected non-empty \`string\`.`),null)});hx.displayName=dx;var fx="ToastClose",ym=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=bP(fx,n);return m.jsx(px,{asChild:!0,children:m.jsx(pe.button,{type:"button",...r,ref:t,onClick:ae(e.onClick,s.onClose)})})});ym.displayName=fx;var px=w.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return m.jsx(pe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function mx(e){const t=[];
vendor: 4,812 bytes, lines 40-70
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),PP(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...mx(r))}}),t}function nu(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Q0(s,o):s.dispatchEvent(o)}var ry=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function CP(e=()=>{}){const t=at(e);ht(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function PP(e){return e.nodeType===e.ELEMENT_NODE}function RP(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fh(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var AP=ix,gx=ox,vx=lx,yx=ux,_x=cx,wx=hx,xx=ym;function bx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=bx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Sx(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=bx(e))&&(r&&(r+=" "),r+=t);return r}const iy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sy=Sx,jc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return sy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,l=Object.keys(s).map(h=>{const p=n==null?void 0:n[h],g=o==null?void 0:o[h];if(p===null)return null;const v=iy(p)||iy(g);return s[h][v]}),u=n&&Object.entries(n).reduce((h,p)=>{let[g,v]=p;return v===void 0||(h[g]=v),h},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,p)=>{let{class:g,className:v,..._}=p;return Object.entries(_).every(k=>{let[y,T]=k;return Array.isArray(T)?T.includes({...o,...u}[y]):{...o,...u}[y]===T})?[...h,g,v]:h},[]);return sy(e,l,c,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 NP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ex=(...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 OP={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 LP=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:l,...u},c)=>w.createElement("svg",{ref:c,...OP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ex("lucide",s),...u},[...l.map(([h,p])=>w.createElement(h,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 Ke=(e,t)=>{const n=w.forwardRef(({className:r,...s},o)=>w.createElement(LP,{ref:o,iconNode:t,className:Ex(`lucide-${NP(e)}`,r),...s}));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 IP=Ke("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
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 MP=Ke("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
70],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
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 Tx=Ke("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"}]]);/**
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 jP=Ke("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
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 kx=Ke("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 DP=Ke("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
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 zP=Ke("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
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 jf=Ke("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"}]]);/**
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 Cx=Ke("GitCompare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);/**
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 BP=Ke("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"}]]);/**
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 Px=Ke("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"}]]);/**
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 Ua=Ke("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 _m=Ke("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"}]]);/**
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 Rx=Ke("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/**
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 $P=Ke("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
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 FP=Ke("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
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 UP=Ke("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 HP=Ke("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
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 oy=Ke("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
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 VP=Ke("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
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 Ax=Ke("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
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 Nx=Ke("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"}]]);/**
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 Ha=Ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,915 bytes, line 175
175],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wm="-",WP=e=>{const t=qP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(wm);return u[0]===""&&u.length!==1&&u.shift(),Ox(u,t)||GP(l)},getConflictingClassGroupIds:(l,u)=>{const c=n[l]||[];return u&&r[l]?[...c,...r[l]]:c}}},Ox=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Ox(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(wm);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},ay=/^\[(.+)\]$/,GP=e=>{if(ay.test(e)){const t=ay.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},qP=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ZP(Object.entries(e.classGroups),n).forEach(([o,l])=>{Df(l,r,o,t)}),r},Df=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:ly(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(KP(s)){Df(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,l])=>{Df(l,ly(t,o),n,r)})})},ly=(e,t)=>{let n=e;return t.split(wm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},KP=e=>e.isThemeGetter,ZP=(e,t)=>t?e.map(([n,r])=>{const s=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,s]}):e,YP=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(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 s(o,l),l},set(o,l){n.has(o)?n.set(o,l):s(o,l)}}},Lx="!",JP=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,l=u=>{const c=[];let h=0,p=0,g;for(let T=0;T<u.length;T++){let E=u[T];if(h===0){if(E===s&&(r||u.slice(T,T+o)===t)){c.push(u.slice(p,T)),p=T+o;continue}if(E==="/"){g=T;continue}}E==="["?h++:E==="]"&&h--}const v=c.length===0?u:u.substring(p),_=v.startsWith(Lx),k=_?v.substring(1):v,y=g&&g>p?g-p:void 0;return{modifiers:c,hasImportantModifier:_,baseClassName:k,maybePostfixModifierPosition:y}};return n?u=>n({className:u,parseClassName:l}):l},QP=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},XP=e=>({cache:YP(e.cacheSize),parseClassName:JP(e),...WP(e)}),eR=/\s+/,tR=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],l=e.trim().split(eR);let u="";for(let c=l.length-1;c>=0;c-=1){const h=l[c],{modifiers:p,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:_}=n(h);let k=!!_,y=r(k?v.substring(0,_):v);if(!y){if(!k){u=h+(u.length>0?" "+u:u);continue}if(y=r(v),!y){u=h+(u.length>0?" "+u:u);continue}k=!1}const T=QP(p).join(":"),E=g?T+Lx:T,S=E+y;if(o.includes(S))continue;o.push(S);const x=s(y,k);for(let P=0;P<x.length;++P){const R=x[P];o.push(E+R)}u=h+(u.length>0?" "+u:u)}return u};function nR(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ix(t))&&(r&&(r+=" "),r+=n);return r}const Ix=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ix(e[r]))&&(n&&(n+=" "),n+=t);return n};function rR(e,...t){let n,r,s,o=l;function l(c){const h=t.reduce((p,g)=>g(p),e());return n=XP(h),r=n.cache.get,s=n.cache.set,o=u,u(c)}function u(c){const h=r(c);if(h)return h;const p=tR(c,n);return s(c,p),p}return function(){return o(nR.apply(null,arguments))}}const Be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Mx=/^\[(?:([a-z-]+):)?(.+)\]$/i,iR=/^\d+\/\d+$/,sR=new Set(["px","full","screen"]),oR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aR=/\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$/,lR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pr=e=>Ys(e)||sR.has(e)||iR.test(e),jr=e=>Eo(e,"length",yR),Ys=e=>!!e&&!Number.isNaN(Number(e)),ph=e=>Eo(e,"number",Ys),ea=e=>!!e&&Number.isInteger(Number(e)),dR=e=>e.endsWith("%")&&Ys(e.slice(0,-1)),_e=e=>Mx.test(e),Dr=e=>oR.test(e),hR=new Set(["length","size","percentage"]),fR=e=>Eo(e,hR,jx),pR=e=>Eo(e,"position",jx),mR=new Set(["image","url"]),gR=e=>Eo(e,mR,wR),vR=e=>Eo(e,"",_R),ta=()=>!0,Eo=(e,t,n)=>{const r=Mx.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},yR=e=>aR.test(e)&&!lR.test(e),jx=()=>!1,_R=e=>uR.test(e),wR=e=>cR.test(e),xR=()=>{const e=Be("colors"),t=Be("spacing"),n=Be("blur"),r=Be("brightness"),s=Be("borderColor"),o=Be("borderRadius"),l=Be("borderSpacing"),u=Be("borderWidth"),c=Be("contrast"),h=Be("grayscale"),p=Be("hueRotate"),g=Be("invert"),v=Be("gap"),_=Be("gradientColorStops"),k=Be("gradientColorStopPositions"),y=Be("inset"),T=Be("margin"),E=Be("opacity"),S=Be("padding"),x=Be("saturate"),P=Be("scale"),R=Be("sepia"),N=Be("skew"),O=Be("space"),z=Be("translate"),D=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",_e,t],H=()=>[_e,t],te=()=>["",pr,jr],G=()=>["auto",Ys,_e],ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",_e],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[Ys,_e];return{cacheSize:500,separator:":",theme:{colors:[ta],spacing:[pr,jr],blur:["none","",Dr,_e],brightness:X(),borderColor:[e],borderRadius:["n
175one","","full",Dr,_e],borderSpacing:H(),borderWidth:te(),contrast:X(),grayscale:$(),hueRotate:X(),invert:$(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[dR,jr],inset:V(),margin:V(),opacity:X(),padding:H(),saturate:X(),scale:X(),sepia:$(),skew:X(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",_e]}],container:["container"],columns:[{columns:[Dr]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"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:[...ne(),_e]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ea,_e]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",_e]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",ea,_e]}],"grid-cols":[{"grid-cols":[ta]}],"col-start-end":[{col:["auto",{span:["full",ea,_e]},_e]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[ta]}],"row-start-end":[{row:["auto",{span:[ea,_e]},_e]}],"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",_e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",_e]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[T]}],mx:[{mx:[T]}],my:[{my:[T]}],ms:[{ms:[T]}],me:[{me:[T]}],mt:[{mt:[T]}],mr:[{mr:[T]}],mb:[{mb:[T]}],ml:[{ml:[T]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",_e,t]}],"min-w":[{"min-w":[_e,t,"min","max","fit"]}],"max-w":[{"max-w":[_e,t,"none","full","min","max","fit","prose",{screen:[Dr]},Dr]}],h:[{h:[_e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[_e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Dr,jr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ph]}],"font-family":[{font:[ta]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",_e]}],"line-clamp":[{"line-clamp":["none",Ys,ph]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pr,_e]}],"list-image":[{"list-image":["none",_e]}],"list-style-type":[{list:["none","disc","decimal",_e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pr,jr]}],"underline-offset":[{"underline-offset":["auto",pr,_e]}],"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:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e]}],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",_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ne(),pR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",fR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}
vendor: 5,181 bytes, line 175
175],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],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":[E]}],"border-style":[{border:[...W(),"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":[E]}],"divide-style":[{divide:W()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[pr,_e]}],"outline-w":[{outline:[pr,jr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[pr,jr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Dr,vR]}],"shadow-color":[{shadow:[ta]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Dr,_e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[x]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"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",_e]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",_e]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",_e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[ea,_e]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",_e]}],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",_e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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 175
175],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",_e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[pr,jr,ph]}],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"]}}},bR=rR(xR);function Ce(...e){return bR(Sx(e))}const SR=AP,Dx=w.forwardRef(({className:e,...t},n)=>m.jsx(gx,{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}));Dx.displayName=gx.displayName;const ER=jc("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"}}),zx=w.forwardRef(({className:e,variant:t,...n},r)=>m.jsx(vx,{ref:r,className:Ce(ER({variant:t}),e),...n}));zx.displayName=vx.displayName;const TR=w.forwardRef(({className:e,...t},n)=>m.jsx(wx,{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 group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));TR.displayName=wx.displayName;const Bx=w.forwardRef(({className:e,...t},n)=>m.jsx(xx,{ref:n,className:Ce("absolute right-2 top-2 rounded-md p-1 text-foreground
175/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:m.jsx(Ha,{className:"h-4 w-4"})}));Bx.displayName=xx.displayName;const $x=w.forwardRef(({className:e,...t},n)=>m.jsx(yx,{ref:n,className:Ce("text-sm font-semibold",e),...t}));$x.displayName=yx.displayName;const Fx=w.forwardRef(({className:e,...t},n)=>m.jsx(_x,{ref:n,className:Ce("text-sm opacity-90",e),...t}));Fx.displayName=_x.displayName;function kR(){const{toasts:e}=$C();return m.jsxs(SR,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return m.jsxs(zx,{...o,children:[m.jsxs("div",{className:"grid gap-1",children:[n&&m.jsx($x,{children:n}),r&&m.jsx(Fx,{children:r})]}),s,m.jsx(Bx,{})]},t)}),m.jsx(Dx,{})]})}var uy=["light","dark"],CR="(prefers-color-scheme: dark)",PR=w.createContext(void 0),RR={setTheme:e=>{},themes:[]},AR=()=>{var e;return(e=w.useContext(PR))!=null?e:RR};w.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:l,attrs:u,nonce:c})=>{let h=o==="system",p=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${u.map(k=>`'${k}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,g=s?uy.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",v=(k,y=!1,T=!0)=>{let E=l?l[k]:k,S=y?k+"|| ''":`'${E}'`,x="";return s&&T&&!y&&uy.includes(k)&&(x+=`d.style.colorScheme = '${k}';`),n==="class"?y||E?x+=`c.add(${S})`:x+="null":E&&(x+=`d[s](n,${S})`),x},_=e?`!function(){${p}${v(e)}}()`:r?`!function(){try{${p}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${h})){var t='${CR}',m=window.matchMedia(t);if(m.media!==t||m.matches){${v("dark")}}else{${v("light")}}}else if(e){${l?`var x=${JSON.stringify(l)};`:""}${v(l?"x[e]":"e",!0)}}${h?"":"else{"+v(o,!1,!1)+"}"}${g}}catch(e){}}()`:`!function(){try{${p}var e=localStorage.getItem('${t}');if(e){${l?`var x=${JSON.stringify(l)};`:""}${v(l?"x[e]":"e",!0)}}else{${v(o,!1,!1)};}${g}}catch(t){}}();`;return w.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:_}})});var NR=e=>{switch(e){case"success":return IR;case"info":return jR;case"warning":return MR;case"error":return DR;default:return null}},OR=Array(12).fill(0),LR=({visible:e,className:t})=>J.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},J.createElement("div",{className:"sonner-spinner"},OR.map((n,r)=>J.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),IR=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),MR=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},J.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"})),jR=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),DR=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),zR=J.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"},J.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),J.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),BR=()=>{let[e,t]=J.useState(document.hidden);return J.useEffect(()=>{let n=()=>{t(document.hidden)};
175return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},zf=1,$R=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,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:zf++,o=this.toasts.find(u=>u.id===s),l=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...e,id:s,title:n}),{...u,...e,id:s,dismissible:l,title:n}):u):this.addToast({title:n,...r,dismissible:l,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(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)=>
175this.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(),s=n!==void 0,o,l=r.then(async c=>{if(o=["resolve",c],J.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(UR(c)&&!c.ok){s=!1;let h=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:h,description:p})}else if(t.success!==void 0){s=!1;let h=typeof t.success=="function"?await t.success(c):t.success,p=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:h,description:p})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){s=!1;let h=typeof t.error=="function"?await t.error(c):t.error,p=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:h,description:p})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),u=()=>new Promise((c,h)=>l.then(()=>o[0]==="reject"?h(o[1]):c(o[1])).catch(h));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||zf++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},jt=new $R,FR=(e,t)=>{let n=(t==null?void 0:t.id)||zf++;return jt.addToast({title:e,...t,id:n}),n},UR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",HR=FR,VR=()=>jt.toasts,WR=()=>jt.getActiveToasts();Object.assign(HR,{success:jt.success,info:jt.info,warning:jt.warning,error:jt.error,custom:jt.custom,message:jt.message,promise:jt.promise,dismiss:jt.dismiss,loading:jt.loading},{getHistory:VR,getToasts:WR});function GR(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))}GR(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
175left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
175:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
175--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
176`);function ru(e){return e.label!==void 0}var qR=3,KR="32px",ZR="16px",cy=4e3,YR=356,JR=14,QR=20,XR=200;function _n(...e){return e.filter(Boolean).join(" ")}function eA(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var tA=e=>{var t,n,r,s,o,l,u,c,h,p,g;let{invert:v,toast:_,unstyled:k,interacting:y,setHeights:T,visibleToasts:E,heights:S,index:x,toasts:P,expanded:R,removeToast:N,defaultRichColors:O,closeButton:z,style:D,cancelButtonStyle:j,actionButtonStyle:V,className:H="",descriptionClassName:te="",duration:G,position:ne,gap:W,loadingIcon:Q,expandByDefault:I,classNames:$,icons:F,closeButtonAriaLabel:X="Close toast",pauseWhenPageIsHidden:ee}=e,[le,se]=J.useState(null),[Y,ie]=J.useState(null),[Z,me]=J.useState(!1),[Oe,xe]=J.useState(!1),[be,Se]=J.useState(!1),[et,It]=J.useState(!1),[Mn,pn]=J.useState(!1),[mn,jn]=J.useState(0),[Nr,Ao]=J.useState(0),ar=J.useRef(_.duration||G||cy),No=J.useRef(null),Dn=J.useRef(null),ad=x===0,ld=x+1<=E,_t=_.type,lr=_.dismissible!==!1,pl=_.className||"",ud=_.descriptionClassName||"",xi=J.useMemo(()=>S.findIndex(ge=>ge.toastId===_.id)||0,[S,_.id]),ml=J.useMemo(()=>{var ge;return(ge=_.closeButton)!=null?ge:z},[_.closeButton,z]),gl=J.useMemo(()=>_.duration||G||cy,[_.duration,G]),os=J.useRef(0),zn=J.useRef(0),Oo=J.useRef(0),Or=J.useRef(null),[bi,cd]=ne.split("-"),vl=J.useMemo(()=>S.reduce((ge,Le,Me)=>Me>=xi?ge:ge+Le.height,0),[S,xi]),Lo=BR(),yl=_.invert||v,as=_t==="loading";zn.current=J.useMemo(()=>xi*W+vl,[xi,vl]),J.useEffect(()=>{ar.current=gl},[gl]),J.useEffect(()=>{me(!0)},[]),J.useEffect(()=>{let ge=Dn.current;if(ge){let Le=ge.getBoundingClientRect().height;return Ao(Le),T(Me=>[{toastId:_.id,height:Le,position:_.position},...Me]),()=>T(Me=>Me.filter(Ht=>Ht.toastId!==_.id))}},[T,_.id]),J.useLayoutEffect(()=>{if(!Z)return;let ge=Dn.current,Le=ge.style.height;ge.style.height="auto";let Me=ge.getBoundingClientRect().height;ge.style.height=Le,Ao(Me),T(Ht=>Ht.find(kt=>kt.toastId===_.id)?Ht.map(kt=>kt.toastId===_.id?{...kt,height:Me}:kt):[{toastId:_.id,height:Me,position:_.position},...Ht])},[Z,_.title,_.description,T,_.id]);let Bn=J.useCallback(()=>{xe(!0),jn(zn.current),T(ge=>ge.filter(Le=>Le.toastId!==_.id)),setTimeout(()=>{N(_)},XR)},[_,N,T,zn]);J.useEffect(()=>{if(_.promise&&_t==="loading"||_.duration===1/0||_.type==="loading")return;let ge;return R||y||ee&&Lo?(()=>{if(Oo.current<os.current){let Le=new Date().getTime()-os.current;ar.current=ar.current-Le}
176Oo.current=new Date().getTime()})():ar.current!==1/0&&(os.current=new Date().getTime(),ge=setTimeout(()=>{var Le;(Le=_.onAutoClose)==null||Le.call(_,_),Bn()},ar.current)),()=>clearTimeout(ge)},[R,y,_,_t,ee,Lo,Bn]),J.useEffect(()=>{_.delete&&Bn()},[Bn,_.delete]);function dd(){var ge,Le,Me;return F!=null&&F.loading?J.createElement("div",{className:_n($==null?void 0:$.loader,(ge=_==null?void 0:_.classNames)==null?void 0:ge.loader,"sonner-loader"),"data-visible":_t==="loading"},F.loading):Q?J.createElement("div",{className:_n($==null?void 0:$.loader,(Le=_==null?void 0:_.classNames)==null?void 0:Le.loader,"sonner-loader"),"data-visible":_t==="loading"},Q):J.createElement(LR,{className:_n($==null?void 0:$.loader,(Me=_==null?void 0:_.classNames)==null?void 0:Me.loader),visible:_t==="loading"})}return J.createElement("li",{tabIndex:0,ref:Dn,className:_n(H,pl,$==null?void 0:$.toast,(t=_==null?void 0:_.classNames)==null?void 0:t.toast,$==null?void 0:$.default,$==null?void 0:$[_t],(n=_==null?void 0:_.classNames)==null?void 0:n[_t]),"data-sonner-toast":"","data-rich-colors":(r=_.richColors)!=null?r:O,"data-styled":!(_.jsx||_.unstyled||k),"data-mounted":Z,"data-promise":!!_.promise,"data-swiped":Mn,"data-removed":Oe,"data-visible":ld,"data-y-position":bi,"data-x-position":cd,"data-index":x,"data-front":ad,"data-swiping":be,"data-dismissible":lr,"data-type":_t,"data-invert":yl,"data-swipe-out":et,"data-swipe-direction":Y,"data-expanded":!!(R||I&&Z),style:{"--index":x,"--toasts-before":x,"--z-index":P.length-x,"--offset":`${Oe?mn:zn.current}px`,"--initial-height":I?"auto":`${Nr}px`,...D,..._.style},onDragEnd:()=>{Se(!1),se(null),Or.current=null},onPointerDown:ge=>{as||!lr||(No.current=new Date,jn(zn.current),ge.target.setPointerCapture(ge.pointerId),ge.target.tagName!=="BUTTON"&&(Se(!0),Or.current={x:ge.clientX,y:ge.clientY}))},onPointerUp:()=>{var ge,Le,Me,Ht;if(et||!lr)return;Or.current=null;let kt=Number(((ge=Dn.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$n=Number(((Le=Dn.current)==null?void 0:Le.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ur=new Date().getTime()-((Me=No.current)==null?void 0:Me.getTime()),Vt=le==="x"?kt:$n,Fn=Math.abs(Vt)/ur;if(Math.abs(Vt)>=QR||Fn>.11){jn(zn.current),(Ht=_.onDismiss)==null||Ht.call(_,_),ie(le==="x"?kt>0?"right":"left":$n>0?"down":"up"),Bn(),It(!0),pn(!1);return}Se(!1),se(null)},onPointerMove:ge=>{var Le,Me,Ht,kt;if(!Or.current||!lr||((Le=window.getSelection())==null?void 0:Le.toString().length)>0)return;let $n=ge.clientY-Or.current.y,ur=ge.clientX-Or.current.x,Vt=(Me=e.swipeDirections)!=null?Me:eA(ne);!le&&(Math.abs(ur)>1||Math.abs($n)>1)&&se(Math.abs(ur)>Math.abs($n)?"x":"y");let Fn={x:0,y:0};le==="y"?(Vt.includes("top")||Vt.includes("bottom"))&&(Vt.includes("top")&&$n<0||Vt.includes("bottom")&&$n>0)&&(Fn.y=$n):le==="x"&&(Vt.includes("left")||Vt.includes("right"))&&(Vt.includes("left")&&ur<0||Vt.includes("right")&&ur>0)&&(Fn.x=ur),(Math.abs(Fn.x)>0||Math.abs(Fn.y)>0)&&pn(!0),(Ht=Dn.current)==null||Ht.style.setProperty("--swipe-amount-x",`${Fn.x}px`),(kt=Dn.current)==null||kt.style.setProperty("--swipe-amount-y",`${Fn.y}px`)}},ml&&!_.jsx?J.createElement("button",{"aria-label":X,"data-disabled":as,"data-close-button":!0,onClick:as||!lr?()=>{}:()=>{var ge;Bn(),(ge=_.onDismiss)==null||ge.call(_,_)},className:_n($==null?void 0:$.closeButton,(s=_==null?void 0:_.classNames)==null?void 0:s.closeButton)},(o=F==null?void 0:F.close)!=null?o:zR):null,_.jsx||w.isValidElement(_.title)?_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title:J.createElement(J.Fragment,null,_t||_.icon||_.promise?J.createElement("div",{"data-icon":"",className:_n($==null?void 0:$.icon,(l=_==null?void 0:_.classNames)==null?void 0:l.icon)},_.promise||_.type==="loading"&&!_.icon?_.icon||dd():null,_.type!=="loading"?_.icon||(F==null?void 0:F[_t])||NR(_t):null):null,J.createElement("div",{"data-content":"",className:_n($==null?void 0:$.content,(u=_==null?void 0:_.classNames)==null?void 0:u.content)},J.createElement("div",{"data-title":"",className:_n($==null?void 0:$.t
176itle,(c=_==null?void 0:_.classNames)==null?void 0:c.title)},typeof _.title=="function"?_.title():_.title),_.description?J.createElement("div",{"data-description":"",className:_n(te,ud,$==null?void 0:$.description,(h=_==null?void 0:_.classNames)==null?void 0:h.description)},typeof _.description=="function"?_.description():_.description):null),w.isValidElement(_.cancel)?_.cancel:_.cancel&&ru(_.cancel)?J.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||j,onClick:ge=>{var Le,Me;ru(_.cancel)&&lr&&((Me=(Le=_.cancel).onClick)==null||Me.call(Le,ge),Bn())},className:_n($==null?void 0:$.cancelButton,(p=_==null?void 0:_.classNames)==null?void 0:p.cancelButton)},_.cancel.label):null,w.isValidElement(_.action)?_.action:_.action&&ru(_.action)?J.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||V,onClick:ge=>{var Le,Me;ru(_.action)&&((Me=(Le=_.action).onClick)==null||Me.call(Le,ge),!ge.defaultPrevented&&Bn())},className:_n($==null?void 0:$.actionButton,(g=_==null?void 0:_.classNames)==null?void 0:g.actionButton)},_.action.label):null))};function dy(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function nA(e,t){let n={};return[e,t].forEach((r,s)=>{let o=s===1,l=o?"--mobile-offset":"--offset",u=o?ZR:KR;function c(h){["top","right","bottom","left"].forEach(p=>{n[`${l}-${p}`]=typeof h=="number"?`${h}px`:h})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(h=>{r[h]===void 0?n[`${l}-${h}`]=u:n[`${l}-${h}`]=typeof r[h]=="number"?`${r[h]}px`:r[h]}):c(u)}),n}var rA=w.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:l,className:u,offset:c,mobileOffset:h,theme:p="light",richColors:g,duration:v,style:_,visibleToasts:k=qR,toastOptions:y,dir:T=dy(),gap:E=JR,loadingIcon:S,icons:x,containerAriaLabel:P="Notifications",pauseWhenPageIsHidden:R}=e,[N,O]=J.useState([]),z=J.useMemo(()=>Array.from(new Set([r].concat(N.filter(ee=>ee.position).map(ee=>ee.position)))),[N,r]),[D,j]=J.useState([]),[V,H]=J.useState(!1),[te,G]=J.useState(!1),[ne,W]=J.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=J.useRef(null),I=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=J.useRef(null),F=J.useRef(!1),X=J.useCallback(ee=>{O(le=>{var se;return(se=le.find(Y=>Y.id===ee.id))!=null&&se.delete||jt.dismiss(ee.id),le.filter(({id:Y})=>Y!==ee.id)})},[]);return J.useEffect(()=>jt.subscribe(ee=>{if(ee.dismiss){O(le=>le.map(se=>se.id===ee.id?{...se,delete:!0}:se));return}setTimeout(()=>{K0.flushSync(()=>{O(le=>{let se=le.findIndex(Y=>Y.id===ee.id);return se!==-1?[...le.slice(0,se),{...le[se],...ee},...le.slice(se+1)]:[ee,...le]})})})}),[]),J.useEffect(()=>{if(p!=="system"){W(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let ee=window.matchMedia("(prefers-color-scheme: dark)");try{ee.addEventListener("change",({matches:le})=>{W(le?"dark":"light")})}catch{ee.addListener(({matches:se})=>{try{W(se?"dark":"light")}catch(Y){console.error(Y)}})}},[p]),J.useEffect(()=>{N.length<=1&&H(!1)},[N]),J.useEffect(()=>{let ee=le=>{var se,Y;s.every(ie=>le[ie]||le.code===ie)&&(H(!0),(se=Q.current)==null||se.focus()),le.code==="Escape"&&(document.activeElement===Q.current||(Y=Q.current)!=null&&Y.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[s]),J.useEffect(()=>{if(Q.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,F.current=!1)}},[Q.current]),J.createElement("section",{ref:t,"aria-label":`${P} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((ee,le)=>{var se;let[Y,ie]=ee.split("-");return N.length?J.createElement("ol",{key:ee,dir:T==="auto"?dy():T,tabIndex:-1,ref:Q,className:u,"data-sonner-toaster":!0,"data-theme":ne,"data-y-position":Y,"data-lifted":V&&N.length>1&&!o,"data-x-position":ie,style:{"--front-toast-height":`${((se=D[0])==null?void 0:se.height)||0}px`,"--width":`${YR}px`,"--gap":`${E}px`,..._,...nA(c,h)},onBlur:Z=>{F.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(F.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||F.current||(F.current=!0,$.current=Z.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{te||H(!1)},onDragEnd:()=>H(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||G(!0)},onPointerUp:()=>G(!1)},N.filter(Z=>!Z.position&&le===0||Z.position===ee).map((Z,me)=>{var Oe,xe;return J.createElement(tA,{key:Z.id,icons:x,index:me,toast:Z,defaultRichColors:g,duration:(Oe=y==null?void 0:y.duration)!=null?Oe:v,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:k,closeButton:(xe=y==null?void 0:y.closeButton)!=null?xe:l,interacting:te,position:ee,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:X,toasts:N.filter(be=>be.position==Z.position),heights:D.filter(be=>be.position==Z.position),setHeights:j,expandByDefault:o,gap:E,loadingIcon:S,expanded:V,pauseWhenPageIsHidden:R,swipeDirections:e.swipeDirections})})):null}))});const iA=({...e})=>{const{theme:t="system"}=AR();return m.jsx(rA,{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 sA=Ep[" useId ".trim().toString()]||(()=>{}),oA=0;function ul(e){const[t,n]=w.useState(sA());return ht(()=>{n(r=>r??String(oA++))},[e]),t?`radix-${t}`:""}const aA=["top","right","bottom","left"],fi=Math.min,qt=Math.max,rc=Math.round,iu=Math.floor,nr=e=>({x:e,y:e}
vendor: 12,421 bytes, line 176
176),lA={left:"right",right:"left",bottom:"top",top:"bottom"},uA={start:"end",end:"start"};function Bf(e,t,n){return qt(e,fi(t,n))}function Cr(e,t){return typeof e=="function"?e(t):e}function Pr(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function xm(e){return e==="x"?"y":"x"}function bm(e){return e==="y"?"height":"width"}const cA=new Set(["top","bottom"]);function Xn(e){return cA.has(Pr(e))?"y":"x"}function Sm(e){return xm(Xn(e))}function dA(e,t,n){n===void 0&&(n=!1);const r=To(e),s=Sm(e),o=bm(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=ic(l)),[l,ic(l)]}function hA(e){const t=ic(e);return[$f(e),t,$f(t)]}function $f(e){return e.replace(/start|end/g,t=>uA[t])}const hy=["left","right"],fy=["right","left"],fA=["top","bottom"],pA=["bottom","top"];function mA(e,t,n){switch(e){case"top":case"bottom":return n?t?fy:hy:t?hy:fy;case"left":case"right":return t?fA:pA;default:return[]}}function gA(e,t,n,r){const s=To(e);let o=mA(Pr(e),n==="start",r);return s&&(o=o.map(l=>l+"-"+s),t&&(o=o.concat(o.map($f)))),o}function ic(e){return e.replace(/left|right|bottom|top/g,t=>lA[t])}function vA(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ux(e){return typeof e!="number"?vA(e):{top:e,right:e,bottom:e,left:e}}function sc(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function py(e,t,n){let{reference:r,floating:s}=e;const o=Xn(t),l=Sm(t),u=bm(l),c=Pr(t),h=o==="y",p=r.x+r.width/2-s.width/2,g=r.y+r.height/2-s.height/2,v=r[u]/2-s[u]/2;let _;switch(c){case"top":_={x:p,y:r.y-s.height};break;case"bottom":_={x:p,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:g};break;case"left":_={x:r.x-s.width,y:g};break;default:_={x:r.x,y:r.y}}switch(To(t)){case"start":_[l]-=v*(n&&h?-1:1);break;case"end":_[l]+=v*(n&&h?-1:1);break}return _}const yA=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),c=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:g}=py(h,r,c),v=r,_={},k=0;for(let y=0;y<u.length;y++){const{name:T,fn:E}=u[y],{x:S,y:x,data:P,reset:R}=await E({x:p,y:g,initialPlacement:r,placement:v,strategy:s,middlewareData:_,rects:h,platform:l,elements:{reference:e,floating:t}});p=S??p,g=x??g,_={..._,[T]:{..._[T],...P}},R&&k<=50&&(k++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(h=R.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:p,y:g}=py(h,v,c)),y=-1)}return{x:p,y:g,placement:v,strategy:s,middlewareData:_}};async function Va(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:l,elements:u,strategy:c}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:v=!1,padding:_=0}=Cr(t,e),k=Ux(_),T=u[v?g==="floating"?"reference":"floating":g],E=sc(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(T)))==null||n?T:T.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:h,rootBoundary:p,strategy:c})),S=g==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),P=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},R=sc(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:S,offsetParent:x,strategy:c}):S);return{top:(E.top-R.top+k.top)/P.y,bottom:(R.bottom-E.bottom+k.bottom)/P.y,left:(E.left-R.left+k.left)/P.x,right:(R.right-E.right+k.right)/P.x}}const _A=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:l,elements:u,middlewareData:c}=t,{element:h,padding:p=0}=Cr(e,t)||{};if(h==null)return{};const g=Ux(p),v={x:n,y:r},_=Sm(s),k=bm(_),y=await l.getDimensions(h),T=_==="y",E=T?"top":"left",S=T?"bottom":"right",x=T?"clientHeight":"clientWidth",P=o.reference[k]+o.reference[_]-v[_]-o.floating[k],R=v[_]-o.reference[_],N=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let O=N?N[x]:0;(!O||!await(l.isElement==null?void 0:l.isElement(N)))&&(O=u.floating[x]||o.floating[k]);const z=P/2-R/2,D=O/2-y[k]/2-1,j=fi(g[E],D),V=fi(g[S],D),H=j,te=O-y[k]-V,G=O/2-y[k]/2+z,ne=Bf(H,G,te),W=!c.arrow&&To(s)!=null&&G!==ne&&o.reference[k]/2-(G<H?j:V)-y[k]/2<0,Q=W?G<H?G-H:G-te:0;return{[_]:v[_]+Q,data:{[_]:ne,centerOffset:G-ne-Q,...W&&{alignmentOffset:Q}},reset:W}}}),wA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:l,initialPlacement:u,platform:c,elements:h}=t,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:y=!0,...T}=Cr(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const E=Pr(s),S=Xn(u),x=Pr(u)===u,P=await(c.isRTL==null?void 0:c.isRTL(h.floating)),R=v||(x||!y?[ic(u)]:hA(u)),N=k!=="none";!v&&N&&R.push(...gA(u,y,k,P));const O=[u,...R],z=await Va(t,T),D=[];let j=((r=o.flip)==null?void 0:r.overflows)||[];if(p&&D.push(z[E]),g){const G=dA(s,l,P);D.push(z[G[0]],z[G[1]])}if(j=[...j,{placement:s,overflows:D}],!D.every(G=>G<=0)){var V,H;const G=(((V=o.flip)==null?void 0:V.index)||0)+1,ne=O[G];if(ne&&(!(g==="alignment"?S!==Xn(ne):!1)||j.every(I=>I.overflows[0]>0&&Xn(I.placement)===S)))return{data:{index:G,overflows:j},reset:{placement:ne}};let W=(H=j.filter(Q=>Q.overflows[0]<=0).sort((Q,I)=>Q.overflows[1]-I.overflows[1])[0])==null?void 0:H.placement;if(!W)switch(_){case"bestFit":{var te;const Q=(te=j.filter(I=>{if(N){const $=Xn(I.placement);return $===S||$==="y"}return!0}).map(I=>[I.placement,I.overflows.filter($=>$>0).reduce(($,F)=>$+F,0)]).sort((I,$)=>I[1]-$[1])[0])==null?void 0:te[0];Q&&(W=Q);break}case"initialPlacement":W=u;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function my(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gy(e){return aA.some(t=>e[t]>=0)}const xA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Cr(e,t);switch(r){case"referenceHidden":{const o=await Va(t,{...s,elementContext:"reference"}),l=my(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:gy(l)}}}case"escaped":{const o=await Va(t,{...s,altBoundary:!0}),l=my(o,n.floating);return{data:{escapedOffsets:l,escaped:gy(l)}}}default:return{}}}}},Hx=new Set(["left","top"]);async function bA(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Pr(n),u=To(n),c=Xn(n)==="y",h=Hx.has(l)?-1:1,p=o&&c?-1:1,g=Cr(t,e);let{mainAxis:v,crossAxis:_,alignmentAxis:k}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof k=="number"&&(_=u==="end"?k*-1:k),c?{x:_*p,y:v*h}:{x:v*h,y:_*p}}const SA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:l,middlewareData:u}=t,c=await bA(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:l}}}}},EA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:T=>{let{x:E,y:S}=T;return{x:E,y:S}}},...c}=Cr(e,t),h={x:n,y:r},p=await Va(t,c),g=Xn(Pr(s)),v=xm(g);let _=h[v],k=h[g];if(o){const T=v==="y"?"top":"left",E=v==="y"?"bottom":"right",S=_+p[T],x=_-p[E];_=Bf(S,_,x)}if(l){const T=g==="y"?"top":"left",E=g==="y"?"bottom":"right",S=k+p[T],x=k-p[E];k=Bf(S,k,x)}const y=u.fn({...t,[v]:_,[g]:k});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[v]:o,[g]:l}}}}}},TA=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:c=!0,crossAxis:h=!0}=Cr(e,t),p={x:n,y:r},g=Xn(s),v=xm(g);let _=p[v],k=p[g];const y=Cr(u,t),T=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const x=v==="y"?"height":"width",P=o.reference[v]-o.floating[x]+T.mainAxis,R=o.reference[v]+o.reference[x]-T.mainAxis;_<P?_=P:_>R&&(_=R)}if(h){var E,S;const x=v==="y"?"width":"height",P=Hx.has(Pr(s)),R=o.reference[g]-o.floating[x]+(P&&((E=l.offset)==null?void 0:E[g])||0)+(P?0:T.crossAxis),N=o.reference[g]+o.reference[x]+(P?0:((S=l.offset)==null?void 0:S[g])||0)-(P?T.crossAxis:0);k<R?k=R:k>N&&(k=N)}return{[v]:_,[g]:k}}}},kA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:l,elements:u}=t,{apply:c=()=>{},...h}=Cr(e,t),p=await Va(t,h),g=Pr(s),v=To(s),_=Xn(s)==="y",{width:k,height:y}=o.floating;let T,E;g==="top"||g==="bottom"?(T=g,E=v===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(E=g,T=v==="end"?"top":"bottom");const S=y-p.top-p.bottom,x=k-p.left-p.right,P=fi(y-p[T],S),R=fi(k-p[E],x),N=!t.middlewareData.shift;let O=P,z=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(z=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=S),N&&!v){const j=qt(p.left,0),V=qt(p.right,0),H=qt(p.top,0),te=qt(p.bottom,0);_?z=k-2*(j!==0||V!==0?j+V:qt(p.left,p.right)):O=y-2*(H!==0||te!==0?H+te:qt(p.top,p.bottom))}await c({...t,availableWidth:z,availableHeight:O});const D=await l.getDimensions(u.floating);return k!==D.width||y!==D.height?{reset:{rects:!0}}:{}}}};function Dc(){return typeof window<"u"}function ko(e){return Vx(e)?(e.nodeName||"").toLowerCase():"#document"}function Qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sr(e){var t;return(t=(Vx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vx(e){return Dc()?e instanceof Node||e instanceof Qt(e).Node:!1}function Ln(e){return Dc()?e instanceof Element||e instanceof Qt(e).Element:!1}function rr(e){return Dc()?e instanceof HTMLElement||e instanceof Qt(e).HTMLElement:!1}function vy(e){return!Dc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qt(e).ShadowRoot}const CA=new Set(["inline","contents"]);function cl(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=In(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!CA.has(s)}const PA=new Set(["table","td","th"]);function RA(e){return PA.has(ko(e))}const AA=[":popover-open",":modal"];function zc(e){return AA.some(t=>{try{return e.matches(t)}catch{return!1}})}const NA=["transform","translate","scale","rotate","perspective"],OA=["transform","translate","scale","rotate","perspective","filter"],LA=["paint","layout","strict","content"];function Em(e){const t=Tm(),n=Ln(e)?In(e):e;return NA.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||OA.some(r=>(n.willChange||"").includes(r))||LA.some(r=>(n.contain||"").includes(r))}function IA(e){let t=pi(e);for(;rr(t)&&!yo(t);){if(Em(t))return t;if(zc(t))return null;t=pi(t)}return null}function Tm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const MA=new Set(["html","body","#document"]);function yo(e){return MA.has(ko(e))}function In(e){return Qt(e).getComputedStyle(e)}function Bc(e){return Ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pi(e){if(ko(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vy(e)&&e.host||sr(e);return vy(t)?t.host:t}function Wx(e){const t=pi(e);return yo(t)?e.ownerDocument?e.ownerDocument.body:e.body:rr(t)&&cl(t)?t:Wx(t)}function Wa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Wx(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),l=Qt(s);if(o){const u=Ff(l);return t.concat(l,l.visualViewport||[],cl(s)?s:[],u&&n?Wa(u):[])}return t.concat(s,Wa(s,[],n))}function Ff(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gx(e){const t=In(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=rr(e),o=s?e.offsetWidth:n,l=s?e.offsetHeight:r,u=rc(n)!==o||rc(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function km(e){return Ln(e)?e:e.contextElement}function Js(e){const t=km(e);if(!rr(t))return nr(1);
vendor: 4,289 bytes, line 176
176const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=Gx(t);let l=(o?rc(n.width):n.width)/r,u=(o?rc(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const jA=nr(0);function qx(e){const t=Qt(e);return!Tm()||!t.visualViewport?jA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function DA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Qt(e)?!1:t}function es(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=km(e);let l=nr(1);t&&(r?Ln(r)&&(l=Js(r)):l=Js(e));const u=DA(o,n,r)?qx(o):nr(0);let c=(s.left+u.x)/l.x,h=(s.top+u.y)/l.y,p=s.width/l.x,g=s.height/l.y;if(o){const v=Qt(o),_=r&&Ln(r)?Qt(r):r;let k=v,y=Ff(k);for(;y&&r&&_!==k;){const T=Js(y),E=y.getBoundingClientRect(),S=In(y),x=E.left+(y.clientLeft+parseFloat(S.paddingLeft))*T.x,P=E.top+(y.clientTop+parseFloat(S.paddingTop))*T.y;c*=T.x,h*=T.y,p*=T.x,g*=T.y,c+=x,h+=P,k=Qt(y),y=Ff(k)}}return sc({width:p,height:g,x:c,y:h})}function Cm(e,t){const n=Bc(e).scrollLeft;return t?t.left+n:es(sr(e)).left+n}function Kx(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Cm(e,r)),o=r.top+t.scrollTop;return{x:s,y:o}}function zA(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",l=sr(r),u=t?zc(t.floating):!1;if(r===l||u&&o)return n;let c={scrollLeft:0,scrollTop:0},h=nr(1);const p=nr(0),g=rr(r);if((g||!g&&!o)&&((ko(r)!=="body"||cl(l))&&(c=Bc(r)),rr(r))){const _=es(r);h=Js(r),p.x=_.x+r.clientLeft,p.y=_.y+r.clientTop}const v=l&&!g&&!o?Kx(l,c,!0):nr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-c.scrollLeft*h.x+p.x+v.x,y:n.y*h.y-c.scrollTop*h.y+p.y+v.y}}function BA(e){return Array.from(e.getClientRects())}function $A(e){const t=sr(e),n=Bc(e),r=e.ownerDocument.body,s=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Cm(e);const u=-n.scrollTop;return In(r).direction==="rtl"&&(l+=qt(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:l,y:u}}function FA(e,t){const n=Qt(e),r=sr(e),s=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,c=0;if(s){o=s.width,l=s.height;const h=Tm();(!h||h&&t==="fixed")&&(u=s.offsetLeft,c=s.offsetTop)}return{width:o,height:l,x:u,y:c}}const UA=new Set(["absolute","fixed"]);function HA(e,t){const n=es(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=rr(e)?Js(e):nr(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,c=s*o.x,h=r*o.y;return{width:l,height:u,x:c,y:h}}function yy(e,t,n){let r;if(t==="viewport")r=FA(e,n);else if(t==="document")r=$A(sr(e));else if(Ln(t))r=HA(t,n);else{const s=qx(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return sc(r)}function Zx(e,t){const n=pi(e);return n===t||!Ln(n)||yo(n)?!1:In(n).position==="fixed"||Zx(n,t)}function VA(e,t){const n=t.get(e);if(n)return n;let r=Wa(e,[],!1).filter(u=>Ln(u)&&ko(u)!=="body"),s=null;const o=In(e).position==="fixed";let l=o?pi(e):e;for(;Ln(l)&&!yo(l);){const u=In(l),c=Em(l);!c&&u.position==="fixed"&&(s=null),(o?!c&&!s:!c&&u.position==="static"&&!!s&&UA.has(s.position)||cl(l)&&!c&&Zx(e,l))?r=r.filter(p=>p!==l):s=u,l=pi(l)}return t.set(e,r),r}function WA(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?zc(t)?[]:VA(t,this._c):[].concat(n),r],u=l[0],c=l.reduce((h,p)=>{const g=yy(t,p,s);return h.top=qt(g.top,h.top),h.right=fi(g.right,h.right),h.bottom=fi(g.bottom,h.bottom),h.left=qt(g.left,h.left),h},yy(t,u,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function GA(e){const{width:t,height:n}=Gx(e);return{width:t,height:n}}function qA(e,t,n){const r=rr(t),s=sr(t),o=n==="fixed",l=es(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=nr(0);function h(){c.x=Cm(s)}if(r||!r&&!o)if((ko(t)!=="body"||cl(s))&&(u=Bc(t)),r){const _=es(t,!0,o,t);c.x=_.x+t.clientLeft,c.y=_.y+t.clientTop}else s&&h();o&&!r&&s&&h();const p=s&&!r&&!o?Kx(s,u):nr(0),g=l.left+u.scrollLeft-c.x-p.x,v=l.top+u.scrollTop-c.y-p.y;return{x:g,y:v,width:l.width,height:l.height}}function mh(e){return In(e).position==="static"}function _y(e,t){if(!rr(e)||In(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return sr(e)===n&&(n=n.ownerDocument.body),n}function Yx(e,t){const n=Qt(e);
vendor: 11,161 bytes, line 176
176if(zc(e))return n;if(!rr(e)){let s=pi(e);for(;s&&!yo(s);){if(Ln(s)&&!mh(s))return s;s=pi(s)}return n}let r=_y(e,t);for(;r&&RA(r)&&mh(r);)r=_y(r,t);return r&&yo(r)&&mh(r)&&!Em(r)?n:r||IA(e)||n}const KA=async function(e){const t=this.getOffsetParent||Yx,n=this.getDimensions,r=await n(e.floating);return{reference:qA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ZA(e){return In(e).direction==="rtl"}const YA={convertOffsetParentRelativeRectToViewportRelativeRect:zA,getDocumentElement:sr,getClippingRect:WA,getOffsetParent:Yx,getElementRects:KA,getClientRects:BA,getDimensions:GA,getScale:Js,isElement:Ln,isRTL:ZA};function Jx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function JA(e,t){let n=null,r;const s=sr(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const h=e.getBoundingClientRect(),{left:p,top:g,width:v,height:_}=h;if(u||t(),!v||!_)return;const k=iu(g),y=iu(s.clientWidth-(p+v)),T=iu(s.clientHeight-(g+_)),E=iu(p),x={rootMargin:-k+"px "+-y+"px "+-T+"px "+-E+"px",threshold:qt(0,fi(1,c))||1};let P=!0;function R(N){const O=N[0].intersectionRatio;if(O!==c){if(!P)return l();O?l(!1,O):r=setTimeout(()=>{l(!1,1e-7)},1e3)}O===1&&!Jx(h,e.getBoundingClientRect())&&l(),P=!1}try{n=new IntersectionObserver(R,{...x,root:s.ownerDocument})}catch{n=new IntersectionObserver(R,x)}n.observe(e)}return l(!0),o}function QA(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,h=km(e),p=s||o?[...h?Wa(h):[],...Wa(t)]:[];p.forEach(E=>{s&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const g=h&&u?JA(h,n):null;let v=-1,_=null;l&&(_=new ResizeObserver(E=>{let[S]=E;S&&S.target===h&&_&&(_.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=_)==null||x.observe(t)})),n()}),h&&!c&&_.observe(h),_.observe(t));let k,y=c?es(e):null;c&&T();function T(){const E=es(e);y&&!Jx(y,E)&&n(),y=E,k=requestAnimationFrame(T)}return n(),()=>{var E;p.forEach(S=>{s&&S.removeEventListener("scroll",n),o&&S.removeEventListener("resize",n)}),g==null||g(),(E=_)==null||E.disconnect(),_=null,c&&cancelAnimationFrame(k)}}const XA=SA,eN=EA,tN=wA,nN=kA,rN=xA,wy=_A,iN=TA,sN=(e,t,n)=>{const r=new Map,s={platform:YA,...n},o={...s.platform,_c:r};return yA(e,t,{...s,platform:o})};var oN=typeof document<"u",aN=function(){},Au=oN?w.useLayoutEffect:aN;function oc(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,s;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(!oc(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!oc(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Qx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xy(e,t){const n=Qx(e);return Math.round(t*n)/n}function gh(e){const t=w.useRef(e);return Au(()=>{t.current=e}),t}function lN(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:c,open:h}=e,[p,g]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,_]=w.useState(r);oc(v,r)||_(r);const[k,y]=w.useState(null),[T,E]=w.useState(null),S=w.useCallback(I=>{I!==N.current&&(N.current=I,y(I))},[]),x=w.useCallback(I=>{I!==O.current&&(O.current=I,E(I))},[]),P=o||k,R=l||T,N=w.useRef(null),O=w.useRef(null),z=w.useRef(p),D=c!=null,j=gh(c),V=gh(s),H=gh(h),te=w.useCallback(()=>{if(!N.current||!O.current)return;const I={placement:t,strategy:n,middleware:v};V.current&&(I.platform=V.current),sN(N.current,O.current,I).then($=>{const F={...$,isPositioned:H.current!==!1};G.current&&!oc(z.current,F)&&(z.current=F,ss.flushSync(()=>{g(F)}))})},[v,t,n,V,H]);Au(()=>{h===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,g(I=>({...I,isPositioned:!1})))},[h]);const G=w.useRef(!1);Au(()=>(G.current=!0,()=>{G.current=!1}),[]),Au(()=>{if(P&&(N.current=P),R&&(O.current=R),P&&R){if(j.current)return j.current(P,R,te);te()}},[P,R,te,j,D]);const ne=w.useMemo(()=>({reference:N,floating:O,setReference:S,setFloating:x}),[S,x]),W=w.useMemo(()=>({reference:P,floating:R}),[P,R]),Q=w.useMemo(()=>{const I={position:n,left:0,top:0};if(!W.floating)return I;const $=xy(W.floating,p.x),F=xy(W.floating,p.y);return u?{...I,transform:"translate("+$+"px, "+F+"px)",...Qx(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:F}},[n,u,W.floating,p.x,p.y]);return w.useMemo(()=>({...p,update:te,refs:ne,elements:W,floatingStyles:Q}),[p,te,ne,W,Q])}const uN=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?wy({element:r.current,padding:s}).fn(n):{}:r?wy({element:r,padding:s}).fn(n):{}}}},cN=(e,t)=>({...XA(e),options:[e,t]}),dN=(e,t)=>({...eN(e),options:[e,t]}),hN=(e,t)=>({...iN(e),options:[e,t]}),fN=(e,t)=>({...tN(e),options:[e,t]}),pN=(e,t)=>({...nN(e),options:[e,t]}),mN=(e,t)=>({...rN(e),options:[e,t]}),gN=(e,t)=>({...uN(e),options:[e,t]});var vN="Arrow",Xx=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return m.jsx(pe.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});Xx.displayName=vN;var yN=Xx;function Pm(e){const[t,n]=w.useState(void 0);return ht(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let l,u;if("borderBoxSize"in o){const c=o.borderBoxSize,h=Array.isArray(c)?c[0]:c;l=h.inlineSize,u=h.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 Rm="Popper",[eb,$c]=ir(Rm),[_N,tb]=eb(Rm),nb=e=>{const{__scopePopper:t,children:n}=e,[r,s]=w.useState(null);return m.jsx(_N,{scope:t,anchor:r,onAnchorChange:s,children:n})};nb.displayName=Rm;var rb="PopperAnchor",ib=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=tb(rb,n),l=w.useRef(null),u=Te(t,l);return w.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:m.jsx(pe.div,{...s,ref:u})});ib.displayName=rb;var Am="PopperContent",[wN,xN]=eb(Am),sb=w.forwardRef((e,t)=>{var Z,me,Oe,xe,be,Se;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:c=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:_="optimized",onPlaced:k,...y}=e,T=tb(Am,n),[E,S]=w.useState(null),x=Te(t,et=>S(et)),[P,R]=w.useState(null),N=Pm(P),O=(N==null?void 0:N.width)??0,z=(N==null?void 0:N.height)??0,D=r+(o!=="center"?"-"+o:""),j=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},V=Array.isArray(h)?h:[h],H=V.length>0,te={padding:j,boundary:V.filter(SN),altBoundary:H},{refs:G,floatingStyles:ne,placement:W,isPositioned:Q,middlewareData:I}=lN({strategy:"fixed",placement:D,whileElementsMounted:(...et)=>QA(...et,{animationFrame:_==="always"}),elements:{reference:T.anchor},middleware:[cN({mainAxis:s+z,alignmentAxis:l}),c&&dN({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?hN():void 0,...te}),c&&fN({...te}),pN({...te,apply:({elements:et,rects:It,availableWidth:Mn,availableHeight:pn})=>{const{width:mn,height:jn}=It.reference,Nr=et.floating.style;Nr.setProperty("--radix-popper-available-width",`${Mn}px`),Nr.setProperty("--radix-popper-available-height",`${pn}px`),Nr.setProperty("--radix-popper-anchor-width",`${mn}px`),Nr.setProperty("--radix-popper-anchor-height",`${jn}px`)}}),P&&gN({element:P,padding:u}),EN({arrowWidth:O,arrowHeight:z}),v&&mN({strategy:"referenceHidden",...te})]}),[$,F]=lb(W),X=at(k);ht(()=>{Q&&(X==null||X())},[Q,X]);const ee=(Z=I.arrow)==null?void 0:Z.x,le=(me=I.arrow)==null?void 0:me.y,se=((Oe=I.arrow)==null?void 0:Oe.centerOffset)!==0,[Y,ie]=w.useState();return ht(()=>{E&&ie(window.getComputedStyle(E).zIndex)},[E]),m.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:Q?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[(xe=I.transformOrigin)==null?void 0:xe.x,(be=I.transformOrigin)==null?void 0:be.y].join(" "),...((Se=I.hide)==null?void 0:Se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(wN,{scope:n,placedSide:$,onArrowChange:R,arrowX:ee,arrowY:le,shouldHideArrow:se,children:m.jsx(pe.div,{"data-side":$,"data-align":F,...y,ref:x,style:{...y.style,animation:Q?void 0:"none"}})})})});sb.displayName=Am;var ob="PopperArrow",bN={top:"bottom",right:"left",bottom:"top",left:"right"},ab=w.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=xN(ob,r),l=bN[o.placedSide];return m.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:m.jsx(yN,{...s,ref:n,style:{...s.style,display:"block"}})})});ab.displayName=ob;function SN(e){return e!==null}var EN=e=>({name:"transformOrigin",options:e,fn(t){var T,E,S;const{placement:n,rects:r,middlewareData:s}=t,l=((T=s.arrow)==null?void 0:T.centerOffset)!==0,u=l?0:e.arrowWidth,c=l?0:e.arrowHeight,[h,p]=lb(n),g={start:"0%",center:"50%",end:"100%"}[p],v=(((E=s.arrow)==null?void 0:E.x)??0)+u/2,_=(((S=s.arrow)==null?void 0:S.y)??0)+c/2;let k="",y="";return h==="bottom"?(k=l?g:`${v}px`,y=`${-c}px`):h==="top"?(k=l?g:`${v}px`,y=`${r.floating.height+c}px`):h==="right"?(k=`${-c}px`,y=l?g:`${_}px`):h==="left"&&(k=`${r.floating.width+c}px`,y=l?g:`${_}px`),{data:{x:k,y}}}});function lb(e){const[t,n="center"]=e.split("-");return[t,n]}var TN=nb,ub=ib,cb=sb,db=ab,[Fc,dz]=ir("Tooltip",[$c]),Nm=$c(),hb="TooltipProvider",kN=700,by="tooltip.open",[CN,fb]=Fc(hb),pb=e=>{const{__scopeTooltip:t,delayDuration:n=kN,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,l=w.useRef(!0),u=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{const h=c.current;return()=>window.clearTimeout(h)},[]),m.jsx(CN,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(c.current),l.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:w.useCallback(h=>{u.current=h},[]),disableHoverableContent:s,children:o})};pb.displayName=hb;
vendor: 4,559 bytes, line 176
176var mb="Tooltip",[hz,Uc]=Fc(mb),Uf="TooltipTrigger",PN=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Uc(Uf,n),o=fb(Uf,n),l=Nm(n),u=w.useRef(null),c=Te(t,u,s.onTriggerChange),h=w.useRef(!1),p=w.useRef(!1),g=w.useCallback(()=>h.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),m.jsx(ub,{asChild:!0,...l,children:m.jsx(pe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ae(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),p.current=!0)}),onPointerLeave:ae(e.onPointerLeave,()=>{s.onTriggerLeave(),p.current=!1}),onPointerDown:ae(e.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:ae(e.onFocus,()=>{h.current||s.onOpen()}),onBlur:ae(e.onBlur,s.onClose),onClick:ae(e.onClick,s.onClose)})})});PN.displayName=Uf;var RN="TooltipPortal",[fz,AN]=Fc(RN,{forceMount:void 0}),_o="TooltipContent",gb=w.forwardRef((e,t)=>{const n=AN(_o,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,l=Uc(_o,e.__scopeTooltip);return m.jsx(yi,{present:r||l.open,children:l.disableHoverableContent?m.jsx(vb,{side:s,...o,ref:t}):m.jsx(NN,{side:s,...o,ref:t})})}),NN=w.forwardRef((e,t)=>{const n=Uc(_o,e.__scopeTooltip),r=fb(_o,e.__scopeTooltip),s=w.useRef(null),o=Te(t,s),[l,u]=w.useState(null),{trigger:c,onClose:h}=n,p=s.current,{onPointerInTransitChange:g}=r,v=w.useCallback(()=>{u(null),g(!1)},[g]),_=w.useCallback((k,y)=>{const T=k.currentTarget,E={x:k.clientX,y:k.clientY},S=jN(E,T.getBoundingClientRect()),x=DN(E,S),P=zN(y.getBoundingClientRect()),R=$N([...x,...P]);u(R),g(!0)},[g]);return w.useEffect(()=>()=>v(),[v]),w.useEffect(()=>{if(c&&p){const k=T=>_(T,p),y=T=>_(T,c);return c.addEventListener("pointerleave",k),p.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",k),p.removeEventListener("pointerleave",y)}}},[c,p,_,v]),w.useEffect(()=>{if(l){const k=y=>{const T=y.target,E={x:y.clientX,y:y.clientY},S=(c==null?void 0:c.contains(T))||(p==null?void 0:p.contains(T)),x=!BN(E,l);S?v():x&&(v(),h())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[c,p,l,h,v]),m.jsx(vb,{...e,ref:o})}),[ON,LN]=Fc(mb,{isInside:!1}),IN=VC("TooltipContent"),vb=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,c=Uc(_o,n),h=Nm(n),{onClose:p}=c;return w.useEffect(()=>(document.addEventListener(by,p),()=>document.removeEventListener(by,p)),[p]),w.useEffect(()=>{if(c.trigger){const g=v=>{const _=v.target;_!=null&&_.contains(c.trigger)&&p()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[c.trigger,p]),m.jsx(Lc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:g=>g.preventDefault(),onDismiss:p,children:m.jsxs(cb,{"data-state":c.stateAttribute,...h,...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:[m.jsx(IN,{children:r}),m.jsx(ON,{scope:n,isInside:!0,children:m.jsx(hP,{id:c.contentId,role:"tooltip",children:s||r})})]})})});gb.displayName=_o;var yb="TooltipArrow",MN=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Nm(n);return LN(yb,n).isInside?null:m.jsx(db,{...s,...r,ref:t})});MN.displayName=yb;function jN(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function DN(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 zN(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function BN(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],c=t[l],h=u.x,p=u.y,g=c.x,v=c.y;p>r!=v>
176r&&n<(g-h)*(r-p)/(v-p)+h&&(s=!s)}return s}function $N(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),FN(t)}function FN(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(s.y-l.y)>=(o.y-l.y)*(s.x-l.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(s.y-l.y)>=(o.y-l.y)*(s.x-l.x))n.pop();else break}n.push(s)}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 UN=pb,_b=gb;const HN=UN,VN=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(_b,{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}));VN.displayName=_b.displayName;var Hc=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(){}},Vc=typeof window>"u"||"Deno"in globalThis;function Sn(){}function WN(e,t){return typeof e=="function"?e(t):e}function GN(e){return typeof e=="number"&&e>=0&&e!==1/0}function qN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Hf(e,t){return typeof e=="function"?e(t):e}function KN(e,t){return typeof e=="function"?e(t):e}function Sy(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==Om(l,t.options))return!1}else if(!qa(t.queryKey,l))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||s&&s!==t.state.fetchStatus||o&&!o(t))}function Ey(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Ga(t.options.mutationKey)!==Ga(o))return!1}else if(!qa(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Om(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ga)(e)}function Ga(e){return JSON.stringify(e,(t,n)=>Vf(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function qa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>qa(e[n],t[n])):!1}function wb(e,t){if(e===t)return e;const n=Ty(e)&&Ty(t);if(n||Vf(e)&&Vf(t)){const r=n?e:Object.keys(e),s=r.length,o=n?t:Object.keys(t),l=o.length,u=n?[]:{},c=new Set(r);let h=0;for(let p=0;p<l;p++){const g=n?p:o[p];(!n&&c.has(g)||n)&&e[g]===void 0&&t[g]===void 0?(u[g]=void 0,h++):(u[g]=wb(e[g],t[g]),u[g]===e[g]&&e[g]!==void 0&&h++)}return s===l&&h===s?e:u}return t}function Ty(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Vf(e){if(!ky(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ky(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ky(e){return Object.prototype.toString.call(e)==="[object Object]"}function ZN(e){return new Promise(t=>{setTimeout(t,e)})}function YN(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?wb(e,t):t}function JN(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function QN(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Lm=Symbol();function xb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Lm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var $i,Zr,no,P_,XN=(P_=class extends Hc{constructor(){super();Ne(this,$i);Ne(this,Zr);Ne(this,no);ve(this,no,t=>{if(!Vc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){U(this,Zr)||this.setEventListener(U(this,no))}onUnsubscribe(){var t;this.hasListeners()||((t=U(this,Zr))==null||t.call(this),ve(this,Zr,void 0))}setEventListener(t){var n;ve(this,no,t),(n=U(this,Zr))==null||n.call(this),ve(this,Zr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){U(this,$i)!==t&&(ve(this,$i,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,751 bytes, line 176
176this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof U(this,$i)=="boolean"?U(this,$i):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},$i=new WeakMap,Zr=new WeakMap,no=new WeakMap,P_),bb=new XN,ro,Yr,io,R_,eO=(R_=class extends Hc{constructor(){super();Ne(this,ro,!0);Ne(this,Yr);Ne(this,io);ve(this,io,t=>{if(!Vc&&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(){U(this,Yr)||this.setEventListener(U(this,io))}onUnsubscribe(){var t;this.hasListeners()||((t=U(this,Yr))==null||t.call(this),ve(this,Yr,void 0))}setEventListener(t){var n;ve(this,io,t),(n=U(this,Yr))==null||n.call(this),ve(this,Yr,t(this.setOnline.bind(this)))}setOnline(t){U(this,ro)!==t&&(ve(this,ro,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return U(this,ro)}},ro=new WeakMap,Yr=new WeakMap,io=new WeakMap,R_),ac=new eO;function tO(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function nO(e){return Math.min(1e3*2**e,3e4)}function Sb(e){return(e??"online")==="online"?ac.isOnline():!0}var Eb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function vh(e){return e instanceof Eb}function Tb(e){let t=!1,n=0,r=!1,s;const o=tO(),l=y=>{var T;r||(v(new Eb(y)),(T=e.abort)==null||T.call(e))},u=()=>{t=!0},c=()=>{t=!1},h=()=>bb.isFocused()&&(e.networkMode==="always"||ac.isOnline())&&e.canRun(),p=()=>Sb(e.networkMode)&&e.canRun(),g=y=>{var T;r||(r=!0,(T=e.onSuccess)==null||T.call(e,y),s==null||s(),o.resolve(y))},v=y=>{var T;r||(r=!0,(T=e.onError)==null||T.call(e,y),s==null||s(),o.reject(y))},_=()=>new Promise(y=>{var T;s=E=>{(r||h())&&y(E)},(T=e.onPause)==null||T.call(e)}).then(()=>{var y;s=void 0,r||(y=e.onContinue)==null||y.call(e)}),k=()=>{if(r)return;let y;const T=n===0?e.initialPromise:void 0;try{y=T??e.fn()}catch(E){y=Promise.reject(E)}Promise.resolve(y).then(g).catch(E=>{var N;if(r)return;const S=e.retry??(Vc?0:3),x=e.retryDelay??nO,P=typeof x=="function"?x(n,E):x,R=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,E);if(t||!R){v(E);return}n++,(N=e.onFail)==null||N.call(e,n,E),ZN(P).then(()=>h()?void 0:_()).then(()=>{t?v(E):k()})})};return{promise:o,cancel:l,continue:()=>(s==null||s(),o),cancelRetry:u,continueRetry:c,canStart:p,start:()=>(p()?k():_().then(k),o)}}var rO=e=>setTimeout(e,0);function iO(){let e=[],t=0,n=u=>{u()},r=u=>{u()},s=rO;const o=u=>{t?e.push(u):s(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&s(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;t++;try{c=u()}finally{t--,t||l()}return c},batchCalls:u=>(...c)=>{o(()=>{u(...c)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{s=u}}}var At=iO(),Fi,A_,kb=(A_=class{constructor(){Ne(this,Fi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GN(this.gcTime)&&ve(this,Fi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vc?1/0:5*60*1e3))}clearGcTimeout(){U(this,Fi)&&(clearTimeout(U(this,Fi)),ve(this,Fi,void 0))}},Fi=new WeakMap,A_),so,Ui,on,Hi,St,tl,Vi,Tn,mr,N_,sO=(N_=class extends kb{constructor(t){super();Ne(this,Tn);Ne(this,so);Ne(this,Ui);Ne(this,on);Ne(this,Hi);Ne(this,St);Ne(this,tl);Ne(this,Vi);ve(this,Vi,!1),ve(this,tl,t.defaultOptions),this.setOptions(t.options),this.observers=[],ve(this,Hi,t.client),ve(this,on,U(this,Hi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ve(this,so,aO(this.options)),this.state=t.state??U(this,so),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=U(this,St))==null?void 0:t.promise}setOptions(t){this.options={...U(this,tl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,on).remove(this)}setData(t,n){const r=YN(this.state.data,t,this.options);return wt(this,Tn,mr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){wt(this,Tn,mr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=U(this,St))==null?void 0:r.promise;return(s=U(this,St))==null||s.cancel(t),n?n.then(Sn).catch(Sn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(U(this,so))}isActive(){return this.observers.some(t=>
vendor: 1,447 bytes, line 176
176KN(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Lm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Hf(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!qN(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=U(this,St))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=U(this,St))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),U(this,on).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(U(this,St)&&(U(this,Vi)?U(this,St).cancel({revert:!0}):U(this,St).cancelRetry()),this.scheduleGc()),U(this,on).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||wt(this,Tn,mr).call(this,{type:"invalidate"})}
vendor: 13,738 bytes, line 176
176fetch(t,n){var h,p,g;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(U(this,St))return U(this,St).continueRetry(),U(this,St).promise}if(t&&this.setOptions(t),!this.options.queryFn){const v=this.observers.find(_=>_.options.queryFn);v&&this.setOptions(v.options)}const r=new AbortController,s=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(ve(this,Vi,!0),r.signal)})},o=()=>{const v=xb(this.options,n),k=(()=>{const y={client:U(this,Hi),queryKey:this.queryKey,meta:this.meta};return s(y),y})();return ve(this,Vi,!1),this.options.persister?this.options.persister(v,k,this):v(k)},u=(()=>{const v={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:U(this,Hi),state:this.state,fetchFn:o};return s(v),v})();(h=this.options.behavior)==null||h.onFetch(u,this),ve(this,Ui,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=u.fetchOptions)==null?void 0:p.meta))&&wt(this,Tn,mr).call(this,{type:"fetch",meta:(g=u.fetchOptions)==null?void 0:g.meta});const c=v=>{var _,k,y,T;vh(v)&&v.silent||wt(this,Tn,mr).call(this,{type:"error",error:v}),vh(v)||((k=(_=U(this,on).config).onError)==null||k.call(_,v,this),(T=(y=U(this,on).config).onSettled)==null||T.call(y,this.state.data,v,this)),this.scheduleGc()};return ve(this,St,Tb({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,abort:r.abort.bind(r),onSuccess:v=>{var _,k,y,T;if(v===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(v)}catch(E){c(E);return}(k=(_=U(this,on).config).onSuccess)==null||k.call(_,v,this),(T=(y=U(this,on).config).onSettled)==null||T.call(y,v,this.state.error,this),this.scheduleGc()},onError:c,onFail:(v,_)=>{wt(this,Tn,mr).call(this,{type:"failed",failureCount:v,error:_})},onPause:()=>{wt(this,Tn,mr).call(this,{type:"pause"})},onContinue:()=>{wt(this,Tn,mr).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0})),U(this,St).start()}},so=new WeakMap,Ui=new WeakMap,on=new WeakMap,Hi=new WeakMap,St=new WeakMap,tl=new WeakMap,Vi=new WeakMap,Tn=new WeakSet,mr=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,...oO(r.data,this.options),fetchMeta:t.meta??null};case"success":return ve(this,Ui,void 0),{...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 s=t.error;return vh(s)&&s.revert&&U(this,Ui)?{...U(this,Ui),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),At.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),U(this,on).notify({query:this,type:"updated",action:t})})},N_);function oO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Sb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function aO(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 Kn,O_,lO=(O_=class extends Hc{constructor(t={}){super();Ne(this,Kn);this.config=t,ve(this,Kn,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??Om(s,n);let l=this.get(o);return l||(l=new sO({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(l)),l}add(t){U(this,Kn).has(t.queryHash)||(U(this,Kn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=U(this,Kn).get(t.queryHash);n&&(t.destroy(),n===t&&U(this,Kn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){At.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return U(this,Kn).get(t)}getAll(){return[...U(this,Kn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Sy(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Sy(t,r)):n}notify(t){At.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){At.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){At.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kn=new WeakMap,O_),Zn,Pt,Wi,Yn,$r,L_,uO=(L_=class extends kb{constructor(t){super();Ne(this,Yn);Ne(this,Zn);Ne(this,Pt);Ne(this,Wi);this.mutationId=t.mutationId,ve(this,Pt,t.mutationCache),ve(this,Zn,[]),this.state=t.state||cO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){U(this,Zn).includes(t)||(U(this,Zn).push(t),this.clearGcTimeout(),U(this,Pt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ve(this,Zn,U(this,Zn).filter(n=>n!==t)),this.scheduleGc(),U(this,Pt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){U(this,Zn).length||(this.state.status==="pending"?this.scheduleGc():U(this,Pt).remove(this))}continue(){var t;return((t=U(this,Wi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,u,c,h,p,g,v,_,k,y,T,E,S,x,P,R,N,O,z;const n=()=>{wt(this,Yn,$r).call(this,{type:"continue"})};ve(this,Wi,Tb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(D,j)=>{wt(this,Yn,$r).call(this,{type:"failed",failureCount:D,error:j})},onPause:()=>{wt(this,Yn,$r).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,Pt).canRun(this)}));const r=this.state.status==="pending",s=!U(this,Wi).canStart();try{if(r)n();else{wt(this,Yn,$r).call(this,{type:"pending",variables:t,isPaused:s}),await((l=(o=U(this,Pt).config).onMutate)==null?void 0:l.call(o,t,this));const j=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t));j!==this.state.context&&wt(this,Yn,$r).call(this,{type:"pending",context:j,variables:t,isPaused:s})}const D=await U(this,Wi).start();return await((p=(h=U(this,Pt).config).onSuccess)==null?void 0:p.call(h,D,t,this.state.context,this)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,D,t,this.state.context)),await((k=(_=U(this,Pt).config).onSettled)==null?void 0:k.call(_,D,null,this.state.variables,this.state.context,this)),await((T=(y=this.options).onSettled)==null?void 0:T.call(y,D,null,t,this.state.context)),wt(this,Yn,$r).call(this,{type:"success",data:D}),D}catch(D){try{throw await((S=(E=U(this,Pt).config).onError)==null?void 0:S.call(E,D,t,this.state.context,this)),await((P=(x=this.options).onError)==null?void 0:P.call(x,D,t,this.state.context)),await((N=(R=U(this,Pt).config).onSettled)==null?void 0:N.call(R,void 0,D,this.state.variables,this.state.context,this)),await((z=(O=this.options).onSettled)==null?void 0:z.call(O,void 0,D,t,this.state.context)),D}finally{wt(this,Yn,$r).call(this,{type:"error",error:D})}}finally{U(this,Pt).runNext(this)}}},Zn=new WeakMap,Pt=new WeakMap,Wi=new WeakMap,Yn=new WeakSet,$r=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),At.batch(()=>{U(this,Zn).forEach(r=>{r.onMutationUpdate(t)}),U(this,Pt).notify({mutation:this,type:"updated",action:t})})},L_);function cO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _r,kn,nl,I_,dO=(I_=class extends Hc{constructor(t={}){super();Ne(this,_r);Ne(this,kn);Ne(this,nl);this.config=t,ve(this,_r,new Set),ve(this,kn,new Map),ve(this,nl,0)}build(t,n,r){const s=new uO({mutationCache:this,mutationId:++Dl(this,nl)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){U(this,_r).add(t);const n=su(t);if(typeof n=="string"){const r=U(this,kn).get(n);r?r.push(t):U(this,kn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(U(this,_r).delete(t)){const n=su(t);if(typeof n=="string"){const r=U(this,kn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&U(this,kn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=su(t);if(typeof n=="string"){const r=U(this,kn).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=su(t);if(typeof n=="string"){const s=(r=U(this,kn).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){At.batch(()=>{U(this,_r).forEach(t=>{this.notify({type:"removed",mutation:t})}),U(this,_r).clear(),U(this,kn).clear()})}getAll(){return Array.from(U(this,_r))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ey(n,r))}findAll(t={}){return this.getAll().filter(n=>Ey(t,n))}notify(t){At.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return At.batch(()=>Promise.all(t.map(n=>n.continue().catch(Sn))))}},_r=new WeakMap,kn=new WeakMap,nl=new WeakMap,I_);function su(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Cy(e){return{onFetch:(t,n)=>{var p,g,v,_,k;const r=t.options,s=(v=(g=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,o=((_=t.state.data)==null?void 0:_.pages)||[],l=((k=t.state.data)==null?void 0:k.pageParams)||[];let u={pages:[],pageParams:[]},c=0;const h=async()=>{let y=!1;const T=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},E=xb(t.options,t.fetchOptions),S=async(x,P,R)=>{if(y)return Promise.reject();if(P==null&&x.pages.length)return Promise.resolve(x);const O=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:P,direction:R?"backward":"forward",meta:t.options.meta};return T(V),V})(),z=await E(O),{maxPages:D}=t.options,j=R?QN:JN;return{pages:j(x.pages,z,D),pageParams:j(x.pageParams,P,D)}};if(s&&o.length){const x=s==="backward",P=x?hO:Py,R={pages:o,pageParams:l},N=P(r,R);u=await S(R,N,x)}else{const x=e??o.length;do{const P=c===0?l[0]??r.initialPageParam:Py(r,u);if(c>0&&P==null)break;u=await S(u,P),c++}while(c<x)}return u};t.options.persister?t.fetchFn=()=>{var y,T;return(T=(y=t.options).persister)==null?void 0:T.call(y,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function Py(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 hO(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 Ze,Jr,Qr,oo,ao,Xr,lo,uo,M_,fO=(M_=class{constructor(e={}){Ne(this,Ze);Ne(this,Jr);Ne(this,Qr);Ne(this,oo);Ne(this,ao);Ne(this,Xr);Ne(this,lo);Ne(this,uo);ve(this,Ze,e.queryCache||new lO),ve(this,Jr,e.mutationCache||new dO),ve(this,Qr,e.defaultOptions||{}),ve(this,oo,new Map),ve(this,ao,new Map),ve(this,Xr,0)}mount(){Dl(this,Xr)._++,U(this,Xr)===1&&(ve(this,lo,bb.subscribe(async e=>{e&&(await this.resumePausedMutations(),U(this,Ze).onFocus())})),ve(this,uo,ac.subscribe(async e=>{e&&(await this.resumePausedMutations(),U(this,Ze).onOnline())})))}unmount(){var e,t;Dl(this,Xr)._--,U(this,Xr)===0&&((e=U(this,lo))==null||e.call(this),ve(this,lo,void 0),(t=U(this,uo))==null||t.call(this),ve(this,uo,void 0))}isFetching(e){return U(this,Ze).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return U(this,Jr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=U(this,Ze).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=U(this,Ze).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Hf(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return U(this,Ze).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=U(this,Ze).get(r.queryHash),o=s==null?void 0:s.state.data,l=WN(t,o);if(l!==void 0)return U(this,Ze).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return At.batch(()=>U(this,Ze).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=U(this,Ze).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=U(this,Ze);At.batch(()=>
176{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=U(this,Ze);return At.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=At.batch(()=>U(this,Ze).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Sn).catch(Sn)}invalidateQueries(e,t={}){return At.batch(()=>(U(this,Ze).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=At.batch(()=>U(this,Ze).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Sn)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Sn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=U(this,Ze).build(this,t);return n.isStaleByTime(Hf(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sn).catch(Sn)}fetchInfiniteQuery(e){return e.behavior=Cy(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sn).catch(Sn)}ensureInfiniteQueryData(e){return e.behavior=Cy(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ac.isOnline()?U(this,Jr).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,Ze)}getMutationCache(){return U(this,Jr)}getDefaultOptions(){return U(this,Qr)}setDefaultOptions(e){ve(this,Qr,e)}setQueryDefaults(e,t){U(this,oo).set(Ga(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...U(this,oo).values()],n={};return t.forEach(r=>{qa(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){U(this,ao).set(Ga(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...U(this,ao).values()],n={};return t.forEach(r=>{qa(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...U(this,Qr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Om(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Lm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...U(this,Qr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){U(this,Ze).clear(),U(this,Jr).clear()}},Ze=new WeakMap,Jr=new WeakMap,Qr=new WeakMap,oo=new WeakMap,ao=new WeakMap,Xr=new WeakMap,lo=new WeakMap,uo=new WeakMap,M_),pO=w.createContext(void 0),mO=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(pO.Provider,{value:e,children:t}));/**
177 * @remix-run/router v1.23.0
178 *
179 * Copyright (c) Remix Software Inc.
180 *
181 * This source code is licensed under the MIT license found in the
182 * LICENSE.md file in the root directory of this source tree.
183 *
184 * @license MIT
185 */function lc(){return lc=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},lc.apply(this,arguments)}var ni;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ni||(ni={}));const Ry="popstate";function gO(e){e===void 0&&(e={});function t(r,s){let{pathname:o,search:l,hash:u}=r.location;return Wf("",{pathname:o,search:l,hash:u},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Pb(s)}return yO(t,n,null,e)}function Ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Cb(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function vO(){return Math.random().toString(36).substr(2,8)}function Ay(e,t){return{usr:e.state,key:e.key,idx:t}}function Wf(e,t,n,r){return n===void 0&&(n=null),lc({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Wc(t):t,{state:n,key:t&&t.key||r||vO()})}function Pb(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 Wc(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 yO(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,l=s.history,u=ni.Pop,c=null,h=p();h==null&&(h=0,l.replaceState(lc({},l.state,{idx:h}),""));function p(){return(l.state||{idx:null}).idx}function g(){u=ni.Pop;let T=p(),E=T==null?null:T-h;h=T,c&&c({action:u,location:y.location,delta:E})}function v(T,E){u=ni.Push;let S=Wf(y.location,T,E);h=p()+1;let x=Ay(S,h),P=y.createHref(S);try{l.pushState(x,"",P)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;s.location.assign(P)}o&&c&&c({action:u,location:y.location,delta:1})}function _(T,E){u=ni.Replace;let S=Wf(y.location,T,E);h=p();let x=Ay(S,h),P=y.createHref(S);l.replaceState(x,"",P),o&&c&&c({action:u,location:y.location,delta:0})}function k(T){let E=s.location.origin!=="null"?s.location.origin:s.location.href,S=typeof T=="string"?T:Pb(T);return S=S.replace(/ $/,"%20"),Ut(E,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,E)}let y={get action(){return u},get location(){return e(s,l)},listen(T){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Ry,g),c=T,()=>{s.removeEventListener(Ry,g),c=null}},createHref(T){return t(s,T)},createURL:k,encodeLocation(T){let E=k(T);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:v,replace:_,go(T){return l.go(T)}};return y}var Ny;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ny||(Ny={}));function _O(e,t,n){return n===void 0&&(n="/"),wO(e,t,n,!1)}function wO(e,t,n,r){let s=typeof t=="string"?Wc(t):t,o=Nb(s.pathname||"/",n);if(o==null)return null;let l=Rb(e);xO(l);let u=null;for(let c=0;u==null&&c<l.length;++c){let h=OO(o);u=AO(l[c],h,r)}return u}function Rb(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,l,u)=>{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};c.relativePath.startsWith("/")&&(Ut(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
185id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let h=Qs([r,c.relativePath]),p=n.concat(c);o.children&&o.children.length>0&&(Ut(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),Rb(o.children,t,p,h)),!(o.path==null&&!o.index)&&t.push({path:h,score:PO(h,o.index),routesMeta:p})};return e.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))s(o,l);else for(let c of Ab(o.path))s(o,l,c)}),t}function Ab(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let l=Ab(r.join("/")),u=[];return u.push(...l.map(c=>c===""?o:[o,c].join("/"))),s&&u.push(...l),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function xO(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:RO(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const bO=/^:[\w-]+$/,SO=3,EO=2,TO=1,kO=10,CO=-2,Oy=e=>e==="*";function PO(e,t){let n=e.split("/"),r=n.length;return n.some(Oy)&&(r+=CO),t&&(r+=EO),n.filter(s=>!Oy(s)).reduce((s,o)=>s+(bO.test(o)?SO:o===""?TO:kO),r)}function RO(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function AO(e,t,n){let{routesMeta:r}=e,s={},o="/",l=[];for(let u=0;u<r.length;++u){let c=r[u],h=u===r.length-1,p=o==="/"?t:t.slice(o.length)||"/",g=Ly({path:c.relativePath,caseSensitive:c.caseSensitive,end:h},p),v=c.route;if(!g&&h&&n&&!r[r.length-1].route.index&&(g=Ly({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},p)),!g)return null;
vendor: 4,131 bytes, lines 185-194
185Object.assign(s,g.params),l.push({params:s,pathname:Qs([o,g.pathname]),pathnameBase:LO(Qs([o,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(o=Qs([o,g.pathnameBase]))}return l}function Ly(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=NO(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],l=o.replace(/(.)\/+$/,"$1"),u=s.slice(1);return{params:r.reduce((h,p,g)=>{let{paramName:v,isOptional:_}=p;if(v==="*"){let y=u[g]||"";l=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const k=u[g];return _&&!k?h[v]=void 0:h[v]=(k||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:l,pattern:e}}function NO(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Cb(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,c)=>(r.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function OO(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Cb(!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 Nb(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)||"/"}const Qs=e=>e.join("/").replace(/\/\/+/g,"/"),LO=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function IO(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ob=["post","put","patch","delete"];new Set(Ob);const MO=["get",...Ob];new Set(MO);/**
186 * React Router v6.30.1
187 *
188 * Copyright (c) Remix Software Inc.
189 *
190 * This source code is licensed under the MIT license found in the
191 * LICENSE.md file in the root directory of this source tree.
192 *
193 * @license MIT
194 */function uc(){return uc=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},uc.apply(this,arguments)}const jO=w.createContext(null),DO=w.createContext(null),Lb=w.createContext(null),Gc=w.createContext(null),qc=w.createContext({outlet:null,matches:[],isDataRoute:!1}),Ib=w.createContext(null);function Im(){return w.useContext(Gc)!=null}function Mb(){return Im()||Ut(!1),w.useContext(Gc).location}function zO(e,t){return BO(e,t)}function BO(e,t,n,r){Im()||Ut(!1);let{navigator:s}=w.useContext(Lb),{matches:o}=w.useContext(qc),l=o[o.length-1],u=l?l.params:{};l&&l.pathname;let c=l?l.pathnameBase:"/";l&&l.route;let h=Mb(),p;if(t){var g;let T=typeof t=="string"?Wc(t):t;c==="/"||(g=T.pathname)!=null&&g.startsWith(c)||Ut(!1),p=T}else p=h;let v=p.pathname||"/",_=v;if(c!=="/"){let T=c.replace(/^\//,"").split("/");_="/"+v.replace(/^\//,"").split("/").slice(T.length).join("/")}let k=_O(e,{pathname:_}),y=VO(k&&k.map(T=>Object.assign({},T,{params:Object.assign({},u,T.params),pathname:Qs([c,s.encodeLocation?s.encodeLocation(T.pathname).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?c:Qs([c,s.encodeLocation?s.encodeLocation(T.pathnameBase).pathname:T.pathnameBase])})),o,n,r);return t&&y?w.createElement(Gc.Provider,{value:{location:uc({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:ni.Pop}},y):y}function $O(){let e=KO(),t=IO(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application 
194Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:s},n):null,null)}const FO=w.createElement($O,null);class UO extends w.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?w.createElement(qc.Provider,{value:this.props.routeContext},w.createElement(Ib.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function HO(e){let{routeContext:t,match:n,children:r}=e,s=w.useContext(jO);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(qc.Provider,{value:t},r)}function VO(e,t,n,r){var s;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=(s=n)==null?void 0:s.errors;if(u!=null){let p=l.findIndex(g=>g.route.id&&(u==null?void 0:u[g.route.id])!==void 0);p>=0||Ut(!1),l=l.slice(0,Math.min(l.length,p+1))}let c=!1,h=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p<l.length;p++){let g=l[p];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(h=p),g.route.id){let{loaderData:v,errors:_}=n,k=g.route.loader&&v[g.route.id]===void 0&&(!_||_[g.route.id]===void 0);if(g.route.lazy||k){c=!0,h>=0?l=l.slice(0,h+1):l=[l[0]];break}}}return l.reduceRight((p,g,v)=>{let _,k=!1,y=null,T=null;n&&(_=u&&g.route.id?u[g.route.id]:void 0,y=g.route.errorElement||FO,c&&(h<0&&v===0?(k=!0,T=null):h===v&&(k=!0,T=g.route.hydrateFallbackElement||null)));let E=t.concat(l.slice(0,v+1)),S=()=>{let x;return _?x=y:k?x=T:g.route.Component?x=w.createElement(g.route.Component,null):g.route.element?x=g.route.element:x=p,w.createElement(HO,{match:g,routeContext:{outlet:p,matches:E,isDataRoute:n!=null},children:x})};return n&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?w.createElement(UO,{location:n.location,revalidation:n.revalidation,component:y,error:_,children:S(),routeC
vendor: 4,091 bytes, lines 194-203
194ontext:{outlet:null,matches:E,isDataRoute:!0}}):S()},null)}var Gf=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}(Gf||{});function WO(e){let t=w.useContext(DO);return t||Ut(!1),t}function GO(e){let t=w.useContext(qc);return t||Ut(!1),t}function qO(e){let t=GO(),n=t.matches[t.matches.length-1];return n.route.id||Ut(!1),n.route.id}function KO(){var e;let t=w.useContext(Ib),n=WO(Gf.UseRouteError),r=qO(Gf.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ZO(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function qf(e){Ut(!1)}function YO(e){let{basename:t="/",children:n=null,location:r,navigationType:s=ni.Pop,navigator:o,static:l=!1,future:u}=e;Im()&&Ut(!1);let c=t.replace(/^\/*/,"/"),h=w.useMemo(()=>({basename:c,navigator:o,static:l,future:uc({v7_relativeSplatPath:!1},u)}),[c,u,o,l]);typeof r=="string"&&(r=Wc(r));let{pathname:p="/",search:g="",hash:v="",state:_=null,key:k="default"}=r,y=w.useMemo(()=>{let T=Nb(p,c);return T==null?null:{location:{pathname:T,search:g,hash:v,state:_,key:k},navigationType:s}},[c,p,g,v,_,k,s]);return y==null?null:w.createElement(Lb.Provider,{value:h},w.createElement(Gc.Provider,{children:n,value:y}))}function JO(e){let{children:t,location:n}=e;return zO(Kf(t),n)}new Promise(()=>{});function Kf(e,t){t===void 0&&(t=[]);let n=[];return w.Children.forEach(e,(r,s)=>{if(!w.isValidElement(r))return;let o=[...t,s];if(r.type===w.Fragment){n.push.apply(n,Kf(r.props.children,o));return}r.type!==qf&&Ut(!1),!r.props.index||!r.props.children||Ut(!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=Kf(r.props.children,o)),n.push(l)}),n}/**
195 * React Router DOM v6.30.1
196 *
197 * Copyright (c) Remix Software Inc.
198 *
199 * This source code is licensed under the MIT license found in the
200 * LICENSE.md file in the root directory of this source tree.
201 *
202 * @license MIT
203 */const QO="6";try{window.__reactRouterVersion=QO}catch{}const XO="startTransition",Iy=Ep[XO];function eL(e){let{basename:t,children:n,future:r,window:s}=e,o=w.useRef();o.current==null&&(o.current=gO({window:s,v5Compat:!0}));let l=o.current,[u,c]=w.useState({action:l.action,location:l.location}),{v7_startTransition:h}=r||{},p=w.useCallback(g=>{h&&Iy?Iy(()=>c(g)):c(g)},[c,h]);return w.useLayoutEffect(()=>l.listen(p),[l,p]),w.useEffect(()=>ZO(r),[r]),w.createElement(YO,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:r})}var My;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(My||(My={}));var jy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(jy||(jy={}));var Qn=function(){return Qn=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Qn.apply(this,arguments)};function Co(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 s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function tL(e,t,n,r){function s(o){return o instanceof n?o:new n(function(l){l(o)})}
203return new(n||(n=Promise))(function(o,l){function u(p){try{h(r.next(p))}catch(g){l(g)}}function c(p){try{h(r.throw(p))}catch(g){l(g)}}function h(p){p.done?o(p.value):s(p.value).then(u,c)}h((r=r.apply(e,t||[])).next())})}function nL(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;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 rL=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Mm extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class iL extends Mm{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Dy extends Mm{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class zy extends Mm{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Zf;(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"})(Zf||(Zf={}));class sL{constructor(t,{headers:n={},customFetch:r,region:s=Zf.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=rL(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return tL(this,arguments,void 0,function*(n,r={}){var s;let o,l;try{const{headers:u,method:c,body:h,signal:p,timeout:g}=r;let v={},{region:_}=r;_||(_=this.region);const k=new URL(`${this.url}/${n}`);_&&_!=="any"&&(v["x-region"]=_,k.searchParams.set("forceFunctionRegion",_));let y;h&&(u&&!Object.prototype.hasOwnProperty.call(u,"Content-Type")||!u)?typeof Blob<"u"&&h instanceof Blob||h instanceof ArrayBuffer?(v["Content-Type"]="application/octet-stream",y=h):typeof h=="string"?(v["Content-Type"]="text/plain",y=h):typeof FormData<"u"&&h instanceof FormData?y=h:(v["Content-Type"]="application/json",y=JSON.stringify(h)):h&&typeof h!="string"&&!(typeof Blob<"u"&&h instanceof Blob)&&!(h instanceof ArrayBuffer)&&!(typeof FormData<"u"&&h instanceof FormData)?y=JSON.stringify(h):y=h;let T=p;g&&(l=new AbortController,o=setTimeout(()=>l.abort(),g),p?(T=l.signal,p.addEventListener("abort",()=>l.abort())):T=l.signal);const E=yield this.fetch(k.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},v),this.headers),u),body:y,signal:T}).catch(R=>{throw new iL(R)}),S=E.headers.get("x-relay-error");if(S&&S==="true")throw new Dy(E);if(!E.ok)throw new zy(E);let x=((s=E.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),P;return x==="application/json"?P=yield E.json():x==="application/octet-stream"||x==="application/pdf"?P=yield E.blob():x==="text/event-stream"?P=E:x==="multipart/form-data"?P=yield E.formData():P=yield E.text(),{data:P,error:null,response:E}}catch(u){return{data:null,error:u,response:u instanceof zy||u instanceof Dy?u.context:void 0}}finally{o&&clearTimeout(o)}})}}var oL=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
203de=e.code}},aL=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 s=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,c=null,h=o.status,p=o.statusText;if(o.ok){var g,v;if(n.method!=="HEAD"){var _;const E=await o.text();E===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((_=n.headers.get("Accept"))===null||_===void 0)&&_.includes("application/vnd.pgrst.plan+text"))?u=E:u=JSON.parse(E))}const y=(g=n.headers.get("Prefer"))===null||g===void 0?void 0:g.match(/count=(exact|planned|estimated)/),T=(v=o.headers.get("content-range"))===null||v===void 0?void 0:v.split("/");y&&T&&T.length>1&&(c=parseInt(T[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,c=null,h=406,p="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{var k;const y=await o.text();try{l=JSON.parse(y),Array.isArray(l)&&o.status===404&&(u=[],l=null,h=200,p="OK")}catch{o.status===404&&y===""?(h=204,p="No Content"):l={message:y}}if(l&&n.isMaybeSingle&&(!(l==null||(k=l.details)===null||k===void 0)&&k.includes("0 rows"))&&(l=null,h=200,p="OK"),l&&n.shouldThrowOnError)throw new oL(l)}return{error:l,data:u,count:c,status:h,statusText:p}});return this.shouldThrowOnError||(s=s.catch(o=>{var l;let u="";const c=o==null?void 0:o.cause;if(c){var h,p,g,v;const k=(h=c==null?void 0:c.message)!==null&&h!==void 0?h:"",y=(p=c==null?void 0:c.code)!==null&&p!==void 0?p:"";u=`${(g=o==null?void 0:o.name)!==null&&g!==void 0?g:"FetchError"}: ${o==null?void 0:o.message}`,u+=`
204
205Caused by: ${(v=c==null?void 0:c.name)!==null&&v!==void 0?v:"Error"}: ${k}`,y&&(u+=` (${y})`),c!=null&&c.stack&&(u+=`
206${c.stack}`)}else{var _;u=(_=o==null?void 0:o.stack)!==null&&_!==void 0?_:""}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:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},lL=class extends aL{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:s=r}={}){const o=s?`${s}.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 s=typeof r>"u"?"offset":`${r}.offset`,o=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${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}
206explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:o="text"}={}){var l;const u=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(l=this.headers.get("Accept"))!==null&&l!==void 0?l:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${c}"; 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 By=new RegExp("[,()]");var Ps=class extends lL{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"&&By.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"&&By.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 s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const o=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}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}},uL=class{constructor(e,{headers:t={},schema:n,fetch:r}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let o=!1;const l=(e??"*").split("").map(h=>/\s/.test(h)&&!o?"":(h==='"'&&(o=!o),h)).join(""),{url:u,headers:c}=this.cloneRequestState();return u.searchParams.set("select",l),r&&c.append("Prefer",`count=${r}`),new Ps({method:s,url:u,headers:c,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:o,headers:l}=this.cloneRequestState();if(t&&l.append("Prefer",`count=${t}`),n||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((c,h)=>c.concat(Object.keys(h)),[]);if(u.length>0){const c=[...new Set(u)].map(h=>`"${h}"`);o.searchParams.set("columns",c.join(","))}}return new Ps({method:s,url:o,headers:l,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:s=!0}={}){var o;const l="POST",{url:u,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&u.searchParams.set("on_conflict",t),r&&c.append("Prefer",`count=${r}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const h=e.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(h.length>0){const p=[...new Set(h)].map(g=>`"${g}"`);u.searchParams.set("columns",p.join(","))}}return new Ps({method:l,url:u,headers:c,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new Ps({method:r,url:s,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Ps({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},cL=class jb{constructor(t,{headers:n={},schema:r,fetch:s}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.fetch=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new uL(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new jb(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:s=!1,count:o}={}){var l;let u;const c=new URL(`${this.url}/rpc/${t}`);let h;const p=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(p)),g=r&&Object.values(n).some(p);g?(u="POST",h=n):r||s?(u=r?"HEAD":"GET",Object.entries(n).filter(([_,k])=>k!==void 0).map(([_,k])=>[_,Array.isArray(k)?`{${k.join(",")}}`:`${k}
206`]).forEach(([_,k])=>{c.searchParams.append(_,k)})):(u="POST",h=n);const v=new Headers(this.headers);return g?v.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&v.set("Prefer",`count=${o}`),new Ps({method:u,url:c,headers:v,schema:this.schemaName,body:h,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch})}};class dL{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,o=parseInt(s.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
207import ws from "ws"
208new 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+=`
209
210Suggested 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 hL="2.90.1",fL=`realtime-js/${hL}`,Db="1.0.0",pL="2.0.0",$y=Db,Yf=1e4,mL=1e3,gL=100;var Vr;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Vr||(Vr={}));var st;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(st||(st={}));var Pn;(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"})(Pn||(Pn={}));var Jf;(function(e){e.websocket="websocket"})(Jf||(Jf={}));var Li;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Li||(Li={}));class vL{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 s=(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,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},l=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,l)}_encodeUserBroadcastPush(t,n,r){var s,o;const l=t.topic,u=(s=t.ref)!==null&&s!==void 0?s:"",c=(o=t.join_ref)!==null&&o!==void 0?o:"",h=t.payload.event,p=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},g=Object.keys(p).length===0?"":JSON.stringify(p);if(c.length>255)throw new Error(`joinRef length ${c.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(h.length>255)throw new Error(`userEvent length ${h.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const v=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+u.length+l.length+h.length+g.length,_=new ArrayBuffer(this.HEADER_LENGTH+v);let k=new DataView(_),y=0;k.setUint8(y++,this.KINDS.userBroadcastPush),k.setUint8(y++,c.length),k.setUint8(y++,u.length),k.setUint8(y++,l.length),k.setUint8(y++,h.length),k.setUint8(y++,g.length),k.setUint8(y++,n),Array.from(c,E=>
210k.setUint8(y++,E.charCodeAt(0))),Array.from(u,E=>k.setUint8(y++,E.charCodeAt(0))),Array.from(l,E=>k.setUint8(y++,E.charCodeAt(0))),Array.from(h,E=>k.setUint8(y++,E.charCodeAt(0))),Array.from(g,E=>k.setUint8(y++,E.charCodeAt(0)));var T=new Uint8Array(_.byteLength+r.byteLength);return T.set(new Uint8Array(_),0),T.set(new Uint8Array(r),_.byteLength),T.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),[s,o,l,u,c]=r;return n({join_ref:s,ref:o,topic:l,event:u,payload:c})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),o=n.getUint8(2),l=n.getUint8(3),u=n.getUint8(4);let c=this.HEADER_LENGTH+4;const h=r.decode(t.slice(c,c+s));c=c+s;const p=r.decode(t.slice(c,c+o));c=c+o;const g=r.decode(t.slice(c,c+l));c=c+l;const v=t.slice(c,t.byteLength),_=u===this.JSON_ENCODING?JSON.parse(r.decode(v)):v,k={type:this.BROADCAST_EVENT,event:p,payload:_};return l>0&&(k.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:h,event:this.BROADCAST_EVENT,payload:k}}_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 zb{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 De;(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"})(De||(De={}));const Fy=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((o,l)=>(o[l]=yL(l,e,t,s),o),{}):{}},yL=(e,t,n,r)=>{const s=t.find(u=>u.name===e),o=s==null?void 0:s.type,l=n[e];return o&&!r.includes(o)?Bb(o,l):Qf(l)},Bb=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return bL(t,n)}switch(e){case De.bool:return _L(t);case De.float4:case De.float8:case De.int2:case De.int4:case De.int8:case De.numeric:case De.oid:return wL(t);case De.json:case De.jsonb:return xL(t);case De.timestamp:return SL(t);case De.abstime:case De.date:case De.daterange:case De.int4range:case De.int8range:case De.money:case De.reltime:case De.text:case De.time:case De.timestamptz:case De.timetz:case De.tsrange:case De.tstzrange:return Qf(t);default:return Qf(t)}},Qf=e=>e,_L=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},wL=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},xL=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},bL=(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=>Bb(t,u))}return e},SL=e=>typeof e=="string"?e.replace(" ","T"):e,$b=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 yh{constructor(t,n,r={},s=Yf){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(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
210oin_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 Uy;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Uy||(Uy={}));class _a{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,{},s=>{const{onJoin:o,onLeave:l,onSync:u}=this.caller;this.joinRef=this.channel._joinRef(),this.state=_a.syncState(this.state,s,o,l),this.pendingDiffs.forEach(c=>{this.state=_a.syncDiff(this.state,c,o,l)}),this.pendingDiffs=[],u()}),this.channel._on(r.diff,{},s=>{const{onJoin:o,onLeave:l,onSync:u}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=_a.syncDiff(this.state,s,o,l),u())}),this.onJoin((s,o,l)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:l})}),this.onLeave((s,o,l)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:l})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const o=this.cloneDeep(t),l=this.transformState(n),u={},c={};return this.map(o,(h,p)=>{l[h]||(c[h]=p)}),this.map(l,(h,p)=>{const g=o[h];if(g){const v=p.map(T=>T.presence_ref),_=g.map(T=>T.presence_ref),k=p.filter(T=>_.indexOf(T.presence_ref)<0),y=g.filter(T=>v.indexOf(T.presence_ref)<0);k.length>0&&(u[h]=k),y.length>0&&(c[h]=y)}else u[h]=p}),this.syncDiff(o,{joins:u,leaves:c},r,s)}static syncDiff(t,n,r,s){const{joins:o,leaves:l}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(o,(u,c)=>{var h;const p=(h=t[u])!==null&&h!==void 0?h:[];if(t[u]=this.cloneDeep(c),p.length>0){const g=t[u].map(_=>_.presence_ref),v=p.filter(_=>g.indexOf(_.presence_ref)<0);t[u].unshift(...v)}r(u,p,c)}),this.map(l,(u,c)=>{let h=t[u];if(!h)return;const p=c.map(g=>g.presence_ref);h=h.filter(g=>p.indexOf(g.presence_ref)<0),t[u]=h,s(u,h,c),h.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 s=t[r];return"metas"in s?n[r]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[r]=s,n},{})}static cloneDeep(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 Hy;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Hy||(Hy={}));var wa;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(wa||(wa={}));var vr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(vr||(vr={}));class Hs{constructor(t,n={config:{}},r){var s,o;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=st.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 yh(this,Pn.join,this.params,this.timeout),this.rejoinTimer=new zb(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=st.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=st.closed,this.socket._remove(this)}),this._onError(l=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,l),this.state=st.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=st.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",l=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,l),this.state=st.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Pn.reply,{},(l,u)=>{this._trigger(this._replyEventName(u),l)}),this.presence=new _a(this),this.broadcastEndpointURL=$b(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.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,s,o;if(this.socket.isConnected()||this.socket.connect(),this.state==st.closed){const{config:{broadcast:l,presence:u,private:c}}=this.params,h=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(_=>_.filter))!==null&&s!==void 0?s:[],p=!!this.bindings[wa.PRESENCE]&&this.bindings[wa.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,g={},v={broadcast:l,presence:Object.assign(Object.assign({},u),{enabled:p}),postgres_changes:h,private:c};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(_=>t==null?void 0:t(vr.CHANNEL_ERROR,_)),this._onClose(()=>t==null?void 0:t(vr.CLOSED)),this.updateJoinPayload(Object.assign({config:v},g)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:_})=>{var k;if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){t==null||t(vr.SUBSCRIBED);return}else{const y=this.bindings.postgres_changes,T=(k=y==null?void 0:y.length)!==null&&k!==void 0?k:0,E=[];for(let S=0;S<T;S++){const x=y[S],{filter:{event:P,schema:R,table:N,filter:O}}=x,z=_&&_[S];if(z&&z.event===P&&Hs.isFilterValueEqual(z.schema,R)&&Hs.isFilterValueEqual(z.table,N)&&Hs.isFilterValueEqual(z.filter,O))E.push(Object.assign(Object.assign({},x),{id:z.id}));else{this.unsubscribe(),this.state=st.errored,t==null||t(vr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=E,t&&t(vr.SUBSCRIBED);return}}).receive("error",_=>{this.state=st.errored,t==null||t(vr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(_).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(vr.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===st.joined&&t===wa.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 s;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,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(u.status===202)return{success:!0};let c=u.statusText;
210try{const h=await u.json();c=h.error||h.message||c}catch{}return Promise.reject(new Error(c))}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event: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 c={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:l,private:this.private}]})};try{const h=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=h.body)===null||s===void 0?void 0:s.cancel()),h.ok?"ok":"error"}catch(h){return h.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var l,u,c;const h=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(u=(l=this.params)===null||l===void 0?void 0:l.config)===null||u===void 0?void 0:u.broadcast)===null||c===void 0)&&c.ack)&&o("ok"),h.receive("ok",()=>o("ok")),h.receive("error",()=>o("error")),h.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=st.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Pn.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new yh(this,Pn.leave,{},t),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("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=st.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const s=new AbortController,o=setTimeout(()=>s.abort(),r),l=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.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 s=new yh(this,t,n,r);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>gL){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 s,o;const l=t.toLocaleLowerCase(),{close:u,error:c,leave:h,join:p}=Pn;if(r&&[u,c,h,p].indexOf(l)>=0&&r!==this._joinRef())return;let v=this._onMessage(l,n,r);if(n&&!v)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(l)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(_=>{var k,y,T;return((k=_.filter)===null||k===void 0?void 0:k.event)==="*"||((T=(y=_.filter)===null||y===void 0?void 0:y.event)===null||T===void 0?void 0:T.toLocaleLowerCase())===l}).map(_=>_.callback(v,r)):(o=this.bindings[l])===null||o===void 0||o.filter(_=>{var k,y,T,E,S,x,P,R;if(["broadcast","presence","postgres_changes"].includes(l))if("id"in _){const N=_.id,O=(k=_.filter)===null||k===void 0?void 0:k.event;return N&&((y=n.ids)===null||y===void 0?void 0:y.includes(N))&&(O==="*"||(O==null?void 0:O.toLocaleLowerCase())===((T=n.data)===null||T===void 0?void 0:T.type.toLocaleLowerCase()))&&(!(!((E=_.filter)===null||E===void 0)&&E.table)||_.filter.table===((S=n.data)===null||S===void 0?void 0:S.table))}else{const N=(P=(x=_==null?void 0:_.filter)===null||x===void 0?void 0:x.event)===null||P===void 0?void 0:P.toLocaleLowerCase();return N==="*"||N===((R=n==null?void 0:n.event)===null||R===void 0?void 0:R.toLocaleLowerCase())}else return _.type.toLocaleLowerCase()===l}).map(_=>{if(typeof v=="object"&&"ids"in v){const k=v.data,{schema:y,table:T,commit_timestamp:E,type:S,errors:x}=k;v=Object.assign(Object.assign({},{schema:y,table:T,commit_timestamp:E,eventType:S,new:{},old:{},errors:x}),this._getPayloadRecords(k))}_.callback(v,r)})}_isClosed(){return this.state===st.closed}_isJoined(){return this.state===st.joined}_isJoining(){return this.state===st.joining}_isLeaving(){return this.state===st.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),o={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===r&&Hs.isEqual(s.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(Pn.close,{},t)}_onError(t){this._on(Pn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=st.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Fy(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Fy(t.columns,t.old_record)),n}}const _h=()=>{},ou={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},EL=[1e3,2e3,5e3,1e4],TL=1e4,kL=`
211  addEventListener("message", (e) => {
212    if (e.data.event === "start") {
213      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
214    }
215  });`;class CL{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=Yf,this.transport=null,this.heartbeatIntervalMs=ou.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=_h,this.ref=0,this.reconnectTimer=null,this.vsn=$y,this.logger=_h,this.conn=null,this.sendBuffer=[],this.serializer
215=new vL,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...o)=>s(...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}/${Jf.websocket}`,this.httpEndpoint=$b(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=dL.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n}
216
217To use Realtime in Node.js, you need to provide a WebSocket implementation:
218
219Option 1: Use Node.js 22+ which has native WebSocket support
220Option 2: Install and provide the "ws" package:
221
222  npm install ws
223
224  import ws from "ws"
225  const client = new RealtimeClient(url, {
226    ...options,
227    transport: ws
228  })`):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 Vr.connecting:return Li.Connecting;case Vr.open:return Li.Open;case Vr.closing:return Li.Closing;default:return Li.Closed}}isConnected(){return this.connectionState()===Li.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===r);if(s)return s;{const o=new Hs(`realtime:${t}`,n,this);return this.channels.push(o),o}}push(t){const{topic:n,event:r,payload:s,ref:o}=t,l=()=>{this.encode(t,u=>{var c;(c=this.conn)===null||c===void 0||c.send(u)})};this.log("push",`${n} ${r} (${o})`,s),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._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(mL,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},ou.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(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=>
228{if(n.topic==="phoenix"&&n.event==="phx_reply"&&n.ref&&n.ref===this.pendingHeartbeatRef){const h=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error",h)}catch(p){this.log("error","error in heartbeat callback",p)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:r,event:s,payload:o,ref:l}=n,u=l?`(${l})`:"",c=o.status||"";this.log("receive",`${c} ${r} ${s} ${u}`.trim(),o),this.channels.filter(h=>h._isMember(r)).forEach(h=>h._trigger(s,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===Vr.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Vr.open||this.conn.readyState===Vr.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(Pn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([kL],{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(s){this.log("error","Error fetching access token from callback",s),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(s=>{const o={access_token:n,version:fL};n&&s.updateJoinPayload(o),s.joinedOnce&&s._isJoined()&&s._push(Pn.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(s){this.log("error",`error in ${t} callback`,s)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new zb(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},ou.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,s,o,l,u,c,h,p,g,v,_;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
228imeout)!==null&&r!==void 0?r:Yf,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:ou.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:_h,this.vsn=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:$y,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=(h=t==null?void 0:t.reconnectAfterMs)!==null&&h!==void 0?h:k=>EL[k-1]||TL,this.vsn){case Db:this.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:(k,y)=>y(JSON.stringify(k)),this.decode=(g=t==null?void 0:t.decode)!==null&&g!==void 0?g:(k,y)=>y(JSON.parse(k));break;case pL:this.encode=(v=t==null?void 0:t.encode)!==null&&v!==void 0?v:this.serializer.encode.bind(this.serializer),this.decode=(_=t==null?void 0:t.decode)!==null&&_!==void 0?_: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 Ka=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 PL(e,t,n){const r=new URL(t,e);if(n)for(const[s,o]of Object.entries(n))o!==void 0&&r.searchParams.set(s,o);return r.toString()}async function RL(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 AL(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:o,headers:l}){const u=PL(e.baseUrl,r,s),c=await RL(e.auth),h=await t(u,{method:n,headers:{...o?{"Content-Type":"application/json"}:{},...c,...l},body:o?JSON.stringify(o):void 0}),p=await h.text(),g=(h.headers.get("content-type")||"").includes("application/json"),v=g&&p?JSON.parse(p):p;if(!h.ok){const _=g?v:void 0,k=_==null?void 0:_.error;throw new Ka((k==null?void 0:k.message)??`Request failed with status ${h.status}`,{status:h.status,icebergType:k==null?void 0:k.type,icebergCode:k==null?void 0:k.code,details:_})}return{status:h.status,headers:h.headers,data:v}}}}function au(e){return e.join("�")}var NL=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:au(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/${au(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${au(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${au(e.namespace)}`}),!0}catch(t){if(t instanceof Ka&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Ka&&n.status===409)return;throw n}}};function ys(e){return e.join("�")}var OL=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/${ys(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/${ys(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/${ys(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/${ys(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/${ys(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/${ys(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Ka&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Ka&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},LL=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=AL({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new NL(this.client,t),this.tableOps=new OL(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)}
228async 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)}},Kc=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function Ve(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var IL=class extends Kc{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}}},Xf=class extends Kc{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const jm=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),ML=()=>Response,ep=e=>{if(Array.isArray(e))return e.map(n=>ep(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=ep(r)}),t},jL=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)},DL=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Za(e){"@babel/helpers - typeof";return Za=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},Za(e)}function zL(e,t){if(Za(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Za(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BL(e){var t=zL(e,"string");return Za(t)=="symbol"?t:t+""}function $L(e,t,n){return(t=BL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vy(Object(n),!0).forEach(function(r){$L(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const wh=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)},FL=async(e,t,n)=>{e instanceof await ML()&&!(n!=null&&n.noResolveJson)?e.json().then(r=>{const s=e.status||500,o=(r==null?void 0:r.statusCode)||s+"";t(new IL(wh(r),s,o))}).catch(r=>{t(new Xf(wh(r),r))}):t(new Xf(wh(e),e))},UL=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!r?s:(jL(r)?(s.headers=he({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),he(he({},s),n))};async function dl(e,t,n,r,s,o){return new Promise((l,u)=>{e(n,UL(t,r,s,o)).then(c=>{if(!c.ok)throw c;return r!=null&&r.noResolveJson?c:c.json()}).then(c=>l(c)).catch(c=>FL(c,u,r))})}async function Ya(e,t,n,r){return dl(e,"GET",t,n,r)}async function En(e,t,n,r,s){return dl(e,"POST",t,r,s,n)}async function tp(e,t,n,r,s){return dl(e,"PUT",t,r,s,n)}async function HL(e,t,n,r){return dl(e,"HEAD",t,he(he({},n),{},{noResolveJson:!0}),r)}async function Dm(e,t,n,r,s){return dl(e,"DELETE",t,r,s,n)}var VL=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(Ve(t))return{data:null,error:t};throw t}}};let Fb;Fb=Symbol.toStringTag;var WL=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Fb]="BlobDownloadBuilder",this.promise=null}asStream(){return new VL(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(Ve(t))return{data:null,error:t};throw t}}};const GL={limit:100,offset:0,sortBy:{column:"name",order:"asc"}}
228,Wy={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var qL=class{constructor(e,t={},n,r){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=n,this.fetch=jm(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,n,r){var s=this;try{let o;const l=he(he({},Wy),r);let u=he(he({},s.headers),e==="POST"&&{"x-upsert":String(l.upsert)});const c=l.metadata;typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",l.cacheControl),c&&o.append("metadata",s.encodeMetadata(c)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.has("cacheControl")||o.append("cacheControl",l.cacheControl),c&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(c))):(o=n,u["cache-control"]=`max-age=${l.cacheControl}`,u["content-type"]=l.contentType,c&&(u["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(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=he(he({},u),r.headers));const h=s._removeEmptyFolders(t),p=s._getFinalPath(h),g=await(e=="PUT"?tp:En)(s.fetch,`${s.url}/object/${p}`,o,he({headers:u},l!=null&&l.duplex?{duplex:l.duplex}:{}));return{data:{path:h,id:g.Id,fullPath:g.Key},error:null}}catch(o){if(s.shouldThrowOnError)throw o;if(Ve(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 s=this;const o=s._removeEmptyFolders(e),l=s._getFinalPath(o),u=new URL(s.url+`/object/upload/sign/${l}`);u.searchParams.set("token",t);try{let c;const h=he({upsert:Wy.upsert},r),p=he(he({},s.headers),{"x-upsert":String(h.upsert)});return typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",h.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",h.cacheControl)):(c=n,p["cache-control"]=`max-age=${h.cacheControl}`,p["content-type"]=h.contentType),{data:{path:o,fullPath:(await tp(s.fetch,u.toString(),c,{headers:p})).Key},error:null}}catch(c){if(s.shouldThrowOnError)throw c;if(Ve(c))return{data:null,error:c};throw c}}async createSignedUploadUrl(e,t){var n=this;try{let r=n._getFinalPath(e);const s=he({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await En(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),l=new URL(n.url+o.url),u=l.searchParams.get("token");if(!u)throw new Kc("No token returned by API");return{data:{signedUrl:l.toString(),path:e,token:u},error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Ve(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 En(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
228stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}),error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Ve(s))return{data:null,error:s};throw s}}async copy(e,t,n){var r=this;try{return{data:{path:(await En(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key},error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Ve(s))return{data:null,error:s};throw s}}async createSignedUrl(e,t,n){var r=this;try{let s=r._getFinalPath(e),o=await En(r.fetch,`${r.url}/object/sign/${s}`,he({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(s){if(r.shouldThrowOnError)throw s;if(Ve(s))return{data:null,error:s};throw s}}async createSignedUrls(e,t,n){var r=this;try{const s=await En(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:s.map(l=>he(he({},l),{},{signedUrl:l.signedURL?encodeURI(`${r.url}${l.signedURL}${o}`):null})),error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Ve(s))return{data:null,error:s};throw s}}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)||{}),s=r?`?${r}`:"",o=this._getFinalPath(e),l=()=>Ya(this.fetch,`${this.url}/${n}/${o}${s}`,{headers:this.headers,noResolveJson:!0});return new WL(l,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);try{return{data:ep(await Ya(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ve(r))return{data:null,error:r};throw r}}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await HL(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ve(r)&&r instanceof Xf){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&r.push(s);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 Dm(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ve(n))return{data:null,error:n};throw n}}async list(e,t,n){var r=this;try{const s=he(he(he({},GL),t),{},{prefix:e||""});return{data:await En(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n),error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Ve(s))return{data:null,error:s};throw s}}async listV2(e,t){var n=this;try{const r=he({},e);return{data:await En(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t),error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Ve(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 Ub="2.90.1",Hb={"X-Client-Info":`storage-js/${Ub}`};var KL=class{constructor(e,t={},n,r){this.shouldThrowOnError=!1;const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href.replace(/\/$/,""),this.headers=he(he({},Hb),t),this.fetch=jm(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const n=t.listBucketOptionsToQueryString(e);return{data:await Ya(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ve(n))return{data:null,error:n};throw n}}async getBucket(e){var t=this;try{return{data:await Ya(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ve(n))return{data:null,error:n};throw n}}async createBucket(e,t={public:!1}){var n=this;try{return{data:await En(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(Ve(r))return{data:null,error:r};throw r}}async updateBucket(e,t){var n=this;try{return{data:await tp(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(Ve(r))return{data:null,error:r};throw r}}async emptyBucket(e){var t=this;try{return{data:await En(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ve(n))return{data:null,error:n};throw n}}async deleteBucket(e){var t=this;try{return{data:await Dm(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ve(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():""}},ZL=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=he(he({},Hb),t),this.fetch=jm(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await En(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ve(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(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return{data:await Ya(t.fetch,s,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ve(n))return{data:null,error:n};throw n}}async deleteBucket(e){var t=this;try{return{data:await Dm(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ve(n))return{data:null,error:n};throw n}}from(e){var t=this;if(!DL(e))throw new Kc("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 LL({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
228),r=this.shouldThrowOnError;return new Proxy(n,{get(s,o){const l=s[o];return typeof l!="function"?l:async(...u)=>{try{return{data:await l.apply(s,u),error:null}}catch(c){if(r)throw c;return{data:null,error:c}}}}})}};const zm={"X-Client-Info":`storage-js/${Ub}`,"Content-Type":"application/json"};var Vb=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function Kt(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var xh=class extends Vb{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}}},YL=class extends Vb{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const Bm=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),JL=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)},Gy=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),QL=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,s=e;if(typeof s.json=="function")s.json().then(o=>{const l=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||r+"";t(new xh(Gy(o),r,l))}).catch(()=>{const o=r+"";t(new xh(s.statusText||`HTTP ${r} error`,r,o))});else{const o=r+"";t(new xh(s.statusText||`HTTP ${r} error`,r,o))}}else t(new YL(Gy(e),e))},XL=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return r?(JL(r)?(s.headers=he({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,he(he({},s),n)):s};async function eI(e,t,n,r,s,o){return new Promise((l,u)=>{e(n,XL(t,r,s,o)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;const h=c.headers.get("content-type");return!h||!h.includes("application/json")?{}:c.json()}).then(c=>l(c)).catch(c=>QL(c,u,r))})}async function Zt(e,t,n,r,s){return eI(e,"POST",t,r,s,n)}var tI=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=he(he({},zm),t),this.fetch=Bm(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await Zt(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(n))return{data:null,error:n};throw n}}async getIndex(e,t){var n=this;try{return{data:await Zt(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}),error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Kt(r))return{data:null,error:r};throw r}}async listIndexes(e){var t=this;try{return{data:await Zt(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(n))return{data:null,error:n};throw n}}async deleteIndex(e,t){var n=this;try{return{data:await Zt(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{},error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Kt(r))return{data:null,error:r};throw r}}},nI=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=he(he({},zm),t),this.fetch=Bm(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 Zt(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(n))return{data:null,error:n};throw n}}async getVectors(e){var t=this;try{return{data:await Zt(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(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");
228if(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 Zt(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(n))return{data:null,error:n};throw n}}async queryVectors(e){var t=this;try{return{data:await Zt(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(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 Zt(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(n))return{data:null,error:n};throw n}}},rI=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=he(he({},zm),t),this.fetch=Bm(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Zt(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(n))return{data:null,error:n};throw n}}async getBucket(e){var t=this;try{return{data:await Zt(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(n))return{data:null,error:n};throw n}}async listBuckets(e={}){var t=this;try{return{data:await Zt(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(n))return{data:null,error:n};throw n}}async deleteBucket(e){var t=this;try{return{data:await Zt(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kt(n))return{data:null,error:n};throw n}}},iI=class extends rI{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new sI(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)}},sI=class extends tI{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,he(he({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,he(he({},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 oI(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},oI=class extends nI{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,he(he({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,he(he({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,he(he({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,he(he({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,he(he({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},aI=class extends KL{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new qL(this.url,this.headers,e,this.fetch)}get vectors(){return new iI(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new ZL(this.url+"/iceberg",this.headers,this.fetch)}};const Wb="2.90.1",Rs=30*1e3,np=3,bh=np*Rs,lI="http://localhost:9999",uI="supabase.auth.token",cI={"X-Client-Info":`gotrue-js/${Wb}`},rp="X-Supabase-Api-Version",Gb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},dI=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,hI=10*60*1e3;
228class Ja extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function ue(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class fI extends Ja{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function pI(e){return ue(e)&&e.name==="AuthApiError"}class Ii extends Ja{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Ar extends Ja{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Wt extends Ar{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function mI(e){return ue(e)&&e.name==="AuthSessionMissingError"}class _s extends Ar{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class lu extends Ar{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class uu extends Ar{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 gI(e){return ue(e)&&e.name==="AuthImplicitGrantRedirectError"}class qy extends Ar{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 vI extends Ar{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 ip extends Ar{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Sh(e){return ue(e)&&e.name==="AuthRetryableFetchError"}class Ky extends Ar{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class sp extends Ar{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const cc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Zy=` 	
229\r=`.split(""),yI=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Zy.length;t+=1)e[Zy[t].charCodeAt(0)]=-2;for(let t=0;t<cc.length;t+=1)e[cc[t].charCodeAt(0)]=t;return e})();function Yy(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(cc[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(cc[r]),t.queuedBits-=6}}function qb(e,t,n){const r=yI[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 Jy(e){const t=[],n=l=>{t.push(String.fromCodePoint(l))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=l=>{xI(l,r,n)};for(let l=0;l<e.length;l+=1)qb(e.charCodeAt(l),s,o);return t.join("")}function _I(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 wI(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}_I(r,t)}}function xI(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 Xs(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)qb(e.charCodeAt(s),n,r);return new Uint8Array(t)}function bI(e){const t=[];return wI(e,n=>t.push(n)),new Uint8Array(t)}function zi(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>Yy(s,n,r)),Yy(null,n,r),t.join("")}function SI(e){return Math.round(Date.now()/1e3)+e}function EI(){return Symbol("auth-callback")}const mt=()=>typeof window<"u"&&typeof document<"u",Pi={tested:!1,writable:!1},Kb=()=>{if(!mt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Pi.tested)return Pi.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Pi.tested=!0,Pi.writable=!0}catch{Pi.tested=!0,Pi.writable=!1}return Pi.writable};function TI(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
229h((s,o)=>{t[o]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const Zb=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),kI=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",As=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Ri=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},pt=async(e,t)=>{await e.removeItem(t)};class Zc{constructor(){this.promise=new Zc.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Zc.promiseConstructor=Promise;function Eh(e){const t=e.split(".");if(t.length!==3)throw new sp("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!dI.test(t[r]))throw new sp("JWT not in base64url format");return{header:JSON.parse(Jy(t[0])),payload:JSON.parse(Jy(t[1])),signature:Xs(t[2]),raw:{header:t[0],payload:t[1]}}}async function CI(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function PI(e,t){return new Promise((r,s)=>{(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)){s(l);return}}})()})}function RI(e){return("0"+e.toString(16)).substr(-2)}function AI(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let o=0;o<56;o++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,RI).join("")}async function NI(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function OI(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 NI(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ws(e,t,n=!1){const r=AI();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await As(e,`${t}-code-verifier`,s);const o=await OI(r);return[o,r===o?"plain":"s256"]}const LI=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function II(e){const t=e.headers.get(rp);if(!t||!t.match(LI))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function MI(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 jI(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 DI=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function xs(e){if(!DI.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Th(){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 zI(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(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,s)}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,s)}})}function Qy(e){return JSON.parse(JSON.stringify(e))}const Oi=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),BI=[502,503,504];async function Xy(e){var t;if(!kI(e))throw new ip(Oi(e),0);if(BI.includes(e.status))throw new ip(Oi(e),e.status);let n;try{n=await e.json()}catch(o){throw new Ii(Oi(o),o)}let r;const s=II(e);if(s&&s.getTime()>=Gb["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 Ky(Oi(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Wt}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 Ky(Oi(n),e.status,n.weak_password.reasons);throw new fI(Oi(n),e.status||500,r)}const $I=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function de(e,t,n,r){var s;const o=Object.assign({},r==null?void 0:r.headers);
229o[rp]||(o[rp]=Gb["2024-01-01"].name),r!=null&&r.jwt&&(o.Authorization=`Bearer ${r.jwt}`);const l=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(l.redirect_to=r.redirectTo);const u=Object.keys(l).length?"?"+new URLSearchParams(l).toString():"",c=await FI(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(c):{data:Object.assign({},c),error:null}}async function FI(e,t,n,r,s,o){const l=$I(t,r,s,o);let u;try{u=await e(n,Object.assign({},l))}catch(c){throw console.error(c),new ip(Oi(c),0)}if(u.ok||await Xy(u),r!=null&&r.noResolveJson)return u;try{return await u.json()}catch(c){await Xy(c)}}function wn(e){var t;let n=null;VI(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=SI(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function e_(e){const t=wn(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 Kr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function UI(e){return{data:e,error:null}}function HI(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o}=e,l=Co(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),u={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o},c=Object.assign({},l);return{data:{properties:u,user:c},error:null}}function t_(e){return e}function VI(e){return e.access_token&&e.refresh_token&&e.expires_in}const kh=["global","local","others"];class WI{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=Zb(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=kh[0]){if(kh.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${kh.join(", ")}`);try{return await de(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ue(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await de(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Kr})}catch(r){if(ue(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Co(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await de(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:HI,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(ue(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await de(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Kr})}catch(n){if(ue(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,o,l,u,c;try{const h={nextPage:null,lastPage:0,total:0},p=await de(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=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:t_});if(p.error)throw p.error;const g=await p.json(),v=(l=p.headers.get("x-total-count"))!==null&&l!==void 0?l:0,_=(c=(u=p.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&c!==void 0?c:[];return _.length>0&&(_.forEach(k=>{const y=parseInt(k.split(";")[0].split("=")[1].substring(0,1)),T=JSON.parse(k.split(";")[1].split("=")[1]);h[`${T}Page`]=y}),h.total=parseInt(v)),{data:Object.assign(Object.assign({},g),h),error:null}}catch(h){if(ue(h))return{data:{users:[]},error:h};throw h}}async getUserById(t){xs(t);try{return await de(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Kr})}catch(n){if(ue(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){xs(t);try{return await de(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Kr})}catch(r){if(ue(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){xs(t);
229try{return await de(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Kr})}catch(r){if(ue(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){xs(t.userId);try{const{data:n,error:r}=await de(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(ue(n))return{data:null,error:n};throw n}}async _deleteFactor(t){xs(t.userId),xs(t.id);try{return{data:await de(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ue(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,o,l,u,c;try{const h={nextPage:null,lastPage:0,total:0},p=await de(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=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:t_});if(p.error)throw p.error;const g=await p.json(),v=(l=p.headers.get("x-total-count"))!==null&&l!==void 0?l:0,_=(c=(u=p.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&c!==void 0?c:[];return _.length>0&&(_.forEach(k=>{const y=parseInt(k.split(";")[0].split("=")[1].substring(0,1)),T=JSON.parse(k.split(";")[1].split("=")[1]);h[`${T}Page`]=y}),h.total=parseInt(v)),{data:Object.assign(Object.assign({},g),h),error:null}}catch(h){if(ue(h))return{data:{clients:[]},error:h};throw h}}async _createOAuthClient(t){try{return await de(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ue(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await de(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ue(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await de(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ue(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await de(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ue(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await de(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ue(n))return{data:null,error:n};throw n}}}function n_(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const bs={debug:!!(globalThis&&Kb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Yb extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class GI extends Yb{}async function qI(e,t,n){bs.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),bs.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){bs.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{bs.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw bs.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new GI(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(bs.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 KI(){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 Jb(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
229" is invalid.`);return e.toLowerCase()}function ZI(e){return parseInt(e,16)}function YI(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function JI(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:o=new Date,nonce:l,notBefore:u,requestId:c,resources:h,scheme:p,uri:g,version:v}=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(!g)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(v!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${v}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
230`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const _=Jb(e.address),k=p?`${p}://${r}`:r,y=e.statement?`${e.statement}
231`:"",T=`${k} wants you to sign in with your Ethereum account:
232${_}
233
234${y}`;let E=`URI: ${g}
235Version: ${v}
236Chain ID: ${n}${l?`
237Nonce: ${l}`:""}
238Issued At: ${o.toISOString()}`;if(s&&(E+=`
239Expiration Time: ${s.toISOString()}`),u&&(E+=`
240Not Before: ${u.toISOString()}`),c&&(E+=`
241Request ID: ${c}`),h){let S=`
242Resources:`;for(const x of h){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);S+=`
243- ${x}`}E+=S}return`${T}
244${E}`}class rt extends Error{constructor({message:t,code:n,cause:r,name:s}){var o;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(o=s??(r instanceof Error?r.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=n}}class dc extends rt{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function QI({error:e,options:t}){var n,r,s;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 rt({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 rt({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 rt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new rt({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 rt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new rt({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 rt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new rt({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(Qb(l)){if(o.rp.id!==l)return new rt({message:`The RP ID "${o.rp.id}
244" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new rt({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 rt({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 rt({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 rt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function XI({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 rt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new rt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(Qb(r)){if(n.rpId!==r)return new rt({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new rt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new rt({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 rt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class eM{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 tM=new eM;function nM(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,s=Co(e,["challenge","user","excludeCredentials"]),o=Xs(t).buffer,l=Object.assign(Object.assign({},n),{id:Xs(n.id).buffer}),u=Object.assign(Object.assign({},s),{challenge:o,user:l});if(r&&r.length>0){u.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const h=r[c];u.excludeCredentials[c]=Object.assign(Object.assign({},h),{id:Xs(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return u}function rM(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=Co(e,["challenge","allowCredentials"]),s=Xs(t).buffer,o=Object.assign(Object.assign({},r),{challenge:s});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:Xs(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return o}function iM(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:zi(new Uint8Array(e.response.attestationObject)),clientDataJSON:zi(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function sM(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:zi(new Uint8Array(s.authenticatorData)),clientDataJSON:zi(new Uint8Array(s.clientDataJSON)),signature:zi(new Uint8Array(s.signature)),userHandle:s.userHandle?zi(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Qb(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function r_(){var e,t;return!!(mt()&&"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 oM(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new dc("Browser returned unexpected credential type",t)}:{data:null,error:new dc("Empty credential response",t)}}
244catch(t){return{data:null,error:QI({error:t,options:e})}}}async function aM(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new dc("Browser returned unexpected credential type",t)}:{data:null,error:new dc("Empty credential response",t)}}catch(t){return{data:null,error:XI({error:t,options:e})}}}const lM={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},uM={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function hc(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const o in s){const l=s[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]=hc(u,l):r[o]=hc(l)}else r[o]=l}return r}function cM(e,t){return hc(lM,e,t||{})}function dM(e,t){return hc(uM,e,t||{})}class hM{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:s},o){try{const{data:l,error:u}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!l)return{data:null,error:u};const c=s??tM.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:h}=l.webauthn.credential_options.publicKey;h.name||(h.name=`${h.id}:${r}`),h.displayName||(h.displayName=h.name)}switch(l.webauthn.type){case"create":{const h=cM(l.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:p,error:g}=await oM({publicKey:h,signal:c});return p?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:p}},error:null}:{data:null,error:g}}case"request":{const h=dM(l.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:p,error:g}=await aM(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:h,signal:c}));return p?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:p}},error:null}:{data:null,error:g}}}}catch(l){return ue(l)?{data:null,error:l}:{data:null,error:new Ii("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:s}={}},o){if(!n)return{data:null,error:new Ja("rpId is required for WebAuthn authentication")};try{if(!r_())return{data:null,error:new Ii("Browser does not support WebAuthn",null)};const{data:l,error:u}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:o});if(!l)return{data:null,error:u};const{webauthn:c}=l;return this._verify({factorId:t,challengeId:l.challengeId,webauthn:{type:c.type,rpId:n,rpOrigins:r,credential_response:c.credential_response}})}catch(l){return ue(l)?{data:null,error:l}:{data:null,error:new Ii("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:s}={}},o){if(!n)return{data:null,error:new Ja("rpId is required for WebAuthn registration")};try{if(!r_())return{data:null,error:new Ii("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 g;return(g=p.data)===null||g===void 0?void 0:g.all.find(v=>v.factor_type==="webauthn"&&v.friendly_name===t&&v.status!=="unverified")}).then(p=>p?this.client.mfa.unenroll({factorId:p==null?void 0:p.id}):void 0),{data:null,error:u};const{data:c,error:h}=await this._challenge({factorId:l.id,friendlyName:l.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:o});return c?this._verify({factorId:l.id,challengeId:c.challengeId,webauthn:{rpId:n,rpOrigins:r,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:h}}catch(l){return ue(l)?{data:null,error:l}:{data:null,error:new Ii("Unexpected error in register",l)}}}}KI();const fM={url:lI,storageKey:uI,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:cI,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function i_(e,t,n){return await n()}const Ss={};class Qa{get jwks(){var t,n;return(n=(t=Ss[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Ss[this.storageKey]=Object.assign(Object.assign({},Ss[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Ss[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ss[this.storageKey]=Object.assign(Object.assign({},Ss[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},fM),t);
244if(this.storageKey=o.storageKey,this.instanceID=(n=Qa.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Qa.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&mt()){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 WI({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=Zb(o.fetch),this.lock=o.lock||i_,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&mt()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=qI:this.lock=i_,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 hM(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:Kb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=n_(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=n_(this.memoryStorage)),mt()&&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)}(s=this.broadcastChannel)===null||s===void 0||s.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} (${Wb}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(mt()&&(n=TI(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),mt()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:o}=await this._getSessionFromURL(n,r);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),gI(o)){const c=(t=o.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:l,redirectType:u}=s;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 ue(n)?this._returnResult({error:n}):this._returnResult({error:new Ii("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const o=await de(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:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:wn}),{data:l,error:u}=o;if(u||!l)return this._returnResult({data:{user:null,session:null},error:u});const c=l.session,h=l.user;return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:h,session:c},error:null})}catch(o){if(ue(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var n,r,s;try{let o;if("email"in t){const{email:p,password:g,options:v}=t;let _=null,k=null;this.flowType==="pkce"&&([_,k]=await ws(this.storage,this.storageKey)),o=await de(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:v==null?void 0:v.emailRedirectTo,body:{email:p,password:g,data:(n=v==null?void 0:v.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:v==null?void 0:v.captchaToken},code_challenge:_,code_challenge_method:k},xform:wn})}else if("phone"in t){const{phone:p,password:g,options:v}=t;o=await de(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:p,password:g,data:(r=v==null?void 0:v.data)!==null&&r!==void 0?r:{},channel:(s=v==null?void 0:v.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:v==null?void 0:v.captchaToken}},xform:wn})}else throw new lu("You must provide either an email or phone number and a password");const{data:l,error:u}=o;if(u||!l)return await pt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:u});const c=l.session,h=l.user;return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:h,session:c},error:null})}catch(o){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ue(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 de(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:e_})}else if("phone"in t){const{phone:o,password:l,options:u}=t;n=await de(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:e_})}else throw new lu("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const o=new _s;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:s})}catch(n){if(ue(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,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:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.o
244ptions)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,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,s,o,l,u,c,h,p,g,v;let _,k;if("message"in t)_=t.message,k=t.signature;else{const{chain:y,wallet:T,statement:E,options:S}=t;let x;if(mt())if(typeof T=="object")x=T;else{const D=window;if("ethereum"in D&&typeof D.ethereum=="object"&&"request"in D.ethereum&&typeof D.ethereum.request=="function")x=D.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 T!="object"||!(S!=null&&S.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=T}const P=new URL((n=S==null?void 0:S.url)!==null&&n!==void 0?n:window.location.href),R=await x.request({method:"eth_requestAccounts"}).then(D=>D).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!R||R.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const N=Jb(R[0]);let O=(r=S==null?void 0:S.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!O){const D=await x.request({method:"eth_chainId"});O=ZI(D)}const z={domain:P.host,address:N,statement:E,uri:P.href,version:"1",chainId:O,nonce:(s=S==null?void 0:S.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(l=(o=S==null?void 0:S.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&l!==void 0?l:new Date,expirationTime:(u=S==null?void 0:S.signInWithEthereum)===null||u===void 0?void 0:u.expirationTime,notBefore:(c=S==null?void 0:S.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(h=S==null?void 0:S.signInWithEthereum)===null||h===void 0?void 0:h.requestId,resources:(p=S==null?void 0:S.signInWithEthereum)===null||p===void 0?void 0:p.resources};_=JI(z),k=await x.request({method:"personal_sign",params:[YI(_),N]})}try{const{data:y,error:T}=await de(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:k},!((g=t.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(v=t.options)===null||v===void 0?void 0:v.captchaToken}}:null),xform:wn});if(T)throw T;if(!y||!y.session||!y.user){const E=new _s;return this._returnResult({data:{user:null,session:null},error:E})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:T})}catch(y){if(ue(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(t){var n,r,s,o,l,u,c,h,p,g,v,_;let k,y;if("message"in t)k=t.message,y=t.signature;else{const{chain:T,wallet:E,statement:S,options:x}=t;let P;if(mt())if(typeof E=="object")P=E;else{const N=window;if("solana"in N&&typeof N.solana=="object"&&("signIn"in N.solana&&typeof N.solana.signIn=="function"||"signMessage"in N.solana&&typeof N.solana.signMessage=="function"))P=N.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 E!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");P=E}const R=new URL((n=x==null?void 0:x.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in P&&P.signIn){const N=await P.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:R.host,uri:R.href}),S?{statement:S}:null));let O;if(Array.isArray(N)&&N[0]&&typeof N[0]=="object")O=N[0];else if(N&&typeof N=="object"&&"signedMessage"in N&&"signature"in N)O=N;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in O&&"signature"in O&&(typeof O.signedMessage=="string"||O.signedMessage instanceof Uint8Array)&&O.signature instanceof Uint8Array)k=typeof O.signedMessage=="string"?O.signedMessage:new TextDecoder().decode(O.signedMessage),y=O.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in P)||typeof P.signMessage!="function"||!("publicKey"in P)||typeof P!="object"||!P.publicKey||!("toBase58"in P.publicKey)||typeof P.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");k=[`${R.host} wants you to sign in with your Solana account:`,P.publicKey.toBase58(),...S?["",S,""]:[""],"Version: 1",`URI: ${R.href}`,`Issued At: ${(s=(r=x==null?void 0:x.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((u=x==null?void 0:x.signInWithSolana)===null||u===void 0)&&u.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((c=x==null?void 0:x.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((h=x==null?void 0:x.signInWithSolana)===null||h===void 0)&&h.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((g=(p=x==null?void 0:x.signInWithSolana)===null||p===void 0?void 0:p.resources)===null||g===void 0)&&g.length?["Resources",...x.signInWithSolana.resources.map(O=>`- ${O}`)]:[]].join(`
245`);const N=await P.signMessage(new TextEncoder().encode(k),"utf8");if(!N||!(N instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=N}}try{const{data:T,error:E}=await de(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:k,signature:zi(y)},!((v=t.options)===null||v===void 0)&&v.captchaToken?{gotrue_meta_security:{captcha_token:(_=t.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:wn});if(E)throw E;if(!T||!T.session||!T.user){const S=new _s;return this._returnResult({data:{user:null,session:null},error:S})}
245return T.session&&(await this._saveSession(T.session),await this._notifyAllSubscribers("SIGNED_IN",T.session)),this._returnResult({data:Object.assign({},T),error:E})}catch(T){if(ue(T))return this._returnResult({data:{user:null,session:null},error:T});throw T}}async _exchangeCodeForSession(t){const n=await Ri(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new vI;const{data:o,error:l}=await de(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:wn});if(await pt(this.storage,`${this.storageKey}-code-verifier`),l)throw l;if(!o||!o.session||!o.user){const u=new _s;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:s??null}),error:l})}catch(o){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ue(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:s,access_token:o,nonce:l}=t,u=await de(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:o,nonce:l,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:wn}),{data:c,error:h}=u;if(h)return this._returnResult({data:{user:null,session:null},error:h});if(!c||!c.session||!c.user){const p=new _s;return this._returnResult({data:{user:null,session:null},error:p})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:h})}catch(n){if(ue(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,o,l;try{if("email"in t){const{email:u,options:c}=t;let h=null,p=null;this.flowType==="pkce"&&([h,p]=await ws(this.storage,this.storageKey));const{error:g}=await de(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:u,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:h,code_challenge_method:p},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in t){const{phone:u,options:c}=t,{data:h,error:p}=await de(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:u,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(o=c==null?void 0:c.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(l=c==null?void 0:c.channel)!==null&&l!==void 0?l:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:h==null?void 0:h.message_id},error:p})}throw new lu("You must provide either an email or phone number.")}catch(u){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ue(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async verifyOtp(t){var n,r;try{let s,o;"options"in t&&(s=(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 de(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:wn});if(u)throw u;if(!l)throw new Error("An error occurred on token verification.");const c=l.session,h=l.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:h,session:c},error:null})}catch(s){if(ue(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,o,l;try{let u=null,c=null;this.flowType==="pkce"&&([u,c]=await ws(this.storage,this.storageKey));const h=await de(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}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:u,code_challenge_method:c}),headers:this.headers,xform:UI});return!((o=h.data)===null||o===void 0)&&o.url&&mt()&&!(!((l=t.options)===null||l===void 0)&&l.skipBrowserRedirect)&&window.location.assign(h.data.url),this._returnResult(h)}catch(u){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ue(u))return this._returnResult({data:null,error:u});throw u}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Wt;const{error:s}=await de(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(ue(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:s,options:o}=t,{error:l}=await de(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:l})}else if("phone"in t){const{phone:r,type:s,options:o}=t,{data:l,error:u}=await de(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,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 lu("You must provide either an email or phone number and a type")}catch(n){if(ue(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,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 s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(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 Ri(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
245id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<bh:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const l=await Ri(this.userStorage,this.storageKey+"-user");l!=null&&l.user?t.user=l.user:t.user=Th()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const l={value:this.suppressGetSessionWarning};t.user=zI(t.user,l),l.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:s},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(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await de(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Kr}):await this._useSession(async n=>{var r,s,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 Wt}:await de(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=l.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:Kr})})}catch(n){if(ue(n))return mI(n)&&(await this._removeSession(),await pt(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(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:o}=r;if(o)throw o;if(!s.session)throw new Wt;const l=s.session;let u=null,c=null;this.flowType==="pkce"&&t.email!=null&&([u,c]=await ws(this.storage,this.storageKey));const{data:h,error:p}=await de(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:c}),jwt:l.access_token,xform:Kr});if(p)throw p;return l.user=h.user,await this._saveSession(l),await this._notifyAllSubscribers("USER_UPDATED",l),this._returnResult({data:{user:l.user},error:null})})}catch(r){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ue(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Wt;const n=Date.now()/1e3;let r=n,s=!0,o=null;const{payload:l}=Eh(t.access_token);if(l.exp&&(r=l.exp,s=r<=n),s){const{data:u,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!u)return{data:{user:null,session:null},error:null};o=u}else{const{data:u,error:c}=await this._getUser(t.access_token);if(c)throw c;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(ue(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async 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 Wt;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(ue(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!mt())throw new uu("No browser detected.");
245if(t.error||t.error_description||t.error_code)throw new uu(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 qy("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new uu("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 qy("No code detected.");const{data:S,error:x}=await this._exchangeCodeForSession(t.code);if(x)throw x;const P=new URL(window.location.href);return P.searchParams.delete("code"),window.history.replaceState(window.history.state,"",P.toString()),{data:{session:S.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:o,refresh_token:l,expires_in:u,expires_at:c,token_type:h}=t;if(!o||!u||!l||!h)throw new uu("No session defined in URL");const p=Math.round(Date.now()/1e3),g=parseInt(u);let v=p+g;c&&(v=parseInt(c));const _=v-p;_*1e3<=Rs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${_}s, should have been closer to ${g}s`);const k=v-g;p-k>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",k,v,p):p-k<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",k,v,p);const{data:y,error:T}=await this._getUser(o);if(T)throw T;const E={provider_token:r,provider_refresh_token:s,access_token:o,expires_in:g,expires_at:v,refresh_token:l,token_type:h,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:E,redirectType:t.type},error:null})}catch(r){if(ue(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 Ri(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:o}=n;if(o)return this._returnResult({error:o});const l=(r=s.session)===null||r===void 0?void 0:r.access_token;if(l){const{error:u}=await this.admin.signOut(l,t);if(u&&!(pI(u)&&(u.status===404||u.status===401||u.status===403)))return this._returnResult({error:u})}return t!=="others"&&(await this._removeSession(),await pt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=EI(),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(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;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((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await ws(this.storage,this.storageKey,!0));try{return await de(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ue(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(ue(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:s}=await this._useSession(async o=>{var l,u,c,h,p;const{data:g,error:v}=o;if(v)throw v;const _=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:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await de(this.fetch,"GET",_,{headers:this.headers,jwt:(p=(h=g.session)===null||h===void 0?void 0:h.access_token)!==null&&p!==void 0?p:void 0})});if(s)throw s;return mt()&&!(!((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(ue(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:s,data:{session:o}}=n;if(s)throw s;const{options:l,provider:u,token:c,access_token:h,nonce:p}=t,g=await de(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:c,access_token:h,nonce:p,link_identity:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:wn}),{data:v,error:_}=g;return _?this._returnResult({data:{user:null,session:null},error:_}):!v||!v.session||!v.user?this._returnResult({data:{user:null,session:null},error:new _s}):(v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("USER_UPDATED",v.session)),this._returnResult({data:v,error:_}))}catch(s){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ue(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:o,error:l}=n;if(l)throw l;
245return await de(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(ue(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 PI(async s=>(s>0&&await CI(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await de(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:wn})),(s,o)=>{const l=200*Math.pow(2,s);return o&&Sh(o)&&Date.now()+l-r<Rs})}catch(r){if(this._debug(n,"error",r),ue(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),mt()&&!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 s=await Ri(this.storage,this.storageKey);if(s&&this.userStorage){let l=await Ri(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!l&&(l={user:s.user},await As(this.userStorage,this.storageKey+"-user",l)),s.user=(t=l==null?void 0:l.user)!==null&&t!==void 0?t:Th()}else if(s&&!s.user&&!s.user){const l=await Ri(this.storage,this.storageKey+"-user");l&&(l!=null&&l.user)?(s.user=l.user,await pt(this.storage,this.storageKey+"-user"),await As(this.storage,this.storageKey,s)):s.user=Th()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const o=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<bh;if(this._debug(r,`session has${o?"":" not"} expired with margin of ${bh}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:l}=await this._callRefreshToken(s.refresh_token);l&&(console.error(l),Sh(l)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",l),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:l,error:u}=await this._getUser(s.access_token);!u&&(l!=null&&l.user)?(s.user=l.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):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",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Wt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Zc;const{data:o,error:l}=await this._refreshAccessToken(t);if(l)throw l;if(!o.session)throw new Wt;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(s,"error",o),ue(o)){const l={data:null,error:o};return Sh(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(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"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(c){o.push(c)}});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(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await pt(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 As(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const o=Qy(s);await As(this.storage,this.storageKey,o)}else{const s=Qy(n);await As(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await pt(this.storage,this.storageKey),await pt(this.storage,this.storageKey+"-code-verifier"),await pt(this.storage,this.storageKey+"-user"),this.userStorage&&await pt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&mt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
245catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Rs);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const 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 s=Math.floor((r.expires_at*1e3-t)/Rs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Rs}ms, refresh threshold is ${np} ticks`),s<=np&&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 Yb)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!mt()||!(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(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[o,l]=await ws(this.storage,this.storageKey),u=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(l)}`});s.push(u.toString())}if(r!=null&&r.queryParams){const o=new URLSearchParams(r.queryParams);s.push(o.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?this._returnResult({data:null,error:o}):await de(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ue(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;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:c,error:h}=await de(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 h?this._returnResult({data:null,error:h}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(n){if(ue(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;
245if(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"?iM(t.webauthn.credential_response):sM(t.webauthn.credential_response)})}:{code:t.code}),{data:u,error:c}=await de(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:l,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(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:c}))})}catch(n){if(ue(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;if(o)return this._returnResult({data:null,error:o});const l=await de(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.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:nM(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:rM(u.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(ue(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 s={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var t,n;const{data:{session:r},error:s}
245=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=Eh(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 h=o.amr||[];return{data:{currentLevel:l,nextLevel:u,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await de(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 Wt})})}catch(n){if(ue(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new Wt});const l=await de(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:u=>({data:u,error:null})});return l.data&&l.data.redirect_url&&mt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(l.data.redirect_url),l})}catch(r){if(ue(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new Wt});const l=await de(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:u=>({data:u,error:null})});return l.data&&l.data.redirect_url&&mt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(l.data.redirect_url),l})}catch(r){if(ue(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 de(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Wt})})}catch(t){if(ue(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:s}=n;return s?this._returnResult({data:null,error:s}):r?(await de(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 Wt})})}catch(n){if(ue(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 s=Date.now();if(r=this.jwks.keys.find(u=>u.kid===t),r&&this.jwks_cached_at+hI>s)return r;const{data:o,error:l}=await de(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=s,r=o.keys.find(u=>u.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:_,error:k}
245=await this.getSession();if(k||!_.session)return this._returnResult({data:null,error:k});r=_.session.access_token}const{header:s,payload:o,signature:l,raw:{header:u,payload:c}}=Eh(r);n!=null&&n.allowExpired||MI(o.exp);const h=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!h){const{error:_}=await this.getUser(r);if(_)throw _;return{data:{claims:o,header:s,signature:l},error:null}}const p=jI(s.alg),g=await crypto.subtle.importKey("jwk",h,p,!0,["verify"]);if(!await crypto.subtle.verify(p,g,l,bI(`${u}.${c}`)))throw new sp("Invalid JWT signature");return{data:{claims:o,header:s,signature:l},error:null}}catch(r){if(ue(r))return this._returnResult({data:null,error:r});throw r}}}Qa.nextInstanceID={};const pM=Qa,mM="2.90.1";let oa="";typeof Deno<"u"?oa="deno":typeof document<"u"?oa="web":typeof navigator<"u"&&navigator.product==="ReactNative"?oa="react-native":oa="node";const gM={"X-Client-Info":`supabase-js-${oa}/${mM}`},vM={headers:gM},yM={schema:"public"},_M={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},wM={};function Xa(e){"@babel/helpers - typeof";return Xa=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},Xa(e)}function xM(e,t){if(Xa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bM(e){var t=xM(e,"string");return Xa(t)=="symbol"?t:t+""}function SM(e,t,n){return(t=bM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s_(Object(n),!0).forEach(function(r){SM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const EM=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),TM=()=>Headers,kM=(e,t,n)=>{const r=EM(n),s=TM();return async(o,l)=>{var u;const c=(u=await t())!==null&&u!==void 0?u:e;let h=new s(l==null?void 0:l.headers);return h.has("apikey")||h.set("apikey",e),h.has("Authorization")||h.set("Authorization",`Bearer ${c}`),r(o,Ye(Ye({},l),{},{headers:h}))}};function CM(e){return e.endsWith("/")?e:e+"/"}function PM(e,t){var n,r;const{db:s,auth:o,realtime:l,global:u}=e,{db:c,auth:h,realtime:p,global:g}=t,v={db:Ye(Ye({},c),s),auth:Ye(Ye({},h),o),realtime:Ye(Ye({},p),l),storage:{},global:Ye(Ye(Ye({},g),u),{},{headers:Ye(Ye({},(n=g==null?void 0:g.headers)!==null&&n!==void 0?n:{}),(r=u==null?void 0:u.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?v.accessToken=e.accessToken:delete v.accessToken,v}function RM(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(CM(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var AM=class extends pM{constructor(e){super(e)}},NM=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const o=RM(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:yM,realtime:wM,auth:Ye(Ye({},_M),{},{storageKey:l}),global:vM},c=PM(n??{},u);if(this.storageKey=(r=c.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(p,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var h;this.auth=this._initSupabaseAuthClient((h=c.auth)!==null&&h!==void 0?h:{},this.headers,c.global.fetch)}this.fetch=kM(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Ye({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.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 cL(new URL("rest/v1",o).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new aI(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new sL(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)}
245channel(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:s,storageKey:o,flowType:l,lock:u,debug:c,throwOnError:h},p,g){const v={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new AM({url:this.authUrl.href,headers:Ye(Ye({},v),p),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:l,lock:u,debug:c,throwOnError:h,fetch:g,hasCustomAuthorizationHeader:Object.keys(this.headers).some(_=>_.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new CL(this.realtimeUrl.href,Ye(Ye({},e),{},{params:Ye(Ye({},{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 OM=(e,t,n)=>new NM(e,t,n);function LM(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}LM()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const IM="https://muwkstvicxaqydxgxczm.supabase.co",MM="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im11d2tzdHZpY3hhcXlkeGd4Y3ptIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njg1MDA5NzksImV4cCI6MjA4NDA3Njk3OX0.0ZBcWiqSlFczLKbHBwhLVnSbU_2oyQ6gjAT7_zZSsHQ",Es=OM(I
245M,MM,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),Ch=[{id:"e5-oberstdorf-meran",name:"E5 Oberstdorf – Meran",activityType:"Hike",countries:["Germany","Austria","Italy"],start:"Oberstdorf, Germany",finish:"Meran, Italy",startCoordinates:{lat:47.4119,lng:10.2768},finishCoordinates:{lat:46.6713,lng:11.1549},minDays:5,maxDays:8,typicalDays:6,distance:100,elevationGain:5500,difficulty:"Moderate",bestSeasonMonths:[6,7,8,9],sleepingStyles:["Hut-to-hut","Hotels"],supportStyles:["Guided","Self-guided","Both"],languages:["German","English","Italian"],priceTier:"€€",priceMin:800,priceMax:1800,description:"The most famous Alpenüberquerung route, crossing from the Allgäu Alps through the Ötztal to South Tyrol. A perfect introduction to Alpine crossing with excellent infrastructure.",highlights:["Kemptner Hütte","Memminger Hütte","Similaun views","Finish in Meran"],itinerary:["Day 1: Oberstdorf to Kemptner Hütte","Day 2: Kemptner Hütte to Memminger Hütte"],popularity:98,providerCount:18,isVerified:!0},{id:"traumpfad-muenchen-venedig",name:"Traumpfad München – Venedig",activityType:"Hike",countries:["Germany","Austria","Italy"],start:"Munich, Germany",finish:"Venice, Italy",startCoordinates:{lat:48.1351,lng:11.582},finishCoordinates:{lat:45.4408,lng:12.3155},minDays:25,maxDays:35,typicalDays:28,distance:550,elevationGain:2e4,difficulty:"Hard",bestSeasonMonths:[6,7,8,9],sleepingStyles:["Hut-to-hut","Hotels","Mixed"],supportStyles:["Self-guided","Guided"],languages:["German","English","Italian"],priceTier:"€€€",priceMin:2500,priceMax:5e3,description:'The legendary "Dream Trail" from Munich to Venice, crossing the entire Eastern Alps. An epic multi-week adventure through Bavaria, Tyrol, and the Dolomites.',highlights:["Karwendel Mountains","Zillertal Alps","Dolomites crossing","Arrival at St. Mark's Square"],itinerary:["Day 1: Munich to Wolfratshausen","Day 2: Wolfratshausen to Bad Tölz"],popularity:95,providerCount:12,isVerified:!0},{id:"alpenueberquerung-tegernsee-sterzing",name:"Alpenüberquerung Tegernsee – Sterzing",activityType:"Hike",countries:["Germany","Austria","Italy"],start:"Tegernsee, Germany",finish:"Sterzing, Italy",startCoordinates:{lat:47.7125,lng:11.7578},finishCoordinates:{lat:46.8963,lng:11.4333},minDays:6,maxDays:9,typicalDays:7,distance:120,elevationGain:6500,difficulty:"Moderate",bestSeasonMonths:[6,7,8,9],sleepingStyles:["Hut-to-hut","Hotels"],supportStyles:["Both"],languages:["German","English","Italian"],priceTier:"€€",priceMin:900,priceMax:1900,description:"A beautiful alternative Alpenüberquerung from Bavaria to South Tyrol. Well-marked trails with excellent hut infrastructure.",highlights:["Tegernsee views","Achensee","Brenner crossing","Sterzing/Vipiteno"],itinerary:["Day 1: Tegernsee to Achenkirch"],popularity:88,providerCount:9,isVerified:!0},{id:"transalp-garmisch-riva",name:"Transalp Garmisch – Riva (MTB)",activityType:"Bike",countries:["Germany","Austria","Italy"],start:"Garmisch-Partenkirchen, Germany",finish:"Riva del Garda, Italy",startCoordinates:{lat:47.4916,lng:11.0958},finishCoordinates:{lat:45.8858,lng:10.8429},minDays:5,maxDays:8,typicalDays:7,distance:350,elevationGain:8e3,difficulty:"Hard",bestSeasonMonths:[6,7,8,9],sleepingStyles:["Hotels","Mixed"],supportStyles:["Guided","Self-guided","Both"],languages:["German","English","Italian"],priceTier:"€€",priceMin:900,priceMax:1800,description:"The classic MTB Transalp route from Garmisch to Lake Garda. A legendary mountain bike crossing with challenging trails and breathtaking Alpine scener
245y.",highlights:["Zugspitze views","Inn Valley","Reschenpass","Lake Garda finale"],itinerary:["Day 1: Garmisch to Innsbruck","Day 2: Innsbruck to Brenner"],popularity:94,providerCount:14,isVerified:!0},{id:"albrecht-route",name:"Albrecht-Route (MTB)",activityType:"Bike",countries:["Germany","Austria","Italy"],start:"Garmisch-Partenkirchen, Germany",finish:"Riva del Garda, Italy",startCoordinates:{lat:47.4916,lng:11.0958},finishCoordinates:{lat:45.8858,lng:10.8429},minDays:6,maxDays:9,typicalDays:7,distance:400,elevationGain:9500,difficulty:"Expert",bestSeasonMonths:[7,8,9],sleepingStyles:["Hotels","Hut-to-hut"],supportStyles:["Self-guided","Guided"],languages:["German","English"],priceTier:"€€",priceMin:800,priceMax:1600,description:"Created by mountain bike legend Andreas Albrecht, this challenging route offers maximum singletrack content and technical terrain across the Alps.",highlights:["Technical singletrails","Pfunderer Joch","Dolomite views","Expert terrain"],itinerary:["Day 1: Garmisch to Inntal","Day 2: Inntal to Brenner area"],popularity:89,providerCount:7,isVerified:!0},{id:"via-claudia-augusta",name:"Via Claudia Augusta (Touring)",activityType:"Bike",countries:["Germany","Austria","Italy"],start:"Donauwörth, Germany",finish:"Venice, Italy",startCoordinates:{lat:48.718,lng:10.7795},finishCoordinates:{lat:45.4408,lng:12.3155},minDays:8,maxDays:14,typicalDays:10,distance:700,elevationGain:4500,difficulty:"Easy",bestSeasonMonths:[5,6,7,8,9,10],sleepingStyles:["Hotels"],supportStyles:["Self-guided","Both"],languages:["German","English","Italian"],priceTier:"€€",priceMin:1e3,priceMax:2200,description:"Following the ancient Roman road, this touring bike route offers a gentle Alpine crossing on mostly paved and gravel paths. Perfect for E-bikes and families.",highlights:["Roman history","Reschensee","Vinschgau Valley","Venice finale"],itinerary:["Day 1: Donauwörth to Augsburg","Day 2: Augsburg to Landsberg"],popularity:91,providerCount:11,isVerified:!0},{id:"transalp-muenchen-gardasee",name:"Transalp München – Gardasee (E-Bike)",activityType:"Bike",countries:["Germany","Austria","Italy"],start:"Munich, Germany",finish:"Riva del Garda, Italy",startCoordinates:{lat:48.1351,lng:11.582},finishCoordinates:{lat:45.8858,lng:10.8429},minDays:6,maxDays:10,typicalDays:8,distance:450,elevationGain:6500,difficulty:"Moderate",bestSeasonMonths:[5,6,7,8,9],sleepingStyles:["Hotels"],supportStyles:["Guided","Self-guided","Both"],languages:["German","English","Italian"],priceTier:"€€€",priceMin:1200,priceMax:2400,description:"The perfect E-bike Alpine crossing from Bavaria to Lake Garda. Well-supported with luggage transfer and comfortable hotels throughout.",highlights:["Isar Valley","Brenner Pass","South Tyrol wine country","Lake Garda arrival"],itinerary:["Day 1: Munich to Bad Tölz","Day 2: Bad Tölz to Innsbruck"],popularity:87,providerCount:8,isVerified:!0},{id:"brenner-radweg",name:"Brenner Radweg (Touring)",activityType:"Bike",countries:["Austria","Italy"],start:"Innsbruck, Austria",finish:"Bozen, Italy",startCoordinates:{lat:47.2692,lng:11.4041},finishCoordinates:{lat:46.4983,lng:11.3548},minDays:2,maxDays:4,typicalDays:3,distance:110,elevationGain:1200,difficulty:"Easy",bestSeasonMonths:[4,5,6,7,8,9,10],sleepingStyles:["Hotels"],supportStyles:["Self-guided"],languages:["German","English","Italian"],priceTier:"€",priceMin:300,priceMax:600,description:"A gentle family-friendly bike route crossing the Brenner Pass on dedicated cycle paths. Mostly downhill from the pass with stunning Tyrolean scenery.",highlights:["Brenner Pass crossing","Eisack Valley","Sterzing medieval town","Wine country finish"],itinerary:["Day 1: Innsbruck to Brenner","Day 2: Brenner to Sterzing","Day 3: Sterzing to Bozen"],popularity:85,providerCount:6,isVerified:!0},{id:"walkers-haute-route",name:"Walker's Haute Route",activityType:"Hike",countries:["France","Switzerland"],start:"Chamonix, France",finish:"Zermatt, Switzerland",minDays:12,maxDays:16,typicalDays:14,distance:200,elevationGain:13e3,difficulty:"Hard",bestSeasonMonths:[7,8,9],sleepingStyles:["Hut-to-hut","Hotels"],supportStyles:["Self-guided","Guided"],languages:["English","French","German"],priceTier:"€€€",priceMin:2e3,priceMax:3500,description:"The hiking version of the classic Haute Route, avoiding glaciers while maintaining spectacular views of the Pennine Alps.",highlights:["Arolla Valley","Cabane de Prafleuri","Europaweg","Matterhorn finale"],itinerary:["Day 1: Chamonix to Trient"],popularity:89,providerCount:6,isVerified:!0},{id:"tour-du-mont-blanc",name:"Tour du Mont Blanc",activityType:"Hike",countries:["France","Italy","Switzerland"],start:"Chamonix, France",finish:"Chamonix, France",startCoordinates:{lat:45.9237,lng:6.8694},finishCoordinates:{lat:45.9237,lng:6.8694},minDays:7,maxDays:11,typicalDays:9,distance:170,elevationGain:1e4,difficulty:"Moderate",bestSeasonMonths:[6,7,8,9],sleepingStyles:["Hut-to-hut","Hotels","Camping"],supportStyles:["Both"],languages:["English","French","German","Italian"],priceTier:"€€€",priceMin:1200,priceMax:2500,description:"The iconic circuit around Mont Blanc, passing through three countries with stunning glacier views and charming alpine villages.",highlights:["Views of Mont Blanc massif","Three country crossing","Famous alpine huts","Courmayeur Italian cuisine"],itinerary:["Day 1: Chamonix to Les Contamines via Col de Voza"],popularity:97,providerCount:15,isVerified:!0},{id:"haute-route",name:"Haute Route (Chamonix – Zermatt)",activityType:"Hike",countries:["France","Switzerland"],start:"Chamonix, France",finish:"Zermatt, Switzerland",startCoordinates:{lat:45.9237,lng:6.8694},finishCoordinates:{lat:46.0207,lng:7.7491},minDays:10,maxDays:14,typicalDays:12,distance:180,elevationGain:12e3,difficulty:"Hard",bestSeasonMonths:[7,8,9],sleepingStyles:["Hut-to-hut"],supportStyles:["Guided","Self-guided"],languages:["English","French","German"],priceTier:"€€€€",priceMin:2500,priceMax:4e3,description:"The ultimate alpine traverse connecting two iconic mountain towns, crossing high passes with views of 4000m peaks.",highlights:["Matterhorn views","High alpine terrain","Historic mountain huts"],itinerary:["Day 1: Chamonix to Argentière"],popularity:94,providerCount:9,isVerified:!0}
245,{id:"dolomites-alta-via-1",name:"Alta Via 1 (Dolomites)",activityType:"Hike",countries:["Italy"],start:"Lago di Braies, Italy",finish:"Belluno, Italy",startCoordinates:{lat:46.6942,lng:12.0853},finishCoordinates:{lat:46.1426,lng:12.2174},minDays:8,maxDays:12,typicalDays:10,distance:120,elevationGain:6500,difficulty:"Moderate",bestSeasonMonths:[6,7,8,9],sleepingStyles:["Hut-to-hut"],supportStyles:["Both"],languages:["English","German","Italian"],priceTier:"€€",priceMin:800,priceMax:1500,description:"The classic Dolomite high route through UNESCO World Heritage peaks. Dramatic rock towers and excellent rifugio cuisine.",highlights:["Dramatic Dolomite towers","Excellent rifugio food","Via ferrata options","Lagazuoi"],itinerary:["Day 1: Lago di Braies to Rifugio Biella"],popularity:92,providerCount:10,isVerified:!0},{id:"berliner-hoehenweg",name:"Berliner Höhenweg",activityType:"Hike",countries:["Austria"],start:"Finkenberg, Austria",finish:"Finkenberg, Austria",startCoordinates:{lat:47.1559,lng:11.8214},finishCoordinates:{lat:47.1559,lng:11.8214},minDays:6,maxDays:9,typicalDays:8,distance:85,elevationGain:6500,difficulty:"Hard",bestSeasonMonths:[7,8,9],sleepingStyles:["Hut-to-hut"],supportStyles:["Self-guided","Guided"],languages:["German","English"],priceTier:"€€",priceMin:700,priceMax:1400,description:"A spectacular circular route through the Zillertal Alps, connecting historic DAV huts with stunning glacier views.",highlights:["Berliner Hütte (historic)","Glacier views","Schönbichler Horn","Zillertal atmosphere"],itinerary:["Day 1: Finkenberg to Gamshütte"],popularity:87,providerCount:5,isVerified:!0},{id:"lechweg",name:"Lechweg",activityType:"Hike",countries:["Austria","Germany"],start:"Lech am Arlberg, Austria",finish:"Füssen, Germany",startCoordinates:{lat:47.2097,lng:10.1418},finishCoordinates:{lat:47.5695,lng:10.7001},minDays:5,maxDays:8,typicalDays:7,distance:125,elevationGain:3500,difficulty:"Easy",bestSeasonMonths:[5,6,7,8,9,10],sleepingStyles:["Hotels"],supportStyles:["Self-guided","Both"],languages:["German","English"],priceTier:"€€",priceMin:800,priceMax:1600,description:"Follow the wild Lech River from its source to Füssen. A gentler long-distance trail with hotel accommodation and luggage transfer options.",highlights:["Last wild Alpine river","Neuschwanstein Castle finale","Comfortable hotels","Family-friendly"],itinerary:["Day 1: Lech to Warth"],popularity:84,providerCount:7,isVerified:!0},{id:"meraner-hoehenweg",name:"Meraner Höhenweg",activityType:"Hike",countries:["Italy"],start:"Meran, Italy",finish:"Meran, Italy",startCoordinates:{lat:46.6713,lng:11.1549},finishCoordinates:{lat:46.6713,lng:11.1549},minDays:5,maxDays:8,typicalDays:6,distance:100,elevationGain:5e3,difficulty:"Moderate",bestSeasonMonths:[5,6,7,8,9,10],sleepingStyles:["Hut-to-hut","Hotels"],supportStyles:["Self-guided","Both"],languages:["German","Italian","English"],priceTier:"€€",priceMin:700,priceMax:1400,description:"A spectacular circular route around the Texelgruppe nature park, combining South Tyrolean culture with Alpine scener
245y.",highlights:["Texelgruppe views","Traditional Gasthöfe","Apple orchards","Meran spa town"],itinerary:["Day 1: Meran to Pfelders"],popularity:88,providerCount:8,isVerified:!0},{id:"spitzingsee-sterzing",name:"Spitzingsee – Sterzing (Bergzeit Route)",activityType:"Hike",countries:["Germany","Austria","Italy"],start:"Spitzingsee, Germany",finish:"Sterzing, Italy",startCoordinates:{lat:47.6656,lng:11.8856},finishCoordinates:{lat:46.8963,lng:11.4333},minDays:5,maxDays:7,typicalDays:6,distance:91,elevationGain:2750,difficulty:"Easy",bestSeasonMonths:[6,7,8,9],sleepingStyles:["Hotels"],supportStyles:["Self-guided","Guided"],languages:["German","English"],priceTier:"€€",priceMin:700,priceMax:1400,description:"The newest Alpenüberquerung route (2022), designed by Bergzeit as a beginner-friendly alternative with hotel accommodation and luggage transfer throughout.",highlights:["Beginner-friendly","Hotel comfort","Achensee views","Luggage transfer included"],itinerary:["Day 1: Spitzingsee to Bayrischzell","Day 2: Bayrischzell to Thiersee"],popularity:82,providerCount:4,isVerified:!0},{id:"garmisch-sterzing",name:"Garmisch – Sterzing",activityType:"Hike",countries:["Germany","Austria","Italy"],start:"Garmisch-Partenkirchen, Germany",finish:"Sterzing, Italy",startCoordinates:{lat:47.4916,lng:11.0958},finishCoordinates:{lat:46.8963,lng:11.4333},minDays:6,maxDays:8,typicalDays:7,distance:90,elevationGain:4040,difficulty:"Easy",bestSeasonMonths:[6,7,8,9],sleepingStyles:["Hotels"],supportStyles:["Self-guided","Guided"],languages:["German","English"],priceTier:"€€",priceMin:800,priceMax:1600,description:"A comfortable hotel-based Alpine crossing from Garmisch to South Tyrol. Perfect for those seeking the Alpenüberquerung experience with daily comforts.",highlights:["Zugspitze views","Inn Valley crossing","Comfortable hotels","Sterzing medieval town"],itinerary:["Day 1: Garmisch to Inntal","Day 2: Inntal to Stubaital"],popularity:80,providerCount:6,isVerified:!0},{id:"garmisch-brixen",name:"Garmisch – Brixen (Tour der Höhepunkte)",activityType:"Hike",countries:["Germany","Austria","Italy"],start:"Garmisch-Partenkirchen, Germany",finish:"Brixen, Italy",startCoordinates:{lat:47.4916,lng:11.0958},finishCoordinates:{lat:46.7153,lng:11.6563},minDays:10,maxDays:14,typicalDays:12,distance:176,elevationGain:11300,difficulty:"Hard",bestSeasonMonths:[7,8,9],sleepingStyles:["Hut-to-hut"],supportStyles:["Self-guided","Guided"],languages:["German","English"],priceTier:"€€€",priceMin:1200,priceMax:2400,description:'The "Tour of Highlights" - a challenging Alpenüberquerung through the most scenic parts of the Northern Limestone Alps and Stubai Alps to the Eisack Valley.',highlights:["Wetterstein views","Stubai Glacier","Pfunderer Höhenweg","Brixen finale"],itinerary:["Day 1: Garmisch to Scharnitz","Day 2: Scharnitz to Karwendelhaus"],popularity:78,providerCount:5,isVerified:!0},{id:"salzburg-triest",name:"Salzburg – Triest",activityType:"Hike",countries:["Austria","Slovenia","Italy"],start:"Salzburg, Austria",finish:"Trieste, Italy",startCoordinates:{lat:47.8095,lng:13.055},finishCoordinates:{lat:45.6495,lng:13.7768},minDays:25,maxDays:32,typicalDays:28,distance:501,elevationGain:25350,difficulty:"Hard",bestSeasonMonths:[6,7,8,9],sleepingStyles:["Hut-to-hut","Mixed"],supportStyles:["Self-guided"],languages:["German","English","Slovenian","Italian"],priceTier:"€€",priceMin:1800,priceMax:3500,description:"Epic trans-Alpine crossing from Mozart's city to the Adriatic Sea. Remote and wild route through the Eastern Alps, Karawanken, and Julian Alps.",highlights:["Eastern Alps wilderness","Slovenian mountains","Julian Alps","Adriatic Sea finale"],itinerary:["Day 1: Salzburg to Golling","Day 2: Golling to Dachstein area"],popularity:75,providerCount:3,isVerified:!0},{id:"via-alpina-roter-weg",name:"Via Alpina (Roter Weg)",activityType:"Hike",countries:["Germany","Austria","Switzerland","Italy","France","Slovenia","Liechtenstein"],start:"Trieste, Italy",finish:"Monaco",startCoordinates:{lat:45.6495,lng:13.7768},finishCoordinates:{lat:43.7384,lng:7.4246},minDays:40,maxDays:60,typicalDays:50,distance:2500,elevationGain:15e4,difficulty:"Expert",bestSeasonMonths:[6,7,8,9],sleepingStyles:["Hut-to-hut","Mixed"],supportStyles:["Self-guided"],languages:["German","English","French","Italian","Slovenian"],priceTier:"€€€€",priceMin:5e3,priceMax:12e3,description:"The ultimate Alpine challenge: 161 stages across the entire Alpine arc through 8 countries. Most hikers tackle sections over multiple years.",highlights:["8 countries","161 stages","Ultimate challenge","Complete Alpine arc"],itinerary:["Stage 1: Trieste to Muggia","Stage 2: Muggia to Monte Cocusso"],popularity:70,providerCount:2,isVerified:!0}],Ph=[{id:"dav-summit-club",companyName:"DAV Summit Club",website:"https://www.dav-summit-club.de",description:"The travel arm of the German Alpine Club (DAV). The most trusted name in German-speaking Alpine touring with 50+ years experience. Non-profit organization focused on quality mountain experiences.",supportStyles:["Guided"],languages:["German","English"],sleepingStyles:["Hut-to-hut","Hotels"],priceTier:"€€",priceMin:700,priceMax:2200,routesOffered:["E5 Oberstdorf-Meran","Traumpfad München-Venedig","Berliner Höhenweg","Haute Route","Tour du Mont Blanc"],routeCount:5,popularity:98,specialties:["DAV certified guides","Non-profit","Mountain expertise","Alpine Club heritage"],headquarters:"Germany",isCurated:!0},{id:"wikinger-reisen",companyName:"Wikinger Reisen",website:"https://www.wikinger-reisen.de",description:"Major German hiking tour operator since 1969. One of the largest providers of guided and self-guided walking holidays in Europe with extensive Alpenüberquerung portfolio.",supportStyles:["Guided","Self-guided"],languages:["German","English"],sleepingStyles:["Hotels","Hut-to-hut","Mixed"],priceTier:"€€",priceMin:800,priceMax:2e3,routesOffered:["E5 Oberstdorf-Meran","Alpe
245nüberquerung Tegernsee-Sterzing","Tour du Mont Blanc","Lechweg"],routeCount:4,popularity:95,specialties:["55+ years experience","Small groups","Sustainability focus","Wide selection"],headquarters:"Germany",isCurated:!0},{id:"hauser-exkursionen",companyName:"Hauser Exkursionen",website:"https://www.hauser-exkursionen.de",description:"Munich-based adventure travel specialist with strong Alpine expertise. Known for responsible tourism and high-quality guided tours.",supportStyles:["Guided"],languages:["German","English"],sleepingStyles:["Hut-to-hut","Hotels"],priceTier:"€€€",priceMin:1e3,priceMax:2500,routesOffered:["E5 Oberstdorf-Meran","Haute Route","Tour du Mont Blanc","Traumpfad München-Venedig"],routeCount:4,popularity:90,specialties:["Responsible tourism","Expert guides","Premium service"],headquarters:"Germany",isCurated:!0},{id:"bergschule-oberstdorf",companyName:"Bergschule Oberstdorf",website:"https://www.bergschule-oberstdorf.de",description:"Local Allgäu mountain school and the undisputed E5 specialist. Based right at the start of the E5 route with decades of local expertise.",supportStyles:["Guided"],languages:["German","English"],sleepingStyles:["Hut-to-hut"],priceTier:"€€",priceMin:800,priceMax:1500,routesOffered:["E5 Oberstdorf-Meran","Alpenüberquerung Tegernsee-Sterzing","Berliner Höhenweg"],routeCount:3,popularity:92,specialties:["E5 specialists","Local expertise","Certified mountain guides","Hut reservations"],headquarters:"Germany",isCurated:!0},{id:"alpinschule-oberstdorf",companyName:"Alpinschule Oberstdorf",website:"https://www.alpinschule-oberstdorf.de",description:"Premier mountain school in Oberstdorf offering professional E5 guiding and Alpine skills courses. Strong local partnerships with mountain huts.",supportStyles:["Guided"],languages:["German","English"],sleepingStyles:["Hut-to-hut"],priceTier:"€€",priceMin:750,priceMax:1400,routesOffered:["E5 Oberstdorf-Meran","Meraner Höhenweg"],routeCount:2,popularity:88,specialties:["Mountain guide training","Local knowledge","Professional guiding"],headquarters:"Germany",isCurated:!0},{id:"rucksack-reisen",companyName:"Rucksack Reisen",website:"https://www.rucksack-reisen.de",description:"German tour operator specializing in active outdoor holidays with focus on hiking and cycling in the Alps.",supportStyles:["Guided","Self-guided"],languages:["German","English"],sleepingStyles:["Hotels","Mixed"],priceTier:"€€",priceMin:700,priceMax:1800,routesOffered:["E5 Oberstdorf-Meran","Via Claudia Augusta","Transalp München-Gardasee"],routeCount:3,popularity:82,specialties:["Active holidays","Cycling focus","Good value"],headquarters:"Germany",isCurated:!0},{id:"bergzeit-erlebnis",companyName:"Bergzeit Erlebnis",website:"https://www.bergzeit-erlebnis.de",description:"German mountain experience company offering guided Alpine crossings with focus on authentic mountain experiences.",supportStyles:["Guided"],languages:["German"],sleepingStyles:["Hut-to-hut"],priceTier:"€€",priceMin:650,priceMax:1300,routesOffered:["E5 Oberstdorf-Meran","Berliner Höhenweg"],routeCount:2,popularity:78,specialties:["Authentic experiences","German-speaking groups","Personal service"],headquarters:"Germany",isCurated:!0},{id:"picotours",companyName:"Picotours",website:"https://www.picotours.de",description:"Specialist in self-guided hiking and cycling tours across Europe with strong Alpine portfolio. Known for detailed route documentation.",supportStyles:["Self-guided"],languages:["German","English"],sleepingStyles:["Hotels"],priceTier:"€€",priceMin:600,priceMax:1600,routesOffered:["E5 Oberstdorf-Meran","Lechweg","Via Claudia Augusta","Brenner Radweg"],routeCount:4,popularity:80,specialties:["Self-guided specialist","Detailed documentation","Luggage transfer"],headquarters:"Germany",isCurated:!0},{id:"belvelo",companyName:"Belvelo",website:"https://www.belvelo.de",description:"German E-bike and cycling tour specialist with focus on Alpine crossings. Perfect for those wanting to cycle across the Alps with electric assistance.",supportStyles:["Self-guided","Guided"],languages:["German","English"],sleepingStyles:["Hotels"],priceTier:"€€€",priceMin:1200,priceMax:2800,routesOffered:["Transalp München-Gardasee","Via Claudia Augusta","Brenner Radweg","Transalp Garmisch-Riva"],routeCount:4,popularity:85,specialties:["E-bike specialist","Cycling tours","Luggage transfer","Premium bikes"],headquarters:"Germany",isCurated:!0},{id:"eurohike",companyName:"Eurohike",website:"https://www.eurohike.at",description:"Austria's largest self-guided walking holiday specialist with 30+ years experience. Industry leader for luggage transfer and hotel-based hiking.",supportStyles:["Self-guided"],languages:["German","English","Italian"],sleepingStyles:["Hotels"],priceTier:"€€€",priceMin:800,priceMax:2500,routesOffered:["E5 Oberstdorf-Meran","Lechweg","Meraner Höhenweg","Tour du Mont Blanc","Via Claudia Augusta"],routeCount:5,popularity:96,specialties:["Self-guided pioneer","Luggage transfer","Hotel booking","GPS tracks"],headquarters:"Austria",isCurated:!0},{id:"asi-reisen",companyName:"ASI Reisen",website:"https://www.asi-reisen.at",description:"Leading Austrian sustainable travel specialist with extensive Alpenüberquerung portfolio. Known for eco-friendly approach and wide route selection.",supportStyles:["Guided","Self-guided"],languages:["German","English"],sleepingStyles:["Hut-to-hut","Hotels","Mixed"],priceTier:"€€",priceMin:600,priceMax:1800,routesOffered:["E5 Oberstdorf-Meran","Alta Via 1","Tour du Mont Blanc","Meraner Höhenweg","Stubaier Höhenweg"],routeCount:5,popularity:93,specialties:["Sustainable travel","Climate-neutral","Wide selection","Group departures"],headquarters:"Austria",isCurated:!0},{id:"alpinschule-innsbruck",companyName:"Alpinschule Innsbruck",website:"https://www.asi.at",description:"Historic Tyrolean mountain school with deep Alpine roots. Professional guides and authentic mountain experiences in the heart of the Alps.",supportStyles:["Guided"],languages:["German","English"],sleepingStyles:["Hut-to-hut"],priceTier:"€€",priceMin:700,priceMax:1600,routesOffered:["E5 Oberstdorf-Meran","Stubai Glacier Trek","Ötztal crossing"],routeCount:3,popularity:87,specialties:["Tyrolean expertise","Glacier tours","Technical routes"],headquarters:"Austria",isCurated:!0},{id:"die-bergspechte",companyName:"Die Bergspechte",website:"https://www.bergspechte.at",description:"Austrian mountain tour specialist known for expert guides and well-organized Alpenüberquerung trips. Strong focus on group dynamics.",supportStyles:["Guided"],languages:["German","English"],sleepingStyles:["Hut-to-hut","Hotels"],priceTier:"€€",priceMin:750,priceMax:1700,routesOffered:["E5 Oberstdorf-Meran","Berliner Höhenweg","Haute Route"],routeCount:3,popularity:84,specialties:["Expert guides","Group trips","Mountain expertise"],headquarters:"Austria",isCurated:!0},{id:"weltweitwandern",companyName:"Weltweitwandern",website:"https://www.weltweitwandern.at",description:"Austrian sustainable travel company offering walking holidays worldwide with strong Alpine expertise. Known for responsible tourism.",supportStyles:["Guided"],languages:["German","English"],sleepingStyles:["Hotels","Hut-to-hut"],priceTier:"€€€",priceMin:1e3,priceMax:2500,routesOffered:["E5 Oberstdorf-Meran","Tour du Mont Blanc","Dolomites Alta Via"],routeCount:3,popularity:81,specialties:["Sustainable tourism","Social responsibility","Quality guiding"],headquarters:"Austria",isCurated:!0},{id:"alpinschule-grindelwald",companyName:"Alpinschule Grindelwald",website:"https://www.alpinschule-grindelwald.ch",description:"Swiss mountain school based in the Bernese Oberland. Specialists in Haute Route and Swiss Alpine crossings.",supportStyles:["Guided"],languages:["German","English","French"],sleepingStyles:["Hut-to-hut"],priceTier:"€€€",priceMin:1200,priceMax:3e3,routesOffered:["Haute Route","Tour du Mont Blanc","Walker's Haute Route"],routeCount:3,popularity:86,specialties:["Swiss precision","Haute Route experts","High-altitude experience"],headquarters:"Switzerland",isCurated:!0},{id:"bergpunkt",companyName:"Bergpunkt",website:"https://www.bergpunkt.ch",description:"Swiss mountaineering school offering professional Alpine courses and guided crossings. Strong reputation for technical excellence.",supportStyles:["Guided"],languages:["German","English","French"],sleepingStyles:["Hut-to-hut"],priceTier:"€€€",priceMin:1100,priceMax:2800,routesOffered:["Haute Route","Tour du Mont Blanc","Glacier crossings"],routeCount:3,popularity:83,specialties:["Technical expertise","Mountaineering courses","Safety focus"],headquarters:"Switzerland",isCurated:!0},{id:"eurotrek",companyName:"Eurotrek",website:"https://www.eurotrek.ch",description:"Swiss self-guided tour specialist with extensive hiking and biking portfolio. Known for excellent organization and Swiss quality.",supportStyles:["Self-guided"],languages:["German","English","French","Italian"],sleepingStyles:["Hotels"],priceTier:"€€€",priceMin:900,priceMax:2200,routesOffered:["Via Claudia Augusta","Tour du Mont Blanc","Transalp routes"],routeCount:3,popularity:84,specialties:["Swiss quality","Self-guided excellence","Cycling tours"],headquarters:"Switzerland",isCurated:!0},{id:"dolomite-mountains",companyName:"Dolomite Mountains",website:"https://www.dolomitemountains.com",description:"Ital
245ian specialist for Dolomites hiking with deep local knowledge. The go-to operator for Alta Via routes and South Tyrolean crossings.",supportStyles:["Guided","Self-guided"],languages:["English","German","Italian"],sleepingStyles:["Hut-to-hut"],priceTier:"€€",priceMin:700,priceMax:1800,routesOffered:["Alta Via 1","Alta Via 2","Meraner Höhenweg","Dolomites crossing"],routeCount:4,popularity:91,specialties:["Dolomites experts","Rifugio specialist","Local knowledge","Italian cuisine"],headquarters:"Italy",isCurated:!0},{id:"sudtirol-tours",companyName:"Südtirol Tours",website:"https://www.suedtirol-tours.com",description:"South Tyrolean specialist offering walking and biking holidays in the Dolomites and surrounding Alps. Bilingual German-Italian expertise.",supportStyles:["Self-guided","Guided"],languages:["German","Italian","English"],sleepingStyles:["Hotels","Hut-to-hut"],priceTier:"€€",priceMin:650,priceMax:1600,routesOffered:["E5 Oberstdorf-Meran","Meraner Höhenweg","Alta Via 1","Brenner Radweg"],routeCount:4,popularity:85,specialties:["South Tyrol experts","Bilingual service","Wine country tours"],headquarters:"Italy",isCurated:!0},{id:"sentres-dolomites",companyName:"Sentres",website:"https://www.sentres.com",description:"South Tyrolean hiking platform and tour operator with comprehensive Dolomites and South Tyrol expertise.",supportStyles:["Self-guided"],languages:["German","Italian","English"],sleepingStyles:["Hotels","Hut-to-hut"],priceTier:"€€",priceMin:500,priceMax:1400,routesOffered:["Meraner Höhenweg","Alta Via 1","Dolomites day hikes"],routeCount:3,popularity:79,specialties:["Local platform","Comprehensive info","South Tyrol focus"],headquarters:"Italy",isCurated:!0}],jM=e=>e.toLowerCase().trim(),xa=e=>{const t=new Set;return e.filter(n=>{const r=n.companyName?jM(n.companyName):"";return r?t.has(r)?!1:(t.add(r),!0):!0})},ba=e=>xa(e).length,DM=(e,t)=>t.length?e?e==="Mixed"?!0:t.includes(e):!1:!0,zM=(e,t)=>t?e?t==="Both"||e==="Both"?!0:e===t:!1:!0,BM=(e,t)=>t.length?e!=null&&e.length?t.some(n=>e.includes(n)):!1:!0,$M=(e,t)=>t.length?e?t.includes(e):!1:!0,FM=(e,t)=>t?typeof e!="number"?!1:e<=t:!0,UM=(e,t)=>DM(e.sleepingStyle,t.sleepingStyles)&&zM(e.supportStyle,t.supportStyle)&&BM(e.languages,t.languages)&&$M(e.priceTier,t.priceTiers)&&FM(e.priceMin,t.budgetMax),o_=(e,t)=>xa(e.filter(n=>UM(n,t))),a_=e=>e.sleepingStyles.length>0||!!e.supportStyle||e.languages.length>0||e.priceTiers.length>0||!!e.budgetMax,Xb=w.createContext(void 0),HM=e=>({id:e.id,name:e.name,activityType:e.activity_type,countries:e.countries||[],start:e.start_location||"",finish:e.finish_location||"",startCoordinates:e.start_coordinates,finishCoordinates:e.finish_coordinates,minDays:e.min_days||1,maxDays:e.max_days||7,typicalDays:e.typical_days||5,distance:e.distance||0,elevationGain:e.elevation_gain||0,difficulty:e.difficulty||"Moderate",bestSeasonMonths:e.best_season_months||[6,7,8,9],sleepingStyles:e.sleeping_styles||[],supportStyles:e.support_styles||[],languages:e.languages||[],priceTier:e.price_tier||"€€",priceMin:e.price_min||0,priceMax:e.price_max||0,description:e.description||"",highlights:e.highlights||[],itinerary:e.itinerary||[],popularity:e.popularity||50,providerCount:e.provider_count||0,isVerified:e.is_verified||!1}),VM=e=>({id:e.id,companyName:e.company_name,website:e.website||"",description:e.description||"",supportStyles:e.support_styles||[],languages:e.languages||[],sleepingStyles:e.sleeping_styles||[],priceTier:e.price_tier||"€€",priceMin:e.price_min||0,priceMax:e.price_max||0,routesOffered:e.routes_offered||[],routeCount:e.route_count||0,popularity:e.popularity||50,specialties:e.specialties||[],headquarters:e.headquarters||"",isCurated:e.is_curated||!0}),Rh=e=>({id:e.id,routeId:e.route_id,companyName:e.company_name,supportStyle:e.support_style||"Self-guided",sleepingStyle:e.sleeping_style||"Hotels",languages:e.languages||[],priceTier:e.price_tier||"€€",priceMin:e.price_min||0,priceMax:e.price_max||0,includes:e.includes||[],link:e.link||"",popularity:e.popularity||50}),WM=({children:e})=>{const[t,n]=w.useState([]),[r,s]=w.useState([]),[o,l]=w.useState({}),[u,c]=w.useState(!0),[h,p]=w.useState(null),[g,v]=w.useState(!1),[_,k]=w.useState(!1),[y,T]=w.useState(!1),[E,S]=w.useState(!1);w.useEffect(()=>{g||x()},[g]);const x=async()=>{c(!0);try{const{data:j,error:V}=await Es.from("routes").select("*").order("popularity",{ascending:!1});if(V){console.error("Database error:",V),n(Ch);return}if(!j||j.length===0){console.log("Database empty, using dummy data"),n(Ch);return}const H=j.map(HM),{data:te,error:G}=await Es.from("offers").select("*").order("popularity",{ascending:!1}).limit(1e3);if(G||!te){n(H);return}const ne=te.map(Rh),W={};for(const I of ne)W[I.routeId]||(W[I.routeId]=[]),W[I.routeId].push(I);for(const[I,$]of Object.entries(W))W[I]=xa($);l(W);const Q=H.map(I=>{const $=ba(W[I.id]||[]);return{...I,providerCount:$}});n(Q)}catch(j){console.error("Failed to load routes:",j),n(Ch)}finally{c(!1),v(!0)}},P=w.useCallback(async()=>
245{if(!(_||y)){T(!0);try{const{data:j,error:V}=await Es.from("providers").select("*").order("popularity",{ascending:!1});V?(console.error("Database error:",V),s(Ph)):j&&j.length>0?s(j.map(VM)):(console.log("No providers in database, using dummy data"),s(Ph)),k(!0)}catch(j){console.error("Failed to load providers:",j),s(Ph)}finally{T(!1)}}},[_,y]),R=w.useCallback(j=>t.find(V=>V.id===j),[t]),N=w.useCallback(j=>o[j]||[],[o]),O=w.useCallback(async(j,V)=>{var H;if(((H=o[j])==null?void 0:H.length)>0)return o[j];try{const{data:te,error:G}=await Es.from("offers").select("*").eq("route_id",j).order("popularity",{ascending:!1});if(G)return console.error("Database error:",G),[];if(te&&te.length>0){const ne=xa(te.map(Rh));return l(W=>({...W,[j]:ne})),n(W=>W.map(Q=>Q.id===j?{...Q,providerCount:ba(ne)}:Q)),ne}return l(ne=>({...ne,[j]:[]})),n(ne=>ne.map(W=>W.id===j?{...W,providerCount:0}:W)),[]}catch(te){return console.error("Failed to load offers:",te),[]}},[o]),z=w.useCallback(async(j,V)=>{S(!0);try{const{error:H}=await Es.functions.invoke("refresh-offers",{body:{routeId:j,routeName:V}});if(H)throw H;const{data:te}=await Es.from("offers").select("*").eq("route_id",j).order("popularity",{ascending:!1}),G=xa((te||[]).map(Rh));l(ne=>({...ne,[j]:G})),n(ne=>ne.map(W=>W.id===j?{...W,providerCount:ba(G)}:W))}catch(H){throw console.error("Failed to refresh offers:",H),H}finally{S(!1)}},[]),D=w.useCallback(()=>{v(!1),k(!1),l({}),p(null)},[]);return m.jsx(Xb.Provider,{value:{routes:t,offers:Object.values(o).flat(),offersByRoute:o,providers:r,getRouteById:R,getOffersForRoute:N,isLoading:u,error:h,loadOffersForRoute:O,loadAllProviders:P,refreshData:D,refreshOffersForRoute:z,isLoadingProviders:y,isRefreshingOffers:E},children:e})},eS=()=>{const e=w.useContext(Xb);if(!e)throw new Error("useData must be used within a DataProvider");return e},GM=WM,l_="alpine-crossing-explorer",u_={favorites:[],notes:{},compareList:[]},qM=()=>{const[e,t]=w.useState(()=>{try{const h=localStorage.getItem(l_);return h?JSON.parse(h):u_}catch{return u_}});w.useEffect(()=>{try{localStorage.setItem(l_,JSON.stringify(e))}catch(h){console.error("Failed to save to localStorage:",h)}},[e]);const n=w.useCallback(h=>{t(p=>({...p,favorites:p.favorites.includes(h)?p.favorites.filter(g=>g!==h):[...p.favorites,h]}))},[]),r=w.useCallback(h=>e.favorites.includes(h),[e.favorites]),s=w.useCallback((h,p)=>{t(g=>({...g,notes:{...g.notes,[h]:p}}))},[]),o=w.useCallback(h=>e.notes[h]||"",[e.notes]),l=w.useCallback(h=>{t(p=>p.compareList.includes(h)?{...p,compareList:p.compareList.filter(g=>g!==h)}:p.compareList.length>=3?p:{...p,compareList:[...p.compareList,h]})},[]),u=w.useCallback(h=>e.compareList.includes(h),[e.compareList]),c=w.useCallback(()=>{t(h=>({...h,compareList:[]}))},[]);return{userData:e,toggleFavorite:n,isFavorite:r,setNote:s,getNote:o,toggleCompare:l,isInCompareList:u,clearCompareList:c,compareCount:e.compareList.length}},c_=(e,t)=>({search:"",activityType:null,minDays:1,maxDays:e,difficulties:[],countries:[],months:[],sleepingStyles:[],supportStyle:null,languages:[],priceTiers:[],budgetMax:null,minDistance:0,maxDistance:t}),d_={Easy:1,Moderate:2,Hard:3,Expert:4},h_={"€":1,"€€":2,"€€€":3,"€€€€":4},KM=40,ZM=600,YM=e=>{const t=w.useMemo(()=>e.length===0?40:Math.max(...e.map(k=>k.maxDays)),[e]),n=w.useMemo(()=>e.length===0?1e3:Math.ceil(Math.max(...e.map(k=>k.distance||0))/50)*50,[e]),r=Math.min(KM,t),s=Math.min(ZM,n),[o,l]=w.useState(()=>c_(r,s)),[u,c]=w.useState("popularity");w.useMemo(()=>{o.maxDays>t&&l(k=>({...k,maxDays:t})),(o.maxDistance>s||o.maxDistance===0)&&l(k=>({...k,maxDistance:s}))},[t,s]);const h=w.useCallback((k,y)=>{l(T=>({...T,[k]:y}))},[]),p=w.useCallback(k=>{l(y=>({...y,...k}))},[]),g=w.useCallback(()=>{l(c_(r,s))},[r,s]),v=w.useMemo(()=>{let k=e.filter(y=>{if(o.search){const T=o.search.toLowerCase();if(!(y.name.toLowerCase().includes(T)||y.start.toLowerCase().includes(T)||y.finish.toLowerCase().includes(T)||y.countries.some(S=>S.toLowerCase().includes(T))))return!1}if(o.activityType&&y.activityType!==o.activityType||y.maxDays<o.minDays||y.minDays>o.maxDays||y.distance!=null&&(y.distance<o.minDistance||o.maxDistance<s&&y.distance>o.maxDistance)||o.difficulties.length>0&&!o.difficulties.includes(y.difficulty)||o.countries.length>0&&!y.countries.some(T=>o.countries.includes(T))||o.months.length>0&&!y.bestSeasonMonths.some(T=>o.months.includes(T))||o.sleepingStyles.length>0&&!y.sleepingStyles.some(T=>o.sleepingStyles.includes(T)))return!1;if(o.supportStyle&&o.supportStyle!=="Both"){if(!y.supportStyles.includes(o.supportStyle)&&!y.supportStyles.includes("Both"))return!1}return!(o.languages.length>0&&!y.languages.some(T=>o.languages.includes(T))||o.priceTiers.length>0&&!o.priceTiers.includes(y.priceTier)||o.budgetMax&&y.priceMin&&y.priceMin>o.budgetMax)});return k=[...k].sort((y,T)=>{switch(u){case"days":return y.typicalDays-T.typicalDays;case"difficulty":return d_[y.difficulty]-d_[T.difficulty];case"price":return h_[y.priceTier]-h_[T.priceTier];case"popularity":default:return T.popularity-y.popularity}}),k},[e,o,u]),_=w.useMemo(()=>{let k=0;return o.activityType&&k++,(o.minDays>1||o.maxDays<r)&&k++,o.difficulties.length>0&&k++,o.countries.length>0&&k++,o.months.length>0&&k++,o.sleepingStyles.length>0&&k++,o.supportStyle&&k++,o.languages.length>0&&k++,o.priceTiers.length>0&&k++,o.budgetMax&&k++,(o.minDistance>0||o.maxDistance<s)&&k++,k},[o,r,s]);return{filters:o,sortBy:u,updateFilter:h,updateFilters:p,setSortBy:c,resetFilters:g,filteredRoutes:v,activeFilterCount:_,maxDaysAvailable:r,actualMaxDays:t,maxDistanceAvailable:s}},Bi=w.forwardRef(({className:e,type:t,...n},r)=>m.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}));Bi.displayName="Input";const JM=({search:e,onSearchChange:t,compareCount:n,onCompareClick:r,onNaturalSearch:s,isSearching:o=!1,searchSummary:l,isUsingPerplexity:u=!1,onRefreshData:c,cacheStatus:h})=>{const[p,g]=w.useState(!1),[v,_]=w.useState(""),k=w.useRef(null),y=async E=>{E.key==="Enter"&&p&&v.trim()&&s&&await s(v.trim())},T=()=>{g(!p),p||_("")};return w.useEffect(()=>{p&&k.current&&k.current.focus()},[p]),m.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 h-header bg-card/95 backdrop-blur-sm border-b border-border",children:m.jsxs("div",{className:"h-full px-4 lg:px-6 flex items-center justify-between gap-4",children:[m.jsxs("div",{className:"flex items-center gap-2.5 shrink-0",children:[m.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary flex items-center justify-center",children:m.jsx(Rx,{className:"w-5 h-5 text-primary-foreground"})}),m.jsxs("div",{className:"hidden sm:block",children:[m.jsx("h1",{className:"font-serif text-lg font-semibold text-foreground leading-none",children:"Alpine Crossing"}),m.jsxs("p",{className:"text-xs text-muted-foreground",children:["Explorer",u&&m.jsx("span",{className:"ml-1 text-accent",children:"• AI Powered"})]})]})]}),m.jsxs("div",{className:"flex-1 max-w-xl",children:[m.jsxs("div",{className:"relative",children:[p?m.jsxs(m.Fragment,{children:[m.jsx(oy,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-accent"}),m.jsx(Bi,{ref:k,type:"text",placeholder:"Ask anything... e.g., 'family-friendly hikes near Zermatt'",value:v,onCh
245ange:E=>_(E.target.value),onKeyDown:y,disabled:o,className:"pl-10 pr-20 bg-accent/10 border-accent/30 focus:border-accent focus:bg-background placeholder:text-accent/60"}),o&&m.jsx(Ua,{className:"absolute right-14 top-1/2 -translate-y-1/2 w-4 h-4 text-accent animate-spin"})]}):m.jsxs(m.Fragment,{children:[m.jsx(UP,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),m.jsx(Bi,{type:"text",placeholder:"Search routes, regions, or destinations...",value:e,onChange:E=>t(E.target.value),className:"pl-10 pr-12 bg-muted/50 border-transparent focus:border-primary focus:bg-background"})]}),u&&m.jsx("button",{onClick:T,className:`absolute right-2 top-1/2 -translate-y-1/2 p-1.5 rounded-md transition-colors ${p?"bg-accent text-accent-foreground":"bg-muted hover:bg-accent/20 text-muted-foreground hover:text-accent"}`,title:p?"Switch to filter search":"Switch to AI search",children:m.jsx(oy,{className:"w-4 h-4"})})]}),l&&p&&m.jsx("p",{className:"mt-1 text-xs text-muted-foreground truncate px-1",children:l})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[!1,u&&c&&m.jsx("button",{onClick:c,className:"p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",title:h!=null&&h.routesCached?`Cached ${h.routesCacheAge}h ago - Click to refresh`:"Refresh data",children:m.jsx($P,{className:`w-4 h-4 ${o?"animate-spin":""}`})}),n>0&&m.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-accent text-accent-foreground font-medium text-sm hover:bg-accent/90 transition-colors",children:["Compare",m.jsx("span",{className:"w-5 h-5 rounded-full bg-accent-foreground text-accent text-xs flex items-center justify-center",children:n})]})]})]})})},QM=()=>m.jsx("footer",{className:"py-6 px-4 border-t border-border bg-card/50",children:m.jsxs("div",{className:"max-w-7xl mx-auto flex flex-col sm:flex-row items-center justify-center gap-2 sm:gap-4 text-center",children:[m.jsxs("p",{className:"text-sm text-muted-foreground",children:["A side project by"," ",m.jsx("a",{href:"https://christinevallaure.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"christinevallaure.com"})]}),m.jsx("span",{className:"hidden sm:inline text-muted-foreground/50",children:"·"}),m.jsx("a",{href:"https://www.christinevallaure.com/imprint",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-muted-foreground hover:text-foreground hover:underline",children:"Imprint"})]})}),f_=(e,t,n)=>n<=t?0:(e-t)/(n-t)*100,p_=({value:e,min:t,max:n,step:r=1,className:s,onValueChange:o})=>{const[l,u]=e,c=Math.max(t,Math.min(l,u-r)),h=Math.min(n,Math.max(u,l+r)),p=y=>{const T=Math.min(Number(y.target.value),h-r);o==null||o([T,h])},g=y=>{const T=Math.max(Number(y.target.value),c+r);o==null||o([c,T])},v=f_(c,t,n),_=f_(h,t,n),k=_-v<=8;return m.jsxs("div",{className:Ce("range-slider relative h-8 w-full",s),children:[m.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-1/2 h-2 -translate-y-1/2 rounded-full bg-secondary"}),m.jsx("div",{className:"pointer-events-none absolute top-1/2 h-2 -translate-y-1/2 rounded-full bg-primary",style:{left:`${v}%`,width:`${Math.max(_-v,0)}%`}}),m.jsx("input",{type:"range",min:t,max:n,step:r,value:c,onChange:p,className:Ce("range-slider__input range-slider__input--min",k&&"z-10"),"aria-label":"Minimum value"}),m.jsx("input",{type:"range",min:t,max:n,step:r,value:h,onChange:g,className:"range-slider__input range-slider__input--max z-20","aria-label":"Maximum value"})]})},tS="distance-unit",nS=1.609344,Ah=new Set,XM=()=>{try{return localStorage.getItem(tS)==="mi"?"mi":"km"}catch{return"km"}},Yc=()=>{const[e,t]=w.useState(XM);w.useEffect(()=>{const r=s=>t(s);return Ah.add(r),()=>{Ah.delete(r)}},[]);const n=w.useCallback(r=>{try{localStorage.setItem(tS,r)}catch{}Ah.forEach(s=>s(r))},[]);return{unit:e,setUnit:n}},eo=(e,t)=>{const n=t==="mi"?e/nS:e;return Math.round(n)},cu=(e,t)=>t==="mi"?e*nS:e,Sa=e=>e==="mi"?"mi":"km",e2=[{value:1,label:"Jan"},{value:2,label:"Feb"},{value:3,label:"Mar"},{value:4,label:"Apr"},{value:5,label:"May"},{value:6,label:"Jun"},{value:7,label:"Jul"},{value:8,label:"Aug"},{value:9,label:"Sep"},{value:10,label:"Oct"},{value:11,label:"Nov"},{value:12,label:"Dec"}],t2=["Hike","Bike"],n2=["Easy","Moderate","Hard","Expert"],r2=["Hut-to-hut","Hotels","Camping","Mixed"],i2=["Guided","Self-guided","Both"],s2=["€","€€","€€€","€€€€"],zr=({active:e,onClick:t,children:n,variant:r="default"})=>{let s="chip ";return e?r==="hike"?s+="chip-hike":r==="bike"?s+="chip-bike":s+="chip-active":s+="chip-default",m.jsx("button",{onClick:t,className:s,children:n})},Br=({title:e,children:t})=>m.jsxs("div",{className:"filter-section",children:[m.jsx("h3",{className:"filter-label",children:e}),m.jsx("div",{className:"flex flex-wrap gap-2.5",children:t})]}),m_=({filters:e,updateFilter:t,updateFilters:n,toggleArrayFilter:r,availableCountries:s,availableLanguages:o,maxDaysAvailable:l,maxDistanceAvailable:u})=>{const{unit:c,setUnit:h}=Yc(),p=x=>{const P=parseInt(x,10);if(!isNaN(P)){const R=Math.max(1,Math.min(P,e.maxDays));t("minDays",R)}},g=x=>{const P=parseInt(x,10);if(!isNaN(P)){const R=Math.max(e.minDays,P);t("maxDays",R)}},v=Math.min(e.minDays,l),_=Math.min(e.maxDays,l),k=eo(e.minDistance,c),y=eo(e.maxDistance,c),T=eo(u,c),E=x=>{const P=parseFloat(x);if(!isNaN(P)){const R=Math.max(0,Math.min(cu(P,c),e.maxDistance));t("minDistance",R)}},S=x=>{const P=parseFloat(x);if(!isNaN(P)){const R=Math.max(e.minDistance,cu(P,c));t("maxDistance",R)}};return m.jsxs(m.Fragment,{children:[m.jsx(Br,{title:"Activity",children:t2.map(x=>m.jsx(zr,{active:e.activityType===x,onClick:()=>t("activityType",e.activityType===x?null:x),variant:x.toLowerCase(),children:x},x))}),m.jsxs("div",{className:"filter-section",children:[m.jsx("h3",{className:"filter-label",children:"Duration"}),m.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[m.jsx(Bi,{type:"number",value:e.minDays,onChange:x=>p(x.target.value),min:1,max:e.maxDays,className:"w-16 h-9 text-center text-sm font-medium px-2"}),m.jsx("span",{className:"text-muted-foreground",children:"–"}),m.jsx(Bi,{type:"number",value:e.maxDays,onChange:x=>g(x.target.value),min:e.minDays,max:l,className:"w-16 h-9 text-center text-sm font-medium px-2"}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"days"})]}),m.jsx("div",{className:"px-1",children:m.jsx(p_,{value:[v,_],min:1,max:l,step:1,onValueChange:([x,P])=>{n({minDays:x,maxDays:P})},className:"w-full"})}),m.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mt-2 px-1",children:[m.jsx("span",{children:"1 day"}),m.jsxs("span",{children:[l,"+ days"]})]})]}),m.jsxs("div",{className:"filter-section",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsx("h3",{className:"filter-label !mb-0",children:"Distance"}),m.jsxs("div",{className:"inline-flex items-center rounded-full border border-border p-0.5 text-xs font-medium",children:[m.jsx("button",{type:"button",onClick:()=>
245h("km"),className:`px-2.5 py-1 rounded-full transition-colors ${c==="km"?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,children:"km"}),m.jsx("button",{type:"button",onClick:()=>h("mi"),className:`px-2.5 py-1 rounded-full transition-colors ${c==="mi"?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,children:"mi"})]})]}),m.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[m.jsx(Bi,{type:"number",value:k,onChange:x=>E(x.target.value),min:0,max:y,className:"w-20 h-9 text-center text-sm font-medium px-2"}),m.jsx("span",{className:"text-muted-foreground",children:"–"}),m.jsx(Bi,{type:"number",value:y,onChange:x=>S(x.target.value),min:k,max:T,className:"w-20 h-9 text-center text-sm font-medium px-2"}),m.jsx("span",{className:"text-sm text-muted-foreground",children:Sa(c)})]}),m.jsx("div",{className:"px-1",children:m.jsx(p_,{value:[k,Math.min(y,T)],min:0,max:T,step:c==="mi"?5:10,onValueChange:([x,P])=>{n({minDistance:cu(x,c),maxDistance:cu(P,c)})},className:"w-full"})}),m.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mt-2 px-1",children:[m.jsxs("span",{children:["0 ",Sa(c)]}),m.jsxs("span",{children:[T,"+ ",Sa(c)]})]})]}),m.jsx(Br,{title:"Difficulty",children:n2.map(x=>m.jsx(zr,{active:e.difficulties.includes(x),onClick:()=>r("difficulties",x,e.difficulties),children:x},x))}),s.length>0&&m.jsx(Br,{title:"Countries",children:m.jsx("div",{className:"flex flex-wrap gap-2.5 max-h-32 overflow-y-auto",children:s.map(x=>m.jsx(zr,{active:e.countries.includes(x),onClick:()=>r("countries",x,e.countries),children:x},x))})}),m.jsx(Br,{title:"Best Season",children:e2.map(x=>m.jsx(zr,{active:e.months.includes(x.value),onClick:()=>r("months",x.value,e.months),children:x.label},x.value))}),m.jsx(Br,{title:"Sleeping Style",children:r2.map(x=>m.jsx(zr,{active:e.sleepingStyles.includes(x),onClick:()=>r("sleepingStyles",x,e.sleepingStyles),children:x},x))}),m.jsx(Br,{title:"Support Style",children:i2.map(x=>m.jsx(zr,{active:e.supportStyle===x,onClick:()=>t("supportStyle",e.supportStyle===x?null:x),children:x},x))}),o.length>0&&m.jsx(Br,{title:"Languages",children:m.jsx("div",{className:"flex flex-wrap gap-2.5 max-h-32 overflow-y-auto",children:o.map(x=>m.jsx(zr,{active:e.languages.includes(x),onClick:()=>r("languages",x,e.languages),children:x},x))})}),m.jsx(Br,{title:"Price Range",children:s2.map(x=>m.jsx(zr,{active:e.priceTiers.includes(x),onClick:()=>r("priceTiers",x,e.priceTiers),children:x},x))})]})},o2=({filters:e,updateFilter:t,updateFilters:n,resetFilters:r,activeFilterCount:s,isOpen:o,onClose:l,availableCountries:u,availableLanguages:c,maxDaysAvailable:h,maxDistanceAvailable:p})=>{const g=(_,k,y)=>{const T=y.includes(k)?y.filter(E=>E!==k):[...y,k];t(_,T)},v=({showClose:_=!1})=>m.jsx("div",{className:"pb-5 border-b border-border/60",children:m.jsxs("div",{className:"flex items-center justify-between",children:[_?m.jsx("button",{onClick:l,className:"p-2 -ml-2 hover:bg-muted rounded-full transition-colors",children:m.jsx(Ha,{className:"w-5 h-5"})}):m.jsx("div",{}),m.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Filters"}),s>0?m.jsx("button",{onClick:r,className:"text-sm font-medium underline underline-offset-2 hover:text-foreground/80 transition-colors",children:"Clear all"}):m.jsx("div",{className:"w-16"})]})});return m.jsxs(m.Fragment,{children:[o&&m.jsx("div",{className:"md:hidden fixed inset-0 bg-foreground
245/20 z-40",onClick:l}),m.jsx("aside",{className:`
246        md:hidden fixed top-header left-0 z-40
247        w-sidebar h-[calc(100vh-var(--header-height))]
248        bg-background
249        overflow-y-auto scrollbar-thin
250        transform transition-transform duration-300 ease-out
251        shadow-xl
252        ${o?"translate-x-0":"-translate-x-full"}
253      `,children:m.jsxs("div",{className:"px-6 pt-5 pb-8",children:[m.jsx(v,{showClose:!0}),m.jsx(m_,{filters:e,updateFilter:t,updateFilters:n,toggleArrayFilter:g,availableCountries:u,availableLanguages:c,maxDaysAvailable:h,maxDistanceAvailable:p})]})}),m.jsx("aside",{className:`
254        hidden md:block sticky top-header
255        w-sidebar h-[calc(100vh-var(--header-height))]
256        bg-background border-r border-border/40
257        overflow-y-auto scrollbar-thin flex-shrink-0
258      `,children:m.jsxs("div",{className:"px-6 pt-5 pb-8",children:[m.jsx(v,{}),m.jsx(m_,{filters:e,updateFilter:t,updateFilters:n,toggleArrayFilter:g,availableCountries:u,availableLanguages:c,maxDaysAvailable:h,maxDistanceAvailable:p})]})})]})},a2={Easy:"bg-easy",Moderate:"bg-moderate",Hard:"bg-hard",Expert:"bg-expert"},l2=({route:e,isFavorite:t,isInCompareList:n,onFavoriteToggle:r,onCompareToggle:s,onClick:o,compareDisabled:l})=>{const{unit:u}=Yc(),c=p=>{p.stopPropagation(),r()},h=p=>{p.stopPropagation(),(!l||n)&&s()};return m.jsxs("article",{className:"route-card cursor-pointer group animate-fade-in",onClick:o,children:[m.jsxs("div",{className:"p-4 pb-3",children:[m.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[m.jsx("span",{className:`chip ${e.activityType==="Hike"?"chip-hike":"chip-bike"} text-xs px-2 py-0.5`,children:e.activityType}),m.jsx("span",{className:`w-2 h-2 rounded-full ${a2[e.difficulty]}`}),m.jsx("span",{className:"text-xs text-muted-foreground",children:e.difficulty})]}),m.jsx("h3",{className:"font-serif font-semibold text-lg text-foreground leading-tight line-clamp-2 group-hover:text-primary transition-colors",children:e.name})]}),m.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[m.jsx("button",{onClick:c,className:`p-2 rounded-lg transition-colors ${t?"text-destructive bg-destructive/10":"text-muted-foreground hover:text-destructive hover:bg-destructive/10"}`,"aria-label":t?"Remove from favorites":"Add to favorites",children:m.jsx(Px,{className:`w-4 h-4 ${t?"fill-current":""}`})}),m.jsx("button",{onClick:h,disabled:l&&!n,className:`p-2 rounded-lg transition-colors ${n?"text-accent bg-accent/20":l?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-accent hover:bg-accent/10"}`,"aria-label":n?"Remove from compare":"Add to compare",children:m.jsx(Cx,{className:"w-4 h-4"})})]})]}),m.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground mb-3",children:[m.jsx(_m,{className:"w-3.5 h-3.5 shrink-0"}),m.jsxs("span",{className:"truncate",children:[e.start," → ",e.finish]})]}),m.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:e.countries.map(p=>m.jsx("span",{className:"px-2 py-0.5 text-xs bg-muted text-muted-foreground rounded",children:p},p))})]}),m.jsxs("div",{className:"px-4 py-3 border-t border-border bg-muted/30 grid grid-cols-5 gap-2",children:[m.jsxs("div",{className:"text-center",children:[m.jsxs("div",{className:"flex items-center justify-center gap-1 text-foreground font-medium text-sm",children:[m.jsx(Tx,{className:"w-3.5 h-3.5 text-muted-foreground"}),e.minDays,"–",e.maxDays]}),m.jsx("span",{className:"text-xs text-muted-foreground",children:"days"})]}),m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"flex items-center justify-center gap-1 text-foreground font-medium text-sm",children:m.jsx("span",{children:eo(e.distance,u)})}),m.jsx("span",{className:"text-xs text-muted-foreground",children:Sa(u)})]}),m.jsxs("div",{className:"text-center",children:[m.jsxs("div",{className:"flex items-center justify-center gap-1 text-foreground font-medium text-sm",children:[m.jsx(Ax,{className:"w-3.5 h-3.5 text-muted-foreground"}),(e.elevationGain/1e3).toFixed(1),"k"]}),m.jsx("span",{className:"text-xs text-muted-foreground",children:"m gain"})]}),m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"text-foreground font-medium text-sm",children:e.priceTier}),m.jsx("span",{className:"text-xs text-muted-foreground",children:"price"})]}),e.providerCount!==void 0&&e.providerCount>0&&m.jsxs("div",{className:"text-center",children:[m.jsxs("div",{className:"flex items-center justify-center gap-1 text-foreground font-medium text-sm",children:[m.jsx(Nx,{className:"w-3.5 h-3.5 text-muted-foreground"}),e.providerCount]}),m.jsx("span",{className:"text-xs text-muted-foreground",children:"operators"})]})]})]})},u2=jc("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function du({className:e,variant:t,...n}){return m.jsx("div",{className:Ce(u2({variant:t}),e),...n})}const c2=({provider:e})=>{const t=()=>{e.website&&window.open(e.website,"_blank","noopener,noreferrer")};return m.jsx("div",{className:`
259        group bg-card rounded-xl border border-border/50 overflow-hidden
260        hover:border-primary/30 hover:shadow-lg transition-all duration-200
261        ${e.website?"cursor-pointer":""}
262      `,onClick:t,children:m.jsxs("div",{className:"p-5",children:[m.jsxs("div",{className:"flex items-start justify-between mb-3",children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[m.jsx("h3",{className:"font-semibold text-foreground truncate",children:e.companyName}),e.popularity>=90&&m.jsx(VP,{className:"w-4 h-4 text-amber-500 fill-amber-500 flex-shrink-0"})]}),e.headquarters&&m.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[m.jsx(_m,{className:"w-3.5 h-3.5"}),m.jsx("span",{children:e.headquarters})]})]}),m.jsx(du,{variant:"outline",className:"bg-primary/10 text-primary border-primary/20 flex-shrink-0",children:e.priceTier})]}),m.jsx("p",{className:"text-sm text-muted-foreground mb-4 line-clamp-2",children:e.description}),m.jsxs("div",{className:"mb-4",children:[m.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground mb-2",children:[m.jsx(Nx,{className:"w-3.5 h-3.5"}),m.jsxs("span",{children:[e.routeCount," routes offered"]})]}),m.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.routesOffered.slice(0,3).map((n,r)=>m.jsx(du,{variant:"secondary",className:"text-xs bg-muted/50",children:n},r)),e.routesOffered.length>3&&m.jsxs(du,{variant:"secondary",className:"text-xs bg-muted/50",children:["+",e.routesOffered.length-3," more"]})]})]}),m.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.supportStyles.map(n=>m.jsx(du,{variant:"outline",className:"text-xs",children:n},n)),m.jsxs("span",{className:"text-xs text-muted-foreground self-center",children:[e.languages.slice(0,2).join(", "),e.languages.length>2&&` +${e.languages.length-2}`]})]}),e.specialties.length>0&&m.jsx("div",{className:"flex flex-wrap gap-1.5 mb-4",children:e.specialties.slice(0,3).map((n,r)=>m.jsx("span",{className:"text-xs text-muted-foreground bg-muted/30 px-2 py-0.5 rounded",children:n},r))}),m.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-border/50",children:[m.jsx("div",{className:"text-sm",children:e.priceMin&&e.priceMax?m.jsxs("span",{className:"text-foreground font-medium",children:["€",e.priceMin," – €",e.priceMax]}):m.jsx("span",{className:"text-muted-foreground",children:"Price on request"})}),e.website&&m.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-primary group-hover:underline",children:[m.jsx(BP,{className:"w-4 h-4"}),m.jsx("span",{children:"Visit website"}),m.jsx(jf,{className:"w-3.5 h-3.5 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})]})})},d2=jc("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"}}),Jc=w.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const l=r?UC:"button";return m.jsx(l,{className:Ce(d2({variant:t,size:n,className:e})),ref:o,...s})});Jc.displayName="Button";const rS=w.forwardRef(({className:e,...t},n)=>m.jsx("textarea",{className:Ce("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
262ing-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}));rS.displayName="Textarea";var h2=w.createContext(void 0);function hl(e){const t=w.useContext(h2);return e||t||"ltr"}function el(e,[t,n]){return Math.min(n,Math.max(t,e))}function f2(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var $m="ScrollArea",[iS,pz]=ir($m),[p2,fn]=iS($m),sS=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:o=600,...l}=e,[u,c]=w.useState(null),[h,p]=w.useState(null),[g,v]=w.useState(null),[_,k]=w.useState(null),[y,T]=w.useState(null),[E,S]=w.useState(0),[x,P]=w.useState(0),[R,N]=w.useState(!1),[O,z]=w.useState(!1),D=Te(t,V=>c(V)),j=hl(s);return m.jsx(p2,{scope:n,type:r,dir:j,scrollHideDelay:o,scrollArea:u,viewport:h,onViewportChange:p,content:g,onContentChange:v,scrollbarX:_,onScrollbarXChange:k,scrollbarXEnabled:R,onScrollbarXEnabledChange:N,scrollbarY:y,onScrollbarYChange:T,scrollbarYEnabled:O,onScrollbarYEnabledChange:z,onCornerWidthChange:S,onCornerHeightChange:P,children:m.jsx(pe.div,{dir:j,...l,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});sS.displayName=$m;var oS="ScrollAreaViewport",aS=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...o}=e,l=fn(oS,n),u=w.useRef(null),c=Te(t,u,l.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),m.jsx(pe.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});aS.displayName=oS;var or="ScrollAreaScrollbar",Fm=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fn(or,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=s,u=e.orientation==="horizontal";return w.useEffect(()=>(u?o(!0):l(!0),()=>{u?o(!1):l(!1)}),[u,o,l]),s.type==="hover"?m.jsx(m2,{...r,ref:t,forceMount:n}):s.type==="scroll"?m.jsx(g2,{...r,ref:t,forceMount:n}):s.type==="auto"?m.jsx(lS,{...r,ref:t,forceMount:n}):s.type==="always"?m.jsx(Um,{...r,ref:t}):null});Fm.displayName=or;var m2=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fn(or,e.__scopeScrollArea),[o,l]=w.useState(!1);return w.useEffect(()=>{const u=s.scrollArea;let c=0;if(u){const h=()=>{window.clearTimeout(c),l(!0)},p=()=>{c=window.setTimeout(()=>l(!1),s.scrollHideDelay)};return u.addEventListener("pointerenter",h),u.addEventListener("pointerleave",p),()=>{window.clearTimeout(c),u.removeEventListener("pointerenter",h),u.removeEventListener("pointerleave",p)}}},[s.scrollArea,s.scrollHideDelay]),m.jsx(yi,{present:n||o,children:m.jsx(lS,{"data-state":o?"visible":"hidden",...r,ref:t})})}),g2=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fn(or,e.__scopeScrollArea),o=e.orientation==="horizontal",l=Xc(()=>c("SCROLL_END"),100),[u,c]=f2("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 w.useEffect(()=>{if(u==="idle"){const h=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(h)}},[u,s.scrollHideDelay,c]),w.useEffect(()=>{const h=s.viewport,p=o?"scrollLeft":"scrollTop";if(h){let g=h[p];const v=()=>{const _=h[p];g!==_&&(c("SCROLL"),l()),g=_};return h.addEventListener("scroll",v),()=>h.removeEventListener("scroll",v)}},[s.viewport,o,c,l]),m.jsx(yi,{present:n||u!=="hidden",children:m.jsx(Um,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ae(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ae(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),lS=w.forwardRef((e,t)=>
vendor: 4,774 bytes, line 262
262{const n=fn(or,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,l]=w.useState(!1),u=e.orientation==="horizontal",c=Xc(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?h:p)}},10);return wo(n.viewport,c),wo(n.content,c),m.jsx(yi,{present:r||o,children:m.jsx(Um,{"data-state":o?"visible":"hidden",...s,ref:t})})}),Um=w.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=fn(or,e.__scopeScrollArea),o=w.useRef(null),l=w.useRef(0),[u,c]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=fS(u.viewport,u.content),p={...r,sizes:u,onSizesChange:c,hasThumb:h>0&&h<1,onThumbChange:v=>o.current=v,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:v=>l.current=v};function g(v,_){return b2(v,l.current,u,_)}return n==="horizontal"?m.jsx(v2,{...p,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const v=s.viewport.scrollLeft,_=g_(v,u,s.dir);o.current.style.transform=`translate3d(${_}px, 0, 0)`}},onWheelScroll:v=>{s.viewport&&(s.viewport.scrollLeft=v)},onDragScroll:v=>{s.viewport&&(s.viewport.scrollLeft=g(v,s.dir))}}):n==="vertical"?m.jsx(y2,{...p,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const v=s.viewport.scrollTop,_=g_(v,u);o.current.style.transform=`translate3d(0, ${_}px, 0)`}},onWheelScroll:v=>{s.viewport&&(s.viewport.scrollTop=v)},onDragScroll:v=>{s.viewport&&(s.viewport.scrollTop=g(v))}}):null}),v2=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=fn(or,e.__scopeScrollArea),[l,u]=w.useState(),c=w.useRef(null),h=Te(t,c,o.onScrollbarXChange);return w.useEffect(()=>{c.current&&u(getComputedStyle(c.current))},[c]),m.jsx(cS,{"data-orientation":"horizontal",...s,ref:h,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":Qc(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,g)=>{if(o.viewport){const v=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(v),mS(v,g)&&p.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:pc(l.paddingLeft),paddingEnd:pc(l.paddingRight)}})}})}),y2=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=fn(or,e.__scopeScrollArea),[l,u]=w.useState(),c=w.useRef(null),h=Te(t,c,o.onScrollbarYChange);return w.useEffect(()=>{c.current&&u(getComputedStyle(c.current))},[c]),m.jsx(cS,{"data-orientation":"vertical",...s,ref:h,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":Qc(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,g)=>{if(o.viewport){const v=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(v),mS(v,g)&&p.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:pc(l.paddingTop),paddingEnd:pc(l.paddingBottom)}})}})}),[_2,uS]=iS(or),cS=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:c,onDragScroll:h,onWheelScroll:p,onResize:g,...v}=e,_=fn(or,n),[k,y]=w.useState(null),T=Te(t,D=>y(D)),E=w.useRef(null),S=w.useRef(""),x=_.viewport,P=r.content-r.viewport,R=at(p),N=at(c),O=Xc(g,10);function z(D){if(E.current){const j=D.clientX-E.current.left,V=D.clientY-E.current.top;h({x:j,y:V})}}return w.useEffect(()=>{const D=j=>{const V=j.target;(k==null?void 0:k.contains(V))&&R(j,P)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[x,k,P,R]),w.useEffect(N,[r,N]),wo(k,O),wo(_.content,O),m.jsx(_2,{scope:n,scrollbar:k,hasThumb:s,onThumbChange:at(o),onThumbPointerUp:at(l),onThumbPositionChange:N,onThumbPointerDown:at(u),children:m.jsx(pe.div,{...v,ref:T,style:{position:"absolute",...v.style},onPointerDown:ae(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),E.current=k.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",_.viewport&&(_.viewport.style.scrollBehavior="auto"),z(D))}),onPointerMove:ae(e.onPointerMove,z),onPointerUp:ae(e.onPointerUp,D=>{const j=D.target;j.hasPointerCapture(D.pointerId)&&j.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=S.current,_.viewport&&(_.viewport.style.scrollBehavior=""),E.current=null})})})}),fc="ScrollAreaThumb",dS=w.forwardRef((e,t)=>
vendor: 4,353 bytes, lines 262-265
262{const{forceMount:n,...r}=e,s=uS(fc,e.__scopeScrollArea);return m.jsx(yi,{present:n||s.hasThumb,children:m.jsx(w2,{ref:t,...r})})}),w2=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,o=fn(fc,n),l=uS(fc,n),{onThumbPositionChange:u}=l,c=Te(t,g=>l.onThumbChange(g)),h=w.useRef(void 0),p=Xc(()=>{h.current&&(h.current(),h.current=void 0)},100);return w.useEffect(()=>{const g=o.viewport;if(g){const v=()=>{if(p(),!h.current){const _=S2(g,u);h.current=_,u()}};return u(),g.addEventListener("scroll",v),()=>g.removeEventListener("scroll",v)}},[o.viewport,p,u]),m.jsx(pe.div,{"data-state":l.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ae(e.onPointerDownCapture,g=>{const _=g.target.getBoundingClientRect(),k=g.clientX-_.left,y=g.clientY-_.top;l.onThumbPointerDown({x:k,y})}),onPointerUp:ae(e.onPointerUp,l.onThumbPointerUp)})});dS.displayName=fc;var Hm="ScrollAreaCorner",hS=w.forwardRef((e,t)=>{const n=fn(Hm,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(x2,{...e,ref:t}):null});hS.displayName=Hm;var x2=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=fn(Hm,n),[o,l]=w.useState(0),[u,c]=w.useState(0),h=!!(o&&u);return wo(s.scrollbarX,()=>{var g;const p=((g=s.scrollbarX)==null?void 0:g.offsetHeight)||0;s.onCornerHeightChange(p),c(p)}),wo(s.scrollbarY,()=>{var g;const p=((g=s.scrollbarY)==null?void 0:g.offsetWidth)||0;s.onCornerWidthChange(p),l(p)}),h?m.jsx(pe.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function pc(e){return e?parseInt(e,10):0}function fS(e,t){const n=e/t;return isNaN(n)?0:n}function Qc(e){const t=fS(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function b2(e,t,n,r="ltr"){const s=Qc(n),o=s/2,l=t||o,u=s-l,c=n.scrollbar.paddingStart+l,h=n.scrollbar.size-n.scrollbar.paddingEnd-u,p=n.content-n.viewport,g=r==="ltr"?[0,p]:[p*-1,0];return pS([c,h],g)(e)}function g_(e,t,n="ltr"){const r=Qc(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,l=t.content-t.viewport,u=o-r,c=n==="ltr"?[0,l]:[l*-1,0],h=el(e,c);return pS([0,l],[0,u])(h)}function pS(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 mS(e,t){return e>0&&e<t}var S2=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){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(s)}(),()=>window.cancelAnimationFrame(r)};function Xc(e,t){const n=at(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function wo(e,t){const n=at(t);ht(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var gS=sS,E2=aS,T2=hS;const vS=w.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(gS,{ref:r,className:Ce("relative overflow-hidden",e),...n,children:[m.jsx(E2,{className:"h-full w-full rounded-[inherit]",children:t}),m.jsx(yS,{}),m.jsx(T2,{})]}));vS.displayName=gS.displayName;const yS=w.forwardRef(({className:e,orientation:t="vertical",...n},r)=>m.jsx(Fm,{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:m.jsx(dS,{className:"relative flex-1 rounded-full bg-border"})}));yS.displayName=Fm.displayName;var op={exports:{}};/* @preserve
263 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
264 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
265 */(function(e,t){(function(n,r){r(t)})(uT,function(n){var r="1.9.4";function s(i){var a,d,f,b;for(d=1,f=arguments.length;d<f;d++){b=arguments[d];for(a in b)i[a]=b[a]}return i}var o=Object.create||function(){function i(){}return function(a){return i.prototype=a,new i}}();function l(i,a){var d=Array.prototype.slice;
265if(i.bind)return i.bind.apply(i,d.call(arguments,1));var f=d.call(arguments,2);return function(){return i.apply(a,f.length?f.concat(d.call(arguments)):arguments)}}var u=0;function c(i){return"_leaflet_id"in i||(i._leaflet_id=++u),i._leaflet_id}function h(i,a,d){var f,b,C,A;return A=function(){f=!1,b&&(C.apply(d,b),b=!1)},C=function(){f?b=arguments:(i.apply(d,arguments),setTimeout(A,a),f=!0)},C}function p(i,a,d){var f=a[1],b=a[0],C=f-b;return i===f&&d?i:((i-b)%C+C)%C+b}function g(){return!1}function v(i,a){if(a===!1)return i;var d=Math.pow(10,a===void 0?6:a);return Math.round(i*d)/d}function _(i){return i.trim?i.trim():i.replace(/^\s+|\s+$/g,"")}function k(i){return _(i).split(/\s+/)}function y(i,a){Object.prototype.hasOwnProperty.call(i,"options")||(i.options=i.options?o(i.options):{});for(var d in a)i.options[d]=a[d];return i.options}function T(i,a,d){var f=[];for(var b in i)f.push(encodeURIComponent(d?b.toUpperCase():b)+"="+encodeURIComponent(i[b]));return(!a||a.indexOf("?")===-1?"?":"&")+f.join("&")}var E=/\{ *([\w_ -]+) *\}/g;function S(i,a){return i.replace(E,function(d,f){var b=a[f];if(b===void 0)throw new Error("No value provided for variable "+d);return typeof b=="function"&&(b=b(a)),b})}var x=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"};function P(i,a){for(var d=0;d<i.length;d++)if(i[d]===a)return d;return-1}var R="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function N(i){return window["webkit"+i]||window["moz"+i]||window["ms"+i]}var O=0;function z(i){var a=+new Date,d=Math.max(0,16-(a-O));return O=a+d,window.setTimeout(i,d)}var D=window.requestAnimationFrame||N("RequestAnimationFrame")||z,j=window.cancelAnimationFrame||N("CancelAnimationFrame")||N("CancelRequestAnimationFrame")||function(i){window.clearTimeout(i)};function V(i,a,d){if(d&&D===z)i.call(a);else return D.call(window,l(i,a))}function H(i){i&&j.call(window,i)}var te={__proto__:null,extend:s,create:o,bind:l,get lastId(){return u},stamp:c,throttle:h,wrapNum:p,falseFn:g,formatNum:v,trim:_,splitWords:k,setOptions:y,getParamString:T,template:S,isArray:x,indexOf:P,emptyImageUrl:R,requestFn:D,cancelFn:j,requestAnimFrame:V,cancelAnimFrame:H};function G(){}G.extend=function(i){var a=function(){y(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},d=a.__super__=this.prototype,f=o(d);f.constructor=a,a.prototype=f;for(var b in this)Object.prototype.hasOwnProperty.call(this,b)&&b!=="prototype"&&b!=="__super__"&&(a[b]=this[b]);return i.statics&&s(a,i.statics),i.includes&&(ne(i.includes),s.apply(null,[f].concat(i.includes))),s(f,i),delete f.statics,delete f.includes,f.options&&(f.options=d.options?o(d.options):{},s(f.options,i.options)),f._initHooks=[],f.callInitHooks=function(){if(!this._initHooksCalled){d.callInitHooks&&d.callInitHooks.call(this),this._initHooksCalled=!0;for(var C=0,A=f._initHooks.length;C<A;C++)f._initHooks[C].call(this)}},a},G.include=function(i){var a=this.prototype.options;return s(this.prototype,i),i.options&&(this.prototype.options=a,this.mergeOptions(i.options)),this},G.mergeOptions=function(i){return s(this.prototype.options,i),this},G.addInitHook=function(i){var a=Array.prototype.slice.call(arguments,1),d=typeof i=="function"?i:function(){this[i].apply(this,a)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(d),this};function ne(i){if(!(typeof L>"u"||!L||!L.Mixin)){i=x(i)?i:[i];for(var a=0;a<i.length;
265a++)i[a]===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 W={on:function(i,a,d){if(typeof i=="object")for(var f in i)this._on(f,i[f],a);else{i=k(i);for(var b=0,C=i.length;b<C;b++)this._on(i[b],a,d)}return this},off:function(i,a,d){if(!arguments.length)delete this._events;else if(typeof i=="object")for(var f in i)this._off(f,i[f],a);else{i=k(i);for(var b=arguments.length===1,C=0,A=i.length;C<A;C++)b?this._off(i[C]):this._off(i[C],a,d)}return this},_on:function(i,a,d,f){if(typeof a!="function"){console.warn("wrong listener type: "+typeof a);return}if(this._listens(i,a,d)===!1){d===this&&(d=void 0);var b={fn:a,ctx:d};f&&(b.once=!0),this._events=this._events||{},this._events[i]=this._events[i]||[],this._events[i].push(b)}},_off:function(i,a,d){var f,b,C;if(this._events&&(f=this._events[i],!!f)){if(arguments.length===1){if(this._firingCount)for(b=0,C=f.length;b<C;b++)f[b].fn=g;delete this._events[i];return}if(typeof a!="function"){console.warn("wrong listener type: "+typeof a);return}var A=this._listens(i,a,d);if(A!==!1){var M=f[A];this._firingCount&&(M.fn=g,this._events[i]=f=f.slice()),f.splice(A,1)}}},fire:function(i,a,d){if(!this.listens(i,d))return this;var f=s({},a,{type:i,target:this,sourceTarget:a&&a.sourceTarget||this});if(this._events){var b=this._events[i];if(b){this._firingCount=this._firingCount+1||1;for(var C=0,A=b.length;C<A;C++){var M=b[C],B=M.fn;M.once&&this.off(i,B,M.ctx),B.call(M.ctx||this,f)}this._firingCount--}}return d&&this._propagateEvent(f),this},listens:function(i,a,d,f){typeof i!="string"&&console.warn('"string" type argument expected');var b=a;typeof a!="function"&&(f=!!a,b=void 0,d=void 0);var C=this._events&&this._events[i];if(C&&C.length&&this._listens(i,b,d)!==!1)return!0;if(f){for(var A in this._eventParents)if(this._eventParents[A].listens(i,a,d,f))return!0}return!1},_listens:function(i,a,d){if(!this._events)return!1;var f=this._events[i]||[];if(!a)return!!f.length;d===this&&(d=void 0);for(var b=0,C=f.length;b<C;b++)if(f[b].fn===a&&f[b].ctx===d)return b;return!1},once:function(i,a,d){if(typeof i=="object")for(var f in i)this._on(f,i[f],a,!0);else{i=k(i);for(var b=0,C=i.length;b<C;b++)this._on(i[b],a,d,!0)}return this},addEventParent:function(i){return this._eventParents=this._eventParents||{},this._eventParents[c(i)]=i,this},removeEventParent:function(i){return this._eventParents&&delete this._eventParents[c(i)],this},_propagateEvent:function(i){for(var a in this._eventParents)this._eventParents[a].fire(i.type,s({layer:i.target,propagatedFrom:i.target},i),!0)}};W.addEventListener=W.on,W.removeEventListener=W.clearAllEventListeners=W.off,W.addOneTimeEventListener=W.once,W.fireEvent=W.fire,W.hasEventListeners=W.listens;var Q=G.extend(W);function I(i,a,d){this.x=d?Math.round(i):i,this.y=d?Math.round(a):a}var $=Math.trunc||function(i){return i>0?Math.floor(i):Math.ceil(i)};I.prototype={clone:function(){return new I(this.x,this.y)},add:function(i){return this.clone()._add(F(i))},_add:function(i){return this.x+=i.x,this.y+=i.y,this},subtract:function(i){return this.clone()._subtract(F(i))},_subtract:function(i){return this.x-=i.x,this.y-=i.y,this},divideBy:function(i){return this.clone()._divideBy(i)},_divideBy:function(i){return this.x/=i,this.y/=i,this},multiplyBy:function(i){return this.clone()._multiplyBy(i)},_multiplyBy:function(i){return this.x*=i,this.y*=i,this},scaleBy:function(i){return new I(this.x*i.x,this.y*i.y)},unscaleBy:function(i){return new I(this.x/i.x,this.y/i.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=$(this.x),this.y=$(this.y),this},distanceTo:function(i){i=F(i);var a=i.x-this.x,d=i.y-this.y;return Math.sqrt(a*a+d*d)},equals:function(i){return i=F(i),i.x===this.x&&i.y===this.y},contains:function(i){return i=F(i),Math.abs(i.x)<=Math.abs(this.x)&&Math.abs(i.y)<=Math.abs(this.y)},toString:function(){return"Point("+v(this.x)+", "+v(this.y)+")"}};function F(i,a,d){return i instanceof I?i:x(i)?new I(i[0],i[1]):i==null?i:typeof i=="object"&&"x"in i&&"y"in i?new I(i.x,i.y):new I(i,a,d)}function X(i,a){if(i)for(var d=a?[i,a]:i,f=0,b=d.length;f<b;f++)this.extend(d[f])}X.prototype={extend:function(i){var a,d;if(!i)return this;if(i instanceof I||typeof i[0]=="number"||"x"in i)a=d=F(i);else if(i=ee(i),a=i.min,d=i.max,!a||!d)return this;return!this.min&&!this.max?(this.min=a.clone(),this.max=d.clone()):(this.min.x=Math.min(a.x,this.min.x),this.max.x=Math.max(d.x,this.max.x),this.min.y=Math.min(a.y,this.min.y),this.max.y=Math.max(d.y,this.max.y)),this},getCenter:function(i){return F((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,i)},getBottomLeft:function(){return F(this.min.x,this.max.y)},getTopRight:function(){return F(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(i){var a,d;return typeof i[0]=="number"||i instanceof I?i=F(i):i=ee(i),i instanceof X?(a=i.min,d=i.max):a=d=i,a.x>=this.min.x&&d.x<=this.max.x&&a.y>=this.min.y&&d.y<=this.max.y},intersects:function(i){i=ee(i);var a=this.min,d=this.max,f=i.min,b=i.max,C=b.x>=a.x&&f.x<=d.x,A=b.y>=a.y&&f.y<=d.y;return C&&A},overlaps:function(i){i=ee(i);var a=this.min,d=this.max,f=i.min,b=i.max,C=b.x>a.x&&f.x<d.x,A=b.y>a.y&&f.y<d.y;return C&&A},isValid:function(){return!!(this.min&&this.max)},pad:function(i){var a=this.min,d=this.max,f=Math.abs(a.x-d.x)*i,b=Math.abs(a.y-d.y)*i;return ee(F(a.x-f,a.y-b),F(d.x+f,d.y+b))},equals:function(i){return i?(i=ee(i),this.min.equals(i.getTopLeft())&&this.max.equals(i.getBottomRight())):!1}};function ee(i,a){return!i||i instanceof X?i:new X(i,a)}function le(i,a){if(i)for(var d=a?[i,a]:i,f=0,b=d.length;f<b;f++)this.extend(d[f])}le.prototype={extend:function(i){var a=this._southWest,d=this._northEast,f,b;if(i instanceof Y)f=i,b=i;else if(i instanceof le){if(f=i._southWest,b=i._northEast,!f||!b)return this}else return i?this.extend(ie(i)||se(i)):this;return!a&&!d?(this._southWest=new Y(f.lat,f.lng),this._northEast=new Y(b.lat,b.lng)):(a.lat=Math.min(f.lat,a.lat),a.lng=Math.min(f.lng,a.lng),d.lat=Math.max(b.lat,d.lat),d.lng=Math.max(b.lng,d.lng)),this},pad:function(i){var a=this._southWest,d=this._northEast,f=Math.abs(a.lat-d.lat)*i,b=Math.abs(a.lng-d.lng)*i;
265return new le(new Y(a.lat-f,a.lng-b),new Y(d.lat+f,d.lng+b))},getCenter:function(){return new Y((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 Y(this.getNorth(),this.getWest())},getSouthEast:function(){return new Y(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(i){typeof i[0]=="number"||i instanceof Y||"lat"in i?i=ie(i):i=se(i);var a=this._southWest,d=this._northEast,f,b;return i instanceof le?(f=i.getSouthWest(),b=i.getNorthEast()):f=b=i,f.lat>=a.lat&&b.lat<=d.lat&&f.lng>=a.lng&&b.lng<=d.lng},intersects:function(i){i=se(i);var a=this._southWest,d=this._northEast,f=i.getSouthWest(),b=i.getNorthEast(),C=b.lat>=a.lat&&f.lat<=d.lat,A=b.lng>=a.lng&&f.lng<=d.lng;return C&&A},overlaps:function(i){i=se(i);
265var a=this._southWest,d=this._northEast,f=i.getSouthWest(),b=i.getNorthEast(),C=b.lat>a.lat&&f.lat<d.lat,A=b.lng>a.lng&&f.lng<d.lng;return C&&A},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(i,a){return i?(i=se(i),this._southWest.equals(i.getSouthWest(),a)&&this._northEast.equals(i.getNorthEast(),a)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function se(i,a){return i instanceof le?i:new le(i,a)}function Y(i,a,d){if(isNaN(i)||isNaN(a))throw new Error("Invalid LatLng object: ("+i+", "+a+")");this.lat=+i,this.lng=+a,d!==void 0&&(this.alt=+d)}Y.prototype={equals:function(i,a){if(!i)return!1;i=ie(i);var d=Math.max(Math.abs(this.lat-i.lat),Math.abs(this.lng-i.lng));return d<=(a===void 0?1e-9:a)},toString:function(i){return"LatLng("+v(this.lat,i)+", "+v(this.lng,i)+")"},distanceTo:function(i){return me.distance(this,ie(i))},wrap:function(){return me.wrapLatLng(this)},toBounds:function(i){var a=180*i/40075017,d=a/Math.cos(Math.PI/180*this.lat);return se([this.lat-a,this.lng-d],[this.lat+a,this.lng+d])},clone:function(){return new Y(this.lat,this.lng,this.alt)}};function ie(i,a,d){return i instanceof Y?i:x(i)&&typeof i[0]!="object"?i.length===3?new Y(i[0],i[1],i[2]):i.length===2?new Y(i[0],i[1]):null:i==null?i:typeof i=="object"&&"lat"in i?new Y(i.lat,"lng"in i?i.lng:i.lon,i.alt):a===void 0?null:new Y(i,a,d)}var Z={latLngToPoint:function(i,a){var d=this.projection.project(i),f=this.scale(a);return this.transformation._transform(d,f)},pointToLatLng:function(i,a){var d=this.scale(a),f=this.transformation.untransform(i,d);return this.projection.unproject(f)},project:function(i){return this.projection.project(i)},unproject:function(i){return this.projection.unproject(i)},scale:function(i){return 256*Math.pow(2,i)},zoom:function(i){return Math.log(i/256)/Math.LN2},getProjectedBounds:function(i){if(this.infinite)return null;var a=this.projection.bounds,d=this.scale(i),f=this.transformation.transform(a.min,d),b=this.transformation.transform(a.max,d);return new X(f,b)},infinite:!1,wrapLatLng:function(i){var a=this.wrapLng?p(i.lng,this.wrapLng,!0):i.lng,d=this.wrapLat?p(i.lat,this.wrapLat,!0):i.lat,f=i.alt;return new Y(d,a,f)},wrapLatLngBounds:function(i){var a=i.getCenter(),d=this.wrapLatLng(a),f=a.lat-d.lat,b=a.lng-d.lng;if(f===0&&b===0)return i;
265var C=i.getSouthWest(),A=i.getNorthEast(),M=new Y(C.lat-f,C.lng-b),B=new Y(A.lat-f,A.lng-b);return new le(M,B)}},me=s({},Z,{wrapLng:[-180,180],R:6371e3,distance:function(i,a){var d=Math.PI/180,f=i.lat*d,b=a.lat*d,C=Math.sin((a.lat-i.lat)*d/2),A=Math.sin((a.lng-i.lng)*d/2),M=C*C+Math.cos(f)*Math.cos(b)*A*A,B=2*Math.atan2(Math.sqrt(M),Math.sqrt(1-M));return this.R*B}}),Oe=6378137,xe={R:Oe,MAX_LATITUDE:85.0511287798,project:function(i){var a=Math.PI/180,d=this.MAX_LATITUDE,f=Math.max(Math.min(d,i.lat),-d),b=Math.sin(f*a);return new I(this.R*i.lng*a,this.R*Math.log((1+b)/(1-b))/2)},unproject:function(i){var a=180/Math.PI;return new Y((2*Math.atan(Math.exp(i.y/this.R))-Math.PI/2)*a,i.x*a/this.R)},bounds:function(){var i=Oe*Math.PI;return new X([-i,-i],[i,i])}()};function be(i,a,d,f){if(x(i)){this._a=i[0],this._b=i[1],this._c=i[2],this._d=i[3];return}this._a=i,this._b=a,this._c=d,this._d=f}be.prototype={transform:function(i,a){return this._transform(i.clone(),a)},_transform:function(i,a){return a=a||1,i.x=a*(this._a*i.x+this._b),i.y=a*(this._c*i.y+this._d),i},untransform:function(i,a){return a=a||1,new I((i.x/a-this._b)/this._a,(i.y/a-this._d)/this._c)}};function Se(i,a,d,f){return new be(i,a,d,f)}var et=s({},me,{code:"EPSG:3857",projection:xe,transformation:function(){var i=.5/(Math.PI*xe.R);return Se(i,.5,-i,.5)}()}),It=s({},et,{code:"EPSG:900913"});function Mn(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function pn(i,a){var d="",f,b,C,A,M,B;for(f=0,C=i.length;f<C;f++){for(M=i[f],b=0,A=M.length;b<A;b++)B=M[b],d+=(b?"L":"M")+B.x+" "+B.y;d+=a?ce.svg?"z":"x":""}return d||"M0 0"}var mn=document.documentElement.style,jn="ActiveXObject"in window,Nr=jn&&!document.addEventListener,Ao="msLaunchUri"in navigator&&!("documentMode"in document),ar=Un("webkit"),No=Un("android"),Dn=Un("android 2")||Un("android 3"),ad=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ld=No&&Un("Google")&&ad<537&&!("AudioNode"in window),_t=!!window.opera,lr=!Ao&&Un("chrome"),pl=Un("gecko")&&!ar&&!_t&&!jn,ud=!lr&&Un("safari"),xi=Un("phantom"),ml="OTransition"in mn,gl=navigator.platform.indexOf("Win")===0,os=jn&&"transition"in mn,zn="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Dn,Oo="MozPerspective"in mn,Or=!window.L_DISABLE_3D&&(os||zn||Oo)&&!ml&&!xi,bi=typeof orientation<"u"||Un("mobile"),cd=bi&&ar,vl=bi&&zn,Lo=!window.PointerEvent&&window.MSPointerEvent,yl=!!(window.PointerEvent||Lo),as="ontouchstart"in window||!!window.TouchEvent,Bn=!window.L_NO_TOUCH&&(as||yl),dd=bi&&_t,ge=bi&&pl,Le=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Me=function(){var i=!1;try{var a=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("testPassiveEventSupport",g,a),window.removeEventListener("testPassiveEventSupport",g,a)}catch{}return i}(),Ht=function(){return!!document.createElement("canvas").getContext}(),kt=!!(document.createElementNS&&Mn("svg").createSVGRect),$n=!!kt&&function(){var i=document.createElement("div");return i.innerHTML="<svg/>",(i.firstChild&&i.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),ur=!kt&&function(){try{var i=document.createElement("div");i.innerHTML='<v:shape adj="1"/>';var a=i.firstChild;return a.style.behavior="url(#default#VML)",a&&typeof a.adj=="object"}catch{return!1}}(),Vt=navigator.platform.indexOf("Mac")===0,Fn=navigator.platform.indexOf("Linux")===0;function Un(i){return navigator.userAgent.toLowerCase().indexOf(i)>=0}var ce={ie:jn,ielt9:Nr,edge:Ao,webkit:ar,android:No,android23:Dn,androidStock:ld,opera:_t,chrome:lr,gecko:pl,safari:ud,phantom:xi,opera12:ml,win:gl,ie3d:os,webkit3d:zn,gecko3d:Oo,any3d:Or,mobile:bi,mobileWebkit:cd,mobileWebkit3d:vl,msPointer:Lo,pointer:yl,touch:Bn,touchNative:as,mobileOpera:dd,mobileGecko:ge,retina:Le,passiveEvents:Me,canvas:Ht,svg:kt,vml:ur,inlineSvg:$n,mac:Vt,linux:Fn},Km=ce.msPointer?"MSPointerDown":"pointerdown",Zm=ce.msPointer?"MSPointerMove":"pointermove",Ym=ce.msPointer?"MSPointerUp":"pointerup",Jm=ce.msPointer?"MSPointerCancel":"pointercancel",hd={touchstart:Km,touchmove:Zm,touchend:Ym,touchcancel:Jm},Qm={touchstart:lE,touchmove:_l,touchend:_l,touchcancel:_l},ls={},Xm=!1;function rE(i,a,d){return a==="touchstart"&&aE(),Qm[a]?(d=Qm[a].bind(this,d),i.addEventListener(hd[a],d,!1),d):(console.warn("wrong event specified:",a),g)}function iE(i,a,d){if(!hd[a]){console.warn("wrong event specified:",a);return}i.removeEventListener(hd[a],d,!1)}function sE(i){ls[i.pointerId]=i}function oE(i){ls[i.pointerId]&&(ls[i.pointerId]=i)}function eg(i){delete ls[i.pointerId]}function aE(){Xm||(document.addEventListener(Km,sE,!0),document.addEventListener(Zm,oE,!0),document.addEventListener(Ym,eg,!0),document.addEventListener(Jm,eg,!0),Xm=!0)}function _l(i,a){if(a.pointerType!==(a.MSPOINTER_TYPE_MOUSE||"mouse")){a.touches=[];for(var d in ls)a.touches.push(ls[d]);a.changedTouches=[a],i(a)}}function lE(i,a){a.MSPOINTER_TYPE_TOUCH&&a.pointerType===a.MSPOINTER_TYPE_TOUCH&&ft(a
265),_l(i,a)}function uE(i){var a={},d,f;for(f in i)d=i[f],a[f]=d&&d.bind?d.bind(i):d;return i=a,a.type="dblclick",a.detail=2,a.isTrusted=!1,a._simulated=!0,a}var cE=200;function dE(i,a){i.addEventListener("dblclick",a);var d=0,f;function b(C){if(C.detail!==1){f=C.detail;return}if(!(C.pointerType==="mouse"||C.sourceCapabilities&&!C.sourceCapabilities.firesTouchEvents)){var A=sg(C);if(!(A.some(function(B){return B instanceof HTMLLabelElement&&B.attributes.for})&&!A.some(function(B){return B instanceof HTMLInputElement||B instanceof HTMLSelectElement}))){var M=Date.now();M-d<=cE?(f++,f===2&&a(uE(C))):f=1,d=M}}}return i.addEventListener("click",b),{dblclick:a,simDblclick:b}}function hE(i,a){i.removeEventListener("dblclick",a.dblclick),i.removeEventListener("click",a.simDblclick)}var fd=bl(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Io=bl(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tg=Io==="webkitTransition"||Io==="OTransition"?Io+"End":"transitionend";function ng(i){return typeof i=="string"?document.getElementById(i):i}function Mo(i,a){var d=i.style[a]||i.currentStyle&&i.currentStyle[a];if((!d||d==="auto")&&document.defaultView){var f=document.defaultView.getComputedStyle(i,null);d=f?f[a]:null}return d==="auto"?null:d}function Ae(i,a,d){var f=document.createElement(i);return f.className=a||"",d&&d.appendChild(f),f}function He(i){var a=i.parentNode;a&&a.removeChild(i)}function wl(i){for(;i.firstChild;)i.removeChild(i.firstChild)}function us(i){var a=i.parentNode;a&&a.lastChild!==i&&a.appendChild(i)}function cs(i){var a=i.parentNode;a&&a.firstChild!==i&&a.insertBefore(i,a.firstChild)}function pd(i,a){if(i.classList!==void 0)return i.classList.contains(a);var d=xl(i);return d.length>0&&new RegExp("(^|\\s)"+a+"(\\s|$)").test(d)}function we(i,a){if(i.classList!==void 0)for(var d=k(a),f=0,b=d.length;f<b;f++)i.classList.add(d[f]);else if(!pd(i,a)){var C=xl(i);md(i,(C?C+" ":"")+a)}}function Qe(i,a){i.classList!==void 0?i.classList.remove(a):md(i,_((" "+xl(i)+" ").replace(" "+a+" "," ")))}function md(i,a){i.className.baseVal===void 0?i.className=a:i.className.baseVal=a}function xl(i){return i.correspondingElement&&(i=i.correspondingElement),i.className.baseVal===void 0?i.className:i.className.baseVal}function nn(i,a){"opacity"in i.style?i.style.opacity=a:"filter"in i.style&&fE(i,a)}function fE(i,a){var d=!1,f="DXImageTransform.Microsoft.Alpha";try{d=i.filters.item(f)}catch{if(a===1)return}a=Math.round(a*100),d?(d.Enabled=a!==100,d.Opacity=a):i.style.filter+=" progid:"+f+"(opacity="+a+")"}function bl(i){for(var a=document.documentElement.style,d=0;d<i.length;d++)if(i[d]in a)return i[d];return!1}function Si(i,a,d){var f=a||new I(0,0);i.style[fd]=(ce.ie3d?"translate("+f.x+"px,"+f.y+"px)":"translate3d("+f.x+"px,"+f.y+"px,0)")+(d?" scale("+d+")":"")}function tt(i,a){i._leaflet_pos=a,ce.any3d?Si(i,a):(i.style.left=a.x+"px",i.style.top=a.y+"px")}function Ei(i){return i._leaflet_pos||new I(0,0)}var jo,Do,gd;if("onselectstart"in document)jo=function(){ye(window,"selectstart",ft)},Do=function(){je(window,"selectstart",ft)};else{var zo=bl(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);jo=function(){if(zo){var i=document.documentElement.style;gd=i[zo],i[zo]="none"}},Do=function(){zo&&(document.documentElement.style[zo]=gd,gd=void 0)}}function vd(){ye(window,"dragstart",ft)}function yd(){je(window,"dragstart",ft)}var Sl,_d;function wd(i){for(;i.tabIndex===-1;)i=i.parentNode;i.style&&(El(),Sl=i,_d=i.style.outlineStyle,i.style.outlineStyle="none",ye(window,"keydown",El))}function El(){Sl&&(Sl.style.outlineStyle=_d,Sl=void 0,_d=void 0,je(window,"keydown",El))}function rg(i){do i=i.parentNode;while((!i.offsetWidth||!i.offsetHeight)&&i!==document.body);return i}function xd(i){var a=i.getBoundingClientRect();return{x:a.width/i.offsetWidth||1,y:a.height/i.offsetHeight||1,boundingClientRect:a}}var pE={__proto__:null,TRANSFORM:fd,TRANSITION:Io,TRANSITION_END:tg,get:ng,getStyle:Mo,create:Ae,remove:He,empty:wl,toFront:us,toBack:cs,hasClass:pd,addClass:we,removeClass:Qe,setClass:md,getClass:xl,setOpacity:nn,testProp:bl,setTransform:Si,setPosition:tt,getPosition:Ei,get disableTextSelection(){return jo},get enableTextSelection(){return Do},disableImageDrag:vd,enableImageDrag:yd,preventOutline:wd,restoreOutline:El,getSizedParentNode:rg,getScale:xd};function ye(i,a,d,f){if(a&&typeof a=="object")for(var b in a)Sd(i,b,a[b],d);else{a=k(a);for(var C=0,A=a.length;C<A;C++)Sd(i,a[C],d,f)}return this}var Hn="_leaflet_events";function je(i,a,d,f){if(arguments.length===1)ig(i),delete i[Hn];else if(a&&typeof a=="object")for(var b in a)Ed(i,b,a[b],d);else if(a=k(a),arguments.length===2)ig(i,function(M){return P(a,M)!==-1});else for(var C=0,A=a.length;C<A;C++)Ed(i,a[C],d,f);return this}function ig(i,a){for(var d in i[Hn]){var f=d.split(/\d/)[0];(!a||a(f))&&Ed(i,f,null,null,d)}}
265var bd={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Sd(i,a,d,f){var b=a+c(d)+(f?"_"+c(f):"");if(i[Hn]&&i[Hn][b])return this;var C=function(M){return d.call(f||i,M||window.event)},A=C;!ce.touchNative&&ce.pointer&&a.indexOf("touch")===0?C=rE(i,a,C):ce.touch&&a==="dblclick"?C=dE(i,C):"addEventListener"in i?a==="touchstart"||a==="touchmove"||a==="wheel"||a==="mousewheel"?i.addEventListener(bd[a]||a,C,ce.passiveEvents?{passive:!1}:!1):a==="mouseenter"||a==="mouseleave"?(C=function(M){M=M||window.event,kd(i,M)&&A(M)},i.addEventListener(bd[a],C,!1)):i.addEventListener(a,A,!1):i.attachEvent("on"+a,C),i[Hn]=i[Hn]||{},i[Hn][b]=C}function Ed(i,a,d,f,b){b=b||a+c(d)+(f?"_"+c(f):"");var C=i[Hn]&&i[Hn][b];if(!C)return this;!ce.touchNative&&ce.pointer&&a.indexOf("touch")===0?iE(i,a,C):ce.touch&&a==="dblclick"?hE(i,C):"removeEventListener"in i?i.removeEventListener(bd[a]||a,C,!1):i.detachEvent("on"+a,C),i[Hn][b]=null}function Ti(i){return i.stopPropagation?i.stopPropagation():i.originalEvent?i.originalEvent._stopped=!0:i.cancelBubble=!0,this}function Td(i){return Sd(i,"wheel",Ti),this}function Bo(i){return ye(i,"mousedown touchstart dblclick contextmenu",Ti),i._leaflet_disable_click=!0,this}function ft(i){return i.preventDefault?i.preventDefault():i.returnValue=!1,this}function ki(i){return ft(i),Ti(i),this}function sg(i){if(i.composedPath)return i.composedPath();for(var a=[],d=i.target;d;)a.push(d),d=d.parentNode;return a}function og(i,a){if(!a)return new I(i.clientX,i.clientY);var d=xd(a),f=d.boundingClientRect;return new I((i.clientX-f.left)/d.x-a.clientLeft,(i.clientY-f.top)/d.y-a.clientTop)}var mE=ce.linux&&ce.chrome?window.devicePixelRatio:ce.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ag(i){return ce.edge?i.wheelDeltaY/2:i.deltaY&&i.deltaMode===0?-i.deltaY/mE:i.deltaY&&i.deltaMode===1?-i.deltaY*20:i.deltaY&&i.deltaMode===2?-i.deltaY*60:i.deltaX||i.deltaZ?0:i.wheelDelta?(i.wheelDeltaY||i.wheelDelta)/2:i.detail&&Math.abs(i.detail)<32765?-i.detail*20:i.detail?i.detail/-32765*60:0}function kd(i,a){var d=a.relatedTarget;if(!d)return!0;try{for(;d&&d!==i;)d=d.parentNode}catch{return!1}return d!==i}var gE={__proto__:null,on:ye,off:je,stopPropagation:Ti,disableScrollPropagation:Td,disableClickPropagation:Bo,preventDefault:ft,stop:ki,getPropagationPath:sg,getMousePosition:og,getWheelDelta:ag,isExternalTarget:kd,addListener:ye,removeListener:je},lg=Q.extend({run:function(i,a,d,f){this.stop(),this._el=i,this._inProgress=!0,this._duration=d||.25,this._easeOutPower=1/Math.max(f||.5,.2),this._startPos=Ei(i),this._offset=a.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=V(this._animate,this),this._step()},_step:function(i){var a=+new Date-this._startTime,d=this._duration*1e3;a<d?this._runFrame(this._easeOut(a/d),i):(this._runFrame(1),this._complete())},_runFrame:function(i,a){var d=this._startPos.add(this._offset.multiplyBy(i));a&&d._round(),tt(this._el,d),this.fire("step")},_complete:function(){H(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(i){return 1-Math.pow(1-i,this._easeOutPower)}}),Pe=Q.extend({options:{crs:et,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(i,a){a=y(this,a),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(i),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),a.maxBounds&&this.setMaxBounds(a.maxBounds),a.zoom!==void 0&&(this._zoom=this._limitZoom(a.zoom)),a.center&&a.zoom!==void 0&&this.setView(ie(a.center),a.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Io&&ce.any3d&&!ce.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ye(this._proxy,tg,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
vendor: 8,600 bytes, line 265
265,setView:function(i,a,d){if(a=a===void 0?this._zoom:this._limitZoom(a),i=this._limitCenter(ie(i),a,this.options.maxBounds),d=d||{},this._stop(),this._loaded&&!d.reset&&d!==!0){d.animate!==void 0&&(d.zoom=s({animate:d.animate},d.zoom),d.pan=s({animate:d.animate,duration:d.duration},d.pan));var f=this._zoom!==a?this._tryAnimatedZoom&&this._tryAnimatedZoom(i,a,d.zoom):this._tryAnimatedPan(i,d.pan);if(f)return clearTimeout(this._sizeTimer),this}return this._resetView(i,a,d.pan&&d.pan.noMoveStart),this},setZoom:function(i,a){return this._loaded?this.setView(this.getCenter(),i,{zoom:a}):(this._zoom=i,this)},zoomIn:function(i,a){return i=i||(ce.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+i,a)},zoomOut:function(i,a){return i=i||(ce.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-i,a)},setZoomAround:function(i,a,d){var f=this.getZoomScale(a),b=this.getSize().divideBy(2),C=i instanceof I?i:this.latLngToContainerPoint(i),A=C.subtract(b).multiplyBy(1-1/f),M=this.containerPointToLatLng(b.add(A));return this.setView(M,a,{zoom:d})},_getBoundsCenterZoom:function(i,a){a=a||{},i=i.getBounds?i.getBounds():se(i);var d=F(a.paddingTopLeft||a.padding||[0,0]),f=F(a.paddingBottomRight||a.padding||[0,0]),b=this.getBoundsZoom(i,!1,d.add(f));if(b=typeof a.maxZoom=="number"?Math.min(a.maxZoom,b):b,b===1/0)return{center:i.getCenter(),zoom:b};var C=f.subtract(d).divideBy(2),A=this.project(i.getSouthWest(),b),M=this.project(i.getNorthEast(),b),B=this.unproject(A.add(M).divideBy(2).add(C),b);return{center:B,zoom:b}},fitBounds:function(i,a){if(i=se(i),!i.isValid())throw new Error("Bounds are not valid.");var d=this._getBoundsCenterZoom(i,a);return this.setView(d.center,d.zoom,a)},fitWorld:function(i){return this.fitBounds([[-90,-180],[90,180]],i)},panTo:function(i,a){return this.setView(i,this._zoom,{pan:a})},panBy:function(i,a){if(i=F(i).round(),a=a||{},!i.x&&!i.y)return this.fire("moveend");if(a.animate!==!0&&!this.getSize().contains(i))return this._resetView(this.unproject(this.project(this.getCenter()).add(i)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new lg,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),a.noMoveStart||this.fire("movestart"),a.animate!==!1){we(this._mapPane,"leaflet-pan-anim");var d=this._getMapPanePos().subtract(i).round();this._panAnim.run(this._mapPane,d,a.duration||.25,a.easeLinearity)}else this._rawPanBy(i),this.fire("move").fire("moveend");return this},flyTo:function(i,a,d){if(d=d||{},d.animate===!1||!ce.any3d)return this.setView(i,a,d);this._stop();var f=this.project(this.getCenter()),b=this.project(i),C=this.getSize(),A=this._zoom;i=ie(i),a=a===void 0?A:a;var M=Math.max(C.x,C.y),B=M*this.getZoomScale(A,a),q=b.distanceTo(f)||1,re=1.42,fe=re*re;function Ee(nt){var jl=nt?-1:1,iT=nt?B:M,sT=B*B-M*M+jl*fe*fe*q*q,oT=2*iT*fe*q,Dd=sT/oT,Ug=Math.sqrt(Dd*Dd+1)-Dd,aT=Ug<1e-9?-18:Math.log(Ug);return aT}function Ct(nt){return(Math.exp(nt)-Math.exp(-nt))/2}function ut(nt){return(Math.exp(nt)+Math.exp(-nt))/2}function sn(nt){return Ct(nt)/ut(nt)}var Mt=Ee(0);function gs(nt){return M*(ut(Mt)/ut(Mt+re*nt))}function eT(nt){return M*(ut(Mt)*sn(Mt+re*nt)-Ct(Mt))/fe}function tT(nt){return 1-Math.pow(1-nt,1.5)}var nT=Date.now(),$g=(Ee(1)-Mt)/re,rT=d.duration?1e3*d.duration:1e3*$g*.8;function Fg(){var nt=(Date.now()-nT)/rT,jl=tT(nt)*$g;nt<=1?(this._flyToFrame=V(Fg,this),this._move(this.unproject(f.add(b.subtract(f).multiplyBy(eT(jl)/q)),A),this.getScaleZoom(M/gs(jl),A),{flyTo:!0})):this._move(i,a)._moveEnd(!0)}return this._moveStart(!0,d.noMoveStart),Fg.call(this),this},flyToBounds:function(i,a){var d=this._getBoundsCenterZoom(i,a);return this.flyTo(d.center,d.zoom,a)},setMaxBounds:function(i){return i=se(i),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),i.isValid()?(this.options.maxBounds=i,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(i){var a=this.options.minZoom;return this.options.minZoom=i,this._loaded&&a!==i&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(i):this},setMaxZoom:function(i){var a=this.options.maxZoom;return this.options.maxZoom=i,this._loaded&&a!==i&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(i):this},panInsideBounds:function(i,a){this._enforcingBounds=!0;var d=this.getCenter(),f=this._limitCenter(d,this._zoom,se(i));return d.equals(f)||this.panTo(f,a),this._enforcingBounds=!1,this},panInside:function(i,a){a=a||{};var d=F(a.paddingTopLeft||a.padding||[0,0]),f=F(a.paddingBottomRight||a.padding||[0,0]),b=this.project(this.getCenter()),C=this.project(i),A=this.getPixelBounds(),M=ee([A.min.add(d),A.max.subtract(f)]),B=M.getSize();if(!M.contains(C)){this._enforcingBounds=!0;var q=C.subtract(M.getCenter()),re=M.extend(C).getSize().subtract(B);b.x+=q.x<0?-re.x:re.x,b.y+=q.y<0?-re.y:re.y,this.panTo(this.unproject(b),a),this._enforcingBounds=!1}return this},invalidateSize:function(i){if(!this._loaded)return this;i=s({animate:!1,pan:!0},i===!0?{animate:!0}:i);var a=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var d=this.getSize(),f=a.divideBy(2).round(),b=d.divideBy(2).round(),C=f.subtract(b);return!C.x&&!C.y?this:(i.animate&&i.pan?this.panBy(C):(i.pan&&this._rawPanBy(C),this.fire("move"),i.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:a,newSize:d}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(i){if(i=this._locateOptions=s({timeout:1e4,watch:!1},i),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var a=l(this._handleGeolocationResponse,this),d=l(this._handleGeolocationError,this);return i.watch?this._locationWatchId=navigator.geolocation.watchPosition(a,d,i):navigator.geolocation.getCurrentPosition(a,d,i),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(i){if(this._container._leaflet_id){var a=i.code,d=i.message||(a===1?"permission denied":a===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:a,message:"Geolocation error: "+d+"."})}},_handleGeolocationResponse:function(i){if(this._container._leaflet_id){var a=i.coords.latitude,d=i.coords.longitude,f=new Y(a,d),b=f.toBounds(i.coords.accuracy*2),C=this._locateOptions;if(C.setView){var A=this.getBoundsZoom(b);this.setView(f,C.maxZoom?Math.min(A,C.maxZoom):A)}var M={latlng:f,bounds:b,timestamp:i.timestamp};for(var B in i.coords)typeof i.coords[B]=="number"&&(M[B]=i.coords[B]);this.fire("locationfound",M)}},addHandler:function(i,a){if(!a)return this;var d=this[i]=new a(this);return this._handlers.push(d),this.options[i]&&d.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(),He(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(H(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var i;for(i in this._layers)this._layers[i].remove();for(i in this._panes)He(this._panes[i]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(i,a){var d="leaflet-pane"+(i?" leaflet-"+i.replace("Pane","")+"-pane":""),f=Ae("div",d,a||this._mapPane);return i&&(this._panes[i]=f),f},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var i=this.getPixelBounds(),a=this.unproject(i.getBottomLeft()),d=this.unproject(i.getTopRight());return new le(a,d)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZo
265om===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(i,a,d){i=se(i),d=F(d||[0,0]);var f=this.getZoom()||0,b=this.getMinZoom(),C=this.getMaxZoom(),A=i.getNorthWest(),M=i.getSouthEast(),B=this.getSize().subtract(d),q=ee(this.project(M,f),this.project(A,f)).getSize(),re=ce.any3d?this.options.zoomSnap:1,fe=B.x/q.x,Ee=B.y/q.y,Ct=a?Math.max(fe,Ee):Math.min(fe,Ee);return f=this.getScaleZoom(Ct,f),re&&(f=Math.round(f/(re/100))*(re/100),f=a?Math.ceil(f/re)*re:Math.floor(f/re)*re),Math.max(b,Math.min(C,f))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new I(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(i,a){var d=this._getTopLeftPoint(i,a);return new X(d,d.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(i){return this.options.crs.getProjectedBounds(i===void 0?this.getZoom():i)},getPane:function(i){return typeof i=="string"?this._panes[i]:i},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(i,a){var d=this.options.crs;return a=a===void 0?this._zoom:a,d.scale(i)/d.scale(a)},getScaleZoom:function(i,a){var d=this.options.crs;a=a===void 0?this._zoom:a;var f=d.zoom(i*d.scale(a));return isNaN(f)?1/0:f},project:function(i,a){return a=a===void 0?this._zoom:a,this.options.crs.latLngToPoint(ie(i),a)},unproject:function(i,a){return a=a===void 0?this._zoom:a,this.options.crs.pointToLatLng(F(i),a)},layerPointToLatLng:function(i){var a=F(i).add(this.getPixelOrigin());return this.unproject(a)},latLngToLayerPoint:function(i){var a=this.project(ie(i))._round();return a._subtract(this.getPixelOrigin())},wrapLatLng:function(i){return this.options.crs.wrapLatLng(ie(i))},wrapLatLngBounds:function(i){return this.options.crs.wrapLatLngBounds(se(i))},distance:function(i,a){return this.options.crs.distance(ie(i),ie(a))},containerPointToLayerPoint:function(i){return F(i).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(i){return F(i).add(this._getMapPanePos())},containerPointToLatLng:function(i){var a=this.containerPointToLayerPoint(F(i));
265return this.layerPointToLatLng(a)},latLngToContainerPoint:function(i){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ie(i)))},mouseEventToContainerPoint:function(i){return og(i,this._container)},mouseEventToLayerPoint:function(i){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(i))},mouseEventToLatLng:function(i){return this.layerPointToLatLng(this.mouseEventToLayerPoint(i))},_initContainer:function(i){var a=this._container=ng(i);if(a){if(a._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ye(a,"scroll",this._onScroll,this),this._containerId=c(a)},_initLayout:function(){var i=this._container;this._fadeAnimated=this.options.fadeAnimation&&ce.any3d,we(i,"leaflet-container"+(ce.touch?" leaflet-touch":"")+(ce.retina?" leaflet-retina":"")+(ce.ielt9?" leaflet-oldie":"")+(ce.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var a=Mo(i,"position");a!=="absolute"&&a!=="relative"&&a!=="fixed"&&a!=="sticky"&&(i.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var i=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),tt(this._mapPane,new I(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(we(i.markerPane,"leaflet-zoom-hide"),we(i.shadowPane,"leaflet-zoom-hide"))},_resetView:function(i,a,d){tt(this._mapPane,new I(0,0));var f=!this._loaded;this._loaded=!0,a=this._limitZoom(a),this.fire("viewprereset");var b=this._zoom!==a;this._moveStart(b,d)._move(i,a)._moveEnd(b),this.fire("viewreset"),f&&this.fire("load")},_moveStart:function(i,a){return i&&this.fire("zoomstart"),a||this.fire("movestart"),this},_move:function(i,a,d,f){a===void 0&&(a=this._zoom);var b=this._zoom!==a;return this._zoom=a,this._lastCenter=i,this._pixelOrigin=this._getNewPixelOrigin(i),f?d&&d.pinch&&this.fire("zoom",d):((b||d&&d.pinch)&&this.fire("zoom",d),this.fire("move",d)),this},_moveEnd:function(i){return i&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return H(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(i){tt(this._mapPane,this._getMapPanePos().subtract(i))},_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(i){this._targets={},this._targets[c(this._container)]=this;var a=i?je:ye;a(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&a(window,"resize",this._onResize,this),ce.any3d&&this.options.transform3DLimit&&(i?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){H(this._resizeRequest),this._resizeRequest=V(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var i=this._getMapPanePos();Math.max(Math.abs(i.x),Math.abs(i.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(i,a){for(var d=[],f,b=a==="mouseout"||a==="mouseover",C=i.target||i.srcElement,A=!1;C;){if(f=this._targets[c(C)],f&&(a==="click"||a==="preclick")&&this._draggableMoved(f)){A=!0;break}if(f&&f.listens(a,!0)&&(b&&!kd(C,i)||(d.push(f),b))||C===this._container)break;C=C.parentNode}return!d.length&&!A&&!b&&this.listens(a,!0)&&(d=[this]),d},_isClickDisabled:function(i){for(;i&&i!==this._container;){if(i._leaflet_disable_click)return!0;i=i.parentNode}},_handleDOMEvent:function(i){var a=i.target||i.srcElement;if(!(!this._loaded||a._leaflet_disable_events||i.type==="click"&&this._isClickDisabled(a))){var d=i.type;d==="mousedown"&&wd(a),this._fireDOMEvent(i,d)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(i,a,d){if(i.type==="click"){var f=s({},i);f.type="preclick",this._fireDOMEvent(f,f.type,d)}var b=this._findEventTargets(i,a);if(d){for(var C=[],A=0;A<d.length;A++)d[A].listens(a,!0)&&C.push(d[A]);b=C.concat(b)}if(b.length){a==="contextmenu"&&ft(i);var M=b[0],B={originalEvent:i};if(i.type!=="keypress"&&i.type!=="keydown"&&i.type!=="keyup"){var q=M.getLatLng&&(!M._radius||M._radius<=10);B.containerPoint=q?this.latLngToContainerPoint(M.getLatLng()):this.mouseEventToContainerPoint(i),B.layerPoint=this.containerPointToLayerPoint(B.containerPoint),B.latlng=q?M.getLatLng():this.layerPointToLatLng(B.layerPoint)}for(A=0;A<b.length;A++)if(b[A].fire(a,B,!0),B.originalEvent._stopped||b[A].options.bubblingMouseEvents===!1&&P(this._mouseEvents,a)!==-1)return}},_draggableMoved:function(i){return i=i.dragging&&i.dragging.enabled()?i:this,i.dragging&&i.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var i=0,a=this._handlers.length;i<a;i++)this._handlers[i].disable()},whenReady:function(i,a){return this._loaded?i.call(a||this,{target:this}):this.on("load",i,a),this},_getMapPanePos:function(){return Ei(this._mapPane)||new I(0,0)},_moved:function(){var i=this._getMapPanePos();return i&&!i.equals([0,0])},_getTopLeftPoint:function(i,a){var d=i&&a!==void 0?this._getNewPixelOrigin(i,a):this.getPixelOrigin();return d.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(i,a){var d=this.getSize()._divideBy(2);return this.project(i,a)._subtract(d)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(i,a,d){var f=this._getNewPixelOrigin(d,a);return this.project(i,a)._subtract(f)},_latLngBoundsToNewLayerBounds:function(i,a,d){var f=this._getNewPixelOrigin(d,a);
vendor: 19,150 bytes, line 265
265return ee([this.project(i.getSouthWest(),a)._subtract(f),this.project(i.getNorthWest(),a)._subtract(f),this.project(i.getSouthEast(),a)._subtract(f),this.project(i.getNorthEast(),a)._subtract(f)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(i){return this.latLngToLayerPoint(i).subtract(this._getCenterLayerPoint())},_limitCenter:function(i,a,d){if(!d)return i;var f=this.project(i,a),b=this.getSize().divideBy(2),C=new X(f.subtract(b),f.add(b)),A=this._getBoundsOffset(C,d,a);return Math.abs(A.x)<=1&&Math.abs(A.y)<=1?i:this.unproject(f.add(A),a)},_limitOffset:function(i,a){if(!a)return i;var d=this.getPixelBounds(),f=new X(d.min.add(i),d.max.add(i));return i.add(this._getBoundsOffset(f,a))},_getBoundsOffset:function(i,a,d){var f=ee(this.project(a.getNorthEast(),d),this.project(a.getSouthWest(),d)),b=f.min.subtract(i.min),C=f.max.subtract(i.max),A=this._rebound(b.x,-C.x),M=this._rebound(b.y,-C.y);return new I(A,M)},_rebound:function(i,a){return i+a>0?Math.round(i-a)/2:Math.max(0,Math.ceil(i))-Math.max(0,Math.floor(a))},_limitZoom:function(i){var a=this.getMinZoom(),d=this.getMaxZoom(),f=ce.any3d?this.options.zoomSnap:1;return f&&(i=Math.round(i/f)*f),Math.max(a,Math.min(d,i))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Qe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(i,a){var d=this._getCenterOffset(i)._trunc();return(a&&a.animate)!==!0&&!this.getSize().contains(d)?!1:(this.panBy(d,a),!0)},_createAnimProxy:function(){var i=this._proxy=Ae("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(i),this.on("zoomanim",function(a){var d=fd,f=this._proxy.style[d];Si(this._proxy,this.project(a.center,a.zoom),this.getZoomScale(a.zoom,1)),f===this._proxy.style[d]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){He(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var i=this.getCenter(),a=this.getZoom();Si(this._proxy,this.project(i,a),this.getZoomScale(a,1))},_catchTransitionEnd:function(i){this._animatingZoom&&i.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(i,a,d){if(this._animatingZoom)return!0;if(d=d||{},!this._zoomAnimated||d.animate===!1||this._nothingToAnimate()||Math.abs(a-this._zoom)>this.options.zoomAnimationThreshold)return!1;var f=this.getZoomScale(a),b=this._getCenterOffset(i)._divideBy(1-1/f);return d.animate!==!0&&!this.getSize().contains(b)?!1:(V(function(){this._moveStart(!0,d.noMoveStart||!1)._animateZoom(i,a,!0)},this),!0)},_animateZoom:function(i,a,d,f){this._mapPane&&(d&&(this._animatingZoom=!0,this._animateToCenter=i,this._animateToZoom=a,we(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:i,zoom:a,noUpdate:f}),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&&Qe(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 vE(i,a){return new Pe(i,a)}var gn=G.extend({options:{position:"topright"},initialize:function(i){y(this,i)},getPosition:function(){return this.options.position},setPosition:function(i){var a=this._map;return a&&a.removeControl(this),this.options.position=i,a&&a.addControl(this),this},getContainer:function(){return this._container},addTo:function(i){this.remove(),this._map=i;var a=this._container=this.onAdd(i),d=this.getPosition(),f=i._controlCorners[d];return we(a,"leaflet-control"),d.indexOf("bottom")!==-1?f.insertBefore(a,f.firstChild):f.appendChild(a),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(He(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(i){this._map&&i&&i.screenX>0&&i.screenY>0&&this._map.getContainer().focus()}}),$o=function(i){return new gn(i)};Pe.include({addControl:function(i){return i.addTo(this),this},removeControl:function(i){return i.remove(),this},_initControlPos:function(){var i=this._controlCorners={},a="leaflet-",d=this._controlContainer=Ae("div",a+"control-container",this._container);function f(b,C){var A=a+b+" "+a+C;i[b+C]=Ae("div",A,d)}f("top","left"),f("top","right"),f("bottom","left"),f("bottom","right")},_clearControlPos:function(){for(var i in this._controlCorners)He(this._controlCorners[i]);He(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var ug=gn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(i,a,d,f){return d<f?-1:f<d?1:0}},initialize:function(i,a,d){y(this,d),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var f in i)this._addLayer(i[f],f);for(f in a)this._addLayer(a[f],f,!0)},onAdd:function(i){this._initLayout(),this._update(),this._map=i,i.on("zoomend",this._checkDisabledLayers,this);for(var a=0;a<this._layers.length;a++)this._layers[a].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(i){return gn.prototype.addTo.call(this,i),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(i,a){return this._addLayer(i,a),this._map?this._update():this},addOverlay:function(i,a){return this._addLayer(i,a,!0),this._map?this._update():this},removeLayer:function(i){i.off("add remove",this._onLayerChange,this);var a=this._getLayer(c(i));return a&&this._layers.splice(this._layers.indexOf(a),1),this._map?this._update():this},expand:function(){we(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var i=this._map.getSize().y-(this._container.offsetTop+50);return i<this._section.clientHeight?(we(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=i+"px"):Qe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Qe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var i="leaflet-control-layers",a=this._container=Ae("div",i),d=this.options.collapsed;a.setAttribute("aria-haspopup",!0),Bo(a),Td(a);var f=this._section=Ae("section",i+"-list");d&&(this._map.on("click",this.collapse,this),ye(a,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var b=this._layersLink=Ae("a",i+"-toggle",a);b.href="#",b.title="Layers",b.setAttribute("role","button"),ye(b,{keydown:function(C){C.keyCode===13&&this._expandSafely()},click:function(C){ft(C),this._expandSafely()}},this),d||this.expand(),this._baseLayersList=Ae("div",i+"-base",f),this._separator=Ae("div",i+"-separator",f),this._overlaysList=Ae("div",i+"-overlays",f),a.appendChild(f)},_getLayer:function(i){for(var a=0;a<this._layers.length;a++)if(this._layers[a]&&c(this._layers[a].layer)===i)return this._layers[a]},_addLayer:function(i,a,d){this._map&&i.on("add remove",this._onLayerChange,this),this._layers.push({layer:i,name:a,overlay:d}),this.options.sortLayers&&this._layers.sort(l(function(f,b){return this.options.sortFunction(f.layer,b.layer,f.name,b.name)},this)),this.options.autoZIndex&&i.setZIndex&&(this._lastZIndex++,i.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;wl(this._baseLayersList),wl(this._overlaysList),this._layerControlInputs=[];var i,a,d,f,b=0;for(d=0;d<this._layers.length;d++)f=this._layers[d],this._addItem(f),a=a||f.overlay,i=i||!f.overlay,b+=f.overlay?0:1;return this.options.hideSingleBase&&(i=i&&b>1,this._baseLayersList.style.display=i?"":"none"),this._separator.style.display=a&&i?"":"none",this},_onLayerChange:function(i){this._handlingClick||this._update();var a=this._getLayer(c(i.target)),d=a.overlay?i.type==="add"?"overlayadd":"overlayremove":i.type==="add"?"baselayerchange":null;d&&this._map.fire(d,a)},_createRadioElement:function(i,a){var d='<input type="radio" class="leaflet-control-layers-selector" name="'+i+'"'+(a?' checked="checked"':"")+"/>",f=document.createElement("div");return f.innerHTML=d,f.firstChild},_addItem:function(i){var a=document.createElement("label"),d=this._map.hasLayer(i.layer),f;i.overlay?(f=document.createElement("input"),f.type="checkbox",f.className="leaflet-control-layers-selector",f.defaultChecked=d):f=this._createRadioElement("leaflet-base-layers_"+c(this),d),this._layerControlInputs.push(f),f.layerId=c(i.layer),ye(f,"click",this._onInputClick,this);var b=document.createElement("span");b.innerHTML=" "+i.name;var C=document.createElement("span");a.appendChild(C),C.appendChild(f),C.appendChild(b);var A=i.overlay?this._overlaysList:this._baseLayersList;return A.appendChild(a),this._checkDisabledLayers(),a},_onInputClick:function(){if(!this._preventClick){var i=this._layerControlInputs,a,d,f=[],b=[];this._handlingClick=!0;for(var C=i.length-1;C>=0;C--)a=i[C],d=this._getLayer(a.layerId).layer,a.checked?f.push(d):a.checked||b.push(d);for(C=0;C<b.length;C++)this._map.hasLayer(b[C])&&this._map.removeLayer(b[C]);for(C=0;C<f.length;C++)this._map.hasLayer(f[C])||this._map.addLayer(f[C]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var i=this._layerControlInputs,a,d,f=this._map.getZoom(),b=i.length-1;b>=0;b--)a=i[b],d=this._getLayer(a.layerId).layer,a.disabled=d.options.minZoom!==void 0&&f<d.options.minZoom||d.options.maxZoom!==void 0&&f>d.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var i=this._section;this._preventClick=!0,ye(i,"click",ft),this.expand();var a=this;setTimeout(function(){je(i,"click",ft),a._preventClick=!1})}}),yE=function(i,a,d){return new ug(i,a,d)},Cd=gn.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(i){var a="leaflet-control-zoom",d=Ae("div",a+" leaflet-bar"),f=this.options;return this._zoomInButton=this._createButton(f.zoomInText,f.zoomInTitle,a+"-in",d,this._zoomIn),this._zoomOutButton=this._createButton(f.zoomOutText,f.zoomOutTitle,a+"-out",d,this._zoomOut),this._updateDisabled(),i.on("zoomend zoomlevelschange",this._updateDisabled,this),d},onRemove:function(i){i.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(i){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(i.shiftKey?3:1))},_zoomOut:function(i){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(i.shiftKey?3:1))},_createButton:function(i,a,d,f,b){var C=Ae("a",d,f);return C.innerHTML=i,C.href="#",C.title=a,C.setAttribute("role","button"),C.setAttribute("aria-label",a),Bo(C),ye(C,"click",ki),ye(C,"click",b,this),ye(C,"click",this._refocusOnMap,this),C},_updateDisabled:function(){var i=this._map,a="leaflet-disabled";Qe(this._zoomInButton,a),Qe(this._zoomOutButton,a),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||i._zoom===i.getMinZoom())&&(we(this._zoomOutButton,a),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||i._zoom===i.getMaxZoom())&&(we(this._zoomInButton,a),this._zoomInButton.setAttribute("aria-disabled","true"))}});Pe.mergeOptions({zoomControl:!0}),Pe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Cd,this.addControl(this.zoomControl))});var _E=function(i){return new Cd(i)},cg=gn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(i){var a="leaflet-control-scale",d=Ae("div",a),f=this.options;return this._addScales(f,a+"-line",d),i.on(f.updateWhenIdle?"moveend":"move",this._update,this),i.whenReady(this._update,this),d},onRemove:function(i){i.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(i,a,d){i.metric&&(this._mScale=Ae("div",a,d)),i.imperial&&(this._iScale=Ae("div",a,d))},_update:function(){var i=this._map,a=i.getSize().y/2,d=i.distance(i.containerPointToLatLng([0,a]),i.containerPointToLatLng([this.options.maxWidth,a]));this._updateScales(d)},_updateScales:function(i){this.options.metric&&i&&this._updateMetric(i),this.options.imperial&&i&&this._updateImperial(i)},_updateMetric:function(i){var a=this._getRoundNum(i),d=a<1e3?a+" m":a/1e3+" km";this._updateScale(this._mScale,d,a/i)},_updateImperial:function(i){var a=i*3.2808399,d,f,b;a>5280?(d=a/5280,f=this._getRoundNum(d),this._updateScale(this._iScale,f+" mi",f/d)):(b=this._getRoundNum(a),this._updateScale(this._iScale,b+" ft",b/a))},_updateScale:function(i,a,d){i.style.width=Math.round(this.options.maxWidth*d)+"px",i.innerHTML=a},_getRoundNum:function(i){var a=Math.pow(10,(Math.floor(i)+"").length-1),d=i/a;return d=d>=10?10:d>=5?5:d>=3?3:d>=2?2:1,a*d}}),wE=function(i){return new cg(i)},xE='<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>',Pd=gn.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(ce.inlineSvg?xE+" ":"")+"Leaflet</a>"},initialize:function(i){y(this,i),this._attributions={}},onAdd:function(i){i.attributionControl=this,this._container=Ae("div","leaflet-control-attribution"),Bo(this._container);for(var a in i._layers)i._layers[a].getAttribution&&this.addAttribution(i._layers[a].getAttribution());return this._update(),i.on("layeradd",this._addAttribution,this),this._container},onRemove:function(i){i.off("layeradd",this._addAttribution,this)},_addAttribution:function(i){i.layer.getAttribution&&(this.addAttribution(i.layer.getAttribution()),i.layer.once("remove",function(){this.removeAttribution(i.layer.getAttribution())},this))},setPrefix:function(i){return this.options.prefix=i,this._update(),this},addAttribution:function(i){return i?(this._attributions[i]||(this._attributions[i]=0),this._attributions[i]++,this._update(),this):this},removeAttribution:function(i){return i?(this._attributions[i]&&(this._attributions[i]--,this._update()),this):this},_update:function(){if(this._map){var i=[];for(var a in this._attributions)this._attributions[a]&&i.push(a);var d=[];this.options.prefix&&d.push(this.options.prefix),i.length&&d.push(i.join(", ")),this._container.innerHTML=d.join(' <span aria-hidden="true">|</span> ')}}});Pe.mergeOptions({attributionControl:!0}),Pe.addInitHook(function(){this.options.attributionControl&&new Pd().addTo(this)});var bE=function(i){return new Pd(i)};gn.Layers=ug,gn.Zoom=Cd,gn.Scale=cg,gn.Attribution=Pd,$o.layers=yE,$o.zoom=_E,$o.scale=wE,$o.attribution=bE;var Vn=G.extend({initialize:function(i){this._map=i},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}});Vn.addTo=function(i,a){return i.addHandler(a,this),this};var SE={Events:W},dg=ce.touch?"touchstart mousedown":"mousedown",Lr=Q.extend({options:{clickTolerance:3},initialize:function(i,a,d,f){y(this,f),this._element=i,this._dragStartTarget=a||i,this._preventOutline=d},enable:function(){this._enabled||(ye(this._dragStartTarget,dg,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Lr._dragging===this&&this.finishDrag(!0),je(this._dragStartTarget,dg,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(i){if(this._enabled&&(this._moved=!1,!pd(this._element,"leaflet-zoom-anim"))){if(i.touches&&i.touches.length!==1){Lr._dragging===this&&this.finishDrag();return}if(!(Lr._dragging||i.shiftKey||i.which!==1&&i.button!==1&&!i.touches)&&(Lr._dragging=this,this._preventOutline&&wd(this._element),vd(),jo(),!this._moving)){this.fire("down");var a=i.touches?i.touches[0]:i,d=rg(this._element);this._startPoint=new I(a.clientX,a.clientY),this._startPos=Ei(this._element),this._parentScale=xd(d);var f=i.type==="mousedown";ye(document,f?"mousemove":"touchmove",this._onMove,this),ye(document,f?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(i){if(this._enabled){if(i.touches&&i.touches.length>1){this._moved=!0;return}var a=i.touches&&i.touches.length===1?i.touches[0]:i,d=new I(a.clientX,a.clientY)._subtract(this._startPoint);!d.x&&!d.y||Math.abs(d.x)+Math.abs(d.y)<this.options.clickTolerance||(d.x/=this._parentScale.x,d.y/=this._parentScale.y,ft(i),this._moved||(this.fire("dragstart"),this._moved=!0,we(document.body,"leaflet-dragging"),this._lastTarget=i.target||i.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),we(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(d),this._moving=!0,this._lastEvent=i,this._updatePosition())}},_updatePosition:function(){var i={originalEvent:this._lastEvent};this.fire("predrag",i),tt(this._element,this._newPos),this.fire("drag",i)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(i){Qe(document.body,"leaflet-dragging"),this._lastTarget&&(Qe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),je(document,"mousemove touchmove",this._onMove,this),je(document,"mouseup touchend touchcancel",this._onUp,this),yd(),Do();var a=this._moved&&this._moving;this._moving=!1,Lr._dragging=!1,a&&this.fire("dragend",{noInertia:i,distance:this._newPos.distanceTo(this._startPos)})}});function hg(i,a,d){var f,b=[1,4,2,8],C,A,M,B,q,re,fe,Ee;for(C=0,re=i.length;C<re;C++)i[C]._code=Ci(i[C],a);for(M=0;M<4;M++){for(fe=b[M],f=[],C=0,re=i.length,A=re-1;C<re;A=C++)B=i[C],q=i[A],B._code&fe?q._code&fe||(Ee=Tl(q,B,fe,a,d),Ee._code=Ci(Ee,a),f.push(Ee)):(q._code&fe&&(Ee=Tl(q,B,fe,a,d),Ee._code=Ci(Ee,a),f.push(Ee)),f.push(B));i=f}return i}function fg(i,a){var d,f,b,C,A,M,B,q,re;if(!i||i.length===0)throw new Error("latlngs not passed");rn(i)||(console.warn("latlngs are not flat! Only the first ring will be used"),i=i[0]);var fe=ie([0,0]),Ee=se(i),Ct=Ee.getNorthWest().distanceTo(Ee.getSouthWest
265())*Ee.getNorthEast().distanceTo(Ee.getNorthWest());Ct<1700&&(fe=Rd(i));var ut=i.length,sn=[];for(d=0;d<ut;d++){var Mt=ie(i[d]);sn.push(a.project(ie([Mt.lat-fe.lat,Mt.lng-fe.lng])))}for(M=B=q=0,d=0,f=ut-1;d<ut;f=d++)b=sn[d],C=sn[f],A=b.y*C.x-C.y*b.x,B+=(b.x+C.x)*A,q+=(b.y+C.y)*A,M+=A*3;M===0?re=sn[0]:re=[B/M,q/M];var gs=a.unproject(F(re));return ie([gs.lat+fe.lat,gs.lng+fe.lng])}function Rd(i){for(var a=0,d=0,f=0,b=0;b<i.length;b++){var C=ie(i[b]);a+=C.lat,d+=C.lng,f++}return ie([a/f,d/f])}var EE={__proto__:null,clipPolygon:hg,polygonCenter:fg,centroid:Rd};function pg(i,a){if(!a||!i.length)return i.slice();var d=a*a;return i=CE(i,d),i=kE(i,d),i}function mg(i,a,d){return Math.sqrt(Fo(i,a,d,!0))}function TE(i,a,d){return Fo(i,a,d)}function kE(i,a){var d=i.length,f=typeof Uint8Array<"u"?Uint8Array:Array,b=new f(d);b[0]=b[d-1]=1,Ad(i,b,a,0,d-1);var C,A=[];for(C=0;C<d;C++)b[C]&&A.push(i[C]);return A}function Ad(i,a,d,f,b){var C=0,A,M,B;for(M=f+1;M<=b-1;M++)B=Fo(i[M],i[f],i[b],!0),B>C&&(A=M,C=B);C>d&&(a[A]=1,Ad(i,a,d,f,A),Ad(i,a,d,A,b))}function CE(i,a){for(var d=[i[0]],f=1,b=0,C=i.length;f<C;f++)PE(i[f],i[b])>a&&(d.push(i[f]),b=f);return b<C-1&&d.push(i[C-1]),d}var gg;function vg(i,a,d,f,b){var C=f?gg:Ci(i,d),A=Ci(a,d),M,B,q;for(gg=A;;){if(!(C|A))return[i,a];if(C&A)return!1;M=C||A,B=Tl(i,a,M,d,b),q=Ci(B,d),M===C?(i=B,C=q):(a=B,A=q)}}function Tl(i,a,d,f,b){var C=a.x-i.x,A=a.y-i.y,M=f.min,B=f.max,q,re;return d&8?(q=i.x+C*(B.y-i.y)/A,re=B.y):d&4?(q=i.x+C*(M.y-i.y)/A,re=M.y):d&2?(q=B.x,re=i.y+A*(B.x-i.x)/C):d&1&&(q=M.x,re=i.y+A*(M.x-i.x)/C),new I(q,re,b)}function Ci(i,a){var d=0;return i.x<a.min.x?d|=1:i.x>a.max.x&&(d|=2),i.y<a.min.y?d|=4:i.y>a.max.y&&(d|=8),d}function PE(i,a){var d=a.x-i.x,f=a.y-i.y;return d*d+f*f}function Fo(i,a,d,f){var b=a.x,C=a.y,A=d.x-b,M=d.y-C,B=A*A+M*M,q;return B>0&&(q=((i.x-b)*A+(i.y-C)*M)/B,q>1?(b=d.x,C=d.y):q>0&&(b+=A*q,C+=M*q)),A=i.x-b,M=i.y-C,f?A*A+M*M:new I(b,C)}function rn(i){return!x(i[0])||typeof i[0][0]!="object"&&typeof i[0][0]<"u"}function yg(i){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),rn(i)}function _g(i,a){var d,f,b,C,A,M,B,q;if(!i||i.length===0)throw new Error("latlngs not passed");rn(i)||(console.warn("latlngs are not flat! Only the first ring will be used"),i=i[0]);var re=ie([0,0]),fe=se(i),Ee=fe.getNorthWest().distanceTo(fe.getSouthWest
vendor: 4,212 bytes, line 265
265())*fe.getNorthEast().distanceTo(fe.getNorthWest());Ee<1700&&(re=Rd(i));var Ct=i.length,ut=[];for(d=0;d<Ct;d++){var sn=ie(i[d]);ut.push(a.project(ie([sn.lat-re.lat,sn.lng-re.lng])))}for(d=0,f=0;d<Ct-1;d++)f+=ut[d].distanceTo(ut[d+1])/2;if(f===0)q=ut[0];else for(d=0,C=0;d<Ct-1;d++)if(A=ut[d],M=ut[d+1],b=A.distanceTo(M),C+=b,C>f){B=(C-f)/b,q=[M.x-B*(M.x-A.x),M.y-B*(M.y-A.y)];break}var Mt=a.unproject(F(q));return ie([Mt.lat+re.lat,Mt.lng+re.lng])}var RE={__proto__:null,simplify:pg,pointToSegmentDistance:mg,closestPointOnSegment:TE,clipSegment:vg,_getEdgeIntersection:Tl,_getBitCode:Ci,_sqClosestPointOnSegment:Fo,isFlat:rn,_flat:yg,polylineCenter:_g},Nd={project:function(i){return new I(i.lng,i.lat)},unproject:function(i){return new Y(i.y,i.x)},bounds:new X([-180,-90],[180,90])},Od={R:6378137,R_MINOR:6356752314245179e-9,bounds:new X([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(i){var a=Math.PI/180,d=this.R,f=i.lat*a,b=this.R_MINOR/d,C=Math.sqrt(1-b*b),A=C*Math.sin(f),M=Math.tan(Math.PI/4-f/2)/Math.pow((1-A)/(1+A),C/2);return f=-d*Math.log(Math.max(M,1e-10)),new I(i.lng*a*d,f)},unproject:function(i){for(var a=180/Math.PI,d=this.R,f=this.R_MINOR/d,b=Math.sqrt(1-f*f),C=Math.exp(-i.y/d),A=Math.PI/2-2*Math.atan(C),M=0,B=.1,q;M<15&&Math.abs(B)>1e-7;M++)q=b*Math.sin(A),q=Math.pow((1-q)/(1+q),b/2),B=Math.PI/2-2*Math.atan(C*q)-A,A+=B;return new Y(A*a,i.x*a/d)}},AE={__proto__:null,LonLat:Nd,Mercator:Od,SphericalMercator:xe},NE=s({},me,{code:"EPSG:3395",projection:Od,transformation:function(){var i=.5/(Math.PI*Od.R);return Se(i,.5,-i,.5)}()}),wg=s({},me,{code:"EPSG:4326",projection:Nd,transformation:Se(1/180,1,-1/180,.5)}),OE=s({},Z,{projection:Nd,transformation:Se(1,0,-1,0),scale:function(i){return Math.pow(2,i)},zoom:function(i){return Math.log(i)/Math.LN2},distance:function(i,a){var d=a.lng-i.lng,f=a.lat-i.lat;return Math.sqrt(d*d+f*f)},infinite:!0});Z.Earth=me,Z.EPSG3395=NE,Z.EPSG3857=et,Z.EPSG900913=It,Z.EPSG4326=wg,Z.Simple=OE;var vn=Q.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(i){return i.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(i){return i&&i.removeLayer(this),this},getPane:function(i){return this._map.getPane(i?this.options[i]||i:this.options.pane)},addInteractiveTarget:function(i){return this._map._targets[c(i)]=this,this},removeInteractiveTarget:function(i){return delete this._map._targets[c(i)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(i){var a=i.target;if(a.hasLayer(this)){if(this._map=a,this._zoomAnimated=a._zoomAnimated,this.getEvents){var d=this.getEvents();a.on(d,this),this.once("remove",function(){a.off(d,this)},this)}this.onAdd(a),this.fire("add"),a.fire("layeradd",{layer:this})}}});Pe.include({addLayer:function(i){if(!i._layerAdd)throw new Error("The provided object is not a Layer.");var a=c(i);return this._layers[a]?this:(this._layers[a]=i,i._mapToAdd=this,i.beforeAdd&&i.beforeAdd(this),this.whenReady(i._layerAdd,i),this)},removeLayer:function(i){var a=c(i);return this._layers[a]?(this._loaded&&i.onRemove(this),delete this._layers[a],this._loaded&&(this.fire("layerremove",{layer:i}),i.fire("remove")),i._map=i._mapToAdd=null,this):this},hasLayer:function(i){return c(i)in this._layers},eachLayer:function(i,a){for(var d in this._layers)i.call(a,this._layers[d]);return this},_addLayers:function(i){i=i?x(i)?i:[i]:[];for(var a=0,d=i.length;a<d;a++)this.addLayer(i[a])},_addZoomLimit:function(i){(!isNaN(i.options.maxZoom)||!isNaN(i.options.minZoom))&&(this._zoomBoundLayers[c(i)]=i,this._updateZoomLevels())},_removeZoomLimit:function(i){var a=c(i);this._zoomBoundLayers[a]&&(delete this._zoomBoundLayers[a],this._updateZoomLevels())},_updateZoomLevels:function(){var i=1/0,a=-1/0,d=this._getZoomSpan();for(var f in this._zoomBoundLayers){var b=this._zoomBoundLayers[f].options;i=b.minZoom===void 0?i:Math.min(i,b.minZoom),a=b.maxZoom===void 0?a:Math.max(a,b.maxZoom)}this._layersMaxZoom=a===-1/0?void 0:a,this._layersMinZoom=i===1/0?void 0:i,d!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZo
vendor: 13,073 bytes, line 265
265om&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ds=vn.extend({initialize:function(i,a){y(this,a),this._layers={};var d,f;if(i)for(d=0,f=i.length;d<f;d++)this.addLayer(i[d])},addLayer:function(i){var a=this.getLayerId(i);return this._layers[a]=i,this._map&&this._map.addLayer(i),this},removeLayer:function(i){var a=i in this._layers?i:this.getLayerId(i);return this._map&&this._layers[a]&&this._map.removeLayer(this._layers[a]),delete this._layers[a],this},hasLayer:function(i){var a=typeof i=="number"?i:this.getLayerId(i);return a in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(i){var a=Array.prototype.slice.call(arguments,1),d,f;for(d in this._layers)f=this._layers[d],f[i]&&f[i].apply(f,a);return this},onAdd:function(i){this.eachLayer(i.addLayer,i)},onRemove:function(i){this.eachLayer(i.removeLayer,i)},eachLayer:function(i,a){for(var d in this._layers)i.call(a,this._layers[d]);return this},getLayer:function(i){return this._layers[i]},getLayers:function(){var i=[];return this.eachLayer(i.push,i),i},setZIndex:function(i){return this.invoke("setZIndex",i)},getLayerId:function(i){return c(i)}}),LE=function(i,a){return new ds(i,a)},cr=ds.extend({addLayer:function(i){return this.hasLayer(i)?this:(i.addEventParent(this),ds.prototype.addLayer.call(this,i),this.fire("layeradd",{layer:i}))},removeLayer:function(i){return this.hasLayer(i)?(i in this._layers&&(i=this._layers[i]),i.removeEventParent(this),ds.prototype.removeLayer.call(this,i),this.fire("layerremove",{layer:i})):this},setStyle:function(i){return this.invoke("setStyle",i)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var i=new le;for(var a in this._layers){var d=this._layers[a];i.extend(d.getBounds?d.getBounds():d.getLatLng())}return i}}),IE=function(i,a){return new cr(i,a)},hs=G.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(i){y(this,i)},createIcon:function(i){return this._createIcon("icon",i)},createShadow:function(i){return this._createIcon("shadow",i)},_createIcon:function(i,a){var d=this._getIconUrl(i);if(!d){if(i==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var f=this._createImg(d,a&&a.tagName==="IMG"?a:null);return this._setIconStyles(f,i),(this.options.crossOrigin||this.options.crossOrigin==="")&&(f.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),f},_setIconStyles:function(i,a){var d=this.options,f=d[a+"Size"];typeof f=="number"&&(f=[f,f]);var b=F(f),C=F(a==="shadow"&&d.shadowAnchor||d.iconAnchor||b&&b.divideBy(2,!0));i.className="leaflet-marker-"+a+" "+(d.className||""),C&&(i.style.marginLeft=-C.x+"px",i.style.marginTop=-C.y+"px"),b&&(i.style.width=b.x+"px",i.style.height=b.y+"px")},_createImg:function(i,a){return a=a||document.createElement("img"),a.src=i,a},_getIconUrl:function(i){return ce.retina&&this.options[i+"RetinaUrl"]||this.options[i+"Url"]}});function ME(i){return new hs(i)}var Uo=hs.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(i){return typeof Uo.imagePath!="string"&&(Uo.imagePath=this._detectIconPath()),(this.options.imagePath||Uo.imagePath)+hs.prototype._getIconUrl.call(this,i)},_stripUrl:function(i){var a=function(d,f,b){var C=f.exec(d);return C&&C[b]};return i=a(i,/^url\((['"])?(.+)\1\)$/,2),i&&a(i,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var i=Ae("div","leaflet-default-icon-path",document.body),a=Mo(i,"background-image")||Mo(i,"backgroundImage");if(document.body.removeChild(i),a=this._stripUrl(a),a)return a;var d=document.querySelector('link[href$="leaflet.css"]');return d?d.href.substring(0,d.href.length-11-1):""}}),xg=Vn.extend({initialize:function(i){this._marker=i},addHooks:function(){var i=this._marker._icon;this._draggable||(this._draggable=new Lr(i,i,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),we(i,"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&&Qe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(i){var a=this._marker,d=a._map,f=this._marker.options.autoPanSpeed,b=this._marker.options.autoPanPadding,C=Ei(a._icon),A=d.getPixelBounds(),M=d.getPixelOrigin(),B=ee(A.min._subtract(M).add(b),A.max._subtract(M).subtract(b));if(!B.contains(C)){var q=F((Math.max(B.max.x,C.x)-B.max.x)/(A.max.x-B.max.x)-(Math.min(B.min.x,C.x)-B.min.x)/(A.min.x-B.min.x),(Math.max(B.max.y,C.y)-B.max.y)/(A.max.y-B.max.y)-(Math.min(B.min.y,C.y)-B.min.y)/(A.min.y-B.min.y)).multiplyBy(f);d.panBy(q,{animate:!1}),this._draggable._newPos._add(q),this._draggable._startPos._add(q),tt(a._icon,this._draggable._newPos),this._onDrag(i),this._panRequest=V(this._adjustPan.bind(this,i))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(i){this._marker.options.autoPan&&(H(this._panRequest),this._panRequest=V(this._adjustPan.bind(this,i)))},_onDrag:function(i){var a=this._marker,d=a._shadow,f=Ei(a._icon),b=a._map.layerPointToLatLng(f);d&&tt(d,f),a._latlng=b,i.latlng=b,i.oldLatLng=this._oldLatLng,a.fire("move",i).fire("drag",i)},_onDragEnd:function(i){H(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",i)}}),kl=vn.extend({options:{icon:new Uo,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(i,a){y(this,a),this._latlng=ie(i)},onAdd:function(i){this._zoomAnimated=this._zoomAnimated&&i.options.markerZoomAnimation,this._zoomAnimated&&i.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(i){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&i.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(i){var a=this._latlng;return this._latlng=ie(i),this.update(),this.fire("move",{oldLatLng:a,latlng:this._latlng})},setZIndexOffset:function(i){return this.options.zIndexOffset=i,this.update()},getIcon:function(){return this.options.icon},setIcon:function(i){return this.options.icon=i,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 i=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(i)}return this},_initIcon:function(){var i=this.options,a="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),d=i.icon.createIcon(this._icon),f=!1;d!==this._icon&&(this._icon&&this._removeIcon(),f=!0,i.title&&(d.title=i.title),d.tagName==="IMG"&&(d.alt=i.alt||"")),we(d,a),i.keyboard&&(d.tabIndex="0",d.setAttribute("role","button")),this._icon=d,i.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ye(d,"focus",this._panOnFocus,this);var b=i.icon.createShadow(this._shadow),C=!1;b!==this._shadow&&(this._removeShadow(),C=!0),b&&(we(b,a),b.alt=""),this._shadow=b,i.opacity<1&&this._updateOpacity(),f&&this.getPane().appendChild(this._icon),this._initInteraction(),b&&C&&this.getPane(i.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&je(this._icon,"focus",this._panOnFocus,this),He(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&He(this._shadow),this._shadow=null},_setPos:function(i){this._icon&&tt(this._icon,i),this._shadow&&tt(this._shadow,i),this._zIndex=i.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(i){this._icon&&(this._icon.style.zIndex=this._zIndex+i)},_animateZoom:function(i){var a=this._map._latLngToNewLayerPoint(this._latlng,i.zoom,i.center).round();this._setPos(a)},_initInteraction:function(){if(this.options.interactive&&(we(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),xg)){var i=this.options.draggable;this.dragging&&(i=this.dragging.enabled(),this.dragging.disable()),this.dragging=new xg(this),i&&this.dragging.enable()}},setOpacity:function(i){return this.options.opacity=i,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var i=this.options.opacity;this._icon&&nn(this._icon,i),this._shadow&&nn(this._shadow,i)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var i=this._map;if(i){var a=this.options.icon.options,d=a.iconSize?F(a.iconSize):F(0,0),f=a.iconAnchor?F(a.iconAnchor):F(0,0);i.panInside(this._latlng,{paddingTopLeft:f,paddingBottomRight:d.subtract(f)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function jE(i,a){return new kl(i,a)}var Ir=vn.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(i){this._renderer=i.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(i){return y(this,i),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&i&&Object.prototype.hasOwnProperty.call(i,"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)}}),Cl=Ir.extend({options:{fill:!0,radius:10},initialize:function(i,a){y(this,a),this._latlng=ie(i),this._radius=this.options.radius},setLatLng:function(i){var a=this._latlng;return this._latlng=ie(i),this.redraw(),this.fire("move",{oldLatLng:a,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(i){return this.options.radius=this._radius=i,this.redraw()},getRadius:function(){return this._radius},setStyle:function(i){var a=i&&i.radius||this._radius;return Ir.prototype.setStyle.call(this,i),this.setRadius(a),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var i=this._radius,a=this._radiusY||i,d=this._clickTolerance(),f=[i+d,a+d];this._pxBounds=new X(this._point.subtract(f),this._point.add(f))},_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(i){return i.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function DE(i,a){return new Cl(i,a)}var Ld=Cl.extend({initialize:function(i,a,d){if(typeof a=="number"&&(a=s({},d,{radius:a})),y(this,a),this._latlng=ie(i),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(i){return this._mRadius=i,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var i=[this._radius,this._radiusY||this._radius];return new le(this._map.layerPointToLatLng(this._point.subtract(i)),this._map.layerPointToLatLng(this._point.add(i)))},setStyle:Ir.prototype.setStyle,_project:function(){var i=this._latlng.lng,a=this._latlng.lat,d=this._map,f=d.options.crs;if(f.distance===me.distance){var b=Math.PI/180,C=this._mRadius/me.R/b,A=d.project([a+C,i]),M=d.project([a-C,i]),B=A.add(M).divideBy(2),q=d.unproject(B).lat,re=Math.acos((Math.cos(C*b)-Math.sin(a*b)*Math.sin(q*b))/(Math.cos(a*b)*Math.cos(q*b)))/b;(isNaN(re)||re===0)&&(re=C/Math.cos(Math.PI/180*a)),this._point=
265B.subtract(d.getPixelOrigin()),this._radius=isNaN(re)?0:B.x-d.project([q,i-re]).x,this._radiusY=B.y-A.y}else{var fe=f.unproject(f.project(this._latlng).subtract([this._mRadius,0]));this._point=d.latLngToLayerPoint(this._latlng),this._radius=this._point.x-d.latLngToLayerPoint(fe).x}this._updateBounds()}});function zE(i,a,d){return new Ld(i,a,d)}var dr=Ir.extend({options:{smoothFactor:1,noClip:!1},initialize:function(i,a){y(this,a),this._setLatLngs(i)},getLatLngs:function(){return this._latlngs},setLatLngs:function(i){return this._setLatLngs(i),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(i){for(var a=1/0,d=null,f=Fo,b,C,A=0,M=this._parts.length;A<M;A++)for(var B=this._parts[A],q=1,re=B.length;q<re;q++){b=B[q-1],C=B[q];var fe=f(i,b,C,!0);fe<a&&(a=fe,d=f(i,b,C))}return d&&(d.distance=Math.sqrt(a)),d},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return _g(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(i,a){return a=a||this._defaultShape(),i=ie(i),a.push(i),this._bounds.extend(i),this.redraw()},_setLatLngs:function(i){this._bounds=new le,this._latlngs=this._convertLatLngs(i)},_defaultShape:function(){return rn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(i){for(var a=[],d=rn(i),f=0,b=i.length;f<b;f++)d?(a[f]=ie(i[f]),this._bounds.extend(a[f])):a[f]=this._convertLatLngs(i[f]);return a},_project:function(){var i=new X;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,i),this._bounds.isValid()&&i.isValid()&&(this._rawPxBounds=i,this._updateBounds())},_updateBounds:function(){var i=this._clickTolerance(),a=new I(i,i);this._rawPxBounds&&(this._pxBounds=new X([this._rawPxBounds.min.subtract(a),this._rawPxBounds.max.add(a)]))},_projectLatlngs:function(i,a,d){var f=i[0]instanceof Y,b=i.length,C,A;if(f){for(A=[],C=0;C<b;C++)A[C]=this._map.latLngToLayerPoint(i[C]),d.extend(A[C]);a.push(A)}else for(C=0;C<b;C++)this._projectLatlngs(i[C],a,d)},_clipPoints:function(){var i=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(i))){if(this.options.noClip){this._parts=this._rings;return}var a=this._parts,d,f,b,C,A,M,B;for(d=0,b=0,C=this._rings.length;d<C;d++)for(B=this._rings[d],f=0,A=B.length;f<A-1;f++)M=vg(B[f],B[f+1],i,f,!0),M&&(a[b]=a[b]||[],a[b].push(M[0]),(M[1]!==B[f+1]||f===A-2)&&(a[b].push(M[1]),b++))}},_simplifyPoints:function(){for(var i=this._parts,a=this.options.smoothFactor,d=0,f=i.length;d<f;d++)i[d]=pg(i[d],a)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(i,a){var d,f,b,C,A,M,B=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(i))return!1;for(d=0,C=this._parts.length;d<C;d++)for(M=this._parts[d],f=0,A=M.length,b=A-1;f<A;b=f++)if(!(!a&&f===0)&&mg(i,M[b],M[f])<=B)return!0;return!1}});function BE(i,a){return new dr(i,a)}dr._flat=yg;var fs=dr.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
265,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return fg(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(i){var a=dr.prototype._convertLatLngs.call(this,i),d=a.length;return d>=2&&a[0]instanceof Y&&a[0].equals(a[d-1])&&a.pop(),a},_setLatLngs:function(i){dr.prototype._setLatLngs.call(this,i),rn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return rn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var i=this._renderer._bounds,a=this.options.weight,d=new I(a,a);if(i=new X(i.min.subtract(d),i.max.add(d)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(i))){if(this.options.noClip){this._parts=this._rings;return}for(var f=0,b=this._rings.length,C;f<b;f++)C=hg(this._rings[f],i,!0),C.length&&this._parts.push(C)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(i){var a=!1,d,f,b,C,A,M,B,q;if(!this._pxBounds||!this._pxBounds.contains(i))return!1;for(C=0,B=this._parts.length;C<B;C++)for(d=this._parts[C],A=0,q=d.length,M=q-1;A<q;M=A++)f=d[A],b=d[M],f.y>i.y!=b.y>i.y&&i.x<(b.x-f.x)*(i.y-f.y)/(b.y-f.y)+f.x&&(a=!a);return a||dr.prototype._containsPoint.call(this,i,!0)}});function $E(i,a){return new fs(i,a)}var hr=cr.extend({initialize:function(i,a){y(this,a),this._layers={},i&&this.addData(i)},addData:function(i){var a=x(i)?i:i.features,d,f,b;if(a){for(d=0,f=a.length;d<f;d++)b=a[d],(b.geometries||b.geometry||b.features||b.coordinates)&&this.addData(b);return this}var C=this.options;if(C.filter&&!C.filter(i))return this;var A=Pl(i,C);return A?(A.feature=Nl(i),A.defaultOptions=A.options,this.resetStyle(A),C.onEachFeature&&C.onEachFeature(i,A),this.addLayer(A)):this},resetStyle:function(i){return i===void 0?this.eachLayer(this.resetStyle,this):(i.options=s({},i.defaultOptions),this._setLayerStyle(i,this.options.style),this)},setStyle:function(i){return this.eachLayer(function(a){this._setLayerStyle(a,i)},this)},_setLayerStyle:function(i,a){i.setStyle&&(typeof a=="function"&&(a=a(i.feature)),i.setStyle(a))}});function Pl(i,a){var d=i.type==="Feature"?i.geometry:i,f=d?d.coordinates:null,b=[],C=a&&a.pointToLayer,A=a&&a.coordsToLatLng||Id,M,B,q,re;if(!f&&!d)return null;switch(d.type){case"Point":return M=A(f),bg(C,i,M,a);case"MultiPoint":for(q=0,re=f.length;q<re;q++)M=A(f[q]),b.push(bg(C,i,M,a));return new cr(b);case"LineString":case"MultiLineString":return B=Rl(f,d.type==="LineString"?0:1,A),new dr(B,a);case"Polygon":case"MultiPolygon":return B=Rl(f,d.type==="Polygon"?1:2,A),new fs(B,a);case"GeometryCollection":for(q=0,re=d.geometries.length;q<re;q++){var fe=Pl({geometry:d.geometries[q],type:"Feature",properties:i.properties},a);fe&&b.push(fe)}return new cr(b);case"FeatureCollection":for(q=0,re=d.features.length;q<re;q++){var Ee=Pl(d.features[q],a);Ee&&b.push(Ee)}return new cr(b);default:throw new Error("Invalid GeoJSON object.")}}function bg(i,a,d,f){return i?i(a,d):new kl(d,f&&f.markersInheritOptions&&f)}function Id(i){return new Y(i[1],i[0],i[2])}function Rl(i,a,d){for(var f=[],b=0,C=i.length,A;b<C;b++)A=a?Rl(i[b],a-1,d):(d||Id)(i[b]),f.push(A);return f}function Md(i,a){return i=ie(i),i.alt!==void 0?[v(i.lng,a),v(i.lat,a),v(i.alt,a)]:[v(i.lng,a),v(i.lat,a)]}function Al(i,a,d,f){for(var b=[],C=0,A=i.length;C<A;C++)b.push(a?Al(i[C],rn(i[C])?0:a-1,d,f):Md(i[C],f));return!a&&d&&b.length>0&&b.push(b[0].slice()),b}function ps(i,a){return i.feature?s({},i.feature,{geometry:a}):Nl(a)}function Nl(i){return i.type==="Feature"||i.type==="FeatureCollection"?i:{type:"Feature",properties:{},geometry:i}}var jd={toGeoJSON:function(i){return ps(this,{type:"Point",coordinates:Md(this.getLatLng(),i)})}};kl.include(jd),Ld.include(jd),Cl.include(jd),dr.include({toGeoJSON:function(i){var a=!rn(this._latlngs),d=Al(this._latlngs,a?1:0,!1,i);return ps(this,{type:(a?"Multi":"")+"LineString",coordinates:d})}}),fs.include({toGeoJSON:function(i){var a=!rn(this._latlngs),d=a&&!rn(this._latlngs[0]),f=Al(this._latlngs,d?2:a?1:0,!0,i);return a||(f=[f]),ps(this,{type:(d?"Multi":"")+"Polygon",coordinates:f})}}),ds.include({toMultiPoint:function(i){var a=[];return this.eachLayer(function(d){a.push(d.toGeoJSON(i).geometry.coordinates)}),ps(this,{type:"MultiPoint",coordinates:a})},toGeoJSON:function(i){var a=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(a==="MultiPoint")return this.toMultiPoint(i);var d=a==="GeometryCollection",f=[];return this.eachLayer(function(b){if(b.toGeoJSON){var C=b.toGeoJSON(i);if(d)f.push(C.geometry);else{var A=Nl(C);A.type==="FeatureCollection"?f.push.apply(f,A.features):f.push(A)}}}),d?ps(this,{geometries:f,type:"GeometryCollection"}):{type:"FeatureCollection",features:f}}});function Sg(i,a){return new hr(i,a)}var FE=Sg,Ol=vn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(i,a,d){this._url=i,this._bounds=se(a),y(this,d)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(we(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){He(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(i){return this.options.opacity=i,this._image&&this._updateOpacity(),this},setStyle:function(i){return i.opacity&&this.setOpacity(i.opacity),this},bringToFront:function(){return this._map&&us(this._image),this},bringToBack:function(){return this._map&&cs(this._image),this},setUrl:function(i){return this._url=i,this._image&&(this._image.src=i),this},setBounds:function(i){return this._bounds=se(i),this._map&&this._reset(),this},getEvents:function(){var i={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(i.zoomanim=this._animateZoom),i},setZIndex:function(i){return this.options.zIndex=i,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var i=this._url.tagName==="IMG",a=this._image=i?this._url:Ae("img");if(we(a,"leaflet-image-layer"),this._zoomAnimated&&we(a,"leaflet-zoom-animated"),this.options.className&&we(a,this.options.className),a.onselectstart=g,a.onmousemove=g,a.onload=l(this.fire,this,"load"),a.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),i){this._url=a.src;return}a.src=this._url,a.alt=this.options.alt},_animateZoom:function(i){var a=this._map.getZoomScale(i.zoom),d=this._map._latLngBoundsToNewLayerBounds(this._bounds,i.zoom,i.center).min;Si(this._image,d,a)},_reset:function(){var i=this._image,a=new X(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),d=a.getSize();tt(i,a.min),i.style.width=d.x+"px",i.style.height=d.y+"px"},_updateOpacity:function(){nn(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 i=this.options.errorOverlayUrl;i&&this._url!==i&&(this._url=i,this._image.src=i)},getCenter:function(){return this._bounds.getCenter()}}),UE=function(i,a,d){return new Ol(i,a,d)},Eg=Ol.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInl
vendor: 5,695 bytes, line 265
265ine:!0},_initImage:function(){var i=this._url.tagName==="VIDEO",a=this._image=i?this._url:Ae("video");if(we(a,"leaflet-image-layer"),this._zoomAnimated&&we(a,"leaflet-zoom-animated"),this.options.className&&we(a,this.options.className),a.onselectstart=g,a.onmousemove=g,a.onloadeddata=l(this.fire,this,"load"),i){for(var d=a.getElementsByTagName("source"),f=[],b=0;b<d.length;b++)f.push(d[b].src);this._url=d.length>0?f:[a.src];return}x(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(a.style,"objectFit")&&(a.style.objectFit="fill"),a.autoplay=!!this.options.autoplay,a.loop=!!this.options.loop,a.muted=!!this.options.muted,a.playsInline=!!this.options.playsInline;for(var C=0;C<this._url.length;C++){var A=Ae("source");A.src=this._url[C],a.appendChild(A)}}});function HE(i,a,d){return new Eg(i,a,d)}var Tg=Ol.extend({_initImage:function(){var i=this._image=this._url;we(i,"leaflet-image-layer"),this._zoomAnimated&&we(i,"leaflet-zoom-animated"),this.options.className&&we(i,this.options.className),i.onselectstart=g,i.onmousemove=g}});function VE(i,a,d){return new Tg(i,a,d)}var Wn=vn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(i,a){i&&(i instanceof Y||x(i))?(this._latlng=ie(i),y(this,a)):(y(this,i),this._source=a),this.options.content&&(this._content=this.options.content)},openOn:function(i){return i=arguments.length?i:this._source._map,i.hasLayer(this)||i.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(i){return this._map?this.close():(arguments.length?this._source=i:i=this._source,this._prepareOpen(),this.openOn(i._map)),this},onAdd:function(i){this._zoomAnimated=i._zoomAnimated,this._container||this._initLayout(),i._fadeAnimated&&nn(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),i._fadeAnimated&&nn(this._container,1),this.bringToFront(),this.options.interactive&&(we(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(i){i._fadeAnimated?(nn(this._container,0),this._removeTimeout=setTimeout(l(He,void 0,this._container),200)):He(this._container),this.options.interactive&&(Qe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(i){return this._latlng=ie(i),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(i){return this._content=i,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 i={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(i.zoomanim=this._animateZoom),i},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&us(this._container),this},bringToBack:function(){return this._map&&cs(this._container),this},_prepareOpen:function(i){var a=this._source;if(!a._map)return!1;if(a instanceof cr){a=null;var d=this._source._layers;for(var f in d)if(d[f]._map){a=d[f];break}if(!a)return!1;this._source=a}if(!i)if(a.getCenter)i=a.getCenter();else if(a.getLatLng)i=a.getLatLng();else if(a.getBounds)i=a.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(i),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var i=this._contentNode,a=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof a=="string")i.innerHTML=a;else{for(;i.hasChildNodes();)i.removeChild(i.firstChild);i.appendChild(a)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var i=this._map.latLngToLayerPoint(this._latlng),a=F(this.options.offset),d=this._getAnchor();this._zoomAnimated?tt(this._container,i.add(d)):a=a.add(i).add(d);var f=this._containerBottom=-a.y,b=this._containerLeft=-Math.round(this._containerWidth/2)+a.x;this._container.style.bottom=f+"px",this._container.style.left=b+"px"}},_getAnchor:function(){return[0,0]}});Pe.include({_initOverlay:function(i,a,d,f){var b=a;return b instanceof i||(b=new i(f).setContent(a)),d&&b.setLatLng(d),b}}),vn.include({_initOverlay:function(i,a,d,f){var b=d;return b instanceof i?(y(b,f),b._source=this):(b=a&&!f?a:new i(f,this),b.setContent(d)),b}});var Ll=Wn.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(i){return i=arguments.length?i:this._source._map,!i.hasLayer(this)&&i._popup&&i._popup.options.autoClose&&i.removeLayer(i._popup),i._popup=this,Wn.prototype.openOn.call(this,i)},onAdd:function(i){Wn.prototype.onAdd.call(this,i),i.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ir||this._source.on("preclick",Ti))},onRemove:function(i){Wn.prototype.onRemove.call(this,i),i.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ir||this._source.off("preclick",Ti))},getEvents:function(){var i=Wn.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(i.preclick=this.close),this.options.keepInView&&
265(i.moveend=this._adjustPan),i},_initLayout:function(){var i="leaflet-popup",a=this._container=Ae("div",i+" "+(this.options.className||"")+" leaflet-zoom-animated"),d=this._wrapper=Ae("div",i+"-content-wrapper",a);if(this._contentNode=Ae("div",i+"-content",d),Bo(a),Td(this._contentNode),ye(a,"contextmenu",Ti),this._tipContainer=Ae("div",i+"-tip-container",a),this._tip=Ae("div",i+"-tip",this._tipContainer),this.options.closeButton){var f=this._closeButton=Ae("a",i+"-close-button",a);f.setAttribute("role","button"),f.setAttribute("aria-label","Close popup"),f.href="#close",f.innerHTML='<span aria-hidden="true">&#215;</span>',ye(f,"click",function(b){ft(b),this.close()},this)}},_updateLayout:function(){var i=this._contentNode,a=i.style;a.width="",a.whiteSpace="nowrap";var d=i.offsetWidth;d=Math.min(d,this.options.maxWidth),d=Math.max(d,this.options.minWidth),a.width=d+1+"px",a.whiteSpace="",a.height="";var f=i.offsetHeight,b=this.options.maxHeight,C="leaflet-popup-scrolled";b&&f>b?(a.height=b+"px",we(i,C)):Qe(i,C),this._containerWidth=this._container.offsetWidth},_animateZoom:function(i){var a=this._map._latLngToNewLayerPoint(this._latlng,i.zoom,i.center),d=this._getAnchor();tt(this._container,a.add(d))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var i=this._map,a=parseInt(Mo(this._container,"marginBottom"),10)||0,d=this._container.offsetHeight+a,f=this._containerWidth,b=new I(this._containerLeft,-d-this._containerBottom);b._add(Ei(this._container));var C=i.layerPointToContainerPoint(b),A=F(this.options.autoPanPadding),M=F(this.options.autoPanPaddingTopLeft||A),B=F(this.options.autoPanPaddingBottomRight||A),q=i.getSize(),re=0,fe=0;C.x+f+B.x>q.x&&(re=C.x+f-q.x+B.x),C.x-re-M.x<0&&(re=C.x-M.x),C.y+d+B.y>q.y&&(fe=C.y+d-q.y+B.y),C.y-fe-M.y<0&&(fe=C.y-M.y),(re||fe)&&(this.options.keepInView&&(this._autopanning=!0),i.fire("autopanstart").panBy([re,fe]))}},_getAnchor:function(){return F(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),WE=function(i,a){return new Ll(i,a)};Pe.mergeOptions({closePopupOnClick:!0}),Pe.include({openPopup:function(i,a,d){return this._initOverlay(Ll,i,a,d).openOn(this),this},closePopup:function(i){return i=arguments.length?i:this._popup,i&&i.close(),this}}),vn.include({bindPopup:function(i,a){return this._popup=this._initOverlay(Ll,this._popup,i,a),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(i){return this._popup&&(this instanceof cr||(this._popup._source=this),this._popup._prepareOpen(i||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(i){return this._popup&&this._popup.setContent(i),this},getPopup:function(){return this._popup},_openPopup:function(i){if(!(!this._popup||!this._map)){ki(i);var a=i.layer||i.target;if(this._popup._source===a&&!(a instanceof Ir)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(i.latlng);return}this._popup._source=a,this.openPopup(i.latlng)}},_movePopup:function(i){this._popup.setLatLng(i.latlng)},_onKeyPress:function(i){i.originalEvent.keyCode===13&&this._openPopup(i)}});var Il=Wn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(i){Wn.prototype.onAdd.call(this,i),this.setOpacity(this.options.opacity),i.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(i){Wn.prototype.onRemove.call(this,i),i.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var i=Wn.prototype.getEvents.call(this);return this.options.permanent||(i.preclick=this.close),i},_initLayout:function(){var i="leaflet-tooltip",a=i+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Ae("div",a),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(i){var a,d,f=this._map,b=this._container,C=f.latLngToContainerPoint(f.getCenter()),A=f.layerPointToContainerPoint(i),M=this.options.direction,B=b.offsetWidth,q=b.offsetHeight,re=F(this.options.offset),fe=this._getAnchor();M==="top"?(a=B/2,d=q):M==="bottom"?(a=B/2,d=0):M==="center"?(a=B/2,d=q/2):M==="right"?(a=0,d=q/2):M==="left"?
265(a=B,d=q/2):A.x<C.x?(M="right",a=0,d=q/2):(M="left",a=B+(re.x+fe.x)*2,d=q/2),i=i.subtract(F(a,d,!0)).add(re).add(fe),Qe(b,"leaflet-tooltip-right"),Qe(b,"leaflet-tooltip-left"),Qe(b,"leaflet-tooltip-top"),Qe(b,"leaflet-tooltip-bottom"),we(b,"leaflet-tooltip-"+M),tt(b,i)},_updatePosition:function(){var i=this._map.latLngToLayerPoint(this._latlng);this._setPosition(i)},setOpacity:function(i){this.options.opacity=i,this._container&&nn(this._container,i)},_animateZoom:function(i){var a=this._map._latLngToNewLayerPoint(this._latlng,i.zoom,i.center);this._setPosition(a)},_getAnchor:function(){return F(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),GE=function(i,a){return new Il(i,a)};Pe.include({openTooltip:function(i,a,d){return this._initOverlay(Il,i,a,d).openOn(this),this},closeTooltip:function(i){return i.close(),this}}),vn.include({bindTooltip:function(i,a){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Il,this._tooltip,i,a),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(i){if(!(!i&&this._tooltipHandlersAdded)){var a=i?"off":"on",d={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?d.add=this._openTooltip:(d.mouseover=this._openTooltip,d.mouseout=this.closeTooltip,d.click=this._openTooltip,this._map?this._addFocusListeners():d.add=this._addFocusListeners),this._tooltip.options.sticky&&(d.mousemove=this._moveTooltip),this[a](d),this._tooltipHandlersAdded=!i}},openTooltip:function(i){return this._tooltip&&(this instanceof cr||(this._tooltip._source=this),this._tooltip._prepareOpen(i)&&(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(i){return this._tooltip&&this._tooltip.setContent(i),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(i){var a=typeof i.getElement=="function"&&i.getElement();a&&(ye(a,"focus",function(){this._tooltip._source=i,this.openTooltip()},this),ye(a,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(i){var a=typeof i.getElement=="function"&&i.getElement();a&&a.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(i){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var a=this;this._map.once("moveend",function(){a._openOnceFlag=!1,a._openTooltip(i)});return}this._tooltip._source=i.layer||i.target,this.openTooltip(this._tooltip.options.sticky?i.latlng:void 0)}},_moveTooltip:function(i){var a=i.latlng,d,f;this._tooltip.options.sticky&&i.originalEvent&&(d=this._map.mouseEventToContainerPoint(i.originalEvent),f=this._map.containerPointToLayerPoint(d),a=this._map.layerPointToLatLng(f)),this._tooltip.setLatLng(a)}});var kg=hs.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(i){var a=i&&i.tagName==="DIV"?i:document.createElement("div"),d=this.options;if(d.html instanceof Element?(wl(a),a.appendChild(d.html)):a.innerHTML=d.html!==!1?d.html:"",d.bgPos){var f=F(d.bgPos);a.style.backgroundPosition=-f.x+"px "+-f.y+"px"}return this._setIconStyles(a,"icon"),a},createShadow:function(){return null}});function qE(i){return new kg(i)}hs.Default=Uo;var Ho=vn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:ce.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(i){y(this,i)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()}
265,beforeAdd:function(i){i._addZoomLimit(this)},onRemove:function(i){this._removeAllTiles(),He(this._container),i._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(us(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(cs(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(i){return this.options.opacity=i,this._updateOpacity(),this},setZIndex:function(i){return this.options.zIndex=i,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var i=this._clampZoom(this._map.getZoom());i!==this._tileZoom&&(this._tileZoom=i,this._updateLevels()),this._update()}return this},getEvents:function(){var i={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=h(this._onMoveEnd,this.options.updateInterval,this)),i.move=this._onMove),this._zoomAnimated&&(i.zoomanim=this._animateZoom),i},createTile:function(){return document.createElement("div")},getTileSize:function(){var i=this.options.tileSize;return i instanceof I?i:new I(i,i)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(i){for(var a=this.getPane().children,d=-i(-1/0,1/0),f=0,b=a.length,C;f<b;f++)C=a[f].style.zIndex,a[f]!==this._container&&C&&(d=i(d,+C));isFinite(d)&&(this.options.zIndex=d+i(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!ce.ielt9){nn(this._container,this.options.opacity);var i=+new Date,a=!1,d=!1;for(var f in this._tiles){var b=this._tiles[f];if(!(!b.current||!b.loaded)){var C=Math.min(1,(i-b.loaded)/200);nn(b.el,C),C<1?a=!0:(b.active?d=!0:this._onOpaqueTile(b),b.active=!0)}}d&&!this._noPrune&&this._pruneTiles(),a&&(H(this._fadeFrame),this._fadeFrame=V(this._updateOpacity,this))}},_onOpaqueTile:g,_initContainer:function(){this._container||(this._container=Ae("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var i=this._tileZoom,a=this.options.maxZoom;if(i!==void 0){for(var d in this._levels)d=Number(d),this._levels[d].el.children.length||d===i?(this._levels[d].el.style.zIndex=a-Math.abs(i-d),this._onUpdateLevel(d)):(He(this._levels[d].el),this._removeTilesAtZoom(d),this._onRemoveLevel(d),delete this._levels[d]);var f=this._levels[i],b=this._map;return f||(f=this._levels[i]={},f.el=Ae("div","leaflet-tile-container leaflet-zoom-animated",this._container),f.el.style.zIndex=a,f.origin=b.project(b.unproject(b.getPixelOrigin()),i).round(),f.zoom=i,this._setZoomTransform(f,b.getCenter(),b.getZoom()),g(f.el.offsetWidth),this._onCreateLevel(f)),this._level=f,f}},_onUpdateLevel:g,_onRemoveLevel:g,_onCreateLevel:g,_pruneTiles:function(){if(this._map){var i,a,d=this._map.getZoom();if(d>this.options.maxZoom||d<this.options.minZoom){this._removeAllTiles();return}for(i in this._tiles)a=this._tiles[i],a.retain=a.current;for(i in this._tiles)if(a=this._tiles[i],a.current&&!a.active){var f=a.coords;this._retainParent(f.x,f.y,f.z,f.z-5)||this._retainChildren(f.x,f.y,f.z,f.z+2)}for(i in this._tiles)this._tiles[i].retain||this._removeTile(i)}},_removeTilesAtZoom:function(i){for(var a in this._tiles)this._tiles[a].coords.z===i&&this._removeTile(a)},_removeAllTiles:function(){for(var i in this._tiles)this._removeTile(i)},_invalidateAll:function(){for(var i in this._levels)He(this._levels[i].el),this._onRemoveLevel(Number(i)),delete this._levels[i];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(i,a,d,f){var b=Math.floor(i/2),C=Math.floor(a/2),A=d-1,M=new I(+b,+C);M.z=+A;var B=this._tileCoordsToKey(M),q=this._tiles[B];return q&&q.active?(q.retain=!0,!0):(q&&q.loaded&&(q.retain=!0),A>f?this._retainParent(b,C,A,f):!1)},_retainChildren:function(i,a,d,f){for(var b=2*i;b<2*i+2;b++)for(var C=2*a;C<2*a+2;C++){var A=new I(b,C);A.z=d+1;var M=this._tileCoordsToKey(A),B=this._tiles[M];if(B&&B.active){B.retain=!0;continue}else B&&B.loaded&&(B.retain=!0);d+1<f&&this._retainChildren(b,C,d+1,f)}},_resetView:function(i){var a=i&&(i.pinch||i.flyTo);
vendor: 10,576 bytes, line 265
265this._setView(this._map.getCenter(),this._map.getZoom(),a,a)},_animateZoom:function(i){this._setView(i.center,i.zoom,!0,i.noUpdate)},_clampZoom:function(i){var a=this.options;return a.minNativeZoom!==void 0&&i<a.minNativeZoom?a.minNativeZoom:a.maxNativeZoom!==void 0&&a.maxNativeZoom<i?a.maxNativeZoom:i},_setView:function(i,a,d,f){var b=Math.round(a);this.options.maxZoom!==void 0&&b>this.options.maxZoom||this.options.minZoom!==void 0&&b<this.options.minZoom?b=void 0:b=this._clampZoom(b);var C=this.options.updateWhenZooming&&b!==this._tileZoom;(!f||C)&&(this._tileZoom=b,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),b!==void 0&&this._update(i),d||this._pruneTiles(),this._noPrune=!!d),this._setZoomTransforms(i,a)},_setZoomTransforms:function(i,a){for(var d in this._levels)this._setZoomTransform(this._levels[d],i,a)},_setZoomTransform:function(i,a,d){var f=this._map.getZoomScale(d,i.zoom),b=i.origin.multiplyBy(f).subtract(this._map._getNewPixelOrigin(a,d)).round();ce.any3d?Si(i.el,b,f):tt(i.el,b)},_resetGrid:function(){var i=this._map,a=i.options.crs,d=this._tileSize=this.getTileSize(),f=this._tileZoom,b=this._map.getPixelWorldBounds(this._tileZoom);b&&(this._globalTileRange=this._pxBoundsToTileRange(b)),this._wrapX=a.wrapLng&&!this.options.noWrap&&[Math.floor(i.project([0,a.wrapLng[0]],f).x/d.x),Math.ceil(i.project([0,a.wrapLng[1]],f).x/d.y)],this._wrapY=a.wrapLat&&!this.options.noWrap&&[Math.floor(i.project([a.wrapLat[0],0],f).y/d.x),Math.ceil(i.project([a.wrapLat[1],0],f).y/d.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(i){var a=this._map,d=a._animatingZoom?Math.max(a._animateToZoom,a.getZoom()):a.getZoom(),f=a.getZoomScale(d,this._tileZoom),b=a.project(i,this._tileZoom).floor(),C=a.getSize().divideBy(f*2);return new X(b.subtract(C),b.add(C))},_update:function(i){var a=this._map;if(a){var d=this._clampZoom(a.getZoom());if(i===void 0&&(i=a.getCenter()),this._tileZoom!==void 0){var f=this._getTiledPixelBounds(i),b=this._pxBoundsToTileRange(f),C=b.getCenter(),A=[],M=this.options.keepBuffer,B=new X(b.getBottomLeft().subtract([M,-M]),b.getTopRight().add([M,-M]));if(!(isFinite(b.min.x)&&isFinite(b.min.y)&&isFinite(b.max.x)&&isFinite(b.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var q in this._tiles){var re=this._tiles[q].coords;(re.z!==this._tileZoom||!B.contains(new I(re.x,re.y)))&&(this._tiles[q].current=!1)}if(Math.abs(d-this._tileZoom)>1){this._setView(i,d);return}for(var fe=b.min.y;fe<=b.max.y;fe++)for(var Ee=b.min.x;Ee<=b.max.x;Ee++){var Ct=new I(Ee,fe);if(Ct.z=this._tileZoom,!!this._isValidTile(Ct)){var ut=this._tiles[this._tileCoordsToKey(Ct)];ut?ut.current=!0:A.push(Ct)}}if(A.sort(function(Mt,gs){return Mt.distanceTo(C)-gs.distanceTo(C)}),A.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var sn=document.createDocumentFragment();for(Ee=0;Ee<A.length;Ee++)this._addTile(A[Ee],sn);this._level.el.appendChild(sn)}}}},_isValidTile:function(i){var a=this._map.options.crs;if(!a.infinite){var d=this._globalTileRange;if(!a.wrapLng&&(i.x<d.min.x||i.x>d.max.x)||!a.wrapLat&&(i.y<d.min.y||i.y>d.max.y))return!1}if(!this.options.bounds)return!0;var f=this._tileCoordsToBounds(i);return se(this.options.bounds).overlaps(f)},_keyToBounds:function(i){return this._tileCoordsToBounds(this._keyToTileCoords(i))},_tileCoordsToNwSe:function(i){var a=this._map,d=this.getTileSize(),f=i.scaleBy(d),b=f.add(d),C=a.unproject(f,i.z),A=a.unproject(b,i.z);return[C,A]},_tileCoordsToBounds:function(i){var a=this._tileCoordsToNwSe(i),d=new le(a[0],a[1]);return this.options.noWrap||(d=this._map.wrapLatLngBounds(d)),d},_tileCoordsToKey:function(i){return i.x+":"+i.y+":"+i.z},_keyToTileCoords:function(i){var a=i.split(":"),d=new I(+a[0],+a[1]);return d.z=+a[2],d},_removeTile:function(i){var a=this._tiles[i];a&&(He(a.el),delete this._tiles[i],this.fire("tileunload",{tile:a.el,coords:this._keyToTileCoords(i)}))},_initTile:function(i){we(i,"leaflet-tile");var a=this.getTileSize();i.style.width=a.x+"px",i.style.height=a.y+"px",i.onselectstart=g,i.onmousemove=g,ce.ielt9&&this.options.opacity<1&&nn(i,this.options.opacity)},_addTile:function(i,a){var d=this._getTilePos(i),f=this._tileCoordsToKey(i),b=this.createTile(this._wrapCoords(i),l(this._tileReady,this,i));this._initTile(b),this.createTile.length<2&&V(l(this._tileReady,this,i,null,b)),tt(b,d),this._tiles[f]={el:b,coords:i,current:!0},a.appendChild(b),this.fire("tileloadstart",{tile:b,coords:i})},_tileReady:function(i,a,d){a&&this.fire("tileerror",{error:a,tile:d,coords:i});var f=this._tileCoordsToKey(i);d=this._tiles[f],d&&(d.loaded=+new Date,this._map._fadeAnimated?(nn(d.el,0),H(this._fadeFrame),this._fadeFrame=V(this._updateOpacity,this)):(d.active=!0,this._pruneTiles()),a||(we(d.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:d.el,coords:i})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ce.ielt9||!this._map._fadeAnimated?V(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(i){return i.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(i){var a=new I(this._wrapX?p(i.x,this._wrapX):i.x,this._wrapY?p(i.y,this._wrapY):i.y);return a.z=i.z,a},_pxBoundsToTileRange:function(i){var a=this.getTileSize();return new X(i.min.unscaleBy(a).floor(),i.max.unscaleBy(a).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var i in this._tiles)if(!this._tiles[i].loaded)return!1;return!0}});function KE(i){return new Ho(i)}var ms=Ho.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(i,a){this._url=i,a=y(this,a),a.detectRetina&&ce.retina&&a.maxZoom>0?(a.tileSize=Math.floor(a.tileSize/2),a.zoomReverse?(a.zoomOffset--,a.minZoom=Math.min(a.maxZoom,a.minZoom+1)):(a.zoomOffset++,a.maxZoom=Math.max(a.minZoom,a.maxZoom-1)),a.minZoom=Math.max(0,a.minZoom)):a.zoomReverse?a.minZoom=Math.min(a.maxZoom,a.minZoom):a.maxZoom=Math.max(a.minZoom,a.maxZoom),typeof a.subdomains=="string"&&(a.subdomains=a.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(i,a){return this._url===i&&a===void 0&&(a=!0),this._url=i,a||this.redraw(),this},createTile:function(i,a){var d=document.createElement("img");return ye(d,"load",l(this._tileOnLoad,this,a,d)),ye(d,"error",l(this._tileOnError,this,a,d)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(d.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(d.referrerPolicy=this.options.referrerPolicy),d.alt="",d.src=this.getTileUrl(i),d},getTileUrl:function(i){var a={r:ce.retina?"@2x":"",s:this._getSubdomain(i),x:i.x,y:i.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var d=this._globalTileRange.max.y-i.y;this.options.tms&&(a.y=d),a["-y"]=d}return S(this._url,s(a,this.options))},_tileOnLoad:function(i,a){ce.ielt9?setTimeout(l(i,this,null,a),0):i(null,a)},_tileOnError:function(i,a,d){var f=this.options.errorTileUrl;f&&a.getAttribute("src")!==f&&(a.src=f),i(d,a)},_onTileRemove:function(i){i.tile.onload=null},_getZoomForUrl:function(){var i=this._tileZoom,a=this.options.maxZoom,d=this.options.zoomReverse,f=this.options.zoomOffset;return d&&(i=a-i),i+f},_getSubdomain:function(i){var a=Math.abs(i.x+i.y)%this.options.subdomains.length;return this.options.subdomains[a]},_abortLoading:function(){var i,a;for(i in this._tiles)if(this._tiles[i].coords.z!==this._tileZoom&&(a=this._tiles[i].el,a.onload=g,a.onerror=g,!a.complete)){a.src=R;var d=this._tiles[i].coords;He(a),delete this._tiles[i],this.fire("tileabort",{tile:a,coords:d})}},_removeTile:function(i){var a=this._tiles[i];if(a)return a.el.setAttribute("src",R),Ho.prototype._removeTile.call(this,i)},_tileReady:function(i,a,d){if(!(!this._map||d&&d.getAttribute("src")===R))return Ho.prototype._tileReady.call(this,i,a,d)}});function Cg(i,a){return new ms(i,a)}var Pg=ms.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(i,a){this._url=i;var d=s({},this.defaultWmsParams);for(var f in a)f in this.options||(d[f]=a[f]);a=y(this,a);var b=a.detectRetina&&ce.retina?2:1,C=this.getTileSize();d.width=C.x*b,d.height=C.y*b,this.wmsParams=d},onAdd:function(i){this._crs=this.options.crs||i.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var a=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[a]=this._crs.code,ms.prototype.onAdd.call(this,i)},getTileUrl:function(i){var a=this._tileCoordsToNwSe(i),d=this._crs,f=ee(d.project(a[0]),d.project(a[1])),b=f.min,C=f.max,A=(this._wmsVersion>=1.3&&this._crs===wg?[b.y,b.x,C.y,C.x]:[b.x,b.y,C.x,C.y]).join(","),M=ms.prototype.getTileUrl.call(this,i);return M+T(this.wmsParams,M,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+A},setParams:function(i,a){return s(this.wmsParams,i),a||this.redraw(),this}});function ZE(i,a){return new Pg(i,a)}ms.WMS=Pg,Cg.wms=ZE;var fr=vn.extend({options:{padding:.1},initialize:function(i){y(this,i),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),we(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 i={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(i.zoomanim=this._onAnimZoom),i},_onAnimZoom:function(i){this._updateTransform(i.center,i.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(i,a){var d=this._map.getZoomScale(a,this._zoom),f=this._map.getSize().multiplyBy(.5+this.options.padding),b=this._map.project(this._center,a),C=f.multiplyBy(-d).add(b).subtract(this._map._getNewPixelOrigin(i,a));ce.any3d?Si(this._container,C,d):tt(this._container,C)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var i in this._layers)this._layers[i]._reset()},_onZoomEnd:function(){for(var i in this._layers)this._layers[i]._project()},_updatePaths:function(){for(var i in this._layers)this._layers[i]._update()},_update:function(){var i=this.options.padding,a=this._map.getSize(),d=this._map.containerPointToLayerPoint(a.multiplyBy(-i)).round();
vendor: 4,450 bytes, line 265
265this._bounds=new X(d,d.add(a.multiplyBy(1+i*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Rg=fr.extend({options:{tolerance:0},getEvents:function(){var i=fr.prototype.getEvents.call(this);return i.viewprereset=this._onViewPreReset,i},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){fr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var i=this._container=document.createElement("canvas");ye(i,"mousemove",this._onMouseMove,this),ye(i,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ye(i,"mouseout",this._handleMouseOut,this),i._leaflet_disable_events=!0,this._ctx=i.getContext("2d")},_destroyContainer:function(){H(this._redrawRequest),delete this._ctx,He(this._container),je(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var i;this._redrawBounds=null;for(var a in this._layers)i=this._layers[a],i._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){fr.prototype._update.call(this);var i=this._bounds,a=this._container,d=i.getSize(),f=ce.retina?2:1;tt(a,i.min),a.width=f*d.x,a.height=f*d.y,a.style.width=d.x+"px",a.style.height=d.y+"px",ce.retina&&this._ctx.scale(2,2),this._ctx.translate(-i.min.x,-i.min.y),this.fire("update")}},_reset:function(){fr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(i){this._updateDashArray(i),this._layers[c(i)]=i;var a=i._order={layer:i,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=a),this._drawLast=a,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(i){this._requestRedraw(i)},_removePath:function(i){var a=i._order,d=a.next,f=a.prev;d?d.prev=f:this._drawLast=f,f?f.next=d:this._drawFirst=d,delete i._order,delete this._layers[c(i)],this._requestRedraw(i)},_updatePath:function(i){this._extendRedrawBounds(i),i._project(),i._update(),this._requestRedraw(i)},_updateStyle:function(i){this._updateDashArray(i),this._requestRedraw(i)},_updateDashArray:function(i){if(typeof i.options.dashArray=="string"){var a=i.options.dashArray.split(/[, ]+/),d=[],f,b;for(b=0;b<a.length;b++){if(f=Number(a[b]),isNaN(f))return;d.push(f)}i.options._dashArray=d}else i.options._dashArray=i.options.dashArray},_requestRedraw:function(i){this._map&&(this._extendRedrawBounds(i),this._redrawRequest=this._redrawRequest||V(this._redraw,this))},_extendRedrawBounds:function(i){if(i._pxBounds){var a=(i.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new X,this._redrawBounds.extend(i._pxBounds.min.subtract([a,a])),this._redrawBounds.extend(i._pxBounds.max.add([a,a]))}},_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 i=this._redrawBounds;if(i){var a=i.getSize();this._ctx.clearRect(i.min.x,i.min.y,a.x,a.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 i,a=this._redrawBounds;if(this._ctx.save(),a){var d=a.getSize();this._ctx.beginPath(),this._ctx.rect(a.min.x,a.min.y,d.x,d.y),this._ctx.clip()}this._drawing=!0;for(var f=this._drawFirst;f;f=f.next)i=f.layer,(!a||i._pxBounds&&i._pxBounds.intersects(a))&&i._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(i,a){if(this._drawing){var d,f,b,C,A=i._parts,M=A.length,B=this._ctx;if(M){for(B.beginPath(),d=0;d<M;d++){for(f=0,b=A[d].length;f<b;f++)C=A[d][f],B[f?"lineTo":"moveTo"](C.x,C.y);a&&B.closePath()}this._fillStroke(B,i)}}},_updateCircle:function(i){if(!(!this._drawing||i._empty())){var a=i._point,d=this._ctx,f=Math.max(Math.round(i._radius),1),b=(Math.max(Math.round(i._radiusY),1)||f)/f;b!==1&&(d.save(),d.scale(1,b)),d.beginPath(),d.arc(a.x,a.y/b,f,0,Math.PI*2,!1),b!==1&&d.restore(),this._fillStroke(d,i)}},_fillStroke:function(i,a){var d=a.options;d.fill&&(i.globalAlpha=d.fillOpacity,i.fillStyle=d.fillColor||d.color,i.fill(d.fillRule||"evenodd")),d.stroke&&d.weight!==0&&(i.setLineDash&&i.setLineDash(a.options&&a.options._dashArray||[]),i.globalAlpha=d.opacity,i.lineWidth=d.weight,i.strokeStyle=d.color,i.lineCap=d.lineCap,i.lineJoin=d.lineJoin,i.stroke())},_onClick:function(i){for(var a=this._map.mouseEventToLayerPoint(i),d,f,b=this._drawFirst;b;
vendor: 6,387 bytes, line 265
265b=b.next)d=b.layer,d.options.interactive&&d._containsPoint(a)&&(!(i.type==="click"||i.type==="preclick")||!this._map._draggableMoved(d))&&(f=d);this._fireEvent(f?[f]:!1,i)},_onMouseMove:function(i){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var a=this._map.mouseEventToLayerPoint(i);this._handleMouseHover(i,a)}},_handleMouseOut:function(i){var a=this._hoveredLayer;a&&(Qe(this._container,"leaflet-interactive"),this._fireEvent([a],i,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(i,a){if(!this._mouseHoverThrottled){for(var d,f,b=this._drawFirst;b;b=b.next)d=b.layer,d.options.interactive&&d._containsPoint(a)&&(f=d);f!==this._hoveredLayer&&(this._handleMouseOut(i),f&&(we(this._container,"leaflet-interactive"),this._fireEvent([f],i,"mouseover"),this._hoveredLayer=f)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,i),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(i,a,d){this._map._fireDOMEvent(a,d||a.type,i)},_bringToFront:function(i){var a=i._order;if(a){var d=a.next,f=a.prev;if(d)d.prev=f;else return;f?f.next=d:d&&(this._drawFirst=d),a.prev=this._drawLast,this._drawLast.next=a,a.next=null,this._drawLast=a,this._requestRedraw(i)}},_bringToBack:function(i){var a=i._order;if(a){var d=a.next,f=a.prev;if(f)f.next=d;else return;d?d.prev=f:f&&(this._drawLast=f),a.prev=null,a.next=this._drawFirst,this._drawFirst.prev=a,this._drawFirst=a,this._requestRedraw(i)}}});function Ag(i){return ce.canvas?new Rg(i):null}var Vo=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(i){return document.createElement("<lvml:"+i+' class="lvml">')}}catch{}return function(i){return document.createElement("<"+i+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),YE={_initContainer:function(){this._container=Ae("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(fr.prototype._update.call(this),this.fire("update"))},_initPath:function(i){var a=i._container=Vo("shape");we(a,"leaflet-vml-shape "+(this.options.className||"")),a.coordsize="1 1",i._path=Vo("path"),a.appendChild(i._path),this._updateStyle(i),this._layers[c(i)]=i},_addPath:function(i){var a=i._container;this._container.appendChild(a),i.options.interactive&&i.addInteractiveTarget(a)},_removePath:function(i){var a=i._container;He(a),i.removeInteractiveTarget(a),delete this._layers[c(i)]},_updateStyle:function(i){var a=i._stroke,d=i._fill,f=i.options,b=i._container;b.stroked=!!f.stroke,b.filled=!!f.fill,f.stroke?(a||(a=i._stroke=Vo("stroke")),b.appendChild(a),a.weight=f.weight+"px",a.color=f.color,a.opacity=f.opacity,f.dashArray?a.dashStyle=x(f.dashArray)?f.dashArray.join(" "):f.dashArray.replace(/( *, *)/g," "):a.dashStyle="",a.endcap=f.lineCap.replace("butt","flat"),a.joinstyle=f.lineJoin):a&&(b.removeChild(a),i._stroke=null),f.fill?(d||(d=i._fill=Vo("fill")),b.appendChild(d),d.color=f.fillColor||f.color,d.opacity=f.fillOpacity):d&&(b.removeChild(d),i._fill=null)},_updateCircle:function(i){var a=i._point.round(),d=Math.round(i._radius),f=Math.round(i._radiusY||d);this._setPath(i,i._empty()?"M0 0":"AL "+a.x+","+a.y+" "+d+","+f+" 0,"+65535*360)},_setPath:function(i,a){i._path.v=a},_bringToFront:function(i){us(i._container)},_bringToBack:function(i){cs(i._container)}},Ml=ce.vml?Vo:Mn,Wo=fr.extend({_initContainer:function(){this._container=Ml("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ml("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){He(this._container),je(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){fr.prototype._update.call(this);var i=this._bounds,a=i.getSize(),d=this._container;(!this._svgSize||!this._svgSize.equals(a))&&(this._svgSize=a,d.setAttribute("width",a.x),d.setAttribute("height",a.y)),tt(d,i.min),d.setAttribute("viewBox",[i.min.x,i.min.y,a.x,a.y].join(" ")),this.fire("update")}},_initPath:function(i){var a=i._path=Ml("path");i.options.className&&we(a,i.options.className),i.options.interactive&&we(a,"leaflet-interactive"),this._updateStyle(i),this._layers[c(i)]=i},_addPath:function(i){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(i._path),i.addInteractiveTarget(i._path)},_removePath:function(i){He(i._path),i.removeInteractiveTarget(i._path),delete this._layers[c(i)]},_updatePath:function(i){i._project(),i._update()},_updateStyle:function(i){var a=i._path,d=i.options;a&&(d.stroke?(a.setAttribute("stroke",d.color),a.setAttribute("stroke-opacity",d.opacity),a.setAttribute("stroke-width",d.weight),a.setAttribute("stroke-linecap",d.lineCap),a.setAttribute("stroke-linejoin",d.lineJoin),d.dashArray?a.setAttribute("stroke-dasharray",d.dashArray):a.removeAttribute("stroke-dasharray"),d.dashOffset?a.setAttribute("stroke-dashoffset",d.dashOffset):a.removeAttribute("stroke-dashoffset")):a.setAttribute("stroke","none"),d.fill?(a.setAttribute("fill",d.fillColor||d.color),a.setAttribute("fill-opacity",d.fillOpacity),a.setAttribute("fill-rule",d.fillRule||"evenodd")):a.setAttribute("fill","none"))},_updatePoly:function(i,a){this._setPath(i,pn(i._parts,a))},_updateCircle:function(i){var a=i._point,d=Math.max(Math.round(i._radius),1),f=Math.max(Math.round(i._radiusY),1)||d,b="a"+d+","+f+" 0 1,0 ",C=i._empty()?"M0 0":"M"+(a.x-d)+","+a.y+b+d*2+",0 "+b+-d*2+",0 ";this._setPath(i,C)},_setPath:function(i,a){i._path.setAttribute("d",a)},_bringToFront:function(i){us(i._path)},_bringToBack:function(i){cs(i._path)}});ce.vml&&Wo.include(YE);function Ng(i){return ce.svg||ce.vml?new Wo(i):null}Pe.include({getRenderer:function(i){var a=i.options.renderer||this._getPaneRenderer(i.options.pane)||this.options.renderer||this._renderer;return a||(a=this._renderer=this._createRenderer()),this.hasLayer(a)||this.addLayer(a),a},_getPaneRenderer:function(i){if(i==="overlayPane"||i===void 0)return!1;var a=this._paneRenderers[i];return a===void 0&&(a=this._createRenderer({pane:i}),this._paneRenderers[i]=a),a},_createRenderer:function(i){return this.options.preferCanvas&&Ag(i)||Ng(i)}});var Og=fs.extend({initialize:function(i,a){fs.prototype.initialize.call(this,this._boundsToLatLngs(i),a)},setBounds:function(i){return this.setLatLngs(this._boundsToLatLngs(i))}
vendor: 9,373 bytes, line 265
265,_boundsToLatLngs:function(i){return i=se(i),[i.getSouthWest(),i.getNorthWest(),i.getNorthEast(),i.getSouthEast()]}});function JE(i,a){return new Og(i,a)}Wo.create=Ml,Wo.pointsToPath=pn,hr.geometryToLayer=Pl,hr.coordsToLatLng=Id,hr.coordsToLatLngs=Rl,hr.latLngToCoords=Md,hr.latLngsToCoords=Al,hr.getFeature=ps,hr.asFeature=Nl,Pe.mergeOptions({boxZoom:!0});var Lg=Vn.extend({initialize:function(i){this._map=i,this._container=i._container,this._pane=i._panes.overlayPane,this._resetStateTimeout=0,i.on("unload",this._destroy,this)},addHooks:function(){ye(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){je(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){He(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(i){if(!i.shiftKey||i.which!==1&&i.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),jo(),vd(),this._startPoint=this._map.mouseEventToContainerPoint(i),ye(document,{contextmenu:ki,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(i){this._moved||(this._moved=!0,this._box=Ae("div","leaflet-zoom-box",this._container),we(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(i);var a=new X(this._point,this._startPoint),d=a.getSize();tt(this._box,a.min),this._box.style.width=d.x+"px",this._box.style.height=d.y+"px"},_finish:function(){this._moved&&(He(this._box),Qe(this._container,"leaflet-crosshair")),Do(),yd(),je(document,{contextmenu:ki,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(i){if(!(i.which!==1&&i.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0);var a=new le(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(a).fire("boxzoomend",{boxZoomBounds:a})}},_onKeyDown:function(i){i.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Pe.addInitHook("addHandler","boxZoom",Lg),Pe.mergeOptions({doubleClickZoom:!0});var Ig=Vn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(i){var a=this._map,d=a.getZoom(),f=a.options.zoomDelta,b=i.originalEvent.shiftKey?d-f:d+f;a.options.doubleClickZoom==="center"?a.setZoom(b):a.setZoomAround(i.containerPoint,b)}});Pe.addInitHook("addHandler","doubleClickZoom",Ig),Pe.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Mg=Vn.extend({addHooks:function(){if(!this._draggable){var i=this._map;this._draggable=new Lr(i._mapPane,i._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),i.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),i.on("zoomend",this._onZoomEnd,this),i.whenReady(this._onZoomEnd,this))}we(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Qe(this._map._container,"leaflet-grab"),Qe(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 i=this._map;if(i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var a=se(this._map.options.maxBounds);this._offsetLimit=ee(this._map.latLngToContainerPoint(a.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(a.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(i){if(this._map.options.inertia){var a=this._lastTime=+new Date,d=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(d),this._times.push(a),this._prunePositions(a)}this._map.fire("move",i).fire("drag",i)},_prunePositions:function(i){for(;this._positions.length>1&&i-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var i=this._map.getSize().divideBy(2),a=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=a.subtract(i).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(i,a){return i-(i-a)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var i=this._draggable._newPos.subtract(this._draggable._startPos),a=this._offsetLimit;i.x<a.min.x&&(i.x=this._viscousLimit(i.x,a.min.x)),i.y<a.min.y&&(i.y=this._viscousLimit(i.y,a.min.y)),i.x>a.max.x&&(i.x=this._viscousLimit(i.x,a.max.x)),i.y>a.max.y&&(i.y=this._viscousLimit(i.y,a.max.y)),this._draggable._newPos=this._draggable._startPos.add(i)}},_onPreDragWrap:function(){var i=this._worldWidth,a=Math.round(i/2),d=this._initialWorldOffset,f=this._draggable._newPos.x,b=(f-a+d)%i+a-d,C=(f+a+d)%i-a-d,A=Math.abs(b+d)<Math.abs(C+d)?b:C;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=A},_onDragEnd:function(i){var a=this._map,d=a.options,f=!d.inertia||i.noInertia||this._times.length<2;if(a.fire("dragend",i),f)a.fire("moveend");else{this._prunePositions(+new Date);var b=this._lastPos.subtract(this._positions[0]),C=(this._lastTime-this._times[0])/1e3,A=d.easeLinearity,M=b.multiplyBy(A/C),B=M.distanceTo([0,0]),q=Math.min(d.inertiaMaxSpeed,B),re=M.multiplyBy(q/B),fe=q/(d.inertiaDeceleration*A),Ee=re.multiplyBy(-fe/2).round();!Ee.x&&!Ee.y?a.fire("moveend"):(Ee=a._limitOffset(Ee,a.options.maxBounds),V(function(){a.panBy(Ee,{duration:fe,easeLinearity:A,noMoveStart:!0,animate:!0})}))}}});Pe.addInitHook("addHandler","dragging",Mg),Pe.mergeOptions({keyboard:!0,keyboardPanDelta:80});var jg=Vn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(i){this._map=i,this._setPanDelta(i.options.keyboardPanDelta),this._setZoomDelta(i.options.zoomDelta)},addHooks:function(){var i=this._map._container;i.tabIndex<=0&&(i.tabIndex="0"),ye(i,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),je(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 i=document.body,a=document.documentElement,d=i.scrollTop||a.scrollTop,f=i.scrollLeft||a.scrollLeft;this._map._container.focus(),window.scrollTo(f,d)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(i){var a=this._panKeys={},d=this.keyCodes,f,b;for(f=0,b=d.left.length;f<b;f++)a[d.left[f]]=[-1*i,0];for(f=0,b=d.right.length;f<b;f++)a[d.right[f]]=[i,0];for(f=0,b=d.down.length;f<b;f++)a[d.down[f]]=[0,i];for(f=0,b=d.up.length;f<b;f++)a[d.up[f]]=[0,-1*i]},_setZoomDelta:function(i){var a=this._zoomKeys={},d=this.keyCodes,f,b;for(f=0,b=d.zoomIn.length;f<b;f++)a[d.zoomIn[f]]=i;for(f=0,b=d.zoomOut.length;f<b;f++)a[d.zoomOut[f]]=-i},_addHooks:function(){ye(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){je(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(i){if(!(i.altKey||i.ctrlKey||i.metaKey)){var a=i.keyCode,d=this._map,f;if(a in this._panKeys){if(!d._panAnim||!d._panAnim._inProgress)if(f=this._panKeys[a],i.shiftKey&&(f=F(f).multiplyBy(3)),d.options.maxBounds&&(f=d._limitOffset(F(f),d.options.maxBounds)),d.options.worldCopyJump){var b=d.wrapLatLng(d.unproject(d.project(d.getCenter()).add(f)));d.panTo(b)}else d.panBy(f)}else if(a in this._zoomKeys)d.setZoom(d.getZoom()+(i.shiftKey?3:1)*this._zoomKeys[a]);else if(a===27&&d._popup&&d._popup.options.closeOnEscapeKey)d.closePopup();else return;ki(i)}}});Pe.addInitHook("addHandler","keyboard",jg),Pe.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Dg=Vn.extend({addHooks:function(){ye(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){je(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(i){var a=ag(i),d=this._map.options.wheelDebounceTime;this._delta+=a,this._lastMousePos=this._map.mouseEventToContainerPoint(i),this._startTime||(this._startTime=+new Date);var f=Math.max(d-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),f),ki(i)},_performZoom:function(){var i=this._map,a=i.getZoom(),d=this._map.options.zoomSnap||0;i._stop();var f=this._delta/(this._map.options.wheelPxPerZoomLevel*4),b=4*Math.log(2/(1+Math.exp(-Math.abs(f))))/Math.LN2,C=d?Math.
265ceil(b/d)*d:b,A=i._limitZoom(a+(this._delta>0?C:-C))-a;this._delta=0,this._startTime=null,A&&(i.options.scrollWheelZoom==="center"?i.setZoom(a+A):i.setZoomAround(this._lastMousePos,a+A))}});Pe.addInitHook("addHandler","scrollWheelZoom",Dg);var QE=600;Pe.mergeOptions({tapHold:ce.touchNative&&ce.safari&&ce.mobile,tapTolerance:15});var zg=Vn.extend({addHooks:function(){ye(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){je(this._map._container,"touchstart",this._onDown,this)},_onDown:function(i){if(clearTimeout(this._holdTimeout),i.touches.length===1){var a=i.touches[0];this._startPos=this._newPos=new I(a.clientX,a.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(ye(document,"touchend",ft),ye(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",a))},this),QE),ye(document,"touchend touchcancel contextmenu",this._cancel,this),ye(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function i(){je(document,"touchend",ft),je(document,"touchend touchcancel",i)},_cancel:function(){clearTimeout(this._holdTimeout),je(document,"touchend touchcancel contextmenu",this._cancel,this),je(document,"touchmove",this._onMove,this)},_onMove:function(i){var a=i.touches[0];this._newPos=new I(a.clientX,a.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(i,a){var d=new MouseEvent(i,{bubbles:!0,cancelable:!0,view:window,screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY});d._simulated=!0,a.target.dispatchEvent(d)}});Pe.addInitHook("addHandler","tapHold",zg),Pe.mergeOptions({touchZoom:ce.touch,bounceAtZoomLimits:!0});var Bg=Vn.extend({addHooks:function(){we(this._map._container,"leaflet-touch-zoom"),ye(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Qe(this._map._container,"leaflet-touch-zoom"),je(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(i){var a=this._map;if(!(!i.touches||i.touches.length!==2||a._animatingZoom||this._zooming)){var d=a.mouseEventToContainerPoint(i.touches[0]),f=a.mouseEventToContainerPoint(i.touches[1]);this._centerPoint=a.getSize()._divideBy(2),this._startLatLng=a.containerPointToLatLng(this._centerPoint),a.options.touchZoom!=="center"&&(this._pinchStartLatLng=a.containerPointToLatLng(d.add(f)._divideBy(2))),this._startDist=d.distanceTo(f),this._startZoom=a.getZoom(),this._moved=!1,this._zooming=!0,a._stop(),ye(document,"touchmove",this._onTouchMove,this),ye(document,"touchend touchcancel",this._onTouchEnd,this),ft(i)}},_onTouchMove:function(i){if(!(!i.touches||i.touches.length!==2||!this._zooming)){var a=this._map,d=a.mouseEventToContainerPoint(i.touches[0]),f=a.mouseEventToContainerPoint(i.touches[1]),b=d.distanceTo(f)/this._startDist;if(this._zoom=a.getScaleZoom(b,this._startZoom),!a.options.bounceAtZoomLimits&&(this._zoom<a.getMinZoom()&&b<1||this._zoom>a.getMaxZoom()&&b>1)&&(this._zoom=a._limitZoom(this._zoom)),a.options.touchZoom==="center"){if(this._center=this._startLatLng,b===1)return}else{var C=d._add(f)._divideBy(2)._subtract(this._centerPoint);if(b===1&&C.x===0&&C.y===0)return;this._center=a.unproject(a.project(this._pinchStartLatLng,this._zoom).subtract(C),this._zoom)}this._moved||(a._moveStart(!0,!1),this._moved=!0),H(this._animRequest);var A=l(a._move,a,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=V(A,this,!0),ft(i)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,H(this._animRequest),je(document,"touchmove",this._onTouchMove,this),je(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))}});Pe.addInitHook("addHandler","touchZoom",Bg),Pe.BoxZoom=Lg,Pe.DoubleClickZoom=Ig,Pe.Drag=Mg,Pe.Keyboard=jg,Pe.ScrollWheelZoom=Dg,Pe.TapHold=zg,Pe.TouchZoom=Bg,n.Bounds=X,n.Browser=ce,n.CRS=Z,n.Canvas=Rg,n.Circle=Ld,n.CircleMarker=Cl,n.Class=G,n.Control=gn,n.DivIcon=kg,n.DivOverlay=Wn,n.DomEvent=gE,n.DomUtil=pE,n.Draggable=Lr,n.Evented=Q,n.FeatureGroup=cr,n.GeoJSON=hr,n.GridLayer=Ho,n.Handler=Vn,n.Icon=hs,n.ImageOverlay=Ol,n.LatLng=Y,n.LatLngBounds=le,n.Layer=vn,n.LayerGroup=ds,n.LineUtil=RE,n.Map=Pe,n.Marker=kl,n.Mixin=SE,n.Path=Ir,n.Point=I,n.PolyUtil=EE,n.Polygon=fs,n.Polyline=
265dr,n.Popup=Ll,n.PosAnimation=lg,n.Projection=AE,n.Rectangle=Og,n.Renderer=fr,n.SVG=Wo,n.SVGOverlay=Tg,n.TileLayer=ms,n.Tooltip=Il,n.Transformation=be,n.Util=te,n.VideoOverlay=Eg,n.bind=l,n.bounds=ee,n.canvas=Ag,n.circle=zE,n.circleMarker=DE,n.control=$o,n.divIcon=qE,n.extend=s,n.featureGroup=IE,n.geoJSON=Sg,n.geoJson=FE,n.gridLayer=KE,n.icon=ME,n.imageOverlay=UE,n.latLng=ie,n.latLngBounds=se,n.layerGroup=LE,n.map=vE,n.marker=jE,n.point=F,n.polygon=$E,n.polyline=BE,n.popup=WE,n.rectangle=JE,n.setOptions=y,n.stamp=c,n.svg=Ng,n.svgOverlay=VE,n.tileLayer=Cg,n.tooltip=GE,n.transformation=Se,n.version=r,n.videoOverlay=HE;var XE=window.L;n.noConflict=function(){return window.L=XE,this},window.L=n})})(op,op.exports);var k2=op.exports;const Wr=_p(k2),C2=Wr.divIcon({className:"custom-marker",html:`<div style="
266    width: 24px;
267    height: 24px;
268    background: hsl(150 35% 45%);
269    border: 3px solid white;
270    border-radius: 50%;
271    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
272  "></div>`,iconSize:[24,24],iconAnchor:[12,12]}),P2=Wr.divIcon({className:"custom-marker",html:`<div style="
273    width: 24px;
274    height: 24px;
275    background: hsl(215 35% 45%);
276    border: 3px solid white;
277    border-radius: 50%;
278    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
279  "></div>`,iconSize:[24,24],iconAnchor:[12,12]}),R2=({start:e,finish:t,startCoordinates:n,finishCoordinates:r,className:s=""})=>{const o=w.useRef(null),l=w.useRef(null);return w.useEffect(()=>{if(!o.current||!n||!r)return;l.current&&(l.current.remove(),l.current=null);const u=Wr.map(o.current,{scrollWheelZoom:!1,zoomControl:!0});l.current=u,Wr.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap contributors",maxZoom:18}).addTo(u),Wr.marker([n.lat,n.lng],{icon:C2}).addTo(u).bindPopup(`<b>Start:</b> ${e.split(",")[0]}`),Wr.marker([r.lat,r.lng],{icon:P2}).addTo(u).bindPopup(`<b>Finish:</b> ${t.split(",")[0]}`);const p=[[n.lat,n.lng],[r.lat,r.lng]];Wr.polyline(p,{color:"hsl(215 35% 45%)",weight:3,opacity:.7,dashArray:"10, 6"}).addTo(u);const g=Wr.latLngBounds([[n.lat,n.lng],[r.lat,r.lng]]);return u.fitBounds(g,{padding:[40,40]}),()=>{l.current&&(l.current.remove(),l.current=null)}},[n,r,e,t]),!n||!r?m.jsxs("div",{className:`relative rounded-lg overflow-hidden aspect-[16/9] bg-muted ${s}`,children:[m.jsx("div",{className:"absolute inset-0 opacity-30",children:m.jsxs("svg",{width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("defs",{children:m.jsx("pattern",{id:"mapGrid",width:"20",height:"20",patternUnits:"userSpaceOnUse",children:m.jsx("path",{d:"M 20 0 L 0 0 0 20",fill:"none",stroke:"currentColor",strokeWidth:"0.5",className:"text-border"})})}),m.jsx("rect",{width:"100%",height:"100%",fill:"url(#mapGrid)"})]})}),m.jsxs("svg",{className:"absolute inset-0 w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[m.jsx("path",{d:"M 15 70 Q 25 50, 40 55 T 60 45 T 85 30",fill:"none",stroke:"hsl(215 35% 45%)",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"4 2",className:"opacity-60"}),m.jsx("circle",{cx:"15",cy:"70",r:"4",fill:"hsl(150 35% 45%)"}),m.jsx("circle",{cx:"85",cy:"30",r:"4",fill:"hsl(215 35% 45%)"})]}),m.jsxs("div",{className:"absolute bottom-3 left-3 right-3 flex justify-between items-end",children:[m.jsxs("div",{className:"bg-card/90 backdrop-blur-sm px-2 py-1 rounded text-xs shadow-sm",children:[m.jsx("span",{className:"text-muted-foreground",children:"Start:"})," ",m.jsx("span",{className:"font-medium text-foreground",children:e.split(",")[0]})]}),m.jsxs("div",{className:"bg-card/90 backdrop-blur-sm px-2 py-1 rounded text-xs shadow-sm",children:[m.jsx("span",{className:"text-muted-foreground",children:"End:"})," ",m.jsx("span",{className:"font-medium text-foreground",children:t.split(",")[0]})]})]})]}):m.jsxs("div",{className:`relative rounded-lg overflow-hidden aspect-[16/9] ${s}`,children:[m.jsx("div",{ref:o,className:"absolute inset-0 z-0"}),m.jsxs("div",{className:"absolute bottom-3 left-3 right-3 flex justify-between items-end z-10 pointer-events-none",children:[m.jsxs("div",{className:"bg-card/90 backdrop-blur-sm px-2 py-1 rounded text-xs shadow-sm",children:[m.jsx("span",{className:"text-muted-foreground",children:"Start:"})," ",m.jsx("span",{className:"font-medium text-foreground",children:e.split(",")[0]})]}),m.jsxs("div",{className:"bg-card/90 backdrop-blur-sm px-2 py-1 rounded text-xs shadow-sm",children:[m.jsx("span",{className:"text-muted-foreground",children:"End:"})," ",m.jsx("span",{className:"font-medium text-foreground",children:t.split(",")[0]})]})]})]})},A2=({offer:e})=>{const t=()=>{e.link&&window.open(e.link,"_blank","noopener,noreferrer")};return m.jsxs("div",{onClick:t,className:`p-4 rounded-lg border border-border bg-card transition-all ${e.link?"hover:border-primary/30 hover:shadow-md cursor-pointer group":""}`,children:[m.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("h4",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:e.companyName}),e.link&&m.jsx(jf,{className:"w-3.5 h-3.5 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]}),m.jsx("span",{className:"text-lg font-bold text-primary",children:e.priceTier})]}),m.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[m.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${e.supportStyle==="Guided"?"bg-accent/20 text-accent":"bg-secondary text-secondary-foreground"}`,children:e.supportStyle}),m.jsx("span",{className:"text-xs px-2 py-1 rounded-full bg-muted text-muted-foreground",children:e.sleepingStyle})]}),m.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:e.languages.map(n=>m.jsx("span",{className:"px-2 py-0.5 text-xs bg-muted text-muted-foreground rounded",children:n},n))}),m.jsxs("div",{className:"text-sm text-muted-foreground",children:[m.jsx("span",{className:"font-medium text-foreground
279/80",children:"Includes:"})," ",e.includes.slice(0,3).join(" • "),e.includes.length>3&&` +${e.includes.length-3} more`]}),e.priceMin&&e.priceMax&&m.jsxs("div",{className:"mt-2 text-sm font-medium text-foreground",children:["€",e.priceMin.toLocaleString()," – €",e.priceMax.toLocaleString(),m.jsx("span",{className:"font-normal text-muted-foreground",children:" per person"})]}),e.link&&m.jsx("div",{className:"mt-3 pt-3 border-t border-border/50 opacity-0 group-hover:opacity-100 transition-opacity",children:m.jsxs("span",{className:"text-xs text-accent flex items-center gap-1",children:["Visit website ",m.jsx(jf,{className:"w-3 h-3"})]})})]})},N2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],O2={Easy:"bg-easy",Moderate:"bg-moderate",Hard:"bg-hard",Expert:"bg-expert"},L2=({route:e,offers:t,isOpen:n,onClose:r,isFavorite:s,isInCompareList:o,onFavoriteToggle:l,onCompareToggle:u,compareDisabled:c,note:h,onNoteChange:p})=>{const{unit:g}=Yc(),[v,_]=w.useState(h),[k,y]=w.useState(t),[T,E]=w.useState(!1);w.useState(!1);const{loadOffersForRoute:S,refreshOffersForRoute:x,isRefreshingOffers:P}=eS(),R=!1;w.useEffect(()=>{_(h)},[h]),w.useEffect(()=>{n&&e&&N()},[n,e==null?void 0:e.id]),w.useEffect(()=>{y(t)},[t]);const N=async()=>{if(e){E(!0);try{const D=await S(e.id,e.name);D.length>0&&y(D)}catch(D){console.error("Failed to load offers:",D)}finally{E(!1)}}},O=()=>{p(v)};if(!e)return null;const z=e.bestSeasonMonths.map(D=>N2[D-1]).join(", ");return m.jsxs(m.Fragment,{children:[n&&m.jsx("div",{className:"fixed inset-0 bg-foreground
279/20 z-40 lg:hidden",onClick:r}),m.jsx("div",{className:`
280        fixed right-0 top-0 z-50 h-full
281        w-full sm:w-[480px] lg:w-[520px]
282        bg-card border-l border-border shadow-xl
283        transform transition-transform duration-300 ease-out
284        ${n?"translate-x-0":"translate-x-full"}
285      `,children:m.jsxs("div",{className:"h-full flex flex-col",children:[m.jsxs("div",{className:"shrink-0 p-4 border-b border-border flex items-center justify-between gap-4",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("button",{onClick:l,className:`p-2 rounded-lg transition-colors ${s?"text-destructive bg-destructive/10":"text-muted-foreground hover:text-destructive hover:bg-destructive/10"}`,children:m.jsx(Px,{className:`w-5 h-5 ${s?"fill-current":""}`})}),m.jsx("button",{onClick:u,disabled:c&&!o,className:`p-2 rounded-lg transition-colors ${o?"text-accent bg-accent/20":c?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-accent hover:bg-accent/10"}`,children:m.jsx(Cx,{className:"w-5 h-5"})})]}),m.jsx("button",{onClick:r,className:"p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:m.jsx(Ha,{className:"w-5 h-5"})})]}),m.jsx(vS,{className:"flex-1",children:m.jsxs("div",{className:"p-5 space-y-6",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[m.jsx("span",{className:`chip ${e.activityType==="Hike"?"chip-hike":"chip-bike"} text-xs px-2 py-0.5`,children:e.activityType}),m.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium text-primary-foreground ${O2[e.difficulty]}`,children:e.difficulty})]}),m.jsx("h2",{className:"font-serif text-2xl font-semibold text-foreground mb-2",children:e.name}),m.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[m.jsx(_m,{className:"w-4 h-4 shrink-0"}),m.jsxs("span",{children:[e.start," → ",e.finish]})]})]}),m.jsx("div",{className:"flex flex-wrap gap-2",children:e.countries.map(D=>m.jsx("span",{className:"px-3 py-1 bg-secondary text-secondary-foreground rounded-full text-sm font-medium",children:D},D))}),m.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[m.jsxs("div",{className:"stat-block bg-muted/50 rounded-lg",children:[m.jsx(Tx,{className:"w-5 h-5 text-muted-foreground mb-1"}),m.jsxs("span",{className:"stat-value",children:[e.minDays,"–",e.maxDays]}),m.jsx("span",{className:"stat-label",children:"Days"})]}),m.jsxs("div",{className:"stat-block bg-muted/50 rounded-lg",children:[m.jsx("span",{className:"stat-value",children:eo(e.distance,g)}),m.jsx("span",{className:"stat-label",children:g==="mi"?"Miles":"Kilometers"})]}),m.jsxs("div",{className:"stat-block bg-muted/50 rounded-lg",children:[m.jsx(Ax,{className:"w-5 h-5 text-muted-foreground mb-1"}),m.jsx("span",{className:"stat-value",children:e.elevationGain.toLocaleString()}),m.jsx("span",{className:"stat-label",children:"Meters Gain"})]}),m.jsxs("div",{className:"stat-block bg-muted/50 rounded-lg",children:[m.jsx("span",{className:"stat-value text-xl",children:e.priceTier}),m.jsx("span",{className:"stat-label",children:"Price Range"})]})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Overview"}),m.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e.description})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Highlights"}),m.jsx("ul",{className:"space-y-1",children:e.highlights.map((D,j)=>m.jsxs("li",{className:"flex items-start gap-2 text-muted-foreground",children:[m.jsx("span",{className:"text-accent mt-1",children:"•"}),m.jsx("span",{children:D})]},j))})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{children:[m.jsx("span",{className:"text-sm font-medium text-foreground/80",children:"Best Season: "}),m.jsx("span",{className:"text-sm text-muted-foreground",children:z})]}),m.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.sleepingStyles.map(D=>m.jsx("span",{className:"chip chip-default text-xs",children:D},D)),e.supportStyles.map(D=>m.jsx("span",{className:"chip chip-default text-xs",children:D},D))]}),m.jsx("div",{className:"flex flex-wrap gap-1",children:e.languages.map(D=>m.jsx("span",{className:"px-2 py-0.5 text-xs bg-muted text-muted-foreground rounded",children:D},D))})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"font-semibold text-foreground mb-3",children:"Route Map"}),m.jsx(R2,{start:e.start,finish:e.finish,startCoordinates:e.startCoordinates,finishCoordinates:e.finishCoordinates})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"font-semibold text-foreground mb-3",children:"Sample Itinerary"}),m.jsx("div",{className:"space-y-2",children:e.itinerary.map((D,j)=>m.jsx("div",{className:"p-3 rounded-lg bg-muted/50 text-sm text-foreground",children:D},j))})]}),m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsxs("h3",{className:"font-semibold text-foreground",children:["Tour Operators",k.length>0&&m.jsxs("span",{className:"ml-2 text-sm font-normal text-muted-foreground",children:["(",k.length," available)"]})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[T&&m.jsx(Ua,{className:"w-4 h-4 animate-spin text-muted-foreground"}),R]})]}),k.length>0?m.jsx("div",{className:"space-y-3",children:k.map(D=>m.jsx(A2,{offer:D},D.id))}):T?m.jsxs("div",{className:"p-6 text-center rounded-lg border border-dashed border-border",children:[m.jsx(Ua,{className:"w-6 h-6 animate-spin mx-auto mb-2 text-muted-foreground"}),m.jsx("p",{className:"text-muted-foreground text-sm",children:"Loading offers from database..."})]}):m.jsxs("div",{className:"p-6 text-center rounded-lg border border-dashed border-border",children:[m.jsx(zP,{className:"w-6 h-6 mx-auto mb-2 text-muted-foreground"}),m.jsx("p",{className:"text-muted-foreground text-sm mb-2",children:"No tour operators listed yet."}),R]})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"font-semibold text-foreground mb-3",children:"Personal Notes"}),m.jsx(rS,{placeholder:"Add your notes about this route...",value:v,onCh
285ange:D=>_(D.target.value),className:"min-h-[100px] resize-none"}),v!==h&&m.jsxs(Jc,{onClick:O,size:"sm",className:"mt-2",children:[m.jsx(FP,{className:"w-4 h-4 mr-1"}),"Save Note"]})]})]})})]})})]})},I2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],M2=({isOpen:e,onClose:t,routes:n,onRemove:r,onClear:s})=>{const{unit:o}=Yc();return!e||n.length===0?null:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"fixed inset-0 bg-foreground/30 z-50",onClick:t}),m.jsxs("div",{className:"fixed inset-4 lg:inset-10 z-50 bg-card rounded-xl shadow-2xl overflow-hidden flex flex-col",children:[m.jsxs("div",{className:"shrink-0 p-4 border-b border-border flex items-center justify-between",children:[m.jsxs("div",{children:[m.jsx("h2",{className:"font-serif text-xl font-semibold text-foreground",children:"Compare Routes"}),m.jsxs("p",{className:"text-sm text-muted-foreground",children:[n.length," routes selected"]})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Jc,{variant:"outline",size:"sm",onClick:s,children:"Clear All"}),m.jsx("button",{onClick:t,className:"p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted",children:m.jsx(Ha,{className:"w-5 h-5"})})]})]}),m.jsx("div",{className:"flex-1 overflow-auto p-4",children:m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 min-h-full",children:n.map(l=>m.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[m.jsxs("div",{className:"p-4 border-b border-border bg-muted/30",children:[m.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[m.jsx("span",{className:`chip ${l.activityType==="Hike"?"chip-hike":"chip-bike"} text-xs px-2 py-0.5`,children:l.activityType}),m.jsx("button",{onClick:()=>r(l.id),className:"p-1 rounded hover:bg-muted text-muted-foreground hover:text-foreground",children:m.jsx(Ha,{className:"w-4 h-4"})})]}),m.jsx("h3",{className:"font-serif font-semibold text-lg text-foreground",children:l.name})]}),m.jsxs("div",{className:"p-4 space-y-3 text-sm",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsx("span",{className:"text-muted-foreground",children:"Duration"}),m.jsxs("span",{className:"font-medium text-foreground",children:[l.minDays,"–",l.maxDays," days"]})]}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("span",{className:"text-muted-foreground",children:"Distance"}),m.jsxs("span",{className:"font-medium text-foreground",children:[eo(l.distance,o)," ",Sa(o)]})]}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("span",{className:"text-muted-foreground",children:"Elevation"}),m.jsxs("span",{className:"font-medium text-foreground",children:[l.elevationGain.toLocaleString()," m"]})]}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("span",{className:"text-muted-foreground",children:"Difficulty"}),m.jsx("span",{className:"font-medium text-foreground",children:l.difficulty})]}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("span",{className:"text-muted-foreground",children:"Price"}),m.jsx("span",{className:"font-medium text-foreground",children:l.priceTier})]}),m.jsxs("div",{className:"flex justify-between items-start",children:[m.jsx("span",{className:"text-muted-foreground",children:"Countries"}),m.jsx("span",{className:"font-medium text-foreground text-right",children:l.countries.join(", ")})]}),m.jsxs("div",{className:"flex justify-between items-start",children:[m.jsx("span",{className:"text-muted-foreground",children:"Season"}),m.jsx("span",{className:"font-medium text-foreground text-right",children:l.bestSeasonMonths.map(u=>I2[u-1]).join(", ")})]}),m.jsxs("div",{className:"flex justify-between items-start",children:[m.jsx("span",{className:"text-muted-foreground",children:"Sleeping"}),m.jsx("span",{className:"font-medium text-foreground text-right",children:l.sleepingStyles.join(", ")})]}),m.jsxs("div",{className:"flex justify-between items-start",children:[m.jsx("span",{className:"text-muted-foreground",children:"Support"}),m.jsx("span",{className:"font-medium text-foreground text-right",children:l.supportStyles.join(", ")})]})]})]},l.id))})})]})]})};var Nh=0;function j2(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??v_()),document.body.insertAdjacentElement("beforeend",e[1]??v_()),Nh++,()=>{Nh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Nh--}},[])}function v_(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 5,552 bytes, line 285
285style.position="fixed",e.style.pointerEvents="none",e}var Oh="focusScope.autoFocusOnMount",Lh="focusScope.autoFocusOnUnmount",y_={bubbles:!1,cancelable:!0},D2="FocusScope",_S=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...l}=e,[u,c]=w.useState(null),h=at(s),p=at(o),g=w.useRef(null),v=Te(t,y=>c(y)),_=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let y=function(x){if(_.paused||!u)return;const P=x.target;u.contains(P)?g.current=P:Fr(g.current,{select:!0})},T=function(x){if(_.paused||!u)return;const P=x.relatedTarget;P!==null&&(u.contains(P)||Fr(g.current,{select:!0}))},E=function(x){if(document.activeElement===document.body)for(const R of x)R.removedNodes.length>0&&Fr(u)};document.addEventListener("focusin",y),document.addEventListener("focusout",T);const S=new MutationObserver(E);return u&&S.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",T),S.disconnect()}}},[r,u,_.paused]),w.useEffect(()=>{if(u){w_.add(_);const y=document.activeElement;if(!u.contains(y)){const E=new CustomEvent(Oh,y_);u.addEventListener(Oh,h),u.dispatchEvent(E),E.defaultPrevented||(z2(H2(wS(u)),{select:!0}),document.activeElement===y&&Fr(u))}return()=>{u.removeEventListener(Oh,h),setTimeout(()=>{const E=new CustomEvent(Lh,y_);u.addEventListener(Lh,p),u.dispatchEvent(E),E.defaultPrevented||Fr(y??document.body,{select:!0}),u.removeEventListener(Lh,p),w_.remove(_)},0)}}},[u,h,p,_]);const k=w.useCallback(y=>{if(!n&&!r||_.paused)return;const T=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,E=document.activeElement;if(T&&E){const S=y.currentTarget,[x,P]=B2(S);x&&P?!y.shiftKey&&E===P?(y.preventDefault(),n&&Fr(x,{select:!0})):y.shiftKey&&E===x&&(y.preventDefault(),n&&Fr(P,{select:!0})):E===S&&y.preventDefault()}},[n,r,_.paused]);return m.jsx(pe.div,{tabIndex:-1,...l,ref:v,onKeyDown:k})});_S.displayName=D2;function z2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fr(r,{select:t}),document.activeElement!==n)return}function B2(e){const t=wS(e),n=__(t,e),r=__(t.reverse(),e);return[n,r]}function wS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function __(e,t){for(const n of e)if(!$2(n,{upTo:t}))return n}function $2(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 F2(e){return e instanceof HTMLInputElement&&"select"in e}function Fr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&F2(e)&&t&&e.select()}}var w_=U2();function U2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=x_(e,t),e.unshift(t)},remove(t){var n;e=x_(e,t),(n=e[0])==null||n.resume()}}}function x_(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function H2(e){return e.filter(t=>t.tagName!=="A")}function Vm(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var V2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ts=new WeakMap,hu=new WeakMap,fu={},Ih=0,xS=function(e){return e&&(e.host||xS(e.parentNode))},W2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=xS(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})},G2=function(e,t,n,r){var s=W2(t,Array.isArray(e)?e:[e]);fu[n]||(fu[n]=new WeakMap);var o=fu[n],l=[],u=new Set,c=new Set(s),h=function(g){!g||u.has(g)||(u.add(g),h(g.parentNode))};s.forEach(h);var p=function(g){!g||c.has(g)||Array.prototype.forEach.call(g.children,function(v){if(u.has(v))p(v);else try{var _=v.getAttribute(r),k=_!==null&&_!=="false",y=(Ts.get(v)||0)+1,T=(o.get(v)||0)+1;Ts.set(v,y),o.set(v,T),l.push(v),y===1&&k&&hu.set(v,!0),T===1&&v.setAttribute(n,"true"),k||v.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",v,E)}})};return p(t),u.clear(),Ih++,function(){l.forEach(function(g){var v=Ts.get(g)-1,_=o.get(g)-1;Ts.set(g,v),o.set(g,_),v||(hu.has(g)||g.removeAttribute(r),hu.delete(g)),_||g.removeAttribute(n)}),Ih--,Ih||(Ts=new WeakMap,Ts=new WeakMap,hu=new WeakMap,fu={})}},q2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=V2(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),G2(r,s,n,"aria-hidden")):function(){return null}},Nu="right-scroll-bar-position",Ou="width-before-scroll-bar",K2="with-scroll-bars-hidden",Z2="--removed-body-scroll-bar-size";function Mh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Y2(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var J2=typeof window<"u"?w.useLayoutEffect:w.useEffect,b_=new WeakMap;function Q2(e,t){var n=Y2(null,function(r){return e.forEach(function(s){return Mh(s,r)})});return J2(function(){var r=b_.get(n);if(r){var s=new Set(r),o=new Set(e),l=n.current;
vendor: 4,196 bytes, lines 285-300
285s.forEach(function(u){o.has(u)||Mh(u,null)}),o.forEach(function(u){s.has(u)||Mh(u,l)})}b_.set(n,e)},[e]),n}function X2(e){return e}function ej(e,t){t===void 0&&(t=X2);var n=[],r=!1,s={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 c=function(){var p=l;l=[],p.forEach(o)},h=function(){return Promise.resolve().then(c)};h(),n={push:function(p){l.push(p),h()},filter:function(p){return l=l.filter(p),n}}}};return s}function tj(e){e===void 0&&(e={});var t=ej(null);return t.options=Qn({async:!0,ssr:!1},e),t}var bS=function(e){var t=e.sideCar,n=Co(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 w.createElement(r,Qn({},n))};bS.isSideCarExport=!0;function nj(e,t){return e.useMedium(t),bS}var SS=tj(),jh=function(){},ed=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:jh,onWheelCapture:jh,onTouchMoveCapture:jh}),s=r[0],o=r[1],l=e.forwardProps,u=e.children,c=e.className,h=e.removeScrollBar,p=e.enabled,g=e.shards,v=e.sideCar,_=e.noRelative,k=e.noIsolation,y=e.inert,T=e.allowPinchZoom,E=e.as,S=E===void 0?"div":E,x=e.gapMode,P=Co(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=v,N=Q2([n,t]),O=Qn(Qn({},P),s);return w.createElement(w.Fragment,null,p&&w.createElement(R,{sideCar:SS,removeScrollBar:h,shards:g,noRelative:_,noIsolation:k,inert:y,setCallbacks:o,allowPinchZoom:!!T,lockRef:n,gapMode:x}),l?w.cloneElement(w.Children.only(u),Qn(Qn({},O),{ref:N})):w.createElement(S,Qn({},O,{className:c,ref:N}),u))});ed.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ed.classNames={fullWidth:Ou,zeroRight:Nu};var rj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ij(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=rj();return t&&e.setAttribute("nonce",t),e}function sj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oj(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var aj=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ij())&&(sj(t,n),oj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lj=function(){var e=aj();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ES=function(){var e=lj(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},uj={left:0,top:0,right:0,gap:0},Dh=function(e){return parseInt(e||"",10)||0},cj=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Dh(n),Dh(r),Dh(s)]},dj=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return uj;var t=cj(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])}},hj=ES(),to="data-scroll-locked",fj=function(e,t,n,r){var s=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
286  .`.concat(K2,` {
287   overflow: hidden `).concat(r,`;
288   padding-right: `).concat(u,"px ").concat(r,`;
289  }
290  body[`).concat(to,`] {
291    overflow: hidden `).concat(r,`;
292    overscroll-behavior: contain;
293    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
294    padding-left: `.concat(s,`px;
295    padding-top: `).concat(o,`px;
296    padding-right: `).concat(l,`px;
297    margin-left:0;
298    margin-top:0;
299    margin-right: `).concat(u,"px ").concat(r,`;
300    `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";
300")].filter(Boolean).join(""),`
301  }
302  
303  .`).concat(Nu,` {
304    right: `).concat(u,"px ").concat(r,`;
305  }
306  
307  .`).concat(Ou,` {
308    margin-right: `).concat(u,"px ").concat(r,`;
309  }
310  
311  .`).concat(Nu," .").concat(Nu,` {
312    right: 0 `).concat(r,`;
313  }
314  
315  .`).concat(Ou," .").concat(Ou,` {
316    margin-right: 0 `).concat(r,`;
317  }
318  
319  body[`).concat(to,`] {
320    `).concat(Z2,": ").concat(u,`px;
321  }
322`)},S_=function(){var e=parseInt(document.body.getAttribute(to)||"0",10);return isFinite(e)?e:0},pj=function(){w.useEffect(function(){return document.body.setAttribute(to,(S_()+1).toString()),function(){var e=S_()-1;e<=0?document.body.removeAttribute(to):document.body.setAttribute(to,e.toString())}},[])},mj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;pj();var o=w.useMemo(function(){return dj(s)},[s]);return w.createElement(hj,{styles:fj(o,!t,s,n?"":"!important")})},ap=!1;if(typeof window<"u")try{var pu=Object.defineProperty({},"passive",{get:function(){return ap=!0,!0}});window.addEventListener("test",pu,pu),window.removeEventListener("test",pu,pu)}catch{ap=!1}var ks=ap?{passive:!1}:!1,gj=function(e){return e.tagName==="TEXTAREA"},TS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!gj(e)&&n[t]==="visible")},vj=function(e){return TS(e,"overflowY")},yj=function(e){return TS(e,"overflowX")},E_=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=kS(e,r);if(s){var o=CS(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},_j=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},wj=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},kS=function(e,t){return e==="v"?vj(t):yj(t)},CS=function(e,t){return e==="v"?_j(t):wj(t)},xj=function(e,t){return e==="h"&&t==="rtl"?-1:1},bj=function(e,t,n,r,s){var o=xj(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,c=t.contains(u),h=!1,p=l>0,g=0,v=0;do{if(!u)break;var _=CS(e,u),k=_[0],y=_[1],T=_[2],E=y-T-o*k;(k||E)&&kS(e,u)&&(g+=E,v+=k);var S=u.parentNode;u=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return(p&&(Math.abs(g)<1||!s)||!p&&(Math.abs(v)<1||!s))&&(h=!0),h},mu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},T_=function(e){return[e.deltaX,e.deltaY]},k_=function(e){return e&&"current"in e?e.current:e},Sj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ej=function(e){return`
323  .block-interactivity-`.concat(e,` {pointer-events: none;}
324  .allow-interactivity-`).concat(e,` {pointer-events: all;}
325`)},Tj=0,Cs=[];function kj(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),s=w.useState(Tj++)[0],o=w.useState(ES)[0],l=w.useRef(e);w.useEffect(function(){l.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=nL([e.lockRef.current],(e.shards||[]).map(k_),!0).filter(Boolean);return y.forEach(function(T){return T.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var u=w.useCallback(function(y,T){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!l.current.allowPinchZoom;var E=mu(y),S=n.current,x="deltaX"in y?y.deltaX:S[0]-E[0],P="deltaY"in y?y.deltaY:S[1]-E[1],R,N=y.target,O=Math.abs(x)>Math.abs(P)?"h":"v";if("touches"in y&&O==="h"&&N.type==="range")return!1;var z=E_(O,N);if(!z)return!0;if(z?R=O:(R=O==="v"?"h":"v",z=E_(O,N)),!z)return!1;if(!r.current&&"changedTouches"in y&&(x||P)&&(r.current=R),!R)return!0;var D=r.current||R;return bj(D,T,y,D==="h"?x:P,!0)},[]),c=w.useCallback(function(y){var T=y;if(!(!Cs.length||Cs[Cs.length-1]!==o)){var E="deltaY"in T?T_(T):mu(T),S=t.current.filter(function(R){return R.name===T.type&&(R.target===T.target||T.target===R.shadowParent)&&Sj(R.delta,E)})[0];if(S&&S.should){T.cancelable&&T.preventDefault();return}
vendor: 4,225 bytes, line 325
325if(!S){var x=(l.current.shards||[]).map(k_).filter(Boolean).filter(function(R){return R.contains(T.target)}),P=x.length>0?u(T,x[0]):!l.current.noIsolation;P&&T.cancelable&&T.preventDefault()}}},[]),h=w.useCallback(function(y,T,E,S){var x={name:y,delta:T,target:E,should:S,shadowParent:Cj(E)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(P){return P!==x})},1)},[]),p=w.useCallback(function(y){n.current=mu(y),r.current=void 0},[]),g=w.useCallback(function(y){h(y.type,T_(y),y.target,u(y,e.lockRef.current))},[]),v=w.useCallback(function(y){h(y.type,mu(y),y.target,u(y,e.lockRef.current))},[]);w.useEffect(function(){return Cs.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",c,ks),document.addEventListener("touchmove",c,ks),document.addEventListener("touchstart",p,ks),function(){Cs=Cs.filter(function(y){return y!==o}),document.removeEventListener("wheel",c,ks),document.removeEventListener("touchmove",c,ks),document.removeEventListener("touchstart",p,ks)}},[]);var _=e.removeScrollBar,k=e.inert;return w.createElement(w.Fragment,null,k?w.createElement(o,{styles:Ej(s)}):null,_?w.createElement(mj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Cj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Pj=nj(SS,kj);var PS=w.forwardRef(function(e,t){return w.createElement(ed,Qn({},e,{ref:t,sideCar:Pj}))});PS.classNames=ed.classNames;var Rj=[" ","Enter","ArrowUp","ArrowDown"],Aj=[" ","Enter"],ts="Select",[td,nd,Nj]=Oc(ts),[Po,mz]=ir(ts,[Nj,$c]),rd=$c(),[Oj,_i]=Po(ts),[Lj,Ij]=Po(ts),RS=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:l,defaultValue:u,onValueChange:c,dir:h,name:p,autoComplete:g,disabled:v,required:_,form:k}=e,y=rd(t),[T,E]=w.useState(null),[S,x]=w.useState(null),[P,R]=w.useState(!1),N=hl(h),[O,z]=Xi({prop:r,defaultProp:s??!1,onChange:o,caller:ts}),[D,j]=Xi({prop:l,defaultProp:u,onChange:c,caller:ts}),V=w.useRef(null),H=T?k||!!T.closest("form"):!0,[te,G]=w.useState(new Set),ne=Array.from(te).map(W=>W.props.value).join(";");return m.jsx(TN,{...y,children:m.jsxs(Oj,{required:_,scope:t,trigger:T,onTriggerChange:E,valueNode:S,onValueNodeChange:x,valueNodeHasChildren:P,onValueNodeHasChildrenChange:R,contentId:ul(),value:D,onValueChange:j,open:O,onOpenChange:z,dir:N,triggerPointerDownPosRef:V,disabled:v,children:[m.jsx(td.Provider,{scope:t,children:m.jsx(Lj,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(W=>{G(Q=>new Set(Q).add(W))},[]),onNativeOptionRemove:w.useCallback(W=>{G(Q=>{const I=new Set(Q);return I.delete(W),I})},[]),children:n})}),H?m.jsxs(XS,{"aria-hidden":!0,required:_,tabIndex:-1,name:p,autoComplete:g,value:D,onChange:W=>j(W.target.value),disabled:v,form:k,children:[D===void 0?m.jsx("option",{value:""}):null,Array.from(te)]},ne):null]})})};RS.displayName=ts;var AS="SelectTrigger",NS=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=rd(n),l=_i(AS,n),u=l.disabled||r,c=Te(t,l.onTriggerChange),h=nd(n),p=w.useRef("touch"),[g,v,_]=t1(y=>{const T=h().filter(x=>!x.disabled),E=T.find(x=>x.value===l.value),S=n1(T,y,E);S!==void 0&&l.onValueChange(S.value)}),k=y=>{u||(l.onOpenChange(!0),_()),y&&(l.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return m.jsx(ub,{asChild:!0,...o,children:m.jsx(pe.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":e1(l.value)?"":void 0,...s,ref:c,onClick:ae(s.onClick,y=>{y.currentTarget.focus(),p.current!=="mouse"&&k(y)}),onPointerDown:ae(s.onPointerDown,y=>{p.current=y.pointerType;const T=y.target;T.hasPointerCapture(y.pointerId)&&T.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(k(y),y.preventDefault())}),onKeyDown:ae(s.onKeyDown,y=>{const T=g.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&v(y.key),!(T&&y.key===" ")&&Rj.includes(y.key)&&(k(),y.preventDefault())})})})});NS.displayName=AS;var OS="SelectValue",LS=w.forwardRef((e,t)=>
vendor: 15,561 bytes, line 325
325{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:l="",...u}=e,c=_i(OS,n),{onValueNodeHasChildrenChange:h}=c,p=o!==void 0,g=Te(t,c.onValueNodeChange);return ht(()=>{h(p)},[h,p]),m.jsx(pe.span,{...u,ref:g,style:{pointerEvents:"none"},children:e1(c.value)?m.jsx(m.Fragment,{children:l}):o})});LS.displayName=OS;var Mj="SelectIcon",IS=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return m.jsx(pe.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});IS.displayName=Mj;var jj="SelectPortal",MS=e=>m.jsx(mm,{asChild:!0,...e});MS.displayName=jj;var ns="SelectContent",jS=w.forwardRef((e,t)=>{const n=_i(ns,e.__scopeSelect),[r,s]=w.useState();if(ht(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?ss.createPortal(m.jsx(DS,{scope:e.__scopeSelect,children:m.jsx(td.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),o):null}return m.jsx(zS,{...e,ref:t})});jS.displayName=ns;var xn=10,[DS,wi]=Po(ns),Dj="SelectContentImpl",zj=Fa("SelectContent.RemoveScroll"),zS=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:c,align:h,alignOffset:p,arrowPadding:g,collisionBoundary:v,collisionPadding:_,sticky:k,hideWhenDetached:y,avoidCollisions:T,...E}=e,S=_i(ns,n),[x,P]=w.useState(null),[R,N]=w.useState(null),O=Te(t,Z=>P(Z)),[z,D]=w.useState(null),[j,V]=w.useState(null),H=nd(n),[te,G]=w.useState(!1),ne=w.useRef(!1);w.useEffect(()=>{if(x)return q2(x)},[x]),j2();const W=w.useCallback(Z=>{const[me,...Oe]=H().map(Se=>Se.ref.current),[xe]=Oe.slice(-1),be=document.activeElement;for(const Se of Z)if(Se===be||(Se==null||Se.scrollIntoView({block:"nearest"}),Se===me&&R&&(R.scrollTop=0),Se===xe&&R&&(R.scrollTop=R.scrollHeight),Se==null||Se.focus(),document.activeElement!==be))return},[H,R]),Q=w.useCallback(()=>W([z,x]),[W,z,x]);w.useEffect(()=>{te&&Q()},[te,Q]);const{onOpenChange:I,triggerPointerDownPosRef:$}=S;w.useEffect(()=>{if(x){let Z={x:0,y:0};const me=xe=>{var be,Se;Z={x:Math.abs(Math.round(xe.pageX)-(((be=$.current)==null?void 0:be.x)??0)),y:Math.abs(Math.round(xe.pageY)-(((Se=$.current)==null?void 0:Se.y)??0))}},Oe=xe=>{Z.x<=10&&Z.y<=10?xe.preventDefault():x.contains(xe.target)||I(!1),document.removeEventListener("pointermove",me),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[x,I,$]),w.useEffect(()=>{const Z=()=>I(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[I]);const[F,X]=t1(Z=>{const me=H().filter(be=>!be.disabled),Oe=me.find(be=>be.ref.current===document.activeElement),xe=n1(me,Z,Oe);xe&&setTimeout(()=>xe.ref.current.focus())}),ee=w.useCallback((Z,me,Oe)=>{const xe=!ne.current&&!Oe;(S.value!==void 0&&S.value===me||xe)&&(D(Z),xe&&(ne.current=!0))},[S.value]),le=w.useCallback(()=>x==null?void 0:x.focus(),[x]),se=w.useCallback((Z,me,Oe)=>{const xe=!ne.current&&!Oe;(S.value!==void 0&&S.value===me||xe)&&V(Z)},[S.value]),Y=r==="popper"?lp:BS,ie=Y===lp?{side:u,sideOffset:c,align:h,alignOffset:p,arrowPadding:g,collisionBoundary:v,collisionPadding:_,sticky:k,hideWhenDetached:y,avoidCollisions:T}:{};return m.jsx(DS,{scope:n,content:x,viewport:R,onViewportChange:N,itemRefCallback:ee,selectedItem:z,onItemLeave:le,itemTextRefCallback:se,focusSelectedItem:Q,selectedItemText:j,position:r,isPositioned:te,searchRef:F,children:m.jsx(PS,{as:zj,allowPinchZoom:!0,children:m.jsx(_S,{asChild:!0,trapped:S.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:ae(s,Z=>{var me;(me=S.trigger)==null||me.focus({preventScroll:!0}),Z.preventDefault()}),children:m.jsx(Lc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:m.jsx(Y,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:Z=>Z.preventDefault(),...E,...ie,onPlaced:()=>G(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:ae(E.onKeyDown,Z=>{const me=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!me&&Z.key.length===1&&X(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let xe=H().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const be=Z.target,Se=xe.indexOf(be);xe=xe.slice(Se+1)}setTimeout(()=>W(xe)),Z.preventDefault()}})})})})})})});zS.displayName=Dj;var Bj="SelectItemAlignedPosition",BS=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=_i(ns,n),l=wi(ns,n),[u,c]=w.useState(null),[h,p]=w.useState(null),g=Te(t,O=>p(O)),v=nd(n),_=w.useRef(!1),k=w.useRef(!0),{viewport:y,selectedItem:T,selectedItemText:E,focusSelectedItem:S}=l,x=w.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&h&&y&&T&&E){const O=o.trigger.getBoundingClientRect(),z=h.getBoundingClientRect(),D=o.valueNode.getBoundingClientRect(),j=E.getBoundingClientRect();if(o.dir!=="rtl"){const be=j.left-z.left,Se=D.left-be,et=O.left-Se,It=O.width+et,Mn=Math.max(It,z.width),pn=window.innerWidth-xn,mn=el(Se,[xn,Math.max(xn,pn-Mn)]);u.style.minWidth=It+"px",u.style.left=mn+"px"}else{const be=z.right-j.right,Se=window.innerWidth-D.right-be,et=window.innerWidth-O.right-Se,It=O.width+et,Mn=Math.max(It,z.width),pn=window.innerWidth-xn,mn=el(Se,[xn,Math.max(xn,pn-Mn)]);u.style.minWidth=It+"px",u.style.right=mn+"px"}const V=v(),H=window.innerHeight-xn*2,te=y.scrollHeight,G=window.getComputedStyle(h),ne=parseInt(G.borderTopWidth,10),W=parseInt(G.paddingTop,10),Q=parseInt(G.borderBottomWidth,10),I=parseInt(G.paddingBottom,10),$=ne+W+te+I+Q,F=Math.min(T.offsetHeight*5,$),X=window.getComputedStyle(y),ee=parseInt(X.paddingTop,10),le=parseInt(X.paddingBottom,10),se=O.top+O.height/2-xn,Y=H-se,ie=T.offsetHeight/2,Z=T.offsetTop+ie,me=ne+W+Z,Oe=$-me;if(me<=se){const be=V.length>0&&T===V[V.length-1].ref.current;u.style.bottom="0px";const Se=h.clientHeight-y.offsetTop-y.offsetHeight,et=Math.max(Y,ie+(be?le:0)+Se+Q),It=me+et;u.style.height=It+"px"}else{const be=V.length>0&&T===V[0].ref.current;u.style.top="0px";const et=Math.max(se,ne+y.offsetTop+(be?ee:0)+ie)+Oe;u.style.height=et+"px",y.scrollTop=me-se+y.offsetTop}u.style.margin=`${xn}px 0`,u.style.minHeight=F+"px",u.style.maxHeight=H+"px",r==null||r(),requestAnimationFrame(()=>_.current=!0)}},[v,o.trigger,o.valueNode,u,h,y,T,E,o.dir,r]);ht(()=>x(),[x]);const[P,R]=w.useState();ht(()=>{h&&R(window.getComputedStyle(h).zIndex)},[h]);const N=w.useCallback(O=>{O&&k.current===!0&&(x(),S==null||S(),k.current=!1)},[x,S]);return m.jsx(Fj,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:_,onScrollButtonChange:N,children:m.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:m.jsx(pe.div,{...s,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});BS.displayName=Bj;var $j="SelectPopperPosition",lp=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=xn,...o}=e,l=rd(n);return m.jsx(cb,{...l,...o,ref:t,align:r,collisionPadding:s,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)"}})});lp.displayName=$j;var[Fj,Wm]=Po(ns,{}),up="SelectViewport",$S=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=wi(up,n),l=Wm(up,n),u=Te(t,o.onViewportChange),c=w.useRef(0);return m.jsxs(m.Fragment,{children:[m.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}),m.jsx(td.Slot,{scope:n,children:m.jsx(pe.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ae(s.onScroll,h=>{const p=h.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:v}=l;if(v!=null&&v.current&&g){const _=Math.abs(c.current-p.scrollTop);if(_>0){const k=window.innerHeight-xn*2,y=parseFloat(g.style.minHeight),T=parseFloat(g.style.height),E=Math.max(y,T);if(E<k){const S=E+_,x=Math.min(k,S),P=S-x;g.style.height=x+"px",g.style.bottom==="0px"&&(p.scrollTop=P>0?P:0,g.style.justifyContent="flex-end")}}}c.current=p.scrollTop})})})]})});$S.displayName=up;var FS="SelectGroup",[Uj,Hj]=Po(FS),Vj=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=ul();return m.jsx(Uj,{scope:n,id:s,children:m.jsx(pe.div,{role:"group","aria-labelledby":s,...r,ref:t})})});Vj.displayName=FS;var US="SelectLabel",HS=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Hj(US,n);return m.jsx(pe.div,{id:s.id,...r,ref:t})});HS.displayName=US;var mc="SelectItem",[Wj,VS]=Po(mc),WS=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...l}=e,u=_i(mc,n),c=wi(mc,n),h=u.value===r,[p,g]=w.useState(o??""),[v,_]=w.useState(!1),k=Te(t,S=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,S,r,s)}),y=ul(),T=w.useRef("touch"),E=()=>{s||(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 m.jsx(Wj,{scope:n,value:r,disabled:s,textId:y,isSelected:h,onItemTextChange:w.useCallback(S=>{g(x=>x||((S==null?void 0:S.textContent)??"").trim())},[]),children:m.jsx(td.ItemSlot,{scope:n,value:r,disabled:s,textValue:p,children:m.jsx(pe.div,{role:"option","aria-labelledby":y,"data-highlighted":v?"":void 0,"aria-selected":h&&v,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...l,ref:k,onFocus:ae(l.onFocus,()=>_(!0)),onBlur:ae(l.onBlur,()=>_(!1)),onClick:ae(l.onClick,()=>{T.current!=="mouse"&&E()}),onPointerUp:ae(l.onPointerUp,()=>{T.current==="mouse"&&E()}),onPointerDown:ae(l.onPointerDown,S=>{T.current=S.pointerType}),onPointerMove:ae(l.onPointerMove,S=>{var x;T.current=S.pointerType,s?(x=c.onItemLeave)==null||x.call(c):T.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ae(l.onPointerLeave,S=>{var x;S.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:ae(l.onKeyDown,S=>{var P;((P=c.searchRef)==null?void 0:P.current)!==""&&S.key===" "||(Aj.includes(S.key)&&E(),S.key===" "&&S.preventDefault())})})})})});WS.displayName=mc;var aa="SelectItemText",GS=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,l=_i(aa,n),u=wi(aa,n),c=VS(aa,n),h=Ij(aa,n),[p,g]=w.useState(null),v=Te(t,E=>g(E),c.onItemTextChange,E=>{var S;return(S=u.itemTextRefCallback)==null?void 0:S.call(u,E,c.value,c.disabled)}),_=p==null?void 0:p.textContent,k=w.useMemo(()=>m.jsx("option",{value:c.value,disabled:c.disabled,children:_},c.value),[c.disabled,c.value,_]),{onNativeOptionAdd:y,onNativeOptionRemove:T}=h;return ht(()=>(y(k),()=>T(k)),[y,T,k]),m.jsxs(m.Fragment,{children:[m.jsx(pe.span,{id:c.textId,...o,ref:v}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?ss.createPortal(o.children,l.valueNode):null]})});GS.displayName=aa;var qS="SelectItemIndicator",KS=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return VS(qS,n).isSelected?m.jsx(pe.span,{"aria-hidden":!0,...r,ref:t}):null});KS.displayName=qS;var cp="SelectScrollUpButton",ZS=w.forwardRef((e,t)=>{const n=wi(cp,e.__scopeSelect),r=Wm(cp,e.__scopeSelect),[s,o]=w.useState(!1),l=Te(t,r.onScrollButtonChange);return ht(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=c.scrollTop>0;o(h)};const c=n.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),s?m.jsx(JS,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:c}=n;u&&c&&(u.scrollTop=u.scrollTop-c.offsetHeight)}}):null});ZS.displayName=cp;var dp="SelectScrollDownButton",YS=w.forwardRef((e,t)=>{const n=wi(dp,e.__scopeSelect),r=Wm(dp,e.__scopeSelect),[s,o]=w.useState(!1),l=Te(t,r.onScrollButtonChange);return ht(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=c.scrollHeight-c.clientHeight,p=Math.ceil(c.scrollTop)<h;o(p)};const c=n.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),s?m.jsx(JS,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:c}=n;u&&c&&(u.scrollTop=u.scrollTop+c.offsetHeight)}}):null});YS.displayName=dp;var JS=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=wi("SelectScrollButton",n),l=w.useRef(null),u=nd(n),c=w.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return w.useEffect(()=>()=>c(),[c]),ht(()=>{var p;const h=u().find(g=>g.ref.current===document.activeElement);(p=h==null?void 0:h.ref.current)==null||p.scrollIntoView({block:"nearest"})},[u]),m.jsx(pe.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ae(s.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:ae(s.onPointerMove,()=>{var h;(h=o.onItemLeave)==null||h.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:ae(s.onPointerLeave,()=>{c()})})}),Gj="SelectSeparator",QS=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(pe.div,{"aria-hidden":!0,...r,ref:t})});QS.displayName=Gj;var hp="SelectArrow",qj=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=rd(n),o=_i(hp,n),l=wi(hp,n);return o.open&&l.position==="popper"?m.jsx(db,{...s,...r,ref:t}):null});qj.displayName=hp;var Kj="SelectBubbleInput",XS=w.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=w.useRef(null),o=Te(r,s),l=Vm(t);return w.useEffect(()=>{const u=s.current;if(!u)return;const c=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&p){const g=new Event("change",{bubbles:!0});p.call(u,t),u.dispatchEvent(g)}},[l,t]),m.jsx(pe.select,{...n,style:{...nx,...n.style},ref:o,defaultValue:t})});XS.displayName=Kj;function e1(e){return e===""||e===void 0}function t1(e){const t=at(e),n=w.useRef(""),r=w.useRef(0),s=w.useCallback(l=>{const u=n.current+l;t(u),function c(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(u)},[t]),o=w.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function n1(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=Zj(e,Math.max(o,0));s.length===1&&(l=l.filter(h=>h!==n));const c=l.find(h=>h.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function Zj(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Yj=RS,r1=NS,Jj=LS,Qj=IS,Xj=MS,i1=jS,eD=$S,s1=HS,o1=WS,tD=GS,nD=KS,a1=ZS,l1=YS,u1=QS;const rD=Yj,iD=Jj,c1=w.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(r1,{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
325ing-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,m.jsx(Qj,{asChild:!0,children:m.jsx(kx,{className:"h-4 w-4 opacity-50"})})]}));c1.displayName=r1.displayName;const d1=w.forwardRef(({className:e,...t},n)=>m.jsx(a1,{ref:n,className:Ce("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(DP,{className:"h-4 w-4"})}));d1.displayName=a1.displayName;const h1=w.forwardRef(({className:e,...t},n)=>m.jsx(l1,{ref:n,className:Ce("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(kx,{className:"h-4 w-4"})}));h1.displayName=l1.displayName;const f1=w.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>m.jsx(Xj,{children:m.jsxs(i1,{ref:s,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:[m.jsx(d1,{}),m.jsx(eD,{className:Ce("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),m.jsx(h1,{})]})}));f1.displayName=i1.displayName;const sD=w.forwardRef(({className:e,...t},n)=>m.jsx(s1,{ref:n,className:Ce("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));sD.displayName=s1.displayName;const la=w.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(o1,{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 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(nD,{children:m.jsx(jP,{className:"h-4 w-4"})})}),m.jsx(tD,{children:t})]}));la.displayName=o1.displayName;const oD=w.forwardRef(({className:e,...t},n)=>m.jsx(u1,{ref:n,className:Ce("-mx-1 my-1 h-px bg-muted",e),...t}));oD.displayName=u1.displayName;const aD=({totalRoutes:e,filteredCount:t,sortBy:n,onSortChange:r,onFilterClick:s,activeFilterCount:o})=>m.jsxs("div",{className:"flex items-center justify-between gap-4 py-4",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsxs(Jc,{variant:"outline",size:"sm",onClick:s,className:"md:hidden",children:[m.jsx(HP,{className:"w-4 h-4 mr-2"}),"Filters",o>0&&m.jsx("span",{className:"ml-1.5 px-1.5 py-0.5 text-xs bg-primary text-primary-foreground rounded-full",children:o})]}),m.jsx("span",{className:"text-sm text-muted-foreground",children:t===e?`${e} routes`:`${t} of ${e} routes`})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(IP,{className:"w-4 h-4 text-muted-foreground"}),m.jsxs(rD,{value:n,onValueChange:l=>r(l),children:[m.jsx(c1,{className:"w-[160px] h-9",children:m.jsx(iD,{placeholder:"Sort by"})}),m.jsxs(f1,{children:[m.jsx(la,{value:"popularity",children:"Popularity"}),m.jsx(la,{value:"days",children:"Duration (shortest)"}),m.jsx(la,{value:"difficulty",children:"Difficulty (easiest)"}),m.jsx(la,{value:"price",children:"Price (lowest)"})]})]})]})]});var zh="rovingFocusGroup.onEntryFocus",lD={bubbles:!1,cancelable:!0},fl="RovingFocusGroup",[fp,p1,uD]=Oc(fl),[cD,m1]=ir(fl,[uD]),[dD,hD]=cD(fl),g1=w.forwardRef((e,t)=>m.jsx(fp.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(fp.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(fD,{...e,ref:t})})}));g1.displayName=fl;var fD=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:c,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...g}=e,v=w.useRef(null),_=Te(t,v),k=hl(o),[y,T]=Xi({prop:l,defaultProp:u??null,onChange:c,caller:fl}),[E,S]=w.useState(!1),x=at(h),P=p1(n),R=w.useRef(!1),[N,O]=w.useState(0);return w.useEffect(()=>{const z=v.current;if(z)return z.addEventListener(zh,x),()=>z.removeEventListener(zh,x)},[x]),m.jsx(dD,{scope:n,orientation:r,dir:k,loop:s,currentTabStopId:y,onItemFocus:w.useCallback(z=>T(z),[T]),onItemShiftTab:w.useCallback(()=>S(!0),[]),onFocusableItemAdd:w.useCallback(()=>O(z=>z+1),[]),onFocusableItemRemove:w.useCallback(()=>O(z=>z-1),[]),children:m.jsx(pe.div,{tabIndex:E||N===0?-1:0,"data-orientation":r,...g,ref:_,style:{outline:"none",...e.style},onMouseDown:ae(e.onMouseDown,()=>{R.current=!0}),onFocus:ae(e.onFocus,z=>{const D=!R.current;if(z.target===z.currentTarget&&D&&!E){const j=new CustomEvent(zh,lD);if(z.currentTarget.dispatchEvent(j),!j.defaultPrevented){const V=P().filter(W=>W.focusable),H=V.find(W=>W.active),te=V.find(W=>
vendor: 5,723 bytes, line 325
325W.id===y),ne=[H,te,...V].filter(Boolean).map(W=>W.ref.current);_1(ne,p)}}R.current=!1}),onBlur:ae(e.onBlur,()=>S(!1))})})}),v1="RovingFocusGroupItem",y1=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,children:l,...u}=e,c=ul(),h=o||c,p=hD(v1,n),g=p.currentTabStopId===h,v=p1(n),{onFocusableItemAdd:_,onFocusableItemRemove:k,currentTabStopId:y}=p;return w.useEffect(()=>{if(r)return _(),()=>k()},[r,_,k]),m.jsx(fp.ItemSlot,{scope:n,id:h,focusable:r,active:s,children:m.jsx(pe.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:ae(e.onMouseDown,T=>{r?p.onItemFocus(h):T.preventDefault()}),onFocus:ae(e.onFocus,()=>p.onItemFocus(h)),onKeyDown:ae(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){p.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const E=gD(T,p.orientation,p.dir);if(E!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let x=v().filter(P=>P.focusable).map(P=>P.ref.current);if(E==="last")x.reverse();else if(E==="prev"||E==="next"){E==="prev"&&x.reverse();const P=x.indexOf(T.currentTarget);x=p.loop?vD(x,P+1):x.slice(P+1)}setTimeout(()=>_1(x))}}),children:typeof l=="function"?l({isCurrentTabStop:g,hasTabStop:y!=null}):l})})});y1.displayName=v1;var pD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function mD(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function gD(e,t,n){const r=mD(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return pD[r]}function _1(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yD=g1,_D=y1,id="Tabs",[wD,gz]=ir(id,[m1]),w1=m1(),[xD,Gm]=wD(id),x1=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:l="horizontal",dir:u,activationMode:c="automatic",...h}=e,p=hl(u),[g,v]=Xi({prop:r,onChange:s,defaultProp:o??"",caller:id});return m.jsx(xD,{scope:n,baseId:ul(),value:g,onValueChange:v,orientation:l,dir:p,activationMode:c,children:m.jsx(pe.div,{dir:p,"data-orientation":l,...h,ref:t})})});x1.displayName=id;var b1="TabsList",S1=w.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=Gm(b1,n),l=w1(n);return m.jsx(yD,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:m.jsx(pe.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});S1.displayName=b1;var E1="TabsTrigger",T1=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,l=Gm(E1,n),u=w1(n),c=P1(l.baseId,r),h=R1(l.baseId,r),p=r===l.value;return m.jsx(_D,{asChild:!0,...u,focusable:!s,active:p,children:m.jsx(pe.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...o,ref:t,onMouseDown:ae(e.onMouseDown,g=>{!s&&g.button===0&&g.ctrlKey===!1?l.onValueChange(r):g.preventDefault()}),onKeyDown:ae(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&l.onValueChange(r)}),onFocus:ae(e.onFocus,()=>{const g=l.activationMode!=="manual";!p&&!s&&g&&l.onValueChange(r)})})})});T1.displayName=E1;var k1="TabsContent",C1=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...l}=e,u=Gm(k1,n),c=P1(u.baseId,r),h=R1(u.baseId,r),p=r===u.value,g=w.useRef(p);return w.useEffect(()=>{const v=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(v)},[]),m.jsx(yi,{present:s||p,children:({present:v})=>m.jsx(pe.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":c,hidden:!v,id:h,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:v&&o})})});C1.displayName=k1;function P1(e,t){return`${e}-trigger-${t}`}function R1(e,t){return`${e}-content-${t}`}var bD=x1,A1=S1,N1=T1,O1=C1;const SD=bD,L1=w.forwardRef(({className:e,...t},n)=>m.jsx(A1,{ref:n,className:Ce("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));L1.displayName=A1.displayName;const pp=w.forwardRef(({className:e,...t},n)=>m.jsx(N1,{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 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));pp.displayName=N1.displayName;const mp=w.forwardRef(({className:e,...t},n)=>m.jsx(O1,{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}));mp.displayName=O1.displayName;const C_=["Germany","Austria","Switzerland","Italy","France","Slovenia","Liechtenstein"],ED=()=>{const{routes:e,providers:t,getOffersForRoute:n,isLoading:r,loadAllProviders:s,refreshData:o,isLoadingProviders:l}=eS(),{filters:u,sortBy:c,updateFilter:h,updateFilters:p,setSortBy:g,resetFilters:v,filteredRoutes:_,activeFilterCount:k,maxDaysAvailable:y,maxDistanceAvailable:T}=YM(e),{toggleFavorite:E,isFavorite:S,setNote:x,getNote:P,toggleCompare:R,isInCompareList:N,clearCompareList:O,compareCount:z,userData:D}=qM(),[j,V]=w.useState(null),[H,te]=w.useState(!1),[G,ne]=w.useState(!1),[W,Q]=w.useState(!1),[I,$]=w.useState("trails");w.useEffect(()=>{I==="providers"&&s()},[I,s]);const F=w.useMemo(()=>{const Y=new Set;return e.forEach(Z=>
325Z.countries.forEach(me=>Y.add(me))),Array.from(Y).sort((Z,me)=>{const Oe=C_.includes(Z),xe=C_.includes(me);return Oe&&!xe?-1:!Oe&&xe?1:Z.localeCompare(me)})},[e]),X=w.useMemo(()=>{const Y=new Set;return e.forEach(ie=>ie.languages.forEach(Z=>Y.add(Z))),["German","English","Italian","French"].filter(ie=>Y.has(ie)).concat(Array.from(Y).filter(ie=>!["German","English","Italian","French"].includes(ie)).sort())},[e]),ee=Y=>{V(Y),te(!0)},le=()=>{Q(!0)},se=e.filter(Y=>D.compareList.includes(Y.id));return m.jsxs("div",{className:"min-h-screen bg-background",children:[m.jsx(JM,{search:u.search,onSearchChange:Y=>h("search",Y),compareCount:z,onCompareClick:le}),m.jsxs("div",{className:"pt-header flex",children:[m.jsx(o2,{filters:u,updateFilter:h,updateFilters:p,resetFilters:v,activeFilterCount:k,isOpen:G,onClose:()=>ne(!1),availableCountries:F,availableLanguages:X,maxDaysAvailable:y,maxDistanceAvailable:T}),m.jsx("main",{className:"flex-1 min-w-0",children:m.jsx("div",{className:"px-4 lg:px-6 max-w-7xl",children:m.jsxs(SD,{value:I,onValueChange:Y=>$(Y),className:"mb-4 mt-4",children:[m.jsxs(L1,{className:"grid w-full max-w-md grid-cols-2",children:[m.jsxs(pp,{value:"trails",className:"flex items-center gap-2",children:[m.jsx(Rx,{className:"w-4 h-4"}),"Trails"]}),m.jsxs(pp,{value:"providers",className:"flex items-center gap-2",children:[m.jsx(MP,{className:"w-4 h-4"}),"Providers"]})]}),m.jsxs(mp,{value:"trails",className:"mt-0",children:[m.jsx(aD,{totalRoutes:e.length,filteredCount:_.length,sortBy:c,onSortChange:g,onFilterClick:()=>ne(!0),activeFilterCount:k}),r?m.jsxs("div",{className:"py-16 text-center",children:[m.jsx(Ua,{className:"w-8 h-8 animate-spin mx-auto text-primary mb-4"}),m.jsx("p",{className:"text-muted-foreground",children:"Loading routes..."})]}):_.length===0?m.jsxs("div",{className:"py-16 text-center",children:[m.jsx("p",{className:"text-xl text-muted-foreground mb-2",children:"No routes match your filters"}),m.jsx("button",{onClick:v,className:"text-primary hover:underline",children:"Reset all filters"})]}):m.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4 pb-8",children:_.map(Y=>{const ie=n(Y.id),Z=a_(u),me=Z?o_(ie,u):ie,Oe=Z?ba(me):Y.providerCount||ba(ie);return m.jsx(l2,{route:{...Y,providerCount:Oe},isFavorite:S(Y.id),isInCompareList:N(Y.id),onFavoriteToggle:()=>E(Y.id),onCompareToggle:()=>R(Y.id),onClick:()=>ee(Y),compareDisabled:z>=3},Y.id)})})]}),m.jsx(mp,{value:"providers",className:"mt-4",children:l?m.jsxs("div",{className:"py-16 text-center",children:[m.jsx(Ua,{className:"w-8 h-8 animate-spin mx-auto text-primary mb-4"}),m.jsx("p",{className:"text-muted-foreground",children:"Loading tour operators..."})]}):t.length===0?m.jsx("div",{className:"py-16 text-center",children:m.jsx("p",{className:"text-xl text-muted-foreground",children:"No providers found"})}):m.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4 pb-8",children:t.map(Y=>m.jsx(c2,{provider:Y},Y.id))})})]})})})]}),m.jsx(L2,{route:j,offers:j?a_(u)?o_(n(j.id),u):n(j.id):[],isOpen:H,onClose:()=>te(!1),isFavorite:j?S(j.id):!1,isInCompareList:j?N(j.id):!1,onFavoriteToggle:()=>j&&E(j.id),onCompareToggle:()=>j&&R(j.id),compareDisabled:z>=3,note:j?P(j.id):"",onNoteChange:Y=>j&&x(j.id,Y)}),m.jsx(M2,{isOpen:W,onClose:()=>Q(!1),routes:se,onRemove:Y=>R(Y),onClear:O}),m.jsx(QM,{})]})},TD=()=>m.jsx(GM,{children:m.jsx(ED,{})}),kD=()=>{const e=Mb();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),m.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:m.jsxs("div",{className:"text-center",children:[m.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),m.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),m.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})};var CD="Label",I1=w.forwardRef((e,t)=>m.jsx(pe.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));I1.displayName=CD;var M1=I1;const PD=jc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),RD=w.forwardRef(({className:e,...t},n)=>m.jsx(M1,{ref:n,className:Ce(PD(),e),...t}));RD.displayName=M1.displayName;var sd="Switch",[AD,vz]=ir(sd),[ND,OD]=AD(sd),j1=w.forwardRef((e,t)=>
325{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:l,disabled:u,value:c="on",onCheckedChange:h,form:p,...g}=e,[v,_]=w.useState(null),k=Te(t,x=>_(x)),y=w.useRef(!1),T=v?p||!!v.closest("form"):!0,[E,S]=Xi({prop:s,defaultProp:o??!1,onChange:h,caller:sd});return m.jsxs(ND,{scope:n,checked:E,disabled:u,children:[m.jsx(pe.button,{type:"button",role:"switch","aria-checked":E,"aria-required":l,"data-state":$1(E),"data-disabled":u?"":void 0,disabled:u,value:c,...g,ref:k,onClick:ae(e.onClick,x=>{S(P=>!P),T&&(y.current=x.isPropagationStopped(),y.current||x.stopPropagation())})}),T&&m.jsx(B1,{control:v,bubbles:!y.current,name:r,value:c,checked:E,required:l,disabled:u,form:p,style:{transform:"translateX(-100%)"}})]})});j1.displayName=sd;var D1="SwitchThumb",z1=w.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=OD(D1,n);return m.jsx(pe.span,{"data-state":$1(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});z1.displayName=D1;var LD="SwitchBubbleInput",B1=w.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...s},o)=>{const l=w.useRef(null),u=Te(l,o),c=Vm(n),h=Pm(t);return w.useEffect(()=>{const p=l.current;if(!p)return;const g=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(g,"checked").set;if(c!==n&&_){const k=new Event("click",{bubbles:r});_.call(p,n),p.dispatchEvent(k)}},[c,n,r]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:u,style:{...s.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});B1.displayName=LD;function $1(e){return e?"checked":"unchecked"}var F1=j1,ID=z1;const MD=w.forwardRef(({className:e,...t},n)=>m.jsx(F1,{className:Ce("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:m.jsx(ID,{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")})}));MD.displayName=F1.displayName;var U1=["PageUp","PageDown"],H1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],V1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ro="Slider",[gp,jD,DD]=Oc(Ro),[W1,yz]=ir(Ro,[DD]),[zD,od]=W1(Ro),G1=w.forwardRef((e,t)=>{const{name:n,min:r=0,max:s=100,step:o=1,orientation:l="horizontal",disabled:u=!1,minStepsBetweenThumbs:c=0,defaultValue:h=[r],value:p,onValueChange:g=()=>{},onValueCommit:v=()=>{},inverted:_=!1,form:k,...y}=e,T=w.useRef(new Set),E=w.useRef(0),x=l==="horizontal"?BD:$D,[P=[],R]=Xi({prop:p,defaultProp:h,onChange:V=>{var te;(te=[...T.current][E.current])==null||te.focus(),g(V)}}),N=w.useRef(P);function O(V){const H=WD(P,V);j(V,H)}function z(V){j(V,E.current)}function D(){const V=N.current[E.current];P[E.current]!==V&&v(P)}function j(V,H,{commit:te}={commit:!1}){const G=ZD(o),ne=YD(Math.round((V-r)/o)*o+r,G),W=el(ne,[r,s]);R((Q=[])=>{const I=HD(Q,W,H);if(KD(I,c*o)){E.current=I.indexOf(W);const $=String(I)!==String(Q);return $&&te&&v(I),$?I:Q}else return Q})}return m.jsx(zD,{scope:e.__scopeSlider,name:n,disabled:u,min:r,max:s,valueIndexToChangeRef:E,thumbs:T.current,values:P,orientation:l,form:k,children:m.jsx(gp.Provider,{scope:e.__scopeSlider,children:m.jsx(gp.Slot,{scope:e.__scopeSlider,children:m.jsx(x,{"aria-disabled":u,"data-disabled":u?"":void 0,...y,ref:t,onPointerDown:ae(y.onPointerDown,()=>{u||(N.current=P)}),min:r,max:s,inverted:_,onSlideStart:u?void 0:O,onSlideMove:u?void 0:z,onSlideEnd:u?void 0:D,onHomeKeyDown:()=>!u&&j(r,0,{commit:!0}),onEndKeyDown:()=>!u&&j(s,P.length-1,{commit:!0}),onStepKeyDown:({event:V,direction:H})=>
325{if(!u){const ne=U1.includes(V.key)||V.shiftKey&&H1.includes(V.key)?10:1,W=E.current,Q=P[W],I=o*ne*H;j(Q+I,W,{commit:!0})}}})})})})});G1.displayName=Ro;var[q1,K1]=W1(Ro,{startEdge:"left",endEdge:"right",size:"width",direction:1}),BD=w.forwardRef((e,t)=>{const{min:n,max:r,dir:s,inverted:o,onSlideStart:l,onSlideMove:u,onSlideEnd:c,onStepKeyDown:h,...p}=e,[g,v]=w.useState(null),_=Te(t,x=>v(x)),k=w.useRef(void 0),y=hl(s),T=y==="ltr",E=T&&!o||!T&&o;function S(x){const P=k.current||g.getBoundingClientRect(),R=[0,P.width],O=qm(R,E?[n,r]:[r,n]);return k.current=P,O(x-P.left)}return m.jsx(q1,{scope:e.__scopeSlider,startEdge:E?"left":"right",endEdge:E?"right":"left",direction:E?1:-1,size:"width",children:m.jsx(Z1,{dir:y,"data-orientation":"horizontal",...p,ref:_,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const P=S(x.clientX);l==null||l(P)},onSlideMove:x=>{const P=S(x.clientX);u==null||u(P)},onSlideEnd:()=>{k.current=void 0,c==null||c()},onStepKeyDown:x=>{const R=V1[E?"from-left":"from-right"].includes(x.key);h==null||h({event:x,direction:R?-1:1})}})})}),$D=w.forwardRef((e,t)=>{const{min:n,max:r,inverted:s,onSlideStart:o,onSlideMove:l,onSlideEnd:u,onStepKeyDown:c,...h}=e,p=w.useRef(null),g=Te(t,p),v=w.useRef(void 0),_=!s;function k(y){const T=v.current||p.current.getBoundingClientRect(),E=[0,T.height],x=qm(E,_?[r,n]:[n,r]);return v.current=T,x(y-T.top)}return m.jsx(q1,{scope:e.__scopeSlider,startEdge:_?"bottom":"top",endEdge:_?"top":"bottom",size:"height",direction:_?1:-1,children:m.jsx(Z1,{"data-orientation":"vertical",...h,ref:g,style:{...h.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:y=>{const T=k(y.clientY);o==null||o(T)},onSlideMove:y=>{const T=k(y.clientY);l==null||l(T)},onSlideEnd:()=>{v.current=void 0,u==null||u()},onStepKeyDown:y=>{const E=V1[_?"from-bottom":"from-top"].includes(y.key);c==null||c({event:y,direction:E?-1:1})}})})}),Z1=w.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:s,onSlideEnd:o,onHomeKeyDown:l,onEndKeyDown:u,onStepKeyDown:c,...h}=e,p=od(Ro,n);return m.jsx(pe.span,{...h,ref:t,onKeyDown:ae(e.onKeyDown,g=>{g.key==="Home"?(l(g),g.preventDefault()):g.key==="End"?(u(g),g.preventDefault()):U1.concat(H1).includes(g.key)&&(c(g),g.preventDefault())}),onPointerDown:ae(e.onPointerDown,g=>{const v=g.target;v.setPointerCapture(g.pointerId),g.preventDefault(),p.thumbs.has(v)?v.focus():r(g)}),onPointerMove:ae(e.onPointerMove,g=>{g.target.hasPointerCapture(g.pointerId)&&s(g)}),onPointerUp:ae(e.onPointerUp,g=>{const v=g.target;v.hasPointerCapture(g.pointerId)&&(v.releasePointerCapture(g.pointerId),o(g))})})}),Y1="SliderTrack",J1=w.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,s=od(Y1,n);return m.jsx(pe.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...r,ref:t})});J1.displayName=Y1;var vp="SliderRange",Q1=w.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,s=od(vp,n),o=K1(vp,n),l=w.useRef(null),u=Te(t,l),c=s.values.length,h=s.values.map(v=>tE(v,s.min,s.max)),p=c>1?Math.min(...h):0,g=100-Math.max(...h);return m.jsx(pe.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...r,ref:u,style:{...e.style,[o.startEdge]:p+"%",[o.endEdge]:g+"%"}})});Q1.displayName=vp;var yp="SliderThumb",X1=w.forwardRef((e,t)=>{const n=jD(e.__scopeSlider),[r,s]=w.useState(null),o=Te(t,u=>s(u)),l=w.useMemo(()=>r?n().findIndex(u=>u.ref.current===r):-1,[n,r]);return m.jsx(FD,{...e,ref:o,index:l})}),FD=w.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:s,...o}=e,l=od(yp,n),u=K1(yp,n),[c,h]=w.useState(null),p=Te(t,S=>h(S)),g=c?l.form||!!c.closest("form"):!0,v=Pm(c),_=l.values[r],k=_===void 0?0:tE(_,l.min,l.max),y=VD(r,l.values.length),T=v==null?void 0:v[u.size],E=T?GD(T,k,u.direction):0;return w.useEffect(()=>{if(c)return l.thumbs.add(c),()=>{l.thumbs.delete(c)}},[c,l.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${k}% + ${E}px)`},children:[m.jsx(gp.ItemSlot,{scope:e.__scopeSlider,children:m.jsx(pe.span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":l.min,"aria-valuenow":_,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...o,ref:p,style:_===void 0?{display:"none"}:e.style,onFocus:ae(e.onFocus,()=>{l.valueIndexToChangeRef.current=r})})}),g&&m.jsx(eE,{name:s??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:_},r)]})});X1.displayName=yp;var UD="RadioBubbleInput",eE=w.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const s=w.useRef(null),o=Te(s,r),l=Vm(t);return w.useEffect(()=>{const u=s.current;if(!u)return;const c=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&p){const g=new Event("input",{bubbles:!0});p.call(u,t),u.dispatchEvent(g)}},[l,t]),m.jsx(pe.input,{style:{display:"none"},...n,ref:o,defaultValue:t})});eE.displayName=UD;function HD(e=[],t,n){const r=[...e];return r[n]=t,r.sort((s,o)=>s-o)}function tE(e,t,n){const o=100/(n-t)*(e-t);return el(o,[0,100])}function VD(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function WD(e,t){if(e.length===1)return 0;const n=e.map(s=>
325Math.abs(s-t)),r=Math.min(...n);return n.indexOf(r)}function GD(e,t,n){const r=e/2,o=qm([0,50],[0,r]);return(r-o(t)*n)*n}function qD(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function KD(e,t){if(t>0){const n=qD(e);return Math.min(...n)>=t}return!0}function qm(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 ZD(e){return(String(e).split(".")[1]||"").length}function YD(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var nE=G1,JD=J1,QD=Q1,XD=X1;const ez=w.forwardRef(({className:e,value:t,defaultValue:n,onValueChange:r,step:s=1,minStepsBetweenThumbs:o,...l},u)=>{const c=t??n??[0],h=c.length>1,p=(o??(h?1:0))*s,[g,v]=w.useState(null),_=w.useCallback(k=>{if(h&&Array.isArray(t)&&t.length===2&&g!==null){const[y,T]=t;if(g===0){r==null||r([Math.min(k[0],T-p),T]);return}r==null||r([y,Math.max(k[1],y+p)]);return}r==null||r(k)},[g,h,p,r,t]);return m.jsxs(nE,{ref:u,value:t,defaultValue:n,step:s,minStepsBetweenThumbs:h?o??1:o,onValueChange:_,className:Ce("relative flex w-full touch-none select-none items-center",e),...l,children:[m.jsx(JD,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:m.jsx(QD,{className:"absolute h-full bg-primary"})}),c.map((k,y)=>m.jsx(XD,{onPointerDown:()=>v(y),onFocus:()=>v(y),onPointerUp:()=>v(null),onBlur:()=>v(null),className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},y))]})});ez.displayName=nE.displayName;const tz=w.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:Ce("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));tz.displayName="Card";const nz=w.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:Ce("flex flex-col space-y-1.5 p-6",e),...t}));nz.displayName="CardHeader";const rz=w.forwardRef(({className:e,...t},n)=>m.jsx("h3",{ref:n,className:Ce("text-2xl font-semibold leading-none tracking-tight",e),...t}));rz.displayName="CardTitle";const iz=w.forwardRef(({className:e,...t},n)=>m.jsx("p",{ref:n,className:Ce("text-sm text-muted-foreground",e),...t}));iz.displayName="CardDescription";const sz=w.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:Ce("p-6 pt-0",e),...t}));sz.displayName="CardContent";const oz=w.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:Ce("flex items-center p-6 pt-0",e),...t}));oz.displayName="CardFooter";const az=new fO,lz=()=>m.jsx(mO,{client:az,children:m.jsxs(HN,{children:[m.jsx(kR,{}),m.jsx(iA,{}),m.jsx(eL,{children:m.jsxs(JO,{children:[m.jsx(qf,{path:"/",element:m.jsx(TD,{})}),!1,m.jsx(qf,{path:"*",element:m.jsx(kD,{})})]})})]})});Z0(document.getElementById("root")).render(m.jsx(lz,{}));

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.