diff --git a/14/assets/index-273fbbe7.js b/14/assets/index-273fbbe7.js new file mode 100644 index 0000000..eac6250 --- /dev/null +++ b/14/assets/index-273fbbe7.js @@ -0,0 +1,106 @@ +var W0=Object.defineProperty;var V0=(e,t,n)=>t in e?W0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ju=(e,t,n)=>(V0(e,typeof t!="symbol"?t+"":t,n),n);function Gm(e,t){for(var n=0;ni[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();var Ym=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xm={exports:{}},el={},Jm={exports:{}},ue={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Wo=Symbol.for("react.element"),K0=Symbol.for("react.portal"),q0=Symbol.for("react.fragment"),G0=Symbol.for("react.strict_mode"),Y0=Symbol.for("react.profiler"),Q0=Symbol.for("react.provider"),X0=Symbol.for("react.context"),J0=Symbol.for("react.forward_ref"),ew=Symbol.for("react.suspense"),tw=Symbol.for("react.memo"),nw=Symbol.for("react.lazy"),np=Symbol.iterator;function rw(e){return e===null||typeof e!="object"?null:(e=np&&e[np]||e["@@iterator"],typeof e=="function"?e:null)}var e_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},t_=Object.assign,n_={};function Ni(e,t,n){this.props=e,this.context=t,this.refs=n_,this.updater=n||e_}Ni.prototype.isReactComponent={};Ni.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ni.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function r_(){}r_.prototype=Ni.prototype;function If(e,t,n){this.props=e,this.context=t,this.refs=n_,this.updater=n||e_}var Af=If.prototype=new r_;Af.constructor=If;t_(Af,Ni.prototype);Af.isPureReactComponent=!0;var rp=Array.isArray,i_=Object.prototype.hasOwnProperty,jf={current:null},o_={key:!0,ref:!0,__self:!0,__source:!0};function s_(e,t,n){var i,s={},a=null,u=null;if(t!=null)for(i in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(a=""+t.key),t)i_.call(t,i)&&!o_.hasOwnProperty(i)&&(s[i]=t[i]);var f=arguments.length-2;if(f===1)s.children=n;else if(1>>1,J=T[H];if(0>>1;Hs(te,j))ies(ye,te)?(T[H]=ye,T[ie]=j,H=ie):(T[H]=te,T[ee]=j,H=ee);else if(ies(ye,j))T[H]=ye,T[ie]=j,H=ie;else break e}}return U}function s(T,U){var j=T.sortIndex-U.sortIndex;return j!==0?j: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=[],v=1,_=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(I);else{var U=n(p);U!==null&&K(N,U.startTime-T)}}function I(T,U){P=!1,E&&(E=!1,w(A),A=-1),k=!0;var j=S;try{for(y(U),_=n(d);_!==null&&(!(_.expirationTime>U)||T&&!G());){var H=_.callback;if(typeof H=="function"){_.callback=null,S=_.priorityLevel;var J=H(_.expirationTime<=U);U=e.unstable_now(),typeof J=="function"?_.callback=J:_===n(d)&&i(d),y(U)}else i(d);_=n(d)}if(_!==null)var re=!0;else{var ee=n(p);ee!==null&&K(N,ee.startTime-U),re=!1}return re}finally{_=null,S=j,k=!1}}var B=!1,$=null,A=-1,X=5,V=-1;function G(){return!(e.unstable_now()-VT||125H?(T.sortIndex=j,t(p,T),n(d)===null&&T===n(p)&&(E?(w(A),A=-1):E=!0,K(N,j-H))):(T.sortIndex=J,t(d,T),P||k||(P=!0,F(I))),T},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(T){var U=S;return function(){var j=S;S=U;try{return T.apply(this,arguments)}finally{S=j}}}})(c_);u_.exports=c_;var mw=u_.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var f_=M,gt=mw;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"),xc=Object.prototype.hasOwnProperty,_w=/^[: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]*$/,op={},sp={};function vw(e){return xc.call(sp,e)?!0:xc.call(op,e)?!1:_w.test(e)?sp[e]=!0:(op[e]=!0,!1)}function gw(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 yw(e,t,n,i){if(t===null||typeof t>"u"||gw(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 qe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){qe[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];qe[t]=new at(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){qe[e]=new at(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){qe[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){qe[e]=new at(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){qe[e]=new at(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){qe[e]=new at(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){qe[e]=new at(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){qe[e]=new at(e,5,!1,e.toLowerCase(),null,!1,!1)});var bf=/[\-:]([a-z])/g;function Bf(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(bf,Bf);qe[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(bf,Bf);qe[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(bf,Bf);qe[t]=new at(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){qe[e]=new at(e,1,!1,e.toLowerCase(),null,!1,!1)});qe.xlinkHref=new at("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){qe[e]=new at(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ff(e,t,n,i){var s=qe.hasOwnProperty(t)?qe[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{Bu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?oo(e):""}function ww(e){switch(e.tag){case 5:return oo(e.type);case 16:return oo("Lazy");case 13:return oo("Suspense");case 19:return oo("SuspenseList");case 0:case 2:case 15:return e=Fu(e.type,!1),e;case 11:return e=Fu(e.type.render,!1),e;case 1:return e=Fu(e.type,!0),e;default:return""}}function Cc(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 ei:return"Fragment";case Jr:return"Portal";case Sc:return"Profiler";case $f:return"StrictMode";case Ec:return"Suspense";case Pc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case p_:return(e.displayName||"Context")+".Consumer";case h_:return(e._context.displayName||"Context")+".Provider";case Uf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zf:return t=e.displayName||null,t!==null?t:Cc(e.type)||"Memo";case Fn:t=e._payload,e=e._init;try{return Cc(e(t))}catch{}}return null}function xw(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 Cc(t);case 8:return t===$f?"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 rr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function __(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Sw(e){var t=__(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){i=""+u,a.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(u){i=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ts(e){e._valueTracker||(e._valueTracker=Sw(e))}function v_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=__(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function pa(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 Tc(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function lp(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=rr(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function g_(e,t){t=t.checked,t!=null&&Ff(e,"checked",t,!1)}function kc(e,t){g_(e,t);var n=rr(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")?Lc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Lc(e,t.type,rr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function up(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 Lc(e,t,n){(t!=="number"||pa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var so=Array.isArray;function di(e,t,n,i){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=ks.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function So(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var co={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},Ew=["Webkit","ms","Moz","O"];Object.keys(co).forEach(function(e){Ew.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),co[t]=co[e]})});function S_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||co.hasOwnProperty(e)&&co[e]?(""+t).trim():t+"px"}function E_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,s=S_(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}var Pw=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 Mc(e,t){if(t){if(Pw[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 Rc(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 zc=null;function Hf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ic=null,hi=null,pi=null;function dp(e){if(e=qo(e)){if(typeof Ic!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=ol(t),Ic(e.stateNode,e.type,t))}}function P_(e){hi?pi?pi.push(e):pi=[e]:hi=e}function C_(){if(hi){var e=hi,t=pi;if(pi=hi=null,dp(e),t)for(e=0;e>>=0,e===0?32:31-(Aw(e)/jw|0)|0}var Ls=64,Ns=4194304;function ao(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ga(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,s=e.suspendedLanes,a=e.pingedLanes,u=n&268435455;if(u!==0){var f=u&~s;f!==0?i=ao(f):(a&=u,a!==0&&(i=ao(a)))}else u=n&~s,u!==0?i=ao(u):a!==0&&(i=ao(a));if(i===0)return 0;if(t!==0&&t!==i&&!(t&s)&&(s=i&-i,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(i&4&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0n;n++)t.push(e);return t}function Vo(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 Fw(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=ho),xp=String.fromCharCode(32),Sp=!1;function W_(e,t){switch(e){case"keyup":return p1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ti=!1;function _1(e,t){switch(e){case"compositionend":return V_(t);case"keypress":return t.which!==32?null:(Sp=!0,xp);case"textInput":return e=t.data,e===xp&&Sp?null:e;default:return null}}function v1(e,t){if(ti)return e==="compositionend"||!Xf&&W_(e,t)?(e=Z_(),qs=Gf=Hn=null,ti=!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=Tp(n)}}function Y_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Y_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Q_(){for(var e=window,t=pa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pa(e.document)}return t}function Jf(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 T1(e){var t=Q_(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Y_(n.ownerDocument.documentElement,n)){if(i!==null&&Jf(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=kp(n,a);var u=kp(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,ni=null,Fc=null,mo=null,$c=!1;function Lp(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$c||ni==null||ni!==pa(i)||(i=ni,"selectionStart"in i&&Jf(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}),mo&&Lo(mo,i)||(mo=i,i=xa(Fc,"onSelect"),0oi||(e.current=Kc[oi],Kc[oi]=null,oi--)}function xe(e,t){oi++,Kc[oi]=e.current,e.current=t}var ir={},et=lr(ir),ct=lr(!1),kr=ir;function yi(e,t){var n=e.type.contextTypes;if(!n)return ir;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 Ea(){Ee(ct),Ee(et)}function Ap(e,t,n){if(et.current!==ir)throw Error(Z(168));xe(et,t),xe(ct,n)}function sv(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var s in i)if(!(s in t))throw Error(Z(108,xw(e)||"Unknown",s));return Le({},n,i)}function Pa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ir,kr=et.current,xe(et,e),xe(ct,ct.current),!0}function jp(e,t,n){var i=e.stateNode;if(!i)throw Error(Z(169));n?(e=sv(e,t,kr),i.__reactInternalMemoizedMergedChildContext=e,Ee(ct),Ee(et),xe(et,e)):Ee(ct),xe(ct,n)}var yn=null,sl=!1,ec=!1;function av(e){yn===null?yn=[e]:yn.push(e)}function b1(e){sl=!0,av(e)}function ur(){if(!ec&&yn!==null){ec=!0;var e=0,t=ve;try{var n=yn;for(ve=1;e>=u,s-=u,wn=1<<32-Wt(t)+s|n<A?(X=$,$=null):X=$.sibling;var V=S(w,$,y[A],N);if(V===null){$===null&&($=X);break}e&&$&&V.alternate===null&&t(w,$),g=a(V,g,A),B===null?I=V:B.sibling=V,B=V,$=X}if(A===y.length)return n(w,$),Pe&&vr(w,A),I;if($===null){for(;AA?(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,A),B===null?I=G:B.sibling=G,B=G,$=X}if(V.done)return n(w,$),Pe&&vr(w,A),I;if($===null){for(;!V.done;A++,V=y.next())V=_(w,V.value,N),V!==null&&(g=a(V,g,A),B===null?I=V:B.sibling=V,B=V);return Pe&&vr(w,A),I}for($=i(w,$);!V.done;A++,V=y.next())V=k($,w,A,V.value,N),V!==null&&(e&&V.alternate!==null&&$.delete(V.key===null?A:V.key),g=a(V,g,A),B===null?I=V:B.sibling=V,B=V);return e&&$.forEach(function(ce){return t(w,ce)}),Pe&&vr(w,A),I}function R(w,g,y,N){if(typeof y=="object"&&y!==null&&y.type===ei&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Cs:e:{for(var I=y.key,B=g;B!==null;){if(B.key===I){if(I=y.type,I===ei){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===I||typeof I=="object"&&I!==null&&I.$$typeof===Fn&&Zp(I)===B.type){n(w,B.sibling),g=s(B,y.props),g.ref=to(w,B,y),g.return=w,w=g;break e}n(w,B);break}else t(w,B);B=B.sibling}y.type===ei?(g=Cr(y.props.children,w.mode,N,y.key),g.return=w,w=g):(N=na(y.type,y.key,y.props,null,w.mode,N),N.ref=to(w,g,y),N.return=w,w=N)}return u(w);case Jr: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=lc(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(so(y))return P(w,g,y,N);if(Yi(y))return E(w,g,y,N);js(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=ac(y,w.mode,N),g.return=w,w=g),u(w)):n(w,g)}return R}var xi=mv(!0),_v=mv(!1),Go={},an=lr(Go),Ro=lr(Go),zo=lr(Go);function Er(e){if(e===Go)throw Error(Z(174));return e}function ld(e,t){switch(xe(zo,t),xe(Ro,e),xe(an,Go),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Oc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Oc(t,e)}Ee(an),xe(an,t)}function Si(){Ee(an),Ee(Ro),Ee(zo)}function vv(e){Er(zo.current);var t=Er(an.current),n=Oc(t,e.type);t!==n&&(xe(Ro,e),xe(an,n))}function ud(e){Ro.current===e&&(Ee(an),Ee(Ro))}var Te=lr(0);function Oa(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var tc=[];function cd(){for(var e=0;en?n:4,e(!0);var i=nc.transition;nc.transition={};try{e(!1),t()}finally{ve=n,nc.transition=i}}function zv(){return It().memoizedState}function U1(e,t,n){var i=er(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Iv(e))Av(t,n);else if(n=fv(e,t,n,i),n!==null){var s=it();Vt(n,e,i,s),jv(n,t,i)}}function Z1(e,t,n){var i=er(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Iv(e))Av(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,sd(t)):(s.next=d.next,d.next=s),t.interleaved=s;return}}catch{}finally{}n=fv(e,t,s,i),n!==null&&(s=it(),Vt(n,e,i,s),jv(n,t,i))}}function Iv(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function Av(e,t){_o=Ma=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function jv(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Vf(e,n)}}var Ra={readContext:zt,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},H1={readContext:zt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Wp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Xs(4194308,4,Lv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xs(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=nn();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=U1.bind(null,ke,e),[i.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:Hp,useDebugValue:md,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=Hp(!1),t=e[0];return e=$1.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=ke,s=nn();if(Pe){if(n===void 0)throw Error(Z(407));n=n()}else{if(n=t(),Ze===null)throw Error(Z(349));Nr&30||wv(i,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,Wp(Sv.bind(null,i,a,e),[e]),i.flags|=2048,jo(9,xv.bind(null,i,a,n,t),void 0,null),n},useId:function(){var e=nn(),t=Ze.identifierPrefix;if(Pe){var n=xn,i=wn;n=(i&~(1<<32-Wt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Io++,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[rn]=t,e[Mo]=i,Wv(e,t,!1,!1),t.stateNode=e;e:{switch(u=Rc(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;sPi&&(t.flags|=128,i=!0,no(a,!1),t.lanes=4194304)}else{if(!i)if(e=Oa(u),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),no(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Pe)return Qe(t),null}else 2*Re()-a.renderingStartTime>Pi&&n!==1073741824&&(t.flags|=128,i=!0,no(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):(Qe(t),null);case 22:case 23:return xd(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?pt&1073741824&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function X1(e,t){switch(td(t),t.tag){case 1:return ft(t.type)&&Ea(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Si(),Ee(ct),Ee(et),cd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ud(t),null;case 13:if(Ee(Te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Te),null;case 4:return Si(),null;case 10:return od(t.type._context),null;case 22:case 23:return xd(),null;case 24:return null;default:return null}}var bs=!1,Xe=!1,J1=typeof WeakSet=="function"?WeakSet:Set,Q=null;function ui(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 sf(e,t,n){try{n()}catch(i){Oe(e,t,i)}}var em=!1;function ex(e,t){if(Uc=ya,e=Q_(),Jf(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,v=0,_=e,S=null;t:for(;;){for(var k;_!==n||s!==0&&_.nodeType!==3||(f=u+s),_!==a||i!==0&&_.nodeType!==3||(d=u+i),_.nodeType===3&&(u+=_.nodeValue.length),(k=_.firstChild)!==null;)S=_,_=k;for(;;){if(_===e)break t;if(S===n&&++p===s&&(f=u),S===a&&++v===i&&(d=u),(k=_.nextSibling)!==null)break;_=S,S=_.parentNode}_=k}n=f===-1||d===-1?null:{start:f,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zc={focusedElem:e,selectionRange:n},ya=!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=em,em=!1,P}function vo(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&&sf(t,n,a)}s=s.next}while(s!==i)}}function ul(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 af(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 qv(e){var t=e.alternate;t!==null&&(e.alternate=null,qv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[Mo],delete t[Vc],delete t[j1],delete t[D1])),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 Gv(e){return e.tag===5||e.tag===3||e.tag===4}function tm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gv(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 lf(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=Sa));else if(i!==4&&(e=e.child,e!==null))for(lf(e,t,n),e=e.sibling;e!==null;)lf(e,t,n),e=e.sibling}function uf(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(uf(e,t,n),e=e.sibling;e!==null;)uf(e,t,n),e=e.sibling}var Ve=null,Ut=!1;function bn(e,t,n){for(n=n.child;n!==null;)Yv(e,t,n),n=n.sibling}function Yv(e,t,n){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(tl,n)}catch{}switch(n.tag){case 5:Xe||ui(n,t);case 6:var i=Ve,s=Ut;Ve=null,bn(e,t,n),Ve=i,Ut=s,Ve!==null&&(Ut?(e=Ve,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ve.removeChild(n.stateNode));break;case 18:Ve!==null&&(Ut?(e=Ve,n=n.stateNode,e.nodeType===8?Ju(e.parentNode,n):e.nodeType===1&&Ju(e,n),To(e)):Ju(Ve,n.stateNode));break;case 4:i=Ve,s=Ut,Ve=n.stateNode.containerInfo,Ut=!0,bn(e,t,n),Ve=i,Ut=s;break;case 0:case 11:case 14:case 15:if(!Xe&&(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)&&sf(n,t,u),s=s.next}while(s!==i)}bn(e,t,n);break;case 1:if(!Xe&&(ui(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?(Xe=(i=Xe)||n.memoizedState!==null,bn(e,t,n),Xe=i):bn(e,t,n);break;default:bn(e,t,n)}}function nm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new J1),t.forEach(function(i){var s=ux.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*nx(i/1960))-i,10e?16:e,Wn===null)var i=!1;else{if(e=Wn,Wn=null,Aa=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()-yd?Pr(e,0):gd|=n),dt(e,t)}function ig(e,t){t===0&&(e.mode&1?(t=Ns,Ns<<=1,!(Ns&130023424)&&(Ns=4194304)):t=1);var n=it();e=kn(e,t),e!==null&&(Vo(e,t,n),dt(e,n))}function lx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ig(e,n)}function ux(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),ig(e,n)}var og;og=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,Y1(e,t,n);ut=!!(e.flags&131072)}else ut=!1,Pe&&t.flags&1048576&&lv(t,Ta,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Js(e,t),e=t.pendingProps;var s=yi(t,et.current);_i(t,n),s=dd(null,t,i,e,s,n);var a=hd();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,Pa(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ad(t),s.updater=al,t.stateNode=s,s._reactInternals=t,Xc(t,i,e,n),t=tf(null,t,i,!0,a,n)):(t.tag=0,Pe&&a&&ed(t),tt(null,t,s,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Js(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=fx(i),e=$t(i,e),s){case 0:t=ef(null,t,i,e,n);break e;case 1:t=Qp(null,t,i,e,n);break e;case 11:t=Gp(null,t,i,e,n);break e;case 14:t=Yp(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),ef(e,t,i,s,n);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),Qp(e,t,i,s,n);case 3:e:{if(Uv(t),e===null)throw Error(Z(387));i=t.pendingProps,a=t.memoizedState,s=a.element,dv(e,t),Na(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=Ei(Error(Z(423)),t),t=Xp(e,t,i,n,s);break e}else if(i!==s){s=Ei(Error(Z(424)),t),t=Xp(e,t,i,n,s);break e}else for(mt=Qn(t.stateNode.containerInfo.firstChild),vt=t,Pe=!0,Zt=null,n=_v(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wi(),i===s){t=Ln(e,t,n);break e}tt(e,t,i,n)}t=t.child}return t;case 5:return vv(t),e===null&&Gc(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,Hc(i,s)?u=null:a!==null&&Hc(i,a)&&(t.flags|=32),$v(e,t),tt(e,t,u,n),t.child;case 6:return e===null&&Gc(t),null;case 13:return Zv(e,t,n);case 4:return ld(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=xi(t,null,i,n):tt(e,t,i,n),t.child;case 11:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),Gp(e,t,i,s,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(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(ka,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 v=p.pending;v===null?d.next=d:(d.next=v.next,v.next=d),p.pending=d}}a.lanes|=n,d=a.alternate,d!==null&&(d.lanes|=n),Yc(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),Yc(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}tt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,_i(t,n),s=zt(s),i=i(s),t.flags|=1,tt(e,t,i,n),t.child;case 14:return i=t.type,s=$t(i,t.pendingProps),s=$t(i.type,s),Yp(e,t,i,s,n);case 15:return Bv(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),Js(e,t),t.tag=1,ft(i)?(e=!0,Pa(t)):e=!1,_i(t,n),pv(t,i,s),Xc(t,i,s,n),tf(null,t,i,!0,e,n);case 19:return Hv(e,t,n);case 22:return Fv(e,t,n)}throw Error(Z(156,t.tag))};function sg(e,t){return R_(e,t)}function cx(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 cx(e,t,n,i)}function Ed(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fx(e){if(typeof e=="function")return Ed(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uf)return 11;if(e===Zf)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 na(e,t,n,i,s,a){var u=2;if(i=e,typeof e=="function")Ed(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case ei:return Cr(n.children,s,a,t);case $f:u=8,s|=8;break;case Sc:return e=Ot(12,n,t,s|2),e.elementType=Sc,e.lanes=a,e;case Ec:return e=Ot(13,n,t,s),e.elementType=Ec,e.lanes=a,e;case Pc:return e=Ot(19,n,t,s),e.elementType=Pc,e.lanes=a,e;case m_:return fl(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case h_:u=10;break e;case p_:u=9;break e;case Uf:u=11;break e;case Zf: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 fl(e,t,n,i){return e=Ot(22,e,i,t),e.elementType=m_,e.lanes=n,e.stateNode={isHidden:!1},e}function ac(e,t,n){return e=Ot(6,e,null,t),e.lanes=n,e}function lc(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 dx(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=Uu(0),this.expirationTimes=Uu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uu(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Pd(e,t,n,i,s,a,u,f,d){return e=new dx(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},ad(a),e}function hx(e,t,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cg)}catch(e){console.error(e)}}cg(),l_.exports=xt;var fg=l_.exports,cm=fg;wc.createRoot=cm.createRoot,wc.hydrateRoot=cm.hydrateRoot;/** + * @remix-run/router v1.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * 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 Ld(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function yx(){return Math.random().toString(36).substr(2,8)}function dm(e,t){return{usr:e.state,key:e.key,idx:t}}function pf(e,t,n,i){return n===void 0&&(n=null),bo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ri(t):t,{state:n,key:t&&t.key||i||yx()})}function ba(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 Ri(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 wx(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=v();p==null&&(p=0,u.replaceState(bo({},u.state,{idx:p}),""));function v(){return(u.state||{idx:null}).idx}function _(){f=Vn.Pop;let R=v(),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=pf(E.location,R,w);n&&n(g,R),p=v()+1;let y=dm(g,p),N=E.createHref(g);try{u.pushState(y,"",N)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;s.location.assign(N)}a&&d&&d({action:f,location:E.location,delta:1})}function k(R,w){f=Vn.Replace;let g=pf(E.location,R,w);n&&n(g,R),p=v();let y=dm(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:ba(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(fm,_),d=R,()=>{s.removeEventListener(fm,_),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 hm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(hm||(hm={}));function xx(e,t,n){n===void 0&&(n="/");let i=typeof t=="string"?Ri(t):t,s=Nd(i.pathname||"/",n);if(s==null)return null;let a=dg(e);Sx(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]),v=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+'".')),dg(a.children,t,v,p)),!(a.path==null&&!a.index)&&t.push({path:p,score:Nx(p,a.index),routesMeta:v})};return e.forEach((a,u)=>{var f;if(a.path===""||!((f=a.path)!=null&&f.includes("?")))s(a,u);else for(let d of hg(a.path))s(a,u,d)}),t}function hg(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=hg(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 Sx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ox(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const Ex=/^:\w+$/,Px=3,Cx=2,Tx=1,kx=10,Lx=-2,pm=e=>e==="*";function Nx(e,t){let n=e.split("/"),i=n.length;return n.some(pm)&&(i+=Lx),t&&(i+=Cx),n.filter(s=>!pm(s)).reduce((s,a)=>s+(Ex.test(a)?Px:a===""?Tx:kx),i)}function Ox(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 Mx(e,t){let{routesMeta:n}=e,i={},s="/",a=[];for(let u=0;u{if(v==="*"){let S=f[_]||"";u=a.slice(0,a.length-S.length).replace(/(.)\/+$/,"$1")}return p[v]=Ax(f[_]||"",v),p},{}),pathname:a,pathnameBase:u,pattern:e}}function zx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ld(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 Ix(e){try{return decodeURI(e)}catch(t){return Ld(!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 Ax(e,t){try{return decodeURIComponent(e)}catch(n){return Ld(!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 Nd(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 jx(e,t){t===void 0&&(t="/");let{pathname:n,search:i="",hash:s=""}=typeof e=="string"?Ri(e):e;return{pathname:n?n.startsWith("/")?n:Dx(n,t):t,search:Bx(i),hash:Fx(s)}}function Dx(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 uc(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 Od(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Md(e,t,n,i){i===void 0&&(i=!1);let s;typeof e=="string"?s=Ri(e):(s=bo({},e),ze(!s.pathname||!s.pathname.includes("?"),uc("?","pathname","search",s)),ze(!s.pathname||!s.pathname.includes("#"),uc("#","pathname","hash",s)),ze(!s.search||!s.search.includes("#"),uc("#","search","hash",s)));let a=e===""||s.pathname==="",u=a?"/":s.pathname,f;if(i||u==null)f=n;else{let _=t.length-1;if(u.startsWith("..")){let S=u.split("/");for(;S[0]==="..";)S.shift(),_-=1;s.pathname=S.join("/")}f=_>=0?t[_]:"/"}let d=jx(s,f),p=u&&u!=="/"&&u.endsWith("/"),v=(a||u===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(p||v)&&(d.pathname+="/"),d}const nr=e=>e.join("/").replace(/\/\/+/g,"/"),bx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Bx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $x(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const pg=["post","put","patch","delete"];new Set(pg);const Ux=["get",...pg];new Set(Ux);/** + * React Router v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ba(){return Ba=Object.assign?Object.assign.bind():function(e){for(var t=1;td.pathnameBase)),u=M.useRef(!1);return vg(()=>{u.current=!0}),M.useCallback(function(d,p){if(p===void 0&&(p={}),!u.current)return;if(typeof d=="number"){n.go(d);return}let v=Md(d,JSON.parse(a),s,p.relative==="path");e==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:nr([t,v.pathname])),(p.replace?n.replace:n.push)(v,p.state,p)},[t,n,a,s,e])}function Wx(){let{matches:e}=M.useContext(Mn),t=e[e.length-1];return t?t.params:{}}function Id(e,t){let{relative:n}=t===void 0?{}:t,{matches:i}=M.useContext(Mn),{pathname:s}=cr(),a=JSON.stringify(Od(i).map(u=>u.pathnameBase));return M.useMemo(()=>Md(e,JSON.parse(a),s,n==="path"),[e,a,s,n])}function Vx(e,t){return Kx(e,t)}function Kx(e,t,n){zi()||ze(!1);let{navigator:i}=M.useContext(jr),{matches:s}=M.useContext(Mn),a=s[s.length-1],u=a?a.params:{};a&&a.pathname;let f=a?a.pathnameBase:"/";a&&a.route;let d=cr(),p;if(t){var v;let E=typeof t=="string"?Ri(t):t;f==="/"||(v=E.pathname)!=null&&v.startsWith(f)||ze(!1),p=E}else p=d;let _=p.pathname||"/",S=f==="/"?_:_.slice(f.length)||"/",k=xx(e,{pathname:S}),P=Xx(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?M.createElement(_l.Provider,{value:{location:Ba({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Vn.Pop}},P):P}function qx(){let e=nS(),t=$x(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 M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),n?M.createElement("pre",{style:s},n):null,a)}const Gx=M.createElement(qx,null);class Yx extends M.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?M.createElement(Mn.Provider,{value:this.props.routeContext},M.createElement(_g.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Qx(e){let{routeContext:t,match:n,children:i}=e,s=M.useContext(Rd);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),M.createElement(Mn.Provider,{value:t},i)}function Xx(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 v=d.route.id?u==null?void 0:u[d.route.id]:null,_=null;n&&(_=d.route.errorElement||Gx);let S=t.concat(a.slice(0,p+1)),k=()=>{let P;return v?P=_:d.route.Component?P=M.createElement(d.route.Component,null):d.route.element?P=d.route.element:P=f,M.createElement(Qx,{match:d,routeContext:{outlet:f,matches:S,isDataRoute:n!=null},children:P})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?M.createElement(Yx,{location:n.location,revalidation:n.revalidation,component:_,error:v,children:k(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):k()},null)}var gg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(gg||{}),Fa=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}(Fa||{});function Jx(e){let t=M.useContext(Rd);return t||ze(!1),t}function eS(e){let t=M.useContext(mg);return t||ze(!1),t}function tS(e){let t=M.useContext(Mn);return t||ze(!1),t}function yg(e){let t=tS(),n=t.matches[t.matches.length-1];return n.route.id||ze(!1),n.route.id}function nS(){var e;let t=M.useContext(_g),n=eS(Fa.UseRouteError),i=yg(Fa.UseRouteError);return t||((e=n.errors)==null?void 0:e[i])}function rS(){let{router:e}=Jx(gg.UseNavigateStable),t=yg(Fa.UseNavigateStable),n=M.useRef(!1);return vg(()=>{n.current=!0}),M.useCallback(function(s,a){a===void 0&&(a={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ba({fromRouteId:t},a)))},[e,t])}function wg(e){let{to:t,replace:n,state:i,relative:s}=e;zi()||ze(!1);let{matches:a}=M.useContext(Mn),{pathname:u}=cr(),f=zd(),d=Md(t,Od(a).map(v=>v.pathnameBase),u,s==="path"),p=JSON.stringify(d);return M.useEffect(()=>f(JSON.parse(p),{replace:n,state:i,relative:s}),[f,p,s,n,i]),null}function yr(e){ze(!1)}function iS(e){let{basename:t="/",children:n=null,location:i,navigationType:s=Vn.Pop,navigator:a,static:u=!1}=e;zi()&&ze(!1);let f=t.replace(/^\/*/,"/"),d=M.useMemo(()=>({basename:f,navigator:a,static:u}),[f,a,u]);typeof i=="string"&&(i=Ri(i));let{pathname:p="/",search:v="",hash:_="",state:S=null,key:k="default"}=i,P=M.useMemo(()=>{let E=Nd(p,f);return E==null?null:{location:{pathname:E,search:v,hash:_,state:S,key:k},navigationType:s}},[f,p,v,_,S,k,s]);return P==null?null:M.createElement(jr.Provider,{value:d},M.createElement(_l.Provider,{children:n,value:P}))}function oS(e){let{children:t,location:n}=e;return Vx(mf(t),n)}new Promise(()=>{});function mf(e,t){t===void 0&&(t=[]);let n=[];return M.Children.forEach(e,(i,s)=>{if(!M.isValidElement(i))return;let a=[...t,s];if(i.type===M.Fragment){n.push.apply(n,mf(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=mf(i.props.children,a)),n.push(u)}),n}/** + * React Router DOM v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function sS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function aS(e,t){return e.button===0&&(!t||t==="_self")&&!sS(e)}const lS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],uS=["aria-current","caseSensitive","className","end","style","to","children"],cS="startTransition",mm=lw[cS];function fS(e){let{basename:t,children:n,future:i,window:s}=e,a=M.useRef();a.current==null&&(a.current=gx({window:s,v5Compat:!0}));let u=a.current,[f,d]=M.useState({action:u.action,location:u.location}),{v7_startTransition:p}=i||{},v=M.useCallback(_=>{p&&mm?mm(()=>d(_)):d(_)},[d,p]);return M.useLayoutEffect(()=>u.listen(v),[u,v]),M.createElement(iS,{basename:t,children:n,location:f.location,navigationType:f.action,navigator:u})}const dS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ln=M.forwardRef(function(t,n){let{onClick:i,relative:s,reloadDocument:a,replace:u,state:f,target:d,to:p,preventScrollReset:v}=t,_=xg(t,lS),{basename:S}=M.useContext(jr),k,P=!1;if(typeof p=="string"&&hS.test(p)&&(k=p,dS))try{let g=new URL(window.location.href),y=p.startsWith("//")?new URL(g.protocol+p):new URL(p),N=Nd(y.pathname,S);y.origin===g.origin&&N!=null?p=N+y.search+y.hash:P=!0}catch{}let E=Zx(p,{relative:s}),R=mS(p,{replace:u,state:f,target:d,preventScrollReset:v,relative:s});function w(g){i&&i(g),g.defaultPrevented||R(g)}return M.createElement("a",$a({},_,{href:k||E,onClick:P||a?i:w,ref:n,target:d}))}),pS=M.forwardRef(function(t,n){let{"aria-current":i="page",caseSensitive:s=!1,className:a="",end:u=!1,style:f,to:d,children:p}=t,v=xg(t,uS),_=Id(d,{relative:v.relative}),S=cr(),k=M.useContext(mg),{navigator:P}=M.useContext(jr),E=P.encodeLocation?P.encodeLocation(_).pathname:_.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,I;typeof a=="function"?I=a({isActive:g,isPending:y}):I=[a,g?"active":null,y?"pending":null].filter(Boolean).join(" ");let B=typeof f=="function"?f({isActive:g,isPending:y}):f;return M.createElement(ln,$a({},v,{"aria-current":N,className:I,ref:n,style:B,to:d}),typeof p=="function"?p({isActive:g,isPending:y}):p)});var _m;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(_m||(_m={}));var vm;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(vm||(vm={}));function mS(e,t){let{target:n,replace:i,state:s,preventScrollReset:a,relative:u}=t===void 0?{}:t,f=zd(),d=cr(),p=Id(e,{relative:u});return M.useCallback(v=>{if(aS(v,n)){v.preventDefault();let _=i!==void 0?i:ba(d)===ba(p);f(e,{replace:_,state:s,preventScrollReset:a,relative:u})}},[d,f,p,i,s,n,e,a,u])}const _S="https://15.design.htmlacademy.pro/six-cities",vS=5e3,gS=2e3,Sg={unknown:0,perfect:5,good:4,"not bad":3,badly:2,terribly:1},fr=[{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"}],yS=fr[0].slug;var Je=(e=>(e.Root="/",e.Login="/login",e.Favorites="/favorites",e.Offer="/offer",e))(Je||{}),qt=(e=>(e.Offers="/offers",e.Comments="/comments",e.Favorite="/favorite",e.Login="/login",e.Logout="/logout",e))(qt||{}),nt=(e=>(e.Auth="AUTH",e.NoAuth="NO_AUTH",e.Unknown="UNKNOWN",e))(nt||{});const wS="MMMM YYYY",xS="YYYY-MM-DD",SS={iconUrl:"./img/pin.svg",iconSize:[27,39],iconAnchor:[13,39]},ES={iconUrl:"./img/pin-active.svg",iconSize:[27,39],iconAnchor:[13,39]};var se=(e=>(e[e.Idle=0]="Idle",e[e.Loading=1]="Loading",e[e.Succeed=2]="Succeed",e[e.Failed=3]="Failed",e))(se||{});function PS(){const e=cr(),t=x.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"});return fr.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:Je.Root,className:"header__logo-link",children:t})}const Ad=M.memo(PS);var Eg={exports:{}},Pg={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ci=M;function CS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var TS=typeof Object.is=="function"?Object.is:CS,kS=Ci.useState,LS=Ci.useEffect,NS=Ci.useLayoutEffect,OS=Ci.useDebugValue;function MS(e,t){var n=t(),i=kS({inst:{value:n,getSnapshot:t}}),s=i[0].inst,a=i[1];return NS(function(){s.value=n,s.getSnapshot=t,cc(s)&&a({inst:s})},[e,n,t]),LS(function(){return cc(s)&&a({inst:s}),e(function(){cc(s)&&a({inst:s})})},[e]),OS(n),n}function cc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!TS(e,n)}catch{return!0}}function RS(e,t){return t()}var zS=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?RS:MS;Pg.useSyncExternalStore=Ci.useSyncExternalStore!==void 0?Ci.useSyncExternalStore:zS;Eg.exports=Pg;var IS=Eg.exports,Cg={exports:{}},Tg={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vl=M,AS=IS;function jS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var DS=typeof Object.is=="function"?Object.is:jS,bS=AS.useSyncExternalStore,BS=vl.useRef,FS=vl.useEffect,$S=vl.useMemo,US=vl.useDebugValue;Tg.useSyncExternalStoreWithSelector=function(e,t,n,i,s){var a=BS(null);if(a.current===null){var u={hasValue:!1,value:null};a.current=u}else u=a.current;a=$S(function(){function d(k){if(!p){if(p=!0,v=k,k=i(k),s!==void 0&&u.hasValue){var P=u.value;if(s(P,k))return _=P}return _=k}if(P=_,DS(v,k))return P;var E=i(k);return s!==void 0&&s(P,E)?P:(v=k,_=E)}var p=!1,v,_,S=n===void 0?null:n;return[function(){return d(t())},S===null?void 0:function(){return d(S())}]},[t,n,i,s]);var f=bS(e,a[0],a[1]);return FS(function(){u.hasValue=!0,u.value=f},[f]),US(f),f};Cg.exports=Tg;var ZS=Cg.exports;function HS(e){e()}let kg=HS;const WS=e=>kg=e,VS=()=>kg,gm=Symbol.for("react-redux-context"),ym=typeof globalThis<"u"?globalThis:{};function KS(){var e;if(!M.createContext)return{};const t=(e=ym[gm])!=null?e:ym[gm]=new Map;let n=t.get(M.createContext);return n||(n=M.createContext(null),t.set(M.createContext,n)),n}const or=KS();function jd(e=or){return function(){return M.useContext(e)}}const Lg=jd(),qS=()=>{throw new Error("uSES not initialized!")};let Ng=qS;const GS=e=>{Ng=e},YS=(e,t)=>e===t;function QS(e=or){const t=e===or?Lg:jd(e);return function(i,s={}){const{equalityFn:a=YS,stabilityCheck:u=void 0,noopCheck:f=void 0}=typeof s=="function"?{equalityFn:s}:s,{store:d,subscription:p,getServerState:v,stabilityCheck:_,noopCheck:S}=t();M.useRef(!0);const k=M.useCallback({[i.name](E){return i(E)}}[i.name],[i,_,u]),P=Ng(p.addNestedSub,d.getState,v||d.getState,k,a);return M.useDebugValue(P),P}}const XS=QS();var Og={exports:{}},ge={};/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var He=typeof Symbol=="function"&&Symbol.for,Dd=He?Symbol.for("react.element"):60103,bd=He?Symbol.for("react.portal"):60106,gl=He?Symbol.for("react.fragment"):60107,yl=He?Symbol.for("react.strict_mode"):60108,wl=He?Symbol.for("react.profiler"):60114,xl=He?Symbol.for("react.provider"):60109,Sl=He?Symbol.for("react.context"):60110,Bd=He?Symbol.for("react.async_mode"):60111,El=He?Symbol.for("react.concurrent_mode"):60111,Pl=He?Symbol.for("react.forward_ref"):60112,Cl=He?Symbol.for("react.suspense"):60113,JS=He?Symbol.for("react.suspense_list"):60120,Tl=He?Symbol.for("react.memo"):60115,kl=He?Symbol.for("react.lazy"):60116,eE=He?Symbol.for("react.block"):60121,tE=He?Symbol.for("react.fundamental"):60117,nE=He?Symbol.for("react.responder"):60118,rE=He?Symbol.for("react.scope"):60119;function Et(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Dd:switch(e=e.type,e){case Bd:case El:case gl:case wl:case yl:case Cl:return e;default:switch(e=e&&e.$$typeof,e){case Sl:case Pl:case kl:case Tl:case xl:return e;default:return t}}case bd:return t}}}function Mg(e){return Et(e)===El}ge.AsyncMode=Bd;ge.ConcurrentMode=El;ge.ContextConsumer=Sl;ge.ContextProvider=xl;ge.Element=Dd;ge.ForwardRef=Pl;ge.Fragment=gl;ge.Lazy=kl;ge.Memo=Tl;ge.Portal=bd;ge.Profiler=wl;ge.StrictMode=yl;ge.Suspense=Cl;ge.isAsyncMode=function(e){return Mg(e)||Et(e)===Bd};ge.isConcurrentMode=Mg;ge.isContextConsumer=function(e){return Et(e)===Sl};ge.isContextProvider=function(e){return Et(e)===xl};ge.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dd};ge.isForwardRef=function(e){return Et(e)===Pl};ge.isFragment=function(e){return Et(e)===gl};ge.isLazy=function(e){return Et(e)===kl};ge.isMemo=function(e){return Et(e)===Tl};ge.isPortal=function(e){return Et(e)===bd};ge.isProfiler=function(e){return Et(e)===wl};ge.isStrictMode=function(e){return Et(e)===yl};ge.isSuspense=function(e){return Et(e)===Cl};ge.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===gl||e===El||e===wl||e===yl||e===Cl||e===JS||typeof e=="object"&&e!==null&&(e.$$typeof===kl||e.$$typeof===Tl||e.$$typeof===xl||e.$$typeof===Sl||e.$$typeof===Pl||e.$$typeof===tE||e.$$typeof===nE||e.$$typeof===rE||e.$$typeof===eE)};ge.typeOf=Et;Og.exports=ge;var iE=Og.exports,Rg=iE,oE={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},sE={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},zg={};zg[Rg.ForwardRef]=oE;zg[Rg.Memo]=sE;var we={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Fd=Symbol.for("react.element"),$d=Symbol.for("react.portal"),Ll=Symbol.for("react.fragment"),Nl=Symbol.for("react.strict_mode"),Ol=Symbol.for("react.profiler"),Ml=Symbol.for("react.provider"),Rl=Symbol.for("react.context"),aE=Symbol.for("react.server_context"),zl=Symbol.for("react.forward_ref"),Il=Symbol.for("react.suspense"),Al=Symbol.for("react.suspense_list"),jl=Symbol.for("react.memo"),Dl=Symbol.for("react.lazy"),lE=Symbol.for("react.offscreen"),Ig;Ig=Symbol.for("react.module.reference");function At(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fd:switch(e=e.type,e){case Ll:case Ol:case Nl:case Il:case Al:return e;default:switch(e=e&&e.$$typeof,e){case aE:case Rl:case zl:case Dl:case jl:case Ml:return e;default:return t}}case $d:return t}}}we.ContextConsumer=Rl;we.ContextProvider=Ml;we.Element=Fd;we.ForwardRef=zl;we.Fragment=Ll;we.Lazy=Dl;we.Memo=jl;we.Portal=$d;we.Profiler=Ol;we.StrictMode=Nl;we.Suspense=Il;we.SuspenseList=Al;we.isAsyncMode=function(){return!1};we.isConcurrentMode=function(){return!1};we.isContextConsumer=function(e){return At(e)===Rl};we.isContextProvider=function(e){return At(e)===Ml};we.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fd};we.isForwardRef=function(e){return At(e)===zl};we.isFragment=function(e){return At(e)===Ll};we.isLazy=function(e){return At(e)===Dl};we.isMemo=function(e){return At(e)===jl};we.isPortal=function(e){return At(e)===$d};we.isProfiler=function(e){return At(e)===Ol};we.isStrictMode=function(e){return At(e)===Nl};we.isSuspense=function(e){return At(e)===Il};we.isSuspenseList=function(e){return At(e)===Al};we.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ll||e===Ol||e===Nl||e===Il||e===Al||e===lE||typeof e=="object"&&e!==null&&(e.$$typeof===Dl||e.$$typeof===jl||e.$$typeof===Ml||e.$$typeof===Rl||e.$$typeof===zl||e.$$typeof===Ig||e.getModuleId!==void 0)};we.typeOf=At;function uE(){const e=VS();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 wm={notify(){},get:()=>[]};function cE(e,t){let n,i=wm,s=0,a=!1;function u(E){v();const R=i.subscribe(E);let w=!1;return()=>{w||(w=!0,R(),_())}}function f(){i.notify()}function d(){P.onStateChange&&P.onStateChange()}function p(){return a}function v(){s++,n||(n=t?t.addNestedSub(d):e.subscribe(d),i=uE())}function _(){s--,n&&s===0&&(n(),n=void 0,i.clear(),i=wm)}function S(){a||(a=!0,v())}function k(){a&&(a=!1,_())}const P={addNestedSub:u,notifyNestedSubs:f,handleChangeWrapper:d,isSubscribed:p,trySubscribe:S,tryUnsubscribe:k,getListeners:()=>i};return P}const fE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dE=fE?M.useLayoutEffect:M.useEffect;function hE({store:e,context:t,children:n,serverState:i,stabilityCheck:s="once",noopCheck:a="once"}){const u=M.useMemo(()=>{const p=cE(e);return{store:e,subscription:p,getServerState:i?()=>i:void 0,stabilityCheck:s,noopCheck:a}},[e,i,s,a]),f=M.useMemo(()=>e.getState(),[e]);dE(()=>{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||or;return M.createElement(d.Provider,{value:u},n)}function Ag(e=or){const t=e===or?Lg:jd(e);return function(){const{store:i}=t();return i}}const pE=Ag();function mE(e=or){const t=e===or?pE:Ag(e);return function(){return t().dispatch}}const _E=mE();GS(ZS.useSyncExternalStoreWithSelector);WS(fg.unstable_batchedUpdates);function $e(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 vE=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")(),xm=vE,fc=()=>Math.random().toString(36).substring(7).split("").join("."),gE={INIT:`@@redux/INIT${fc()}`,REPLACE:`@@redux/REPLACE${fc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${fc()}`},Ua=gE;function Ud(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 jg(e,t,n){if(typeof e!="function")throw new Error($e(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error($e(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($e(1));return n(jg)(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 v(){if(d)throw new Error($e(3));return s}function _(R){if(typeof R!="function")throw new Error($e(4));if(d)throw new Error($e(5));let w=!0;p();const g=f++;return u.set(g,R),function(){if(w){if(d)throw new Error($e(6));w=!1,p(),u.delete(g),a=null}}}function S(R){if(!Ud(R))throw new Error($e(7));if(typeof R.type>"u")throw new Error($e(8));if(typeof R.type!="string")throw new Error($e(17));if(d)throw new Error($e(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($e(10));i=R,S({type:Ua.REPLACE})}function P(){const R=_;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error($e(11));function g(){const N=w;N.next&&N.next(v())}return g(),{unsubscribe:R(g)}},[xm](){return this}}}return S({type:Ua.INIT}),{dispatch:S,subscribe:_,getState:v,replaceReducer:k,[xm]:P}}function yE(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ua.INIT})>"u")throw new Error($e(12));if(typeof n(void 0,{type:Ua.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($e(13))})}function Dg(e){const t=Object.keys(e),n={};for(let a=0;a"u")throw f&&f.type,new Error($e(14));p[_]=P,d=d||P!==k}return d=d||i.length!==Object.keys(u).length,d?p:u}}function Sm(e,t){return function(...n){return t(e.apply(this,n))}}function wE(e,t){if(typeof e=="function")return Sm(e,t);if(typeof e!="object"||e===null)throw new Error($e(16));const n={};for(const i in e){const s=e[i];typeof s=="function"&&(n[i]=Sm(s,t))}return n}function Za(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...i)=>t(n(...i)))}function xE(...e){return t=>(n,i)=>{const s=t(n,i);let a=()=>{throw new Error($e(15))};const u={getState:s.getState,dispatch:(d,...p)=>a(d,...p)},f=e.map(d=>d(u));return a=Za(...f)(s.dispatch),{...s,dispatch:a}}}function SE(e){return Ud(e)&&"type"in e&&typeof e.type=="string"}var bg=Symbol.for("immer-nothing"),Em=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 Ti=Object.getPrototypeOf;function sr(e){return!!e&&!!e[yt]}function Nn(e){var t;return e?Bg(e)||Array.isArray(e)||!!e[Em]||!!((t=e.constructor)!=null&&t[Em])||Bl(e)||Fl(e):!1}var EE=Object.prototype.constructor.toString();function Bg(e){if(!e||typeof e!="object")return!1;const t=Ti(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)===EE}function Ha(e,t){bl(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function bl(e){const t=e[yt];return t?t.type_:Array.isArray(e)?1:Bl(e)?2:Fl(e)?3:0}function _f(e,t){return bl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Fg(e,t,n){const i=bl(e);i===2?e.set(t,n):i===3?e.add(n):e[t]=n}function PE(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Bl(e){return e instanceof Map}function Fl(e){return e instanceof Set}function wr(e){return e.copy_||e.base_}function vf(e,t){if(Bl(e))return new Map(e);if(Fl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Bg(e))return Ti(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=CE),Object.freeze(e),t&&Object.entries(e).forEach(([n,i])=>Zd(i,!0))),e}function CE(){Ht(2)}function $l(e){return Object.isFrozen(e)}var TE={};function Rr(e){const t=TE[e];return t||Ht(0,e),t}var Bo;function $g(){return Bo}function kE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Pm(e,t){t&&(Rr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gf(e){yf(e),e.drafts_.forEach(LE),e.drafts_=null}function yf(e){e===Bo&&(Bo=e.parent_)}function Cm(e){return Bo=kE(Bo,e)}function LE(e){const t=e[yt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Tm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[yt].modified_&&(gf(t),Ht(4)),Nn(e)&&(e=Wa(t,e),t.parent_||Va(t,e)),t.patches_&&Rr("Patches").generateReplacementPatches_(n[yt].base_,e,t.patches_,t.inversePatches_)):e=Wa(t,n,[]),gf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==bg?e:void 0}function Wa(e,t,n){if($l(t))return t;const i=t[yt];if(!i)return Ha(t,(s,a)=>km(e,i,t,s,a,n)),t;if(i.scope_!==e)return t;if(!i.modified_)return Va(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),Ha(a,(f,d)=>km(e,i,s,f,d,n,u)),Va(e,s,!1),n&&e.patches_&&Rr("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function km(e,t,n,i,s,a,u){if(sr(s)){const f=a&&t&&t.type_!==3&&!_f(t.assigned_,i)?a.concat(i):void 0,d=Wa(e,s,f);if(Fg(n,i,d),sr(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Nn(s)&&!$l(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Wa(e,s),(!t||!t.scope_.parent_)&&typeof i!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,i)&&Va(e,s)}}function Va(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Zd(t,n)}function NE(e,t){const n=Array.isArray(e),i={type_:n?1:0,scope_:t?t.scope_:$g(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=i,a=Hd;n&&(s=[i],a=Fo);const{revoke:u,proxy:f}=Proxy.revocable(s,a);return i.draft_=f,i.revoke_=u,f}var Hd={get(e,t){if(t===yt)return e;const n=wr(e);if(!_f(n,t))return OE(e,n,t);const i=n[t];return e.finalized_||!Nn(i)?i:i===dc(e.base_,t)?(hc(e),e.copy_[t]=xf(i,e)):i},has(e,t){return t in wr(e)},ownKeys(e){return Reflect.ownKeys(wr(e))},set(e,t,n){const i=Ug(wr(e),t);if(i!=null&&i.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){const s=dc(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(PE(n,s)&&(n!==void 0||_f(e.base_,t)))return!0;hc(e),wf(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 dc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,hc(e),wf(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 Ti(e.base_)},setPrototypeOf(){Ht(12)}},Fo={};Ha(Hd,(e,t)=>{Fo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Fo.deleteProperty=function(e,t){return Fo.set.call(this,e,t,void 0)};Fo.set=function(e,t,n){return Hd.set.call(this,e[0],t,n,e[0])};function dc(e,t){const n=e[yt];return(n?wr(n):e)[t]}function OE(e,t,n){var s;const i=Ug(t,n);return i?"value"in i?i.value:(s=i.get)==null?void 0:s.call(e.draft_):void 0}function Ug(e,t){if(!(t in e))return;let n=Ti(e);for(;n;){const i=Object.getOwnPropertyDescriptor(n,t);if(i)return i;n=Ti(n)}}function wf(e){e.modified_||(e.modified_=!0,e.parent_&&wf(e.parent_))}function hc(e){e.copy_||(e.copy_=vf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ME=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,v=>n.call(this,v,...p))}}typeof n!="function"&&Ht(6),i!==void 0&&typeof i!="function"&&Ht(7);let s;if(Nn(t)){const a=Cm(this),u=xf(t,void 0);let f=!0;try{s=n(u),f=!1}finally{f?gf(a):yf(a)}return Pm(a,i),Tm(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===bg&&(s=void 0),this.autoFreeze_&&Zd(s,!0),i){const a=[],u=[];Rr("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),sr(e)&&(e=Zg(e));const t=Cm(this),n=xf(e,void 0);return n[yt].isManual_=!0,yf(t),n}finishDraft(e,t){const n=e&&e[yt];(!n||!n.isManual_)&&Ht(9);const{scope_:i}=n;return Pm(i,t),Tm(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=Rr("Patches").applyPatches_;return sr(e)?i(e,t):this.produce(e,s=>i(s,t))}};function xf(e,t){const n=Bl(e)?Rr("MapSet").proxyMap_(e,t):Fl(e)?Rr("MapSet").proxySet_(e,t):NE(e,t);return(t?t.scope_:$g()).drafts_.push(n),n}function Zg(e){return sr(e)||Ht(10,e),Hg(e)}function Hg(e){if(!Nn(e)||$l(e))return e;const t=e[yt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=vf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=vf(e,!0);return Ha(n,(i,s)=>{Fg(n,i,Hg(s))}),t&&(t.finalized_=!1),n}var wt=new ME,Wg=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 RE(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function zE(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function IE(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 Lm=e=>Array.isArray(e)?e:[e];function AE(e){const t=Array.isArray(e[0])?e[0]:e;return IE(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function jE(e,t){const n=[],{length:i}=e;for(let s=0;s{n=$s(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}function Vg(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()),RE(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);const v={...n,...d},{memoize:_,memoizeOptions:S=[],argsMemoize:k=Wd,argsMemoizeOptions:P=[],devModeChecks:E={}}=v,R=Lm(S),w=Lm(P),g=AE(s),y=_(function(){return a++,p.apply(null,arguments)},...R),N=k(function(){u++;const B=jE(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:_,argsMemoize:k})};return Object.assign(i,{withTypes:()=>i}),i}var Kg=Vg(Wd),FE=Object.assign((e,t=Kg)=>{zE(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:()=>FE});function qg(e){return({dispatch:n,getState:i})=>s=>a=>typeof a=="function"?a(n,i,e):s(a)}var $E=qg(),UE=qg,ZE=(...e)=>{const t=Vg(...e),n=Object.assign((...i)=>{const s=t(...i),a=(u,...f)=>s(sr(u)?Zg(u):u,...f);return Object.assign(a,s),a},{withTypes:()=>n});return n};ZE(Wd);var HE=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Za:Za.apply(null,arguments)},WE=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=>SE(i)&&i.type===e,n}var Gg=class uo extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,uo.prototype)}static get[Symbol.species](){return uo}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new uo(...t[0].concat(this)):new uo(...t.concat(this))}};function Om(e){return Nn(e)?Wg(e,()=>{}):e}function Mm(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 VE(e){return typeof e=="boolean"}var KE=()=>function(t){const{thunk:n=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:a=!0}=t??{};let u=new Gg;return n&&(VE(n)?u.push($E):u.push(UE(n.extraArgument))),u},qE="RTK_autoBatch",Yg=e=>t=>{setTimeout(t,e)},GE=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Yg(10),YE=(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"?GE:e.type==="callback"?e.queueNotification:Yg(e.timeout),p=()=>{u=!1,a&&(a=!1,f.forEach(v=>v()))};return Object.assign({},i,{subscribe(v){const _=()=>s&&v(),S=i.subscribe(_);return f.add(v),()=>{S(),f.delete(v)}},dispatch(v){var _;try{return s=!((_=v==null?void 0:v.meta)!=null&&_[qE]),a=!s,a&&(u||(u=!0,d(p))),i.dispatch(v)}finally{s=!0}}})},QE=e=>function(n){const{autoBatch:i=!0}=n??{};let s=new Gg(e);return i&&s.push(YE(typeof i=="object"?i:void 0)),s},XE=!0;function JE(e){const t=KE(),{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(Ud(n))f=Dg(n);else throw new Error(ht(1));let d;typeof i=="function"?d=i(t):d=t();let p=Za;s&&(p=HE({trace:!XE,...typeof s=="object"&&s}));const v=xE(...d),_=QE(v);let S=typeof u=="function"?u(_):_();const k=p(...S);return jg(f,a,k)}function Qg(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 eP(e){return typeof e=="function"}function tP(e,t){let[n,i,s]=Qg(t),a;if(eP(e))a=()=>Om(e());else{const f=Om(e);a=()=>f}function u(f=a(),d){let p=[n[d.type],...i.filter(({matcher:v})=>v(d)).map(({reducer:v})=>v)];return p.filter(v=>!!v).length===0&&(p=[s]),p.reduce((v,_)=>{if(_)if(sr(v)){const k=_(v,d);return k===void 0?v:k}else{if(Nn(v))return Wg(v,S=>_(S,d));{const S=_(v,d);if(S===void 0){if(v===null)return v;throw new Error(ht(9))}return S}}return v},f)}return u.getInitialState=a,u}var nP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xg=(e=21)=>{let t="",n=e;for(;n--;)t+=nP[Math.random()*64|0];return t},rP=(e,t)=>WE(e)?e.match(t):e(t);function iP(...e){return t=>e.some(n=>rP(n,t))}var oP=["name","message","stack","code"],pc=class{constructor(e,t){ju(this,"_type");this.payload=e,this.meta=t}},Rm=class{constructor(e,t){ju(this,"_type");this.payload=e,this.meta=t}},sP=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of oP)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:{..._||{},arg:v,requestId:p,requestStatus:"fulfilled"}})),a=En(t+"/pending",(d,p,v)=>({payload:void 0,meta:{...v||{},arg:p,requestId:d,requestStatus:"pending"}})),u=En(t+"/rejected",(d,p,v,_,S)=>({payload:_,error:(i&&i.serializeError||sP)(d||"Rejected"),meta:{...S||{},arg:v,requestId:p,rejectedWithValue:!!_,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):Xg(),k=new AbortController;let P,E;function R(g){E=g,k.abort()}const w=async function(){var N,I;let g;try{let B=(N=i==null?void 0:i.condition)==null?void 0:N.call(i,d,{getState:v,extra:_});if(lP(B)&&(B=await B),B===!1||k.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const $=new Promise((A,X)=>{P=()=>{X({name:"AbortError",message:E||"Aborted"})},k.signal.addEventListener("abort",P)});p(a(S,d,(I=i==null?void 0:i.getPendingMeta)==null?void 0:I.call(i,{requestId:S,arg:d},{getState:v,extra:_}))),g=await Promise.race([$,Promise.resolve(n(d,{dispatch:p,getState:v,extra:_,requestId:S,signal:k.signal,abort:R,rejectWithValue:(A,X)=>new pc(A,X),fulfillWithValue:(A,X)=>new Rm(A,X)})).then(A=>{if(A instanceof pc)throw A;return A instanceof Rm?s(A.payload,S,d,A.meta):s(A,S,d)})])}catch(B){g=B instanceof pc?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(aP)}})}}return Object.assign(f,{pending:a,rejected:u,fulfilled:s,settled:iP(u,s),typePrefix:t})}return e.withTypes=()=>e,e})();function aP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function lP(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var uP=Symbol.for("rtk-slice-createasyncthunk");function cP(e,t){return`${e}/${t}`}function fP({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[uP];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(hP()):s.reducers)||{},d=Object.keys(f),p={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},v={addCase(y,N){const I=typeof y=="string"?y:y.type;if(!I)throw new Error(ht(12));if(I in p.sliceCaseReducersByType)throw new Error(ht(13));return p.sliceCaseReducersByType[I]=N,v},addMatcher(y,N){return p.sliceMatchers.push({matcher:y,reducer:N}),v},exposeAction(y,N){return p.actionCreators[y]=N,v},exposeCaseReducer(y,N){return p.sliceCaseReducersByName[y]=N,v}};d.forEach(y=>{const N=f[y],I={reducerName:y,type:cP(a,y),createNotation:typeof s.reducers=="function"};mP(N)?vP(I,N,v,t):pP(I,N,v)});function _(){const[y={},N=[],I=void 0]=typeof s.extraReducers=="function"?Qg(s.extraReducers):[s.extraReducers],B={...y,...p.sliceCaseReducersByType};return tP(s.initialState,$=>{for(let A in B)$.addCase(A,B[A]);for(let A of p.sliceMatchers)$.addMatcher(A.matcher,A.reducer);for(let A of N)$.addMatcher(A.matcher,A.reducer);I&&$.addDefaultCase(I)})}const S=y=>y,k=new Map;let P;function E(y,N){return P||(P=_()),P(y,N)}function R(){return P||(P=_()),P.getInitialState()}function w(y,N=!1){function I($){let A=$[y];return typeof A>"u"&&N&&(A=R()),A}function B($=S){const A=Mm(k,N,{insert:()=>new WeakMap});return Mm(A,$,{insert:()=>{const X={};for(const[V,G]of Object.entries(s.selectors??{}))X[V]=dP(G,$,R,N);return X}})}return{reducerPath:y,getSelectors:B,get selectors(){return B(I)},selectSlice:I}}const g={name:a,reducer:E,actions:p.actionCreators,caseReducers:p.sliceCaseReducersByName,getInitialState:R,...w(u),injectInto(y,{reducerPath:N,...I}={}){const B=N??u;return y.inject({reducerPath:B,reducer:E},I),{...g,...w(B,!0)}}};return g}}function dP(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 Ii=fP();function hP(){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 pP({type:e,reducerName:t,createNotation:n},i,s){let a,u;if("reducer"in i){if(n&&!_P(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 mP(e){return e._reducerDefinitionType==="asyncThunk"}function _P(e){return e._reducerDefinitionType==="reducerWithPrepare"}function vP({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:v}=n,_=s(e,a,v);i.exposeAction(t,_),u&&i.addCase(_.fulfilled,u),f&&i.addCase(_.pending,f),d&&i.addCase(_.rejected,d),p&&i.addMatcher(_.settled,p),i.exposeCaseReducer(t,{fulfilled:u||Us,pending:f||Us,rejected:d||Us,settled:p||Us})}function Us(){}var gP=(e,t)=>{if(typeof e!="function")throw new Error(ht(32))},Vd="listenerMiddleware",yP=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 gP(a),{predicate:s,type:t,effect:a}},wP=Object.assign(e=>{const{type:t,predicate:n,effect:i}=yP(e);return{id:Xg(),effect:i,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ht(22))}}},{withTypes:()=>wP}),xP=Object.assign(En(`${Vd}/add`),{withTypes:()=>xP});En(`${Vd}/removeAll`);var SP=Object.assign(En(`${Vd}/remove`),{withTypes:()=>SP});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 EP=_E,ot=XS,un=e=>{const t=EP();return M.useMemo(()=>wE(e,t),[])},ra=cn("user/checkAuth",async(e,{extra:t})=>{const{data:n}=await t.get(qt.Login,{headers:{"x-no-toast":"true"}});return n}),Sf=cn("user/login",async(e,{extra:t})=>{const{data:n}=await t.post(qt.Login,e);return n}),Ef=cn("user/logout",async(e,{extra:t})=>{await t.delete(qt.Logout)}),Kd="six-cities-token",Jg=()=>localStorage.getItem(Kd)??"",PP=e=>{localStorage.setItem(Kd,e)},CP=()=>{localStorage.removeItem(Kd)},TP={authStatus:nt.Unknown,requestStatus:se.Idle,userInfo:null,userAuthData:null},Ka=Ii({name:"user",initialState:TP,reducers:{setNoAuthStatus:e=>{e.authStatus=nt.NoAuth}},extraReducers:e=>{e.addCase(ra.pending,t=>{t.requestStatus=se.Loading}),e.addCase(ra.fulfilled,(t,n)=>{t.userInfo=n.payload,t.authStatus=nt.Auth,t.requestStatus=se.Succeed}),e.addCase(ra.rejected,t=>{t.authStatus=nt.NoAuth,t.requestStatus=se.Failed}),e.addCase(Sf.fulfilled,(t,n)=>{t.userInfo=n.payload,PP(t.userInfo.token),t.authStatus=nt.Auth,t.requestStatus=se.Succeed}),e.addCase(Sf.rejected,t=>{t.authStatus=nt.NoAuth,t.requestStatus=se.Failed}),e.addCase(Ef.fulfilled,t=>{CP(),t.userInfo=null,t.authStatus=nt.NoAuth,t.requestStatus=se.Succeed}),e.addCase(Ef.rejected,t=>{t.userInfo=null,t.authStatus=nt.NoAuth,t.requestStatus=se.Failed})},selectors:{authStatus:e=>e.authStatus,requestStatus:e=>e.requestStatus,userInfo:e=>e.userInfo,userAuthData:e=>e.userAuthData}}),qd={...Ka.actions,checkAuth:ra,login:Sf,logout:Ef},Yo=Ka.selectors;function ey(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",ia=e=>Tr(e)||_t(e)?e:null,Pf=e=>M.isValidElement(e)||Tr(e)||_t(e)||$o(e);function kP(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 Ul(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:v,nodeRef:_,isIn:S,playToast:k}=u;const P=i?`${t}--${d}`:t,E=i?`${n}--${d}`:n,R=M.useRef(0);return M.useLayoutEffect(()=>{const w=_.current,g=P.split(" "),y=N=>{N.target===_.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)},[]),M.useEffect(()=>{const w=_.current,g=()=>{w.removeEventListener("animationend",g),s?kP(w,v,a):v()};S||(p?g():(R.current=1,w.className+=` ${E}`,w.addEventListener("animationend",g)))},[S]),_e.createElement(_e.Fragment,null,f)}}function zm(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 rt=new Map;let Uo=[];const Cf=new Set,LP=e=>Cf.forEach(t=>t(e)),ty=()=>rt.size>0;function ny(e,t){var n;if(t)return!((n=rt.get(t))==null||!n.isToastActive(e));let i=!1;return rt.forEach(s=>{s.isToastActive(e)&&(i=!0)}),i}function ry(e,t){Pf(e)&&(ty()||Uo.push({content:e,options:t}),rt.forEach(n=>{n.buildToast(e,t)}))}function Im(e,t){rt.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 NP(e){const{subscribe:t,getSnapshot:n,setProps:i}=M.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=_;const y=new Map,N=new Set,I=()=>{w=Array.from(y.values()),N.forEach(A=>A())},B=A=>{R=A==null?[]:R.filter(X=>X!==A),I()},$=A=>{const{toastId:X,onOpen:V,updateId:G,children:ce}=A.props,We=G==null;A.staleId&&y.delete(A.staleId),y.set(X,A),R=[...R,A.props.toastId].filter(Y=>Y!==A.staleId),I(),S(zm(A,We?"added":"updated")),We&&_t(V)&&V(M.isValidElement(ce)&&ce.props)};return{id:v,props:g,observe:A=>(N.add(A),()=>N.delete(A)),toggle:(A,X)=>{y.forEach(V=>{X!=null&&X!==V.props.toastId||_t(V.toggle)&&V.toggle(A)})},removeToast:B,toasts:y,clearQueue:()=>{P-=E.length,E=[]},buildToast:(A,X)=>{if((J=>{let{containerId:re,toastId:ee,updateId:te}=J;const ie=re?re!==v:v!==1,ye=y.has(ee)&&te==null;return ie||ye})(X))return;const{toastId:V,updateId:G,data:ce,staleId:We,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:ce,closeToast:W,isIn:!1,className:ia(X.className||g.toastClassName),bodyClassName:ia(X.bodyClassName||g.bodyClassName),progressClassName:ia(X.progressClassName||g.progressClassName),autoClose:!X.isLoading&&(T=X.autoClose,U=g.autoClose,T===!1||$o(T)&&T>0?T:U),deleteToast(){const J=y.get(V),{onClose:re,children:ee}=J.props;_t(re)&&re(M.isValidElement(ee)&&ee.props),S(zm(J,"removed")),y.delete(V),P--,P<0&&(P=0),E.length>0?$(E.shift()):I()}};var T,U;K.closeButton=g.closeButton,X.closeButton===!1||Pf(X.closeButton)?K.closeButton=X.closeButton:X.closeButton===!0&&(K.closeButton=!Pf(g.closeButton)||g.closeButton);let j=A;M.isValidElement(A)&&!Tr(A.type)?j=M.cloneElement(A,{closeToast:W,toastProps:K,data:ce}):_t(A)&&(j=A({closeToast:W,toastProps:K,data:ce}));const H={content:j,props:K,staleId:We};g.limit&&g.limit>0&&P>g.limit&&F?E.push(H):$o(Y)?setTimeout(()=>{$(H)},Y):$(H)},setProps(A){g=A},setToggle:(A,X)=>{y.get(A).toggle=X},isToastActive:A=>R.some(X=>X===A),getSnapshot:()=>g.newestOnTop?w.reverse():w}}(u,a,LP);rt.set(u,d);const p=d.observe(f);return Uo.forEach(v=>ry(v.content,v.options)),Uo=[],()=>{p(),rt.delete(u)}},setProps(f){var d;(d=rt.get(u))==null||d.setProps(f)},getSnapshot(){var f;return(f=rt.get(u))==null?void 0:f.getSnapshot()}}}(e)).current;i(e);const s=M.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:ny,count:s==null?void 0:s.length}}function OP(e){const[t,n]=M.useState(!1),[i,s]=M.useState(!1),a=M.useRef(null),u=M.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:f,pauseOnHover:d,closeToast:p,onClick:v,closeOnClick:_}=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=rt.get((S={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||k.setToggle(S.id,S.fn),M.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:I,left:B,right:$}=a.current.getBoundingClientRect();y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&y.clientX>=B&&y.clientX<=$&&y.clientY>=N&&y.clientY<=I?E():P()}};return f&&d&&(g.onMouseEnter=E,e.stacked||(g.onMouseLeave=P)),_&&(g.onClick=y=>{v&&v(y),u.canCloseOnClick&&p()}),{playToast:P,pauseToast:E,isRunning:t,preventExitTransition:i,toastRef:a,eventHandlers:g}}function MP(e){let{delay:t,isRunning:n,closeToast:i,type:s="default",hide:a,className:u,style:f,controlledProgress:d,progress:p,rtl:v,isIn:_,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":v}),R=_t(u)?u({rtl:v,type:s,defaultClassName:E}):Kn(E,u),w={[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]:d&&p<1?null:()=>{_&&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 RP=1;const iy=()=>""+RP++;function zP(e){return e&&(Tr(e.toastId)||$o(e.toastId))?e.toastId:iy()}function wo(e,t){return ry(e,t),t.toastId}function qa(e,t){return{...t,type:t&&t.type||e,toastId:zP(t)}}function Zs(e){return(t,n)=>wo(t,qa(e,n))}function ae(e,t){return wo(e,qa("default",t))}ae.loading=(e,t)=>wo(e,qa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ae.promise=function(e,t,n){let i,{pending:s,error:a,success:u}=t;s&&(i=Tr(s)?ae.loading(s,n):ae.loading(s.render,{...n,...s}));const f={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(v,_,S)=>{if(_==null)return void ae.dismiss(i);const k={type:v,...f,...n,data:S},P=Tr(_)?{render:_}:_;return i?ae.update(i,{...k,...P}):ae(P.render,{...k,...P}),S},p=_t(e)?e():e;return p.then(v=>d("success",u,v)).catch(v=>d("error",a,v)),p},ae.success=Zs("success"),ae.info=Zs("info"),ae.error=Zs("error"),ae.warning=Zs("warning"),ae.warn=ae.warning,ae.dark=(e,t)=>wo(e,qa("default",{theme:"dark",...t})),ae.dismiss=function(e){(function(t){var n;if(ty()){if(t==null||Tr(n=t)||$o(n))rt.forEach(i=>{i.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const i=rt.get(t.containerId);i?i.removeToast(t.id):rt.forEach(s=>{s.removeToast(t.id)})}}else Uo=Uo.filter(i=>t!=null&&i.options.toastId!==t)})(e)},ae.clearWaitingQueue=function(e){e===void 0&&(e={}),rt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},ae.isActive=ny,ae.update=function(e,t){t===void 0&&(t={});const n=((i,s)=>{var a;let{containerId:u}=s;return(a=rt.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:iy()};a.toastId!==e&&(a.staleId=e);const u=a.render||s;delete a.render,wo(u,a)}},ae.done=e=>{ae.update(e,{progress:1})},ae.onChange=function(e){return Cf.add(e),()=>{Cf.delete(e)}},ae.play=e=>Im(!0,e),ae.pause=e=>Im(!1,e);const IP=typeof window<"u"?M.useLayoutEffect:M.useEffect,Hs=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})},mc={info:function(e){return _e.createElement(Hs,{...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(Hs,{...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(Hs,{...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(Hs,{...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"})}},AP=e=>{const{isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:s,playToast:a}=OP(e),{closeButton:u,children:f,autoClose:d,onClick:p,type:v,hideProgressBar:_,closeToast:S,transition:k,position:P,className:E,style:R,bodyClassName:w,bodyStyle:g,progressClassName:y,progressStyle:N,updateId:I,role:B,progress:$,rtl:A,toastId:X,deleteToast:V,isIn:G,isLoading:ce,closeOnClick:We,theme:Y}=e,W=Kn("Toastify__toast",`Toastify__toast-theme--${Y}`,`Toastify__toast--${v}`,{"Toastify__toast--rtl":A},{"Toastify__toast--close-on-click":We}),F=_t(E)?E({rtl:A,position:P,type:v,defaultClassName:W}):Kn(W,E),K=function(H){let{theme:J,type:re,isLoading:ee,icon:te}=H,ie=null;const ye={theme:J,type:re};return te===!1||(_t(te)?ie=te({...ye,isLoading:ee}):M.isValidElement(te)?ie=M.cloneElement(te,ye):ee?ie=mc.spinner():(Ge=>Ge in mc)(re)&&(ie=mc[re](ye))),ie}(e),T=!!$||!d,U={closeToast:S,type:v,theme:Y};let j=null;return u===!1||(j=_t(u)?u(U):M.isValidElement(u)?M.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:v}):Kn("Toastify__toast-body",w),style:g},K!=null&&_e.createElement("div",{className:Kn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!ce})},K),_e.createElement("div",null,f)),j,_e.createElement(MP,{...I&&!T?{key:`pb-${I}`}:{},rtl:A,theme:Y,delay:d,isRunning:t,isIn:G,closeToast:S,hide:_,type:v,style:N,className:y,controlledProgress:T,progress:$||0})))},Zl=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},jP=Ul(Zl("bounce",!0));Ul(Zl("slide",!0));Ul(Zl("zoom"));Ul(Zl("flip"));const DP={position:"top-right",transition:jP,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function bP(e){let t={...DP,...e};const n=e.stacked,[i,s]=M.useState(!0),a=M.useRef(null),{getToastToRender:u,isToastActive:f,count:d}=NP(t),{className:p,style:v,rtl:_,containerId:S}=t;function k(E){const R=Kn("Toastify__toast-container",`Toastify__toast-container--${E}`,{"Toastify__toast-container--rtl":_});return _t(p)?p({position:E,rtl:_,defaultClassName:R}):Kn(R,ia(p))}function P(){n&&(s(!0),ae.play())}return IP(()=>{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((I,B)=>{const $=I;$.classList.add("Toastify__toast--stacked"),B>0&&($.dataset.collapsed=`${i}`),$.dataset.pos||($.dataset.pos=g?"top":"bot");const A=y*(i?.2:1)+(i?0:w*B);$.style.setProperty("--y",`${g?A:-1*A}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),ae.pause())},onMouseLeave:P},u((E,R)=>{const w=R.length?{...v}:{...v,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(AP,{...N,stacked:n,collapseAll:P,isIn:f(N.toastId,N.containerId),style:N.style,key:`toast-${N.key}`},y)}))}))}const oa=cn("data/fetchOffers",async(e,{extra:t})=>{const{data:n}=await t.get(qt.Offers);return n}),sa=cn("data/fetchOfferFullInfo",async(e,{extra:t})=>{const{data:n}=await t.get(`${qt.Offers}/${e}`);return n}),aa=cn("data/fetchOffersNear",async(e,{extra:t})=>{const{data:n}=await t.get(`${qt.Offers}/${e}/nearby`);return n}),la=cn("data/fetchFavorites",async(e,{extra:t})=>{const{data:n}=await t.get(qt.Favorite);return n}),Gd=cn("data/toggleFavorite",async({offerId:e,status:t},{extra:n})=>{const{data:i}=await n.post(`${qt.Favorite}/${e}/${t}`);return i}),BP={favorites:[],statusFetchFavorites:se.Idle,statusToggleFavorite:se.Idle},Ga=Ii({name:"favorites",initialState:BP,reducers:{},extraReducers:e=>{e.addCase(la.pending,t=>{t.statusFetchFavorites=se.Loading}),e.addCase(la.fulfilled,(t,n)=>{t.favorites=n.payload,t.statusFetchFavorites=se.Succeed}),e.addCase(la.rejected,t=>{t.statusFetchFavorites=se.Failed}),e.addCase(Gd.fulfilled,(t,n)=>{t.statusToggleFavorite=se.Succeed;const i=n.payload;if(i.isFavorite){t.favorites.push(i);return}const s=t.favorites.findIndex(a=>a.id===i.id);t.favorites.splice(s,1)})},selectors:{favorites:e=>e.favorites,statusFetchFavorites:e=>e.statusFetchFavorites,statusToggleFavorite:e=>e.statusToggleFavorite}}),oy={...Ga.actions,fetchFavorites:la,toggleFavorite:Gd},Tf=Ga.selectors;function FP(){const e=ot(Yo.userInfo),{logout:t}=un(qd),n=ot(Tf.favorites).length,{fetchFavorites:i}=un(oy),s=ot(Tf.statusFetchFavorites),a=async u=>{u.preventDefault(),await t().unwrap().catch(f=>{ae.warning(f.message)})};return M.useEffect(()=>{s===se.Idle&&ae.promise(i(),{error:"Ошибка загрузки избранного"})},[s,i]),x.jsxs(x.Fragment,{children:[x.jsx("li",{className:"header__nav-item user",children:x.jsxs(ln,{to:Je.Favorites,className:"header__nav-link header__nav-link--profile",children:[x.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper",children:(e==null?void 0:e.avatarUrl)&&x.jsx("img",{className:"user__avatar",src:e.avatarUrl,alt:"avatar"})}),(e==null?void 0:e.email)&&x.jsx("span",{className:"header__user-name user__name",children:e.email}),x.jsx("span",{className:"header__favorite-count",children:n})]})}),x.jsx("li",{className:"header__nav-item",children:x.jsx("a",{className:"header__nav-link",href:"#",onClick:u=>{a(u).catch(f=>ae.warning(f.message))},children:x.jsx("span",{className:"header__signout",children:"Sign out"})})})]})}function $P(){const e=ot(Yo.authStatus),t=x.jsx("li",{className:"header__nav-item user",children:x.jsxs(ln,{to:Je.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(Ad,{})}),x.jsx("nav",{className:"header__nav",children:x.jsx("ul",{className:"header__nav-list",children:e===nt.Auth?x.jsx(FP,{}):t})})]})})})}const Hl=M.memo($P),zr=(...e)=>e.filter(Boolean).join(" ");function UP({cities:e=fr}){return x.jsx("ul",{className:"locations__list tabs__list",children:e.map(t=>x.jsx("li",{className:"locations__item",children:x.jsx(pS,{to:Je.Root+t.slug,className:({isActive:n})=>zr("locations__item-link tabs__item",n&&"tabs__item--active"),children:x.jsx("span",{children:t.name})})},t.slug))})}const ZP=M.memo(UP),HP=()=>{const e=document.title;return()=>{document.title=e}};function Qo(e){M.useEffect(HP,[]),M.useEffect(()=>{document.title=`${e} | 6 cities`},[e])}var kf={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)})(Ym,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(j(r))},_add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.clone()._subtract(j(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=j(r);var o=r.x-this.x,l=r.y-this.y;return Math.sqrt(o*o+l*l)},equals:function(r){return r=j(r),r.x===this.x&&r.y===this.y},contains:function(r){return r=j(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 j(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,Br=function(){var r=!1;try{var o=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("testPassiveEventSupport",_,o),window.removeEventListener("testPassiveEventSupport",_,o)}catch{}return r}(),hh=function(){return!!document.createElement("canvas").getContext}(),rs=!!(document.createElementNS&&oh("svg").createSVGRect),is=!rs&&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 Xt(r){return navigator.userAgent.toLowerCase().indexOf(r)>=0}var Uy={ie:es,ielt9:Dr,edge:ts,webkit:Ql,android:ji,android23:Di,androidStock:ah,opera:Xl,chrome:Jl,gecko:eu,safari:ns,phantom:lh,opera12:uh,win:ch,ie3d:tu,webkit3d:nu,gecko3d:fh,any3d:Ct,mobile:br,mobileWebkit:By,mobileWebkit3d:Fy,msPointer:zn,pointer:Yt,touch:Qt,mobileOpera:dh,mobileGecko:$y,retina:In,passiveEvents:Br,canvas:hh,svg:rs,vml:is},ru=zn?"MSPointerDown":"pointerdown",iu=zn?"MSPointerMove":"pointermove",ou=zn?"MSPointerUp":"pointerup",su=zn?"MSPointerCancel":"pointercancel",Fr={},ph=!1;function Zy(r,o,l,c){return o==="touchstart"?Wy(r,l,c):o==="touchmove"?qy(r,l,c):o==="touchend"&&Gy(r,l,c),this}function Hy(r,o,l){var c=r["_leaflet_"+o+l];return o==="touchstart"?r.removeEventListener(ru,c,!1):o==="touchmove"?r.removeEventListener(iu,c,!1):o==="touchend"&&(r.removeEventListener(ou,c,!1),r.removeEventListener(su,c,!1)),this}function Wy(r,o,l){var c=u(function(h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&kt(h),au(h,o)});r["_leaflet_touchstart"+l]=c,r.addEventListener(ru,c,!1),ph||(document.addEventListener(ru,Vy,!0),document.addEventListener(iu,Ky,!0),document.addEventListener(ou,mh,!0),document.addEventListener(su,mh,!0),ph=!0)}function Vy(r){Fr[r.pointerId]=r}function Ky(r){Fr[r.pointerId]&&(Fr[r.pointerId]=r)}function mh(r){delete Fr[r.pointerId]}function au(r,o){r.touches=[];for(var l in Fr)r.touches.push(Fr[l]);r.changedTouches=[r],o(r)}function qy(r,o,l){var c=function(h){h.pointerType===(h.MSPOINTER_TYPE_MOUSE||"mouse")&&h.buttons===0||au(h,o)};r["_leaflet_touchmove"+l]=c,r.addEventListener(iu,c,!1)}function Gy(r,o,l){var c=function(h){au(h,o)};r["_leaflet_touchend"+l]=c,r.addEventListener(ou,c,!1),r.addEventListener(su,c,!1)}var os=zn?"MSPointerDown":Yt?"pointerdown":"touchstart",ss=zn?"MSPointerUp":Yt?"pointerup":"touchend",$r="_leaflet_";function Yy(r,o,l){var c,h,m=!1,C=250;function O(b){if(Yt){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(Yt){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[$r+os+l]=O,r[$r+ss+l]=z,r[$r+"dblclick"+l]=o,r.addEventListener(os,O,Br?{passive:!1}:!1),r.addEventListener(ss,z,Br?{passive:!1}:!1),r.addEventListener("dblclick",o,!1),this}function Qy(r,o){var l=r[$r+os+o],c=r[$r+ss+o],h=r[$r+"dblclick"+o];return r.removeEventListener(os,l,Br?{passive:!1}:!1),r.removeEventListener(ss,c,Br?{passive:!1}:!1),r.removeEventListener("dblclick",h,!1),this}var lu=us(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),bi=us(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),_h=bi==="webkitTransition"||bi==="OTransition"?bi+"End":"transitionend";function vh(r){return typeof r=="string"?document.getElementById(r):r}function Bi(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 as(r){for(;r.firstChild;)r.removeChild(r.firstChild)}function Ur(r){var o=r.parentNode;o&&o.lastChild!==r&&o.appendChild(r)}function Zr(r){var o=r.parentNode;o&&o.firstChild!==r&&o.insertBefore(r,o.firstChild)}function uu(r,o){if(r.classList!==void 0)return r.classList.contains(o);var l=ls(r);return l.length>0&&new RegExp("(^|\\s)"+o+"(\\s|$)").test(l)}function oe(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=j(o.paddingTopLeft||o.padding||[0,0]),c=j(o.paddingBottomRight||o.padding||[0,0]),h=this.getCenter(),m=this.project(h),C=this.project(r),O=this.getPixelBounds(),z=O.getSize().divideBy(2),b=J([O.min.add(l),O.max.subtract(c)]);if(!b.contains(C)){this._enforcingBounds=!0;var q=m.subtract(C),ne=j(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 O={latlng:c,bounds:h,timestamp:r.timestamp};for(var z in r.coords)typeof r.coords[z]=="number"&&(O[z]=r.coords[z]);this.fire("locationfound",O)},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&&(ce(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var r;for(r in this._layers)this._layers[r].remove();for(r in this._panes)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=j(l||[0,0]);var c=this.getZoom()||0,h=this.getMinZoom(),m=this.getMaxZoom(),C=r.getNorthWest(),O=r.getSouthEast(),z=this.getSize().subtract(l),b=J(this.project(O,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(ie(r),o)},unproject:function(r,o){return o=o===void 0?this._zoom:o,this.options.crs.pointToLatLng(j(r),o)},layerPointToLatLng:function(r){var o=j(r).add(this.getPixelOrigin());return this.unproject(o)},latLngToLayerPoint:function(r){var o=this.project(ie(r))._round();return o._subtract(this.getPixelOrigin())},wrapLatLng:function(r){return this.options.crs.wrapLatLng(ie(r))},wrapLatLngBounds:function(r){return this.options.crs.wrapLatLngBounds(ee(r))},distance:function(r,o){return this.options.crs.distance(ie(r),ie(o))},containerPointToLayerPoint:function(r){return j(r).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(r){return j(r).add(this._getMapPanePos())},containerPointToLatLng:function(r){var o=this.containerPointToLayerPoint(j(r));return this.layerPointToLatLng(o)},latLngToContainerPoint:function(r){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ie(r)))},mouseEventToContainerPoint:function(r){return wh(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=vh(r);if(o){if(o._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");le(o,"scroll",this._onScroll,this),this._containerId=d(o)},_initLayout:function(){var r=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ct,oe(r,"leaflet-container"+(Qt?" leaflet-touch":"")+(In?" leaflet-retina":"")+(Dr?" leaflet-oldie":"")+(ns?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var o=Bi(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||(oe(r.markerPane,"leaflet-zoom-hide"),oe(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 ce(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:le;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(){ce(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&&!hs(m,r)||(l.push(c),h))||m===this._container)break;m=m.parentNode}return!l.length&&!C&&!h&&hs(m,r)&&(l=[this]),l},_handleDOMEvent:function(r){if(!(!this._loaded||Su(r))){var o=r.type;(o==="mousedown"||o==="keypress"||o==="keyup"||o==="keydown")&&mu(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 O=0;O0?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=lu,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,oe(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 n0(r,o){return new de(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 oe(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()}}),Hi=function(r){return new bt(r)};de.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 Eh=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),le(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()}}),r0=function(r,o,l){return new Eh(r,o,l)},Eu=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),Zi(m),le(m,"click",dn),le(m,"click",h,this),le(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())&&oe(this._zoomOutButton,o),(this._disabled||r._zoom===r.getMaxZoom())&&oe(this._zoomInButton,o)}});de.mergeOptions({zoomControl:!0}),de.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Eu,this.addControl(this.zoomControl))});var i0=function(r){return new Eu(r)},Ph=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}}),o0=function(r){return new Ph(r)},Pu=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"),Zi(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(" | ")}}});de.mergeOptions({attributionControl:!0}),de.addInitHook(function(){this.options.attributionControl&&new Pu().addTo(this)});var s0=function(r){return new Pu(r)};bt.Layers=Eh,bt.Zoom=Eu,bt.Scale=Ph,bt.Attribution=Pu,Hi.layers=r0,Hi.zoom=i0,Hi.scale=o0,Hi.attribution=s0;var Jt=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}});Jt.addTo=function(r,o){return r.addHandler(o,this),this};var a0={Events:F},Ch=Qt?"touchstart mousedown":"mousedown",Th={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Cu={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||(le(this._dragStartTarget,Ch,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(pr._dragging===this&&this.finishDrag(),Me(this._dragStartTarget,Ch,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(r){if(!(r._simulated||!this._enabled)&&(this._moved=!1,!uu(this._element,"leaflet-zoom-anim")&&!(pr._dragging||r.shiftKey||r.which!==1&&r.button!==1&&!r.touches)&&(pr._dragging=this,this._preventOutline&&mu(this._element),du(),Fi(),!this._moving))){this.fire("down");var o=r.touches?r.touches[0]:r,l=gh(this._element);this._startPoint=new T(o.clientX,o.clientY),this._parentScale=_u(l),le(document,Cu[r.type],this._onMove,this),le(document,Th[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=O,m=z);m>l&&(o[C]=1,Tu(r,o,l,c,C),Tu(r,o,l,C,h))}function c0(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 f0(r,o){var l=o.x-r.x,c=o.y-r.y;return l*l+c*c}function Wi(r,o,l,c){var h=o.x,m=o.y,C=l.x-h,O=l.y-m,z=C*C+O*O,b;return z>0&&(b=((r.x-h)*C+(r.y-m)*O)/z,b>1?(h=l.x,m=l.y):b>0&&(h+=C*b,m+=O*b)),C=r.x-h,O=r.y-m,c?C*C+O*O:new T(h,m)}function hn(r){return!y(r[0])||typeof r[0][0]!="object"&&typeof r[0][0]<"u"}function Mh(r){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),hn(r)}var d0={simplify:kh,pointToSegmentDistance:Lh,closestPointOnSegment:l0,clipSegment:Oh,_getEdgeIntersection:ps,_getBitCode:mr,_sqClosestPointOnSegment:Wi,isFlat:hn,_flat:Mh};function Rh(r,o,l){var c,h=[1,4,2,8],m,C,O,z,b,q,ne,me;for(m=0,q=r.length;m1e-7;O++)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)}},p0={LonLat:ku,Mercator:Lu,SphericalMercator:Fe},m0=s({},Ge,{code:"EPSG:3395",projection:Lu,transformation:function(){var r=.5/(Math.PI*Lu.R);return jt(r,.5,-r,.5)}()}),zh=s({},Ge,{code:"EPSG:4326",projection:ku,transformation:jt(1/180,1,-1/180,.5)}),_0=s({},ye,{projection:ku,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=Ge,ye.EPSG3395=m0,ye.EPSG3857=Rn,ye.EPSG900913=Dy,ye.EPSG4326=zh,ye.Simple=_0;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})}}});de.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=ie(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 P0(r,o){return new Kr(r,o)}var mn=Wr.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",oe(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(Bi(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=j(this.options.autoPanPadding),O=j(this.options.autoPanPaddingTopLeft||C),z=j(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-O.x<0&&(q=m.x-O.x),m.y+l+z.y>b.y&&(ne=m.y+l-b.y+z.y),m.y-ne-O.y<0&&(ne=m.y-O.y),(q||ne)&&r.fire("autopanstart").panBy([q,ne])}},_onCloseButtonClick:function(r){this._close(),dn(r)},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),N0=function(r,o){return new Gr(r,o)};de.mergeOptions({closePopupOnClick:!0}),de.include({openPopup:function(r,o,l){return r instanceof Gr||(r=new Gr(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 Gr?(E(r,o),this._popup=r,r._source=this):((!this._popup||o)&&(this._popup=new Gr(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 Yr=_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 Qt&&!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),O=this.options.direction,z=h.offsetWidth,b=h.offsetHeight,q=j(this.options.offset),ne=this._getAnchor();O==="top"?(o=z/2,l=b):O==="bottom"?(o=z/2,l=0):O==="center"?(o=z/2,l=b/2):O==="right"?(o=0,l=b/2):O==="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 O=this._tileCoordsToKey(C),z=this._tiles[O];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 _r=this._tiles[this._tileCoordsToKey(vn)];_r?_r.current=!0:C.push(vn)}}if(C.sort(function(Dn,Iu){return Dn.distanceTo(m)-Iu.distanceTo(m)}),C.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ss=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){oe(r,"leaflet-tile");var o=this.getTileSize();r.style.width=o.x+"px",r.style.height=o.y+"px",r.onselectstart=_,r.onmousemove=_,Dr&&this.options.opacity<1&&Tt(r,this.options.opacity),ji&&!Di&&(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),ce(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this)):(l.active=!0,this._pruneTiles()),o||(oe(l.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:l.el,coords:r})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Dr||!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?v(r.x,this._wrapX):r.x,this._wrapY?v(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 R0(r){return new Ki(r)}var Qr=Ki.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("")),ji||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 le(l,"load",u(this._tileOnLoad,this,o,l)),le(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){Dr?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=_,o.onerror=_,o.complete||(o.src=I,Ce(o),delete this._tiles[r]))},_removeTile:function(r){var o=this._tiles[r];if(o)return ah||o.el.setAttribute("src",I),Ki.prototype._removeTile.call(this,r)},_tileReady:function(r,o,l){if(!(!this._map||l&&l.getAttribute("src")===I))return Ki.prototype._tileReady.call(this,r,o,l)}});function Fh(r,o){return new Qr(r,o)}var $h=Qr.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,Qr.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===zh?[h.y,h.x,m.y,m.x]:[h.x,h.y,m.x,m.y]).join(","),O=Qr.prototype.getTileUrl.call(this,r);return O+R(this.wmsParams,O,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+C},setParams:function(r,o){return s(this.wmsParams,r),o||this.redraw(),this}});function z0(r,o){return new $h(r,o)}Qr.WMS=$h,Fh.wms=z0;var en=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&&oe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var 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),O=C.subtract(m),z=h.multiplyBy(-l).add(c).add(h).subtract(O);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()}}),Uh=en.extend({getEvents:function(){var r=en.prototype.getEvents.call(this);return r.viewprereset=this._onViewPreReset,r},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){en.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var r=this._container=document.createElement("canvas");le(r,"mousemove",this._onMouseMove,this),le(r,"click dblclick mousedown mouseup contextmenu",this._onClick,this),le(r,"mouseout",this._handleMouseOut,this),this._ctx=r.getContext("2d")},_destroyContainer:function(){ce(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)){en.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(){en.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">')}}}(),I0={_initContainer:function(){this._container=pe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(en.prototype._update.call(this),this.fire("update"))},_initPath:function(r){var o=r._container=qi("shape");oe(o,"leaflet-vml-shape "+(this.options.className||"")),o.coordsize="1 1",r._path=qi("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=qi("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=qi("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){Ur(r._container)},_bringToBack:function(r){Zr(r._container)}},xs=is?qi:oh,Gi=en.extend({getEvents:function(){var r=en.prototype.getEvents.call(this);return r.zoomstart=this._onZoomStart,r},_initContainer:function(){this._container=xs("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=xs("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)){en.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=xs("path");r.options.className&&oe(o,r.options.className),r.options.interactive&&oe(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,sh(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){Ur(r._path)},_bringToBack:function(r){Zr(r._path)}});is&&Gi.include(I0);function Hh(r){return rs||is?new Gi(r):null}de.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&&Zh(r)||Hh(r)}});var Wh=Kr.extend({initialize:function(r,o){Kr.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 A0(r,o){return new Wh(r,o)}Gi.create=xs,Gi.pointsToPath=sh,mn.geometryToLayer=Ou,mn.coordsToLatLng=Mu,mn.coordsToLatLngs=vs,mn.latLngToCoords=Ru,mn.latLngsToCoords=gs,mn.getFeature=qr,mn.asFeature=ys,de.mergeOptions({boxZoom:!0});var Vh=Jt.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(){le(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(),Fi(),du(),this._startPoint=this._map.mouseEventToContainerPoint(r),le(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),oe(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")),$i(),hu(),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()}});de.addInitHook("addHandler","boxZoom",Vh),de.mergeOptions({doubleClickZoom:!0});var Kh=Jt.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)}});de.addInitHook("addHandler","doubleClickZoom",Kh),de.mergeOptions({dragging:!0,inertia:!Di,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var qh=Jt.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))}oe(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))}});de.addInitHook("addHandler","scrollWheelZoom",Yh),de.mergeOptions({tap:!0,tapTolerance:15});var Qh=Jt.extend({addHooks:function(){le(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"&&oe(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),le(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)}});Qt&&(!Yt||ns)&&de.addInitHook("addHandler","tap",Qh),de.mergeOptions({touchZoom:Qt&&!Di,bounceAtZoomLimits:!0});var Xh=Jt.extend({addHooks:function(){oe(this._map._container,"leaflet-touch-zoom"),le(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(),le(document,"touchmove",this._onTouchMove,this),le(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),ce(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,ce(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))}});de.addInitHook("addHandler","touchZoom",Xh),de.BoxZoom=Vh,de.DoubleClickZoom=Kh,de.Drag=qh,de.Keyboard=Gh,de.ScrollWheelZoom=Yh,de.Tap=Qh,de.TouchZoom=Xh,n.version=i,n.Control=bt,n.control=Hi,n.Browser=Uy,n.Evented=K,n.Mixin=a0,n.Util=We,n.Class=Y,n.Handler=Jt,n.extend=s,n.bind=u,n.stamp=d,n.setOptions=E,n.DomEvent=t0,n.DomUtil=Jy,n.PosAnimation=Sh,n.Draggable=pr,n.LineUtil=d0,n.PolyUtil=h0,n.Point=T,n.point=j,n.Bounds=H,n.bounds=J,n.Transformation=Pt,n.transformation=jt,n.Projection=p0,n.LatLng=te,n.latLng=ie,n.LatLngBounds=re,n.latLngBounds=ee,n.CRS=ye,n.GeoJSON=mn,n.geoJSON=jh,n.geoJson=C0,n.Layer=Bt,n.LayerGroup=Hr,n.layerGroup=v0,n.FeatureGroup=Wr,n.featureGroup=g0,n.ImageOverlay=ws,n.imageOverlay=T0,n.VideoOverlay=Dh,n.videoOverlay=k0,n.SVGOverlay=bh,n.svgOverlay=L0,n.DivOverlay=_n,n.Popup=Gr,n.popup=N0,n.Tooltip=Yr,n.tooltip=O0,n.Icon=Vr,n.icon=y0,n.DivIcon=Bh,n.divIcon=M0,n.Marker=ms,n.marker=w0,n.TileLayer=Qr,n.tileLayer=Fh,n.GridLayer=Ki,n.gridLayer=R0,n.SVG=Gi,n.svg=Hh,n.Renderer=en,n.Canvas=Uh,n.canvas=Zh,n.Path=jn,n.CircleMarker=_s,n.circleMarker=x0,n.Circle=Nu,n.circle=S0,n.Polyline=pn,n.polyline=E0,n.Polygon=Kr,n.polygon=P0,n.Rectangle=Wh,n.rectangle=A0,n.Map=de,n.map=n0;var j0=window.L;n.noConflict=function(){return window.L=j0,this},window.L=n})})(kf,kf.exports);var ki=kf.exports;function WP(e,t){const[n,i]=M.useState(null),s=M.useRef(!1);return M.useEffect(()=>{if(e.current!==null&&!s.current){const a=new ki.Map(e.current,{center:{lat:t.location.latitude,lng:t.location.longitude},zoom:12}),u=new ki.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 VP={offers:[],offersFavorites:[],activeOffer:null,status:se.Idle},Ya=Ii({name:"offers",initialState:VP,reducers:{setActiveOffer:(e,t)=>{e.activeOffer=t.payload}},extraReducers:e=>{e.addCase(oa.pending,t=>{t.status=se.Loading}),e.addCase(oa.fulfilled,(t,n)=>{t.offers=n.payload,t.status=se.Succeed}),e.addCase(oa.rejected,t=>{t.status=se.Failed}),e.addCase(Gd.fulfilled,(t,n)=>{const i=t.offers.find(s=>s.id===n.payload.id);i&&(i.isFavorite=n.payload.isFavorite)})},selectors:{offers:e=>e.offers,activeOffer:e=>e.activeOffer,status:e=>e.status}}),sy={...Ya.actions,fetchOffers:oa},Lf=Ya.selectors,KP=new ki.Icon(SS),qP=new ki.Icon(ES);function GP({container:e,city:t,offers:n,currentOfferId:i}){const s=ot(Lf.activeOffer),a=M.useRef(null),u=WP(a,t);return M.useEffect(()=>{if(u){const f=ki.layerGroup().addTo(u);return n.forEach(d=>{new ki.Marker({lat:d.location.latitude,lng:d.location.longitude}).setIcon(s!==null&&d.id===s.id||d.id===i?qP:KP).addTo(f)}),u.flyTo([t.location.latitude,t.location.longitude],12),()=>{u.removeLayer(f)}}},[t,u,n,s,i]),x.jsx("section",{ref:a,className:`${e}__map map`})}const ay=M.memo(GP);function ly({componentType:e,isFavorite:t,offerId:n}){const i={"place-card":{width:"18",height:"19"},offer:{width:"31",height:"33"}},[s,a]=M.useState(t),[u,f]=M.useState(!1),{toggleFavorite:d}=un(oy),p=ot(Yo.authStatus),v=zd(),_=p===nt.Auth,S=()=>{_||v(Je.Login),f(!0),ae.promise(d({status:+!s,offerId:n}).unwrap(),{pending:"Sending request",success:{render(){return a(!s),f(!1),"Success"}}})};return x.jsxs("button",{className:zr(`${e}__bookmark-button button`,s&&_&&`${e}__bookmark-button--active`),type:"button",onClick:S,disabled:u,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 YP=e=>Math.round(e)*100/5,QP=e=>e.charAt(0).toUpperCase()+e.slice(1),XP=e=>{var t;return(t=fr.find(n=>n.name===e))==null?void 0:t.slug},JP=e=>{const t=Math.floor(Math.random()*e.length);return e[t]};function Yd({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:`${YP(t)}%`}}),x.jsx("span",{className:"visually-hidden",children:"Rating"})]}),e==="offer"&&x.jsx("span",{className:"offer__rating-value rating__value",children:t})]})}function eC({offer:e,componentType:t,onHoverCard:n}){const{id:i,isPremium:s,previewImage:a,price:u,isFavorite:f,rating:d,title:p,type:v}=e,_=`${Je.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 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:_,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(ly,{offerId:i,componentType:"place-card",isFavorite:f})]}),x.jsx(Yd,{componentType:"place-card",rating:d}),x.jsx("h2",{className:"place-card__name",children:x.jsx(ln,{to:_,children:p})}),x.jsx("p",{className:"place-card__type",children:v})]})]})}const Qd=M.memo(eC);var fi=(e=>(e.Popular="Popular",e.PriceLowToHigh="Price: low to high",e.PriceHighToLow="Price: high to low",e.TopRatedFirst="Top rated first",e))(fi||{});const tC="Popular";function nC(e,t){switch(e){case fi.Popular:return t;case fi.PriceLowToHigh:return t.toSorted((n,i)=>n.price-i.price);case fi.PriceHighToLow:return t.toSorted((n,i)=>i.price-n.price);case fi.TopRatedFirst:return t.toSorted((n,i)=>i.rating-n.rating);default:return t}}function rC(e,t){return new Date(t.date).getTime()-new Date(e.date).getTime()}function iC(e=!1){const[t,n]=M.useState(e);return{isOn:t,off:()=>n(!1),on:()=>n(!0),toggle:()=>n(i=>!i)}}function oC({activeSortOption:e,setActiveSortOption:t}){const{isOn:n,toggle:i,off:s}=iC(!1),a=M.useRef(null);M.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:zr("places__options","places__options--custom",n&&"places__options--opened"),children:Object.values(fi).map((f,d)=>x.jsx("li",{className:zr("places__option",e===f&&"places__option--active"),tabIndex:d,onClick:()=>u(f),children:f},f))})]})}const sC=M.memo(oC);function aC({offersByCity:e,city:t}){const[n,i]=M.useState(tC),s=M.useCallback(d=>{i(d)},[i]),{setActiveOffer:a}=un(sy),u=M.useCallback(d=>a(d),[a]);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 f=nC(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(sC,{activeSortOption:n,setActiveSortOption:s}),x.jsx("div",{className:"cities__places-list places__list tabs__content",children:f.map(d=>x.jsx(Qd,{componentType:"cities",offer:d,onHoverCard:u},d.id))})]})}const lC="_container_qshx3_1",uC="_loader_qshx3_9",cC="_animloader_qshx3_1",Am={container:lC,loader:uC,animloader:cC};function Xd(){return x.jsx("div",{className:Am.container,children:x.jsx("span",{className:Am.loader})})}function fC({title:e="Main",citySlug:t}){Qo(e);const{fetchOffers:n}=un(sy),i=ot(Lf.status),s=ot(Lf.offers);M.useEffect(()=>{n().unwrap().catch(f=>{ae.warning(f.message)})},[n]);const a=fr.find(f=>f.slug===t);if(!a)return null;const u=s.filter(f=>f.city.name===a.name);return i===se.Loading?x.jsx(Xd,{}):x.jsxs("div",{className:zr("page page--gray page--main",u.length===0&&"page__main--index-empty"),children:[x.jsx(Hl,{}),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(ZP,{})})}),x.jsx("div",{className:"cities",children:x.jsxs("div",{className:zr("cities__places-container container",u.length===0&&"cities__places-container--empty"),children:[x.jsx(aC,{offersByCity:u,city:a}),x.jsx("div",{className:"cities__right-section",children:a&&u.length>0&&x.jsx(ay,{container:"cities",city:a,offers:u})})]})})]})]})}const dC="_container_e270g_1",hC={container:dC};function uy({title:e="404"}){return Qo(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(Ad,{})})})})}),x.jsxs("main",{className:hC.container,children:[x.jsxs("h1",{children:["Ошибка 404. ",x.jsx("br",{}),"Страница не найдена 😕"]}),x.jsxs(ln,{to:"/",className:"locations__item-link",children:[" ","<- Вернуться на главную страницу"]})]})]})}function pC(){return x.jsx("footer",{className:"footer container",children:x.jsx(ln,{className:"footer__logo-link",to:Je.Root,children:x.jsx("img",{className:"footer__logo",src:"img/logo.svg",alt:"6 cities logo",width:"64",height:"33"})})})}const cy=M.memo(pC);function mC(){return x.jsxs("div",{className:"page page--favorites-empty",children:[x.jsx(Hl,{}),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(cy,{})]})}function _C({offersFavoritesByCity:e}){var t;return x.jsxs("section",{className:"favorites",children:[x.jsx("h1",{className:"favorites__title",children:"Saved listing"}),x.jsx("ul",{className:"favorites__list",children:(t=Object.keys(e))==null?void 0:t.map(n=>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:`${Je.Root}${XP(n)}`,children:x.jsx("span",{children:n})})})}),x.jsx("div",{className:"favorites__places",children:e[n].map(i=>x.jsx(Qd,{componentType:"favorites",offer:i},i.id))})]},n))})]})}function vC({title:e="Favorites"}){Qo(e);const t=ot(Tf.favorites);if(t.length===0)return x.jsx(mC,{});const n=Object.groupBy(t,({city:i})=>i.name);return x.jsxs("div",{className:"page",children:[x.jsx(Hl,{}),x.jsx("main",{className:"page__main page__main--favorites",children:x.jsx("div",{className:"page__favorites-container container",children:x.jsx(_C,{offersFavoritesByCity:n})})}),x.jsx(cy,{})]})}function gC({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:zr("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 yC={offerFullInfo:null,status:se.Idle},Qa=Ii({name:"offerFullInfo",initialState:yC,reducers:{},extraReducers:e=>{e.addCase(sa.pending,t=>{t.status=se.Loading}),e.addCase(sa.fulfilled,(t,n)=>{t.offerFullInfo=n.payload,t.status=se.Succeed}),e.addCase(sa.rejected,t=>{t.status=se.Failed})},selectors:{offerFullInfo:e=>e.offerFullInfo,status:e=>e.status}}),wC={...Qa.actions,fetchOfferFullInfo:sa},jm=Qa.selectors,xC={offersNear:[],status:se.Idle},Xa=Ii({name:"offersNear",initialState:xC,reducers:{},extraReducers:e=>{e.addCase(aa.pending,t=>{t.status=se.Loading}),e.addCase(aa.fulfilled,(t,n)=>{t.offersNear=n.payload,t.status=se.Succeed}),e.addCase(aa.rejected,t=>{t.status=se.Failed})},selectors:{offersNear:e=>e.offersNear,status:e=>e.status}}),SC={...Xa.actions,fetchOffersNear:aa},EC=Xa.selectors,ua=cn("data/fetchComments",async(e,{extra:t})=>{const{data:n}=await t.get(`${qt.Comments}/${e}`);return n}),ca=cn("data/postComment",async({offerId:e,body:t},{extra:n})=>{const{data:i}=await n.post(`${qt.Comments}/${e}`,t);return i}),PC={comments:[],status:se.Idle,statusPostRequest:se.Idle},Zo=Ii({name:"comments",initialState:PC,reducers:{},extraReducers:e=>{e.addCase(ua.pending,t=>{t.status=se.Loading}),e.addCase(ua.fulfilled,(t,n)=>{t.comments=n.payload,t.status=se.Succeed}),e.addCase(ua.rejected,t=>{t.status=se.Failed}),e.addCase(ca.pending,t=>{t.statusPostRequest=se.Loading}),e.addCase(ca.fulfilled,(t,n)=>{t.statusPostRequest=se.Succeed,t.comments.push(n.payload)}),e.addCase(ca.rejected,t=>{t.statusPostRequest=se.Failed})},selectors:{comments:e=>e.comments,status:e=>e.status,statusPostRequest:e=>e.statusPostRequest}}),fy={...Zo.actions,fetchComments:ua,postComment:ca},CC={...Zo.selectors,sortedComments:Kg(Zo.selectors.comments,e=>e.toSorted(rC))};var dy={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Ym,function(){var n=1e3,i=6e4,s=36e5,a="millisecond",u="second",f="minute",d="hour",p="day",v="week",_="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(j[0])}else{var H=W.name;B[H]=W,T=H}return!K&&T&&(I=T),T||!K&&I},V=function(Y,W){if(A(Y))return Y.clone();var F=typeof W=="object"?W:{};return F.date=Y,F.args=arguments,new ce(F)},G=N;G.l=X,G.i=A,G.w=function(Y,W){return V(Y,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var ce=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 j=T.match(R);if(j){var H=j[2]-1||0,J=(j[7]||"0").substring(0,3);return U?new Date(Date.UTC(j[1],H,j[3]||1,j[4]||0,j[5]||0,j[6]||0,J)):new Date(j[1],H,j[3]||1,j[4]||0,j[5]||0,j[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)},[e]),x.jsxs(x.Fragment,{children:[x.jsxs("h2",{className:"reviews__title",children:["Reviews · ",x.jsx("span",{className:"reviews__amount",children:i})]}),x.jsx("ul",{className:"reviews__list",children:i>0&&s.map(a=>x.jsx(kC,{commentData:a},a.id))})]})}const OC=50,MC=300;function RC({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 zC=M.memo(RC);function IC({isDisabled:e}){return x.jsx("div",{className:"reviews__rating-form form__rating",children:Object.entries(Sg).slice(1).map(([t,n])=>x.jsx(zC,{starTitle:t,starValue:n,isDisabled:e},t))})}const AC=M.memo(IC),jC=(e,t)=>e.length<=OC||e.length>MC||Number(t)===Sg.unknown;function DC({offerId:e}){const[t,n]=M.useState(!0),[i,s]=M.useState(!1),{postComment:a}=un(fy),u=d=>{const p=d.currentTarget,v=p.rating.value,_=p.review.value;n(jC(_,v))},f=d=>{d.preventDefault();const p=d.currentTarget,v=()=>{p.reset(),n(!0),s(!1)},_={offerId:e,body:{comment:p.review.value,rating:Number(p.rating.value)}};s(!0),ae.promise(a(_).unwrap(),{pending:"Sending comment",success:{render(){return v(),"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(AC,{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 bC({offerId:e}){const t=ot(Yo.authStatus);return x.jsxs("section",{className:"offer__reviews reviews",children:[e&&x.jsx(NC,{offerId:e}),t===nt.Auth&&e&&x.jsx(DC,{offerId:e})]})}const BC=6,FC=3;function $C({title:e="Offer"}){Qo(e);const{fetchOfferFullInfo:t}=un(wC),{fetchOffersNear:n}=un(SC),i=ot(jm.status),{offerId:s}=Wx();M.useEffect(()=>{s&&(ae.promise(t(s),{error:"Ошибка загрузки данных предложения"}),ae.promise(n(s),{error:"Ошибка загрузки данных предложений по близости"}))},[t,n,s]);const a=ot(jm.offerFullInfo),u=ot(EC.offersNear).slice(0,FC);if(i===se.Loading)return x.jsx(Xd,{});if(i===se.Failed||!a)return x.jsx(uy,{});const f=[...u,a],{images:d,isPremium:p,isFavorite:v,rating:_,type:S,bedrooms:k,maxAdults:P,price:E,goods:R,host:w,description:g,city:y}=a,N=fr.find(I=>I.name===y.name);return x.jsxs("div",{className:"page",children:[x.jsx(Hl,{}),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:d.slice(0,BC).map(I=>x.jsx("div",{className:"offer__image-wrapper",children:x.jsx("img",{className:"offer__image",src:I,alt:"Photo studio"})},I))})}),x.jsx("div",{className:"offer__container container",children:x.jsxs("div",{className:"offer__wrapper",children:[p&&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(ly,{offerId:s,componentType:"offer",isFavorite:v})]}),x.jsx(Yd,{componentType:"offer",rating:_}),x.jsxs("ul",{className:"offer__features",children:[x.jsx("li",{className:"offer__feature offer__feature--entire",children:QP(S)}),x.jsx("li",{className:"offer__feature offer__feature--bedrooms",children:`${k} Bedroom${k>1?"s":""}`}),x.jsx("li",{className:"offer__feature offer__feature--adults",children:`Max ${P} adult${P>1?"s":""}`})]}),x.jsxs("div",{className:"offer__price",children:[x.jsxs("b",{className:"offer__price-value",children:["€",E]}),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:R.map(I=>x.jsx("li",{className:"offer__inside-item",children:I},I))})]}),x.jsx(gC,{host:w,description:g}),x.jsx(bC,{offerId:s})]})}),N&&x.jsx(ay,{container:"offer",city:N,currentOfferId:s,offers:f})]}),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(I=>x.jsx(Qd,{offer:I,componentType:"near-places"},I.id))})]})})]})]})}function UC(){const[e,t]=M.useState(""),[n,i]=M.useState(""),{login:s}=un(qd),a=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,u=/^(?=.*\d)(?=.*[a-zA-Z]).*$/,f=d=>{if(d.preventDefault(),!a.test(e)){ae.error("Введен неверный email");return}if(!u.test(n)){ae.error("Пароль должен содержать хотя бы одну букву и одну цифру");return}ae.promise(s({email:e,password:n}).unwrap(),{pending:"Loading"})};return x.jsxs("section",{className:"login",children:[x.jsx("h1",{className:"login__title",children:"Sign in"}),x.jsxs("form",{onSubmit:d=>f(d),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:d=>t(d.target.value),className:"login__input form__input",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:d=>i(d.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 ZC(){const e=JP(fr);return x.jsx("section",{className:"locations locations--login locations--current",children:x.jsx("div",{className:"locations__item",children:x.jsx(ln,{to:`/${e.slug}`,className:"locations__item-link",children:x.jsx("span",{children:e.name})})})})}function HC({title:e="Login"}){return Qo(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(Ad,{})})})})}),x.jsx("main",{className:"page__main page__main--login",children:x.jsxs("div",{className:"page__login-container container",children:[x.jsx(UC,{}),x.jsx(ZC,{})]})})]})}const py=(e,t)=>function({children:i}){const s=ot(Yo.authStatus),a=cr();if(s===nt.Unknown)return x.jsx(Xd,{});const u=(a.state??{}).from??t;return s===e?i:x.jsx(wg,{to:u,state:{from:a.pathname}})},WC=py(nt.Auth,Je.Login),VC=py(nt.NoAuth,Je.Root);function KC(){return x.jsx(fS,{children:x.jsxs(oS,{children:[x.jsx(yr,{path:Je.Root,element:x.jsx(wg,{to:yS})}),fr.map(e=>x.jsx(yr,{path:Je.Root+e.slug,element:x.jsx(fC,{citySlug:e.slug})},e.slug)),x.jsx(yr,{path:Je.Login,element:x.jsx(VC,{children:x.jsx(HC,{})})}),x.jsx(yr,{path:Je.Favorites,element:x.jsx(WC,{children:x.jsx(vC,{})})}),x.jsx(yr,{path:`${Je.Offer}/:offerId`,element:x.jsx($C,{})}),x.jsx(yr,{path:"/*",element:x.jsx(uy,{})})]})})}function my(e,t){return function(){return e.apply(t,arguments)}}const{toString:qC}=Object.prototype,{getPrototypeOf:Jd}=Object,Wl=(e=>t=>{const n=qC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fn=e=>(e=e.toLowerCase(),t=>Wl(t)===e),Vl=e=>t=>typeof t===e,{isArray:Ai}=Array,Ho=Vl("undefined");function GC(e){return e!==null&&!Ho(e)&&e.constructor!==null&&!Ho(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _y=fn("ArrayBuffer");function YC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_y(e.buffer),t}const QC=Vl("string"),Rt=Vl("function"),vy=Vl("number"),Kl=e=>e!==null&&typeof e=="object",XC=e=>e===!0||e===!1,fa=e=>{if(Wl(e)!=="object")return!1;const t=Jd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},JC=fn("Date"),eT=fn("File"),tT=fn("Blob"),nT=fn("FileList"),rT=e=>Kl(e)&&Rt(e.pipe),iT=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=Wl(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},oT=fn("URLSearchParams"),sT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),Ai(e))for(i=0,s=e.length;i0;)if(s=n[i],t===s.toLowerCase())return s;return null}const yy=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),wy=e=>!Ho(e)&&e!==yy;function Nf(){const{caseless:e}=wy(this)&&this||{},t={},n=(i,s)=>{const a=e&&gy(t,s)||s;fa(t[a])&&fa(i)?t[a]=Nf(t[a],i):fa(i)?t[a]=Nf({},i):Ai(i)?t[a]=i.slice():t[a]=i};for(let i=0,s=arguments.length;i(Xo(t,(s,a)=>{n&&Rt(s)?e[a]=my(s,n):e[a]=s},{allOwnKeys:i}),e),lT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),uT=(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)},cT=(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&&Jd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},fT=(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},dT=e=>{if(!e)return null;if(Ai(e))return e;let t=e.length;if(!vy(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},hT=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Jd(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])}},mT=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},_T=fn("HTMLFormElement"),vT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),bm=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),gT=fn("RegExp"),xy=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Xo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(i[a]=u||s)}),Object.defineProperties(e,i)},yT=e=>{xy(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+"'")})}})},wT=(e,t)=>{const n={},i=s=>{s.forEach(a=>{n[a]=!0})};return Ai(e)?i(e):i(String(e).split(t)),n},xT=()=>{},ST=(e,t)=>(e=+e,Number.isFinite(e)?e:t),_c="abcdefghijklmnopqrstuvwxyz",Bm="0123456789",Sy={DIGIT:Bm,ALPHA:_c,ALPHA_DIGIT:_c+_c.toUpperCase()+Bm},ET=(e=16,t=Sy.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function PT(e){return!!(e&&Rt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const CT=e=>{const t=new Array(10),n=(i,s)=>{if(Kl(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const a=Ai(i)?[]:{};return Xo(i,(u,f)=>{const d=n(u,s+1);!Ho(d)&&(a[f]=d)}),t[s]=void 0,a}}return i};return n(e,0)},TT=fn("AsyncFunction"),kT=e=>e&&(Kl(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch),D={isArray:Ai,isArrayBuffer:_y,isBuffer:GC,isFormData:iT,isArrayBufferView:YC,isString:QC,isNumber:vy,isBoolean:XC,isObject:Kl,isPlainObject:fa,isUndefined:Ho,isDate:JC,isFile:eT,isBlob:tT,isRegExp:gT,isFunction:Rt,isStream:rT,isURLSearchParams:oT,isTypedArray:hT,isFileList:nT,forEach:Xo,merge:Nf,extend:aT,trim:sT,stripBOM:lT,inherits:uT,toFlatObject:cT,kindOf:Wl,kindOfTest:fn,endsWith:fT,toArray:dT,forEachEntry:pT,matchAll:mT,isHTMLForm:_T,hasOwnProperty:bm,hasOwnProp:bm,reduceDescriptors:xy,freezeMethods:yT,toObjectSet:wT,toCamelCase:vT,noop:xT,toFiniteNumber:ST,findKey:gy,global:yy,isContextDefined:wy,ALPHABET:Sy,generateString:ET,isSpecCompliantForm:PT,toJSONObject:CT,isAsyncFn:TT,isThenable:kT};function fe(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(fe,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 Ey=fe.prototype,Py={};["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=>{Py[e]={value:e}});Object.defineProperties(fe,Py);Object.defineProperty(Ey,"isAxiosError",{value:!0});fe.from=(e,t,n,i,s,a)=>{const u=Object.create(Ey);return D.toFlatObject(e,u,function(d){return d!==Error.prototype},f=>f!=="isAxiosError"),fe.call(u,e.message,t,n,i,s),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};const LT=null;function Of(e){return D.isPlainObject(e)||D.isArray(e)}function Cy(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Fm(e,t,n){return e?e.concat(t).map(function(s,a){return s=Cy(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function NT(e){return D.isArray(e)&&!e.some(Of)}const OT=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function ql(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||v,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 fe("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 v(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)&&NT(P)||(D.isFileList(P)||D.endsWith(E,"[]"))&&(w=D.toArray(P)))return E=Cy(E),w.forEach(function(y,N){!(D.isUndefined(y)||y===null)&&t.append(u===!0?Fm([E],N,a):u===null?E:E+"[]",p(y))}),!1}return Of(P)?!0:(t.append(Fm(R,E,a),p(P)),!1)}const _=[],S=Object.assign(OT,{defaultVisitor:v,convertValue:p,isVisitable:Of});function k(P,E){if(!D.isUndefined(P)){if(_.indexOf(P)!==-1)throw Error("Circular reference detected in "+E.join("."));_.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])}),_.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return k(e),t}function $m(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function eh(e,t){this._pairs=[],e&&ql(e,this,t)}const Ty=eh.prototype;Ty.append=function(t,n){this._pairs.push([t,n])};Ty.toString=function(t){const n=t?function(i){return t.call(this,i,$m)}:$m;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function MT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ky(e,t,n){if(!t)return e;const i=n&&n.encode||MT,s=n&&n.serialize;let a;if(s?a=s(t,n):a=D.isURLSearchParams(t)?t.toString():new eh(t,n).toString(i),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class RT{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 Um=RT,Ly={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},zT=typeof URLSearchParams<"u"?URLSearchParams:eh,IT=typeof FormData<"u"?FormData:null,AT=typeof Blob<"u"?Blob:null,jT={isBrowser:!0,classes:{URLSearchParams:zT,FormData:IT,Blob:AT},protocols:["http","https","file","blob","url","data"]},Ny=typeof window<"u"&&typeof document<"u",DT=(e=>Ny&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),bT=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),BT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ny,hasStandardBrowserEnv:DT,hasStandardBrowserWebWorkerEnv:bT},Symbol.toStringTag,{value:"Module"})),on={...BT,...jT};function FT(e,t){return ql(e,new on.classes.URLSearchParams,Object.assign({visitor:function(n,i,s,a){return on.isNode&&D.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function $T(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function UT(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]=UT(s[u])),!f)}if(D.isFormData(e)&&D.isFunction(e.entries)){const n={};return D.forEachEntry(e,(i,s)=>{t($T(i),s,n,0)}),n}return null}function ZT(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 th={transitional:Ly,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(Oy(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 FT(t,this.formSerializer).toString();if((f=D.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ql(f?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),ZT(t)):t}],transformResponse:[function(t){const n=this.transitional||th.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"?fe.from(f,fe.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:on.classes.FormData,Blob:on.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=>{th.headers[e]={}});const nh=th,HT=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"]),WT=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]&&HT[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},Zm=Symbol("internals");function io(e){return e&&String(e).trim().toLowerCase()}function da(e){return e===!1||e==null?e:D.isArray(e)?e.map(da):String(e)}function VT(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 KT=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function vc(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 qT(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function GT(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 Gl{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function a(f,d,p){const v=io(d);if(!v)throw new Error("header name must be a non-empty string");const _=D.findKey(s,v);(!_||s[_]===void 0||p===!0||p===void 0&&s[_]!==!1)&&(s[_||d]=da(f))}const u=(f,d)=>D.forEach(f,(p,v)=>a(p,v,d));return D.isPlainObject(t)||t instanceof this.constructor?u(t,n):D.isString(t)&&(t=t.trim())&&!KT(t)?u(WT(t),n):t!=null&&a(n,t,i),this}get(t,n){if(t=io(t),t){const i=D.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return VT(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=io(t),t){const i=D.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||vc(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function a(u){if(u=io(u),u){const f=D.findKey(i,u);f&&(!n||vc(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||vc(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]=da(s),delete n[a];return}const f=t?qT(a):String(a).trim();f!==a&&delete n[a],n[f]=da(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[Zm]=this[Zm]={accessors:{}}).accessors,s=this.prototype;function a(u){const f=io(u);i[f]||(GT(s,u),i[f]=!0)}return D.isArray(t)?t.forEach(a):a(t),this}}Gl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Gl.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});D.freezeMethods(Gl);const Pn=Gl;function gc(e,t){const n=this||nh,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 My(e){return!!(e&&e.__CANCEL__)}function Jo(e,t,n){fe.call(this,e??"canceled",fe.ERR_CANCELED,t,n),this.name="CanceledError"}D.inherits(Jo,fe,{__CANCEL__:!0});function YT(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new fe("Request failed with status code "+n.status,[fe.ERR_BAD_REQUEST,fe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const QT=on.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 XT(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function JT(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ry(e,t){return e&&!XT(t)?JT(e,t):t}const ek=on.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 tk(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nk(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(),v=i[a];u||(u=p),n[s]=d,i[s]=p;let _=a,S=0;for(;_!==s;)S+=n[_++],_=_%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 v={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};v[t?"download":"upload"]=!0,e(v)}}const rk=typeof XMLHttpRequest<"u",ik=rk&&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 v;if(D.isFormData(s)){if(on.hasStandardBrowserEnv||on.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((v=a.getContentType())!==!1){const[E,...R]=v?v.split(";").map(w=>w.trim()).filter(Boolean):[];a.setContentType([E||"multipart/form-data",...R].join("; "))}}let _=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=Ry(e.baseURL,e.url);_.open(e.method.toUpperCase(),ky(S,e.params,e.paramsSerializer),!0),_.timeout=e.timeout;function k(){if(!_)return;const E=Pn.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),w={data:!u||u==="text"||u==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:E,config:e,request:_};YT(function(y){n(y),p()},function(y){i(y),p()},w),_=null}if("onloadend"in _?_.onloadend=k:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(k)},_.onabort=function(){_&&(i(new fe("Request aborted",fe.ECONNABORTED,e,_)),_=null)},_.onerror=function(){i(new fe("Network Error",fe.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const w=e.transitional||Ly;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),i(new fe(R,w.clarifyTimeoutError?fe.ETIMEDOUT:fe.ECONNABORTED,e,_)),_=null},on.hasStandardBrowserEnv&&(f&&D.isFunction(f)&&(f=f(e)),f||f!==!1&&ek(S))){const E=e.xsrfHeaderName&&e.xsrfCookieName&&QT.read(e.xsrfCookieName);E&&a.set(e.xsrfHeaderName,E)}s===void 0&&a.setContentType(null),"setRequestHeader"in _&&D.forEach(a.toJSON(),function(R,w){_.setRequestHeader(w,R)}),D.isUndefined(e.withCredentials)||(_.withCredentials=!!e.withCredentials),u&&u!=="json"&&(_.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&_.addEventListener("progress",Hm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&_.upload&&_.upload.addEventListener("progress",Hm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(d=E=>{_&&(i(!E||E.type?new Jo(null,e,_):E),_.abort(),_=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d)));const P=tk(S);if(P&&on.protocols.indexOf(P)===-1){i(new fe("Unsupported protocol "+P+":",fe.ERR_BAD_REQUEST,e));return}_.send(s||null)})},Mf={http:LT,xhr:ik};D.forEach(Mf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Wm=e=>`- ${e}`,ok=e=>D.isFunction(e)||e===null||e===!1,zy={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(Wm).join(` +`):" "+Wm(a[0]):"as no adapter specified";throw new fe("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:Mf};function yc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jo(null,e)}function Vm(e){return yc(e),e.headers=Pn.from(e.headers),e.data=gc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),zy.getAdapter(e.adapter||nh.adapter)(e).then(function(i){return yc(e),i.data=gc.call(e,e.transformResponse,i),i.headers=Pn.from(i.headers),i},function(i){return My(i)||(yc(e),i&&i.response&&(i.response.data=gc.call(e,e.transformResponse,i.response),i.response.headers=Pn.from(i.response.headers))),Promise.reject(i)})}const Km=e=>e instanceof Pn?{...e}:e;function Li(e,t){t=t||{};const n={};function i(p,v,_){return D.isPlainObject(p)&&D.isPlainObject(v)?D.merge.call({caseless:_},p,v):D.isPlainObject(v)?D.merge({},v):D.isArray(v)?v.slice():v}function s(p,v,_){if(D.isUndefined(v)){if(!D.isUndefined(p))return i(void 0,p,_)}else return i(p,v,_)}function a(p,v){if(!D.isUndefined(v))return i(void 0,v)}function u(p,v){if(D.isUndefined(v)){if(!D.isUndefined(p))return i(void 0,p)}else return i(void 0,v)}function f(p,v,_){if(_ in t)return i(p,v);if(_ 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,v)=>s(Km(p),Km(v),!0)};return D.forEach(Object.keys(Object.assign({},e,t)),function(v){const _=d[v]||s,S=_(e[v],t[v],v);D.isUndefined(S)&&_!==f||(n[v]=S)}),n}const Iy="1.6.8",rh={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rh[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const qm={};rh.transitional=function(t,n,i){function s(a,u){return"[Axios v"+Iy+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,f)=>{if(t===!1)throw new fe(s(u," has been removed"+(n?" in "+n:"")),fe.ERR_DEPRECATED);return n&&!qm[u]&&(qm[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 sk(e,t,n){if(typeof e!="object")throw new fe("options must be an object",fe.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 fe("option "+a+" must be "+d,fe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new fe("Unknown option "+a,fe.ERR_BAD_OPTION)}}const Rf={assertOptions:sk,validators:rh},Bn=Rf.validators;class Ja{constructor(t){this.defaults=t,this.interceptors={request:new Um,response:new Um}}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=Li(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:a}=n;i!==void 0&&Rf.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}:Rf.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=[Vm.bind(this),void 0];for(P.unshift.apply(P,f),P.push.apply(P,p),S=P.length,v=Promise.resolve(n);_{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](s);i._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(f=>{i.subscribe(f),a=f}).then(s);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,f){i.reason||(i.reason=new Jo(a,u,f),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ih(function(s){t=s}),cancel:t}}}const ak=ih;function lk(e){return function(n){return e.apply(null,n)}}function uk(e){return D.isObject(e)&&e.isAxiosError===!0}const zf={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(zf).forEach(([e,t])=>{zf[t]=e});const ck=zf;function Ay(e){const t=new ha(e),n=my(ha.prototype.request,t);return D.extend(n,ha.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Ay(Li(e,s))},n}const De=Ay(nh);De.Axios=ha;De.CanceledError=Jo;De.CancelToken=ak;De.isCancel=My;De.VERSION=Iy;De.toFormData=ql;De.AxiosError=fe;De.Cancel=De.CanceledError;De.all=function(t){return Promise.all(t)};De.spread=lk;De.isAxiosError=uk;De.mergeConfig=Li;De.AxiosHeaders=Pn;De.formToJSON=e=>Oy(D.isHTMLForm(e)?new FormData(e):e);De.getAdapter=zy.getAdapter;De.HttpStatusCode=ck;De.default=De;const fk=De,dk=()=>{const e=fk.create({baseURL:_S,timeout:vS});return e.interceptors.request.use(t=>{const n=Jg();return n&&t.headers&&(t.headers["x-token"]=n),t},t=>{throw t.response&&ae.error(t.response.data.message),t}),e.interceptors.response.use(t=>t,t=>{throw t.response&&!t.response.config.headers["x-no-toast"]&&ae.error(t.response.data.message,{toastId:"error"}),t}),e},hk=dk(),pk=Dg({[Ya.name]:Ya.reducer,[Qa.name]:Qa.reducer,[Zo.name]:Zo.reducer,[Xa.name]:Xa.reducer,[Ka.name]:Ka.reducer,[Ga.name]:Ga.reducer}),jy=JE({reducer:pk,middleware:e=>e({thunk:{extraArgument:hk}})});"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},{}));Array.prototype.toSorted||(Array.prototype.toSorted=function(){const e=[].slice.call(this);return e.sort(),e});const mk=wc.createRoot(document.getElementById("root"));jy.dispatch(qd[Jg()?"checkAuth":"setNoAuthStatus"]());mk.render(x.jsx(_e.StrictMode,{children:x.jsxs(hE,{store:jy,children:[x.jsx(bP,{position:"top-center",autoClose:gS,hideProgressBar:!0}),x.jsx(KC,{})]})})); diff --git a/14/assets/index-2876cc9d.js b/14/assets/index-2876cc9d.js deleted file mode 100644 index 6528f2c..0000000 --- a/14/assets/index-2876cc9d.js +++ /dev/null @@ -1,119 +0,0 @@ -var Y0=Object.defineProperty;var Q0=(e,t,n)=>t in e?Y0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Bu=(e,t,n)=>(Q0(e,typeof t!="symbol"?t+"":t,n),n);function Qm(e,t){for(var n=0;ni[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();var Xm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var e_={exports:{}},rl={},t_={exports:{}},le={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ko=Symbol.for("react.element"),X0=Symbol.for("react.portal"),J0=Symbol.for("react.fragment"),ew=Symbol.for("react.strict_mode"),tw=Symbol.for("react.profiler"),nw=Symbol.for("react.provider"),rw=Symbol.for("react.context"),iw=Symbol.for("react.forward_ref"),ow=Symbol.for("react.suspense"),sw=Symbol.for("react.memo"),aw=Symbol.for("react.lazy"),rp=Symbol.iterator;function lw(e){return e===null||typeof e!="object"?null:(e=rp&&e[rp]||e["@@iterator"],typeof e=="function"?e:null)}var n_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},r_=Object.assign,i_={};function Oi(e,t,n){this.props=e,this.context=t,this.refs=i_,this.updater=n||n_}Oi.prototype.isReactComponent={};Oi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Oi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function o_(){}o_.prototype=Oi.prototype;function jf(e,t,n){this.props=e,this.context=t,this.refs=i_,this.updater=n||n_}var Df=jf.prototype=new o_;Df.constructor=jf;r_(Df,Oi.prototype);Df.isPureReactComponent=!0;var ip=Array.isArray,s_=Object.prototype.hasOwnProperty,bf={current:null},a_={key:!0,ref:!0,__self:!0,__source:!0};function l_(e,t,n){var i,s={},a=null,u=null;if(t!=null)for(i in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(a=""+t.key),t)s_.call(t,i)&&!a_.hasOwnProperty(i)&&(s[i]=t[i]);var f=arguments.length-2;if(f===1)s.children=n;else if(1>>1,J=T[H];if(0>>1;Hs(te,j))ies(ye,te)?(T[H]=ye,T[ie]=j,H=ie):(T[H]=te,T[ee]=j,H=ee);else if(ies(ye,j))T[H]=ye,T[ie]=j,H=ie;else break e}}return U}function s(T,U){var j=T.sortIndex-U.sortIndex;return j!==0?j: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(I);else{var U=n(p);U!==null&&K(N,U.startTime-T)}}function I(T,U){P=!1,E&&(E=!1,x(A),A=-1),k=!0;var j=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=j,k=!1}}var b=!1,$=null,A=-1,X=5,V=-1;function G(){return!(e.unstable_now()-VT||125H?(T.sortIndex=j,t(p,T),n(d)===null&&T===n(p)&&(E?(x(A),A=-1):E=!0,K(N,j-H))):(T.sortIndex=J,t(d,T),P||k||(P=!0,F(I))),T},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(T){var U=S;return function(){var j=S;S=U;try{return T.apply(this,arguments)}finally{S=j}}}})(d_);f_.exports=d_;var ww=f_.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var h_=O,gt=ww;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"),Pc=Object.prototype.hasOwnProperty,xw=/^[: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]*$/,sp={},ap={};function Sw(e){return Pc.call(ap,e)?!0:Pc.call(sp,e)?!1:xw.test(e)?ap[e]=!0:(sp[e]=!0,!1)}function Ew(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 Pw(e,t,n,i){if(t===null||typeof t>"u"||Ew(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{Uu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?so(e):""}function Cw(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=Zu(e.type,!1),e;case 11:return e=Zu(e.type.render,!1),e;case 1:return e=Zu(e.type,!0),e;default:return""}}function Lc(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 ti:return"Fragment";case ei:return"Portal";case Cc:return"Profiler";case Zf:return"StrictMode";case Tc:return"Suspense";case kc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case __:return(e.displayName||"Context")+".Consumer";case m_: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:Lc(e.type)||"Memo";case Fn:t=e._payload,e=e._init;try{return Lc(e(t))}catch{}}return null}function Tw(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 Lc(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 g_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kw(e){var t=g_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){i=""+u,a.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(u){i=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ks(e){e._valueTracker||(e._valueTracker=kw(e))}function y_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=g_(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function _a(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 Nc(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function up(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 w_(e,t){t=t.checked,t!=null&&Uf(e,"checked",t,!1)}function Oc(e,t){w_(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")?Mc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mc(e,t.type,ir(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cp(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 Mc(e,t,n){(t!=="number"||_a(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ao=Array.isArray;function hi(e,t,n,i){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Ls.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},Lw=["Webkit","ms","Moz","O"];Object.keys(fo).forEach(function(e){Lw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fo[t]=fo[e]})});function P_(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 C_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,s=P_(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}var Nw=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 Ic(e,t){if(t){if(Nw[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 Ac(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 jc=null;function Vf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dc=null,pi=null,mi=null;function hp(e){if(e=Yo(e)){if(typeof Dc!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=ll(t),Dc(e.stateNode,e.type,t))}}function T_(e){pi?mi?mi.push(e):mi=[e]:pi=e}function k_(){if(pi){var e=pi,t=mi;if(mi=pi=null,hp(e),t)for(e=0;e>>=0,e===0?32:31-(Fw(e)/$w|0)|0}var Ns=64,Os=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 wa(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 qo(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 Ww(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),Sp=String.fromCharCode(32),Ep=!1;function K_(e,t){switch(e){case"keyup":return y1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function q_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ni=!1;function x1(e,t){switch(e){case"compositionend":return q_(t);case"keypress":return t.which!==32?null:(Ep=!0,Sp);case"textInput":return e=t.data,e===Sp&&Ep?null:e;default:return null}}function S1(e,t){if(ni)return e==="compositionend"||!ed&&K_(e,t)?(e=W_(),Gs=Qf=Hn=null,ni=!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=kp(n)}}function X_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?X_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function J_(){for(var e=window,t=_a();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_a(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 M1(e){var t=J_(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&X_(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=Lp(n,a);var u=Lp(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,ri=null,Zc=null,_o=null,Hc=!1;function Np(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hc||ri==null||ri!==_a(i)||(i=ri,"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=Ea(Zc,"onSelect"),0si||(e.current=Yc[si],Yc[si]=null,si--)}function xe(e,t){si++,Yc[si]=e.current,e.current=t}var or={},nt=ur(or),ct=ur(!1),Lr=or;function wi(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 Ca(){Ee(ct),Ee(nt)}function jp(e,t,n){if(nt.current!==or)throw Error(Z(168));xe(nt,t),xe(ct,n)}function lv(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,Tw(e)||"Unknown",s));return Le({},n,i)}function Ta(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Lr=nt.current,xe(nt,e),xe(ct,ct.current),!0}function Dp(e,t,n){var i=e.stateNode;if(!i)throw Error(Z(169));n?(e=lv(e,t,Lr),i.__reactInternalMemoizedMergedChildContext=e,Ee(ct),Ee(nt),xe(nt,e)):Ee(ct),xe(ct,n)}var yn=null,ul=!1,rc=!1;function uv(e){yn===null?yn=[e]:yn.push(e)}function Z1(e){ul=!0,uv(e)}function cr(){if(!rc&&yn!==null){rc=!0;var e=0,t=ve;try{var n=yn;for(ve=1;e>=u,s-=u,wn=1<<32-Wt(t)+s|n<A?(X=$,$=null):X=$.sibling;var V=S(x,$,y[A],N);if(V===null){$===null&&($=X);break}e&&$&&V.alternate===null&&t(x,$),g=a(V,g,A),b===null?I=V:b.sibling=V,b=V,$=X}if(A===y.length)return n(x,$),Pe&&gr(x,A),I;if($===null){for(;AA?(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,A),b===null?I=G:b.sibling=G,b=G,$=X}if(V.done)return n(x,$),Pe&&gr(x,A),I;if($===null){for(;!V.done;A++,V=y.next())V=v(x,V.value,N),V!==null&&(g=a(V,g,A),b===null?I=V:b.sibling=V,b=V);return Pe&&gr(x,A),I}for($=i(x,$);!V.done;A++,V=y.next())V=k($,x,A,V.value,N),V!==null&&(e&&V.alternate!==null&&$.delete(V.key===null?A:V.key),g=a(V,g,A),b===null?I=V:b.sibling=V,b=V);return e&&$.forEach(function(ce){return t(x,ce)}),Pe&&gr(x,A),I}function R(x,g,y,N){if(typeof y=="object"&&y!==null&&y.type===ti&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ts:e:{for(var I=y.key,b=g;b!==null;){if(b.key===I){if(I=y.type,I===ti){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===I||typeof I=="object"&&I!==null&&I.$$typeof===Fn&&Hp(I)===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===ti?(g=Tr(y.props.children,x.mode,N,y.key),g.return=x,x=g):(N=ra(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 ei: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=fc(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);Ds(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=cc(y,x.mode,N),g.return=x,x=g),u(x)):n(x,g)}return R}var Si=vv(!0),gv=vv(!1),Qo={},an=ur(Qo),zo=ur(Qo),Io=ur(Qo);function Pr(e){if(e===Qo)throw Error(Z(174));return e}function cd(e,t){switch(xe(Io,t),xe(zo,e),xe(an,Qo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zc(t,e)}Ee(an),xe(an,t)}function Ei(){Ee(an),Ee(zo),Ee(Io)}function yv(e){Pr(Io.current);var t=Pr(an.current),n=zc(t,e.type);t!==n&&(xe(zo,e),xe(an,n))}function fd(e){zo.current===e&&(Ee(an),Ee(zo))}var Te=ur(0);function Ra(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 ic=[];function dd(){for(var e=0;en?n:4,e(!0);var i=oc.transition;oc.transition={};try{e(!1),t()}finally{ve=n,oc.transition=i}}function Av(){return It().memoizedState}function K1(e,t,n){var i=er(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},jv(e))Dv(t,n);else if(n=hv(e,t,n,i),n!==null){var s=ot();Vt(n,e,i,s),bv(n,t,i)}}function q1(e,t,n){var i=er(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(jv(e))Dv(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=hv(e,t,s,i),n!==null&&(s=ot(),Vt(n,e,i,s),bv(n,t,i))}}function jv(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function Dv(e,t){vo=za=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bv(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,qf(e,n)}}var Ia={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},G1={readContext:zt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Vp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Js(4194308,4,Ov.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Js(4194308,4,e,t)},useInsertionEffect:function(e,t){return Js(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=nn();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=K1.bind(null,ke,e),[i.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:Wp,useDebugValue:vd,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=Wp(!1),t=e[0];return e=V1.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=ke,s=nn();if(Pe){if(n===void 0)throw Error(Z(407));n=n()}else{if(n=t(),Ze===null)throw Error(Z(349));Or&30||Sv(i,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,Vp(Pv.bind(null,i,a,e),[e]),i.flags|=2048,Do(9,Ev.bind(null,i,a,n,t),void 0,null),n},useId:function(){var e=nn(),t=Ze.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[rn]=t,e[Ro]=i,Kv(e,t,!1,!1),t.stateNode=e;e:{switch(u=Ac(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;sCi&&(t.flags|=128,i=!0,ro(a,!1),t.lanes=4194304)}else{if(!i)if(e=Ra(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>Ci&&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 rx(e,t){switch(rd(t),t.tag){case 1:return ft(t.type)&&Ca(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ei(),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));xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Te),null;case 4:return Ei(),null;case 10:return ad(t.type._context),null;case 22:case 23:return Ed(),null;case 24:return null;default:return null}}var Bs=!1,et=!1,ix=typeof WeakSet=="function"?WeakSet:Set,Q=null;function ci(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 uf(e,t,n){try{n()}catch(i){Oe(e,t,i)}}var tm=!1;function ox(e,t){if(Wc=xa,e=J_(),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(Vc={focusedElem:e,selectionRange:n},xa=!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=tm,tm=!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&&uf(t,n,a)}s=s.next}while(s!==i)}}function dl(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 cf(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 Yv(e){var t=e.alternate;t!==null&&(e.alternate=null,Yv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[Ro],delete t[Gc],delete t[$1],delete t[U1])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Qv(e){return e.tag===5||e.tag===3||e.tag===4}function nm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ff(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=Pa));else if(i!==4&&(e=e.child,e!==null))for(ff(e,t,n),e=e.sibling;e!==null;)ff(e,t,n),e=e.sibling}function df(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(df(e,t,n),e=e.sibling;e!==null;)df(e,t,n),e=e.sibling}var Ve=null,Ut=!1;function bn(e,t,n){for(n=n.child;n!==null;)Xv(e,t,n),n=n.sibling}function Xv(e,t,n){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(il,n)}catch{}switch(n.tag){case 5:et||ci(n,t);case 6:var i=Ve,s=Ut;Ve=null,bn(e,t,n),Ve=i,Ut=s,Ve!==null&&(Ut?(e=Ve,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ve.removeChild(n.stateNode));break;case 18:Ve!==null&&(Ut?(e=Ve,n=n.stateNode,e.nodeType===8?nc(e.parentNode,n):e.nodeType===1&&nc(e,n),ko(e)):nc(Ve,n.stateNode));break;case 4:i=Ve,s=Ut,Ve=n.stateNode.containerInfo,Ut=!0,bn(e,t,n),Ve=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)&&uf(n,t,u),s=s.next}while(s!==i)}bn(e,t,n);break;case 1:if(!et&&(ci(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 rm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ix),t.forEach(function(i){var s=px.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*ax(i/1960))-i,10e?16:e,Wn===null)var i=!1;else{if(e=Wn,Wn=null,Da=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 sg(e,t){t===0&&(e.mode&1?(t=Os,Os<<=1,!(Os&130023424)&&(Os=4194304)):t=1);var n=ot();e=kn(e,t),e!==null&&(qo(e,t,n),dt(e,n))}function hx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sg(e,n)}function px(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),sg(e,n)}var ag;ag=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,tx(e,t,n);ut=!!(e.flags&131072)}else ut=!1,Pe&&t.flags&1048576&&cv(t,La,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;ea(e,t),e=t.pendingProps;var s=wi(t,nt.current);vi(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,Ta(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ud(t),s.updater=cl,t.stateNode=s,s._reactInternals=t,tf(t,i,e,n),t=of(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(ea(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=_x(i),e=$t(i,e),s){case 0:t=rf(null,t,i,e,n);break e;case 1:t=Xp(null,t,i,e,n);break e;case 11:t=Yp(null,t,i,e,n);break e;case 14:t=Qp(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),rf(e,t,i,s,n);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),Xp(e,t,i,s,n);case 3:e:{if(Hv(t),e===null)throw Error(Z(387));i=t.pendingProps,a=t.memoizedState,s=a.element,pv(e,t),Ma(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=Pi(Error(Z(423)),t),t=Jp(e,t,i,n,s);break e}else if(i!==s){s=Pi(Error(Z(424)),t),t=Jp(e,t,i,n,s);break e}else for(mt=Qn(t.stateNode.containerInfo.firstChild),vt=t,Pe=!0,Zt=null,n=gv(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xi(),i===s){t=Ln(e,t,n);break e}rt(e,t,i,n)}t=t.child}return t;case 5:return yv(t),e===null&&Xc(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,Kc(i,s)?u=null:a!==null&&Kc(i,a)&&(t.flags|=32),Zv(e,t),rt(e,t,u,n),t.child;case 6:return e===null&&Xc(t),null;case 13:return Wv(e,t,n);case 4:return cd(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Si(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),Yp(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(Na,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),Jc(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),Jc(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,vi(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),Qp(e,t,i,s,n);case 15:return $v(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:$t(i,s),ea(e,t),t.tag=1,ft(i)?(e=!0,Ta(t)):e=!1,vi(t,n),_v(t,i,s),tf(t,i,s,n),of(null,t,i,!0,e,n);case 19:return Vv(e,t,n);case 22:return Uv(e,t,n)}throw Error(Z(156,t.tag))};function lg(e,t){return I_(e,t)}function mx(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 mx(e,t,n,i)}function Cd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _x(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 ra(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 ti:return Tr(n.children,s,a,t);case Zf:u=8,s|=8;break;case Cc:return e=Ot(12,n,t,s|2),e.elementType=Cc,e.lanes=a,e;case Tc:return e=Ot(13,n,t,s),e.elementType=Tc,e.lanes=a,e;case kc:return e=Ot(19,n,t,s),e.elementType=kc,e.lanes=a,e;case v_:return pl(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case m_:u=10;break e;case __: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 pl(e,t,n,i){return e=Ot(22,e,i,t),e.elementType=v_,e.lanes=n,e.stateNode={isHidden:!1},e}function cc(e,t,n){return e=Ot(6,e,null,t),e.lanes=n,e}function fc(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 vx(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=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Td(e,t,n,i,s,a,u,f,d){return e=new vx(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 gx(e,t,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(dg)}catch(e){console.error(e)}}dg(),c_.exports=xt;var hg=c_.exports,fm=hg;Ec.createRoot=fm.createRoot,Ec.hydrateRoot=fm.hydrateRoot;/** - * @remix-run/router v1.9.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * 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 Px(){return Math.random().toString(36).substr(2,8)}function hm(e,t){return{usr:e.state,key:e.key,idx:t}}function vf(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||Px()})}function Fa(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 Cx(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=vf(E.location,R,x);n&&n(g,R),p=_()+1;let y=hm(g,p),N=E.createHref(g);try{u.pushState(y,"",N)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;s.location.assign(N)}a&&d&&d({action:f,location:E.location,delta:1})}function k(R,x){f=Vn.Replace;let g=vf(E.location,R,x);n&&n(g,R),p=_();let y=hm(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:Fa(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(dm,v),d=R,()=>{s.removeEventListener(dm,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 pm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(pm||(pm={}));function Tx(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=pg(e);kx(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+'".')),pg(a.children,t,_,p)),!(a.path==null&&!a.index)&&t.push({path:p,score:Ix(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 mg(a.path))s(a,u,d)}),t}function mg(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=mg(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 kx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ax(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const Lx=/^:\w+$/,Nx=3,Ox=2,Mx=1,Rx=10,zx=-2,mm=e=>e==="*";function Ix(e,t){let n=e.split("/"),i=n.length;return n.some(mm)&&(i+=zx),t&&(i+=Ox),n.filter(s=>!mm(s)).reduce((s,a)=>s+(Lx.test(a)?Nx:a===""?Mx:Rx),i)}function Ax(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 jx(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[_]=Fx(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 Bx(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 Fx(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 $x(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:Ux(n,t):t,search:Hx(i),hash:Wx(s)}}function Ux(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 dc(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("?"),dc("?","pathname","search",s)),ze(!s.pathname||!s.pathname.includes("#"),dc("#","pathname","hash",s)),ze(!s.search||!s.search.includes("#"),dc("#","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=$x(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,"/"),Zx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Hx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Wx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Vx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const _g=["post","put","patch","delete"];new Set(_g);const Kx=["get",..._g];new Set(Kx);/** - * React Router v6.16.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;td.pathnameBase)),u=O.useRef(!1);return yg(()=>{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 Yx(){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 Qx(e,t){return Xx(e,t)}function Xx(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=Tx(e,{pathname:S}),P=rS(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(yl.Provider,{value:{location:$a({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Vn.Pop}},P):P}function Jx(){let e=aS(),t=Vx(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 eS=O.createElement(Jx,null);class tS 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(gg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function nS(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 rS(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||eS);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(nS,{match:d,routeContext:{outlet:f,matches:S,isDataRoute:n!=null},children:P})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?O.createElement(tS,{location:n.location,revalidation:n.revalidation,component:v,error:_,children:k(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):k()},null)}var wg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wg||{}),Ua=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}(Ua||{});function iS(e){let t=O.useContext(Id);return t||ze(!1),t}function oS(e){let t=O.useContext(vg);return t||ze(!1),t}function sS(e){let t=O.useContext(Mn);return t||ze(!1),t}function xg(e){let t=sS(),n=t.matches[t.matches.length-1];return n.route.id||ze(!1),n.route.id}function aS(){var e;let t=O.useContext(gg),n=oS(Ua.UseRouteError),i=xg(Ua.UseRouteError);return t||((e=n.errors)==null?void 0:e[i])}function lS(){let{router:e}=iS(wg.UseNavigateStable),t=xg(Ua.UseNavigateStable),n=O.useRef(!1);return yg(()=>{n.current=!0}),O.useCallback(function(s,a){a===void 0&&(a={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,$a({fromRouteId:t},a)))},[e,t])}function Sg(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 uS(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(yl.Provider,{children:n,value:P}))}function cS(e){let{children:t,location:n}=e;return Qx(gf(t),n)}new Promise(()=>{});function gf(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,gf(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=gf(i.props.children,a)),n.push(u)}),n}/** - * React Router DOM v6.16.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function fS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function dS(e,t){return e.button===0&&(!t||t==="_self")&&!fS(e)}const hS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],pS=["aria-current","caseSensitive","className","end","style","to","children"],mS="startTransition",_m=hw[mS];function _S(e){let{basename:t,children:n,future:i,window:s}=e,a=O.useRef();a.current==null&&(a.current=Ex({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&&_m?_m(()=>d(v)):d(v)},[d,p]);return O.useLayoutEffect(()=>u.listen(_),[u,_]),O.createElement(uS,{basename:t,children:n,location:f.location,navigationType:f.action,navigator:u})}const vS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gS=/^(?:[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=Eg(t,hS),{basename:S}=O.useContext(Dr),k,P=!1;if(typeof p=="string"&&gS.test(p)&&(k=p,vS))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=qx(p,{relative:s}),R=wS(p,{replace:u,state:f,target:d,preventScrollReset:_,relative:s});function x(g){i&&i(g),g.defaultPrevented||R(g)}return O.createElement("a",Za({},v,{href:k||E,onClick:P||a?i:x,ref:n,target:d}))}),yS=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,_=Eg(t,pS),v=jd(d,{relative:_.relative}),S=fr(),k=O.useContext(vg),{navigator:P}=O.useContext(Dr),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,I;typeof a=="function"?I=a({isActive:g,isPending:y}):I=[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,Za({},_,{"aria-current":N,className:I,ref:n,style:b,to:d}),typeof p=="function"?p({isActive:g,isPending:y}):p)});var vm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(vm||(vm={}));var gm;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(gm||(gm={}));function wS(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(dS(_,n)){_.preventDefault();let v=i!==void 0?i:Fa(d)===Fa(p);f(e,{replace:v,state:s,preventScrollReset:a,relative:u})}},[d,f,p,i,s,n,e,a,u])}const xS="https://15.design.htmlacademy.pro/six-cities",SS=5e3,ES=4,PS=2e3,Pg={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"}],CS=dr[0].slug;var tt=(e=>(e.Root="/",e.Login="/login",e.Favorites="/favorites",e.Offer="/offer",e))(tt||{}),qt=(e=>(e.Offers="/offers",e.Comments="/comments",e.Favorite="/favorite",e.Login="/login",e.Logout="/logout",e))(qt||{}),Je=(e=>(e.Auth="AUTH",e.NoAuth="NO_AUTH",e.Unknown="UNKNOWN",e))(Je||{});const TS="MMMM YYYY",kS="YYYY-MM-DD",LS={iconUrl:"./img/pin.svg",iconSize:[27,39],iconAnchor:[13,39]},NS={iconUrl:"./img/pin-active.svg",iconSize:[27,39],iconAnchor:[13,39]};var oe=(e=>(e[e.Idle=0]="Idle",e[e.Loading=1]="Loading",e[e.Succeed=2]="Succeed",e[e.Failed=3]="Failed",e))(oe||{});function OS(){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(ln,{to:tt.Root,className:"header__logo-link",children:t})}const Dd=O.memo(OS);var Cg={exports:{}},Tg={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ti=O;function MS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var RS=typeof Object.is=="function"?Object.is:MS,zS=Ti.useState,IS=Ti.useEffect,AS=Ti.useLayoutEffect,jS=Ti.useDebugValue;function DS(e,t){var n=t(),i=zS({inst:{value:n,getSnapshot:t}}),s=i[0].inst,a=i[1];return AS(function(){s.value=n,s.getSnapshot=t,hc(s)&&a({inst:s})},[e,n,t]),IS(function(){return hc(s)&&a({inst:s}),e(function(){hc(s)&&a({inst:s})})},[e]),jS(n),n}function hc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!RS(e,n)}catch{return!0}}function bS(e,t){return t()}var BS=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?bS:DS;Tg.useSyncExternalStore=Ti.useSyncExternalStore!==void 0?Ti.useSyncExternalStore:BS;Cg.exports=Tg;var FS=Cg.exports,kg={exports:{}},Lg={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var wl=O,$S=FS;function US(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ZS=typeof Object.is=="function"?Object.is:US,HS=$S.useSyncExternalStore,WS=wl.useRef,VS=wl.useEffect,KS=wl.useMemo,qS=wl.useDebugValue;Lg.useSyncExternalStoreWithSelector=function(e,t,n,i,s){var a=WS(null);if(a.current===null){var u={hasValue:!1,value:null};a.current=u}else u=a.current;a=KS(function(){function d(k){if(!p){if(p=!0,_=k,k=i(k),s!==void 0&&u.hasValue){var P=u.value;if(s(P,k))return v=P}return v=k}if(P=v,ZS(_,k))return P;var E=i(k);return s!==void 0&&s(P,E)?P:(_=k,v=E)}var p=!1,_,v,S=n===void 0?null:n;return[function(){return d(t())},S===null?void 0:function(){return d(S())}]},[t,n,i,s]);var f=HS(e,a[0],a[1]);return VS(function(){u.hasValue=!0,u.value=f},[f]),qS(f),f};kg.exports=Lg;var GS=kg.exports;function YS(e){e()}let Ng=YS;const QS=e=>Ng=e,XS=()=>Ng,ym=Symbol.for("react-redux-context"),wm=typeof globalThis<"u"?globalThis:{};function JS(){var e;if(!O.createContext)return{};const t=(e=wm[ym])!=null?e:wm[ym]=new Map;let n=t.get(O.createContext);return n||(n=O.createContext(null),t.set(O.createContext,n)),n}const sr=JS();function bd(e=sr){return function(){return O.useContext(e)}}const Og=bd(),eE=()=>{throw new Error("uSES not initialized!")};let Mg=eE;const tE=e=>{Mg=e},nE=(e,t)=>e===t;function rE(e=sr){const t=e===sr?Og:bd(e);return function(i,s={}){const{equalityFn:a=nE,stabilityCheck:u=void 0,noopCheck:f=void 0}=typeof s=="function"?{equalityFn:s}:s,{store:d,subscription:p,getServerState:_,stabilityCheck:v,noopCheck:S}=t();O.useRef(!0);const k=O.useCallback({[i.name](E){return i(E)}}[i.name],[i,v,u]),P=Mg(p.addNestedSub,d.getState,_||d.getState,k,a);return O.useDebugValue(P),P}}const iE=rE();var Rg={exports:{}},ge={};/** @license React v16.13.1 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var He=typeof Symbol=="function"&&Symbol.for,Bd=He?Symbol.for("react.element"):60103,Fd=He?Symbol.for("react.portal"):60106,xl=He?Symbol.for("react.fragment"):60107,Sl=He?Symbol.for("react.strict_mode"):60108,El=He?Symbol.for("react.profiler"):60114,Pl=He?Symbol.for("react.provider"):60109,Cl=He?Symbol.for("react.context"):60110,$d=He?Symbol.for("react.async_mode"):60111,Tl=He?Symbol.for("react.concurrent_mode"):60111,kl=He?Symbol.for("react.forward_ref"):60112,Ll=He?Symbol.for("react.suspense"):60113,oE=He?Symbol.for("react.suspense_list"):60120,Nl=He?Symbol.for("react.memo"):60115,Ol=He?Symbol.for("react.lazy"):60116,sE=He?Symbol.for("react.block"):60121,aE=He?Symbol.for("react.fundamental"):60117,lE=He?Symbol.for("react.responder"):60118,uE=He?Symbol.for("react.scope"):60119;function Et(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Bd:switch(e=e.type,e){case $d:case Tl:case xl:case El:case Sl:case Ll:return e;default:switch(e=e&&e.$$typeof,e){case Cl:case kl:case Ol:case Nl:case Pl:return e;default:return t}}case Fd:return t}}}function zg(e){return Et(e)===Tl}ge.AsyncMode=$d;ge.ConcurrentMode=Tl;ge.ContextConsumer=Cl;ge.ContextProvider=Pl;ge.Element=Bd;ge.ForwardRef=kl;ge.Fragment=xl;ge.Lazy=Ol;ge.Memo=Nl;ge.Portal=Fd;ge.Profiler=El;ge.StrictMode=Sl;ge.Suspense=Ll;ge.isAsyncMode=function(e){return zg(e)||Et(e)===$d};ge.isConcurrentMode=zg;ge.isContextConsumer=function(e){return Et(e)===Cl};ge.isContextProvider=function(e){return Et(e)===Pl};ge.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Bd};ge.isForwardRef=function(e){return Et(e)===kl};ge.isFragment=function(e){return Et(e)===xl};ge.isLazy=function(e){return Et(e)===Ol};ge.isMemo=function(e){return Et(e)===Nl};ge.isPortal=function(e){return Et(e)===Fd};ge.isProfiler=function(e){return Et(e)===El};ge.isStrictMode=function(e){return Et(e)===Sl};ge.isSuspense=function(e){return Et(e)===Ll};ge.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xl||e===Tl||e===El||e===Sl||e===Ll||e===oE||typeof e=="object"&&e!==null&&(e.$$typeof===Ol||e.$$typeof===Nl||e.$$typeof===Pl||e.$$typeof===Cl||e.$$typeof===kl||e.$$typeof===aE||e.$$typeof===lE||e.$$typeof===uE||e.$$typeof===sE)};ge.typeOf=Et;Rg.exports=ge;var cE=Rg.exports,Ig=cE,fE={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},dE={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ag={};Ag[Ig.ForwardRef]=fE;Ag[Ig.Memo]=dE;var we={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ud=Symbol.for("react.element"),Zd=Symbol.for("react.portal"),Ml=Symbol.for("react.fragment"),Rl=Symbol.for("react.strict_mode"),zl=Symbol.for("react.profiler"),Il=Symbol.for("react.provider"),Al=Symbol.for("react.context"),hE=Symbol.for("react.server_context"),jl=Symbol.for("react.forward_ref"),Dl=Symbol.for("react.suspense"),bl=Symbol.for("react.suspense_list"),Bl=Symbol.for("react.memo"),Fl=Symbol.for("react.lazy"),pE=Symbol.for("react.offscreen"),jg;jg=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 Ml:case zl:case Rl:case Dl:case bl:return e;default:switch(e=e&&e.$$typeof,e){case hE:case Al:case jl:case Fl:case Bl:case Il:return e;default:return t}}case Zd:return t}}}we.ContextConsumer=Al;we.ContextProvider=Il;we.Element=Ud;we.ForwardRef=jl;we.Fragment=Ml;we.Lazy=Fl;we.Memo=Bl;we.Portal=Zd;we.Profiler=zl;we.StrictMode=Rl;we.Suspense=Dl;we.SuspenseList=bl;we.isAsyncMode=function(){return!1};we.isConcurrentMode=function(){return!1};we.isContextConsumer=function(e){return At(e)===Al};we.isContextProvider=function(e){return At(e)===Il};we.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ud};we.isForwardRef=function(e){return At(e)===jl};we.isFragment=function(e){return At(e)===Ml};we.isLazy=function(e){return At(e)===Fl};we.isMemo=function(e){return At(e)===Bl};we.isPortal=function(e){return At(e)===Zd};we.isProfiler=function(e){return At(e)===zl};we.isStrictMode=function(e){return At(e)===Rl};we.isSuspense=function(e){return At(e)===Dl};we.isSuspenseList=function(e){return At(e)===bl};we.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ml||e===zl||e===Rl||e===Dl||e===bl||e===pE||typeof e=="object"&&e!==null&&(e.$$typeof===Fl||e.$$typeof===Bl||e.$$typeof===Il||e.$$typeof===Al||e.$$typeof===jl||e.$$typeof===jg||e.getModuleId!==void 0)};we.typeOf=At;function mE(){const e=XS();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 xm={notify(){},get:()=>[]};function _E(e,t){let n,i=xm,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=mE())}function v(){s--,n&&s===0&&(n(),n=void 0,i.clear(),i=xm)}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 vE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gE=vE?O.useLayoutEffect:O.useEffect;function yE({store:e,context:t,children:n,serverState:i,stabilityCheck:s="once",noopCheck:a="once"}){const u=O.useMemo(()=>{const p=_E(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]);gE(()=>{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 Dg(e=sr){const t=e===sr?Og:bd(e);return function(){const{store:i}=t();return i}}const wE=Dg();function xE(e=sr){const t=e===sr?wE:Dg(e);return function(){return t().dispatch}}const SE=xE();tE(GS.useSyncExternalStoreWithSelector);QS(hg.unstable_batchedUpdates);function $e(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 EE=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")(),Sm=EE,pc=()=>Math.random().toString(36).substring(7).split("").join("."),PE={INIT:`@@redux/INIT${pc()}`,REPLACE:`@@redux/REPLACE${pc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pc()}`},Ha=PE;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 bg(e,t,n){if(typeof e!="function")throw new Error($e(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error($e(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($e(1));return n(bg)(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($e(3));return s}function v(R){if(typeof R!="function")throw new Error($e(4));if(d)throw new Error($e(5));let x=!0;p();const g=f++;return u.set(g,R),function(){if(x){if(d)throw new Error($e(6));x=!1,p(),u.delete(g),a=null}}}function S(R){if(!Hd(R))throw new Error($e(7));if(typeof R.type>"u")throw new Error($e(8));if(typeof R.type!="string")throw new Error($e(17));if(d)throw new Error($e(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($e(10));i=R,S({type:Ha.REPLACE})}function P(){const R=v;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error($e(11));function g(){const N=x;N.next&&N.next(_())}return g(),{unsubscribe:R(g)}},[Sm](){return this}}}return S({type:Ha.INIT}),{dispatch:S,subscribe:v,getState:_,replaceReducer:k,[Sm]:P}}function CE(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ha.INIT})>"u")throw new Error($e(12));if(typeof n(void 0,{type:Ha.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($e(13))})}function Bg(e){const t=Object.keys(e),n={};for(let a=0;a"u")throw f&&f.type,new Error($e(14));p[v]=P,d=d||P!==k}return d=d||i.length!==Object.keys(u).length,d?p:u}}function Em(e,t){return function(...n){return t(e.apply(this,n))}}function TE(e,t){if(typeof e=="function")return Em(e,t);if(typeof e!="object"||e===null)throw new Error($e(16));const n={};for(const i in e){const s=e[i];typeof s=="function"&&(n[i]=Em(s,t))}return n}function Wa(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...i)=>t(n(...i)))}function kE(...e){return t=>(n,i)=>{const s=t(n,i);let a=()=>{throw new Error($e(15))};const u={getState:s.getState,dispatch:(d,...p)=>a(d,...p)},f=e.map(d=>d(u));return a=Wa(...f)(s.dispatch),{...s,dispatch:a}}}function LE(e){return Hd(e)&&"type"in e&&typeof e.type=="string"}var Fg=Symbol.for("immer-nothing"),Pm=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 ki=Object.getPrototypeOf;function ar(e){return!!e&&!!e[yt]}function Nn(e){var t;return e?$g(e)||Array.isArray(e)||!!e[Pm]||!!((t=e.constructor)!=null&&t[Pm])||Ul(e)||Zl(e):!1}var NE=Object.prototype.constructor.toString();function $g(e){if(!e||typeof e!="object")return!1;const t=ki(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)===NE}function Va(e,t){$l(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function $l(e){const t=e[yt];return t?t.type_:Array.isArray(e)?1:Ul(e)?2:Zl(e)?3:0}function yf(e,t){return $l(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ug(e,t,n){const i=$l(e);i===2?e.set(t,n):i===3?e.add(n):e[t]=n}function OE(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ul(e){return e instanceof Map}function Zl(e){return e instanceof Set}function xr(e){return e.copy_||e.base_}function wf(e,t){if(Ul(e))return new Map(e);if(Zl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&$g(e))return ki(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=ME),Object.freeze(e),t&&Object.entries(e).forEach(([n,i])=>Wd(i,!0))),e}function ME(){Ht(2)}function Hl(e){return Object.isFrozen(e)}var RE={};function zr(e){const t=RE[e];return t||Ht(0,e),t}var Fo;function Zg(){return Fo}function zE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Cm(e,t){t&&(zr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function xf(e){Sf(e),e.drafts_.forEach(IE),e.drafts_=null}function Sf(e){e===Fo&&(Fo=e.parent_)}function Tm(e){return Fo=zE(Fo,e)}function IE(e){const t=e[yt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function km(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[yt].modified_&&(xf(t),Ht(4)),Nn(e)&&(e=Ka(t,e),t.parent_||qa(t,e)),t.patches_&&zr("Patches").generateReplacementPatches_(n[yt].base_,e,t.patches_,t.inversePatches_)):e=Ka(t,n,[]),xf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Fg?e:void 0}function Ka(e,t,n){if(Hl(t))return t;const i=t[yt];if(!i)return Va(t,(s,a)=>Lm(e,i,t,s,a,n)),t;if(i.scope_!==e)return t;if(!i.modified_)return qa(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),Va(a,(f,d)=>Lm(e,i,s,f,d,n,u)),qa(e,s,!1),n&&e.patches_&&zr("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function Lm(e,t,n,i,s,a,u){if(ar(s)){const f=a&&t&&t.type_!==3&&!yf(t.assigned_,i)?a.concat(i):void 0,d=Ka(e,s,f);if(Ug(n,i,d),ar(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Nn(s)&&!Hl(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ka(e,s),(!t||!t.scope_.parent_)&&typeof i!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,i)&&qa(e,s)}}function qa(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wd(t,n)}function AE(e,t){const n=Array.isArray(e),i={type_:n?1:0,scope_:t?t.scope_:Zg(),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(!yf(n,t))return jE(e,n,t);const i=n[t];return e.finalized_||!Nn(i)?i:i===mc(e.base_,t)?(_c(e),e.copy_[t]=Pf(i,e)):i},has(e,t){return t in xr(e)},ownKeys(e){return Reflect.ownKeys(xr(e))},set(e,t,n){const i=Hg(xr(e),t);if(i!=null&&i.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){const s=mc(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(OE(n,s)&&(n!==void 0||yf(e.base_,t)))return!0;_c(e),Ef(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 mc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,_c(e),Ef(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 ki(e.base_)},setPrototypeOf(){Ht(12)}},$o={};Va(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 mc(e,t){const n=e[yt];return(n?xr(n):e)[t]}function jE(e,t,n){var s;const i=Hg(t,n);return i?"value"in i?i.value:(s=i.get)==null?void 0:s.call(e.draft_):void 0}function Hg(e,t){if(!(t in e))return;let n=ki(e);for(;n;){const i=Object.getOwnPropertyDescriptor(n,t);if(i)return i;n=ki(n)}}function Ef(e){e.modified_||(e.modified_=!0,e.parent_&&Ef(e.parent_))}function _c(e){e.copy_||(e.copy_=wf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var DE=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=Tm(this),u=Pf(t,void 0);let f=!0;try{s=n(u),f=!1}finally{f?xf(a):Sf(a)}return Cm(a,i),km(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Fg&&(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=Wg(e));const t=Tm(this),n=Pf(e,void 0);return n[yt].isManual_=!0,Sf(t),n}finishDraft(e,t){const n=e&&e[yt];(!n||!n.isManual_)&&Ht(9);const{scope_:i}=n;return Cm(i,t),km(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 Pf(e,t){const n=Ul(e)?zr("MapSet").proxyMap_(e,t):Zl(e)?zr("MapSet").proxySet_(e,t):AE(e,t);return(t?t.scope_:Zg()).drafts_.push(n),n}function Wg(e){return ar(e)||Ht(10,e),Vg(e)}function Vg(e){if(!Nn(e)||Hl(e))return e;const t=e[yt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=wf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=wf(e,!0);return Va(n,(i,s)=>{Ug(n,i,Vg(s))}),t&&(t.finalized_=!1),n}var wt=new DE,Kg=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 BE(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function FE(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 Nm=e=>Array.isArray(e)?e:[e];function $E(e){const t=Array.isArray(e[0])?e[0]:e;return FE(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function UE(e,t){const n=[],{length:i}=e;for(let s=0;s{n=Us(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}function qg(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=Nm(S),x=Nm(P),g=$E(s),y=v(function(){return a++,p.apply(null,arguments)},...R),N=k(function(){u++;const b=UE(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 Gg=qg(Kd),VE=Object.assign((e,t=Gg)=>{BE(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:()=>VE});function Yg(e){return({dispatch:n,getState:i})=>s=>a=>typeof a=="function"?a(n,i,e):s(a)}var KE=Yg(),qE=Yg,GE=(...e)=>{const t=qg(...e),n=Object.assign((...i)=>{const s=t(...i),a=(u,...f)=>s(ar(u)?Wg(u):u,...f);return Object.assign(a,s),a},{withTypes:()=>n});return n};GE(Kd);var YE=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Wa:Wa.apply(null,arguments)},QE=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=>LE(i)&&i.type===e,n}var Qg=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 Mm(e){return Nn(e)?Kg(e,()=>{}):e}function Rm(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 XE(e){return typeof e=="boolean"}var JE=()=>function(t){const{thunk:n=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:a=!0}=t??{};let u=new Qg;return n&&(XE(n)?u.push(KE):u.push(qE(n.extraArgument))),u},eP="RTK_autoBatch",Xg=e=>t=>{setTimeout(t,e)},tP=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Xg(10),nP=(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"?tP:e.type==="callback"?e.queueNotification:Xg(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[eP]),a=!s,a&&(u||(u=!0,d(p))),i.dispatch(_)}finally{s=!0}}})},rP=e=>function(n){const{autoBatch:i=!0}=n??{};let s=new Qg(e);return i&&s.push(nP(typeof i=="object"?i:void 0)),s},iP=!0;function oP(e){const t=JE(),{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=Bg(n);else throw new Error(ht(1));let d;typeof i=="function"?d=i(t):d=t();let p=Wa;s&&(p=YE({trace:!iP,...typeof s=="object"&&s}));const _=kE(...d),v=rP(_);let S=typeof u=="function"?u(v):v();const k=p(...S);return bg(f,a,k)}function Jg(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 sP(e){return typeof e=="function"}function aP(e,t){let[n,i,s]=Jg(t),a;if(sP(e))a=()=>Mm(e());else{const f=Mm(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 Kg(_,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 lP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ey=(e=21)=>{let t="",n=e;for(;n--;)t+=lP[Math.random()*64|0];return t},uP=(e,t)=>QE(e)?e.match(t):e(t);function cP(...e){return t=>e.some(n=>uP(n,t))}var fP=["name","message","stack","code"],vc=class{constructor(e,t){Bu(this,"_type");this.payload=e,this.meta=t}},zm=class{constructor(e,t){Bu(this,"_type");this.payload=e,this.meta=t}},dP=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of fP)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||dP)(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):ey(),k=new AbortController;let P,E;function R(g){E=g,k.abort()}const x=async function(){var N,I;let g;try{let b=(N=i==null?void 0:i.condition)==null?void 0:N.call(i,d,{getState:_,extra:v});if(pP(b)&&(b=await b),b===!1||k.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const $=new Promise((A,X)=>{P=()=>{X({name:"AbortError",message:E||"Aborted"})},k.signal.addEventListener("abort",P)});p(a(S,d,(I=i==null?void 0:i.getPendingMeta)==null?void 0:I.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:(A,X)=>new vc(A,X),fulfillWithValue:(A,X)=>new zm(A,X)})).then(A=>{if(A instanceof vc)throw A;return A instanceof zm?s(A.payload,S,d,A.meta):s(A,S,d)})])}catch(b){g=b instanceof vc?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(hP)}})}}return Object.assign(f,{pending:a,rejected:u,fulfilled:s,settled:cP(u,s),typePrefix:t})}return e.withTypes=()=>e,e})();function hP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function pP(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var mP=Symbol.for("rtk-slice-createasyncthunk");function _P(e,t){return`${e}/${t}`}function vP({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[mP];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(yP()):s.reducers)||{},d=Object.keys(f),p={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},_={addCase(y,N){const I=typeof y=="string"?y:y.type;if(!I)throw new Error(ht(12));if(I in p.sliceCaseReducersByType)throw new Error(ht(13));return p.sliceCaseReducersByType[I]=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],I={reducerName:y,type:_P(a,y),createNotation:typeof s.reducers=="function"};xP(N)?EP(I,N,_,t):wP(I,N,_)});function v(){const[y={},N=[],I=void 0]=typeof s.extraReducers=="function"?Jg(s.extraReducers):[s.extraReducers],b={...y,...p.sliceCaseReducersByType};return aP(s.initialState,$=>{for(let A in b)$.addCase(A,b[A]);for(let A of p.sliceMatchers)$.addMatcher(A.matcher,A.reducer);for(let A of N)$.addMatcher(A.matcher,A.reducer);I&&$.addDefaultCase(I)})}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 I($){let A=$[y];return typeof A>"u"&&N&&(A=R()),A}function b($=S){const A=Rm(k,N,{insert:()=>new WeakMap});return Rm(A,$,{insert:()=>{const X={};for(const[V,G]of Object.entries(s.selectors??{}))X[V]=gP(G,$,R,N);return X}})}return{reducerPath:y,getSelectors:b,get selectors(){return b(I)},selectSlice:I}}const g={name:a,reducer:E,actions:p.actionCreators,caseReducers:p.sliceCaseReducersByName,getInitialState:R,...x(u),injectInto(y,{reducerPath:N,...I}={}){const b=N??u;return y.inject({reducerPath:b,reducer:E},I),{...g,...x(b,!0)}}};return g}}function gP(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=vP();function yP(){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 wP({type:e,reducerName:t,createNotation:n},i,s){let a,u;if("reducer"in i){if(n&&!SP(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 xP(e){return e._reducerDefinitionType==="asyncThunk"}function SP(e){return e._reducerDefinitionType==="reducerWithPrepare"}function EP({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||Zs,pending:f||Zs,rejected:d||Zs,settled:p||Zs})}function Zs(){}var PP=(e,t)=>{if(typeof e!="function")throw new Error(ht(32))},qd="listenerMiddleware",CP=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 PP(a),{predicate:s,type:t,effect:a}},TP=Object.assign(e=>{const{type:t,predicate:n,effect:i}=CP(e);return{id:ey(),effect:i,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ht(22))}}},{withTypes:()=>TP}),kP=Object.assign(En(`${qd}/add`),{withTypes:()=>kP});En(`${qd}/removeAll`);var LP=Object.assign(En(`${qd}/remove`),{withTypes:()=>LP});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 NP=SE,Ke=iE,un=e=>{const t=NP();return O.useMemo(()=>TE(e,t),[])},ia=cn("user/checkAuth",async(e,{extra:t})=>{const{data:n}=await t.get(qt.Login,{headers:{"x-no-toast":"true"}});return n}),Cf=cn("user/login",async(e,{extra:t})=>{const{data:n}=await t.post(qt.Login,e);return n}),Tf=cn("user/logout",async(e,{extra:t})=>{await t.delete(qt.Logout)}),Gd="six-cities-token",ty=()=>localStorage.getItem(Gd)??"",OP=e=>{localStorage.setItem(Gd,e)},MP=()=>{localStorage.removeItem(Gd)},RP={authStatus:Je.Unknown,requestStatus:oe.Idle,userInfo:null,userAuthData:null},Ga=Ai({name:"user",initialState:RP,reducers:{setNoAuthStatus:e=>{e.authStatus=Je.NoAuth}},extraReducers:e=>{e.addCase(ia.pending,t=>{t.requestStatus=oe.Loading}),e.addCase(ia.fulfilled,(t,n)=>{t.userInfo=n.payload,t.authStatus=Je.Auth,t.requestStatus=oe.Succeed}),e.addCase(ia.rejected,t=>{t.authStatus=Je.NoAuth,t.requestStatus=oe.Failed}),e.addCase(Cf.fulfilled,(t,n)=>{t.userInfo=n.payload,OP(t.userInfo.token),t.authStatus=Je.Auth,t.requestStatus=oe.Succeed}),e.addCase(Cf.rejected,t=>{t.authStatus=Je.NoAuth,t.requestStatus=oe.Failed}),e.addCase(Tf.fulfilled,t=>{MP(),t.userInfo=null,t.authStatus=Je.NoAuth,t.requestStatus=oe.Succeed}),e.addCase(Tf.rejected,t=>{t.userInfo=null,t.authStatus=Je.NoAuth,t.requestStatus=oe.Failed})},selectors:{authStatus:e=>e.authStatus,requestStatus:e=>e.requestStatus,userInfo:e=>e.userInfo,userAuthData:e=>e.userAuthData}}),Yd={...Ga.actions,checkAuth:ia,login:Cf,logout:Tf},Uo=Ga.selectors;function ny(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",oa=e=>kr(e)||_t(e)?e:null,kf=e=>O.isValidElement(e)||kr(e)||_t(e)||Zo(e);function zP(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 Wl(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?zP(x,_,a):_()};S||(p?g():(R.current=1,x.className+=` ${E}`,x.addEventListener("animationend",g)))},[S]),_e.createElement(_e.Fragment,null,f)}}function Im(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 Lf=new Set,IP=e=>Lf.forEach(t=>t(e)),ry=()=>it.size>0;function iy(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 oy(e,t){kf(e)&&(ry()||Ho.push({content:e,options:t}),it.forEach(n=>{n.buildToast(e,t)}))}function Am(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 AP(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,I=()=>{x=Array.from(y.values()),N.forEach(A=>A())},b=A=>{R=A==null?[]:R.filter(X=>X!==A),I()},$=A=>{const{toastId:X,onOpen:V,updateId:G,children:ce}=A.props,We=G==null;A.staleId&&y.delete(A.staleId),y.set(X,A),R=[...R,A.props.toastId].filter(Y=>Y!==A.staleId),I(),S(Im(A,We?"added":"updated")),We&&_t(V)&&V(O.isValidElement(ce)&&ce.props)};return{id:_,props:g,observe:A=>(N.add(A),()=>N.delete(A)),toggle:(A,X)=>{y.forEach(V=>{X!=null&&X!==V.props.toastId||_t(V.toggle)&&V.toggle(A)})},removeToast:b,toasts:y,clearQueue:()=>{P-=E.length,E=[]},buildToast:(A,X)=>{if((J=>{let{containerId:re,toastId:ee,updateId:te}=J;const ie=re?re!==_:_!==1,ye=y.has(ee)&&te==null;return ie||ye})(X))return;const{toastId:V,updateId:G,data:ce,staleId:We,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:ce,closeToast:W,isIn:!1,className:oa(X.className||g.toastClassName),bodyClassName:oa(X.bodyClassName||g.bodyClassName),progressClassName:oa(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(Im(J,"removed")),y.delete(V),P--,P<0&&(P=0),E.length>0?$(E.shift()):I()}};var T,U;K.closeButton=g.closeButton,X.closeButton===!1||kf(X.closeButton)?K.closeButton=X.closeButton:X.closeButton===!0&&(K.closeButton=!kf(g.closeButton)||g.closeButton);let j=A;O.isValidElement(A)&&!kr(A.type)?j=O.cloneElement(A,{closeToast:W,toastProps:K,data:ce}):_t(A)&&(j=A({closeToast:W,toastProps:K,data:ce}));const H={content:j,props:K,staleId:We};g.limit&&g.limit>0&&P>g.limit&&F?E.push(H):Zo(Y)?setTimeout(()=>{$(H)},Y):$(H)},setProps(A){g=A},setToggle:(A,X)=>{y.get(A).toggle=X},isToastActive:A=>R.some(X=>X===A),getSnapshot:()=>g.newestOnTop?x.reverse():x}}(u,a,IP);it.set(u,d);const p=d.observe(f);return Ho.forEach(_=>oy(_.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:iy,count:s==null?void 0:s.length}}function jP(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:I,left:b,right:$}=a.current.getBoundingClientRect();y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&y.clientX>=b&&y.clientX<=$&&y.clientY>=N&&y.clientY<=I?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 DP(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 sy=()=>""+bP++;function BP(e){return e&&(kr(e.toastId)||Zo(e.toastId))?e.toastId:sy()}function xo(e,t){return oy(e,t),t.toastId}function Ya(e,t){return{...t,type:t&&t.type||e,toastId:BP(t)}}function Hs(e){return(t,n)=>xo(t,Ya(e,n))}function ue(e,t){return xo(e,Ya("default",t))}ue.loading=(e,t)=>xo(e,Ya("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ue.promise=function(e,t,n){let i,{pending:s,error:a,success:u}=t;s&&(i=kr(s)?ue.loading(s,n):ue.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 ue.dismiss(i);const k={type:_,...f,...n,data:S},P=kr(v)?{render:v}:v;return i?ue.update(i,{...k,...P}):ue(P.render,{...k,...P}),S},p=_t(e)?e():e;return p.then(_=>d("success",u,_)).catch(_=>d("error",a,_)),p},ue.success=Hs("success"),ue.info=Hs("info"),ue.error=Hs("error"),ue.warning=Hs("warning"),ue.warn=ue.warning,ue.dark=(e,t)=>xo(e,Ya("default",{theme:"dark",...t})),ue.dismiss=function(e){(function(t){var n;if(ry()){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)},ue.clearWaitingQueue=function(e){e===void 0&&(e={}),it.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},ue.isActive=iy,ue.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:sy()};a.toastId!==e&&(a.staleId=e);const u=a.render||s;delete a.render,xo(u,a)}},ue.done=e=>{ue.update(e,{progress:1})},ue.onChange=function(e){return Lf.add(e),()=>{Lf.delete(e)}},ue.play=e=>Am(!0,e),ue.pause=e=>Am(!1,e);const FP=typeof window<"u"?O.useLayoutEffect:O.useEffect,Ws=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})},gc={info:function(e){return _e.createElement(Ws,{...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(Ws,{...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(Ws,{...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(Ws,{...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"})}},$P=e=>{const{isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:s,playToast:a}=jP(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:I,role:b,progress:$,rtl:A,toastId:X,deleteToast:V,isIn:G,isLoading:ce,closeOnClick:We,theme:Y}=e,W=Kn("Toastify__toast",`Toastify__toast-theme--${Y}`,`Toastify__toast--${_}`,{"Toastify__toast--rtl":A},{"Toastify__toast--close-on-click":We}),F=_t(E)?E({rtl:A,position:P,type:_,defaultClassName:W}):Kn(W,E),K=function(H){let{theme:J,type:re,isLoading:ee,icon:te}=H,ie=null;const ye={theme:J,type:re};return te===!1||(_t(te)?ie=te({...ye,isLoading:ee}):O.isValidElement(te)?ie=O.cloneElement(te,ye):ee?ie=gc.spinner():(Ye=>Ye in gc)(re)&&(ie=gc[re](ye))),ie}(e),T=!!$||!d,U={closeToast:S,type:_,theme:Y};let j=null;return u===!1||(j=_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":!ce})},K),_e.createElement("div",null,f)),j,_e.createElement(DP,{...I&&!T?{key:`pb-${I}`}:{},rtl:A,theme:Y,delay:d,isRunning:t,isIn:G,closeToast:S,hide:v,type:_,style:N,className:y,controlledProgress:T,progress:$||0})))},Vl=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},UP=Wl(Vl("bounce",!0));Wl(Vl("slide",!0));Wl(Vl("zoom"));Wl(Vl("flip"));const ZP={position:"top-right",transition:UP,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function HP(e){let t={...ZP,...e};const n=e.stacked,[i,s]=O.useState(!0),a=O.useRef(null),{getToastToRender:u,isToastActive:f,count:d}=AP(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,oa(p))}function P(){n&&(s(!0),ue.play())}return FP(()=>{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((I,b)=>{const $=I;$.classList.add("Toastify__toast--stacked"),b>0&&($.dataset.collapsed=`${i}`),$.dataset.pos||($.dataset.pos=g?"top":"bot");const A=y*(i?.2:1)+(i?0:x*b);$.style.setProperty("--y",`${g?A:-1*A}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),ue.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($P,{...N,stacked:n,collapseAll:P,isIn:f(N.toastId,N.containerId),style:N.style,key:`toast-${N.key}`},y)}))}))}const sa=cn("data/fetchOffers",async(e,{extra:t})=>{const{data:n}=await t.get(qt.Offers);return n}),aa=cn("data/fetchOfferFullInfo",async(e,{extra:t})=>{const{data:n}=await t.get(`${qt.Offers}/${e}`);return n}),la=cn("data/fetchOffersNear",async(e,{extra:t})=>{const{data:n}=await t.get(`${qt.Offers}/${e}/nearby`);return n}),ua=cn("data/fetchFavorites",async(e,{extra:t})=>{const{data:n}=await t.get(qt.Favorite);return n}),ca=cn("data/toggleFavorite",async({offerId:e,status:t},{extra:n})=>{await n.post(`${qt.Favorite}/${e}/${t}`)}),WP={favorites:[],statusFetchFavorites:oe.Idle,statusToggleFavorite:oe.Idle},Qa=Ai({name:"favorites",initialState:WP,reducers:{},extraReducers:e=>{e.addCase(ua.pending,t=>{t.statusFetchFavorites=oe.Loading}),e.addCase(ua.fulfilled,(t,n)=>{t.favorites=n.payload,t.statusFetchFavorites=oe.Succeed}),e.addCase(ua.rejected,t=>{t.statusFetchFavorites=oe.Failed}),e.addCase(ca.pending,t=>{t.statusToggleFavorite=oe.Loading}),e.addCase(ca.fulfilled,t=>{t.statusToggleFavorite=oe.Succeed}),e.addCase(ca.rejected,t=>{t.statusToggleFavorite=oe.Failed})},selectors:{favorites:e=>e.favorites,statusFetchFavorites:e=>e.statusFetchFavorites,statusToggleFavorite:e=>e.statusToggleFavorite}}),ay={...Qa.actions,fetchFavorites:ua,toggleFavorite:ca},Nf=Qa.selectors;function VP(){const e=Ke(Uo.authStatus),t=Ke(Uo.userInfo),{logout:n}=un(Yd),{fetchFavorites:i}=un(ay),s=Ke(Nf.statusToggleFavorite);O.useEffect(()=>{e===Je.Auth&&(s===oe.Succeed||s===oe.Idle)&&i()},[s,e,i]);const a=Ke(Nf.favorites).length,u=async p=>{p.preventDefault(),await n().unwrap().catch(_=>{ue.warning(_.message)})},f=w.jsxs(w.Fragment,{children:[w.jsx("li",{className:"header__nav-item user",children:w.jsxs(ln,{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(_=>ue.warning(_.message))},children:w.jsx("span",{className:"header__signout",children:"Sign out"})})})]}),d=w.jsx("li",{className:"header__nav-item user",children:w.jsxs(ln,{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 Kl=O.memo(VP),Ir=(...e)=>e.filter(Boolean).join(" ");function KP({cities:e=dr}){return w.jsx("ul",{className:"locations__list tabs__list",children:e.map(t=>w.jsx("li",{className:"locations__item",children:w.jsx(yS,{to:tt.Root+t.slug,className:({isActive:n})=>Ir("locations__item-link tabs__item",n&&"tabs__item--active"),children:w.jsx("span",{children:t.name})})},t.slug))})}const qP=O.memo(KP),GP=()=>{const e=document.title;return()=>{document.title=e}};function Xo(e){O.useEffect(GP,[]),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)})(Xm,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(j(r))},_add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.clone()._subtract(j(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=j(r);var o=r.x-this.x,l=r.y-this.y;return Math.sqrt(o*o+l*l)},equals:function(r){return r=j(r),r.x===this.x&&r.y===this.y},contains:function(r){return r=j(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 j(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,Fr=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}(),ph=function(){return!!document.createElement("canvas").getContext}(),is=!!(document.createElementNS&&sh("svg").createSVGRect),os=!is&&function(){try{var r=document.createElement("div");r.innerHTML='';var o=r.firstChild;return o.style.behavior="url(#default#VML)",o&&typeof o.adj=="object"}catch{return!1}}();function Xt(r){return navigator.userAgent.toLowerCase().indexOf(r)>=0}var Ky={ie:ts,ielt9:br,edge:ns,webkit:eu,android:Di,android23:bi,androidStock:lh,opera:tu,chrome:nu,gecko:ru,safari:rs,phantom:uh,opera12:ch,win:fh,ie3d:iu,webkit3d:ou,gecko3d:dh,any3d:Ct,mobile:Br,mobileWebkit:Hy,mobileWebkit3d:Wy,msPointer:zn,pointer:Yt,touch:Qt,mobileOpera:hh,mobileGecko:Vy,retina:In,passiveEvents:Fr,canvas:ph,svg:is,vml:os},su=zn?"MSPointerDown":"pointerdown",au=zn?"MSPointerMove":"pointermove",lu=zn?"MSPointerUp":"pointerup",uu=zn?"MSPointerCancel":"pointercancel",$r={},mh=!1;function qy(r,o,l,c){return o==="touchstart"?Yy(r,l,c):o==="touchmove"?Jy(r,l,c):o==="touchend"&&e0(r,l,c),this}function Gy(r,o,l){var c=r["_leaflet_"+o+l];return o==="touchstart"?r.removeEventListener(su,c,!1):o==="touchmove"?r.removeEventListener(au,c,!1):o==="touchend"&&(r.removeEventListener(lu,c,!1),r.removeEventListener(uu,c,!1)),this}function Yy(r,o,l){var c=u(function(h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&kt(h),cu(h,o)});r["_leaflet_touchstart"+l]=c,r.addEventListener(su,c,!1),mh||(document.addEventListener(su,Qy,!0),document.addEventListener(au,Xy,!0),document.addEventListener(lu,_h,!0),document.addEventListener(uu,_h,!0),mh=!0)}function Qy(r){$r[r.pointerId]=r}function Xy(r){$r[r.pointerId]&&($r[r.pointerId]=r)}function _h(r){delete $r[r.pointerId]}function cu(r,o){r.touches=[];for(var l in $r)r.touches.push($r[l]);r.changedTouches=[r],o(r)}function Jy(r,o,l){var c=function(h){h.pointerType===(h.MSPOINTER_TYPE_MOUSE||"mouse")&&h.buttons===0||cu(h,o)};r["_leaflet_touchmove"+l]=c,r.addEventListener(au,c,!1)}function e0(r,o,l){var c=function(h){cu(h,o)};r["_leaflet_touchend"+l]=c,r.addEventListener(lu,c,!1),r.addEventListener(uu,c,!1)}var ss=zn?"MSPointerDown":Yt?"pointerdown":"touchstart",as=zn?"MSPointerUp":Yt?"pointerup":"touchend",Ur="_leaflet_";function t0(r,o,l){var c,h,m=!1,C=250;function M(B){if(Yt){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(Yt){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[Ur+ss+l]=M,r[Ur+as+l]=z,r[Ur+"dblclick"+l]=o,r.addEventListener(ss,M,Fr?{passive:!1}:!1),r.addEventListener(as,z,Fr?{passive:!1}:!1),r.addEventListener("dblclick",o,!1),this}function n0(r,o){var l=r[Ur+ss+o],c=r[Ur+as+o],h=r[Ur+"dblclick"+o];return r.removeEventListener(ss,l,Fr?{passive:!1}:!1),r.removeEventListener(as,c,Fr?{passive:!1}:!1),r.removeEventListener("dblclick",h,!1),this}var fu=cs(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Bi=cs(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),vh=Bi==="webkitTransition"||Bi==="OTransition"?Bi+"End":"transitionend";function gh(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 ls(r){for(;r.firstChild;)r.removeChild(r.firstChild)}function Zr(r){var o=r.parentNode;o&&o.lastChild!==r&&o.appendChild(r)}function Hr(r){var o=r.parentNode;o&&o.firstChild!==r&&o.insertBefore(r,o.firstChild)}function du(r,o){if(r.classList!==void 0)return r.classList.contains(o);var l=us(r);return l.length>0&&new RegExp("(^|\\s)"+o+"(\\s|$)").test(l)}function 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=j(o.paddingTopLeft||o.padding||[0,0]),c=j(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=j(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&&(ce(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var r;for(r in this._layers)this._layers[r].remove();for(r in this._panes)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=j(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(ie(r),o)},unproject:function(r,o){return o=o===void 0?this._zoom:o,this.options.crs.pointToLatLng(j(r),o)},layerPointToLatLng:function(r){var o=j(r).add(this.getPixelOrigin());return this.unproject(o)},latLngToLayerPoint:function(r){var o=this.project(ie(r))._round();return o._subtract(this.getPixelOrigin())},wrapLatLng:function(r){return this.options.crs.wrapLatLng(ie(r))},wrapLatLngBounds:function(r){return this.options.crs.wrapLatLngBounds(ee(r))},distance:function(r,o){return this.options.crs.distance(ie(r),ie(o))},containerPointToLayerPoint:function(r){return j(r).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(r){return j(r).add(this._getMapPanePos())},containerPointToLatLng:function(r){var o=this.containerPointToLayerPoint(j(r));return this.layerPointToLatLng(o)},latLngToContainerPoint:function(r){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ie(r)))},mouseEventToContainerPoint:function(r){return xh(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=gh(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"+(Qt?" leaflet-touch":"")+(In?" leaflet-retina":"")+(br?" leaflet-oldie":"")+(rs?" 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 ce(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(){ce(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&&!ps(m,r)||(l.push(c),h))||m===this._container)break;m=m.parentNode}return!l.length&&!C&&!h&&ps(m,r)&&(l=[this]),l},_handleDOMEvent:function(r){if(!(!this._loaded||Cu(r))){var o=r.type;(o==="mousedown"||o==="keypress"||o==="keyup"||o==="keydown")&&gu(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=fu,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 a0(r,o){return new de(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)};de.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 Ph=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()}}),l0=function(r,o,l){return new Ph(r,o,l)},Tu=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)}});de.mergeOptions({zoomControl:!0}),de.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Tu,this.addControl(this.zoomControl))});var u0=function(r){return new Tu(r)},Ch=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}}),c0=function(r){return new Ch(r)},ku=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(" | ")}}});de.mergeOptions({attributionControl:!0}),de.addInitHook(function(){this.options.attributionControl&&new ku().addTo(this)});var f0=function(r){return new ku(r)};bt.Layers=Ph,bt.Zoom=Tu,bt.Scale=Ch,bt.Attribution=ku,Wi.layers=l0,Wi.zoom=u0,Wi.scale=c0,Wi.attribution=f0;var Jt=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}});Jt.addTo=function(r,o){return r.addHandler(o,this),this};var d0={Events:F},Th=Qt?"touchstart mousedown":"mousedown",kh={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Lu={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,Th,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(mr._dragging===this&&this.finishDrag(),Me(this._dragStartTarget,Th,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(r){if(!(r._simulated||!this._enabled)&&(this._moved=!1,!du(this._element,"leaflet-zoom-anim")&&!(mr._dragging||r.shiftKey||r.which!==1&&r.button!==1&&!r.touches)&&(mr._dragging=this,this._preventOutline&&gu(this._element),mu(),$i(),!this._moving))){this.fire("down");var o=r.touches?r.touches[0]:r,l=yh(this._element);this._startPoint=new T(o.clientX,o.clientY),this._parentScale=yu(l),ae(document,Lu[r.type],this._onMove,this),ae(document,kh[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,Nu(r,o,l,c,C),Nu(r,o,l,C,h))}function m0(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 _0(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 Rh(r){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),hn(r)}var v0={simplify:Lh,pointToSegmentDistance:Nh,closestPointOnSegment:h0,clipSegment:Mh,_getEdgeIntersection:ms,_getBitCode:_r,_sqClosestPointOnSegment:Vi,isFlat:hn,_flat:Rh};function zh(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)}},y0={LonLat:Ou,Mercator:Mu,SphericalMercator:Fe},w0=s({},Ye,{code:"EPSG:3395",projection:Mu,transformation:function(){var r=.5/(Math.PI*Mu.R);return jt(r,.5,-r,.5)}()}),Ih=s({},Ye,{code:"EPSG:4326",projection:Ou,transformation:jt(1/180,1,-1/180,.5)}),x0=s({},ye,{projection:Ou,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=w0,ye.EPSG3857=Rn,ye.EPSG900913=Uy,ye.EPSG4326=Ih,ye.Simple=x0;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})}}});de.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=ie(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 N0(r,o){return new qr(r,o)}var mn=Vr.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=j(this.options.autoPanPadding),M=j(this.options.autoPanPaddingTopLeft||C),z=j(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 j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),I0=function(r,o){return new Yr(r,o)};de.mergeOptions({closePopupOnClick:!0}),de.include({openPopup:function(r,o,l){return r instanceof Yr||(r=new Yr(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 Yr?(E(r,o),this._popup=r,r._source=this):((!this._popup||o)&&(this._popup=new Yr(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 Qr=_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 Qt&&!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=j(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,Du){return Dn.distanceTo(m)-Du.distanceTo(m)}),C.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Es=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),ce(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 D0(r){return new qi(r)}var Xr=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=I,Ce(o),delete this._tiles[r]))},_removeTile:function(r){var o=this._tiles[r];if(o)return lh||o.el.setAttribute("src",I),qi.prototype._removeTile.call(this,r)},_tileReady:function(r,o,l){if(!(!this._map||l&&l.getAttribute("src")===I))return qi.prototype._tileReady.call(this,r,o,l)}});function $h(r,o){return new Xr(r,o)}var Uh=Xr.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,Xr.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===Ih?[h.y,h.x,m.y,m.x]:[h.x,h.y,m.x,m.y]).join(","),M=Xr.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 Uh(r,o)}Xr.WMS=Uh,$h.wms=b0;var en=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()}}),Zh=en.extend({getEvents:function(){var r=en.prototype.getEvents.call(this);return r.viewprereset=this._onViewPreReset,r},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){en.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(){ce(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)){en.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(){en.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">')}}}(),B0={_initContainer:function(){this._container=pe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(en.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){Zr(r._container)},_bringToBack:function(r){Hr(r._container)}},Ss=os?Gi:sh,Yi=en.extend({getEvents:function(){var r=en.prototype.getEvents.call(this);return r.zoomstart=this._onZoomStart,r},_initContainer:function(){this._container=Ss("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ss("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)){en.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=Ss("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,ah(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){Zr(r._path)},_bringToBack:function(r){Hr(r._path)}});os&&Yi.include(B0);function Wh(r){return is||os?new Yi(r):null}de.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&&Hh(r)||Wh(r)}});var Vh=qr.extend({initialize:function(r,o){qr.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 F0(r,o){return new Vh(r,o)}Yi.create=Ss,Yi.pointsToPath=ah,mn.geometryToLayer=zu,mn.coordsToLatLng=Iu,mn.coordsToLatLngs=gs,mn.latLngToCoords=Au,mn.latLngsToCoords=ys,mn.getFeature=Gr,mn.asFeature=ws,de.mergeOptions({boxZoom:!0});var Kh=Jt.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(),mu(),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(),_u(),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()}});de.addInitHook("addHandler","boxZoom",Kh),de.mergeOptions({doubleClickZoom:!0});var qh=Jt.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)}});de.addInitHook("addHandler","doubleClickZoom",qh),de.mergeOptions({dragging:!0,inertia:!bi,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Gh=Jt.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))}});de.addInitHook("addHandler","scrollWheelZoom",Qh),de.mergeOptions({tap:!0,tapTolerance:15});var Xh=Jt.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)}});Qt&&(!Yt||rs)&&de.addInitHook("addHandler","tap",Xh),de.mergeOptions({touchZoom:Qt&&!bi,bounceAtZoomLimits:!0});var Jh=Jt.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),ce(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,ce(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))}});de.addInitHook("addHandler","touchZoom",Jh),de.BoxZoom=Kh,de.DoubleClickZoom=qh,de.Drag=Gh,de.Keyboard=Yh,de.ScrollWheelZoom=Qh,de.Tap=Xh,de.TouchZoom=Jh,n.version=i,n.Control=bt,n.control=Wi,n.Browser=Ky,n.Evented=K,n.Mixin=d0,n.Util=We,n.Class=Y,n.Handler=Jt,n.extend=s,n.bind=u,n.stamp=d,n.setOptions=E,n.DomEvent=s0,n.DomUtil=i0,n.PosAnimation=Eh,n.Draggable=mr,n.LineUtil=v0,n.PolyUtil=g0,n.Point=T,n.point=j,n.Bounds=H,n.bounds=J,n.Transformation=Pt,n.transformation=jt,n.Projection=y0,n.LatLng=te,n.latLng=ie,n.LatLngBounds=re,n.latLngBounds=ee,n.CRS=ye,n.GeoJSON=mn,n.geoJSON=Dh,n.geoJson=O0,n.Layer=Bt,n.LayerGroup=Wr,n.layerGroup=S0,n.FeatureGroup=Vr,n.featureGroup=E0,n.ImageOverlay=xs,n.imageOverlay=M0,n.VideoOverlay=bh,n.videoOverlay=R0,n.SVGOverlay=Bh,n.svgOverlay=z0,n.DivOverlay=_n,n.Popup=Yr,n.popup=I0,n.Tooltip=Qr,n.tooltip=A0,n.Icon=Kr,n.icon=P0,n.DivIcon=Fh,n.divIcon=j0,n.Marker=_s,n.marker=C0,n.TileLayer=Xr,n.tileLayer=$h,n.GridLayer=qi,n.gridLayer=D0,n.SVG=Yi,n.svg=Wh,n.Renderer=en,n.Canvas=Zh,n.canvas=Hh,n.Path=jn,n.CircleMarker=vs,n.circleMarker=T0,n.Circle=Ru,n.circle=k0,n.Polyline=pn,n.polyline=L0,n.Polygon=qr,n.polygon=N0,n.Rectangle=Vh,n.rectangle=F0,n.Map=de,n.map=a0;var $0=window.L;n.noConflict=function(){return window.L=$0,this},window.L=n})})(Of,Of.exports);var Li=Of.exports;function YP(e,t){const[n,i]=O.useState(null),s=O.useRef(!1);return O.useEffect(()=>{if(e.current!==null&&!s.current){const a=new Li.Map(e.current,{center:{lat:t.location.latitude,lng:t.location.longitude},zoom:12}),u=new Li.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 QP={offers:[],offersFavorites:[],activeOffer:null,status:oe.Idle},Xa=Ai({name:"offers",initialState:QP,reducers:{setActiveOffer:(e,t)=>{e.activeOffer=t.payload}},extraReducers:e=>{e.addCase(sa.pending,t=>{t.status=oe.Loading}),e.addCase(sa.fulfilled,(t,n)=>{t.offers=n.payload,t.status=oe.Succeed}),e.addCase(sa.rejected,t=>{t.status=oe.Failed})},selectors:{offers:e=>e.offers,activeOffer:e=>e.activeOffer,status:e=>e.status}}),ly={...Xa.actions,fetchOffers:sa},Ja=Xa.selectors,XP=new Li.Icon(LS),JP=new Li.Icon(NS);function eC({container:e,city:t,offers:n,currentOfferId:i}){const s=Ke(Ja.activeOffer),a=O.useRef(null),u=YP(a,t);return O.useEffect(()=>{if(u){const f=Li.layerGroup().addTo(u);return n.forEach(d=>{new Li.Marker({lat:d.location.latitude,lng:d.location.longitude}).setIcon(s!==null&&d.id===s.id||d.id===i?JP:XP).addTo(f)}),u.flyTo([t.location.latitude,t.location.longitude],12),()=>{u.removeLayer(f)}}},[t,u,n,s,i]),w.jsx("section",{ref:a,className:`${e}__map map`})}const uy=O.memo(eC);function cy({componentType:e,isFavorite:t,offerId:n}){const i={"place-card":{width:"18",height:"19"},offer:{width:"31",height:"33"}},[s,a]=O.useState(t),[u,f]=O.useState(!1),{toggleFavorite:d}=un(ay),p=Ke(Uo.authStatus),_=Ad(),v=p===Je.Auth,S=()=>{v||_(tt.Login),f(!0),ue.promise(d({status:+!s,offerId:n}).unwrap(),{pending:"Sending request",success:{render(){return a(!s),f(!1),"Success"}}})};return w.jsxs("button",{className:Ir(`${e}__bookmark-button button`,s&&v&&`${e}__bookmark-button--active`),type:"button",onClick:S,disabled:u,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 Qd({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(ln,{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(cy,{offerId:i,componentType:"place-card",isFavorite:f})]}),w.jsx(Qd,{componentType:"place-card",rating:d}),w.jsx("h2",{className:"place-card__name",children:w.jsx(ln,{to:v,children:p})}),w.jsx("p",{className:"place-card__type",children:_})]})]})}const Xd=O.memo(oC);var di=(e=>(e.Popular="Popular",e.PriceLowToHigh="Price: low to high",e.PriceHighToLow="Price: high to low",e.TopRatedFirst="Top rated first",e))(di||{});const sC="Popular";function aC(e,t){switch(e){case di.Popular:return t;case di.PriceLowToHigh:return t.toSorted((n,i)=>n.price-i.price);case di.PriceHighToLow:return t.toSorted((n,i)=>i.price-n.price);case di.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:Ir("places__options","places__options--custom",n&&"places__options--opened"),children:Object.values(di).map((f,d)=>w.jsx("li",{className:Ir("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 -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -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 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(hy,{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}=un(ly),u=O.useCallback(p=>a(p),[a]);if(Ke(Ja.status)===oe.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(Xd,{componentType:"cities",offer:p,onHoverCard:u},p.id))})]})}const wC="_container_qshx3_1",xC="_loader_qshx3_9",SC="_animloader_qshx3_1",jm={container:wC,loader:xC,animloader:SC};function Jd(){return w.jsx("div",{className:jm.container,children:w.jsx("span",{className:jm.loader})})}function EC({title:e="Main",citySlug:t}){Xo(e);const{fetchOffers:n}=un(ly),i=Ke(Ja.status),s=Ke(Ja.offers);O.useEffect(()=>{n().unwrap().catch(f=>{ue.warning(f.message)})},[n]);const a=dr.find(f=>f.slug===t);if(!a)return null;const u=s.filter(f=>f.city.name===a.name);return i===oe.Loading?w.jsx(Jd,{}):w.jsxs("div",{className:Ir("page page--gray page--main",u.length===0&&"page__main--index-empty"),children:[w.jsx(Kl,{}),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(qP,{})})}),w.jsx("div",{className:"cities",children:w.jsxs("div",{className:Ir("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(uy,{container:"cities",city:a,offers:u})})]})})]})]})}const PC="_container_e270g_1",CC={container:PC};function py({title:e="404"}){return Xo(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(ln,{to:"/",className:"locations__item-link",children:[" ","<- Вернуться на главную страницу"]})]})]})}function TC(){return w.jsx("footer",{className:"footer container",children:w.jsx(ln,{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 my=O.memo(TC);function kC(){return w.jsxs("div",{className:"page page--favorites-empty",children:[w.jsx(Kl,{}),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(my,{})]})}function LC({offersFavoritesByCity:e}){var t;return w.jsxs("section",{className:"favorites",children:[w.jsx("h1",{className:"favorites__title",children:"Saved listing"}),w.jsx("ul",{className:"favorites__list",children:(t=Object.keys(e))==null?void 0:t.map(n=>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(ln,{className:"locations__item-link",to:`${tt.Root}${rC(n)}`,children:w.jsx("span",{children:n})})})}),w.jsx("div",{className:"favorites__places",children:e[n].map(i=>w.jsx(Xd,{componentType:"favorites",offer:i},i.id))})]},n))})]})}function NC({title:e="Favorites"}){Xo(e);const t=Ke(Nf.favorites);if(t.length===0)return w.jsx(kC,{});const n=Object.groupBy(t,({city:i})=>i.name);return w.jsxs("div",{className:"page",children:[w.jsx(Kl,{}),w.jsx("main",{className:"page__main page__main--favorites",children:w.jsx("div",{className:"page__favorites-container container",children:w.jsx(LC,{offersFavoritesByCity:n})})}),w.jsx(my,{})]})}function OC({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:Ir("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 MC={offerFullInfo:null,status:oe.Idle},el=Ai({name:"offerFullInfo",initialState:MC,reducers:{},extraReducers:e=>{e.addCase(aa.pending,t=>{t.status=oe.Loading}),e.addCase(aa.fulfilled,(t,n)=>{t.offerFullInfo=n.payload,t.status=oe.Succeed}),e.addCase(aa.rejected,t=>{t.status=oe.Failed})},selectors:{offerFullInfo:e=>e.offerFullInfo,status:e=>e.status}}),RC={...el.actions,fetchOfferFullInfo:aa},Dm=el.selectors,zC={offersNear:[],status:oe.Idle},tl=Ai({name:"offersNear",initialState:zC,reducers:{},extraReducers:e=>{e.addCase(la.pending,t=>{t.status=oe.Loading}),e.addCase(la.fulfilled,(t,n)=>{t.offersNear=n.payload,t.status=oe.Succeed}),e.addCase(la.rejected,t=>{t.status=oe.Failed})},selectors:{offersNear:e=>e.offersNear,status:e=>e.status}}),IC={...tl.actions,fetchOffersNear:la},AC=tl.selectors,fa=cn("data/fetchComments",async(e,{extra:t})=>{const{data:n}=await t.get(`${qt.Comments}/${e}`);return n}),da=cn("data/postComment",async({offerId:e,body:t},{extra:n})=>{const{data:i}=await n.post(`${qt.Comments}/${e}`,t);return i}),jC={comments:[],status:oe.Idle,statusPostRequest:oe.Idle},Wo=Ai({name:"comments",initialState:jC,reducers:{},extraReducers:e=>{e.addCase(fa.pending,t=>{t.status=oe.Loading}),e.addCase(fa.fulfilled,(t,n)=>{t.comments=n.payload,t.status=oe.Succeed}),e.addCase(fa.rejected,t=>{t.status=oe.Failed}),e.addCase(da.pending,t=>{t.statusPostRequest=oe.Loading}),e.addCase(da.fulfilled,t=>{t.statusPostRequest=oe.Succeed}),e.addCase(da.rejected,t=>{t.statusPostRequest=oe.Failed})},selectors:{comments:e=>e.comments,status:e=>e.status,statusPostRequest:e=>e.statusPostRequest}}),_y={...Wo.actions,fetchComments:fa,postComment:da},bm={...Wo.selectors,sortedComments:Gg(Wo.selectors.comments,e=>e.toSorted(lC))};var vy={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Xm,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(j[0])}else{var H=W.name;b[H]=W,T=H}return!K&&T&&(I=T),T||!K&&I},V=function(Y,W){if(A(Y))return Y.clone();var F=typeof W=="object"?W:{};return F.date=Y,F.args=arguments,new ce(F)},G=N;G.l=X,G.i=A,G.w=function(Y,W){return V(Y,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var ce=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 j=T.match(R);if(j){var H=j[2]-1||0,J=(j[7]||"0").substring(0,3);return U?new Date(Date.UTC(j[1],H,j[3]||1,j[4]||0,j[5]||0,j[6]||0,J)):new Date(j[1],H,j[3]||1,j[4]||0,j[5]||0,j[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,t]),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(bC,{review:u},u.id))})]})}const $C=50,UC=300;function ZC({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 HC=O.memo(ZC);function WC({isDisabled:e}){return w.jsx("div",{className:"reviews__rating-form form__rating",children:Object.entries(Pg).slice(1).map(([t,n])=>w.jsx(HC,{starTitle:t,starValue:n,isDisabled:e},t))})}const VC=O.memo(WC),KC=(e,t)=>e.length<=$C||e.length>UC||Number(t)===Pg.unknown;function qC({offerId:e}){const[t,n]=O.useState(!0),[i,s]=O.useState(!1),{postComment:a}=un(_y),u=d=>{const p=d.currentTarget,_=p.rating.value,v=p.review.value;n(KC(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),ue.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(VC,{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 GC({offerId:e}){const t=Ke(Uo.authStatus);return w.jsxs("section",{className:"offer__reviews reviews",children:[e&&w.jsx(FC,{offerId:e}),t===Je.Auth&&e&&w.jsx(qC,{offerId:e})]})}const YC=6,QC=3;function XC({title:e="Offer"}){Xo(e);const{fetchOfferFullInfo:t}=un(RC),{fetchOffersNear:n}=un(IC),i=Ke(Dm.status),{offerId:s}=Yx();O.useEffect(()=>{s&&(t(s),n(s))},[t,n,s]);const a=Ke(Dm.offerFullInfo),u=Ke(AC.offersNear).slice(0,QC);if(i===oe.Loading)return w.jsx(Jd,{});if(i===oe.Failed||!a)return w.jsx(py,{});const f=[...u,a],{images:d,isPremium:p,isFavorite:_,rating:v,type:S,bedrooms:k,maxAdults:P,price:E,goods:R,host:x,description:g,city:y}=a,N=dr.find(I=>I.name===y.name);return w.jsxs("div",{className:"page",children:[w.jsx(Kl,{}),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:d.slice(0,YC).map(I=>w.jsx("div",{className:"offer__image-wrapper",children:w.jsx("img",{className:"offer__image",src:I,alt:"Photo studio"})},I))})}),w.jsx("div",{className:"offer__container container",children:w.jsxs("div",{className:"offer__wrapper",children:[p&&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(cy,{offerId:s,componentType:"offer",isFavorite:_})]}),w.jsx(Qd,{componentType:"offer",rating:v}),w.jsxs("ul",{className:"offer__features",children:[w.jsx("li",{className:"offer__feature offer__feature--entire",children:nC(S)}),w.jsx("li",{className:"offer__feature offer__feature--bedrooms",children:`${k} Bedroom${k>1?"s":""}`}),w.jsx("li",{className:"offer__feature offer__feature--adults",children:`Max ${P} adult${P>1?"s":""}`})]}),w.jsxs("div",{className:"offer__price",children:[w.jsxs("b",{className:"offer__price-value",children:["€",E]}),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:R.map(I=>w.jsx("li",{className:"offer__inside-item",children:I},I))})]}),w.jsx(OC,{host:x,description:g}),w.jsx(GC,{offerId:s})]})}),N&&w.jsx(uy,{container:"offer",city:N,currentOfferId:s,offers:f})]}),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(I=>w.jsx(Xd,{offer:I,componentType:"near-places"},I.id))})]})})]})]})}function JC(){const[e,t]=O.useState(""),[n,i]=O.useState(""),{login:s}=un(Yd),a=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,u=/^(?=.*\d)(?=.*[a-zA-Z]).*$/,f=d=>{if(d.preventDefault(),!a.test(e)){ue.error("Введен неверный email");return}if(!u.test(n)){ue.error("Пароль должен содержать хотя бы одну букву и одну цифру");return}ue.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:d=>f(d),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:d=>t(d.target.value),className:"login__input form__input",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:d=>i(d.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 eT(){const e=iC(dr);return w.jsx("section",{className:"locations locations--login locations--current",children:w.jsx("div",{className:"locations__item",children:w.jsx(ln,{to:`/${e.slug}`,className:"locations__item-link",children:w.jsx("span",{children:e.name})})})})}function tT({title:e="Login"}){return Xo(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(JC,{}),w.jsx(eT,{})]})})]})}const yy=(e,t)=>function({children:i}){const s=Ke(Uo.authStatus),a=fr();if(s===Je.Unknown)return w.jsx(Jd,{});const u=(a.state??{}).from??t;return s===e?i:w.jsx(Sg,{to:u,state:{from:a.pathname}})},nT=yy(Je.Auth,tt.Login),rT=yy(Je.NoAuth,tt.Root);function iT(){return w.jsx(_S,{children:w.jsxs(cS,{children:[w.jsx(wr,{path:tt.Root,element:w.jsx(Sg,{to:CS})}),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(rT,{children:w.jsx(tT,{})})}),w.jsx(wr,{path:tt.Favorites,element:w.jsx(nT,{children:w.jsx(NC,{})})}),w.jsx(wr,{path:`${tt.Offer}/:offerId`,element:w.jsx(XC,{})}),w.jsx(wr,{path:"/*",element:w.jsx(py,{})})]})})}function wy(e,t){return function(){return e.apply(t,arguments)}}const{toString:oT}=Object.prototype,{getPrototypeOf:eh}=Object,ql=(e=>t=>{const n=oT.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fn=e=>(e=e.toLowerCase(),t=>ql(t)===e),Gl=e=>t=>typeof t===e,{isArray:ji}=Array,Vo=Gl("undefined");function sT(e){return e!==null&&!Vo(e)&&e.constructor!==null&&!Vo(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xy=fn("ArrayBuffer");function aT(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xy(e.buffer),t}const lT=Gl("string"),Rt=Gl("function"),Sy=Gl("number"),Yl=e=>e!==null&&typeof e=="object",uT=e=>e===!0||e===!1,ha=e=>{if(ql(e)!=="object")return!1;const t=eh(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},cT=fn("Date"),fT=fn("File"),dT=fn("Blob"),hT=fn("FileList"),pT=e=>Yl(e)&&Rt(e.pipe),mT=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=ql(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},_T=fn("URLSearchParams"),vT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),ji(e))for(i=0,s=e.length;i0;)if(s=n[i],t===s.toLowerCase())return s;return null}const Py=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Cy=e=>!Vo(e)&&e!==Py;function Mf(){const{caseless:e}=Cy(this)&&this||{},t={},n=(i,s)=>{const a=e&&Ey(t,s)||s;ha(t[a])&&ha(i)?t[a]=Mf(t[a],i):ha(i)?t[a]=Mf({},i):ji(i)?t[a]=i.slice():t[a]=i};for(let i=0,s=arguments.length;i(Jo(t,(s,a)=>{n&&Rt(s)?e[a]=wy(s,n):e[a]=s},{allOwnKeys:i}),e),yT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),wT=(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)},xT=(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&&eh(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ST=(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},ET=e=>{if(!e)return null;if(ji(e))return e;let t=e.length;if(!Sy(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},PT=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&eh(Uint8Array)),CT=(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])}},TT=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},kT=fn("HTMLFormElement"),LT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),Fm=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),NT=fn("RegExp"),Ty=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Jo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(i[a]=u||s)}),Object.defineProperties(e,i)},OT=e=>{Ty(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+"'")})}})},MT=(e,t)=>{const n={},i=s=>{s.forEach(a=>{n[a]=!0})};return ji(e)?i(e):i(String(e).split(t)),n},RT=()=>{},zT=(e,t)=>(e=+e,Number.isFinite(e)?e:t),yc="abcdefghijklmnopqrstuvwxyz",$m="0123456789",ky={DIGIT:$m,ALPHA:yc,ALPHA_DIGIT:yc+yc.toUpperCase()+$m},IT=(e=16,t=ky.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function AT(e){return!!(e&&Rt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const jT=e=>{const t=new Array(10),n=(i,s)=>{if(Yl(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const a=ji(i)?[]:{};return Jo(i,(u,f)=>{const d=n(u,s+1);!Vo(d)&&(a[f]=d)}),t[s]=void 0,a}}return i};return n(e,0)},DT=fn("AsyncFunction"),bT=e=>e&&(Yl(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch),D={isArray:ji,isArrayBuffer:xy,isBuffer:sT,isFormData:mT,isArrayBufferView:aT,isString:lT,isNumber:Sy,isBoolean:uT,isObject:Yl,isPlainObject:ha,isUndefined:Vo,isDate:cT,isFile:fT,isBlob:dT,isRegExp:NT,isFunction:Rt,isStream:pT,isURLSearchParams:_T,isTypedArray:PT,isFileList:hT,forEach:Jo,merge:Mf,extend:gT,trim:vT,stripBOM:yT,inherits:wT,toFlatObject:xT,kindOf:ql,kindOfTest:fn,endsWith:ST,toArray:ET,forEachEntry:CT,matchAll:TT,isHTMLForm:kT,hasOwnProperty:Fm,hasOwnProp:Fm,reduceDescriptors:Ty,freezeMethods:OT,toObjectSet:MT,toCamelCase:LT,noop:RT,toFiniteNumber:zT,findKey:Ey,global:Py,isContextDefined:Cy,ALPHABET:ky,generateString:IT,isSpecCompliantForm:AT,toJSONObject:jT,isAsyncFn:DT,isThenable:bT};function fe(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(fe,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 Ly=fe.prototype,Ny={};["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=>{Ny[e]={value:e}});Object.defineProperties(fe,Ny);Object.defineProperty(Ly,"isAxiosError",{value:!0});fe.from=(e,t,n,i,s,a)=>{const u=Object.create(Ly);return D.toFlatObject(e,u,function(d){return d!==Error.prototype},f=>f!=="isAxiosError"),fe.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 Oy(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Um(e,t,n){return e?e.concat(t).map(function(s,a){return s=Oy(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function FT(e){return D.isArray(e)&&!e.some(Rf)}const $T=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function Ql(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 fe("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)&&FT(P)||(D.isFileList(P)||D.endsWith(E,"[]"))&&(x=D.toArray(P)))return E=Oy(E),x.forEach(function(y,N){!(D.isUndefined(y)||y===null)&&t.append(u===!0?Um([E],N,a):u===null?E:E+"[]",p(y))}),!1}return Rf(P)?!0:(t.append(Um(R,E,a),p(P)),!1)}const v=[],S=Object.assign($T,{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 Zm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function th(e,t){this._pairs=[],e&&Ql(e,this,t)}const My=th.prototype;My.append=function(t,n){this._pairs.push([t,n])};My.toString=function(t){const n=t?function(i){return t.call(this,i,Zm)}:Zm;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function UT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ry(e,t,n){if(!t)return e;const i=n&&n.encode||UT,s=n&&n.serialize;let a;if(s?a=s(t,n):a=D.isURLSearchParams(t)?t.toString():new th(t,n).toString(i),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class ZT{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 Hm=ZT,zy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},HT=typeof URLSearchParams<"u"?URLSearchParams:th,WT=typeof FormData<"u"?FormData:null,VT=typeof Blob<"u"?Blob:null,KT={isBrowser:!0,classes:{URLSearchParams:HT,FormData:WT,Blob:VT},protocols:["http","https","file","blob","url","data"]},Iy=typeof window<"u"&&typeof document<"u",qT=(e=>Iy&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),GT=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),YT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Iy,hasStandardBrowserEnv:qT,hasStandardBrowserWebWorkerEnv:GT},Symbol.toStringTag,{value:"Module"})),on={...YT,...KT};function QT(e,t){return Ql(e,new on.classes.URLSearchParams,Object.assign({visitor:function(n,i,s,a){return on.isNode&&D.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function XT(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function JT(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]=JT(s[u])),!f)}if(D.isFormData(e)&&D.isFunction(e.entries)){const n={};return D.forEachEntry(e,(i,s)=>{t(XT(i),s,n,0)}),n}return null}function ek(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 nh={transitional:zy,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(Ay(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 Ql(f?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),ek(t)):t}],transformResponse:[function(t){const n=this.transitional||nh.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"?fe.from(f,fe.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:on.classes.FormData,Blob:on.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=>{nh.headers[e]={}});const rh=nh,tk=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"]),nk=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]&&tk[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},Wm=Symbol("internals");function oo(e){return e&&String(e).trim().toLowerCase()}function pa(e){return e===!1||e==null?e:D.isArray(e)?e.map(pa):String(e)}function rk(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 ik=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function wc(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 ok(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function sk(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 Xl{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]=pa(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())&&!ik(t)?u(nk(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 rk(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||wc(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||wc(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||wc(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]=pa(s),delete n[a];return}const f=t?ok(a):String(a).trim();f!==a&&delete n[a],n[f]=pa(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[Wm]=this[Wm]={accessors:{}}).accessors,s=this.prototype;function a(u){const f=oo(u);i[f]||(sk(s,u),i[f]=!0)}return D.isArray(t)?t.forEach(a):a(t),this}}Xl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Xl.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});D.freezeMethods(Xl);const Pn=Xl;function xc(e,t){const n=this||rh,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 jy(e){return!!(e&&e.__CANCEL__)}function es(e,t,n){fe.call(this,e??"canceled",fe.ERR_CANCELED,t,n),this.name="CanceledError"}D.inherits(es,fe,{__CANCEL__:!0});function ak(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new fe("Request failed with status code "+n.status,[fe.ERR_BAD_REQUEST,fe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const lk=on.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 uk(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ck(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Dy(e,t){return e&&!uk(t)?ck(e,t):t}const fk=on.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 dk(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function hk(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 pk=typeof XMLHttpRequest<"u",mk=pk&&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(on.hasStandardBrowserEnv||on.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=Dy(e.baseURL,e.url);v.open(e.method.toUpperCase(),Ry(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};ak(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 fe("Request aborted",fe.ECONNABORTED,e,v)),v=null)},v.onerror=function(){i(new fe("Network Error",fe.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||zy;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),i(new fe(R,x.clarifyTimeoutError?fe.ETIMEDOUT:fe.ECONNABORTED,e,v)),v=null},on.hasStandardBrowserEnv&&(f&&D.isFunction(f)&&(f=f(e)),f||f!==!1&&fk(S))){const E=e.xsrfHeaderName&&e.xsrfCookieName&&lk.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",Vm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&v.upload&&v.upload.addEventListener("progress",Vm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(d=E=>{v&&(i(!E||E.type?new es(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=dk(S);if(P&&on.protocols.indexOf(P)===-1){i(new fe("Unsupported protocol "+P+":",fe.ERR_BAD_REQUEST,e));return}v.send(s||null)})},zf={http:BT,xhr:mk};D.forEach(zf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Km=e=>`- ${e}`,_k=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(Km).join(` -`):" "+Km(a[0]):"as no adapter specified";throw new fe("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:zf};function Sc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new es(null,e)}function qm(e){return Sc(e),e.headers=Pn.from(e.headers),e.data=xc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),by.getAdapter(e.adapter||rh.adapter)(e).then(function(i){return Sc(e),i.data=xc.call(e,e.transformResponse,i),i.headers=Pn.from(i.headers),i},function(i){return jy(i)||(Sc(e),i&&i.response&&(i.response.data=xc.call(e,e.transformResponse,i.response),i.response.headers=Pn.from(i.response.headers))),Promise.reject(i)})}const Gm=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(Gm(p),Gm(_),!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 By="1.6.8",ih={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ih[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Ym={};ih.transitional=function(t,n,i){function s(a,u){return"[Axios v"+By+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,f)=>{if(t===!1)throw new fe(s(u," has been removed"+(n?" in "+n:"")),fe.ERR_DEPRECATED);return n&&!Ym[u]&&(Ym[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 vk(e,t,n){if(typeof e!="object")throw new fe("options must be an object",fe.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 fe("option "+a+" must be "+d,fe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new fe("Unknown option "+a,fe.ERR_BAD_OPTION)}}const If={assertOptions:vk,validators:ih},Bn=If.validators;class nl{constructor(t){this.defaults=t,this.interceptors={request:new Hm,response:new Hm}}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=[qm.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 es(a,u,f),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new oh(function(s){t=s}),cancel:t}}}const gk=oh;function yk(e){return function(n){return e.apply(null,n)}}function wk(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 xk=Af;function Fy(e){const t=new ma(e),n=wy(ma.prototype.request,t);return D.extend(n,ma.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Fy(Ni(e,s))},n}const De=Fy(rh);De.Axios=ma;De.CanceledError=es;De.CancelToken=gk;De.isCancel=jy;De.VERSION=By;De.toFormData=Ql;De.AxiosError=fe;De.Cancel=De.CanceledError;De.all=function(t){return Promise.all(t)};De.spread=yk;De.isAxiosError=wk;De.mergeConfig=Ni;De.AxiosHeaders=Pn;De.formToJSON=e=>Ay(D.isHTMLForm(e)?new FormData(e):e);De.getAdapter=by.getAdapter;De.HttpStatusCode=xk;De.default=De;const Sk=De,Ek=()=>{const e=Sk.create({baseURL:xS,timeout:SS});return e.interceptors.request.use(t=>{const n=ty();return n&&t.headers&&(t.headers["x-token"]=n),t},t=>{throw t.response&&ue.error(t.response.data.message),t}),e.interceptors.response.use(t=>t,t=>{throw t.response&&!t.response.config.headers["x-no-toast"]&&ue.error(t.response.data.message,{toastId:"error"}),t}),e},Pk=Ek(),Ck=Bg({[Xa.name]:Xa.reducer,[el.name]:el.reducer,[Wo.name]:Wo.reducer,[tl.name]:tl.reducer,[Ga.name]:Ga.reducer,[Qa.name]:Qa.reducer}),$y=oP({reducer:Ck,middleware:e=>e({thunk:{extraArgument:Pk}})});"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 Tk=Ec.createRoot(document.getElementById("root"));$y.dispatch(Yd[ty()?"checkAuth":"setNoAuthStatus"]());Tk.render(w.jsx(_e.StrictMode,{children:w.jsxs(yE,{store:$y,children:[w.jsx(HP,{position:"top-center",autoClose:PS,hideProgressBar:!0}),w.jsx(iT,{})]})})); diff --git a/14/index.html b/14/index.html index 493b62e..7f12b84 100644 --- a/14/index.html +++ b/14/index.html @@ -7,7 +7,7 @@ 6 cities - +