From 29204891f94a697e64ce28576ff5ace0963ec67a Mon Sep 17 00:00:00 2001 From: keksobot Date: Sat, 21 Dec 2024 21:03:22 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=94=EF=B8=8F=20=D0=A1=D0=B1=D0=BE=D1=80?= =?UTF-8?q?=D0=BA=D0=B0=20#14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-c80eea17.js => index-197ddbde.js} | 56 +++++++++---------- 14/index.html | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) rename 14/assets/{index-c80eea17.js => index-197ddbde.js} (52%) diff --git a/14/assets/index-c80eea17.js b/14/assets/index-197ddbde.js similarity index 52% rename from 14/assets/index-c80eea17.js rename to 14/assets/index-197ddbde.js index 6ce0aec..d1d4d79 100644 --- a/14/assets/index-c80eea17.js +++ b/14/assets/index-197ddbde.js @@ -1,4 +1,4 @@ -function b0(e,t){for(var n=0;ni[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"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();var D0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qm={exports:{}},Wa={},Ym={exports:{}},Y={};/** +function D0(e,t){for(var n=0;ni[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"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();var B0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xm={exports:{}},Ga={},Jm={exports:{}},Y={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function b0(e,t){for(var n=0;n>>1,ae=M[K];if(0>>1;Ks(se,D))les(et,se)?(M[K]=et,M[le]=D,K=le):(M[K]=se,M[he]=D,K=he);else if(les(et,D))M[K]=et,M[le]=D,K=le;else break e}}return G}function s(M,G){var D=M.sortIndex-G.sortIndex;return D!==0?D:M.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],p=[],m=1,v=null,g=3,O=!1,E=!1,x=!1,N=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(M){for(var G=n(p);G!==null;){if(G.callback===null)i(p);else if(G.startTime<=M)i(p),G.sortIndex=G.expirationTime,t(h,G);else break;G=n(p)}}function R(M){if(x=!1,T(M),!E)if(n(h)!==null)E=!0,Be(b);else{var G=n(p);G!==null&&tn(R,G.startTime-M)}}function b(M,G){E=!1,x&&(x=!1,S(Z),Z=-1),O=!0;var D=g;try{for(T(G),v=n(h);v!==null&&(!(v.expirationTime>G)||M&&!J());){var K=v.callback;if(typeof K=="function"){v.callback=null,g=v.priorityLevel;var ae=K(v.expirationTime<=G);G=e.unstable_now(),typeof ae=="function"?v.callback=ae:v===n(h)&&i(h),T(G)}else i(h);v=n(h)}if(v!==null)var Me=!0;else{var he=n(p);he!==null&&tn(R,he.startTime-G),Me=!1}return Me}finally{v=null,g=D,O=!1}}var F=!1,U=null,Z=-1,re=5,W=-1;function J(){return!(e.unstable_now()-WM||125K?(M.sortIndex=D,t(p,M),n(h)===null&&M===n(p)&&(x?(S(Z),Z=-1):x=!0,tn(R,D-K))):(M.sortIndex=ae,t(h,M),E||O||(E=!0,Be(b))),M},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(M){var G=g;return function(){var D=g;g=G;try{return M.apply(this,arguments)}finally{g=D}}}})(l_);a_.exports=l_;var aw=a_.exports;/** + */(function(e){function t(M,K){var D=M.length;M.push(K);e:for(;0>>1,ae=M[G];if(0>>1;Gs(se,D))les(tt,se)?(M[G]=tt,M[le]=D,G=le):(M[G]=se,M[he]=D,G=he);else if(les(tt,D))M[G]=tt,M[le]=D,G=le;else break e}}return K}function s(M,K){var D=M.sortIndex-K.sortIndex;return D!==0?D:M.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],p=[],m=1,v=null,g=3,O=!1,w=!1,x=!1,N=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(M){for(var K=n(p);K!==null;){if(K.callback===null)i(p);else if(K.startTime<=M)i(p),K.sortIndex=K.expirationTime,t(h,K);else break;K=n(p)}}function R(M){if(x=!1,T(M),!w)if(n(h)!==null)w=!0,Ue(j);else{var K=n(p);K!==null&&en(R,K.startTime-M)}}function j(M,K){w=!1,x&&(x=!1,E(Z),Z=-1),O=!0;var D=g;try{for(T(K),v=n(h);v!==null&&(!(v.expirationTime>K)||M&&!J());){var G=v.callback;if(typeof G=="function"){v.callback=null,g=v.priorityLevel;var ae=G(v.expirationTime<=K);K=e.unstable_now(),typeof ae=="function"?v.callback=ae:v===n(h)&&i(h),T(K)}else i(h);v=n(h)}if(v!==null)var Me=!0;else{var he=n(p);he!==null&&en(R,he.startTime-K),Me=!1}return Me}finally{v=null,g=D,O=!1}}var F=!1,U=null,Z=-1,re=5,W=-1;function J(){return!(e.unstable_now()-WM||125G?(M.sortIndex=D,t(p,M),n(h)===null&&M===n(p)&&(x?(E(Z),Z=-1):x=!0,en(R,D-G))):(M.sortIndex=ae,t(h,M),w||O||(w=!0,Ue(j))),M},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(M){var K=g;return function(){var D=g;g=K;try{return M.apply(this,arguments)}finally{g=D}}}})(c_);u_.exports=c_;var lw=u_.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function b0(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gc=Object.prototype.hasOwnProperty,lw=/^[: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]*$/,Yd={},Xd={};function uw(e){return gc.call(Xd,e)?!0:gc.call(Yd,e)?!1:lw.test(e)?Xd[e]=!0:(Yd[e]=!0,!1)}function cw(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function fw(e,t,n,i){if(t===null||typeof t>"u"||cw(e,t,n,i))return!0;if(i)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 Je(e,t,n,i,s,a,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=u}var He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){He[e]=new Je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];He[t]=new Je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){He[e]=new Je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){He[e]=new Je(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){He[e]=new Je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){He[e]=new Je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){He[e]=new Je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){He[e]=new Je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){He[e]=new Je(e,5,!1,e.toLowerCase(),null,!1,!1)});var Af=/[\-:]([a-z])/g;function Mf(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(Af,Mf);He[t]=new Je(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(Af,Mf);He[t]=new Je(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(Af,Mf);He[t]=new Je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){He[e]=new Je(e,1,!1,e.toLowerCase(),null,!1,!1)});He.xlinkHref=new Je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){He[e]=new Je(e,1,!1,e.toLowerCase(),null,!0,!0)});function If(e,t,n,i){var s=He.hasOwnProperty(t)?He[t]:null;(s!==null?s.type!==0:i||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gc=Object.prototype.hasOwnProperty,uw=/^[: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]*$/,Jd={},ep={};function cw(e){return gc.call(ep,e)?!0:gc.call(Jd,e)?!1:uw.test(e)?ep[e]=!0:(Jd[e]=!0,!1)}function fw(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hw(e,t,n,i){if(t===null||typeof t>"u"||fw(e,t,n,i))return!0;if(i)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 et(e,t,n,i,s,a,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=u}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){We[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];We[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){We[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){We[e]=new et(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){We[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){We[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){We[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){We[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){We[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var Af=/[\-:]([a-z])/g;function Mf(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(Af,Mf);We[t]=new et(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(Af,Mf);We[t]=new et(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(Af,Mf);We[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){We[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});We.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){We[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function If(e,t,n,i){var s=We.hasOwnProperty(t)?We[t]:null;(s!==null?s.type!==0:i||!(2f||s[u]!==a[f]){var h=` -`+s[u].replace(" at new "," at ");return e.displayName&&h.includes("")&&(h=h.replace("",e.displayName)),h}while(1<=u&&0<=f);break}}}finally{Nu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ro(e):""}function hw(e){switch(e.tag){case 5:return ro(e.type);case 16:return ro("Lazy");case 13:return ro("Suspense");case 19:return ro("SuspenseList");case 0:case 2:case 15:return e=Ru(e.type,!1),e;case 11:return e=Ru(e.type.render,!1),e;case 1:return e=Ru(e.type,!0),e;default:return""}}function Ec(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 Vr:return"Fragment";case Wr:return"Portal";case yc:return"Profiler";case zf:return"StrictMode";case wc:return"Suspense";case xc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h_:return(e.displayName||"Context")+".Consumer";case f_:return(e._context.displayName||"Context")+".Provider";case jf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bf:return t=e.displayName||null,t!==null?t:Ec(e.type)||"Memo";case An:t=e._payload,e=e._init;try{return Ec(e(t))}catch{}}return null}function dw(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 Ec(t);case 8:return t===zf?"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 Qn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function p_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pw(e){var t=p_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){i=""+u,a.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(u){i=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Os(e){e._valueTracker||(e._valueTracker=pw(e))}function m_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=p_(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function ua(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 Sc(e,t){var n=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ep(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=Qn(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function __(e,t){t=t.checked,t!=null&&If(e,"checked",t,!1)}function Pc(e,t){__(e,t);var n=Qn(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tc(e,t.type,Qn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function tp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="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 Tc(e,t,n){(t!=="number"||ua(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var io=Array.isArray;function ii(e,t,n,i){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=ks.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function So(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var uo={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},mw=["Webkit","ms","Moz","O"];Object.keys(uo).forEach(function(e){mw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),uo[t]=uo[e]})});function w_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||uo.hasOwnProperty(e)&&uo[e]?(""+t).trim():t+"px"}function x_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,s=w_(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}var _w=xe({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 kc(e,t){if(t){if(_w[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function Cc(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 Nc=null;function Df(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rc=null,oi=null,si=null;function ip(e){if(e=Go(e)){if(typeof Rc!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Qa(t),Rc(e.stateNode,e.type,t))}}function E_(e){oi?si?si.push(e):si=[e]:oi=e}function S_(){if(oi){var e=oi,t=si;if(si=oi=null,ip(e),t)for(e=0;e>>=0,e===0?32:31-(Ow(e)/kw|0)|0}var Cs=64,Ns=4194304;function oo(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 da(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,s=e.suspendedLanes,a=e.pingedLanes,u=n&268435455;if(u!==0){var f=u&~s;f!==0?i=oo(f):(a&=u,a!==0&&(i=oo(a)))}else u=n&~s,u!==0?i=oo(u):a!==0&&(i=oo(a));if(i===0)return 0;if(t!==0&&t!==i&&!(t&s)&&(s=i&-i,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(i&4&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0n;n++)t.push(e);return t}function Vo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-bt(t),e[t]=n}function Aw(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 i=e.eventTimes;for(e=e.expirationTimes;0=fo),dp=String.fromCharCode(32),pp=!1;function Z_(e,t){switch(e){case"keyup":return s1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function H_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kr=!1;function l1(e,t){switch(e){case"compositionend":return H_(t);case"keypress":return t.which!==32?null:(pp=!0,dp);case"textInput":return e=t.data,e===dp&&pp?null:e;default:return null}}function u1(e,t){if(Kr)return e==="compositionend"||!Vf&&Z_(e,t)?(e=F_(),Vs=Zf=bn=null,Kr=!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)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gp(n)}}function G_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?G_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function q_(){for(var e=window,t=ua();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ua(e.document)}return t}function Kf(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 g1(e){var t=q_(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&G_(n.ownerDocument.documentElement,n)){if(i!==null&&Kf(n)){if(t=i.start,e=i.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,a=Math.min(i.start,s);i=i.end===void 0?a:Math.min(i.end,s),!e.extend&&a>i&&(s=i,i=a,a=s),s=yp(n,a);var u=yp(n,i);s&&u&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>i?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.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=document.documentMode,Gr=null,bc=null,po=null,Dc=!1;function wp(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dc||Gr==null||Gr!==ua(i)||(i=Gr,"selectionStart"in i&&Kf(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),po&&Co(po,i)||(po=i,i=_a(bc,"onSelect"),0Yr||(e.current=Hc[Yr],Hc[Yr]=null,Yr--)}function de(e,t){Yr++,Hc[Yr]=e.current,e.current=t}var Yn={},qe=tr(Yn),it=tr(!1),yr=Yn;function pi(e,t){var n=e.type.contextTypes;if(!n)return Yn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in n)s[a]=t[a];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ot(e){return e=e.childContextTypes,e!=null}function ga(){me(it),me(qe)}function Op(e,t,n){if(qe.current!==Yn)throw Error(j(168));de(qe,t),de(it,n)}function iv(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var s in i)if(!(s in t))throw Error(j(108,dw(e)||"Unknown",s));return xe({},n,i)}function ya(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yn,yr=qe.current,de(qe,e),de(it,it.current),!0}function kp(e,t,n){var i=e.stateNode;if(!i)throw Error(j(169));n?(e=iv(e,t,yr),i.__reactInternalMemoizedMergedChildContext=e,me(it),me(qe),de(qe,e)):me(it),de(it,n)}var cn=null,Ya=!1,Wu=!1;function ov(e){cn===null?cn=[e]:cn.push(e)}function N1(e){Ya=!0,ov(e)}function nr(){if(!Wu&&cn!==null){Wu=!0;var e=0,t=ue;try{var n=cn;for(ue=1;e>=u,s-=u,fn=1<<32-bt(t)+s|n<Z?(re=U,U=null):re=U.sibling;var W=g(S,U,T[Z],R);if(W===null){U===null&&(U=re);break}e&&U&&W.alternate===null&&t(S,U),y=a(W,y,Z),F===null?b=W:F.sibling=W,F=W,U=re}if(Z===T.length)return n(S,U),ve&&cr(S,Z),b;if(U===null){for(;ZZ?(re=U,U=null):re=U.sibling;var J=g(S,U,W.value,R);if(J===null){U===null&&(U=re);break}e&&U&&J.alternate===null&&t(S,U),y=a(J,y,Z),F===null?b=J:F.sibling=J,F=J,U=re}if(W.done)return n(S,U),ve&&cr(S,Z),b;if(U===null){for(;!W.done;Z++,W=T.next())W=v(S,W.value,R),W!==null&&(y=a(W,y,Z),F===null?b=W:F.sibling=W,F=W);return ve&&cr(S,Z),b}for(U=i(S,U);!W.done;Z++,W=T.next())W=O(U,S,Z,W.value,R),W!==null&&(e&&W.alternate!==null&&U.delete(W.key===null?Z:W.key),y=a(W,y,Z),F===null?b=W:F.sibling=W,F=W);return e&&U.forEach(function(Oe){return t(S,Oe)}),ve&&cr(S,Z),b}function N(S,y,T,R){if(typeof T=="object"&&T!==null&&T.type===Vr&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case Ls:e:{for(var b=T.key,F=y;F!==null;){if(F.key===b){if(b=T.type,b===Vr){if(F.tag===7){n(S,F.sibling),y=s(F,T.props.children),y.return=S,S=y;break e}}else if(F.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===An&&zp(b)===F.type){n(S,F.sibling),y=s(F,T.props),y.ref=Yi(S,F,T),y.return=S,S=y;break e}n(S,F);break}else t(S,F);F=F.sibling}T.type===Vr?(y=gr(T.props.children,S.mode,R,T.key),y.return=S,S=y):(R=ea(T.type,T.key,T.props,null,S.mode,R),R.ref=Yi(S,y,T),R.return=S,S=R)}return u(S);case Wr:e:{for(F=T.key;y!==null;){if(y.key===F)if(y.tag===4&&y.stateNode.containerInfo===T.containerInfo&&y.stateNode.implementation===T.implementation){n(S,y.sibling),y=s(y,T.children||[]),y.return=S,S=y;break e}else{n(S,y);break}else t(S,y);y=y.sibling}y=Ju(T,S.mode,R),y.return=S,S=y}return u(S);case An:return F=T._init,N(S,y,F(T._payload),R)}if(io(T))return E(S,y,T,R);if(Vi(T))return x(S,y,T,R);bs(S,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,y!==null&&y.tag===6?(n(S,y.sibling),y=s(y,T),y.return=S,S=y):(n(S,y),y=Xu(T,S.mode,R),y.return=S,S=y),u(S)):n(S,y)}return N}var _i=dv(!0),pv=dv(!1),qo={},Qt=tr(qo),Mo=tr(qo),Io=tr(qo);function mr(e){if(e===qo)throw Error(j(174));return e}function nh(e,t){switch(de(Io,t),de(Mo,e),de(Qt,qo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Oc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Oc(t,e)}me(Qt),de(Qt,t)}function vi(){me(Qt),me(Mo),me(Io)}function mv(e){mr(Io.current);var t=mr(Qt.current),n=Oc(t,e.type);t!==n&&(de(Mo,e),de(Qt,n))}function rh(e){Mo.current===e&&(me(Qt),me(Mo))}var ye=tr(0);function Ta(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 Vu=[];function ih(){for(var e=0;en?n:4,e(!0);var i=Ku.transition;Ku.transition={};try{e(!1),t()}finally{ue=n,Ku.transition=i}}function Rv(){return Ot().memoizedState}function I1(e,t,n){var i=Vn(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Av(e))Mv(t,n);else if(n=uv(e,t,n,i),n!==null){var s=Ye();Dt(n,e,i,s),Iv(n,t,i)}}function z1(e,t,n){var i=Vn(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Av(e))Mv(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var u=t.lastRenderedState,f=a(u,n);if(s.hasEagerState=!0,s.eagerState=f,Bt(f,u)){var h=t.interleaved;h===null?(s.next=s,eh(t)):(s.next=h.next,h.next=s),t.interleaved=s;return}}catch{}finally{}n=uv(e,t,s,i),n!==null&&(s=Ye(),Dt(n,e,i,s),Iv(n,t,i))}}function Av(e){var t=e.alternate;return e===we||t!==null&&t===we}function Mv(e,t){mo=La=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Iv(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Uf(e,n)}}var Oa={readContext:Lt,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},j1={readContext:Lt,useCallback:function(e,t){return Vt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:bp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qs(4194308,4,Lv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qs(4,2,e,t)},useMemo:function(e,t){var n=Vt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=Vt();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=I1.bind(null,we,e),[i.memoizedState,e]},useRef:function(e){var t=Vt();return e={current:e},t.memoizedState=e},useState:jp,useDebugValue:uh,useDeferredValue:function(e){return Vt().memoizedState=e},useTransition:function(){var e=jp(!1),t=e[0];return e=M1.bind(null,e[1]),Vt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=we,s=Vt();if(ve){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),be===null)throw Error(j(349));xr&30||gv(i,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,bp(wv.bind(null,i,a,e),[e]),i.flags|=2048,bo(9,yv.bind(null,i,a,n,t),void 0,null),n},useId:function(){var e=Vt(),t=be.identifierPrefix;if(ve){var n=hn,i=fn;n=(i&~(1<<32-bt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=zo++,0")&&(h=h.replace("",e.displayName)),h}while(1<=u&&0<=f);break}}}finally{Nu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?oo(e):""}function dw(e){switch(e.tag){case 5:return oo(e.type);case 16:return oo("Lazy");case 13:return oo("Suspense");case 19:return oo("SuspenseList");case 0:case 2:case 15:return e=Ru(e.type,!1),e;case 11:return e=Ru(e.type.render,!1),e;case 1:return e=Ru(e.type,!0),e;default:return""}}function Ec(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 Vr:return"Fragment";case Wr:return"Portal";case yc:return"Profiler";case zf:return"StrictMode";case wc:return"Suspense";case xc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case p_:return(e.displayName||"Context")+".Consumer";case d_:return(e._context.displayName||"Context")+".Provider";case bf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jf:return t=e.displayName||null,t!==null?t:Ec(e.type)||"Memo";case Mn:t=e._payload,e=e._init;try{return Ec(e(t))}catch{}}return null}function pw(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 Ec(t);case 8:return t===zf?"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 Yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function __(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mw(e){var t=__(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){i=""+u,a.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(u){i=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ks(e){e._valueTracker||(e._valueTracker=mw(e))}function v_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=__(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function fa(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 Sc(e,t){var n=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function np(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=Yn(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function g_(e,t){t=t.checked,t!=null&&If(e,"checked",t,!1)}function Pc(e,t){g_(e,t);var n=Yn(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tc(e,t.type,Yn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="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 Tc(e,t,n){(t!=="number"||fa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var so=Array.isArray;function ii(e,t,n,i){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Ns.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function To(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fo={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},_w=["Webkit","ms","Moz","O"];Object.keys(fo).forEach(function(e){_w.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fo[t]=fo[e]})});function E_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fo.hasOwnProperty(e)&&fo[e]?(""+t).trim():t+"px"}function S_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,s=E_(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}var vw=xe({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 Cc(e,t){if(t){if(vw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(b(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(b(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(b(61))}if(t.style!=null&&typeof t.style!="object")throw Error(b(62))}}function kc(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 Nc=null;function Df(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rc=null,oi=null,si=null;function sp(e){if(e=Qo(e)){if(typeof Rc!="function")throw Error(b(280));var t=e.stateNode;t&&(t=Xa(t),Rc(e.stateNode,e.type,t))}}function P_(e){oi?si?si.push(e):si=[e]:oi=e}function T_(){if(oi){var e=oi,t=si;if(si=oi=null,sp(e),t)for(e=0;e>>=0,e===0?32:31-(Cw(e)/kw|0)|0}var Rs=64,As=4194304;function ao(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 ma(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,s=e.suspendedLanes,a=e.pingedLanes,u=n&268435455;if(u!==0){var f=u&~s;f!==0?i=ao(f):(a&=u,a!==0&&(i=ao(a)))}else u=n&~s,u!==0?i=ao(u):a!==0&&(i=ao(a));if(i===0)return 0;if(t!==0&&t!==i&&!(t&s)&&(s=i&-i,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(i&4&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0n;n++)t.push(e);return t}function Ko(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jt(t),e[t]=n}function Mw(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 i=e.eventTimes;for(e=e.expirationTimes;0=po),mp=String.fromCharCode(32),_p=!1;function W_(e,t){switch(e){case"keyup":return a1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gr=!1;function u1(e,t){switch(e){case"compositionend":return V_(t);case"keypress":return t.which!==32?null:(_p=!0,mp);case"textInput":return e=t.data,e===mp&&_p?null:e;default:return null}}function c1(e,t){if(Gr)return e==="compositionend"||!Vf&&W_(e,t)?(e=Z_(),Ks=Zf=Dn=null,Gr=!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)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wp(n)}}function Q_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Q_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Y_(){for(var e=window,t=fa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fa(e.document)}return t}function Gf(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 y1(e){var t=Y_(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Q_(n.ownerDocument.documentElement,n)){if(i!==null&&Gf(n)){if(t=i.start,e=i.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,a=Math.min(i.start,s);i=i.end===void 0?a:Math.min(i.end,s),!e.extend&&a>i&&(s=i,i=a,a=s),s=xp(n,a);var u=xp(n,i);s&&u&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>i?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.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=document.documentMode,Kr=null,jc=null,_o=null,Dc=!1;function Ep(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dc||Kr==null||Kr!==fa(i)||(i=Kr,"selectionStart"in i&&Gf(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),_o&&Ro(_o,i)||(_o=i,i=ga(jc,"onSelect"),0Yr||(e.current=Hc[Yr],Hc[Yr]=null,Yr--)}function de(e,t){Yr++,Hc[Yr]=e.current,e.current=t}var Xn={},Qe=nr(Xn),it=nr(!1),yr=Xn;function pi(e,t){var n=e.type.contextTypes;if(!n)return Xn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in n)s[a]=t[a];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ot(e){return e=e.childContextTypes,e!=null}function wa(){me(it),me(Qe)}function kp(e,t,n){if(Qe.current!==Xn)throw Error(b(168));de(Qe,t),de(it,n)}function sv(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var s in i)if(!(s in t))throw Error(b(108,pw(e)||"Unknown",s));return xe({},n,i)}function xa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xn,yr=Qe.current,de(Qe,e),de(it,it.current),!0}function Np(e,t,n){var i=e.stateNode;if(!i)throw Error(b(169));n?(e=sv(e,t,yr),i.__reactInternalMemoizedMergedChildContext=e,me(it),me(Qe),de(Qe,e)):me(it),de(it,n)}var un=null,Ja=!1,Wu=!1;function av(e){un===null?un=[e]:un.push(e)}function R1(e){Ja=!0,av(e)}function rr(){if(!Wu&&un!==null){Wu=!0;var e=0,t=ue;try{var n=un;for(ue=1;e>=u,s-=u,cn=1<<32-jt(t)+s|n<Z?(re=U,U=null):re=U.sibling;var W=g(E,U,T[Z],R);if(W===null){U===null&&(U=re);break}e&&U&&W.alternate===null&&t(E,U),y=a(W,y,Z),F===null?j=W:F.sibling=W,F=W,U=re}if(Z===T.length)return n(E,U),ve&&cr(E,Z),j;if(U===null){for(;ZZ?(re=U,U=null):re=U.sibling;var J=g(E,U,W.value,R);if(J===null){U===null&&(U=re);break}e&&U&&J.alternate===null&&t(E,U),y=a(J,y,Z),F===null?j=J:F.sibling=J,F=J,U=re}if(W.done)return n(E,U),ve&&cr(E,Z),j;if(U===null){for(;!W.done;Z++,W=T.next())W=v(E,W.value,R),W!==null&&(y=a(W,y,Z),F===null?j=W:F.sibling=W,F=W);return ve&&cr(E,Z),j}for(U=i(E,U);!W.done;Z++,W=T.next())W=O(U,E,Z,W.value,R),W!==null&&(e&&W.alternate!==null&&U.delete(W.key===null?Z:W.key),y=a(W,y,Z),F===null?j=W:F.sibling=W,F=W);return e&&U.forEach(function(Ce){return t(E,Ce)}),ve&&cr(E,Z),j}function N(E,y,T,R){if(typeof T=="object"&&T!==null&&T.type===Vr&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case Cs:e:{for(var j=T.key,F=y;F!==null;){if(F.key===j){if(j=T.type,j===Vr){if(F.tag===7){n(E,F.sibling),y=s(F,T.props.children),y.return=E,E=y;break e}}else if(F.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Mn&&jp(j)===F.type){n(E,F.sibling),y=s(F,T.props),y.ref=Ji(E,F,T),y.return=E,E=y;break e}n(E,F);break}else t(E,F);F=F.sibling}T.type===Vr?(y=gr(T.props.children,E.mode,R,T.key),y.return=E,E=y):(R=na(T.type,T.key,T.props,null,E.mode,R),R.ref=Ji(E,y,T),R.return=E,E=R)}return u(E);case Wr:e:{for(F=T.key;y!==null;){if(y.key===F)if(y.tag===4&&y.stateNode.containerInfo===T.containerInfo&&y.stateNode.implementation===T.implementation){n(E,y.sibling),y=s(y,T.children||[]),y.return=E,E=y;break e}else{n(E,y);break}else t(E,y);y=y.sibling}y=Ju(T,E.mode,R),y.return=E,E=y}return u(E);case Mn:return F=T._init,N(E,y,F(T._payload),R)}if(so(T))return w(E,y,T,R);if(Ki(T))return x(E,y,T,R);Bs(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,y!==null&&y.tag===6?(n(E,y.sibling),y=s(y,T),y.return=E,E=y):(n(E,y),y=Xu(T,E.mode,R),y.return=E,E=y),u(E)):n(E,y)}return N}var _i=mv(!0),_v=mv(!1),Yo={},Qt=nr(Yo),zo=nr(Yo),bo=nr(Yo);function mr(e){if(e===Yo)throw Error(b(174));return e}function nh(e,t){switch(de(bo,t),de(zo,e),de(Qt,Yo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Oc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Oc(t,e)}me(Qt),de(Qt,t)}function vi(){me(Qt),me(zo),me(bo)}function vv(e){mr(bo.current);var t=mr(Qt.current),n=Oc(t,e.type);t!==n&&(de(zo,e),de(Qt,n))}function rh(e){zo.current===e&&(me(Qt),me(zo))}var ye=nr(0);function Oa(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 Vu=[];function ih(){for(var e=0;en?n:4,e(!0);var i=Gu.transition;Gu.transition={};try{e(!1),t()}finally{ue=n,Gu.transition=i}}function Mv(){return Ot().memoizedState}function z1(e,t,n){var i=Gn(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Iv(e))zv(t,n);else if(n=fv(e,t,n,i),n!==null){var s=Xe();Dt(n,e,i,s),bv(n,t,i)}}function b1(e,t,n){var i=Gn(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Iv(e))zv(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var u=t.lastRenderedState,f=a(u,n);if(s.hasEagerState=!0,s.eagerState=f,Bt(f,u)){var h=t.interleaved;h===null?(s.next=s,eh(t)):(s.next=h.next,h.next=s),t.interleaved=s;return}}catch{}finally{}n=fv(e,t,s,i),n!==null&&(s=Xe(),Dt(n,e,i,s),bv(n,t,i))}}function Iv(e){var t=e.alternate;return e===we||t!==null&&t===we}function zv(e,t){vo=Ca=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bv(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Uf(e,n)}}var ka={readContext:Lt,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useInsertionEffect:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useSyncExternalStore:Ve,useId:Ve,unstable_isNewReconciler:!1},j1={readContext:Lt,useCallback:function(e,t){return Vt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:Bp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Xs(4194308,4,Cv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xs(4,2,e,t)},useMemo:function(e,t){var n=Vt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=Vt();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=z1.bind(null,we,e),[i.memoizedState,e]},useRef:function(e){var t=Vt();return e={current:e},t.memoizedState=e},useState:Dp,useDebugValue:uh,useDeferredValue:function(e){return Vt().memoizedState=e},useTransition:function(){var e=Dp(!1),t=e[0];return e=I1.bind(null,e[1]),Vt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=we,s=Vt();if(ve){if(n===void 0)throw Error(b(407));n=n()}else{if(n=t(),De===null)throw Error(b(349));xr&30||wv(i,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,Bp(Ev.bind(null,i,a,e),[e]),i.flags|=2048,Bo(9,xv.bind(null,i,a,n,t),void 0,null),n},useId:function(){var e=Vt(),t=De.identifierPrefix;if(ve){var n=fn,i=cn;n=(i&~(1<<32-jt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=jo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=u.createElement(n,{is:i.is}):(e=u.createElement(n),n==="select"&&(u=e,i.multiple?u.multiple=!0:i.size&&(u.size=i.size))):e=u.createElementNS(e,n),e[Kt]=t,e[Ao]=i,Zv(e,t,!1,!1),t.stateNode=e;e:{switch(u=Cc(n,i),n){case"dialog":pe("cancel",e),pe("close",e),s=i;break;case"iframe":case"object":case"embed":pe("load",e),s=i;break;case"video":case"audio":for(s=0;syi&&(t.flags|=128,i=!0,Xi(a,!1),t.lanes=4194304)}else{if(!i)if(e=Ta(u),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xi(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!ve)return Ve(t),null}else 2*Le()-a.renderingStartTime>yi&&n!==1073741824&&(t.flags|=128,i=!0,Xi(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(n=a.last,n!==null?n.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Le(),t.sibling=null,n=ye.current,de(ye,i?n&1|2:n&1),t):(Ve(t),null);case 22:case 23:return mh(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?at&1073741824&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function H1(e,t){switch(qf(t),t.tag){case 1:return ot(t.type)&&ga(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vi(),me(it),me(qe),ih(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rh(t),null;case 13:if(me(ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(ye),null;case 4:return vi(),null;case 10:return Jf(t.type._context),null;case 22:case 23:return mh(),null;case 24:return null;default:return null}}var Bs=!1,Ge=!1,W1=typeof WeakSet=="function"?WeakSet:Set,$=null;function ti(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Se(e,t,i)}else n.current=null}function nf(e,t,n){try{n()}catch(i){Se(e,t,i)}}var Vp=!1;function V1(e,t){if(Bc=pa,e=q_(),Kf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var s=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var u=0,f=-1,h=-1,p=0,m=0,v=e,g=null;t:for(;;){for(var O;v!==n||s!==0&&v.nodeType!==3||(f=u+s),v!==a||i!==0&&v.nodeType!==3||(h=u+i),v.nodeType===3&&(u+=v.nodeValue.length),(O=v.firstChild)!==null;)g=v,v=O;for(;;){if(v===e)break t;if(g===n&&++p===s&&(f=u),g===a&&++m===i&&(h=u),(O=v.nextSibling)!==null)break;v=g,g=v.parentNode}v=O}n=f===-1||h===-1?null:{start:f,end:h}}else n=null}n=n||{start:0,end:0}}else n=null;for(Uc={focusedElem:e,selectionRange:n},pa=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var x=E.memoizedProps,N=E.memoizedState,S=t.stateNode,y=S.getSnapshotBeforeUpdate(t.elementType===t.type?x:Mt(t.type,x),N);S.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(R){Se(t,t.return,R)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return E=Vp,Vp=!1,E}function _o(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var s=i=i.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&nf(t,n,a)}s=s.next}while(s!==i)}}function el(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 i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function rf(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 Vv(e){var t=e.alternate;t!==null&&(e.alternate=null,Vv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kt],delete t[Ao],delete t[Zc],delete t[k1],delete t[C1])),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 Kv(e){return e.tag===5||e.tag===3||e.tag===4}function Kp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Kv(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 of(e,t,n){var i=e.tag;if(i===5||i===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=va));else if(i!==4&&(e=e.child,e!==null))for(of(e,t,n),e=e.sibling;e!==null;)of(e,t,n),e=e.sibling}function sf(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(sf(e,t,n),e=e.sibling;e!==null;)sf(e,t,n),e=e.sibling}var Ue=null,It=!1;function Nn(e,t,n){for(n=n.child;n!==null;)Gv(e,t,n),n=n.sibling}function Gv(e,t,n){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(Va,n)}catch{}switch(n.tag){case 5:Ge||ti(n,t);case 6:var i=Ue,s=It;Ue=null,Nn(e,t,n),Ue=i,It=s,Ue!==null&&(It?(e=Ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ue.removeChild(n.stateNode));break;case 18:Ue!==null&&(It?(e=Ue,n=n.stateNode,e.nodeType===8?Hu(e.parentNode,n):e.nodeType===1&&Hu(e,n),Oo(e)):Hu(Ue,n.stateNode));break;case 4:i=Ue,s=It,Ue=n.stateNode.containerInfo,It=!0,Nn(e,t,n),Ue=i,It=s;break;case 0:case 11:case 14:case 15:if(!Ge&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){s=i=i.next;do{var a=s,u=a.destroy;a=a.tag,u!==void 0&&(a&2||a&4)&&nf(n,t,u),s=s.next}while(s!==i)}Nn(e,t,n);break;case 1:if(!Ge&&(ti(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(f){Se(n,t,f)}Nn(e,t,n);break;case 21:Nn(e,t,n);break;case 22:n.mode&1?(Ge=(i=Ge)||n.memoizedState!==null,Nn(e,t,n),Ge=i):Nn(e,t,n);break;default:Nn(e,t,n)}}function Gp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new W1),t.forEach(function(i){var s=tx.bind(null,e,i);n.has(i)||(n.add(i),i.then(s,s))})}}function At(e,t){var n=t.deletions;if(n!==null)for(var i=0;is&&(s=u),i&=~a}if(i=s,i=Le()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*G1(i/1960))-i,10e?16:e,Dn===null)var i=!1;else{if(e=Dn,Dn=null,Na=0,ne&6)throw Error(j(331));var s=ne;for(ne|=4,$=e.current;$!==null;){var a=$,u=a.child;if($.flags&16){var f=a.deletions;if(f!==null){for(var h=0;hLe()-dh?vr(e,0):hh|=n),st(e,t)}function ng(e,t){t===0&&(e.mode&1?(t=Ns,Ns<<=1,!(Ns&130023424)&&(Ns=4194304)):t=1);var n=Ye();e=gn(e,t),e!==null&&(Vo(e,t,n),st(e,n))}function ex(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ng(e,n)}function tx(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(j(314))}i!==null&&i.delete(t),ng(e,n)}var rg;rg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||it.current)nt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nt=!1,$1(e,t,n);nt=!!(e.flags&131072)}else nt=!1,ve&&t.flags&1048576&&sv(t,xa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Ys(e,t),e=t.pendingProps;var s=pi(t,qe.current);li(t,n),s=sh(null,t,i,e,s,n);var a=ah();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,ot(i)?(a=!0,ya(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,th(t),s.updater=Xa,t.stateNode=s,s._reactInternals=t,qc(t,i,e,n),t=Xc(null,t,i,!0,a,n)):(t.tag=0,ve&&a&&Gf(t),Qe(null,t,s,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Ys(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=rx(i),e=Mt(i,e),s){case 0:t=Yc(null,t,i,e,n);break e;case 1:t=Zp(null,t,i,e,n);break e;case 11:t=Fp(null,t,i,e,n);break e;case 14:t=$p(null,t,i,Mt(i.type,e),n);break e}throw Error(j(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Mt(i,s),Yc(e,t,i,s,n);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Mt(i,s),Zp(e,t,i,s,n);case 3:e:{if(Uv(t),e===null)throw Error(j(387));i=t.pendingProps,a=t.memoizedState,s=a.element,cv(e,t),Pa(t,i,null,n);var u=t.memoizedState;if(i=u.element,a.isDehydrated)if(a={element:i,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=gi(Error(j(423)),t),t=Hp(e,t,i,n,s);break e}else if(i!==s){s=gi(Error(j(424)),t),t=Hp(e,t,i,n,s);break e}else for(lt=Zn(t.stateNode.containerInfo.firstChild),ut=t,ve=!0,zt=null,n=pv(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mi(),i===s){t=yn(e,t,n);break e}Qe(e,t,i,n)}t=t.child}return t;case 5:return mv(t),e===null&&Vc(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,Fc(i,s)?u=null:a!==null&&Fc(i,a)&&(t.flags|=32),Bv(e,t),Qe(e,t,u,n),t.child;case 6:return e===null&&Vc(t),null;case 13:return Fv(e,t,n);case 4:return nh(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=_i(t,null,i,n):Qe(e,t,i,n),t.child;case 11:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Mt(i,s),Fp(e,t,i,s,n);case 7:return Qe(e,t,t.pendingProps,n),t.child;case 8:return Qe(e,t,t.pendingProps.children,n),t.child;case 12:return Qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,s=t.pendingProps,a=t.memoizedProps,u=s.value,de(Ea,i._currentValue),i._currentValue=u,a!==null)if(Bt(a.value,u)){if(a.children===s.children&&!it.current){t=yn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var f=a.dependencies;if(f!==null){u=a.child;for(var h=f.firstContext;h!==null;){if(h.context===i){if(a.tag===1){h=pn(-1,n&-n),h.tag=2;var p=a.updateQueue;if(p!==null){p=p.shared;var m=p.pending;m===null?h.next=h:(h.next=m.next,m.next=h),p.pending=h}}a.lanes|=n,h=a.alternate,h!==null&&(h.lanes|=n),Kc(a.return,n,t),f.lanes|=n;break}h=h.next}}else if(a.tag===10)u=a.type===t.type?null:a.child;else if(a.tag===18){if(u=a.return,u===null)throw Error(j(341));u.lanes|=n,f=u.alternate,f!==null&&(f.lanes|=n),Kc(u,n,t),u=a.sibling}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}Qe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,li(t,n),s=Lt(s),i=i(s),t.flags|=1,Qe(e,t,i,n),t.child;case 14:return i=t.type,s=Mt(i,t.pendingProps),s=Mt(i.type,s),$p(e,t,i,s,n);case 15:return bv(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Mt(i,s),Ys(e,t),t.tag=1,ot(i)?(e=!0,ya(t)):e=!1,li(t,n),hv(t,i,s),qc(t,i,s,n),Xc(null,t,i,!0,e,n);case 19:return $v(e,t,n);case 22:return Dv(e,t,n)}throw Error(j(156,t.tag))};function ig(e,t){return N_(e,t)}function nx(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function St(e,t,n,i){return new nx(e,t,n,i)}function vh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rx(e){if(typeof e=="function")return vh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jf)return 11;if(e===bf)return 14}return 2}function Kn(e,t){var n=e.alternate;return n===null?(n=St(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 ea(e,t,n,i,s,a){var u=2;if(i=e,typeof e=="function")vh(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Vr:return gr(n.children,s,a,t);case zf:u=8,s|=8;break;case yc:return e=St(12,n,t,s|2),e.elementType=yc,e.lanes=a,e;case wc:return e=St(13,n,t,s),e.elementType=wc,e.lanes=a,e;case xc:return e=St(19,n,t,s),e.elementType=xc,e.lanes=a,e;case d_:return nl(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case f_:u=10;break e;case h_:u=9;break e;case jf:u=11;break e;case bf:u=14;break e;case An:u=16,i=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=St(u,n,t,s),t.elementType=e,t.type=i,t.lanes=a,t}function gr(e,t,n,i){return e=St(7,e,i,t),e.lanes=n,e}function nl(e,t,n,i){return e=St(22,e,i,t),e.elementType=d_,e.lanes=n,e.stateNode={isHidden:!1},e}function Xu(e,t,n){return e=St(6,e,null,t),e.lanes=n,e}function Ju(e,t,n){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ix(e,t,n,i,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=Mu(0),this.expirationTimes=Mu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mu(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function gh(e,t,n,i,s,a,u,f,h){return e=new ix(e,t,n,f,h),t===1?(t=1,a===!0&&(t|=8)):t=0,a=St(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},th(a),e}function ox(e,t,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lg)}catch(e){console.error(e)}}lg(),s_.exports=ht;var ug=s_.exports,nm=ug;vc.createRoot=nm.createRoot,vc.hydrateRoot=nm.hydrateRoot;/** +`+a.stack}return{value:e,source:t,stack:s,digest:null}}function Qu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Qc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var U1=typeof WeakMap=="function"?WeakMap:Map;function jv(e,t,n){n=dn(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Ra||(Ra=!0,af=i),Qc(e,t)},n}function Dv(e,t,n){n=dn(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var s=t.value;n.payload=function(){return i(s)},n.callback=function(){Qc(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Qc(e,t),typeof i!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var u=t.stack;this.componentDidCatch(t.value,{componentStack:u!==null?u:""})}),n}function Up(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new U1;var s=new Set;i.set(t,s)}else s=i.get(t),s===void 0&&(s=new Set,i.set(t,s));s.has(n)||(s.add(n),e=ex.bind(null,e,t,n),t.then(e,e))}function Fp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function $p(e,t,n,i,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=dn(-1,1),t.tag=2,Wn(n,t,1))),n.lanes|=1),e)}var F1=xn.ReactCurrentOwner,rt=!1;function Ye(e,t,n,i){t.child=e===null?_v(t,null,n,i):_i(t,e.child,n,i)}function Zp(e,t,n,i,s){n=n.render;var a=t.ref;return li(t,s),i=sh(e,t,n,i,a,s),n=ah(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,yn(e,t,s)):(ve&&n&&Kf(t),t.flags|=1,Ye(e,t,i,s),t.child)}function Hp(e,t,n,i,s){if(e===null){var a=n.type;return typeof a=="function"&&!vh(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Bv(e,t,a,i,s)):(e=na(n.type,null,i,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&s)){var u=a.memoizedProps;if(n=n.compare,n=n!==null?n:Ro,n(u,i)&&e.ref===t.ref)return yn(e,t,s)}return t.flags|=1,e=Kn(a,i),e.ref=t.ref,e.return=t,t.child=e}function Bv(e,t,n,i,s){if(e!==null){var a=e.memoizedProps;if(Ro(a,i)&&e.ref===t.ref)if(rt=!1,t.pendingProps=i=a,(e.lanes&s)!==0)e.flags&131072&&(rt=!0);else return t.lanes=e.lanes,yn(e,t,s)}return Yc(e,t,n,i,s)}function Uv(e,t,n){var i=t.pendingProps,s=i.children,a=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(ni,at),at|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(ni,at),at|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=a!==null?a.baseLanes:n,de(ni,at),at|=i}else a!==null?(i=a.baseLanes|n,t.memoizedState=null):i=n,de(ni,at),at|=i;return Ye(e,t,s,n),t.child}function Fv(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Yc(e,t,n,i,s){var a=ot(n)?yr:Qe.current;return a=pi(t,a),li(t,s),n=sh(e,t,n,i,a,s),i=ah(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,yn(e,t,s)):(ve&&i&&Kf(t),t.flags|=1,Ye(e,t,n,s),t.child)}function Wp(e,t,n,i,s){if(ot(n)){var a=!0;xa(t)}else a=!1;if(li(t,s),t.stateNode===null)Js(e,t),pv(t,n,i),qc(t,n,i,s),i=!0;else if(e===null){var u=t.stateNode,f=t.memoizedProps;u.props=f;var h=u.context,p=n.contextType;typeof p=="object"&&p!==null?p=Lt(p):(p=ot(n)?yr:Qe.current,p=pi(t,p));var m=n.getDerivedStateFromProps,v=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function";v||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f!==i||h!==p)&&bp(t,u,i,p),In=!1;var g=t.memoizedState;u.state=g,La(t,i,u,s),h=t.memoizedState,f!==i||g!==h||it.current||In?(typeof m=="function"&&(Kc(t,n,m,i),h=t.memoizedState),(f=In||zp(t,n,f,i,g,h,p))?(v||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=h),u.props=i,u.state=h,u.context=p,i=f):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{u=t.stateNode,hv(e,t),f=t.memoizedProps,p=t.type===t.elementType?f:Mt(t.type,f),u.props=p,v=t.pendingProps,g=u.context,h=n.contextType,typeof h=="object"&&h!==null?h=Lt(h):(h=ot(n)?yr:Qe.current,h=pi(t,h));var O=n.getDerivedStateFromProps;(m=typeof O=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f!==v||g!==h)&&bp(t,u,i,h),In=!1,g=t.memoizedState,u.state=g,La(t,i,u,s);var w=t.memoizedState;f!==v||g!==w||it.current||In?(typeof O=="function"&&(Kc(t,n,O,i),w=t.memoizedState),(p=In||zp(t,n,p,i,g,w,h)||!1)?(m||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(i,w,h),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(i,w,h)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=w),u.props=i,u.state=w,u.context=h,i=p):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),i=!1)}return Xc(e,t,n,i,a,s)}function Xc(e,t,n,i,s,a){Fv(e,t);var u=(t.flags&128)!==0;if(!i&&!u)return s&&Np(t,n,!1),yn(e,t,a);i=t.stateNode,F1.current=t;var f=u&&typeof n.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&u?(t.child=_i(t,e.child,null,a),t.child=_i(t,null,f,a)):Ye(e,t,f,a),t.memoizedState=i.state,s&&Np(t,n,!0),t.child}function $v(e){var t=e.stateNode;t.pendingContext?kp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kp(e,t.context,!1),nh(e,t.containerInfo)}function Vp(e,t,n,i,s){return mi(),Qf(s),t.flags|=256,Ye(e,t,n,i),t.child}var Jc={dehydrated:null,treeContext:null,retryLane:0};function ef(e){return{baseLanes:e,cachePool:null,transitions:null}}function Zv(e,t,n){var i=t.pendingProps,s=ye.current,a=!1,u=(t.flags&128)!==0,f;if((f=u)||(f=e!==null&&e.memoizedState===null?!1:(s&2)!==0),f?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),de(ye,s&1),e===null)return Vc(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):(u=i.children,e=i.fallback,a?(i=t.mode,a=t.child,u={mode:"hidden",children:u},!(i&1)&&a!==null?(a.childLanes=0,a.pendingProps=u):a=il(u,i,0,null),e=gr(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ef(n),t.memoizedState=Jc,e):ch(t,u));if(s=e.memoizedState,s!==null&&(f=s.dehydrated,f!==null))return $1(e,t,u,i,f,s,n);if(a){a=i.fallback,u=t.mode,s=e.child,f=s.sibling;var h={mode:"hidden",children:i.children};return!(u&1)&&t.child!==s?(i=t.child,i.childLanes=0,i.pendingProps=h,t.deletions=null):(i=Kn(s,h),i.subtreeFlags=s.subtreeFlags&14680064),f!==null?a=Kn(f,a):(a=gr(a,u,n,null),a.flags|=2),a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,u=e.child.memoizedState,u=u===null?ef(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},a.memoizedState=u,a.childLanes=e.childLanes&~n,t.memoizedState=Jc,i}return a=e.child,e=a.sibling,i=Kn(a,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=n),i.return=t,i.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function ch(e,t){return t=il({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Us(e,t,n,i){return i!==null&&Qf(i),_i(t,e.child,null,n),e=ch(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $1(e,t,n,i,s,a,u){if(n)return t.flags&256?(t.flags&=-257,i=Qu(Error(b(422))),Us(e,t,u,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=i.fallback,s=t.mode,i=il({mode:"visible",children:i.children},s,0,null),a=gr(a,s,u,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,t.mode&1&&_i(t,e.child,null,u),t.child.memoizedState=ef(u),t.memoizedState=Jc,a);if(!(t.mode&1))return Us(e,t,u,null);if(s.data==="$!"){if(i=s.nextSibling&&s.nextSibling.dataset,i)var f=i.dgst;return i=f,a=Error(b(419)),i=Qu(a,i,void 0),Us(e,t,u,i)}if(f=(u&e.childLanes)!==0,rt||f){if(i=De,i!==null){switch(u&-u){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&(i.suspendedLanes|u)?0:s,s!==0&&s!==a.retryLane&&(a.retryLane=s,gn(e,s),Dt(i,e,s,-1))}return _h(),i=Qu(Error(b(421))),Us(e,t,u,i)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=tx.bind(null,e),s._reactRetry=t,null):(e=a.treeContext,lt=Hn(s.nextSibling),ut=t,ve=!0,zt=null,e!==null&&(wt[xt++]=cn,wt[xt++]=fn,wt[xt++]=wr,cn=e.id,fn=e.overflow,wr=t),t=ch(t,i.children),t.flags|=4096,t)}function Gp(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Gc(e.return,t,n)}function Yu(e,t,n,i,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=i,a.tail=n,a.tailMode=s)}function Hv(e,t,n){var i=t.pendingProps,s=i.revealOrder,a=i.tail;if(Ye(e,t,i.children,n),i=ye.current,i&2)i=i&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&&Gp(e,n,t);else if(e.tag===19)Gp(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}i&=1}if(de(ye,i),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Oa(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Yu(t,!1,s,n,a);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Oa(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Yu(t,!0,n,null,a);break;case"together":Yu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Js(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function yn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Er|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(b(153));if(t.child!==null){for(e=t.child,n=Kn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Z1(e,t,n){switch(t.tag){case 3:$v(t),mi();break;case 5:vv(t);break;case 1:ot(t.type)&&xa(t);break;case 4:nh(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,s=t.memoizedProps.value;de(Pa,i._currentValue),i._currentValue=s;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(de(ye,ye.current&1),t.flags|=128,null):n&t.child.childLanes?Zv(e,t,n):(de(ye,ye.current&1),e=yn(e,t,n),e!==null?e.sibling:null);de(ye,ye.current&1);break;case 19:if(i=(n&t.childLanes)!==0,e.flags&128){if(i)return Hv(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),de(ye,ye.current),i)break;return null;case 22:case 23:return t.lanes=0,Uv(e,t,n)}return yn(e,t,n)}var Wv,tf,Vv,Gv;Wv=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}};tf=function(){};Vv=function(e,t,n,i){var s=e.memoizedProps;if(s!==i){e=t.stateNode,mr(Qt.current);var a=null;switch(n){case"input":s=Sc(e,s),i=Sc(e,i),a=[];break;case"select":s=xe({},s,{value:void 0}),i=xe({},i,{value:void 0}),a=[];break;case"textarea":s=Lc(e,s),i=Lc(e,i),a=[];break;default:typeof s.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=ya)}Cc(n,i);var u;n=null;for(p in s)if(!i.hasOwnProperty(p)&&s.hasOwnProperty(p)&&s[p]!=null)if(p==="style"){var f=s[p];for(u in f)f.hasOwnProperty(u)&&(n||(n={}),n[u]="")}else p!=="dangerouslySetInnerHTML"&&p!=="children"&&p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(Po.hasOwnProperty(p)?a||(a=[]):(a=a||[]).push(p,null));for(p in i){var h=i[p];if(f=s!=null?s[p]:void 0,i.hasOwnProperty(p)&&h!==f&&(h!=null||f!=null))if(p==="style")if(f){for(u in f)!f.hasOwnProperty(u)||h&&h.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in h)h.hasOwnProperty(u)&&f[u]!==h[u]&&(n||(n={}),n[u]=h[u])}else n||(a||(a=[]),a.push(p,n)),n=h;else p==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,f=f?f.__html:void 0,h!=null&&f!==h&&(a=a||[]).push(p,h)):p==="children"?typeof h!="string"&&typeof h!="number"||(a=a||[]).push(p,""+h):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&(Po.hasOwnProperty(p)?(h!=null&&p==="onScroll"&&pe("scroll",e),a||f===h||(a=[])):(a=a||[]).push(p,h))}n&&(a=a||[]).push("style",n);var p=a;(t.updateQueue=p)&&(t.flags|=4)}};Gv=function(e,t,n,i){n!==i&&(t.flags|=4)};function eo(e,t){if(!ve)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 i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,i|=s.subtreeFlags&14680064,i|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,i|=s.subtreeFlags,i|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function H1(e,t,n){var i=t.pendingProps;switch(qf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return ot(t.type)&&wa(),Ge(t),null;case 3:return i=t.stateNode,vi(),me(it),me(Qe),ih(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ds(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,zt!==null&&(cf(zt),zt=null))),tf(e,t),Ge(t),null;case 5:rh(t);var s=mr(bo.current);if(n=t.type,e!==null&&t.stateNode!=null)Vv(e,t,n,i,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(b(166));return Ge(t),null}if(e=mr(Qt.current),Ds(t)){i=t.stateNode,n=t.type;var a=t.memoizedProps;switch(i[Gt]=t,i[Io]=a,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",i),pe("close",i);break;case"iframe":case"object":case"embed":pe("load",i);break;case"video":case"audio":for(s=0;s<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=u.createElement(n,{is:i.is}):(e=u.createElement(n),n==="select"&&(u=e,i.multiple?u.multiple=!0:i.size&&(u.size=i.size))):e=u.createElementNS(e,n),e[Gt]=t,e[Io]=i,Wv(e,t,!1,!1),t.stateNode=e;e:{switch(u=kc(n,i),n){case"dialog":pe("cancel",e),pe("close",e),s=i;break;case"iframe":case"object":case"embed":pe("load",e),s=i;break;case"video":case"audio":for(s=0;syi&&(t.flags|=128,i=!0,eo(a,!1),t.lanes=4194304)}else{if(!i)if(e=Oa(u),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),eo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!ve)return Ge(t),null}else 2*Le()-a.renderingStartTime>yi&&n!==1073741824&&(t.flags|=128,i=!0,eo(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(n=a.last,n!==null?n.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Le(),t.sibling=null,n=ye.current,de(ye,i?n&1|2:n&1),t):(Ge(t),null);case 22:case 23:return mh(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?at&1073741824&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error(b(156,t.tag))}function W1(e,t){switch(qf(t),t.tag){case 1:return ot(t.type)&&wa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vi(),me(it),me(Qe),ih(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rh(t),null;case 13:if(me(ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(b(340));mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(ye),null;case 4:return vi(),null;case 10:return Jf(t.type._context),null;case 22:case 23:return mh(),null;case 24:return null;default:return null}}var Fs=!1,qe=!1,V1=typeof WeakSet=="function"?WeakSet:Set,$=null;function ti(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Se(e,t,i)}else n.current=null}function nf(e,t,n){try{n()}catch(i){Se(e,t,i)}}var Kp=!1;function G1(e,t){if(Bc=_a,e=Y_(),Gf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var s=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var u=0,f=-1,h=-1,p=0,m=0,v=e,g=null;t:for(;;){for(var O;v!==n||s!==0&&v.nodeType!==3||(f=u+s),v!==a||i!==0&&v.nodeType!==3||(h=u+i),v.nodeType===3&&(u+=v.nodeValue.length),(O=v.firstChild)!==null;)g=v,v=O;for(;;){if(v===e)break t;if(g===n&&++p===s&&(f=u),g===a&&++m===i&&(h=u),(O=v.nextSibling)!==null)break;v=g,g=v.parentNode}v=O}n=f===-1||h===-1?null:{start:f,end:h}}else n=null}n=n||{start:0,end:0}}else n=null;for(Uc={focusedElem:e,selectionRange:n},_a=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var x=w.memoizedProps,N=w.memoizedState,E=t.stateNode,y=E.getSnapshotBeforeUpdate(t.elementType===t.type?x:Mt(t.type,x),N);E.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(b(163))}}catch(R){Se(t,t.return,R)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return w=Kp,Kp=!1,w}function go(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var s=i=i.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&nf(t,n,a)}s=s.next}while(s!==i)}}function nl(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 i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function rf(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 Kv(e){var t=e.alternate;t!==null&&(e.alternate=null,Kv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Gt],delete t[Io],delete t[Zc],delete t[k1],delete t[N1])),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 qv(e){return e.tag===5||e.tag===3||e.tag===4}function qp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qv(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 of(e,t,n){var i=e.tag;if(i===5||i===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=ya));else if(i!==4&&(e=e.child,e!==null))for(of(e,t,n),e=e.sibling;e!==null;)of(e,t,n),e=e.sibling}function sf(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(sf(e,t,n),e=e.sibling;e!==null;)sf(e,t,n),e=e.sibling}var Fe=null,It=!1;function Rn(e,t,n){for(n=n.child;n!==null;)Qv(e,t,n),n=n.sibling}function Qv(e,t,n){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(Ka,n)}catch{}switch(n.tag){case 5:qe||ti(n,t);case 6:var i=Fe,s=It;Fe=null,Rn(e,t,n),Fe=i,It=s,Fe!==null&&(It?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(It?(e=Fe,n=n.stateNode,e.nodeType===8?Hu(e.parentNode,n):e.nodeType===1&&Hu(e,n),ko(e)):Hu(Fe,n.stateNode));break;case 4:i=Fe,s=It,Fe=n.stateNode.containerInfo,It=!0,Rn(e,t,n),Fe=i,It=s;break;case 0:case 11:case 14:case 15:if(!qe&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){s=i=i.next;do{var a=s,u=a.destroy;a=a.tag,u!==void 0&&(a&2||a&4)&&nf(n,t,u),s=s.next}while(s!==i)}Rn(e,t,n);break;case 1:if(!qe&&(ti(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(f){Se(n,t,f)}Rn(e,t,n);break;case 21:Rn(e,t,n);break;case 22:n.mode&1?(qe=(i=qe)||n.memoizedState!==null,Rn(e,t,n),qe=i):Rn(e,t,n);break;default:Rn(e,t,n)}}function Qp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new V1),t.forEach(function(i){var s=nx.bind(null,e,i);n.has(i)||(n.add(i),i.then(s,s))})}}function At(e,t){var n=t.deletions;if(n!==null)for(var i=0;is&&(s=u),i&=~a}if(i=s,i=Le()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*q1(i/1960))-i,10e?16:e,Bn===null)var i=!1;else{if(e=Bn,Bn=null,Aa=0,ne&6)throw Error(b(331));var s=ne;for(ne|=4,$=e.current;$!==null;){var a=$,u=a.child;if($.flags&16){var f=a.deletions;if(f!==null){for(var h=0;hLe()-dh?vr(e,0):hh|=n),st(e,t)}function ig(e,t){t===0&&(e.mode&1?(t=As,As<<=1,!(As&130023424)&&(As=4194304)):t=1);var n=Xe();e=gn(e,t),e!==null&&(Ko(e,t,n),st(e,n))}function tx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ig(e,n)}function nx(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(b(314))}i!==null&&i.delete(t),ig(e,n)}var og;og=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||it.current)rt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rt=!1,Z1(e,t,n);rt=!!(e.flags&131072)}else rt=!1,ve&&t.flags&1048576&&lv(t,Sa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Js(e,t),e=t.pendingProps;var s=pi(t,Qe.current);li(t,n),s=sh(null,t,i,e,s,n);var a=ah();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,ot(i)?(a=!0,xa(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,th(t),s.updater=el,t.stateNode=s,s._reactInternals=t,qc(t,i,e,n),t=Xc(null,t,i,!0,a,n)):(t.tag=0,ve&&a&&Kf(t),Ye(null,t,s,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Js(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=ix(i),e=Mt(i,e),s){case 0:t=Yc(null,t,i,e,n);break e;case 1:t=Wp(null,t,i,e,n);break e;case 11:t=Zp(null,t,i,e,n);break e;case 14:t=Hp(null,t,i,Mt(i.type,e),n);break e}throw Error(b(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Mt(i,s),Yc(e,t,i,s,n);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Mt(i,s),Wp(e,t,i,s,n);case 3:e:{if($v(t),e===null)throw Error(b(387));i=t.pendingProps,a=t.memoizedState,s=a.element,hv(e,t),La(t,i,null,n);var u=t.memoizedState;if(i=u.element,a.isDehydrated)if(a={element:i,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=gi(Error(b(423)),t),t=Vp(e,t,i,n,s);break e}else if(i!==s){s=gi(Error(b(424)),t),t=Vp(e,t,i,n,s);break e}else for(lt=Hn(t.stateNode.containerInfo.firstChild),ut=t,ve=!0,zt=null,n=_v(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mi(),i===s){t=yn(e,t,n);break e}Ye(e,t,i,n)}t=t.child}return t;case 5:return vv(t),e===null&&Vc(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,Fc(i,s)?u=null:a!==null&&Fc(i,a)&&(t.flags|=32),Fv(e,t),Ye(e,t,u,n),t.child;case 6:return e===null&&Vc(t),null;case 13:return Zv(e,t,n);case 4:return nh(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=_i(t,null,i,n):Ye(e,t,i,n),t.child;case 11:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Mt(i,s),Zp(e,t,i,s,n);case 7:return Ye(e,t,t.pendingProps,n),t.child;case 8:return Ye(e,t,t.pendingProps.children,n),t.child;case 12:return Ye(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,s=t.pendingProps,a=t.memoizedProps,u=s.value,de(Pa,i._currentValue),i._currentValue=u,a!==null)if(Bt(a.value,u)){if(a.children===s.children&&!it.current){t=yn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var f=a.dependencies;if(f!==null){u=a.child;for(var h=f.firstContext;h!==null;){if(h.context===i){if(a.tag===1){h=dn(-1,n&-n),h.tag=2;var p=a.updateQueue;if(p!==null){p=p.shared;var m=p.pending;m===null?h.next=h:(h.next=m.next,m.next=h),p.pending=h}}a.lanes|=n,h=a.alternate,h!==null&&(h.lanes|=n),Gc(a.return,n,t),f.lanes|=n;break}h=h.next}}else if(a.tag===10)u=a.type===t.type?null:a.child;else if(a.tag===18){if(u=a.return,u===null)throw Error(b(341));u.lanes|=n,f=u.alternate,f!==null&&(f.lanes|=n),Gc(u,n,t),u=a.sibling}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}Ye(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,li(t,n),s=Lt(s),i=i(s),t.flags|=1,Ye(e,t,i,n),t.child;case 14:return i=t.type,s=Mt(i,t.pendingProps),s=Mt(i.type,s),Hp(e,t,i,s,n);case 15:return Bv(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Mt(i,s),Js(e,t),t.tag=1,ot(i)?(e=!0,xa(t)):e=!1,li(t,n),pv(t,i,s),qc(t,i,s,n),Xc(null,t,i,!0,e,n);case 19:return Hv(e,t,n);case 22:return Uv(e,t,n)}throw Error(b(156,t.tag))};function sg(e,t){return A_(e,t)}function rx(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function St(e,t,n,i){return new rx(e,t,n,i)}function vh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ix(e){if(typeof e=="function")return vh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===bf)return 11;if(e===jf)return 14}return 2}function Kn(e,t){var n=e.alternate;return n===null?(n=St(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 na(e,t,n,i,s,a){var u=2;if(i=e,typeof e=="function")vh(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Vr:return gr(n.children,s,a,t);case zf:u=8,s|=8;break;case yc:return e=St(12,n,t,s|2),e.elementType=yc,e.lanes=a,e;case wc:return e=St(13,n,t,s),e.elementType=wc,e.lanes=a,e;case xc:return e=St(19,n,t,s),e.elementType=xc,e.lanes=a,e;case m_:return il(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case d_:u=10;break e;case p_:u=9;break e;case bf:u=11;break e;case jf:u=14;break e;case Mn:u=16,i=null;break e}throw Error(b(130,e==null?e:typeof e,""))}return t=St(u,n,t,s),t.elementType=e,t.type=i,t.lanes=a,t}function gr(e,t,n,i){return e=St(7,e,i,t),e.lanes=n,e}function il(e,t,n,i){return e=St(22,e,i,t),e.elementType=m_,e.lanes=n,e.stateNode={isHidden:!1},e}function Xu(e,t,n){return e=St(6,e,null,t),e.lanes=n,e}function Ju(e,t,n){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ox(e,t,n,i,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=Mu(0),this.expirationTimes=Mu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mu(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function gh(e,t,n,i,s,a,u,f,h){return e=new ox(e,t,n,f,h),t===1?(t=1,a===!0&&(t|=8)):t=0,a=St(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},th(a),e}function sx(e,t,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cg)}catch(e){console.error(e)}}cg(),l_.exports=ht;var fg=l_.exports,im=fg;vc.createRoot=im.createRoot,vc.hydrateRoot=im.hydrateRoot;/** * @remix-run/router v1.9.0 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Bo(){return Bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Eh(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fx(){return Math.random().toString(36).substr(2,8)}function im(e,t){return{usr:e.state,key:e.key,idx:t}}function ff(e,t,n,i){return n===void 0&&(n=null),Bo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Oi(t):t,{state:n,key:t&&t.key||i||fx()})}function Ma(e){let{pathname:t="/",search:n="",hash:i=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Oi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function hx(e,t,n,i){i===void 0&&(i={});let{window:s=document.defaultView,v5Compat:a=!1}=i,u=s.history,f=Bn.Pop,h=null,p=m();p==null&&(p=0,u.replaceState(Bo({},u.state,{idx:p}),""));function m(){return(u.state||{idx:null}).idx}function v(){f=Bn.Pop;let N=m(),S=N==null?null:N-p;p=N,h&&h({action:f,location:x.location,delta:S})}function g(N,S){f=Bn.Push;let y=ff(x.location,N,S);n&&n(y,N),p=m()+1;let T=im(y,p),R=x.createHref(y);try{u.pushState(T,"",R)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;s.location.assign(R)}a&&h&&h({action:f,location:x.location,delta:1})}function O(N,S){f=Bn.Replace;let y=ff(x.location,N,S);n&&n(y,N),p=m();let T=im(y,p),R=x.createHref(y);u.replaceState(T,"",R),a&&h&&h({action:f,location:x.location,delta:0})}function E(N){let S=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof N=="string"?N:Ma(N);return Re(S,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,S)}let x={get action(){return f},get location(){return e(s,u)},listen(N){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(rm,v),h=N,()=>{s.removeEventListener(rm,v),h=null}},createHref(N){return t(s,N)},createURL:E,encodeLocation(N){let S=E(N);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:g,replace:O,go(N){return u.go(N)}};return x}var om;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(om||(om={}));function dx(e,t,n){n===void 0&&(n="/");let i=typeof t=="string"?Oi(t):t,s=Sh(i.pathname||"/",n);if(s==null)return null;let a=cg(e);px(a);let u=null;for(let f=0;u==null&&f{let h={relativePath:f===void 0?a.path||"":f,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};h.relativePath.startsWith("/")&&(Re(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let p=Gn([i,h.relativePath]),m=n.concat(h);a.children&&a.children.length>0&&(Re(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),cg(a.children,t,m,p)),!(a.path==null&&!a.index)&&t.push({path:p,score:xx(p,a.index),routesMeta:m})};return e.forEach((a,u)=>{var f;if(a.path===""||!((f=a.path)!=null&&f.includes("?")))s(a,u);else for(let h of fg(a.path))s(a,u,h)}),t}function fg(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,s=n.endsWith("?"),a=n.replace(/\?$/,"");if(i.length===0)return s?[a,""]:[a];let u=fg(i.join("/")),f=[];return f.push(...u.map(h=>h===""?a:[a,h].join("/"))),s&&f.push(...u),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function px(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ex(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const mx=/^:\w+$/,_x=3,vx=2,gx=1,yx=10,wx=-2,sm=e=>e==="*";function xx(e,t){let n=e.split("/"),i=n.length;return n.some(sm)&&(i+=wx),t&&(i+=vx),n.filter(s=>!sm(s)).reduce((s,a)=>s+(mx.test(a)?_x:a===""?gx:yx),i)}function Ex(e,t){return e.length===t.length&&e.slice(0,-1).every((i,s)=>i===t[s])?e[e.length-1]-t[t.length-1]:0}function Sx(e,t){let{routesMeta:n}=e,i={},s="/",a=[];for(let u=0;u{if(m==="*"){let g=f[v]||"";u=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}return p[m]=Ox(f[v]||"",m),p},{}),pathname:a,pathnameBase:u,pattern:e}}function Tx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Eh(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let i=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(u,f)=>(i.push(f),"/([^\\/]+)"));return e.endsWith("*")?(i.push("*"),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),i]}function Lx(e){try{return decodeURI(e)}catch(t){return Eh(!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 Ox(e,t){try{return decodeURIComponent(e)}catch(n){return Eh(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Sh(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}function kx(e,t){t===void 0&&(t="/");let{pathname:n,search:i="",hash:s=""}=typeof e=="string"?Oi(e):e;return{pathname:n?n.startsWith("/")?n:Cx(n,t):t,search:Rx(i),hash:Ax(s)}}function Cx(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function ec(e,t,n,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function hg(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function dg(e,t,n,i){i===void 0&&(i=!1);let s;typeof e=="string"?s=Oi(e):(s=Bo({},e),Re(!s.pathname||!s.pathname.includes("?"),ec("?","pathname","search",s)),Re(!s.pathname||!s.pathname.includes("#"),ec("#","pathname","hash",s)),Re(!s.search||!s.search.includes("#"),ec("#","search","hash",s)));let a=e===""||s.pathname==="",u=a?"/":s.pathname,f;if(i||u==null)f=n;else{let v=t.length-1;if(u.startsWith("..")){let g=u.split("/");for(;g[0]==="..";)g.shift(),v-=1;s.pathname=g.join("/")}f=v>=0?t[v]:"/"}let h=kx(s,f),p=u&&u!=="/"&&u.endsWith("/"),m=(a||u===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(p||m)&&(h.pathname+="/"),h}const Gn=e=>e.join("/").replace(/\/\/+/g,"/"),Nx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Rx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ax=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Mx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const pg=["post","put","patch","delete"];new Set(pg);const Ix=["get",...pg];new Set(Ix);/** + */function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Eh(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function hx(){return Math.random().toString(36).substr(2,8)}function sm(e,t){return{usr:e.state,key:e.key,idx:t}}function ff(e,t,n,i){return n===void 0&&(n=null),Fo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Oi(t):t,{state:n,key:t&&t.key||i||hx()})}function za(e){let{pathname:t="/",search:n="",hash:i=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Oi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function dx(e,t,n,i){i===void 0&&(i={});let{window:s=document.defaultView,v5Compat:a=!1}=i,u=s.history,f=Un.Pop,h=null,p=m();p==null&&(p=0,u.replaceState(Fo({},u.state,{idx:p}),""));function m(){return(u.state||{idx:null}).idx}function v(){f=Un.Pop;let N=m(),E=N==null?null:N-p;p=N,h&&h({action:f,location:x.location,delta:E})}function g(N,E){f=Un.Push;let y=ff(x.location,N,E);n&&n(y,N),p=m()+1;let T=sm(y,p),R=x.createHref(y);try{u.pushState(T,"",R)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(R)}a&&h&&h({action:f,location:x.location,delta:1})}function O(N,E){f=Un.Replace;let y=ff(x.location,N,E);n&&n(y,N),p=m();let T=sm(y,p),R=x.createHref(y);u.replaceState(T,"",R),a&&h&&h({action:f,location:x.location,delta:0})}function w(N){let E=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof N=="string"?N:za(N);return Oe(E,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,E)}let x={get action(){return f},get location(){return e(s,u)},listen(N){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(om,v),h=N,()=>{s.removeEventListener(om,v),h=null}},createHref(N){return t(s,N)},createURL:w,encodeLocation(N){let E=w(N);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:g,replace:O,go(N){return u.go(N)}};return x}var am;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(am||(am={}));function px(e,t,n){n===void 0&&(n="/");let i=typeof t=="string"?Oi(t):t,s=Sh(i.pathname||"/",n);if(s==null)return null;let a=hg(e);mx(a);let u=null;for(let f=0;u==null&&f{let h={relativePath:f===void 0?a.path||"":f,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};h.relativePath.startsWith("/")&&(Oe(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let p=qn([i,h.relativePath]),m=n.concat(h);a.children&&a.children.length>0&&(Oe(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),hg(a.children,t,m,p)),!(a.path==null&&!a.index)&&t.push({path:p,score:Ex(p,a.index),routesMeta:m})};return e.forEach((a,u)=>{var f;if(a.path===""||!((f=a.path)!=null&&f.includes("?")))s(a,u);else for(let h of dg(a.path))s(a,u,h)}),t}function dg(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,s=n.endsWith("?"),a=n.replace(/\?$/,"");if(i.length===0)return s?[a,""]:[a];let u=dg(i.join("/")),f=[];return f.push(...u.map(h=>h===""?a:[a,h].join("/"))),s&&f.push(...u),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function mx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Sx(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const _x=/^:\w+$/,vx=3,gx=2,yx=1,wx=10,xx=-2,lm=e=>e==="*";function Ex(e,t){let n=e.split("/"),i=n.length;return n.some(lm)&&(i+=xx),t&&(i+=gx),n.filter(s=>!lm(s)).reduce((s,a)=>s+(_x.test(a)?vx:a===""?yx:wx),i)}function Sx(e,t){return e.length===t.length&&e.slice(0,-1).every((i,s)=>i===t[s])?e[e.length-1]-t[t.length-1]:0}function Px(e,t){let{routesMeta:n}=e,i={},s="/",a=[];for(let u=0;u{if(m==="*"){let g=f[v]||"";u=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}return p[m]=Cx(f[v]||"",m),p},{}),pathname:a,pathnameBase:u,pattern:e}}function Lx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Eh(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let i=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(u,f)=>(i.push(f),"/([^\\/]+)"));return e.endsWith("*")?(i.push("*"),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),i]}function Ox(e){try{return decodeURI(e)}catch(t){return Eh(!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 Cx(e,t){try{return decodeURIComponent(e)}catch(n){return Eh(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Sh(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}function kx(e,t){t===void 0&&(t="/");let{pathname:n,search:i="",hash:s=""}=typeof e=="string"?Oi(e):e;return{pathname:n?n.startsWith("/")?n:Nx(n,t):t,search:Ax(i),hash:Mx(s)}}function Nx(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function ec(e,t,n,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Ph(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Th(e,t,n,i){i===void 0&&(i=!1);let s;typeof e=="string"?s=Oi(e):(s=Fo({},e),Oe(!s.pathname||!s.pathname.includes("?"),ec("?","pathname","search",s)),Oe(!s.pathname||!s.pathname.includes("#"),ec("#","pathname","hash",s)),Oe(!s.search||!s.search.includes("#"),ec("#","search","hash",s)));let a=e===""||s.pathname==="",u=a?"/":s.pathname,f;if(i||u==null)f=n;else{let v=t.length-1;if(u.startsWith("..")){let g=u.split("/");for(;g[0]==="..";)g.shift(),v-=1;s.pathname=g.join("/")}f=v>=0?t[v]:"/"}let h=kx(s,f),p=u&&u!=="/"&&u.endsWith("/"),m=(a||u===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(p||m)&&(h.pathname+="/"),h}const qn=e=>e.join("/").replace(/\/\/+/g,"/"),Rx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ax=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Mx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ix(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const pg=["post","put","patch","delete"];new Set(pg);const zx=["get",...pg];new Set(zx);/** * React Router v6.16.0 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ia(){return Ia=Object.assign?Object.assign.bind():function(e){for(var t=1;th.pathnameBase)),u=z.useRef(!1);return _g(()=>{u.current=!0}),z.useCallback(function(h,p){if(p===void 0&&(p={}),!u.current)return;if(typeof h=="number"){n.go(h);return}let m=dg(h,JSON.parse(a),s,p.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Gn([t,m.pathname])),(p.replace?n.replace:n.push)(m,p.state,p)},[t,n,a,s,e])}function Dx(){let{matches:e}=z.useContext(rr),t=e[e.length-1];return t?t.params:{}}function vg(e,t){let{relative:n}=t===void 0?{}:t,{matches:i}=z.useContext(rr),{pathname:s}=ll(),a=JSON.stringify(hg(i).map(u=>u.pathnameBase));return z.useMemo(()=>dg(e,JSON.parse(a),s,n==="path"),[e,a,s,n])}function Bx(e,t){return Ux(e,t)}function Ux(e,t,n){Qo()||Re(!1);let{navigator:i}=z.useContext(ki),{matches:s}=z.useContext(rr),a=s[s.length-1],u=a?a.params:{};a&&a.pathname;let f=a?a.pathnameBase:"/";a&&a.route;let h=ll(),p;if(t){var m;let x=typeof t=="string"?Oi(t):t;f==="/"||(m=x.pathname)!=null&&m.startsWith(f)||Re(!1),p=x}else p=h;let v=p.pathname||"/",g=f==="/"?v:v.slice(f.length)||"/",O=dx(e,{pathname:g}),E=Wx(O&&O.map(x=>Object.assign({},x,{params:Object.assign({},u,x.params),pathname:Gn([f,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?f:Gn([f,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n);return t&&E?z.createElement(al.Provider,{value:{location:Ia({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Bn.Pop}},E):E}function Fx(){let e=qx(),t=Mx(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)"},a=null;return z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},t),n?z.createElement("pre",{style:s},n):null,a)}const $x=z.createElement(Fx,null);class Zx extends z.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||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?z.createElement(rr.Provider,{value:this.props.routeContext},z.createElement(mg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Hx(e){let{routeContext:t,match:n,children:i}=e,s=z.useContext(Ph);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),z.createElement(rr.Provider,{value:t},i)}function Wx(e,t,n){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var s;if((s=n)!=null&&s.errors)e=n.matches;else return null}let a=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let f=a.findIndex(h=>h.route.id&&(u==null?void 0:u[h.route.id]));f>=0||Re(!1),a=a.slice(0,Math.min(a.length,f+1))}return a.reduceRight((f,h,p)=>{let m=h.route.id?u==null?void 0:u[h.route.id]:null,v=null;n&&(v=h.route.errorElement||$x);let g=t.concat(a.slice(0,p+1)),O=()=>{let E;return m?E=v:h.route.Component?E=z.createElement(h.route.Component,null):h.route.element?E=h.route.element:E=f,z.createElement(Hx,{match:h,routeContext:{outlet:f,matches:g,isDataRoute:n!=null},children:E})};return n&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?z.createElement(Zx,{location:n.location,revalidation:n.revalidation,component:v,error:m,children:O(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):O()},null)}var gg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(gg||{}),za=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}(za||{});function Vx(e){let t=z.useContext(Ph);return t||Re(!1),t}function Kx(e){let t=z.useContext(zx);return t||Re(!1),t}function Gx(e){let t=z.useContext(rr);return t||Re(!1),t}function yg(e){let t=Gx(),n=t.matches[t.matches.length-1];return n.route.id||Re(!1),n.route.id}function qx(){var e;let t=z.useContext(mg),n=Kx(za.UseRouteError),i=yg(za.UseRouteError);return t||((e=n.errors)==null?void 0:e[i])}function Qx(){let{router:e}=Vx(gg.UseNavigateStable),t=yg(za.UseNavigateStable),n=z.useRef(!1);return _g(()=>{n.current=!0}),z.useCallback(function(s,a){a===void 0&&(a={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ia({fromRouteId:t},a)))},[e,t])}function ao(e){Re(!1)}function Yx(e){let{basename:t="/",children:n=null,location:i,navigationType:s=Bn.Pop,navigator:a,static:u=!1}=e;Qo()&&Re(!1);let f=t.replace(/^\/*/,"/"),h=z.useMemo(()=>({basename:f,navigator:a,static:u}),[f,a,u]);typeof i=="string"&&(i=Oi(i));let{pathname:p="/",search:m="",hash:v="",state:g=null,key:O="default"}=i,E=z.useMemo(()=>{let x=Sh(p,f);return x==null?null:{location:{pathname:x,search:m,hash:v,state:g,key:O},navigationType:s}},[f,p,m,v,g,O,s]);return E==null?null:z.createElement(ki.Provider,{value:h},z.createElement(al.Provider,{children:n,value:E}))}function Xx(e){let{children:t,location:n}=e;return Bx(hf(t),n)}new Promise(()=>{});function hf(e,t){t===void 0&&(t=[]);let n=[];return z.Children.forEach(e,(i,s)=>{if(!z.isValidElement(i))return;let a=[...t,s];if(i.type===z.Fragment){n.push.apply(n,hf(i.props.children,a));return}i.type!==ao&&Re(!1),!i.props.index||!i.props.children||Re(!1);let u={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=hf(i.props.children,a)),n.push(u)}),n}/** + */function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;th.pathnameBase)),u=I.useRef(!1);return _g(()=>{u.current=!0}),I.useCallback(function(h,p){if(p===void 0&&(p={}),!u.current)return;if(typeof h=="number"){n.go(h);return}let m=Th(h,JSON.parse(a),s,p.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:qn([t,m.pathname])),(p.replace?n.replace:n.push)(m,p.state,p)},[t,n,a,s,e])}function Bx(){let{matches:e}=I.useContext(En),t=e[e.length-1];return t?t.params:{}}function vg(e,t){let{relative:n}=t===void 0?{}:t,{matches:i}=I.useContext(En),{pathname:s}=Xo(),a=JSON.stringify(Ph(i).map(u=>u.pathnameBase));return I.useMemo(()=>Th(e,JSON.parse(a),s,n==="path"),[e,a,s,n])}function Ux(e,t){return Fx(e,t)}function Fx(e,t,n){ki()||Oe(!1);let{navigator:i}=I.useContext(Ci),{matches:s}=I.useContext(En),a=s[s.length-1],u=a?a.params:{};a&&a.pathname;let f=a?a.pathnameBase:"/";a&&a.route;let h=Xo(),p;if(t){var m;let x=typeof t=="string"?Oi(t):t;f==="/"||(m=x.pathname)!=null&&m.startsWith(f)||Oe(!1),p=x}else p=h;let v=p.pathname||"/",g=f==="/"?v:v.slice(f.length)||"/",O=px(e,{pathname:g}),w=Vx(O&&O.map(x=>Object.assign({},x,{params:Object.assign({},u,x.params),pathname:qn([f,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?f:qn([f,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n);return t&&w?I.createElement(ul.Provider,{value:{location:ba({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Un.Pop}},w):w}function $x(){let e=Qx(),t=Ix(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)"},a=null;return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},t),n?I.createElement("pre",{style:s},n):null,a)}const Zx=I.createElement($x,null);class Hx extends I.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||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?I.createElement(En.Provider,{value:this.props.routeContext},I.createElement(mg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Wx(e){let{routeContext:t,match:n,children:i}=e,s=I.useContext(Lh);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),I.createElement(En.Provider,{value:t},i)}function Vx(e,t,n){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var s;if((s=n)!=null&&s.errors)e=n.matches;else return null}let a=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let f=a.findIndex(h=>h.route.id&&(u==null?void 0:u[h.route.id]));f>=0||Oe(!1),a=a.slice(0,Math.min(a.length,f+1))}return a.reduceRight((f,h,p)=>{let m=h.route.id?u==null?void 0:u[h.route.id]:null,v=null;n&&(v=h.route.errorElement||Zx);let g=t.concat(a.slice(0,p+1)),O=()=>{let w;return m?w=v:h.route.Component?w=I.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=f,I.createElement(Wx,{match:h,routeContext:{outlet:f,matches:g,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?I.createElement(Hx,{location:n.location,revalidation:n.revalidation,component:v,error:m,children:O(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):O()},null)}var gg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(gg||{}),ja=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}(ja||{});function Gx(e){let t=I.useContext(Lh);return t||Oe(!1),t}function Kx(e){let t=I.useContext(bx);return t||Oe(!1),t}function qx(e){let t=I.useContext(En);return t||Oe(!1),t}function yg(e){let t=qx(),n=t.matches[t.matches.length-1];return n.route.id||Oe(!1),n.route.id}function Qx(){var e;let t=I.useContext(mg),n=Kx(ja.UseRouteError),i=yg(ja.UseRouteError);return t||((e=n.errors)==null?void 0:e[i])}function Yx(){let{router:e}=Gx(gg.UseNavigateStable),t=yg(ja.UseNavigateStable),n=I.useRef(!1);return _g(()=>{n.current=!0}),I.useCallback(function(s,a){a===void 0&&(a={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ba({fromRouteId:t},a)))},[e,t])}function Xx(e){let{to:t,replace:n,state:i,relative:s}=e;ki()||Oe(!1);let{matches:a}=I.useContext(En),{pathname:u}=Xo(),f=Ni(),h=Th(t,Ph(a).map(m=>m.pathnameBase),u,s==="path"),p=JSON.stringify(h);return I.useEffect(()=>f(JSON.parse(p),{replace:n,state:i,relative:s}),[f,p,s,n,i]),null}function uo(e){Oe(!1)}function Jx(e){let{basename:t="/",children:n=null,location:i,navigationType:s=Un.Pop,navigator:a,static:u=!1}=e;ki()&&Oe(!1);let f=t.replace(/^\/*/,"/"),h=I.useMemo(()=>({basename:f,navigator:a,static:u}),[f,a,u]);typeof i=="string"&&(i=Oi(i));let{pathname:p="/",search:m="",hash:v="",state:g=null,key:O="default"}=i,w=I.useMemo(()=>{let x=Sh(p,f);return x==null?null:{location:{pathname:x,search:m,hash:v,state:g,key:O},navigationType:s}},[f,p,m,v,g,O,s]);return w==null?null:I.createElement(Ci.Provider,{value:h},I.createElement(ul.Provider,{children:n,value:w}))}function eE(e){let{children:t,location:n}=e;return Ux(hf(t),n)}new Promise(()=>{});function hf(e,t){t===void 0&&(t=[]);let n=[];return I.Children.forEach(e,(i,s)=>{if(!I.isValidElement(i))return;let a=[...t,s];if(i.type===I.Fragment){n.push.apply(n,hf(i.props.children,a));return}i.type!==uo&&Oe(!1),!i.props.index||!i.props.children||Oe(!1);let u={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=hf(i.props.children,a)),n.push(u)}),n}/** * React Router DOM v6.16.0 * * Copyright (c) Remix Software Inc. @@ -64,34 +64,34 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function df(){return df=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function eE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tE(e,t){return e.button===0&&(!t||t==="_self")&&!eE(e)}const nE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],rE="startTransition",am=ew[rE];function iE(e){let{basename:t,children:n,future:i,window:s}=e,a=z.useRef();a.current==null&&(a.current=cx({window:s,v5Compat:!0}));let u=a.current,[f,h]=z.useState({action:u.action,location:u.location}),{v7_startTransition:p}=i||{},m=z.useCallback(v=>{p&&am?am(()=>h(v)):h(v)},[h,p]);return z.useLayoutEffect(()=>u.listen(m),[u,m]),z.createElement(Yx,{basename:t,children:n,location:f.location,navigationType:f.action,navigator:u})}const oE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yt=z.forwardRef(function(t,n){let{onClick:i,relative:s,reloadDocument:a,replace:u,state:f,target:h,to:p,preventScrollReset:m}=t,v=Jx(t,nE),{basename:g}=z.useContext(ki),O,E=!1;if(typeof p=="string"&&sE.test(p)&&(O=p,oE))try{let y=new URL(window.location.href),T=p.startsWith("//")?new URL(y.protocol+p):new URL(p),R=Sh(T.pathname,g);T.origin===y.origin&&R!=null?p=R+T.search+T.hash:E=!0}catch{}let x=jx(p,{relative:s}),N=aE(p,{replace:u,state:f,target:h,preventScrollReset:m,relative:s});function S(y){i&&i(y),y.defaultPrevented||N(y)}return z.createElement("a",df({},v,{href:O||x,onClick:E||a?i:S,ref:n,target:h}))});var lm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(lm||(lm={}));var um;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(um||(um={}));function aE(e,t){let{target:n,replace:i,state:s,preventScrollReset:a,relative:u}=t===void 0?{}:t,f=Yo(),h=ll(),p=vg(e,{relative:u});return z.useCallback(m=>{if(tE(m,n)){m.preventDefault();let v=i!==void 0?i:Ma(h)===Ma(p);f(e,{replace:v,state:s,preventScrollReset:a,relative:u})}},[h,f,p,i,s,n,e,a,u])}var wg={exports:{}},lE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",uE=lE,cE=uE;function xg(){}function Eg(){}Eg.resetWarningCache=xg;var fE=function(){function e(i,s,a,u,f,h){if(h!==cE){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Eg,resetWarningCache:xg};return n.PropTypes=n,n};wg.exports=fE();var hE=wg.exports;const X=Tr(hE);var dE=typeof Element<"u",pE=typeof Map=="function",mE=typeof Set=="function",_E=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ta(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,i,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!ta(e[i],t[i]))return!1;return!0}var a;if(pE&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(i=a.next()).done;)if(!t.has(i.value[0]))return!1;for(a=e.entries();!(i=a.next()).done;)if(!ta(i.value[1],t.get(i.value[0])))return!1;return!0}if(mE&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(i=a.next()).done;)if(!t.has(i.value[0]))return!1;return!0}if(_E&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[i]))return!1;if(dE&&e instanceof Element)return!1;for(i=n;i--!==0;)if(!((s[i]==="_owner"||s[i]==="__v"||s[i]==="__o")&&e.$$typeof)&&!ta(e[s[i]],t[s[i]]))return!1;return!0}return e!==e&&t!==t}var vE=function(t,n){try{return ta(t,n)}catch(i){if((i.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw i}};const gE=Tr(vE);var yE=function(e,t,n,i,s,a,u,f){if(!e){var h;if(t===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,i,s,a,u,f],m=0;h=new Error(t.replace(/%s/g,function(){return p[m++]})),h.name="Invariant Violation"}throw h.framesToPop=1,h}},wE=yE;const cm=Tr(wE);var xE=function(t,n,i,s){var a=i?i.call(s,t,n):void 0;if(a!==void 0)return!!a;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var u=Object.keys(t),f=Object.keys(n);if(u.length!==f.length)return!1;for(var h=Object.prototype.hasOwnProperty.bind(n),p=0;p=0||(s[n]=e[n]);return s}var V={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},SE={rel:["amphtml","canonical","alternate"]},PE={type:["application/ld+json"]},TE={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},hm=Object.keys(V).map(function(e){return V[e]}),ja={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},LE=Object.keys(ja).reduce(function(e,t){return e[ja[t]]=t,e},{}),ci=function(e,t){for(var n=e.length-1;n>=0;n-=1){var i=e[n];if(Object.prototype.hasOwnProperty.call(i,t))return i[t]}return null},OE=function(e){var t=ci(e,V.TITLE),n=ci(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var i=ci(e,"defaultTitle");return t||i||void 0},kE=function(e){return ci(e,"onChangeClientState")||function(){}},tc=function(e,t){return t.filter(function(n){return n[e]!==void 0}).map(function(n){return n[e]}).reduce(function(n,i){return Te({},n,i)},{})},CE=function(e,t){return t.filter(function(n){return n[V.BASE]!==void 0}).map(function(n){return n[V.BASE]}).reverse().reduce(function(n,i){if(!n.length)for(var s=Object.keys(i),a=0;a/g,">").replace(/"/g,""").replace(/'/g,"'")},pm=function(e){return Object.keys(e).reduce(function(t,n){var i=e[n]!==void 0?n+'="'+e[n]+'"':""+n;return t?t+" "+i:i},"")},mm=function(e,t){return t===void 0&&(t={}),Object.keys(e).reduce(function(n,i){return n[ja[i]||i]=e[i],n},t)},na=function(e,t){return t.map(function(n,i){var s,a=((s={key:i})["data-rh"]=!0,s);return Object.keys(n).forEach(function(u){var f=ja[u]||u;f==="innerHTML"||f==="cssText"?a.dangerouslySetInnerHTML={__html:n.innerHTML||n.cssText}:a[f]=n[u]}),Et.createElement(e,a)})},yt=function(e,t,n){switch(e){case V.TITLE:return{toComponent:function(){return s=t.titleAttributes,(a={key:i=t.title})["data-rh"]=!0,u=mm(s,a),[Et.createElement(V.TITLE,u,i)];var i,s,a,u},toString:function(){return function(i,s,a,u){var f=pm(a),h=Sg(s);return f?"<"+i+' data-rh="true" '+f+">"+rc(h,u)+"":"<"+i+' data-rh="true">'+rc(h,u)+""}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return mm(t)},toString:function(){return pm(t)}};default:return{toComponent:function(){return na(e,t)},toString:function(){return function(i,s,a){return s.reduce(function(u,f){var h=Object.keys(f).filter(function(v){return!(v==="innerHTML"||v==="cssText")}).reduce(function(v,g){var O=f[g]===void 0?g:g+'="'+rc(f[g],a)+'"';return v?v+" "+O:O},""),p=f.innerHTML||f.cssText||"",m=RE.indexOf(i)===-1;return u+"<"+i+' data-rh="true" '+h+(m?"/>":">"+p+"")},"")}(e,t,n)}}}},mf=function(e){var t=e.baseTag,n=e.bodyAttributes,i=e.encode,s=e.htmlAttributes,a=e.noscriptTags,u=e.styleTags,f=e.title,h=f===void 0?"":f,p=e.titleAttributes,m=e.linkTags,v=e.metaTags,g=e.scriptTags,O={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var E=function(x){var N=x.linkTags,S=x.scriptTags,y=x.encode,T=nc(x.metaTags,TE),R=nc(N,SE),b=nc(S,PE);return{priorityMethods:{toComponent:function(){return[].concat(na(V.META,T.priority),na(V.LINK,R.priority),na(V.SCRIPT,b.priority))},toString:function(){return yt(V.META,T.priority,y)+" "+yt(V.LINK,R.priority,y)+" "+yt(V.SCRIPT,b.priority,y)}},metaTags:T.default,linkTags:R.default,scriptTags:b.default}}(e);O=E.priorityMethods,m=E.linkTags,v=E.metaTags,g=E.scriptTags}return{priority:O,base:yt(V.BASE,t,i),bodyAttributes:yt("bodyAttributes",n,i),htmlAttributes:yt("htmlAttributes",s,i),link:yt(V.LINK,m,i),meta:yt(V.META,v,i),noscript:yt(V.NOSCRIPT,a,i),script:yt(V.SCRIPT,g,i),style:yt(V.STYLE,u,i),title:yt(V.TITLE,{title:h,titleAttributes:p},i)}},$s=[],_f=function(e,t){var n=this;t===void 0&&(t=typeof document<"u"),this.instances=[],this.value={setHelmet:function(i){n.context.helmet=i},helmetInstances:{get:function(){return n.canUseDOM?$s:n.instances},add:function(i){(n.canUseDOM?$s:n.instances).push(i)},remove:function(i){var s=(n.canUseDOM?$s:n.instances).indexOf(i);(n.canUseDOM?$s:n.instances).splice(s,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=mf({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},Pg=Et.createContext({}),AE=X.shape({setHelmet:X.func,helmetInstances:X.shape({get:X.func,add:X.func,remove:X.func})}),ME=typeof document<"u",ri=function(e){function t(n){var i;return(i=e.call(this,n)||this).helmetData=new _f(i.props.context,t.canUseDOM),i}return Th(t,e),t.prototype.render=function(){return Et.createElement(Pg.Provider,{value:this.helmetData.value},this.props.children)},t}(z.Component);ri.canUseDOM=ME,ri.propTypes={context:X.shape({helmet:X.shape()}),children:X.node.isRequired},ri.defaultProps={context:{}},ri.displayName="HelmetProvider";var Hr=function(e,t){var n,i=document.head||document.querySelector(V.HEAD),s=i.querySelectorAll(e+"[data-rh]"),a=[].slice.call(s),u=[];return t&&t.length&&t.forEach(function(f){var h=document.createElement(e);for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(p==="innerHTML"?h.innerHTML=f.innerHTML:p==="cssText"?h.styleSheet?h.styleSheet.cssText=f.cssText:h.appendChild(document.createTextNode(f.cssText)):h.setAttribute(p,f[p]===void 0?"":f[p]));h.setAttribute("data-rh","true"),a.some(function(m,v){return n=v,h.isEqualNode(m)})?a.splice(n,1):u.push(h)}),a.forEach(function(f){return f.parentNode.removeChild(f)}),u.forEach(function(f){return i.appendChild(f)}),{oldTags:a,newTags:u}},ic=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var i=n.getAttribute("data-rh"),s=i?i.split(","):[],a=[].concat(s),u=Object.keys(t),f=0;f=0;v-=1)n.removeAttribute(a[v]);s.length===a.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==u.join(",")&&n.setAttribute("data-rh",u.join(","))}},_m=function(e,t){var n=e.baseTag,i=e.htmlAttributes,s=e.linkTags,a=e.metaTags,u=e.noscriptTags,f=e.onChangeClientState,h=e.scriptTags,p=e.styleTags,m=e.title,v=e.titleAttributes;ic(V.BODY,e.bodyAttributes),ic(V.HTML,i),function(x,N){x!==void 0&&document.title!==x&&(document.title=Sg(x)),ic(V.TITLE,N)}(m,v);var g={baseTag:Hr(V.BASE,n),linkTags:Hr(V.LINK,s),metaTags:Hr(V.META,a),noscriptTags:Hr(V.NOSCRIPT,u),scriptTags:Hr(V.SCRIPT,h),styleTags:Hr(V.STYLE,p)},O={},E={};Object.keys(g).forEach(function(x){var N=g[x],S=N.newTags,y=N.oldTags;S.length&&(O[x]=S),y.length&&(E[x]=g[x].oldTags)}),t&&t(),f(e,O,E)},to=null,ba=function(e){function t(){for(var i,s=arguments.length,a=new Array(s),u=0;u elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(i){var s,a=i.child,u=i.arrayTypeChildren;return Te({},u,((s={})[a.type]=[].concat(u[a.type]||[],[Te({},i.newChildProps,this.mapNestedChildrenToProps(a,i.nestedChildren))]),s))},n.mapObjectTypeChildren=function(i){var s,a,u=i.child,f=i.newProps,h=i.newChildProps,p=i.nestedChildren;switch(u.type){case V.TITLE:return Te({},f,((s={})[u.type]=p,s.titleAttributes=Te({},h),s));case V.BODY:return Te({},f,{bodyAttributes:Te({},h)});case V.HTML:return Te({},f,{htmlAttributes:Te({},h)});default:return Te({},f,((a={})[u.type]=Te({},h),a))}},n.mapArrayTypeChildrenToProps=function(i,s){var a=Te({},s);return Object.keys(i).forEach(function(u){var f;a=Te({},a,((f={})[u]=i[u],f))}),a},n.warnOnInvalidChildren=function(i,s){return cm(hm.some(function(a){return i.type===a}),typeof i.type=="function"?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+hm.join(", ")+" are allowed. Helmet does not support rendering <"+i.type+"> elements. Refer to our API for more information."),cm(!s||typeof s=="string"||Array.isArray(s)&&!s.some(function(a){return typeof a!="string"}),"Helmet expects a string as a child of <"+i.type+">. Did you forget to wrap your children in braces? ( <"+i.type+">{``} ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(i,s){var a=this,u={};return Et.Children.forEach(i,function(f){if(f&&f.props){var h=f.props,p=h.children,m=fm(h,IE),v=Object.keys(m).reduce(function(O,E){return O[LE[E]||E]=m[E],O},{}),g=f.type;switch(typeof g=="symbol"?g=g.toString():a.warnOnInvalidChildren(f,p),g){case V.FRAGMENT:s=a.mapChildrenToProps(p,s);break;case V.LINK:case V.META:case V.NOSCRIPT:case V.SCRIPT:case V.STYLE:u=a.flattenArrayTypeChildren({child:f,arrayTypeChildren:u,newChildProps:v,nestedChildren:p});break;default:s=a.mapObjectTypeChildren({child:f,newProps:s,newChildProps:v,nestedChildren:p})}}}),this.mapArrayTypeChildrenToProps(u,s)},n.render=function(){var i=this.props,s=i.children,a=fm(i,zE),u=Te({},a),f=a.helmetData;return s&&(u=this.mapChildrenToProps(s,u)),!f||f instanceof _f||(f=new _f(f.context,f.instances)),f?Et.createElement(ba,Te({},u,{context:f.value,helmetData:void 0})):Et.createElement(Pg.Consumer,null,function(h){return Et.createElement(ba,Te({},u,{context:h}))})},t}(z.Component);ra.propTypes={base:X.object,bodyAttributes:X.object,children:X.oneOfType([X.arrayOf(X.node),X.node]),defaultTitle:X.string,defer:X.bool,encodeSpecialCharacters:X.bool,htmlAttributes:X.object,link:X.arrayOf(X.object),meta:X.arrayOf(X.object),noscript:X.arrayOf(X.object),onChangeClientState:X.func,script:X.arrayOf(X.object),style:X.arrayOf(X.object),title:X.string,titleAttributes:X.object,titleTemplate:X.string,prioritizeSeoTags:X.bool,helmetData:X.object},ra.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},ra.displayName="Helmet";var Xt=(e=>(e.Login="/login",e.Favorites="/favorites",e.Main="/",e.Offer="/offer/:id",e))(Xt||{}),ul=(e=>(e.citiesList="cities__card",e.neardPlace="near-places__card",e.favoritePlace="favorites__card",e))(ul||{}),dn=(e=>(e.popular="popular",e.lowToHigh="lowToHigh",e.highToLow="highToLow",e.topRated="topRated",e))(dn||{});function jt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i3?t.i-4:t.i:Array.isArray(e)?1:Lh(e)?2:Oh(e)?3:0}function fi(e,t){return Ci(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function jE(e,t){return Ci(e)===2?e.get(t):e[t]}function Tg(e,t,n){var i=Ci(e);i===2?e.set(t,n):i===3?e.add(n):e[t]=n}function Lg(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Lh(e){return $E&&e instanceof Map}function Oh(e){return ZE&&e instanceof Set}function hr(e){return e.o||e.t}function kh(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=kg(e);delete t[_e];for(var n=hi(t),i=0;i1&&(e.set=e.add=e.clear=e.delete=bE),Object.freeze(e),t&&Pr(e,function(n,i){return Ch(i,!0)},!0)),e}function bE(){jt(2)}function Nh(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Jt(e){var t=wf[e];return t||jt(18,e),t}function DE(e,t){wf[e]||(wf[e]=t)}function vf(){return Uo}function oc(e,t){t&&(Jt("Patches"),e.u=[],e.s=[],e.v=t)}function Da(e){gf(e),e.p.forEach(BE),e.p=null}function gf(e){e===Uo&&(Uo=e.l)}function vm(e){return Uo={p:[],l:Uo,h:e,m:!0,_:0}}function BE(e){var t=e[_e];t.i===0||t.i===1?t.j():t.g=!0}function sc(e,t){t._=t.p.length;var n=t.p[0],i=e!==void 0&&e!==n;return t.h.O||Jt("ES5").S(t,e,i),i?(n[_e].P&&(Da(t),jt(4)),wn(e)&&(e=Ba(t,e),t.l||Ua(t,e)),t.u&&Jt("Patches").M(n[_e].t,e,t.u,t.s)):e=Ba(t,n,[]),Da(t),t.u&&t.v(t.u,t.s),e!==Og?e:void 0}function Ba(e,t,n){if(Nh(t))return t;var i=t[_e];if(!i)return Pr(t,function(f,h){return gm(e,i,t,f,h,n)},!0),t;if(i.A!==e)return t;if(!i.P)return Ua(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var s=i.i===4||i.i===5?i.o=kh(i.k):i.o,a=s,u=!1;i.i===3&&(a=new Set(s),s.clear(),u=!0),Pr(a,function(f,h){return gm(e,i,s,f,h,n,u)}),Ua(e,s,!1),n&&e.u&&Jt("Patches").N(i,n,e.u,e.s)}return i.o}function gm(e,t,n,i,s,a,u){if(Xn(s)){var f=Ba(e,s,a&&t&&t.i!==3&&!fi(t.R,i)?a.concat(i):void 0);if(Tg(n,i,f),!Xn(f))return;e.m=!1}else u&&n.add(s);if(wn(s)&&!Nh(s)){if(!e.h.D&&e._<1)return;Ba(e,s),t&&t.A.l||Ua(e,s)}}function Ua(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Ch(t,n)}function ac(e,t){var n=e[_e];return(n?hr(n):e)[t]}function ym(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var i=Object.getOwnPropertyDescriptor(n,t);if(i)return i;n=Object.getPrototypeOf(n)}}function jn(e){e.P||(e.P=!0,e.l&&jn(e.l))}function lc(e){e.o||(e.o=kh(e.t))}function yf(e,t,n){var i=Lh(t)?Jt("MapSet").F(t,n):Oh(t)?Jt("MapSet").T(t,n):e.O?function(s,a){var u=Array.isArray(s),f={i:u?1:0,A:a?a.A:vf(),P:!1,I:!1,R:{},l:a,t:s,k:null,o:null,j:null,C:!1},h=f,p=Fo;u&&(h=[f],p=lo);var m=Proxy.revocable(h,p),v=m.revoke,g=m.proxy;return f.k=g,f.j=v,g}(t,n):Jt("ES5").J(t,n);return(n?n.A:vf()).p.push(i),i}function UE(e){return Xn(e)||jt(22,e),function t(n){if(!wn(n))return n;var i,s=n[_e],a=Ci(n);if(s){if(!s.P&&(s.i<4||!Jt("ES5").K(s)))return s.t;s.I=!0,i=wm(n,a),s.I=!1}else i=wm(n,a);return Pr(i,function(u,f){s&&jE(s.t,u)===f||Tg(i,u,t(f))}),a===3?new Set(i):i}(e)}function wm(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return kh(e)}function FE(){function e(a,u){var f=s[a];return f?f.enumerable=u:s[a]=f={configurable:!0,enumerable:u,get:function(){var h=this[_e];return Fo.get(h,a)},set:function(h){var p=this[_e];Fo.set(p,a,h)}},f}function t(a){for(var u=a.length-1;u>=0;u--){var f=a[u][_e];if(!f.P)switch(f.i){case 5:i(f)&&jn(f);break;case 4:n(f)&&jn(f)}}}function n(a){for(var u=a.t,f=a.k,h=hi(f),p=h.length-1;p>=0;p--){var m=h[p];if(m!==_e){var v=u[m];if(v===void 0&&!fi(u,m))return!0;var g=f[m],O=g&&g[_e];if(O?O.t!==v:!Lg(g,v))return!0}}var E=!!u[_e];return h.length!==hi(u).length+(E?0:1)}function i(a){var u=a.k;if(u.length!==a.t.length)return!0;var f=Object.getOwnPropertyDescriptor(u,u.length-1);if(f&&!f.get)return!0;for(var h=0;h1?S-1:0),T=1;T1?m-1:0),g=1;g=0;s--){var a=i[s];if(a.path.length===0&&a.op==="replace"){n=a.value;break}}s>-1&&(i=i.slice(s+1));var u=Jt("Patches").$;return Xn(n)?u(n,i):this.produce(n,function(f){return u(f,i)})},e}(),ft=new WE,VE=ft.produce;ft.produceWithPatches.bind(ft);ft.setAutoFreeze.bind(ft);ft.setUseProxies.bind(ft);ft.applyPatches.bind(ft);ft.createDraft.bind(ft);ft.finishDraft.bind(ft);const Cg=VE;function $o(e){"@babel/helpers - typeof";return $o=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},$o(e)}function KE(e,t){if($o(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if($o(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GE(e){var t=KE(e,"string");return $o(t)==="symbol"?t:String(t)}function qE(e,t,n){return t=GE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Tm(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ke(1));return n(Ng)(e,t)}if(typeof e!="function")throw new Error(Ke(2));var s=e,a=t,u=[],f=u,h=!1;function p(){f===u&&(f=u.slice())}function m(){if(h)throw new Error(Ke(3));return a}function v(x){if(typeof x!="function")throw new Error(Ke(4));if(h)throw new Error(Ke(5));var N=!0;return p(),f.push(x),function(){if(N){if(h)throw new Error(Ke(6));N=!1,p();var y=f.indexOf(x);f.splice(y,1),u=null}}}function g(x){if(!QE(x))throw new Error(Ke(7));if(typeof x.type>"u")throw new Error(Ke(8));if(h)throw new Error(Ke(9));try{h=!0,a=s(a,x)}finally{h=!1}for(var N=u=f,S=0;S"u")throw new Error(Ke(12));if(typeof n(void 0,{type:Fa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ke(13))})}function Rg(e){for(var t=Object.keys(e),n={},i=0;i"u")throw p&&p.type,new Error(Ke(14));v[O]=N,m=m||N!==x}return m=m||a.length!==Object.keys(h).length,m?v:h}}function $a(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var p=n[h];return h>0&&(n.splice(h,1),n.unshift(p)),p.value}return Za}function s(f,h){i(f)===Za&&(n.unshift({key:f,value:h}),n.length>e&&n.pop())}function a(){return n}function u(){n=[]}return{get:i,put:s,getEntries:a,clear:u}}var tS=function(t,n){return t===n};function nS(e){return function(n,i){if(n===null||i===null||n.length!==i.length)return!1;for(var s=n.length,a=0;a1?t-1:0),i=1;i0&&a[a.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1](e.Offers="/offers",e.Login="/login",e.Logout="/logout",e.Comments="/comments",e))(Sn||{}),Fe=(e=>(e.Auth="AUTH",e.NoAuth="NO_AUTH",e.Unknown="UNKNOWN",e))(Fe||{});function bg(e,t){return function(){return e.apply(t,arguments)}}const{toString:NS}=Object.prototype,{getPrototypeOf:Ih}=Object,fl=(e=>t=>{const n=NS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),en=e=>(e=e.toLowerCase(),t=>fl(t)===e),hl=e=>t=>typeof t===e,{isArray:Ni}=Array,Zo=hl("undefined");function RS(e){return e!==null&&!Zo(e)&&e.constructor!==null&&!Zo(e.constructor)&&Tt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dg=en("ArrayBuffer");function AS(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dg(e.buffer),t}const MS=hl("string"),Tt=hl("function"),Bg=hl("number"),dl=e=>e!==null&&typeof e=="object",IS=e=>e===!0||e===!1,ia=e=>{if(fl(e)!=="object")return!1;const t=Ih(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},zS=en("Date"),jS=en("File"),bS=en("Blob"),DS=en("FileList"),BS=e=>dl(e)&&Tt(e.pipe),US=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tt(e.append)&&((t=fl(e))==="formdata"||t==="object"&&Tt(e.toString)&&e.toString()==="[object FormData]"))},FS=en("URLSearchParams"),$S=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),Ni(e))for(i=0,s=e.length;i0;)if(s=n[i],t===s.toLowerCase())return s;return null}const Fg=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),$g=e=>!Zo(e)&&e!==Fg;function Ef(){const{caseless:e}=$g(this)&&this||{},t={},n=(i,s)=>{const a=e&&Ug(t,s)||s;ia(t[a])&&ia(i)?t[a]=Ef(t[a],i):ia(i)?t[a]=Ef({},i):Ni(i)?t[a]=i.slice():t[a]=i};for(let i=0,s=arguments.length;i(Xo(t,(s,a)=>{n&&Tt(s)?e[a]=bg(s,n):e[a]=s},{allOwnKeys:i}),e),HS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),WS=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},VS=(e,t,n,i)=>{let s,a,u;const f={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!i||i(u,e,t))&&!f[u]&&(t[u]=e[u],f[u]=!0);e=n!==!1&&Ih(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},KS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},GS=e=>{if(!e)return null;if(Ni(e))return e;let t=e.length;if(!Bg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},qS=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ih(Uint8Array)),QS=(e,t)=>{const i=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=i.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},YS=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},XS=en("HTMLFormElement"),JS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),Am=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),eP=en("RegExp"),Zg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Xo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(i[a]=u||s)}),Object.defineProperties(e,i)},tP=e=>{Zg(e,(t,n)=>{if(Tt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(Tt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nP=(e,t)=>{const n={},i=s=>{s.forEach(a=>{n[a]=!0})};return Ni(e)?i(e):i(String(e).split(t)),n},rP=()=>{},iP=(e,t)=>(e=+e,Number.isFinite(e)?e:t),hc="abcdefghijklmnopqrstuvwxyz",Mm="0123456789",Hg={DIGIT:Mm,ALPHA:hc,ALPHA_DIGIT:hc+hc.toUpperCase()+Mm},oP=(e=16,t=Hg.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function sP(e){return!!(e&&Tt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const aP=e=>{const t=new Array(10),n=(i,s)=>{if(dl(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const a=Ni(i)?[]:{};return Xo(i,(u,f)=>{const h=n(u,s+1);!Zo(h)&&(a[f]=h)}),t[s]=void 0,a}}return i};return n(e,0)},lP=en("AsyncFunction"),uP=e=>e&&(dl(e)||Tt(e))&&Tt(e.then)&&Tt(e.catch),A={isArray:Ni,isArrayBuffer:Dg,isBuffer:RS,isFormData:US,isArrayBufferView:AS,isString:MS,isNumber:Bg,isBoolean:IS,isObject:dl,isPlainObject:ia,isUndefined:Zo,isDate:zS,isFile:jS,isBlob:bS,isRegExp:eP,isFunction:Tt,isStream:BS,isURLSearchParams:FS,isTypedArray:qS,isFileList:DS,forEach:Xo,merge:Ef,extend:ZS,trim:$S,stripBOM:HS,inherits:WS,toFlatObject:VS,kindOf:fl,kindOfTest:en,endsWith:KS,toArray:GS,forEachEntry:QS,matchAll:YS,isHTMLForm:XS,hasOwnProperty:Am,hasOwnProp:Am,reduceDescriptors:Zg,freezeMethods:tP,toObjectSet:nP,toCamelCase:JS,noop:rP,toFiniteNumber:iP,findKey:Ug,global:Fg,isContextDefined:$g,ALPHABET:Hg,generateString:oP,isSpecCompliantForm:sP,toJSONObject:aP,isAsyncFn:lP,isThenable:uP};function ee(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s)}A.inherits(ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:A.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Wg=ee.prototype,Vg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Vg[e]={value:e}});Object.defineProperties(ee,Vg);Object.defineProperty(Wg,"isAxiosError",{value:!0});ee.from=(e,t,n,i,s,a)=>{const u=Object.create(Wg);return A.toFlatObject(e,u,function(h){return h!==Error.prototype},f=>f!=="isAxiosError"),ee.call(u,e.message,t,n,i,s),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};const cP=null;function Sf(e){return A.isPlainObject(e)||A.isArray(e)}function Kg(e){return A.endsWith(e,"[]")?e.slice(0,-2):e}function Im(e,t,n){return e?e.concat(t).map(function(s,a){return s=Kg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function fP(e){return A.isArray(e)&&!e.some(Sf)}const hP=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function pl(e,t,n){if(!A.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=A.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,N){return!A.isUndefined(N[x])});const i=n.metaTokens,s=n.visitor||m,a=n.dots,u=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(t);if(!A.isFunction(s))throw new TypeError("visitor must be a function");function p(E){if(E===null)return"";if(A.isDate(E))return E.toISOString();if(!h&&A.isBlob(E))throw new ee("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(E)||A.isTypedArray(E)?h&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function m(E,x,N){let S=E;if(E&&!N&&typeof E=="object"){if(A.endsWith(x,"{}"))x=i?x:x.slice(0,-2),E=JSON.stringify(E);else if(A.isArray(E)&&fP(E)||(A.isFileList(E)||A.endsWith(x,"[]"))&&(S=A.toArray(E)))return x=Kg(x),S.forEach(function(T,R){!(A.isUndefined(T)||T===null)&&t.append(u===!0?Im([x],R,a):u===null?x:x+"[]",p(T))}),!1}return Sf(E)?!0:(t.append(Im(N,x,a),p(E)),!1)}const v=[],g=Object.assign(hP,{defaultVisitor:m,convertValue:p,isVisitable:Sf});function O(E,x){if(!A.isUndefined(E)){if(v.indexOf(E)!==-1)throw Error("Circular reference detected in "+x.join("."));v.push(E),A.forEach(E,function(S,y){(!(A.isUndefined(S)||S===null)&&s.call(t,S,A.isString(y)?y.trim():y,x,g))===!0&&O(S,x?x.concat(y):[y])}),v.pop()}}if(!A.isObject(e))throw new TypeError("data must be an object");return O(e),t}function zm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function zh(e,t){this._pairs=[],e&&pl(e,this,t)}const Gg=zh.prototype;Gg.append=function(t,n){this._pairs.push([t,n])};Gg.toString=function(t){const n=t?function(i){return t.call(this,i,zm)}:zm;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function dP(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qg(e,t,n){if(!t)return e;const i=n&&n.encode||dP,s=n&&n.serialize;let a;if(s?a=s(t,n):a=A.isURLSearchParams(t)?t.toString():new zh(t,n).toString(i),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class pP{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(i){i!==null&&t(i)})}}const jm=pP,Qg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},mP=typeof URLSearchParams<"u"?URLSearchParams:zh,_P=typeof FormData<"u"?FormData:null,vP=typeof Blob<"u"?Blob:null,gP=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),yP=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Gt={isBrowser:!0,classes:{URLSearchParams:mP,FormData:_P,Blob:vP},isStandardBrowserEnv:gP,isStandardBrowserWebWorkerEnv:yP,protocols:["http","https","file","blob","url","data"]};function wP(e,t){return pl(e,new Gt.classes.URLSearchParams,Object.assign({visitor:function(n,i,s,a){return Gt.isNode&&A.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function xP(e){return A.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function EP(e){const t={},n=Object.keys(e);let i;const s=n.length;let a;for(i=0;i=n.length;return u=!u&&A.isArray(s)?s.length:u,h?(A.hasOwnProp(s,u)?s[u]=[s[u],i]:s[u]=i,!f):((!s[u]||!A.isObject(s[u]))&&(s[u]=[]),t(n,i,s[u],a)&&A.isArray(s[u])&&(s[u]=EP(s[u])),!f)}if(A.isFormData(e)&&A.isFunction(e.entries)){const n={};return A.forEachEntry(e,(i,s)=>{t(xP(i),s,n,0)}),n}return null}function SP(e,t,n){if(A.isString(e))try{return(t||JSON.parse)(e),A.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const jh={transitional:Qg,adapter:["xhr","http"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,a=A.isObject(t);if(a&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return s&&s?JSON.stringify(Yg(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return wP(t,this.formSerializer).toString();if((f=A.isFileList(t))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return pl(f?{"files[]":t}:t,h&&new h,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),SP(t)):t}],transformResponse:[function(t){const n=this.transitional||jh.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&A.isString(t)&&(i&&!this.responseType||s)){const u=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(f){if(u)throw f.name==="SyntaxError"?ee.from(f,ee.ERR_BAD_RESPONSE,this,null,this.response):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gt.classes.FormData,Blob:Gt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],e=>{jh.headers[e]={}});const bh=jh,PP=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),TP=e=>{const t={};let n,i,s;return e&&e.split(` -`).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),i=u.substring(s+1).trim(),!(!n||t[n]&&PP[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},bm=Symbol("internals");function no(e){return e&&String(e).trim().toLowerCase()}function oa(e){return e===!1||e==null?e:A.isArray(e)?e.map(oa):String(e)}function LP(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const OP=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function dc(e,t,n,i,s){if(A.isFunction(i))return i.call(this,t,n);if(s&&(t=n),!!A.isString(t)){if(A.isString(i))return t.indexOf(i)!==-1;if(A.isRegExp(i))return i.test(t)}}function kP(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function CP(e,t){const n=A.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(s,a,u){return this[i].call(this,t,s,a,u)},configurable:!0})})}class ml{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function a(f,h,p){const m=no(h);if(!m)throw new Error("header name must be a non-empty string");const v=A.findKey(s,m);(!v||s[v]===void 0||p===!0||p===void 0&&s[v]!==!1)&&(s[v||h]=oa(f))}const u=(f,h)=>A.forEach(f,(p,m)=>a(p,m,h));return A.isPlainObject(t)||t instanceof this.constructor?u(t,n):A.isString(t)&&(t=t.trim())&&!OP(t)?u(TP(t),n):t!=null&&a(n,t,i),this}get(t,n){if(t=no(t),t){const i=A.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return LP(s);if(A.isFunction(n))return n.call(this,s,i);if(A.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=no(t),t){const i=A.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||dc(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function a(u){if(u=no(u),u){const f=A.findKey(i,u);f&&(!n||dc(i,i[f],f,n))&&(delete i[f],s=!0)}}return A.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let i=n.length,s=!1;for(;i--;){const a=n[i];(!t||dc(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,i={};return A.forEach(this,(s,a)=>{const u=A.findKey(i,a);if(u){n[u]=oa(s),delete n[a];return}const f=t?kP(a):String(a).trim();f!==a&&delete n[a],n[f]=oa(s),i[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return A.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=t&&A.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[bm]=this[bm]={accessors:{}}).accessors,s=this.prototype;function a(u){const f=no(u);i[f]||(CP(s,u),i[f]=!0)}return A.isArray(t)?t.forEach(a):a(t),this}}ml.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(ml.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});A.freezeMethods(ml);const mn=ml;function pc(e,t){const n=this||bh,i=t||n,s=mn.from(i.headers);let a=i.data;return A.forEach(e,function(f){a=f.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Xg(e){return!!(e&&e.__CANCEL__)}function Jo(e,t,n){ee.call(this,e??"canceled",ee.ERR_CANCELED,t,n),this.name="CanceledError"}A.inherits(Jo,ee,{__CANCEL__:!0});function NP(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new ee("Request failed with status code "+n.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const RP=Gt.isStandardBrowserEnv?function(){return{write:function(n,i,s,a,u,f){const h=[];h.push(n+"="+encodeURIComponent(i)),A.isNumber(s)&&h.push("expires="+new Date(s).toGMTString()),A.isString(a)&&h.push("path="+a),A.isString(u)&&h.push("domain="+u),f===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(n){const i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function AP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function MP(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Jg(e,t){return e&&!AP(t)?MP(e,t):t}const IP=Gt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let i;function s(a){let u=a;return t&&(n.setAttribute("href",u),u=n.href),n.setAttribute("href",u),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=s(window.location.href),function(u){const f=A.isString(u)?s(u):u;return f.protocol===i.protocol&&f.host===i.host}}():function(){return function(){return!0}}();function zP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function jP(e,t){e=e||10;const n=new Array(e),i=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(h){const p=Date.now(),m=i[a];u||(u=p),n[s]=h,i[s]=p;let v=a,g=0;for(;v!==s;)g+=n[v++],v=v%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),p-u{const a=s.loaded,u=s.lengthComputable?s.total:void 0,f=a-n,h=i(f),p=a<=u;n=a;const m={loaded:a,total:u,progress:u?a/u:void 0,bytes:f,rate:h||void 0,estimated:h&&u&&p?(u-a)/h:void 0,event:s};m[t?"download":"upload"]=!0,e(m)}}const bP=typeof XMLHttpRequest<"u",DP=bP&&function(e){return new Promise(function(n,i){let s=e.data;const a=mn.from(e.headers).normalize(),u=e.responseType;let f;function h(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}let p;A.isFormData(s)&&(Gt.isStandardBrowserEnv||Gt.isStandardBrowserWebWorkerEnv?a.setContentType(!1):a.getContentType(/^\s*multipart\/form-data/)?A.isString(p=a.getContentType())&&a.setContentType(p.replace(/^\s*(multipart\/form-data);+/,"$1")):a.setContentType("multipart/form-data"));let m=new XMLHttpRequest;if(e.auth){const E=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(E+":"+x))}const v=Jg(e.baseURL,e.url);m.open(e.method.toUpperCase(),qg(v,e.params,e.paramsSerializer),!0),m.timeout=e.timeout;function g(){if(!m)return;const E=mn.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),N={data:!u||u==="text"||u==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:E,config:e,request:m};NP(function(y){n(y),h()},function(y){i(y),h()},N),m=null}if("onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(i(new ee("Request aborted",ee.ECONNABORTED,e,m)),m=null)},m.onerror=function(){i(new ee("Network Error",ee.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let x=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const N=e.transitional||Qg;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),i(new ee(x,N.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,m)),m=null},Gt.isStandardBrowserEnv){const E=(e.withCredentials||IP(v))&&e.xsrfCookieName&&RP.read(e.xsrfCookieName);E&&a.set(e.xsrfHeaderName,E)}s===void 0&&a.setContentType(null),"setRequestHeader"in m&&A.forEach(a.toJSON(),function(x,N){m.setRequestHeader(N,x)}),A.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),u&&u!=="json"&&(m.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&m.addEventListener("progress",Dm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",Dm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(f=E=>{m&&(i(!E||E.type?new Jo(null,e,m):E),m.abort(),m=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f)));const O=zP(v);if(O&&Gt.protocols.indexOf(O)===-1){i(new ee("Unsupported protocol "+O+":",ee.ERR_BAD_REQUEST,e));return}m.send(s||null)})},Pf={http:cP,xhr:DP};A.forEach(Pf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Bm=e=>`- ${e}`,BP=e=>A.isFunction(e)||e===null||e===!1,ey={getAdapter:e=>{e=A.isArray(e)?e:[e];const{length:t}=e;let n,i;const s={};for(let a=0;a`adapter ${f} `+(h===!1?"is not supported by the environment":"is not available in the build"));let u=t?a.length>1?`since : -`+a.map(Bm).join(` -`):" "+Bm(a[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:Pf};function mc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jo(null,e)}function Um(e){return mc(e),e.headers=mn.from(e.headers),e.data=pc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ey.getAdapter(e.adapter||bh.adapter)(e).then(function(i){return mc(e),i.data=pc.call(e,e.transformResponse,i),i.headers=mn.from(i.headers),i},function(i){return Xg(i)||(mc(e),i&&i.response&&(i.response.data=pc.call(e,e.transformResponse,i.response),i.response.headers=mn.from(i.response.headers))),Promise.reject(i)})}const Fm=e=>e instanceof mn?e.toJSON():e;function xi(e,t){t=t||{};const n={};function i(p,m,v){return A.isPlainObject(p)&&A.isPlainObject(m)?A.merge.call({caseless:v},p,m):A.isPlainObject(m)?A.merge({},m):A.isArray(m)?m.slice():m}function s(p,m,v){if(A.isUndefined(m)){if(!A.isUndefined(p))return i(void 0,p,v)}else return i(p,m,v)}function a(p,m){if(!A.isUndefined(m))return i(void 0,m)}function u(p,m){if(A.isUndefined(m)){if(!A.isUndefined(p))return i(void 0,p)}else return i(void 0,m)}function f(p,m,v){if(v in t)return i(p,m);if(v in e)return i(void 0,p)}const h={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(p,m)=>s(Fm(p),Fm(m),!0)};return A.forEach(Object.keys(Object.assign({},e,t)),function(m){const v=h[m]||s,g=v(e[m],t[m],m);A.isUndefined(g)&&v!==f||(n[m]=g)}),n}const ty="1.5.1",Dh={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Dh[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const $m={};Dh.transitional=function(t,n,i){function s(a,u){return"[Axios v"+ty+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,f)=>{if(t===!1)throw new ee(s(u," has been removed"+(n?" in "+n:"")),ee.ERR_DEPRECATED);return n&&!$m[u]&&($m[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,f):!0}};function UP(e,t,n){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const a=i[s],u=t[a];if(u){const f=e[a],h=f===void 0||u(f,a,e);if(h!==!0)throw new ee("option "+a+" must be "+h,ee.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ee("Unknown option "+a,ee.ERR_BAD_OPTION)}}const Tf={assertOptions:UP,validators:Dh},Rn=Tf.validators;class Ha{constructor(t){this.defaults=t,this.interceptors={request:new jm,response:new jm}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=xi(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:a}=n;i!==void 0&&Tf.assertOptions(i,{silentJSONParsing:Rn.transitional(Rn.boolean),forcedJSONParsing:Rn.transitional(Rn.boolean),clarifyTimeoutError:Rn.transitional(Rn.boolean)},!1),s!=null&&(A.isFunction(s)?n.paramsSerializer={serialize:s}:Tf.assertOptions(s,{encode:Rn.function,serialize:Rn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&A.merge(a.common,a[n.method]);a&&A.forEach(["delete","get","head","post","put","patch","common"],E=>{delete a[E]}),n.headers=mn.concat(u,a);const f=[];let h=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(h=h&&x.synchronous,f.unshift(x.fulfilled,x.rejected))});const p=[];this.interceptors.response.forEach(function(x){p.push(x.fulfilled,x.rejected)});let m,v=0,g;if(!h){const E=[Um.bind(this),void 0];for(E.unshift.apply(E,f),E.push.apply(E,p),g=E.length,m=Promise.resolve(n);v{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](s);i._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(f=>{i.subscribe(f),a=f}).then(s);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,f){i.reason||(i.reason=new Jo(a,u,f),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Bh(function(s){t=s}),cancel:t}}}const FP=Bh;function $P(e){return function(n){return e.apply(null,n)}}function ZP(e){return A.isObject(e)&&e.isAxiosError===!0}const Lf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Lf).forEach(([e,t])=>{Lf[t]=e});const HP=Lf;function ny(e){const t=new sa(e),n=bg(sa.prototype.request,t);return A.extend(n,sa.prototype,t,{allOwnKeys:!0}),A.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ny(xi(e,s))},n}const Ae=ny(bh);Ae.Axios=sa;Ae.CanceledError=Jo;Ae.CancelToken=FP;Ae.isCancel=Xg;Ae.VERSION=ty;Ae.toFormData=pl;Ae.AxiosError=ee;Ae.Cancel=Ae.CanceledError;Ae.all=function(t){return Promise.all(t)};Ae.spread=$P;Ae.isAxiosError=ZP;Ae.mergeConfig=xi;Ae.AxiosHeaders=mn;Ae.formToJSON=e=>Yg(A.isHTMLForm(e)?new FormData(e):e);Ae.getAdapter=ey.getAdapter;Ae.HttpStatusCode=HP;Ae.default=Ae;const WP=Ae;var yo;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.EARLY_HINTS=103]="EARLY_HINTS",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(yo||(yo={}));const Uh="six-cities-token",ry=()=>localStorage.getItem(Uh)??"",VP=e=>{localStorage.setItem(Uh,e)},KP=()=>{localStorage.removeItem(Uh)},GP="https://14.design.htmlacademy.pro/six-cities",qP=5e3,QP={[yo.BAD_REQUEST]:!0,[yo.UNAUTHORIZED]:!0,[yo.NOT_FOUND]:!0},YP=e=>!!QP[e.status],iy=()=>{const e=WP.create({baseURL:GP,timeout:qP});return e.interceptors.request.use(t=>{const n=ry();return n&&t.headers&&(t.headers["x-token"]=n),t}),e.interceptors.response.use(t=>t,t=>{throw t.response&&YP(t.response),t}),e},oy=Ze("ChangeCity"),XP=Ze("AddOffer"),JP=Ze("data/fetchOffers"),eT=Ze("data/loadOffer"),tT=Ze("offer/set");Ze("user/redirectToRoute");const nT=iy(),sy=Ze("data/loadOfferNearby"),Fh=Ze("data/loadComments"),wo=En("data/fetchOffers",async()=>{const{data:e}=await nT.get(Sn.Offers);return e}),xo=En("data/fetchOfferId",async(e,{extra:t})=>{const{data:n}=await t.get(`${Sn.Offers}/${e}`);return n}),aa=En("user/login",async({email:e,password:t},{dispatch:n,extra:i})=>{const{data:s}=await i.post(Sn.Login,{email:e,password:t});return VP(s.token),n(cy(e)),{name:s.name,avatarUrl:s.avatarUrl,isPro:s.isPro,email:s.email,token:s.token}}),la=En("user/checkAuth",async(e,{dispatch:t,extra:n})=>{try{const{data:i}=await n.get(Sn.Login,{params:{"X-Token":e}});return t(cy(i.email)),{name:i.name,avatarUrl:i.avatarUrl,isPro:i.isPro,email:i.email,token:i.token}}catch{return{name:"",avatarUrl:"",isPro:!1,email:"",token:""}}}),$h=En("user/logout",async(e,{extra:t})=>{await t.delete(Sn.Logout),KP()}),ay=En("data/fetchOfferNearby",async(e,{dispatch:t,extra:n})=>{const{data:i}=await n.get(`${Sn.Offers}/${e}/nearby`);t(sy(i))}),ly=En("data/fetchComments",async(e,{dispatch:t,extra:n})=>{const{data:i}=await n.get(`${Sn.Comments}/${e}`);t(Fh(i))}),rT=En("post/Comment",async({comment:e,rating:t,id:n},{dispatch:i,extra:s})=>{const{data:a}=await s.post(`${Sn.Comments}/${n}`,{comment:e,rating:t});i(Fh(a))}),uy=En("offer/setIsOfferFavorite",async({offerId:e,isFavorite:t},{dispatch:n,extra:i})=>{const{data:s}=await i.post(`/favorite/${e}/${Number(t)}`);n(tT(s))}),cy=Ze("user/FillEmail"),iT={offer:[],offerPageStatus:!1},oT=Ah({name:"offerPage",initialState:iT,reducers:{unmountOffer:e=>{e.offer=[]}},extraReducers(e){e.addCase(wo.pending,t=>{t.offerPageStatus=!0}).addCase(wo.fulfilled,(t,n)=>{t.offer=n.payload,t.offerPageStatus=!1}).addCase(wo.rejected,t=>{t.offerPageStatus=!1})}}),Zh={id:"0",title:"",price:0,type:"",city:{name:"",location:{latitude:0,longitude:0,zoom:0}},location:{latitude:0,longitude:0,zoom:0},isFavorite:!1,isPremium:!1,rating:0,description:"",bedrooms:0,goods:[""],host:{name:"",avatarUrl:"",isPro:!1},images:[""],maxAdults:0},sT={offer:Zh,OfferIdDetailsPageStatus:!1,nearbyOffers:[],comments:[]},aT=Ah({name:"offerIdDetails",initialState:sT,reducers:{unmountOfferId:e=>{e.offer=Zh}},extraReducers(e){e.addCase(xo.pending,t=>{t.OfferIdDetailsPageStatus=!0}).addCase(xo.fulfilled,(t,n)=>{t.offer=n.payload,t.OfferIdDetailsPageStatus=!1}).addCase(xo.rejected,t=>{t.OfferIdDetailsPageStatus=!1}).addCase(sy,(t,n)=>{t.nearbyOffers=n.payload}).addCase(Fh,(t,n)=>{t.comments=n.payload})}}),lT={authorizationStatus:Fe.Unknown,userData:null,postError:!1,userDataLoadingStatus:!1,userEmail:""},uT=Ah({name:"user",initialState:lT,reducers:{},extraReducers(e){e.addCase(la.fulfilled,(t,n)=>{n.payload.name===""?(t.authorizationStatus=Fe.NoAuth,t.userDataLoadingStatus=!1):(t.authorizationStatus=Fe.Auth,t.userData=n.payload,t.userDataLoadingStatus=!1)}).addCase(la.rejected,t=>{t.authorizationStatus=Fe.NoAuth}).addCase(la.pending,t=>{t.userDataLoadingStatus=!0}).addCase(aa.fulfilled,(t,n)=>{t.authorizationStatus=Fe.Auth,t.userData=n.payload,t.userDataLoadingStatus=!1,t.postError=!1}).addCase(aa.rejected,t=>{t.authorizationStatus=Fe.NoAuth,t.postError=!0}).addCase($h.fulfilled,t=>{t.authorizationStatus=Fe.NoAuth,t.userData=null}).addCase(aa.pending,t=>{t.userDataLoadingStatus=!0})}}),Zm=[{title:"Paris",lng:2.3522,lat:48.8566},{title:"Amsterdam",lng:4.9041,lat:52.3676},{title:"Cologne",lng:6.9603,lat:50.9375},{title:"Brussels",lng:4.3517,lat:50.8503},{title:"Hamburg",lng:9.9937,lat:53.5511},{title:"Dusseldorf",lng:6.7735,lat:51.2277}],cT={currentCity:Zm[0],cities:Zm,offers:[],offerIdDetails:Zh},Hm=jg(cT,e=>{e.addCase(oy,(t,n)=>{t.currentCity=t.cities.find(i=>i.title===n.payload)}).addCase(XP,(t,n)=>{t.offers=n.payload}).addCase(JP,(t,n)=>{t.offers=n.payload}).addCase(eT,(t,n)=>{t.offerIdDetails=n.payload})}),fT=Rg({Cities:Hm,currentCity:Hm,offerPage:oT.reducer,offerIdDetails:aT.reducer,user:uT.reducer}),hT=iy(),_r=xS({reducer:fT,middleware:e=>e({thunk:{extraArgument:hT}})});var fy={exports:{}},hy={};/** + */function df(){return df=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function nE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function rE(e,t){return e.button===0&&(!t||t==="_self")&&!nE(e)}const iE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],oE="startTransition",um=tw[oE];function sE(e){let{basename:t,children:n,future:i,window:s}=e,a=I.useRef();a.current==null&&(a.current=fx({window:s,v5Compat:!0}));let u=a.current,[f,h]=I.useState({action:u.action,location:u.location}),{v7_startTransition:p}=i||{},m=I.useCallback(v=>{p&&um?um(()=>h(v)):h(v)},[h,p]);return I.useLayoutEffect(()=>u.listen(m),[u,m]),I.createElement(Jx,{basename:t,children:n,location:f.location,navigationType:f.action,navigator:u})}const aE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pn=I.forwardRef(function(t,n){let{onClick:i,relative:s,reloadDocument:a,replace:u,state:f,target:h,to:p,preventScrollReset:m}=t,v=tE(t,iE),{basename:g}=I.useContext(Ci),O,w=!1;if(typeof p=="string"&&lE.test(p)&&(O=p,aE))try{let y=new URL(window.location.href),T=p.startsWith("//")?new URL(y.protocol+p):new URL(p),R=Sh(T.pathname,g);T.origin===y.origin&&R!=null?p=R+T.search+T.hash:w=!0}catch{}let x=jx(p,{relative:s}),N=uE(p,{replace:u,state:f,target:h,preventScrollReset:m,relative:s});function E(y){i&&i(y),y.defaultPrevented||N(y)}return I.createElement("a",df({},v,{href:O||x,onClick:w||a?i:E,ref:n,target:h}))});var cm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(cm||(cm={}));var fm;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fm||(fm={}));function uE(e,t){let{target:n,replace:i,state:s,preventScrollReset:a,relative:u}=t===void 0?{}:t,f=Ni(),h=Xo(),p=vg(e,{relative:u});return I.useCallback(m=>{if(rE(m,n)){m.preventDefault();let v=i!==void 0?i:za(h)===za(p);f(e,{replace:v,state:s,preventScrollReset:a,relative:u})}},[h,f,p,i,s,n,e,a,u])}var wg={exports:{}},cE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",fE=cE,hE=fE;function xg(){}function Eg(){}Eg.resetWarningCache=xg;var dE=function(){function e(i,s,a,u,f,h){if(h!==hE){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Eg,resetWarningCache:xg};return n.PropTypes=n,n};wg.exports=dE();var pE=wg.exports;const X=Tr(pE);var mE=typeof Element<"u",_E=typeof Map=="function",vE=typeof Set=="function",gE=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ra(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,i,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!ra(e[i],t[i]))return!1;return!0}var a;if(_E&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(i=a.next()).done;)if(!t.has(i.value[0]))return!1;for(a=e.entries();!(i=a.next()).done;)if(!ra(i.value[1],t.get(i.value[0])))return!1;return!0}if(vE&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(i=a.next()).done;)if(!t.has(i.value[0]))return!1;return!0}if(gE&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[i]))return!1;if(mE&&e instanceof Element)return!1;for(i=n;i--!==0;)if(!((s[i]==="_owner"||s[i]==="__v"||s[i]==="__o")&&e.$$typeof)&&!ra(e[s[i]],t[s[i]]))return!1;return!0}return e!==e&&t!==t}var yE=function(t,n){try{return ra(t,n)}catch(i){if((i.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw i}};const wE=Tr(yE);var xE=function(e,t,n,i,s,a,u,f){if(!e){var h;if(t===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,i,s,a,u,f],m=0;h=new Error(t.replace(/%s/g,function(){return p[m++]})),h.name="Invariant Violation"}throw h.framesToPop=1,h}},EE=xE;const hm=Tr(EE);var SE=function(t,n,i,s){var a=i?i.call(s,t,n):void 0;if(a!==void 0)return!!a;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var u=Object.keys(t),f=Object.keys(n);if(u.length!==f.length)return!1;for(var h=Object.prototype.hasOwnProperty.bind(n),p=0;p=0||(s[n]=e[n]);return s}var V={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},TE={rel:["amphtml","canonical","alternate"]},LE={type:["application/ld+json"]},OE={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},pm=Object.keys(V).map(function(e){return V[e]}),Da={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},CE=Object.keys(Da).reduce(function(e,t){return e[Da[t]]=t,e},{}),ci=function(e,t){for(var n=e.length-1;n>=0;n-=1){var i=e[n];if(Object.prototype.hasOwnProperty.call(i,t))return i[t]}return null},kE=function(e){var t=ci(e,V.TITLE),n=ci(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var i=ci(e,"defaultTitle");return t||i||void 0},NE=function(e){return ci(e,"onChangeClientState")||function(){}},tc=function(e,t){return t.filter(function(n){return n[e]!==void 0}).map(function(n){return n[e]}).reduce(function(n,i){return Te({},n,i)},{})},RE=function(e,t){return t.filter(function(n){return n[V.BASE]!==void 0}).map(function(n){return n[V.BASE]}).reverse().reduce(function(n,i){if(!n.length)for(var s=Object.keys(i),a=0;a/g,">").replace(/"/g,""").replace(/'/g,"'")},_m=function(e){return Object.keys(e).reduce(function(t,n){var i=e[n]!==void 0?n+'="'+e[n]+'"':""+n;return t?t+" "+i:i},"")},vm=function(e,t){return t===void 0&&(t={}),Object.keys(e).reduce(function(n,i){return n[Da[i]||i]=e[i],n},t)},ia=function(e,t){return t.map(function(n,i){var s,a=((s={key:i})["data-rh"]=!0,s);return Object.keys(n).forEach(function(u){var f=Da[u]||u;f==="innerHTML"||f==="cssText"?a.dangerouslySetInnerHTML={__html:n.innerHTML||n.cssText}:a[f]=n[u]}),Et.createElement(e,a)})},yt=function(e,t,n){switch(e){case V.TITLE:return{toComponent:function(){return s=t.titleAttributes,(a={key:i=t.title})["data-rh"]=!0,u=vm(s,a),[Et.createElement(V.TITLE,u,i)];var i,s,a,u},toString:function(){return function(i,s,a,u){var f=_m(a),h=Sg(s);return f?"<"+i+' data-rh="true" '+f+">"+rc(h,u)+"":"<"+i+' data-rh="true">'+rc(h,u)+""}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return vm(t)},toString:function(){return _m(t)}};default:return{toComponent:function(){return ia(e,t)},toString:function(){return function(i,s,a){return s.reduce(function(u,f){var h=Object.keys(f).filter(function(v){return!(v==="innerHTML"||v==="cssText")}).reduce(function(v,g){var O=f[g]===void 0?g:g+'="'+rc(f[g],a)+'"';return v?v+" "+O:O},""),p=f.innerHTML||f.cssText||"",m=ME.indexOf(i)===-1;return u+"<"+i+' data-rh="true" '+h+(m?"/>":">"+p+"")},"")}(e,t,n)}}}},mf=function(e){var t=e.baseTag,n=e.bodyAttributes,i=e.encode,s=e.htmlAttributes,a=e.noscriptTags,u=e.styleTags,f=e.title,h=f===void 0?"":f,p=e.titleAttributes,m=e.linkTags,v=e.metaTags,g=e.scriptTags,O={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var w=function(x){var N=x.linkTags,E=x.scriptTags,y=x.encode,T=nc(x.metaTags,OE),R=nc(N,TE),j=nc(E,LE);return{priorityMethods:{toComponent:function(){return[].concat(ia(V.META,T.priority),ia(V.LINK,R.priority),ia(V.SCRIPT,j.priority))},toString:function(){return yt(V.META,T.priority,y)+" "+yt(V.LINK,R.priority,y)+" "+yt(V.SCRIPT,j.priority,y)}},metaTags:T.default,linkTags:R.default,scriptTags:j.default}}(e);O=w.priorityMethods,m=w.linkTags,v=w.metaTags,g=w.scriptTags}return{priority:O,base:yt(V.BASE,t,i),bodyAttributes:yt("bodyAttributes",n,i),htmlAttributes:yt("htmlAttributes",s,i),link:yt(V.LINK,m,i),meta:yt(V.META,v,i),noscript:yt(V.NOSCRIPT,a,i),script:yt(V.SCRIPT,g,i),style:yt(V.STYLE,u,i),title:yt(V.TITLE,{title:h,titleAttributes:p},i)}},Hs=[],_f=function(e,t){var n=this;t===void 0&&(t=typeof document<"u"),this.instances=[],this.value={setHelmet:function(i){n.context.helmet=i},helmetInstances:{get:function(){return n.canUseDOM?Hs:n.instances},add:function(i){(n.canUseDOM?Hs:n.instances).push(i)},remove:function(i){var s=(n.canUseDOM?Hs:n.instances).indexOf(i);(n.canUseDOM?Hs:n.instances).splice(s,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=mf({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},Pg=Et.createContext({}),IE=X.shape({setHelmet:X.func,helmetInstances:X.shape({get:X.func,add:X.func,remove:X.func})}),zE=typeof document<"u",ri=function(e){function t(n){var i;return(i=e.call(this,n)||this).helmetData=new _f(i.props.context,t.canUseDOM),i}return Oh(t,e),t.prototype.render=function(){return Et.createElement(Pg.Provider,{value:this.helmetData.value},this.props.children)},t}(I.Component);ri.canUseDOM=zE,ri.propTypes={context:X.shape({helmet:X.shape()}),children:X.node.isRequired},ri.defaultProps={context:{}},ri.displayName="HelmetProvider";var Hr=function(e,t){var n,i=document.head||document.querySelector(V.HEAD),s=i.querySelectorAll(e+"[data-rh]"),a=[].slice.call(s),u=[];return t&&t.length&&t.forEach(function(f){var h=document.createElement(e);for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(p==="innerHTML"?h.innerHTML=f.innerHTML:p==="cssText"?h.styleSheet?h.styleSheet.cssText=f.cssText:h.appendChild(document.createTextNode(f.cssText)):h.setAttribute(p,f[p]===void 0?"":f[p]));h.setAttribute("data-rh","true"),a.some(function(m,v){return n=v,h.isEqualNode(m)})?a.splice(n,1):u.push(h)}),a.forEach(function(f){return f.parentNode.removeChild(f)}),u.forEach(function(f){return i.appendChild(f)}),{oldTags:a,newTags:u}},ic=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var i=n.getAttribute("data-rh"),s=i?i.split(","):[],a=[].concat(s),u=Object.keys(t),f=0;f=0;v-=1)n.removeAttribute(a[v]);s.length===a.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==u.join(",")&&n.setAttribute("data-rh",u.join(","))}},gm=function(e,t){var n=e.baseTag,i=e.htmlAttributes,s=e.linkTags,a=e.metaTags,u=e.noscriptTags,f=e.onChangeClientState,h=e.scriptTags,p=e.styleTags,m=e.title,v=e.titleAttributes;ic(V.BODY,e.bodyAttributes),ic(V.HTML,i),function(x,N){x!==void 0&&document.title!==x&&(document.title=Sg(x)),ic(V.TITLE,N)}(m,v);var g={baseTag:Hr(V.BASE,n),linkTags:Hr(V.LINK,s),metaTags:Hr(V.META,a),noscriptTags:Hr(V.NOSCRIPT,u),scriptTags:Hr(V.SCRIPT,h),styleTags:Hr(V.STYLE,p)},O={},w={};Object.keys(g).forEach(function(x){var N=g[x],E=N.newTags,y=N.oldTags;E.length&&(O[x]=E),y.length&&(w[x]=g[x].oldTags)}),t&&t(),f(e,O,w)},ro=null,Ba=function(e){function t(){for(var i,s=arguments.length,a=new Array(s),u=0;u elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(i){var s,a=i.child,u=i.arrayTypeChildren;return Te({},u,((s={})[a.type]=[].concat(u[a.type]||[],[Te({},i.newChildProps,this.mapNestedChildrenToProps(a,i.nestedChildren))]),s))},n.mapObjectTypeChildren=function(i){var s,a,u=i.child,f=i.newProps,h=i.newChildProps,p=i.nestedChildren;switch(u.type){case V.TITLE:return Te({},f,((s={})[u.type]=p,s.titleAttributes=Te({},h),s));case V.BODY:return Te({},f,{bodyAttributes:Te({},h)});case V.HTML:return Te({},f,{htmlAttributes:Te({},h)});default:return Te({},f,((a={})[u.type]=Te({},h),a))}},n.mapArrayTypeChildrenToProps=function(i,s){var a=Te({},s);return Object.keys(i).forEach(function(u){var f;a=Te({},a,((f={})[u]=i[u],f))}),a},n.warnOnInvalidChildren=function(i,s){return hm(pm.some(function(a){return i.type===a}),typeof i.type=="function"?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+pm.join(", ")+" are allowed. Helmet does not support rendering <"+i.type+"> elements. Refer to our API for more information."),hm(!s||typeof s=="string"||Array.isArray(s)&&!s.some(function(a){return typeof a!="string"}),"Helmet expects a string as a child of <"+i.type+">. Did you forget to wrap your children in braces? ( <"+i.type+">{``} ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(i,s){var a=this,u={};return Et.Children.forEach(i,function(f){if(f&&f.props){var h=f.props,p=h.children,m=dm(h,bE),v=Object.keys(m).reduce(function(O,w){return O[CE[w]||w]=m[w],O},{}),g=f.type;switch(typeof g=="symbol"?g=g.toString():a.warnOnInvalidChildren(f,p),g){case V.FRAGMENT:s=a.mapChildrenToProps(p,s);break;case V.LINK:case V.META:case V.NOSCRIPT:case V.SCRIPT:case V.STYLE:u=a.flattenArrayTypeChildren({child:f,arrayTypeChildren:u,newChildProps:v,nestedChildren:p});break;default:s=a.mapObjectTypeChildren({child:f,newProps:s,newChildProps:v,nestedChildren:p})}}}),this.mapArrayTypeChildrenToProps(u,s)},n.render=function(){var i=this.props,s=i.children,a=dm(i,jE),u=Te({},a),f=a.helmetData;return s&&(u=this.mapChildrenToProps(s,u)),!f||f instanceof _f||(f=new _f(f.context,f.instances)),f?Et.createElement(Ba,Te({},u,{context:f.value,helmetData:void 0})):Et.createElement(Pg.Consumer,null,function(h){return Et.createElement(Ba,Te({},u,{context:h}))})},t}(I.Component);oa.propTypes={base:X.object,bodyAttributes:X.object,children:X.oneOfType([X.arrayOf(X.node),X.node]),defaultTitle:X.string,defer:X.bool,encodeSpecialCharacters:X.bool,htmlAttributes:X.object,link:X.arrayOf(X.object),meta:X.arrayOf(X.object),noscript:X.arrayOf(X.object),onChangeClientState:X.func,script:X.arrayOf(X.object),style:X.arrayOf(X.object),title:X.string,titleAttributes:X.object,titleTemplate:X.string,prioritizeSeoTags:X.bool,helmetData:X.object},oa.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},oa.displayName="Helmet";var Yt=(e=>(e.Login="/login",e.Favorites="/favorites",e.Main="/",e.Offer="/offer/:id",e))(Yt||{}),cl=(e=>(e.citiesList="cities__card",e.neardPlace="near-places__card",e.favoritePlace="favorites__card",e))(cl||{}),hn=(e=>(e.popular="popular",e.lowToHigh="lowToHigh",e.highToLow="highToLow",e.topRated="topRated",e))(hn||{});function bt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i3?t.i-4:t.i:Array.isArray(e)?1:Ch(e)?2:kh(e)?3:0}function fi(e,t){return Ri(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function DE(e,t){return Ri(e)===2?e.get(t):e[t]}function Tg(e,t,n){var i=Ri(e);i===2?e.set(t,n):i===3?e.add(n):e[t]=n}function Lg(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Ch(e){return HE&&e instanceof Map}function kh(e){return WE&&e instanceof Set}function hr(e){return e.o||e.t}function Nh(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Cg(e);delete t[_e];for(var n=hi(t),i=0;i1&&(e.set=e.add=e.clear=e.delete=BE),Object.freeze(e),t&&Pr(e,function(n,i){return Rh(i,!0)},!0)),e}function BE(){bt(2)}function Ah(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Xt(e){var t=wf[e];return t||bt(18,e),t}function UE(e,t){wf[e]||(wf[e]=t)}function vf(){return $o}function oc(e,t){t&&(Xt("Patches"),e.u=[],e.s=[],e.v=t)}function Ua(e){gf(e),e.p.forEach(FE),e.p=null}function gf(e){e===$o&&($o=e.l)}function ym(e){return $o={p:[],l:$o,h:e,m:!0,_:0}}function FE(e){var t=e[_e];t.i===0||t.i===1?t.j():t.g=!0}function sc(e,t){t._=t.p.length;var n=t.p[0],i=e!==void 0&&e!==n;return t.h.O||Xt("ES5").S(t,e,i),i?(n[_e].P&&(Ua(t),bt(4)),wn(e)&&(e=Fa(t,e),t.l||$a(t,e)),t.u&&Xt("Patches").M(n[_e].t,e,t.u,t.s)):e=Fa(t,n,[]),Ua(t),t.u&&t.v(t.u,t.s),e!==Og?e:void 0}function Fa(e,t,n){if(Ah(t))return t;var i=t[_e];if(!i)return Pr(t,function(f,h){return wm(e,i,t,f,h,n)},!0),t;if(i.A!==e)return t;if(!i.P)return $a(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var s=i.i===4||i.i===5?i.o=Nh(i.k):i.o,a=s,u=!1;i.i===3&&(a=new Set(s),s.clear(),u=!0),Pr(a,function(f,h){return wm(e,i,s,f,h,n,u)}),$a(e,s,!1),n&&e.u&&Xt("Patches").N(i,n,e.u,e.s)}return i.o}function wm(e,t,n,i,s,a,u){if(Jn(s)){var f=Fa(e,s,a&&t&&t.i!==3&&!fi(t.R,i)?a.concat(i):void 0);if(Tg(n,i,f),!Jn(f))return;e.m=!1}else u&&n.add(s);if(wn(s)&&!Ah(s)){if(!e.h.D&&e._<1)return;Fa(e,s),t&&t.A.l||$a(e,s)}}function $a(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Rh(t,n)}function ac(e,t){var n=e[_e];return(n?hr(n):e)[t]}function xm(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var i=Object.getOwnPropertyDescriptor(n,t);if(i)return i;n=Object.getPrototypeOf(n)}}function jn(e){e.P||(e.P=!0,e.l&&jn(e.l))}function lc(e){e.o||(e.o=Nh(e.t))}function yf(e,t,n){var i=Ch(t)?Xt("MapSet").F(t,n):kh(t)?Xt("MapSet").T(t,n):e.O?function(s,a){var u=Array.isArray(s),f={i:u?1:0,A:a?a.A:vf(),P:!1,I:!1,R:{},l:a,t:s,k:null,o:null,j:null,C:!1},h=f,p=Zo;u&&(h=[f],p=co);var m=Proxy.revocable(h,p),v=m.revoke,g=m.proxy;return f.k=g,f.j=v,g}(t,n):Xt("ES5").J(t,n);return(n?n.A:vf()).p.push(i),i}function $E(e){return Jn(e)||bt(22,e),function t(n){if(!wn(n))return n;var i,s=n[_e],a=Ri(n);if(s){if(!s.P&&(s.i<4||!Xt("ES5").K(s)))return s.t;s.I=!0,i=Em(n,a),s.I=!1}else i=Em(n,a);return Pr(i,function(u,f){s&&DE(s.t,u)===f||Tg(i,u,t(f))}),a===3?new Set(i):i}(e)}function Em(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Nh(e)}function ZE(){function e(a,u){var f=s[a];return f?f.enumerable=u:s[a]=f={configurable:!0,enumerable:u,get:function(){var h=this[_e];return Zo.get(h,a)},set:function(h){var p=this[_e];Zo.set(p,a,h)}},f}function t(a){for(var u=a.length-1;u>=0;u--){var f=a[u][_e];if(!f.P)switch(f.i){case 5:i(f)&&jn(f);break;case 4:n(f)&&jn(f)}}}function n(a){for(var u=a.t,f=a.k,h=hi(f),p=h.length-1;p>=0;p--){var m=h[p];if(m!==_e){var v=u[m];if(v===void 0&&!fi(u,m))return!0;var g=f[m],O=g&&g[_e];if(O?O.t!==v:!Lg(g,v))return!0}}var w=!!u[_e];return h.length!==hi(u).length+(w?0:1)}function i(a){var u=a.k;if(u.length!==a.t.length)return!0;var f=Object.getOwnPropertyDescriptor(u,u.length-1);if(f&&!f.get)return!0;for(var h=0;h1?E-1:0),T=1;T1?m-1:0),g=1;g=0;s--){var a=i[s];if(a.path.length===0&&a.op==="replace"){n=a.value;break}}s>-1&&(i=i.slice(s+1));var u=Xt("Patches").$;return Jn(n)?u(n,i):this.produce(n,function(f){return u(f,i)})},e}(),ft=new GE,KE=ft.produce;ft.produceWithPatches.bind(ft);ft.setAutoFreeze.bind(ft);ft.setUseProxies.bind(ft);ft.applyPatches.bind(ft);ft.createDraft.bind(ft);ft.finishDraft.bind(ft);const kg=KE;function Ho(e){"@babel/helpers - typeof";return Ho=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},Ho(e)}function qE(e,t){if(Ho(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(Ho(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QE(e){var t=qE(e,"string");return Ho(t)=="symbol"?t:t+""}function YE(e,t,n){return(t=QE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Om(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ke(1));return n(Ng)(e,t)}if(typeof e!="function")throw new Error(Ke(2));var s=e,a=t,u=[],f=u,h=!1;function p(){f===u&&(f=u.slice())}function m(){if(h)throw new Error(Ke(3));return a}function v(x){if(typeof x!="function")throw new Error(Ke(4));if(h)throw new Error(Ke(5));var N=!0;return p(),f.push(x),function(){if(N){if(h)throw new Error(Ke(6));N=!1,p();var y=f.indexOf(x);f.splice(y,1),u=null}}}function g(x){if(!XE(x))throw new Error(Ke(7));if(typeof x.type>"u")throw new Error(Ke(8));if(h)throw new Error(Ke(9));try{h=!0,a=s(a,x)}finally{h=!1}for(var N=u=f,E=0;E"u")throw new Error(Ke(12));if(typeof n(void 0,{type:Za.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ke(13))})}function Rg(e){for(var t=Object.keys(e),n={},i=0;i"u")throw p&&p.type,new Error(Ke(14));v[O]=N,m=m||N!==x}return m=m||a.length!==Object.keys(h).length,m?v:h}}function Ha(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var p=n[h];return h>0&&(n.splice(h,1),n.unshift(p)),p.value}return Wa}function s(f,h){i(f)===Wa&&(n.unshift({key:f,value:h}),n.length>e&&n.pop())}function a(){return n}function u(){n=[]}return{get:i,put:s,getEntries:a,clear:u}}var rS=function(t,n){return t===n};function iS(e){return function(n,i){if(n===null||i===null||n.length!==i.length)return!1;for(var s=n.length,a=0;a1?t-1:0),i=1;i0&&a[a.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1](e.Offers="/offers",e.Login="/login",e.Logout="/logout",e.Comments="/comments",e))(Pn||{}),je=(e=>(e.Auth="AUTH",e.NoAuth="NO_AUTH",e.Unknown="UNKNOWN",e))(je||{});function jg(e,t){return function(){return e.apply(t,arguments)}}const{toString:AS}=Object.prototype,{getPrototypeOf:bh}=Object,hl=(e=>t=>{const n=AS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jt=e=>(e=e.toLowerCase(),t=>hl(t)===e),dl=e=>t=>typeof t===e,{isArray:Ai}=Array,Wo=dl("undefined");function MS(e){return e!==null&&!Wo(e)&&e.constructor!==null&&!Wo(e.constructor)&&Tt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dg=Jt("ArrayBuffer");function IS(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dg(e.buffer),t}const zS=dl("string"),Tt=dl("function"),Bg=dl("number"),pl=e=>e!==null&&typeof e=="object",bS=e=>e===!0||e===!1,sa=e=>{if(hl(e)!=="object")return!1;const t=bh(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},jS=Jt("Date"),DS=Jt("File"),BS=Jt("Blob"),US=Jt("FileList"),FS=e=>pl(e)&&Tt(e.pipe),$S=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tt(e.append)&&((t=hl(e))==="formdata"||t==="object"&&Tt(e.toString)&&e.toString()==="[object FormData]"))},ZS=Jt("URLSearchParams"),HS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),Ai(e))for(i=0,s=e.length;i0;)if(s=n[i],t===s.toLowerCase())return s;return null}const Fg=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),$g=e=>!Wo(e)&&e!==Fg;function Ef(){const{caseless:e}=$g(this)&&this||{},t={},n=(i,s)=>{const a=e&&Ug(t,s)||s;sa(t[a])&&sa(i)?t[a]=Ef(t[a],i):sa(i)?t[a]=Ef({},i):Ai(i)?t[a]=i.slice():t[a]=i};for(let i=0,s=arguments.length;i(Jo(t,(s,a)=>{n&&Tt(s)?e[a]=jg(s,n):e[a]=s},{allOwnKeys:i}),e),VS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),GS=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},KS=(e,t,n,i)=>{let s,a,u;const f={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!i||i(u,e,t))&&!f[u]&&(t[u]=e[u],f[u]=!0);e=n!==!1&&bh(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},qS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},QS=e=>{if(!e)return null;if(Ai(e))return e;let t=e.length;if(!Bg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},YS=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&bh(Uint8Array)),XS=(e,t)=>{const i=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=i.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},JS=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},eP=Jt("HTMLFormElement"),tP=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),Im=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),nP=Jt("RegExp"),Zg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Jo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(i[a]=u||s)}),Object.defineProperties(e,i)},rP=e=>{Zg(e,(t,n)=>{if(Tt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(Tt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},iP=(e,t)=>{const n={},i=s=>{s.forEach(a=>{n[a]=!0})};return Ai(e)?i(e):i(String(e).split(t)),n},oP=()=>{},sP=(e,t)=>(e=+e,Number.isFinite(e)?e:t),hc="abcdefghijklmnopqrstuvwxyz",zm="0123456789",Hg={DIGIT:zm,ALPHA:hc,ALPHA_DIGIT:hc+hc.toUpperCase()+zm},aP=(e=16,t=Hg.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function lP(e){return!!(e&&Tt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const uP=e=>{const t=new Array(10),n=(i,s)=>{if(pl(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const a=Ai(i)?[]:{};return Jo(i,(u,f)=>{const h=n(u,s+1);!Wo(h)&&(a[f]=h)}),t[s]=void 0,a}}return i};return n(e,0)},cP=Jt("AsyncFunction"),fP=e=>e&&(pl(e)||Tt(e))&&Tt(e.then)&&Tt(e.catch),A={isArray:Ai,isArrayBuffer:Dg,isBuffer:MS,isFormData:$S,isArrayBufferView:IS,isString:zS,isNumber:Bg,isBoolean:bS,isObject:pl,isPlainObject:sa,isUndefined:Wo,isDate:jS,isFile:DS,isBlob:BS,isRegExp:nP,isFunction:Tt,isStream:FS,isURLSearchParams:ZS,isTypedArray:YS,isFileList:US,forEach:Jo,merge:Ef,extend:WS,trim:HS,stripBOM:VS,inherits:GS,toFlatObject:KS,kindOf:hl,kindOfTest:Jt,endsWith:qS,toArray:QS,forEachEntry:XS,matchAll:JS,isHTMLForm:eP,hasOwnProperty:Im,hasOwnProp:Im,reduceDescriptors:Zg,freezeMethods:rP,toObjectSet:iP,toCamelCase:tP,noop:oP,toFiniteNumber:sP,findKey:Ug,global:Fg,isContextDefined:$g,ALPHABET:Hg,generateString:aP,isSpecCompliantForm:lP,toJSONObject:uP,isAsyncFn:cP,isThenable:fP};function ee(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s)}A.inherits(ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:A.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Wg=ee.prototype,Vg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Vg[e]={value:e}});Object.defineProperties(ee,Vg);Object.defineProperty(Wg,"isAxiosError",{value:!0});ee.from=(e,t,n,i,s,a)=>{const u=Object.create(Wg);return A.toFlatObject(e,u,function(h){return h!==Error.prototype},f=>f!=="isAxiosError"),ee.call(u,e.message,t,n,i,s),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};const hP=null;function Sf(e){return A.isPlainObject(e)||A.isArray(e)}function Gg(e){return A.endsWith(e,"[]")?e.slice(0,-2):e}function bm(e,t,n){return e?e.concat(t).map(function(s,a){return s=Gg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function dP(e){return A.isArray(e)&&!e.some(Sf)}const pP=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function ml(e,t,n){if(!A.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=A.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,N){return!A.isUndefined(N[x])});const i=n.metaTokens,s=n.visitor||m,a=n.dots,u=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(t);if(!A.isFunction(s))throw new TypeError("visitor must be a function");function p(w){if(w===null)return"";if(A.isDate(w))return w.toISOString();if(!h&&A.isBlob(w))throw new ee("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(w)||A.isTypedArray(w)?h&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function m(w,x,N){let E=w;if(w&&!N&&typeof w=="object"){if(A.endsWith(x,"{}"))x=i?x:x.slice(0,-2),w=JSON.stringify(w);else if(A.isArray(w)&&dP(w)||(A.isFileList(w)||A.endsWith(x,"[]"))&&(E=A.toArray(w)))return x=Gg(x),E.forEach(function(T,R){!(A.isUndefined(T)||T===null)&&t.append(u===!0?bm([x],R,a):u===null?x:x+"[]",p(T))}),!1}return Sf(w)?!0:(t.append(bm(N,x,a),p(w)),!1)}const v=[],g=Object.assign(pP,{defaultVisitor:m,convertValue:p,isVisitable:Sf});function O(w,x){if(!A.isUndefined(w)){if(v.indexOf(w)!==-1)throw Error("Circular reference detected in "+x.join("."));v.push(w),A.forEach(w,function(E,y){(!(A.isUndefined(E)||E===null)&&s.call(t,E,A.isString(y)?y.trim():y,x,g))===!0&&O(E,x?x.concat(y):[y])}),v.pop()}}if(!A.isObject(e))throw new TypeError("data must be an object");return O(e),t}function jm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function jh(e,t){this._pairs=[],e&&ml(e,this,t)}const Kg=jh.prototype;Kg.append=function(t,n){this._pairs.push([t,n])};Kg.toString=function(t){const n=t?function(i){return t.call(this,i,jm)}:jm;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function mP(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qg(e,t,n){if(!t)return e;const i=n&&n.encode||mP,s=n&&n.serialize;let a;if(s?a=s(t,n):a=A.isURLSearchParams(t)?t.toString():new jh(t,n).toString(i),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class _P{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Dm=_P,Qg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vP=typeof URLSearchParams<"u"?URLSearchParams:jh,gP=typeof FormData<"u"?FormData:null,yP=typeof Blob<"u"?Blob:null,wP=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),xP=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Kt={isBrowser:!0,classes:{URLSearchParams:vP,FormData:gP,Blob:yP},isStandardBrowserEnv:wP,isStandardBrowserWebWorkerEnv:xP,protocols:["http","https","file","blob","url","data"]};function EP(e,t){return ml(e,new Kt.classes.URLSearchParams,Object.assign({visitor:function(n,i,s,a){return Kt.isNode&&A.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function SP(e){return A.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function PP(e){const t={},n=Object.keys(e);let i;const s=n.length;let a;for(i=0;i=n.length;return u=!u&&A.isArray(s)?s.length:u,h?(A.hasOwnProp(s,u)?s[u]=[s[u],i]:s[u]=i,!f):((!s[u]||!A.isObject(s[u]))&&(s[u]=[]),t(n,i,s[u],a)&&A.isArray(s[u])&&(s[u]=PP(s[u])),!f)}if(A.isFormData(e)&&A.isFunction(e.entries)){const n={};return A.forEachEntry(e,(i,s)=>{t(SP(i),s,n,0)}),n}return null}function TP(e,t,n){if(A.isString(e))try{return(t||JSON.parse)(e),A.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const Dh={transitional:Qg,adapter:["xhr","http"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,a=A.isObject(t);if(a&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return s&&s?JSON.stringify(Yg(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return EP(t,this.formSerializer).toString();if((f=A.isFileList(t))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ml(f?{"files[]":t}:t,h&&new h,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),TP(t)):t}],transformResponse:[function(t){const n=this.transitional||Dh.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&A.isString(t)&&(i&&!this.responseType||s)){const u=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(f){if(u)throw f.name==="SyntaxError"?ee.from(f,ee.ERR_BAD_RESPONSE,this,null,this.response):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kt.classes.FormData,Blob:Kt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],e=>{Dh.headers[e]={}});const Bh=Dh,LP=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),OP=e=>{const t={};let n,i,s;return e&&e.split(` +`).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),i=u.substring(s+1).trim(),!(!n||t[n]&&LP[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},Bm=Symbol("internals");function io(e){return e&&String(e).trim().toLowerCase()}function aa(e){return e===!1||e==null?e:A.isArray(e)?e.map(aa):String(e)}function CP(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const kP=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function dc(e,t,n,i,s){if(A.isFunction(i))return i.call(this,t,n);if(s&&(t=n),!!A.isString(t)){if(A.isString(i))return t.indexOf(i)!==-1;if(A.isRegExp(i))return i.test(t)}}function NP(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function RP(e,t){const n=A.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(s,a,u){return this[i].call(this,t,s,a,u)},configurable:!0})})}class _l{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function a(f,h,p){const m=io(h);if(!m)throw new Error("header name must be a non-empty string");const v=A.findKey(s,m);(!v||s[v]===void 0||p===!0||p===void 0&&s[v]!==!1)&&(s[v||h]=aa(f))}const u=(f,h)=>A.forEach(f,(p,m)=>a(p,m,h));return A.isPlainObject(t)||t instanceof this.constructor?u(t,n):A.isString(t)&&(t=t.trim())&&!kP(t)?u(OP(t),n):t!=null&&a(n,t,i),this}get(t,n){if(t=io(t),t){const i=A.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return CP(s);if(A.isFunction(n))return n.call(this,s,i);if(A.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=io(t),t){const i=A.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||dc(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function a(u){if(u=io(u),u){const f=A.findKey(i,u);f&&(!n||dc(i,i[f],f,n))&&(delete i[f],s=!0)}}return A.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let i=n.length,s=!1;for(;i--;){const a=n[i];(!t||dc(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,i={};return A.forEach(this,(s,a)=>{const u=A.findKey(i,a);if(u){n[u]=aa(s),delete n[a];return}const f=t?NP(a):String(a).trim();f!==a&&delete n[a],n[f]=aa(s),i[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return A.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=t&&A.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[Bm]=this[Bm]={accessors:{}}).accessors,s=this.prototype;function a(u){const f=io(u);i[f]||(RP(s,u),i[f]=!0)}return A.isArray(t)?t.forEach(a):a(t),this}}_l.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(_l.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});A.freezeMethods(_l);const mn=_l;function pc(e,t){const n=this||Bh,i=t||n,s=mn.from(i.headers);let a=i.data;return A.forEach(e,function(f){a=f.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Xg(e){return!!(e&&e.__CANCEL__)}function es(e,t,n){ee.call(this,e??"canceled",ee.ERR_CANCELED,t,n),this.name="CanceledError"}A.inherits(es,ee,{__CANCEL__:!0});function AP(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new ee("Request failed with status code "+n.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const MP=Kt.isStandardBrowserEnv?function(){return{write:function(n,i,s,a,u,f){const h=[];h.push(n+"="+encodeURIComponent(i)),A.isNumber(s)&&h.push("expires="+new Date(s).toGMTString()),A.isString(a)&&h.push("path="+a),A.isString(u)&&h.push("domain="+u),f===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(n){const i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function IP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function zP(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Jg(e,t){return e&&!IP(t)?zP(e,t):t}const bP=Kt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let i;function s(a){let u=a;return t&&(n.setAttribute("href",u),u=n.href),n.setAttribute("href",u),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=s(window.location.href),function(u){const f=A.isString(u)?s(u):u;return f.protocol===i.protocol&&f.host===i.host}}():function(){return function(){return!0}}();function jP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function DP(e,t){e=e||10;const n=new Array(e),i=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(h){const p=Date.now(),m=i[a];u||(u=p),n[s]=h,i[s]=p;let v=a,g=0;for(;v!==s;)g+=n[v++],v=v%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),p-u{const a=s.loaded,u=s.lengthComputable?s.total:void 0,f=a-n,h=i(f),p=a<=u;n=a;const m={loaded:a,total:u,progress:u?a/u:void 0,bytes:f,rate:h||void 0,estimated:h&&u&&p?(u-a)/h:void 0,event:s};m[t?"download":"upload"]=!0,e(m)}}const BP=typeof XMLHttpRequest<"u",UP=BP&&function(e){return new Promise(function(n,i){let s=e.data;const a=mn.from(e.headers).normalize(),u=e.responseType;let f;function h(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}let p;A.isFormData(s)&&(Kt.isStandardBrowserEnv||Kt.isStandardBrowserWebWorkerEnv?a.setContentType(!1):a.getContentType(/^\s*multipart\/form-data/)?A.isString(p=a.getContentType())&&a.setContentType(p.replace(/^\s*(multipart\/form-data);+/,"$1")):a.setContentType("multipart/form-data"));let m=new XMLHttpRequest;if(e.auth){const w=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(w+":"+x))}const v=Jg(e.baseURL,e.url);m.open(e.method.toUpperCase(),qg(v,e.params,e.paramsSerializer),!0),m.timeout=e.timeout;function g(){if(!m)return;const w=mn.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),N={data:!u||u==="text"||u==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:w,config:e,request:m};AP(function(y){n(y),h()},function(y){i(y),h()},N),m=null}if("onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(i(new ee("Request aborted",ee.ECONNABORTED,e,m)),m=null)},m.onerror=function(){i(new ee("Network Error",ee.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let x=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const N=e.transitional||Qg;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),i(new ee(x,N.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,m)),m=null},Kt.isStandardBrowserEnv){const w=(e.withCredentials||bP(v))&&e.xsrfCookieName&&MP.read(e.xsrfCookieName);w&&a.set(e.xsrfHeaderName,w)}s===void 0&&a.setContentType(null),"setRequestHeader"in m&&A.forEach(a.toJSON(),function(x,N){m.setRequestHeader(N,x)}),A.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),u&&u!=="json"&&(m.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&m.addEventListener("progress",Um(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",Um(e.onUploadProgress)),(e.cancelToken||e.signal)&&(f=w=>{m&&(i(!w||w.type?new es(null,e,m):w),m.abort(),m=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f)));const O=jP(v);if(O&&Kt.protocols.indexOf(O)===-1){i(new ee("Unsupported protocol "+O+":",ee.ERR_BAD_REQUEST,e));return}m.send(s||null)})},Pf={http:hP,xhr:UP};A.forEach(Pf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Fm=e=>`- ${e}`,FP=e=>A.isFunction(e)||e===null||e===!1,ey={getAdapter:e=>{e=A.isArray(e)?e:[e];const{length:t}=e;let n,i;const s={};for(let a=0;a`adapter ${f} `+(h===!1?"is not supported by the environment":"is not available in the build"));let u=t?a.length>1?`since : +`+a.map(Fm).join(` +`):" "+Fm(a[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:Pf};function mc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new es(null,e)}function $m(e){return mc(e),e.headers=mn.from(e.headers),e.data=pc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ey.getAdapter(e.adapter||Bh.adapter)(e).then(function(i){return mc(e),i.data=pc.call(e,e.transformResponse,i),i.headers=mn.from(i.headers),i},function(i){return Xg(i)||(mc(e),i&&i.response&&(i.response.data=pc.call(e,e.transformResponse,i.response),i.response.headers=mn.from(i.response.headers))),Promise.reject(i)})}const Zm=e=>e instanceof mn?e.toJSON():e;function xi(e,t){t=t||{};const n={};function i(p,m,v){return A.isPlainObject(p)&&A.isPlainObject(m)?A.merge.call({caseless:v},p,m):A.isPlainObject(m)?A.merge({},m):A.isArray(m)?m.slice():m}function s(p,m,v){if(A.isUndefined(m)){if(!A.isUndefined(p))return i(void 0,p,v)}else return i(p,m,v)}function a(p,m){if(!A.isUndefined(m))return i(void 0,m)}function u(p,m){if(A.isUndefined(m)){if(!A.isUndefined(p))return i(void 0,p)}else return i(void 0,m)}function f(p,m,v){if(v in t)return i(p,m);if(v in e)return i(void 0,p)}const h={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(p,m)=>s(Zm(p),Zm(m),!0)};return A.forEach(Object.keys(Object.assign({},e,t)),function(m){const v=h[m]||s,g=v(e[m],t[m],m);A.isUndefined(g)&&v!==f||(n[m]=g)}),n}const ty="1.5.1",Uh={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Uh[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Hm={};Uh.transitional=function(t,n,i){function s(a,u){return"[Axios v"+ty+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,f)=>{if(t===!1)throw new ee(s(u," has been removed"+(n?" in "+n:"")),ee.ERR_DEPRECATED);return n&&!Hm[u]&&(Hm[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,f):!0}};function $P(e,t,n){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const a=i[s],u=t[a];if(u){const f=e[a],h=f===void 0||u(f,a,e);if(h!==!0)throw new ee("option "+a+" must be "+h,ee.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ee("Unknown option "+a,ee.ERR_BAD_OPTION)}}const Tf={assertOptions:$P,validators:Uh},An=Tf.validators;class Va{constructor(t){this.defaults=t,this.interceptors={request:new Dm,response:new Dm}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=xi(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:a}=n;i!==void 0&&Tf.assertOptions(i,{silentJSONParsing:An.transitional(An.boolean),forcedJSONParsing:An.transitional(An.boolean),clarifyTimeoutError:An.transitional(An.boolean)},!1),s!=null&&(A.isFunction(s)?n.paramsSerializer={serialize:s}:Tf.assertOptions(s,{encode:An.function,serialize:An.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&A.merge(a.common,a[n.method]);a&&A.forEach(["delete","get","head","post","put","patch","common"],w=>{delete a[w]}),n.headers=mn.concat(u,a);const f=[];let h=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(h=h&&x.synchronous,f.unshift(x.fulfilled,x.rejected))});const p=[];this.interceptors.response.forEach(function(x){p.push(x.fulfilled,x.rejected)});let m,v=0,g;if(!h){const w=[$m.bind(this),void 0];for(w.unshift.apply(w,f),w.push.apply(w,p),g=w.length,m=Promise.resolve(n);v{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](s);i._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(f=>{i.subscribe(f),a=f}).then(s);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,f){i.reason||(i.reason=new es(a,u,f),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Fh(function(s){t=s}),cancel:t}}}const ZP=Fh;function HP(e){return function(n){return e.apply(null,n)}}function WP(e){return A.isObject(e)&&e.isAxiosError===!0}const Lf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Lf).forEach(([e,t])=>{Lf[t]=e});const VP=Lf;function ny(e){const t=new la(e),n=jg(la.prototype.request,t);return A.extend(n,la.prototype,t,{allOwnKeys:!0}),A.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ny(xi(e,s))},n}const Ae=ny(Bh);Ae.Axios=la;Ae.CanceledError=es;Ae.CancelToken=ZP;Ae.isCancel=Xg;Ae.VERSION=ty;Ae.toFormData=ml;Ae.AxiosError=ee;Ae.Cancel=Ae.CanceledError;Ae.all=function(t){return Promise.all(t)};Ae.spread=HP;Ae.isAxiosError=WP;Ae.mergeConfig=xi;Ae.AxiosHeaders=mn;Ae.formToJSON=e=>Yg(A.isHTMLForm(e)?new FormData(e):e);Ae.getAdapter=ey.getAdapter;Ae.HttpStatusCode=VP;Ae.default=Ae;const GP=Ae;var xo;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.EARLY_HINTS=103]="EARLY_HINTS",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(xo||(xo={}));const $h="six-cities-token",ry=()=>localStorage.getItem($h)??"",KP=e=>{localStorage.setItem($h,e)},qP=()=>{localStorage.removeItem($h)},QP="https://14.design.htmlacademy.pro/six-cities",YP=5e3,XP={[xo.BAD_REQUEST]:!0,[xo.UNAUTHORIZED]:!0,[xo.NOT_FOUND]:!0},JP=e=>!!XP[e.status],iy=()=>{const e=GP.create({baseURL:QP,timeout:YP});return e.interceptors.request.use(t=>{const n=ry();return n&&t.headers&&(t.headers["x-token"]=n),t}),e.interceptors.response.use(t=>t,t=>{throw t.response&&JP(t.response),t}),e},oy=He("ChangeCity"),eT=He("AddOffer"),tT=He("data/fetchOffers"),nT=He("data/loadOffer"),rT=He("offer/set");He("user/redirectToRoute");const iT=iy(),sy=He("data/loadOfferNearby"),Zh=He("data/loadComments"),Eo=Sn("data/fetchOffers",async()=>{const{data:e}=await iT.get(Pn.Offers);return e}),So=Sn("data/fetchOfferId",async(e,{extra:t})=>{const{data:n}=await t.get(`${Pn.Offers}/${e}`);return n}),ua=Sn("user/login",async({email:e,password:t},{dispatch:n,extra:i})=>{const{data:s}=await i.post(Pn.Login,{email:e,password:t});return KP(s.token),n(cy(e)),{name:s.name,avatarUrl:s.avatarUrl,isPro:s.isPro,email:s.email,token:s.token}}),ca=Sn("user/checkAuth",async(e,{dispatch:t,extra:n})=>{try{const{data:i}=await n.get(Pn.Login,{params:{"X-Token":e}});return t(cy(i.email)),{name:i.name,avatarUrl:i.avatarUrl,isPro:i.isPro,email:i.email,token:i.token}}catch{return{name:"",avatarUrl:"",isPro:!1,email:"",token:""}}}),Hh=Sn("user/logout",async(e,{extra:t})=>{await t.delete(Pn.Logout),qP()}),ay=Sn("data/fetchOfferNearby",async(e,{dispatch:t,extra:n})=>{const{data:i}=await n.get(`${Pn.Offers}/${e}/nearby`);t(sy(i))}),ly=Sn("data/fetchComments",async(e,{dispatch:t,extra:n})=>{const{data:i}=await n.get(`${Pn.Comments}/${e}`);t(Zh(i))}),oT=Sn("post/Comment",async({comment:e,rating:t,id:n},{dispatch:i,extra:s})=>{const{data:a}=await s.post(`${Pn.Comments}/${n}`,{comment:e,rating:t});i(Zh(a))}),uy=Sn("offer/setIsOfferFavorite",async({offerId:e,isFavorite:t},{dispatch:n,extra:i})=>{const{data:s}=await i.post(`/favorite/${e}/${Number(t)}`);n(rT(s))}),cy=He("user/FillEmail"),sT={offer:[],offerPageStatus:!1},aT=Ih({name:"offerPage",initialState:sT,reducers:{unmountOffer:e=>{e.offer=[]}},extraReducers(e){e.addCase(Eo.pending,t=>{t.offerPageStatus=!0}).addCase(Eo.fulfilled,(t,n)=>{t.offer=n.payload,t.offerPageStatus=!1}).addCase(Eo.rejected,t=>{t.offerPageStatus=!1})}}),Wh={id:"0",title:"",price:0,type:"",city:{name:"",location:{latitude:0,longitude:0,zoom:0}},location:{latitude:0,longitude:0,zoom:0},isFavorite:!1,isPremium:!1,rating:0,description:"",bedrooms:0,goods:[""],host:{name:"",avatarUrl:"",isPro:!1},images:[""],maxAdults:0},lT={offer:Wh,OfferIdDetailsPageStatus:!1,nearbyOffers:[],comments:[]},uT=Ih({name:"offerIdDetails",initialState:lT,reducers:{unmountOfferId:e=>{e.offer=Wh}},extraReducers(e){e.addCase(So.pending,t=>{t.OfferIdDetailsPageStatus=!0}).addCase(So.fulfilled,(t,n)=>{t.offer=n.payload,t.OfferIdDetailsPageStatus=!1}).addCase(So.rejected,t=>{t.OfferIdDetailsPageStatus=!1}).addCase(sy,(t,n)=>{t.nearbyOffers=n.payload}).addCase(Zh,(t,n)=>{t.comments=n.payload})}}),cT={authorizationStatus:je.Unknown,userData:null,postError:!1,userDataLoadingStatus:!1,userEmail:""},fT=Ih({name:"user",initialState:cT,reducers:{},extraReducers(e){e.addCase(ca.fulfilled,(t,n)=>{n.payload.name===""?(t.authorizationStatus=je.NoAuth,t.userDataLoadingStatus=!1):(t.authorizationStatus=je.Auth,t.userData=n.payload,t.userDataLoadingStatus=!1)}).addCase(ca.rejected,t=>{t.authorizationStatus=je.NoAuth}).addCase(ca.pending,t=>{t.userDataLoadingStatus=!0}).addCase(ua.fulfilled,(t,n)=>{t.authorizationStatus=je.Auth,t.userData=n.payload,t.userDataLoadingStatus=!1,t.postError=!1}).addCase(ua.rejected,t=>{t.authorizationStatus=je.NoAuth,t.postError=!0}).addCase(Hh.fulfilled,t=>{t.authorizationStatus=je.NoAuth,t.userData=null}).addCase(ua.pending,t=>{t.userDataLoadingStatus=!0})}}),Wm=[{title:"Paris",lng:2.3522,lat:48.8566},{title:"Amsterdam",lng:4.9041,lat:52.3676},{title:"Cologne",lng:6.9603,lat:50.9375},{title:"Brussels",lng:4.3517,lat:50.8503},{title:"Hamburg",lng:9.9937,lat:53.5511},{title:"Dusseldorf",lng:6.7735,lat:51.2277}],hT={currentCity:Wm[0],cities:Wm,offers:[],offerIdDetails:Wh},Vm=bg(hT,e=>{e.addCase(oy,(t,n)=>{t.currentCity=t.cities.find(i=>i.title===n.payload)}).addCase(eT,(t,n)=>{t.offers=n.payload}).addCase(tT,(t,n)=>{t.offers=n.payload}).addCase(nT,(t,n)=>{t.offerIdDetails=n.payload})}),dT=Rg({Cities:Vm,currentCity:Vm,offerPage:aT.reducer,offerIdDetails:uT.reducer,user:fT.reducer}),pT=iy(),_r=SS({reducer:dT,middleware:e=>e({thunk:{extraArgument:pT}})});var fy={exports:{}},hy={};/** * @license React - * use-sync-external-store-shim.production.min.js + * use-sync-external-store-shim.production.js * - * Copyright (c) Facebook, Inc. and its affiliates. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Ei=z;function dT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pT=typeof Object.is=="function"?Object.is:dT,mT=Ei.useState,_T=Ei.useEffect,vT=Ei.useLayoutEffect,gT=Ei.useDebugValue;function yT(e,t){var n=t(),i=mT({inst:{value:n,getSnapshot:t}}),s=i[0].inst,a=i[1];return vT(function(){s.value=n,s.getSnapshot=t,_c(s)&&a({inst:s})},[e,n,t]),_T(function(){return _c(s)&&a({inst:s}),e(function(){_c(s)&&a({inst:s})})},[e]),gT(n),n}function _c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pT(e,n)}catch{return!0}}function wT(e,t){return t()}var xT=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wT:yT;hy.useSyncExternalStore=Ei.useSyncExternalStore!==void 0?Ei.useSyncExternalStore:xT;fy.exports=hy;var ET=fy.exports,dy={exports:{}},py={};/** + */var Ei=I;function mT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _T=typeof Object.is=="function"?Object.is:mT,vT=Ei.useState,gT=Ei.useEffect,yT=Ei.useLayoutEffect,wT=Ei.useDebugValue;function xT(e,t){var n=t(),i=vT({inst:{value:n,getSnapshot:t}}),s=i[0].inst,a=i[1];return yT(function(){s.value=n,s.getSnapshot=t,_c(s)&&a({inst:s})},[e,n,t]),gT(function(){return _c(s)&&a({inst:s}),e(function(){_c(s)&&a({inst:s})})},[e]),wT(n),n}function _c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_T(e,n)}catch{return!0}}function ET(e,t){return t()}var ST=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ET:xT;hy.useSyncExternalStore=Ei.useSyncExternalStore!==void 0?Ei.useSyncExternalStore:ST;fy.exports=hy;var PT=fy.exports,dy={exports:{}},py={};/** * @license React - * use-sync-external-store-shim/with-selector.production.min.js + * use-sync-external-store-shim/with-selector.production.js * - * Copyright (c) Facebook, Inc. and its affiliates. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var _l=z,ST=ET;function PT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var TT=typeof Object.is=="function"?Object.is:PT,LT=ST.useSyncExternalStore,OT=_l.useRef,kT=_l.useEffect,CT=_l.useMemo,NT=_l.useDebugValue;py.useSyncExternalStoreWithSelector=function(e,t,n,i,s){var a=OT(null);if(a.current===null){var u={hasValue:!1,value:null};a.current=u}else u=a.current;a=CT(function(){function h(O){if(!p){if(p=!0,m=O,O=i(O),s!==void 0&&u.hasValue){var E=u.value;if(s(E,O))return v=E}return v=O}if(E=v,TT(m,O))return E;var x=i(O);return s!==void 0&&s(E,x)?E:(m=O,v=x)}var p=!1,m,v,g=n===void 0?null:n;return[function(){return h(t())},g===null?void 0:function(){return h(g())}]},[t,n,i,s]);var f=LT(e,a[0],a[1]);return kT(function(){u.hasValue=!0,u.value=f},[f]),NT(f),f};dy.exports=py;var RT=dy.exports;function AT(e){e()}let my=AT;const MT=e=>my=e,IT=()=>my,Wm=Symbol.for("react-redux-context"),Vm=typeof globalThis<"u"?globalThis:{};function zT(){var e;if(!z.createContext)return{};const t=(e=Vm[Wm])!=null?e:Vm[Wm]=new Map;let n=t.get(z.createContext);return n||(n=z.createContext(null),t.set(z.createContext,n)),n}const Jn=zT();function Hh(e=Jn){return function(){return z.useContext(e)}}const _y=Hh(),jT=()=>{throw new Error("uSES not initialized!")};let vy=jT;const bT=e=>{vy=e},DT=(e,t)=>e===t;function BT(e=Jn){const t=e===Jn?_y:Hh(e);return function(i,s={}){const{equalityFn:a=DT,stabilityCheck:u=void 0,noopCheck:f=void 0}=typeof s=="function"?{equalityFn:s}:s,{store:h,subscription:p,getServerState:m,stabilityCheck:v,noopCheck:g}=t();z.useRef(!0);const O=z.useCallback({[i.name](x){return i(x)}}[i.name],[i,v,u]),E=vy(p.addNestedSub,h.getState,m||h.getState,O,a);return z.useDebugValue(E),E}}const UT=BT();var gy={exports:{}},ce={};/** @license React v16.13.1 + */var vl=I,TT=PT;function LT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var OT=typeof Object.is=="function"?Object.is:LT,CT=TT.useSyncExternalStore,kT=vl.useRef,NT=vl.useEffect,RT=vl.useMemo,AT=vl.useDebugValue;py.useSyncExternalStoreWithSelector=function(e,t,n,i,s){var a=kT(null);if(a.current===null){var u={hasValue:!1,value:null};a.current=u}else u=a.current;a=RT(function(){function h(O){if(!p){if(p=!0,m=O,O=i(O),s!==void 0&&u.hasValue){var w=u.value;if(s(w,O))return v=w}return v=O}if(w=v,OT(m,O))return w;var x=i(O);return s!==void 0&&s(w,x)?(m=O,w):(m=O,v=x)}var p=!1,m,v,g=n===void 0?null:n;return[function(){return h(t())},g===null?void 0:function(){return h(g())}]},[t,n,i,s]);var f=CT(e,a[0],a[1]);return NT(function(){u.hasValue=!0,u.value=f},[f]),AT(f),f};dy.exports=py;var MT=dy.exports;function IT(e){e()}let my=IT;const zT=e=>my=e,bT=()=>my,Gm=Symbol.for("react-redux-context"),Km=typeof globalThis<"u"?globalThis:{};function jT(){var e;if(!I.createContext)return{};const t=(e=Km[Gm])!=null?e:Km[Gm]=new Map;let n=t.get(I.createContext);return n||(n=I.createContext(null),t.set(I.createContext,n)),n}const er=jT();function Vh(e=er){return function(){return I.useContext(e)}}const _y=Vh(),DT=()=>{throw new Error("uSES not initialized!")};let vy=DT;const BT=e=>{vy=e},UT=(e,t)=>e===t;function FT(e=er){const t=e===er?_y:Vh(e);return function(i,s={}){const{equalityFn:a=UT,stabilityCheck:u=void 0,noopCheck:f=void 0}=typeof s=="function"?{equalityFn:s}:s,{store:h,subscription:p,getServerState:m,stabilityCheck:v,noopCheck:g}=t();I.useRef(!0);const O=I.useCallback({[i.name](x){return i(x)}}[i.name],[i,v,u]),w=vy(p.addNestedSub,h.getState,m||h.getState,O,a);return I.useDebugValue(w),w}}const $T=FT();var gy={exports:{}},ce={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var De=typeof Symbol=="function"&&Symbol.for,Wh=De?Symbol.for("react.element"):60103,Vh=De?Symbol.for("react.portal"):60106,vl=De?Symbol.for("react.fragment"):60107,gl=De?Symbol.for("react.strict_mode"):60108,yl=De?Symbol.for("react.profiler"):60114,wl=De?Symbol.for("react.provider"):60109,xl=De?Symbol.for("react.context"):60110,Kh=De?Symbol.for("react.async_mode"):60111,El=De?Symbol.for("react.concurrent_mode"):60111,Sl=De?Symbol.for("react.forward_ref"):60112,Pl=De?Symbol.for("react.suspense"):60113,FT=De?Symbol.for("react.suspense_list"):60120,Tl=De?Symbol.for("react.memo"):60115,Ll=De?Symbol.for("react.lazy"):60116,$T=De?Symbol.for("react.block"):60121,ZT=De?Symbol.for("react.fundamental"):60117,HT=De?Symbol.for("react.responder"):60118,WT=De?Symbol.for("react.scope"):60119;function pt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Wh:switch(e=e.type,e){case Kh:case El:case vl:case yl:case gl:case Pl:return e;default:switch(e=e&&e.$$typeof,e){case xl:case Sl:case Ll:case Tl:case wl:return e;default:return t}}case Vh:return t}}}function yy(e){return pt(e)===El}ce.AsyncMode=Kh;ce.ConcurrentMode=El;ce.ContextConsumer=xl;ce.ContextProvider=wl;ce.Element=Wh;ce.ForwardRef=Sl;ce.Fragment=vl;ce.Lazy=Ll;ce.Memo=Tl;ce.Portal=Vh;ce.Profiler=yl;ce.StrictMode=gl;ce.Suspense=Pl;ce.isAsyncMode=function(e){return yy(e)||pt(e)===Kh};ce.isConcurrentMode=yy;ce.isContextConsumer=function(e){return pt(e)===xl};ce.isContextProvider=function(e){return pt(e)===wl};ce.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wh};ce.isForwardRef=function(e){return pt(e)===Sl};ce.isFragment=function(e){return pt(e)===vl};ce.isLazy=function(e){return pt(e)===Ll};ce.isMemo=function(e){return pt(e)===Tl};ce.isPortal=function(e){return pt(e)===Vh};ce.isProfiler=function(e){return pt(e)===yl};ce.isStrictMode=function(e){return pt(e)===gl};ce.isSuspense=function(e){return pt(e)===Pl};ce.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===vl||e===El||e===yl||e===gl||e===Pl||e===FT||typeof e=="object"&&e!==null&&(e.$$typeof===Ll||e.$$typeof===Tl||e.$$typeof===wl||e.$$typeof===xl||e.$$typeof===Sl||e.$$typeof===ZT||e.$$typeof===HT||e.$$typeof===WT||e.$$typeof===$T)};ce.typeOf=pt;gy.exports=ce;var VT=gy.exports,wy=VT,KT={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},GT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},xy={};xy[wy.ForwardRef]=KT;xy[wy.Memo]=GT;var fe={};/** + */var Be=typeof Symbol=="function"&&Symbol.for,Gh=Be?Symbol.for("react.element"):60103,Kh=Be?Symbol.for("react.portal"):60106,gl=Be?Symbol.for("react.fragment"):60107,yl=Be?Symbol.for("react.strict_mode"):60108,wl=Be?Symbol.for("react.profiler"):60114,xl=Be?Symbol.for("react.provider"):60109,El=Be?Symbol.for("react.context"):60110,qh=Be?Symbol.for("react.async_mode"):60111,Sl=Be?Symbol.for("react.concurrent_mode"):60111,Pl=Be?Symbol.for("react.forward_ref"):60112,Tl=Be?Symbol.for("react.suspense"):60113,ZT=Be?Symbol.for("react.suspense_list"):60120,Ll=Be?Symbol.for("react.memo"):60115,Ol=Be?Symbol.for("react.lazy"):60116,HT=Be?Symbol.for("react.block"):60121,WT=Be?Symbol.for("react.fundamental"):60117,VT=Be?Symbol.for("react.responder"):60118,GT=Be?Symbol.for("react.scope"):60119;function pt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Gh:switch(e=e.type,e){case qh:case Sl:case gl:case wl:case yl:case Tl:return e;default:switch(e=e&&e.$$typeof,e){case El:case Pl:case Ol:case Ll:case xl:return e;default:return t}}case Kh:return t}}}function yy(e){return pt(e)===Sl}ce.AsyncMode=qh;ce.ConcurrentMode=Sl;ce.ContextConsumer=El;ce.ContextProvider=xl;ce.Element=Gh;ce.ForwardRef=Pl;ce.Fragment=gl;ce.Lazy=Ol;ce.Memo=Ll;ce.Portal=Kh;ce.Profiler=wl;ce.StrictMode=yl;ce.Suspense=Tl;ce.isAsyncMode=function(e){return yy(e)||pt(e)===qh};ce.isConcurrentMode=yy;ce.isContextConsumer=function(e){return pt(e)===El};ce.isContextProvider=function(e){return pt(e)===xl};ce.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gh};ce.isForwardRef=function(e){return pt(e)===Pl};ce.isFragment=function(e){return pt(e)===gl};ce.isLazy=function(e){return pt(e)===Ol};ce.isMemo=function(e){return pt(e)===Ll};ce.isPortal=function(e){return pt(e)===Kh};ce.isProfiler=function(e){return pt(e)===wl};ce.isStrictMode=function(e){return pt(e)===yl};ce.isSuspense=function(e){return pt(e)===Tl};ce.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===gl||e===Sl||e===wl||e===yl||e===Tl||e===ZT||typeof e=="object"&&e!==null&&(e.$$typeof===Ol||e.$$typeof===Ll||e.$$typeof===xl||e.$$typeof===El||e.$$typeof===Pl||e.$$typeof===WT||e.$$typeof===VT||e.$$typeof===GT||e.$$typeof===HT)};ce.typeOf=pt;gy.exports=ce;var KT=gy.exports,wy=KT,qT={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},QT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},xy={};xy[wy.ForwardRef]=qT;xy[wy.Memo]=QT;var fe={};/** * @license React * react-is.production.min.js * @@ -99,15 +99,15 @@ Error generating stack: `+a.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gh=Symbol.for("react.element"),qh=Symbol.for("react.portal"),Ol=Symbol.for("react.fragment"),kl=Symbol.for("react.strict_mode"),Cl=Symbol.for("react.profiler"),Nl=Symbol.for("react.provider"),Rl=Symbol.for("react.context"),qT=Symbol.for("react.server_context"),Al=Symbol.for("react.forward_ref"),Ml=Symbol.for("react.suspense"),Il=Symbol.for("react.suspense_list"),zl=Symbol.for("react.memo"),jl=Symbol.for("react.lazy"),QT=Symbol.for("react.offscreen"),Ey;Ey=Symbol.for("react.module.reference");function kt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Gh:switch(e=e.type,e){case Ol:case Cl:case kl:case Ml:case Il:return e;default:switch(e=e&&e.$$typeof,e){case qT:case Rl:case Al:case jl:case zl:case Nl:return e;default:return t}}case qh:return t}}}fe.ContextConsumer=Rl;fe.ContextProvider=Nl;fe.Element=Gh;fe.ForwardRef=Al;fe.Fragment=Ol;fe.Lazy=jl;fe.Memo=zl;fe.Portal=qh;fe.Profiler=Cl;fe.StrictMode=kl;fe.Suspense=Ml;fe.SuspenseList=Il;fe.isAsyncMode=function(){return!1};fe.isConcurrentMode=function(){return!1};fe.isContextConsumer=function(e){return kt(e)===Rl};fe.isContextProvider=function(e){return kt(e)===Nl};fe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gh};fe.isForwardRef=function(e){return kt(e)===Al};fe.isFragment=function(e){return kt(e)===Ol};fe.isLazy=function(e){return kt(e)===jl};fe.isMemo=function(e){return kt(e)===zl};fe.isPortal=function(e){return kt(e)===qh};fe.isProfiler=function(e){return kt(e)===Cl};fe.isStrictMode=function(e){return kt(e)===kl};fe.isSuspense=function(e){return kt(e)===Ml};fe.isSuspenseList=function(e){return kt(e)===Il};fe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ol||e===Cl||e===kl||e===Ml||e===Il||e===QT||typeof e=="object"&&e!==null&&(e.$$typeof===jl||e.$$typeof===zl||e.$$typeof===Nl||e.$$typeof===Rl||e.$$typeof===Al||e.$$typeof===Ey||e.getModuleId!==void 0)};fe.typeOf=kt;function YT(){const e=IT();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let i=t;for(;i;)i.callback(),i=i.next})},get(){let i=[],s=t;for(;s;)i.push(s),s=s.next;return i},subscribe(i){let s=!0,a=n={callback:i,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){!s||t===null||(s=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}const Km={notify(){},get:()=>[]};function XT(e,t){let n,i=Km,s=0,a=!1;function u(x){m();const N=i.subscribe(x);let S=!1;return()=>{S||(S=!0,N(),v())}}function f(){i.notify()}function h(){E.onStateChange&&E.onStateChange()}function p(){return a}function m(){s++,n||(n=t?t.addNestedSub(h):e.subscribe(h),i=YT())}function v(){s--,n&&s===0&&(n(),n=void 0,i.clear(),i=Km)}function g(){a||(a=!0,m())}function O(){a&&(a=!1,v())}const E={addNestedSub:u,notifyNestedSubs:f,handleChangeWrapper:h,isSubscribed:p,trySubscribe:g,tryUnsubscribe:O,getListeners:()=>i};return E}const JT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",eL=JT?z.useLayoutEffect:z.useEffect;function tL({store:e,context:t,children:n,serverState:i,stabilityCheck:s="once",noopCheck:a="once"}){const u=z.useMemo(()=>{const p=XT(e);return{store:e,subscription:p,getServerState:i?()=>i:void 0,stabilityCheck:s,noopCheck:a}},[e,i,s,a]),f=z.useMemo(()=>e.getState(),[e]);eL(()=>{const{subscription:p}=u;return p.onStateChange=p.notifyNestedSubs,p.trySubscribe(),f!==e.getState()&&p.notifyNestedSubs(),()=>{p.tryUnsubscribe(),p.onStateChange=void 0}},[u,f]);const h=t||Jn;return z.createElement(h.Provider,{value:u},n)}function Sy(e=Jn){const t=e===Jn?_y:Hh(e);return function(){const{store:i}=t();return i}}const nL=Sy();function rL(e=Jn){const t=e===Jn?nL:Sy(e);return function(){return t().dispatch}}const iL=rL();bT(RT.useSyncExternalStoreWithSelector);MT(ug.unstable_batchedUpdates);const es=()=>iL(),rt=UT,oL=e=>e.user.authorizationStatus,bl=cl([oL],e=>e),Py=e=>{var t;return(t=e.user.userData)==null?void 0:t.email};cl(e=>e.user,e=>e.userData);cl(e=>e.user,e=>e.postError);const sL=cl(e=>e.user,e=>e.userDataLoadingStatus);var Ty={exports:{}};/*! + */var Qh=Symbol.for("react.element"),Yh=Symbol.for("react.portal"),Cl=Symbol.for("react.fragment"),kl=Symbol.for("react.strict_mode"),Nl=Symbol.for("react.profiler"),Rl=Symbol.for("react.provider"),Al=Symbol.for("react.context"),YT=Symbol.for("react.server_context"),Ml=Symbol.for("react.forward_ref"),Il=Symbol.for("react.suspense"),zl=Symbol.for("react.suspense_list"),bl=Symbol.for("react.memo"),jl=Symbol.for("react.lazy"),XT=Symbol.for("react.offscreen"),Ey;Ey=Symbol.for("react.module.reference");function Ct(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Qh:switch(e=e.type,e){case Cl:case Nl:case kl:case Il:case zl:return e;default:switch(e=e&&e.$$typeof,e){case YT:case Al:case Ml:case jl:case bl:case Rl:return e;default:return t}}case Yh:return t}}}fe.ContextConsumer=Al;fe.ContextProvider=Rl;fe.Element=Qh;fe.ForwardRef=Ml;fe.Fragment=Cl;fe.Lazy=jl;fe.Memo=bl;fe.Portal=Yh;fe.Profiler=Nl;fe.StrictMode=kl;fe.Suspense=Il;fe.SuspenseList=zl;fe.isAsyncMode=function(){return!1};fe.isConcurrentMode=function(){return!1};fe.isContextConsumer=function(e){return Ct(e)===Al};fe.isContextProvider=function(e){return Ct(e)===Rl};fe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qh};fe.isForwardRef=function(e){return Ct(e)===Ml};fe.isFragment=function(e){return Ct(e)===Cl};fe.isLazy=function(e){return Ct(e)===jl};fe.isMemo=function(e){return Ct(e)===bl};fe.isPortal=function(e){return Ct(e)===Yh};fe.isProfiler=function(e){return Ct(e)===Nl};fe.isStrictMode=function(e){return Ct(e)===kl};fe.isSuspense=function(e){return Ct(e)===Il};fe.isSuspenseList=function(e){return Ct(e)===zl};fe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Cl||e===Nl||e===kl||e===Il||e===zl||e===XT||typeof e=="object"&&e!==null&&(e.$$typeof===jl||e.$$typeof===bl||e.$$typeof===Rl||e.$$typeof===Al||e.$$typeof===Ml||e.$$typeof===Ey||e.getModuleId!==void 0)};fe.typeOf=Ct;function JT(){const e=bT();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let i=t;for(;i;)i.callback(),i=i.next})},get(){let i=[],s=t;for(;s;)i.push(s),s=s.next;return i},subscribe(i){let s=!0,a=n={callback:i,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){!s||t===null||(s=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}const qm={notify(){},get:()=>[]};function eL(e,t){let n,i=qm,s=0,a=!1;function u(x){m();const N=i.subscribe(x);let E=!1;return()=>{E||(E=!0,N(),v())}}function f(){i.notify()}function h(){w.onStateChange&&w.onStateChange()}function p(){return a}function m(){s++,n||(n=t?t.addNestedSub(h):e.subscribe(h),i=JT())}function v(){s--,n&&s===0&&(n(),n=void 0,i.clear(),i=qm)}function g(){a||(a=!0,m())}function O(){a&&(a=!1,v())}const w={addNestedSub:u,notifyNestedSubs:f,handleChangeWrapper:h,isSubscribed:p,trySubscribe:g,tryUnsubscribe:O,getListeners:()=>i};return w}const tL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nL=tL?I.useLayoutEffect:I.useEffect;function rL({store:e,context:t,children:n,serverState:i,stabilityCheck:s="once",noopCheck:a="once"}){const u=I.useMemo(()=>{const p=eL(e);return{store:e,subscription:p,getServerState:i?()=>i:void 0,stabilityCheck:s,noopCheck:a}},[e,i,s,a]),f=I.useMemo(()=>e.getState(),[e]);nL(()=>{const{subscription:p}=u;return p.onStateChange=p.notifyNestedSubs,p.trySubscribe(),f!==e.getState()&&p.notifyNestedSubs(),()=>{p.tryUnsubscribe(),p.onStateChange=void 0}},[u,f]);const h=t||er;return I.createElement(h.Provider,{value:u},n)}function Sy(e=er){const t=e===er?_y:Vh(e);return function(){const{store:i}=t();return i}}const iL=Sy();function oL(e=er){const t=e===er?iL:Sy(e);return function(){return t().dispatch}}const sL=oL();BT(MT.useSyncExternalStoreWithSelector);zT(fg.unstable_batchedUpdates);const ts=()=>sL(),$e=$T,aL=e=>e.user.authorizationStatus,ns=fl([aL],e=>e),Py=e=>{var t;return(t=e.user.userData)==null?void 0:t.email};fl(e=>e.user,e=>e.userData);fl(e=>e.user,e=>e.postError);const lL=fl(e=>e.user,e=>e.userDataLoadingStatus);var Ty={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i=[],s=0;s{_r.dispatch(xo(e.id)),_r.dispatch(ay(e.id)),_r.dispatch(ly(e.id)),u(e.isFavorite)};z.useEffect(()=>{u(e.isFavorite)},[e.isFavorite]);const h=rt(bl),p=Yo(),m=()=>{if(h===Fe.NoAuth||h===Fe.Unknown){p(Xt.Login);return}_r.dispatch(uy({offerId:e.id,isFavorite:!a})),u(!a)};return w.jsxs("article",{className:`${t} place-card`,onMouseEnter:()=>n&&n(e.id),onMouseLeave:()=>n&&n(null),onMouseOver:()=>s(!i),children:[e.isPremium&&w.jsx("div",{className:"place-card__mark",children:w.jsx("span",{children:"Premium"})}),w.jsx("div",{className:"cities__image-wrapper place-card__image-wrapper",onClick:f,children:w.jsx(Yt,{to:`/offer/${e.id}`,children:w.jsx("img",{className:"place-card__image",src:e.previewImage,width:"260",height:"200",alt:e.title,onClick:f})})}),w.jsxs("div",{className:"place-card__info",children:[w.jsxs("div",{className:"place-card__price-wrapper",children:[w.jsxs("div",{className:"place-card__price",children:[w.jsxs("b",{className:"place-card__price-value",children:["€",e.price]}),w.jsx("span",{className:"place-card__price-text",children:"/ night"})]}),h&&w.jsxs("button",{className:Ho("place-card__bookmark-button","button",{"place-card__bookmark-button--active":a}),type:"button",onClick:m,children:[w.jsx("svg",{className:"place-card__bookmark-icon",width:"18",height:"19",children:w.jsx("use",{xlinkHref:"#icon-bookmark"})}),w.jsx("span",{className:"visually-hidden",children:"To bookmarks"})]})]}),w.jsx("div",{className:"place-card__rating rating",children:w.jsxs("div",{className:"place-card__stars rating__stars",children:[w.jsx("span",{style:{width:`${e.rating/5*100}%`}}),w.jsx("span",{className:"visually-hidden",children:"Rating"})]})}),w.jsx("h2",{className:"place-card__name",onClick:f,children:w.jsx(Yt,{to:`/offer/${e.id}`,children:e.title})}),w.jsx("p",{className:"place-card__type",children:e.type})]})]})}const Oy=({offers:e,cardcssname:t,setActiveOffer:n})=>{const[i,s]=z.useState(null);return w.jsxs("div",{className:"cities__places-list places__list tabs__content",children:[e==null?void 0:e.map(a=>w.jsx("div",{onMouseEnter:()=>s(a.id),onMouseLeave:()=>s(null),children:w.jsx(Ly,{offer:a,cardcssname:t,...n&&{setActiveOffer:n}})},a.id)),w.jsx("div",{children:i&&w.jsxs("p",{children:["Active Offer ID: ",i]})})]})},lL="tabs__item--active",uL=({currentCity:e,cities:t,onSelect:n})=>w.jsx("ul",{className:"locations__list tabs__list","data-testid":"location_item",children:t.map(i=>w.jsx("li",{className:"locations__item",onClick:()=>{n(i.title)},children:w.jsx("div",{className:` +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i=[],s=0;s{_r.dispatch(So(e.id)),_r.dispatch(ay(e.id)),_r.dispatch(ly(e.id)),u(e.isFavorite)};I.useEffect(()=>{u(e.isFavorite)},[e.isFavorite]);const h=$e(ns),p=Ni(),m=()=>{if(h===je.NoAuth||h===je.Unknown){p(Yt.Login);return}_r.dispatch(uy({offerId:e.id,isFavorite:!a})),u(!a)};return P.jsxs("article",{className:`${t} place-card`,onMouseEnter:()=>n&&n(e.id),onMouseLeave:()=>n&&n(null),onMouseOver:()=>s(!i),children:[e.isPremium&&P.jsx("div",{className:"place-card__mark",children:P.jsx("span",{children:"Premium"})}),P.jsx("div",{className:"cities__image-wrapper place-card__image-wrapper",onClick:f,children:P.jsx(pn,{to:`/offer/${e.id}`,children:P.jsx("img",{className:"place-card__image",src:e.previewImage,width:"260",height:"200",alt:e.title,onClick:f})})}),P.jsxs("div",{className:"place-card__info",children:[P.jsxs("div",{className:"place-card__price-wrapper",children:[P.jsxs("div",{className:"place-card__price",children:[P.jsxs("b",{className:"place-card__price-value",children:["€",e.price]}),P.jsx("span",{className:"place-card__price-text",children:"/ night"})]}),h&&P.jsxs("button",{className:Vo("place-card__bookmark-button","button",{"place-card__bookmark-button--active":a}),type:"button",onClick:m,children:[P.jsx("svg",{className:"place-card__bookmark-icon",width:"18",height:"19",children:P.jsx("use",{xlinkHref:"#icon-bookmark"})}),P.jsx("span",{className:"visually-hidden",children:"To bookmarks"})]})]}),P.jsx("div",{className:"place-card__rating rating",children:P.jsxs("div",{className:"place-card__stars rating__stars",children:[P.jsx("span",{style:{width:`${e.rating/5*100}%`}}),P.jsx("span",{className:"visually-hidden",children:"Rating"})]})}),P.jsx("h2",{className:"place-card__name",onClick:f,children:P.jsx(pn,{to:`/offer/${e.id}`,children:e.title})}),P.jsx("p",{className:"place-card__type",children:e.type})]})]})}const Oy=({offers:e,cardcssname:t,setActiveOffer:n})=>{const[i,s]=I.useState(null);return P.jsxs("div",{className:"cities__places-list places__list tabs__content",children:[e==null?void 0:e.map(a=>P.jsx("div",{onMouseEnter:()=>s(a.id),onMouseLeave:()=>s(null),children:P.jsx(Ly,{offer:a,cardcssname:t,...n&&{setActiveOffer:n}})},a.id)),P.jsx("div",{children:i&&P.jsxs("p",{children:["Active Offer ID: ",i]})})]})},cL="tabs__item--active",fL=({currentCity:e,cities:t,onSelect:n})=>P.jsx("ul",{className:"locations__list tabs__list",children:t.map(i=>P.jsx("li",{className:"locations__item","data-testid":"location_item",onClick:()=>{n(i.title)},children:P.jsx("div",{className:` locations__item-link tabs__item - ${e===i.title?lL:""} - `,children:w.jsx("span",{children:i.title})})},i.title))}),Gm=[{label:"Popular",value:dn.popular},{label:"Price: low to high",value:dn.lowToHigh},{label:"Price: high to low",value:dn.highToLow},{label:"Top rated first",value:dn.topRated}],cL="places__option--active",fL=({currentSort:e,onSortChange:t})=>{var s;const[n,i]=z.useState(!1);return w.jsxs("form",{className:"places__sorting",action:"#",method:"get",children:[w.jsx("span",{className:"places__sorting-caption",children:"Sort by "}),w.jsxs("span",{className:"places__sorting-type",tabIndex:0,onClick:()=>i(a=>!a),children:[((s=Gm.find(a=>a.value===e))==null?void 0:s.label)||"",w.jsx("svg",{className:"places__sorting-arrow",width:7,height:4,children:w.jsx("use",{xlinkHref:"#icon-arrow-select"})})]}),n&&w.jsx("ul",{className:"places__options places__options--custom places__options--opened",children:Gm.map(a=>w.jsx("li",{className:`places__option ${e===a.value?cL:""}`,tabIndex:0,onClick:()=>t(a.value),children:a.label},a.value))})]})};var Of={exports:{}};/* @preserve + ${e===i.title?cL:""} + `,children:P.jsx("span",{children:i.title})})},i.title))}),Qm=[{label:"Popular",value:hn.popular},{label:"Price: low to high",value:hn.lowToHigh},{label:"Price: high to low",value:hn.highToLow},{label:"Top rated first",value:hn.topRated}],hL="places__option--active",dL=({currentSort:e,onSortChange:t})=>{var s;const[n,i]=I.useState(!1);return P.jsxs("form",{className:"places__sorting",action:"#",method:"get",children:[P.jsx("span",{className:"places__sorting-caption",children:"Sort by "}),P.jsxs("span",{className:"places__sorting-type",tabIndex:0,onClick:()=>i(a=>!a),children:[((s=Qm.find(a=>a.value===e))==null?void 0:s.label)||"",P.jsx("svg",{className:"places__sorting-arrow",width:7,height:4,children:P.jsx("use",{xlinkHref:"#icon-arrow-select"})})]}),n&&P.jsx("ul",{className:"places__options places__options--custom places__options--opened",children:Qm.map(a=>P.jsx("li",{className:`places__option ${e===a.value?hL:""}`,tabIndex:0,onClick:()=>t(a.value),children:a.label},a.value))})]})};var Of={exports:{}};/* @preserve * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(n,i){i(t)})(D0,function(n){var i="1.7.1";function s(r){var o,l,c,d;for(l=1,c=arguments.length;l"u"||!L||!L.Mixin)){r=T(r)?r:[r];for(var o=0;o0?Math.floor(r):Math.ceil(r)};M.prototype={clone:function(){return new M(this.x,this.y)},add:function(r){return this.clone()._add(D(r))},_add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.clone()._subtract(D(r))},_subtract:function(r){return this.x-=r.x,this.y-=r.y,this},divideBy:function(r){return this.clone()._divideBy(r)},_divideBy:function(r){return this.x/=r,this.y/=r,this},multiplyBy:function(r){return this.clone()._multiplyBy(r)},_multiplyBy:function(r){return this.x*=r,this.y*=r,this},scaleBy:function(r){return new M(this.x*r.x,this.y*r.y)},unscaleBy:function(r){return new M(this.x/r.x,this.y/r.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=G(this.x),this.y=G(this.y),this},distanceTo:function(r){r=D(r);var o=r.x-this.x,l=r.y-this.y;return Math.sqrt(o*o+l*l)},equals:function(r){return r=D(r),r.x===this.x&&r.y===this.y},contains:function(r){return r=D(r),Math.abs(r.x)<=Math.abs(this.x)&&Math.abs(r.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function D(r,o,l){return r instanceof M?r:T(r)?new M(r[0],r[1]):r==null?r:typeof r=="object"&&"x"in r&&"y"in r?new M(r.x,r.y):new M(r,o,l)}function K(r,o){if(r)for(var l=o?[r,o]:r,c=0,d=l.length;c=this.min.x&&l.x<=this.max.x&&o.y>=this.min.y&&l.y<=this.max.y},intersects:function(r){r=ae(r);var o=this.min,l=this.max,c=r.min,d=r.max,_=d.x>=o.x&&c.x<=l.x,P=d.y>=o.y&&c.y<=l.y;return _&&P},overlaps:function(r){r=ae(r);var o=this.min,l=this.max,c=r.min,d=r.max,_=d.x>o.x&&c.xo.y&&c.y=o.lat&&d.lat<=l.lat&&c.lng>=o.lng&&d.lng<=l.lng},intersects:function(r){r=he(r);var o=this._southWest,l=this._northEast,c=r.getSouthWest(),d=r.getNorthEast(),_=d.lat>=o.lat&&c.lat<=l.lat,P=d.lng>=o.lng&&c.lng<=l.lng;return _&&P},overlaps:function(r){r=he(r);var o=this._southWest,l=this._northEast,c=r.getSouthWest(),d=r.getNorthEast(),_=d.lat>o.lat&&c.lato.lng&&c.lng1,Nr=function(){var r=!1;try{var o=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("testPassiveEventSupport",v,o),window.removeEventListener("testPassiveEventSupport",v,o)}catch{}return r}(),od=function(){return!!document.createElement("canvas").getContext}(),is=!!(document.createElementNS&&Yh("svg").createSVGRect),os=!is&&function(){try{var r=document.createElement("div");r.innerHTML='';var o=r.firstChild;return o.style.behavior="url(#default#VML)",o&&typeof o.adj=="object"}catch{return!1}}();function $t(r){return navigator.userAgent.toLowerCase().indexOf(r)>=0}var Iy={ie:ts,ielt9:kr,edge:ns,webkit:Zl,android:Ai,android23:Mi,androidStock:Jh,opera:Hl,chrome:Wl,gecko:Vl,safari:rs,phantom:ed,opera12:td,win:nd,ie3d:Kl,webkit3d:Gl,gecko3d:rd,any3d:_t,mobile:Cr,mobileWebkit:Ry,mobileWebkit3d:Ay,msPointer:Tn,pointer:Ut,touch:Ft,mobileOpera:id,mobileGecko:My,retina:Ln,passiveEvents:Nr,canvas:od,svg:is,vml:os},ql=Tn?"MSPointerDown":"pointerdown",Ql=Tn?"MSPointerMove":"pointermove",Yl=Tn?"MSPointerUp":"pointerup",Xl=Tn?"MSPointerCancel":"pointercancel",Rr={},sd=!1;function zy(r,o,l,c){return o==="touchstart"?by(r,l,c):o==="touchmove"?Uy(r,l,c):o==="touchend"&&Fy(r,l,c),this}function jy(r,o,l){var c=r["_leaflet_"+o+l];return o==="touchstart"?r.removeEventListener(ql,c,!1):o==="touchmove"?r.removeEventListener(Ql,c,!1):o==="touchend"&&(r.removeEventListener(Yl,c,!1),r.removeEventListener(Xl,c,!1)),this}function by(r,o,l){var c=u(function(d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&>(d),Jl(d,o)});r["_leaflet_touchstart"+l]=c,r.addEventListener(ql,c,!1),sd||(document.addEventListener(ql,Dy,!0),document.addEventListener(Ql,By,!0),document.addEventListener(Yl,ad,!0),document.addEventListener(Xl,ad,!0),sd=!0)}function Dy(r){Rr[r.pointerId]=r}function By(r){Rr[r.pointerId]&&(Rr[r.pointerId]=r)}function ad(r){delete Rr[r.pointerId]}function Jl(r,o){r.touches=[];for(var l in Rr)r.touches.push(Rr[l]);r.changedTouches=[r],o(r)}function Uy(r,o,l){var c=function(d){d.pointerType===(d.MSPOINTER_TYPE_MOUSE||"mouse")&&d.buttons===0||Jl(d,o)};r["_leaflet_touchmove"+l]=c,r.addEventListener(Ql,c,!1)}function Fy(r,o,l){var c=function(d){Jl(d,o)};r["_leaflet_touchend"+l]=c,r.addEventListener(Yl,c,!1),r.addEventListener(Xl,c,!1)}var ss=Tn?"MSPointerDown":Ut?"pointerdown":"touchstart",as=Tn?"MSPointerUp":Ut?"pointerup":"touchend",Ar="_leaflet_";function $y(r,o,l){var c,d,_=!1,P=250;function k(I){if(Ut){if(!I.isPrimary||I.pointerType==="mouse")return}else if(I.touches.length>1)return;var B=Date.now(),H=B-(c||B);d=I.touches?I.touches[0]:I,_=H>0&&H<=P,c=B}function C(I){if(_&&!d.cancelBubble){if(Ut){if(I.pointerType==="mouse")return;var B={},H,oe;for(oe in d)H=d[oe],B[oe]=H&&H.bind?H.bind(d):H;d=B}d.type="dblclick",d.button=0,o(d),c=null}}return r[Ar+ss+l]=k,r[Ar+as+l]=C,r[Ar+"dblclick"+l]=o,r.addEventListener(ss,k,Nr?{passive:!1}:!1),r.addEventListener(as,C,Nr?{passive:!1}:!1),r.addEventListener("dblclick",o,!1),this}function Zy(r,o){var l=r[Ar+ss+o],c=r[Ar+as+o],d=r[Ar+"dblclick"+o];return r.removeEventListener(ss,l,Nr?{passive:!1}:!1),r.removeEventListener(as,c,Nr?{passive:!1}:!1),r.removeEventListener("dblclick",d,!1),this}var eu=cs(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ii=cs(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ld=Ii==="webkitTransition"||Ii==="OTransition"?Ii+"End":"transitionend";function ud(r){return typeof r=="string"?document.getElementById(r):r}function zi(r,o){var l=r.style[o]||r.currentStyle&&r.currentStyle[o];if((!l||l==="auto")&&document.defaultView){var c=document.defaultView.getComputedStyle(r,null);l=c?c[o]:null}return l==="auto"?null:l}function ie(r,o,l){var c=document.createElement(r);return c.className=o||"",l&&l.appendChild(c),c}function ge(r){var o=r.parentNode;o&&o.removeChild(r)}function ls(r){for(;r.firstChild;)r.removeChild(r.firstChild)}function Mr(r){var o=r.parentNode;o&&o.lastChild!==r&&o.appendChild(r)}function Ir(r){var o=r.parentNode;o&&o.firstChild!==r&&o.insertBefore(r,o.firstChild)}function tu(r,o){if(r.classList!==void 0)return r.classList.contains(o);var l=us(r);return l.length>0&&new RegExp("(^|\\s)"+o+"(\\s|$)").test(l)}function q(r,o){if(r.classList!==void 0)for(var l=E(o),c=0,d=l.length;cthis.options.maxZoom)?this.setZoom(r):this},panInsideBounds:function(r,o){this._enforcingBounds=!0;var l=this.getCenter(),c=this._limitCenter(l,this._zoom,he(r));return l.equals(c)||this.panTo(c,o),this._enforcingBounds=!1,this},panInside:function(r,o){o=o||{};var l=D(o.paddingTopLeft||o.padding||[0,0]),c=D(o.paddingBottomRight||o.padding||[0,0]),d=this.getCenter(),_=this.project(d),P=this.project(r),k=this.getPixelBounds(),C=k.getSize().divideBy(2),I=ae([k.min.add(l),k.max.subtract(c)]);if(!I.contains(P)){this._enforcingBounds=!0;var B=_.subtract(P),H=D(P.x+B.x,P.y+B.y);(P.xI.max.x)&&(H.x=_.x-B.x,B.x>0?H.x+=C.x-l.x:H.x-=C.x-c.x),(P.yI.max.y)&&(H.y=_.y-B.y,B.y>0?H.y+=C.y-l.y:H.y-=C.y-c.y),this.panTo(this.unproject(H),o),this._enforcingBounds=!1}return this},invalidateSize:function(r){if(!this._loaded)return this;r=s({animate:!1,pan:!0},r===!0?{animate:!0}:r);var o=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var l=this.getSize(),c=o.divideBy(2).round(),d=l.divideBy(2).round(),_=c.subtract(d);return!_.x&&!_.y?this:(r.animate&&r.pan?this.panBy(_):(r.pan&&this._rawPanBy(_),this.fire("move"),r.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(u(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:o,newSize:l}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(r){if(r=this._locateOptions=s({timeout:1e4,watch:!1},r),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var o=u(this._handleGeolocationResponse,this),l=u(this._handleGeolocationError,this);return r.watch?this._locationWatchId=navigator.geolocation.watchPosition(o,l,r):navigator.geolocation.getCurrentPosition(o,l,r),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(r){var o=r.code,l=r.message||(o===1?"permission denied":o===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:o,message:"Geolocation error: "+l+"."})},_handleGeolocationResponse:function(r){var o=r.coords.latitude,l=r.coords.longitude,c=new se(o,l),d=c.toBounds(r.coords.accuracy*2),_=this._locateOptions;if(_.setView){var P=this.getBoundsZoom(d);this.setView(c,_.maxZoom?Math.min(P,_.maxZoom):P)}var k={latlng:c,bounds:d,timestamp:r.timestamp};for(var C in r.coords)typeof r.coords[C]=="number"&&(k[C]=r.coords[C]);this.fire("locationfound",k)},addHandler:function(r,o){if(!o)return this;var l=this[r]=new o(this);return this._handlers.push(l),this.options[r]&&l.enable(),this},remove:function(){if(this._initEvents(!0),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(),ge(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Oe(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var r;for(r in this._layers)this._layers[r].remove();for(r in this._panes)ge(this._panes[r]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(r,o){var l="leaflet-pane"+(r?" leaflet-"+r.replace("Pane","")+"-pane":""),c=ie("div",l,o||this._mapPane);return r&&(this._panes[r]=c),c},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var r=this.getPixelBounds(),o=this.unproject(r.getBottomLeft()),l=this.unproject(r.getTopRight());return new Me(o,l)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(r,o,l){r=he(r),l=D(l||[0,0]);var c=this.getZoom()||0,d=this.getMinZoom(),_=this.getMaxZoom(),P=r.getNorthWest(),k=r.getSouthEast(),C=this.getSize().subtract(l),I=ae(this.project(k,c),this.project(P,c)).getSize(),B=_t?this.options.zoomSnap:1,H=C.x/I.x,oe=C.y/I.y,ln=o?Math.max(H,oe):Math.min(H,oe);return c=this.getScaleZoom(ln,c),B&&(c=Math.round(c/(B/100))*(B/100),c=o?Math.ceil(c/B)*B:Math.floor(c/B)*B),Math.max(d,Math.min(_,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new M(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(r,o){var l=this._getTopLeftPoint(r,o);return new K(l,l.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(r){return this.options.crs.getProjectedBounds(r===void 0?this.getZoom():r)},getPane:function(r){return typeof r=="string"?this._panes[r]:r},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(r,o){var l=this.options.crs;return o=o===void 0?this._zoom:o,l.scale(r)/l.scale(o)},getScaleZoom:function(r,o){var l=this.options.crs;o=o===void 0?this._zoom:o;var c=l.zoom(r*l.scale(o));return isNaN(c)?1/0:c},project:function(r,o){return o=o===void 0?this._zoom:o,this.options.crs.latLngToPoint(le(r),o)},unproject:function(r,o){return o=o===void 0?this._zoom:o,this.options.crs.pointToLatLng(D(r),o)},layerPointToLatLng:function(r){var o=D(r).add(this.getPixelOrigin());return this.unproject(o)},latLngToLayerPoint:function(r){var o=this.project(le(r))._round();return o._subtract(this.getPixelOrigin())},wrapLatLng:function(r){return this.options.crs.wrapLatLng(le(r))},wrapLatLngBounds:function(r){return this.options.crs.wrapLatLngBounds(he(r))},distance:function(r,o){return this.options.crs.distance(le(r),le(o))},containerPointToLayerPoint:function(r){return D(r).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(r){return D(r).add(this._getMapPanePos())},containerPointToLatLng:function(r){var o=this.containerPointToLayerPoint(D(r));return this.layerPointToLatLng(o)},latLngToContainerPoint:function(r){return this.layerPointToContainerPoint(this.latLngToLayerPoint(le(r)))},mouseEventToContainerPoint:function(r){return hd(r,this._container)},mouseEventToLayerPoint:function(r){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(r))},mouseEventToLatLng:function(r){return this.layerPointToLatLng(this.mouseEventToLayerPoint(r))},_initContainer:function(r){var o=this._container=ud(r);if(o){if(o._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Q(o,"scroll",this._onScroll,this),this._containerId=h(o)},_initLayout:function(){var r=this._container;this._fadeAnimated=this.options.fadeAnimation&&_t,q(r,"leaflet-container"+(Ft?" leaflet-touch":"")+(Ln?" leaflet-retina":"")+(kr?" leaflet-oldie":"")+(rs?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var o=zi(r,"position");o!=="absolute"&&o!=="relative"&&o!=="fixed"&&(r.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var r=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ke(this._mapPane,new M(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(q(r.markerPane,"leaflet-zoom-hide"),q(r.shadowPane,"leaflet-zoom-hide"))},_resetView:function(r,o){ke(this._mapPane,new M(0,0));var l=!this._loaded;this._loaded=!0,o=this._limitZoom(o),this.fire("viewprereset");var c=this._zoom!==o;this._moveStart(c,!1)._move(r,o)._moveEnd(c),this.fire("viewreset"),l&&this.fire("load")},_moveStart:function(r,o){return r&&this.fire("zoomstart"),o||this.fire("movestart"),this},_move:function(r,o,l){o===void 0&&(o=this._zoom);var c=this._zoom!==o;return this._zoom=o,this._lastCenter=r,this._pixelOrigin=this._getNewPixelOrigin(r),(c||l&&l.pinch)&&this.fire("zoom",l),this.fire("move",l)},_moveEnd:function(r){return r&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Oe(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(r){ke(this._mapPane,this._getMapPanePos().subtract(r))},_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(r){this._targets={},this._targets[h(this._container)]=this;var o=r?Pe:Q;o(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&o(window,"resize",this._onResize,this),_t&&this.options.transform3DLimit&&(r?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Oe(this._resizeRequest),this._resizeRequest=J(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var r=this._getMapPanePos();Math.max(Math.abs(r.x),Math.abs(r.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(r,o){for(var l=[],c,d=o==="mouseout"||o==="mouseover",_=r.target||r.srcElement,P=!1;_;){if(c=this._targets[h(_)],c&&(o==="click"||o==="preclick")&&!r._simulated&&this._draggableMoved(c)){P=!0;break}if(c&&c.listens(o,!0)&&(d&&!ps(_,r)||(l.push(c),d))||_===this._container)break;_=_.parentNode}return!l.length&&!P&&!d&&ps(_,r)&&(l=[this]),l},_handleDOMEvent:function(r){if(!(!this._loaded||pu(r))){var o=r.type;(o==="mousedown"||o==="keypress"||o==="keyup"||o==="keydown")&&au(r.target||r.srcElement),this._fireDOMEvent(r,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(r,o,l){if(r.type==="click"){var c=s({},r);c.type="preclick",this._fireDOMEvent(c,c.type,l)}if(!r._stopped&&(l=(l||[]).concat(this._findEventTargets(r,o)),!!l.length)){var d=l[0];o==="contextmenu"&&d.listens(o,!0)&>(r);var _={originalEvent:r};if(r.type!=="keypress"&&r.type!=="keydown"&&r.type!=="keyup"){var P=d.getLatLng&&(!d._radius||d._radius<=10);_.containerPoint=P?this.latLngToContainerPoint(d.getLatLng()):this.mouseEventToContainerPoint(r),_.layerPoint=this.containerPointToLayerPoint(_.containerPoint),_.latlng=P?d.getLatLng():this.layerPointToLatLng(_.layerPoint)}for(var k=0;k0?Math.round(r-o)/2:Math.max(0,Math.ceil(r))-Math.max(0,Math.floor(o))},_limitZoom:function(r){var o=this.getMinZoom(),l=this.getMaxZoom(),c=_t?this.options.zoomSnap:1;return c&&(r=Math.round(r/c)*c),Math.max(o,Math.min(l,r))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ee(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(r,o){var l=this._getCenterOffset(r)._trunc();return(o&&o.animate)!==!0&&!this.getSize().contains(l)?!1:(this.panBy(l,o),!0)},_createAnimProxy:function(){var r=this._proxy=ie("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(r),this.on("zoomanim",function(o){var l=eu,c=this._proxy.style[l];or(this._proxy,this.project(o.center,o.zoom),this.getZoomScale(o.zoom,1)),c===this._proxy.style[l]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ge(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var r=this.getCenter(),o=this.getZoom();or(this._proxy,this.project(r,o),this.getZoomScale(o,1))},_catchTransitionEnd:function(r){this._animatingZoom&&r.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(r,o,l){if(this._animatingZoom)return!0;if(l=l||{},!this._zoomAnimated||l.animate===!1||this._nothingToAnimate()||Math.abs(o-this._zoom)>this.options.zoomAnimationThreshold)return!1;var c=this.getZoomScale(o),d=this._getCenterOffset(r)._divideBy(1-1/c);return l.animate!==!0&&!this.getSize().contains(d)?!1:(J(function(){this._moveStart(!0,!1)._animateZoom(r,o,!0)},this),!0)},_animateZoom:function(r,o,l,c){this._mapPane&&(l&&(this._animatingZoom=!0,this._animateToCenter=r,this._animateToZoom=o,q(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:r,zoom:o,noUpdate:c}),setTimeout(u(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ee(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),J(function(){this._moveEnd(!0)},this))}});function Gy(r,o){return new te(r,o)}var Nt=mt.extend({options:{position:"topright"},initialize:function(r){x(this,r)},getPosition:function(){return this.options.position},setPosition:function(r){var o=this._map;return o&&o.removeControl(this),this.options.position=r,o&&o.addControl(this),this},getContainer:function(){return this._container},addTo:function(r){this.remove(),this._map=r;var o=this._container=this.onAdd(r),l=this.getPosition(),c=r._controlCorners[l];return q(o,"leaflet-control"),l.indexOf("bottom")!==-1?c.insertBefore(o,c.firstChild):c.appendChild(o),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ge(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(r){this._map&&r&&r.screenX>0&&r.screenY>0&&this._map.getContainer().focus()}}),Ui=function(r){return new Nt(r)};te.include({addControl:function(r){return r.addTo(this),this},removeControl:function(r){return r.remove(),this},_initControlPos:function(){var r=this._controlCorners={},o="leaflet-",l=this._controlContainer=ie("div",o+"control-container",this._container);function c(d,_){var P=o+d+" "+o+_;r[d+_]=ie("div",P,l)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var r in this._controlCorners)ge(this._controlCorners[r]);ge(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var md=Nt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(r,o,l,c){return l1,this._baseLayersList.style.display=r?"":"none"),this._separator.style.display=o&&r?"":"none",this},_onLayerChange:function(r){this._handlingClick||this._update();var o=this._getLayer(h(r.target)),l=o.overlay?r.type==="add"?"overlayadd":"overlayremove":r.type==="add"?"baselayerchange":null;l&&this._map.fire(l,o)},_createRadioElement:function(r,o){var l='",c=document.createElement("div");return c.innerHTML=l,c.firstChild},_addItem:function(r){var o=document.createElement("label"),l=this._map.hasLayer(r.layer),c;r.overlay?(c=document.createElement("input"),c.type="checkbox",c.className="leaflet-control-layers-selector",c.defaultChecked=l):c=this._createRadioElement("leaflet-base-layers_"+h(this),l),this._layerControlInputs.push(c),c.layerId=h(r.layer),Q(c,"click",this._onInputClick,this);var d=document.createElement("span");d.innerHTML=" "+r.name;var _=document.createElement("div");o.appendChild(_),_.appendChild(c),_.appendChild(d);var P=r.overlay?this._overlaysList:this._baseLayersList;return P.appendChild(o),this._checkDisabledLayers(),o},_onInputClick:function(){var r=this._layerControlInputs,o,l,c=[],d=[];this._handlingClick=!0;for(var _=r.length-1;_>=0;_--)o=r[_],l=this._getLayer(o.layerId).layer,o.checked?c.push(l):o.checked||d.push(l);for(_=0;_=0;d--)o=r[d],l=this._getLayer(o.layerId).layer,o.disabled=l.options.minZoom!==void 0&&cl.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),qy=function(r,o,l){return new md(r,o,l)},mu=Nt.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(r){var o="leaflet-control-zoom",l=ie("div",o+" leaflet-bar"),c=this.options;return this._zoomInButton=this._createButton(c.zoomInText,c.zoomInTitle,o+"-in",l,this._zoomIn),this._zoomOutButton=this._createButton(c.zoomOutText,c.zoomOutTitle,o+"-out",l,this._zoomOut),this._updateDisabled(),r.on("zoomend zoomlevelschange",this._updateDisabled,this),l},onRemove:function(r){r.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(r){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(r.shiftKey?3:1))},_createButton:function(r,o,l,c,d){var _=ie("a",l,c);return _.innerHTML=r,_.href="#",_.title=o,_.setAttribute("role","button"),_.setAttribute("aria-label",o),Bi(_),Q(_,"click",nn),Q(_,"click",d,this),Q(_,"click",this._refocusOnMap,this),_},_updateDisabled:function(){var r=this._map,o="leaflet-disabled";Ee(this._zoomInButton,o),Ee(this._zoomOutButton,o),(this._disabled||r._zoom===r.getMinZoom())&&q(this._zoomOutButton,o),(this._disabled||r._zoom===r.getMaxZoom())&&q(this._zoomInButton,o)}});te.mergeOptions({zoomControl:!0}),te.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new mu,this.addControl(this.zoomControl))});var Qy=function(r){return new mu(r)},_d=Nt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(r){var o="leaflet-control-scale",l=ie("div",o),c=this.options;return this._addScales(c,o+"-line",l),r.on(c.updateWhenIdle?"moveend":"move",this._update,this),r.whenReady(this._update,this),l},onRemove:function(r){r.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(r,o,l){r.metric&&(this._mScale=ie("div",o,l)),r.imperial&&(this._iScale=ie("div",o,l))},_update:function(){var r=this._map,o=r.getSize().y/2,l=r.distance(r.containerPointToLatLng([0,o]),r.containerPointToLatLng([this.options.maxWidth,o]));this._updateScales(l)},_updateScales:function(r){this.options.metric&&r&&this._updateMetric(r),this.options.imperial&&r&&this._updateImperial(r)},_updateMetric:function(r){var o=this._getRoundNum(r),l=o<1e3?o+" m":o/1e3+" km";this._updateScale(this._mScale,l,o/r)},_updateImperial:function(r){var o=r*3.2808399,l,c,d;o>5280?(l=o/5280,c=this._getRoundNum(l),this._updateScale(this._iScale,c+" mi",c/l)):(d=this._getRoundNum(o),this._updateScale(this._iScale,d+" ft",d/o))},_updateScale:function(r,o,l){r.style.width=Math.round(this.options.maxWidth*l)+"px",r.innerHTML=o},_getRoundNum:function(r){var o=Math.pow(10,(Math.floor(r)+"").length-1),l=r/o;return l=l>=10?10:l>=5?5:l>=3?3:l>=2?2:1,o*l}}),Yy=function(r){return new _d(r)},_u=Nt.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(r){x(this,r),this._attributions={}},onAdd:function(r){r.attributionControl=this,this._container=ie("div","leaflet-control-attribution"),Bi(this._container);for(var o in r._layers)r._layers[o].getAttribution&&this.addAttribution(r._layers[o].getAttribution());return this._update(),this._container},setPrefix:function(r){return this.options.prefix=r,this._update(),this},addAttribution:function(r){return r?(this._attributions[r]||(this._attributions[r]=0),this._attributions[r]++,this._update(),this):this},removeAttribution:function(r){return r?(this._attributions[r]&&(this._attributions[r]--,this._update()),this):this},_update:function(){if(this._map){var r=[];for(var o in this._attributions)this._attributions[o]&&r.push(o);var l=[];this.options.prefix&&l.push(this.options.prefix),r.length&&l.push(r.join(", ")),this._container.innerHTML=l.join(" | ")}}});te.mergeOptions({attributionControl:!0}),te.addInitHook(function(){this.options.attributionControl&&new _u().addTo(this)});var Xy=function(r){return new _u(r)};Nt.Layers=md,Nt.Zoom=mu,Nt.Scale=_d,Nt.Attribution=_u,Ui.layers=qy,Ui.zoom=Qy,Ui.scale=Yy,Ui.attribution=Xy;var Zt=mt.extend({initialize:function(r){this._map=r},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}});Zt.addTo=function(r,o){return r.addHandler(o,this),this};var Jy={Events:Be},vd=Ft?"touchstart mousedown":"mousedown",gd={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},vu={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ar=tn.extend({options:{clickTolerance:3},initialize:function(r,o,l,c){x(this,c),this._element=r,this._dragStartTarget=o||r,this._preventOutline=l},enable:function(){this._enabled||(Q(this._dragStartTarget,vd,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ar._dragging===this&&this.finishDrag(),Pe(this._dragStartTarget,vd,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(r){if(!(r._simulated||!this._enabled)&&(this._moved=!1,!tu(this._element,"leaflet-zoom-anim")&&!(ar._dragging||r.shiftKey||r.which!==1&&r.button!==1&&!r.touches)&&(ar._dragging=this,this._preventOutline&&au(this._element),iu(),ji(),!this._moving))){this.fire("down");var o=r.touches?r.touches[0]:r,l=cd(this._element);this._startPoint=new M(o.clientX,o.clientY),this._parentScale=lu(l),Q(document,vu[r.type],this._onMove,this),Q(document,gd[r.type],this._onUp,this)}},_onMove:function(r){if(!(r._simulated||!this._enabled)){if(r.touches&&r.touches.length>1){this._moved=!0;return}var o=r.touches&&r.touches.length===1?r.touches[0]:r,l=new M(o.clientX,o.clientY)._subtract(this._startPoint);!l.x&&!l.y||Math.abs(l.x)+Math.abs(l.y)_&&(P=k,_=C);_>l&&(o[P]=1,gu(r,o,l,c,P),gu(r,o,l,P,d))}function n0(r,o){for(var l=[r[0]],c=1,d=0,_=r.length;c<_;c++)r0(r[c],r[d])>o&&(l.push(r[c]),d=c);return d<_-1&&l.push(r[_-1]),l}var xd;function Ed(r,o,l,c,d){var _=c?xd:lr(r,l),P=lr(o,l),k,C,I;for(xd=P;;){if(!(_|P))return[r,o];if(_&P)return!1;k=_||P,C=ms(r,o,k,l,d),I=lr(C,l),k===_?(r=C,_=I):(o=C,P=I)}}function ms(r,o,l,c,d){var _=o.x-r.x,P=o.y-r.y,k=c.min,C=c.max,I,B;return l&8?(I=r.x+_*(C.y-r.y)/P,B=C.y):l&4?(I=r.x+_*(k.y-r.y)/P,B=k.y):l&2?(I=C.x,B=r.y+P*(C.x-r.x)/_):l&1&&(I=k.x,B=r.y+P*(k.x-r.x)/_),new M(I,B,d)}function lr(r,o){var l=0;return r.xo.max.x&&(l|=2),r.yo.max.y&&(l|=8),l}function r0(r,o){var l=o.x-r.x,c=o.y-r.y;return l*l+c*c}function Fi(r,o,l,c){var d=o.x,_=o.y,P=l.x-d,k=l.y-_,C=P*P+k*k,I;return C>0&&(I=((r.x-d)*P+(r.y-_)*k)/C,I>1?(d=l.x,_=l.y):I>0&&(d+=P*I,_+=k*I)),P=r.x-d,k=r.y-_,c?P*P+k*k:new M(d,_)}function rn(r){return!T(r[0])||typeof r[0][0]!="object"&&typeof r[0][0]<"u"}function Sd(r){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),rn(r)}var i0={simplify:yd,pointToSegmentDistance:wd,closestPointOnSegment:e0,clipSegment:Ed,_getEdgeIntersection:ms,_getBitCode:lr,_sqClosestPointOnSegment:Fi,isFlat:rn,_flat:Sd};function Pd(r,o,l){var c,d=[1,4,2,8],_,P,k,C,I,B,H,oe;for(_=0,B=r.length;_1e-7;k++)I=d*Math.sin(P),I=Math.pow((1-I)/(1+I),d/2),C=Math.PI/2-2*Math.atan(_*I)-P,P+=C;return new se(P*o,r.x*o/l)}},s0={LonLat:yu,Mercator:wu,SphericalMercator:Bl},a0=s({},Pn,{code:"EPSG:3395",projection:wu,transformation:function(){var r=.5/(Math.PI*wu.R);return Ri(r,.5,-r,.5)}()}),Td=s({},Pn,{code:"EPSG:4326",projection:yu,transformation:Ri(1/180,1,-1/180,.5)}),l0=s({},et,{projection:yu,transformation:Ri(1,0,-1,0),scale:function(r){return Math.pow(2,r)},zoom:function(r){return Math.log(r)/Math.LN2},distance:function(r,o){var l=o.lng-r.lng,c=o.lat-r.lat;return Math.sqrt(l*l+c*c)},infinite:!0});et.Earth=Pn,et.EPSG3395=a0,et.EPSG3857=Fl,et.EPSG900913=Cy,et.EPSG4326=Td,et.Simple=l0;var Rt=tn.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(r){return r.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(r){return r&&r.removeLayer(this),this},getPane:function(r){return this._map.getPane(r?this.options[r]||r:this.options.pane)},addInteractiveTarget:function(r){return this._map._targets[h(r)]=this,this},removeInteractiveTarget:function(r){return delete this._map._targets[h(r)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(r){var o=r.target;if(o.hasLayer(this)){if(this._map=o,this._zoomAnimated=o._zoomAnimated,this.getEvents){var l=this.getEvents();o.on(l,this),this.once("remove",function(){o.off(l,this)},this)}this.onAdd(o),this.getAttribution&&o.attributionControl&&o.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),o.fire("layeradd",{layer:this})}}});te.include({addLayer:function(r){if(!r._layerAdd)throw new Error("The provided object is not a Layer.");var o=h(r);return this._layers[o]?this:(this._layers[o]=r,r._mapToAdd=this,r.beforeAdd&&r.beforeAdd(this),this.whenReady(r._layerAdd,r),this)},removeLayer:function(r){var o=h(r);return this._layers[o]?(this._loaded&&r.onRemove(this),r.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(r.getAttribution()),delete this._layers[o],this._loaded&&(this.fire("layerremove",{layer:r}),r.fire("remove")),r._map=r._mapToAdd=null,this):this},hasLayer:function(r){return!!r&&h(r)in this._layers},eachLayer:function(r,o){for(var l in this._layers)r.call(o,this._layers[l]);return this},_addLayers:function(r){r=r?T(r)?r:[r]:[];for(var o=0,l=r.length;othis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()o)return P=(c-o)/l,this._map.layerPointToLatLng([_.x-P*(_.x-d.x),_.y-P*(_.y-d.y)])},getBounds:function(){return this._bounds},addLatLng:function(r,o){return o=o||this._defaultShape(),r=le(r),o.push(r),this._bounds.extend(r),this.redraw()},_setLatLngs:function(r){this._bounds=new Me,this._latlngs=this._convertLatLngs(r)},_defaultShape:function(){return rn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(r){for(var o=[],l=rn(r),c=0,d=r.length;c=2&&o[0]instanceof se&&o[0].equals(o[l-1])&&o.pop(),o},_setLatLngs:function(r){on.prototype._setLatLngs.call(this,r),rn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return rn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var r=this._renderer._bounds,o=this.options.weight,l=new M(o,o);if(r=new K(r.min.subtract(l),r.max.add(l)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(r))){if(this.options.noClip){this._parts=this._rings;return}for(var c=0,d=this._rings.length,_;cr.y!=d.y>r.y&&r.x<(d.x-c.x)*(r.y-c.y)/(d.y-c.y)+c.x&&(o=!o);return o||on.prototype._containsPoint.call(this,r,!0)}});function _0(r,o){return new Dr(r,o)}var sn=jr.extend({initialize:function(r,o){x(this,o),this._layers={},r&&this.addData(r)},addData:function(r){var o=T(r)?r:r.features,l,c,d;if(o){for(l=0,c=o.length;l0?c:[o.src];return}T(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(o.style,"objectFit")&&(o.style.objectFit="fill"),o.autoplay=!!this.options.autoplay,o.loop=!!this.options.loop,o.muted=!!this.options.muted;for(var _=0;_d?(o.height=d+"px",q(r,_)):Ee(r,_),this._containerWidth=this._container.offsetWidth},_animateZoom:function(r){var o=this._map._latLngToNewLayerPoint(this._latlng,r.zoom,r.center),l=this._getAnchor();ke(this._container,o.add(l))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var r=this._map,o=parseInt(zi(this._container,"marginBottom"),10)||0,l=this._container.offsetHeight+o,c=this._containerWidth,d=new M(this._containerLeft,-l-this._containerBottom);d._add(On(this._container));var _=r.layerPointToContainerPoint(d),P=D(this.options.autoPanPadding),k=D(this.options.autoPanPaddingTopLeft||P),C=D(this.options.autoPanPaddingBottomRight||P),I=r.getSize(),B=0,H=0;_.x+c+C.x>I.x&&(B=_.x+c-I.x+C.x),_.x-B-k.x<0&&(B=_.x-k.x),_.y+l+C.y>I.y&&(H=_.y+l-I.y+C.y),_.y-H-k.y<0&&(H=_.y-k.y),(B||H)&&r.fire("autopanstart").panBy([B,H])}},_onCloseButtonClick:function(r){this._close(),nn(r)},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),x0=function(r,o){return new Ur(r,o)};te.mergeOptions({closePopupOnClick:!0}),te.include({openPopup:function(r,o,l){return r instanceof Ur||(r=new Ur(l).setContent(r)),o&&r.setLatLng(o),this.hasLayer(r)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=r,this.addLayer(r))},closePopup:function(r){return(!r||r===this._popup)&&(r=this._popup,this._popup=null),r&&this.removeLayer(r),this}}),Rt.include({bindPopup:function(r,o){return r instanceof Ur?(x(r,o),this._popup=r,r._source=this):((!this._popup||o)&&(this._popup=new Ur(o,this)),this._popup.setContent(r)),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(r,o){return this._popup&&this._map&&(o=this._popup._prepareOpen(this,r,o),this._map.openPopup(this._popup,o)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(r){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(r)),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(r){return this._popup&&this._popup.setContent(r),this},getPopup:function(){return this._popup},_openPopup:function(r){var o=r.layer||r.target;if(this._popup&&this._map){if(nn(r),o instanceof kn){this.openPopup(r.layer||r.target,r.latlng);return}this._map.hasLayer(this._popup)&&this._popup._source===o?this.closePopup():this.openPopup(o,r.latlng)}},_movePopup:function(r){this._popup.setLatLng(r.latlng)},_onKeyPress:function(r){r.originalEvent.keyCode===13&&this._openPopup(r)}});var Fr=an.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(r){an.prototype.onAdd.call(this,r),this.setOpacity(this.options.opacity),r.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(r){an.prototype.onRemove.call(this,r),r.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var r=an.prototype.getEvents.call(this);return Ft&&!this.options.permanent&&(r.preclick=this._close),r},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var r="leaflet-tooltip",o=r+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ie("div",o)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(r){var o,l,c=this._map,d=this._container,_=c.latLngToContainerPoint(c.getCenter()),P=c.layerPointToContainerPoint(r),k=this.options.direction,C=d.offsetWidth,I=d.offsetHeight,B=D(this.options.offset),H=this._getAnchor();k==="top"?(o=C/2,l=I):k==="bottom"?(o=C/2,l=0):k==="center"?(o=C/2,l=I/2):k==="right"?(o=0,l=I/2):k==="left"?(o=C,l=I/2):P.x<_.x?(k="right",o=0,l=I/2):(k="left",o=C+(B.x+H.x)*2,l=I/2),r=r.subtract(D(o,l,!0)).add(B).add(H),Ee(d,"leaflet-tooltip-right"),Ee(d,"leaflet-tooltip-left"),Ee(d,"leaflet-tooltip-top"),Ee(d,"leaflet-tooltip-bottom"),q(d,"leaflet-tooltip-"+k),ke(d,r)},_updatePosition:function(){var r=this._map.latLngToLayerPoint(this._latlng);this._setPosition(r)},setOpacity:function(r){this.options.opacity=r,this._container&&vt(this._container,r)},_animateZoom:function(r){var o=this._map._latLngToNewLayerPoint(this._latlng,r.zoom,r.center);this._setPosition(o)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),E0=function(r,o){return new Fr(r,o)};te.include({openTooltip:function(r,o,l){return r instanceof Fr||(r=new Fr(l).setContent(r)),o&&r.setLatLng(o),this.hasLayer(r)?this:this.addLayer(r)},closeTooltip:function(r){return r&&this.removeLayer(r),this}}),Rt.include({bindTooltip:function(r,o){return r instanceof Fr?(x(r,o),this._tooltip=r,r._source=this):((!this._tooltip||o)&&(this._tooltip=new Fr(o,this)),this._tooltip.setContent(r)),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(r){if(!(!r&&this._tooltipHandlersAdded)){var o=r?"off":"on",l={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?l.add=this._openTooltip:(l.mouseover=this._openTooltip,l.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(l.mousemove=this._moveTooltip),Ft&&(l.click=this._openTooltip)),this[o](l),this._tooltipHandlersAdded=!r}},openTooltip:function(r,o){return this._tooltip&&this._map&&(o=this._tooltip._prepareOpen(this,r,o),this._map.openTooltip(this._tooltip,o),this._tooltip.options.interactive&&this._tooltip._container&&(q(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(Ee(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(r){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(r)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(r){return this._tooltip&&this._tooltip.setContent(r),this},getTooltip:function(){return this._tooltip},_openTooltip:function(r){var o=r.layer||r.target;!this._tooltip||!this._map||this.openTooltip(o,this._tooltip.options.sticky?r.latlng:void 0)},_moveTooltip:function(r){var o=r.latlng,l,c;this._tooltip.options.sticky&&r.originalEvent&&(l=this._map.mouseEventToContainerPoint(r.originalEvent),c=this._map.containerPointToLayerPoint(l),o=this._map.layerPointToLatLng(c)),this._tooltip.setLatLng(o)}});var Rd=br.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(r){var o=r&&r.tagName==="DIV"?r:document.createElement("div"),l=this.options;if(l.html instanceof Element?(ls(o),o.appendChild(l.html)):o.innerHTML=l.html!==!1?l.html:"",l.bgPos){var c=D(l.bgPos);o.style.backgroundPosition=-c.x+"px "+-c.y+"px"}return this._setIconStyles(o,"icon"),o},createShadow:function(){return null}});function S0(r){return new Rd(r)}br.Default=$i;var Zi=Rt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Cr,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(r){x(this,r)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(r){r._addZoomLimit(this)},onRemove:function(r){this._removeAllTiles(),ge(this._container),r._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Mr(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Ir(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(r){return this.options.opacity=r,this._updateOpacity(),this},setZIndex:function(r){return this.options.zIndex=r,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var r={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=p(this._onMoveEnd,this.options.updateInterval,this)),r.move=this._onMove),this._zoomAnimated&&(r.zoomanim=this._animateZoom),r},createTile:function(){return document.createElement("div")},getTileSize:function(){var r=this.options.tileSize;return r instanceof M?r:new M(r,r)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(r){for(var o=this.getPane().children,l=-r(-1/0,1/0),c=0,d=o.length,_;cthis.options.maxZoom||lc?this._retainParent(d,_,P,c):!1)},_retainChildren:function(r,o,l,c){for(var d=2*r;d<2*r+2;d++)for(var _=2*o;_<2*o+2;_++){var P=new M(d,_);P.z=l+1;var k=this._tileCoordsToKey(P),C=this._tiles[k];if(C&&C.active){C.retain=!0;continue}else C&&C.loaded&&(C.retain=!0);l+1this.options.maxZoom||this.options.minZoom!==void 0&&d1){this._setView(r,l);return}for(var H=d.min.y;H<=d.max.y;H++)for(var oe=d.min.x;oe<=d.max.x;oe++){var ln=new M(oe,H);if(ln.z=this._tileZoom,!!this._isValidTile(ln)){var ur=this._tiles[this._tileCoordsToKey(ln)];ur?ur.current=!0:P.push(ln)}}if(P.sort(function(Cn,Lu){return Cn.distanceTo(_)-Lu.distanceTo(_)}),P.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ss=document.createDocumentFragment();for(oe=0;oel.max.x)||!o.wrapLat&&(r.yl.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(r);return he(this.options.bounds).overlaps(c)},_keyToBounds:function(r){return this._tileCoordsToBounds(this._keyToTileCoords(r))},_tileCoordsToNwSe:function(r){var o=this._map,l=this.getTileSize(),c=r.scaleBy(l),d=c.add(l),_=o.unproject(c,r.z),P=o.unproject(d,r.z);return[_,P]},_tileCoordsToBounds:function(r){var o=this._tileCoordsToNwSe(r),l=new Me(o[0],o[1]);return this.options.noWrap||(l=this._map.wrapLatLngBounds(l)),l},_tileCoordsToKey:function(r){return r.x+":"+r.y+":"+r.z},_keyToTileCoords:function(r){var o=r.split(":"),l=new M(+o[0],+o[1]);return l.z=+o[2],l},_removeTile:function(r){var o=this._tiles[r];o&&(ge(o.el),delete this._tiles[r],this.fire("tileunload",{tile:o.el,coords:this._keyToTileCoords(r)}))},_initTile:function(r){q(r,"leaflet-tile");var o=this.getTileSize();r.style.width=o.x+"px",r.style.height=o.y+"px",r.onselectstart=v,r.onmousemove=v,kr&&this.options.opacity<1&&vt(r,this.options.opacity),Ai&&!Mi&&(r.style.WebkitBackfaceVisibility="hidden")},_addTile:function(r,o){var l=this._getTilePos(r),c=this._tileCoordsToKey(r),d=this.createTile(this._wrapCoords(r),u(this._tileReady,this,r));this._initTile(d),this.createTile.length<2&&J(u(this._tileReady,this,r,null,d)),ke(d,l),this._tiles[c]={el:d,coords:r,current:!0},o.appendChild(d),this.fire("tileloadstart",{tile:d,coords:r})},_tileReady:function(r,o,l){o&&this.fire("tileerror",{error:o,tile:l,coords:r});var c=this._tileCoordsToKey(r);l=this._tiles[c],l&&(l.loaded=+new Date,this._map._fadeAnimated?(vt(l.el,0),Oe(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this)):(l.active=!0,this._pruneTiles()),o||(q(l.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:l.el,coords:r})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),kr||!this._map._fadeAnimated?J(this._pruneTiles,this):setTimeout(u(this._pruneTiles,this),250)))},_getTilePos:function(r){return r.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(r){var o=new M(this._wrapX?m(r.x,this._wrapX):r.x,this._wrapY?m(r.y,this._wrapY):r.y);return o.z=r.z,o},_pxBoundsToTileRange:function(r){var o=this.getTileSize();return new K(r.min.unscaleBy(o).floor(),r.max.unscaleBy(o).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var r in this._tiles)if(!this._tiles[r].loaded)return!1;return!0}});function P0(r){return new Zi(r)}var $r=Zi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(r,o){this._url=r,o=x(this,o),o.detectRetina&&Ln&&o.maxZoom>0&&(o.tileSize=Math.floor(o.tileSize/2),o.zoomReverse?(o.zoomOffset--,o.minZoom++):(o.zoomOffset++,o.maxZoom--),o.minZoom=Math.max(0,o.minZoom)),typeof o.subdomains=="string"&&(o.subdomains=o.subdomains.split("")),Ai||this.on("tileunload",this._onTileRemove)},setUrl:function(r,o){return this._url===r&&o===void 0&&(o=!0),this._url=r,o||this.redraw(),this},createTile:function(r,o){var l=document.createElement("img");return Q(l,"load",u(this._tileOnLoad,this,o,l)),Q(l,"error",u(this._tileOnError,this,o,l)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),l.alt="",l.setAttribute("role","presentation"),l.src=this.getTileUrl(r),l},getTileUrl:function(r){var o={r:Ln?"@2x":"",s:this._getSubdomain(r),x:r.x,y:r.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var l=this._globalTileRange.max.y-r.y;this.options.tms&&(o.y=l),o["-y"]=l}return y(this._url,s(o,this.options))},_tileOnLoad:function(r,o){kr?setTimeout(u(r,this,null,o),0):r(null,o)},_tileOnError:function(r,o,l){var c=this.options.errorTileUrl;c&&o.getAttribute("src")!==c&&(o.src=c),r(l,o)},_onTileRemove:function(r){r.tile.onload=null},_getZoomForUrl:function(){var r=this._tileZoom,o=this.options.maxZoom,l=this.options.zoomReverse,c=this.options.zoomOffset;return l&&(r=o-r),r+c},_getSubdomain:function(r){var o=Math.abs(r.x+r.y)%this.options.subdomains.length;return this.options.subdomains[o]},_abortLoading:function(){var r,o;for(r in this._tiles)this._tiles[r].coords.z!==this._tileZoom&&(o=this._tiles[r].el,o.onload=v,o.onerror=v,o.complete||(o.src=b,ge(o),delete this._tiles[r]))},_removeTile:function(r){var o=this._tiles[r];if(o)return Jh||o.el.setAttribute("src",b),Zi.prototype._removeTile.call(this,r)},_tileReady:function(r,o,l){if(!(!this._map||l&&l.getAttribute("src")===b))return Zi.prototype._tileReady.call(this,r,o,l)}});function Ad(r,o){return new $r(r,o)}var Md=$r.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(r,o){this._url=r;var l=s({},this.defaultWmsParams);for(var c in o)c in this.options||(l[c]=o[c]);o=x(this,o);var d=o.detectRetina&&Ln?2:1,_=this.getTileSize();l.width=_.x*d,l.height=_.y*d,this.wmsParams=l},onAdd:function(r){this._crs=this.options.crs||r.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var o=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[o]=this._crs.code,$r.prototype.onAdd.call(this,r)},getTileUrl:function(r){var o=this._tileCoordsToNwSe(r),l=this._crs,c=ae(l.project(o[0]),l.project(o[1])),d=c.min,_=c.max,P=(this._wmsVersion>=1.3&&this._crs===Td?[d.y,d.x,_.y,_.x]:[d.x,d.y,_.x,_.y]).join(","),k=$r.prototype.getTileUrl.call(this,r);return k+N(this.wmsParams,k,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+P},setParams:function(r,o){return s(this.wmsParams,r),o||this.redraw(),this}});function T0(r,o){return new Md(r,o)}$r.WMS=Md,Ad.wms=T0;var Ht=Rt.extend({options:{padding:.1,tolerance:0},initialize:function(r){x(this,r),h(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&q(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 r={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(r.zoomanim=this._onAnimZoom),r},_onAnimZoom:function(r){this._updateTransform(r.center,r.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(r,o){var l=this._map.getZoomScale(o,this._zoom),c=On(this._container),d=this._map.getSize().multiplyBy(.5+this.options.padding),_=this._map.project(this._center,o),P=this._map.project(r,o),k=P.subtract(_),C=d.multiplyBy(-l).add(c).add(d).subtract(k);_t?or(this._container,C,l):ke(this._container,C)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var r in this._layers)this._layers[r]._reset()},_onZoomEnd:function(){for(var r in this._layers)this._layers[r]._project()},_updatePaths:function(){for(var r in this._layers)this._layers[r]._update()},_update:function(){var r=this.options.padding,o=this._map.getSize(),l=this._map.containerPointToLayerPoint(o.multiplyBy(-r)).round();this._bounds=new K(l,l.add(o.multiplyBy(1+r*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Id=Ht.extend({getEvents:function(){var r=Ht.prototype.getEvents.call(this);return r.viewprereset=this._onViewPreReset,r},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ht.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var r=this._container=document.createElement("canvas");Q(r,"mousemove",this._onMouseMove,this),Q(r,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Q(r,"mouseout",this._handleMouseOut,this),this._ctx=r.getContext("2d")},_destroyContainer:function(){Oe(this._redrawRequest),delete this._ctx,ge(this._container),Pe(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var r;this._redrawBounds=null;for(var o in this._layers)r=this._layers[o],r._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ht.prototype._update.call(this);var r=this._bounds,o=this._container,l=r.getSize(),c=Ln?2:1;ke(o,r.min),o.width=c*l.x,o.height=c*l.y,o.style.width=l.x+"px",o.style.height=l.y+"px",Ln&&this._ctx.scale(2,2),this._ctx.translate(-r.min.x,-r.min.y),this.fire("update")}},_reset:function(){Ht.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(r){this._updateDashArray(r),this._layers[h(r)]=r;var o=r._order={layer:r,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=o),this._drawLast=o,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(r){this._requestRedraw(r)},_removePath:function(r){var o=r._order,l=o.next,c=o.prev;l?l.prev=c:this._drawLast=c,c?c.next=l:this._drawFirst=l,delete r._order,delete this._layers[h(r)],this._requestRedraw(r)},_updatePath:function(r){this._extendRedrawBounds(r),r._project(),r._update(),this._requestRedraw(r)},_updateStyle:function(r){this._updateDashArray(r),this._requestRedraw(r)},_updateDashArray:function(r){if(typeof r.options.dashArray=="string"){var o=r.options.dashArray.split(/[, ]+/),l=[],c,d;for(d=0;d')}}catch{return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),L0={_initContainer:function(){this._container=ie("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ht.prototype._update.call(this),this.fire("update"))},_initPath:function(r){var o=r._container=Hi("shape");q(o,"leaflet-vml-shape "+(this.options.className||"")),o.coordsize="1 1",r._path=Hi("path"),o.appendChild(r._path),this._updateStyle(r),this._layers[h(r)]=r},_addPath:function(r){var o=r._container;this._container.appendChild(o),r.options.interactive&&r.addInteractiveTarget(o)},_removePath:function(r){var o=r._container;ge(o),r.removeInteractiveTarget(o),delete this._layers[h(r)]},_updateStyle:function(r){var o=r._stroke,l=r._fill,c=r.options,d=r._container;d.stroked=!!c.stroke,d.filled=!!c.fill,c.stroke?(o||(o=r._stroke=Hi("stroke")),d.appendChild(o),o.weight=c.weight+"px",o.color=c.color,o.opacity=c.opacity,c.dashArray?o.dashStyle=T(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):o.dashStyle="",o.endcap=c.lineCap.replace("butt","flat"),o.joinstyle=c.lineJoin):o&&(d.removeChild(o),r._stroke=null),c.fill?(l||(l=r._fill=Hi("fill")),d.appendChild(l),l.color=c.fillColor||c.color,l.opacity=c.fillOpacity):l&&(d.removeChild(l),r._fill=null)},_updateCircle:function(r){var o=r._point.round(),l=Math.round(r._radius),c=Math.round(r._radiusY||l);this._setPath(r,r._empty()?"M0 0":"AL "+o.x+","+o.y+" "+l+","+c+" 0,"+65535*360)},_setPath:function(r,o){r._path.v=o},_bringToFront:function(r){Mr(r._container)},_bringToBack:function(r){Ir(r._container)}},Es=os?Hi:Yh,Wi=Ht.extend({getEvents:function(){var r=Ht.prototype.getEvents.call(this);return r.zoomstart=this._onZoomStart,r},_initContainer:function(){this._container=Es("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Es("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ge(this._container),Pe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ht.prototype._update.call(this);var r=this._bounds,o=r.getSize(),l=this._container;(!this._svgSize||!this._svgSize.equals(o))&&(this._svgSize=o,l.setAttribute("width",o.x),l.setAttribute("height",o.y)),ke(l,r.min),l.setAttribute("viewBox",[r.min.x,r.min.y,o.x,o.y].join(" ")),this.fire("update")}},_initPath:function(r){var o=r._path=Es("path");r.options.className&&q(o,r.options.className),r.options.interactive&&q(o,"leaflet-interactive"),this._updateStyle(r),this._layers[h(r)]=r},_addPath:function(r){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(r._path),r.addInteractiveTarget(r._path)},_removePath:function(r){ge(r._path),r.removeInteractiveTarget(r._path),delete this._layers[h(r)]},_updatePath:function(r){r._project(),r._update()},_updateStyle:function(r){var o=r._path,l=r.options;o&&(l.stroke?(o.setAttribute("stroke",l.color),o.setAttribute("stroke-opacity",l.opacity),o.setAttribute("stroke-width",l.weight),o.setAttribute("stroke-linecap",l.lineCap),o.setAttribute("stroke-linejoin",l.lineJoin),l.dashArray?o.setAttribute("stroke-dasharray",l.dashArray):o.removeAttribute("stroke-dasharray"),l.dashOffset?o.setAttribute("stroke-dashoffset",l.dashOffset):o.removeAttribute("stroke-dashoffset")):o.setAttribute("stroke","none"),l.fill?(o.setAttribute("fill",l.fillColor||l.color),o.setAttribute("fill-opacity",l.fillOpacity),o.setAttribute("fill-rule",l.fillRule||"evenodd")):o.setAttribute("fill","none"))},_updatePoly:function(r,o){this._setPath(r,Xh(r._parts,o))},_updateCircle:function(r){var o=r._point,l=Math.max(Math.round(r._radius),1),c=Math.max(Math.round(r._radiusY),1)||l,d="a"+l+","+c+" 0 1,0 ",_=r._empty()?"M0 0":"M"+(o.x-l)+","+o.y+d+l*2+",0 "+d+-l*2+",0 ";this._setPath(r,_)},_setPath:function(r,o){r._path.setAttribute("d",o)},_bringToFront:function(r){Mr(r._path)},_bringToBack:function(r){Ir(r._path)}});os&&Wi.include(L0);function jd(r){return is||os?new Wi(r):null}te.include({getRenderer:function(r){var o=r.options.renderer||this._getPaneRenderer(r.options.pane)||this.options.renderer||this._renderer;return o||(o=this._renderer=this._createRenderer()),this.hasLayer(o)||this.addLayer(o),o},_getPaneRenderer:function(r){if(r==="overlayPane"||r===void 0)return!1;var o=this._paneRenderers[r];return o===void 0&&(o=this._createRenderer({pane:r}),this._paneRenderers[r]=o),o},_createRenderer:function(r){return this.options.preferCanvas&&zd(r)||jd(r)}});var bd=Dr.extend({initialize:function(r,o){Dr.prototype.initialize.call(this,this._boundsToLatLngs(r),o)},setBounds:function(r){return this.setLatLngs(this._boundsToLatLngs(r))},_boundsToLatLngs:function(r){return r=he(r),[r.getSouthWest(),r.getNorthWest(),r.getNorthEast(),r.getSouthEast()]}});function O0(r,o){return new bd(r,o)}Wi.create=Es,Wi.pointsToPath=Xh,sn.geometryToLayer=Eu,sn.coordsToLatLng=Su,sn.coordsToLatLngs=gs,sn.latLngToCoords=Pu,sn.latLngsToCoords=ys,sn.getFeature=Br,sn.asFeature=ws,te.mergeOptions({boxZoom:!0});var Dd=Zt.extend({initialize:function(r){this._map=r,this._container=r._container,this._pane=r._panes.overlayPane,this._resetStateTimeout=0,r.on("unload",this._destroy,this)},addHooks:function(){Q(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Pe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ge(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(r){if(!r.shiftKey||r.which!==1&&r.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ji(),iu(),this._startPoint=this._map.mouseEventToContainerPoint(r),Q(document,{contextmenu:nn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(r){this._moved||(this._moved=!0,this._box=ie("div","leaflet-zoom-box",this._container),q(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(r);var o=new K(this._point,this._startPoint),l=o.getSize();ke(this._box,o.min),this._box.style.width=l.x+"px",this._box.style.height=l.y+"px"},_finish:function(){this._moved&&(ge(this._box),Ee(this._container,"leaflet-crosshair")),bi(),ou(),Pe(document,{contextmenu:nn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(r){if(!(r.which!==1&&r.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(u(this._resetState,this),0);var o=new Me(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(o).fire("boxzoomend",{boxZoomBounds:o})}},_onKeyDown:function(r){r.keyCode===27&&this._finish()}});te.addInitHook("addHandler","boxZoom",Dd),te.mergeOptions({doubleClickZoom:!0});var Bd=Zt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(r){var o=this._map,l=o.getZoom(),c=o.options.zoomDelta,d=r.originalEvent.shiftKey?l-c:l+c;o.options.doubleClickZoom==="center"?o.setZoom(d):o.setZoomAround(r.containerPoint,d)}});te.addInitHook("addHandler","doubleClickZoom",Bd),te.mergeOptions({dragging:!0,inertia:!Mi,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ud=Zt.extend({addHooks:function(){if(!this._draggable){var r=this._map;this._draggable=new ar(r._mapPane,r._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),r.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),r.on("zoomend",this._onZoomEnd,this),r.whenReady(this._onZoomEnd,this))}q(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ee(this._map._container,"leaflet-grab"),Ee(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 r=this._map;if(r._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var o=he(this._map.options.maxBounds);this._offsetLimit=ae(this._map.latLngToContainerPoint(o.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(o.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;r.fire("movestart").fire("dragstart"),r.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(r){if(this._map.options.inertia){var o=this._lastTime=+new Date,l=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(l),this._times.push(o),this._prunePositions(o)}this._map.fire("move",r).fire("drag",r)},_prunePositions:function(r){for(;this._positions.length>1&&r-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var r=this._map.getSize().divideBy(2),o=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=o.subtract(r).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(r,o){return r-(r-o)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var r=this._draggable._newPos.subtract(this._draggable._startPos),o=this._offsetLimit;r.xo.max.x&&(r.x=this._viscousLimit(r.x,o.max.x)),r.y>o.max.y&&(r.y=this._viscousLimit(r.y,o.max.y)),this._draggable._newPos=this._draggable._startPos.add(r)}},_onPreDragWrap:function(){var r=this._worldWidth,o=Math.round(r/2),l=this._initialWorldOffset,c=this._draggable._newPos.x,d=(c-o+l)%r+o-l,_=(c+o+l)%r-o-l,P=Math.abs(d+l)0?_:-_))-o;this._delta=0,this._startTime=null,P&&(r.options.scrollWheelZoom==="center"?r.setZoom(o+P):r.setZoomAround(this._lastMousePos,o+P))}});te.addInitHook("addHandler","scrollWheelZoom",$d),te.mergeOptions({tap:!0,tapTolerance:15});var Zd=Zt.extend({addHooks:function(){Q(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Pe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(r){if(r.touches){if(gt(r),this._fireClick=!0,r.touches.length>1){this._fireClick=!1,clearTimeout(this._holdTimeout);return}var o=r.touches[0],l=o.target;this._startPos=this._newPos=new M(o.clientX,o.clientY),l.tagName&&l.tagName.toLowerCase()==="a"&&q(l,"leaflet-active"),this._holdTimeout=setTimeout(u(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",o))},this),1e3),this._simulateEvent("mousedown",o),Q(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(r){if(clearTimeout(this._holdTimeout),Pe(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&r&&r.changedTouches){var o=r.changedTouches[0],l=o.target;l&&l.tagName&&l.tagName.toLowerCase()==="a"&&Ee(l,"leaflet-active"),this._simulateEvent("mouseup",o),this._isTapValid()&&this._simulateEvent("click",o)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(r){var o=r.touches[0];this._newPos=new M(o.clientX,o.clientY),this._simulateEvent("mousemove",o)},_simulateEvent:function(r,o){var l=document.createEvent("MouseEvents");l._simulated=!0,o.target._simulatedClick=!0,l.initMouseEvent(r,!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(l)}});Ft&&(!Ut||rs)&&te.addInitHook("addHandler","tap",Zd),te.mergeOptions({touchZoom:Ft&&!Mi,bounceAtZoomLimits:!0});var Hd=Zt.extend({addHooks:function(){q(this._map._container,"leaflet-touch-zoom"),Q(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ee(this._map._container,"leaflet-touch-zoom"),Pe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(r){var o=this._map;if(!(!r.touches||r.touches.length!==2||o._animatingZoom||this._zooming)){var l=o.mouseEventToContainerPoint(r.touches[0]),c=o.mouseEventToContainerPoint(r.touches[1]);this._centerPoint=o.getSize()._divideBy(2),this._startLatLng=o.containerPointToLatLng(this._centerPoint),o.options.touchZoom!=="center"&&(this._pinchStartLatLng=o.containerPointToLatLng(l.add(c)._divideBy(2))),this._startDist=l.distanceTo(c),this._startZoom=o.getZoom(),this._moved=!1,this._zooming=!0,o._stop(),Q(document,"touchmove",this._onTouchMove,this),Q(document,"touchend",this._onTouchEnd,this),gt(r)}},_onTouchMove:function(r){if(!(!r.touches||r.touches.length!==2||!this._zooming)){var o=this._map,l=o.mouseEventToContainerPoint(r.touches[0]),c=o.mouseEventToContainerPoint(r.touches[1]),d=l.distanceTo(c)/this._startDist;if(this._zoom=o.getScaleZoom(d,this._startZoom),!o.options.bounceAtZoomLimits&&(this._zoomo.getMaxZoom()&&d>1)&&(this._zoom=o._limitZoom(this._zoom)),o.options.touchZoom==="center"){if(this._center=this._startLatLng,d===1)return}else{var _=l._add(c)._divideBy(2)._subtract(this._centerPoint);if(d===1&&_.x===0&&_.y===0)return;this._center=o.unproject(o.project(this._pinchStartLatLng,this._zoom).subtract(_),this._zoom)}this._moved||(o._moveStart(!0,!1),this._moved=!0),Oe(this._animRequest);var P=u(o._move,o,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=J(P,this,!0),gt(r)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Oe(this._animRequest),Pe(document,"touchmove",this._onTouchMove,this),Pe(document,"touchend",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))}});te.addInitHook("addHandler","touchZoom",Hd),te.BoxZoom=Dd,te.DoubleClickZoom=Bd,te.Drag=Ud,te.Keyboard=Fd,te.ScrollWheelZoom=$d,te.Tap=Zd,te.TouchZoom=Hd,n.version=i,n.Control=Nt,n.control=Ui,n.Browser=Iy,n.Evented=tn,n.Mixin=Jy,n.Util=ir,n.Class=mt,n.Handler=Zt,n.extend=s,n.bind=u,n.stamp=h,n.setOptions=x,n.DomEvent=Ky,n.DomUtil=Wy,n.PosAnimation=pd,n.Draggable=ar,n.LineUtil=i0,n.PolyUtil=o0,n.Point=M,n.point=D,n.Bounds=K,n.bounds=ae,n.Transformation=Ul,n.transformation=Ri,n.Projection=s0,n.LatLng=se,n.latLng=le,n.LatLngBounds=Me,n.latLngBounds=he,n.CRS=et,n.GeoJSON=sn,n.geoJSON=kd,n.geoJson=v0,n.Layer=Rt,n.LayerGroup=zr,n.layerGroup=u0,n.FeatureGroup=jr,n.featureGroup=c0,n.ImageOverlay=xs,n.imageOverlay=g0,n.VideoOverlay=Cd,n.videoOverlay=y0,n.SVGOverlay=Nd,n.svgOverlay=w0,n.DivOverlay=an,n.Popup=Ur,n.popup=x0,n.Tooltip=Fr,n.tooltip=E0,n.Icon=br,n.icon=f0,n.DivIcon=Rd,n.divIcon=S0,n.Marker=_s,n.marker=h0,n.TileLayer=$r,n.tileLayer=Ad,n.GridLayer=Zi,n.gridLayer=P0,n.SVG=Wi,n.svg=jd,n.Renderer=Ht,n.Canvas=Id,n.canvas=zd,n.Path=kn,n.CircleMarker=vs,n.circleMarker=d0,n.Circle=xu,n.circle=p0,n.Polyline=on,n.polyline=m0,n.Polygon=Dr,n.polygon=_0,n.Rectangle=bd,n.rectangle=O0,n.Map=te,n.map=Gy;var k0=window.L;n.noConflict=function(){return window.L=k0,this},window.L=n})})(Of,Of.exports);var Si=Of.exports;const qm=Tr(Si);function hL(e,t){const[n,i]=z.useState(null),s=z.useRef(!1);return z.useEffect(()=>{if(e.current!==null&&!s.current){const a=new Si.Map(e.current,{center:{lat:t.lat,lng:t.lng},zoom:10,zoomControl:!0}),u=new Si.TileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO'});a.addLayer(u),i(a),s.current=!0}},[e,t]),n}const dL=new Si.Icon({iconUrl:"https://assets.htmlacademy.ru/content/intensive/javascript-1/demo/interactive-map/pin.svg",iconSize:[40,40],iconAnchor:[20,40]}),pL=new Si.Icon({iconUrl:"https://assets.htmlacademy.ru/content/intensive/javascript-1/demo/interactive-map/main-pin.svg",iconSize:[40,40],iconAnchor:[20,40]}),mL=new Si.Icon({iconUrl:"../../markup/img/pin-active.svg",iconSize:[40,40],iconAnchor:[20,40]});function ky(e){const{offers:t,currentCity:n,activeOffer:i,selectedPoint:s}=e,a=z.useRef(null),u=hL(a,n);return z.useEffect(()=>{u&&(u.eachLayer(f=>{f instanceof qm.Marker&&f.remove()}),t==null||t.forEach(f=>{qm.marker({lat:f.location.latitude,lng:f.location.longitude},{icon:i===f.id?mL:s!==void 0&&f.title===s.title?pL:dL}).addTo(u)}),u.flyTo({lat:n.lat,lng:n.lng},12))},[u,t,i,s]),w.jsx("div",{style:{height:"100%"},ref:a})}const _L=({currentCity:e,cities:t,offers:n})=>{const i=Yo(),s=es(),a=rt(Py),u=rt(bl),f=z.useMemo(()=>u,[u]),h=z.useMemo(()=>a,[a]),p=z.useMemo(()=>n,[n]),m=N=>{s(oy(N))},[v,g]=z.useState(null),[O,E]=z.useState(dn.popular),x=z.useMemo(()=>(p??[]).filter(N=>N.city.name===(e==null?void 0:e.title)).slice().sort((N,S)=>{switch(O){case dn.lowToHigh:return N.price-S.price;case dn.highToLow:return S.price-N.price;case dn.topRated:return S.rating-N.rating;default:return 0}}),[e==null?void 0:e.title,p,O]);return w.jsxs("div",{className:"page page--gray page--main",children:[w.jsx("header",{className:"header",children:w.jsx("div",{className:"container",children:w.jsxs("div",{className:"header__wrapper",children:[w.jsx("div",{className:"header__left",children:w.jsx("a",{className:"header__logo-link header__logo-link--active",onClick:()=>i(Xt.Main),children:w.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})}),w.jsx("nav",{className:"header__nav",children:w.jsxs("ul",{className:"header__nav-list",children:[f===Fe.Auth?w.jsx("li",{className:"header__nav-item user",children:w.jsxs("a",{className:"header__nav-link header__nav-link--profile",href:"#",children:[w.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),w.jsx("span",{className:"header__user-name user__name",children:h}),w.jsx("span",{className:"header__favorite-count",children:"3"})]})}):null,w.jsx("li",{className:"header__nav-item",children:f===Fe.Auth?w.jsx(Yt,{className:"header__nav-link",to:"/",children:w.jsx("span",{className:"header__signout",onClick:N=>{N.preventDefault(),s($h())},children:"Sign out"})}):w.jsx(Yt,{className:"header__nav-link",to:Xt.Login,children:w.jsx("span",{className:"header__signout",children:" Sign in"})})})]})})]})})}),w.jsxs("main",{className:"page__main page__main--index",children:[w.jsx("h1",{className:"visually-hidden",children:"Cities"}),w.jsx("div",{className:"tabs",children:w.jsx("section",{className:"locations container",children:w.jsx(uL,{currentCity:e.title,cities:t,onSelect:m})})}),w.jsx("div",{className:"cities",children:w.jsxs("div",{className:"cities__places-container container",children:[w.jsxs("section",{className:"cities__places places",children:[w.jsx("h2",{className:"visually-hidden",children:"Places"}),w.jsxs("b",{className:"places__found",children:[p==null?void 0:p.filter(N=>N.city.name===e.title).length," places to stay in ",e.title]}),w.jsx(fL,{currentSort:O,onSortChange:E}),w.jsx("div",{className:"cities__places-list places__list tabs__content",children:w.jsx(Oy,{offers:x==null?void 0:x.filter(N=>N.city.name===e.title),cardcssname:ul.citiesList,setActiveOffer:g})})]}),w.jsx("div",{className:"cities__right-section",children:w.jsx("section",{className:"cities__map map",children:w.jsx(ky,{offers:x==null?void 0:x.filter(N=>N.city.name===e.title),selectedPoint:x==null?void 0:x[0],activeOffer:v,currentCity:e})})})]})})]})]})},vL=({offers:e})=>w.jsx("div",{className:"page",children:w.jsx("main",{className:"page__main page__main--favorites",children:w.jsx("div",{className:"page__favorites-container container",children:w.jsxs("section",{className:"favorites",children:[w.jsx("h1",{className:"favorites__title",children:"Saved listings"}),w.jsx("div",{className:"favorites__list",children:e==null?void 0:e.map(t=>w.jsx(Ly,{offer:t,cardcssname:ul.favoritePlace},t.id))})]})})})});function gL(){const[e,t]=z.useState(""),[n,i]=z.useState("");function s(v){t(v.target.value)}function a(v){i(v.target.value)}const u=rt(bl),f=es(),h=Yo(),p=rt(sL);z.useEffect(()=>{u===Fe.Auth&&h(Xt.Main)},[u,h]);const m=v=>{v.preventDefault(),e!==""&&n!==""&&f(aa({email:e,password:n})).then(g=>{g.meta.requestStatus!=="rejected"&&!p&&(t(g.meta.arg.email),i(g.meta.arg.password))})};return w.jsxs("div",{className:"page page--gray page--login",children:[w.jsx(ra,{children:w.jsx("title",{children:"6 Cities: Login or Register"})}),w.jsx("header",{className:"header",children:w.jsx("div",{className:"container",children:w.jsx("div",{className:"header__wrapper",children:w.jsx("div",{className:"header__left",children:w.jsx(Yt,{className:"header__logo-link",to:Xt.Main,children:w.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})})})})}),w.jsx("main",{className:"page__main page__main--login",children:w.jsxs("div",{className:"page__login-container container",children:[w.jsxs("section",{className:"login",children:[w.jsx("h1",{className:"login__title",children:"Sign in"}),w.jsxs("form",{className:"login__form form",onSubmit:m,action:"#",method:"post",children:[w.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[w.jsx("label",{className:"visually-hidden",children:"E-mail"}),w.jsx("input",{"data-testid":"email_input",className:"login__input form__input",onChange:s,value:e,type:"email",name:"email",placeholder:"Email",required:!0})]}),w.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[w.jsx("label",{className:"visually-hidden",children:"Password"}),w.jsx("input",{"data-testid":"password_input",className:"login__input form__input",onChange:a,value:n,type:"password",pattern:"(?=.*\\d)(?=.*[a-zA-Z]).{2,}",title:"Contains one letter and one digit",name:"password",placeholder:"Password",required:!0})]}),w.jsx("button",{className:"login__submit form__submit button",type:"submit",children:"Sign in"})]})]}),w.jsx("section",{className:"locations locations--login locations--current",children:w.jsx("div",{className:"locations__item",children:w.jsx(Yt,{"data-testid":"location_item-link",className:"locations__item-link",to:Xt.Main,children:w.jsx("span",{children:"Amsterdam"})})})})]})})]})}const yL=Et.memo(gL);function wL(){return w.jsxs("div",{className:"page page--gray page--main",children:[w.jsx("header",{className:"header",children:w.jsx("div",{className:"container",children:w.jsxs("div",{className:"header__wrapper",children:[w.jsx("div",{className:"header__left",children:w.jsx("a",{className:"header__logo-link header__logo-link--active",children:w.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})}),w.jsx("nav",{className:"header__nav",children:w.jsxs("ul",{className:"header__nav-list",children:[w.jsx("li",{className:"header__nav-item user",children:w.jsxs("a",{className:"header__nav-link header__nav-link--profile",href:"#",children:[w.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),w.jsx("span",{className:"header__user-name user__name",children:"Oliver.conner@gmail.com"}),w.jsx("span",{className:"header__favorite-count",children:"3"})]})}),w.jsx("li",{className:"header__nav-item",children:w.jsx("a",{className:"header__nav-link",href:"#",children:w.jsx("span",{className:"header__signout",children:"Sign out"})})})]})})]})})}),w.jsxs("main",{className:"page__main page__main--index",children:[w.jsx("h1",{className:"visually-hidden",children:"Cities"}),w.jsxs("div",{className:"tabs",children:[w.jsx("section",{className:"locations container",children:w.jsxs("ul",{className:"locations__list tabs__list",children:[w.jsx("li",{className:"locations__item",children:w.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:w.jsx("span",{children:"Paris"})})}),w.jsx("li",{className:"locations__item",children:w.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:w.jsx("span",{children:"Cologne"})})}),w.jsx("li",{className:"locations__item",children:w.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:w.jsx("span",{children:"Brussels"})})}),w.jsx("li",{className:"locations__item",children:w.jsx("a",{className:"locations__item-link tabs__item tabs__item--active",children:w.jsx("span",{children:"Amsterdam"})})}),w.jsx("li",{className:"locations__item",children:w.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:w.jsx("span",{children:"Hamburg"})})}),w.jsx("li",{className:"locations__item",children:w.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:w.jsx("span",{children:"Dusseldorf"})})})]})}),w.jsxs("h2",{style:{textAlign:"center"},children:["404 Not Found. Page not found. ",w.jsx(Yt,{to:"/",children:" Back to main page"})]}),w.jsx("div",{className:"cities__right-section",children:w.jsx("section",{className:"cities__map map"})})]})]})]})}const xL=()=>{const[e,t]=z.useState(0),[n,i]=z.useState(""),s=rt(h=>h.offerIdDetails.offer.id),a=es(),u=h=>{h.preventDefault(),n!==null&&e>0&&a(rT({rating:e,comment:n,id:s}))},f=[5,4,3,2,1];return w.jsxs("form",{className:"reviews__form form",onSubmit:u,children:[w.jsx("label",{className:"reviews__label form__label",htmlFor:"review",children:"Your review"}),w.jsx("div",{className:"reviews__rating-form form__rating",children:f.map(h=>w.jsxs(Et.Fragment,{children:[w.jsx("input",{className:"form__rating-input visually-hidden",name:"rating",value:h,id:`${h}-stars`,type:"radio",onChange:()=>t(h)}),w.jsx("label",{htmlFor:`${h}-stars`,className:"reviews__rating-label form__rating-label",title:`${h} stars`,children:w.jsx("svg",{className:"form__star-image",width:"37",height:"33",children:w.jsx("use",{xlinkHref:"#icon-star"})})})]},h))}),w.jsx("textarea",{className:"reviews__textarea form__textarea",id:"review",name:"review",placeholder:"Tell how was your stay, what you like and what can be improved",value:n,onChange:h=>i(h.target.value)}),w.jsxs("div",{className:"reviews__button-wrapper",children:[w.jsxs("p",{className:"reviews__help",children:["To submit review please make sure to set ",w.jsx("span",{className:"reviews__star",children:"rating"})," and describe your stay with at least ",w.jsx("b",{className:"reviews__text-amount",children:"50 characters"}),"."]}),w.jsx("button",{className:"reviews__submit form__submit button",type:"submit",disabled:n.length<50||e===0,children:"Submit"})]})]})},EL=({rating:e,mode:t="full",containerMix:n,starsMix:i})=>{const s=t==="full";return w.jsxs("div",{className:Ho(n,"rating"),children:[w.jsxs("div",{className:Ho(i,"rating__stars"),children:[w.jsx("span",{style:{width:`${20*Math.trunc(e)}%`}}),w.jsxs("span",{className:"visually-hidden",children:["Rating ",e]})]}),!!s&&w.jsx("span",{className:"offer__rating-value rating__value",children:e})]})},SL=({comment:e,date:t,rating:n,user:i})=>w.jsxs("li",{className:"reviews__item",children:[w.jsxs("div",{className:"reviews__user user",children:[w.jsx("div",{className:"reviews__avatar-wrapper user__avatar-wrapper",children:w.jsx("img",{className:"reviews__avatar user__avatar",src:i.avatar,width:"54",height:"54",alt:"Reviews avatar"})}),w.jsx("span",{className:"reviews__user-name",children:i.name})]}),w.jsxs("div",{className:"reviews__info",children:[w.jsx(EL,{rating:n,containerMix:"reviews__rating",starsMix:"reviews__stars",mode:"compact"}),w.jsx("p",{className:"reviews__text",children:e}),w.jsx("time",{className:"reviews__time",dateTime:"2019-04-24",children:t})]})]}),PL=({reviews:e,containerMix:t})=>w.jsxs("section",{className:Ho("reviews",t),children:[w.jsxs("h2",{className:"reviews__title",children:["Reviews · ",w.jsx("span",{className:"reviews__amount",children:e.length})]}),w.jsx("ul",{className:"reviews__list",children:e.map(n=>w.jsx(SL,{...n},n.date.toString()))})]}),TL=({offerdetails:e,offers:t,currentCity:n})=>{const{id:i}=Dx(),s=es();z.useEffect(()=>{s(xo(i??"")),s(ay(i??"")),s(ly(i??""))},[i,s]);const a=rt(O=>O.offerIdDetails.nearbyOffers),u=rt(O=>O.offerIdDetails.comments),f=rt(Py),h=rt(bl),[p,m]=z.useState(!1),v=Yo();z.useEffect(()=>{m(e.isFavorite)},[e.isFavorite]);const g=()=>{if(h===Fe.NoAuth||h===Fe.Unknown){v(Xt.Login);return}s(uy({offerId:e.id,isFavorite:!p})),m(!p)};return w.jsxs("div",{className:"page",children:[w.jsx("header",{className:"header",children:w.jsx("div",{className:"container",children:w.jsxs("div",{className:"header__wrapper",children:[w.jsx("div",{className:"header__left",children:w.jsx(Yt,{to:Xt.Main,children:w.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:81,height:41})})}),w.jsx("nav",{className:"header__nav",children:w.jsxs("ul",{className:"header__nav-list",children:[w.jsx("li",{className:"header__nav-item user",children:w.jsxs("a",{className:"header__nav-link header__nav-link--profile",href:"#",children:[w.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),w.jsx("span",{className:"header__user-name user__name",children:f}),w.jsx("span",{className:"header__favorite-count",children:"3"})]})}),w.jsx("li",{className:"header__nav-item",children:h===Fe.Auth?w.jsx(Yt,{className:"header__nav-link",to:"/",children:w.jsx("span",{className:"header__signout",onClick:O=>{O.preventDefault(),s($h())},children:"Sign out"})}):w.jsx(Yt,{className:"header__nav-link",to:Xt.Login,children:w.jsx("span",{className:"header__signout",children:" Sign in"})})})]})})]})})}),w.jsxs("main",{className:"page__main page__main--offer",children:[w.jsxs("section",{className:"offer",children:[w.jsx("div",{className:"offer__gallery-container container",children:w.jsx("div",{className:"offer__gallery",children:e.images.map(O=>w.jsx("div",{className:"offer__image-wrapper",children:w.jsx("img",{className:"offer__image",src:O,alt:"Фото студии"})},O))})}),w.jsx("div",{className:"offer__container container",children:w.jsxs("div",{className:"offer__wrapper",children:[e.isPremium?w.jsx("div",{className:"offer__mark",children:w.jsx("span",{children:"Premium"})}):null,w.jsxs("div",{className:"offer__name-wrapper",children:[w.jsx("h1",{className:"offer__name",children:e.title}),h&&w.jsxs("button",{className:Ho("place-card__bookmark-button","button",{"place-card__bookmark-button--active":p}),type:"button",onClick:g,children:[w.jsx("svg",{className:"place-card__bookmark-icon",width:"18",height:"19",children:w.jsx("use",{xlinkHref:"#icon-bookmark"})}),w.jsx("span",{className:"visually-hidden",children:"To bookmarks"})]})]}),w.jsxs("div",{className:"offer__rating rating",children:[w.jsxs("div",{className:"offer__stars rating__stars",children:[w.jsx("span",{style:{width:`${e.rating/5*100}%`}}),w.jsx("span",{className:"visually-hidden",children:"Rating"})]}),w.jsx("span",{className:"offer__rating-value rating__value",children:e.rating})]}),w.jsxs("ul",{className:"offer__features",children:[w.jsx("li",{className:"offer__feature offer__feature--entire",children:e.type}),w.jsxs("li",{className:"offer__feature offer__feature--bedrooms",children:[e.bedrooms," Bedrooms"]}),w.jsxs("li",{className:"offer__feature offer__feature--adults",children:["Max ",e.maxAdults," Adults"]})]}),w.jsxs("div",{className:"offer__price",children:[w.jsxs("b",{className:"offer__price-value",children:["€",e.price]}),w.jsx("span",{className:"offer__price-text",children:" night"})]}),w.jsxs("div",{className:"offer__inside",children:[w.jsx("h2",{className:"offer__inside-title",children:"What's inside"}),w.jsx("ul",{className:"offer__inside-list",children:e.goods.map(O=>w.jsx("li",{className:"offer__inside-item",children:O},O))})]}),w.jsxs("div",{className:"offer__host",children:[w.jsx("h2",{className:"offer__host-title",children:"Meet the host"}),w.jsxs("div",{className:"offer__host-user user",children:[w.jsx("div",{className:"offer__avatar-wrapper offer__avatar-wrapper--pro user__avatar-wrapper",children:w.jsx("img",{className:"offer__avatar user__avatar",src:e.host.avatarUrl,width:"74",height:"74",alt:"Host avatar"})}),w.jsx("span",{className:"offer__user-name",children:e.host.name}),w.jsx("span",{className:"offer__user-status",children:e.host.isPro})]}),w.jsx("div",{className:"offer__description",children:w.jsx("p",{className:"offer__text",children:e.description})})]}),w.jsx(PL,{reviews:u,containerMix:"offer__reviews"})]})}),w.jsx("section",{className:"offer__map map",children:w.jsx(ky,{offers:t===null?void 0:[...t],selectedPoint:t==null?void 0:t[1],currentCity:n,activeOffer:t===null?null:t[1].id})})]}),w.jsx("div",{className:"container",children:w.jsx(Oy,{offers:a,cardcssname:ul.citiesList})}),w.jsxs("div",{children:[w.jsx("h2",{className:"reviews__title",children:"Reviews"}),h===Fe.Auth?w.jsx(xL,{}):null]})]})]})},LL=()=>{var a;const e=es(),t=rt(u=>u.currentCity),n=rt(u=>u.offerPage),i=rt(u=>u.Cities);z.useEffect(()=>{e(wo())},[e]);const s=rt(u=>u.offerIdDetails);return w.jsx(ri,{children:w.jsx(iE,{children:w.jsxs(Xx,{children:[w.jsx(ao,{path:"/",element:w.jsx(_L,{offers:n.offer,currentCity:t.currentCity,cities:i.cities})}),w.jsx(ao,{path:"/login",element:w.jsx(yL,{})}),w.jsx(ao,{path:"/offer/:id",element:((a=n.offer)==null?void 0:a.filter(u=>u.id===s.offer.id).length)>0?w.jsx(TL,{offerdetails:s.offer,offers:n.offer,currentCity:t.currentCity}):w.jsx(wL,{})}),w.jsx(ao,{path:"/favorites",element:w.jsx(vL,{offers:n.offer})})]})})})};_r.dispatch(wo);const OL=vc.createRoot(document.getElementById("root"));_r.dispatch(la(ry()));OL.render(w.jsx(Et.StrictMode,{children:w.jsx(tL,{store:_r,children:w.jsx(LL,{})})})); + */(function(e,t){(function(n,i){i(t)})(B0,function(n){var i="1.7.1";function s(r){var o,l,c,d;for(l=1,c=arguments.length;l"u"||!L||!L.Mixin)){r=T(r)?r:[r];for(var o=0;o0?Math.floor(r):Math.ceil(r)};M.prototype={clone:function(){return new M(this.x,this.y)},add:function(r){return this.clone()._add(D(r))},_add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.clone()._subtract(D(r))},_subtract:function(r){return this.x-=r.x,this.y-=r.y,this},divideBy:function(r){return this.clone()._divideBy(r)},_divideBy:function(r){return this.x/=r,this.y/=r,this},multiplyBy:function(r){return this.clone()._multiplyBy(r)},_multiplyBy:function(r){return this.x*=r,this.y*=r,this},scaleBy:function(r){return new M(this.x*r.x,this.y*r.y)},unscaleBy:function(r){return new M(this.x/r.x,this.y/r.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=K(this.x),this.y=K(this.y),this},distanceTo:function(r){r=D(r);var o=r.x-this.x,l=r.y-this.y;return Math.sqrt(o*o+l*l)},equals:function(r){return r=D(r),r.x===this.x&&r.y===this.y},contains:function(r){return r=D(r),Math.abs(r.x)<=Math.abs(this.x)&&Math.abs(r.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function D(r,o,l){return r instanceof M?r:T(r)?new M(r[0],r[1]):r==null?r:typeof r=="object"&&"x"in r&&"y"in r?new M(r.x,r.y):new M(r,o,l)}function G(r,o){if(r)for(var l=o?[r,o]:r,c=0,d=l.length;c=this.min.x&&l.x<=this.max.x&&o.y>=this.min.y&&l.y<=this.max.y},intersects:function(r){r=ae(r);var o=this.min,l=this.max,c=r.min,d=r.max,_=d.x>=o.x&&c.x<=l.x,S=d.y>=o.y&&c.y<=l.y;return _&&S},overlaps:function(r){r=ae(r);var o=this.min,l=this.max,c=r.min,d=r.max,_=d.x>o.x&&c.xo.y&&c.y=o.lat&&d.lat<=l.lat&&c.lng>=o.lng&&d.lng<=l.lng},intersects:function(r){r=he(r);var o=this._southWest,l=this._northEast,c=r.getSouthWest(),d=r.getNorthEast(),_=d.lat>=o.lat&&c.lat<=l.lat,S=d.lng>=o.lng&&c.lng<=l.lng;return _&&S},overlaps:function(r){r=he(r);var o=this._southWest,l=this._northEast,c=r.getSouthWest(),d=r.getNorthEast(),_=d.lat>o.lat&&c.lato.lng&&c.lng1,Nr=function(){var r=!1;try{var o=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("testPassiveEventSupport",v,o),window.removeEventListener("testPassiveEventSupport",v,o)}catch{}return r}(),ad=function(){return!!document.createElement("canvas").getContext}(),ss=!!(document.createElementNS&&Jh("svg").createSVGRect),as=!ss&&function(){try{var r=document.createElement("div");r.innerHTML='';var o=r.firstChild;return o.style.behavior="url(#default#VML)",o&&typeof o.adj=="object"}catch{return!1}}();function $t(r){return navigator.userAgent.toLowerCase().indexOf(r)>=0}var zy={ie:rs,ielt9:Cr,edge:is,webkit:Zl,android:Ii,android23:zi,androidStock:td,opera:Hl,chrome:Wl,gecko:Vl,safari:os,phantom:nd,opera12:rd,win:id,ie3d:Gl,webkit3d:Kl,gecko3d:od,any3d:_t,mobile:kr,mobileWebkit:Ay,mobileWebkit3d:My,msPointer:Ln,pointer:Ut,touch:Ft,mobileOpera:sd,mobileGecko:Iy,retina:On,passiveEvents:Nr,canvas:ad,svg:ss,vml:as},ql=Ln?"MSPointerDown":"pointerdown",Ql=Ln?"MSPointerMove":"pointermove",Yl=Ln?"MSPointerUp":"pointerup",Xl=Ln?"MSPointerCancel":"pointercancel",Rr={},ld=!1;function by(r,o,l,c){return o==="touchstart"?Dy(r,l,c):o==="touchmove"?Fy(r,l,c):o==="touchend"&&$y(r,l,c),this}function jy(r,o,l){var c=r["_leaflet_"+o+l];return o==="touchstart"?r.removeEventListener(ql,c,!1):o==="touchmove"?r.removeEventListener(Ql,c,!1):o==="touchend"&&(r.removeEventListener(Yl,c,!1),r.removeEventListener(Xl,c,!1)),this}function Dy(r,o,l){var c=u(function(d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&>(d),Jl(d,o)});r["_leaflet_touchstart"+l]=c,r.addEventListener(ql,c,!1),ld||(document.addEventListener(ql,By,!0),document.addEventListener(Ql,Uy,!0),document.addEventListener(Yl,ud,!0),document.addEventListener(Xl,ud,!0),ld=!0)}function By(r){Rr[r.pointerId]=r}function Uy(r){Rr[r.pointerId]&&(Rr[r.pointerId]=r)}function ud(r){delete Rr[r.pointerId]}function Jl(r,o){r.touches=[];for(var l in Rr)r.touches.push(Rr[l]);r.changedTouches=[r],o(r)}function Fy(r,o,l){var c=function(d){d.pointerType===(d.MSPOINTER_TYPE_MOUSE||"mouse")&&d.buttons===0||Jl(d,o)};r["_leaflet_touchmove"+l]=c,r.addEventListener(Ql,c,!1)}function $y(r,o,l){var c=function(d){Jl(d,o)};r["_leaflet_touchend"+l]=c,r.addEventListener(Yl,c,!1),r.addEventListener(Xl,c,!1)}var ls=Ln?"MSPointerDown":Ut?"pointerdown":"touchstart",us=Ln?"MSPointerUp":Ut?"pointerup":"touchend",Ar="_leaflet_";function Zy(r,o,l){var c,d,_=!1,S=250;function C(z){if(Ut){if(!z.isPrimary||z.pointerType==="mouse")return}else if(z.touches.length>1)return;var B=Date.now(),H=B-(c||B);d=z.touches?z.touches[0]:z,_=H>0&&H<=S,c=B}function k(z){if(_&&!d.cancelBubble){if(Ut){if(z.pointerType==="mouse")return;var B={},H,oe;for(oe in d)H=d[oe],B[oe]=H&&H.bind?H.bind(d):H;d=B}d.type="dblclick",d.button=0,o(d),c=null}}return r[Ar+ls+l]=C,r[Ar+us+l]=k,r[Ar+"dblclick"+l]=o,r.addEventListener(ls,C,Nr?{passive:!1}:!1),r.addEventListener(us,k,Nr?{passive:!1}:!1),r.addEventListener("dblclick",o,!1),this}function Hy(r,o){var l=r[Ar+ls+o],c=r[Ar+us+o],d=r[Ar+"dblclick"+o];return r.removeEventListener(ls,l,Nr?{passive:!1}:!1),r.removeEventListener(us,c,Nr?{passive:!1}:!1),r.removeEventListener("dblclick",d,!1),this}var eu=hs(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),bi=hs(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),cd=bi==="webkitTransition"||bi==="OTransition"?bi+"End":"transitionend";function fd(r){return typeof r=="string"?document.getElementById(r):r}function ji(r,o){var l=r.style[o]||r.currentStyle&&r.currentStyle[o];if((!l||l==="auto")&&document.defaultView){var c=document.defaultView.getComputedStyle(r,null);l=c?c[o]:null}return l==="auto"?null:l}function ie(r,o,l){var c=document.createElement(r);return c.className=o||"",l&&l.appendChild(c),c}function ge(r){var o=r.parentNode;o&&o.removeChild(r)}function cs(r){for(;r.firstChild;)r.removeChild(r.firstChild)}function Mr(r){var o=r.parentNode;o&&o.lastChild!==r&&o.appendChild(r)}function Ir(r){var o=r.parentNode;o&&o.firstChild!==r&&o.insertBefore(r,o.firstChild)}function tu(r,o){if(r.classList!==void 0)return r.classList.contains(o);var l=fs(r);return l.length>0&&new RegExp("(^|\\s)"+o+"(\\s|$)").test(l)}function q(r,o){if(r.classList!==void 0)for(var l=w(o),c=0,d=l.length;cthis.options.maxZoom)?this.setZoom(r):this},panInsideBounds:function(r,o){this._enforcingBounds=!0;var l=this.getCenter(),c=this._limitCenter(l,this._zoom,he(r));return l.equals(c)||this.panTo(c,o),this._enforcingBounds=!1,this},panInside:function(r,o){o=o||{};var l=D(o.paddingTopLeft||o.padding||[0,0]),c=D(o.paddingBottomRight||o.padding||[0,0]),d=this.getCenter(),_=this.project(d),S=this.project(r),C=this.getPixelBounds(),k=C.getSize().divideBy(2),z=ae([C.min.add(l),C.max.subtract(c)]);if(!z.contains(S)){this._enforcingBounds=!0;var B=_.subtract(S),H=D(S.x+B.x,S.y+B.y);(S.xz.max.x)&&(H.x=_.x-B.x,B.x>0?H.x+=k.x-l.x:H.x-=k.x-c.x),(S.yz.max.y)&&(H.y=_.y-B.y,B.y>0?H.y+=k.y-l.y:H.y-=k.y-c.y),this.panTo(this.unproject(H),o),this._enforcingBounds=!1}return this},invalidateSize:function(r){if(!this._loaded)return this;r=s({animate:!1,pan:!0},r===!0?{animate:!0}:r);var o=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var l=this.getSize(),c=o.divideBy(2).round(),d=l.divideBy(2).round(),_=c.subtract(d);return!_.x&&!_.y?this:(r.animate&&r.pan?this.panBy(_):(r.pan&&this._rawPanBy(_),this.fire("move"),r.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(u(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:o,newSize:l}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(r){if(r=this._locateOptions=s({timeout:1e4,watch:!1},r),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var o=u(this._handleGeolocationResponse,this),l=u(this._handleGeolocationError,this);return r.watch?this._locationWatchId=navigator.geolocation.watchPosition(o,l,r):navigator.geolocation.getCurrentPosition(o,l,r),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(r){var o=r.code,l=r.message||(o===1?"permission denied":o===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:o,message:"Geolocation error: "+l+"."})},_handleGeolocationResponse:function(r){var o=r.coords.latitude,l=r.coords.longitude,c=new se(o,l),d=c.toBounds(r.coords.accuracy*2),_=this._locateOptions;if(_.setView){var S=this.getBoundsZoom(d);this.setView(c,_.maxZoom?Math.min(S,_.maxZoom):S)}var C={latlng:c,bounds:d,timestamp:r.timestamp};for(var k in r.coords)typeof r.coords[k]=="number"&&(C[k]=r.coords[k]);this.fire("locationfound",C)},addHandler:function(r,o){if(!o)return this;var l=this[r]=new o(this);return this._handlers.push(l),this.options[r]&&l.enable(),this},remove:function(){if(this._initEvents(!0),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(),ge(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Ce(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var r;for(r in this._layers)this._layers[r].remove();for(r in this._panes)ge(this._panes[r]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(r,o){var l="leaflet-pane"+(r?" leaflet-"+r.replace("Pane","")+"-pane":""),c=ie("div",l,o||this._mapPane);return r&&(this._panes[r]=c),c},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var r=this.getPixelBounds(),o=this.unproject(r.getBottomLeft()),l=this.unproject(r.getTopRight());return new Me(o,l)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(r,o,l){r=he(r),l=D(l||[0,0]);var c=this.getZoom()||0,d=this.getMinZoom(),_=this.getMaxZoom(),S=r.getNorthWest(),C=r.getSouthEast(),k=this.getSize().subtract(l),z=ae(this.project(C,c),this.project(S,c)).getSize(),B=_t?this.options.zoomSnap:1,H=k.x/z.x,oe=k.y/z.y,an=o?Math.max(H,oe):Math.min(H,oe);return c=this.getScaleZoom(an,c),B&&(c=Math.round(c/(B/100))*(B/100),c=o?Math.ceil(c/B)*B:Math.floor(c/B)*B),Math.max(d,Math.min(_,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new M(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(r,o){var l=this._getTopLeftPoint(r,o);return new G(l,l.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(r){return this.options.crs.getProjectedBounds(r===void 0?this.getZoom():r)},getPane:function(r){return typeof r=="string"?this._panes[r]:r},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(r,o){var l=this.options.crs;return o=o===void 0?this._zoom:o,l.scale(r)/l.scale(o)},getScaleZoom:function(r,o){var l=this.options.crs;o=o===void 0?this._zoom:o;var c=l.zoom(r*l.scale(o));return isNaN(c)?1/0:c},project:function(r,o){return o=o===void 0?this._zoom:o,this.options.crs.latLngToPoint(le(r),o)},unproject:function(r,o){return o=o===void 0?this._zoom:o,this.options.crs.pointToLatLng(D(r),o)},layerPointToLatLng:function(r){var o=D(r).add(this.getPixelOrigin());return this.unproject(o)},latLngToLayerPoint:function(r){var o=this.project(le(r))._round();return o._subtract(this.getPixelOrigin())},wrapLatLng:function(r){return this.options.crs.wrapLatLng(le(r))},wrapLatLngBounds:function(r){return this.options.crs.wrapLatLngBounds(he(r))},distance:function(r,o){return this.options.crs.distance(le(r),le(o))},containerPointToLayerPoint:function(r){return D(r).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(r){return D(r).add(this._getMapPanePos())},containerPointToLatLng:function(r){var o=this.containerPointToLayerPoint(D(r));return this.layerPointToLatLng(o)},latLngToContainerPoint:function(r){return this.layerPointToContainerPoint(this.latLngToLayerPoint(le(r)))},mouseEventToContainerPoint:function(r){return pd(r,this._container)},mouseEventToLayerPoint:function(r){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(r))},mouseEventToLatLng:function(r){return this.layerPointToLatLng(this.mouseEventToLayerPoint(r))},_initContainer:function(r){var o=this._container=fd(r);if(o){if(o._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Q(o,"scroll",this._onScroll,this),this._containerId=h(o)},_initLayout:function(){var r=this._container;this._fadeAnimated=this.options.fadeAnimation&&_t,q(r,"leaflet-container"+(Ft?" leaflet-touch":"")+(On?" leaflet-retina":"")+(Cr?" leaflet-oldie":"")+(os?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var o=ji(r,"position");o!=="absolute"&&o!=="relative"&&o!=="fixed"&&(r.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var r=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ke(this._mapPane,new M(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(q(r.markerPane,"leaflet-zoom-hide"),q(r.shadowPane,"leaflet-zoom-hide"))},_resetView:function(r,o){ke(this._mapPane,new M(0,0));var l=!this._loaded;this._loaded=!0,o=this._limitZoom(o),this.fire("viewprereset");var c=this._zoom!==o;this._moveStart(c,!1)._move(r,o)._moveEnd(c),this.fire("viewreset"),l&&this.fire("load")},_moveStart:function(r,o){return r&&this.fire("zoomstart"),o||this.fire("movestart"),this},_move:function(r,o,l){o===void 0&&(o=this._zoom);var c=this._zoom!==o;return this._zoom=o,this._lastCenter=r,this._pixelOrigin=this._getNewPixelOrigin(r),(c||l&&l.pinch)&&this.fire("zoom",l),this.fire("move",l)},_moveEnd:function(r){return r&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Ce(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(r){ke(this._mapPane,this._getMapPanePos().subtract(r))},_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(r){this._targets={},this._targets[h(this._container)]=this;var o=r?Pe:Q;o(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&o(window,"resize",this._onResize,this),_t&&this.options.transform3DLimit&&(r?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Ce(this._resizeRequest),this._resizeRequest=J(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var r=this._getMapPanePos();Math.max(Math.abs(r.x),Math.abs(r.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(r,o){for(var l=[],c,d=o==="mouseout"||o==="mouseover",_=r.target||r.srcElement,S=!1;_;){if(c=this._targets[h(_)],c&&(o==="click"||o==="preclick")&&!r._simulated&&this._draggableMoved(c)){S=!0;break}if(c&&c.listens(o,!0)&&(d&&!_s(_,r)||(l.push(c),d))||_===this._container)break;_=_.parentNode}return!l.length&&!S&&!d&&_s(_,r)&&(l=[this]),l},_handleDOMEvent:function(r){if(!(!this._loaded||pu(r))){var o=r.type;(o==="mousedown"||o==="keypress"||o==="keyup"||o==="keydown")&&au(r.target||r.srcElement),this._fireDOMEvent(r,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(r,o,l){if(r.type==="click"){var c=s({},r);c.type="preclick",this._fireDOMEvent(c,c.type,l)}if(!r._stopped&&(l=(l||[]).concat(this._findEventTargets(r,o)),!!l.length)){var d=l[0];o==="contextmenu"&&d.listens(o,!0)&>(r);var _={originalEvent:r};if(r.type!=="keypress"&&r.type!=="keydown"&&r.type!=="keyup"){var S=d.getLatLng&&(!d._radius||d._radius<=10);_.containerPoint=S?this.latLngToContainerPoint(d.getLatLng()):this.mouseEventToContainerPoint(r),_.layerPoint=this.containerPointToLayerPoint(_.containerPoint),_.latlng=S?d.getLatLng():this.layerPointToLatLng(_.layerPoint)}for(var C=0;C0?Math.round(r-o)/2:Math.max(0,Math.ceil(r))-Math.max(0,Math.floor(o))},_limitZoom:function(r){var o=this.getMinZoom(),l=this.getMaxZoom(),c=_t?this.options.zoomSnap:1;return c&&(r=Math.round(r/c)*c),Math.max(o,Math.min(l,r))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ee(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(r,o){var l=this._getCenterOffset(r)._trunc();return(o&&o.animate)!==!0&&!this.getSize().contains(l)?!1:(this.panBy(l,o),!0)},_createAnimProxy:function(){var r=this._proxy=ie("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(r),this.on("zoomanim",function(o){var l=eu,c=this._proxy.style[l];or(this._proxy,this.project(o.center,o.zoom),this.getZoomScale(o.zoom,1)),c===this._proxy.style[l]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ge(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var r=this.getCenter(),o=this.getZoom();or(this._proxy,this.project(r,o),this.getZoomScale(o,1))},_catchTransitionEnd:function(r){this._animatingZoom&&r.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(r,o,l){if(this._animatingZoom)return!0;if(l=l||{},!this._zoomAnimated||l.animate===!1||this._nothingToAnimate()||Math.abs(o-this._zoom)>this.options.zoomAnimationThreshold)return!1;var c=this.getZoomScale(o),d=this._getCenterOffset(r)._divideBy(1-1/c);return l.animate!==!0&&!this.getSize().contains(d)?!1:(J(function(){this._moveStart(!0,!1)._animateZoom(r,o,!0)},this),!0)},_animateZoom:function(r,o,l,c){this._mapPane&&(l&&(this._animatingZoom=!0,this._animateToCenter=r,this._animateToZoom=o,q(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:r,zoom:o,noUpdate:c}),setTimeout(u(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ee(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),J(function(){this._moveEnd(!0)},this))}});function qy(r,o){return new te(r,o)}var Nt=mt.extend({options:{position:"topright"},initialize:function(r){x(this,r)},getPosition:function(){return this.options.position},setPosition:function(r){var o=this._map;return o&&o.removeControl(this),this.options.position=r,o&&o.addControl(this),this},getContainer:function(){return this._container},addTo:function(r){this.remove(),this._map=r;var o=this._container=this.onAdd(r),l=this.getPosition(),c=r._controlCorners[l];return q(o,"leaflet-control"),l.indexOf("bottom")!==-1?c.insertBefore(o,c.firstChild):c.appendChild(o),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ge(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(r){this._map&&r&&r.screenX>0&&r.screenY>0&&this._map.getContainer().focus()}}),$i=function(r){return new Nt(r)};te.include({addControl:function(r){return r.addTo(this),this},removeControl:function(r){return r.remove(),this},_initControlPos:function(){var r=this._controlCorners={},o="leaflet-",l=this._controlContainer=ie("div",o+"control-container",this._container);function c(d,_){var S=o+d+" "+o+_;r[d+_]=ie("div",S,l)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var r in this._controlCorners)ge(this._controlCorners[r]);ge(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var vd=Nt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(r,o,l,c){return l1,this._baseLayersList.style.display=r?"":"none"),this._separator.style.display=o&&r?"":"none",this},_onLayerChange:function(r){this._handlingClick||this._update();var o=this._getLayer(h(r.target)),l=o.overlay?r.type==="add"?"overlayadd":"overlayremove":r.type==="add"?"baselayerchange":null;l&&this._map.fire(l,o)},_createRadioElement:function(r,o){var l='",c=document.createElement("div");return c.innerHTML=l,c.firstChild},_addItem:function(r){var o=document.createElement("label"),l=this._map.hasLayer(r.layer),c;r.overlay?(c=document.createElement("input"),c.type="checkbox",c.className="leaflet-control-layers-selector",c.defaultChecked=l):c=this._createRadioElement("leaflet-base-layers_"+h(this),l),this._layerControlInputs.push(c),c.layerId=h(r.layer),Q(c,"click",this._onInputClick,this);var d=document.createElement("span");d.innerHTML=" "+r.name;var _=document.createElement("div");o.appendChild(_),_.appendChild(c),_.appendChild(d);var S=r.overlay?this._overlaysList:this._baseLayersList;return S.appendChild(o),this._checkDisabledLayers(),o},_onInputClick:function(){var r=this._layerControlInputs,o,l,c=[],d=[];this._handlingClick=!0;for(var _=r.length-1;_>=0;_--)o=r[_],l=this._getLayer(o.layerId).layer,o.checked?c.push(l):o.checked||d.push(l);for(_=0;_=0;d--)o=r[d],l=this._getLayer(o.layerId).layer,o.disabled=l.options.minZoom!==void 0&&cl.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Qy=function(r,o,l){return new vd(r,o,l)},mu=Nt.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(r){var o="leaflet-control-zoom",l=ie("div",o+" leaflet-bar"),c=this.options;return this._zoomInButton=this._createButton(c.zoomInText,c.zoomInTitle,o+"-in",l,this._zoomIn),this._zoomOutButton=this._createButton(c.zoomOutText,c.zoomOutTitle,o+"-out",l,this._zoomOut),this._updateDisabled(),r.on("zoomend zoomlevelschange",this._updateDisabled,this),l},onRemove:function(r){r.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(r){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(r.shiftKey?3:1))},_createButton:function(r,o,l,c,d){var _=ie("a",l,c);return _.innerHTML=r,_.href="#",_.title=o,_.setAttribute("role","button"),_.setAttribute("aria-label",o),Fi(_),Q(_,"click",tn),Q(_,"click",d,this),Q(_,"click",this._refocusOnMap,this),_},_updateDisabled:function(){var r=this._map,o="leaflet-disabled";Ee(this._zoomInButton,o),Ee(this._zoomOutButton,o),(this._disabled||r._zoom===r.getMinZoom())&&q(this._zoomOutButton,o),(this._disabled||r._zoom===r.getMaxZoom())&&q(this._zoomInButton,o)}});te.mergeOptions({zoomControl:!0}),te.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new mu,this.addControl(this.zoomControl))});var Yy=function(r){return new mu(r)},gd=Nt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(r){var o="leaflet-control-scale",l=ie("div",o),c=this.options;return this._addScales(c,o+"-line",l),r.on(c.updateWhenIdle?"moveend":"move",this._update,this),r.whenReady(this._update,this),l},onRemove:function(r){r.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(r,o,l){r.metric&&(this._mScale=ie("div",o,l)),r.imperial&&(this._iScale=ie("div",o,l))},_update:function(){var r=this._map,o=r.getSize().y/2,l=r.distance(r.containerPointToLatLng([0,o]),r.containerPointToLatLng([this.options.maxWidth,o]));this._updateScales(l)},_updateScales:function(r){this.options.metric&&r&&this._updateMetric(r),this.options.imperial&&r&&this._updateImperial(r)},_updateMetric:function(r){var o=this._getRoundNum(r),l=o<1e3?o+" m":o/1e3+" km";this._updateScale(this._mScale,l,o/r)},_updateImperial:function(r){var o=r*3.2808399,l,c,d;o>5280?(l=o/5280,c=this._getRoundNum(l),this._updateScale(this._iScale,c+" mi",c/l)):(d=this._getRoundNum(o),this._updateScale(this._iScale,d+" ft",d/o))},_updateScale:function(r,o,l){r.style.width=Math.round(this.options.maxWidth*l)+"px",r.innerHTML=o},_getRoundNum:function(r){var o=Math.pow(10,(Math.floor(r)+"").length-1),l=r/o;return l=l>=10?10:l>=5?5:l>=3?3:l>=2?2:1,o*l}}),Xy=function(r){return new gd(r)},_u=Nt.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(r){x(this,r),this._attributions={}},onAdd:function(r){r.attributionControl=this,this._container=ie("div","leaflet-control-attribution"),Fi(this._container);for(var o in r._layers)r._layers[o].getAttribution&&this.addAttribution(r._layers[o].getAttribution());return this._update(),this._container},setPrefix:function(r){return this.options.prefix=r,this._update(),this},addAttribution:function(r){return r?(this._attributions[r]||(this._attributions[r]=0),this._attributions[r]++,this._update(),this):this},removeAttribution:function(r){return r?(this._attributions[r]&&(this._attributions[r]--,this._update()),this):this},_update:function(){if(this._map){var r=[];for(var o in this._attributions)this._attributions[o]&&r.push(o);var l=[];this.options.prefix&&l.push(this.options.prefix),r.length&&l.push(r.join(", ")),this._container.innerHTML=l.join(" | ")}}});te.mergeOptions({attributionControl:!0}),te.addInitHook(function(){this.options.attributionControl&&new _u().addTo(this)});var Jy=function(r){return new _u(r)};Nt.Layers=vd,Nt.Zoom=mu,Nt.Scale=gd,Nt.Attribution=_u,$i.layers=Qy,$i.zoom=Yy,$i.scale=Xy,$i.attribution=Jy;var Zt=mt.extend({initialize:function(r){this._map=r},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}});Zt.addTo=function(r,o){return r.addHandler(o,this),this};var e0={Events:Ue},yd=Ft?"touchstart mousedown":"mousedown",wd={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},vu={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ar=en.extend({options:{clickTolerance:3},initialize:function(r,o,l,c){x(this,c),this._element=r,this._dragStartTarget=o||r,this._preventOutline=l},enable:function(){this._enabled||(Q(this._dragStartTarget,yd,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ar._dragging===this&&this.finishDrag(),Pe(this._dragStartTarget,yd,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(r){if(!(r._simulated||!this._enabled)&&(this._moved=!1,!tu(this._element,"leaflet-zoom-anim")&&!(ar._dragging||r.shiftKey||r.which!==1&&r.button!==1&&!r.touches)&&(ar._dragging=this,this._preventOutline&&au(this._element),iu(),Di(),!this._moving))){this.fire("down");var o=r.touches?r.touches[0]:r,l=hd(this._element);this._startPoint=new M(o.clientX,o.clientY),this._parentScale=lu(l),Q(document,vu[r.type],this._onMove,this),Q(document,wd[r.type],this._onUp,this)}},_onMove:function(r){if(!(r._simulated||!this._enabled)){if(r.touches&&r.touches.length>1){this._moved=!0;return}var o=r.touches&&r.touches.length===1?r.touches[0]:r,l=new M(o.clientX,o.clientY)._subtract(this._startPoint);!l.x&&!l.y||Math.abs(l.x)+Math.abs(l.y)_&&(S=C,_=k);_>l&&(o[S]=1,gu(r,o,l,c,S),gu(r,o,l,S,d))}function r0(r,o){for(var l=[r[0]],c=1,d=0,_=r.length;c<_;c++)i0(r[c],r[d])>o&&(l.push(r[c]),d=c);return d<_-1&&l.push(r[_-1]),l}var Sd;function Pd(r,o,l,c,d){var _=c?Sd:lr(r,l),S=lr(o,l),C,k,z;for(Sd=S;;){if(!(_|S))return[r,o];if(_&S)return!1;C=_||S,k=vs(r,o,C,l,d),z=lr(k,l),C===_?(r=k,_=z):(o=k,S=z)}}function vs(r,o,l,c,d){var _=o.x-r.x,S=o.y-r.y,C=c.min,k=c.max,z,B;return l&8?(z=r.x+_*(k.y-r.y)/S,B=k.y):l&4?(z=r.x+_*(C.y-r.y)/S,B=C.y):l&2?(z=k.x,B=r.y+S*(k.x-r.x)/_):l&1&&(z=C.x,B=r.y+S*(C.x-r.x)/_),new M(z,B,d)}function lr(r,o){var l=0;return r.xo.max.x&&(l|=2),r.yo.max.y&&(l|=8),l}function i0(r,o){var l=o.x-r.x,c=o.y-r.y;return l*l+c*c}function Zi(r,o,l,c){var d=o.x,_=o.y,S=l.x-d,C=l.y-_,k=S*S+C*C,z;return k>0&&(z=((r.x-d)*S+(r.y-_)*C)/k,z>1?(d=l.x,_=l.y):z>0&&(d+=S*z,_+=C*z)),S=r.x-d,C=r.y-_,c?S*S+C*C:new M(d,_)}function nn(r){return!T(r[0])||typeof r[0][0]!="object"&&typeof r[0][0]<"u"}function Td(r){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),nn(r)}var o0={simplify:xd,pointToSegmentDistance:Ed,closestPointOnSegment:t0,clipSegment:Pd,_getEdgeIntersection:vs,_getBitCode:lr,_sqClosestPointOnSegment:Zi,isFlat:nn,_flat:Td};function Ld(r,o,l){var c,d=[1,4,2,8],_,S,C,k,z,B,H,oe;for(_=0,B=r.length;_1e-7;C++)z=d*Math.sin(S),z=Math.pow((1-z)/(1+z),d/2),k=Math.PI/2-2*Math.atan(_*z)-S,S+=k;return new se(S*o,r.x*o/l)}},a0={LonLat:yu,Mercator:wu,SphericalMercator:Bl},l0=s({},Tn,{code:"EPSG:3395",projection:wu,transformation:function(){var r=.5/(Math.PI*wu.R);return Mi(r,.5,-r,.5)}()}),Od=s({},Tn,{code:"EPSG:4326",projection:yu,transformation:Mi(1/180,1,-1/180,.5)}),u0=s({},tt,{projection:yu,transformation:Mi(1,0,-1,0),scale:function(r){return Math.pow(2,r)},zoom:function(r){return Math.log(r)/Math.LN2},distance:function(r,o){var l=o.lng-r.lng,c=o.lat-r.lat;return Math.sqrt(l*l+c*c)},infinite:!0});tt.Earth=Tn,tt.EPSG3395=l0,tt.EPSG3857=Fl,tt.EPSG900913=Ny,tt.EPSG4326=Od,tt.Simple=u0;var Rt=en.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(r){return r.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(r){return r&&r.removeLayer(this),this},getPane:function(r){return this._map.getPane(r?this.options[r]||r:this.options.pane)},addInteractiveTarget:function(r){return this._map._targets[h(r)]=this,this},removeInteractiveTarget:function(r){return delete this._map._targets[h(r)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(r){var o=r.target;if(o.hasLayer(this)){if(this._map=o,this._zoomAnimated=o._zoomAnimated,this.getEvents){var l=this.getEvents();o.on(l,this),this.once("remove",function(){o.off(l,this)},this)}this.onAdd(o),this.getAttribution&&o.attributionControl&&o.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),o.fire("layeradd",{layer:this})}}});te.include({addLayer:function(r){if(!r._layerAdd)throw new Error("The provided object is not a Layer.");var o=h(r);return this._layers[o]?this:(this._layers[o]=r,r._mapToAdd=this,r.beforeAdd&&r.beforeAdd(this),this.whenReady(r._layerAdd,r),this)},removeLayer:function(r){var o=h(r);return this._layers[o]?(this._loaded&&r.onRemove(this),r.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(r.getAttribution()),delete this._layers[o],this._loaded&&(this.fire("layerremove",{layer:r}),r.fire("remove")),r._map=r._mapToAdd=null,this):this},hasLayer:function(r){return!!r&&h(r)in this._layers},eachLayer:function(r,o){for(var l in this._layers)r.call(o,this._layers[l]);return this},_addLayers:function(r){r=r?T(r)?r:[r]:[];for(var o=0,l=r.length;othis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()o)return S=(c-o)/l,this._map.layerPointToLatLng([_.x-S*(_.x-d.x),_.y-S*(_.y-d.y)])},getBounds:function(){return this._bounds},addLatLng:function(r,o){return o=o||this._defaultShape(),r=le(r),o.push(r),this._bounds.extend(r),this.redraw()},_setLatLngs:function(r){this._bounds=new Me,this._latlngs=this._convertLatLngs(r)},_defaultShape:function(){return nn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(r){for(var o=[],l=nn(r),c=0,d=r.length;c=2&&o[0]instanceof se&&o[0].equals(o[l-1])&&o.pop(),o},_setLatLngs:function(r){rn.prototype._setLatLngs.call(this,r),nn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return nn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var r=this._renderer._bounds,o=this.options.weight,l=new M(o,o);if(r=new G(r.min.subtract(l),r.max.add(l)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(r))){if(this.options.noClip){this._parts=this._rings;return}for(var c=0,d=this._rings.length,_;cr.y!=d.y>r.y&&r.x<(d.x-c.x)*(r.y-c.y)/(d.y-c.y)+c.x&&(o=!o);return o||rn.prototype._containsPoint.call(this,r,!0)}});function v0(r,o){return new Dr(r,o)}var on=br.extend({initialize:function(r,o){x(this,o),this._layers={},r&&this.addData(r)},addData:function(r){var o=T(r)?r:r.features,l,c,d;if(o){for(l=0,c=o.length;l0?c:[o.src];return}T(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(o.style,"objectFit")&&(o.style.objectFit="fill"),o.autoplay=!!this.options.autoplay,o.loop=!!this.options.loop,o.muted=!!this.options.muted;for(var _=0;_d?(o.height=d+"px",q(r,_)):Ee(r,_),this._containerWidth=this._container.offsetWidth},_animateZoom:function(r){var o=this._map._latLngToNewLayerPoint(this._latlng,r.zoom,r.center),l=this._getAnchor();ke(this._container,o.add(l))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var r=this._map,o=parseInt(ji(this._container,"marginBottom"),10)||0,l=this._container.offsetHeight+o,c=this._containerWidth,d=new M(this._containerLeft,-l-this._containerBottom);d._add(Cn(this._container));var _=r.layerPointToContainerPoint(d),S=D(this.options.autoPanPadding),C=D(this.options.autoPanPaddingTopLeft||S),k=D(this.options.autoPanPaddingBottomRight||S),z=r.getSize(),B=0,H=0;_.x+c+k.x>z.x&&(B=_.x+c-z.x+k.x),_.x-B-C.x<0&&(B=_.x-C.x),_.y+l+k.y>z.y&&(H=_.y+l-z.y+k.y),_.y-H-C.y<0&&(H=_.y-C.y),(B||H)&&r.fire("autopanstart").panBy([B,H])}},_onCloseButtonClick:function(r){this._close(),tn(r)},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),E0=function(r,o){return new Ur(r,o)};te.mergeOptions({closePopupOnClick:!0}),te.include({openPopup:function(r,o,l){return r instanceof Ur||(r=new Ur(l).setContent(r)),o&&r.setLatLng(o),this.hasLayer(r)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=r,this.addLayer(r))},closePopup:function(r){return(!r||r===this._popup)&&(r=this._popup,this._popup=null),r&&this.removeLayer(r),this}}),Rt.include({bindPopup:function(r,o){return r instanceof Ur?(x(r,o),this._popup=r,r._source=this):((!this._popup||o)&&(this._popup=new Ur(o,this)),this._popup.setContent(r)),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(r,o){return this._popup&&this._map&&(o=this._popup._prepareOpen(this,r,o),this._map.openPopup(this._popup,o)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(r){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(r)),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(r){return this._popup&&this._popup.setContent(r),this},getPopup:function(){return this._popup},_openPopup:function(r){var o=r.layer||r.target;if(this._popup&&this._map){if(tn(r),o instanceof kn){this.openPopup(r.layer||r.target,r.latlng);return}this._map.hasLayer(this._popup)&&this._popup._source===o?this.closePopup():this.openPopup(o,r.latlng)}},_movePopup:function(r){this._popup.setLatLng(r.latlng)},_onKeyPress:function(r){r.originalEvent.keyCode===13&&this._openPopup(r)}});var Fr=sn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(r){sn.prototype.onAdd.call(this,r),this.setOpacity(this.options.opacity),r.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(r){sn.prototype.onRemove.call(this,r),r.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var r=sn.prototype.getEvents.call(this);return Ft&&!this.options.permanent&&(r.preclick=this._close),r},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var r="leaflet-tooltip",o=r+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ie("div",o)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(r){var o,l,c=this._map,d=this._container,_=c.latLngToContainerPoint(c.getCenter()),S=c.layerPointToContainerPoint(r),C=this.options.direction,k=d.offsetWidth,z=d.offsetHeight,B=D(this.options.offset),H=this._getAnchor();C==="top"?(o=k/2,l=z):C==="bottom"?(o=k/2,l=0):C==="center"?(o=k/2,l=z/2):C==="right"?(o=0,l=z/2):C==="left"?(o=k,l=z/2):S.x<_.x?(C="right",o=0,l=z/2):(C="left",o=k+(B.x+H.x)*2,l=z/2),r=r.subtract(D(o,l,!0)).add(B).add(H),Ee(d,"leaflet-tooltip-right"),Ee(d,"leaflet-tooltip-left"),Ee(d,"leaflet-tooltip-top"),Ee(d,"leaflet-tooltip-bottom"),q(d,"leaflet-tooltip-"+C),ke(d,r)},_updatePosition:function(){var r=this._map.latLngToLayerPoint(this._latlng);this._setPosition(r)},setOpacity:function(r){this.options.opacity=r,this._container&&vt(this._container,r)},_animateZoom:function(r){var o=this._map._latLngToNewLayerPoint(this._latlng,r.zoom,r.center);this._setPosition(o)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),S0=function(r,o){return new Fr(r,o)};te.include({openTooltip:function(r,o,l){return r instanceof Fr||(r=new Fr(l).setContent(r)),o&&r.setLatLng(o),this.hasLayer(r)?this:this.addLayer(r)},closeTooltip:function(r){return r&&this.removeLayer(r),this}}),Rt.include({bindTooltip:function(r,o){return r instanceof Fr?(x(r,o),this._tooltip=r,r._source=this):((!this._tooltip||o)&&(this._tooltip=new Fr(o,this)),this._tooltip.setContent(r)),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(r){if(!(!r&&this._tooltipHandlersAdded)){var o=r?"off":"on",l={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?l.add=this._openTooltip:(l.mouseover=this._openTooltip,l.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(l.mousemove=this._moveTooltip),Ft&&(l.click=this._openTooltip)),this[o](l),this._tooltipHandlersAdded=!r}},openTooltip:function(r,o){return this._tooltip&&this._map&&(o=this._tooltip._prepareOpen(this,r,o),this._map.openTooltip(this._tooltip,o),this._tooltip.options.interactive&&this._tooltip._container&&(q(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(Ee(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(r){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(r)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(r){return this._tooltip&&this._tooltip.setContent(r),this},getTooltip:function(){return this._tooltip},_openTooltip:function(r){var o=r.layer||r.target;!this._tooltip||!this._map||this.openTooltip(o,this._tooltip.options.sticky?r.latlng:void 0)},_moveTooltip:function(r){var o=r.latlng,l,c;this._tooltip.options.sticky&&r.originalEvent&&(l=this._map.mouseEventToContainerPoint(r.originalEvent),c=this._map.containerPointToLayerPoint(l),o=this._map.layerPointToLatLng(c)),this._tooltip.setLatLng(o)}});var Md=jr.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(r){var o=r&&r.tagName==="DIV"?r:document.createElement("div"),l=this.options;if(l.html instanceof Element?(cs(o),o.appendChild(l.html)):o.innerHTML=l.html!==!1?l.html:"",l.bgPos){var c=D(l.bgPos);o.style.backgroundPosition=-c.x+"px "+-c.y+"px"}return this._setIconStyles(o,"icon"),o},createShadow:function(){return null}});function P0(r){return new Md(r)}jr.Default=Hi;var Wi=Rt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:kr,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(r){x(this,r)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(r){r._addZoomLimit(this)},onRemove:function(r){this._removeAllTiles(),ge(this._container),r._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Mr(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Ir(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(r){return this.options.opacity=r,this._updateOpacity(),this},setZIndex:function(r){return this.options.zIndex=r,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var r={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=p(this._onMoveEnd,this.options.updateInterval,this)),r.move=this._onMove),this._zoomAnimated&&(r.zoomanim=this._animateZoom),r},createTile:function(){return document.createElement("div")},getTileSize:function(){var r=this.options.tileSize;return r instanceof M?r:new M(r,r)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(r){for(var o=this.getPane().children,l=-r(-1/0,1/0),c=0,d=o.length,_;cthis.options.maxZoom||lc?this._retainParent(d,_,S,c):!1)},_retainChildren:function(r,o,l,c){for(var d=2*r;d<2*r+2;d++)for(var _=2*o;_<2*o+2;_++){var S=new M(d,_);S.z=l+1;var C=this._tileCoordsToKey(S),k=this._tiles[C];if(k&&k.active){k.retain=!0;continue}else k&&k.loaded&&(k.retain=!0);l+1this.options.maxZoom||this.options.minZoom!==void 0&&d1){this._setView(r,l);return}for(var H=d.min.y;H<=d.max.y;H++)for(var oe=d.min.x;oe<=d.max.x;oe++){var an=new M(oe,H);if(an.z=this._tileZoom,!!this._isValidTile(an)){var ur=this._tiles[this._tileCoordsToKey(an)];ur?ur.current=!0:S.push(an)}}if(S.sort(function(Nn,Lu){return Nn.distanceTo(_)-Lu.distanceTo(_)}),S.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ts=document.createDocumentFragment();for(oe=0;oel.max.x)||!o.wrapLat&&(r.yl.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(r);return he(this.options.bounds).overlaps(c)},_keyToBounds:function(r){return this._tileCoordsToBounds(this._keyToTileCoords(r))},_tileCoordsToNwSe:function(r){var o=this._map,l=this.getTileSize(),c=r.scaleBy(l),d=c.add(l),_=o.unproject(c,r.z),S=o.unproject(d,r.z);return[_,S]},_tileCoordsToBounds:function(r){var o=this._tileCoordsToNwSe(r),l=new Me(o[0],o[1]);return this.options.noWrap||(l=this._map.wrapLatLngBounds(l)),l},_tileCoordsToKey:function(r){return r.x+":"+r.y+":"+r.z},_keyToTileCoords:function(r){var o=r.split(":"),l=new M(+o[0],+o[1]);return l.z=+o[2],l},_removeTile:function(r){var o=this._tiles[r];o&&(ge(o.el),delete this._tiles[r],this.fire("tileunload",{tile:o.el,coords:this._keyToTileCoords(r)}))},_initTile:function(r){q(r,"leaflet-tile");var o=this.getTileSize();r.style.width=o.x+"px",r.style.height=o.y+"px",r.onselectstart=v,r.onmousemove=v,Cr&&this.options.opacity<1&&vt(r,this.options.opacity),Ii&&!zi&&(r.style.WebkitBackfaceVisibility="hidden")},_addTile:function(r,o){var l=this._getTilePos(r),c=this._tileCoordsToKey(r),d=this.createTile(this._wrapCoords(r),u(this._tileReady,this,r));this._initTile(d),this.createTile.length<2&&J(u(this._tileReady,this,r,null,d)),ke(d,l),this._tiles[c]={el:d,coords:r,current:!0},o.appendChild(d),this.fire("tileloadstart",{tile:d,coords:r})},_tileReady:function(r,o,l){o&&this.fire("tileerror",{error:o,tile:l,coords:r});var c=this._tileCoordsToKey(r);l=this._tiles[c],l&&(l.loaded=+new Date,this._map._fadeAnimated?(vt(l.el,0),Ce(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this)):(l.active=!0,this._pruneTiles()),o||(q(l.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:l.el,coords:r})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Cr||!this._map._fadeAnimated?J(this._pruneTiles,this):setTimeout(u(this._pruneTiles,this),250)))},_getTilePos:function(r){return r.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(r){var o=new M(this._wrapX?m(r.x,this._wrapX):r.x,this._wrapY?m(r.y,this._wrapY):r.y);return o.z=r.z,o},_pxBoundsToTileRange:function(r){var o=this.getTileSize();return new G(r.min.unscaleBy(o).floor(),r.max.unscaleBy(o).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var r in this._tiles)if(!this._tiles[r].loaded)return!1;return!0}});function T0(r){return new Wi(r)}var $r=Wi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(r,o){this._url=r,o=x(this,o),o.detectRetina&&On&&o.maxZoom>0&&(o.tileSize=Math.floor(o.tileSize/2),o.zoomReverse?(o.zoomOffset--,o.minZoom++):(o.zoomOffset++,o.maxZoom--),o.minZoom=Math.max(0,o.minZoom)),typeof o.subdomains=="string"&&(o.subdomains=o.subdomains.split("")),Ii||this.on("tileunload",this._onTileRemove)},setUrl:function(r,o){return this._url===r&&o===void 0&&(o=!0),this._url=r,o||this.redraw(),this},createTile:function(r,o){var l=document.createElement("img");return Q(l,"load",u(this._tileOnLoad,this,o,l)),Q(l,"error",u(this._tileOnError,this,o,l)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),l.alt="",l.setAttribute("role","presentation"),l.src=this.getTileUrl(r),l},getTileUrl:function(r){var o={r:On?"@2x":"",s:this._getSubdomain(r),x:r.x,y:r.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var l=this._globalTileRange.max.y-r.y;this.options.tms&&(o.y=l),o["-y"]=l}return y(this._url,s(o,this.options))},_tileOnLoad:function(r,o){Cr?setTimeout(u(r,this,null,o),0):r(null,o)},_tileOnError:function(r,o,l){var c=this.options.errorTileUrl;c&&o.getAttribute("src")!==c&&(o.src=c),r(l,o)},_onTileRemove:function(r){r.tile.onload=null},_getZoomForUrl:function(){var r=this._tileZoom,o=this.options.maxZoom,l=this.options.zoomReverse,c=this.options.zoomOffset;return l&&(r=o-r),r+c},_getSubdomain:function(r){var o=Math.abs(r.x+r.y)%this.options.subdomains.length;return this.options.subdomains[o]},_abortLoading:function(){var r,o;for(r in this._tiles)this._tiles[r].coords.z!==this._tileZoom&&(o=this._tiles[r].el,o.onload=v,o.onerror=v,o.complete||(o.src=j,ge(o),delete this._tiles[r]))},_removeTile:function(r){var o=this._tiles[r];if(o)return td||o.el.setAttribute("src",j),Wi.prototype._removeTile.call(this,r)},_tileReady:function(r,o,l){if(!(!this._map||l&&l.getAttribute("src")===j))return Wi.prototype._tileReady.call(this,r,o,l)}});function Id(r,o){return new $r(r,o)}var zd=$r.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(r,o){this._url=r;var l=s({},this.defaultWmsParams);for(var c in o)c in this.options||(l[c]=o[c]);o=x(this,o);var d=o.detectRetina&&On?2:1,_=this.getTileSize();l.width=_.x*d,l.height=_.y*d,this.wmsParams=l},onAdd:function(r){this._crs=this.options.crs||r.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var o=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[o]=this._crs.code,$r.prototype.onAdd.call(this,r)},getTileUrl:function(r){var o=this._tileCoordsToNwSe(r),l=this._crs,c=ae(l.project(o[0]),l.project(o[1])),d=c.min,_=c.max,S=(this._wmsVersion>=1.3&&this._crs===Od?[d.y,d.x,_.y,_.x]:[d.x,d.y,_.x,_.y]).join(","),C=$r.prototype.getTileUrl.call(this,r);return C+N(this.wmsParams,C,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+S},setParams:function(r,o){return s(this.wmsParams,r),o||this.redraw(),this}});function L0(r,o){return new zd(r,o)}$r.WMS=zd,Id.wms=L0;var Ht=Rt.extend({options:{padding:.1,tolerance:0},initialize:function(r){x(this,r),h(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&q(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 r={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(r.zoomanim=this._onAnimZoom),r},_onAnimZoom:function(r){this._updateTransform(r.center,r.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(r,o){var l=this._map.getZoomScale(o,this._zoom),c=Cn(this._container),d=this._map.getSize().multiplyBy(.5+this.options.padding),_=this._map.project(this._center,o),S=this._map.project(r,o),C=S.subtract(_),k=d.multiplyBy(-l).add(c).add(d).subtract(C);_t?or(this._container,k,l):ke(this._container,k)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var r in this._layers)this._layers[r]._reset()},_onZoomEnd:function(){for(var r in this._layers)this._layers[r]._project()},_updatePaths:function(){for(var r in this._layers)this._layers[r]._update()},_update:function(){var r=this.options.padding,o=this._map.getSize(),l=this._map.containerPointToLayerPoint(o.multiplyBy(-r)).round();this._bounds=new G(l,l.add(o.multiplyBy(1+r*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),bd=Ht.extend({getEvents:function(){var r=Ht.prototype.getEvents.call(this);return r.viewprereset=this._onViewPreReset,r},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ht.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var r=this._container=document.createElement("canvas");Q(r,"mousemove",this._onMouseMove,this),Q(r,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Q(r,"mouseout",this._handleMouseOut,this),this._ctx=r.getContext("2d")},_destroyContainer:function(){Ce(this._redrawRequest),delete this._ctx,ge(this._container),Pe(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var r;this._redrawBounds=null;for(var o in this._layers)r=this._layers[o],r._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ht.prototype._update.call(this);var r=this._bounds,o=this._container,l=r.getSize(),c=On?2:1;ke(o,r.min),o.width=c*l.x,o.height=c*l.y,o.style.width=l.x+"px",o.style.height=l.y+"px",On&&this._ctx.scale(2,2),this._ctx.translate(-r.min.x,-r.min.y),this.fire("update")}},_reset:function(){Ht.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(r){this._updateDashArray(r),this._layers[h(r)]=r;var o=r._order={layer:r,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=o),this._drawLast=o,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(r){this._requestRedraw(r)},_removePath:function(r){var o=r._order,l=o.next,c=o.prev;l?l.prev=c:this._drawLast=c,c?c.next=l:this._drawFirst=l,delete r._order,delete this._layers[h(r)],this._requestRedraw(r)},_updatePath:function(r){this._extendRedrawBounds(r),r._project(),r._update(),this._requestRedraw(r)},_updateStyle:function(r){this._updateDashArray(r),this._requestRedraw(r)},_updateDashArray:function(r){if(typeof r.options.dashArray=="string"){var o=r.options.dashArray.split(/[, ]+/),l=[],c,d;for(d=0;d')}}catch{return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),O0={_initContainer:function(){this._container=ie("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ht.prototype._update.call(this),this.fire("update"))},_initPath:function(r){var o=r._container=Vi("shape");q(o,"leaflet-vml-shape "+(this.options.className||"")),o.coordsize="1 1",r._path=Vi("path"),o.appendChild(r._path),this._updateStyle(r),this._layers[h(r)]=r},_addPath:function(r){var o=r._container;this._container.appendChild(o),r.options.interactive&&r.addInteractiveTarget(o)},_removePath:function(r){var o=r._container;ge(o),r.removeInteractiveTarget(o),delete this._layers[h(r)]},_updateStyle:function(r){var o=r._stroke,l=r._fill,c=r.options,d=r._container;d.stroked=!!c.stroke,d.filled=!!c.fill,c.stroke?(o||(o=r._stroke=Vi("stroke")),d.appendChild(o),o.weight=c.weight+"px",o.color=c.color,o.opacity=c.opacity,c.dashArray?o.dashStyle=T(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):o.dashStyle="",o.endcap=c.lineCap.replace("butt","flat"),o.joinstyle=c.lineJoin):o&&(d.removeChild(o),r._stroke=null),c.fill?(l||(l=r._fill=Vi("fill")),d.appendChild(l),l.color=c.fillColor||c.color,l.opacity=c.fillOpacity):l&&(d.removeChild(l),r._fill=null)},_updateCircle:function(r){var o=r._point.round(),l=Math.round(r._radius),c=Math.round(r._radiusY||l);this._setPath(r,r._empty()?"M0 0":"AL "+o.x+","+o.y+" "+l+","+c+" 0,"+65535*360)},_setPath:function(r,o){r._path.v=o},_bringToFront:function(r){Mr(r._container)},_bringToBack:function(r){Ir(r._container)}},Ps=as?Vi:Jh,Gi=Ht.extend({getEvents:function(){var r=Ht.prototype.getEvents.call(this);return r.zoomstart=this._onZoomStart,r},_initContainer:function(){this._container=Ps("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ps("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ge(this._container),Pe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ht.prototype._update.call(this);var r=this._bounds,o=r.getSize(),l=this._container;(!this._svgSize||!this._svgSize.equals(o))&&(this._svgSize=o,l.setAttribute("width",o.x),l.setAttribute("height",o.y)),ke(l,r.min),l.setAttribute("viewBox",[r.min.x,r.min.y,o.x,o.y].join(" ")),this.fire("update")}},_initPath:function(r){var o=r._path=Ps("path");r.options.className&&q(o,r.options.className),r.options.interactive&&q(o,"leaflet-interactive"),this._updateStyle(r),this._layers[h(r)]=r},_addPath:function(r){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(r._path),r.addInteractiveTarget(r._path)},_removePath:function(r){ge(r._path),r.removeInteractiveTarget(r._path),delete this._layers[h(r)]},_updatePath:function(r){r._project(),r._update()},_updateStyle:function(r){var o=r._path,l=r.options;o&&(l.stroke?(o.setAttribute("stroke",l.color),o.setAttribute("stroke-opacity",l.opacity),o.setAttribute("stroke-width",l.weight),o.setAttribute("stroke-linecap",l.lineCap),o.setAttribute("stroke-linejoin",l.lineJoin),l.dashArray?o.setAttribute("stroke-dasharray",l.dashArray):o.removeAttribute("stroke-dasharray"),l.dashOffset?o.setAttribute("stroke-dashoffset",l.dashOffset):o.removeAttribute("stroke-dashoffset")):o.setAttribute("stroke","none"),l.fill?(o.setAttribute("fill",l.fillColor||l.color),o.setAttribute("fill-opacity",l.fillOpacity),o.setAttribute("fill-rule",l.fillRule||"evenodd")):o.setAttribute("fill","none"))},_updatePoly:function(r,o){this._setPath(r,ed(r._parts,o))},_updateCircle:function(r){var o=r._point,l=Math.max(Math.round(r._radius),1),c=Math.max(Math.round(r._radiusY),1)||l,d="a"+l+","+c+" 0 1,0 ",_=r._empty()?"M0 0":"M"+(o.x-l)+","+o.y+d+l*2+",0 "+d+-l*2+",0 ";this._setPath(r,_)},_setPath:function(r,o){r._path.setAttribute("d",o)},_bringToFront:function(r){Mr(r._path)},_bringToBack:function(r){Ir(r._path)}});as&&Gi.include(O0);function Dd(r){return ss||as?new Gi(r):null}te.include({getRenderer:function(r){var o=r.options.renderer||this._getPaneRenderer(r.options.pane)||this.options.renderer||this._renderer;return o||(o=this._renderer=this._createRenderer()),this.hasLayer(o)||this.addLayer(o),o},_getPaneRenderer:function(r){if(r==="overlayPane"||r===void 0)return!1;var o=this._paneRenderers[r];return o===void 0&&(o=this._createRenderer({pane:r}),this._paneRenderers[r]=o),o},_createRenderer:function(r){return this.options.preferCanvas&&jd(r)||Dd(r)}});var Bd=Dr.extend({initialize:function(r,o){Dr.prototype.initialize.call(this,this._boundsToLatLngs(r),o)},setBounds:function(r){return this.setLatLngs(this._boundsToLatLngs(r))},_boundsToLatLngs:function(r){return r=he(r),[r.getSouthWest(),r.getNorthWest(),r.getNorthEast(),r.getSouthEast()]}});function C0(r,o){return new Bd(r,o)}Gi.create=Ps,Gi.pointsToPath=ed,on.geometryToLayer=Eu,on.coordsToLatLng=Su,on.coordsToLatLngs=ws,on.latLngToCoords=Pu,on.latLngsToCoords=xs,on.getFeature=Br,on.asFeature=Es,te.mergeOptions({boxZoom:!0});var Ud=Zt.extend({initialize:function(r){this._map=r,this._container=r._container,this._pane=r._panes.overlayPane,this._resetStateTimeout=0,r.on("unload",this._destroy,this)},addHooks:function(){Q(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Pe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ge(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(r){if(!r.shiftKey||r.which!==1&&r.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Di(),iu(),this._startPoint=this._map.mouseEventToContainerPoint(r),Q(document,{contextmenu:tn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(r){this._moved||(this._moved=!0,this._box=ie("div","leaflet-zoom-box",this._container),q(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(r);var o=new G(this._point,this._startPoint),l=o.getSize();ke(this._box,o.min),this._box.style.width=l.x+"px",this._box.style.height=l.y+"px"},_finish:function(){this._moved&&(ge(this._box),Ee(this._container,"leaflet-crosshair")),Bi(),ou(),Pe(document,{contextmenu:tn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(r){if(!(r.which!==1&&r.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(u(this._resetState,this),0);var o=new Me(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(o).fire("boxzoomend",{boxZoomBounds:o})}},_onKeyDown:function(r){r.keyCode===27&&this._finish()}});te.addInitHook("addHandler","boxZoom",Ud),te.mergeOptions({doubleClickZoom:!0});var Fd=Zt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(r){var o=this._map,l=o.getZoom(),c=o.options.zoomDelta,d=r.originalEvent.shiftKey?l-c:l+c;o.options.doubleClickZoom==="center"?o.setZoom(d):o.setZoomAround(r.containerPoint,d)}});te.addInitHook("addHandler","doubleClickZoom",Fd),te.mergeOptions({dragging:!0,inertia:!zi,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var $d=Zt.extend({addHooks:function(){if(!this._draggable){var r=this._map;this._draggable=new ar(r._mapPane,r._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),r.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),r.on("zoomend",this._onZoomEnd,this),r.whenReady(this._onZoomEnd,this))}q(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ee(this._map._container,"leaflet-grab"),Ee(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 r=this._map;if(r._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var o=he(this._map.options.maxBounds);this._offsetLimit=ae(this._map.latLngToContainerPoint(o.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(o.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;r.fire("movestart").fire("dragstart"),r.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(r){if(this._map.options.inertia){var o=this._lastTime=+new Date,l=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(l),this._times.push(o),this._prunePositions(o)}this._map.fire("move",r).fire("drag",r)},_prunePositions:function(r){for(;this._positions.length>1&&r-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var r=this._map.getSize().divideBy(2),o=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=o.subtract(r).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(r,o){return r-(r-o)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var r=this._draggable._newPos.subtract(this._draggable._startPos),o=this._offsetLimit;r.xo.max.x&&(r.x=this._viscousLimit(r.x,o.max.x)),r.y>o.max.y&&(r.y=this._viscousLimit(r.y,o.max.y)),this._draggable._newPos=this._draggable._startPos.add(r)}},_onPreDragWrap:function(){var r=this._worldWidth,o=Math.round(r/2),l=this._initialWorldOffset,c=this._draggable._newPos.x,d=(c-o+l)%r+o-l,_=(c+o+l)%r-o-l,S=Math.abs(d+l)0?_:-_))-o;this._delta=0,this._startTime=null,S&&(r.options.scrollWheelZoom==="center"?r.setZoom(o+S):r.setZoomAround(this._lastMousePos,o+S))}});te.addInitHook("addHandler","scrollWheelZoom",Hd),te.mergeOptions({tap:!0,tapTolerance:15});var Wd=Zt.extend({addHooks:function(){Q(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Pe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(r){if(r.touches){if(gt(r),this._fireClick=!0,r.touches.length>1){this._fireClick=!1,clearTimeout(this._holdTimeout);return}var o=r.touches[0],l=o.target;this._startPos=this._newPos=new M(o.clientX,o.clientY),l.tagName&&l.tagName.toLowerCase()==="a"&&q(l,"leaflet-active"),this._holdTimeout=setTimeout(u(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",o))},this),1e3),this._simulateEvent("mousedown",o),Q(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(r){if(clearTimeout(this._holdTimeout),Pe(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&r&&r.changedTouches){var o=r.changedTouches[0],l=o.target;l&&l.tagName&&l.tagName.toLowerCase()==="a"&&Ee(l,"leaflet-active"),this._simulateEvent("mouseup",o),this._isTapValid()&&this._simulateEvent("click",o)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(r){var o=r.touches[0];this._newPos=new M(o.clientX,o.clientY),this._simulateEvent("mousemove",o)},_simulateEvent:function(r,o){var l=document.createEvent("MouseEvents");l._simulated=!0,o.target._simulatedClick=!0,l.initMouseEvent(r,!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(l)}});Ft&&(!Ut||os)&&te.addInitHook("addHandler","tap",Wd),te.mergeOptions({touchZoom:Ft&&!zi,bounceAtZoomLimits:!0});var Vd=Zt.extend({addHooks:function(){q(this._map._container,"leaflet-touch-zoom"),Q(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ee(this._map._container,"leaflet-touch-zoom"),Pe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(r){var o=this._map;if(!(!r.touches||r.touches.length!==2||o._animatingZoom||this._zooming)){var l=o.mouseEventToContainerPoint(r.touches[0]),c=o.mouseEventToContainerPoint(r.touches[1]);this._centerPoint=o.getSize()._divideBy(2),this._startLatLng=o.containerPointToLatLng(this._centerPoint),o.options.touchZoom!=="center"&&(this._pinchStartLatLng=o.containerPointToLatLng(l.add(c)._divideBy(2))),this._startDist=l.distanceTo(c),this._startZoom=o.getZoom(),this._moved=!1,this._zooming=!0,o._stop(),Q(document,"touchmove",this._onTouchMove,this),Q(document,"touchend",this._onTouchEnd,this),gt(r)}},_onTouchMove:function(r){if(!(!r.touches||r.touches.length!==2||!this._zooming)){var o=this._map,l=o.mouseEventToContainerPoint(r.touches[0]),c=o.mouseEventToContainerPoint(r.touches[1]),d=l.distanceTo(c)/this._startDist;if(this._zoom=o.getScaleZoom(d,this._startZoom),!o.options.bounceAtZoomLimits&&(this._zoomo.getMaxZoom()&&d>1)&&(this._zoom=o._limitZoom(this._zoom)),o.options.touchZoom==="center"){if(this._center=this._startLatLng,d===1)return}else{var _=l._add(c)._divideBy(2)._subtract(this._centerPoint);if(d===1&&_.x===0&&_.y===0)return;this._center=o.unproject(o.project(this._pinchStartLatLng,this._zoom).subtract(_),this._zoom)}this._moved||(o._moveStart(!0,!1),this._moved=!0),Ce(this._animRequest);var S=u(o._move,o,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=J(S,this,!0),gt(r)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Ce(this._animRequest),Pe(document,"touchmove",this._onTouchMove,this),Pe(document,"touchend",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))}});te.addInitHook("addHandler","touchZoom",Vd),te.BoxZoom=Ud,te.DoubleClickZoom=Fd,te.Drag=$d,te.Keyboard=Zd,te.ScrollWheelZoom=Hd,te.Tap=Wd,te.TouchZoom=Vd,n.version=i,n.Control=Nt,n.control=$i,n.Browser=zy,n.Evented=en,n.Mixin=e0,n.Util=ir,n.Class=mt,n.Handler=Zt,n.extend=s,n.bind=u,n.stamp=h,n.setOptions=x,n.DomEvent=Ky,n.DomUtil=Vy,n.PosAnimation=_d,n.Draggable=ar,n.LineUtil=o0,n.PolyUtil=s0,n.Point=M,n.point=D,n.Bounds=G,n.bounds=ae,n.Transformation=Ul,n.transformation=Mi,n.Projection=a0,n.LatLng=se,n.latLng=le,n.LatLngBounds=Me,n.latLngBounds=he,n.CRS=tt,n.GeoJSON=on,n.geoJSON=Nd,n.geoJson=g0,n.Layer=Rt,n.LayerGroup=zr,n.layerGroup=c0,n.FeatureGroup=br,n.featureGroup=f0,n.ImageOverlay=Ss,n.imageOverlay=y0,n.VideoOverlay=Rd,n.videoOverlay=w0,n.SVGOverlay=Ad,n.svgOverlay=x0,n.DivOverlay=sn,n.Popup=Ur,n.popup=E0,n.Tooltip=Fr,n.tooltip=S0,n.Icon=jr,n.icon=h0,n.DivIcon=Md,n.divIcon=P0,n.Marker=gs,n.marker=d0,n.TileLayer=$r,n.tileLayer=Id,n.GridLayer=Wi,n.gridLayer=T0,n.SVG=Gi,n.svg=Dd,n.Renderer=Ht,n.Canvas=bd,n.canvas=jd,n.Path=kn,n.CircleMarker=ys,n.circleMarker=p0,n.Circle=xu,n.circle=m0,n.Polyline=rn,n.polyline=_0,n.Polygon=Dr,n.polygon=v0,n.Rectangle=Bd,n.rectangle=C0,n.Map=te,n.map=qy;var k0=window.L;n.noConflict=function(){return window.L=k0,this},window.L=n})})(Of,Of.exports);var Si=Of.exports;const Ym=Tr(Si);function pL(e,t){const[n,i]=I.useState(null),s=I.useRef(!1);return I.useEffect(()=>{if(e.current!==null&&!s.current){const a=new Si.Map(e.current,{center:{lat:t.lat,lng:t.lng},zoom:10,zoomControl:!0}),u=new Si.TileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO'});a.addLayer(u),i(a),s.current=!0}},[e,t]),n}const mL=new Si.Icon({iconUrl:"https://assets.htmlacademy.ru/content/intensive/javascript-1/demo/interactive-map/pin.svg",iconSize:[40,40],iconAnchor:[20,40]}),_L=new Si.Icon({iconUrl:"https://assets.htmlacademy.ru/content/intensive/javascript-1/demo/interactive-map/main-pin.svg",iconSize:[40,40],iconAnchor:[20,40]}),vL=new Si.Icon({iconUrl:"../../markup/img/pin-active.svg",iconSize:[40,40],iconAnchor:[20,40]});function Cy(e){const{offers:t,currentCity:n,activeOffer:i,selectedPoint:s}=e,a=I.useRef(null),u=pL(a,n);return I.useEffect(()=>{u&&(u.eachLayer(f=>{f instanceof Ym.Marker&&f.remove()}),t==null||t.forEach(f=>{Ym.marker({lat:f.location.latitude,lng:f.location.longitude},{icon:i===f.id?vL:s!==void 0&&f.title===s.title?_L:mL}).addTo(u)}),u.flyTo({lat:n.lat,lng:n.lng},12))},[u,t,i,s]),P.jsx("div",{style:{height:"100%"},ref:a})}const gL=({currentCity:e,offers:t})=>{const n=Ni(),i=ts(),s=$e(Py),a=$e(ns),u=I.useMemo(()=>a,[a]),f=I.useMemo(()=>s,[s]),h=I.useMemo(()=>t,[t]),p=$e(N=>N.Cities),m=N=>{i(oy(N))},[v,g]=I.useState(null),[O,w]=I.useState(hn.popular),x=I.useMemo(()=>(h??[]).filter(N=>N.city.name===(e==null?void 0:e.title)).slice().sort((N,E)=>{switch(O){case hn.lowToHigh:return N.price-E.price;case hn.highToLow:return E.price-N.price;case hn.topRated:return E.rating-N.rating;default:return 0}}),[e==null?void 0:e.title,h,O]);return P.jsxs("div",{className:"page page--gray page--main",children:[P.jsx("header",{className:"header",children:P.jsx("div",{className:"container",children:P.jsxs("div",{className:"header__wrapper",children:[P.jsx("div",{className:"header__left",children:P.jsx("a",{className:"header__logo-link header__logo-link--active",onClick:()=>n(Yt.Main),children:P.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})}),P.jsx("nav",{className:"header__nav",children:P.jsxs("ul",{className:"header__nav-list",children:[u===je.Auth?P.jsx("li",{className:"header__nav-item user",children:P.jsxs("a",{className:"header__nav-link header__nav-link--profile",href:"#",children:[P.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),P.jsx("span",{className:"header__user-name user__name",children:f}),P.jsx("span",{className:"header__favorite-count",children:"3"})]})}):null,P.jsx("li",{className:"header__nav-item",children:u===je.Auth?P.jsx(pn,{className:"header__nav-link",to:"/",children:P.jsx("span",{className:"header__signout",onClick:N=>{N.preventDefault(),i(Hh())},children:"Sign out"})}):P.jsx(pn,{className:"header__nav-link",to:Yt.Login,children:P.jsx("span",{className:"header__signout",children:" Sign in"})})})]})})]})})}),P.jsxs("main",{className:"page__main page__main--index",children:[P.jsx("h1",{className:"visually-hidden",children:"Cities"}),P.jsx("div",{className:"tabs",children:P.jsx("section",{className:"locations container",children:P.jsx(fL,{currentCity:e.title,cities:p.cities,onSelect:m})})}),P.jsx("div",{className:"cities",children:P.jsxs("div",{className:"cities__places-container container",children:[P.jsxs("section",{className:"cities__places places",children:[P.jsx("h2",{className:"visually-hidden",children:"Places"}),P.jsxs("b",{className:"places__found",children:[h==null?void 0:h.filter(N=>N.city.name===e.title).length," places to stay in ",e.title]}),P.jsx(dL,{currentSort:O,onSortChange:w}),P.jsx("div",{className:"cities__places-list places__list tabs__content",children:P.jsx(Oy,{offers:x==null?void 0:x.filter(N=>N.city.name===e.title),cardcssname:cl.citiesList,setActiveOffer:g})})]}),P.jsx("div",{className:"cities__right-section",children:P.jsx("section",{className:"cities__map map",children:P.jsx(Cy,{offers:x==null?void 0:x.filter(N=>N.city.name===e.title),selectedPoint:x==null?void 0:x[0],activeOffer:v,currentCity:e})})})]})})]})]})},yL=({offers:e})=>P.jsx("div",{className:"page",children:P.jsx("main",{className:"page__main page__main--favorites",children:P.jsx("div",{className:"page__favorites-container container",children:P.jsxs("section",{className:"favorites",children:[P.jsx("h1",{className:"favorites__title",children:"Saved listings"}),P.jsx("div",{className:"favorites__list",children:e==null?void 0:e.map(t=>P.jsx(Ly,{offer:t,cardcssname:cl.favoritePlace},t.id))})]})})})});function wL(){const[e,t]=I.useState(""),[n,i]=I.useState("");function s(v){t(v.target.value)}function a(v){i(v.target.value)}const u=$e(ns),f=ts(),h=Ni(),p=$e(lL);I.useEffect(()=>{u===je.Auth&&h(Yt.Main)},[u,h]);const m=v=>{v.preventDefault(),e!==""&&n!==""&&f(ua({email:e,password:n})).then(g=>{g.meta.requestStatus!=="rejected"&&!p&&(t(g.meta.arg.email),i(g.meta.arg.password))})};return P.jsxs("div",{className:"page page--gray page--login",children:[P.jsx(oa,{children:P.jsx("title",{children:"6 Cities: Login or Register"})}),P.jsx("header",{className:"header",children:P.jsx("div",{className:"container",children:P.jsx("div",{className:"header__wrapper",children:P.jsx("div",{className:"header__left",children:P.jsx(pn,{className:"header__logo-link",to:Yt.Main,children:P.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})})})})}),P.jsx("main",{className:"page__main page__main--login",children:P.jsxs("div",{className:"page__login-container container",children:[P.jsxs("section",{className:"login",children:[P.jsx("h1",{className:"login__title",children:"Sign in"}),P.jsxs("form",{className:"login__form form",onSubmit:m,action:"#",method:"post",children:[P.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[P.jsx("label",{className:"visually-hidden",children:"E-mail"}),P.jsx("input",{"data-testid":"email_input",className:"login__input form__input",onChange:s,value:e,type:"email",name:"email",placeholder:"Email",required:!0})]}),P.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[P.jsx("label",{className:"visually-hidden",children:"Password"}),P.jsx("input",{"data-testid":"password_input",className:"login__input form__input",onChange:a,value:n,type:"password",pattern:"(?=.*\\d)(?=.*[a-zA-Z]).{2,}",title:"Contains one letter and one digit",name:"password",placeholder:"Password",required:!0})]}),P.jsx("button",{className:"login__submit form__submit button",type:"submit",children:"Sign in"})]})]}),P.jsx("section",{className:"locations locations--login locations--current",children:P.jsx("div",{className:"locations__item",children:P.jsx(pn,{"data-testid":"location_item-link",className:"locations__item-link",to:Yt.Main,children:P.jsx("span",{children:"Amsterdam"})})})})]})})]})}const xL=Et.memo(wL),EL=()=>{const[e,t]=I.useState(0),[n,i]=I.useState(""),s=$e(h=>h.offerIdDetails.offer.id),a=ts(),u=h=>{h.preventDefault(),n!==null&&e>0&&a(oT({rating:e,comment:n,id:s}))},f=[5,4,3,2,1];return P.jsxs("form",{className:"reviews__form form",onSubmit:u,children:[P.jsx("label",{className:"reviews__label form__label",htmlFor:"review",children:"Your review"}),P.jsx("div",{className:"reviews__rating-form form__rating",children:f.map(h=>P.jsxs(Et.Fragment,{children:[P.jsx("input",{className:"form__rating-input visually-hidden",name:"rating",value:h,id:`${h}-stars`,type:"radio",onChange:()=>t(h)}),P.jsx("label",{htmlFor:`${h}-stars`,className:"reviews__rating-label form__rating-label",title:`${h} stars`,children:P.jsx("svg",{className:"form__star-image",width:"37",height:"33",children:P.jsx("use",{xlinkHref:"#icon-star"})})})]},h))}),P.jsx("textarea",{className:"reviews__textarea form__textarea",id:"review",name:"review",placeholder:"Tell how was your stay, what you like and what can be improved",value:n,onChange:h=>i(h.target.value)}),P.jsxs("div",{className:"reviews__button-wrapper",children:[P.jsxs("p",{className:"reviews__help",children:["To submit review please make sure to set ",P.jsx("span",{className:"reviews__star",children:"rating"})," and describe your stay with at least ",P.jsx("b",{className:"reviews__text-amount",children:"50 characters"}),"."]}),P.jsx("button",{className:"reviews__submit form__submit button",type:"submit",disabled:n.length<50||e===0,children:"Submit"})]})]})},SL=({rating:e,mode:t="full",containerMix:n,starsMix:i})=>{const s=t==="full";return P.jsxs("div",{className:Vo(n,"rating"),children:[P.jsxs("div",{className:Vo(i,"rating__stars"),children:[P.jsx("span",{style:{width:`${20*Math.trunc(e)}%`}}),P.jsxs("span",{className:"visually-hidden",children:["Rating ",e]})]}),!!s&&P.jsx("span",{className:"offer__rating-value rating__value",children:e})]})},PL=({comment:e,date:t,rating:n,user:i})=>P.jsxs("li",{className:"reviews__item",children:[P.jsxs("div",{className:"reviews__user user",children:[P.jsx("div",{className:"reviews__avatar-wrapper user__avatar-wrapper",children:P.jsx("img",{className:"reviews__avatar user__avatar",src:i.avatar,width:"54",height:"54",alt:"Reviews avatar"})}),P.jsx("span",{className:"reviews__user-name",children:i.name})]}),P.jsxs("div",{className:"reviews__info",children:[P.jsx(SL,{rating:n,containerMix:"reviews__rating",starsMix:"reviews__stars",mode:"compact"}),P.jsx("p",{className:"reviews__text",children:e}),P.jsx("time",{className:"reviews__time",dateTime:"2019-04-24",children:t})]})]}),TL=({reviews:e,containerMix:t})=>P.jsxs("section",{className:Vo("reviews",t),children:[P.jsxs("h2",{className:"reviews__title",children:["Reviews · ",P.jsx("span",{className:"reviews__amount",children:e.length})]}),P.jsx("ul",{className:"reviews__list",children:e.map(n=>P.jsx(PL,{...n},n.date.toString()))})]}),LL=()=>{var O;const{id:e}=Bx(),t=ts(),n=$e(w=>w.currentCity);I.useEffect(()=>{t(So(e??"")),t(ay(e??"")),t(ly(e??""))},[e,t]);const i=$e(w=>w.offerIdDetails.nearbyOffers),s=$e(w=>w.offerIdDetails.offer),a=$e(w=>w.offerPage),u=$e(w=>w.offerIdDetails.comments),f=$e(Py),h=$e(ns),[p,m]=I.useState(!1),v=Ni();I.useEffect(()=>{m((s==null?void 0:s.isFavorite)??!1)},[s==null?void 0:s.isFavorite]);const g=()=>{if(h===je.NoAuth||h===je.Unknown){v(Yt.Login);return}t(uy({offerId:s==null?void 0:s.id,isFavorite:!p})),m(!p)};return P.jsxs("div",{className:"page",children:[P.jsx("header",{className:"header",children:P.jsx("div",{className:"container",children:P.jsxs("div",{className:"header__wrapper",children:[P.jsx("div",{className:"header__left",children:P.jsx(pn,{to:Yt.Main,children:P.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:81,height:41})})}),P.jsx("nav",{className:"header__nav",children:P.jsxs("ul",{className:"header__nav-list",children:[P.jsx("li",{className:"header__nav-item user",children:P.jsxs("a",{className:"header__nav-link header__nav-link--profile",href:"#",children:[P.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),P.jsx("span",{className:"header__user-name user__name",children:f}),P.jsx("span",{className:"header__favorite-count",children:"3"})]})}),P.jsx("li",{className:"header__nav-item",children:h===je.Auth?P.jsx(pn,{className:"header__nav-link",to:"/",children:P.jsx("span",{className:"header__signout",onClick:w=>{w.preventDefault(),t(Hh())},children:"Sign out"})}):P.jsx(pn,{className:"header__nav-link",to:Yt.Login,children:P.jsx("span",{className:"header__signout",children:" Sign in"})})})]})})]})})}),P.jsxs("main",{className:"page__main page__main--offer",children:[P.jsxs("section",{className:"offer",children:[P.jsx("div",{className:"offer__gallery-container container",children:P.jsx("div",{className:"offer__gallery",children:s==null?void 0:s.images.map(w=>P.jsx("div",{className:"offer__image-wrapper",children:P.jsx("img",{className:"offer__image",src:w,alt:"Фото студии"})},w))})}),P.jsx("div",{className:"offer__container container",children:P.jsxs("div",{className:"offer__wrapper",children:[s!=null&&s.isPremium?P.jsx("div",{className:"offer__mark",children:P.jsx("span",{children:"Premium"})}):null,P.jsxs("div",{className:"offer__name-wrapper",children:[P.jsx("h1",{className:"offer__name",children:s==null?void 0:s.title}),h&&P.jsxs("button",{className:Vo("place-card__bookmark-button","button",{"place-card__bookmark-button--active":p}),type:"button",onClick:g,children:[P.jsx("svg",{className:"place-card__bookmark-icon",width:"18",height:"19",children:P.jsx("use",{xlinkHref:"#icon-bookmark"})}),P.jsx("span",{className:"visually-hidden",children:"To bookmarks"})]})]}),P.jsxs("div",{className:"offer__rating rating",children:[P.jsxs("div",{className:"offer__stars rating__stars",children:[P.jsx("span",{style:{width:`${((s==null?void 0:s.rating)??0/5)*100}%`}}),P.jsx("span",{className:"visually-hidden",children:"Rating"})]}),P.jsx("span",{className:"offer__rating-value rating__value",children:s==null?void 0:s.rating})]}),P.jsxs("ul",{className:"offer__features",children:[P.jsx("li",{className:"offer__feature offer__feature--entire",children:s==null?void 0:s.type}),P.jsxs("li",{className:"offer__feature offer__feature--bedrooms",children:[s==null?void 0:s.bedrooms," Bedrooms"]}),P.jsxs("li",{className:"offer__feature offer__feature--adults",children:["Max ",s==null?void 0:s.maxAdults," Adults"]})]}),P.jsxs("div",{className:"offer__price",children:[P.jsxs("b",{className:"offer__price-value",children:["€",s==null?void 0:s.price]}),P.jsx("span",{className:"offer__price-text",children:" night"})]}),P.jsxs("div",{className:"offer__inside",children:[P.jsx("h2",{className:"offer__inside-title",children:"What's inside"}),P.jsx("ul",{className:"offer__inside-list",children:s==null?void 0:s.goods.map(w=>P.jsx("li",{className:"offer__inside-item",children:w},w))})]}),P.jsxs("div",{className:"offer__host",children:[P.jsx("h2",{className:"offer__host-title",children:"Meet the host"}),P.jsxs("div",{className:"offer__host-user user",children:[P.jsx("div",{className:"offer__avatar-wrapper offer__avatar-wrapper--pro user__avatar-wrapper",children:P.jsx("img",{className:"offer__avatar user__avatar",src:s==null?void 0:s.host.avatarUrl,width:"74",height:"74",alt:"Host avatar"})}),P.jsx("span",{className:"offer__user-name",children:s==null?void 0:s.host.name}),P.jsx("span",{className:"offer__user-status",children:s==null?void 0:s.host.isPro})]}),P.jsx("div",{className:"offer__description",children:P.jsx("p",{className:"offer__text",children:s==null?void 0:s.description})})]}),P.jsx(TL,{reviews:u,containerMix:"offer__reviews"})]})}),P.jsx("section",{className:"offer__map map",children:P.jsx(Cy,{offers:a===null?void 0:[...a.offer],selectedPoint:(O=a.offer)==null?void 0:O[1],currentCity:n.currentCity,activeOffer:a.offer===null?null:a.offer[1].id})})]}),P.jsx("div",{className:"container",children:P.jsx(Oy,{offers:i,cardcssname:cl.citiesList})}),P.jsxs("div",{children:[P.jsx("h2",{className:"reviews__title",children:"Reviews"}),h===je.Auth?P.jsx(EL,{}):null]})]})]})};var ky=(e=>(e.LOGIN="/login",e.MAIN="/",e.FAVORITES="/favorites",e.OFFER="/offer/:id",e.NOT_FOUND="/notFound",e))(ky||{});function OL({children:e,authState:t}){return t===je.Auth?e:P.jsx(Xx,{to:ky.LOGIN})}const CL=()=>{const e=ts(),t=$e(s=>s.currentCity),n=$e(s=>s.offerPage);I.useEffect(()=>{e(Eo())},[e]);const i=$e(ns);return P.jsx(ri,{children:P.jsx(sE,{children:P.jsxs(eE,{children:[P.jsx(uo,{path:"/",element:P.jsx(gL,{offers:n.offer,currentCity:t.currentCity})}),P.jsx(uo,{path:"/login",element:P.jsx(xL,{})}),P.jsx(uo,{path:"/offer/:id",element:P.jsx(OL,{authState:i,children:P.jsx(LL,{})},"/offer/:id")},"/offer/:id"),P.jsx(uo,{path:"/favorites",element:P.jsx(yL,{offers:n.offer})})]})})})};_r.dispatch(Eo);const kL=vc.createRoot(document.getElementById("root"));_r.dispatch(ca(ry()));kL.render(P.jsx(Et.StrictMode,{children:P.jsx(rL,{store:_r,children:P.jsx(CL,{})})})); diff --git a/14/index.html b/14/index.html index 2fe608b..093d2f2 100644 --- a/14/index.html +++ b/14/index.html @@ -7,7 +7,7 @@ 6 cities - +