diff --git a/12/assets/index-4c7d8196.js b/12/assets/index-c7b1937a.js similarity index 83% rename from 12/assets/index-4c7d8196.js rename to 12/assets/index-c7b1937a.js index 3de31f3..9cca569 100644 --- a/12/assets/index-4c7d8196.js +++ b/12/assets/index-c7b1937a.js @@ -14,7 +14,7 @@ var Q0=Object.defineProperty;var X0=(e,t,n)=>t in e?Q0(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var mw=O,_w=Symbol.for("react.element"),vw=Symbol.for("react.fragment"),gw=Object.prototype.hasOwnProperty,yw=mw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ww={key:!0,ref:!0,__self:!0,__source:!0};function f_(e,t,n){var i,s={},a=null,u=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(u=t.ref);for(i in t)gw.call(t,i)&&!ww.hasOwnProperty(i)&&(s[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)s[i]===void 0&&(s[i]=t[i]);return{$$typeof:_w,type:e,key:a,ref:u,props:s,_owner:yw.current}}il.Fragment=vw;il.jsx=f_;il.jsxs=f_;n_.exports=il;var x=n_.exports,Pc={},d_={exports:{}},xt={},h_={exports:{}},p_={};/** + */var mw=O,_w=Symbol.for("react.element"),vw=Symbol.for("react.fragment"),gw=Object.prototype.hasOwnProperty,yw=mw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ww={key:!0,ref:!0,__self:!0,__source:!0};function f_(e,t,n){var i,s={},a=null,u=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(u=t.ref);for(i in t)gw.call(t,i)&&!ww.hasOwnProperty(i)&&(s[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)s[i]===void 0&&(s[i]=t[i]);return{$$typeof:_w,type:e,key:a,ref:u,props:s,_owner:yw.current}}il.Fragment=vw;il.jsx=f_;il.jsxs=f_;n_.exports=il;var w=n_.exports,Pc={},d_={exports:{}},xt={},h_={exports:{}},p_={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var Q0=Object.defineProperty;var X0=(e,t,n)=>t in e?Q0(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(T,U){var A=T.length;T.push(U);e:for(;0>>1,J=T[H];if(0>>1;Hs(te,A))oes(ye,te)?(T[H]=ye,T[oe]=A,H=oe):(T[H]=te,T[ee]=A,H=ee);else if(oes(ye,A))T[H]=ye,T[oe]=A,H=oe;else break e}}return U}function s(T,U){var A=T.sortIndex-U.sortIndex;return A!==0?A:T.id-U.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 d=[],p=[],_=1,v=null,S=3,k=!1,P=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(T){for(var U=n(p);U!==null;){if(U.callback===null)i(p);else if(U.startTime<=T)i(p),U.sortIndex=U.expirationTime,t(d,U);else break;U=n(p)}}function N(T){if(E=!1,y(T),!P)if(n(d)!==null)P=!0,F(j);else{var U=n(p);U!==null&&K(N,U.startTime-T)}}function j(T,U){P=!1,E&&(E=!1,w(I),I=-1),k=!0;var A=S;try{for(y(U),v=n(d);v!==null&&(!(v.expirationTime>U)||T&&!G());){var H=v.callback;if(typeof H=="function"){v.callback=null,S=v.priorityLevel;var J=H(v.expirationTime<=U);U=e.unstable_now(),typeof J=="function"?v.callback=J:v===n(d)&&i(d),y(U)}else i(d);v=n(d)}if(v!==null)var re=!0;else{var ee=n(p);ee!==null&&K(N,ee.startTime-U),re=!1}return re}finally{v=null,S=A,k=!1}}var b=!1,$=null,I=-1,X=5,V=-1;function G(){return!(e.unstable_now()-VT||125H?(T.sortIndex=A,t(p,T),n(d)===null&&T===n(p)&&(E?(w(I),I=-1):E=!0,K(N,A-H))):(T.sortIndex=J,t(d,T),P||k||(P=!0,F(j))),T},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(T){var U=S;return function(){var A=S;S=U;try{return T.apply(this,arguments)}finally{S=A}}}})(p_);h_.exports=p_;var xw=h_.exports;/** + */(function(e){function t(T,U){var A=T.length;T.push(U);e:for(;0>>1,J=T[H];if(0>>1;Hs(te,A))oes(ye,te)?(T[H]=ye,T[oe]=A,H=oe):(T[H]=te,T[ee]=A,H=ee);else if(oes(ye,A))T[H]=ye,T[oe]=A,H=oe;else break e}}return U}function s(T,U){var A=T.sortIndex-U.sortIndex;return A!==0?A:T.id-U.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 d=[],p=[],_=1,v=null,S=3,k=!1,P=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(T){for(var U=n(p);U!==null;){if(U.callback===null)i(p);else if(U.startTime<=T)i(p),U.sortIndex=U.expirationTime,t(d,U);else break;U=n(p)}}function N(T){if(E=!1,y(T),!P)if(n(d)!==null)P=!0,F(j);else{var U=n(p);U!==null&&K(N,U.startTime-T)}}function j(T,U){P=!1,E&&(E=!1,x(I),I=-1),k=!0;var A=S;try{for(y(U),v=n(d);v!==null&&(!(v.expirationTime>U)||T&&!G());){var H=v.callback;if(typeof H=="function"){v.callback=null,S=v.priorityLevel;var J=H(v.expirationTime<=U);U=e.unstable_now(),typeof J=="function"?v.callback=J:v===n(d)&&i(d),y(U)}else i(d);v=n(d)}if(v!==null)var re=!0;else{var ee=n(p);ee!==null&&K(N,ee.startTime-U),re=!1}return re}finally{v=null,S=A,k=!1}}var b=!1,$=null,I=-1,X=5,V=-1;function G(){return!(e.unstable_now()-VT||125H?(T.sortIndex=A,t(p,T),n(d)===null&&T===n(p)&&(E?(x(I),I=-1):E=!0,K(N,A-H))):(T.sortIndex=J,t(d,T),P||k||(P=!0,F(j))),T},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(T){var U=S;return function(){var A=S;S=U;try{return T.apply(this,arguments)}finally{S=A}}}})(p_);h_.exports=p_;var xw=h_.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var Q0=Object.defineProperty;var X0=(e,t,n)=>t in e?Q0(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var m_=O,gt=xw;function Z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cc=Object.prototype.hasOwnProperty,Sw=/^[: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]*$/,ap={},lp={};function Ew(e){return Cc.call(lp,e)?!0:Cc.call(ap,e)?!1:Sw.test(e)?lp[e]=!0:(ap[e]=!0,!1)}function Pw(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 Cw(e,t,n,i){if(t===null||typeof t>"u"||Pw(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 at(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 Ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ge[e]=new at(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ge[t]=new at(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ge[e]=new at(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ge[e]=new at(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){Ge[e]=new at(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ge[e]=new at(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ge[e]=new at(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ge[e]=new at(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ge[e]=new at(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ff=/[\-:]([a-z])/g;function $f(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(Ff,$f);Ge[t]=new at(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(Ff,$f);Ge[t]=new at(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(Ff,$f);Ge[t]=new at(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ge[e]=new at(e,1,!1,e.toLowerCase(),null,!1,!1)});Ge.xlinkHref=new at("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ge[e]=new at(e,1,!1,e.toLowerCase(),null,!0,!0)});function Uf(e,t,n,i){var s=Ge.hasOwnProperty(t)?Ge[t]:null;(s!==null?s.type!==0:i||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cc=Object.prototype.hasOwnProperty,Sw=/^[: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]*$/,ap={},lp={};function Ew(e){return Cc.call(lp,e)?!0:Cc.call(ap,e)?!1:Sw.test(e)?lp[e]=!0:(ap[e]=!0,!1)}function Pw(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 Cw(e,t,n,i){if(t===null||typeof t>"u"||Pw(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 at(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 Ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ge[e]=new at(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ge[t]=new at(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ge[e]=new at(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ge[e]=new at(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){Ge[e]=new at(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ge[e]=new at(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ge[e]=new at(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ge[e]=new at(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ge[e]=new at(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ff=/[\-:]([a-z])/g;function $f(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(Ff,$f);Ge[t]=new at(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(Ff,$f);Ge[t]=new at(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(Ff,$f);Ge[t]=new at(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ge[e]=new at(e,1,!1,e.toLowerCase(),null,!1,!1)});Ge.xlinkHref=new at("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ge[e]=new at(e,1,!1,e.toLowerCase(),null,!0,!0)});function Uf(e,t,n,i){var s=Ge.hasOwnProperty(t)?Ge[t]:null;(s!==null?s.type!==0:i||!(2f||s[u]!==a[f]){var d=` -`+s[u].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=u&&0<=f);break}}}finally{Zu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?so(e):""}function Tw(e){switch(e.tag){case 5:return so(e.type);case 16:return so("Lazy");case 13:return so("Suspense");case 19:return so("SuspenseList");case 0:case 2:case 15:return e=Hu(e.type,!1),e;case 11:return e=Hu(e.type.render,!1),e;case 1:return e=Hu(e.type,!0),e;default:return""}}function Nc(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 ni:return"Fragment";case ti:return"Portal";case Tc:return"Profiler";case Zf:return"StrictMode";case kc:return"Suspense";case Lc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g_:return(e.displayName||"Context")+".Consumer";case v_:return(e._context.displayName||"Context")+".Provider";case Hf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Wf:return t=e.displayName||null,t!==null?t:Nc(e.type)||"Memo";case Fn:t=e._payload,e=e._init;try{return Nc(e(t))}catch{}}return null}function kw(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 Nc(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 ir(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function w_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lw(e){var t=w_(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 Ls(e){e._valueTracker||(e._valueTracker=Lw(e))}function x_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=w_(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function va(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 Oc(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function cp(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=ir(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 S_(e,t){t=t.checked,t!=null&&Uf(e,"checked",t,!1)}function Mc(e,t){S_(e,t);var n=ir(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")?Rc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rc(e,t.type,ir(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fp(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 Rc(e,t,n){(t!=="number"||va(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ao=Array.isArray;function pi(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 Eo(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},Nw=["Webkit","ms","Moz","O"];Object.keys(fo).forEach(function(e){Nw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fo[t]=fo[e]})});function T_(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 k_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,s=T_(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}var Ow=Le({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 Ac(e,t){if(t){if(Ow[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Z(62))}}function jc(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 Dc=null;function Vf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bc=null,mi=null,_i=null;function pp(e){if(e=Qo(e)){if(typeof bc!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=ul(t),bc(e.stateNode,e.type,t))}}function L_(e){mi?_i?_i.push(e):_i=[e]:mi=e}function N_(){if(mi){var e=mi,t=_i;if(_i=mi=null,pp(e),t)for(e=0;e>>=0,e===0?32:31-($w(e)/Uw|0)|0}var Os=64,Ms=4194304;function lo(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 xa(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=lo(f):(a&=u,a!==0&&(i=lo(a)))}else u=n&~s,u!==0?i=lo(u):a!==0&&(i=lo(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 Go(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wt(t),e[t]=n}function Vw(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),Ep=String.fromCharCode(32),Pp=!1;function G_(e,t){switch(e){case"keyup":return w1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Y_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ri=!1;function S1(e,t){switch(e){case"compositionend":return Y_(t);case"keypress":return t.which!==32?null:(Pp=!0,Ep);case"textInput":return e=t.data,e===Ep&&Pp?null:e;default:return null}}function E1(e,t){if(ri)return e==="compositionend"||!ed&&G_(e,t)?(e=K_(),Ys=Qf=Hn=null,ri=!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=Lp(n)}}function ev(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ev(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tv(){for(var e=window,t=va();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=va(e.document)}return t}function td(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 R1(e){var t=tv(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ev(n.ownerDocument.documentElement,n)){if(i!==null&&td(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=Np(n,a);var u=Np(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,ii=null,Hc=null,_o=null,Wc=!1;function Op(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wc||ii==null||ii!==va(i)||(i=ii,"selectionStart"in i&&td(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&&No(_o,i)||(_o=i,i=Pa(Hc,"onSelect"),0ai||(e.current=Qc[ai],Qc[ai]=null,ai--)}function xe(e,t){ai++,Qc[ai]=e.current,e.current=t}var or={},nt=ur(or),ct=ur(!1),Lr=or;function xi(e,t){var n=e.type.contextTypes;if(!n)return or;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 ft(e){return e=e.childContextTypes,e!=null}function Ta(){Ee(ct),Ee(nt)}function Dp(e,t,n){if(nt.current!==or)throw Error(Z(168));xe(nt,t),xe(ct,n)}function cv(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(Z(108,kw(e)||"Unknown",s));return Le({},n,i)}function ka(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Lr=nt.current,xe(nt,e),xe(ct,ct.current),!0}function bp(e,t,n){var i=e.stateNode;if(!i)throw Error(Z(169));n?(e=cv(e,t,Lr),i.__reactInternalMemoizedMergedChildContext=e,Ee(ct),Ee(nt),xe(nt,e)):Ee(ct),xe(ct,n)}var gn=null,cl=!1,ic=!1;function fv(e){gn===null?gn=[e]:gn.push(e)}function H1(e){cl=!0,fv(e)}function cr(){if(!ic&&gn!==null){ic=!0;var e=0,t=ve;try{var n=gn;for(ve=1;e>=u,s-=u,yn=1<<32-Wt(t)+s|n<I?(X=$,$=null):X=$.sibling;var V=S(w,$,y[I],N);if(V===null){$===null&&($=X);break}e&&$&&V.alternate===null&&t(w,$),g=a(V,g,I),b===null?j=V:b.sibling=V,b=V,$=X}if(I===y.length)return n(w,$),Pe&&vr(w,I),j;if($===null){for(;II?(X=$,$=null):X=$.sibling;var G=S(w,$,V.value,N);if(G===null){$===null&&($=X);break}e&&$&&G.alternate===null&&t(w,$),g=a(G,g,I),b===null?j=G:b.sibling=G,b=G,$=X}if(V.done)return n(w,$),Pe&&vr(w,I),j;if($===null){for(;!V.done;I++,V=y.next())V=v(w,V.value,N),V!==null&&(g=a(V,g,I),b===null?j=V:b.sibling=V,b=V);return Pe&&vr(w,I),j}for($=i(w,$);!V.done;I++,V=y.next())V=k($,w,I,V.value,N),V!==null&&(e&&V.alternate!==null&&$.delete(V.key===null?I:V.key),g=a(V,g,I),b===null?j=V:b.sibling=V,b=V);return e&&$.forEach(function(ue){return t(w,ue)}),Pe&&vr(w,I),j}function R(w,g,y,N){if(typeof y=="object"&&y!==null&&y.type===ni&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ks:e:{for(var j=y.key,b=g;b!==null;){if(b.key===j){if(j=y.type,j===ni){if(b.tag===7){n(w,b.sibling),g=s(b,y.props.children),g.return=w,w=g;break e}}else if(b.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Fn&&Wp(j)===b.type){n(w,b.sibling),g=s(b,y.props),g.ref=no(w,b,y),g.return=w,w=g;break e}n(w,b);break}else t(w,b);b=b.sibling}y.type===ni?(g=Cr(y.props.children,w.mode,N,y.key),g.return=w,w=g):(N=ia(y.type,y.key,y.props,null,w.mode,N),N.ref=no(w,g,y),N.return=w,w=N)}return u(w);case ti:e:{for(b=y.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(w,g.sibling),g=s(g,y.children||[]),g.return=w,w=g;break e}else{n(w,g);break}else t(w,g);g=g.sibling}g=dc(y,w.mode,N),g.return=w,w=g}return u(w);case Fn:return b=y._init,R(w,g,b(y._payload),N)}if(ao(y))return P(w,g,y,N);if(Qi(y))return E(w,g,y,N);bs(w,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(w,g.sibling),g=s(g,y),g.return=w,w=g):(n(w,g),g=fc(y,w.mode,N),g.return=w,w=g),u(w)):n(w,g)}return R}var Ei=yv(!0),wv=yv(!1),Xo={},ln=ur(Xo),zo=ur(Xo),Io=ur(Xo);function Er(e){if(e===Xo)throw Error(Z(174));return e}function cd(e,t){switch(xe(Io,t),xe(zo,e),xe(ln,Xo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ic(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ic(t,e)}Ee(ln),xe(ln,t)}function Pi(){Ee(ln),Ee(zo),Ee(Io)}function xv(e){Er(Io.current);var t=Er(ln.current),n=Ic(t,e.type);t!==n&&(xe(zo,e),xe(ln,n))}function fd(e){zo.current===e&&(Ee(ln),Ee(zo))}var Te=ur(0);function za(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 oc=[];function dd(){for(var e=0;en?n:4,e(!0);var i=sc.transition;sc.transition={};try{e(!1),t()}finally{ve=n,sc.transition=i}}function Dv(){return It().memoizedState}function q1(e,t,n){var i=er(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},bv(e))Bv(t,n);else if(n=mv(e,t,n,i),n!==null){var s=ot();Vt(n,e,i,s),Fv(n,t,i)}}function G1(e,t,n){var i=er(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(bv(e))Bv(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,Kt(f,u)){var d=t.interleaved;d===null?(s.next=s,ld(t)):(s.next=d.next,d.next=s),t.interleaved=s;return}}catch{}finally{}n=mv(e,t,s,i),n!==null&&(s=ot(),Vt(n,e,i,s),Fv(n,t,i))}}function bv(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function Bv(e,t){vo=Ia=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fv(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,qf(e,n)}}var Aa={readContext:zt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},Y1={readContext:zt,useCallback:function(e,t){return rn().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Kp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ea(4194308,4,Rv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ea(4194308,4,e,t)},useInsertionEffect:function(e,t){return ea(4,2,e,t)},useMemo:function(e,t){var n=rn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=rn();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=q1.bind(null,ke,e),[i.memoizedState,e]},useRef:function(e){var t=rn();return e={current:e},t.memoizedState=e},useState:Vp,useDebugValue:vd,useDeferredValue:function(e){return rn().memoizedState=e},useTransition:function(){var e=Vp(!1),t=e[0];return e=K1.bind(null,e[1]),rn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=ke,s=rn();if(Pe){if(n===void 0)throw Error(Z(407));n=n()}else{if(n=t(),He===null)throw Error(Z(349));Or&30||Pv(i,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,Kp(Tv.bind(null,i,a,e),[e]),i.flags|=2048,Do(9,Cv.bind(null,i,a,n,t),void 0,null),n},useId:function(){var e=rn(),t=He.identifierPrefix;if(Pe){var n=wn,i=yn;n=(i&~(1<<32-Wt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ao++,0")&&(d=d.replace("",e.displayName)),d}while(1<=u&&0<=f);break}}}finally{Zu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?so(e):""}function Tw(e){switch(e.tag){case 5:return so(e.type);case 16:return so("Lazy");case 13:return so("Suspense");case 19:return so("SuspenseList");case 0:case 2:case 15:return e=Hu(e.type,!1),e;case 11:return e=Hu(e.type.render,!1),e;case 1:return e=Hu(e.type,!0),e;default:return""}}function Nc(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 ni:return"Fragment";case ti:return"Portal";case Tc:return"Profiler";case Zf:return"StrictMode";case kc:return"Suspense";case Lc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g_:return(e.displayName||"Context")+".Consumer";case v_:return(e._context.displayName||"Context")+".Provider";case Hf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Wf:return t=e.displayName||null,t!==null?t:Nc(e.type)||"Memo";case Fn:t=e._payload,e=e._init;try{return Nc(e(t))}catch{}}return null}function kw(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 Nc(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 ir(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function w_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lw(e){var t=w_(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 Ls(e){e._valueTracker||(e._valueTracker=Lw(e))}function x_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=w_(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function va(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 Oc(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function cp(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=ir(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 S_(e,t){t=t.checked,t!=null&&Uf(e,"checked",t,!1)}function Mc(e,t){S_(e,t);var n=ir(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")?Rc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rc(e,t.type,ir(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fp(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 Rc(e,t,n){(t!=="number"||va(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ao=Array.isArray;function pi(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 Eo(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},Nw=["Webkit","ms","Moz","O"];Object.keys(fo).forEach(function(e){Nw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fo[t]=fo[e]})});function T_(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 k_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,s=T_(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}var Ow=Le({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 Ac(e,t){if(t){if(Ow[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Z(62))}}function jc(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 Dc=null;function Vf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bc=null,mi=null,_i=null;function pp(e){if(e=Qo(e)){if(typeof bc!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=ul(t),bc(e.stateNode,e.type,t))}}function L_(e){mi?_i?_i.push(e):_i=[e]:mi=e}function N_(){if(mi){var e=mi,t=_i;if(_i=mi=null,pp(e),t)for(e=0;e>>=0,e===0?32:31-($w(e)/Uw|0)|0}var Os=64,Ms=4194304;function lo(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 xa(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=lo(f):(a&=u,a!==0&&(i=lo(a)))}else u=n&~s,u!==0?i=lo(u):a!==0&&(i=lo(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 Go(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wt(t),e[t]=n}function Vw(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),Ep=String.fromCharCode(32),Pp=!1;function G_(e,t){switch(e){case"keyup":return w1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Y_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ri=!1;function S1(e,t){switch(e){case"compositionend":return Y_(t);case"keypress":return t.which!==32?null:(Pp=!0,Ep);case"textInput":return e=t.data,e===Ep&&Pp?null:e;default:return null}}function E1(e,t){if(ri)return e==="compositionend"||!ed&&G_(e,t)?(e=K_(),Ys=Qf=Hn=null,ri=!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=Lp(n)}}function ev(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ev(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tv(){for(var e=window,t=va();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=va(e.document)}return t}function td(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 R1(e){var t=tv(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ev(n.ownerDocument.documentElement,n)){if(i!==null&&td(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=Np(n,a);var u=Np(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,ii=null,Hc=null,_o=null,Wc=!1;function Op(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wc||ii==null||ii!==va(i)||(i=ii,"selectionStart"in i&&td(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&&No(_o,i)||(_o=i,i=Pa(Hc,"onSelect"),0ai||(e.current=Qc[ai],Qc[ai]=null,ai--)}function xe(e,t){ai++,Qc[ai]=e.current,e.current=t}var or={},nt=ur(or),ct=ur(!1),Nr=or;function xi(e,t){var n=e.type.contextTypes;if(!n)return or;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 ft(e){return e=e.childContextTypes,e!=null}function Ta(){Ee(ct),Ee(nt)}function Dp(e,t,n){if(nt.current!==or)throw Error(Z(168));xe(nt,t),xe(ct,n)}function cv(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(Z(108,kw(e)||"Unknown",s));return Le({},n,i)}function ka(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Nr=nt.current,xe(nt,e),xe(ct,ct.current),!0}function bp(e,t,n){var i=e.stateNode;if(!i)throw Error(Z(169));n?(e=cv(e,t,Nr),i.__reactInternalMemoizedMergedChildContext=e,Ee(ct),Ee(nt),xe(nt,e)):Ee(ct),xe(ct,n)}var yn=null,cl=!1,ic=!1;function fv(e){yn===null?yn=[e]:yn.push(e)}function H1(e){cl=!0,fv(e)}function cr(){if(!ic&&yn!==null){ic=!0;var e=0,t=ve;try{var n=yn;for(ve=1;e>=u,s-=u,wn=1<<32-Wt(t)+s|n<I?(X=$,$=null):X=$.sibling;var V=S(x,$,y[I],N);if(V===null){$===null&&($=X);break}e&&$&&V.alternate===null&&t(x,$),g=a(V,g,I),b===null?j=V:b.sibling=V,b=V,$=X}if(I===y.length)return n(x,$),Pe&&gr(x,I),j;if($===null){for(;II?(X=$,$=null):X=$.sibling;var G=S(x,$,V.value,N);if(G===null){$===null&&($=X);break}e&&$&&G.alternate===null&&t(x,$),g=a(G,g,I),b===null?j=G:b.sibling=G,b=G,$=X}if(V.done)return n(x,$),Pe&&gr(x,I),j;if($===null){for(;!V.done;I++,V=y.next())V=v(x,V.value,N),V!==null&&(g=a(V,g,I),b===null?j=V:b.sibling=V,b=V);return Pe&&gr(x,I),j}for($=i(x,$);!V.done;I++,V=y.next())V=k($,x,I,V.value,N),V!==null&&(e&&V.alternate!==null&&$.delete(V.key===null?I:V.key),g=a(V,g,I),b===null?j=V:b.sibling=V,b=V);return e&&$.forEach(function(ue){return t(x,ue)}),Pe&&gr(x,I),j}function R(x,g,y,N){if(typeof y=="object"&&y!==null&&y.type===ni&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ks:e:{for(var j=y.key,b=g;b!==null;){if(b.key===j){if(j=y.type,j===ni){if(b.tag===7){n(x,b.sibling),g=s(b,y.props.children),g.return=x,x=g;break e}}else if(b.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Fn&&Wp(j)===b.type){n(x,b.sibling),g=s(b,y.props),g.ref=no(x,b,y),g.return=x,x=g;break e}n(x,b);break}else t(x,b);b=b.sibling}y.type===ni?(g=Tr(y.props.children,x.mode,N,y.key),g.return=x,x=g):(N=ia(y.type,y.key,y.props,null,x.mode,N),N.ref=no(x,g,y),N.return=x,x=N)}return u(x);case ti:e:{for(b=y.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(x,g.sibling),g=s(g,y.children||[]),g.return=x,x=g;break e}else{n(x,g);break}else t(x,g);g=g.sibling}g=dc(y,x.mode,N),g.return=x,x=g}return u(x);case Fn:return b=y._init,R(x,g,b(y._payload),N)}if(ao(y))return P(x,g,y,N);if(Qi(y))return E(x,g,y,N);bs(x,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(x,g.sibling),g=s(g,y),g.return=x,x=g):(n(x,g),g=fc(y,x.mode,N),g.return=x,x=g),u(x)):n(x,g)}return R}var Ei=yv(!0),wv=yv(!1),Xo={},ln=ur(Xo),zo=ur(Xo),Io=ur(Xo);function Pr(e){if(e===Xo)throw Error(Z(174));return e}function cd(e,t){switch(xe(Io,t),xe(zo,e),xe(ln,Xo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ic(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ic(t,e)}Ee(ln),xe(ln,t)}function Pi(){Ee(ln),Ee(zo),Ee(Io)}function xv(e){Pr(Io.current);var t=Pr(ln.current),n=Ic(t,e.type);t!==n&&(xe(zo,e),xe(ln,n))}function fd(e){zo.current===e&&(Ee(ln),Ee(zo))}var Te=ur(0);function za(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 oc=[];function dd(){for(var e=0;en?n:4,e(!0);var i=sc.transition;sc.transition={};try{e(!1),t()}finally{ve=n,sc.transition=i}}function Dv(){return It().memoizedState}function q1(e,t,n){var i=er(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},bv(e))Bv(t,n);else if(n=mv(e,t,n,i),n!==null){var s=ot();Vt(n,e,i,s),Fv(n,t,i)}}function G1(e,t,n){var i=er(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(bv(e))Bv(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,Kt(f,u)){var d=t.interleaved;d===null?(s.next=s,ld(t)):(s.next=d.next,d.next=s),t.interleaved=s;return}}catch{}finally{}n=mv(e,t,s,i),n!==null&&(s=ot(),Vt(n,e,i,s),Fv(n,t,i))}}function bv(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function Bv(e,t){vo=Ia=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fv(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,qf(e,n)}}var Aa={readContext:zt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},Y1={readContext:zt,useCallback:function(e,t){return rn().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Kp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ea(4194308,4,Rv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ea(4194308,4,e,t)},useInsertionEffect:function(e,t){return ea(4,2,e,t)},useMemo:function(e,t){var n=rn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=rn();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=q1.bind(null,ke,e),[i.memoizedState,e]},useRef:function(e){var t=rn();return e={current:e},t.memoizedState=e},useState:Vp,useDebugValue:vd,useDeferredValue:function(e){return rn().memoizedState=e},useTransition:function(){var e=Vp(!1),t=e[0];return e=K1.bind(null,e[1]),rn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=ke,s=rn();if(Pe){if(n===void 0)throw Error(Z(407));n=n()}else{if(n=t(),He===null)throw Error(Z(349));Mr&30||Pv(i,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,Kp(Tv.bind(null,i,a,e),[e]),i.flags|=2048,Do(9,Cv.bind(null,i,a,n,t),void 0,null),n},useId:function(){var e=rn(),t=He.identifierPrefix;if(Pe){var n=xn,i=wn;n=(i&~(1<<32-Wt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ao++,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[on]=t,e[Ro]=i,Gv(e,t,!1,!1),t.stateNode=e;e:{switch(u=jc(n,i),n){case"dialog":Se("cancel",e),Se("close",e),s=i;break;case"iframe":case"object":case"embed":Se("load",e),s=i;break;case"video":case"audio":for(s=0;sTi&&(t.flags|=128,i=!0,ro(a,!1),t.lanes=4194304)}else{if(!i)if(e=za(u),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ro(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Pe)return Xe(t),null}else 2*Re()-a.renderingStartTime>Ti&&n!==1073741824&&(t.flags|=128,i=!0,ro(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=Re(),t.sibling=null,n=Te.current,xe(Te,i?n&1|2:n&1),t):(Xe(t),null);case 22:case 23:return Ed(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?pt&1073741824&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function ix(e,t){switch(rd(t),t.tag){case 1:return ft(t.type)&&Ta(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pi(),Ee(ct),Ee(nt),dd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return fd(t),null;case 13:if(Ee(Te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));Si()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Te),null;case 4:return Pi(),null;case 10:return ad(t.type._context),null;case 22:case 23:return Ed(),null;case 24:return null;default:return null}}var Fs=!1,et=!1,ox=typeof WeakSet=="function"?WeakSet:Set,Q=null;function fi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Oe(e,t,i)}else n.current=null}function cf(e,t,n){try{n()}catch(i){Oe(e,t,i)}}var nm=!1;function sx(e,t){if(Vc=Sa,e=tv(),td(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,d=-1,p=0,_=0,v=e,S=null;t:for(;;){for(var k;v!==n||s!==0&&v.nodeType!==3||(f=u+s),v!==a||i!==0&&v.nodeType!==3||(d=u+i),v.nodeType===3&&(u+=v.nodeValue.length),(k=v.firstChild)!==null;)S=v,v=k;for(;;){if(v===e)break t;if(S===n&&++p===s&&(f=u),S===a&&++_===i&&(d=u),(k=v.nextSibling)!==null)break;v=S,S=v.parentNode}v=k}n=f===-1||d===-1?null:{start:f,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kc={focusedElem:e,selectionRange:n},Sa=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var P=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(P!==null){var E=P.memoizedProps,R=P.memoizedState,w=t.stateNode,g=w.getSnapshotBeforeUpdate(t.elementType===t.type?E:$t(t.type,E),R);w.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(N){Oe(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return P=nm,nm=!1,P}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&&cf(t,n,a)}s=s.next}while(s!==i)}}function hl(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 ff(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 Xv(e){var t=e.alternate;t!==null&&(e.alternate=null,Xv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[on],delete t[Ro],delete t[Yc],delete t[U1],delete t[Z1])),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 Jv(e){return e.tag===5||e.tag===3||e.tag===4}function rm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jv(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 df(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=Ca));else if(i!==4&&(e=e.child,e!==null))for(df(e,t,n),e=e.sibling;e!==null;)df(e,t,n),e=e.sibling}function hf(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(hf(e,t,n),e=e.sibling;e!==null;)hf(e,t,n),e=e.sibling}var Ke=null,Ut=!1;function bn(e,t,n){for(n=n.child;n!==null;)eg(e,t,n),n=n.sibling}function eg(e,t,n){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(ol,n)}catch{}switch(n.tag){case 5:et||fi(n,t);case 6:var i=Ke,s=Ut;Ke=null,bn(e,t,n),Ke=i,Ut=s,Ke!==null&&(Ut?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(Ut?(e=Ke,n=n.stateNode,e.nodeType===8?rc(e.parentNode,n):e.nodeType===1&&rc(e,n),ko(e)):rc(Ke,n.stateNode));break;case 4:i=Ke,s=Ut,Ke=n.stateNode.containerInfo,Ut=!0,bn(e,t,n),Ke=i,Ut=s;break;case 0:case 11:case 14:case 15:if(!et&&(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)&&cf(n,t,u),s=s.next}while(s!==i)}bn(e,t,n);break;case 1:if(!et&&(fi(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(f){Oe(n,t,f)}bn(e,t,n);break;case 21:bn(e,t,n);break;case 22:n.mode&1?(et=(i=et)||n.memoizedState!==null,bn(e,t,n),et=i):bn(e,t,n);break;default:bn(e,t,n)}}function im(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ox),t.forEach(function(i){var s=mx.bind(null,e,i);n.has(i)||(n.add(i),i.then(s,s))})}}function Ft(e,t){var n=t.deletions;if(n!==null)for(var i=0;is&&(s=u),i&=~a}if(i=s,i=Re()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*lx(i/1960))-i,10e?16:e,Wn===null)var i=!1;else{if(e=Wn,Wn=null,ba=0,he&6)throw Error(Z(331));var s=he;for(he|=4,Q=e.current;Q!==null;){var a=Q,u=a.child;if(Q.flags&16){var f=a.deletions;if(f!==null){for(var d=0;dRe()-xd?Pr(e,0):wd|=n),dt(e,t)}function lg(e,t){t===0&&(e.mode&1?(t=Ms,Ms<<=1,!(Ms&130023424)&&(Ms=4194304)):t=1);var n=ot();e=Tn(e,t),e!==null&&(Go(e,t,n),dt(e,n))}function px(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lg(e,n)}function mx(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(Z(314))}i!==null&&i.delete(t),lg(e,n)}var ug;ug=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ct.current)ut=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ut=!1,nx(e,t,n);ut=!!(e.flags&131072)}else ut=!1,Pe&&t.flags&1048576&&dv(t,Na,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;ta(e,t),e=t.pendingProps;var s=xi(t,nt.current);gi(t,n),s=pd(null,t,i,e,s,n);var a=md();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,ft(i)?(a=!0,ka(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ud(t),s.updater=fl,t.stateNode=s,s._reactInternals=t,nf(t,i,e,n),t=sf(null,t,i,!0,a,n)):(t.tag=0,Pe&&a&&nd(t),rt(null,t,s,n),t=t.child),t;case 16:i=t.elementType;e:{switch(ta(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=vx(i),e=$t(i,e),s){case 0:t=of(null,t,i,e,n);break e;case 1:t=Jp(null,t,i,e,n);break e;case 11:t=Qp(null,t,i,e,n);break e;case 14:t=Xp(null,t,i,$t(i.type,e),n);break e}throw Error(Z(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),of(e,t,i,s,n);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),Jp(e,t,i,s,n);case 3:e:{if(Vv(t),e===null)throw Error(Z(387));i=t.pendingProps,a=t.memoizedState,s=a.element,_v(e,t),Ra(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=Ci(Error(Z(423)),t),t=em(e,t,i,n,s);break e}else if(i!==s){s=Ci(Error(Z(424)),t),t=em(e,t,i,n,s);break e}else for(mt=Qn(t.stateNode.containerInfo.firstChild),vt=t,Pe=!0,Zt=null,n=wv(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Si(),i===s){t=kn(e,t,n);break e}rt(e,t,i,n)}t=t.child}return t;case 5:return xv(t),e===null&&Jc(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,qc(i,s)?u=null:a!==null&&qc(i,a)&&(t.flags|=32),Wv(e,t),rt(e,t,u,n),t.child;case 6:return e===null&&Jc(t),null;case 13:return Kv(e,t,n);case 4:return cd(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ei(t,null,i,n):rt(e,t,i,n),t.child;case 11:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),Qp(e,t,i,s,n);case 7:return rt(e,t,t.pendingProps,n),t.child;case 8:return rt(e,t,t.pendingProps.children,n),t.child;case 12:return rt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,s=t.pendingProps,a=t.memoizedProps,u=s.value,xe(Oa,i._currentValue),i._currentValue=u,a!==null)if(Kt(a.value,u)){if(a.children===s.children&&!ct.current){t=kn(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 d=f.firstContext;d!==null;){if(d.context===i){if(a.tag===1){d=xn(-1,n&-n),d.tag=2;var p=a.updateQueue;if(p!==null){p=p.shared;var _=p.pending;_===null?d.next=d:(d.next=_.next,_.next=d),p.pending=d}}a.lanes|=n,d=a.alternate,d!==null&&(d.lanes|=n),ef(a.return,n,t),f.lanes|=n;break}d=d.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(Z(341));u.lanes|=n,f=u.alternate,f!==null&&(f.lanes|=n),ef(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}rt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,gi(t,n),s=zt(s),i=i(s),t.flags|=1,rt(e,t,i,n),t.child;case 14:return i=t.type,s=$t(i,t.pendingProps),s=$t(i.type,s),Xp(e,t,i,s,n);case 15:return Zv(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),ta(e,t),t.tag=1,ft(i)?(e=!0,ka(t)):e=!1,gi(t,n),gv(t,i,s),nf(t,i,s,n),sf(null,t,i,!0,e,n);case 19:return qv(e,t,n);case 22:return Hv(e,t,n)}throw Error(Z(156,t.tag))};function cg(e,t){return j_(e,t)}function _x(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 Ot(e,t,n,i){return new _x(e,t,n,i)}function Cd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vx(e){if(typeof e=="function")return Cd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hf)return 11;if(e===Wf)return 14}return 2}function tr(e,t){var n=e.alternate;return n===null?(n=Ot(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 ia(e,t,n,i,s,a){var u=2;if(i=e,typeof e=="function")Cd(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case ni:return Cr(n.children,s,a,t);case Zf:u=8,s|=8;break;case Tc:return e=Ot(12,n,t,s|2),e.elementType=Tc,e.lanes=a,e;case kc:return e=Ot(13,n,t,s),e.elementType=kc,e.lanes=a,e;case Lc:return e=Ot(19,n,t,s),e.elementType=Lc,e.lanes=a,e;case y_:return ml(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case v_:u=10;break e;case g_:u=9;break e;case Hf:u=11;break e;case Wf:u=14;break e;case Fn:u=16,i=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return t=Ot(u,n,t,s),t.elementType=e,t.type=i,t.lanes=a,t}function Cr(e,t,n,i){return e=Ot(7,e,i,t),e.lanes=n,e}function ml(e,t,n,i){return e=Ot(22,e,i,t),e.elementType=y_,e.lanes=n,e.stateNode={isHidden:!1},e}function fc(e,t,n){return e=Ot(6,e,null,t),e.lanes=n,e}function dc(e,t,n){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gx(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=Vu(0),this.expirationTimes=Vu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vu(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Td(e,t,n,i,s,a,u,f,d){return e=new gx(e,t,n,f,d),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Ot(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ud(a),e}function yx(e,t,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pg)}catch(e){console.error(e)}}pg(),d_.exports=xt;var mg=d_.exports,dm=mg;Pc.createRoot=dm.createRoot,Pc.hydrateRoot=dm.hydrateRoot;/** +`+a.stack}return{value:e,source:t,stack:s,digest:null}}function uc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function rf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var J1=typeof WeakMap=="function"?WeakMap:Map;function $v(e,t,n){n=Sn(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Da||(Da=!0,pf=i),rf(e,t)},n}function Uv(e,t,n){n=Sn(-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(){rf(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){rf(e,t),typeof i!="function"&&(Jn===null?Jn=new Set([this]):Jn.add(this));var u=t.stack;this.componentDidCatch(t.value,{componentStack:u!==null?u:""})}),n}function qp(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new J1;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=hx.bind(null,e,t,n),t.then(e,e))}function Gp(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 Yp(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=Sn(-1,1),t.tag=2,Xn(n,t,1))),n.lanes|=1),e)}var ex=On.ReactCurrentOwner,ut=!1;function rt(e,t,n,i){t.child=e===null?wv(t,null,n,i):Ei(t,e.child,n,i)}function Qp(e,t,n,i,s){n=n.render;var a=t.ref;return gi(t,s),i=pd(e,t,n,i,a,s),n=md(),e!==null&&!ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ln(e,t,s)):(Pe&&n&&nd(t),t.flags|=1,rt(e,t,i,s),t.child)}function Xp(e,t,n,i,s){if(e===null){var a=n.type;return typeof a=="function"&&!Cd(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Zv(e,t,a,i,s)):(e=ia(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:No,n(u,i)&&e.ref===t.ref)return Ln(e,t,s)}return t.flags|=1,e=tr(a,i),e.ref=t.ref,e.return=t,t.child=e}function Zv(e,t,n,i,s){if(e!==null){var a=e.memoizedProps;if(No(a,i)&&e.ref===t.ref)if(ut=!1,t.pendingProps=i=a,(e.lanes&s)!==0)e.flags&131072&&(ut=!0);else return t.lanes=e.lanes,Ln(e,t,s)}return of(e,t,n,i,s)}function Hv(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},xe(di,pt),pt|=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,xe(di,pt),pt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=a!==null?a.baseLanes:n,xe(di,pt),pt|=i}else a!==null?(i=a.baseLanes|n,t.memoizedState=null):i=n,xe(di,pt),pt|=i;return rt(e,t,s,n),t.child}function Wv(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function of(e,t,n,i,s){var a=ft(n)?Nr:nt.current;return a=xi(t,a),gi(t,s),n=pd(e,t,n,i,a,s),i=md(),e!==null&&!ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ln(e,t,s)):(Pe&&i&&nd(t),t.flags|=1,rt(e,t,n,s),t.child)}function Jp(e,t,n,i,s){if(ft(n)){var a=!0;ka(t)}else a=!1;if(gi(t,s),t.stateNode===null)ta(e,t),gv(t,n,i),nf(t,n,i,s),i=!0;else if(e===null){var u=t.stateNode,f=t.memoizedProps;u.props=f;var d=u.context,p=n.contextType;typeof p=="object"&&p!==null?p=zt(p):(p=ft(n)?Nr:nt.current,p=xi(t,p));var _=n.getDerivedStateFromProps,v=typeof _=="function"||typeof u.getSnapshotBeforeUpdate=="function";v||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f!==i||d!==p)&&Hp(t,u,i,p),$n=!1;var S=t.memoizedState;u.state=S,Ra(t,i,u,s),d=t.memoizedState,f!==i||S!==d||ct.current||$n?(typeof _=="function"&&(tf(t,n,_,i),d=t.memoizedState),(f=$n||Zp(t,n,f,i,S,d,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=d),u.props=i,u.state=d,u.context=p,i=f):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{u=t.stateNode,_v(e,t),f=t.memoizedProps,p=t.type===t.elementType?f:$t(t.type,f),u.props=p,v=t.pendingProps,S=u.context,d=n.contextType,typeof d=="object"&&d!==null?d=zt(d):(d=ft(n)?Nr:nt.current,d=xi(t,d));var k=n.getDerivedStateFromProps;(_=typeof k=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f!==v||S!==d)&&Hp(t,u,i,d),$n=!1,S=t.memoizedState,u.state=S,Ra(t,i,u,s);var P=t.memoizedState;f!==v||S!==P||ct.current||$n?(typeof k=="function"&&(tf(t,n,k,i),P=t.memoizedState),(p=$n||Zp(t,n,p,i,S,P,d)||!1)?(_||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(i,P,d),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(i,P,d)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&S===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&S===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=P),u.props=i,u.state=P,u.context=d,i=p):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&S===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&S===e.memoizedState||(t.flags|=1024),i=!1)}return sf(e,t,n,i,a,s)}function sf(e,t,n,i,s,a){Wv(e,t);var u=(t.flags&128)!==0;if(!i&&!u)return s&&bp(t,n,!1),Ln(e,t,a);i=t.stateNode,ex.current=t;var f=u&&typeof n.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&u?(t.child=Ei(t,e.child,null,a),t.child=Ei(t,null,f,a)):rt(e,t,f,a),t.memoizedState=i.state,s&&bp(t,n,!0),t.child}function Vv(e){var t=e.stateNode;t.pendingContext?Dp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Dp(e,t.context,!1),cd(e,t.containerInfo)}function em(e,t,n,i,s){return Si(),id(s),t.flags|=256,rt(e,t,n,i),t.child}var af={dehydrated:null,treeContext:null,retryLane:0};function lf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Kv(e,t,n){var i=t.pendingProps,s=Te.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),xe(Te,s&1),e===null)return Jc(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=ml(u,i,0,null),e=Tr(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=lf(n),t.memoizedState=af,e):gd(t,u));if(s=e.memoizedState,s!==null&&(f=s.dehydrated,f!==null))return tx(e,t,u,i,f,s,n);if(a){a=i.fallback,u=t.mode,s=e.child,f=s.sibling;var d={mode:"hidden",children:i.children};return!(u&1)&&t.child!==s?(i=t.child,i.childLanes=0,i.pendingProps=d,t.deletions=null):(i=tr(s,d),i.subtreeFlags=s.subtreeFlags&14680064),f!==null?a=tr(f,a):(a=Tr(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?lf(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},a.memoizedState=u,a.childLanes=e.childLanes&~n,t.memoizedState=af,i}return a=e.child,e=a.sibling,i=tr(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 gd(e,t){return t=ml({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Bs(e,t,n,i){return i!==null&&id(i),Ei(t,e.child,null,n),e=gd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tx(e,t,n,i,s,a,u){if(n)return t.flags&256?(t.flags&=-257,i=uc(Error(Z(422))),Bs(e,t,u,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=i.fallback,s=t.mode,i=ml({mode:"visible",children:i.children},s,0,null),a=Tr(a,s,u,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,t.mode&1&&Ei(t,e.child,null,u),t.child.memoizedState=lf(u),t.memoizedState=af,a);if(!(t.mode&1))return Bs(e,t,u,null);if(s.data==="$!"){if(i=s.nextSibling&&s.nextSibling.dataset,i)var f=i.dgst;return i=f,a=Error(Z(419)),i=uc(a,i,void 0),Bs(e,t,u,i)}if(f=(u&e.childLanes)!==0,ut||f){if(i=He,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,kn(e,s),Vt(i,e,s,-1))}return Pd(),i=uc(Error(Z(421))),Bs(e,t,u,i)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=px.bind(null,e),s._reactRetry=t,null):(e=a.treeContext,mt=Qn(s.nextSibling),vt=t,Pe=!0,Zt=null,e!==null&&(Lt[Nt++]=wn,Lt[Nt++]=xn,Lt[Nt++]=Or,wn=e.id,xn=e.overflow,Or=t),t=gd(t,i.children),t.flags|=4096,t)}function tm(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),ef(e.return,t,n)}function cc(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 qv(e,t,n){var i=t.pendingProps,s=i.revealOrder,a=i.tail;if(rt(e,t,i.children,n),i=Te.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&&tm(e,n,t);else if(e.tag===19)tm(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(xe(Te,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&&za(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),cc(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&&za(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}cc(t,!0,n,null,a);break;case"together":cc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ta(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ln(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Rr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Z(153));if(t.child!==null){for(e=t.child,n=tr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=tr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nx(e,t,n){switch(t.tag){case 3:Vv(t),Si();break;case 5:xv(t);break;case 1:ft(t.type)&&ka(t);break;case 4:cd(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,s=t.memoizedProps.value;xe(Oa,i._currentValue),i._currentValue=s;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(xe(Te,Te.current&1),t.flags|=128,null):n&t.child.childLanes?Kv(e,t,n):(xe(Te,Te.current&1),e=Ln(e,t,n),e!==null?e.sibling:null);xe(Te,Te.current&1);break;case 19:if(i=(n&t.childLanes)!==0,e.flags&128){if(i)return qv(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),xe(Te,Te.current),i)break;return null;case 22:case 23:return t.lanes=0,Hv(e,t,n)}return Ln(e,t,n)}var Gv,uf,Yv,Qv;Gv=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}};uf=function(){};Yv=function(e,t,n,i){var s=e.memoizedProps;if(s!==i){e=t.stateNode,Pr(ln.current);var a=null;switch(n){case"input":s=Oc(e,s),i=Oc(e,i),a=[];break;case"select":s=Le({},s,{value:void 0}),i=Le({},i,{value:void 0}),a=[];break;case"textarea":s=zc(e,s),i=zc(e,i),a=[];break;default:typeof s.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Ca)}Ac(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"&&(So.hasOwnProperty(p)?a||(a=[]):(a=a||[]).push(p,null));for(p in i){var d=i[p];if(f=s!=null?s[p]:void 0,i.hasOwnProperty(p)&&d!==f&&(d!=null||f!=null))if(p==="style")if(f){for(u in f)!f.hasOwnProperty(u)||d&&d.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in d)d.hasOwnProperty(u)&&f[u]!==d[u]&&(n||(n={}),n[u]=d[u])}else n||(a||(a=[]),a.push(p,n)),n=d;else p==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,f=f?f.__html:void 0,d!=null&&f!==d&&(a=a||[]).push(p,d)):p==="children"?typeof d!="string"&&typeof d!="number"||(a=a||[]).push(p,""+d):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&(So.hasOwnProperty(p)?(d!=null&&p==="onScroll"&&Se("scroll",e),a||f===d||(a=[])):(a=a||[]).push(p,d))}n&&(a=a||[]).push("style",n);var p=a;(t.updateQueue=p)&&(t.flags|=4)}};Qv=function(e,t,n,i){n!==i&&(t.flags|=4)};function ro(e,t){if(!Pe)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 Xe(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 rx(e,t,n){var i=t.pendingProps;switch(rd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return ft(t.type)&&Ta(),Xe(t),null;case 3:return i=t.stateNode,Pi(),Ee(ct),Ee(nt),dd(),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&&(vf(Zt),Zt=null))),uf(e,t),Xe(t),null;case 5:fd(t);var s=Pr(Io.current);if(n=t.type,e!==null&&t.stateNode!=null)Yv(e,t,n,i,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(Z(166));return Xe(t),null}if(e=Pr(ln.current),Ds(t)){i=t.stateNode,n=t.type;var a=t.memoizedProps;switch(i[on]=t,i[Ro]=a,e=(t.mode&1)!==0,n){case"dialog":Se("cancel",i),Se("close",i);break;case"iframe":case"object":case"embed":Se("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[on]=t,e[Ro]=i,Gv(e,t,!1,!1),t.stateNode=e;e:{switch(u=jc(n,i),n){case"dialog":Se("cancel",e),Se("close",e),s=i;break;case"iframe":case"object":case"embed":Se("load",e),s=i;break;case"video":case"audio":for(s=0;sTi&&(t.flags|=128,i=!0,ro(a,!1),t.lanes=4194304)}else{if(!i)if(e=za(u),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ro(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Pe)return Xe(t),null}else 2*Re()-a.renderingStartTime>Ti&&n!==1073741824&&(t.flags|=128,i=!0,ro(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=Re(),t.sibling=null,n=Te.current,xe(Te,i?n&1|2:n&1),t):(Xe(t),null);case 22:case 23:return Ed(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?pt&1073741824&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function ix(e,t){switch(rd(t),t.tag){case 1:return ft(t.type)&&Ta(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pi(),Ee(ct),Ee(nt),dd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return fd(t),null;case 13:if(Ee(Te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));Si()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Te),null;case 4:return Pi(),null;case 10:return ad(t.type._context),null;case 22:case 23:return Ed(),null;case 24:return null;default:return null}}var Fs=!1,et=!1,ox=typeof WeakSet=="function"?WeakSet:Set,Q=null;function fi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Oe(e,t,i)}else n.current=null}function cf(e,t,n){try{n()}catch(i){Oe(e,t,i)}}var nm=!1;function sx(e,t){if(Vc=Sa,e=tv(),td(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,d=-1,p=0,_=0,v=e,S=null;t:for(;;){for(var k;v!==n||s!==0&&v.nodeType!==3||(f=u+s),v!==a||i!==0&&v.nodeType!==3||(d=u+i),v.nodeType===3&&(u+=v.nodeValue.length),(k=v.firstChild)!==null;)S=v,v=k;for(;;){if(v===e)break t;if(S===n&&++p===s&&(f=u),S===a&&++_===i&&(d=u),(k=v.nextSibling)!==null)break;v=S,S=v.parentNode}v=k}n=f===-1||d===-1?null:{start:f,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kc={focusedElem:e,selectionRange:n},Sa=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var P=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(P!==null){var E=P.memoizedProps,R=P.memoizedState,x=t.stateNode,g=x.getSnapshotBeforeUpdate(t.elementType===t.type?E:$t(t.type,E),R);x.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(N){Oe(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return P=nm,nm=!1,P}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&&cf(t,n,a)}s=s.next}while(s!==i)}}function hl(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 ff(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 Xv(e){var t=e.alternate;t!==null&&(e.alternate=null,Xv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[on],delete t[Ro],delete t[Yc],delete t[U1],delete t[Z1])),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 Jv(e){return e.tag===5||e.tag===3||e.tag===4}function rm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jv(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 df(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=Ca));else if(i!==4&&(e=e.child,e!==null))for(df(e,t,n),e=e.sibling;e!==null;)df(e,t,n),e=e.sibling}function hf(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(hf(e,t,n),e=e.sibling;e!==null;)hf(e,t,n),e=e.sibling}var Ke=null,Ut=!1;function bn(e,t,n){for(n=n.child;n!==null;)eg(e,t,n),n=n.sibling}function eg(e,t,n){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(ol,n)}catch{}switch(n.tag){case 5:et||fi(n,t);case 6:var i=Ke,s=Ut;Ke=null,bn(e,t,n),Ke=i,Ut=s,Ke!==null&&(Ut?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(Ut?(e=Ke,n=n.stateNode,e.nodeType===8?rc(e.parentNode,n):e.nodeType===1&&rc(e,n),ko(e)):rc(Ke,n.stateNode));break;case 4:i=Ke,s=Ut,Ke=n.stateNode.containerInfo,Ut=!0,bn(e,t,n),Ke=i,Ut=s;break;case 0:case 11:case 14:case 15:if(!et&&(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)&&cf(n,t,u),s=s.next}while(s!==i)}bn(e,t,n);break;case 1:if(!et&&(fi(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(f){Oe(n,t,f)}bn(e,t,n);break;case 21:bn(e,t,n);break;case 22:n.mode&1?(et=(i=et)||n.memoizedState!==null,bn(e,t,n),et=i):bn(e,t,n);break;default:bn(e,t,n)}}function im(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ox),t.forEach(function(i){var s=mx.bind(null,e,i);n.has(i)||(n.add(i),i.then(s,s))})}}function Ft(e,t){var n=t.deletions;if(n!==null)for(var i=0;is&&(s=u),i&=~a}if(i=s,i=Re()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*lx(i/1960))-i,10e?16:e,Wn===null)var i=!1;else{if(e=Wn,Wn=null,ba=0,he&6)throw Error(Z(331));var s=he;for(he|=4,Q=e.current;Q!==null;){var a=Q,u=a.child;if(Q.flags&16){var f=a.deletions;if(f!==null){for(var d=0;dRe()-xd?Cr(e,0):wd|=n),dt(e,t)}function lg(e,t){t===0&&(e.mode&1?(t=Ms,Ms<<=1,!(Ms&130023424)&&(Ms=4194304)):t=1);var n=ot();e=kn(e,t),e!==null&&(Go(e,t,n),dt(e,n))}function px(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lg(e,n)}function mx(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(Z(314))}i!==null&&i.delete(t),lg(e,n)}var ug;ug=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ct.current)ut=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ut=!1,nx(e,t,n);ut=!!(e.flags&131072)}else ut=!1,Pe&&t.flags&1048576&&dv(t,Na,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;ta(e,t),e=t.pendingProps;var s=xi(t,nt.current);gi(t,n),s=pd(null,t,i,e,s,n);var a=md();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,ft(i)?(a=!0,ka(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ud(t),s.updater=fl,t.stateNode=s,s._reactInternals=t,nf(t,i,e,n),t=sf(null,t,i,!0,a,n)):(t.tag=0,Pe&&a&&nd(t),rt(null,t,s,n),t=t.child),t;case 16:i=t.elementType;e:{switch(ta(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=vx(i),e=$t(i,e),s){case 0:t=of(null,t,i,e,n);break e;case 1:t=Jp(null,t,i,e,n);break e;case 11:t=Qp(null,t,i,e,n);break e;case 14:t=Xp(null,t,i,$t(i.type,e),n);break e}throw Error(Z(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),of(e,t,i,s,n);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),Jp(e,t,i,s,n);case 3:e:{if(Vv(t),e===null)throw Error(Z(387));i=t.pendingProps,a=t.memoizedState,s=a.element,_v(e,t),Ra(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=Ci(Error(Z(423)),t),t=em(e,t,i,n,s);break e}else if(i!==s){s=Ci(Error(Z(424)),t),t=em(e,t,i,n,s);break e}else for(mt=Qn(t.stateNode.containerInfo.firstChild),vt=t,Pe=!0,Zt=null,n=wv(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Si(),i===s){t=Ln(e,t,n);break e}rt(e,t,i,n)}t=t.child}return t;case 5:return xv(t),e===null&&Jc(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,qc(i,s)?u=null:a!==null&&qc(i,a)&&(t.flags|=32),Wv(e,t),rt(e,t,u,n),t.child;case 6:return e===null&&Jc(t),null;case 13:return Kv(e,t,n);case 4:return cd(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ei(t,null,i,n):rt(e,t,i,n),t.child;case 11:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),Qp(e,t,i,s,n);case 7:return rt(e,t,t.pendingProps,n),t.child;case 8:return rt(e,t,t.pendingProps.children,n),t.child;case 12:return rt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,s=t.pendingProps,a=t.memoizedProps,u=s.value,xe(Oa,i._currentValue),i._currentValue=u,a!==null)if(Kt(a.value,u)){if(a.children===s.children&&!ct.current){t=Ln(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 d=f.firstContext;d!==null;){if(d.context===i){if(a.tag===1){d=Sn(-1,n&-n),d.tag=2;var p=a.updateQueue;if(p!==null){p=p.shared;var _=p.pending;_===null?d.next=d:(d.next=_.next,_.next=d),p.pending=d}}a.lanes|=n,d=a.alternate,d!==null&&(d.lanes|=n),ef(a.return,n,t),f.lanes|=n;break}d=d.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(Z(341));u.lanes|=n,f=u.alternate,f!==null&&(f.lanes|=n),ef(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}rt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,gi(t,n),s=zt(s),i=i(s),t.flags|=1,rt(e,t,i,n),t.child;case 14:return i=t.type,s=$t(i,t.pendingProps),s=$t(i.type,s),Xp(e,t,i,s,n);case 15:return Zv(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),ta(e,t),t.tag=1,ft(i)?(e=!0,ka(t)):e=!1,gi(t,n),gv(t,i,s),nf(t,i,s,n),sf(null,t,i,!0,e,n);case 19:return qv(e,t,n);case 22:return Hv(e,t,n)}throw Error(Z(156,t.tag))};function cg(e,t){return j_(e,t)}function _x(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 Ot(e,t,n,i){return new _x(e,t,n,i)}function Cd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vx(e){if(typeof e=="function")return Cd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hf)return 11;if(e===Wf)return 14}return 2}function tr(e,t){var n=e.alternate;return n===null?(n=Ot(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 ia(e,t,n,i,s,a){var u=2;if(i=e,typeof e=="function")Cd(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case ni:return Tr(n.children,s,a,t);case Zf:u=8,s|=8;break;case Tc:return e=Ot(12,n,t,s|2),e.elementType=Tc,e.lanes=a,e;case kc:return e=Ot(13,n,t,s),e.elementType=kc,e.lanes=a,e;case Lc:return e=Ot(19,n,t,s),e.elementType=Lc,e.lanes=a,e;case y_:return ml(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case v_:u=10;break e;case g_:u=9;break e;case Hf:u=11;break e;case Wf:u=14;break e;case Fn:u=16,i=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return t=Ot(u,n,t,s),t.elementType=e,t.type=i,t.lanes=a,t}function Tr(e,t,n,i){return e=Ot(7,e,i,t),e.lanes=n,e}function ml(e,t,n,i){return e=Ot(22,e,i,t),e.elementType=y_,e.lanes=n,e.stateNode={isHidden:!1},e}function fc(e,t,n){return e=Ot(6,e,null,t),e.lanes=n,e}function dc(e,t,n){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gx(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=Vu(0),this.expirationTimes=Vu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vu(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Td(e,t,n,i,s,a,u,f,d){return e=new gx(e,t,n,f,d),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Ot(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ud(a),e}function yx(e,t,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pg)}catch(e){console.error(e)}}pg(),d_.exports=xt;var mg=d_.exports,dm=mg;Pc.createRoot=dm.createRoot,Pc.hydrateRoot=dm.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 Od(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Cx(){return Math.random().toString(36).substr(2,8)}function pm(e,t){return{usr:e.state,key:e.key,idx:t}}function gf(e,t,n,i){return n===void 0&&(n=null),Bo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?zi(t):t,{state:n,key:t&&t.key||i||Cx()})}function $a(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 zi(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 Tx(e,t,n,i){i===void 0&&(i={});let{window:s=document.defaultView,v5Compat:a=!1}=i,u=s.history,f=Vn.Pop,d=null,p=_();p==null&&(p=0,u.replaceState(Bo({},u.state,{idx:p}),""));function _(){return(u.state||{idx:null}).idx}function v(){f=Vn.Pop;let R=_(),w=R==null?null:R-p;p=R,d&&d({action:f,location:E.location,delta:w})}function S(R,w){f=Vn.Push;let g=gf(E.location,R,w);n&&n(g,R),p=_()+1;let y=pm(g,p),N=E.createHref(g);try{u.pushState(y,"",N)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(N)}a&&d&&d({action:f,location:E.location,delta:1})}function k(R,w){f=Vn.Replace;let g=gf(E.location,R,w);n&&n(g,R),p=_();let y=pm(g,p),N=E.createHref(g);u.replaceState(y,"",N),a&&d&&d({action:f,location:E.location,delta:0})}function P(R){let w=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof R=="string"?R:$a(R);return ze(w,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,w)}let E={get action(){return f},get location(){return e(s,u)},listen(R){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(hm,v),d=R,()=>{s.removeEventListener(hm,v),d=null}},createHref(R){return t(s,R)},createURL:P,encodeLocation(R){let w=P(R);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:S,replace:k,go(R){return u.go(R)}};return E}var mm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(mm||(mm={}));function kx(e,t,n){n===void 0&&(n="/");let i=typeof t=="string"?zi(t):t,s=Md(i.pathname||"/",n);if(s==null)return null;let a=_g(e);Lx(a);let u=null;for(let f=0;u==null&&f{let d={relativePath:f===void 0?a.path||"":f,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};d.relativePath.startsWith("/")&&(ze(d.relativePath.startsWith(i),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(i.length));let p=nr([i,d.relativePath]),_=n.concat(d);a.children&&a.children.length>0&&(ze(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),_g(a.children,t,_,p)),!(a.path==null&&!a.index)&&t.push({path:p,score:Ax(p,a.index),routesMeta:_})};return e.forEach((a,u)=>{var f;if(a.path===""||!((f=a.path)!=null&&f.includes("?")))s(a,u);else for(let d of vg(a.path))s(a,u,d)}),t}function vg(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=vg(i.join("/")),f=[];return f.push(...u.map(d=>d===""?a:[a,d].join("/"))),s&&f.push(...u),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function Lx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jx(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const Nx=/^:\w+$/,Ox=3,Mx=2,Rx=1,zx=10,Ix=-2,_m=e=>e==="*";function Ax(e,t){let n=e.split("/"),i=n.length;return n.some(_m)&&(i+=Ix),t&&(i+=Mx),n.filter(s=>!_m(s)).reduce((s,a)=>s+(Nx.test(a)?Ox:a===""?Rx:zx),i)}function jx(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 Dx(e,t){let{routesMeta:n}=e,i={},s="/",a=[];for(let u=0;u{if(_==="*"){let S=f[v]||"";u=a.slice(0,a.length-S.length).replace(/(.)\/+$/,"$1")}return p[_]=$x(f[v]||"",_),p},{}),pathname:a,pathnameBase:u,pattern:e}}function Bx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Od(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 Fx(e){try{return decodeURI(e)}catch(t){return Od(!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 $x(e,t){try{return decodeURIComponent(e)}catch(n){return Od(!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 Md(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 Ux(e,t){t===void 0&&(t="/");let{pathname:n,search:i="",hash:s=""}=typeof e=="string"?zi(e):e;return{pathname:n?n.startsWith("/")?n:Zx(n,t):t,search:Wx(i),hash:Vx(s)}}function Zx(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 hc(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 Rd(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function zd(e,t,n,i){i===void 0&&(i=!1);let s;typeof e=="string"?s=zi(e):(s=Bo({},e),ze(!s.pathname||!s.pathname.includes("?"),hc("?","pathname","search",s)),ze(!s.pathname||!s.pathname.includes("#"),hc("#","pathname","hash",s)),ze(!s.search||!s.search.includes("#"),hc("#","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 S=u.split("/");for(;S[0]==="..";)S.shift(),v-=1;s.pathname=S.join("/")}f=v>=0?t[v]:"/"}let d=Ux(s,f),p=u&&u!=="/"&&u.endsWith("/"),_=(a||u===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(p||_)&&(d.pathname+="/"),d}const nr=e=>e.join("/").replace(/\/\/+/g,"/"),Hx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Wx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Vx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Kx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const gg=["post","put","patch","delete"];new Set(gg);const qx=["get",...gg];new Set(qx);/** + */function Bo(){return Bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Od(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Cx(){return Math.random().toString(36).substr(2,8)}function pm(e,t){return{usr:e.state,key:e.key,idx:t}}function gf(e,t,n,i){return n===void 0&&(n=null),Bo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?zi(t):t,{state:n,key:t&&t.key||i||Cx()})}function $a(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 zi(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 Tx(e,t,n,i){i===void 0&&(i={});let{window:s=document.defaultView,v5Compat:a=!1}=i,u=s.history,f=Vn.Pop,d=null,p=_();p==null&&(p=0,u.replaceState(Bo({},u.state,{idx:p}),""));function _(){return(u.state||{idx:null}).idx}function v(){f=Vn.Pop;let R=_(),x=R==null?null:R-p;p=R,d&&d({action:f,location:E.location,delta:x})}function S(R,x){f=Vn.Push;let g=gf(E.location,R,x);n&&n(g,R),p=_()+1;let y=pm(g,p),N=E.createHref(g);try{u.pushState(y,"",N)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(N)}a&&d&&d({action:f,location:E.location,delta:1})}function k(R,x){f=Vn.Replace;let g=gf(E.location,R,x);n&&n(g,R),p=_();let y=pm(g,p),N=E.createHref(g);u.replaceState(y,"",N),a&&d&&d({action:f,location:E.location,delta:0})}function P(R){let x=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof R=="string"?R:$a(R);return ze(x,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,x)}let E={get action(){return f},get location(){return e(s,u)},listen(R){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(hm,v),d=R,()=>{s.removeEventListener(hm,v),d=null}},createHref(R){return t(s,R)},createURL:P,encodeLocation(R){let x=P(R);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:S,replace:k,go(R){return u.go(R)}};return E}var mm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(mm||(mm={}));function kx(e,t,n){n===void 0&&(n="/");let i=typeof t=="string"?zi(t):t,s=Md(i.pathname||"/",n);if(s==null)return null;let a=_g(e);Lx(a);let u=null;for(let f=0;u==null&&f{let d={relativePath:f===void 0?a.path||"":f,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};d.relativePath.startsWith("/")&&(ze(d.relativePath.startsWith(i),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(i.length));let p=nr([i,d.relativePath]),_=n.concat(d);a.children&&a.children.length>0&&(ze(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),_g(a.children,t,_,p)),!(a.path==null&&!a.index)&&t.push({path:p,score:Ax(p,a.index),routesMeta:_})};return e.forEach((a,u)=>{var f;if(a.path===""||!((f=a.path)!=null&&f.includes("?")))s(a,u);else for(let d of vg(a.path))s(a,u,d)}),t}function vg(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=vg(i.join("/")),f=[];return f.push(...u.map(d=>d===""?a:[a,d].join("/"))),s&&f.push(...u),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function Lx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jx(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const Nx=/^:\w+$/,Ox=3,Mx=2,Rx=1,zx=10,Ix=-2,_m=e=>e==="*";function Ax(e,t){let n=e.split("/"),i=n.length;return n.some(_m)&&(i+=Ix),t&&(i+=Mx),n.filter(s=>!_m(s)).reduce((s,a)=>s+(Nx.test(a)?Ox:a===""?Rx:zx),i)}function jx(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 Dx(e,t){let{routesMeta:n}=e,i={},s="/",a=[];for(let u=0;u{if(_==="*"){let S=f[v]||"";u=a.slice(0,a.length-S.length).replace(/(.)\/+$/,"$1")}return p[_]=$x(f[v]||"",_),p},{}),pathname:a,pathnameBase:u,pattern:e}}function Bx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Od(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 Fx(e){try{return decodeURI(e)}catch(t){return Od(!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 $x(e,t){try{return decodeURIComponent(e)}catch(n){return Od(!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 Md(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 Ux(e,t){t===void 0&&(t="/");let{pathname:n,search:i="",hash:s=""}=typeof e=="string"?zi(e):e;return{pathname:n?n.startsWith("/")?n:Zx(n,t):t,search:Wx(i),hash:Vx(s)}}function Zx(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 hc(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 Rd(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function zd(e,t,n,i){i===void 0&&(i=!1);let s;typeof e=="string"?s=zi(e):(s=Bo({},e),ze(!s.pathname||!s.pathname.includes("?"),hc("?","pathname","search",s)),ze(!s.pathname||!s.pathname.includes("#"),hc("#","pathname","hash",s)),ze(!s.search||!s.search.includes("#"),hc("#","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 S=u.split("/");for(;S[0]==="..";)S.shift(),v-=1;s.pathname=S.join("/")}f=v>=0?t[v]:"/"}let d=Ux(s,f),p=u&&u!=="/"&&u.endsWith("/"),_=(a||u===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(p||_)&&(d.pathname+="/"),d}const nr=e=>e.join("/").replace(/\/\/+/g,"/"),Hx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Wx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Vx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Kx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const gg=["post","put","patch","delete"];new Set(gg);const qx=["get",...gg];new Set(qx);/** * 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 Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;td.pathnameBase)),u=O.useRef(!1);return xg(()=>{u.current=!0}),O.useCallback(function(d,p){if(p===void 0&&(p={}),!u.current)return;if(typeof d=="number"){n.go(d);return}let _=zd(d,JSON.parse(a),s,p.relative==="path");e==null&&t!=="/"&&(_.pathname=_.pathname==="/"?t:nr([t,_.pathname])),(p.replace?n.replace:n.push)(_,p.state,p)},[t,n,a,s,e])}function Qx(){let{matches:e}=O.useContext(Mn),t=e[e.length-1];return t?t.params:{}}function jd(e,t){let{relative:n}=t===void 0?{}:t,{matches:i}=O.useContext(Mn),{pathname:s}=fr(),a=JSON.stringify(Rd(i).map(u=>u.pathnameBase));return O.useMemo(()=>zd(e,JSON.parse(a),s,n==="path"),[e,a,s,n])}function Xx(e,t){return Jx(e,t)}function Jx(e,t,n){Ii()||ze(!1);let{navigator:i}=O.useContext(Dr),{matches:s}=O.useContext(Mn),a=s[s.length-1],u=a?a.params:{};a&&a.pathname;let f=a?a.pathnameBase:"/";a&&a.route;let d=fr(),p;if(t){var _;let E=typeof t=="string"?zi(t):t;f==="/"||(_=E.pathname)!=null&&_.startsWith(f)||ze(!1),p=E}else p=d;let v=p.pathname||"/",S=f==="/"?v:v.slice(f.length)||"/",k=kx(e,{pathname:S}),P=iS(k&&k.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:nr([f,i.encodeLocation?i.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:nr([f,i.encodeLocation?i.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),s,n);return t&&P?O.createElement(wl.Provider,{value:{location:Ua({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Vn.Pop}},P):P}function eS(){let e=lS(),t=Kx(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 O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),n?O.createElement("pre",{style:s},n):null,a)}const tS=O.createElement(eS,null);class nS extends O.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?O.createElement(Mn.Provider,{value:this.props.routeContext},O.createElement(wg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function rS(e){let{routeContext:t,match:n,children:i}=e,s=O.useContext(Id);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),O.createElement(Mn.Provider,{value:t},i)}function iS(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(d=>d.route.id&&(u==null?void 0:u[d.route.id]));f>=0||ze(!1),a=a.slice(0,Math.min(a.length,f+1))}return a.reduceRight((f,d,p)=>{let _=d.route.id?u==null?void 0:u[d.route.id]:null,v=null;n&&(v=d.route.errorElement||tS);let S=t.concat(a.slice(0,p+1)),k=()=>{let P;return _?P=v:d.route.Component?P=O.createElement(d.route.Component,null):d.route.element?P=d.route.element:P=f,O.createElement(rS,{match:d,routeContext:{outlet:f,matches:S,isDataRoute:n!=null},children:P})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?O.createElement(nS,{location:n.location,revalidation:n.revalidation,component:v,error:_,children:k(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):k()},null)}var Sg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Sg||{}),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 oS(e){let t=O.useContext(Id);return t||ze(!1),t}function sS(e){let t=O.useContext(yg);return t||ze(!1),t}function aS(e){let t=O.useContext(Mn);return t||ze(!1),t}function Eg(e){let t=aS(),n=t.matches[t.matches.length-1];return n.route.id||ze(!1),n.route.id}function lS(){var e;let t=O.useContext(wg),n=sS(Za.UseRouteError),i=Eg(Za.UseRouteError);return t||((e=n.errors)==null?void 0:e[i])}function uS(){let{router:e}=oS(Sg.UseNavigateStable),t=Eg(Za.UseNavigateStable),n=O.useRef(!1);return xg(()=>{n.current=!0}),O.useCallback(function(s,a){a===void 0&&(a={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ua({fromRouteId:t},a)))},[e,t])}function Pg(e){let{to:t,replace:n,state:i,relative:s}=e;Ii()||ze(!1);let{matches:a}=O.useContext(Mn),{pathname:u}=fr(),f=Ad(),d=zd(t,Rd(a).map(_=>_.pathnameBase),u,s==="path"),p=JSON.stringify(d);return O.useEffect(()=>f(JSON.parse(p),{replace:n,state:i,relative:s}),[f,p,s,n,i]),null}function yr(e){ze(!1)}function cS(e){let{basename:t="/",children:n=null,location:i,navigationType:s=Vn.Pop,navigator:a,static:u=!1}=e;Ii()&&ze(!1);let f=t.replace(/^\/*/,"/"),d=O.useMemo(()=>({basename:f,navigator:a,static:u}),[f,a,u]);typeof i=="string"&&(i=zi(i));let{pathname:p="/",search:_="",hash:v="",state:S=null,key:k="default"}=i,P=O.useMemo(()=>{let E=Md(p,f);return E==null?null:{location:{pathname:E,search:_,hash:v,state:S,key:k},navigationType:s}},[f,p,_,v,S,k,s]);return P==null?null:O.createElement(Dr.Provider,{value:d},O.createElement(wl.Provider,{children:n,value:P}))}function fS(e){let{children:t,location:n}=e;return Xx(yf(t),n)}new Promise(()=>{});function yf(e,t){t===void 0&&(t=[]);let n=[];return O.Children.forEach(e,(i,s)=>{if(!O.isValidElement(i))return;let a=[...t,s];if(i.type===O.Fragment){n.push.apply(n,yf(i.props.children,a));return}i.type!==yr&&ze(!1),!i.props.index||!i.props.children||ze(!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=yf(i.props.children,a)),n.push(u)}),n}/** + */function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;td.pathnameBase)),u=O.useRef(!1);return xg(()=>{u.current=!0}),O.useCallback(function(d,p){if(p===void 0&&(p={}),!u.current)return;if(typeof d=="number"){n.go(d);return}let _=zd(d,JSON.parse(a),s,p.relative==="path");e==null&&t!=="/"&&(_.pathname=_.pathname==="/"?t:nr([t,_.pathname])),(p.replace?n.replace:n.push)(_,p.state,p)},[t,n,a,s,e])}function Qx(){let{matches:e}=O.useContext(Mn),t=e[e.length-1];return t?t.params:{}}function jd(e,t){let{relative:n}=t===void 0?{}:t,{matches:i}=O.useContext(Mn),{pathname:s}=fr(),a=JSON.stringify(Rd(i).map(u=>u.pathnameBase));return O.useMemo(()=>zd(e,JSON.parse(a),s,n==="path"),[e,a,s,n])}function Xx(e,t){return Jx(e,t)}function Jx(e,t,n){Ii()||ze(!1);let{navigator:i}=O.useContext(br),{matches:s}=O.useContext(Mn),a=s[s.length-1],u=a?a.params:{};a&&a.pathname;let f=a?a.pathnameBase:"/";a&&a.route;let d=fr(),p;if(t){var _;let E=typeof t=="string"?zi(t):t;f==="/"||(_=E.pathname)!=null&&_.startsWith(f)||ze(!1),p=E}else p=d;let v=p.pathname||"/",S=f==="/"?v:v.slice(f.length)||"/",k=kx(e,{pathname:S}),P=iS(k&&k.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:nr([f,i.encodeLocation?i.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:nr([f,i.encodeLocation?i.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),s,n);return t&&P?O.createElement(wl.Provider,{value:{location:Ua({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Vn.Pop}},P):P}function eS(){let e=lS(),t=Kx(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 O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),n?O.createElement("pre",{style:s},n):null,a)}const tS=O.createElement(eS,null);class nS extends O.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?O.createElement(Mn.Provider,{value:this.props.routeContext},O.createElement(wg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function rS(e){let{routeContext:t,match:n,children:i}=e,s=O.useContext(Id);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),O.createElement(Mn.Provider,{value:t},i)}function iS(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(d=>d.route.id&&(u==null?void 0:u[d.route.id]));f>=0||ze(!1),a=a.slice(0,Math.min(a.length,f+1))}return a.reduceRight((f,d,p)=>{let _=d.route.id?u==null?void 0:u[d.route.id]:null,v=null;n&&(v=d.route.errorElement||tS);let S=t.concat(a.slice(0,p+1)),k=()=>{let P;return _?P=v:d.route.Component?P=O.createElement(d.route.Component,null):d.route.element?P=d.route.element:P=f,O.createElement(rS,{match:d,routeContext:{outlet:f,matches:S,isDataRoute:n!=null},children:P})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?O.createElement(nS,{location:n.location,revalidation:n.revalidation,component:v,error:_,children:k(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):k()},null)}var Sg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Sg||{}),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 oS(e){let t=O.useContext(Id);return t||ze(!1),t}function sS(e){let t=O.useContext(yg);return t||ze(!1),t}function aS(e){let t=O.useContext(Mn);return t||ze(!1),t}function Eg(e){let t=aS(),n=t.matches[t.matches.length-1];return n.route.id||ze(!1),n.route.id}function lS(){var e;let t=O.useContext(wg),n=sS(Za.UseRouteError),i=Eg(Za.UseRouteError);return t||((e=n.errors)==null?void 0:e[i])}function uS(){let{router:e}=oS(Sg.UseNavigateStable),t=Eg(Za.UseNavigateStable),n=O.useRef(!1);return xg(()=>{n.current=!0}),O.useCallback(function(s,a){a===void 0&&(a={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ua({fromRouteId:t},a)))},[e,t])}function Pg(e){let{to:t,replace:n,state:i,relative:s}=e;Ii()||ze(!1);let{matches:a}=O.useContext(Mn),{pathname:u}=fr(),f=Ad(),d=zd(t,Rd(a).map(_=>_.pathnameBase),u,s==="path"),p=JSON.stringify(d);return O.useEffect(()=>f(JSON.parse(p),{replace:n,state:i,relative:s}),[f,p,s,n,i]),null}function wr(e){ze(!1)}function cS(e){let{basename:t="/",children:n=null,location:i,navigationType:s=Vn.Pop,navigator:a,static:u=!1}=e;Ii()&&ze(!1);let f=t.replace(/^\/*/,"/"),d=O.useMemo(()=>({basename:f,navigator:a,static:u}),[f,a,u]);typeof i=="string"&&(i=zi(i));let{pathname:p="/",search:_="",hash:v="",state:S=null,key:k="default"}=i,P=O.useMemo(()=>{let E=Md(p,f);return E==null?null:{location:{pathname:E,search:_,hash:v,state:S,key:k},navigationType:s}},[f,p,_,v,S,k,s]);return P==null?null:O.createElement(br.Provider,{value:d},O.createElement(wl.Provider,{children:n,value:P}))}function fS(e){let{children:t,location:n}=e;return Xx(yf(t),n)}new Promise(()=>{});function yf(e,t){t===void 0&&(t=[]);let n=[];return O.Children.forEach(e,(i,s)=>{if(!O.isValidElement(i))return;let a=[...t,s];if(i.type===O.Fragment){n.push.apply(n,yf(i.props.children,a));return}i.type!==wr&&ze(!1),!i.props.index||!i.props.children||ze(!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=yf(i.props.children,a)),n.push(u)}),n}/** * React Router DOM v6.16.0 * * Copyright (c) Remix Software Inc. @@ -64,7 +64,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ha(){return Ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function dS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hS(e,t){return e.button===0&&(!t||t==="_self")&&!dS(e)}const pS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],mS=["aria-current","caseSensitive","className","end","style","to","children"],_S="startTransition",vm=pw[_S];function vS(e){let{basename:t,children:n,future:i,window:s}=e,a=O.useRef();a.current==null&&(a.current=Px({window:s,v5Compat:!0}));let u=a.current,[f,d]=O.useState({action:u.action,location:u.location}),{v7_startTransition:p}=i||{},_=O.useCallback(v=>{p&&vm?vm(()=>d(v)):d(v)},[d,p]);return O.useLayoutEffect(()=>u.listen(_),[u,_]),O.createElement(cS,{basename:t,children:n,location:f.location,navigationType:f.action,navigator:u})}const gS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ln=O.forwardRef(function(t,n){let{onClick:i,relative:s,reloadDocument:a,replace:u,state:f,target:d,to:p,preventScrollReset:_}=t,v=Cg(t,pS),{basename:S}=O.useContext(Dr),k,P=!1;if(typeof p=="string"&&yS.test(p)&&(k=p,gS))try{let g=new URL(window.location.href),y=p.startsWith("//")?new URL(g.protocol+p):new URL(p),N=Md(y.pathname,S);y.origin===g.origin&&N!=null?p=N+y.search+y.hash:P=!0}catch{}let E=Gx(p,{relative:s}),R=xS(p,{replace:u,state:f,target:d,preventScrollReset:_,relative:s});function w(g){i&&i(g),g.defaultPrevented||R(g)}return O.createElement("a",Ha({},v,{href:k||E,onClick:P||a?i:w,ref:n,target:d}))}),wS=O.forwardRef(function(t,n){let{"aria-current":i="page",caseSensitive:s=!1,className:a="",end:u=!1,style:f,to:d,children:p}=t,_=Cg(t,mS),v=jd(d,{relative:_.relative}),S=fr(),k=O.useContext(yg),{navigator:P}=O.useContext(Dr),E=P.encodeLocation?P.encodeLocation(v).pathname:v.pathname,R=S.pathname,w=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;s||(R=R.toLowerCase(),w=w?w.toLowerCase():null,E=E.toLowerCase());let g=R===E||!u&&R.startsWith(E)&&R.charAt(E.length)==="/",y=w!=null&&(w===E||!u&&w.startsWith(E)&&w.charAt(E.length)==="/"),N=g?i:void 0,j;typeof a=="function"?j=a({isActive:g,isPending:y}):j=[a,g?"active":null,y?"pending":null].filter(Boolean).join(" ");let b=typeof f=="function"?f({isActive:g,isPending:y}):f;return O.createElement(Ln,Ha({},_,{"aria-current":N,className:j,ref:n,style:b,to:d}),typeof p=="function"?p({isActive:g,isPending:y}):p)});var gm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(gm||(gm={}));var ym;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ym||(ym={}));function xS(e,t){let{target:n,replace:i,state:s,preventScrollReset:a,relative:u}=t===void 0?{}:t,f=Ad(),d=fr(),p=jd(e,{relative:u});return O.useCallback(_=>{if(hS(_,n)){_.preventDefault();let v=i!==void 0?i:$a(d)===$a(p);f(e,{replace:v,state:s,preventScrollReset:a,relative:u})}},[d,f,p,i,s,n,e,a,u])}const SS="https://15.design.htmlacademy.pro/six-cities",ES=5e3,PS=4,CS=2e3,Tg={unknown:0,perfect:5,good:4,"not bad":3,badly:2,terribly:1},br=[{name:"Paris",location:{latitude:48.85661,longitude:2.351499,zoom:13},slug:"paris"},{name:"Cologne",location:{latitude:50.938361,longitude:6.959974,zoom:13},slug:"cologne"},{name:"Brussels",location:{latitude:50.846557,longitude:4.351697,zoom:13},slug:"brussels"},{name:"Amsterdam",location:{latitude:52.37454,longitude:4.897976,zoom:13},slug:"amsterdam"},{name:"Hamburg",location:{latitude:53.550341,longitude:10.000654,zoom:13},slug:"hamburg"},{name:"Dusseldorf",location:{latitude:51.225402,longitude:6.776314,zoom:13},slug:"dusseldorf"}],TS=br[0].slug;var tt=(e=>(e.Root="/",e.Login="/login",e.Favorites="/favorites",e.Offer="/offer",e))(tt||{}),Gt=(e=>(e.Offers="/offers",e.Comments="/comments",e.Favorite="/favorite",e.Login="/login",e.Logout="/logout",e))(Gt||{}),Je=(e=>(e.Auth="AUTH",e.NoAuth="NO_AUTH",e.Unknown="UNKNOWN",e))(Je||{});const kS="MMMM YYYY",LS="YYYY-MM-DD",NS={iconUrl:"./img/pin.svg",iconSize:[27,39],iconAnchor:[13,39]},OS={iconUrl:"./img/pin-active.svg",iconSize:[27,39],iconAnchor:[13,39]};var ie=(e=>(e[e.Idle=0]="Idle",e[e.Loading=1]="Loading",e[e.Succeed=2]="Succeed",e[e.Failed=3]="Failed",e))(ie||{});function MS(){const e=fr(),t=x.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"});return br.map(i=>i.slug).includes(e.pathname.split("/").join(""))?x.jsx("span",{className:"header__logo-link header__logo-link--active",children:t}):x.jsx(Ln,{to:tt.Root,className:"header__logo-link",children:t})}const Dd=O.memo(MS);var kg={exports:{}},Lg={};/** + */function Ha(){return Ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function dS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hS(e,t){return e.button===0&&(!t||t==="_self")&&!dS(e)}const pS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],mS=["aria-current","caseSensitive","className","end","style","to","children"],_S="startTransition",vm=pw[_S];function vS(e){let{basename:t,children:n,future:i,window:s}=e,a=O.useRef();a.current==null&&(a.current=Px({window:s,v5Compat:!0}));let u=a.current,[f,d]=O.useState({action:u.action,location:u.location}),{v7_startTransition:p}=i||{},_=O.useCallback(v=>{p&&vm?vm(()=>d(v)):d(v)},[d,p]);return O.useLayoutEffect(()=>u.listen(_),[u,_]),O.createElement(cS,{basename:t,children:n,location:f.location,navigationType:f.action,navigator:u})}const gS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,un=O.forwardRef(function(t,n){let{onClick:i,relative:s,reloadDocument:a,replace:u,state:f,target:d,to:p,preventScrollReset:_}=t,v=Cg(t,pS),{basename:S}=O.useContext(br),k,P=!1;if(typeof p=="string"&&yS.test(p)&&(k=p,gS))try{let g=new URL(window.location.href),y=p.startsWith("//")?new URL(g.protocol+p):new URL(p),N=Md(y.pathname,S);y.origin===g.origin&&N!=null?p=N+y.search+y.hash:P=!0}catch{}let E=Gx(p,{relative:s}),R=xS(p,{replace:u,state:f,target:d,preventScrollReset:_,relative:s});function x(g){i&&i(g),g.defaultPrevented||R(g)}return O.createElement("a",Ha({},v,{href:k||E,onClick:P||a?i:x,ref:n,target:d}))}),wS=O.forwardRef(function(t,n){let{"aria-current":i="page",caseSensitive:s=!1,className:a="",end:u=!1,style:f,to:d,children:p}=t,_=Cg(t,mS),v=jd(d,{relative:_.relative}),S=fr(),k=O.useContext(yg),{navigator:P}=O.useContext(br),E=P.encodeLocation?P.encodeLocation(v).pathname:v.pathname,R=S.pathname,x=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;s||(R=R.toLowerCase(),x=x?x.toLowerCase():null,E=E.toLowerCase());let g=R===E||!u&&R.startsWith(E)&&R.charAt(E.length)==="/",y=x!=null&&(x===E||!u&&x.startsWith(E)&&x.charAt(E.length)==="/"),N=g?i:void 0,j;typeof a=="function"?j=a({isActive:g,isPending:y}):j=[a,g?"active":null,y?"pending":null].filter(Boolean).join(" ");let b=typeof f=="function"?f({isActive:g,isPending:y}):f;return O.createElement(un,Ha({},_,{"aria-current":N,className:j,ref:n,style:b,to:d}),typeof p=="function"?p({isActive:g,isPending:y}):p)});var gm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(gm||(gm={}));var ym;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ym||(ym={}));function xS(e,t){let{target:n,replace:i,state:s,preventScrollReset:a,relative:u}=t===void 0?{}:t,f=Ad(),d=fr(),p=jd(e,{relative:u});return O.useCallback(_=>{if(hS(_,n)){_.preventDefault();let v=i!==void 0?i:$a(d)===$a(p);f(e,{replace:v,state:s,preventScrollReset:a,relative:u})}},[d,f,p,i,s,n,e,a,u])}const SS="https://15.design.htmlacademy.pro/six-cities",ES=5e3,PS=4,CS=2e3,Tg={unknown:0,perfect:5,good:4,"not bad":3,badly:2,terribly:1},dr=[{name:"Paris",location:{latitude:48.85661,longitude:2.351499,zoom:13},slug:"paris"},{name:"Cologne",location:{latitude:50.938361,longitude:6.959974,zoom:13},slug:"cologne"},{name:"Brussels",location:{latitude:50.846557,longitude:4.351697,zoom:13},slug:"brussels"},{name:"Amsterdam",location:{latitude:52.37454,longitude:4.897976,zoom:13},slug:"amsterdam"},{name:"Hamburg",location:{latitude:53.550341,longitude:10.000654,zoom:13},slug:"hamburg"},{name:"Dusseldorf",location:{latitude:51.225402,longitude:6.776314,zoom:13},slug:"dusseldorf"}],TS=dr[0].slug;var tt=(e=>(e.Root="/",e.Login="/login",e.Favorites="/favorites",e.Offer="/offer",e))(tt||{}),Gt=(e=>(e.Offers="/offers",e.Comments="/comments",e.Favorite="/favorite",e.Login="/login",e.Logout="/logout",e))(Gt||{}),Je=(e=>(e.Auth="AUTH",e.NoAuth="NO_AUTH",e.Unknown="UNKNOWN",e))(Je||{});const kS="MMMM YYYY",LS="YYYY-MM-DD",NS={iconUrl:"./img/pin.svg",iconSize:[27,39],iconAnchor:[13,39]},OS={iconUrl:"./img/pin-active.svg",iconSize:[27,39],iconAnchor:[13,39]};var ie=(e=>(e[e.Idle=0]="Idle",e[e.Loading=1]="Loading",e[e.Succeed=2]="Succeed",e[e.Failed=3]="Failed",e))(ie||{});function MS(){const e=fr(),t=w.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"});return dr.map(i=>i.slug).includes(e.pathname.split("/").join(""))?w.jsx("span",{className:"header__logo-link header__logo-link--active",children:t}):w.jsx(un,{to:tt.Root,className:"header__logo-link",children:t})}const Dd=O.memo(MS);var kg={exports:{}},Lg={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -95,10 +95,10 @@ 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 Ud=Symbol.for("react.element"),Zd=Symbol.for("react.portal"),Rl=Symbol.for("react.fragment"),zl=Symbol.for("react.strict_mode"),Il=Symbol.for("react.profiler"),Al=Symbol.for("react.provider"),jl=Symbol.for("react.context"),pE=Symbol.for("react.server_context"),Dl=Symbol.for("react.forward_ref"),bl=Symbol.for("react.suspense"),Bl=Symbol.for("react.suspense_list"),Fl=Symbol.for("react.memo"),$l=Symbol.for("react.lazy"),mE=Symbol.for("react.offscreen"),bg;bg=Symbol.for("react.module.reference");function At(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ud:switch(e=e.type,e){case Rl:case Il:case zl:case bl:case Bl:return e;default:switch(e=e&&e.$$typeof,e){case pE:case jl:case Dl:case $l:case Fl:case Al:return e;default:return t}}case Zd:return t}}}we.ContextConsumer=jl;we.ContextProvider=Al;we.Element=Ud;we.ForwardRef=Dl;we.Fragment=Rl;we.Lazy=$l;we.Memo=Fl;we.Portal=Zd;we.Profiler=Il;we.StrictMode=zl;we.Suspense=bl;we.SuspenseList=Bl;we.isAsyncMode=function(){return!1};we.isConcurrentMode=function(){return!1};we.isContextConsumer=function(e){return At(e)===jl};we.isContextProvider=function(e){return At(e)===Al};we.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ud};we.isForwardRef=function(e){return At(e)===Dl};we.isFragment=function(e){return At(e)===Rl};we.isLazy=function(e){return At(e)===$l};we.isMemo=function(e){return At(e)===Fl};we.isPortal=function(e){return At(e)===Zd};we.isProfiler=function(e){return At(e)===Il};we.isStrictMode=function(e){return At(e)===zl};we.isSuspense=function(e){return At(e)===bl};we.isSuspenseList=function(e){return At(e)===Bl};we.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Rl||e===Il||e===zl||e===bl||e===Bl||e===mE||typeof e=="object"&&e!==null&&(e.$$typeof===$l||e.$$typeof===Fl||e.$$typeof===Al||e.$$typeof===jl||e.$$typeof===Dl||e.$$typeof===bg||e.getModuleId!==void 0)};we.typeOf=At;function _E(){const e=JS();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 Sm={notify(){},get:()=>[]};function vE(e,t){let n,i=Sm,s=0,a=!1;function u(E){_();const R=i.subscribe(E);let w=!1;return()=>{w||(w=!0,R(),v())}}function f(){i.notify()}function d(){P.onStateChange&&P.onStateChange()}function p(){return a}function _(){s++,n||(n=t?t.addNestedSub(d):e.subscribe(d),i=_E())}function v(){s--,n&&s===0&&(n(),n=void 0,i.clear(),i=Sm)}function S(){a||(a=!0,_())}function k(){a&&(a=!1,v())}const P={addNestedSub:u,notifyNestedSubs:f,handleChangeWrapper:d,isSubscribed:p,trySubscribe:S,tryUnsubscribe:k,getListeners:()=>i};return P}const gE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yE=gE?O.useLayoutEffect:O.useEffect;function wE({store:e,context:t,children:n,serverState:i,stabilityCheck:s="once",noopCheck:a="once"}){const u=O.useMemo(()=>{const p=vE(e);return{store:e,subscription:p,getServerState:i?()=>i:void 0,stabilityCheck:s,noopCheck:a}},[e,i,s,a]),f=O.useMemo(()=>e.getState(),[e]);yE(()=>{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 d=t||sr;return O.createElement(d.Provider,{value:u},n)}function Bg(e=sr){const t=e===sr?Rg:bd(e);return function(){const{store:i}=t();return i}}const xE=Bg();function SE(e=sr){const t=e===sr?xE:Bg(e);return function(){return t().dispatch}}const EE=SE();nE(YS.useSyncExternalStoreWithSelector);XS(mg.unstable_batchedUpdates);function Ue(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var PE=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")(),Em=PE,mc=()=>Math.random().toString(36).substring(7).split("").join("."),CE={INIT:`@@redux/INIT${mc()}`,REPLACE:`@@redux/REPLACE${mc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${mc()}`},Wa=CE;function Hd(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Fg(e,t,n){if(typeof e!="function")throw new Error(Ue(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ue(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ue(1));return n(Fg)(e,t)}let i=e,s=t,a=new Map,u=a,f=0,d=!1;function p(){u===a&&(u=new Map,a.forEach((R,w)=>{u.set(w,R)}))}function _(){if(d)throw new Error(Ue(3));return s}function v(R){if(typeof R!="function")throw new Error(Ue(4));if(d)throw new Error(Ue(5));let w=!0;p();const g=f++;return u.set(g,R),function(){if(w){if(d)throw new Error(Ue(6));w=!1,p(),u.delete(g),a=null}}}function S(R){if(!Hd(R))throw new Error(Ue(7));if(typeof R.type>"u")throw new Error(Ue(8));if(typeof R.type!="string")throw new Error(Ue(17));if(d)throw new Error(Ue(9));try{d=!0,s=i(s,R)}finally{d=!1}return(a=u).forEach(g=>{g()}),R}function k(R){if(typeof R!="function")throw new Error(Ue(10));i=R,S({type:Wa.REPLACE})}function P(){const R=v;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(Ue(11));function g(){const N=w;N.next&&N.next(_())}return g(),{unsubscribe:R(g)}},[Em](){return this}}}return S({type:Wa.INIT}),{dispatch:S,subscribe:v,getState:_,replaceReducer:k,[Em]:P}}function TE(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Wa.INIT})>"u")throw new Error(Ue(12));if(typeof n(void 0,{type:Wa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ue(13))})}function $g(e){const t=Object.keys(e),n={};for(let a=0;a"u")throw f&&f.type,new Error(Ue(14));p[v]=P,d=d||P!==k}return d=d||i.length!==Object.keys(u).length,d?p:u}}function Pm(e,t){return function(...n){return t(e.apply(this,n))}}function kE(e,t){if(typeof e=="function")return Pm(e,t);if(typeof e!="object"||e===null)throw new Error(Ue(16));const n={};for(const i in e){const s=e[i];typeof s=="function"&&(n[i]=Pm(s,t))}return n}function Va(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...i)=>t(n(...i)))}function LE(...e){return t=>(n,i)=>{const s=t(n,i);let a=()=>{throw new Error(Ue(15))};const u={getState:s.getState,dispatch:(d,...p)=>a(d,...p)},f=e.map(d=>d(u));return a=Va(...f)(s.dispatch),{...s,dispatch:a}}}function NE(e){return Hd(e)&&"type"in e&&typeof e.type=="string"}var Ug=Symbol.for("immer-nothing"),Cm=Symbol.for("immer-draftable"),yt=Symbol.for("immer-state");function Ht(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Li=Object.getPrototypeOf;function ar(e){return!!e&&!!e[yt]}function Nn(e){var t;return e?Zg(e)||Array.isArray(e)||!!e[Cm]||!!((t=e.constructor)!=null&&t[Cm])||Zl(e)||Hl(e):!1}var OE=Object.prototype.constructor.toString();function Zg(e){if(!e||typeof e!="object")return!1;const t=Li(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===OE}function Ka(e,t){Ul(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function Ul(e){const t=e[yt];return t?t.type_:Array.isArray(e)?1:Zl(e)?2:Hl(e)?3:0}function wf(e,t){return Ul(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hg(e,t,n){const i=Ul(e);i===2?e.set(t,n):i===3?e.add(n):e[t]=n}function ME(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zl(e){return e instanceof Map}function Hl(e){return e instanceof Set}function wr(e){return e.copy_||e.base_}function xf(e,t){if(Zl(e))return new Map(e);if(Hl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Zg(e))return Li(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[yt];let i=Reflect.ownKeys(n);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=RE),Object.freeze(e),t&&Object.entries(e).forEach(([n,i])=>Wd(i,!0))),e}function RE(){Ht(2)}function Wl(e){return Object.isFrozen(e)}var zE={};function zr(e){const t=zE[e];return t||Ht(0,e),t}var Fo;function Wg(){return Fo}function IE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Tm(e,t){t&&(zr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Sf(e){Ef(e),e.drafts_.forEach(AE),e.drafts_=null}function Ef(e){e===Fo&&(Fo=e.parent_)}function km(e){return Fo=IE(Fo,e)}function AE(e){const t=e[yt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Lm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[yt].modified_&&(Sf(t),Ht(4)),Nn(e)&&(e=qa(t,e),t.parent_||Ga(t,e)),t.patches_&&zr("Patches").generateReplacementPatches_(n[yt].base_,e,t.patches_,t.inversePatches_)):e=qa(t,n,[]),Sf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ug?e:void 0}function qa(e,t,n){if(Wl(t))return t;const i=t[yt];if(!i)return Ka(t,(s,a)=>Nm(e,i,t,s,a,n)),t;if(i.scope_!==e)return t;if(!i.modified_)return Ga(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const s=i.copy_;let a=s,u=!1;i.type_===3&&(a=new Set(s),s.clear(),u=!0),Ka(a,(f,d)=>Nm(e,i,s,f,d,n,u)),Ga(e,s,!1),n&&e.patches_&&zr("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function Nm(e,t,n,i,s,a,u){if(ar(s)){const f=a&&t&&t.type_!==3&&!wf(t.assigned_,i)?a.concat(i):void 0,d=qa(e,s,f);if(Hg(n,i,d),ar(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Nn(s)&&!Wl(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;qa(e,s),(!t||!t.scope_.parent_)&&typeof i!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,i)&&Ga(e,s)}}function Ga(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wd(t,n)}function jE(e,t){const n=Array.isArray(e),i={type_:n?1:0,scope_:t?t.scope_:Wg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=i,a=Vd;n&&(s=[i],a=$o);const{revoke:u,proxy:f}=Proxy.revocable(s,a);return i.draft_=f,i.revoke_=u,f}var Vd={get(e,t){if(t===yt)return e;const n=wr(e);if(!wf(n,t))return DE(e,n,t);const i=n[t];return e.finalized_||!Nn(i)?i:i===_c(e.base_,t)?(vc(e),e.copy_[t]=Cf(i,e)):i},has(e,t){return t in wr(e)},ownKeys(e){return Reflect.ownKeys(wr(e))},set(e,t,n){const i=Vg(wr(e),t);if(i!=null&&i.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){const s=_c(wr(e),t),a=s==null?void 0:s[yt];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(ME(n,s)&&(n!==void 0||wf(e.base_,t)))return!0;vc(e),Pf(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return _c(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,vc(e),Pf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=wr(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:i.enumerable,value:n[t]}},defineProperty(){Ht(11)},getPrototypeOf(e){return Li(e.base_)},setPrototypeOf(){Ht(12)}},$o={};Ka(Vd,(e,t)=>{$o[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$o.deleteProperty=function(e,t){return $o.set.call(this,e,t,void 0)};$o.set=function(e,t,n){return Vd.set.call(this,e[0],t,n,e[0])};function _c(e,t){const n=e[yt];return(n?wr(n):e)[t]}function DE(e,t,n){var s;const i=Vg(t,n);return i?"value"in i?i.value:(s=i.get)==null?void 0:s.call(e.draft_):void 0}function Vg(e,t){if(!(t in e))return;let n=Li(e);for(;n;){const i=Object.getOwnPropertyDescriptor(n,t);if(i)return i;n=Li(n)}}function Pf(e){e.modified_||(e.modified_=!0,e.parent_&&Pf(e.parent_))}function vc(e){e.copy_||(e.copy_=xf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var bE=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,i)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...p){return u.produce(d,_=>n.call(this,_,...p))}}typeof n!="function"&&Ht(6),i!==void 0&&typeof i!="function"&&Ht(7);let s;if(Nn(t)){const a=km(this),u=Cf(t,void 0);let f=!0;try{s=n(u),f=!1}finally{f?Sf(a):Ef(a)}return Tm(a,i),Lm(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Ug&&(s=void 0),this.autoFreeze_&&Wd(s,!0),i){const a=[],u=[];zr("Patches").generateReplacementPatches_(t,s,a,u),i(a,u)}return s}else Ht(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...f)=>this.produceWithPatches(u,d=>t(d,...f));let i,s;return[this.produce(t,n,(u,f)=>{i=u,s=f}),i,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Nn(e)||Ht(8),ar(e)&&(e=Kg(e));const t=km(this),n=Cf(e,void 0);return n[yt].isManual_=!0,Ef(t),n}finishDraft(e,t){const n=e&&e[yt];(!n||!n.isManual_)&&Ht(9);const{scope_:i}=n;return Tm(i,t),Lm(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const i=zr("Patches").applyPatches_;return ar(e)?i(e,t):this.produce(e,s=>i(s,t))}};function Cf(e,t){const n=Zl(e)?zr("MapSet").proxyMap_(e,t):Hl(e)?zr("MapSet").proxySet_(e,t):jE(e,t);return(t?t.scope_:Wg()).drafts_.push(n),n}function Kg(e){return ar(e)||Ht(10,e),qg(e)}function qg(e){if(!Nn(e)||Wl(e))return e;const t=e[yt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=xf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=xf(e,!0);return Ka(n,(i,s)=>{Hg(n,i,qg(s))}),t&&(t.finalized_=!1),n}var wt=new bE,Gg=wt.produce;wt.produceWithPatches.bind(wt);wt.setAutoFreeze.bind(wt);wt.setUseStrictShallowCopy.bind(wt);wt.applyPatches.bind(wt);wt.createDraft.bind(wt);wt.finishDraft.bind(wt);function BE(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function FE(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function $E(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${n}]`)}}var Om=e=>Array.isArray(e)?e:[e];function UE(e){const t=Array.isArray(e[0])?e[0]:e;return $E(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ZE(e,t){const n=[],{length:i}=e;for(let s=0;s{n=Zs(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}function Yg(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...s)=>{let a=0,u=0,f,d={},p=s.pop();typeof p=="object"&&(d=p,p=s.pop()),BE(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);const _={...n,...d},{memoize:v,memoizeOptions:S=[],argsMemoize:k=Kd,argsMemoizeOptions:P=[],devModeChecks:E={}}=_,R=Om(S),w=Om(P),g=UE(s),y=v(function(){return a++,p.apply(null,arguments)},...R),N=k(function(){u++;const b=ZE(g,arguments);return f=y.apply(null,b),f},...w);return Object.assign(N,{resultFunc:p,memoizedResultFunc:y,dependencies:g,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>f,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:v,argsMemoize:k})};return Object.assign(i,{withTypes:()=>i}),i}var Qg=Yg(Kd),KE=Object.assign((e,t=Qg)=>{FE(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),i=n.map(a=>e[a]);return t(i,(...a)=>a.reduce((u,f,d)=>(u[n[d]]=f,u),{}))},{withTypes:()=>KE});function Xg(e){return({dispatch:n,getState:i})=>s=>a=>typeof a=="function"?a(n,i,e):s(a)}var qE=Xg(),GE=Xg,YE=(...e)=>{const t=Yg(...e),n=Object.assign((...i)=>{const s=t(...i),a=(u,...f)=>s(ar(u)?Kg(u):u,...f);return Object.assign(a,s),a},{withTypes:()=>n});return n};YE(Kd);var QE=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Va:Va.apply(null,arguments)},XE=e=>e&&typeof e.match=="function";function Sn(e,t){function n(...i){if(t){let s=t(...i);if(!s)throw new Error(ht(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:i[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=i=>NE(i)&&i.type===e,n}var Jg=class co extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,co.prototype)}static get[Symbol.species](){return co}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new co(...t[0].concat(this)):new co(...t.concat(this))}};function Rm(e){return Nn(e)?Gg(e,()=>{}):e}function zm(e,t,n){if(e.has(t)){let s=e.get(t);return n.update&&(s=n.update(s,t,e),e.set(t,s)),s}if(!n.insert)throw new Error(ht(10));const i=n.insert(t,e);return e.set(t,i),i}function JE(e){return typeof e=="boolean"}var eP=()=>function(t){const{thunk:n=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:a=!0}=t??{};let u=new Jg;return n&&(JE(n)?u.push(qE):u.push(GE(n.extraArgument))),u},tP="RTK_autoBatch",ey=e=>t=>{setTimeout(t,e)},nP=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ey(10),rP=(e={type:"raf"})=>t=>(...n)=>{const i=t(...n);let s=!0,a=!1,u=!1;const f=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?nP:e.type==="callback"?e.queueNotification:ey(e.timeout),p=()=>{u=!1,a&&(a=!1,f.forEach(_=>_()))};return Object.assign({},i,{subscribe(_){const v=()=>s&&_(),S=i.subscribe(v);return f.add(_),()=>{S(),f.delete(_)}},dispatch(_){var v;try{return s=!((v=_==null?void 0:_.meta)!=null&&v[tP]),a=!s,a&&(u||(u=!0,d(p))),i.dispatch(_)}finally{s=!0}}})},iP=e=>function(n){const{autoBatch:i=!0}=n??{};let s=new Jg(e);return i&&s.push(rP(typeof i=="object"?i:void 0)),s},oP=!0;function sP(e){const t=eP(),{reducer:n=void 0,middleware:i,devTools:s=!0,preloadedState:a=void 0,enhancers:u=void 0}=e||{};let f;if(typeof n=="function")f=n;else if(Hd(n))f=$g(n);else throw new Error(ht(1));let d;typeof i=="function"?d=i(t):d=t();let p=Va;s&&(p=QE({trace:!oP,...typeof s=="object"&&s}));const _=LE(...d),v=iP(_);let S=typeof u=="function"?u(v):v();const k=p(...S);return Fg(f,a,k)}function ty(e){const t={},n=[];let i;const s={addCase(a,u){const f=typeof a=="string"?a:a.type;if(!f)throw new Error(ht(28));if(f in t)throw new Error(ht(29));return t[f]=u,s},addMatcher(a,u){return n.push({matcher:a,reducer:u}),s},addDefaultCase(a){return i=a,s}};return e(s),[t,n,i]}function aP(e){return typeof e=="function"}function lP(e,t){let[n,i,s]=ty(t),a;if(aP(e))a=()=>Rm(e());else{const f=Rm(e);a=()=>f}function u(f=a(),d){let p=[n[d.type],...i.filter(({matcher:_})=>_(d)).map(({reducer:_})=>_)];return p.filter(_=>!!_).length===0&&(p=[s]),p.reduce((_,v)=>{if(v)if(ar(_)){const k=v(_,d);return k===void 0?_:k}else{if(Nn(_))return Gg(_,S=>v(S,d));{const S=v(_,d);if(S===void 0){if(_===null)return _;throw new Error(ht(9))}return S}}return _},f)}return u.getInitialState=a,u}var uP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ny=(e=21)=>{let t="",n=e;for(;n--;)t+=uP[Math.random()*64|0];return t},cP=(e,t)=>XE(e)?e.match(t):e(t);function fP(...e){return t=>e.some(n=>cP(n,t))}var dP=["name","message","stack","code"],gc=class{constructor(e,t){Fu(this,"_type");this.payload=e,this.meta=t}},Im=class{constructor(e,t){Fu(this,"_type");this.payload=e,this.meta=t}},hP=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of dP)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},un=(()=>{function e(t,n,i){const s=Sn(t+"/fulfilled",(d,p,_,v)=>({payload:d,meta:{...v||{},arg:_,requestId:p,requestStatus:"fulfilled"}})),a=Sn(t+"/pending",(d,p,_)=>({payload:void 0,meta:{..._||{},arg:p,requestId:d,requestStatus:"pending"}})),u=Sn(t+"/rejected",(d,p,_,v,S)=>({payload:v,error:(i&&i.serializeError||hP)(d||"Rejected"),meta:{...S||{},arg:_,requestId:p,rejectedWithValue:!!v,requestStatus:"rejected",aborted:(d==null?void 0:d.name)==="AbortError",condition:(d==null?void 0:d.name)==="ConditionError"}}));function f(d){return(p,_,v)=>{const S=i!=null&&i.idGenerator?i.idGenerator(d):ny(),k=new AbortController;let P,E;function R(g){E=g,k.abort()}const w=async function(){var N,j;let g;try{let b=(N=i==null?void 0:i.condition)==null?void 0:N.call(i,d,{getState:_,extra:v});if(mP(b)&&(b=await b),b===!1||k.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const $=new Promise((I,X)=>{P=()=>{X({name:"AbortError",message:E||"Aborted"})},k.signal.addEventListener("abort",P)});p(a(S,d,(j=i==null?void 0:i.getPendingMeta)==null?void 0:j.call(i,{requestId:S,arg:d},{getState:_,extra:v}))),g=await Promise.race([$,Promise.resolve(n(d,{dispatch:p,getState:_,extra:v,requestId:S,signal:k.signal,abort:R,rejectWithValue:(I,X)=>new gc(I,X),fulfillWithValue:(I,X)=>new Im(I,X)})).then(I=>{if(I instanceof gc)throw I;return I instanceof Im?s(I.payload,S,d,I.meta):s(I,S,d)})])}catch(b){g=b instanceof gc?u(null,S,d,b.payload,b.meta):u(b,S,d)}finally{P&&k.signal.removeEventListener("abort",P)}return i&&!i.dispatchConditionRejection&&u.match(g)&&g.meta.condition||p(g),g}();return Object.assign(w,{abort:R,requestId:S,arg:d,unwrap(){return w.then(pP)}})}}return Object.assign(f,{pending:a,rejected:u,fulfilled:s,settled:fP(u,s),typePrefix:t})}return e.withTypes=()=>e,e})();function pP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function mP(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _P=Symbol.for("rtk-slice-createasyncthunk");function vP(e,t){return`${e}/${t}`}function gP({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[_P];return function(s){const{name:a,reducerPath:u=a}=s;if(!a)throw new Error(ht(11));typeof process<"u";const f=(typeof s.reducers=="function"?s.reducers(wP()):s.reducers)||{},d=Object.keys(f),p={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},_={addCase(y,N){const j=typeof y=="string"?y:y.type;if(!j)throw new Error(ht(12));if(j in p.sliceCaseReducersByType)throw new Error(ht(13));return p.sliceCaseReducersByType[j]=N,_},addMatcher(y,N){return p.sliceMatchers.push({matcher:y,reducer:N}),_},exposeAction(y,N){return p.actionCreators[y]=N,_},exposeCaseReducer(y,N){return p.sliceCaseReducersByName[y]=N,_}};d.forEach(y=>{const N=f[y],j={reducerName:y,type:vP(a,y),createNotation:typeof s.reducers=="function"};SP(N)?PP(j,N,_,t):xP(j,N,_)});function v(){const[y={},N=[],j=void 0]=typeof s.extraReducers=="function"?ty(s.extraReducers):[s.extraReducers],b={...y,...p.sliceCaseReducersByType};return lP(s.initialState,$=>{for(let I in b)$.addCase(I,b[I]);for(let I of p.sliceMatchers)$.addMatcher(I.matcher,I.reducer);for(let I of N)$.addMatcher(I.matcher,I.reducer);j&&$.addDefaultCase(j)})}const S=y=>y,k=new Map;let P;function E(y,N){return P||(P=v()),P(y,N)}function R(){return P||(P=v()),P.getInitialState()}function w(y,N=!1){function j($){let I=$[y];return typeof I>"u"&&N&&(I=R()),I}function b($=S){const I=zm(k,N,{insert:()=>new WeakMap});return zm(I,$,{insert:()=>{const X={};for(const[V,G]of Object.entries(s.selectors??{}))X[V]=yP(G,$,R,N);return X}})}return{reducerPath:y,getSelectors:b,get selectors(){return b(j)},selectSlice:j}}const g={name:a,reducer:E,actions:p.actionCreators,caseReducers:p.sliceCaseReducersByName,getInitialState:R,...w(u),injectInto(y,{reducerPath:N,...j}={}){const b=N??u;return y.inject({reducerPath:b,reducer:E},j),{...g,...w(b,!0)}}};return g}}function yP(e,t,n,i){function s(a,...u){let f=t(a);return typeof f>"u"&&i&&(f=n()),e(f,...u)}return s.unwrapped=e,s}var Ai=gP();function wP(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function xP({type:e,reducerName:t,createNotation:n},i,s){let a,u;if("reducer"in i){if(n&&!EP(i))throw new Error(ht(17));a=i.reducer,u=i.prepare}else a=i;s.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,u?Sn(e,u):Sn(e))}function SP(e){return e._reducerDefinitionType==="asyncThunk"}function EP(e){return e._reducerDefinitionType==="reducerWithPrepare"}function PP({type:e,reducerName:t},n,i,s){if(!s)throw new Error(ht(18));const{payloadCreator:a,fulfilled:u,pending:f,rejected:d,settled:p,options:_}=n,v=s(e,a,_);i.exposeAction(t,v),u&&i.addCase(v.fulfilled,u),f&&i.addCase(v.pending,f),d&&i.addCase(v.rejected,d),p&&i.addMatcher(v.settled,p),i.exposeCaseReducer(t,{fulfilled:u||Hs,pending:f||Hs,rejected:d||Hs,settled:p||Hs})}function Hs(){}var CP=(e,t)=>{if(typeof e!="function")throw new Error(ht(32))},qd="listenerMiddleware",TP=e=>{let{type:t,actionCreator:n,matcher:i,predicate:s,effect:a}=e;if(t)s=Sn(t).match;else if(n)t=n.type,s=n.match;else if(i)s=i;else if(!s)throw new Error(ht(21));return CP(a),{predicate:s,type:t,effect:a}},kP=Object.assign(e=>{const{type:t,predicate:n,effect:i}=TP(e);return{id:ny(),effect:i,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ht(22))}}},{withTypes:()=>kP}),LP=Object.assign(Sn(`${qd}/add`),{withTypes:()=>LP});Sn(`${qd}/removeAll`);var NP=Object.assign(Sn(`${qd}/remove`),{withTypes:()=>NP});function ht(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const OP=EE,Fe=oE,qt=e=>{const t=OP();return O.useMemo(()=>kE(e,t),[])},oa=un("user/checkAuth",async(e,{extra:t})=>{const{data:n}=await t.get(Gt.Login,{headers:{"x-no-toast":"true"}});return n}),Tf=un("user/login",async(e,{extra:t})=>{const{data:n}=await t.post(Gt.Login,e);return n}),kf=un("user/logout",async(e,{extra:t})=>{await t.delete(Gt.Logout)}),Gd="six-cities-token",ry=()=>localStorage.getItem(Gd)??"",MP=e=>{localStorage.setItem(Gd,e)},RP=()=>{localStorage.removeItem(Gd)},zP={authStatus:Je.Unknown,requestStatus:ie.Idle,userInfo:null,userAuthData:null},Ya=Ai({name:"user",initialState:zP,reducers:{setNoAuthStatus:e=>{e.authStatus=Je.NoAuth}},extraReducers:e=>{e.addCase(oa.pending,t=>{t.requestStatus=ie.Loading}),e.addCase(oa.fulfilled,(t,n)=>{t.userInfo=n.payload,t.authStatus=Je.Auth,t.requestStatus=ie.Succeed}),e.addCase(oa.rejected,t=>{t.authStatus=Je.NoAuth,t.requestStatus=ie.Failed}),e.addCase(Tf.fulfilled,(t,n)=>{t.userInfo=n.payload,MP(t.userInfo.token),t.authStatus=Je.Auth,t.requestStatus=ie.Succeed}),e.addCase(Tf.rejected,t=>{t.authStatus=Je.NoAuth,t.requestStatus=ie.Failed}),e.addCase(kf.fulfilled,t=>{RP(),t.userInfo=null,t.authStatus=Je.NoAuth,t.requestStatus=ie.Succeed}),e.addCase(kf.rejected,t=>{t.userInfo=null,t.authStatus=Je.NoAuth,t.requestStatus=ie.Failed})},selectors:{authStatus:e=>e.authStatus,requestStatus:e=>e.requestStatus,userInfo:e=>e.userInfo,userAuthData:e=>e.userAuthData}}),Yd={...Ya.actions,checkAuth:oa,login:Tf,logout:kf},Uo=Ya.selectors;function iy(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;ttypeof e=="number"&&!isNaN(e),Tr=e=>typeof e=="string",_t=e=>typeof e=="function",sa=e=>Tr(e)||_t(e)?e:null,Lf=e=>O.isValidElement(e)||Tr(e)||_t(e)||Zo(e);function IP(e,t,n){n===void 0&&(n=300);const{scrollHeight:i,style:s}=e;requestAnimationFrame(()=>{s.minHeight="initial",s.height=i+"px",s.transition=`all ${n}ms`,requestAnimationFrame(()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(t,n)})})}function Vl(e){let{enter:t,exit:n,appendPosition:i=!1,collapse:s=!0,collapseDuration:a=300}=e;return function(u){let{children:f,position:d,preventExitTransition:p,done:_,nodeRef:v,isIn:S,playToast:k}=u;const P=i?`${t}--${d}`:t,E=i?`${n}--${d}`:n,R=O.useRef(0);return O.useLayoutEffect(()=>{const w=v.current,g=P.split(" "),y=N=>{N.target===v.current&&(k(),w.removeEventListener("animationend",y),w.removeEventListener("animationcancel",y),R.current===0&&N.type!=="animationcancel"&&w.classList.remove(...g))};w.classList.add(...g),w.addEventListener("animationend",y),w.addEventListener("animationcancel",y)},[]),O.useEffect(()=>{const w=v.current,g=()=>{w.removeEventListener("animationend",g),s?IP(w,_,a):_()};S||(p?g():(R.current=1,w.className+=` ${E}`,w.addEventListener("animationend",g)))},[S]),_e.createElement(_e.Fragment,null,f)}}function Am(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const it=new Map;let Ho=[];const Nf=new Set,AP=e=>Nf.forEach(t=>t(e)),oy=()=>it.size>0;function sy(e,t){var n;if(t)return!((n=it.get(t))==null||!n.isToastActive(e));let i=!1;return it.forEach(s=>{s.isToastActive(e)&&(i=!0)}),i}function ay(e,t){Lf(e)&&(oy()||Ho.push({content:e,options:t}),it.forEach(n=>{n.buildToast(e,t)}))}function jm(e,t){it.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function jP(e){const{subscribe:t,getSnapshot:n,setProps:i}=O.useRef(function(a){const u=a.containerId||1;return{subscribe(f){const d=function(_,v,S){let k=1,P=0,E=[],R=[],w=[],g=v;const y=new Map,N=new Set,j=()=>{w=Array.from(y.values()),N.forEach(I=>I())},b=I=>{R=I==null?[]:R.filter(X=>X!==I),j()},$=I=>{const{toastId:X,onOpen:V,updateId:G,children:ue}=I.props,Ve=G==null;I.staleId&&y.delete(I.staleId),y.set(X,I),R=[...R,I.props.toastId].filter(Y=>Y!==I.staleId),j(),S(Am(I,Ve?"added":"updated")),Ve&&_t(V)&&V(O.isValidElement(ue)&&ue.props)};return{id:_,props:g,observe:I=>(N.add(I),()=>N.delete(I)),toggle:(I,X)=>{y.forEach(V=>{X!=null&&X!==V.props.toastId||_t(V.toggle)&&V.toggle(I)})},removeToast:b,toasts:y,clearQueue:()=>{P-=E.length,E=[]},buildToast:(I,X)=>{if((J=>{let{containerId:re,toastId:ee,updateId:te}=J;const oe=re?re!==_:_!==1,ye=y.has(ee)&&te==null;return oe||ye})(X))return;const{toastId:V,updateId:G,data:ue,staleId:Ve,delay:Y}=X,W=()=>{b(V)},F=G==null;F&&P++;const K={...g,style:g.toastStyle,key:k++,...Object.fromEntries(Object.entries(X).filter(J=>{let[re,ee]=J;return ee!=null})),toastId:V,updateId:G,data:ue,closeToast:W,isIn:!1,className:sa(X.className||g.toastClassName),bodyClassName:sa(X.bodyClassName||g.bodyClassName),progressClassName:sa(X.progressClassName||g.progressClassName),autoClose:!X.isLoading&&(T=X.autoClose,U=g.autoClose,T===!1||Zo(T)&&T>0?T:U),deleteToast(){const J=y.get(V),{onClose:re,children:ee}=J.props;_t(re)&&re(O.isValidElement(ee)&&ee.props),S(Am(J,"removed")),y.delete(V),P--,P<0&&(P=0),E.length>0?$(E.shift()):j()}};var T,U;K.closeButton=g.closeButton,X.closeButton===!1||Lf(X.closeButton)?K.closeButton=X.closeButton:X.closeButton===!0&&(K.closeButton=!Lf(g.closeButton)||g.closeButton);let A=I;O.isValidElement(I)&&!Tr(I.type)?A=O.cloneElement(I,{closeToast:W,toastProps:K,data:ue}):_t(I)&&(A=I({closeToast:W,toastProps:K,data:ue}));const H={content:A,props:K,staleId:Ve};g.limit&&g.limit>0&&P>g.limit&&F?E.push(H):Zo(Y)?setTimeout(()=>{$(H)},Y):$(H)},setProps(I){g=I},setToggle:(I,X)=>{y.get(I).toggle=X},isToastActive:I=>R.some(X=>X===I),getSnapshot:()=>g.newestOnTop?w.reverse():w}}(u,a,AP);it.set(u,d);const p=d.observe(f);return Ho.forEach(_=>ay(_.content,_.options)),Ho=[],()=>{p(),it.delete(u)}},setProps(f){var d;(d=it.get(u))==null||d.setProps(f)},getSnapshot(){var f;return(f=it.get(u))==null?void 0:f.getSnapshot()}}}(e)).current;i(e);const s=O.useSyncExternalStore(t,n,n);return{getToastToRender:function(a){if(!s)return[];const u=new Map;return s.forEach(f=>{const{position:d}=f.props;u.has(d)||u.set(d,[]),u.get(d).push(f)}),Array.from(u,f=>a(f[0],f[1]))},isToastActive:sy,count:s==null?void 0:s.length}}function DP(e){const[t,n]=O.useState(!1),[i,s]=O.useState(!1),a=O.useRef(null),u=O.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:f,pauseOnHover:d,closeToast:p,onClick:_,closeOnClick:v}=e;var S,k;function P(){n(!0)}function E(){n(!1)}function R(y){const N=a.current;u.canDrag&&N&&(u.didMove=!0,t&&E(),u.delta=e.draggableDirection==="x"?y.clientX-u.start:y.clientY-u.start,u.start!==y.clientX&&(u.canCloseOnClick=!1),N.style.transform=`translate3d(${e.draggableDirection==="x"?`${u.delta}px, var(--y)`:`0, calc(${u.delta}px + var(--y))`},0)`,N.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance)))}function w(){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",w);const y=a.current;if(u.canDrag&&u.didMove&&y){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),e.closeToast(),void e.collapseAll();y.style.transition="transform 0.2s, opacity 0.2s",y.style.removeProperty("transform"),y.style.removeProperty("opacity")}}(k=it.get((S={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||k.setToggle(S.id,S.fn),O.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||E(),window.addEventListener("focus",P),window.addEventListener("blur",E),()=>{window.removeEventListener("focus",P),window.removeEventListener("blur",E)}},[e.pauseOnFocusLoss]);const g={onPointerDown:function(y){if(e.draggable===!0||e.draggable===y.pointerType){u.didMove=!1,document.addEventListener("pointermove",R),document.addEventListener("pointerup",w);const N=a.current;u.canCloseOnClick=!0,u.canDrag=!0,N.style.transition="none",e.draggableDirection==="x"?(u.start=y.clientX,u.removalDistance=N.offsetWidth*(e.draggablePercent/100)):(u.start=y.clientY,u.removalDistance=N.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(y){const{top:N,bottom:j,left:b,right:$}=a.current.getBoundingClientRect();y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&y.clientX>=b&&y.clientX<=$&&y.clientY>=N&&y.clientY<=j?E():P()}};return f&&d&&(g.onMouseEnter=E,e.stacked||(g.onMouseLeave=P)),v&&(g.onClick=y=>{_&&_(y),u.canCloseOnClick&&p()}),{playToast:P,pauseToast:E,isRunning:t,preventExitTransition:i,toastRef:a,eventHandlers:g}}function bP(e){let{delay:t,isRunning:n,closeToast:i,type:s="default",hide:a,className:u,style:f,controlledProgress:d,progress:p,rtl:_,isIn:v,theme:S}=e;const k=a||d&&p===0,P={...f,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};d&&(P.transform=`scaleX(${p})`);const E=Kn("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${S}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":_}),R=_t(u)?u({rtl:_,type:s,defaultClassName:E}):Kn(E,u),w={[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]:d&&p<1?null:()=>{v&&i()}};return _e.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":k},_e.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${S} Toastify__progress-bar--${s}`}),_e.createElement("div",{role:"progressbar","aria-hidden":k?"true":"false","aria-label":"notification timer",className:R,style:P,...w}))}let BP=1;const ly=()=>""+BP++;function FP(e){return e&&(Tr(e.toastId)||Zo(e.toastId))?e.toastId:ly()}function xo(e,t){return ay(e,t),t.toastId}function Qa(e,t){return{...t,type:t&&t.type||e,toastId:FP(t)}}function Ws(e){return(t,n)=>xo(t,Qa(e,n))}function de(e,t){return xo(e,Qa("default",t))}de.loading=(e,t)=>xo(e,Qa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),de.promise=function(e,t,n){let i,{pending:s,error:a,success:u}=t;s&&(i=Tr(s)?de.loading(s,n):de.loading(s.render,{...n,...s}));const f={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(_,v,S)=>{if(v==null)return void de.dismiss(i);const k={type:_,...f,...n,data:S},P=Tr(v)?{render:v}:v;return i?de.update(i,{...k,...P}):de(P.render,{...k,...P}),S},p=_t(e)?e():e;return p.then(_=>d("success",u,_)).catch(_=>d("error",a,_)),p},de.success=Ws("success"),de.info=Ws("info"),de.error=Ws("error"),de.warning=Ws("warning"),de.warn=de.warning,de.dark=(e,t)=>xo(e,Qa("default",{theme:"dark",...t})),de.dismiss=function(e){(function(t){var n;if(oy()){if(t==null||Tr(n=t)||Zo(n))it.forEach(i=>{i.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const i=it.get(t.containerId);i?i.removeToast(t.id):it.forEach(s=>{s.removeToast(t.id)})}}else Ho=Ho.filter(i=>t!=null&&i.options.toastId!==t)})(e)},de.clearWaitingQueue=function(e){e===void 0&&(e={}),it.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},de.isActive=sy,de.update=function(e,t){t===void 0&&(t={});const n=((i,s)=>{var a;let{containerId:u}=s;return(a=it.get(u||1))==null?void 0:a.toasts.get(i)})(e,t);if(n){const{props:i,content:s}=n,a={delay:100,...i,...t,toastId:t.toastId||e,updateId:ly()};a.toastId!==e&&(a.staleId=e);const u=a.render||s;delete a.render,xo(u,a)}},de.done=e=>{de.update(e,{progress:1})},de.onChange=function(e){return Nf.add(e),()=>{Nf.delete(e)}},de.play=e=>jm(!0,e),de.pause=e=>jm(!1,e);const $P=typeof window<"u"?O.useLayoutEffect:O.useEffect,Vs=e=>{let{theme:t,type:n,isLoading:i,...s}=e;return _e.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...s})},yc={info:function(e){return _e.createElement(Vs,{...e},_e.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return _e.createElement(Vs,{...e},_e.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return _e.createElement(Vs,{...e},_e.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return _e.createElement(Vs,{...e},_e.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return _e.createElement("div",{className:"Toastify__spinner"})}},UP=e=>{const{isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:s,playToast:a}=DP(e),{closeButton:u,children:f,autoClose:d,onClick:p,type:_,hideProgressBar:v,closeToast:S,transition:k,position:P,className:E,style:R,bodyClassName:w,bodyStyle:g,progressClassName:y,progressStyle:N,updateId:j,role:b,progress:$,rtl:I,toastId:X,deleteToast:V,isIn:G,isLoading:ue,closeOnClick:Ve,theme:Y}=e,W=Kn("Toastify__toast",`Toastify__toast-theme--${Y}`,`Toastify__toast--${_}`,{"Toastify__toast--rtl":I},{"Toastify__toast--close-on-click":Ve}),F=_t(E)?E({rtl:I,position:P,type:_,defaultClassName:W}):Kn(W,E),K=function(H){let{theme:J,type:re,isLoading:ee,icon:te}=H,oe=null;const ye={theme:J,type:re};return te===!1||(_t(te)?oe=te({...ye,isLoading:ee}):O.isValidElement(te)?oe=O.cloneElement(te,ye):ee?oe=yc.spinner():(Ye=>Ye in yc)(re)&&(oe=yc[re](ye))),oe}(e),T=!!$||!d,U={closeToast:S,type:_,theme:Y};let A=null;return u===!1||(A=_t(u)?u(U):O.isValidElement(u)?O.cloneElement(u,U):function(H){let{closeToast:J,theme:re,ariaLabel:ee="close"}=H;return _e.createElement("button",{className:`Toastify__close-button Toastify__close-button--${re}`,type:"button",onClick:te=>{te.stopPropagation(),J(te)},"aria-label":ee},_e.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},_e.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(U)),_e.createElement(k,{isIn:G,done:V,position:P,preventExitTransition:n,nodeRef:i,playToast:a},_e.createElement("div",{id:X,onClick:p,"data-in":G,className:F,...s,style:R,ref:i},_e.createElement("div",{...G&&{role:b},className:_t(w)?w({type:_}):Kn("Toastify__toast-body",w),style:g},K!=null&&_e.createElement("div",{className:Kn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!ue})},K),_e.createElement("div",null,f)),A,_e.createElement(bP,{...j&&!T?{key:`pb-${j}`}:{},rtl:I,theme:Y,delay:d,isRunning:t,isIn:G,closeToast:S,hide:v,type:_,style:N,className:y,controlledProgress:T,progress:$||0})))},Kl=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},ZP=Vl(Kl("bounce",!0));Vl(Kl("slide",!0));Vl(Kl("zoom"));Vl(Kl("flip"));const HP={position:"top-right",transition:ZP,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function WP(e){let t={...HP,...e};const n=e.stacked,[i,s]=O.useState(!0),a=O.useRef(null),{getToastToRender:u,isToastActive:f,count:d}=jP(t),{className:p,style:_,rtl:v,containerId:S}=t;function k(E){const R=Kn("Toastify__toast-container",`Toastify__toast-container--${E}`,{"Toastify__toast-container--rtl":v});return _t(p)?p({position:E,rtl:v,defaultClassName:R}):Kn(R,sa(p))}function P(){n&&(s(!0),de.play())}return $P(()=>{if(n){var E;const R=a.current.querySelectorAll('[data-in="true"]'),w=12,g=(E=t.position)==null?void 0:E.includes("top");let y=0,N=0;Array.from(R).reverse().forEach((j,b)=>{const $=j;$.classList.add("Toastify__toast--stacked"),b>0&&($.dataset.collapsed=`${i}`),$.dataset.pos||($.dataset.pos=g?"top":"bot");const I=y*(i?.2:1)+(i?0:w*b);$.style.setProperty("--y",`${g?I:-1*I}px`),$.style.setProperty("--g",`${w}`),$.style.setProperty("--s",""+(1-(i?N:0))),y+=$.offsetHeight,N+=.025})}},[i,d,n]),_e.createElement("div",{ref:a,className:"Toastify",id:S,onMouseEnter:()=>{n&&(s(!1),de.pause())},onMouseLeave:P},u((E,R)=>{const w=R.length?{..._}:{..._,pointerEvents:"none"};return _e.createElement("div",{className:k(E),style:w,key:`container-${E}`},R.map(g=>{let{content:y,props:N}=g;return _e.createElement(UP,{...N,stacked:n,collapseAll:P,isIn:f(N.toastId,N.containerId),style:N.style,key:`toast-${N.key}`},y)}))}))}const aa=un("data/fetchOffers",async(e,{extra:t})=>{const{data:n}=await t.get(Gt.Offers);return n}),la=un("data/fetchOfferFullInfo",async(e,{extra:t})=>{const{data:n}=await t.get(`${Gt.Offers}/${e}`);return n}),ua=un("data/fetchOffersNear",async(e,{extra:t})=>{const{data:n}=await t.get(`${Gt.Offers}/${e}/nearby`);return n}),ca=un("data/fetchFavorites",async(e,{extra:t})=>{const{data:n}=await t.get(Gt.Favorite);return n}),fa=un("data/toggleFavorite",async({offerId:e,status:t},{extra:n})=>{await n.post(`${Gt.Favorite}/${e}/${t}`)}),VP={favorites:[],statusFetchFavorites:ie.Idle,statusToggleFavorite:ie.Idle},Xa=Ai({name:"favorites",initialState:VP,reducers:{},extraReducers:e=>{e.addCase(ca.pending,t=>{t.statusFetchFavorites=ie.Loading}),e.addCase(ca.fulfilled,(t,n)=>{t.favorites=n.payload,t.statusFetchFavorites=ie.Succeed}),e.addCase(ca.rejected,t=>{t.statusFetchFavorites=ie.Failed}),e.addCase(fa.pending,t=>{t.statusToggleFavorite=ie.Loading}),e.addCase(fa.fulfilled,t=>{t.statusToggleFavorite=ie.Succeed}),e.addCase(fa.rejected,t=>{t.statusToggleFavorite=ie.Failed})},selectors:{favorites:e=>e.favorites,statusFetchFavorites:e=>e.statusFetchFavorites,statusToggleFavorite:e=>e.statusToggleFavorite}}),Qd={...Xa.actions,fetchFavorites:ca,toggleFavorite:fa},Wo=Xa.selectors;function KP(){const e=Fe(Uo.authStatus),t=Fe(Uo.userInfo),{logout:n}=qt(Yd),{fetchFavorites:i}=qt(Qd),s=Fe(Wo.statusToggleFavorite);O.useEffect(()=>{e===Je.Auth&&(s===ie.Succeed||s===ie.Idle)&&i()},[s]);const a=Fe(Wo.favorites).length,u=async p=>{p.preventDefault(),await n().unwrap().catch(_=>{de.warning(_.message)})},f=x.jsxs(x.Fragment,{children:[x.jsx("li",{className:"header__nav-item user",children:x.jsxs(Ln,{to:tt.Favorites,className:"header__nav-link header__nav-link--profile",children:[x.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper",children:(t==null?void 0:t.avatarUrl)&&x.jsx("img",{className:"user__avatar",src:t.avatarUrl,alt:"avatar"})}),(t==null?void 0:t.email)&&x.jsx("span",{className:"header__user-name user__name",children:t.email}),x.jsx("span",{className:"header__favorite-count",children:a})]})}),x.jsx("li",{className:"header__nav-item",children:x.jsx("a",{className:"header__nav-link",href:"#",onClick:p=>{u(p).catch(_=>de.warning(_.message))},children:x.jsx("span",{className:"header__signout",children:"Sign out"})})})]}),d=x.jsx("li",{className:"header__nav-item user",children:x.jsxs(Ln,{to:tt.Login,className:"header__nav-link header__nav-link--profile",children:[x.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),x.jsx("span",{className:"header__login",children:"Sign in"})]})});return x.jsx("header",{className:"header",children:x.jsx("div",{className:"container",children:x.jsxs("div",{className:"header__wrapper",children:[x.jsx("div",{className:"header__left",children:x.jsx(Dd,{})}),x.jsx("nav",{className:"header__nav",children:x.jsx("ul",{className:"header__nav-list",children:e===Je.Auth?f:d})})]})})})}const ql=O.memo(KP),Ir=(...e)=>e.filter(Boolean).join(" ");function qP({cities:e=br}){return e.map(t=>x.jsx(wS,{to:tt.Root+t.slug,className:({isActive:n})=>Ir("locations__item-link tabs__item",n&&"tabs__item--active"),children:x.jsx("span",{children:t.name})},t.slug))}const GP=O.memo(qP),YP=()=>{const e=document.title;return()=>{document.title=e}};function Jo(e){O.useEffect(YP,[]),O.useEffect(()=>{document.title=`${e} | 6 cities`},[e])}var Of={exports:{}};/* @preserve + */var Ud=Symbol.for("react.element"),Zd=Symbol.for("react.portal"),Rl=Symbol.for("react.fragment"),zl=Symbol.for("react.strict_mode"),Il=Symbol.for("react.profiler"),Al=Symbol.for("react.provider"),jl=Symbol.for("react.context"),pE=Symbol.for("react.server_context"),Dl=Symbol.for("react.forward_ref"),bl=Symbol.for("react.suspense"),Bl=Symbol.for("react.suspense_list"),Fl=Symbol.for("react.memo"),$l=Symbol.for("react.lazy"),mE=Symbol.for("react.offscreen"),bg;bg=Symbol.for("react.module.reference");function At(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ud:switch(e=e.type,e){case Rl:case Il:case zl:case bl:case Bl:return e;default:switch(e=e&&e.$$typeof,e){case pE:case jl:case Dl:case $l:case Fl:case Al:return e;default:return t}}case Zd:return t}}}we.ContextConsumer=jl;we.ContextProvider=Al;we.Element=Ud;we.ForwardRef=Dl;we.Fragment=Rl;we.Lazy=$l;we.Memo=Fl;we.Portal=Zd;we.Profiler=Il;we.StrictMode=zl;we.Suspense=bl;we.SuspenseList=Bl;we.isAsyncMode=function(){return!1};we.isConcurrentMode=function(){return!1};we.isContextConsumer=function(e){return At(e)===jl};we.isContextProvider=function(e){return At(e)===Al};we.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ud};we.isForwardRef=function(e){return At(e)===Dl};we.isFragment=function(e){return At(e)===Rl};we.isLazy=function(e){return At(e)===$l};we.isMemo=function(e){return At(e)===Fl};we.isPortal=function(e){return At(e)===Zd};we.isProfiler=function(e){return At(e)===Il};we.isStrictMode=function(e){return At(e)===zl};we.isSuspense=function(e){return At(e)===bl};we.isSuspenseList=function(e){return At(e)===Bl};we.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Rl||e===Il||e===zl||e===bl||e===Bl||e===mE||typeof e=="object"&&e!==null&&(e.$$typeof===$l||e.$$typeof===Fl||e.$$typeof===Al||e.$$typeof===jl||e.$$typeof===Dl||e.$$typeof===bg||e.getModuleId!==void 0)};we.typeOf=At;function _E(){const e=JS();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 Sm={notify(){},get:()=>[]};function vE(e,t){let n,i=Sm,s=0,a=!1;function u(E){_();const R=i.subscribe(E);let x=!1;return()=>{x||(x=!0,R(),v())}}function f(){i.notify()}function d(){P.onStateChange&&P.onStateChange()}function p(){return a}function _(){s++,n||(n=t?t.addNestedSub(d):e.subscribe(d),i=_E())}function v(){s--,n&&s===0&&(n(),n=void 0,i.clear(),i=Sm)}function S(){a||(a=!0,_())}function k(){a&&(a=!1,v())}const P={addNestedSub:u,notifyNestedSubs:f,handleChangeWrapper:d,isSubscribed:p,trySubscribe:S,tryUnsubscribe:k,getListeners:()=>i};return P}const gE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yE=gE?O.useLayoutEffect:O.useEffect;function wE({store:e,context:t,children:n,serverState:i,stabilityCheck:s="once",noopCheck:a="once"}){const u=O.useMemo(()=>{const p=vE(e);return{store:e,subscription:p,getServerState:i?()=>i:void 0,stabilityCheck:s,noopCheck:a}},[e,i,s,a]),f=O.useMemo(()=>e.getState(),[e]);yE(()=>{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 d=t||sr;return O.createElement(d.Provider,{value:u},n)}function Bg(e=sr){const t=e===sr?Rg:bd(e);return function(){const{store:i}=t();return i}}const xE=Bg();function SE(e=sr){const t=e===sr?xE:Bg(e);return function(){return t().dispatch}}const EE=SE();nE(YS.useSyncExternalStoreWithSelector);XS(mg.unstable_batchedUpdates);function Ue(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var PE=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")(),Em=PE,mc=()=>Math.random().toString(36).substring(7).split("").join("."),CE={INIT:`@@redux/INIT${mc()}`,REPLACE:`@@redux/REPLACE${mc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${mc()}`},Wa=CE;function Hd(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Fg(e,t,n){if(typeof e!="function")throw new Error(Ue(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ue(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ue(1));return n(Fg)(e,t)}let i=e,s=t,a=new Map,u=a,f=0,d=!1;function p(){u===a&&(u=new Map,a.forEach((R,x)=>{u.set(x,R)}))}function _(){if(d)throw new Error(Ue(3));return s}function v(R){if(typeof R!="function")throw new Error(Ue(4));if(d)throw new Error(Ue(5));let x=!0;p();const g=f++;return u.set(g,R),function(){if(x){if(d)throw new Error(Ue(6));x=!1,p(),u.delete(g),a=null}}}function S(R){if(!Hd(R))throw new Error(Ue(7));if(typeof R.type>"u")throw new Error(Ue(8));if(typeof R.type!="string")throw new Error(Ue(17));if(d)throw new Error(Ue(9));try{d=!0,s=i(s,R)}finally{d=!1}return(a=u).forEach(g=>{g()}),R}function k(R){if(typeof R!="function")throw new Error(Ue(10));i=R,S({type:Wa.REPLACE})}function P(){const R=v;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(Ue(11));function g(){const N=x;N.next&&N.next(_())}return g(),{unsubscribe:R(g)}},[Em](){return this}}}return S({type:Wa.INIT}),{dispatch:S,subscribe:v,getState:_,replaceReducer:k,[Em]:P}}function TE(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Wa.INIT})>"u")throw new Error(Ue(12));if(typeof n(void 0,{type:Wa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ue(13))})}function $g(e){const t=Object.keys(e),n={};for(let a=0;a"u")throw f&&f.type,new Error(Ue(14));p[v]=P,d=d||P!==k}return d=d||i.length!==Object.keys(u).length,d?p:u}}function Pm(e,t){return function(...n){return t(e.apply(this,n))}}function kE(e,t){if(typeof e=="function")return Pm(e,t);if(typeof e!="object"||e===null)throw new Error(Ue(16));const n={};for(const i in e){const s=e[i];typeof s=="function"&&(n[i]=Pm(s,t))}return n}function Va(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...i)=>t(n(...i)))}function LE(...e){return t=>(n,i)=>{const s=t(n,i);let a=()=>{throw new Error(Ue(15))};const u={getState:s.getState,dispatch:(d,...p)=>a(d,...p)},f=e.map(d=>d(u));return a=Va(...f)(s.dispatch),{...s,dispatch:a}}}function NE(e){return Hd(e)&&"type"in e&&typeof e.type=="string"}var Ug=Symbol.for("immer-nothing"),Cm=Symbol.for("immer-draftable"),yt=Symbol.for("immer-state");function Ht(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Li=Object.getPrototypeOf;function ar(e){return!!e&&!!e[yt]}function Nn(e){var t;return e?Zg(e)||Array.isArray(e)||!!e[Cm]||!!((t=e.constructor)!=null&&t[Cm])||Zl(e)||Hl(e):!1}var OE=Object.prototype.constructor.toString();function Zg(e){if(!e||typeof e!="object")return!1;const t=Li(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===OE}function Ka(e,t){Ul(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function Ul(e){const t=e[yt];return t?t.type_:Array.isArray(e)?1:Zl(e)?2:Hl(e)?3:0}function wf(e,t){return Ul(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hg(e,t,n){const i=Ul(e);i===2?e.set(t,n):i===3?e.add(n):e[t]=n}function ME(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zl(e){return e instanceof Map}function Hl(e){return e instanceof Set}function xr(e){return e.copy_||e.base_}function xf(e,t){if(Zl(e))return new Map(e);if(Hl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Zg(e))return Li(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[yt];let i=Reflect.ownKeys(n);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=RE),Object.freeze(e),t&&Object.entries(e).forEach(([n,i])=>Wd(i,!0))),e}function RE(){Ht(2)}function Wl(e){return Object.isFrozen(e)}var zE={};function Ir(e){const t=zE[e];return t||Ht(0,e),t}var Fo;function Wg(){return Fo}function IE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Tm(e,t){t&&(Ir("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Sf(e){Ef(e),e.drafts_.forEach(AE),e.drafts_=null}function Ef(e){e===Fo&&(Fo=e.parent_)}function km(e){return Fo=IE(Fo,e)}function AE(e){const t=e[yt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Lm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[yt].modified_&&(Sf(t),Ht(4)),Nn(e)&&(e=qa(t,e),t.parent_||Ga(t,e)),t.patches_&&Ir("Patches").generateReplacementPatches_(n[yt].base_,e,t.patches_,t.inversePatches_)):e=qa(t,n,[]),Sf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ug?e:void 0}function qa(e,t,n){if(Wl(t))return t;const i=t[yt];if(!i)return Ka(t,(s,a)=>Nm(e,i,t,s,a,n)),t;if(i.scope_!==e)return t;if(!i.modified_)return Ga(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const s=i.copy_;let a=s,u=!1;i.type_===3&&(a=new Set(s),s.clear(),u=!0),Ka(a,(f,d)=>Nm(e,i,s,f,d,n,u)),Ga(e,s,!1),n&&e.patches_&&Ir("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function Nm(e,t,n,i,s,a,u){if(ar(s)){const f=a&&t&&t.type_!==3&&!wf(t.assigned_,i)?a.concat(i):void 0,d=qa(e,s,f);if(Hg(n,i,d),ar(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Nn(s)&&!Wl(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;qa(e,s),(!t||!t.scope_.parent_)&&typeof i!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,i)&&Ga(e,s)}}function Ga(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wd(t,n)}function jE(e,t){const n=Array.isArray(e),i={type_:n?1:0,scope_:t?t.scope_:Wg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=i,a=Vd;n&&(s=[i],a=$o);const{revoke:u,proxy:f}=Proxy.revocable(s,a);return i.draft_=f,i.revoke_=u,f}var Vd={get(e,t){if(t===yt)return e;const n=xr(e);if(!wf(n,t))return DE(e,n,t);const i=n[t];return e.finalized_||!Nn(i)?i:i===_c(e.base_,t)?(vc(e),e.copy_[t]=Cf(i,e)):i},has(e,t){return t in xr(e)},ownKeys(e){return Reflect.ownKeys(xr(e))},set(e,t,n){const i=Vg(xr(e),t);if(i!=null&&i.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){const s=_c(xr(e),t),a=s==null?void 0:s[yt];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(ME(n,s)&&(n!==void 0||wf(e.base_,t)))return!0;vc(e),Pf(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return _c(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,vc(e),Pf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=xr(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:i.enumerable,value:n[t]}},defineProperty(){Ht(11)},getPrototypeOf(e){return Li(e.base_)},setPrototypeOf(){Ht(12)}},$o={};Ka(Vd,(e,t)=>{$o[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$o.deleteProperty=function(e,t){return $o.set.call(this,e,t,void 0)};$o.set=function(e,t,n){return Vd.set.call(this,e[0],t,n,e[0])};function _c(e,t){const n=e[yt];return(n?xr(n):e)[t]}function DE(e,t,n){var s;const i=Vg(t,n);return i?"value"in i?i.value:(s=i.get)==null?void 0:s.call(e.draft_):void 0}function Vg(e,t){if(!(t in e))return;let n=Li(e);for(;n;){const i=Object.getOwnPropertyDescriptor(n,t);if(i)return i;n=Li(n)}}function Pf(e){e.modified_||(e.modified_=!0,e.parent_&&Pf(e.parent_))}function vc(e){e.copy_||(e.copy_=xf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var bE=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,i)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...p){return u.produce(d,_=>n.call(this,_,...p))}}typeof n!="function"&&Ht(6),i!==void 0&&typeof i!="function"&&Ht(7);let s;if(Nn(t)){const a=km(this),u=Cf(t,void 0);let f=!0;try{s=n(u),f=!1}finally{f?Sf(a):Ef(a)}return Tm(a,i),Lm(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Ug&&(s=void 0),this.autoFreeze_&&Wd(s,!0),i){const a=[],u=[];Ir("Patches").generateReplacementPatches_(t,s,a,u),i(a,u)}return s}else Ht(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...f)=>this.produceWithPatches(u,d=>t(d,...f));let i,s;return[this.produce(t,n,(u,f)=>{i=u,s=f}),i,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Nn(e)||Ht(8),ar(e)&&(e=Kg(e));const t=km(this),n=Cf(e,void 0);return n[yt].isManual_=!0,Ef(t),n}finishDraft(e,t){const n=e&&e[yt];(!n||!n.isManual_)&&Ht(9);const{scope_:i}=n;return Tm(i,t),Lm(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const i=Ir("Patches").applyPatches_;return ar(e)?i(e,t):this.produce(e,s=>i(s,t))}};function Cf(e,t){const n=Zl(e)?Ir("MapSet").proxyMap_(e,t):Hl(e)?Ir("MapSet").proxySet_(e,t):jE(e,t);return(t?t.scope_:Wg()).drafts_.push(n),n}function Kg(e){return ar(e)||Ht(10,e),qg(e)}function qg(e){if(!Nn(e)||Wl(e))return e;const t=e[yt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=xf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=xf(e,!0);return Ka(n,(i,s)=>{Hg(n,i,qg(s))}),t&&(t.finalized_=!1),n}var wt=new bE,Gg=wt.produce;wt.produceWithPatches.bind(wt);wt.setAutoFreeze.bind(wt);wt.setUseStrictShallowCopy.bind(wt);wt.applyPatches.bind(wt);wt.createDraft.bind(wt);wt.finishDraft.bind(wt);function BE(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function FE(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function $E(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${n}]`)}}var Om=e=>Array.isArray(e)?e:[e];function UE(e){const t=Array.isArray(e[0])?e[0]:e;return $E(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ZE(e,t){const n=[],{length:i}=e;for(let s=0;s{n=Zs(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}function Yg(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...s)=>{let a=0,u=0,f,d={},p=s.pop();typeof p=="object"&&(d=p,p=s.pop()),BE(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);const _={...n,...d},{memoize:v,memoizeOptions:S=[],argsMemoize:k=Kd,argsMemoizeOptions:P=[],devModeChecks:E={}}=_,R=Om(S),x=Om(P),g=UE(s),y=v(function(){return a++,p.apply(null,arguments)},...R),N=k(function(){u++;const b=ZE(g,arguments);return f=y.apply(null,b),f},...x);return Object.assign(N,{resultFunc:p,memoizedResultFunc:y,dependencies:g,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>f,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:v,argsMemoize:k})};return Object.assign(i,{withTypes:()=>i}),i}var Qg=Yg(Kd),KE=Object.assign((e,t=Qg)=>{FE(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),i=n.map(a=>e[a]);return t(i,(...a)=>a.reduce((u,f,d)=>(u[n[d]]=f,u),{}))},{withTypes:()=>KE});function Xg(e){return({dispatch:n,getState:i})=>s=>a=>typeof a=="function"?a(n,i,e):s(a)}var qE=Xg(),GE=Xg,YE=(...e)=>{const t=Yg(...e),n=Object.assign((...i)=>{const s=t(...i),a=(u,...f)=>s(ar(u)?Kg(u):u,...f);return Object.assign(a,s),a},{withTypes:()=>n});return n};YE(Kd);var QE=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Va:Va.apply(null,arguments)},XE=e=>e&&typeof e.match=="function";function En(e,t){function n(...i){if(t){let s=t(...i);if(!s)throw new Error(ht(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:i[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=i=>NE(i)&&i.type===e,n}var Jg=class co extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,co.prototype)}static get[Symbol.species](){return co}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new co(...t[0].concat(this)):new co(...t.concat(this))}};function Rm(e){return Nn(e)?Gg(e,()=>{}):e}function zm(e,t,n){if(e.has(t)){let s=e.get(t);return n.update&&(s=n.update(s,t,e),e.set(t,s)),s}if(!n.insert)throw new Error(ht(10));const i=n.insert(t,e);return e.set(t,i),i}function JE(e){return typeof e=="boolean"}var eP=()=>function(t){const{thunk:n=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:a=!0}=t??{};let u=new Jg;return n&&(JE(n)?u.push(qE):u.push(GE(n.extraArgument))),u},tP="RTK_autoBatch",ey=e=>t=>{setTimeout(t,e)},nP=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ey(10),rP=(e={type:"raf"})=>t=>(...n)=>{const i=t(...n);let s=!0,a=!1,u=!1;const f=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?nP:e.type==="callback"?e.queueNotification:ey(e.timeout),p=()=>{u=!1,a&&(a=!1,f.forEach(_=>_()))};return Object.assign({},i,{subscribe(_){const v=()=>s&&_(),S=i.subscribe(v);return f.add(_),()=>{S(),f.delete(_)}},dispatch(_){var v;try{return s=!((v=_==null?void 0:_.meta)!=null&&v[tP]),a=!s,a&&(u||(u=!0,d(p))),i.dispatch(_)}finally{s=!0}}})},iP=e=>function(n){const{autoBatch:i=!0}=n??{};let s=new Jg(e);return i&&s.push(rP(typeof i=="object"?i:void 0)),s},oP=!0;function sP(e){const t=eP(),{reducer:n=void 0,middleware:i,devTools:s=!0,preloadedState:a=void 0,enhancers:u=void 0}=e||{};let f;if(typeof n=="function")f=n;else if(Hd(n))f=$g(n);else throw new Error(ht(1));let d;typeof i=="function"?d=i(t):d=t();let p=Va;s&&(p=QE({trace:!oP,...typeof s=="object"&&s}));const _=LE(...d),v=iP(_);let S=typeof u=="function"?u(v):v();const k=p(...S);return Fg(f,a,k)}function ty(e){const t={},n=[];let i;const s={addCase(a,u){const f=typeof a=="string"?a:a.type;if(!f)throw new Error(ht(28));if(f in t)throw new Error(ht(29));return t[f]=u,s},addMatcher(a,u){return n.push({matcher:a,reducer:u}),s},addDefaultCase(a){return i=a,s}};return e(s),[t,n,i]}function aP(e){return typeof e=="function"}function lP(e,t){let[n,i,s]=ty(t),a;if(aP(e))a=()=>Rm(e());else{const f=Rm(e);a=()=>f}function u(f=a(),d){let p=[n[d.type],...i.filter(({matcher:_})=>_(d)).map(({reducer:_})=>_)];return p.filter(_=>!!_).length===0&&(p=[s]),p.reduce((_,v)=>{if(v)if(ar(_)){const k=v(_,d);return k===void 0?_:k}else{if(Nn(_))return Gg(_,S=>v(S,d));{const S=v(_,d);if(S===void 0){if(_===null)return _;throw new Error(ht(9))}return S}}return _},f)}return u.getInitialState=a,u}var uP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ny=(e=21)=>{let t="",n=e;for(;n--;)t+=uP[Math.random()*64|0];return t},cP=(e,t)=>XE(e)?e.match(t):e(t);function fP(...e){return t=>e.some(n=>cP(n,t))}var dP=["name","message","stack","code"],gc=class{constructor(e,t){Fu(this,"_type");this.payload=e,this.meta=t}},Im=class{constructor(e,t){Fu(this,"_type");this.payload=e,this.meta=t}},hP=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of dP)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},cn=(()=>{function e(t,n,i){const s=En(t+"/fulfilled",(d,p,_,v)=>({payload:d,meta:{...v||{},arg:_,requestId:p,requestStatus:"fulfilled"}})),a=En(t+"/pending",(d,p,_)=>({payload:void 0,meta:{..._||{},arg:p,requestId:d,requestStatus:"pending"}})),u=En(t+"/rejected",(d,p,_,v,S)=>({payload:v,error:(i&&i.serializeError||hP)(d||"Rejected"),meta:{...S||{},arg:_,requestId:p,rejectedWithValue:!!v,requestStatus:"rejected",aborted:(d==null?void 0:d.name)==="AbortError",condition:(d==null?void 0:d.name)==="ConditionError"}}));function f(d){return(p,_,v)=>{const S=i!=null&&i.idGenerator?i.idGenerator(d):ny(),k=new AbortController;let P,E;function R(g){E=g,k.abort()}const x=async function(){var N,j;let g;try{let b=(N=i==null?void 0:i.condition)==null?void 0:N.call(i,d,{getState:_,extra:v});if(mP(b)&&(b=await b),b===!1||k.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const $=new Promise((I,X)=>{P=()=>{X({name:"AbortError",message:E||"Aborted"})},k.signal.addEventListener("abort",P)});p(a(S,d,(j=i==null?void 0:i.getPendingMeta)==null?void 0:j.call(i,{requestId:S,arg:d},{getState:_,extra:v}))),g=await Promise.race([$,Promise.resolve(n(d,{dispatch:p,getState:_,extra:v,requestId:S,signal:k.signal,abort:R,rejectWithValue:(I,X)=>new gc(I,X),fulfillWithValue:(I,X)=>new Im(I,X)})).then(I=>{if(I instanceof gc)throw I;return I instanceof Im?s(I.payload,S,d,I.meta):s(I,S,d)})])}catch(b){g=b instanceof gc?u(null,S,d,b.payload,b.meta):u(b,S,d)}finally{P&&k.signal.removeEventListener("abort",P)}return i&&!i.dispatchConditionRejection&&u.match(g)&&g.meta.condition||p(g),g}();return Object.assign(x,{abort:R,requestId:S,arg:d,unwrap(){return x.then(pP)}})}}return Object.assign(f,{pending:a,rejected:u,fulfilled:s,settled:fP(u,s),typePrefix:t})}return e.withTypes=()=>e,e})();function pP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function mP(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _P=Symbol.for("rtk-slice-createasyncthunk");function vP(e,t){return`${e}/${t}`}function gP({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[_P];return function(s){const{name:a,reducerPath:u=a}=s;if(!a)throw new Error(ht(11));typeof process<"u";const f=(typeof s.reducers=="function"?s.reducers(wP()):s.reducers)||{},d=Object.keys(f),p={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},_={addCase(y,N){const j=typeof y=="string"?y:y.type;if(!j)throw new Error(ht(12));if(j in p.sliceCaseReducersByType)throw new Error(ht(13));return p.sliceCaseReducersByType[j]=N,_},addMatcher(y,N){return p.sliceMatchers.push({matcher:y,reducer:N}),_},exposeAction(y,N){return p.actionCreators[y]=N,_},exposeCaseReducer(y,N){return p.sliceCaseReducersByName[y]=N,_}};d.forEach(y=>{const N=f[y],j={reducerName:y,type:vP(a,y),createNotation:typeof s.reducers=="function"};SP(N)?PP(j,N,_,t):xP(j,N,_)});function v(){const[y={},N=[],j=void 0]=typeof s.extraReducers=="function"?ty(s.extraReducers):[s.extraReducers],b={...y,...p.sliceCaseReducersByType};return lP(s.initialState,$=>{for(let I in b)$.addCase(I,b[I]);for(let I of p.sliceMatchers)$.addMatcher(I.matcher,I.reducer);for(let I of N)$.addMatcher(I.matcher,I.reducer);j&&$.addDefaultCase(j)})}const S=y=>y,k=new Map;let P;function E(y,N){return P||(P=v()),P(y,N)}function R(){return P||(P=v()),P.getInitialState()}function x(y,N=!1){function j($){let I=$[y];return typeof I>"u"&&N&&(I=R()),I}function b($=S){const I=zm(k,N,{insert:()=>new WeakMap});return zm(I,$,{insert:()=>{const X={};for(const[V,G]of Object.entries(s.selectors??{}))X[V]=yP(G,$,R,N);return X}})}return{reducerPath:y,getSelectors:b,get selectors(){return b(j)},selectSlice:j}}const g={name:a,reducer:E,actions:p.actionCreators,caseReducers:p.sliceCaseReducersByName,getInitialState:R,...x(u),injectInto(y,{reducerPath:N,...j}={}){const b=N??u;return y.inject({reducerPath:b,reducer:E},j),{...g,...x(b,!0)}}};return g}}function yP(e,t,n,i){function s(a,...u){let f=t(a);return typeof f>"u"&&i&&(f=n()),e(f,...u)}return s.unwrapped=e,s}var Ai=gP();function wP(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function xP({type:e,reducerName:t,createNotation:n},i,s){let a,u;if("reducer"in i){if(n&&!EP(i))throw new Error(ht(17));a=i.reducer,u=i.prepare}else a=i;s.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,u?En(e,u):En(e))}function SP(e){return e._reducerDefinitionType==="asyncThunk"}function EP(e){return e._reducerDefinitionType==="reducerWithPrepare"}function PP({type:e,reducerName:t},n,i,s){if(!s)throw new Error(ht(18));const{payloadCreator:a,fulfilled:u,pending:f,rejected:d,settled:p,options:_}=n,v=s(e,a,_);i.exposeAction(t,v),u&&i.addCase(v.fulfilled,u),f&&i.addCase(v.pending,f),d&&i.addCase(v.rejected,d),p&&i.addMatcher(v.settled,p),i.exposeCaseReducer(t,{fulfilled:u||Hs,pending:f||Hs,rejected:d||Hs,settled:p||Hs})}function Hs(){}var CP=(e,t)=>{if(typeof e!="function")throw new Error(ht(32))},qd="listenerMiddleware",TP=e=>{let{type:t,actionCreator:n,matcher:i,predicate:s,effect:a}=e;if(t)s=En(t).match;else if(n)t=n.type,s=n.match;else if(i)s=i;else if(!s)throw new Error(ht(21));return CP(a),{predicate:s,type:t,effect:a}},kP=Object.assign(e=>{const{type:t,predicate:n,effect:i}=TP(e);return{id:ny(),effect:i,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ht(22))}}},{withTypes:()=>kP}),LP=Object.assign(En(`${qd}/add`),{withTypes:()=>LP});En(`${qd}/removeAll`);var NP=Object.assign(En(`${qd}/remove`),{withTypes:()=>NP});function ht(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const OP=EE,Fe=oE,qt=e=>{const t=OP();return O.useMemo(()=>kE(e,t),[])},oa=cn("user/checkAuth",async(e,{extra:t})=>{const{data:n}=await t.get(Gt.Login,{headers:{"x-no-toast":"true"}});return n}),Tf=cn("user/login",async(e,{extra:t})=>{const{data:n}=await t.post(Gt.Login,e);return n}),kf=cn("user/logout",async(e,{extra:t})=>{await t.delete(Gt.Logout)}),Gd="six-cities-token",ry=()=>localStorage.getItem(Gd)??"",MP=e=>{localStorage.setItem(Gd,e)},RP=()=>{localStorage.removeItem(Gd)},zP={authStatus:Je.Unknown,requestStatus:ie.Idle,userInfo:null,userAuthData:null},Ya=Ai({name:"user",initialState:zP,reducers:{setNoAuthStatus:e=>{e.authStatus=Je.NoAuth}},extraReducers:e=>{e.addCase(oa.pending,t=>{t.requestStatus=ie.Loading}),e.addCase(oa.fulfilled,(t,n)=>{t.userInfo=n.payload,t.authStatus=Je.Auth,t.requestStatus=ie.Succeed}),e.addCase(oa.rejected,t=>{t.authStatus=Je.NoAuth,t.requestStatus=ie.Failed}),e.addCase(Tf.fulfilled,(t,n)=>{t.userInfo=n.payload,MP(t.userInfo.token),t.authStatus=Je.Auth,t.requestStatus=ie.Succeed}),e.addCase(Tf.rejected,t=>{t.authStatus=Je.NoAuth,t.requestStatus=ie.Failed}),e.addCase(kf.fulfilled,t=>{RP(),t.userInfo=null,t.authStatus=Je.NoAuth,t.requestStatus=ie.Succeed}),e.addCase(kf.rejected,t=>{t.userInfo=null,t.authStatus=Je.NoAuth,t.requestStatus=ie.Failed})},selectors:{authStatus:e=>e.authStatus,requestStatus:e=>e.requestStatus,userInfo:e=>e.userInfo,userAuthData:e=>e.userAuthData}}),Yd={...Ya.actions,checkAuth:oa,login:Tf,logout:kf},Uo=Ya.selectors;function iy(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;ttypeof e=="number"&&!isNaN(e),kr=e=>typeof e=="string",_t=e=>typeof e=="function",sa=e=>kr(e)||_t(e)?e:null,Lf=e=>O.isValidElement(e)||kr(e)||_t(e)||Zo(e);function IP(e,t,n){n===void 0&&(n=300);const{scrollHeight:i,style:s}=e;requestAnimationFrame(()=>{s.minHeight="initial",s.height=i+"px",s.transition=`all ${n}ms`,requestAnimationFrame(()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(t,n)})})}function Vl(e){let{enter:t,exit:n,appendPosition:i=!1,collapse:s=!0,collapseDuration:a=300}=e;return function(u){let{children:f,position:d,preventExitTransition:p,done:_,nodeRef:v,isIn:S,playToast:k}=u;const P=i?`${t}--${d}`:t,E=i?`${n}--${d}`:n,R=O.useRef(0);return O.useLayoutEffect(()=>{const x=v.current,g=P.split(" "),y=N=>{N.target===v.current&&(k(),x.removeEventListener("animationend",y),x.removeEventListener("animationcancel",y),R.current===0&&N.type!=="animationcancel"&&x.classList.remove(...g))};x.classList.add(...g),x.addEventListener("animationend",y),x.addEventListener("animationcancel",y)},[]),O.useEffect(()=>{const x=v.current,g=()=>{x.removeEventListener("animationend",g),s?IP(x,_,a):_()};S||(p?g():(R.current=1,x.className+=` ${E}`,x.addEventListener("animationend",g)))},[S]),_e.createElement(_e.Fragment,null,f)}}function Am(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const it=new Map;let Ho=[];const Nf=new Set,AP=e=>Nf.forEach(t=>t(e)),oy=()=>it.size>0;function sy(e,t){var n;if(t)return!((n=it.get(t))==null||!n.isToastActive(e));let i=!1;return it.forEach(s=>{s.isToastActive(e)&&(i=!0)}),i}function ay(e,t){Lf(e)&&(oy()||Ho.push({content:e,options:t}),it.forEach(n=>{n.buildToast(e,t)}))}function jm(e,t){it.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function jP(e){const{subscribe:t,getSnapshot:n,setProps:i}=O.useRef(function(a){const u=a.containerId||1;return{subscribe(f){const d=function(_,v,S){let k=1,P=0,E=[],R=[],x=[],g=v;const y=new Map,N=new Set,j=()=>{x=Array.from(y.values()),N.forEach(I=>I())},b=I=>{R=I==null?[]:R.filter(X=>X!==I),j()},$=I=>{const{toastId:X,onOpen:V,updateId:G,children:ue}=I.props,Ve=G==null;I.staleId&&y.delete(I.staleId),y.set(X,I),R=[...R,I.props.toastId].filter(Y=>Y!==I.staleId),j(),S(Am(I,Ve?"added":"updated")),Ve&&_t(V)&&V(O.isValidElement(ue)&&ue.props)};return{id:_,props:g,observe:I=>(N.add(I),()=>N.delete(I)),toggle:(I,X)=>{y.forEach(V=>{X!=null&&X!==V.props.toastId||_t(V.toggle)&&V.toggle(I)})},removeToast:b,toasts:y,clearQueue:()=>{P-=E.length,E=[]},buildToast:(I,X)=>{if((J=>{let{containerId:re,toastId:ee,updateId:te}=J;const oe=re?re!==_:_!==1,ye=y.has(ee)&&te==null;return oe||ye})(X))return;const{toastId:V,updateId:G,data:ue,staleId:Ve,delay:Y}=X,W=()=>{b(V)},F=G==null;F&&P++;const K={...g,style:g.toastStyle,key:k++,...Object.fromEntries(Object.entries(X).filter(J=>{let[re,ee]=J;return ee!=null})),toastId:V,updateId:G,data:ue,closeToast:W,isIn:!1,className:sa(X.className||g.toastClassName),bodyClassName:sa(X.bodyClassName||g.bodyClassName),progressClassName:sa(X.progressClassName||g.progressClassName),autoClose:!X.isLoading&&(T=X.autoClose,U=g.autoClose,T===!1||Zo(T)&&T>0?T:U),deleteToast(){const J=y.get(V),{onClose:re,children:ee}=J.props;_t(re)&&re(O.isValidElement(ee)&&ee.props),S(Am(J,"removed")),y.delete(V),P--,P<0&&(P=0),E.length>0?$(E.shift()):j()}};var T,U;K.closeButton=g.closeButton,X.closeButton===!1||Lf(X.closeButton)?K.closeButton=X.closeButton:X.closeButton===!0&&(K.closeButton=!Lf(g.closeButton)||g.closeButton);let A=I;O.isValidElement(I)&&!kr(I.type)?A=O.cloneElement(I,{closeToast:W,toastProps:K,data:ue}):_t(I)&&(A=I({closeToast:W,toastProps:K,data:ue}));const H={content:A,props:K,staleId:Ve};g.limit&&g.limit>0&&P>g.limit&&F?E.push(H):Zo(Y)?setTimeout(()=>{$(H)},Y):$(H)},setProps(I){g=I},setToggle:(I,X)=>{y.get(I).toggle=X},isToastActive:I=>R.some(X=>X===I),getSnapshot:()=>g.newestOnTop?x.reverse():x}}(u,a,AP);it.set(u,d);const p=d.observe(f);return Ho.forEach(_=>ay(_.content,_.options)),Ho=[],()=>{p(),it.delete(u)}},setProps(f){var d;(d=it.get(u))==null||d.setProps(f)},getSnapshot(){var f;return(f=it.get(u))==null?void 0:f.getSnapshot()}}}(e)).current;i(e);const s=O.useSyncExternalStore(t,n,n);return{getToastToRender:function(a){if(!s)return[];const u=new Map;return s.forEach(f=>{const{position:d}=f.props;u.has(d)||u.set(d,[]),u.get(d).push(f)}),Array.from(u,f=>a(f[0],f[1]))},isToastActive:sy,count:s==null?void 0:s.length}}function DP(e){const[t,n]=O.useState(!1),[i,s]=O.useState(!1),a=O.useRef(null),u=O.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:f,pauseOnHover:d,closeToast:p,onClick:_,closeOnClick:v}=e;var S,k;function P(){n(!0)}function E(){n(!1)}function R(y){const N=a.current;u.canDrag&&N&&(u.didMove=!0,t&&E(),u.delta=e.draggableDirection==="x"?y.clientX-u.start:y.clientY-u.start,u.start!==y.clientX&&(u.canCloseOnClick=!1),N.style.transform=`translate3d(${e.draggableDirection==="x"?`${u.delta}px, var(--y)`:`0, calc(${u.delta}px + var(--y))`},0)`,N.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance)))}function x(){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",x);const y=a.current;if(u.canDrag&&u.didMove&&y){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),e.closeToast(),void e.collapseAll();y.style.transition="transform 0.2s, opacity 0.2s",y.style.removeProperty("transform"),y.style.removeProperty("opacity")}}(k=it.get((S={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||k.setToggle(S.id,S.fn),O.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||E(),window.addEventListener("focus",P),window.addEventListener("blur",E),()=>{window.removeEventListener("focus",P),window.removeEventListener("blur",E)}},[e.pauseOnFocusLoss]);const g={onPointerDown:function(y){if(e.draggable===!0||e.draggable===y.pointerType){u.didMove=!1,document.addEventListener("pointermove",R),document.addEventListener("pointerup",x);const N=a.current;u.canCloseOnClick=!0,u.canDrag=!0,N.style.transition="none",e.draggableDirection==="x"?(u.start=y.clientX,u.removalDistance=N.offsetWidth*(e.draggablePercent/100)):(u.start=y.clientY,u.removalDistance=N.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(y){const{top:N,bottom:j,left:b,right:$}=a.current.getBoundingClientRect();y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&y.clientX>=b&&y.clientX<=$&&y.clientY>=N&&y.clientY<=j?E():P()}};return f&&d&&(g.onMouseEnter=E,e.stacked||(g.onMouseLeave=P)),v&&(g.onClick=y=>{_&&_(y),u.canCloseOnClick&&p()}),{playToast:P,pauseToast:E,isRunning:t,preventExitTransition:i,toastRef:a,eventHandlers:g}}function bP(e){let{delay:t,isRunning:n,closeToast:i,type:s="default",hide:a,className:u,style:f,controlledProgress:d,progress:p,rtl:_,isIn:v,theme:S}=e;const k=a||d&&p===0,P={...f,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};d&&(P.transform=`scaleX(${p})`);const E=Kn("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${S}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":_}),R=_t(u)?u({rtl:_,type:s,defaultClassName:E}):Kn(E,u),x={[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]:d&&p<1?null:()=>{v&&i()}};return _e.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":k},_e.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${S} Toastify__progress-bar--${s}`}),_e.createElement("div",{role:"progressbar","aria-hidden":k?"true":"false","aria-label":"notification timer",className:R,style:P,...x}))}let BP=1;const ly=()=>""+BP++;function FP(e){return e&&(kr(e.toastId)||Zo(e.toastId))?e.toastId:ly()}function xo(e,t){return ay(e,t),t.toastId}function Qa(e,t){return{...t,type:t&&t.type||e,toastId:FP(t)}}function Ws(e){return(t,n)=>xo(t,Qa(e,n))}function de(e,t){return xo(e,Qa("default",t))}de.loading=(e,t)=>xo(e,Qa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),de.promise=function(e,t,n){let i,{pending:s,error:a,success:u}=t;s&&(i=kr(s)?de.loading(s,n):de.loading(s.render,{...n,...s}));const f={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(_,v,S)=>{if(v==null)return void de.dismiss(i);const k={type:_,...f,...n,data:S},P=kr(v)?{render:v}:v;return i?de.update(i,{...k,...P}):de(P.render,{...k,...P}),S},p=_t(e)?e():e;return p.then(_=>d("success",u,_)).catch(_=>d("error",a,_)),p},de.success=Ws("success"),de.info=Ws("info"),de.error=Ws("error"),de.warning=Ws("warning"),de.warn=de.warning,de.dark=(e,t)=>xo(e,Qa("default",{theme:"dark",...t})),de.dismiss=function(e){(function(t){var n;if(oy()){if(t==null||kr(n=t)||Zo(n))it.forEach(i=>{i.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const i=it.get(t.containerId);i?i.removeToast(t.id):it.forEach(s=>{s.removeToast(t.id)})}}else Ho=Ho.filter(i=>t!=null&&i.options.toastId!==t)})(e)},de.clearWaitingQueue=function(e){e===void 0&&(e={}),it.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},de.isActive=sy,de.update=function(e,t){t===void 0&&(t={});const n=((i,s)=>{var a;let{containerId:u}=s;return(a=it.get(u||1))==null?void 0:a.toasts.get(i)})(e,t);if(n){const{props:i,content:s}=n,a={delay:100,...i,...t,toastId:t.toastId||e,updateId:ly()};a.toastId!==e&&(a.staleId=e);const u=a.render||s;delete a.render,xo(u,a)}},de.done=e=>{de.update(e,{progress:1})},de.onChange=function(e){return Nf.add(e),()=>{Nf.delete(e)}},de.play=e=>jm(!0,e),de.pause=e=>jm(!1,e);const $P=typeof window<"u"?O.useLayoutEffect:O.useEffect,Vs=e=>{let{theme:t,type:n,isLoading:i,...s}=e;return _e.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...s})},yc={info:function(e){return _e.createElement(Vs,{...e},_e.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return _e.createElement(Vs,{...e},_e.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return _e.createElement(Vs,{...e},_e.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return _e.createElement(Vs,{...e},_e.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return _e.createElement("div",{className:"Toastify__spinner"})}},UP=e=>{const{isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:s,playToast:a}=DP(e),{closeButton:u,children:f,autoClose:d,onClick:p,type:_,hideProgressBar:v,closeToast:S,transition:k,position:P,className:E,style:R,bodyClassName:x,bodyStyle:g,progressClassName:y,progressStyle:N,updateId:j,role:b,progress:$,rtl:I,toastId:X,deleteToast:V,isIn:G,isLoading:ue,closeOnClick:Ve,theme:Y}=e,W=Kn("Toastify__toast",`Toastify__toast-theme--${Y}`,`Toastify__toast--${_}`,{"Toastify__toast--rtl":I},{"Toastify__toast--close-on-click":Ve}),F=_t(E)?E({rtl:I,position:P,type:_,defaultClassName:W}):Kn(W,E),K=function(H){let{theme:J,type:re,isLoading:ee,icon:te}=H,oe=null;const ye={theme:J,type:re};return te===!1||(_t(te)?oe=te({...ye,isLoading:ee}):O.isValidElement(te)?oe=O.cloneElement(te,ye):ee?oe=yc.spinner():(Ye=>Ye in yc)(re)&&(oe=yc[re](ye))),oe}(e),T=!!$||!d,U={closeToast:S,type:_,theme:Y};let A=null;return u===!1||(A=_t(u)?u(U):O.isValidElement(u)?O.cloneElement(u,U):function(H){let{closeToast:J,theme:re,ariaLabel:ee="close"}=H;return _e.createElement("button",{className:`Toastify__close-button Toastify__close-button--${re}`,type:"button",onClick:te=>{te.stopPropagation(),J(te)},"aria-label":ee},_e.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},_e.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(U)),_e.createElement(k,{isIn:G,done:V,position:P,preventExitTransition:n,nodeRef:i,playToast:a},_e.createElement("div",{id:X,onClick:p,"data-in":G,className:F,...s,style:R,ref:i},_e.createElement("div",{...G&&{role:b},className:_t(x)?x({type:_}):Kn("Toastify__toast-body",x),style:g},K!=null&&_e.createElement("div",{className:Kn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!ue})},K),_e.createElement("div",null,f)),A,_e.createElement(bP,{...j&&!T?{key:`pb-${j}`}:{},rtl:I,theme:Y,delay:d,isRunning:t,isIn:G,closeToast:S,hide:v,type:_,style:N,className:y,controlledProgress:T,progress:$||0})))},Kl=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},ZP=Vl(Kl("bounce",!0));Vl(Kl("slide",!0));Vl(Kl("zoom"));Vl(Kl("flip"));const HP={position:"top-right",transition:ZP,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function WP(e){let t={...HP,...e};const n=e.stacked,[i,s]=O.useState(!0),a=O.useRef(null),{getToastToRender:u,isToastActive:f,count:d}=jP(t),{className:p,style:_,rtl:v,containerId:S}=t;function k(E){const R=Kn("Toastify__toast-container",`Toastify__toast-container--${E}`,{"Toastify__toast-container--rtl":v});return _t(p)?p({position:E,rtl:v,defaultClassName:R}):Kn(R,sa(p))}function P(){n&&(s(!0),de.play())}return $P(()=>{if(n){var E;const R=a.current.querySelectorAll('[data-in="true"]'),x=12,g=(E=t.position)==null?void 0:E.includes("top");let y=0,N=0;Array.from(R).reverse().forEach((j,b)=>{const $=j;$.classList.add("Toastify__toast--stacked"),b>0&&($.dataset.collapsed=`${i}`),$.dataset.pos||($.dataset.pos=g?"top":"bot");const I=y*(i?.2:1)+(i?0:x*b);$.style.setProperty("--y",`${g?I:-1*I}px`),$.style.setProperty("--g",`${x}`),$.style.setProperty("--s",""+(1-(i?N:0))),y+=$.offsetHeight,N+=.025})}},[i,d,n]),_e.createElement("div",{ref:a,className:"Toastify",id:S,onMouseEnter:()=>{n&&(s(!1),de.pause())},onMouseLeave:P},u((E,R)=>{const x=R.length?{..._}:{..._,pointerEvents:"none"};return _e.createElement("div",{className:k(E),style:x,key:`container-${E}`},R.map(g=>{let{content:y,props:N}=g;return _e.createElement(UP,{...N,stacked:n,collapseAll:P,isIn:f(N.toastId,N.containerId),style:N.style,key:`toast-${N.key}`},y)}))}))}const aa=cn("data/fetchOffers",async(e,{extra:t})=>{const{data:n}=await t.get(Gt.Offers);return n}),la=cn("data/fetchOfferFullInfo",async(e,{extra:t})=>{const{data:n}=await t.get(`${Gt.Offers}/${e}`);return n}),ua=cn("data/fetchOffersNear",async(e,{extra:t})=>{const{data:n}=await t.get(`${Gt.Offers}/${e}/nearby`);return n}),ca=cn("data/fetchFavorites",async(e,{extra:t})=>{const{data:n}=await t.get(Gt.Favorite);return n}),fa=cn("data/toggleFavorite",async({offerId:e,status:t},{extra:n})=>{await n.post(`${Gt.Favorite}/${e}/${t}`)}),VP={favorites:[],statusFetchFavorites:ie.Idle,statusToggleFavorite:ie.Idle},Xa=Ai({name:"favorites",initialState:VP,reducers:{},extraReducers:e=>{e.addCase(ca.pending,t=>{t.statusFetchFavorites=ie.Loading}),e.addCase(ca.fulfilled,(t,n)=>{t.favorites=n.payload,t.statusFetchFavorites=ie.Succeed}),e.addCase(ca.rejected,t=>{t.statusFetchFavorites=ie.Failed}),e.addCase(fa.pending,t=>{t.statusToggleFavorite=ie.Loading}),e.addCase(fa.fulfilled,t=>{t.statusToggleFavorite=ie.Succeed}),e.addCase(fa.rejected,t=>{t.statusToggleFavorite=ie.Failed})},selectors:{favorites:e=>e.favorites,statusFetchFavorites:e=>e.statusFetchFavorites,statusToggleFavorite:e=>e.statusToggleFavorite}}),Qd={...Xa.actions,fetchFavorites:ca,toggleFavorite:fa},Wo=Xa.selectors;function KP(){const e=Fe(Uo.authStatus),t=Fe(Uo.userInfo),{logout:n}=qt(Yd),{fetchFavorites:i}=qt(Qd),s=Fe(Wo.statusToggleFavorite);O.useEffect(()=>{e===Je.Auth&&(s===ie.Succeed||s===ie.Idle)&&i()},[s]);const a=Fe(Wo.favorites).length,u=async p=>{p.preventDefault(),await n().unwrap().catch(_=>{de.warning(_.message)})},f=w.jsxs(w.Fragment,{children:[w.jsx("li",{className:"header__nav-item user",children:w.jsxs(un,{to:tt.Favorites,className:"header__nav-link header__nav-link--profile",children:[w.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper",children:(t==null?void 0:t.avatarUrl)&&w.jsx("img",{className:"user__avatar",src:t.avatarUrl,alt:"avatar"})}),(t==null?void 0:t.email)&&w.jsx("span",{className:"header__user-name user__name",children:t.email}),w.jsx("span",{className:"header__favorite-count",children:a})]})}),w.jsx("li",{className:"header__nav-item",children:w.jsx("a",{className:"header__nav-link",href:"#",onClick:p=>{u(p).catch(_=>de.warning(_.message))},children:w.jsx("span",{className:"header__signout",children:"Sign out"})})})]}),d=w.jsx("li",{className:"header__nav-item user",children:w.jsxs(un,{to:tt.Login,className:"header__nav-link header__nav-link--profile",children:[w.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),w.jsx("span",{className:"header__login",children:"Sign in"})]})});return 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(Dd,{})}),w.jsx("nav",{className:"header__nav",children:w.jsx("ul",{className:"header__nav-list",children:e===Je.Auth?f:d})})]})})})}const ql=O.memo(KP),Ar=(...e)=>e.filter(Boolean).join(" ");function qP({cities:e=dr}){return e.map(t=>w.jsx(wS,{to:tt.Root+t.slug,className:({isActive:n})=>Ar("locations__item-link tabs__item",n&&"tabs__item--active"),children:w.jsx("span",{children:t.name})},t.slug))}const GP=O.memo(qP),YP=()=>{const e=document.title;return()=>{document.title=e}};function Jo(e){O.useEffect(YP,[]),O.useEffect(()=>{document.title=`${e} | 6 cities`},[e])}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)})(e_,function(n){var i="1.7.1";function s(r){var o,l,c,h;for(l=1,c=arguments.length;l"u"||!L||!L.Mixin)){r=y(r)?r:[r];for(var o=0;o0?Math.floor(r):Math.ceil(r)};T.prototype={clone:function(){return new T(this.x,this.y)},add:function(r){return this.clone()._add(A(r))},_add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.clone()._subtract(A(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 T(this.x*r.x,this.y*r.y)},unscaleBy:function(r){return new T(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=U(this.x),this.y=U(this.y),this},distanceTo:function(r){r=A(r);var o=r.x-this.x,l=r.y-this.y;return Math.sqrt(o*o+l*l)},equals:function(r){return r=A(r),r.x===this.x&&r.y===this.y},contains:function(r){return r=A(r),Math.abs(r.x)<=Math.abs(this.x)&&Math.abs(r.y)<=Math.abs(this.y)},toString:function(){return"Point("+S(this.x)+", "+S(this.y)+")"}};function A(r,o,l){return r instanceof T?r:y(r)?new T(r[0],r[1]):r==null?r:typeof r=="object"&&"x"in r&&"y"in r?new T(r.x,r.y):new T(r,o,l)}function H(r,o){if(r)for(var l=o?[r,o]:r,c=0,h=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=J(r);var o=this.min,l=this.max,c=r.min,h=r.max,m=h.x>=o.x&&c.x<=l.x,C=h.y>=o.y&&c.y<=l.y;return m&&C},overlaps:function(r){r=J(r);var o=this.min,l=this.max,c=r.min,h=r.max,m=h.x>o.x&&c.xo.y&&c.y=o.lat&&h.lat<=l.lat&&c.lng>=o.lng&&h.lng<=l.lng},intersects:function(r){r=ee(r);var o=this._southWest,l=this._northEast,c=r.getSouthWest(),h=r.getNorthEast(),m=h.lat>=o.lat&&c.lat<=l.lat,C=h.lng>=o.lng&&c.lng<=l.lng;return m&&C},overlaps:function(r){r=ee(r);var o=this._southWest,l=this._northEast,c=r.getSouthWest(),h=r.getNorthEast(),m=h.lat>o.lat&&c.lato.lng&&c.lng1,$r=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}(),mh=function(){return!!document.createElement("canvas").getContext}(),os=!!(document.createElementNS&&ah("svg").createSVGRect),ss=!os&&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 Jt(r){return navigator.userAgent.toLowerCase().indexOf(r)>=0}var qy={ie:ns,ielt9:Br,edge:rs,webkit:tu,android:Di,android23:bi,androidStock:uh,opera:nu,chrome:ru,gecko:iu,safari:is,phantom:ch,opera12:fh,win:dh,ie3d:ou,webkit3d:su,gecko3d:hh,any3d:Ct,mobile:Fr,mobileWebkit:Wy,mobileWebkit3d:Vy,msPointer:zn,pointer:Qt,touch:Xt,mobileOpera:ph,mobileGecko:Ky,retina:In,passiveEvents:$r,canvas:mh,svg:os,vml:ss},au=zn?"MSPointerDown":"pointerdown",lu=zn?"MSPointerMove":"pointermove",uu=zn?"MSPointerUp":"pointerup",cu=zn?"MSPointerCancel":"pointercancel",Ur={},_h=!1;function Gy(r,o,l,c){return o==="touchstart"?Qy(r,l,c):o==="touchmove"?e0(r,l,c):o==="touchend"&&t0(r,l,c),this}function Yy(r,o,l){var c=r["_leaflet_"+o+l];return o==="touchstart"?r.removeEventListener(au,c,!1):o==="touchmove"?r.removeEventListener(lu,c,!1):o==="touchend"&&(r.removeEventListener(uu,c,!1),r.removeEventListener(cu,c,!1)),this}function Qy(r,o,l){var c=u(function(h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&kt(h),fu(h,o)});r["_leaflet_touchstart"+l]=c,r.addEventListener(au,c,!1),_h||(document.addEventListener(au,Xy,!0),document.addEventListener(lu,Jy,!0),document.addEventListener(uu,vh,!0),document.addEventListener(cu,vh,!0),_h=!0)}function Xy(r){Ur[r.pointerId]=r}function Jy(r){Ur[r.pointerId]&&(Ur[r.pointerId]=r)}function vh(r){delete Ur[r.pointerId]}function fu(r,o){r.touches=[];for(var l in Ur)r.touches.push(Ur[l]);r.changedTouches=[r],o(r)}function e0(r,o,l){var c=function(h){h.pointerType===(h.MSPOINTER_TYPE_MOUSE||"mouse")&&h.buttons===0||fu(h,o)};r["_leaflet_touchmove"+l]=c,r.addEventListener(lu,c,!1)}function t0(r,o,l){var c=function(h){fu(h,o)};r["_leaflet_touchend"+l]=c,r.addEventListener(uu,c,!1),r.addEventListener(cu,c,!1)}var as=zn?"MSPointerDown":Qt?"pointerdown":"touchstart",ls=zn?"MSPointerUp":Qt?"pointerup":"touchend",Zr="_leaflet_";function n0(r,o,l){var c,h,m=!1,C=250;function M(B){if(Qt){if(!B.isPrimary||B.pointerType==="mouse")return}else if(B.touches.length>1)return;var q=Date.now(),ne=q-(c||q);h=B.touches?B.touches[0]:B,m=ne>0&&ne<=C,c=q}function z(B){if(m&&!h.cancelBubble){if(Qt){if(B.pointerType==="mouse")return;var q={},ne,me;for(me in h)ne=h[me],q[me]=ne&&ne.bind?ne.bind(h):ne;h=q}h.type="dblclick",h.button=0,o(h),c=null}}return r[Zr+as+l]=M,r[Zr+ls+l]=z,r[Zr+"dblclick"+l]=o,r.addEventListener(as,M,$r?{passive:!1}:!1),r.addEventListener(ls,z,$r?{passive:!1}:!1),r.addEventListener("dblclick",o,!1),this}function r0(r,o){var l=r[Zr+as+o],c=r[Zr+ls+o],h=r[Zr+"dblclick"+o];return r.removeEventListener(as,l,$r?{passive:!1}:!1),r.removeEventListener(ls,c,$r?{passive:!1}:!1),r.removeEventListener("dblclick",h,!1),this}var du=fs(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Bi=fs(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),gh=Bi==="webkitTransition"||Bi==="OTransition"?Bi+"End":"transitionend";function yh(r){return typeof r=="string"?document.getElementById(r):r}function Fi(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 pe(r,o,l){var c=document.createElement(r);return c.className=o||"",l&&l.appendChild(c),c}function Ce(r){var o=r.parentNode;o&&o.removeChild(r)}function us(r){for(;r.firstChild;)r.removeChild(r.firstChild)}function Hr(r){var o=r.parentNode;o&&o.lastChild!==r&&o.appendChild(r)}function Wr(r){var o=r.parentNode;o&&o.firstChild!==r&&o.insertBefore(r,o.firstChild)}function hu(r,o){if(r.classList!==void 0)return r.classList.contains(o);var l=cs(r);return l.length>0&&new RegExp("(^|\\s)"+o+"(\\s|$)").test(l)}function se(r,o){if(r.classList!==void 0)for(var l=P(o),c=0,h=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,ee(r));return l.equals(c)||this.panTo(c,o),this._enforcingBounds=!1,this},panInside:function(r,o){o=o||{};var l=A(o.paddingTopLeft||o.padding||[0,0]),c=A(o.paddingBottomRight||o.padding||[0,0]),h=this.getCenter(),m=this.project(h),C=this.project(r),M=this.getPixelBounds(),z=M.getSize().divideBy(2),B=J([M.min.add(l),M.max.subtract(c)]);if(!B.contains(C)){this._enforcingBounds=!0;var q=m.subtract(C),ne=A(C.x+q.x,C.y+q.y);(C.xB.max.x)&&(ne.x=m.x-q.x,q.x>0?ne.x+=z.x-l.x:ne.x-=z.x-c.x),(C.yB.max.y)&&(ne.y=m.y-q.y,q.y>0?ne.y+=z.y-l.y:ne.y-=z.y-c.y),this.panTo(this.unproject(ne),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(),h=l.divideBy(2).round(),m=c.subtract(h);return!m.x&&!m.y?this:(r.animate&&r.pan?this.panBy(m):(r.pan&&this._rawPanBy(m),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 te(o,l),h=c.toBounds(r.coords.accuracy*2),m=this._locateOptions;if(m.setView){var C=this.getBoundsZoom(h);this.setView(c,m.maxZoom?Math.min(C,m.maxZoom):C)}var M={latlng:c,bounds:h,timestamp:r.timestamp};for(var z in r.coords)typeof r.coords[z]=="number"&&(M[z]=r.coords[z]);this.fire("locationfound",M)},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(),Ce(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ue(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)Ce(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=pe("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 re(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=ee(r),l=A(l||[0,0]);var c=this.getZoom()||0,h=this.getMinZoom(),m=this.getMaxZoom(),C=r.getNorthWest(),M=r.getSouthEast(),z=this.getSize().subtract(l),B=J(this.project(M,c),this.project(C,c)).getSize(),q=Ct?this.options.zoomSnap:1,ne=z.x/B.x,me=z.y/B.y,_n=o?Math.max(ne,me):Math.min(ne,me);return c=this.getScaleZoom(_n,c),q&&(c=Math.round(c/(q/100))*(q/100),c=o?Math.ceil(c/q)*q:Math.floor(c/q)*q),Math.max(h,Math.min(m,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new T(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 H(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(oe(r),o)},unproject:function(r,o){return o=o===void 0?this._zoom:o,this.options.crs.pointToLatLng(A(r),o)},layerPointToLatLng:function(r){var o=A(r).add(this.getPixelOrigin());return this.unproject(o)},latLngToLayerPoint:function(r){var o=this.project(oe(r))._round();return o._subtract(this.getPixelOrigin())},wrapLatLng:function(r){return this.options.crs.wrapLatLng(oe(r))},wrapLatLngBounds:function(r){return this.options.crs.wrapLatLngBounds(ee(r))},distance:function(r,o){return this.options.crs.distance(oe(r),oe(o))},containerPointToLayerPoint:function(r){return A(r).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(r){return A(r).add(this._getMapPanePos())},containerPointToLatLng:function(r){var o=this.containerPointToLayerPoint(A(r));return this.layerPointToLatLng(o)},latLngToContainerPoint:function(r){return this.layerPointToContainerPoint(this.latLngToLayerPoint(oe(r)))},mouseEventToContainerPoint:function(r){return Sh(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=yh(r);if(o){if(o._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ae(o,"scroll",this._onScroll,this),this._containerId=d(o)},_initLayout:function(){var r=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ct,se(r,"leaflet-container"+(Xt?" leaflet-touch":"")+(In?" leaflet-retina":"")+(Br?" leaflet-oldie":"")+(is?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var o=Fi(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),Ie(this._mapPane,new T(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(se(r.markerPane,"leaflet-zoom-hide"),se(r.shadowPane,"leaflet-zoom-hide"))},_resetView:function(r,o){Ie(this._mapPane,new T(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 ue(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(r){Ie(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[d(this._container)]=this;var o=r?Me:ae;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),Ct&&this.options.transform3DLimit&&(r?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ue(this._resizeRequest),this._resizeRequest=G(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,h=o==="mouseout"||o==="mouseover",m=r.target||r.srcElement,C=!1;m;){if(c=this._targets[d(m)],c&&(o==="click"||o==="preclick")&&!r._simulated&&this._draggableMoved(c)){C=!0;break}if(c&&c.listens(o,!0)&&(h&&!ms(m,r)||(l.push(c),h))||m===this._container)break;m=m.parentNode}return!l.length&&!C&&!h&&ms(m,r)&&(l=[this]),l},_handleDOMEvent:function(r){if(!(!this._loaded||Tu(r))){var o=r.type;(o==="mousedown"||o==="keypress"||o==="keyup"||o==="keydown")&&yu(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 h=l[0];o==="contextmenu"&&h.listens(o,!0)&&kt(r);var m={originalEvent:r};if(r.type!=="keypress"&&r.type!=="keydown"&&r.type!=="keyup"){var C=h.getLatLng&&(!h._radius||h._radius<=10);m.containerPoint=C?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(r),m.layerPoint=this.containerPointToLayerPoint(m.containerPoint),m.latlng=C?h.getLatLng():this.layerPointToLatLng(m.layerPoint)}for(var M=0;M0?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=Ct?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(){Ne(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=pe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(r),this.on("zoomanim",function(o){var l=du,c=this._proxy.style[l];dr(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(){Ce(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var r=this.getCenter(),o=this.getZoom();dr(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),h=this._getCenterOffset(r)._divideBy(1-1/c);return l.animate!==!0&&!this.getSize().contains(h)?!1:(G(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,se(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&&Ne(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),G(function(){this._moveEnd(!0)},this))}});function l0(r,o){return new fe(r,o)}var bt=Y.extend({options:{position:"topright"},initialize:function(r){E(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 se(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?(Ce(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()}}),Wi=function(r){return new bt(r)};fe.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=pe("div",o+"control-container",this._container);function c(h,m){var C=o+h+" "+o+m;r[h+m]=pe("div",C,l)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var r in this._controlCorners)Ce(this._controlCorners[r]);Ce(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ch=bt.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(d(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_"+d(this),l),this._layerControlInputs.push(c),c.layerId=d(r.layer),ae(c,"click",this._onInputClick,this);var h=document.createElement("span");h.innerHTML=" "+r.name;var m=document.createElement("div");o.appendChild(m),m.appendChild(c),m.appendChild(h);var C=r.overlay?this._overlaysList:this._baseLayersList;return C.appendChild(o),this._checkDisabledLayers(),o},_onInputClick:function(){var r=this._layerControlInputs,o,l,c=[],h=[];this._handlingClick=!0;for(var m=r.length-1;m>=0;m--)o=r[m],l=this._getLayer(o.layerId).layer,o.checked?c.push(l):o.checked||h.push(l);for(m=0;m=0;h--)o=r[h],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()}}),u0=function(r,o,l){return new Ch(r,o,l)},ku=bt.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(r){var o="leaflet-control-zoom",l=pe("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,h){var m=pe("a",l,c);return m.innerHTML=r,m.href="#",m.title=o,m.setAttribute("role","button"),m.setAttribute("aria-label",o),Hi(m),ae(m,"click",fn),ae(m,"click",h,this),ae(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var r=this._map,o="leaflet-disabled";Ne(this._zoomInButton,o),Ne(this._zoomOutButton,o),(this._disabled||r._zoom===r.getMinZoom())&&se(this._zoomOutButton,o),(this._disabled||r._zoom===r.getMaxZoom())&&se(this._zoomInButton,o)}});fe.mergeOptions({zoomControl:!0}),fe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ku,this.addControl(this.zoomControl))});var c0=function(r){return new ku(r)},Th=bt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(r){var o="leaflet-control-scale",l=pe("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=pe("div",o,l)),r.imperial&&(this._iScale=pe("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,h;o>5280?(l=o/5280,c=this._getRoundNum(l),this._updateScale(this._iScale,c+" mi",c/l)):(h=this._getRoundNum(o),this._updateScale(this._iScale,h+" ft",h/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}}),f0=function(r){return new Th(r)},Lu=bt.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(r){E(this,r),this._attributions={}},onAdd:function(r){r.attributionControl=this,this._container=pe("div","leaflet-control-attribution"),Hi(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(" | ")}}});fe.mergeOptions({attributionControl:!0}),fe.addInitHook(function(){this.options.attributionControl&&new Lu().addTo(this)});var d0=function(r){return new Lu(r)};bt.Layers=Ch,bt.Zoom=ku,bt.Scale=Th,bt.Attribution=Lu,Wi.layers=u0,Wi.zoom=c0,Wi.scale=f0,Wi.attribution=d0;var en=Y.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}});en.addTo=function(r,o){return r.addHandler(o,this),this};var h0={Events:F},kh=Xt?"touchstart mousedown":"mousedown",Lh={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Nu={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},pr=K.extend({options:{clickTolerance:3},initialize:function(r,o,l,c){E(this,c),this._element=r,this._dragStartTarget=o||r,this._preventOutline=l},enable:function(){this._enabled||(ae(this._dragStartTarget,kh,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(pr._dragging===this&&this.finishDrag(),Me(this._dragStartTarget,kh,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(r){if(!(r._simulated||!this._enabled)&&(this._moved=!1,!hu(this._element,"leaflet-zoom-anim")&&!(pr._dragging||r.shiftKey||r.which!==1&&r.button!==1&&!r.touches)&&(pr._dragging=this,this._preventOutline&&yu(this._element),_u(),$i(),!this._moving))){this.fire("down");var o=r.touches?r.touches[0]:r,l=wh(this._element);this._startPoint=new T(o.clientX,o.clientY),this._parentScale=wu(l),ae(document,Nu[r.type],this._onMove,this),ae(document,Lh[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 T(o.clientX,o.clientY)._subtract(this._startPoint);!l.x&&!l.y||Math.abs(l.x)+Math.abs(l.y)m&&(C=M,m=z);m>l&&(o[C]=1,Ou(r,o,l,c,C),Ou(r,o,l,C,h))}function _0(r,o){for(var l=[r[0]],c=1,h=0,m=r.length;co&&(l.push(r[c]),h=c);return ho.max.x&&(l|=2),r.yo.max.y&&(l|=8),l}function v0(r,o){var l=o.x-r.x,c=o.y-r.y;return l*l+c*c}function Vi(r,o,l,c){var h=o.x,m=o.y,C=l.x-h,M=l.y-m,z=C*C+M*M,B;return z>0&&(B=((r.x-h)*C+(r.y-m)*M)/z,B>1?(h=l.x,m=l.y):B>0&&(h+=C*B,m+=M*B)),C=r.x-h,M=r.y-m,c?C*C+M*M:new T(h,m)}function dn(r){return!y(r[0])||typeof r[0][0]!="object"&&typeof r[0][0]<"u"}function zh(r){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),dn(r)}var g0={simplify:Nh,pointToSegmentDistance:Oh,closestPointOnSegment:p0,clipSegment:Rh,_getEdgeIntersection:_s,_getBitCode:mr,_sqClosestPointOnSegment:Vi,isFlat:dn,_flat:zh};function Ih(r,o,l){var c,h=[1,4,2,8],m,C,M,z,B,q,ne,me;for(m=0,q=r.length;m1e-7;M++)B=h*Math.sin(C),B=Math.pow((1-B)/(1+B),h/2),z=Math.PI/2-2*Math.atan(m*B)-C,C+=z;return new te(C*o,r.x*o/l)}},w0={LonLat:Mu,Mercator:Ru,SphericalMercator:$e},x0=s({},Ye,{code:"EPSG:3395",projection:Ru,transformation:function(){var r=.5/(Math.PI*Ru.R);return jt(r,.5,-r,.5)}()}),Ah=s({},Ye,{code:"EPSG:4326",projection:Mu,transformation:jt(1/180,1,-1/180,.5)}),S0=s({},ye,{projection:Mu,transformation:jt(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});ye.Earth=Ye,ye.EPSG3395=x0,ye.EPSG3857=Rn,ye.EPSG900913=Zy,ye.EPSG4326=Ah,ye.Simple=S0;var Bt=K.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[d(r)]=this,this},removeInteractiveTarget:function(r){return delete this._map._targets[d(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})}}});fe.include({addLayer:function(r){if(!r._layerAdd)throw new Error("The provided object is not a Layer.");var o=d(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=d(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&&d(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?y(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 C=(c-o)/l,this._map.layerPointToLatLng([m.x-C*(m.x-h.x),m.y-C*(m.y-h.y)])},getBounds:function(){return this._bounds},addLatLng:function(r,o){return o=o||this._defaultShape(),r=oe(r),o.push(r),this._bounds.extend(r),this.redraw()},_setLatLngs:function(r){this._bounds=new re,this._latlngs=this._convertLatLngs(r)},_defaultShape:function(){return dn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(r){for(var o=[],l=dn(r),c=0,h=r.length;c=2&&o[0]instanceof te&&o[0].equals(o[l-1])&&o.pop(),o},_setLatLngs:function(r){hn.prototype._setLatLngs.call(this,r),dn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return dn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var r=this._renderer._bounds,o=this.options.weight,l=new T(o,o);if(r=new H(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,h=this._rings.length,m;cr.y!=h.y>r.y&&r.x<(h.x-c.x)*(r.y-c.y)/(h.y-c.y)+c.x&&(o=!o);return o||hn.prototype._containsPoint.call(this,r,!0)}});function O0(r,o){return new Gr(r,o)}var pn=Kr.extend({initialize:function(r,o){E(this,o),this._layers={},r&&this.addData(r)},addData:function(r){var o=y(r)?r:r.features,l,c,h;if(o){for(l=0,c=o.length;l0?c:[o.src];return}y(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 m=0;mh?(o.height=h+"px",se(r,m)):Ne(r,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(r){var o=this._map._latLngToNewLayerPoint(this._latlng,r.zoom,r.center),l=this._getAnchor();Ie(this._container,o.add(l))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var r=this._map,o=parseInt(Fi(this._container,"marginBottom"),10)||0,l=this._container.offsetHeight+o,c=this._containerWidth,h=new T(this._containerLeft,-l-this._containerBottom);h._add(An(this._container));var m=r.layerPointToContainerPoint(h),C=A(this.options.autoPanPadding),M=A(this.options.autoPanPaddingTopLeft||C),z=A(this.options.autoPanPaddingBottomRight||C),B=r.getSize(),q=0,ne=0;m.x+c+z.x>B.x&&(q=m.x+c-B.x+z.x),m.x-q-M.x<0&&(q=m.x-M.x),m.y+l+z.y>B.y&&(ne=m.y+l-B.y+z.y),m.y-ne-M.y<0&&(ne=m.y-M.y),(q||ne)&&r.fire("autopanstart").panBy([q,ne])}},_onCloseButtonClick:function(r){this._close(),fn(r)},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),A0=function(r,o){return new Qr(r,o)};fe.mergeOptions({closePopupOnClick:!0}),fe.include({openPopup:function(r,o,l){return r instanceof Qr||(r=new Qr(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}}),Bt.include({bindPopup:function(r,o){return r instanceof Qr?(E(r,o),this._popup=r,r._source=this):((!this._popup||o)&&(this._popup=new Qr(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(fn(r),o instanceof jn){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 Xr=mn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(r){mn.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){mn.prototype.onRemove.call(this,r),r.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var r=mn.prototype.getEvents.call(this);return Xt&&!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=pe("div",o)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(r){var o,l,c=this._map,h=this._container,m=c.latLngToContainerPoint(c.getCenter()),C=c.layerPointToContainerPoint(r),M=this.options.direction,z=h.offsetWidth,B=h.offsetHeight,q=A(this.options.offset),ne=this._getAnchor();M==="top"?(o=z/2,l=B):M==="bottom"?(o=z/2,l=0):M==="center"?(o=z/2,l=B/2):M==="right"?(o=0,l=B/2):M==="left"?(o=z,l=B/2):C.xthis.options.maxZoom||lc?this._retainParent(h,m,C,c):!1)},_retainChildren:function(r,o,l,c){for(var h=2*r;h<2*r+2;h++)for(var m=2*o;m<2*o+2;m++){var C=new T(h,m);C.z=l+1;var M=this._tileCoordsToKey(C),z=this._tiles[M];if(z&&z.active){z.retain=!0;continue}else z&&z.loaded&&(z.retain=!0);l+1this.options.maxZoom||this.options.minZoom!==void 0&&h1){this._setView(r,l);return}for(var ne=h.min.y;ne<=h.max.y;ne++)for(var me=h.min.x;me<=h.max.x;me++){var _n=new T(me,ne);if(_n.z=this._tileZoom,!!this._isValidTile(_n)){var _r=this._tiles[this._tileCoordsToKey(_n)];_r?_r.current=!0:C.push(_n)}}if(C.sort(function(Dn,bu){return Dn.distanceTo(m)-bu.distanceTo(m)}),C.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ps=document.createDocumentFragment();for(me=0;mel.max.x)||!o.wrapLat&&(r.yl.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(r);return ee(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),h=c.add(l),m=o.unproject(c,r.z),C=o.unproject(h,r.z);return[m,C]},_tileCoordsToBounds:function(r){var o=this._tileCoordsToNwSe(r),l=new re(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 T(+o[0],+o[1]);return l.z=+o[2],l},_removeTile:function(r){var o=this._tiles[r];o&&(Ce(o.el),delete this._tiles[r],this.fire("tileunload",{tile:o.el,coords:this._keyToTileCoords(r)}))},_initTile:function(r){se(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,Br&&this.options.opacity<1&&Tt(r,this.options.opacity),Di&&!bi&&(r.style.WebkitBackfaceVisibility="hidden")},_addTile:function(r,o){var l=this._getTilePos(r),c=this._tileCoordsToKey(r),h=this.createTile(this._wrapCoords(r),u(this._tileReady,this,r));this._initTile(h),this.createTile.length<2&&G(u(this._tileReady,this,r,null,h)),Ie(h,l),this._tiles[c]={el:h,coords:r,current:!0},o.appendChild(h),this.fire("tileloadstart",{tile:h,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?(Tt(l.el,0),ue(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this)):(l.active=!0,this._pruneTiles()),o||(se(l.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:l.el,coords:r})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Br||!this._map._fadeAnimated?G(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 T(this._wrapX?_(r.x,this._wrapX):r.x,this._wrapY?_(r.y,this._wrapY):r.y);return o.z=r.z,o},_pxBoundsToTileRange:function(r){var o=this.getTileSize();return new H(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 b0(r){return new qi(r)}var Jr=qi.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=E(this,o),o.detectRetina&&In&&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("")),Di||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 ae(l,"load",u(this._tileOnLoad,this,o,l)),ae(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:In?"@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 g(this._url,s(o,this.options))},_tileOnLoad:function(r,o){Br?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,Ce(o),delete this._tiles[r]))},_removeTile:function(r){var o=this._tiles[r];if(o)return uh||o.el.setAttribute("src",j),qi.prototype._removeTile.call(this,r)},_tileReady:function(r,o,l){if(!(!this._map||l&&l.getAttribute("src")===j))return qi.prototype._tileReady.call(this,r,o,l)}});function Uh(r,o){return new Jr(r,o)}var Zh=Jr.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=E(this,o);var h=o.detectRetina&&In?2:1,m=this.getTileSize();l.width=m.x*h,l.height=m.y*h,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,Jr.prototype.onAdd.call(this,r)},getTileUrl:function(r){var o=this._tileCoordsToNwSe(r),l=this._crs,c=J(l.project(o[0]),l.project(o[1])),h=c.min,m=c.max,C=(this._wmsVersion>=1.3&&this._crs===Ah?[h.y,h.x,m.y,m.x]:[h.x,h.y,m.x,m.y]).join(","),M=Jr.prototype.getTileUrl.call(this,r);return M+R(this.wmsParams,M,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+C},setParams:function(r,o){return s(this.wmsParams,r),o||this.redraw(),this}});function B0(r,o){return new Zh(r,o)}Jr.WMS=Zh,Uh.wms=B0;var tn=Bt.extend({options:{padding:.1,tolerance:0},initialize:function(r){E(this,r),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&se(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=An(this._container),h=this._map.getSize().multiplyBy(.5+this.options.padding),m=this._map.project(this._center,o),C=this._map.project(r,o),M=C.subtract(m),z=h.multiplyBy(-l).add(c).add(h).subtract(M);Ct?dr(this._container,z,l):Ie(this._container,z)},_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 H(l,l.add(o.multiplyBy(1+r*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Hh=tn.extend({getEvents:function(){var r=tn.prototype.getEvents.call(this);return r.viewprereset=this._onViewPreReset,r},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){tn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var r=this._container=document.createElement("canvas");ae(r,"mousemove",this._onMouseMove,this),ae(r,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ae(r,"mouseout",this._handleMouseOut,this),this._ctx=r.getContext("2d")},_destroyContainer:function(){ue(this._redrawRequest),delete this._ctx,Ce(this._container),Me(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)){tn.prototype._update.call(this);var r=this._bounds,o=this._container,l=r.getSize(),c=In?2:1;Ie(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",In&&this._ctx.scale(2,2),this._ctx.translate(-r.min.x,-r.min.y),this.fire("update")}},_reset:function(){tn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(r){this._updateDashArray(r),this._layers[d(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[d(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,h;for(h=0;h')}}catch{return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),F0={_initContainer:function(){this._container=pe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(tn.prototype._update.call(this),this.fire("update"))},_initPath:function(r){var o=r._container=Gi("shape");se(o,"leaflet-vml-shape "+(this.options.className||"")),o.coordsize="1 1",r._path=Gi("path"),o.appendChild(r._path),this._updateStyle(r),this._layers[d(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;Ce(o),r.removeInteractiveTarget(o),delete this._layers[d(r)]},_updateStyle:function(r){var o=r._stroke,l=r._fill,c=r.options,h=r._container;h.stroked=!!c.stroke,h.filled=!!c.fill,c.stroke?(o||(o=r._stroke=Gi("stroke")),h.appendChild(o),o.weight=c.weight+"px",o.color=c.color,o.opacity=c.opacity,c.dashArray?o.dashStyle=y(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):o.dashStyle="",o.endcap=c.lineCap.replace("butt","flat"),o.joinstyle=c.lineJoin):o&&(h.removeChild(o),r._stroke=null),c.fill?(l||(l=r._fill=Gi("fill")),h.appendChild(l),l.color=c.fillColor||c.color,l.opacity=c.fillOpacity):l&&(h.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){Hr(r._container)},_bringToBack:function(r){Wr(r._container)}},Es=ss?Gi:ah,Yi=tn.extend({getEvents:function(){var r=tn.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(){Ce(this._container),Me(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){tn.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)),Ie(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&&se(o,r.options.className),r.options.interactive&&se(o,"leaflet-interactive"),this._updateStyle(r),this._layers[d(r)]=r},_addPath:function(r){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(r._path),r.addInteractiveTarget(r._path)},_removePath:function(r){Ce(r._path),r.removeInteractiveTarget(r._path),delete this._layers[d(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,lh(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,h="a"+l+","+c+" 0 1,0 ",m=r._empty()?"M0 0":"M"+(o.x-l)+","+o.y+h+l*2+",0 "+h+-l*2+",0 ";this._setPath(r,m)},_setPath:function(r,o){r._path.setAttribute("d",o)},_bringToFront:function(r){Hr(r._path)},_bringToBack:function(r){Wr(r._path)}});ss&&Yi.include(F0);function Vh(r){return os||ss?new Yi(r):null}fe.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&&Wh(r)||Vh(r)}});var Kh=Gr.extend({initialize:function(r,o){Gr.prototype.initialize.call(this,this._boundsToLatLngs(r),o)},setBounds:function(r){return this.setLatLngs(this._boundsToLatLngs(r))},_boundsToLatLngs:function(r){return r=ee(r),[r.getSouthWest(),r.getNorthWest(),r.getNorthEast(),r.getSouthEast()]}});function $0(r,o){return new Kh(r,o)}Yi.create=Es,Yi.pointsToPath=lh,pn.geometryToLayer=Iu,pn.coordsToLatLng=Au,pn.coordsToLatLngs=ys,pn.latLngToCoords=ju,pn.latLngsToCoords=ws,pn.getFeature=Yr,pn.asFeature=xs,fe.mergeOptions({boxZoom:!0});var qh=en.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(){ae(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Me(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ce(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(),$i(),_u(),this._startPoint=this._map.mouseEventToContainerPoint(r),ae(document,{contextmenu:fn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(r){this._moved||(this._moved=!0,this._box=pe("div","leaflet-zoom-box",this._container),se(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(r);var o=new H(this._point,this._startPoint),l=o.getSize();Ie(this._box,o.min),this._box.style.width=l.x+"px",this._box.style.height=l.y+"px"},_finish:function(){this._moved&&(Ce(this._box),Ne(this._container,"leaflet-crosshair")),Ui(),vu(),Me(document,{contextmenu:fn,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 re(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()}});fe.addInitHook("addHandler","boxZoom",qh),fe.mergeOptions({doubleClickZoom:!0});var Gh=en.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,h=r.originalEvent.shiftKey?l-c:l+c;o.options.doubleClickZoom==="center"?o.setZoom(h):o.setZoomAround(r.containerPoint,h)}});fe.addInitHook("addHandler","doubleClickZoom",Gh),fe.mergeOptions({dragging:!0,inertia:!bi,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Yh=en.extend({addHooks:function(){if(!this._draggable){var r=this._map;this._draggable=new pr(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))}se(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ne(this._map._container,"leaflet-grab"),Ne(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=ee(this._map.options.maxBounds);this._offsetLimit=J(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,h=(c-o+l)%r+o-l,m=(c+o+l)%r-o-l,C=Math.abs(h+l)0?m:-m))-o;this._delta=0,this._startTime=null,C&&(r.options.scrollWheelZoom==="center"?r.setZoom(o+C):r.setZoomAround(this._lastMousePos,o+C))}});fe.addInitHook("addHandler","scrollWheelZoom",Xh),fe.mergeOptions({tap:!0,tapTolerance:15});var Jh=en.extend({addHooks:function(){ae(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},_onDown:function(r){if(r.touches){if(kt(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 T(o.clientX,o.clientY),l.tagName&&l.tagName.toLowerCase()==="a"&&se(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),ae(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(r){if(clearTimeout(this._holdTimeout),Me(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"&&Ne(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 T(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)}});Xt&&(!Qt||is)&&fe.addInitHook("addHandler","tap",Jh),fe.mergeOptions({touchZoom:Xt&&!bi,bounceAtZoomLimits:!0});var ep=en.extend({addHooks:function(){se(this._map._container,"leaflet-touch-zoom"),ae(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ne(this._map._container,"leaflet-touch-zoom"),Me(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(),ae(document,"touchmove",this._onTouchMove,this),ae(document,"touchend",this._onTouchEnd,this),kt(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]),h=l.distanceTo(c)/this._startDist;if(this._zoom=o.getScaleZoom(h,this._startZoom),!o.options.bounceAtZoomLimits&&(this._zoomo.getMaxZoom()&&h>1)&&(this._zoom=o._limitZoom(this._zoom)),o.options.touchZoom==="center"){if(this._center=this._startLatLng,h===1)return}else{var m=l._add(c)._divideBy(2)._subtract(this._centerPoint);if(h===1&&m.x===0&&m.y===0)return;this._center=o.unproject(o.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(o._moveStart(!0,!1),this._moved=!0),ue(this._animRequest);var C=u(o._move,o,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=G(C,this,!0),kt(r)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ue(this._animRequest),Me(document,"touchmove",this._onTouchMove,this),Me(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))}});fe.addInitHook("addHandler","touchZoom",ep),fe.BoxZoom=qh,fe.DoubleClickZoom=Gh,fe.Drag=Yh,fe.Keyboard=Qh,fe.ScrollWheelZoom=Xh,fe.Tap=Jh,fe.TouchZoom=ep,n.version=i,n.Control=bt,n.control=Wi,n.Browser=qy,n.Evented=K,n.Mixin=h0,n.Util=Ve,n.Class=Y,n.Handler=en,n.extend=s,n.bind=u,n.stamp=d,n.setOptions=E,n.DomEvent=a0,n.DomUtil=o0,n.PosAnimation=Ph,n.Draggable=pr,n.LineUtil=g0,n.PolyUtil=y0,n.Point=T,n.point=A,n.Bounds=H,n.bounds=J,n.Transformation=Pt,n.transformation=jt,n.Projection=w0,n.LatLng=te,n.latLng=oe,n.LatLngBounds=re,n.latLngBounds=ee,n.CRS=ye,n.GeoJSON=pn,n.geoJSON=bh,n.geoJson=M0,n.Layer=Bt,n.LayerGroup=Vr,n.layerGroup=E0,n.FeatureGroup=Kr,n.featureGroup=P0,n.ImageOverlay=Ss,n.imageOverlay=R0,n.VideoOverlay=Bh,n.videoOverlay=z0,n.SVGOverlay=Fh,n.svgOverlay=I0,n.DivOverlay=mn,n.Popup=Qr,n.popup=A0,n.Tooltip=Xr,n.tooltip=j0,n.Icon=qr,n.icon=C0,n.DivIcon=$h,n.divIcon=D0,n.Marker=vs,n.marker=T0,n.TileLayer=Jr,n.tileLayer=Uh,n.GridLayer=qi,n.gridLayer=b0,n.SVG=Yi,n.svg=Vh,n.Renderer=tn,n.Canvas=Hh,n.canvas=Wh,n.Path=jn,n.CircleMarker=gs,n.circleMarker=k0,n.Circle=zu,n.circle=L0,n.Polyline=hn,n.polyline=N0,n.Polygon=Gr,n.polygon=O0,n.Rectangle=Kh,n.rectangle=$0,n.Map=fe,n.map=l0;var U0=window.L;n.noConflict=function(){return window.L=U0,this},window.L=n})})(Of,Of.exports);var kr=Of.exports;function QP(e,t){const[n,i]=O.useState(null),s=O.useRef(!1);return O.useEffect(()=>{if(e.current!==null&&!s.current){const a=new kr.Map(e.current,{center:{lat:t.location.latitude,lng:t.location.longitude},zoom:12}),u=new kr.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 XP={offers:[],offersFavorites:[],activeOffer:null,status:ie.Idle},Ja=Ai({name:"offers",initialState:XP,reducers:{setActiveOffer:(e,t)=>{e.activeOffer=t.payload}},extraReducers:e=>{e.addCase(aa.pending,t=>{t.status=ie.Loading}),e.addCase(aa.fulfilled,(t,n)=>{t.offers=n.payload,t.status=ie.Succeed}),e.addCase(aa.rejected,t=>{t.status=ie.Failed})},selectors:{offers:e=>e.offers,activeOffer:e=>e.activeOffer,status:e=>e.status}}),uy={...Ja.actions,fetchOffers:aa},el=Ja.selectors,JP=new kr.Icon(NS),Dm=new kr.Icon(OS);function eC({container:e,city:t,offers:n,currentOffer:i}){const s=Fe(el.activeOffer),a=O.useRef(null),u=QP(a,t);return O.useEffect(()=>{if(u){const f=kr.layerGroup().addTo(u);return n.forEach(d=>{new kr.Marker({lat:d.location.latitude,lng:d.location.longitude}).setIcon(s!==null&&d.id===s.id?Dm:JP).addTo(f),i&&new kr.Marker({lat:i.location.latitude,lng:i.location.longitude}).setIcon(Dm).addTo(u)}),u.flyTo([t.location.latitude,t.location.longitude],12),()=>{u.removeLayer(f)}}},[t,u,n,s]),x.jsx("section",{ref:a,className:`${e}__map map`})}const cy=O.memo(eC);function fy({componentType:e,isFavorite:t,offerId:n}){const i={"place-card":{width:"18",height:"19"},offer:{width:"31",height:"33"}},[s,a]=O.useState(t),{toggleFavorite:u}=qt(Qd),f=Fe(Wo.statusToggleFavorite),d=Fe(Uo.authStatus),p=Ad(),_=d===Je.Auth,v=()=>{_||p(tt.Login),de.promise(u({status:+!s,offerId:n}).unwrap(),{pending:"Sending request",success:{render(){return a(!s),"Success"}}})};return x.jsxs("button",{className:Ir(`${e}__bookmark-button button`,s&&_&&`${e}__bookmark-button--active`),type:"button",onClick:v,disabled:f===ie.Loading,children:[x.jsx("svg",{className:`${e}__bookmark-icon`,...i[e],children:x.jsx("use",{xlinkHref:"#icon-bookmark"})}),x.jsx("span",{className:"visually-hidden",children:s?"In bookmarks":"To bookmarks"})]})}const tC=e=>Math.round(e)*100/5,nC=e=>e.charAt(0).toUpperCase()+e.slice(1),rC=e=>{var t;return(t=br.find(n=>n.name===e))==null?void 0:t.slug};function Xd({componentType:e,rating:t}){return x.jsxs("div",{className:`${e}__rating rating`,children:[x.jsxs("div",{className:`${e}__stars rating__stars`,children:[x.jsx("span",{style:{width:`${tC(t)}%`}}),x.jsx("span",{className:"visually-hidden",children:"Rating"})]}),e==="offer"&&x.jsx("span",{className:"offer__rating-value rating__value",children:t})]})}function iC({offer:e,componentType:t,onHoverCard:n}){const{id:i,isPremium:s,previewImage:a,price:u,isFavorite:f,rating:d,title:p,type:_}=e,v=`${tt.Offer}/${i}`,S={cities:{width:"260",height:"200"},"near-places":{width:"260",height:"200"},favorites:{width:"150",height:"110"}},k=()=>n&&n(e),P=()=>n&&n(null);return x.jsxs("article",{className:`${t}__card place-card`,onMouseEnter:k,onMouseLeave:P,children:[s&&x.jsx("div",{className:"place-card__mark",children:x.jsx("span",{children:"Premium"})}),x.jsx("div",{className:`${t}__image-wrapper place-card__image-wrapper`,children:x.jsx(Ln,{to:v,children:x.jsx("img",{className:"place-card__image",src:a,alt:"Place image",...S[t]})})}),x.jsxs("div",{className:"place-card__info",children:[x.jsxs("div",{className:"place-card__price-wrapper",children:[x.jsxs("div",{className:"place-card__price",children:[x.jsxs("b",{className:"place-card__price-value",children:["€",u]}),x.jsx("span",{className:"place-card__price-text",children:"/ night"})]}),x.jsx(fy,{offerId:i,componentType:"place-card",isFavorite:f})]}),x.jsx(Xd,{componentType:"place-card",rating:d}),x.jsx("h2",{className:"place-card__name",children:x.jsx(Ln,{to:v,children:p})}),x.jsx("p",{className:"place-card__type",children:_})]})]})}const Jd=O.memo(iC);var hi=(e=>(e.Popular="Popular",e.PriceLowToHigh="Price: low to high",e.PriceHighToLow="Price: high to low",e.TopRatedFirst="Top rated first",e))(hi||{});const oC="Popular";function sC(e,t){switch(e){case hi.Popular:return t;case hi.PriceLowToHigh:return[...t].sort((n,i)=>n.price-i.price);case hi.PriceHighToLow:return[...t].sort((n,i)=>i.price-n.price);case hi.TopRatedFirst:return[...t].sort((n,i)=>i.rating-n.rating);default:return t}}function aC(e,t){return new Date(t.date).getTime()-new Date(e.date).getTime()}function lC(e=!1){const[t,n]=O.useState(e);return{isOn:t,off:()=>n(!1),on:()=>n(!0),toggle:()=>n(i=>!i)}}function uC({activeSortOption:e,setActiveSortOption:t}){const{isOn:n,toggle:i,off:s}=lC(!1),a=O.useRef(null);O.useEffect(()=>{if(n){const f=p=>{p.key==="Escape"&&(p.preventDefault(),s())},d=p=>{a.current&&!a.current.contains(p.target)&&s()};return document.addEventListener("keydown",f),document.addEventListener("click",d),()=>{document.removeEventListener("keydown",f),document.removeEventListener("click",d)}}},[n,s,e]);const u=f=>{t(f),s()};return x.jsxs("form",{ref:a,className:"places__sorting",action:"#",method:"get",children:[x.jsx("span",{className:"places__sorting-caption",children:"Sort by"}),x.jsxs("span",{onClick:i,className:"places__sorting-type",tabIndex:0,children:[e,x.jsx("svg",{className:"places__sorting-arrow",width:"7",height:"4",children:x.jsx("use",{xlinkHref:"#icon-arrow-select"})})]}),x.jsx("ul",{className:Ir("places__options","places__options--custom",n&&"places__options--opened"),children:Object.values(hi).map((f,d)=>x.jsx("li",{className:Ir("places__option",e===f&&"places__option--active"),tabIndex:d,onClick:()=>u(f),children:f},f))})]})}const cC=O.memo(uC);/*! ***************************************************************************** + */(function(e,t){(function(n,i){i(t)})(e_,function(n){var i="1.7.1";function s(r){var o,l,c,h;for(l=1,c=arguments.length;l"u"||!L||!L.Mixin)){r=y(r)?r:[r];for(var o=0;o0?Math.floor(r):Math.ceil(r)};T.prototype={clone:function(){return new T(this.x,this.y)},add:function(r){return this.clone()._add(A(r))},_add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.clone()._subtract(A(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 T(this.x*r.x,this.y*r.y)},unscaleBy:function(r){return new T(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=U(this.x),this.y=U(this.y),this},distanceTo:function(r){r=A(r);var o=r.x-this.x,l=r.y-this.y;return Math.sqrt(o*o+l*l)},equals:function(r){return r=A(r),r.x===this.x&&r.y===this.y},contains:function(r){return r=A(r),Math.abs(r.x)<=Math.abs(this.x)&&Math.abs(r.y)<=Math.abs(this.y)},toString:function(){return"Point("+S(this.x)+", "+S(this.y)+")"}};function A(r,o,l){return r instanceof T?r:y(r)?new T(r[0],r[1]):r==null?r:typeof r=="object"&&"x"in r&&"y"in r?new T(r.x,r.y):new T(r,o,l)}function H(r,o){if(r)for(var l=o?[r,o]:r,c=0,h=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=J(r);var o=this.min,l=this.max,c=r.min,h=r.max,m=h.x>=o.x&&c.x<=l.x,C=h.y>=o.y&&c.y<=l.y;return m&&C},overlaps:function(r){r=J(r);var o=this.min,l=this.max,c=r.min,h=r.max,m=h.x>o.x&&c.xo.y&&c.y=o.lat&&h.lat<=l.lat&&c.lng>=o.lng&&h.lng<=l.lng},intersects:function(r){r=ee(r);var o=this._southWest,l=this._northEast,c=r.getSouthWest(),h=r.getNorthEast(),m=h.lat>=o.lat&&c.lat<=l.lat,C=h.lng>=o.lng&&c.lng<=l.lng;return m&&C},overlaps:function(r){r=ee(r);var o=this._southWest,l=this._northEast,c=r.getSouthWest(),h=r.getNorthEast(),m=h.lat>o.lat&&c.lato.lng&&c.lng1,$r=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}(),mh=function(){return!!document.createElement("canvas").getContext}(),os=!!(document.createElementNS&&ah("svg").createSVGRect),ss=!os&&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 Jt(r){return navigator.userAgent.toLowerCase().indexOf(r)>=0}var qy={ie:ns,ielt9:Br,edge:rs,webkit:tu,android:Di,android23:bi,androidStock:uh,opera:nu,chrome:ru,gecko:iu,safari:is,phantom:ch,opera12:fh,win:dh,ie3d:ou,webkit3d:su,gecko3d:hh,any3d:Ct,mobile:Fr,mobileWebkit:Wy,mobileWebkit3d:Vy,msPointer:zn,pointer:Qt,touch:Xt,mobileOpera:ph,mobileGecko:Ky,retina:In,passiveEvents:$r,canvas:mh,svg:os,vml:ss},au=zn?"MSPointerDown":"pointerdown",lu=zn?"MSPointerMove":"pointermove",uu=zn?"MSPointerUp":"pointerup",cu=zn?"MSPointerCancel":"pointercancel",Ur={},_h=!1;function Gy(r,o,l,c){return o==="touchstart"?Qy(r,l,c):o==="touchmove"?e0(r,l,c):o==="touchend"&&t0(r,l,c),this}function Yy(r,o,l){var c=r["_leaflet_"+o+l];return o==="touchstart"?r.removeEventListener(au,c,!1):o==="touchmove"?r.removeEventListener(lu,c,!1):o==="touchend"&&(r.removeEventListener(uu,c,!1),r.removeEventListener(cu,c,!1)),this}function Qy(r,o,l){var c=u(function(h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&kt(h),fu(h,o)});r["_leaflet_touchstart"+l]=c,r.addEventListener(au,c,!1),_h||(document.addEventListener(au,Xy,!0),document.addEventListener(lu,Jy,!0),document.addEventListener(uu,vh,!0),document.addEventListener(cu,vh,!0),_h=!0)}function Xy(r){Ur[r.pointerId]=r}function Jy(r){Ur[r.pointerId]&&(Ur[r.pointerId]=r)}function vh(r){delete Ur[r.pointerId]}function fu(r,o){r.touches=[];for(var l in Ur)r.touches.push(Ur[l]);r.changedTouches=[r],o(r)}function e0(r,o,l){var c=function(h){h.pointerType===(h.MSPOINTER_TYPE_MOUSE||"mouse")&&h.buttons===0||fu(h,o)};r["_leaflet_touchmove"+l]=c,r.addEventListener(lu,c,!1)}function t0(r,o,l){var c=function(h){fu(h,o)};r["_leaflet_touchend"+l]=c,r.addEventListener(uu,c,!1),r.addEventListener(cu,c,!1)}var as=zn?"MSPointerDown":Qt?"pointerdown":"touchstart",ls=zn?"MSPointerUp":Qt?"pointerup":"touchend",Zr="_leaflet_";function n0(r,o,l){var c,h,m=!1,C=250;function M(B){if(Qt){if(!B.isPrimary||B.pointerType==="mouse")return}else if(B.touches.length>1)return;var q=Date.now(),ne=q-(c||q);h=B.touches?B.touches[0]:B,m=ne>0&&ne<=C,c=q}function z(B){if(m&&!h.cancelBubble){if(Qt){if(B.pointerType==="mouse")return;var q={},ne,me;for(me in h)ne=h[me],q[me]=ne&&ne.bind?ne.bind(h):ne;h=q}h.type="dblclick",h.button=0,o(h),c=null}}return r[Zr+as+l]=M,r[Zr+ls+l]=z,r[Zr+"dblclick"+l]=o,r.addEventListener(as,M,$r?{passive:!1}:!1),r.addEventListener(ls,z,$r?{passive:!1}:!1),r.addEventListener("dblclick",o,!1),this}function r0(r,o){var l=r[Zr+as+o],c=r[Zr+ls+o],h=r[Zr+"dblclick"+o];return r.removeEventListener(as,l,$r?{passive:!1}:!1),r.removeEventListener(ls,c,$r?{passive:!1}:!1),r.removeEventListener("dblclick",h,!1),this}var du=fs(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Bi=fs(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),gh=Bi==="webkitTransition"||Bi==="OTransition"?Bi+"End":"transitionend";function yh(r){return typeof r=="string"?document.getElementById(r):r}function Fi(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 pe(r,o,l){var c=document.createElement(r);return c.className=o||"",l&&l.appendChild(c),c}function Ce(r){var o=r.parentNode;o&&o.removeChild(r)}function us(r){for(;r.firstChild;)r.removeChild(r.firstChild)}function Hr(r){var o=r.parentNode;o&&o.lastChild!==r&&o.appendChild(r)}function Wr(r){var o=r.parentNode;o&&o.firstChild!==r&&o.insertBefore(r,o.firstChild)}function hu(r,o){if(r.classList!==void 0)return r.classList.contains(o);var l=cs(r);return l.length>0&&new RegExp("(^|\\s)"+o+"(\\s|$)").test(l)}function se(r,o){if(r.classList!==void 0)for(var l=P(o),c=0,h=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,ee(r));return l.equals(c)||this.panTo(c,o),this._enforcingBounds=!1,this},panInside:function(r,o){o=o||{};var l=A(o.paddingTopLeft||o.padding||[0,0]),c=A(o.paddingBottomRight||o.padding||[0,0]),h=this.getCenter(),m=this.project(h),C=this.project(r),M=this.getPixelBounds(),z=M.getSize().divideBy(2),B=J([M.min.add(l),M.max.subtract(c)]);if(!B.contains(C)){this._enforcingBounds=!0;var q=m.subtract(C),ne=A(C.x+q.x,C.y+q.y);(C.xB.max.x)&&(ne.x=m.x-q.x,q.x>0?ne.x+=z.x-l.x:ne.x-=z.x-c.x),(C.yB.max.y)&&(ne.y=m.y-q.y,q.y>0?ne.y+=z.y-l.y:ne.y-=z.y-c.y),this.panTo(this.unproject(ne),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(),h=l.divideBy(2).round(),m=c.subtract(h);return!m.x&&!m.y?this:(r.animate&&r.pan?this.panBy(m):(r.pan&&this._rawPanBy(m),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 te(o,l),h=c.toBounds(r.coords.accuracy*2),m=this._locateOptions;if(m.setView){var C=this.getBoundsZoom(h);this.setView(c,m.maxZoom?Math.min(C,m.maxZoom):C)}var M={latlng:c,bounds:h,timestamp:r.timestamp};for(var z in r.coords)typeof r.coords[z]=="number"&&(M[z]=r.coords[z]);this.fire("locationfound",M)},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(),Ce(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ue(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)Ce(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=pe("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 re(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=ee(r),l=A(l||[0,0]);var c=this.getZoom()||0,h=this.getMinZoom(),m=this.getMaxZoom(),C=r.getNorthWest(),M=r.getSouthEast(),z=this.getSize().subtract(l),B=J(this.project(M,c),this.project(C,c)).getSize(),q=Ct?this.options.zoomSnap:1,ne=z.x/B.x,me=z.y/B.y,vn=o?Math.max(ne,me):Math.min(ne,me);return c=this.getScaleZoom(vn,c),q&&(c=Math.round(c/(q/100))*(q/100),c=o?Math.ceil(c/q)*q:Math.floor(c/q)*q),Math.max(h,Math.min(m,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new T(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 H(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(oe(r),o)},unproject:function(r,o){return o=o===void 0?this._zoom:o,this.options.crs.pointToLatLng(A(r),o)},layerPointToLatLng:function(r){var o=A(r).add(this.getPixelOrigin());return this.unproject(o)},latLngToLayerPoint:function(r){var o=this.project(oe(r))._round();return o._subtract(this.getPixelOrigin())},wrapLatLng:function(r){return this.options.crs.wrapLatLng(oe(r))},wrapLatLngBounds:function(r){return this.options.crs.wrapLatLngBounds(ee(r))},distance:function(r,o){return this.options.crs.distance(oe(r),oe(o))},containerPointToLayerPoint:function(r){return A(r).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(r){return A(r).add(this._getMapPanePos())},containerPointToLatLng:function(r){var o=this.containerPointToLayerPoint(A(r));return this.layerPointToLatLng(o)},latLngToContainerPoint:function(r){return this.layerPointToContainerPoint(this.latLngToLayerPoint(oe(r)))},mouseEventToContainerPoint:function(r){return Sh(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=yh(r);if(o){if(o._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ae(o,"scroll",this._onScroll,this),this._containerId=d(o)},_initLayout:function(){var r=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ct,se(r,"leaflet-container"+(Xt?" leaflet-touch":"")+(In?" leaflet-retina":"")+(Br?" leaflet-oldie":"")+(is?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var o=Fi(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),Ie(this._mapPane,new T(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(se(r.markerPane,"leaflet-zoom-hide"),se(r.shadowPane,"leaflet-zoom-hide"))},_resetView:function(r,o){Ie(this._mapPane,new T(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 ue(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(r){Ie(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[d(this._container)]=this;var o=r?Me:ae;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),Ct&&this.options.transform3DLimit&&(r?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ue(this._resizeRequest),this._resizeRequest=G(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,h=o==="mouseout"||o==="mouseover",m=r.target||r.srcElement,C=!1;m;){if(c=this._targets[d(m)],c&&(o==="click"||o==="preclick")&&!r._simulated&&this._draggableMoved(c)){C=!0;break}if(c&&c.listens(o,!0)&&(h&&!ms(m,r)||(l.push(c),h))||m===this._container)break;m=m.parentNode}return!l.length&&!C&&!h&&ms(m,r)&&(l=[this]),l},_handleDOMEvent:function(r){if(!(!this._loaded||Tu(r))){var o=r.type;(o==="mousedown"||o==="keypress"||o==="keyup"||o==="keydown")&&yu(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 h=l[0];o==="contextmenu"&&h.listens(o,!0)&&kt(r);var m={originalEvent:r};if(r.type!=="keypress"&&r.type!=="keydown"&&r.type!=="keyup"){var C=h.getLatLng&&(!h._radius||h._radius<=10);m.containerPoint=C?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(r),m.layerPoint=this.containerPointToLayerPoint(m.containerPoint),m.latlng=C?h.getLatLng():this.layerPointToLatLng(m.layerPoint)}for(var M=0;M0?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=Ct?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(){Ne(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=pe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(r),this.on("zoomanim",function(o){var l=du,c=this._proxy.style[l];hr(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(){Ce(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var r=this.getCenter(),o=this.getZoom();hr(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),h=this._getCenterOffset(r)._divideBy(1-1/c);return l.animate!==!0&&!this.getSize().contains(h)?!1:(G(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,se(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&&Ne(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),G(function(){this._moveEnd(!0)},this))}});function l0(r,o){return new fe(r,o)}var bt=Y.extend({options:{position:"topright"},initialize:function(r){E(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 se(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?(Ce(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()}}),Wi=function(r){return new bt(r)};fe.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=pe("div",o+"control-container",this._container);function c(h,m){var C=o+h+" "+o+m;r[h+m]=pe("div",C,l)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var r in this._controlCorners)Ce(this._controlCorners[r]);Ce(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ch=bt.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(d(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_"+d(this),l),this._layerControlInputs.push(c),c.layerId=d(r.layer),ae(c,"click",this._onInputClick,this);var h=document.createElement("span");h.innerHTML=" "+r.name;var m=document.createElement("div");o.appendChild(m),m.appendChild(c),m.appendChild(h);var C=r.overlay?this._overlaysList:this._baseLayersList;return C.appendChild(o),this._checkDisabledLayers(),o},_onInputClick:function(){var r=this._layerControlInputs,o,l,c=[],h=[];this._handlingClick=!0;for(var m=r.length-1;m>=0;m--)o=r[m],l=this._getLayer(o.layerId).layer,o.checked?c.push(l):o.checked||h.push(l);for(m=0;m=0;h--)o=r[h],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()}}),u0=function(r,o,l){return new Ch(r,o,l)},ku=bt.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(r){var o="leaflet-control-zoom",l=pe("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,h){var m=pe("a",l,c);return m.innerHTML=r,m.href="#",m.title=o,m.setAttribute("role","button"),m.setAttribute("aria-label",o),Hi(m),ae(m,"click",dn),ae(m,"click",h,this),ae(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var r=this._map,o="leaflet-disabled";Ne(this._zoomInButton,o),Ne(this._zoomOutButton,o),(this._disabled||r._zoom===r.getMinZoom())&&se(this._zoomOutButton,o),(this._disabled||r._zoom===r.getMaxZoom())&&se(this._zoomInButton,o)}});fe.mergeOptions({zoomControl:!0}),fe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ku,this.addControl(this.zoomControl))});var c0=function(r){return new ku(r)},Th=bt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(r){var o="leaflet-control-scale",l=pe("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=pe("div",o,l)),r.imperial&&(this._iScale=pe("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,h;o>5280?(l=o/5280,c=this._getRoundNum(l),this._updateScale(this._iScale,c+" mi",c/l)):(h=this._getRoundNum(o),this._updateScale(this._iScale,h+" ft",h/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}}),f0=function(r){return new Th(r)},Lu=bt.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(r){E(this,r),this._attributions={}},onAdd:function(r){r.attributionControl=this,this._container=pe("div","leaflet-control-attribution"),Hi(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(" | ")}}});fe.mergeOptions({attributionControl:!0}),fe.addInitHook(function(){this.options.attributionControl&&new Lu().addTo(this)});var d0=function(r){return new Lu(r)};bt.Layers=Ch,bt.Zoom=ku,bt.Scale=Th,bt.Attribution=Lu,Wi.layers=u0,Wi.zoom=c0,Wi.scale=f0,Wi.attribution=d0;var en=Y.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}});en.addTo=function(r,o){return r.addHandler(o,this),this};var h0={Events:F},kh=Xt?"touchstart mousedown":"mousedown",Lh={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Nu={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},mr=K.extend({options:{clickTolerance:3},initialize:function(r,o,l,c){E(this,c),this._element=r,this._dragStartTarget=o||r,this._preventOutline=l},enable:function(){this._enabled||(ae(this._dragStartTarget,kh,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(mr._dragging===this&&this.finishDrag(),Me(this._dragStartTarget,kh,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(r){if(!(r._simulated||!this._enabled)&&(this._moved=!1,!hu(this._element,"leaflet-zoom-anim")&&!(mr._dragging||r.shiftKey||r.which!==1&&r.button!==1&&!r.touches)&&(mr._dragging=this,this._preventOutline&&yu(this._element),_u(),$i(),!this._moving))){this.fire("down");var o=r.touches?r.touches[0]:r,l=wh(this._element);this._startPoint=new T(o.clientX,o.clientY),this._parentScale=wu(l),ae(document,Nu[r.type],this._onMove,this),ae(document,Lh[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 T(o.clientX,o.clientY)._subtract(this._startPoint);!l.x&&!l.y||Math.abs(l.x)+Math.abs(l.y)m&&(C=M,m=z);m>l&&(o[C]=1,Ou(r,o,l,c,C),Ou(r,o,l,C,h))}function _0(r,o){for(var l=[r[0]],c=1,h=0,m=r.length;co&&(l.push(r[c]),h=c);return ho.max.x&&(l|=2),r.yo.max.y&&(l|=8),l}function v0(r,o){var l=o.x-r.x,c=o.y-r.y;return l*l+c*c}function Vi(r,o,l,c){var h=o.x,m=o.y,C=l.x-h,M=l.y-m,z=C*C+M*M,B;return z>0&&(B=((r.x-h)*C+(r.y-m)*M)/z,B>1?(h=l.x,m=l.y):B>0&&(h+=C*B,m+=M*B)),C=r.x-h,M=r.y-m,c?C*C+M*M:new T(h,m)}function hn(r){return!y(r[0])||typeof r[0][0]!="object"&&typeof r[0][0]<"u"}function zh(r){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),hn(r)}var g0={simplify:Nh,pointToSegmentDistance:Oh,closestPointOnSegment:p0,clipSegment:Rh,_getEdgeIntersection:_s,_getBitCode:_r,_sqClosestPointOnSegment:Vi,isFlat:hn,_flat:zh};function Ih(r,o,l){var c,h=[1,4,2,8],m,C,M,z,B,q,ne,me;for(m=0,q=r.length;m1e-7;M++)B=h*Math.sin(C),B=Math.pow((1-B)/(1+B),h/2),z=Math.PI/2-2*Math.atan(m*B)-C,C+=z;return new te(C*o,r.x*o/l)}},w0={LonLat:Mu,Mercator:Ru,SphericalMercator:$e},x0=s({},Ye,{code:"EPSG:3395",projection:Ru,transformation:function(){var r=.5/(Math.PI*Ru.R);return jt(r,.5,-r,.5)}()}),Ah=s({},Ye,{code:"EPSG:4326",projection:Mu,transformation:jt(1/180,1,-1/180,.5)}),S0=s({},ye,{projection:Mu,transformation:jt(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});ye.Earth=Ye,ye.EPSG3395=x0,ye.EPSG3857=Rn,ye.EPSG900913=Zy,ye.EPSG4326=Ah,ye.Simple=S0;var Bt=K.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[d(r)]=this,this},removeInteractiveTarget:function(r){return delete this._map._targets[d(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})}}});fe.include({addLayer:function(r){if(!r._layerAdd)throw new Error("The provided object is not a Layer.");var o=d(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=d(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&&d(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?y(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 C=(c-o)/l,this._map.layerPointToLatLng([m.x-C*(m.x-h.x),m.y-C*(m.y-h.y)])},getBounds:function(){return this._bounds},addLatLng:function(r,o){return o=o||this._defaultShape(),r=oe(r),o.push(r),this._bounds.extend(r),this.redraw()},_setLatLngs:function(r){this._bounds=new re,this._latlngs=this._convertLatLngs(r)},_defaultShape:function(){return hn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(r){for(var o=[],l=hn(r),c=0,h=r.length;c=2&&o[0]instanceof te&&o[0].equals(o[l-1])&&o.pop(),o},_setLatLngs:function(r){pn.prototype._setLatLngs.call(this,r),hn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return hn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var r=this._renderer._bounds,o=this.options.weight,l=new T(o,o);if(r=new H(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,h=this._rings.length,m;cr.y!=h.y>r.y&&r.x<(h.x-c.x)*(r.y-c.y)/(h.y-c.y)+c.x&&(o=!o);return o||pn.prototype._containsPoint.call(this,r,!0)}});function O0(r,o){return new Gr(r,o)}var mn=Kr.extend({initialize:function(r,o){E(this,o),this._layers={},r&&this.addData(r)},addData:function(r){var o=y(r)?r:r.features,l,c,h;if(o){for(l=0,c=o.length;l0?c:[o.src];return}y(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 m=0;mh?(o.height=h+"px",se(r,m)):Ne(r,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(r){var o=this._map._latLngToNewLayerPoint(this._latlng,r.zoom,r.center),l=this._getAnchor();Ie(this._container,o.add(l))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var r=this._map,o=parseInt(Fi(this._container,"marginBottom"),10)||0,l=this._container.offsetHeight+o,c=this._containerWidth,h=new T(this._containerLeft,-l-this._containerBottom);h._add(An(this._container));var m=r.layerPointToContainerPoint(h),C=A(this.options.autoPanPadding),M=A(this.options.autoPanPaddingTopLeft||C),z=A(this.options.autoPanPaddingBottomRight||C),B=r.getSize(),q=0,ne=0;m.x+c+z.x>B.x&&(q=m.x+c-B.x+z.x),m.x-q-M.x<0&&(q=m.x-M.x),m.y+l+z.y>B.y&&(ne=m.y+l-B.y+z.y),m.y-ne-M.y<0&&(ne=m.y-M.y),(q||ne)&&r.fire("autopanstart").panBy([q,ne])}},_onCloseButtonClick:function(r){this._close(),dn(r)},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),A0=function(r,o){return new Qr(r,o)};fe.mergeOptions({closePopupOnClick:!0}),fe.include({openPopup:function(r,o,l){return r instanceof Qr||(r=new Qr(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}}),Bt.include({bindPopup:function(r,o){return r instanceof Qr?(E(r,o),this._popup=r,r._source=this):((!this._popup||o)&&(this._popup=new Qr(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(dn(r),o instanceof jn){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 Xr=_n.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(r){_n.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){_n.prototype.onRemove.call(this,r),r.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var r=_n.prototype.getEvents.call(this);return Xt&&!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=pe("div",o)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(r){var o,l,c=this._map,h=this._container,m=c.latLngToContainerPoint(c.getCenter()),C=c.layerPointToContainerPoint(r),M=this.options.direction,z=h.offsetWidth,B=h.offsetHeight,q=A(this.options.offset),ne=this._getAnchor();M==="top"?(o=z/2,l=B):M==="bottom"?(o=z/2,l=0):M==="center"?(o=z/2,l=B/2):M==="right"?(o=0,l=B/2):M==="left"?(o=z,l=B/2):C.xthis.options.maxZoom||lc?this._retainParent(h,m,C,c):!1)},_retainChildren:function(r,o,l,c){for(var h=2*r;h<2*r+2;h++)for(var m=2*o;m<2*o+2;m++){var C=new T(h,m);C.z=l+1;var M=this._tileCoordsToKey(C),z=this._tiles[M];if(z&&z.active){z.retain=!0;continue}else z&&z.loaded&&(z.retain=!0);l+1this.options.maxZoom||this.options.minZoom!==void 0&&h1){this._setView(r,l);return}for(var ne=h.min.y;ne<=h.max.y;ne++)for(var me=h.min.x;me<=h.max.x;me++){var vn=new T(me,ne);if(vn.z=this._tileZoom,!!this._isValidTile(vn)){var vr=this._tiles[this._tileCoordsToKey(vn)];vr?vr.current=!0:C.push(vn)}}if(C.sort(function(Dn,bu){return Dn.distanceTo(m)-bu.distanceTo(m)}),C.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ps=document.createDocumentFragment();for(me=0;mel.max.x)||!o.wrapLat&&(r.yl.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(r);return ee(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),h=c.add(l),m=o.unproject(c,r.z),C=o.unproject(h,r.z);return[m,C]},_tileCoordsToBounds:function(r){var o=this._tileCoordsToNwSe(r),l=new re(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 T(+o[0],+o[1]);return l.z=+o[2],l},_removeTile:function(r){var o=this._tiles[r];o&&(Ce(o.el),delete this._tiles[r],this.fire("tileunload",{tile:o.el,coords:this._keyToTileCoords(r)}))},_initTile:function(r){se(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,Br&&this.options.opacity<1&&Tt(r,this.options.opacity),Di&&!bi&&(r.style.WebkitBackfaceVisibility="hidden")},_addTile:function(r,o){var l=this._getTilePos(r),c=this._tileCoordsToKey(r),h=this.createTile(this._wrapCoords(r),u(this._tileReady,this,r));this._initTile(h),this.createTile.length<2&&G(u(this._tileReady,this,r,null,h)),Ie(h,l),this._tiles[c]={el:h,coords:r,current:!0},o.appendChild(h),this.fire("tileloadstart",{tile:h,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?(Tt(l.el,0),ue(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this)):(l.active=!0,this._pruneTiles()),o||(se(l.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:l.el,coords:r})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Br||!this._map._fadeAnimated?G(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 T(this._wrapX?_(r.x,this._wrapX):r.x,this._wrapY?_(r.y,this._wrapY):r.y);return o.z=r.z,o},_pxBoundsToTileRange:function(r){var o=this.getTileSize();return new H(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 b0(r){return new qi(r)}var Jr=qi.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=E(this,o),o.detectRetina&&In&&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("")),Di||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 ae(l,"load",u(this._tileOnLoad,this,o,l)),ae(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:In?"@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 g(this._url,s(o,this.options))},_tileOnLoad:function(r,o){Br?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,Ce(o),delete this._tiles[r]))},_removeTile:function(r){var o=this._tiles[r];if(o)return uh||o.el.setAttribute("src",j),qi.prototype._removeTile.call(this,r)},_tileReady:function(r,o,l){if(!(!this._map||l&&l.getAttribute("src")===j))return qi.prototype._tileReady.call(this,r,o,l)}});function Uh(r,o){return new Jr(r,o)}var Zh=Jr.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=E(this,o);var h=o.detectRetina&&In?2:1,m=this.getTileSize();l.width=m.x*h,l.height=m.y*h,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,Jr.prototype.onAdd.call(this,r)},getTileUrl:function(r){var o=this._tileCoordsToNwSe(r),l=this._crs,c=J(l.project(o[0]),l.project(o[1])),h=c.min,m=c.max,C=(this._wmsVersion>=1.3&&this._crs===Ah?[h.y,h.x,m.y,m.x]:[h.x,h.y,m.x,m.y]).join(","),M=Jr.prototype.getTileUrl.call(this,r);return M+R(this.wmsParams,M,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+C},setParams:function(r,o){return s(this.wmsParams,r),o||this.redraw(),this}});function B0(r,o){return new Zh(r,o)}Jr.WMS=Zh,Uh.wms=B0;var tn=Bt.extend({options:{padding:.1,tolerance:0},initialize:function(r){E(this,r),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&se(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=An(this._container),h=this._map.getSize().multiplyBy(.5+this.options.padding),m=this._map.project(this._center,o),C=this._map.project(r,o),M=C.subtract(m),z=h.multiplyBy(-l).add(c).add(h).subtract(M);Ct?hr(this._container,z,l):Ie(this._container,z)},_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 H(l,l.add(o.multiplyBy(1+r*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Hh=tn.extend({getEvents:function(){var r=tn.prototype.getEvents.call(this);return r.viewprereset=this._onViewPreReset,r},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){tn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var r=this._container=document.createElement("canvas");ae(r,"mousemove",this._onMouseMove,this),ae(r,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ae(r,"mouseout",this._handleMouseOut,this),this._ctx=r.getContext("2d")},_destroyContainer:function(){ue(this._redrawRequest),delete this._ctx,Ce(this._container),Me(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)){tn.prototype._update.call(this);var r=this._bounds,o=this._container,l=r.getSize(),c=In?2:1;Ie(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",In&&this._ctx.scale(2,2),this._ctx.translate(-r.min.x,-r.min.y),this.fire("update")}},_reset:function(){tn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(r){this._updateDashArray(r),this._layers[d(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[d(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,h;for(h=0;h')}}catch{return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),F0={_initContainer:function(){this._container=pe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(tn.prototype._update.call(this),this.fire("update"))},_initPath:function(r){var o=r._container=Gi("shape");se(o,"leaflet-vml-shape "+(this.options.className||"")),o.coordsize="1 1",r._path=Gi("path"),o.appendChild(r._path),this._updateStyle(r),this._layers[d(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;Ce(o),r.removeInteractiveTarget(o),delete this._layers[d(r)]},_updateStyle:function(r){var o=r._stroke,l=r._fill,c=r.options,h=r._container;h.stroked=!!c.stroke,h.filled=!!c.fill,c.stroke?(o||(o=r._stroke=Gi("stroke")),h.appendChild(o),o.weight=c.weight+"px",o.color=c.color,o.opacity=c.opacity,c.dashArray?o.dashStyle=y(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):o.dashStyle="",o.endcap=c.lineCap.replace("butt","flat"),o.joinstyle=c.lineJoin):o&&(h.removeChild(o),r._stroke=null),c.fill?(l||(l=r._fill=Gi("fill")),h.appendChild(l),l.color=c.fillColor||c.color,l.opacity=c.fillOpacity):l&&(h.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){Hr(r._container)},_bringToBack:function(r){Wr(r._container)}},Es=ss?Gi:ah,Yi=tn.extend({getEvents:function(){var r=tn.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(){Ce(this._container),Me(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){tn.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)),Ie(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&&se(o,r.options.className),r.options.interactive&&se(o,"leaflet-interactive"),this._updateStyle(r),this._layers[d(r)]=r},_addPath:function(r){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(r._path),r.addInteractiveTarget(r._path)},_removePath:function(r){Ce(r._path),r.removeInteractiveTarget(r._path),delete this._layers[d(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,lh(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,h="a"+l+","+c+" 0 1,0 ",m=r._empty()?"M0 0":"M"+(o.x-l)+","+o.y+h+l*2+",0 "+h+-l*2+",0 ";this._setPath(r,m)},_setPath:function(r,o){r._path.setAttribute("d",o)},_bringToFront:function(r){Hr(r._path)},_bringToBack:function(r){Wr(r._path)}});ss&&Yi.include(F0);function Vh(r){return os||ss?new Yi(r):null}fe.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&&Wh(r)||Vh(r)}});var Kh=Gr.extend({initialize:function(r,o){Gr.prototype.initialize.call(this,this._boundsToLatLngs(r),o)},setBounds:function(r){return this.setLatLngs(this._boundsToLatLngs(r))},_boundsToLatLngs:function(r){return r=ee(r),[r.getSouthWest(),r.getNorthWest(),r.getNorthEast(),r.getSouthEast()]}});function $0(r,o){return new Kh(r,o)}Yi.create=Es,Yi.pointsToPath=lh,mn.geometryToLayer=Iu,mn.coordsToLatLng=Au,mn.coordsToLatLngs=ys,mn.latLngToCoords=ju,mn.latLngsToCoords=ws,mn.getFeature=Yr,mn.asFeature=xs,fe.mergeOptions({boxZoom:!0});var qh=en.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(){ae(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Me(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ce(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(),$i(),_u(),this._startPoint=this._map.mouseEventToContainerPoint(r),ae(document,{contextmenu:dn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(r){this._moved||(this._moved=!0,this._box=pe("div","leaflet-zoom-box",this._container),se(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(r);var o=new H(this._point,this._startPoint),l=o.getSize();Ie(this._box,o.min),this._box.style.width=l.x+"px",this._box.style.height=l.y+"px"},_finish:function(){this._moved&&(Ce(this._box),Ne(this._container,"leaflet-crosshair")),Ui(),vu(),Me(document,{contextmenu:dn,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 re(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()}});fe.addInitHook("addHandler","boxZoom",qh),fe.mergeOptions({doubleClickZoom:!0});var Gh=en.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,h=r.originalEvent.shiftKey?l-c:l+c;o.options.doubleClickZoom==="center"?o.setZoom(h):o.setZoomAround(r.containerPoint,h)}});fe.addInitHook("addHandler","doubleClickZoom",Gh),fe.mergeOptions({dragging:!0,inertia:!bi,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Yh=en.extend({addHooks:function(){if(!this._draggable){var r=this._map;this._draggable=new mr(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))}se(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ne(this._map._container,"leaflet-grab"),Ne(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=ee(this._map.options.maxBounds);this._offsetLimit=J(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,h=(c-o+l)%r+o-l,m=(c+o+l)%r-o-l,C=Math.abs(h+l)0?m:-m))-o;this._delta=0,this._startTime=null,C&&(r.options.scrollWheelZoom==="center"?r.setZoom(o+C):r.setZoomAround(this._lastMousePos,o+C))}});fe.addInitHook("addHandler","scrollWheelZoom",Xh),fe.mergeOptions({tap:!0,tapTolerance:15});var Jh=en.extend({addHooks:function(){ae(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},_onDown:function(r){if(r.touches){if(kt(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 T(o.clientX,o.clientY),l.tagName&&l.tagName.toLowerCase()==="a"&&se(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),ae(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(r){if(clearTimeout(this._holdTimeout),Me(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"&&Ne(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 T(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)}});Xt&&(!Qt||is)&&fe.addInitHook("addHandler","tap",Jh),fe.mergeOptions({touchZoom:Xt&&!bi,bounceAtZoomLimits:!0});var ep=en.extend({addHooks:function(){se(this._map._container,"leaflet-touch-zoom"),ae(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ne(this._map._container,"leaflet-touch-zoom"),Me(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(),ae(document,"touchmove",this._onTouchMove,this),ae(document,"touchend",this._onTouchEnd,this),kt(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]),h=l.distanceTo(c)/this._startDist;if(this._zoom=o.getScaleZoom(h,this._startZoom),!o.options.bounceAtZoomLimits&&(this._zoomo.getMaxZoom()&&h>1)&&(this._zoom=o._limitZoom(this._zoom)),o.options.touchZoom==="center"){if(this._center=this._startLatLng,h===1)return}else{var m=l._add(c)._divideBy(2)._subtract(this._centerPoint);if(h===1&&m.x===0&&m.y===0)return;this._center=o.unproject(o.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(o._moveStart(!0,!1),this._moved=!0),ue(this._animRequest);var C=u(o._move,o,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=G(C,this,!0),kt(r)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ue(this._animRequest),Me(document,"touchmove",this._onTouchMove,this),Me(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))}});fe.addInitHook("addHandler","touchZoom",ep),fe.BoxZoom=qh,fe.DoubleClickZoom=Gh,fe.Drag=Yh,fe.Keyboard=Qh,fe.ScrollWheelZoom=Xh,fe.Tap=Jh,fe.TouchZoom=ep,n.version=i,n.Control=bt,n.control=Wi,n.Browser=qy,n.Evented=K,n.Mixin=h0,n.Util=Ve,n.Class=Y,n.Handler=en,n.extend=s,n.bind=u,n.stamp=d,n.setOptions=E,n.DomEvent=a0,n.DomUtil=o0,n.PosAnimation=Ph,n.Draggable=mr,n.LineUtil=g0,n.PolyUtil=y0,n.Point=T,n.point=A,n.Bounds=H,n.bounds=J,n.Transformation=Pt,n.transformation=jt,n.Projection=w0,n.LatLng=te,n.latLng=oe,n.LatLngBounds=re,n.latLngBounds=ee,n.CRS=ye,n.GeoJSON=mn,n.geoJSON=bh,n.geoJson=M0,n.Layer=Bt,n.LayerGroup=Vr,n.layerGroup=E0,n.FeatureGroup=Kr,n.featureGroup=P0,n.ImageOverlay=Ss,n.imageOverlay=R0,n.VideoOverlay=Bh,n.videoOverlay=z0,n.SVGOverlay=Fh,n.svgOverlay=I0,n.DivOverlay=_n,n.Popup=Qr,n.popup=A0,n.Tooltip=Xr,n.tooltip=j0,n.Icon=qr,n.icon=C0,n.DivIcon=$h,n.divIcon=D0,n.Marker=vs,n.marker=T0,n.TileLayer=Jr,n.tileLayer=Uh,n.GridLayer=qi,n.gridLayer=b0,n.SVG=Yi,n.svg=Vh,n.Renderer=tn,n.Canvas=Hh,n.canvas=Wh,n.Path=jn,n.CircleMarker=gs,n.circleMarker=k0,n.Circle=zu,n.circle=L0,n.Polyline=pn,n.polyline=N0,n.Polygon=Gr,n.polygon=O0,n.Rectangle=Kh,n.rectangle=$0,n.Map=fe,n.map=l0;var U0=window.L;n.noConflict=function(){return window.L=U0,this},window.L=n})})(Of,Of.exports);var Lr=Of.exports;function QP(e,t){const[n,i]=O.useState(null),s=O.useRef(!1);return O.useEffect(()=>{if(e.current!==null&&!s.current){const a=new Lr.Map(e.current,{center:{lat:t.location.latitude,lng:t.location.longitude},zoom:12}),u=new Lr.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 XP={offers:[],offersFavorites:[],activeOffer:null,status:ie.Idle},Ja=Ai({name:"offers",initialState:XP,reducers:{setActiveOffer:(e,t)=>{e.activeOffer=t.payload}},extraReducers:e=>{e.addCase(aa.pending,t=>{t.status=ie.Loading}),e.addCase(aa.fulfilled,(t,n)=>{t.offers=n.payload,t.status=ie.Succeed}),e.addCase(aa.rejected,t=>{t.status=ie.Failed})},selectors:{offers:e=>e.offers,activeOffer:e=>e.activeOffer,status:e=>e.status}}),uy={...Ja.actions,fetchOffers:aa},el=Ja.selectors,JP=new Lr.Icon(NS),Dm=new Lr.Icon(OS);function eC({container:e,city:t,offers:n,currentOffer:i}){const s=Fe(el.activeOffer),a=O.useRef(null),u=QP(a,t);return O.useEffect(()=>{if(u){const f=Lr.layerGroup().addTo(u);return n.forEach(d=>{new Lr.Marker({lat:d.location.latitude,lng:d.location.longitude}).setIcon(s!==null&&d.id===s.id?Dm:JP).addTo(f),i&&new Lr.Marker({lat:i.location.latitude,lng:i.location.longitude}).setIcon(Dm).addTo(u)}),u.flyTo([t.location.latitude,t.location.longitude],12),()=>{u.removeLayer(f)}}},[t,u,n,s]),w.jsx("section",{ref:a,className:`${e}__map map`})}const cy=O.memo(eC);function fy({componentType:e,isFavorite:t,offerId:n}){const i={"place-card":{width:"18",height:"19"},offer:{width:"31",height:"33"}},[s,a]=O.useState(t),{toggleFavorite:u}=qt(Qd),f=Fe(Wo.statusToggleFavorite),d=Fe(Uo.authStatus),p=Ad(),_=d===Je.Auth,v=()=>{_||p(tt.Login),de.promise(u({status:+!s,offerId:n}).unwrap(),{pending:"Sending request",success:{render(){return a(!s),"Success"}}})};return w.jsxs("button",{className:Ar(`${e}__bookmark-button button`,s&&_&&`${e}__bookmark-button--active`),type:"button",onClick:v,disabled:f===ie.Loading,children:[w.jsx("svg",{className:`${e}__bookmark-icon`,...i[e],children:w.jsx("use",{xlinkHref:"#icon-bookmark"})}),w.jsx("span",{className:"visually-hidden",children:s?"In bookmarks":"To bookmarks"})]})}const tC=e=>Math.round(e)*100/5,nC=e=>e.charAt(0).toUpperCase()+e.slice(1),rC=e=>{var t;return(t=dr.find(n=>n.name===e))==null?void 0:t.slug},iC=e=>{const t=Math.floor(Math.random()*e.length);return e[t]};function Xd({componentType:e,rating:t}){return w.jsxs("div",{className:`${e}__rating rating`,children:[w.jsxs("div",{className:`${e}__stars rating__stars`,children:[w.jsx("span",{style:{width:`${tC(t)}%`}}),w.jsx("span",{className:"visually-hidden",children:"Rating"})]}),e==="offer"&&w.jsx("span",{className:"offer__rating-value rating__value",children:t})]})}function oC({offer:e,componentType:t,onHoverCard:n}){const{id:i,isPremium:s,previewImage:a,price:u,isFavorite:f,rating:d,title:p,type:_}=e,v=`${tt.Offer}/${i}`,S={cities:{width:"260",height:"200"},"near-places":{width:"260",height:"200"},favorites:{width:"150",height:"110"}},k=()=>n==null?void 0:n(e),P=()=>n==null?void 0:n(null);return w.jsxs("article",{className:`${t}__card place-card`,onMouseEnter:k,onMouseLeave:P,children:[s&&w.jsx("div",{className:"place-card__mark",children:w.jsx("span",{children:"Premium"})}),w.jsx("div",{className:`${t}__image-wrapper place-card__image-wrapper`,children:w.jsx(un,{to:v,children:w.jsx("img",{className:"place-card__image",src:a,alt:"Place image",...S[t]})})}),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:["€",u]}),w.jsx("span",{className:"place-card__price-text",children:"/ night"})]}),w.jsx(fy,{offerId:i,componentType:"place-card",isFavorite:f})]}),w.jsx(Xd,{componentType:"place-card",rating:d}),w.jsx("h2",{className:"place-card__name",children:w.jsx(un,{to:v,children:p})}),w.jsx("p",{className:"place-card__type",children:_})]})]})}const Jd=O.memo(oC);var hi=(e=>(e.Popular="Popular",e.PriceLowToHigh="Price: low to high",e.PriceHighToLow="Price: high to low",e.TopRatedFirst="Top rated first",e))(hi||{});const sC="Popular";function aC(e,t){switch(e){case hi.Popular:return t;case hi.PriceLowToHigh:return t.toSorted((n,i)=>n.price-i.price);case hi.PriceHighToLow:return t.toSorted((n,i)=>i.price-n.price);case hi.TopRatedFirst:return t.toSorted((n,i)=>i.rating-n.rating);default:return t}}function lC(e,t){return new Date(t.date).getTime()-new Date(e.date).getTime()}function uC(e=!1){const[t,n]=O.useState(e);return{isOn:t,off:()=>n(!1),on:()=>n(!0),toggle:()=>n(i=>!i)}}function cC({activeSortOption:e,setActiveSortOption:t}){const{isOn:n,toggle:i,off:s}=uC(!1),a=O.useRef(null);O.useEffect(()=>{if(n){const f=p=>{p.key==="Escape"&&(p.preventDefault(),s())},d=p=>{a.current&&!a.current.contains(p.target)&&s()};return document.addEventListener("keydown",f),document.addEventListener("click",d),()=>{document.removeEventListener("keydown",f),document.removeEventListener("click",d)}}},[n,s,e]);const u=f=>{t(f),s()};return w.jsxs("form",{ref:a,className:"places__sorting",action:"#",method:"get",children:[w.jsx("span",{className:"places__sorting-caption",children:"Sort by"}),w.jsxs("span",{onClick:i,className:"places__sorting-type",tabIndex:0,children:[e,w.jsx("svg",{className:"places__sorting-arrow",width:"7",height:"4",children:w.jsx("use",{xlinkHref:"#icon-arrow-select"})})]}),w.jsx("ul",{className:Ar("places__options","places__options--custom",n&&"places__options--opened"),children:Object.values(hi).map((f,d)=>w.jsx("li",{className:Ar("places__option",e===f&&"places__option--active"),tabIndex:d,onClick:()=>u(f),children:f},f))})]})}const fC=O.memo(cC);/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the @@ -111,9 +111,9 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. -***************************************************************************** */var rr=function(){return rr=Object.assign||function(t){for(var n,i=1,s=arguments.length;icrypto.randomUUID());return x.jsxs("section",{className:"cities__places places",children:[x.jsx("h2",{className:"visually-hidden",children:"Places"}),x.jsx("div",{style:{width:"100%"},children:x.jsxs(py,{speed:2,width:572,height:120,viewBox:"0 0 572 120",backgroundColor:"#f5f5f5",foregroundColor:"#ecebeb",children:[x.jsx("rect",{x:"2",y:"20",rx:"8",ry:"8",width:"450",height:"28"}),x.jsx("rect",{x:"2",y:"70",rx:"4",ry:"4",width:"100",height:"14"})]})}),x.jsx("div",{className:"cities__places-list places__list tabs__content",children:e.map(t=>x.jsx(mC,{},t))})]})}const vC=O.memo(_C);function gC({offersByCity:e,city:t}){const[n,i]=O.useState(oC),s=O.useCallback(p=>{i(p)},[i]),{setActiveOffer:a}=qt(uy),u=O.useCallback(p=>a(p),[]);if(Fe(el.status)===ie.Loading)return x.jsx(vC,{});if(e.length===0)return x.jsx("section",{className:"cities__no-places",children:x.jsxs("div",{className:"cities__status-wrapper tabs__content",children:[x.jsx("b",{className:"cities__status",children:"No places to stay available"}),x.jsxs("p",{className:"cities__status-description",children:["We could not find any property available at the moment in ",t.name]})]})});const d=sC(n,e);return x.jsxs("section",{className:"cities__places places",children:[x.jsx("h2",{className:"visually-hidden",children:"Places"}),x.jsxs("b",{className:"places__found",children:[e.length," place",e.length>1&&"s"," to stay in ",t==null?void 0:t.name]}),x.jsx(cC,{activeSortOption:n,setActiveSortOption:s}),x.jsx("div",{className:"cities__places-list places__list tabs__content",children:d.map(p=>x.jsx(Jd,{componentType:"cities",offer:p,onHoverCard:u},p.id))})]})}const yC="_container_qshx3_1",wC="_loader_qshx3_9",xC="_animloader_qshx3_1",bm={container:yC,loader:wC,animloader:xC};function eh(){return x.jsx("div",{className:bm.container,children:x.jsx("span",{className:bm.loader})})}function SC({title:e="Main",citySlug:t}){Jo(e);const{fetchOffers:n}=qt(uy),i=Fe(el.status),s=Fe(el.offers);O.useEffect(()=>{i===ie.Idle&&n().unwrap().catch(f=>{de.warning(f.message)})},[i,n]);const a=br.find(f=>f.slug===t);if(!a)return null;const u=s.filter(f=>f.city.name===a.name);return i===ie.Loading?x.jsx(eh,{}):x.jsxs("div",{className:Ir("page page--gray page--main",u.length===0&&"page__main--index-empty"),children:[x.jsx(ql,{}),x.jsxs("main",{className:"page__main page__main--index",children:[x.jsx("h1",{className:"visually-hidden",children:"Cities"}),x.jsx("div",{className:"tabs",children:x.jsx("section",{className:"locations container",children:x.jsx("ul",{className:"locations__list tabs__list",children:x.jsx(GP,{})})})}),x.jsx("div",{className:"cities",children:x.jsxs("div",{className:Ir("cities__places-container container",u.length===0&&"cities__places-container--empty"),children:[x.jsx(gC,{offersByCity:u,city:a}),x.jsx("div",{className:"cities__right-section",children:a&&u.length>0&&x.jsx(cy,{container:"cities",city:a,offers:u})})]})})]})]})}const EC="_container_e270g_1",PC={container:EC};function my({title:e="404"}){return Jo(e),x.jsxs("div",{className:"page page--gray",children:[x.jsx("header",{className:"header",children:x.jsx("div",{className:"container",children:x.jsx("div",{className:"header__wrapper",children:x.jsx("div",{className:"header__left",children:x.jsx(Dd,{})})})})}),x.jsxs("main",{className:PC.container,children:[x.jsxs("h1",{children:["Ошибка 404. ",x.jsx("br",{}),"Страница не найдена 😕"]}),x.jsxs(Ln,{to:"/",className:"locations__item-link",children:[" ","<- Вернуться на главную страницу"]})]})]})}function CC(){return x.jsx("footer",{className:"footer container",children:x.jsx(Ln,{className:"footer__logo-link",to:tt.Root,children:x.jsx("img",{className:"footer__logo",src:"img/logo.svg",alt:"6 cities logo",width:"64",height:"33"})})})}const _y=O.memo(CC);function TC(){return x.jsxs("div",{className:"page page--favorites-empty",children:[x.jsx(ql,{}),x.jsx("main",{className:"page__main page__main--favorites page__main--favorites-empty",children:x.jsx("div",{className:"page__favorites-container container",children:x.jsxs("section",{className:"favorites favorites--empty",children:[x.jsx("h1",{className:"visually-hidden",children:"Favorites (empty)"}),x.jsxs("div",{className:"favorites__status-wrapper",children:[x.jsx("b",{className:"favorites__status",children:"Nothing yet saved."}),x.jsx("p",{className:"favorites__status-description",children:"Save properties to narrow down search or plan your future trips."})]})]})})}),x.jsx(_y,{})]})}function kC({title:e="Favorites"}){var a;Jo(e);const{fetchFavorites:t}=qt(Qd),n=Fe(Wo.statusToggleFavorite),i=Fe(Wo.favorites);if(O.useEffect(()=>{(n===ie.Succeed||n===ie.Idle)&&t()},[t,n]),i.length===0)return x.jsx(TC,{});const s=Object.groupBy(i,({city:u})=>u.name);return x.jsxs("div",{className:"page",children:[x.jsx(ql,{}),x.jsx("main",{className:"page__main page__main--favorites",children:x.jsx("div",{className:"page__favorites-container container",children:x.jsxs("section",{className:"favorites",children:[x.jsx("h1",{className:"favorites__title",children:"Saved listing"}),x.jsx("ul",{className:"favorites__list",children:(a=Object.keys(s))==null?void 0:a.map(u=>x.jsxs("li",{className:"favorites__locations-items",children:[x.jsx("div",{className:"favorites__locations locations locations--current",children:x.jsx("div",{className:"locations__item",children:x.jsx(Ln,{className:"locations__item-link",to:`${tt.Root}${rC(u)}`,children:x.jsx("span",{children:u})})})}),x.jsx("div",{className:"favorites__places",children:s[u].map(f=>x.jsx(Jd,{componentType:"favorites",offer:f},f.id))})]},u))})]})})}),x.jsx(_y,{})]})}function LC({host:e,description:t}){const{name:n,avatarUrl:i,isPro:s}=e;return x.jsxs("div",{className:"offer__host",children:[x.jsx("h2",{className:"offer__host-title",children:"Meet the host"}),x.jsxs("div",{className:"offer__host-user user",children:[x.jsx("div",{className:Ir("offer__avatar-wrapper user__avatar-wrapper",s&&"offer__avatar-wrapper--pro"),children:x.jsx("img",{className:"offer__avatar user__avatar",src:i,width:"74",height:"74",alt:"Host avatar"})}),x.jsx("span",{className:"offer__user-name",children:n}),s&&x.jsx("span",{className:"offer__user-status",children:"Pro"})]}),x.jsx("div",{className:"offer__description",children:x.jsx("p",{className:"offer__text",children:t})})]})}const NC={offerFullInfo:null,status:ie.Idle},tl=Ai({name:"offerFullInfo",initialState:NC,reducers:{},extraReducers:e=>{e.addCase(la.pending,t=>{t.status=ie.Loading}),e.addCase(la.fulfilled,(t,n)=>{t.offerFullInfo=n.payload,t.status=ie.Succeed}),e.addCase(la.rejected,t=>{t.status=ie.Failed})},selectors:{offerFullInfo:e=>e.offerFullInfo,status:e=>e.status}}),OC={...tl.actions,fetchOfferFullInfo:la},Bm=tl.selectors,MC={offersNear:[],status:ie.Idle},nl=Ai({name:"offersNear",initialState:MC,reducers:{},extraReducers:e=>{e.addCase(ua.pending,t=>{t.status=ie.Loading}),e.addCase(ua.fulfilled,(t,n)=>{t.offersNear=n.payload,t.status=ie.Succeed}),e.addCase(ua.rejected,t=>{t.status=ie.Failed})},selectors:{offersNear:e=>e.offersNear,status:e=>e.status}}),RC={...nl.actions,fetchOffersNear:ua},zC=nl.selectors,da=un("data/fetchComments",async(e,{extra:t})=>{const{data:n}=await t.get(`${Gt.Comments}/${e}`);return n}),ha=un("data/postComment",async({offerId:e,body:t},{extra:n})=>{const{data:i}=await n.post(`${Gt.Comments}/${e}`,t);return i}),IC={comments:[],status:ie.Idle,statusPostRequest:ie.Idle},Vo=Ai({name:"comments",initialState:IC,reducers:{},extraReducers:e=>{e.addCase(da.pending,t=>{t.status=ie.Loading}),e.addCase(da.fulfilled,(t,n)=>{t.comments=n.payload,t.status=ie.Succeed}),e.addCase(da.rejected,t=>{t.status=ie.Failed}),e.addCase(ha.pending,t=>{t.statusPostRequest=ie.Loading}),e.addCase(ha.fulfilled,t=>{t.statusPostRequest=ie.Succeed}),e.addCase(ha.rejected,t=>{t.statusPostRequest=ie.Failed})},selectors:{comments:e=>e.comments,status:e=>e.status,statusPostRequest:e=>e.statusPostRequest}}),vy={...Vo.actions,fetchComments:da,postComment:ha},Fm={...Vo.selectors,sortedComments:Qg(Vo.selectors.comments,e=>e.toSorted(aC))};var gy={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(e_,function(){var n=1e3,i=6e4,s=36e5,a="millisecond",u="second",f="minute",d="hour",p="day",_="week",v="month",S="quarter",k="year",P="date",E="Invalid Date",R=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var W=["th","st","nd","rd"],F=Y%100;return"["+Y+(W[(F-20)%10]||W[F]||W[0])+"]"}},y=function(Y,W,F){var K=String(Y);return!K||K.length>=W?Y:""+Array(W+1-K.length).join(F)+Y},N={s:y,z:function(Y){var W=-Y.utcOffset(),F=Math.abs(W),K=Math.floor(F/60),T=F%60;return(W<=0?"+":"-")+y(K,2,"0")+":"+y(T,2,"0")},m:function Y(W,F){if(W.date()1)return Y(A[0])}else{var H=W.name;b[H]=W,T=H}return!K&&T&&(j=T),T||!K&&j},V=function(Y,W){if(I(Y))return Y.clone();var F=typeof W=="object"?W:{};return F.date=Y,F.args=arguments,new ue(F)},G=N;G.l=X,G.i=I,G.w=function(Y,W){return V(Y,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var ue=function(){function Y(F){this.$L=X(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[$]=!0}var W=Y.prototype;return W.parse=function(F){this.$d=function(K){var T=K.date,U=K.utc;if(T===null)return new Date(NaN);if(G.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var A=T.match(R);if(A){var H=A[2]-1||0,J=(A[7]||"0").substring(0,3);return U?new Date(Date.UTC(A[1],H,A[3]||1,A[4]||0,A[5]||0,A[6]||0,J)):new Date(A[1],H,A[3]||1,A[4]||0,A[5]||0,A[6]||0,J)}}return new Date(T)}(F),this.init()},W.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},W.$utils=function(){return G},W.isValid=function(){return this.$d.toString()!==E},W.isSame=function(F,K){var T=V(F);return this.startOf(K)<=T&&T<=this.endOf(K)},W.isAfter=function(F,K){return V(F){t(e)},[n,e]),x.jsxs(x.Fragment,{children:[x.jsxs("h2",{className:"reviews__title",children:["Reviews · ",x.jsx("span",{className:"reviews__amount",children:s})]}),x.jsx("ul",{className:"reviews__list",children:s>0&&i.map(a=>x.jsx(jC,{review:a},a.id))})]})}const BC=50,FC=300;function $C({starTitle:e,starValue:t,isDisabled:n}){return x.jsxs(x.Fragment,{children:[x.jsx("input",{className:"form__rating-input visually-hidden",name:"rating",value:t,id:`${t}-stars`,type:"radio",disabled:n}),x.jsx("label",{htmlFor:`${t}-stars`,className:"reviews__rating-label form__rating-label",title:e,children:x.jsx("svg",{className:"form__star-image",width:"37",height:"33",children:x.jsx("use",{xlinkHref:"#icon-star"})})})]})}const UC=O.memo($C);function ZC({isDisabled:e}){return x.jsx("div",{className:"reviews__rating-form form__rating",children:Object.entries(Tg).slice(1).map(([t,n])=>x.jsx(UC,{starTitle:t,starValue:n,isDisabled:e},t))})}const HC=O.memo(ZC),WC=(e,t)=>e.length<=BC||e.length>FC||Number(t)===Tg.unknown;function VC({offerId:e}){const[t,n]=O.useState(!0),[i,s]=O.useState(!1),{postComment:a}=qt(vy),u=d=>{const p=d.currentTarget,_=p.rating.value,v=p.review.value;n(WC(v,_))},f=d=>{d.preventDefault();const p=d.currentTarget,_=()=>{p.reset(),n(!0),s(!1)},v={offerId:e,body:{comment:p.review.value,rating:Number(p.rating.value)}};s(!0),de.promise(a(v).unwrap(),{pending:"Sending comment",success:{render(){return _(),"Comment sent"}},error:{render(){return s(!1),"Failed to send comment"}}})};return x.jsxs("form",{onSubmit:d=>f(d),onChange:d=>u(d),className:"reviews__form form",action:"#",method:"post",children:[x.jsx("label",{className:"reviews__label form__label",htmlFor:"review",children:"Your review"}),x.jsx(HC,{isDisabled:i}),x.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",disabled:i}),x.jsxs("div",{className:"reviews__button-wrapper",children:[x.jsxs("p",{className:"reviews__help",children:["To submit review please make sure to set ",x.jsx("span",{className:"reviews__star",children:"rating"})," and describe your stay with at least ",x.jsx("b",{className:"reviews__text-amount",children:"50 characters"}),"."]}),x.jsx("button",{className:"reviews__submit form__submit button",type:"submit",disabled:t||i,children:"Submit"})]})]})}function KC({offerId:e}){const t=Fe(Uo.authStatus);return x.jsxs("section",{className:"offer__reviews reviews",children:[e&&x.jsx(bC,{offerId:e}),t===Je.Auth&&e&&x.jsx(VC,{offerId:e})]})}const qC=6,GC=3;function YC({title:e="Offer"}){Jo(e);const{fetchOfferFullInfo:t}=qt(OC),{fetchOffersNear:n}=qt(RC),i=Fe(Bm.status),{offerId:s}=Qx();O.useEffect(()=>{s&&(t(s),n(s))},[t,n,s]);const a=Fe(Bm.offerFullInfo),u=Fe(zC.offersNear).slice(0,GC);if(i===ie.Loading)return x.jsx(eh,{});if(i===ie.Failed||!a)return x.jsx(my,{});const{images:f,isPremium:d,isFavorite:p,rating:_,type:v,bedrooms:S,maxAdults:k,price:P,goods:E,host:R,description:w,city:g}=a,y=br.find(N=>N.name===g.name);return x.jsxs("div",{className:"page",children:[x.jsx(ql,{}),x.jsxs("main",{className:"page__main page__main--offer",children:[x.jsxs("section",{className:"offer",children:[x.jsx("div",{className:"offer__gallery-container container",children:x.jsx("div",{className:"offer__gallery",children:f.slice(0,qC).map(N=>x.jsx("div",{className:"offer__image-wrapper",children:x.jsx("img",{className:"offer__image",src:N,alt:"Photo studio"})},N))})}),x.jsx("div",{className:"offer__container container",children:x.jsxs("div",{className:"offer__wrapper",children:[d&&x.jsx("div",{className:"offer__mark",children:x.jsx("span",{children:"Premium"})}),x.jsxs("div",{className:"offer__name-wrapper",children:[x.jsx("h1",{className:"offer__name",children:a.title}),x.jsx(fy,{offerId:s,componentType:"offer",isFavorite:p})]}),x.jsx(Xd,{componentType:"offer",rating:_}),x.jsxs("ul",{className:"offer__features",children:[x.jsx("li",{className:"offer__feature offer__feature--entire",children:nC(v)}),x.jsx("li",{className:"offer__feature offer__feature--bedrooms",children:`${S} Bedroom${S>1?"s":""}`}),x.jsx("li",{className:"offer__feature offer__feature--adults",children:`Max ${k} adult${k>1?"s":""}`})]}),x.jsxs("div",{className:"offer__price",children:[x.jsxs("b",{className:"offer__price-value",children:["€",P]}),x.jsx("span",{className:"offer__price-text",children:" night"})]}),x.jsxs("div",{className:"offer__inside",children:[x.jsx("h2",{className:"offer__inside-title",children:"What's inside"}),x.jsx("ul",{className:"offer__inside-list",children:E.map(N=>x.jsx("li",{className:"offer__inside-item",children:N},N))})]}),x.jsx(LC,{host:R,description:w}),x.jsx(KC,{offerId:s})]})}),y&&x.jsx(cy,{container:"offer",city:y,currentOffer:a,offers:u})]}),x.jsx("div",{className:"container",children:x.jsxs("section",{className:"near-places places",children:[x.jsx("h2",{className:"near-places__title",children:"Other places in the neighbourhood"}),x.jsx("div",{className:"near-places__list places__list",children:u.map(N=>x.jsx(Jd,{offer:N,componentType:"near-places"},N.id))})]})})]})]})}function QC(){const[e,t]=O.useState(""),[n,i]=O.useState(""),{login:s}=qt(Yd),a=u=>{u.preventDefault(),de.promise(s({email:e,password:n}).unwrap(),{pending:"Loading"})};return x.jsxs("form",{onSubmit:u=>a(u),className:"login__form form",action:"#",method:"post",children:[x.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[x.jsx("label",{className:"visually-hidden",children:"E-mail"}),x.jsx("input",{onChange:u=>t(u.target.value),className:"login__input form__input",type:"email",name:"email",placeholder:"Email",required:!0})]}),x.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[x.jsx("label",{className:"visually-hidden",children:"Password"}),x.jsx("input",{onChange:u=>i(u.target.value),className:"login__input form__input",type:"password",name:"password",placeholder:"Password",required:!0})]}),x.jsx("button",{className:"login__submit form__submit button",type:"submit",children:"Sign in"})]})}function XC({title:e="Login"}){return Jo(e),x.jsxs("div",{className:"page page--gray page--login",children:[x.jsx("header",{className:"header",children:x.jsx("div",{className:"container",children:x.jsx("div",{className:"header__wrapper",children:x.jsx("div",{className:"header__left",children:x.jsx(Dd,{})})})})}),x.jsx("main",{className:"page__main page__main--login",children:x.jsxs("div",{className:"page__login-container container",children:[x.jsxs("section",{className:"login",children:[x.jsx("h1",{className:"login__title",children:"Sign in"}),x.jsx(QC,{})]}),x.jsx("section",{className:"locations locations--login locations--current",children:x.jsx("div",{className:"locations__item",children:x.jsx("a",{className:"locations__item-link",href:"#",children:x.jsx("span",{children:"Amsterdam"})})})})]})})]})}const wy=(e,t)=>function({children:i}){const s=Fe(Uo.authStatus),a=fr();if(s===Je.Unknown)return x.jsx(eh,{});const u=(a.state??{}).from??t;return s===e?i:x.jsx(Pg,{to:u,state:{from:a.pathname}})},JC=wy(Je.Auth,tt.Login),eT=wy(Je.NoAuth,tt.Root);function tT(){return x.jsx(vS,{children:x.jsxs(fS,{children:[x.jsx(yr,{path:tt.Root,element:x.jsx(Pg,{to:TS})}),br.map(e=>x.jsx(yr,{path:tt.Root+e.slug,element:x.jsx(SC,{citySlug:e.slug})},e.slug)),x.jsx(yr,{path:tt.Login,element:x.jsx(eT,{children:x.jsx(XC,{})})}),x.jsx(yr,{path:tt.Favorites,element:x.jsx(JC,{children:x.jsx(kC,{})})}),x.jsx(yr,{path:`${tt.Offer}/:offerId`,element:x.jsx(YC,{})}),x.jsx(yr,{path:"/*",element:x.jsx(my,{})})]})})}function xy(e,t){return function(){return e.apply(t,arguments)}}const{toString:nT}=Object.prototype,{getPrototypeOf:th}=Object,Gl=(e=>t=>{const n=nT.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),cn=e=>(e=e.toLowerCase(),t=>Gl(t)===e),Yl=e=>t=>typeof t===e,{isArray:ji}=Array,Ko=Yl("undefined");function rT(e){return e!==null&&!Ko(e)&&e.constructor!==null&&!Ko(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Sy=cn("ArrayBuffer");function iT(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Sy(e.buffer),t}const oT=Yl("string"),Rt=Yl("function"),Ey=Yl("number"),Ql=e=>e!==null&&typeof e=="object",sT=e=>e===!0||e===!1,pa=e=>{if(Gl(e)!=="object")return!1;const t=th(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},aT=cn("Date"),lT=cn("File"),uT=cn("Blob"),cT=cn("FileList"),fT=e=>Ql(e)&&Rt(e.pipe),dT=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=Gl(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},hT=cn("URLSearchParams"),pT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function es(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),ji(e))for(i=0,s=e.length;i0;)if(s=n[i],t===s.toLowerCase())return s;return null}const Cy=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Ty=e=>!Ko(e)&&e!==Cy;function Mf(){const{caseless:e}=Ty(this)&&this||{},t={},n=(i,s)=>{const a=e&&Py(t,s)||s;pa(t[a])&&pa(i)?t[a]=Mf(t[a],i):pa(i)?t[a]=Mf({},i):ji(i)?t[a]=i.slice():t[a]=i};for(let i=0,s=arguments.length;i(es(t,(s,a)=>{n&&Rt(s)?e[a]=xy(s,n):e[a]=s},{allOwnKeys:i}),e),_T=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vT=(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)},gT=(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&&th(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},yT=(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},wT=e=>{if(!e)return null;if(ji(e))return e;let t=e.length;if(!Ey(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},xT=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&th(Uint8Array)),ST=(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])}},ET=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},PT=cn("HTMLFormElement"),CT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),Um=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),TT=cn("RegExp"),ky=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};es(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(i[a]=u||s)}),Object.defineProperties(e,i)},kT=e=>{ky(e,(t,n)=>{if(Rt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(Rt(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+"'")})}})},LT=(e,t)=>{const n={},i=s=>{s.forEach(a=>{n[a]=!0})};return ji(e)?i(e):i(String(e).split(t)),n},NT=()=>{},OT=(e,t)=>(e=+e,Number.isFinite(e)?e:t),wc="abcdefghijklmnopqrstuvwxyz",Zm="0123456789",Ly={DIGIT:Zm,ALPHA:wc,ALPHA_DIGIT:wc+wc.toUpperCase()+Zm},MT=(e=16,t=Ly.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function RT(e){return!!(e&&Rt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const zT=e=>{const t=new Array(10),n=(i,s)=>{if(Ql(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const a=ji(i)?[]:{};return es(i,(u,f)=>{const d=n(u,s+1);!Ko(d)&&(a[f]=d)}),t[s]=void 0,a}}return i};return n(e,0)},IT=cn("AsyncFunction"),AT=e=>e&&(Ql(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch),D={isArray:ji,isArrayBuffer:Sy,isBuffer:rT,isFormData:dT,isArrayBufferView:iT,isString:oT,isNumber:Ey,isBoolean:sT,isObject:Ql,isPlainObject:pa,isUndefined:Ko,isDate:aT,isFile:lT,isBlob:uT,isRegExp:TT,isFunction:Rt,isStream:fT,isURLSearchParams:hT,isTypedArray:xT,isFileList:cT,forEach:es,merge:Mf,extend:mT,trim:pT,stripBOM:_T,inherits:vT,toFlatObject:gT,kindOf:Gl,kindOfTest:cn,endsWith:yT,toArray:wT,forEachEntry:ST,matchAll:ET,isHTMLForm:PT,hasOwnProperty:Um,hasOwnProp:Um,reduceDescriptors:ky,freezeMethods:kT,toObjectSet:LT,toCamelCase:CT,noop:NT,toFiniteNumber:OT,findKey:Py,global:Cy,isContextDefined:Ty,ALPHABET:Ly,generateString:MT,isSpecCompliantForm:RT,toJSONObject:zT,isAsyncFn:IT,isThenable:AT};function ce(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)}D.inherits(ce,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:D.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ny=ce.prototype,Oy={};["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=>{Oy[e]={value:e}});Object.defineProperties(ce,Oy);Object.defineProperty(Ny,"isAxiosError",{value:!0});ce.from=(e,t,n,i,s,a)=>{const u=Object.create(Ny);return D.toFlatObject(e,u,function(d){return d!==Error.prototype},f=>f!=="isAxiosError"),ce.call(u,e.message,t,n,i,s),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};const jT=null;function Rf(e){return D.isPlainObject(e)||D.isArray(e)}function My(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Hm(e,t,n){return e?e.concat(t).map(function(s,a){return s=My(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function DT(e){return D.isArray(e)&&!e.some(Rf)}const bT=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function Xl(e,t,n){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,R){return!D.isUndefined(R[E])});const i=n.metaTokens,s=n.visitor||_,a=n.dots,u=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(s))throw new TypeError("visitor must be a function");function p(P){if(P===null)return"";if(D.isDate(P))return P.toISOString();if(!d&&D.isBlob(P))throw new ce("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(P)||D.isTypedArray(P)?d&&typeof Blob=="function"?new Blob([P]):Buffer.from(P):P}function _(P,E,R){let w=P;if(P&&!R&&typeof P=="object"){if(D.endsWith(E,"{}"))E=i?E:E.slice(0,-2),P=JSON.stringify(P);else if(D.isArray(P)&&DT(P)||(D.isFileList(P)||D.endsWith(E,"[]"))&&(w=D.toArray(P)))return E=My(E),w.forEach(function(y,N){!(D.isUndefined(y)||y===null)&&t.append(u===!0?Hm([E],N,a):u===null?E:E+"[]",p(y))}),!1}return Rf(P)?!0:(t.append(Hm(R,E,a),p(P)),!1)}const v=[],S=Object.assign(bT,{defaultVisitor:_,convertValue:p,isVisitable:Rf});function k(P,E){if(!D.isUndefined(P)){if(v.indexOf(P)!==-1)throw Error("Circular reference detected in "+E.join("."));v.push(P),D.forEach(P,function(w,g){(!(D.isUndefined(w)||w===null)&&s.call(t,w,D.isString(g)?g.trim():g,E,S))===!0&&k(w,E?E.concat(g):[g])}),v.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return k(e),t}function Wm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function nh(e,t){this._pairs=[],e&&Xl(e,this,t)}const Ry=nh.prototype;Ry.append=function(t,n){this._pairs.push([t,n])};Ry.toString=function(t){const n=t?function(i){return t.call(this,i,Wm)}:Wm;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function BT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zy(e,t,n){if(!t)return e;const i=n&&n.encode||BT,s=n&&n.serialize;let a;if(s?a=s(t,n):a=D.isURLSearchParams(t)?t.toString():new nh(t,n).toString(i),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class FT{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){D.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Vm=FT,Iy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$T=typeof URLSearchParams<"u"?URLSearchParams:nh,UT=typeof FormData<"u"?FormData:null,ZT=typeof Blob<"u"?Blob:null,HT={isBrowser:!0,classes:{URLSearchParams:$T,FormData:UT,Blob:ZT},protocols:["http","https","file","blob","url","data"]},Ay=typeof window<"u"&&typeof document<"u",WT=(e=>Ay&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),VT=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),KT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ay,hasStandardBrowserEnv:WT,hasStandardBrowserWebWorkerEnv:VT},Symbol.toStringTag,{value:"Module"})),sn={...KT,...HT};function qT(e,t){return Xl(e,new sn.classes.URLSearchParams,Object.assign({visitor:function(n,i,s,a){return sn.isNode&&D.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function GT(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function YT(e){const t={},n=Object.keys(e);let i;const s=n.length;let a;for(i=0;i=n.length;return u=!u&&D.isArray(s)?s.length:u,d?(D.hasOwnProp(s,u)?s[u]=[s[u],i]:s[u]=i,!f):((!s[u]||!D.isObject(s[u]))&&(s[u]=[]),t(n,i,s[u],a)&&D.isArray(s[u])&&(s[u]=YT(s[u])),!f)}if(D.isFormData(e)&&D.isFunction(e.entries)){const n={};return D.forEachEntry(e,(i,s)=>{t(GT(i),s,n,0)}),n}return null}function QT(e,t,n){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const rh={transitional:Iy,adapter:["xhr","http"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,a=D.isObject(t);if(a&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return s?JSON.stringify(jy(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.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 qT(t,this.formSerializer).toString();if((f=D.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Xl(f?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),QT(t)):t}],transformResponse:[function(t){const n=this.transitional||rh.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&D.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"?ce.from(f,ce.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:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],e=>{rh.headers[e]={}});const ih=rh,XT=D.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"]),JT=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]&&XT[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},Km=Symbol("internals");function oo(e){return e&&String(e).trim().toLowerCase()}function ma(e){return e===!1||e==null?e:D.isArray(e)?e.map(ma):String(e)}function ek(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 tk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function xc(e,t,n,i,s){if(D.isFunction(i))return i.call(this,t,n);if(s&&(t=n),!!D.isString(t)){if(D.isString(i))return t.indexOf(i)!==-1;if(D.isRegExp(i))return i.test(t)}}function nk(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function rk(e,t){const n=D.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 Jl{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function a(f,d,p){const _=oo(d);if(!_)throw new Error("header name must be a non-empty string");const v=D.findKey(s,_);(!v||s[v]===void 0||p===!0||p===void 0&&s[v]!==!1)&&(s[v||d]=ma(f))}const u=(f,d)=>D.forEach(f,(p,_)=>a(p,_,d));return D.isPlainObject(t)||t instanceof this.constructor?u(t,n):D.isString(t)&&(t=t.trim())&&!tk(t)?u(JT(t),n):t!=null&&a(n,t,i),this}get(t,n){if(t=oo(t),t){const i=D.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return ek(s);if(D.isFunction(n))return n.call(this,s,i);if(D.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=oo(t),t){const i=D.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||xc(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function a(u){if(u=oo(u),u){const f=D.findKey(i,u);f&&(!n||xc(i,i[f],f,n))&&(delete i[f],s=!0)}}return D.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||xc(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,i={};return D.forEach(this,(s,a)=>{const u=D.findKey(i,a);if(u){n[u]=ma(s),delete n[a];return}const f=t?nk(a):String(a).trim();f!==a&&delete n[a],n[f]=ma(s),i[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return D.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=t&&D.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[Km]=this[Km]={accessors:{}}).accessors,s=this.prototype;function a(u){const f=oo(u);i[f]||(rk(s,u),i[f]=!0)}return D.isArray(t)?t.forEach(a):a(t),this}}Jl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Jl.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});D.freezeMethods(Jl);const En=Jl;function Sc(e,t){const n=this||ih,i=t||n,s=En.from(i.headers);let a=i.data;return D.forEach(e,function(f){a=f.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Dy(e){return!!(e&&e.__CANCEL__)}function ts(e,t,n){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,n),this.name="CanceledError"}D.inherits(ts,ce,{__CANCEL__:!0});function ik(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new ce("Request failed with status code "+n.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const ok=sn.hasStandardBrowserEnv?{write(e,t,n,i,s,a){const u=[e+"="+encodeURIComponent(t)];D.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),D.isString(i)&&u.push("path="+i),D.isString(s)&&u.push("domain="+s),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function sk(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ak(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function by(e,t){return e&&!sk(t)?ak(e,t):t}const lk=sn.hasStandardBrowserEnv?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=D.isString(u)?s(u):u;return f.protocol===i.protocol&&f.host===i.host}}():function(){return function(){return!0}}();function uk(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ck(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(d){const p=Date.now(),_=i[a];u||(u=p),n[s]=d,i[s]=p;let v=a,S=0;for(;v!==s;)S+=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,d=i(f),p=a<=u;n=a;const _={loaded:a,total:u,progress:u?a/u:void 0,bytes:f,rate:d||void 0,estimated:d&&u&&p?(u-a)/d:void 0,event:s};_[t?"download":"upload"]=!0,e(_)}}const fk=typeof XMLHttpRequest<"u",dk=fk&&function(e){return new Promise(function(n,i){let s=e.data;const a=En.from(e.headers).normalize();let{responseType:u,withXSRFToken:f}=e,d;function p(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}let _;if(D.isFormData(s)){if(sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((_=a.getContentType())!==!1){const[E,...R]=_?_.split(";").map(w=>w.trim()).filter(Boolean):[];a.setContentType([E||"multipart/form-data",...R].join("; "))}}let v=new XMLHttpRequest;if(e.auth){const E=e.auth.username||"",R=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(E+":"+R))}const S=by(e.baseURL,e.url);v.open(e.method.toUpperCase(),zy(S,e.params,e.paramsSerializer),!0),v.timeout=e.timeout;function k(){if(!v)return;const E=En.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),w={data:!u||u==="text"||u==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:E,config:e,request:v};ik(function(y){n(y),p()},function(y){i(y),p()},w),v=null}if("onloadend"in v?v.onloadend=k:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(k)},v.onabort=function(){v&&(i(new ce("Request aborted",ce.ECONNABORTED,e,v)),v=null)},v.onerror=function(){i(new ce("Network Error",ce.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const w=e.transitional||Iy;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),i(new ce(R,w.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,v)),v=null},sn.hasStandardBrowserEnv&&(f&&D.isFunction(f)&&(f=f(e)),f||f!==!1&&lk(S))){const E=e.xsrfHeaderName&&e.xsrfCookieName&&ok.read(e.xsrfCookieName);E&&a.set(e.xsrfHeaderName,E)}s===void 0&&a.setContentType(null),"setRequestHeader"in v&&D.forEach(a.toJSON(),function(R,w){v.setRequestHeader(w,R)}),D.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),u&&u!=="json"&&(v.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&v.addEventListener("progress",qm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&v.upload&&v.upload.addEventListener("progress",qm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(d=E=>{v&&(i(!E||E.type?new ts(null,e,v):E),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d)));const P=uk(S);if(P&&sn.protocols.indexOf(P)===-1){i(new ce("Unsupported protocol "+P+":",ce.ERR_BAD_REQUEST,e));return}v.send(s||null)})},zf={http:jT,xhr:dk};D.forEach(zf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Gm=e=>`- ${e}`,hk=e=>D.isFunction(e)||e===null||e===!1,By={getAdapter:e=>{e=D.isArray(e)?e:[e];const{length:t}=e;let n,i;const s={};for(let a=0;a`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let u=t?a.length>1?`since : +***************************************************************************** */var rr=function(){return rr=Object.assign||function(t){for(var n,i=1,s=arguments.length;icrypto.randomUUID());return w.jsxs("section",{className:"cities__places places",children:[w.jsx("h2",{className:"visually-hidden",children:"Places"}),w.jsx("div",{style:{width:"100%"},children:w.jsxs(py,{speed:2,width:572,height:120,viewBox:"0 0 572 120",backgroundColor:"#f5f5f5",foregroundColor:"#ecebeb",children:[w.jsx("rect",{x:"2",y:"20",rx:"8",ry:"8",width:"450",height:"28"}),w.jsx("rect",{x:"2",y:"70",rx:"4",ry:"4",width:"100",height:"14"})]})}),w.jsx("div",{className:"cities__places-list places__list tabs__content",children:e.map(t=>w.jsx(_C,{},t))})]})}const gC=O.memo(vC);function yC({offersByCity:e,city:t}){const[n,i]=O.useState(sC),s=O.useCallback(p=>{i(p)},[i]),{setActiveOffer:a}=qt(uy),u=O.useCallback(p=>a(p),[]);if(Fe(el.status)===ie.Loading)return w.jsx(gC,{});if(e.length===0)return w.jsx("section",{className:"cities__no-places",children:w.jsxs("div",{className:"cities__status-wrapper tabs__content",children:[w.jsx("b",{className:"cities__status",children:"No places to stay available"}),w.jsxs("p",{className:"cities__status-description",children:["We could not find any property available at the moment in ",t.name]})]})});const d=aC(n,e);return w.jsxs("section",{className:"cities__places places",children:[w.jsx("h2",{className:"visually-hidden",children:"Places"}),w.jsxs("b",{className:"places__found",children:[e.length," place",e.length>1&&"s"," to stay in ",t==null?void 0:t.name]}),w.jsx(fC,{activeSortOption:n,setActiveSortOption:s}),w.jsx("div",{className:"cities__places-list places__list tabs__content",children:d.map(p=>w.jsx(Jd,{componentType:"cities",offer:p,onHoverCard:u},p.id))})]})}const wC="_container_qshx3_1",xC="_loader_qshx3_9",SC="_animloader_qshx3_1",bm={container:wC,loader:xC,animloader:SC};function eh(){return w.jsx("div",{className:bm.container,children:w.jsx("span",{className:bm.loader})})}function EC({title:e="Main",citySlug:t}){Jo(e);const{fetchOffers:n}=qt(uy),i=Fe(el.status),s=Fe(el.offers);O.useEffect(()=>{n().unwrap().catch(f=>{de.warning(f.message)})},[]);const a=dr.find(f=>f.slug===t);if(!a)return null;const u=s.filter(f=>f.city.name===a.name);return i===ie.Loading?w.jsx(eh,{}):w.jsxs("div",{className:Ar("page page--gray page--main",u.length===0&&"page__main--index-empty"),children:[w.jsx(ql,{}),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",{className:"locations__list tabs__list",children:w.jsx(GP,{})})})}),w.jsx("div",{className:"cities",children:w.jsxs("div",{className:Ar("cities__places-container container",u.length===0&&"cities__places-container--empty"),children:[w.jsx(yC,{offersByCity:u,city:a}),w.jsx("div",{className:"cities__right-section",children:a&&u.length>0&&w.jsx(cy,{container:"cities",city:a,offers:u})})]})})]})]})}const PC="_container_e270g_1",CC={container:PC};function my({title:e="404"}){return Jo(e),w.jsxs("div",{className:"page page--gray",children:[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(Dd,{})})})})}),w.jsxs("main",{className:CC.container,children:[w.jsxs("h1",{children:["Ошибка 404. ",w.jsx("br",{}),"Страница не найдена 😕"]}),w.jsxs(un,{to:"/",className:"locations__item-link",children:[" ","<- Вернуться на главную страницу"]})]})]})}function TC(){return w.jsx("footer",{className:"footer container",children:w.jsx(un,{className:"footer__logo-link",to:tt.Root,children:w.jsx("img",{className:"footer__logo",src:"img/logo.svg",alt:"6 cities logo",width:"64",height:"33"})})})}const _y=O.memo(TC);function kC(){return w.jsxs("div",{className:"page page--favorites-empty",children:[w.jsx(ql,{}),w.jsx("main",{className:"page__main page__main--favorites page__main--favorites-empty",children:w.jsx("div",{className:"page__favorites-container container",children:w.jsxs("section",{className:"favorites favorites--empty",children:[w.jsx("h1",{className:"visually-hidden",children:"Favorites (empty)"}),w.jsxs("div",{className:"favorites__status-wrapper",children:[w.jsx("b",{className:"favorites__status",children:"Nothing yet saved."}),w.jsx("p",{className:"favorites__status-description",children:"Save properties to narrow down search or plan your future trips."})]})]})})}),w.jsx(_y,{})]})}function LC({title:e="Favorites"}){var a;Jo(e);const{fetchFavorites:t}=qt(Qd),n=Fe(Wo.statusToggleFavorite),i=Fe(Wo.favorites);if(O.useEffect(()=>{(n===ie.Succeed||n===ie.Idle)&&t()},[t,n]),i.length===0)return w.jsx(kC,{});const s=Object.groupBy(i,({city:u})=>u.name);return w.jsxs("div",{className:"page",children:[w.jsx(ql,{}),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 listing"}),w.jsx("ul",{className:"favorites__list",children:(a=Object.keys(s))==null?void 0:a.map(u=>w.jsxs("li",{className:"favorites__locations-items",children:[w.jsx("div",{className:"favorites__locations locations locations--current",children:w.jsx("div",{className:"locations__item",children:w.jsx(un,{className:"locations__item-link",to:`${tt.Root}${rC(u)}`,children:w.jsx("span",{children:u})})})}),w.jsx("div",{className:"favorites__places",children:s[u].map(f=>w.jsx(Jd,{componentType:"favorites",offer:f},f.id))})]},u))})]})})}),w.jsx(_y,{})]})}function NC({host:e,description:t}){const{name:n,avatarUrl:i,isPro:s}=e;return 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:Ar("offer__avatar-wrapper user__avatar-wrapper",s&&"offer__avatar-wrapper--pro"),children:w.jsx("img",{className:"offer__avatar user__avatar",src:i,width:"74",height:"74",alt:"Host avatar"})}),w.jsx("span",{className:"offer__user-name",children:n}),s&&w.jsx("span",{className:"offer__user-status",children:"Pro"})]}),w.jsx("div",{className:"offer__description",children:w.jsx("p",{className:"offer__text",children:t})})]})}const OC={offerFullInfo:null,status:ie.Idle},tl=Ai({name:"offerFullInfo",initialState:OC,reducers:{},extraReducers:e=>{e.addCase(la.pending,t=>{t.status=ie.Loading}),e.addCase(la.fulfilled,(t,n)=>{t.offerFullInfo=n.payload,t.status=ie.Succeed}),e.addCase(la.rejected,t=>{t.status=ie.Failed})},selectors:{offerFullInfo:e=>e.offerFullInfo,status:e=>e.status}}),MC={...tl.actions,fetchOfferFullInfo:la},Bm=tl.selectors,RC={offersNear:[],status:ie.Idle},nl=Ai({name:"offersNear",initialState:RC,reducers:{},extraReducers:e=>{e.addCase(ua.pending,t=>{t.status=ie.Loading}),e.addCase(ua.fulfilled,(t,n)=>{t.offersNear=n.payload,t.status=ie.Succeed}),e.addCase(ua.rejected,t=>{t.status=ie.Failed})},selectors:{offersNear:e=>e.offersNear,status:e=>e.status}}),zC={...nl.actions,fetchOffersNear:ua},IC=nl.selectors,da=cn("data/fetchComments",async(e,{extra:t})=>{const{data:n}=await t.get(`${Gt.Comments}/${e}`);return n}),ha=cn("data/postComment",async({offerId:e,body:t},{extra:n})=>{const{data:i}=await n.post(`${Gt.Comments}/${e}`,t);return i}),AC={comments:[],status:ie.Idle,statusPostRequest:ie.Idle},Vo=Ai({name:"comments",initialState:AC,reducers:{},extraReducers:e=>{e.addCase(da.pending,t=>{t.status=ie.Loading}),e.addCase(da.fulfilled,(t,n)=>{t.comments=n.payload,t.status=ie.Succeed}),e.addCase(da.rejected,t=>{t.status=ie.Failed}),e.addCase(ha.pending,t=>{t.statusPostRequest=ie.Loading}),e.addCase(ha.fulfilled,t=>{t.statusPostRequest=ie.Succeed}),e.addCase(ha.rejected,t=>{t.statusPostRequest=ie.Failed})},selectors:{comments:e=>e.comments,status:e=>e.status,statusPostRequest:e=>e.statusPostRequest}}),vy={...Vo.actions,fetchComments:da,postComment:ha},Fm={...Vo.selectors,sortedComments:Qg(Vo.selectors.comments,e=>e.toSorted(lC))};var gy={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(e_,function(){var n=1e3,i=6e4,s=36e5,a="millisecond",u="second",f="minute",d="hour",p="day",_="week",v="month",S="quarter",k="year",P="date",E="Invalid Date",R=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var W=["th","st","nd","rd"],F=Y%100;return"["+Y+(W[(F-20)%10]||W[F]||W[0])+"]"}},y=function(Y,W,F){var K=String(Y);return!K||K.length>=W?Y:""+Array(W+1-K.length).join(F)+Y},N={s:y,z:function(Y){var W=-Y.utcOffset(),F=Math.abs(W),K=Math.floor(F/60),T=F%60;return(W<=0?"+":"-")+y(K,2,"0")+":"+y(T,2,"0")},m:function Y(W,F){if(W.date()1)return Y(A[0])}else{var H=W.name;b[H]=W,T=H}return!K&&T&&(j=T),T||!K&&j},V=function(Y,W){if(I(Y))return Y.clone();var F=typeof W=="object"?W:{};return F.date=Y,F.args=arguments,new ue(F)},G=N;G.l=X,G.i=I,G.w=function(Y,W){return V(Y,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var ue=function(){function Y(F){this.$L=X(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[$]=!0}var W=Y.prototype;return W.parse=function(F){this.$d=function(K){var T=K.date,U=K.utc;if(T===null)return new Date(NaN);if(G.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var A=T.match(R);if(A){var H=A[2]-1||0,J=(A[7]||"0").substring(0,3);return U?new Date(Date.UTC(A[1],H,A[3]||1,A[4]||0,A[5]||0,A[6]||0,J)):new Date(A[1],H,A[3]||1,A[4]||0,A[5]||0,A[6]||0,J)}}return new Date(T)}(F),this.init()},W.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},W.$utils=function(){return G},W.isValid=function(){return this.$d.toString()!==E},W.isSame=function(F,K){var T=V(F);return this.startOf(K)<=T&&T<=this.endOf(K)},W.isAfter=function(F,K){return V(F){t(e)},[n,e]),w.jsxs(w.Fragment,{children:[w.jsxs("h2",{className:"reviews__title",children:["Reviews · ",w.jsx("span",{className:"reviews__amount",children:s})]}),w.jsx("ul",{className:"reviews__list",children:s>0&&a.map(u=>w.jsx(DC,{review:u},u.id))})]})}const FC=50,$C=300;function UC({starTitle:e,starValue:t,isDisabled:n}){return w.jsxs(w.Fragment,{children:[w.jsx("input",{className:"form__rating-input visually-hidden",name:"rating",value:t,id:`${t}-stars`,type:"radio",disabled:n}),w.jsx("label",{htmlFor:`${t}-stars`,className:"reviews__rating-label form__rating-label",title:e,children:w.jsx("svg",{className:"form__star-image",width:"37",height:"33",children:w.jsx("use",{xlinkHref:"#icon-star"})})})]})}const ZC=O.memo(UC);function HC({isDisabled:e}){return w.jsx("div",{className:"reviews__rating-form form__rating",children:Object.entries(Tg).slice(1).map(([t,n])=>w.jsx(ZC,{starTitle:t,starValue:n,isDisabled:e},t))})}const WC=O.memo(HC),VC=(e,t)=>e.length<=FC||e.length>$C||Number(t)===Tg.unknown;function KC({offerId:e}){const[t,n]=O.useState(!0),[i,s]=O.useState(!1),{postComment:a}=qt(vy),u=d=>{const p=d.currentTarget,_=p.rating.value,v=p.review.value;n(VC(v,_))},f=d=>{d.preventDefault();const p=d.currentTarget,_=()=>{p.reset(),n(!0),s(!1)},v={offerId:e,body:{comment:p.review.value,rating:Number(p.rating.value)}};s(!0),de.promise(a(v).unwrap(),{pending:"Sending comment",success:{render(){return _(),"Comment sent"}},error:{render(){return s(!1),"Failed to send comment"}}})};return w.jsxs("form",{onSubmit:d=>f(d),onChange:d=>u(d),className:"reviews__form form",action:"#",method:"post",children:[w.jsx("label",{className:"reviews__label form__label",htmlFor:"review",children:"Your review"}),w.jsx(WC,{isDisabled:i}),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",disabled:i}),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:t||i,children:"Submit"})]})]})}function qC({offerId:e}){const t=Fe(Uo.authStatus);return w.jsxs("section",{className:"offer__reviews reviews",children:[e&&w.jsx(BC,{offerId:e}),t===Je.Auth&&e&&w.jsx(KC,{offerId:e})]})}const GC=6,YC=3;function QC({title:e="Offer"}){Jo(e);const{fetchOfferFullInfo:t}=qt(MC),{fetchOffersNear:n}=qt(zC),i=Fe(Bm.status),{offerId:s}=Qx();O.useEffect(()=>{s&&(t(s),n(s))},[t,n,s]);const a=Fe(Bm.offerFullInfo),u=Fe(IC.offersNear).slice(0,YC);if(i===ie.Loading)return w.jsx(eh,{});if(i===ie.Failed||!a)return w.jsx(my,{});const{images:f,isPremium:d,isFavorite:p,rating:_,type:v,bedrooms:S,maxAdults:k,price:P,goods:E,host:R,description:x,city:g}=a,y=dr.find(N=>N.name===g.name);return w.jsxs("div",{className:"page",children:[w.jsx(ql,{}),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:f.slice(0,GC).map(N=>w.jsx("div",{className:"offer__image-wrapper",children:w.jsx("img",{className:"offer__image",src:N,alt:"Photo studio"})},N))})}),w.jsx("div",{className:"offer__container container",children:w.jsxs("div",{className:"offer__wrapper",children:[d&&w.jsx("div",{className:"offer__mark",children:w.jsx("span",{children:"Premium"})}),w.jsxs("div",{className:"offer__name-wrapper",children:[w.jsx("h1",{className:"offer__name",children:a.title}),w.jsx(fy,{offerId:s,componentType:"offer",isFavorite:p})]}),w.jsx(Xd,{componentType:"offer",rating:_}),w.jsxs("ul",{className:"offer__features",children:[w.jsx("li",{className:"offer__feature offer__feature--entire",children:nC(v)}),w.jsx("li",{className:"offer__feature offer__feature--bedrooms",children:`${S} Bedroom${S>1?"s":""}`}),w.jsx("li",{className:"offer__feature offer__feature--adults",children:`Max ${k} adult${k>1?"s":""}`})]}),w.jsxs("div",{className:"offer__price",children:[w.jsxs("b",{className:"offer__price-value",children:["€",P]}),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.map(N=>w.jsx("li",{className:"offer__inside-item",children:N},N))})]}),w.jsx(NC,{host:R,description:x}),w.jsx(qC,{offerId:s})]})}),y&&w.jsx(cy,{container:"offer",city:y,currentOffer:a,offers:u})]}),w.jsx("div",{className:"container",children:w.jsxs("section",{className:"near-places places",children:[w.jsx("h2",{className:"near-places__title",children:"Other places in the neighbourhood"}),w.jsx("div",{className:"near-places__list places__list",children:u.map(N=>w.jsx(Jd,{offer:N,componentType:"near-places"},N.id))})]})})]})]})}function XC(){const[e,t]=O.useState(""),[n,i]=O.useState(""),{login:s}=qt(Yd),a=u=>{u.preventDefault(),de.promise(s({email:e,password:n}).unwrap(),{pending:"Loading"})};return w.jsxs("section",{className:"login",children:[w.jsx("h1",{className:"login__title",children:"Sign in"}),w.jsxs("form",{onSubmit:u=>a(u),className:"login__form form",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",{onChange:u=>t(u.target.value),className:"login__input form__input",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",{onChange:u=>i(u.target.value),className:"login__input form__input",type:"password",name:"password",placeholder:"Password",required:!0})]}),w.jsx("button",{className:"login__submit form__submit button",type:"submit",children:"Sign in"})]})]})}function JC(){const e=iC(dr);return w.jsx("section",{className:"locations locations--login locations--current",children:w.jsx("div",{className:"locations__item",children:w.jsx(un,{to:e.slug,className:"locations__item-link",children:w.jsx("span",{children:e.name})})})})}function eT({title:e="Login"}){return Jo(e),w.jsxs("div",{className:"page page--gray page--login",children:[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(Dd,{})})})})}),w.jsx("main",{className:"page__main page__main--login",children:w.jsxs("div",{className:"page__login-container container",children:[w.jsx(XC,{}),w.jsx(JC,{})]})})]})}const wy=(e,t)=>function({children:i}){const s=Fe(Uo.authStatus),a=fr();if(s===Je.Unknown)return w.jsx(eh,{});const u=(a.state??{}).from??t;return s===e?i:w.jsx(Pg,{to:u,state:{from:a.pathname}})},tT=wy(Je.Auth,tt.Login),nT=wy(Je.NoAuth,tt.Root);function rT(){return w.jsx(vS,{children:w.jsxs(fS,{children:[w.jsx(wr,{path:tt.Root,element:w.jsx(Pg,{to:TS})}),dr.map(e=>w.jsx(wr,{path:tt.Root+e.slug,element:w.jsx(EC,{citySlug:e.slug})},e.slug)),w.jsx(wr,{path:tt.Login,element:w.jsx(nT,{children:w.jsx(eT,{})})}),w.jsx(wr,{path:tt.Favorites,element:w.jsx(tT,{children:w.jsx(LC,{})})}),w.jsx(wr,{path:`${tt.Offer}/:offerId`,element:w.jsx(QC,{})}),w.jsx(wr,{path:"/*",element:w.jsx(my,{})})]})})}function xy(e,t){return function(){return e.apply(t,arguments)}}const{toString:iT}=Object.prototype,{getPrototypeOf:th}=Object,Gl=(e=>t=>{const n=iT.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fn=e=>(e=e.toLowerCase(),t=>Gl(t)===e),Yl=e=>t=>typeof t===e,{isArray:ji}=Array,Ko=Yl("undefined");function oT(e){return e!==null&&!Ko(e)&&e.constructor!==null&&!Ko(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Sy=fn("ArrayBuffer");function sT(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Sy(e.buffer),t}const aT=Yl("string"),Rt=Yl("function"),Ey=Yl("number"),Ql=e=>e!==null&&typeof e=="object",lT=e=>e===!0||e===!1,pa=e=>{if(Gl(e)!=="object")return!1;const t=th(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},uT=fn("Date"),cT=fn("File"),fT=fn("Blob"),dT=fn("FileList"),hT=e=>Ql(e)&&Rt(e.pipe),pT=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=Gl(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},mT=fn("URLSearchParams"),_T=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function es(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),ji(e))for(i=0,s=e.length;i0;)if(s=n[i],t===s.toLowerCase())return s;return null}const Cy=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Ty=e=>!Ko(e)&&e!==Cy;function Mf(){const{caseless:e}=Ty(this)&&this||{},t={},n=(i,s)=>{const a=e&&Py(t,s)||s;pa(t[a])&&pa(i)?t[a]=Mf(t[a],i):pa(i)?t[a]=Mf({},i):ji(i)?t[a]=i.slice():t[a]=i};for(let i=0,s=arguments.length;i(es(t,(s,a)=>{n&&Rt(s)?e[a]=xy(s,n):e[a]=s},{allOwnKeys:i}),e),gT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yT=(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)},wT=(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&&th(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xT=(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},ST=e=>{if(!e)return null;if(ji(e))return e;let t=e.length;if(!Ey(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ET=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&th(Uint8Array)),PT=(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])}},CT=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},TT=fn("HTMLFormElement"),kT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),Um=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),LT=fn("RegExp"),ky=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};es(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(i[a]=u||s)}),Object.defineProperties(e,i)},NT=e=>{ky(e,(t,n)=>{if(Rt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(Rt(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+"'")})}})},OT=(e,t)=>{const n={},i=s=>{s.forEach(a=>{n[a]=!0})};return ji(e)?i(e):i(String(e).split(t)),n},MT=()=>{},RT=(e,t)=>(e=+e,Number.isFinite(e)?e:t),wc="abcdefghijklmnopqrstuvwxyz",Zm="0123456789",Ly={DIGIT:Zm,ALPHA:wc,ALPHA_DIGIT:wc+wc.toUpperCase()+Zm},zT=(e=16,t=Ly.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function IT(e){return!!(e&&Rt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const AT=e=>{const t=new Array(10),n=(i,s)=>{if(Ql(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const a=ji(i)?[]:{};return es(i,(u,f)=>{const d=n(u,s+1);!Ko(d)&&(a[f]=d)}),t[s]=void 0,a}}return i};return n(e,0)},jT=fn("AsyncFunction"),DT=e=>e&&(Ql(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch),D={isArray:ji,isArrayBuffer:Sy,isBuffer:oT,isFormData:pT,isArrayBufferView:sT,isString:aT,isNumber:Ey,isBoolean:lT,isObject:Ql,isPlainObject:pa,isUndefined:Ko,isDate:uT,isFile:cT,isBlob:fT,isRegExp:LT,isFunction:Rt,isStream:hT,isURLSearchParams:mT,isTypedArray:ET,isFileList:dT,forEach:es,merge:Mf,extend:vT,trim:_T,stripBOM:gT,inherits:yT,toFlatObject:wT,kindOf:Gl,kindOfTest:fn,endsWith:xT,toArray:ST,forEachEntry:PT,matchAll:CT,isHTMLForm:TT,hasOwnProperty:Um,hasOwnProp:Um,reduceDescriptors:ky,freezeMethods:NT,toObjectSet:OT,toCamelCase:kT,noop:MT,toFiniteNumber:RT,findKey:Py,global:Cy,isContextDefined:Ty,ALPHABET:Ly,generateString:zT,isSpecCompliantForm:IT,toJSONObject:AT,isAsyncFn:jT,isThenable:DT};function ce(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)}D.inherits(ce,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:D.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ny=ce.prototype,Oy={};["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=>{Oy[e]={value:e}});Object.defineProperties(ce,Oy);Object.defineProperty(Ny,"isAxiosError",{value:!0});ce.from=(e,t,n,i,s,a)=>{const u=Object.create(Ny);return D.toFlatObject(e,u,function(d){return d!==Error.prototype},f=>f!=="isAxiosError"),ce.call(u,e.message,t,n,i,s),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};const bT=null;function Rf(e){return D.isPlainObject(e)||D.isArray(e)}function My(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Hm(e,t,n){return e?e.concat(t).map(function(s,a){return s=My(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function BT(e){return D.isArray(e)&&!e.some(Rf)}const FT=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function Xl(e,t,n){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,R){return!D.isUndefined(R[E])});const i=n.metaTokens,s=n.visitor||_,a=n.dots,u=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(s))throw new TypeError("visitor must be a function");function p(P){if(P===null)return"";if(D.isDate(P))return P.toISOString();if(!d&&D.isBlob(P))throw new ce("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(P)||D.isTypedArray(P)?d&&typeof Blob=="function"?new Blob([P]):Buffer.from(P):P}function _(P,E,R){let x=P;if(P&&!R&&typeof P=="object"){if(D.endsWith(E,"{}"))E=i?E:E.slice(0,-2),P=JSON.stringify(P);else if(D.isArray(P)&&BT(P)||(D.isFileList(P)||D.endsWith(E,"[]"))&&(x=D.toArray(P)))return E=My(E),x.forEach(function(y,N){!(D.isUndefined(y)||y===null)&&t.append(u===!0?Hm([E],N,a):u===null?E:E+"[]",p(y))}),!1}return Rf(P)?!0:(t.append(Hm(R,E,a),p(P)),!1)}const v=[],S=Object.assign(FT,{defaultVisitor:_,convertValue:p,isVisitable:Rf});function k(P,E){if(!D.isUndefined(P)){if(v.indexOf(P)!==-1)throw Error("Circular reference detected in "+E.join("."));v.push(P),D.forEach(P,function(x,g){(!(D.isUndefined(x)||x===null)&&s.call(t,x,D.isString(g)?g.trim():g,E,S))===!0&&k(x,E?E.concat(g):[g])}),v.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return k(e),t}function Wm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function nh(e,t){this._pairs=[],e&&Xl(e,this,t)}const Ry=nh.prototype;Ry.append=function(t,n){this._pairs.push([t,n])};Ry.toString=function(t){const n=t?function(i){return t.call(this,i,Wm)}:Wm;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function $T(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zy(e,t,n){if(!t)return e;const i=n&&n.encode||$T,s=n&&n.serialize;let a;if(s?a=s(t,n):a=D.isURLSearchParams(t)?t.toString():new nh(t,n).toString(i),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class UT{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){D.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Vm=UT,Iy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ZT=typeof URLSearchParams<"u"?URLSearchParams:nh,HT=typeof FormData<"u"?FormData:null,WT=typeof Blob<"u"?Blob:null,VT={isBrowser:!0,classes:{URLSearchParams:ZT,FormData:HT,Blob:WT},protocols:["http","https","file","blob","url","data"]},Ay=typeof window<"u"&&typeof document<"u",KT=(e=>Ay&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),qT=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),GT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ay,hasStandardBrowserEnv:KT,hasStandardBrowserWebWorkerEnv:qT},Symbol.toStringTag,{value:"Module"})),sn={...GT,...VT};function YT(e,t){return Xl(e,new sn.classes.URLSearchParams,Object.assign({visitor:function(n,i,s,a){return sn.isNode&&D.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function QT(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function XT(e){const t={},n=Object.keys(e);let i;const s=n.length;let a;for(i=0;i=n.length;return u=!u&&D.isArray(s)?s.length:u,d?(D.hasOwnProp(s,u)?s[u]=[s[u],i]:s[u]=i,!f):((!s[u]||!D.isObject(s[u]))&&(s[u]=[]),t(n,i,s[u],a)&&D.isArray(s[u])&&(s[u]=XT(s[u])),!f)}if(D.isFormData(e)&&D.isFunction(e.entries)){const n={};return D.forEachEntry(e,(i,s)=>{t(QT(i),s,n,0)}),n}return null}function JT(e,t,n){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const rh={transitional:Iy,adapter:["xhr","http"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,a=D.isObject(t);if(a&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return s?JSON.stringify(jy(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.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 YT(t,this.formSerializer).toString();if((f=D.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Xl(f?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),JT(t)):t}],transformResponse:[function(t){const n=this.transitional||rh.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&D.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"?ce.from(f,ce.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:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],e=>{rh.headers[e]={}});const ih=rh,ek=D.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"]),tk=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]&&ek[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},Km=Symbol("internals");function oo(e){return e&&String(e).trim().toLowerCase()}function ma(e){return e===!1||e==null?e:D.isArray(e)?e.map(ma):String(e)}function nk(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 rk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function xc(e,t,n,i,s){if(D.isFunction(i))return i.call(this,t,n);if(s&&(t=n),!!D.isString(t)){if(D.isString(i))return t.indexOf(i)!==-1;if(D.isRegExp(i))return i.test(t)}}function ik(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function ok(e,t){const n=D.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 Jl{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function a(f,d,p){const _=oo(d);if(!_)throw new Error("header name must be a non-empty string");const v=D.findKey(s,_);(!v||s[v]===void 0||p===!0||p===void 0&&s[v]!==!1)&&(s[v||d]=ma(f))}const u=(f,d)=>D.forEach(f,(p,_)=>a(p,_,d));return D.isPlainObject(t)||t instanceof this.constructor?u(t,n):D.isString(t)&&(t=t.trim())&&!rk(t)?u(tk(t),n):t!=null&&a(n,t,i),this}get(t,n){if(t=oo(t),t){const i=D.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return nk(s);if(D.isFunction(n))return n.call(this,s,i);if(D.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=oo(t),t){const i=D.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||xc(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function a(u){if(u=oo(u),u){const f=D.findKey(i,u);f&&(!n||xc(i,i[f],f,n))&&(delete i[f],s=!0)}}return D.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||xc(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,i={};return D.forEach(this,(s,a)=>{const u=D.findKey(i,a);if(u){n[u]=ma(s),delete n[a];return}const f=t?ik(a):String(a).trim();f!==a&&delete n[a],n[f]=ma(s),i[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return D.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=t&&D.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[Km]=this[Km]={accessors:{}}).accessors,s=this.prototype;function a(u){const f=oo(u);i[f]||(ok(s,u),i[f]=!0)}return D.isArray(t)?t.forEach(a):a(t),this}}Jl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Jl.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});D.freezeMethods(Jl);const Pn=Jl;function Sc(e,t){const n=this||ih,i=t||n,s=Pn.from(i.headers);let a=i.data;return D.forEach(e,function(f){a=f.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Dy(e){return!!(e&&e.__CANCEL__)}function ts(e,t,n){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,n),this.name="CanceledError"}D.inherits(ts,ce,{__CANCEL__:!0});function sk(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new ce("Request failed with status code "+n.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const ak=sn.hasStandardBrowserEnv?{write(e,t,n,i,s,a){const u=[e+"="+encodeURIComponent(t)];D.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),D.isString(i)&&u.push("path="+i),D.isString(s)&&u.push("domain="+s),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function lk(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function uk(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function by(e,t){return e&&!lk(t)?uk(e,t):t}const ck=sn.hasStandardBrowserEnv?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=D.isString(u)?s(u):u;return f.protocol===i.protocol&&f.host===i.host}}():function(){return function(){return!0}}();function fk(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dk(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(d){const p=Date.now(),_=i[a];u||(u=p),n[s]=d,i[s]=p;let v=a,S=0;for(;v!==s;)S+=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,d=i(f),p=a<=u;n=a;const _={loaded:a,total:u,progress:u?a/u:void 0,bytes:f,rate:d||void 0,estimated:d&&u&&p?(u-a)/d:void 0,event:s};_[t?"download":"upload"]=!0,e(_)}}const hk=typeof XMLHttpRequest<"u",pk=hk&&function(e){return new Promise(function(n,i){let s=e.data;const a=Pn.from(e.headers).normalize();let{responseType:u,withXSRFToken:f}=e,d;function p(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}let _;if(D.isFormData(s)){if(sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((_=a.getContentType())!==!1){const[E,...R]=_?_.split(";").map(x=>x.trim()).filter(Boolean):[];a.setContentType([E||"multipart/form-data",...R].join("; "))}}let v=new XMLHttpRequest;if(e.auth){const E=e.auth.username||"",R=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(E+":"+R))}const S=by(e.baseURL,e.url);v.open(e.method.toUpperCase(),zy(S,e.params,e.paramsSerializer),!0),v.timeout=e.timeout;function k(){if(!v)return;const E=Pn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),x={data:!u||u==="text"||u==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:E,config:e,request:v};sk(function(y){n(y),p()},function(y){i(y),p()},x),v=null}if("onloadend"in v?v.onloadend=k:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(k)},v.onabort=function(){v&&(i(new ce("Request aborted",ce.ECONNABORTED,e,v)),v=null)},v.onerror=function(){i(new ce("Network Error",ce.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const x=e.transitional||Iy;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),i(new ce(R,x.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,v)),v=null},sn.hasStandardBrowserEnv&&(f&&D.isFunction(f)&&(f=f(e)),f||f!==!1&&ck(S))){const E=e.xsrfHeaderName&&e.xsrfCookieName&&ak.read(e.xsrfCookieName);E&&a.set(e.xsrfHeaderName,E)}s===void 0&&a.setContentType(null),"setRequestHeader"in v&&D.forEach(a.toJSON(),function(R,x){v.setRequestHeader(x,R)}),D.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),u&&u!=="json"&&(v.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&v.addEventListener("progress",qm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&v.upload&&v.upload.addEventListener("progress",qm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(d=E=>{v&&(i(!E||E.type?new ts(null,e,v):E),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d)));const P=fk(S);if(P&&sn.protocols.indexOf(P)===-1){i(new ce("Unsupported protocol "+P+":",ce.ERR_BAD_REQUEST,e));return}v.send(s||null)})},zf={http:bT,xhr:pk};D.forEach(zf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Gm=e=>`- ${e}`,mk=e=>D.isFunction(e)||e===null||e===!1,By={getAdapter:e=>{e=D.isArray(e)?e:[e];const{length:t}=e;let n,i;const s={};for(let a=0;a`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let u=t?a.length>1?`since : `+a.map(Gm).join(` -`):" "+Gm(a[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:zf};function Ec(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ts(null,e)}function Ym(e){return Ec(e),e.headers=En.from(e.headers),e.data=Sc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),By.getAdapter(e.adapter||ih.adapter)(e).then(function(i){return Ec(e),i.data=Sc.call(e,e.transformResponse,i),i.headers=En.from(i.headers),i},function(i){return Dy(i)||(Ec(e),i&&i.response&&(i.response.data=Sc.call(e,e.transformResponse,i.response),i.response.headers=En.from(i.response.headers))),Promise.reject(i)})}const Qm=e=>e instanceof En?{...e}:e;function Ni(e,t){t=t||{};const n={};function i(p,_,v){return D.isPlainObject(p)&&D.isPlainObject(_)?D.merge.call({caseless:v},p,_):D.isPlainObject(_)?D.merge({},_):D.isArray(_)?_.slice():_}function s(p,_,v){if(D.isUndefined(_)){if(!D.isUndefined(p))return i(void 0,p,v)}else return i(p,_,v)}function a(p,_){if(!D.isUndefined(_))return i(void 0,_)}function u(p,_){if(D.isUndefined(_)){if(!D.isUndefined(p))return i(void 0,p)}else return i(void 0,_)}function f(p,_,v){if(v in t)return i(p,_);if(v in e)return i(void 0,p)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken: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,_)=>s(Qm(p),Qm(_),!0)};return D.forEach(Object.keys(Object.assign({},e,t)),function(_){const v=d[_]||s,S=v(e[_],t[_],_);D.isUndefined(S)&&v!==f||(n[_]=S)}),n}const Fy="1.6.8",oh={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{oh[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Xm={};oh.transitional=function(t,n,i){function s(a,u){return"[Axios v"+Fy+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,f)=>{if(t===!1)throw new ce(s(u," has been removed"+(n?" in "+n:"")),ce.ERR_DEPRECATED);return n&&!Xm[u]&&(Xm[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 pk(e,t,n){if(typeof e!="object")throw new ce("options must be an object",ce.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],d=f===void 0||u(f,a,e);if(d!==!0)throw new ce("option "+a+" must be "+d,ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ce("Unknown option "+a,ce.ERR_BAD_OPTION)}}const If={assertOptions:pk,validators:oh},Bn=If.validators;class rl{constructor(t){this.defaults=t,this.interceptors={request:new Vm,response:new Vm}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=` -`+a):i.stack=a}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ni(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:a}=n;i!==void 0&&If.assertOptions(i,{silentJSONParsing:Bn.transitional(Bn.boolean),forcedJSONParsing:Bn.transitional(Bn.boolean),clarifyTimeoutError:Bn.transitional(Bn.boolean)},!1),s!=null&&(D.isFunction(s)?n.paramsSerializer={serialize:s}:If.assertOptions(s,{encode:Bn.function,serialize:Bn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&D.merge(a.common,a[n.method]);a&&D.forEach(["delete","get","head","post","put","patch","common"],P=>{delete a[P]}),n.headers=En.concat(u,a);const f=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(d=d&&E.synchronous,f.unshift(E.fulfilled,E.rejected))});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let _,v=0,S;if(!d){const P=[Ym.bind(this),void 0];for(P.unshift.apply(P,f),P.push.apply(P,p),S=P.length,_=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 ts(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 sh(function(s){t=s}),cancel:t}}}const mk=sh;function _k(e){return function(n){return e.apply(null,n)}}function vk(e){return D.isObject(e)&&e.isAxiosError===!0}const Af={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(Af).forEach(([e,t])=>{Af[t]=e});const gk=Af;function $y(e){const t=new _a(e),n=xy(_a.prototype.request,t);return D.extend(n,_a.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return $y(Ni(e,s))},n}const De=$y(ih);De.Axios=_a;De.CanceledError=ts;De.CancelToken=mk;De.isCancel=Dy;De.VERSION=Fy;De.toFormData=Xl;De.AxiosError=ce;De.Cancel=De.CanceledError;De.all=function(t){return Promise.all(t)};De.spread=_k;De.isAxiosError=vk;De.mergeConfig=Ni;De.AxiosHeaders=En;De.formToJSON=e=>jy(D.isHTMLForm(e)?new FormData(e):e);De.getAdapter=By.getAdapter;De.HttpStatusCode=gk;De.default=De;const yk=De,wk=()=>{const e=yk.create({baseURL:SS,timeout:ES});return e.interceptors.request.use(t=>{const n=ry();return n&&t.headers&&(t.headers["x-token"]=n),t},t=>{throw t.response&&de.error(t.response.data.message),t}),e.interceptors.response.use(t=>t,t=>{throw t.response&&!t.response.config.headers["x-no-toast"]&&de.error(t.response.data.message,{toastId:"error"}),t}),e},xk=wk(),Sk=$g({[Ja.name]:Ja.reducer,[tl.name]:tl.reducer,[Vo.name]:Vo.reducer,[nl.name]:nl.reducer,[Ya.name]:Ya.reducer,[Xa.name]:Xa.reducer}),Uy=sP({reducer:Sk,middleware:e=>e({thunk:{extraArgument:xk}})});"groupBy"in Object||(Object.groupBy=(e,t)=>Array.from(e).reduce((n,i,s)=>{const a=t(i,s);return n[a]=n[a]??[],n[a].push(i),n},{}));const Ek=Pc.createRoot(document.getElementById("root"));Uy.dispatch(Yd[ry()?"checkAuth":"setNoAuthStatus"]());Ek.render(x.jsx(_e.StrictMode,{children:x.jsxs(wE,{store:Uy,children:[x.jsx(WP,{position:"top-center",autoClose:CS,hideProgressBar:!0}),x.jsx(tT,{})]})})); +`):" "+Gm(a[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:zf};function Ec(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ts(null,e)}function Ym(e){return Ec(e),e.headers=Pn.from(e.headers),e.data=Sc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),By.getAdapter(e.adapter||ih.adapter)(e).then(function(i){return Ec(e),i.data=Sc.call(e,e.transformResponse,i),i.headers=Pn.from(i.headers),i},function(i){return Dy(i)||(Ec(e),i&&i.response&&(i.response.data=Sc.call(e,e.transformResponse,i.response),i.response.headers=Pn.from(i.response.headers))),Promise.reject(i)})}const Qm=e=>e instanceof Pn?{...e}:e;function Ni(e,t){t=t||{};const n={};function i(p,_,v){return D.isPlainObject(p)&&D.isPlainObject(_)?D.merge.call({caseless:v},p,_):D.isPlainObject(_)?D.merge({},_):D.isArray(_)?_.slice():_}function s(p,_,v){if(D.isUndefined(_)){if(!D.isUndefined(p))return i(void 0,p,v)}else return i(p,_,v)}function a(p,_){if(!D.isUndefined(_))return i(void 0,_)}function u(p,_){if(D.isUndefined(_)){if(!D.isUndefined(p))return i(void 0,p)}else return i(void 0,_)}function f(p,_,v){if(v in t)return i(p,_);if(v in e)return i(void 0,p)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken: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,_)=>s(Qm(p),Qm(_),!0)};return D.forEach(Object.keys(Object.assign({},e,t)),function(_){const v=d[_]||s,S=v(e[_],t[_],_);D.isUndefined(S)&&v!==f||(n[_]=S)}),n}const Fy="1.6.8",oh={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{oh[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Xm={};oh.transitional=function(t,n,i){function s(a,u){return"[Axios v"+Fy+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,f)=>{if(t===!1)throw new ce(s(u," has been removed"+(n?" in "+n:"")),ce.ERR_DEPRECATED);return n&&!Xm[u]&&(Xm[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 _k(e,t,n){if(typeof e!="object")throw new ce("options must be an object",ce.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],d=f===void 0||u(f,a,e);if(d!==!0)throw new ce("option "+a+" must be "+d,ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ce("Unknown option "+a,ce.ERR_BAD_OPTION)}}const If={assertOptions:_k,validators:oh},Bn=If.validators;class rl{constructor(t){this.defaults=t,this.interceptors={request:new Vm,response:new Vm}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=` +`+a):i.stack=a}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ni(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:a}=n;i!==void 0&&If.assertOptions(i,{silentJSONParsing:Bn.transitional(Bn.boolean),forcedJSONParsing:Bn.transitional(Bn.boolean),clarifyTimeoutError:Bn.transitional(Bn.boolean)},!1),s!=null&&(D.isFunction(s)?n.paramsSerializer={serialize:s}:If.assertOptions(s,{encode:Bn.function,serialize:Bn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&D.merge(a.common,a[n.method]);a&&D.forEach(["delete","get","head","post","put","patch","common"],P=>{delete a[P]}),n.headers=Pn.concat(u,a);const f=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(d=d&&E.synchronous,f.unshift(E.fulfilled,E.rejected))});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let _,v=0,S;if(!d){const P=[Ym.bind(this),void 0];for(P.unshift.apply(P,f),P.push.apply(P,p),S=P.length,_=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 ts(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 sh(function(s){t=s}),cancel:t}}}const vk=sh;function gk(e){return function(n){return e.apply(null,n)}}function yk(e){return D.isObject(e)&&e.isAxiosError===!0}const Af={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(Af).forEach(([e,t])=>{Af[t]=e});const wk=Af;function $y(e){const t=new _a(e),n=xy(_a.prototype.request,t);return D.extend(n,_a.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return $y(Ni(e,s))},n}const De=$y(ih);De.Axios=_a;De.CanceledError=ts;De.CancelToken=vk;De.isCancel=Dy;De.VERSION=Fy;De.toFormData=Xl;De.AxiosError=ce;De.Cancel=De.CanceledError;De.all=function(t){return Promise.all(t)};De.spread=gk;De.isAxiosError=yk;De.mergeConfig=Ni;De.AxiosHeaders=Pn;De.formToJSON=e=>jy(D.isHTMLForm(e)?new FormData(e):e);De.getAdapter=By.getAdapter;De.HttpStatusCode=wk;De.default=De;const xk=De,Sk=()=>{const e=xk.create({baseURL:SS,timeout:ES});return e.interceptors.request.use(t=>{const n=ry();return n&&t.headers&&(t.headers["x-token"]=n),t},t=>{throw t.response&&de.error(t.response.data.message),t}),e.interceptors.response.use(t=>t,t=>{throw t.response&&!t.response.config.headers["x-no-toast"]&&de.error(t.response.data.message,{toastId:"error"}),t}),e},Ek=Sk(),Pk=$g({[Ja.name]:Ja.reducer,[tl.name]:tl.reducer,[Vo.name]:Vo.reducer,[nl.name]:nl.reducer,[Ya.name]:Ya.reducer,[Xa.name]:Xa.reducer}),Uy=sP({reducer:Pk,middleware:e=>e({thunk:{extraArgument:Ek}})});"groupBy"in Object||(Object.groupBy=(e,t)=>Array.from(e).reduce((n,i,s)=>{const a=t(i,s);return n[a]=n[a]??[],n[a].push(i),n},{}));const Ck=Pc.createRoot(document.getElementById("root"));Uy.dispatch(Yd[ry()?"checkAuth":"setNoAuthStatus"]());Ck.render(w.jsx(_e.StrictMode,{children:w.jsxs(wE,{store:Uy,children:[w.jsx(WP,{position:"top-center",autoClose:CS,hideProgressBar:!0}),w.jsx(rT,{})]})})); diff --git a/12/index.html b/12/index.html index 60f8f67..8cbdd92 100644 --- a/12/index.html +++ b/12/index.html @@ -7,7 +7,7 @@ 6 cities - +