var yW=Object.defineProperty;var bW=(e,t,n)=>t in e?yW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ru=(e,t,n)=>(bW(e,typeof t!="symbol"?t+"":t,n),n);function _W(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function $l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l5={exports:{}},D0={},u5={exports:{}},at={};/** * @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 Cp=Symbol.for("react.element"),xW=Symbol.for("react.portal"),wW=Symbol.for("react.fragment"),OW=Symbol.for("react.strict_mode"),SW=Symbol.for("react.profiler"),EW=Symbol.for("react.provider"),jW=Symbol.for("react.context"),TW=Symbol.for("react.forward_ref"),CW=Symbol.for("react.suspense"),PW=Symbol.for("react.memo"),AW=Symbol.for("react.lazy"),qA=Symbol.iterator;function kW(e){return e===null||typeof e!="object"?null:(e=qA&&e[qA]||e["@@iterator"],typeof e=="function"?e:null)}var c5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f5=Object.assign,d5={};function Yc(e,t,n){this.props=e,this.context=t,this.refs=d5,this.updater=n||c5}Yc.prototype.isReactComponent={};Yc.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")};Yc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function h5(){}h5.prototype=Yc.prototype;function aj(e,t,n){this.props=e,this.context=t,this.refs=d5,this.updater=n||c5}var sj=aj.prototype=new h5;sj.constructor=aj;f5(sj,Yc.prototype);sj.isPureReactComponent=!0;var KA=Array.isArray,p5=Object.prototype.hasOwnProperty,lj={current:null},m5={key:!0,ref:!0,__self:!0,__source:!0};function v5(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)p5.call(t,r)&&!m5.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,ne=Z[H];if(0>>1;Hi(ae,F))oei(fe,ae)?(Z[H]=fe,Z[oe]=F,H=oe):(Z[H]=ae,Z[ee]=F,H=ee);else if(oei(fe,F))Z[H]=fe,Z[oe]=F,H=oe;else break e}}return B}function i(Z,B){var F=Z.sortIndex-B.sortIndex;return F!==0?F:Z.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],f=1,d=null,p=3,v=!1,g=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(Z){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=Z)r(u),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(u)}}function S(Z){if(y=!1,_(Z),!g)if(n(l)!==null)g=!0,J(j);else{var B=n(u);B!==null&&te(S,B.startTime-Z)}}function j(Z,B){g=!1,y&&(y=!1,b(N),N=-1),v=!0;var F=p;try{for(_(B),d=n(l);d!==null&&(!(d.expirationTime>B)||Z&&!D());){var H=d.callback;if(typeof H=="function"){d.callback=null,p=d.priorityLevel;var ne=H(d.expirationTime<=B);B=e.unstable_now(),typeof ne=="function"?d.callback=ne:d===n(l)&&r(l),_(B)}else r(l);d=n(l)}if(d!==null)var Y=!0;else{var ee=n(u);ee!==null&&te(S,ee.startTime-B),Y=!1}return Y}finally{d=null,p=F,v=!1}}var E=!1,C=null,N=-1,I=5,M=-1;function D(){return!(e.unstable_now()-MZ||125H?(Z.sortIndex=F,t(u,Z),n(l)===null&&Z===n(u)&&(y?(b(N),N=-1):y=!0,te(S,F-H))):(Z.sortIndex=ne,t(l,Z),g||v||(g=!0,J(j))),Z},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(Z){var B=p;return function(){var F=p;p=B;try{return Z.apply(this,arguments)}finally{p=F}}}})(_5);b5.exports=_5;var zW=b5.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 x5=R,Ur=zW;function Oe(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"),Cw=Object.prototype.hasOwnProperty,VW=/^[: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]*$/,ZA={},XA={};function HW(e){return Cw.call(XA,e)?!0:Cw.call(ZA,e)?!1:VW.test(e)?XA[e]=!0:(ZA[e]=!0,!1)}function WW(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function GW(e,t,n,r){if(t===null||typeof t>"u"||WW(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function hr(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Vn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vn[e]=new hr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vn[t]=new hr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vn[e]=new hr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vn[e]=new hr(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){Vn[e]=new hr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vn[e]=new hr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vn[e]=new hr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vn[e]=new hr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vn[e]=new hr(e,5,!1,e.toLowerCase(),null,!1,!1)});var cj=/[\-:]([a-z])/g;function fj(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(cj,fj);Vn[t]=new hr(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(cj,fj);Vn[t]=new hr(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(cj,fj);Vn[t]=new hr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vn[e]=new hr(e,1,!1,e.toLowerCase(),null,!1,!1)});Vn.xlinkHref=new hr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vn[e]=new hr(e,1,!1,e.toLowerCase(),null,!0,!0)});function dj(e,t,n,r){var i=Vn.hasOwnProperty(t)?Vn[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` `+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{U_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?md(e):""}function qW(e){switch(e.tag){case 5:return md(e.type);case 16:return md("Lazy");case 13:return md("Suspense");case 19:return md("SuspenseList");case 0:case 2:case 15:return e=B_(e.type,!1),e;case 11:return e=B_(e.type.render,!1),e;case 1:return e=B_(e.type,!0),e;default:return""}}function Nw(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 Eu:return"Fragment";case Su:return"Portal";case Pw:return"Profiler";case hj:return"StrictMode";case Aw:return"Suspense";case kw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case S5:return(e.displayName||"Context")+".Consumer";case O5:return(e._context.displayName||"Context")+".Provider";case pj:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mj:return t=e.displayName||null,t!==null?t:Nw(e.type)||"Memo";case Ta:t=e._payload,e=e._init;try{return Nw(e(t))}catch{}}return null}function KW(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Nw(t);case 8:return t===hj?"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 ns(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function j5(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function YW(e){var t=j5(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dm(e){e._valueTracker||(e._valueTracker=YW(e))}function T5(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=j5(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function mg(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 Rw(e,t){var n=t.checked;return Gt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function JA(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ns(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function C5(e,t){t=t.checked,t!=null&&dj(e,"checked",t,!1)}function Lw(e,t){C5(e,t);var n=ns(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Mw(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mw(e,t.type,ns(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ek(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Mw(e,t,n){(t!=="number"||mg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vd=Array.isArray;function Gu(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=$m.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function oh(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cd={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},ZW=["Webkit","ms","Moz","O"];Object.keys(Cd).forEach(function(e){ZW.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cd[t]=Cd[e]})});function N5(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cd.hasOwnProperty(e)&&Cd[e]?(""+t).trim():t+"px"}function R5(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=N5(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var XW=Gt({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 $w(e,t){if(t){if(XW[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function Fw(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 Uw=null;function vj(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bw=null,qu=null,Ku=null;function rk(e){if(e=kp(e)){if(typeof Bw!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=z0(t),Bw(e.stateNode,e.type,t))}}function L5(e){qu?Ku?Ku.push(e):Ku=[e]:qu=e}function M5(){if(qu){var e=qu,t=Ku;if(Ku=qu=null,rk(e),t)for(e=0;e>>=0,e===0?32:31-(lG(e)/uG|0)|0}var Fm=64,Um=4194304;function gd(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 bg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=gd(s):(o&=a,o!==0&&(r=gd(o)))}else a=n&~i,a!==0?r=gd(a):o!==0&&(r=gd(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Pp(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fi(t),e[t]=n}function hG(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ad),dk=" ",hk=!1;function tD(e,t){switch(e){case"keyup":return BG.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nD(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ju=!1;function VG(e,t){switch(e){case"compositionend":return nD(t);case"keypress":return t.which!==32?null:(hk=!0,dk);case"textInput":return e=t.data,e===dk&&hk?null:e;default:return null}}function HG(e,t){if(ju)return e==="compositionend"||!Sj&&tD(e,t)?(e=J5(),Vv=xj=La=null,ju=!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=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gk(n)}}function aD(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?aD(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sD(){for(var e=window,t=mg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=mg(e.document)}return t}function Ej(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 JG(e){var t=sD(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&aD(n.ownerDocument.documentElement,n)){if(r!==null&&Ej(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=yk(n,o);var a=yk(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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,Tu=null,qw=null,Nd=null,Kw=!1;function bk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kw||Tu==null||Tu!==mg(r)||(r=Tu,"selectionStart"in r&&Ej(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nd&&fh(Nd,r)||(Nd=r,r=wg(qw,"onSelect"),0Au||(e.current=e2[Au],e2[Au]=null,Au--)}function St(e,t){Au++,e2[Au]=e.current,e.current=t}var rs={},Zn=ms(rs),_r=ms(!1),xl=rs;function oc(e,t){var n=e.type.contextTypes;if(!n)return rs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function xr(e){return e=e.childContextTypes,e!=null}function Sg(){Rt(_r),Rt(Zn)}function jk(e,t,n){if(Zn.current!==rs)throw Error(Oe(168));St(Zn,t),St(_r,n)}function vD(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,KW(e)||"Unknown",i));return Gt({},n,r)}function Eg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rs,xl=Zn.current,St(Zn,e),St(_r,_r.current),!0}function Tk(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=vD(e,t,xl),r.__reactInternalMemoizedMergedChildContext=e,Rt(_r),Rt(Zn),St(Zn,e)):Rt(_r),St(_r,n)}var $o=null,V0=!1,tx=!1;function gD(e){$o===null?$o=[e]:$o.push(e)}function fq(e){V0=!0,gD(e)}function vs(){if(!tx&&$o!==null){tx=!0;var e=0,t=gt;try{var n=$o;for(gt=1;e>=a,i-=a,Fo=1<<32-Fi(t)+i|n<N?(I=C,C=null):I=C.sibling;var M=p(b,C,_[N],S);if(M===null){C===null&&(C=I);break}e&&C&&M.alternate===null&&t(b,C),x=o(M,x,N),E===null?j=M:E.sibling=M,E=M,C=I}if(N===_.length)return n(b,C),It&&Bs(b,N),j;if(C===null){for(;N<_.length;N++)C=d(b,_[N],S),C!==null&&(x=o(C,x,N),E===null?j=C:E.sibling=C,E=C);return It&&Bs(b,N),j}for(C=r(b,C);N<_.length;N++)I=v(C,b,N,_[N],S),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?N:I.key),x=o(I,x,N),E===null?j=I:E.sibling=I,E=I);return e&&C.forEach(function(D){return t(b,D)}),It&&Bs(b,N),j}function y(b,x,_,S){var j=Hf(_);if(typeof j!="function")throw Error(Oe(150));if(_=j.call(_),_==null)throw Error(Oe(151));for(var E=j=null,C=x,N=x=0,I=null,M=_.next();C!==null&&!M.done;N++,M=_.next()){C.index>N?(I=C,C=null):I=C.sibling;var D=p(b,C,M.value,S);if(D===null){C===null&&(C=I);break}e&&C&&D.alternate===null&&t(b,C),x=o(D,x,N),E===null?j=D:E.sibling=D,E=D,C=I}if(M.done)return n(b,C),It&&Bs(b,N),j;if(C===null){for(;!M.done;N++,M=_.next())M=d(b,M.value,S),M!==null&&(x=o(M,x,N),E===null?j=M:E.sibling=M,E=M);return It&&Bs(b,N),j}for(C=r(b,C);!M.done;N++,M=_.next())M=v(C,b,N,M.value,S),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?N:M.key),x=o(M,x,N),E===null?j=M:E.sibling=M,E=M);return e&&C.forEach(function(z){return t(b,z)}),It&&Bs(b,N),j}function w(b,x,_,S){if(typeof _=="object"&&_!==null&&_.type===Eu&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Im:e:{for(var j=_.key,E=x;E!==null;){if(E.key===j){if(j=_.type,j===Eu){if(E.tag===7){n(b,E.sibling),x=i(E,_.props.children),x.return=b,b=x;break e}}else if(E.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ta&&Lk(j)===E.type){n(b,E.sibling),x=i(E,_.props),x.ref=Yf(b,E,_),x.return=b,b=x;break e}n(b,E);break}else t(b,E);E=E.sibling}_.type===Eu?(x=dl(_.props.children,b.mode,S,_.key),x.return=b,b=x):(S=Xv(_.type,_.key,_.props,null,b.mode,S),S.ref=Yf(b,x,_),S.return=b,b=S)}return a(b);case Su:e:{for(E=_.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===_.containerInfo&&x.stateNode.implementation===_.implementation){n(b,x.sibling),x=i(x,_.children||[]),x.return=b,b=x;break e}else{n(b,x);break}else t(b,x);x=x.sibling}x=ux(_,b.mode,S),x.return=b,b=x}return a(b);case Ta:return E=_._init,w(b,x,E(_._payload),S)}if(vd(_))return g(b,x,_,S);if(Hf(_))return y(b,x,_,S);qm(b,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,x!==null&&x.tag===6?(n(b,x.sibling),x=i(x,_),x.return=b,b=x):(n(b,x),x=lx(_,b.mode,S),x.return=b,b=x),a(b)):n(b,x)}return w}var sc=ED(!0),jD=ED(!1),Np={},mo=ms(Np),mh=ms(Np),vh=ms(Np);function nl(e){if(e===Np)throw Error(Oe(174));return e}function Lj(e,t){switch(St(vh,t),St(mh,e),St(mo,Np),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Dw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Dw(t,e)}Rt(mo),St(mo,t)}function lc(){Rt(mo),Rt(mh),Rt(vh)}function TD(e){nl(vh.current);var t=nl(mo.current),n=Dw(t,e.type);t!==n&&(St(mh,e),St(mo,n))}function Mj(e){mh.current===e&&(Rt(mo),Rt(mh))}var zt=ms(0);function kg(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 nx=[];function Ij(){for(var e=0;en?n:4,e(!0);var r=rx.transition;rx.transition={};try{e(!1),t()}finally{gt=n,rx.transition=r}}function VD(){return vi().memoizedState}function mq(e,t,n){var r=Ya(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},HD(e))WD(t,n);else if(n=xD(e,t,n,r),n!==null){var i=lr();Ui(n,e,r,i),GD(n,t,r)}}function vq(e,t,n){var r=Ya(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(HD(e))WD(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Vi(s,a)){var l=t.interleaved;l===null?(i.next=i,Nj(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=xD(e,t,i,r),n!==null&&(i=lr(),Ui(n,e,r,i),GD(n,t,r))}}function HD(e){var t=e.alternate;return e===Ht||t!==null&&t===Ht}function WD(e,t){Rd=Ng=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function GD(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yj(e,n)}}var Rg={readContext:mi,useCallback:Hn,useContext:Hn,useEffect:Hn,useImperativeHandle:Hn,useInsertionEffect:Hn,useLayoutEffect:Hn,useMemo:Hn,useReducer:Hn,useRef:Hn,useState:Hn,useDebugValue:Hn,useDeferredValue:Hn,useTransition:Hn,useMutableSource:Hn,useSyncExternalStore:Hn,useId:Hn,unstable_isNewReconciler:!1},gq={readContext:mi,useCallback:function(e,t){return oo().memoizedState=[e,t===void 0?null:t],e},useContext:mi,useEffect:Ik,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qv(4194308,4,$D.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qv(4194308,4,e,t)},useInsertionEffect:function(e,t){return qv(4,2,e,t)},useMemo:function(e,t){var n=oo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=oo();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=mq.bind(null,Ht,e),[r.memoizedState,e]},useRef:function(e){var t=oo();return e={current:e},t.memoizedState=e},useState:Mk,useDebugValue:Bj,useDeferredValue:function(e){return oo().memoizedState=e},useTransition:function(){var e=Mk(!1),t=e[0];return e=pq.bind(null,e[1]),oo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ht,i=oo();if(It){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),Pn===null)throw Error(Oe(349));Ol&30||AD(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ik(ND.bind(null,r,o,e),[e]),r.flags|=2048,bh(9,kD.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=oo(),t=Pn.identifierPrefix;if(It){var n=Uo,r=Fo;n=(r&~(1<<32-Fi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=gh++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[lo]=t,e[ph]=r,t8(e,t,!1,!1),t.stateNode=e;e:{switch(a=Fw(n,r),n){case"dialog":Tt("cancel",e),Tt("close",e),i=r;break;case"iframe":case"object":case"embed":Tt("load",e),i=r;break;case"video":case"audio":for(i=0;icc&&(t.flags|=128,r=!0,Zf(o,!1),t.lanes=4194304)}else{if(!r)if(e=kg(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zf(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!It)return Wn(t),null}else 2*nn()-o.renderingStartTime>cc&&n!==1073741824&&(t.flags|=128,r=!0,Zf(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=nn(),t.sibling=null,n=zt.current,St(zt,r?n&1|2:n&1),t):(Wn(t),null);case 22:case 23:return qj(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Rr&1073741824&&(Wn(t),t.subtreeFlags&6&&(t.flags|=8192)):Wn(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function Eq(e,t){switch(Tj(t),t.tag){case 1:return xr(t.type)&&Sg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return lc(),Rt(_r),Rt(Zn),Ij(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Mj(t),null;case 13:if(Rt(zt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));ac()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Rt(zt),null;case 4:return lc(),null;case 10:return kj(t.type._context),null;case 22:case 23:return qj(),null;case 24:return null;default:return null}}var Ym=!1,qn=!1,jq=typeof WeakSet=="function"?WeakSet:Set,Me=null;function Lu(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Kt(e,t,r)}else n.current=null}function d2(e,t,n){try{n()}catch(r){Kt(e,t,r)}}var Wk=!1;function Tq(e,t){if(Yw=_g,e=sD(),Ej(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,f=0,d=e,p=null;t:for(;;){for(var v;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(v=d.firstChild)!==null;)p=d,d=v;for(;;){if(d===e)break t;if(p===n&&++u===i&&(s=a),p===o&&++f===r&&(l=a),(v=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zw={focusedElem:e,selectionRange:n},_g=!1,Me=t;Me!==null;)if(t=Me,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Me=e;else for(;Me!==null;){t=Me;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,w=g.memoizedState,b=t.stateNode,x=b.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ai(t.type,y),w);b.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(S){Kt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Me=e;break}Me=t.return}return g=Wk,Wk=!1,g}function Ld(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&d2(t,n,o)}i=i.next}while(i!==r)}}function G0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function h2(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 i8(e){var t=e.alternate;t!==null&&(e.alternate=null,i8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lo],delete t[ph],delete t[Jw],delete t[uq],delete t[cq])),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 o8(e){return e.tag===5||e.tag===3||e.tag===4}function Gk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||o8(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 p2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Og));else if(r!==4&&(e=e.child,e!==null))for(p2(e,t,n),e=e.sibling;e!==null;)p2(e,t,n),e=e.sibling}function m2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(m2(e,t,n),e=e.sibling;e!==null;)m2(e,t,n),e=e.sibling}var Bn=null,ki=!1;function ya(e,t,n){for(n=n.child;n!==null;)a8(e,t,n),n=n.sibling}function a8(e,t,n){if(po&&typeof po.onCommitFiberUnmount=="function")try{po.onCommitFiberUnmount($0,n)}catch{}switch(n.tag){case 5:qn||Lu(n,t);case 6:var r=Bn,i=ki;Bn=null,ya(e,t,n),Bn=r,ki=i,Bn!==null&&(ki?(e=Bn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Bn.removeChild(n.stateNode));break;case 18:Bn!==null&&(ki?(e=Bn,n=n.stateNode,e.nodeType===8?ex(e.parentNode,n):e.nodeType===1&&ex(e,n),uh(e)):ex(Bn,n.stateNode));break;case 4:r=Bn,i=ki,Bn=n.stateNode.containerInfo,ki=!0,ya(e,t,n),Bn=r,ki=i;break;case 0:case 11:case 14:case 15:if(!qn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&d2(n,t,a),i=i.next}while(i!==r)}ya(e,t,n);break;case 1:if(!qn&&(Lu(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Kt(n,t,s)}ya(e,t,n);break;case 21:ya(e,t,n);break;case 22:n.mode&1?(qn=(r=qn)||n.memoizedState!==null,ya(e,t,n),qn=r):ya(e,t,n);break;default:ya(e,t,n)}}function qk(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jq),t.forEach(function(r){var i=Iq.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ci(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Pq(r/1960))-r,10e?16:e,Ma===null)var r=!1;else{if(e=Ma,Ma=null,Ig=0,ft&6)throw Error(Oe(331));var i=ft;for(ft|=4,Me=e.current;Me!==null;){var o=Me,a=o.child;if(Me.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lnn()-Wj?fl(e,0):Hj|=n),wr(e,t)}function p8(e,t){t===0&&(e.mode&1?(t=Um,Um<<=1,!(Um&130023424)&&(Um=4194304)):t=1);var n=lr();e=Zo(e,t),e!==null&&(Pp(e,t,n),wr(e,n))}function Mq(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),p8(e,n)}function Iq(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),p8(e,n)}var m8;m8=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_r.current)gr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gr=!1,Oq(e,t,n);gr=!!(e.flags&131072)}else gr=!1,It&&t.flags&1048576&&yD(t,Tg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Kv(e,t),e=t.pendingProps;var i=oc(t,Zn.current);Zu(t,n),i=$j(null,t,r,e,i,n);var o=Fj();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xr(r)?(o=!0,Eg(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Rj(t),i.updater=H0,t.stateNode=i,i._reactInternals=t,o2(t,r,e,n),t=l2(null,t,r,!0,o,n)):(t.tag=0,It&&o&&jj(t),rr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Kv(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=$q(r),e=Ai(r,e),i){case 0:t=s2(null,t,r,e,n);break e;case 1:t=zk(null,t,r,e,n);break e;case 11:t=Uk(null,t,r,e,n);break e;case 14:t=Bk(null,t,r,Ai(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ai(r,i),s2(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ai(r,i),zk(e,t,r,i,n);case 3:e:{if(QD(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,wD(e,t),Ag(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=uc(Error(Oe(423)),t),t=Vk(e,t,r,n,i);break e}else if(r!==i){i=uc(Error(Oe(424)),t),t=Vk(e,t,r,n,i);break e}else for(Ir=Ga(t.stateNode.containerInfo.firstChild),$r=t,It=!0,Li=null,n=jD(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ac(),r===i){t=Xo(e,t,n);break e}rr(e,t,r,n)}t=t.child}return t;case 5:return TD(t),e===null&&n2(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Xw(r,i)?a=null:o!==null&&Xw(r,o)&&(t.flags|=32),XD(e,t),rr(e,t,a,n),t.child;case 6:return e===null&&n2(t),null;case 13:return JD(e,t,n);case 4:return Lj(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=sc(t,null,r,n):rr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ai(r,i),Uk(e,t,r,i,n);case 7:return rr(e,t,t.pendingProps,n),t.child;case 8:return rr(e,t,t.pendingProps.children,n),t.child;case 12:return rr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,St(Cg,r._currentValue),r._currentValue=a,o!==null)if(Vi(o.value,a)){if(o.children===i.children&&!_r.current){t=Xo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Ho(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),r2(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),r2(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}rr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Zu(t,n),i=mi(i),r=r(i),t.flags|=1,rr(e,t,r,n),t.child;case 14:return r=t.type,i=Ai(r,t.pendingProps),i=Ai(r.type,i),Bk(e,t,r,i,n);case 15:return YD(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ai(r,i),Kv(e,t),t.tag=1,xr(r)?(e=!0,Eg(t)):e=!1,Zu(t,n),SD(t,r,i),o2(t,r,i,n),l2(null,t,r,!0,e,n);case 19:return e8(e,t,n);case 22:return ZD(e,t,n)}throw Error(Oe(156,t.tag))};function v8(e,t){return z5(e,t)}function Dq(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(e,t,n,r){return new Dq(e,t,n,r)}function Yj(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $q(e){if(typeof e=="function")return Yj(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pj)return 11;if(e===mj)return 14}return 2}function Za(e,t){var n=e.alternate;return n===null?(n=li(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 Xv(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")Yj(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Eu:return dl(n.children,i,o,t);case hj:a=8,i|=8;break;case Pw:return e=li(12,n,t,i|2),e.elementType=Pw,e.lanes=o,e;case Aw:return e=li(13,n,t,i),e.elementType=Aw,e.lanes=o,e;case kw:return e=li(19,n,t,i),e.elementType=kw,e.lanes=o,e;case E5:return K0(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O5:a=10;break e;case S5:a=9;break e;case pj:a=11;break e;case mj:a=14;break e;case Ta:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=li(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function dl(e,t,n,r){return e=li(7,e,r,t),e.lanes=n,e}function K0(e,t,n,r){return e=li(22,e,r,t),e.elementType=E5,e.lanes=n,e.stateNode={isHidden:!1},e}function lx(e,t,n){return e=li(6,e,null,t),e.lanes=n,e}function ux(e,t,n){return t=li(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fq(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=V_(0),this.expirationTimes=V_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=V_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Zj(e,t,n,r,i,o,a,s,l){return e=new Fq(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=li(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rj(o),e}function Uq(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_8)}catch(e){console.error(e)}}_8(),y5.exports=Hr;var J0=y5.exports;const rl=$l(J0);var x8,t3=J0;x8=t3.createRoot,t3.hydrateRoot;var Wq={};/** * @license React * use-sync-external-store-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 Rp=R;function Gq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qq=typeof Object.is=="function"?Object.is:Gq,Kq=Rp.useSyncExternalStore,Yq=Rp.useRef,Zq=Rp.useEffect,Xq=Rp.useMemo,Qq=Rp.useDebugValue;Wq.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Yq(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Xq(function(){function l(v){if(!u){if(u=!0,f=v,v=r(v),i!==void 0&&a.hasValue){var g=a.value;if(i(g,v))return d=g}return d=v}if(g=d,qq(f,v))return g;var y=r(v);return i!==void 0&&i(g,y)?g:(f=v,d=y)}var u=!1,f,d,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var s=Kq(e,o[0],o[1]);return Zq(function(){a.hasValue=!0,a.value=s},[s]),Qq(s),s};var pt="default"in Tw?V:Tw,n3=Symbol.for("react-redux-context"),r3=typeof globalThis<"u"?globalThis:{};function Jq(){if(!pt.createContext)return{};const e=r3[n3]??(r3[n3]=new Map);let t=e.get(pt.createContext);return t||(t=pt.createContext(null),e.set(pt.createContext,t)),t}var w8=Jq(),eK=()=>{throw new Error("uSES not initialized!")},tK=Symbol.for("react.element"),nK=Symbol.for("react.portal"),rK=Symbol.for("react.fragment"),iK=Symbol.for("react.strict_mode"),oK=Symbol.for("react.profiler"),aK=Symbol.for("react.provider"),sK=Symbol.for("react.context"),lK=Symbol.for("react.server_context"),O8=Symbol.for("react.forward_ref"),uK=Symbol.for("react.suspense"),cK=Symbol.for("react.suspense_list"),eT=Symbol.for("react.memo"),fK=Symbol.for("react.lazy"),dK=O8,hK=eT;function pK(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case tK:{const n=e.type;switch(n){case rK:case oK:case iK:case uK:case cK:return n;default:{const r=n&&n.$$typeof;switch(r){case lK:case sK:case O8:case fK:case eT:case aK:return r;default:return t}}}}case nK:return t}}}function mK(e){return pK(e)===eT}function vK(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:a}){let s=!1,l,u,f,d,p;function v(x,_){return l=x,u=_,f=e(l,u),d=t(r,u),p=n(f,d,u),s=!0,p}function g(){return f=e(l,u),t.dependsOnOwnProps&&(d=t(r,u)),p=n(f,d,u),p}function y(){return e.dependsOnOwnProps&&(f=e(l,u)),t.dependsOnOwnProps&&(d=t(r,u)),p=n(f,d,u),p}function w(){const x=e(l,u),_=!a(x,f);return f=x,_&&(p=n(f,d,u)),p}function b(x,_){const S=!o(_,u),j=!i(x,l,_,u);return l=x,u=_,S&&j?g():S?y():j?w():p}return function(_,S){return s?b(_,S):v(_,S)}}function gK(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...i}){const o=t(e,i),a=n(e,i),s=r(e,i);return vK(o,a,s,e,i)}function yK(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...o)=>t(i(...o)))}return n}function _2(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function i3(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function S8(e,t){return function(r,{displayName:i}){const o=function(s,l){return o.dependsOnOwnProps?o.mapToProps(s,l):o.mapToProps(s,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,l){o.mapToProps=e,o.dependsOnOwnProps=i3(e);let u=o(s,l);return typeof u=="function"&&(o.mapToProps=u,o.dependsOnOwnProps=i3(u),u=o(s,l)),u},o}}function tT(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function bK(e){return e&&typeof e=="object"?_2(t=>yK(e,t)):e?typeof e=="function"?S8(e):tT(e,"mapDispatchToProps"):_2(t=>({dispatch:t}))}function _K(e){return e?typeof e=="function"?S8(e):tT(e,"mapStateToProps"):_2(()=>({}))}function xK(e,t,n){return{...n,...e,...t}}function wK(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,a;return function(l,u,f){const d=e(l,u,f);return o?i(d,a)||(a=d):(o=!0,a=d),a}}}function OK(e){return e?typeof e=="function"?wK(e):tT(e,"mergeProps"):()=>xK}function SK(e){e()}function EK(){let e=null,t=null;return{clear(){e=null,t=null},notify(){SK(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var o3={notify(){},get:()=>[]};function E8(e,t){let n,r=o3,i=0,o=!1;function a(y){f();const w=r.subscribe(y);let b=!1;return()=>{b||(b=!0,w(),d())}}function s(){r.notify()}function l(){g.onStateChange&&g.onStateChange()}function u(){return o}function f(){i++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=EK())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=o3)}function p(){o||(o=!0,f())}function v(){o&&(o=!1,d())}const g={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:u,trySubscribe:p,tryUnsubscribe:v,getListeners:()=>r};return g}var jK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fg=jK?pt.useLayoutEffect:pt.useEffect;function a3(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function cx(e,t){if(a3(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{T8=e},IK=[null,null];function DK(e,t,n){Fg(()=>e(...t),n)}function $K(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function FK(e,t,n,r,i,o,a,s,l,u,f){if(!e)return()=>{};let d=!1,p=null;const v=()=>{if(d||!s.current)return;const y=t.getState();let w,b;try{w=r(y,i.current)}catch(x){b=x,p=x}b||(p=null),w===o.current?a.current||u():(o.current=w,l.current=w,a.current=!0,f())};return n.onStateChange=v,n.trySubscribe(),v(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function UK(e,t){return e===t}function BK(e,t,n,{pure:r,areStatesEqual:i=UK,areOwnPropsEqual:o=cx,areStatePropsEqual:a=cx,areMergedPropsEqual:s=cx,forwardRef:l=!1,context:u=w8}={}){const f=u,d=_K(e),p=bK(t),v=OK(n),g=!!e;return w=>{const b=w.displayName||w.name||"Component",x=`Connect(${b})`,_={shouldHandleStateChanges:g,displayName:x,wrappedComponentName:b,WrappedComponent:w,initMapStateToProps:d,initMapDispatchToProps:p,initMergeProps:v,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:s};function S(C){const[N,I,M]=pt.useMemo(()=>{const{reactReduxForwardedRef:K,...ie}=C;return[C.context,K,ie]},[C]),D=pt.useMemo(()=>{let K=f;return N!=null&&N.Consumer,K},[N,f]),z=pt.useContext(D),q=!!C.store&&!!C.store.getState&&!!C.store.dispatch,W=!!z&&!!z.store,X=q?C.store:z.store,J=W?z.getServerState:X.getState,te=pt.useMemo(()=>gK(X.dispatch,_),[X]),[Z,B]=pt.useMemo(()=>{if(!g)return IK;const K=E8(X,q?void 0:z.subscription),ie=K.notifyNestedSubs.bind(K);return[K,ie]},[X,q,z]),F=pt.useMemo(()=>q?z:{...z,subscription:Z},[q,z,Z]),H=pt.useRef(),ne=pt.useRef(M),Y=pt.useRef(),ee=pt.useRef(!1);pt.useRef(!1);const ae=pt.useRef(!1),oe=pt.useRef();Fg(()=>(ae.current=!0,()=>{ae.current=!1}),[]);const fe=pt.useMemo(()=>()=>Y.current&&M===ne.current?Y.current:te(X.getState(),M),[X,M]),P=pt.useMemo(()=>ie=>Z?FK(g,X,Z,te,ne,H,ee,ae,Y,B,ie):()=>{},[Z]);DK($K,[ne,H,ee,M,Y,B]);let A;try{A=T8(P,fe,J?()=>te(J(),M):fe)}catch(K){throw oe.current&&(K.message+=` The error may be correlated with this previous error: ${oe.current.stack} `),K}Fg(()=>{oe.current=void 0,Y.current=void 0,H.current=A});const U=pt.useMemo(()=>pt.createElement(w,{...A,ref:I}),[I,w,A]);return pt.useMemo(()=>g?pt.createElement(D.Provider,{value:F},U):U,[D,U,F])}const E=pt.memo(S);if(E.WrappedComponent=w,E.displayName=S.displayName=x,l){const N=pt.forwardRef(function(M,D){return pt.createElement(E,{...M,reactReduxForwardedRef:D})});return N.displayName=x,N.WrappedComponent=w,x2(N,w)}return x2(E,w)}}var C8=BK;function zK({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",identityFunctionCheck:o="once"}){const a=pt.useMemo(()=>{const u=E8(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:i,identityFunctionCheck:o}},[e,r,i,o]),s=pt.useMemo(()=>e.getState(),[e]);Fg(()=>{const{subscription:u}=a;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),s!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[a,s]);const l=t||w8;return pt.createElement(l.Provider,{value:a},n)}var P8=zK;MK(R.useSyncExternalStore);/** * @remix-run/router v1.15.3 * * 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 xh(){return xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function A8(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function HK(){return Math.random().toString(36).substr(2,8)}function f3(e,t){return{usr:e.state,key:e.key,idx:t}}function w2(e,t,n,r){return n===void 0&&(n=null),xh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Qc(t):t,{state:n,key:t&&t.key||r||HK()})}function Ug(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Qc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function WK(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Ia.Pop,l=null,u=f();u==null&&(u=0,a.replaceState(xh({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function d(){s=Ia.Pop;let w=f(),b=w==null?null:w-u;u=w,l&&l({action:s,location:y.location,delta:b})}function p(w,b){s=Ia.Push;let x=w2(y.location,w,b);n&&n(x,w),u=f()+1;let _=f3(x,u),S=y.createHref(x);try{a.pushState(_,"",S)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(S)}o&&l&&l({action:s,location:y.location,delta:1})}function v(w,b){s=Ia.Replace;let x=w2(y.location,w,b);n&&n(x,w),u=f();let _=f3(x,u),S=y.createHref(x);a.replaceState(_,"",S),o&&l&&l({action:s,location:y.location,delta:0})}function g(w){let b=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof w=="string"?w:Ug(w);return x=x.replace(/ $/,"%20"),Wt(b,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,b)}let y={get action(){return s},get location(){return e(i,a)},listen(w){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(c3,d),l=w,()=>{i.removeEventListener(c3,d),l=null}},createHref(w){return t(i,w)},createURL:g,encodeLocation(w){let b=g(w);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:v,go(w){return a.go(w)}};return y}var d3;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(d3||(d3={}));function GK(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Qc(t):t,i=fc(r.pathname||"/",n);if(i==null)return null;let o=k8(e);qK(o);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(Wt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Xa([r,l.relativePath]),f=n.concat(l);o.children&&o.children.length>0&&(Wt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),k8(o.children,t,f,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:eY(u,o.index),routesMeta:f})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of N8(o.path))i(o,a,l)}),t}function N8(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=N8(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function qK(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:tY(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const KK=/^:[\w-]+$/,YK=3,ZK=2,XK=1,QK=10,JK=-2,h3=e=>e==="*";function eY(e,t){let n=e.split("/"),r=n.length;return n.some(h3)&&(r+=JK),t&&(r+=ZK),n.filter(i=>!h3(i)).reduce((i,o)=>i+(KK.test(o)?YK:o===""?XK:QK),r)}function tY(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function nY(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;a{let{paramName:p,isOptional:v}=f;if(p==="*"){let y=s[d]||"";a=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const g=s[d];return v&&!g?u[p]=void 0:u[p]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function rY(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),A8(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function iY(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return A8(!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 fc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function oY(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Qc(e):e;return{pathname:n?n.startsWith("/")?n:aY(n,t):t,search:uY(r),hash:cY(i)}}function aY(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function fx(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function sY(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nT(e,t){let n=sY(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function rT(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Qc(e):(i=xh({},e),Wt(!i.pathname||!i.pathname.includes("?"),fx("?","pathname","search",i)),Wt(!i.pathname||!i.pathname.includes("#"),fx("#","pathname","hash",i)),Wt(!i.search||!i.search.includes("#"),fx("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}s=d>=0?t[d]:"/"}let l=oY(i,s),u=a&&a!=="/"&&a.endsWith("/"),f=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Xa=e=>e.join("/").replace(/\/\/+/g,"/"),lY=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),uY=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cY=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function fY(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const R8=["post","put","patch","delete"];new Set(R8);const dY=["get",...R8];new Set(dY);/** * React Router v6.22.3 * * 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 wh(){return wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),R.useCallback(function(u,f){if(f===void 0&&(f={}),!s.current)return;if(typeof u=="number"){r.go(u);return}let d=rT(u,JSON.parse(a),o,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Xa([t,d.pathname])),(f.replace?r.replace:r.push)(d,f.state,f)},[t,r,a,o,e])}function Jc(){let{matches:e}=R.useContext(ua),t=e[e.length-1];return t?t.params:{}}function nb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=R.useContext(la),{matches:i}=R.useContext(ua),{pathname:o}=pr(),a=JSON.stringify(nT(i,r.v7_relativeSplatPath));return R.useMemo(()=>rT(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function mY(e,t){return vY(e,t)}function vY(e,t,n,r){Bl()||Wt(!1);let{navigator:i}=R.useContext(la),{matches:o}=R.useContext(ua),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=pr(),f;if(t){var d;let w=typeof t=="string"?Qc(t):t;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||Wt(!1),f=w}else f=u;let p=f.pathname||"/",v=p;if(l!=="/"){let w=l.replace(/^\//,"").split("/");v="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let g=GK(e,{pathname:v}),y=xY(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:Xa([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Xa([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n,r);return t&&y?R.createElement(tb.Provider,{value:{location:wh({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Ia.Pop}},y):y}function gY(){let e=EY(),t=fY(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:i},n):null,null)}const yY=R.createElement(gY,null);class bY extends R.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?R.createElement(ua.Provider,{value:this.props.routeContext},R.createElement(M8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _Y(e){let{routeContext:t,match:n,children:r}=e,i=R.useContext(eb);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),R.createElement(ua.Provider,{value:t},r)}function xY(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let a=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let f=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id]));f>=0||Wt(!1),a=a.slice(0,Math.min(a.length,f+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((f,d,p)=>{let v,g=!1,y=null,w=null;n&&(v=s&&d.route.id?s[d.route.id]:void 0,y=d.route.errorElement||yY,l&&(u<0&&p===0?(TY("route-fallback",!1),g=!0,w=null):u===p&&(g=!0,w=d.route.hydrateFallbackElement||null)));let b=t.concat(a.slice(0,p+1)),x=()=>{let _;return v?_=y:g?_=w:d.route.Component?_=R.createElement(d.route.Component,null):d.route.element?_=d.route.element:_=f,R.createElement(_Y,{match:d,routeContext:{outlet:f,matches:b,isDataRoute:n!=null},children:_})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?R.createElement(bY,{location:n.location,revalidation:n.revalidation,component:y,error:v,children:x(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):x()},null)}var D8=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(D8||{}),Bg=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}(Bg||{});function wY(e){let t=R.useContext(eb);return t||Wt(!1),t}function OY(e){let t=R.useContext(L8);return t||Wt(!1),t}function SY(e){let t=R.useContext(ua);return t||Wt(!1),t}function $8(e){let t=SY(),n=t.matches[t.matches.length-1];return n.route.id||Wt(!1),n.route.id}function EY(){var e;let t=R.useContext(M8),n=OY(Bg.UseRouteError),r=$8(Bg.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function jY(){let{router:e}=wY(D8.UseNavigateStable),t=$8(Bg.UseNavigateStable),n=R.useRef(!1);return I8(()=>{n.current=!0}),R.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,wh({fromRouteId:t},o)))},[e,t])}const p3={};function TY(e,t,n){!t&&!p3[e]&&(p3[e]=!0)}function iT(e){let{to:t,replace:n,state:r,relative:i}=e;Bl()||Wt(!1);let{future:o,static:a}=R.useContext(la),{matches:s}=R.useContext(ua),{pathname:l}=pr(),u=jo(),f=rT(t,nT(s,o.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(f);return R.useEffect(()=>u(JSON.parse(d),{replace:n,state:r,relative:i}),[u,d,i,n,r]),null}function lt(e){Wt(!1)}function CY(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Ia.Pop,navigator:o,static:a=!1,future:s}=e;Bl()&&Wt(!1);let l=t.replace(/^\/*/,"/"),u=R.useMemo(()=>({basename:l,navigator:o,static:a,future:wh({v7_relativeSplatPath:!1},s)}),[l,s,o,a]);typeof r=="string"&&(r=Qc(r));let{pathname:f="/",search:d="",hash:p="",state:v=null,key:g="default"}=r,y=R.useMemo(()=>{let w=fc(f,l);return w==null?null:{location:{pathname:w,search:d,hash:p,state:v,key:g},navigationType:i}},[l,f,d,p,v,g,i]);return y==null?null:R.createElement(la.Provider,{value:u},R.createElement(tb.Provider,{children:n,value:y}))}function rb(e){let{children:t,location:n}=e;return mY(S2(t),n)}new Promise(()=>{});function S2(e,t){t===void 0&&(t=[]);let n=[];return R.Children.forEach(e,(r,i)=>{if(!R.isValidElement(r))return;let o=[...t,i];if(r.type===R.Fragment){n.push.apply(n,S2(r.props.children,o));return}r.type!==lt&&Wt(!1),!r.props.index||!r.props.children||Wt(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=S2(r.props.children,o)),n.push(a)}),n}/** * React Router DOM v6.22.3 * * 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 zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function PY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function AY(e,t){return e.button===0&&(!t||t==="_self")&&!PY(e)}const kY=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],NY=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],RY="6";try{window.__reactRouterVersion=RY}catch{}const LY=R.createContext({isTransitioning:!1}),MY="startTransition",m3=Tw[MY];function U8(e){let{basename:t,children:n,future:r,window:i}=e,o=R.useRef();o.current==null&&(o.current=VK({window:i,v5Compat:!0}));let a=o.current,[s,l]=R.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},f=R.useCallback(d=>{u&&m3?m3(()=>l(d)):l(d)},[l,u]);return R.useLayoutEffect(()=>a.listen(f),[a,f]),R.createElement(CY,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const IY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",DY=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jt=R.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:u,preventScrollReset:f,unstable_viewTransition:d}=t,p=F8(t,kY),{basename:v}=R.useContext(la),g,y=!1;if(typeof u=="string"&&DY.test(u)&&(g=u,IY))try{let _=new URL(window.location.href),S=u.startsWith("//")?new URL(_.protocol+u):new URL(u),j=fc(S.pathname,v);S.origin===_.origin&&j!=null?u=j+S.search+S.hash:y=!0}catch{}let w=hY(u,{relative:i}),b=FY(u,{replace:a,state:s,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:d});function x(_){r&&r(_),_.defaultPrevented||b(_)}return R.createElement("a",zg({},p,{href:g||w,onClick:y||o?r:x,ref:n,target:l}))}),B8=R.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,unstable_viewTransition:u,children:f}=t,d=F8(t,NY),p=nb(l,{relative:d.relative}),v=pr(),g=R.useContext(L8),{navigator:y,basename:w}=R.useContext(la),b=g!=null&&UY(p)&&u===!0,x=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,_=v.pathname,S=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(_=_.toLowerCase(),S=S?S.toLowerCase():null,x=x.toLowerCase()),S&&w&&(S=fc(S,w)||S);const j=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let E=_===x||!a&&_.startsWith(x)&&_.charAt(j)==="/",C=S!=null&&(S===x||!a&&S.startsWith(x)&&S.charAt(x.length)==="/"),N={isActive:E,isPending:C,isTransitioning:b},I=E?r:void 0,M;typeof o=="function"?M=o(N):M=[o,E?"active":null,C?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let D=typeof s=="function"?s(N):s;return R.createElement(jt,zg({},d,{"aria-current":I,className:M,ref:n,style:D,to:l,unstable_viewTransition:u}),typeof f=="function"?f(N):f)});var E2;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(E2||(E2={}));var v3;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(v3||(v3={}));function $Y(e){let t=R.useContext(eb);return t||Wt(!1),t}function FY(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s}=t===void 0?{}:t,l=jo(),u=pr(),f=nb(e,{relative:a});return R.useCallback(d=>{if(AY(d,n)){d.preventDefault();let p=r!==void 0?r:Ug(u)===Ug(f);l(e,{replace:p,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s})}},[u,l,f,r,i,n,e,o,a,s])}function UY(e,t){t===void 0&&(t={});let n=R.useContext(LY);n==null&&Wt(!1);let{basename:r}=$Y(E2.useViewTransitionState),i=nb(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=fc(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=fc(n.nextLocation.pathname,r)||n.nextLocation.pathname;return O2(i.pathname,a)!=null||O2(i.pathname,o)!=null}const BY="shlink-web-client",zY="A React-based progressive web application for shlink",VY="/shlink-web-client/dependabot/npm_and_yarn/testing-fcae7fc486",HY="https://github.com/shlinkio/shlink-web-client",WY="MIT",GY="module",qY={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},KY={"@fortawesome/fontawesome-free":"^6.5.2","@fortawesome/fontawesome-svg-core":"^6.5.2","@fortawesome/free-brands-svg-icons":"^6.5.2","@fortawesome/free-regular-svg-icons":"^6.5.2","@fortawesome/free-solid-svg-icons":"^6.5.2","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^7.0.6","@reduxjs/toolkit":"^2.2.3","@shlinkio/data-manipulation":"^1.0.3","@shlinkio/shlink-frontend-kit":"^0.5.0","@shlinkio/shlink-js-sdk":"^1.0.0","@shlinkio/shlink-web-component":"^0.6.1",bootstrap:"5.2.3",bottlejs:"^2.0.1",clsx:"^2.1.0","compare-versions":"^6.1.0",csvtojson:"^2.0.10","date-fns":"^3.6.0",react:"^18.2.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-redux":"^9.1.0","react-router-dom":"^6.22.3",reactstrap:"^9.2.2","redux-localstorage-simple":"^2.5.1",uuid:"^9.0.1","workbox-core":"^7.0.0","workbox-expiration":"^7.0.0","workbox-precaching":"^7.0.0","workbox-routing":"^7.0.0","workbox-strategies":"^7.0.0"},YY={"@shlinkio/eslint-config-js-coding-standard":"~2.4.1","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@testing-library/jest-dom":"^6.4.2","@testing-library/react":"^15.0.1","@testing-library/user-event":"^14.5.2","@total-typescript/shoehorn":"^0.1.2","@types/react":"^18.2.74","@types/react-dom":"^18.2.24","@types/uuid":"^9.0.8","@typescript-eslint/eslint-plugin":"^7.5.0","@typescript-eslint/parser":"^7.5.0","@vitejs/plugin-react":"^4.2.1","@vitest/coverage-v8":"^1.4.0","adm-zip":"^0.5.12","axe-core":"^4.9.0",chalk:"^5.3.0",eslint:"^8.57.0",history:"^5.3.0",jsdom:"^24.0.0",sass:"^1.74.1",stylelint:"^15.11.0",typescript:"^5.4.4",vite:"^5.2.8","vite-plugin-pwa":"^0.19.8",vitest:"^1.2.2"},ZY=[">0.2%","not dead","not ie <= 11","not op_mini all"],Vg={name:BY,description:zY,private:!1,homepage:VY,repository:HY,license:WY,type:GY,scripts:qY,dependencies:KY,devDependencies:YY,browserslist:ZY};var Hi,_o=".",z8="function",V8="string",H8="__global__",oT="Provider",XY=0,aT=Array.prototype.slice,QY=function(t,n){var r=t[n];if(r===void 0&&Hi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},ib=function(t){var n;return this.nested[t]||(n=Hi.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},W8=function(t){return t.split(_o).reduce(QY,this)},JY=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var s=0,l=function(f){if(f)throw f;t[s]&&t[s++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},eZ=function(t,n){var r,i;return typeof t===z8&&(n=t,t=H8),r=t.split(_o),i=r.shift(),r.length?ib.call(this,i).middleware(r.join(_o),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},tZ=function(t,n){return n(t)},g3=function(t,n){return(t[n]||[]).concat(t.__global__||[])},nZ=function(t,n){var r,i,o,a,s;return this.id,o=this.container,a=this.decorators,s=this.middlewares,r=t+oT,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var u=new n;return delete o[r],o[r]=u,u}},i[t]={configurable:!0,enumerable:!0,get:function(){var u=o[r],f;return u&&(f=g3(a,t).reduce(tZ,u.$get(o)),delete o[r],delete o[t]),f===void 0?f:JY(g3(s,t),t,f,o)}},Object.defineProperties(o,i),this},G8=function(t,n){var r,i;return r=t.split(_o),this.providerMap[t]&&r.length===1&&!this.container[t+oT]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(ib.call(this,i).provider(r.join(_o),n),this):nZ.call(this,i,n))},sT=function(t,n){return G8.call(this,t,function(){this.$get=n})},q8=function(t,n,r){var i=arguments.length>3?aT.call(arguments,3):[],o=this;return sT.call(this,t,function(){var s=n,l=i.map(W8,o.container);return r?new(n.bind.apply(n,[null].concat(l))):s.apply(null,l)})},rZ=function(t,n){return q8.apply(this,[t,n,!0].concat(aT.call(arguments,2)))},iZ=function(t,n){return q8.apply(this,[t,n,!1].concat(aT.call(arguments,2)))},K8=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},Y8=function(t,n){var r=t[n];return r||(r={},K8.call(t,n,r)),r},oZ=function(t,n){var r;return r=t.split(_o),t=r.pop(),K8.call(r.reduce(Y8,this.container),t,n),this},aZ=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},sZ=function(t,n){var r=t.split(_o);return t=r.pop(),aZ.call(r.reduce(Y8,this.container),t,n),this},Z8=function(t,n){var r,i;return typeof t===z8&&(n=t,t=H8),r=t.split(_o),i=r.shift(),r.length?ib.call(this,i).decorator(r.join(_o),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},lZ=function(t){return this.deferred.push(t),this},uZ=function(t){return(t||[]).map(W8,this.container)},cZ=function(t,n){return sT.call(this,t,function(i){return{instance:n.bind(n,i)}})},fZ=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},lT=function(t){return Object.keys(t||this.container||{}).filter(fZ)},Hg={},dZ=function(t){var n;return typeof t===V8?(n=Hg[t],n||(Hg[t]=n=new Hi,n.constant("BOTTLE_NAME",t)),n):new Hi},hZ=function(t){typeof t===V8?delete Hg[t]:Hg={}},X8=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},y3=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+oT]},pZ=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var a=o.split(_o);a.length>1&&a.forEach(y3,ib.call(this,a[0])),y3.call(this,o),this.provider(o,n[o])}},this)},mZ=function(t){return this.deferred.forEach(function(r){r(t)}),this};Hi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=XY++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:Z8.bind(this),$register:X8.bind(this),$list:lT.bind(this)}};Hi.prototype={constant:sZ,decorator:Z8,defer:lZ,digest:uZ,factory:sT,instanceFactory:cZ,list:lT,middleware:eZ,provider:G8,resetProviders:pZ,register:X8,resolve:mZ,service:rZ,serviceFactory:iZ,value:oZ};Hi.pop=dZ;Hi.clear=hZ;Hi.list=lT;Hi.config={strict:!1};const vZ=Hi;var gZ=Object.defineProperty,yZ=(e,t,n)=>t in e?gZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bZ=(e,t,n)=>(yZ(e,typeof t!="symbol"?t+"":t,n),n);const _Z=(e,t)=>`${e}/rest/v${t}`,xZ=e=>e.dir?`${e.field}-${e.dir}`:void 0,wZ=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:xZ(e)}),OZ=(e,t)=>{const[n,r]=e.split("://");if(!r)throw new Error(`It is not possible to determine authority on "${e}" for replacement`);const[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},SZ=(e={})=>{const t=Object.entries(e).flatMap(([n,r])=>r==null?[]:Array.isArray(r)?r.map(i=>[`${n}[]`,i]):[[n,r]]);return new URLSearchParams(t).toString()};class EZ{constructor(t,n){bZ(this,"apiVersion"),this.httpClient=t,this.serverInfo=n,this.apiVersion=3}async listShortUrls(t={}){return this.performRequest({url:"/short-urls",query:wZ(t)}).then(({shortUrls:n})=>n)}async createShortUrl(t){const n=Object.entries(t).reduce((r,[i,o])=>(o&&(r[i]=o),r),{});return this.performRequest({url:"/short-urls",method:"POST",body:n})}async getShortUrl(t,n){return this.performRequest({url:`/short-urls/${t}`,query:{domain:n}})}async deleteShortUrl(t,n){return this.performEmptyRequest({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n}})}async updateShortUrl(t,n,r){return this.performRequest({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:r})}async getShortUrlRedirectRules(t,n){return this.performRequest({url:`/short-urls/${t}/redirect-rules`,method:"GET",query:{domain:n}})}async setShortUrlRedirectRules(t,n,r){return this.performRequest({url:`/short-urls/${t}/redirect-rules`,method:"POST",query:{domain:n},body:r})}async getVisitsOverview(){return this.performRequest({url:"/visits"}).then(({visits:t})=>t)}async getShortUrlVisits(t,n){return this.performVisitsRequest({url:`/short-urls/${t}/visits`,query:n})}async getTagVisits(t,n){return this.performVisitsRequest({url:`/tags/${t}/visits`,query:n})}async getDomainVisits(t,n){return this.performVisitsRequest({url:`/domains/${t}/visits`,query:n})}async getOrphanVisits(t){return this.performVisitsRequest({url:"/visits/orphan",query:t})}async getNonOrphanVisits(t){return this.performVisitsRequest({url:"/visits/non-orphan",query:t})}async performVisitsRequest(t){return this.performRequest(t).then(({visits:n})=>n)}async deleteShortUrlVisits(t,n){const r=n?{domain:n}:void 0;return this.performRequest({method:"DELETE",url:`/short-urls/${t}/visits`,query:r})}async deleteOrphanVisits(){return this.performRequest({method:"DELETE",url:"/visits/orphan"})}async listTags(){return this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:t})=>t)}async tagsStats(){return this.performRequest({url:"/tags/stats"}).then(({tags:t})=>t)}async deleteTags(t){return this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:t}}).then(()=>({tags:t}))}async editTag(t,n){return this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:t,newName:n}}).then(()=>({oldName:t,newName:n}))}async listDomains(){return this.performRequest({url:"/domains"}).then(({domains:t})=>t)}async editDomainRedirects(t){return this.performRequest({url:"/domains/redirects",method:"PATCH",body:t})}async health(t){return this.performRequest({url:"/health",domain:t})}async mercureInfo(){return this.performRequest({url:"/mercure-info"})}async performRequest(t){return this.httpClient.jsonRequest(...this.toFetchParams(t))}async performEmptyRequest(t){return this.httpClient.emptyRequest(...this.toFetchParams(t))}toFetchParams({url:t,method:n="GET",query:r={},body:i,domain:o}){const a=SZ(r),s=a?`?${a}`:"",l=o?OZ(this.serverInfo.baseUrl,o):this.serverInfo.baseUrl;return[`${_Z(l,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.serverInfo.apiKey}}]}}const Q8=e=>!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),Dd=e=>!!(e!=null&&e.id),uT=e=>!!(e!=null&&e.version),jZ=e=>!!(e!=null&&e.serverNotFound),TZ=e=>Dd(e)?e.id:"",CZ=({id:e,autoConnect:t,...n})=>n,b3={},PZ=e=>typeof e=="function",AZ=e=>{const{selectedServer:t}=e();if(!Q8(t))throw new Error("There's no selected server or it is not found");return t},kZ=e=>t=>{const{url:n,apiKey:r}=PZ(t)?AZ(t):t,i=`${r}_${n}`,o=b3[i]??new EZ(e,{apiKey:r,baseUrl:n});return b3[i]=o,o},NZ=e=>{e.serviceFactory("buildShlinkApiClient",kZ,"HttpClient")};var J8={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"]},RZ={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32c0-17.7 14.3-32 32-32zM0 192H448V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V192zm64 80v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm128 0v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H336zM64 400v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H208zm112 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H336c-8.8 0-16 7.2-16 16z"]},LZ=RZ,MZ={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232H328c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},cT=MZ,IZ={prefix:"fas",iconName:"file-csv",icon:[512,512,[],"f6dd","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM200 352h16c22.1 0 40 17.9 40 40v8c0 8.8-7.2 16-16 16s-16-7.2-16-16v-8c0-4.4-3.6-8-8-8H200c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8v-8c0-8.8 7.2-16 16-16s16 7.2 16 16v8c0 22.1-17.9 40-40 40H200c-22.1 0-40-17.9-40-40V392c0-22.1 17.9-40 40-40zm133.1 0H368c8.8 0 16 7.2 16 16s-7.2 16-16 16H333.1c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1H304c-8.8 0-16-7.2-16-16s7.2-16 16-16h42.9c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16v31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66V368c0-8.8 7.2-16 16-16s16 7.2 16 16v31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6V368c0-8.8 7.2-16 16-16z"]},DZ={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1v32c0 8.8 7.2 16 16 16h32zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},e$=DZ,t$={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},$Z={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},n$={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H40zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM16 232v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V232c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V392c0-13.3-10.7-24-24-24H40z"]},FZ={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},UZ=FZ,BZ={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},fT=BZ,zZ={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32V412.8C297 398 352 333.4 352 256V224c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"]},VZ={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"]},HZ={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},_3={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"]},WZ={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24V305.9l-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31V408z"]},GZ=WZ,qZ={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152V422.8c0 9.8-6 18.6-15.1 22.3L416 503V200.4zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6V451.8L32.9 502.7C17.1 509 0 497.4 0 480.4V209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77V504.3L192 449.4V255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},j2=qZ,KZ={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},YZ={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},ZZ={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320z"]},XZ=ZZ,dT={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M304 240V16.6c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16H304zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4V288L412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288H558.4z"]},ob={prefix:"fas",iconName:"chart-line",icon:[512,512,["line-chart"],"f201","M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64V400c0 44.2 35.8 80 80 80H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H80c-8.8 0-16-7.2-16-16V64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"]},r$={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5V80C0 53.5 21.5 32 48 32H197.5c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},x3={prefix:"fas",iconName:"calendar-xmark",icon:[448,512,["calendar-times"],"f273","M128 0c17.7 0 32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32c0-17.7 14.3-32 32-32zM0 192H448V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V192zM305 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"]},QZ={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},JZ={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},eX={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V32c0-17.7-14.3-32-32-32H352zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"]},tX=eX,nX={prefix:"fas",iconName:"tag",icon:[448,512,[127991],"f02b","M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},rX={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},hT=rX,iX={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},oX=iX,aX={prefix:"fas",iconName:"grip-vertical",icon:[320,512,[],"f58e","M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z"]},sX={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},lX={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},uX=lX,cX={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},fX=cX,dX={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3V448c0 17.7 14.3 32 32 32s32-14.3 32-32V146.3l32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},hX=dX,pX={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 232V334.1l31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31V232c0-13.3 10.7-24 24-24s24 10.7 24 24z"]},i$=pX,mX={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},vX={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},gX={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},yX={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},bX=yX,_X={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},xX={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},Lp={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},wX={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},T2=wX,OX={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},SX={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},EX=SX,w3={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z"]},o$={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8h-.7c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},jX=o$,TX={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80zM64 96v64h64V96H64zM0 336c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V336zm64 16v64h64V352H64zM304 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H304c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48zm80 64H320v64h64V96zM256 304c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16v96c0 8.8-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16v64c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V304zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},CX={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},PX={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM116.6 187.9L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9zM220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3L220.9 270z"]},AX={prefix:"fas",iconName:"desktop",icon:[576,512,[128421,61704,"desktop-alt"],"f390","M64 0C28.7 0 0 28.7 0 64V352c0 35.3 28.7 64 64 64H240l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H346.7L336 416H512c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM512 64V288H64V64H512z"]},Oh={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},kX={prefix:"fas",iconName:"arrows-split-up-and-left",icon:[512,512,[],"e4bc","M246.6 150.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L352 109.3V384c0 35.3 28.7 64 64 64h64c17.7 0 32 14.3 32 32s-14.3 32-32 32H416c-70.7 0-128-57.3-128-128c0-35.3-28.7-64-64-64H109.3l41.4 41.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-96-96c-12.5-12.5-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L109.3 256H224c23.3 0 45.2 6.2 64 17.1V109.3l-41.4 41.4z"]},NX={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},RX=NX;function O3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Le(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return Lt.head.insertBefore(t,r),e}}var iQ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Ch(){for(var e=12,t="";e-- >0;)t+=iQ[Math.random()*62|0];return t}function ef(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function bT(e){return e.classList?ef(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function g$(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function oQ(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(g$(e[n]),'" ')},"").trim()}function ab(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function _T(e){return e.size!==uo.size||e.x!==uo.x||e.y!==uo.y||e.rotate!==uo.rotate||e.flipX||e.flipY}function aQ(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(a," ").concat(s)},u={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:u}}function sQ(e){var t=e.transform,n=e.width,r=n===void 0?P2:n,i=e.height,o=i===void 0?P2:i,a=e.startCentered,s=a===void 0?!1:a,l="";return s&&c$?l+="translate(".concat(t.x/ba-r/2,"em, ").concat(t.y/ba-o/2,"em) "):s?l+="translate(calc(-50% + ".concat(t.x/ba,"em), calc(-50% + ").concat(t.y/ba,"em)) "):l+="translate(".concat(t.x/ba,"em, ").concat(t.y/ba,"em) "),l+="scale(".concat(t.size/ba*(t.flipX?-1:1),", ").concat(t.size/ba*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var lQ=`:root, :host { --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin"; --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp"; --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; } svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { overflow: visible; box-sizing: content-box; } .svg-inline--fa { display: var(--fa-display, inline-block); height: 1em; overflow: visible; vertical-align: -0.125em; } .svg-inline--fa.fa-2xs { vertical-align: 0.1em; } .svg-inline--fa.fa-xs { vertical-align: 0em; } .svg-inline--fa.fa-sm { vertical-align: -0.0714285705em; } .svg-inline--fa.fa-lg { vertical-align: -0.2em; } .svg-inline--fa.fa-xl { vertical-align: -0.25em; } .svg-inline--fa.fa-2xl { vertical-align: -0.3125em; } .svg-inline--fa.fa-pull-left { margin-right: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-pull-right { margin-left: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-li { width: var(--fa-li-width, 2em); top: 0.25em; } .svg-inline--fa.fa-fw { width: var(--fa-fw-width, 1.25em); } .fa-layers svg.svg-inline--fa { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; } .fa-layers-counter, .fa-layers-text { display: inline-block; position: absolute; text-align: center; } .fa-layers { display: inline-block; height: 1em; position: relative; text-align: center; vertical-align: -0.125em; width: 1em; } .fa-layers svg.svg-inline--fa { -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-text { left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-counter { background-color: var(--fa-counter-background-color, #ff253a); border-radius: var(--fa-counter-border-radius, 1em); box-sizing: border-box; color: var(--fa-inverse, #fff); line-height: var(--fa-counter-line-height, 1); max-width: var(--fa-counter-max-width, 5em); min-width: var(--fa-counter-min-width, 1.5em); overflow: hidden; padding: var(--fa-counter-padding, 0.25em 0.5em); right: var(--fa-right, 0); text-overflow: ellipsis; top: var(--fa-top, 0); -webkit-transform: scale(var(--fa-counter-scale, 0.25)); transform: scale(var(--fa-counter-scale, 0.25)); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-bottom-right { bottom: var(--fa-bottom, 0); right: var(--fa-right, 0); top: auto; -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: bottom right; transform-origin: bottom right; } .fa-layers-bottom-left { bottom: var(--fa-bottom, 0); left: var(--fa-left, 0); right: auto; top: auto; -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: bottom left; transform-origin: bottom left; } .fa-layers-top-right { top: var(--fa-top, 0); right: var(--fa-right, 0); -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-top-left { left: var(--fa-left, 0); right: auto; top: var(--fa-top, 0); -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: top left; transform-origin: top left; } .fa-1x { font-size: 1em; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-6x { font-size: 6em; } .fa-7x { font-size: 7em; } .fa-8x { font-size: 8em; } .fa-9x { font-size: 9em; } .fa-10x { font-size: 10em; } .fa-2xs { font-size: 0.625em; line-height: 0.1em; vertical-align: 0.225em; } .fa-xs { font-size: 0.75em; line-height: 0.0833333337em; vertical-align: 0.125em; } .fa-sm { font-size: 0.875em; line-height: 0.0714285718em; vertical-align: 0.0535714295em; } .fa-lg { font-size: 1.25em; line-height: 0.05em; vertical-align: -0.075em; } .fa-xl { font-size: 1.5em; line-height: 0.0416666682em; vertical-align: -0.125em; } .fa-2xl { font-size: 2em; line-height: 0.03125em; vertical-align: -0.1875em; } .fa-fw { text-align: center; width: 1.25em; } .fa-ul { list-style-type: none; margin-left: var(--fa-li-margin, 2.5em); padding-left: 0; } .fa-ul > li { position: relative; } .fa-li { left: calc(var(--fa-li-width, 2em) * -1); position: absolute; text-align: center; width: var(--fa-li-width, 2em); line-height: inherit; } .fa-border { border-color: var(--fa-border-color, #eee); border-radius: var(--fa-border-radius, 0.1em); border-style: var(--fa-border-style, solid); border-width: var(--fa-border-width, 0.08em); padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); } .fa-pull-left { float: left; margin-right: var(--fa-pull-margin, 0.3em); } .fa-pull-right { float: right; margin-left: var(--fa-pull-margin, 0.3em); } .fa-beat { -webkit-animation-name: fa-beat; animation-name: fa-beat; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); animation-timing-function: var(--fa-animation-timing, ease-in-out); } .fa-bounce { -webkit-animation-name: fa-bounce; animation-name: fa-bounce; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); } .fa-fade { -webkit-animation-name: fa-fade; animation-name: fa-fade; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); } .fa-beat-fade { -webkit-animation-name: fa-beat-fade; animation-name: fa-beat-fade; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); } .fa-flip { -webkit-animation-name: fa-flip; animation-name: fa-flip; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); animation-timing-function: var(--fa-animation-timing, ease-in-out); } .fa-shake { -webkit-animation-name: fa-shake; animation-name: fa-shake; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, linear); animation-timing-function: var(--fa-animation-timing, linear); } .fa-spin { -webkit-animation-name: fa-spin; animation-name: fa-spin; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 2s); animation-duration: var(--fa-animation-duration, 2s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, linear); animation-timing-function: var(--fa-animation-timing, linear); } .fa-spin-reverse { --fa-animation-direction: reverse; } .fa-pulse, .fa-spin-pulse { -webkit-animation-name: fa-spin; animation-name: fa-spin; -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, steps(8)); animation-timing-function: var(--fa-animation-timing, steps(8)); } @media (prefers-reduced-motion: reduce) { .fa-beat, .fa-bounce, .fa-fade, .fa-beat-fade, .fa-flip, .fa-pulse, .fa-shake, .fa-spin, .fa-spin-pulse { -webkit-animation-delay: -1ms; animation-delay: -1ms; -webkit-animation-duration: 1ms; animation-duration: 1ms; -webkit-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-transition-delay: 0s; transition-delay: 0s; -webkit-transition-duration: 0s; transition-duration: 0s; } } @-webkit-keyframes fa-beat { 0%, 90% { -webkit-transform: scale(1); transform: scale(1); } 45% { -webkit-transform: scale(var(--fa-beat-scale, 1.25)); transform: scale(var(--fa-beat-scale, 1.25)); } } @keyframes fa-beat { 0%, 90% { -webkit-transform: scale(1); transform: scale(1); } 45% { -webkit-transform: scale(var(--fa-beat-scale, 1.25)); transform: scale(var(--fa-beat-scale, 1.25)); } } @-webkit-keyframes fa-bounce { 0% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 10% { -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); } 30% { -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); } 50% { -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); } 57% { -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); } 64% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 100% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } } @keyframes fa-bounce { 0% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 10% { -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); } 30% { -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); } 50% { -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); } 57% { -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); } 64% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 100% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } } @-webkit-keyframes fa-fade { 50% { opacity: var(--fa-fade-opacity, 0.4); } } @keyframes fa-fade { 50% { opacity: var(--fa-fade-opacity, 0.4); } } @-webkit-keyframes fa-beat-fade { 0%, 100% { opacity: var(--fa-beat-fade-opacity, 0.4); -webkit-transform: scale(1); transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); transform: scale(var(--fa-beat-fade-scale, 1.125)); } } @keyframes fa-beat-fade { 0%, 100% { opacity: var(--fa-beat-fade-opacity, 0.4); -webkit-transform: scale(1); transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); transform: scale(var(--fa-beat-fade-scale, 1.125)); } } @-webkit-keyframes fa-flip { 50% { -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } } @keyframes fa-flip { 50% { -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } } @-webkit-keyframes fa-shake { 0% { -webkit-transform: rotate(-15deg); transform: rotate(-15deg); } 4% { -webkit-transform: rotate(15deg); transform: rotate(15deg); } 8%, 24% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); } 12%, 28% { -webkit-transform: rotate(18deg); transform: rotate(18deg); } 16% { -webkit-transform: rotate(-22deg); transform: rotate(-22deg); } 20% { -webkit-transform: rotate(22deg); transform: rotate(22deg); } 32% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); } 36% { -webkit-transform: rotate(12deg); transform: rotate(12deg); } 40%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } } @keyframes fa-shake { 0% { -webkit-transform: rotate(-15deg); transform: rotate(-15deg); } 4% { -webkit-transform: rotate(15deg); transform: rotate(15deg); } 8%, 24% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); } 12%, 28% { -webkit-transform: rotate(18deg); transform: rotate(18deg); } 16% { -webkit-transform: rotate(-22deg); transform: rotate(-22deg); } 20% { -webkit-transform: rotate(22deg); transform: rotate(22deg); } 32% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); } 36% { -webkit-transform: rotate(12deg); transform: rotate(12deg); } 40%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } .fa-rotate-90 { -webkit-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { -webkit-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { -webkit-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { -webkit-transform: scale(1, -1); transform: scale(1, -1); } .fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { -webkit-transform: scale(-1, -1); transform: scale(-1, -1); } .fa-rotate-by { -webkit-transform: rotate(var(--fa-rotate-angle, 0)); transform: rotate(var(--fa-rotate-angle, 0)); } .fa-stack { display: inline-block; vertical-align: middle; height: 2em; position: relative; width: 2.5em; } .fa-stack-1x, .fa-stack-2x { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; z-index: var(--fa-stack-z-index, auto); } .svg-inline--fa.fa-stack-1x { height: 1em; width: 1.25em; } .svg-inline--fa.fa-stack-2x { height: 2em; width: 2.5em; } .fa-inverse { color: var(--fa-inverse, #fff); } .sr-only, .fa-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .sr-only-focusable:not(:focus), .fa-sr-only-focusable:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .svg-inline--fa .fa-primary { fill: var(--fa-primary-color, currentColor); opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa .fa-secondary { fill: var(--fa-secondary-color, currentColor); opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-primary { opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-secondary { opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa mask .fa-primary, .svg-inline--fa mask .fa-secondary { fill: black; } .fad.fa-inverse, .fa-duotone.fa-inverse { color: var(--fa-inverse, #fff); }`;function y$(){var e=f$,t=d$,n=Fe.cssPrefix,r=Fe.replacementClass,i=lQ;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return i}var A3=!1;function dx(){Fe.autoAddCss&&!A3&&(rQ(y$()),A3=!0)}var uQ={mixout:function(){return{dom:{css:y$,insertCss:dx}}},hooks:function(){return{beforeDOMElementCreation:function(){dx()},beforeI2svg:function(){dx()}}}},Jo=is||{};Jo[Qo]||(Jo[Qo]={});Jo[Qo].styles||(Jo[Qo].styles={});Jo[Qo].hooks||(Jo[Qo].hooks={});Jo[Qo].shims||(Jo[Qo].shims=[]);var Di=Jo[Qo],b$=[],cQ=function e(){Lt.removeEventListener("DOMContentLoaded",e),Gg=1,b$.map(function(t){return t()})},Gg=!1;ca&&(Gg=(Lt.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Lt.readyState),Gg||Lt.addEventListener("DOMContentLoaded",cQ));function fQ(e){ca&&(Gg?setTimeout(e,0):b$.push(e))}function Dp(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?g$(e):"<".concat(t," ").concat(oQ(r),">").concat(o.map(Dp).join(""),"")}function k3(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var dQ=function(t,n){return function(r,i,o,a){return t.call(n,r,i,o,a)}},hx=function(t,n,r,i){var o=Object.keys(t),a=o.length,s=i!==void 0?dQ(n,i):n,l,u,f;for(r===void 0?(l=1,f=t[o[0]]):(l=0,f=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function N3(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function N2(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=N3(t);typeof Di.hooks.addPack=="function"&&!i?Di.hooks.addPack(e,N3(t)):Di.styles[e]=Le(Le({},Di.styles[e]||{}),o),e==="fas"&&N2("fa",t)}var iv,ov,av,Iu=Di.styles,mQ=Di.shims,vQ=(iv={},gn(iv,kt,Object.values(jh[kt])),gn(iv,Yt,Object.values(jh[Yt])),iv),xT=null,_$={},x$={},w$={},O$={},S$={},gQ=(ov={},gn(ov,kt,Object.keys(Sh[kt])),gn(ov,Yt,Object.keys(Sh[Yt])),ov);function yQ(e){return~QX.indexOf(e)}function bQ(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!yQ(i)?i:null}var E$=function(){var t=function(o){return hx(Iu,function(a,s,l){return a[l]=hx(s,o,{}),a},{})};_$=t(function(i,o,a){if(o[3]&&(i[o[3]]=a),o[2]){var s=o[2].filter(function(l){return typeof l=="number"});s.forEach(function(l){i[l.toString(16)]=a})}return i}),x$=t(function(i,o,a){if(i[a]=a,o[2]){var s=o[2].filter(function(l){return typeof l=="string"});s.forEach(function(l){i[l]=a})}return i}),S$=t(function(i,o,a){var s=o[2];return i[a]=a,s.forEach(function(l){i[l]=a}),i});var n="far"in Iu||Fe.autoFetchSvg,r=hx(mQ,function(i,o){var a=o[0],s=o[1],l=o[2];return s==="far"&&!n&&(s="fas"),typeof a=="string"&&(i.names[a]={prefix:s,iconName:l}),typeof a=="number"&&(i.unicodes[a.toString(16)]={prefix:s,iconName:l}),i},{names:{},unicodes:{}});w$=r.names,O$=r.unicodes,xT=sb(Fe.styleDefault,{family:Fe.familyDefault})};nQ(function(e){xT=sb(e.styleDefault,{family:Fe.familyDefault})});E$();function wT(e,t){return(_$[e]||{})[t]}function _Q(e,t){return(x$[e]||{})[t]}function ol(e,t){return(S$[e]||{})[t]}function j$(e){return w$[e]||{prefix:null,iconName:null}}function xQ(e){var t=O$[e],n=wT("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function os(){return xT}var OT=function(){return{prefix:null,iconName:null,rest:[]}};function sb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?kt:n,i=Sh[r][e],o=Eh[r][e]||Eh[r][i],a=e in Di.styles?e:null;return o||a||null}var R3=(av={},gn(av,kt,Object.keys(jh[kt])),gn(av,Yt,Object.keys(jh[Yt])),av);function lb(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},gn(t,kt,"".concat(Fe.cssPrefix,"-").concat(kt)),gn(t,Yt,"".concat(Fe.cssPrefix,"-").concat(Yt)),t),a=null,s=kt;(e.includes(o[kt])||e.some(function(u){return R3[kt].includes(u)}))&&(s=kt),(e.includes(o[Yt])||e.some(function(u){return R3[Yt].includes(u)}))&&(s=Yt);var l=e.reduce(function(u,f){var d=bQ(Fe.cssPrefix,f);if(Iu[f]?(f=vQ[s].includes(f)?GX[s][f]:f,a=f,u.prefix=f):gQ[s].indexOf(f)>-1?(a=f,u.prefix=sb(f,{family:s})):d?u.iconName=d:f!==Fe.replacementClass&&f!==o[kt]&&f!==o[Yt]&&u.rest.push(f),!i&&u.prefix&&u.iconName){var p=a==="fa"?j$(u.iconName):{},v=ol(u.prefix,u.iconName);p.prefix&&(a=null),u.iconName=p.iconName||v||u.iconName,u.prefix=p.prefix||u.prefix,u.prefix==="far"&&!Iu.far&&Iu.fas&&!Fe.autoFetchSvg&&(u.prefix="fas")}return u},OT());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&s===Yt&&(Iu.fass||Fe.autoFetchSvg)&&(l.prefix="fass",l.iconName=ol(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||a==="fa")&&(l.prefix=os()||"fas"),l}var wQ=function(){function e(){LX(this,e),this.definitions={}}return MX(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&f.forEach(function(d){typeof d=="string"&&(n[s][d]=u)}),n[s][l]=u}),n}}]),e}(),L3=[],Du={},Qu={},OQ=Object.keys(Qu);function SQ(e,t){var n=t.mixoutsTo;return L3=e,Du={},Object.keys(Qu).forEach(function(r){OQ.indexOf(r)===-1&&delete Qu[r]}),L3.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(a){typeof i[a]=="function"&&(n[a]=i[a]),Wg(i[a])==="object"&&Object.keys(i[a]).forEach(function(s){n[a]||(n[a]={}),n[a][s]=i[a][s]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(a){Du[a]||(Du[a]=[]),Du[a].push(o[a])})}r.provides&&r.provides(Qu)}),n}function R2(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return ca?(Tl("beforeI2svg",t),ea("pseudoElements2svg",t),ea("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;Fe.autoReplaceSvg===!1&&(Fe.autoReplaceSvg=!0),Fe.observeMutations=!0,fQ(function(){CQ({autoReplaceSvgRoot:n}),Tl("watch",t)})}},TQ={icon:function(t){if(t===null)return null;if(Wg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:ol(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=sb(t[0]);return{prefix:r,iconName:ol(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(Fe.cssPrefix,"-"))>-1||t.match(qX))){var i=lb(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||os(),iconName:ol(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=os();return{prefix:o,iconName:ol(o,t)||t}}}},Gr={noAuto:EQ,config:Fe,dom:jQ,parse:TQ,library:T$,findIconDefinition:L2,toHtml:Dp},CQ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?Lt:n;(Object.keys(Di.styles).length>0||Fe.autoFetchSvg)&&ca&&Fe.autoReplaceSvg&&Gr.dom.i2svg({node:r})};function ub(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Dp(r)})}}),Object.defineProperty(e,"node",{get:function(){if(ca){var r=Lt.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function PQ(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,a=e.transform;if(_T(a)&&n.found&&!r.found){var s=n.width,l=n.height,u={x:s/l/2,y:.5};i.style=ab(Le(Le({},o),{},{"transform-origin":"".concat(u.x+a.x/16,"em ").concat(u.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function AQ(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,a=o===!0?"".concat(t,"-").concat(Fe.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Le(Le({},i),{},{id:a}),children:r}]}]}function ST(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,a=e.transform,s=e.symbol,l=e.title,u=e.maskId,f=e.titleId,d=e.extra,p=e.watchable,v=p===void 0?!1:p,g=r.found?r:n,y=g.width,w=g.height,b=i==="fak",x=[Fe.replacementClass,o?"".concat(Fe.cssPrefix,"-").concat(o):""].filter(function(I){return d.classes.indexOf(I)===-1}).filter(function(I){return I!==""||!!I}).concat(d.classes).join(" "),_={children:[],attributes:Le(Le({},d.attributes),{},{"data-prefix":i,"data-icon":o,class:x,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(w)})},S=b&&!~d.classes.indexOf("fa-fw")?{width:"".concat(y/w*16*.0625,"em")}:{};v&&(_.attributes[jl]=""),l&&(_.children.push({tag:"title",attributes:{id:_.attributes["aria-labelledby"]||"title-".concat(f||Ch())},children:[l]}),delete _.attributes.title);var j=Le(Le({},_),{},{prefix:i,iconName:o,main:n,mask:r,maskId:u,transform:a,symbol:s,styles:Le(Le({},S),d.styles)}),E=r.found&&n.found?ea("generateAbstractMask",j)||{children:[],attributes:{}}:ea("generateAbstractIcon",j)||{children:[],attributes:{}},C=E.children,N=E.attributes;return j.children=C,j.attributes=N,s?AQ(j):PQ(j)}function M3(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,a=e.extra,s=e.watchable,l=s===void 0?!1:s,u=Le(Le(Le({},a.attributes),o?{title:o}:{}),{},{class:a.classes.join(" ")});l&&(u[jl]="");var f=Le({},a.styles);_T(i)&&(f.transform=sQ({transform:i,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var d=ab(f);d.length>0&&(u.style=d);var p=[];return p.push({tag:"span",attributes:u,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function kQ(e){var t=e.content,n=e.title,r=e.extra,i=Le(Le(Le({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=ab(r.styles);o.length>0&&(i.style=o);var a=[];return a.push({tag:"span",attributes:i,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}var px=Di.styles;function M2(e){var t=e[0],n=e[1],r=e.slice(4),i=pT(r,1),o=i[0],a=null;return Array.isArray(o)?a={tag:"g",attributes:{class:"".concat(Fe.cssPrefix,"-").concat(il.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Fe.cssPrefix,"-").concat(il.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(Fe.cssPrefix,"-").concat(il.PRIMARY),fill:"currentColor",d:o[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:a}}var NQ={found:!1,width:512,height:512};function RQ(e,t){!h$&&!Fe.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function I2(e,t){var n=t;return t==="fa"&&Fe.styleDefault!==null&&(t=os()),new Promise(function(r,i){if(ea("missingIconAbstract"),n==="fa"){var o=j$(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&px[t]&&px[t][e]){var a=px[t][e];return r(M2(a))}RQ(e,t),r(Le(Le({},NQ),{},{icon:Fe.showMissingIcons&&e?ea("missingIconAbstract")||{}:{}}))})}var I3=function(){},D2=Fe.measurePerformance&&Qm&&Qm.mark&&Qm.measure?Qm:{mark:I3,measure:I3},bd='FA "6.5.2"',LQ=function(t){return D2.mark("".concat(bd," ").concat(t," begins")),function(){return C$(t)}},C$=function(t){D2.mark("".concat(bd," ").concat(t," ends")),D2.measure("".concat(bd," ").concat(t),"".concat(bd," ").concat(t," begins"),"".concat(bd," ").concat(t," ends"))},ET={begin:LQ,end:C$},Qv=function(){};function D3(e){var t=e.getAttribute?e.getAttribute(jl):null;return typeof t=="string"}function MQ(e){var t=e.getAttribute?e.getAttribute(vT):null,n=e.getAttribute?e.getAttribute(gT):null;return t&&n}function IQ(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Fe.replacementClass)}function DQ(){if(Fe.autoReplaceSvg===!0)return Jv.replace;var e=Jv[Fe.autoReplaceSvg];return e||Jv.replace}function $Q(e){return Lt.createElementNS("http://www.w3.org/2000/svg",e)}function FQ(e){return Lt.createElement(e)}function P$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?$Q:FQ:n;if(typeof e=="string")return Lt.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(a){i.setAttribute(a,e.attributes[a])});var o=e.children||[];return o.forEach(function(a){i.appendChild(P$(a,{ceFn:r}))}),i}function UQ(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var Jv={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(P$(i),n)}),n.getAttribute(jl)===null&&Fe.keepOriginalSource){var r=Lt.createComment(UQ(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~bT(n).indexOf(Fe.replacementClass))return Jv.replace(t);var i=new RegExp("".concat(Fe.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(s,l){return l===Fe.replacementClass||l.match(i)?s.toSvg.push(l):s.toNode.push(l),s},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var a=r.map(function(s){return Dp(s)}).join(` `);n.setAttribute(jl,""),n.innerHTML=a}};function $3(e){e()}function A$(e,t){var n=typeof t=="function"?t:Qv;if(e.length===0)n();else{var r=$3;Fe.mutateApproach===HX&&(r=is.requestAnimationFrame||$3),r(function(){var i=DQ(),o=ET.begin("mutate");e.map(i),o(),n()})}}var jT=!1;function k$(){jT=!0}function $2(){jT=!1}var qg=null;function F3(e){if(C3&&Fe.observeMutations){var t=e.treeCallback,n=t===void 0?Qv:t,r=e.nodeCallback,i=r===void 0?Qv:r,o=e.pseudoElementsCallback,a=o===void 0?Qv:o,s=e.observeMutationsRoot,l=s===void 0?Lt:s;qg=new C3(function(u){if(!jT){var f=os();ef(u).forEach(function(d){if(d.type==="childList"&&d.addedNodes.length>0&&!D3(d.addedNodes[0])&&(Fe.searchPseudoElements&&a(d.target),n(d.target)),d.type==="attributes"&&d.target.parentNode&&Fe.searchPseudoElements&&a(d.target.parentNode),d.type==="attributes"&&D3(d.target)&&~XX.indexOf(d.attributeName))if(d.attributeName==="class"&&MQ(d.target)){var p=lb(bT(d.target)),v=p.prefix,g=p.iconName;d.target.setAttribute(vT,v||f),g&&d.target.setAttribute(gT,g)}else IQ(d.target)&&i(d.target)})}}),ca&&qg.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function BQ(){qg&&qg.disconnect()}function zQ(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),a=o[0],s=o.slice(1);return a&&s.length>0&&(r[a]=s.join(":").trim()),r},{})),n}function VQ(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=lb(bT(e));return i.prefix||(i.prefix=os()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=_Q(i.prefix,e.innerText)||wT(i.prefix,k2(e.innerText))),!i.iconName&&Fe.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function HQ(e){var t=ef(e.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return Fe.autoA11y&&(n?t["aria-labelledby"]="".concat(Fe.replacementClass,"-title-").concat(r||Ch()):(t["aria-hidden"]="true",t.focusable="false")),t}function WQ(){return{iconName:null,title:null,titleId:null,prefix:null,transform:uo,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function U3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=VQ(e),r=n.iconName,i=n.prefix,o=n.rest,a=HQ(e),s=R2("parseNodeAttributes",{},e),l=t.styleParser?zQ(e):[];return Le({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:uo,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:a}},s)}var GQ=Di.styles;function N$(e){var t=Fe.autoReplaceSvg==="nest"?U3(e,{styleParser:!1}):U3(e);return~t.extra.classes.indexOf(p$)?ea("generateLayersText",e,t):ea("generateSvgReplacementMutation",e,t)}var as=new Set;yT.map(function(e){as.add("fa-".concat(e))});Object.keys(Sh[kt]).map(as.add.bind(as));Object.keys(Sh[Yt]).map(as.add.bind(as));as=Mp(as);function B3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!ca)return Promise.resolve();var n=Lt.documentElement.classList,r=function(d){return n.add("".concat(P3,"-").concat(d))},i=function(d){return n.remove("".concat(P3,"-").concat(d))},o=Fe.autoFetchSvg?as:yT.map(function(f){return"fa-".concat(f)}).concat(Object.keys(GQ));o.includes("fa")||o.push("fa");var a=[".".concat(p$,":not([").concat(jl,"])")].concat(o.map(function(f){return".".concat(f,":not([").concat(jl,"])")})).join(", ");if(a.length===0)return Promise.resolve();var s=[];try{s=ef(e.querySelectorAll(a))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var l=ET.begin("onTree"),u=s.reduce(function(f,d){try{var p=N$(d);p&&f.push(p)}catch(v){h$||v.name==="MissingIcon"&&console.error(v)}return f},[]);return new Promise(function(f,d){Promise.all(u).then(function(p){A$(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(function(p){l(),d(p)})})}function qQ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;N$(e).then(function(n){n&&A$([n],t)})}function KQ(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:L2(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:L2(i||{})),e(r,Le(Le({},n),{},{mask:i}))}}var YQ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?uo:r,o=n.symbol,a=o===void 0?!1:o,s=n.mask,l=s===void 0?null:s,u=n.maskId,f=u===void 0?null:u,d=n.title,p=d===void 0?null:d,v=n.titleId,g=v===void 0?null:v,y=n.classes,w=y===void 0?[]:y,b=n.attributes,x=b===void 0?{}:b,_=n.styles,S=_===void 0?{}:_;if(t){var j=t.prefix,E=t.iconName,C=t.icon;return ub(Le({type:"icon"},t),function(){return Tl("beforeDOMElementCreation",{iconDefinition:t,params:n}),Fe.autoA11y&&(p?x["aria-labelledby"]="".concat(Fe.replacementClass,"-title-").concat(g||Ch()):(x["aria-hidden"]="true",x.focusable="false")),ST({icons:{main:M2(C),mask:l?M2(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:j,iconName:E,transform:Le(Le({},uo),i),symbol:a,title:p,maskId:f,titleId:g,extra:{attributes:x,styles:S,classes:w}})})}},ZQ={mixout:function(){return{icon:KQ(YQ)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=B3,n.nodeCallback=qQ,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?Lt:r,o=n.callback,a=o===void 0?function(){}:o;return B3(i,a)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,a=r.titleId,s=r.prefix,l=r.transform,u=r.symbol,f=r.mask,d=r.maskId,p=r.extra;return new Promise(function(v,g){Promise.all([I2(i,s),f.iconName?I2(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var w=pT(y,2),b=w[0],x=w[1];v([n,ST({icons:{main:b,mask:x},prefix:s,iconName:i,transform:l,symbol:u,maskId:d,title:o,titleId:a,extra:p,watchable:!0})])}).catch(g)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.transform,s=n.styles,l=ab(s);l.length>0&&(i.style=l);var u;return _T(a)&&(u=ea("generateAbstractTransformGrouping",{main:o,transform:a,containerWidth:o.width,iconWidth:o.width})),r.push(u||o.icon),{children:r,attributes:i}}}},XQ={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return ub({type:"layer"},function(){Tl("beforeDOMElementCreation",{assembler:n,params:r});var a=[];return n(function(s){Array.isArray(s)?s.map(function(l){a=a.concat(l.abstract)}):a=a.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(Fe.cssPrefix,"-layers")].concat(Mp(o)).join(" ")},children:a}]})}}}},QQ={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,a=r.classes,s=a===void 0?[]:a,l=r.attributes,u=l===void 0?{}:l,f=r.styles,d=f===void 0?{}:f;return ub({type:"counter",content:n},function(){return Tl("beforeDOMElementCreation",{content:n,params:r}),kQ({content:n.toString(),title:o,extra:{attributes:u,styles:d,classes:["".concat(Fe.cssPrefix,"-layers-counter")].concat(Mp(s))}})})}}}},JQ={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?uo:i,a=r.title,s=a===void 0?null:a,l=r.classes,u=l===void 0?[]:l,f=r.attributes,d=f===void 0?{}:f,p=r.styles,v=p===void 0?{}:p;return ub({type:"text",content:n},function(){return Tl("beforeDOMElementCreation",{content:n,params:r}),M3({content:n,transform:Le(Le({},uo),o),title:s,extra:{attributes:d,styles:v,classes:["".concat(Fe.cssPrefix,"-layers-text")].concat(Mp(u))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,a=r.extra,s=null,l=null;if(c$){var u=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();s=f.width/u,l=f.height/u}return Fe.autoA11y&&!i&&(a.attributes["aria-hidden"]="true"),Promise.resolve([n,M3({content:n.innerHTML,width:s,height:l,transform:o,title:i,extra:a,watchable:!0})])}}},eJ=new RegExp('"',"ug"),z3=[1105920,1112319];function tJ(e){var t=e.replace(eJ,""),n=pQ(t,0),r=n>=z3[0]&&n<=z3[1],i=t.length===2?t[0]===t[1]:!1;return{value:k2(i?t[0]:t),isSecondary:r||i}}function V3(e,t){var n="".concat(VX).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=ef(e.children),a=o.filter(function(C){return C.getAttribute(A2)===t})[0],s=is.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(KX),u=s.getPropertyValue("font-weight"),f=s.getPropertyValue("content");if(a&&!l)return e.removeChild(a),r();if(l&&f!=="none"&&f!==""){var d=s.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?Yt:kt,v=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?Eh[p][l[2].toLowerCase()]:YX[p][u],g=tJ(d),y=g.value,w=g.isSecondary,b=l[0].startsWith("FontAwesome"),x=wT(v,y),_=x;if(b){var S=xQ(y);S.iconName&&S.prefix&&(x=S.iconName,v=S.prefix)}if(x&&!w&&(!a||a.getAttribute(vT)!==v||a.getAttribute(gT)!==_)){e.setAttribute(n,_),a&&e.removeChild(a);var j=WQ(),E=j.extra;E.attributes[A2]=t,I2(x,v).then(function(C){var N=ST(Le(Le({},j),{},{icons:{main:C,mask:OT()},prefix:v,iconName:_,extra:E,watchable:!0})),I=Lt.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(I,e.firstChild):e.appendChild(I),I.outerHTML=N.map(function(M){return Dp(M)}).join(` `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function nJ(e){return Promise.all([V3(e,"::before"),V3(e,"::after")])}function rJ(e){return e.parentNode!==document.head&&!~WX.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(A2)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function H3(e){if(ca)return new Promise(function(t,n){var r=ef(e.querySelectorAll("*")).filter(rJ).map(nJ),i=ET.begin("searchPseudoElements");k$(),Promise.all(r).then(function(){i(),$2(),t()}).catch(function(){i(),$2(),n()})})}var iJ={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=H3,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?Lt:r;Fe.searchPseudoElements&&H3(i)}}},W3=!1,oJ={mixout:function(){return{dom:{unwatch:function(){k$(),W3=!0}}}},hooks:function(){return{bootstrap:function(){F3(R2("mutationObserverCallbacks",{}))},noAuto:function(){BQ()},watch:function(n){var r=n.observeMutationsRoot;W3?$2():F3(R2("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},G3=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),a=o[0],s=o.slice(1).join("-");if(a&&s==="h")return r.flipX=!0,r;if(a&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(a){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n)},aJ={mixout:function(){return{parse:{transform:function(n){return G3(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=G3(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,a=n.iconWidth,s={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),u="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),f="rotate(".concat(i.rotate," 0 0)"),d={transform:"".concat(l," ").concat(u," ").concat(f)},p={transform:"translate(".concat(a/2*-1," -256)")},v={outer:s,inner:d,path:p};return{tag:"g",attributes:Le({},v.outer),children:[{tag:"g",attributes:Le({},v.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Le(Le({},r.icon.attributes),v.path)}]}]}}}},mx={x:0,y:0,width:"100%",height:"100%"};function q3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function sJ(e){return e.tag==="g"?e.children:[e]}var lJ={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?lb(i.split(" ").map(function(a){return a.trim()})):OT();return o.prefix||(o.prefix=os()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.mask,s=n.maskId,l=n.transform,u=o.width,f=o.icon,d=a.width,p=a.icon,v=aQ({transform:l,containerWidth:d,iconWidth:u}),g={tag:"rect",attributes:Le(Le({},mx),{},{fill:"white"})},y=f.children?{children:f.children.map(q3)}:{},w={tag:"g",attributes:Le({},v.inner),children:[q3(Le({tag:f.tag,attributes:Le(Le({},f.attributes),v.path)},y))]},b={tag:"g",attributes:Le({},v.outer),children:[w]},x="mask-".concat(s||Ch()),_="clip-".concat(s||Ch()),S={tag:"mask",attributes:Le(Le({},mx),{},{id:x,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[g,b]},j={tag:"defs",children:[{tag:"clipPath",attributes:{id:_},children:sJ(p)},S]};return r.push(j,{tag:"rect",attributes:Le({fill:"currentColor","clip-path":"url(#".concat(_,")"),mask:"url(#".concat(x,")")},mx)}),{children:r,attributes:i}}}},uJ={provides:function(t){var n=!1;is.matchMedia&&(n=is.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Le(Le({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=Le(Le({},o),{},{attributeName:"opacity"}),s={tag:"circle",attributes:Le(Le({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||s.children.push({tag:"animate",attributes:Le(Le({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Le(Le({},a),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:Le(Le({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Le(Le({},a),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Le(Le({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Le(Le({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},cJ={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},fJ=[uQ,ZQ,XQ,QQ,JQ,iJ,oJ,aJ,lJ,uJ,cJ];SQ(fJ,{mixoutsTo:Gr});Gr.noAuto;Gr.config;Gr.library;Gr.dom;var F2=Gr.parse;Gr.findIconDefinition;Gr.toHtml;var dJ=Gr.icon;Gr.layer;Gr.text;Gr.counter;var R$={exports:{}},hJ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",pJ=hJ,mJ=pJ;function L$(){}function M$(){}M$.resetWarningCache=L$;var vJ=function(){function e(r,i,o,a,s,l){if(l!==mJ){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:M$,resetWarningCache:L$};return n.PropTypes=n,n};R$.exports=vJ();var gJ=R$.exports;const $=$l(gJ);function K3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Da(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function bJ(e,t){if(e==null)return{};var n=yJ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function U2(e){return _J(e)||xJ(e)||wJ(e)||OJ()}function _J(e){if(Array.isArray(e))return B2(e)}function xJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wJ(e,t){if(e){if(typeof e=="string")return B2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B2(e,t)}}function B2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return D$(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,u){var f=t.attributes[u];switch(u){case"class":l.attrs.className=f,delete t.attributes.class;break;case"style":l.attrs.style=CJ(f);break;default:u.indexOf("aria-")===0||u.indexOf("data-")===0?l.attrs[u.toLowerCase()]=f:l.attrs[I$(u)]=f}return l},{attrs:{}}),o=n.style,a=o===void 0?{}:o,s=bJ(n,jJ);return i.attrs.style=Da(Da({},i.attrs.style),a),e.apply(void 0,[t.tag,Da(Da({},i.attrs),s)].concat(U2(r)))}var $$=!1;try{$$=!0}catch{}function PJ(){if(!$$&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function Y3(e){if(e&&Kg(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(F2.icon)return F2.icon(e);if(e===null)return null;if(e&&Kg(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function vx(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?$u({},e,t):{}}var je=V.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,a=e.title,s=e.titleId,l=e.maskId,u=Y3(n),f=vx("classes",[].concat(U2(SJ(e)),U2(o.split(" ")))),d=vx("transform",typeof e.transform=="string"?F2.transform(e.transform):e.transform),p=vx("mask",Y3(r)),v=dJ(u,Da(Da(Da(Da({},f),d),p),{},{symbol:i,title:a,titleId:s,maskId:l}));if(!v)return PJ("Could not find icon",u),null;var g=v.abstract,y={ref:t};return Object.keys(e).forEach(function(w){je.defaultProps.hasOwnProperty(w)||(y[w]=e[w])}),AJ(g[0],y)});je.displayName="FontAwesomeIcon";je.propTypes={beat:$.bool,border:$.bool,beatFade:$.bool,bounce:$.bool,className:$.string,fade:$.bool,flash:$.bool,mask:$.oneOfType([$.object,$.array,$.string]),maskId:$.string,fixedWidth:$.bool,inverse:$.bool,flip:$.oneOf([!0,!1,"horizontal","vertical","both"]),icon:$.oneOfType([$.object,$.array,$.string]),listItem:$.bool,pull:$.oneOf(["right","left"]),pulse:$.bool,rotation:$.oneOf([0,90,180,270]),shake:$.bool,size:$.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:$.bool,spinPulse:$.bool,spinReverse:$.bool,symbol:$.oneOfType([$.bool,$.string]),title:$.string,titleId:$.string,transform:$.oneOfType([$.string,$.object]),swapOpacity:$.bool};je.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var AJ=D$.bind(null,V.createElement),F$={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i0?"".concat(e,"px"):null}function RJ(){return document.body.clientWidth0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:IJ;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}function gs(e,t){var n={};return Object.keys(e).forEach(function(r){t.indexOf(r)===-1&&(n[r]=e[r])}),n}function B$(e,t){for(var n=Array.isArray(t)?t:[t],r=n.length,i,o={};r>0;)r-=1,i=n[r],o[i]=e[i];return o}var Z3={};function z2(e){Z3[e]||(typeof console<"u"&&console.error(e),Z3[e]=!0)}function z$(e,t){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&z2('"'.concat(i,'" property of "').concat(o,`" has been deprecated. `).concat(t));for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l"u"?"undefined":hc(window))==="object"&&window.Element||function(){};function TT(e,t,n){if(!(e[t]instanceof DJ))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var pc=$.oneOfType([$.string,$.func,TT,$.shape({current:$.any})]),ot=$.oneOfType([$.func,$.string,$.shape({$$typeof:$.symbol,render:$.func}),$.arrayOf($.oneOfType([$.func,$.string,$.shape({$$typeof:$.symbol,render:$.func})]))]),Yg={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},Zg=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],sv={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},vt={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},$J=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],CT=!!(typeof window<"u"&&window.document&&window.document.createElement);function FJ(e){return e&&hc(e)==="object"?"current"in e:!1}function V$(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function V2(e){var t=hc(e);return e!=null&&(t==="object"||t==="function")}function X3(e){var t=hc(e),n=NaN;if(t==="number")return e;if(t==="symbol"||t==="object"&&V$(e)==="[object Symbol]")return n;if(V2(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=V2(r)?"".concat(r):r}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");var i=/^0b[01]+$/i.test(e);return i||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),i?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function UJ(e){if(!V2(e))return!1;var t=V$(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function BJ(e){if(FJ(e))return e.current;if(UJ(e))return e();if(typeof e=="string"&&CT){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#".concat(e))),!t.length)throw new Error("The target '".concat(e,"' could not be identified in the dom, tip: check spelling"));return t}return e}function Q3(e){return e===null?!1:Array.isArray(e)||CT&&typeof e.length=="number"}function Ph(e,t){var n=BJ(e);return t?Q3(n)?n:n===null?[]:[n]:Q3(n)?n[0]:n}var zJ=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],VJ=["className","cssModule","noGutters","tag","widths"];function H2(){return H2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var GJ=["xs","sm","md","lg","xl","xxl"],ou=$.oneOfType([$.number,$.string]),qJ={tag:ot,noGutters:z$($.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:$.string,cssModule:$.object,xs:ou,sm:ou,md:ou,lg:ou,xl:ou,xxl:ou,widths:$.array};function ir(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,o=i===void 0?"div":i,a=e.widths,s=a===void 0?GJ:a,l=HJ(e,VJ),u=[];s.forEach(function(d,p){var v=e[d];if(delete l[d],!!v){var g=!p;u.push(g?"row-cols-".concat(v):"row-cols-".concat(d,"-").concat(v))}});var f=Be(We(t,r?"gx-0":null,"row",u),n);return V.createElement(o,H2({},l,{className:f}))}ir.propTypes=qJ;var KJ=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function W2(){return W2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var XJ={children:$.node,className:$.string,color:$.string,container:$.oneOfType([$.bool,$.string]),cssModule:$.object,dark:$.bool,expand:$.oneOfType([$.bool,$.string]),fixed:$.string,light:$.bool,role:$.string,sticky:$.string,tag:ot},QJ=function(t){return t===!1?!1:t===!0||t==="xs"?"navbar-expand":"navbar-expand-".concat(t)};function H$(e){var t,n=e.expand,r=n===void 0?!1:n,i=e.className,o=e.cssModule,a=e.light,s=e.dark,l=e.fixed,u=e.sticky,f=e.color,d=e.container,p=d===void 0?"fluid":d,v=e.tag,g=v===void 0?"nav":v,y=e.children,w=YJ(e,KJ),b=Be(We(i,"navbar",QJ(r),(t={"navbar-light":a,"navbar-dark":s},gx(t,"bg-".concat(f),f),gx(t,"fixed-".concat(l),l),gx(t,"sticky-".concat(u),u),t)),o),x=p&&p===!0?"container":"container-".concat(p);return V.createElement(g,W2({},w,{className:b}),p?V.createElement("div",{className:x},y):y)}H$.propTypes=XJ;var JJ=["className","cssModule","tag"];function G2(){return G2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var nee={className:$.string,cssModule:$.object,tag:ot};function W$(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"a":r,o=eee(e,JJ),a=Be(We(t,"navbar-brand"),n);return V.createElement(i,G2({},o,{className:a}))}W$.propTypes=nee;var ree=["className","cssModule","children","tag"];function q2(){return q2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function see(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var lee={className:$.string,cssModule:$.object,tag:ot,type:$.string,children:$.node};function G$(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=i===void 0?"button":i,a=aee(e,ree),s=Be(We(t,"navbar-toggler"),n);return V.createElement(o,q2({"aria-label":"Toggle navigation"},iee({type:"button"},a),{className:s}),r||V.createElement("span",{className:Be("navbar-toggler-icon",n)}))}G$.propTypes=lee;var uee=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function K2(){return K2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var dee={card:$.bool,className:$.string,cssModule:$.object,fill:$.bool,horizontal:$.oneOf(["center","end"]),justified:$.bool,navbar:$.bool,pills:$.bool,tabs:$.bool,tag:ot,vertical:$.oneOfType([$.bool,$.string])},hee=function(t){return t===!1?!1:t===!0||t==="xs"?"flex-column":"flex-".concat(t,"-column")};function PT(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,o=e.vertical,a=o===void 0?!1:o,s=e.horizontal,l=e.justified,u=e.fill,f=e.navbar,d=e.card,p=e.tag,v=p===void 0?"ul":p,g=cee(e,uee),y=Be(We(t,f?"navbar-nav":"nav",s?"justify-content-".concat(s):!1,hee(a),{"nav-tabs":r,"card-header-tabs":d&&r,"nav-pills":i,"card-header-pills":d&&i,"nav-justified":l,"nav-fill":u}),n);return V.createElement(v,K2({},g,{className:y}))}PT.propTypes=dee;var pee=["className","cssModule","active","tag"];function Y2(){return Y2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var gee={active:$.bool,className:$.string,cssModule:$.object,tag:ot};function AT(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=i===void 0?"li":i,a=mee(e,pee),s=Be(We(t,"nav-item",r?"active":!1),n);return V.createElement(o,Y2({},a,{className:s}))}AT.propTypes=gee;function Z2(e){"@babel/helpers - typeof";return Z2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z2(e)}var yee=["className","cssModule","active","tag","innerRef"];function X2(){return X2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _ee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function xee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xg(e){return Xg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xg(e)}var Tee={active:$.bool,className:$.string,cssModule:$.object,disabled:$.bool,href:$.any,innerRef:$.oneOfType([$.object,$.func,$.string]),onClick:$.func,tag:ot},K$=function(e){Oee(n,e);var t=See(n);function n(r){var i;return xee(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(q$(i)),i}return wee(n,[{key:"onClick",value:function(i){if(this.props.disabled){i.preventDefault();return}this.props.href==="#"&&i.preventDefault(),this.props.onClick&&this.props.onClick(i)}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.active,l=i.tag,u=l===void 0?"a":l,f=i.innerRef,d=bee(i,yee),p=Be(We(o,"nav-link",{disabled:d.disabled,active:s}),a);return V.createElement(u,X2({},d,{ref:f,onClick:this.onClick,className:p}))}}]),n}(V.Component);K$.propTypes=Tee;const Y$=K$;var Cee=["className","cssModule","variant","innerRef"];function J2(){return J2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Ree={active:$.bool,"aria-label":$.string,onClick:$.func,variant:$.oneOf(["white"]),className:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func])};function Z$(e){var t=e.className;e.cssModule;var n=e.variant,r=e.innerRef,i=kee(e,Cee),o=Be(We(t,"btn-close",n&&"btn-close-".concat(n)));return V.createElement("button",J2({ref:r,type:"button",className:o},Pee({"aria-label":"close"},i)))}Z$.propTypes=Ree;var Lee=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function eO(){return eO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Iee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Dee={active:$.bool,"aria-label":$.string,block:$.bool,children:$.node,className:$.string,cssModule:$.object,close:$.bool,color:$.string,disabled:$.bool,innerRef:$.oneOfType([$.object,$.func,$.string]),onClick:$.func,outline:$.bool,size:$.string,tag:ot};function Ye(e){var t=R.useCallback(function(x){if(e.disabled){x.preventDefault();return}if(e.onClick)return e.onClick(x)},[e.onClick,e.disabled]),n=e.active,r=e["aria-label"],i=e.block,o=e.className,a=e.close,s=e.cssModule,l=e.color,u=l===void 0?"secondary":l,f=e.outline,d=e.size,p=e.tag,v=p===void 0?"button":p,g=e.innerRef,y=Mee(e,Lee);if(a)return V.createElement(Z$,y);var w="btn".concat(f?"-outline":"","-").concat(u),b=Be(We(o,"btn",w,d?"btn-".concat(d):!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return y.href&&v==="button"&&(v="a"),V.createElement(v,eO({type:v==="button"&&y.onClick?"button":void 0},y,{className:b,ref:g,onClick:t,"aria-label":r}))}Ye.propTypes=Dee;var X$=R.createContext(),Q$=R.createContext();function nN(e){var t=e.children,n=R.useState(null),r=n[0],i=n[1],o=R.useRef(!1);R.useEffect(function(){return function(){o.current=!0}},[]);var a=R.useCallback(function(s){o.current||i(s)},[]);return R.createElement(X$.Provider,{value:r},R.createElement(Q$.Provider,{value:a},t))}var J$=function(t){return Array.isArray(t)?t[0]:t},e7=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u")return!1;var t=Br(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Zee(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!fi(o)||!xo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Xee(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!fi(i)||!xo(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Qee={name:"applyStyles",enabled:!0,phase:"write",fn:Zee,effect:Xee,requires:["computeStyles"]};function vo(e){return e.split("-")[0]}var hl=Math.max,Qg=Math.min,vc=Math.round;function nO(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function r7(){return!/^((?!chrome|android).)*safari/i.test(nO())}function gc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&fi(e)&&(i=e.offsetWidth>0&&vc(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&vc(r.height)/e.offsetHeight||1);var a=Cl(e)?Br(e):window,s=a.visualViewport,l=!r7()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,p=r.height/o;return{width:d,height:p,top:f,right:u+d,bottom:f+p,left:u,x:u,y:f}}function RT(e){var t=gc(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function i7(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&NT(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ta(e){return Br(e).getComputedStyle(e)}function Jee(e){return["table","td","th"].indexOf(xo(e))>=0}function ys(e){return((Cl(e)?e.ownerDocument:e.document)||window.document).documentElement}function cb(e){return xo(e)==="html"?e:e.assignedSlot||e.parentNode||(NT(e)?e.host:null)||ys(e)}function aN(e){return!fi(e)||ta(e).position==="fixed"?null:e.offsetParent}function ete(e){var t=/firefox/i.test(nO()),n=/Trident/i.test(nO());if(n&&fi(e)){var r=ta(e);if(r.position==="fixed")return null}var i=cb(e);for(NT(i)&&(i=i.host);fi(i)&&["html","body"].indexOf(xo(i))<0;){var o=ta(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Fp(e){for(var t=Br(e),n=aN(e);n&&Jee(n)&&ta(n).position==="static";)n=aN(n);return n&&(xo(n)==="html"||xo(n)==="body"&&ta(n).position==="static")?t:n||ete(e)||t}function LT(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ud(e,t,n){return hl(e,Qg(t,n))}function tte(e,t,n){var r=Ud(e,t,n);return r>n?n:r}function o7(){return{top:0,right:0,bottom:0,left:0}}function a7(e){return Object.assign({},o7(),e)}function s7(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var nte=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,a7(typeof t!="number"?t:s7(t,$p))};function rte(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=vo(n.placement),l=LT(s),u=[Sr,yi].indexOf(s)>=0,f=u?"height":"width";if(!(!o||!a)){var d=nte(i.padding,n),p=RT(o),v=l==="y"?Or:Sr,g=l==="y"?gi:yi,y=n.rects.reference[f]+n.rects.reference[l]-a[l]-n.rects.popper[f],w=a[l]-n.rects.reference[l],b=Fp(o),x=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,_=y/2-w/2,S=d[v],j=x-p[f]-d[g],E=x/2-p[f]/2+_,C=Ud(S,E,j),N=l;n.modifiersData[r]=(t={},t[N]=C,t.centerOffset=C-E,t)}}function ite(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||i7(t.elements.popper,i)&&(t.elements.arrow=i))}const ote={name:"arrow",enabled:!0,phase:"main",fn:rte,effect:ite,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function yc(e){return e.split("-")[1]}var ate={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ste(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:vc(n*i)/i||0,y:vc(r*i)/i||0}}function sN(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,d=e.isFixed,p=a.x,v=p===void 0?0:p,g=a.y,y=g===void 0?0:g,w=typeof f=="function"?f({x:v,y}):{x:v,y};v=w.x,y=w.y;var b=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),_=Sr,S=Or,j=window;if(u){var E=Fp(n),C="clientHeight",N="clientWidth";if(E===Br(n)&&(E=ys(n),ta(E).position!=="static"&&s==="absolute"&&(C="scrollHeight",N="scrollWidth")),E=E,i===Or||(i===Sr||i===yi)&&o===Ah){S=gi;var I=d&&E===j&&j.visualViewport?j.visualViewport.height:E[C];y-=I-r.height,y*=l?1:-1}if(i===Sr||(i===Or||i===gi)&&o===Ah){_=yi;var M=d&&E===j&&j.visualViewport?j.visualViewport.width:E[N];v-=M-r.width,v*=l?1:-1}}var D=Object.assign({position:s},u&&ate),z=f===!0?ste({x:v,y},Br(n)):{x:v,y};if(v=z.x,y=z.y,l){var q;return Object.assign({},D,(q={},q[S]=x?"0":"",q[_]=b?"0":"",q.transform=(j.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",q))}return Object.assign({},D,(t={},t[S]=x?y+"px":"",t[_]=b?v+"px":"",t.transform="",t))}function lte(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:vo(t.placement),variation:yc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,sN(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,sN(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const ute={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:lte,data:{}};var lv={passive:!0};function cte(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Br(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(f){f.addEventListener("scroll",n.update,lv)}),s&&l.addEventListener("resize",n.update,lv),function(){o&&u.forEach(function(f){f.removeEventListener("scroll",n.update,lv)}),s&&l.removeEventListener("resize",n.update,lv)}}const fte={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:cte,data:{}};var dte={left:"right",right:"left",bottom:"top",top:"bottom"};function eg(e){return e.replace(/left|right|bottom|top/g,function(t){return dte[t]})}var hte={start:"end",end:"start"};function lN(e){return e.replace(/start|end/g,function(t){return hte[t]})}function MT(e){var t=Br(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function IT(e){return gc(ys(e)).left+MT(e).scrollLeft}function pte(e,t){var n=Br(e),r=ys(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=r7();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+IT(e),y:l}}function mte(e){var t,n=ys(e),r=MT(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=hl(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=hl(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+IT(e),l=-r.scrollTop;return ta(i||n).direction==="rtl"&&(s+=hl(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function DT(e){var t=ta(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function l7(e){return["html","body","#document"].indexOf(xo(e))>=0?e.ownerDocument.body:fi(e)&&DT(e)?e:l7(cb(e))}function Bd(e,t){var n;t===void 0&&(t=[]);var r=l7(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Br(r),a=i?[o].concat(o.visualViewport||[],DT(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Bd(cb(a)))}function rO(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vte(e,t){var n=gc(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function uN(e,t,n){return t===t7?rO(pte(e,n)):Cl(t)?vte(t,n):rO(mte(ys(e)))}function gte(e){var t=Bd(cb(e)),n=["absolute","fixed"].indexOf(ta(e).position)>=0,r=n&&fi(e)?Fp(e):e;return Cl(r)?t.filter(function(i){return Cl(i)&&i7(i,r)&&xo(i)!=="body"}):[]}function yte(e,t,n,r){var i=t==="clippingParents"?gte(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var f=uN(e,u,r);return l.top=hl(f.top,l.top),l.right=Qg(f.right,l.right),l.bottom=Qg(f.bottom,l.bottom),l.left=hl(f.left,l.left),l},uN(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function u7(e){var t=e.reference,n=e.element,r=e.placement,i=r?vo(r):null,o=r?yc(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Or:l={x:a,y:t.y-n.height};break;case gi:l={x:a,y:t.y+t.height};break;case yi:l={x:t.x+t.width,y:s};break;case Sr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?LT(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(o){case mc:l[u]=l[u]-(t[f]/2-n[f]/2);break;case Ah:l[u]=l[u]+(t[f]/2-n[f]/2);break}}return l}function kh(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?$ee:s,u=n.rootBoundary,f=u===void 0?t7:u,d=n.elementContext,p=d===void 0?Qf:d,v=n.altBoundary,g=v===void 0?!1:v,y=n.padding,w=y===void 0?0:y,b=a7(typeof w!="number"?w:s7(w,$p)),x=p===Qf?Fee:Qf,_=e.rects.popper,S=e.elements[g?x:p],j=yte(Cl(S)?S:S.contextElement||ys(e.elements.popper),l,f,a),E=gc(e.elements.reference),C=u7({reference:E,element:_,strategy:"absolute",placement:i}),N=rO(Object.assign({},_,C)),I=p===Qf?N:E,M={top:j.top-I.top+b.top,bottom:I.bottom-j.bottom+b.bottom,left:j.left-I.left+b.left,right:I.right-j.right+b.right},D=e.modifiersData.offset;if(p===Qf&&D){var z=D[i];Object.keys(M).forEach(function(q){var W=[yi,gi].indexOf(q)>=0?1:-1,X=[Or,gi].indexOf(q)>=0?"y":"x";M[q]+=z[X]*W})}return M}function bte(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?n7:l,f=yc(r),d=f?s?oN:oN.filter(function(g){return yc(g)===f}):$p,p=d.filter(function(g){return u.indexOf(g)>=0});p.length===0&&(p=d);var v=p.reduce(function(g,y){return g[y]=kh(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[vo(y)],g},{});return Object.keys(v).sort(function(g,y){return v[g]-v[y]})}function _te(e){if(vo(e)===kT)return[];var t=eg(e);return[lN(e),t,lN(t)]}function xte(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,f=n.boundary,d=n.rootBoundary,p=n.altBoundary,v=n.flipVariations,g=v===void 0?!0:v,y=n.allowedAutoPlacements,w=t.options.placement,b=vo(w),x=b===w,_=l||(x||!g?[eg(w)]:_te(w)),S=[w].concat(_).reduce(function(ee,ae){return ee.concat(vo(ae)===kT?bte(t,{placement:ae,boundary:f,rootBoundary:d,padding:u,flipVariations:g,allowedAutoPlacements:y}):ae)},[]),j=t.rects.reference,E=t.rects.popper,C=new Map,N=!0,I=S[0],M=0;M=0,X=W?"width":"height",J=kh(t,{placement:D,boundary:f,rootBoundary:d,altBoundary:p,padding:u}),te=W?q?yi:Sr:q?gi:Or;j[X]>E[X]&&(te=eg(te));var Z=eg(te),B=[];if(o&&B.push(J[z]<=0),s&&B.push(J[te]<=0,J[Z]<=0),B.every(function(ee){return ee})){I=D,N=!1;break}C.set(D,B)}if(N)for(var F=g?3:1,H=function(ae){var oe=S.find(function(fe){var P=C.get(fe);if(P)return P.slice(0,ae).every(function(A){return A})});if(oe)return I=oe,"break"},ne=F;ne>0;ne--){var Y=H(ne);if(Y==="break")break}t.placement!==I&&(t.modifiersData[r]._skip=!0,t.placement=I,t.reset=!0)}}const wte={name:"flip",enabled:!0,phase:"main",fn:xte,requiresIfExists:["offset"],data:{_skip:!1}};function cN(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function fN(e){return[Or,yi,gi,Sr].some(function(t){return e[t]>=0})}function Ote(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=kh(t,{elementContext:"reference"}),s=kh(t,{altBoundary:!0}),l=cN(a,r),u=cN(s,i,o),f=fN(l),d=fN(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const Ste={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ote};function Ete(e,t,n){var r=vo(e),i=[Sr,Or].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Sr,yi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function jte(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=n7.reduce(function(f,d){return f[d]=Ete(d,t.rects,o),f},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Tte={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jte};function Cte(e){var t=e.state,n=e.name;t.modifiersData[n]=u7({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Pte={name:"popperOffsets",enabled:!0,phase:"read",fn:Cte,data:{}};function Ate(e){return e==="x"?"y":"x"}function kte(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,f=n.altBoundary,d=n.padding,p=n.tether,v=p===void 0?!0:p,g=n.tetherOffset,y=g===void 0?0:g,w=kh(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:f}),b=vo(t.placement),x=yc(t.placement),_=!x,S=LT(b),j=Ate(S),E=t.modifiersData.popperOffsets,C=t.rects.reference,N=t.rects.popper,I=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,M=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,z={x:0,y:0};if(E){if(o){var q,W=S==="y"?Or:Sr,X=S==="y"?gi:yi,J=S==="y"?"height":"width",te=E[S],Z=te+w[W],B=te-w[X],F=v?-N[J]/2:0,H=x===mc?C[J]:N[J],ne=x===mc?-N[J]:-C[J],Y=t.elements.arrow,ee=v&&Y?RT(Y):{width:0,height:0},ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:o7(),oe=ae[W],fe=ae[X],P=Ud(0,C[J],ee[J]),A=_?C[J]/2-F-P-oe-M.mainAxis:H-P-oe-M.mainAxis,U=_?-C[J]/2+F+P+fe+M.mainAxis:ne+P+fe+M.mainAxis,Q=t.elements.arrow&&Fp(t.elements.arrow),K=Q?S==="y"?Q.clientTop||0:Q.clientLeft||0:0,ie=(q=D==null?void 0:D[S])!=null?q:0,he=te+A-ie-K,Se=te+U-ie,se=Ud(v?Qg(Z,he):Z,te,v?hl(B,Se):B);E[S]=se,z[S]=se-te}if(s){var pe,me=S==="x"?Or:Sr,xe=S==="x"?gi:yi,Ce=E[j],Te=j==="y"?"height":"width",Pe=Ce+w[me],le=Ce-w[xe],ce=[Or,Sr].indexOf(b)!==-1,ye=(pe=D==null?void 0:D[j])!=null?pe:0,ge=ce?Pe:Ce-C[Te]-N[Te]-ye+M.altAxis,we=ce?Ce+C[Te]+N[Te]-ye-M.altAxis:le,Ae=v&&ce?tte(ge,Ce,we):Ud(v?ge:Pe,Ce,v?we:le);E[j]=Ae,z[j]=Ae-Ce}t.modifiersData[r]=z}}const Nte={name:"preventOverflow",enabled:!0,phase:"main",fn:kte,requiresIfExists:["offset"]};function Rte(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Lte(e){return e===Br(e)||!fi(e)?MT(e):Rte(e)}function Mte(e){var t=e.getBoundingClientRect(),n=vc(t.width)/e.offsetWidth||1,r=vc(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Ite(e,t,n){n===void 0&&(n=!1);var r=fi(t),i=fi(t)&&Mte(t),o=ys(t),a=gc(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((xo(t)!=="body"||DT(o))&&(s=Lte(t)),fi(t)?(l=gc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=IT(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Dte(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function $te(e){var t=Dte(e);return Yee.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Fte(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ute(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var dN={placement:"bottom",modifiers:[],strategy:"absolute"};function hN(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function lne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jg(e){return Jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jg(e)}var pne={a11y:$.bool,disabled:$.bool,direction:$.oneOf(["up","down","start","end","left","right"]),group:$.bool,isOpen:$.bool,nav:$.bool,active:$.bool,size:$.string,tag:ot,toggle:$.func,children:$.node,className:$.string,cssModule:$.object,dropup:$.bool,inNavbar:$.bool,setActiveFromChild:$.bool,menuRole:$.oneOf(["listbox","menu"])},mne={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},vne=[vt.space,vt.enter,vt.up,vt.down,vt.end,vt.home],fb=function(e){cne(n,e);var t=fne(n);function n(r){var i;return lne(this,n),i=t.call(this,r),i.addEvents=i.addEvents.bind(wa(i)),i.handleDocumentClick=i.handleDocumentClick.bind(wa(i)),i.handleKeyDown=i.handleKeyDown.bind(wa(i)),i.removeEvents=i.removeEvents.bind(wa(i)),i.toggle=i.toggle.bind(wa(i)),i.handleMenuRef=i.handleMenuRef.bind(wa(i)),i.handleToggleRef=i.handleToggleRef.bind(wa(i)),i.containerRef=V.createRef(),i.menuRef=V.createRef(),i.toggleRef=V.createRef(),i}return une(n,[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(i){this.props.isOpen!==i.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(i){this.menuRef.current=i}},{key:"handleToggleRef",value:function(i){this.toggleRef.current=i}},{key:"handleDocumentClick",value:function(i){if(!(i&&(i.which===3||i.type==="keyup"&&i.which!==vt.tab))){var o=this.getContainer(),a=this.getMenu(),s=this.getToggle();if(s){var l=s.contains(i.target),u=a&&a.contains(i.target)&&a!==i.target,f=!1;o&&(f=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((l&&!f||u)&&(i.type!=="keyup"||i.which===vt.tab))&&this.toggle(i)}}}},{key:"handleKeyDown",value:function(i){var o=this,a=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",s=this.getMenuCtrl()===i.target,l=vt.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||l&&!this.props.a11y||l&&!(a||s))&&((vne.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(s)if([vt.space,vt.enter,vt.up,vt.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var x;return(x=o.getMenuItems()[0])===null||x===void 0?void 0:x.focus()});else if(this.props.isOpen&&l){var u;i.preventDefault(),(u=this.getMenuItems()[0])===null||u===void 0||u.focus()}else this.props.isOpen&&i.which===vt.esc&&this.toggle(i);if(this.props.isOpen&&a){if([vt.tab,vt.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([vt.space,vt.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([vt.down,vt.up].indexOf(i.which)>-1||[vt.n,vt.p].indexOf(i.which)>-1&&i.ctrlKey){var f=this.getMenuItems(),d=f.indexOf(i.target);vt.up===i.which||vt.p===i.which&&i.ctrlKey?d=d!==0?d-1:f.length-1:(vt.down===i.which||vt.n===i.which&&i.ctrlKey)&&(d=d===f.length-1?0:d+1),f[d].focus()}else if(vt.end===i.which){var p=this.getMenuItems();p[p.length-1].focus()}else if(vt.home===i.which){var v=this.getMenuItems();v[0].focus()}else if(i.which>=48&&i.which<=90)for(var g=this.getMenuItems(),y=String.fromCharCode(i.which).toLowerCase(),w=0;w=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function _ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ey(e){return ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ey(e)}var jne={children:$.node,active:$.bool,disabled:$.bool,divider:$.bool,tag:ot,header:$.bool,onClick:$.func,className:$.string,cssModule:$.object,toggle:$.bool,text:$.bool},$T=function(e){wne(n,e);var t=One(n);function n(r){var i;return _ne(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(cO(i)),i.getTabIndex=i.getTabIndex.bind(cO(i)),i}return xne(n,[{key:"onClick",value:function(i){var o,a=this.props,s=a.disabled,l=a.header,u=a.divider,f=a.text;if(s||l||u||f){i.preventDefault();return}this.props.onClick&&this.props.onClick(i),(!((o=this.props.toggle)!==null&&o!==void 0)||o)&&this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"option":"menuitem"}},{key:"getTabIndex",value:function(){var i=this.props,o=i.disabled,a=i.header,s=i.divider,l=i.text;return o||a||s||l?"-1":"0"}},{key:"render",value:function(){var i=this.getTabIndex(),o=i>-1?this.getRole():void 0,a=gs(this.props,["toggle"]),s=a.className,l=a.cssModule,u=a.divider,f=a.tag,d=f===void 0?"button":f,p=a.header,v=a.active,g=a.text,y=yne(a,gne),w=Be(We(s,{disabled:y.disabled,"dropdown-item":!u&&!p&&!g,active:v,"dropdown-header":p,"dropdown-divider":u,"dropdown-item-text":g}),l);return d==="button"&&(p?d="h6":u?d="div":y.href?d="a":g&&(d="span")),V.createElement(d,lO({type:d==="button"&&(y.onClick||this.props.toggle)?"button":void 0},y,{tabIndex:i,role:o,className:w,onClick:this.onClick}))}}]),n}(V.Component);$T.propTypes=jne;$T.contextType=Nh;const ke=$T;function fO(e){"@babel/helpers - typeof";return fO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fO(e)}var Tne=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function ty(){return ty=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Ine(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ny(e){return ny=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ny(e)}var Vne={tag:ot,children:$.node.isRequired,dark:$.bool,end:$.bool,flip:$.bool,modifiers:$.array,className:$.string,cssModule:$.object,style:$.object,persist:$.bool,strategy:$.string,container:pc,updateOnSelect:$.bool,right:z$($.bool,'Please use "end" instead.')},Hne={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},FT=function(e){$ne(n,e);var t=Fne(n);function n(){return Ine(this,n),t.apply(this,arguments)}return Dne(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.cssModule,l=o.dark,u=o.end,f=o.right,d=o.tag,p=d===void 0?"div":d,v=o.flip,g=v===void 0?!0:v,y=o.modifiers,w=y===void 0?[]:y,b=o.persist,x=o.strategy,_=o.container,S=o.updateOnSelect,j=Lne(o,Tne),E=Be(We(a,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":u||f,show:this.context.isOpen}),s),C=p;if(b||this.context.isOpen&&!this.context.inNavbar){var N=Hne[this.context.direction]||"bottom",I=u||f?"end":"start",M="".concat(N,"-").concat(I),D=[].concat(Pne(w),[{name:"flip",enabled:!!g}]),z={};b&&(z.display="block",z.visibility=this.context.isOpen?"visible":"hidden");var q=V.createElement(c7,{placement:M,modifiers:D,strategy:x},function(X){var J=X.ref,te=X.style,Z=X.placement,B=X.update,F=yx(yx(yx({},i.props.style),z),te),H=function(Y){J(Y);var ee=i.context.onMenuRef;ee&&ee(Y)};return V.createElement(C,ty({tabIndex:"-1",role:i.getRole(),ref:H},j,{style:F,"aria-hidden":!i.context.isOpen,className:E,"data-popper-placement":Z,onClick:function(){return S&&B()}}))});return _?rl.createPortal(q,Ph(_)):q}var W=this.context.onMenuRef;return V.createElement(C,ty({tabIndex:"-1",role:this.getRole()},j,{ref:W,"aria-hidden":!this.context.isOpen,className:E,"data-popper-placement":j.placement,"data-bs-popper":"static"}))}}]),n}(V.Component);FT.propTypes=Vne;FT.contextType=Nh;const tf=FT;function pO(e){"@babel/helpers - typeof";return pO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pO(e)}var Wne=["className","color","cssModule","caret","split","nav","tag","innerRef"];function mO(){return mO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Yne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ry(e){return ry=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ry(e)}var tre={caret:$.bool,color:$.string,children:$.node,className:$.string,cssModule:$.object,disabled:$.bool,onClick:$.func,"aria-haspopup":$.bool,split:$.bool,tag:ot,nav:$.bool,innerRef:$.oneOfType([$.object,$.string,$.func])},nre={color:"secondary","aria-haspopup":!0},db=function(e){Xne(n,e);var t=Qne(n);function n(r){var i;return Yne(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(d7(i)),i}return Zne(n,[{key:"onClick",value:function(i){if(this.props.disabled||this.context.disabled){i.preventDefault();return}this.props.nav&&!this.props.tag&&i.preventDefault(),this.props.onClick&&this.props.onClick(i),this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole||this.props["aria-haspopup"]}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.color,l=o.cssModule,u=o.caret,f=o.split,d=o.nav,p=o.tag,v=o.innerRef,g=qne(o,Wne),y=g["aria-label"]||"Toggle Dropdown",w=Be(We(a,{"dropdown-toggle":u||f,"dropdown-toggle-split":f,"nav-link":d}),l),b=typeof g.children<"u"?g.children:V.createElement("span",{className:"visually-hidden"},y),x;d&&!p?(x="a",g.href="#"):p?x=p:(x=Ye,g.color=s,g.cssModule=l);var _=function(j){var E=j.ref,C=function(I){E(I);var M=i.context.onToggleRef;M&&M(I)};return V.createElement(x,mO({},g,Gne({},typeof x=="string"?"ref":"innerRef",C),{className:w,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:b}))};return this.context.inNavbar?V.createElement(V.Fragment,null,_({ref:this.context.onToggleRef})):V.createElement(ine,{innerRef:v},_)}}]),n}(V.Component);db.propTypes=tre;db.defaultProps=nre;db.contextType=Nh;const nf=db;function rre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function gO(e,t){return gO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},gO(e,t)}function ire(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gO(e,t)}const bN={disabled:!1},h7=V.createContext(null);var ore=function(t){return t.scrollTop},_d="unmounted",Vs="exited",Hs="entering",bu="entered",yO="exiting",Tr=function(e){ire(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Vs,o.appearStatus=Hs):l=bu:r.unmountOnExit||r.mountOnEnter?l=_d:l=Vs,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===_d?{status:Vs}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Hs&&a!==bu&&(o=Hs):(a===Hs||a===bu)&&(o=yO)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Hs){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:rl.findDOMNode(this);a&&ore(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Vs&&this.setState({status:_d})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[rl.findDOMNode(this),s],u=l[0],f=l[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!i&&!a||bN.disabled){this.safeSetState({status:bu},function(){o.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:Hs},function(){o.props.onEntering(u,f),o.onTransitionEnd(p,function(){o.safeSetState({status:bu},function(){o.props.onEntered(u,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:rl.findDOMNode(this);if(!o||bN.disabled){this.safeSetState({status:Vs},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:yO},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Vs},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:rl.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],f=l[1];this.props.addEndListener(u,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===_d)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=rre(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return V.createElement(h7.Provider,{value:null},typeof a=="function"?a(i,s):V.cloneElement(V.Children.only(a),s))},t}(V.Component);Tr.contextType=h7;Tr.propTypes={};function au(){}Tr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:au,onEntering:au,onEntered:au,onExit:au,onExiting:au,onExited:au};Tr.UNMOUNTED=_d;Tr.EXITED=Vs;Tr.ENTERING=Hs;Tr.ENTERED=bu;Tr.EXITING=yO;var are=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function iy(){return iy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function _N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rh(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function pre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ay(e){return ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ay(e)}function wN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bc(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Tre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Cre={body:$.bool,className:$.string,color:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func]),inverse:$.bool,outline:$.bool,tag:ot};function jr(e){var t=e.className,n=e.cssModule,r=e.color,i=e.body,o=e.inverse,a=e.outline,s=e.tag,l=s===void 0?"div":s,u=e.innerRef,f=jre(e,Ere),d=Be(We(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(a?"border":"bg","-").concat(r):!1),n);return V.createElement(l,xO({},f,{className:d,ref:u}))}jr.propTypes=Cre;var Pre=["className","cssModule","innerRef","tag"];function wO(){return wO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nre={className:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func]),tag:ot};function _c(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,a=Are(e,Pre),s=Be(We(t,"card-body"),n);return V.createElement(o,wO({},a,{className:s,ref:r}))}_c.propTypes=Nre;var Rre=["className","cssModule","tag"];function OO(){return OO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Ire={className:$.string,cssModule:$.object,tag:ot};function v7(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Lre(e,Rre),a=Be(We(t,"card-footer"),n);return V.createElement(i,OO({},o,{className:a}))}v7.propTypes=Ire;var Dre=["className","cssModule","tag"];function SO(){return SO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Ure={className:$.string,cssModule:$.object,tag:ot};function xc(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=$re(e,Dre),a=Be(We(t,"card-header"),n);return V.createElement(i,SO({},o,{className:a}))}xc.propTypes=Ure;var Bre=["className","cssModule","tag"];function EO(){return EO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Hre={className:$.string,cssModule:$.object,tag:ot};function g7(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=zre(e,Bre),a=Be(We(t,"card-text"),n);return V.createElement(i,EO({},o,{className:a}))}g7.propTypes=Hre;var Wre=["className","cssModule","tag"];function jO(){return jO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Kre={className:$.string,cssModule:$.object,tag:ot};function y7(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Gre(e,Wre),a=Be(We(t,"card-title"),n);return V.createElement(i,jO({},o,{className:a}))}y7.propTypes=Kre;function TO(e){"@babel/helpers - typeof";return TO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},TO(e)}var Yre=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function CO(){return CO=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tie(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function nie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sy(e){return sy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sy(e)}function EN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ng(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ly(e){return ly=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ly(e)}var zT={children:$.oneOfType([$.node,$.func]),placement:$.oneOf($J),target:pc.isRequired,container:pc,isOpen:$.bool,disabled:$.bool,hideArrow:$.bool,boundariesElement:$.oneOfType([$.string,TT]),className:$.string,innerClassName:$.string,arrowClassName:$.string,popperClassName:$.string,cssModule:$.object,toggle:$.func,autohide:$.bool,placementPrefix:$.string,delay:$.oneOfType([$.shape({show:$.number,hide:$.number}),$.number]),modifiers:$.array,strategy:$.string,offset:$.arrayOf($.number),innerRef:$.oneOfType([$.func,$.string,$.object]),trigger:$.string,fade:$.bool,flip:$.bool},b7={show:0,hide:50},bie={isOpen:!1,hideArrow:!1,autohide:!1,delay:b7,toggle:function(){},trigger:"click",fade:!0};function _7(e,t){return t&&(e===t||t.contains(e))}function TN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return _7(e,n)})[0]}var VT=function(e){mie(n,e);var t=vie(n);function n(r){var i;return hie(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(Ar(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Ar(i)),i.removeTargetEvents=i.removeTargetEvents.bind(Ar(i)),i.toggle=i.toggle.bind(Ar(i)),i.showWithDelay=i.showWithDelay.bind(Ar(i)),i.hideWithDelay=i.hideWithDelay.bind(Ar(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(Ar(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(Ar(i)),i.show=i.show.bind(Ar(i)),i.hide=i.hide.bind(Ar(i)),i.onEscKeyDown=i.onEscKeyDown.bind(Ar(i)),i.getRef=i.getRef.bind(Ar(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return pie(n,[{key:"componentDidMount",value:function(){this._isMounted=!0,this.updateTarget()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}},{key:"handleDocumentClick",value:function(i){var o=this.props.trigger.split(" ");o.indexOf("legacy")>-1&&(this.props.isOpen||TN(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!_7(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&TN(i.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(i):this.showWithDelay(i))}},{key:"onMouseOverTooltipContent",value:function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}},{key:"onMouseLeaveTooltipContent",value:function(i){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),i.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide")))}},{key:"onEscKeyDown",value:function(i){i.key==="Escape"&&this.hide(i)}},{key:"getRef",value:function(i){var o=this.props.innerRef;o&&(typeof o=="function"?o(i):Lh(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return Lh(o)==="object"?isNaN(o[i])?b7[i]:o[i]:o}},{key:"getCurrentTarget",value:function(i){if(!i)return null;var o=this._targets.indexOf(i);return o>=0?this._targets[o]:this.getCurrentTarget(i.parentElement)}},{key:"show",value:function(i){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=i?i.currentTarget||this.getCurrentTarget(i.target):null,i&&i.composedPath&&typeof i.composedPath=="function"){var o=i.composedPath();this.currentTargetElement=o&&o[0]||this.currentTargetElement}this.toggle(i)}}},{key:"showWithDelay",value:function(i){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,i),this.getDelay("show"))}},{key:"hide",value:function(i){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(i))}},{key:"hideWithDelay",value:function(i){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide"))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"addEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.addEventListener(i,o,a)})}},{key:"removeEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.removeEventListener(i,o,a)})}},{key:"addTargetEvents",value:function(){if(this.props.trigger){var i=this.props.trigger.split(" ");i.indexOf("manual")===-1&&((i.indexOf("click")>-1||i.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(i.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),i.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}},{key:"removeTargetEvents",value:function(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}},{key:"updateTarget",value:function(){var i=Ph(this.props.target,!0);i!==this._targets&&(this.removeTargetEvents(),this._targets=i?Array.from(i):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}},{key:"toggle",value:function(i){return this.props.disabled||!this._isMounted?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i=this;this.props.isOpen&&this.updateTarget();var o=this.currentTargetElement||this._targets[0];if(!o)return null;var a=this.props,s=a.className,l=a.cssModule,u=a.innerClassName,f=a.isOpen,d=a.hideArrow,p=a.boundariesElement,v=a.placement,g=a.placementPrefix,y=a.arrowClassName,w=a.popperClassName,b=a.container,x=a.modifiers,_=a.strategy,S=a.offset,j=a.fade,E=a.flip,C=a.children,N=gs(this.props,Object.keys(zT)),I=Be(w,l),M=Be(u,l);return V.createElement(die,{className:s,target:o,isOpen:f,hideArrow:d,boundariesElement:p,placement:v,placementPrefix:g,arrowClassName:y,popperClassName:I,container:b,modifiers:x,strategy:_,offset:S,cssModule:l,fade:j,flip:E},function(D){var z=D.update;return V.createElement("div",kO({},N,{ref:i.getRef,className:M,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof C=="function"?C({update:z}):C)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(V.Component);VT.propTypes=zT;VT.defaultProps=bie;const _ie=VT;var xie=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"];function uy(){return uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sie(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Eie={animated:$.bool,bar:$.bool,barAriaLabelledBy:$.string,barAriaValueText:$.string,barClassName:$.string,barStyle:$.object,children:$.node,className:$.string,cssModule:$.object,color:$.string,max:$.oneOfType([$.string,$.number]),min:$.oneOfType([$.string,$.number]),multi:$.bool,striped:$.bool,style:$.object,tag:ot,value:$.oneOfType([$.string,$.number])};function x7(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,a=o===void 0?0:o,s=e.min,l=s===void 0?0:s,u=e.max,f=u===void 0?100:u,d=e.animated,p=e.striped,v=e.color,g=e.bar,y=e.multi,w=e.tag,b=w===void 0?"div":w,x=e.style,_=x===void 0?{}:x,S=e.barStyle,j=S===void 0?{}:S,E=e.barAriaValueText,C=e.barAriaLabelledBy,N=Oie(e,xie),I=X3(a)/X3(f)*100,M=Be(We(n,"progress"),i),D=Be(We("progress-bar",g&&n||r,d?"progress-bar-animated":null,v?"bg-".concat(v):null,p||d?"progress-bar-striped":null),i),z={className:D,style:bx(bx(bx({},g?_:{}),j),{},{width:"".concat(I,"%")}),role:"progressbar","aria-valuenow":a,"aria-valuemin":l,"aria-valuemax":f,"aria-valuetext":E,"aria-labelledby":C,children:t};return g?V.createElement(b,uy({},N,z)):V.createElement(b,uy({},N,{style:_,className:M}),y?t:V.createElement("div",z))}x7.propTypes=Eie;function RO(e){"@babel/helpers - typeof";return RO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RO(e)}function jie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cy(e){return cy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cy(e)}var Rie={children:$.node.isRequired,node:$.any},w7=function(e){Cie(n,e);var t=Pie(n);function n(){return jie(this,n),t.apply(this,arguments)}return Tie(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return CT?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),rl.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(V.Component);w7.propTypes=Rie;const Lie=w7;function MO(e){"@babel/helpers - typeof";return MO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},MO(e)}function AN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lu(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fy(e){return fy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fy(e)}function dy(){}var NN=$.shape(or.propTypes),O7={autoFocus:$.bool,backdrop:$.oneOfType([$.bool,$.oneOf(["static"])]),backdropClassName:$.string,backdropTransition:NN,centered:$.bool,children:$.node,contentClassName:$.string,className:$.string,container:pc,cssModule:$.object,external:$.node,fade:$.bool,fullscreen:$.oneOfType([$.bool,$.oneOf(["sm","md","lg","xl"])]),innerRef:$.oneOfType([$.object,$.string,$.func]),isOpen:$.bool,keyboard:$.bool,labelledBy:$.string,modalClassName:$.string,modalTransition:NN,onClosed:$.func,onEnter:$.func,onExit:$.func,onOpened:$.func,returnFocusAfterClose:$.bool,role:$.string,scrollable:$.bool,size:$.string,toggle:$.func,trapFocus:$.bool,unmountOnClose:$.bool,wrapClassName:$.string,zIndex:$.oneOfType([$.number,$.string])},Bie=Object.keys(O7),zie={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:dy,onClosed:dy,modalTransition:{timeout:Yg.Modal},backdropTransition:{mountOnEnter:!0,timeout:Yg.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},Bp=function(e){Die(n,e);var t=$ie(n);function n(r){var i;return Mie(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(ei(i)),i.handleBackdropClick=i.handleBackdropClick.bind(ei(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(ei(i)),i.handleEscape=i.handleEscape.bind(ei(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(ei(i)),i.handleTab=i.handleTab.bind(ei(i)),i.onOpened=i.onOpened.bind(ei(i)),i.onClosed=i.onClosed.bind(ei(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(ei(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(ei(i)),i.trapFocus=i.trapFocus.bind(ei(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return Iie(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,a=i.autoFocus,s=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),a&&this.setFocus()),s&&s(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Ph(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=LJ(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),MJ(),n.openCount===0&&(document.body.className=We(document.body.className,Be("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=Be("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),U$(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,a=gs(this.props,Bie),s="modal-dialog";return V.createElement("div",zd({},a,{className:Be(We(s,this.props.className,(i={},_u(i,"modal-".concat(this.props.size),this.props.size),_u(i,"".concat(s,"-centered"),this.props.centered),_u(i,"".concat(s,"-scrollable"),this.props.scrollable),_u(i,"modal-fullscreen",this.props.fullscreen===!0),_u(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(u){o._dialog=u}}),V.createElement("div",{className:Be(We("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var a=this.props,s=a.wrapClassName,l=a.modalClassName,u=a.backdropClassName,f=a.cssModule,d=a.isOpen,p=a.backdrop,v=a.role,g=a.labelledBy,y=a.external,w=a.innerRef,b={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":g,"aria-modal":!0,role:v,tabIndex:"-1"},x=this.props.fade,_=lu(lu(lu({},or.defaultProps),this.props.modalTransition),{},{baseClass:x?this.props.modalTransition.baseClass:"",timeout:x?this.props.modalTransition.timeout:0}),S=lu(lu(lu({},or.defaultProps),this.props.backdropTransition),{},{baseClass:x?this.props.backdropTransition.baseClass:"",timeout:x?this.props.backdropTransition.timeout:0}),j=p&&(x?V.createElement(or,zd({},S,{in:d&&!!p,cssModule:f,className:Be(We("modal-backdrop",u),f)})):V.createElement("div",{className:Be(We("modal-backdrop","show",u),f)}));return V.createElement(Lie,{node:this._element},V.createElement("div",{className:Be(s)},V.createElement(or,zd({},b,_,{in:d,onEntered:this.onOpened,onExited:this.onClosed,cssModule:f,className:Be(We("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),f),innerRef:w}),y,this.renderModalDialog()),j))}return null}}]),n}(V.Component);Bp.propTypes=O7;Bp.defaultProps=zie;Bp.openCount=0;Bp.originalBodyOverflow=null;const To=Bp;var Vie=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function DO(){return DO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wie(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Gie={children:$.node,className:$.string,close:$.object,closeAriaLabel:$.string,cssModule:$.object,tag:ot,toggle:$.func,wrapTag:ot};function Co(e){var t,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,a=e.tag,s=a===void 0?"h5":a,l=e.wrapTag,u=l===void 0?"div":l,f=e.closeAriaLabel,d=f===void 0?"Close":f,p=e.close,v=Hie(e,Vie),g=Be(We(n,"modal-header"),r);return!p&&o&&(t=V.createElement("button",{type:"button",onClick:o,className:Be("btn-close",r),"aria-label":d})),V.createElement(u,DO({},v,{className:g}),V.createElement(s,{className:Be("modal-title",r)},i),p||t)}Co.propTypes=Gie;var qie=["className","cssModule","tag"];function $O(){return $O=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yie(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Zie={className:$.string,cssModule:$.object,tag:ot};function qi(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Kie(e,qie),a=Be(We(t,"modal-body"),n);return V.createElement(i,$O({},o,{className:a}))}qi.propTypes=Zie;var Xie=["className","cssModule","tag"];function FO(){return FO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jie(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var eoe={className:$.string,cssModule:$.object,tag:ot};function bs(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Qie(e,Xie),a=Be(We(t,"modal-footer"),n);return V.createElement(i,FO({},o,{className:a}))}bs.propTypes=eoe;function UO(){return UO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ioe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ooe={className:$.string,cssModule:$.object,flush:$.bool,horizontal:$.oneOfType([$.bool,$.string]),numbered:$.bool,tag:ot},aoe=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function S7(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"ul":r,o=e.flush,a=e.horizontal,s=a===void 0?!1:a,l=e.numbered,u=l===void 0?!1:l,f=roe(e,noe),d=Be(We(t,"list-group",o?"list-group-flush":aoe(s),{"list-group-numbered":u}),n);return V.createElement(i,BO({},f,{className:d}))}S7.propTypes=ooe;var soe=["className","cssModule","row","disabled","check","inline","floating","noMargin","tag","switch"];function zO(){return zO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uoe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var coe={children:$.node,row:$.bool,check:$.bool,switch:$.bool,inline:$.bool,floating:$.bool,noMargin:$.bool,disabled:$.bool,tag:ot,className:$.string,cssModule:$.object};function co(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,a=e.inline,s=e.floating,l=e.noMargin,u=e.tag,f=u===void 0?"div":u,d=e.switch,p=loe(e,soe),v=o||d,g=Be(We(t,r?"row":!1,v?"form-check":!1,d?"form-switch":!1,v||l?!1:"mb-3",v&&a?"form-check-inline":!1,v&&i?"disabled":!1,s&&"form-floating"),n);return f==="fieldset"&&(p.disabled=i),V.createElement(f,zO({},p,{className:g}))}co.propTypes=coe;function VO(e){"@babel/helpers - typeof";return VO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},VO(e)}var foe=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function HO(){return HO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hoe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function poe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hy(e){return hy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hy(e)}var _oe={children:$.node,type:$.string,size:$.oneOfType([$.number,$.string]),bsSize:$.string,valid:$.bool,invalid:$.bool,tag:ot,innerRef:$.oneOfType([$.object,$.func,$.string]),plaintext:$.bool,addon:$.bool,className:$.string,cssModule:$.object},E7=function(e){voe(n,e);var t=goe(n);function n(r){var i;return poe(this,n),i=t.call(this,r),i.getRef=i.getRef.bind(GO(i)),i.focus=i.focus.bind(GO(i)),i}return moe(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.type,l=s===void 0?"text":s,u=i.bsSize,f=i.valid,d=i.invalid,p=i.tag,v=i.addon,g=i.plaintext,y=i.innerRef,w=doe(i,foe),b=["switch","radio","checkbox"].indexOf(l)>-1,x=/\D/g,_=l==="textarea",S=l==="select",j=l==="range",E=p||(S||_?l:"input"),C="form-control";g?(C="".concat(C,"-plaintext"),E=p||"input"):j?C="form-range":S?C="form-select":b&&(v?C=null:C="form-check-input"),w.size&&x.test(w.size)&&(z2(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),u=w.size,delete w.size);var N=Be(We(o,d&&"is-invalid",f&&"is-valid",u?S?"form-select-".concat(u):"form-control-".concat(u):!1,C),a);return(E==="input"||p&&typeof p=="function")&&(w.type=l==="switch"?"checkbox":l),w.children&&!(g||l==="select"||typeof E!="string"||E==="select")&&(z2('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete w.children),V.createElement(E,HO({},w,{ref:y,className:N,"aria-invalid":d}))}}]),n}(V.Component);E7.propTypes=_oe;const Kn=E7;var xoe=["className","cssModule","tag","type","size"];function py(){return py=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ooe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Soe={className:$.string,cssModule:$.object,size:$.string,tag:ot,type:$.string};function hb(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,a=woe(e,xoe),s=Be(We(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?V.createElement(Up,py({},a,{className:s})):V.createElement(f7.Provider,{value:{insideInputGroup:!0}},V.createElement(i,py({},a,{className:s})))}hb.propTypes=Soe;var Eoe=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function qO(){return qO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Coe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Poe={children:$.node,className:$.string,listClassName:$.string,cssModule:$.object,size:$.string,tag:ot,listTag:ot,"aria-label":$.string};function HT(e){var t=e.className,n=e.listClassName,r=e.cssModule,i=e.size,o=e.tag,a=o===void 0?"nav":o,s=e.listTag,l=s===void 0?"ul":s,u=e["aria-label"],f=u===void 0?"pagination":u,d=Toe(e,Eoe),p=Be(We(t),r),v=Be(We(n,"pagination",joe({},"pagination-".concat(i),!!i)),r);return V.createElement(a,{className:p,"aria-label":f},V.createElement(l,qO({},d,{className:v})))}HT.propTypes=Poe;var Aoe=["active","className","cssModule","disabled","tag"];function KO(){return KO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Noe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Roe={active:$.bool,children:$.node,className:$.string,cssModule:$.object,disabled:$.bool,tag:ot};function pl(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=o===void 0?"li":o,s=koe(e,Aoe),l=Be(We(n,"page-item",{active:t,disabled:i}),r);return V.createElement(a,KO({},s,{className:l}))}pl.propTypes=Roe;var Loe=["className","cssModule","next","previous","first","last","tag"];function YO(){return YO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ioe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Doe={"aria-label":$.string,children:$.node,className:$.string,cssModule:$.object,next:$.bool,previous:$.bool,first:$.bool,last:$.bool,tag:ot};function ml(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.first,a=e.last,s=e.tag,l=s===void 0?"a":s,u=Moe(e,Loe),f=Be(We(t,"page-link"),n),d;i?d="Previous":r?d="Next":o?d="First":a&&(d="Last");var p=e["aria-label"]||d,v;i?v="‹":r?v="›":o?v="«":a&&(v="»");var g=e.children;return g&&Array.isArray(g)&&g.length===0&&(g=null),!u.href&&l==="a"&&(l="button"),(i||r||o||a)&&(g=[V.createElement("span",{"aria-hidden":"true",key:"caret"},g||v),V.createElement("span",{className:"visually-hidden",key:"ariaLabel"},p)]),V.createElement(l,YO({},u,{className:f,"aria-label":p}),g)}ml.propTypes=Doe;var $oe=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function ZO(){return ZO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Boe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var zoe={children:$.node,className:$.string,closeClassName:$.string,closeAriaLabel:$.string,color:$.string,cssModule:$.object,fade:$.bool,innerRef:$.oneOfType([$.object,$.string,$.func]),isOpen:$.bool,tag:ot,toggle:$.func,transition:$.shape(or.propTypes)};function j7(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=r===void 0?"Close":r,o=e.cssModule,a=e.tag,s=a===void 0?"div":a,l=e.color,u=l===void 0?"success":l,f=e.isOpen,d=f===void 0?!0:f,p=e.toggle,v=e.children,g=e.transition,y=g===void 0?Jf(Jf({},or.defaultProps),{},{unmountOnExit:!0}):g,w=e.fade,b=w===void 0?!0:w,x=e.innerRef,_=Uoe(e,$oe),S=Be(We(t,"alert","alert-".concat(u),{"alert-dismissible":p}),o),j=Be(We("btn-close",n),o),E=Jf(Jf(Jf({},or.defaultProps),y),{},{baseClass:b?y.baseClass:"",timeout:b?y.timeout:0});return V.createElement(or,ZO({},_,E,{tag:s,className:S,in:d,role:"alert",innerRef:x}),p?V.createElement("button",{type:"button",className:j,"aria-label":i,onClick:p}):null,v)}j7.propTypes=zoe;var Voe=["className","cssModule","tag","active","disabled","action","color"];function XO(){return XO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Woe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Goe={action:$.bool,active:$.bool,className:$.string,cssModule:$.object,color:$.string,disabled:$.bool,tag:ot},qoe=function(t){t.preventDefault()};function T7(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"li":r,o=e.active,a=e.disabled,s=e.action,l=e.color,u=Hoe(e,Voe),f=Be(We(t,o?"active":!1,a?"disabled":!1,s?"list-group-item-action":!1,l?"list-group-item-".concat(l):!1,"list-group-item"),n);return a&&(u.onClick=qoe),V.createElement(i,XO({},u,{className:f}))}T7.propTypes=Goe;function QO(e){"@babel/helpers - typeof";return QO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},QO(e)}function MN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Koe(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function my(e){return my=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},my(e)}var nae=["defaultOpen"],Vp=function(e){Qoe(n,e);var t=Joe(n);function n(r){var i;return Zoe(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(C7(i)),i}return Xoe(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(a){return{isOpen:!a.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return V.createElement(Up,JO({isOpen:this.state.isOpen,toggle:this.toggle},gs(this.props,nae)))}}]),n}(R.Component);Vp.propTypes=Koe({defaultOpen:$.bool,onToggle:$.func},Up.propTypes);function tS(e){"@babel/helpers - typeof";return tS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tS(e)}function DN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rae(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vy(e){return vy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vy(e)}var fae=["defaultOpen"],Cr=function(e){sae(n,e);var t=lae(n);function n(r){var i;return oae(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(P7(i)),i}return aae(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return V.createElement(zp,nS({isOpen:this.state.isOpen,toggle:this.toggle},gs(this.props,fae)))}}]),n}(R.Component);Cr.propTypes=rae({defaultOpen:$.bool},zp.propTypes);function A7(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t({error:"border-danger",default:""})[e],hae=e=>({error:"text-danger",default:"text-muted"})[e],na=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=di({"col-md-12":i,"col-md-10 offset-md-1":!i});return m.jsx(ir,{className:di("g-0",e),children:m.jsx("div",{className:o,children:m.jsx(jr,{className:dae(r),body:!0,children:m.jsxs("h3",{className:di("text-center mb-0",hae(r)),children:[n&&m.jsx(je,{icon:t$,spin:!0}),n&&m.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},Ot=({title:e,children:t,bodyClassName:n,...r})=>m.jsxs(jr,{...r,children:[e&&m.jsx(xc,{role:"heading","aria-level":4,children:e}),m.jsx(_c,{className:n,children:t})]}),ur=({children:e,type:t,className:n,small:r=!1})=>m.jsx(ir,{className:n,children:m.jsx("div",{className:di({"col-md-10 offset-md-1":!r,"col-12":r}),children:m.jsx(Ot,{role:"document",className:di("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:di({"p-2":r}),children:e})})});let uv;const pae=new Uint8Array(16);function mae(){if(!uv&&(uv=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!uv))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return uv(pae)}const Dn=[];for(let e=0;e<256;++e)Dn.push((e+256).toString(16).slice(1));function vae(e,t=0){return Dn[e[t+0]]+Dn[e[t+1]]+Dn[e[t+2]]+Dn[e[t+3]]+"-"+Dn[e[t+4]]+Dn[e[t+5]]+"-"+Dn[e[t+6]]+Dn[e[t+7]]+"-"+Dn[e[t+8]]+Dn[e[t+9]]+"-"+Dn[e[t+10]]+Dn[e[t+11]]+Dn[e[t+12]]+Dn[e[t+13]]+Dn[e[t+14]]+Dn[e[t+15]]}const gae=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),FN={randomUUID:gae};function yae(e,t,n){if(FN.randomUUID&&!t&&!e)return FN.randomUUID();e=e||{};const r=e.random||(e.rng||mae)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return vae(r)}var bae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xae(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var wae=Error,Oae=EvalError,Sae=RangeError,Eae=ReferenceError,k7=SyntaxError,Hp=TypeError,jae=URIError,Tae=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0},UN=typeof Symbol<"u"&&Symbol,Cae=Tae,Pae=function(){return typeof UN!="function"||typeof Symbol!="function"||typeof UN("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Cae()},BN={foo:{}},Aae=Object,kae=function(){return{__proto__:BN}.foo===BN.foo&&!({__proto__:null}instanceof Aae)},Nae="Function.prototype.bind called on incompatible ",Rae=Object.prototype.toString,Lae=Math.max,Mae="[object Function]",zN=function(e,t){for(var n=[],r=0;r"u"||!En?st:En(Uint8Array),gl={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?st:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?st:ArrayBuffer,"%ArrayIteratorPrototype%":uu&&En?En([][Symbol.iterator]()):st,"%AsyncFromSyncIteratorPrototype%":st,"%AsyncFunction%":xu,"%AsyncGenerator%":xu,"%AsyncGeneratorFunction%":xu,"%AsyncIteratorPrototype%":xu,"%Atomics%":typeof Atomics>"u"?st:Atomics,"%BigInt%":typeof BigInt>"u"?st:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?st:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?st:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?st:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Hae,"%eval%":eval,"%EvalError%":Wae,"%Float32Array%":typeof Float32Array>"u"?st:Float32Array,"%Float64Array%":typeof Float64Array>"u"?st:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?st:FinalizationRegistry,"%Function%":N7,"%GeneratorFunction%":xu,"%Int8Array%":typeof Int8Array>"u"?st:Int8Array,"%Int16Array%":typeof Int16Array>"u"?st:Int16Array,"%Int32Array%":typeof Int32Array>"u"?st:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":uu&&En?En(En([][Symbol.iterator]())):st,"%JSON%":typeof JSON=="object"?JSON:st,"%Map%":typeof Map>"u"?st:Map,"%MapIteratorPrototype%":typeof Map>"u"||!uu||!En?st:En(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?st:Promise,"%Proxy%":typeof Proxy>"u"?st:Proxy,"%RangeError%":Gae,"%ReferenceError%":qae,"%Reflect%":typeof Reflect>"u"?st:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?st:Set,"%SetIteratorPrototype%":typeof Set>"u"||!uu||!En?st:En(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?st:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":uu&&En?En(""[Symbol.iterator]()):st,"%Symbol%":uu?Symbol:st,"%SyntaxError%":wc,"%ThrowTypeError%":Yae,"%TypedArray%":Xae,"%TypeError%":Ju,"%Uint8Array%":typeof Uint8Array>"u"?st:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?st:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?st:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?st:Uint32Array,"%URIError%":Kae,"%WeakMap%":typeof WeakMap>"u"?st:WeakMap,"%WeakRef%":typeof WeakRef>"u"?st:WeakRef,"%WeakSet%":typeof WeakSet>"u"?st:WeakSet};if(En)try{null.error}catch(e){var Qae=En(En(e));gl["%Error.prototype%"]=Qae}var Jae=function e(t){var n;if(t==="%AsyncFunction%")n=_x("async function () {}");else if(t==="%GeneratorFunction%")n=_x("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=_x("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&En&&(n=En(i.prototype))}return gl[t]=n,n},VN={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Wp=WT,gy=Vae,ese=Wp.call(Function.call,Array.prototype.concat),tse=Wp.call(Function.apply,Array.prototype.splice),HN=Wp.call(Function.call,String.prototype.replace),yy=Wp.call(Function.call,String.prototype.slice),nse=Wp.call(Function.call,RegExp.prototype.exec),rse=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ise=/\\(\\)?/g,ose=function(e){var t=yy(e,0,1),n=yy(e,-1);if(t==="%"&&n!=="%")throw new wc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new wc("invalid intrinsic syntax, expected opening `%`");var r=[];return HN(e,rse,function(i,o,a,s){r[r.length]=a?HN(s,ise,"$1"):o||i}),r},ase=function(e,t){var n=e,r;if(gy(VN,n)&&(r=VN[n],n="%"+r[0]+"%"),gy(gl,n)){var i=gl[n];if(i===xu&&(i=Jae(n)),typeof i>"u"&&!t)throw new Ju("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new wc("intrinsic "+e+" does not exist!")},rf=function(e,t){if(typeof e!="string"||e.length===0)throw new Ju("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Ju('"allowMissing" argument must be a boolean');if(nse(/^%?[^%]*%?$/,e)===null)throw new wc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ose(e),r=n.length>0?n[0]:"",i=ase("%"+r+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(r=l[0],tse(n,ese([0,1],l)));for(var u=1,f=!0;u=n.length){var g=vl(a,d);f=!!g,f&&"get"in g&&!("originalValue"in g.get)?a=g.get:a=a[d]}else f=gy(a,d),a=a[d];f&&!s&&(gl[o]=a)}}return a},R7={exports:{}},wx,WN;function GT(){if(WN)return wx;WN=1;var e=rf,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return wx=t,wx}var sse=rf,rg=sse("%Object.getOwnPropertyDescriptor%",!0);if(rg)try{rg([],"length")}catch{rg=null}var L7=rg,GN=GT(),lse=k7,cu=Hp,qN=L7,use=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new cu("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new cu("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new cu("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new cu("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new cu("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new cu("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,s=!!qN&&qN(e,t);if(GN)GN(e,t,{configurable:o===null&&s?s.configurable:!o,enumerable:r===null&&s?s.enumerable:!r,value:n,writable:i===null&&s?s.writable:!i});else if(a||!r&&!i&&!o)e[t]=n;else throw new lse("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},iS=GT(),M7=function(){return!!iS};M7.hasArrayLengthDefineBug=function(){if(!iS)return null;try{return iS([],"length",{value:1}).length!==1}catch{return!0}};var cse=M7,fse=rf,KN=use,dse=cse(),YN=L7,ZN=Hp,hse=fse("%Math.floor%"),pse=function(e,t){if(typeof e!="function")throw new ZN("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||hse(t)!==t)throw new ZN("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,i=!0;if("length"in e&&YN){var o=YN(e,"length");o&&!o.configurable&&(r=!1),o&&!o.writable&&(i=!1)}return(r||i||!n)&&(dse?KN(e,"length",t,!0,!0):KN(e,"length",t)),e};(function(e){var t=WT,n=rf,r=pse,i=Hp,o=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(a,o),l=GT(),u=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var p=s(t,a,arguments);return r(p,1+u(0,d.length-(arguments.length-1)),!0)};var f=function(){return s(t,o,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f})(R7);var mse=R7.exports,I7=rf,D7=mse,vse=D7(I7("String.prototype.indexOf")),gse=function(e,t){var n=I7(e,!!t);return typeof n=="function"&&vse(e,".prototype.")>-1?D7(n):n};const yse={},bse=Object.freeze(Object.defineProperty({__proto__:null,default:yse},Symbol.toStringTag,{value:"Module"})),_se=xae(bse);var qT=typeof Map=="function"&&Map.prototype,Ox=Object.getOwnPropertyDescriptor&&qT?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,by=qT&&Ox&&typeof Ox.get=="function"?Ox.get:null,XN=qT&&Map.prototype.forEach,KT=typeof Set=="function"&&Set.prototype,Sx=Object.getOwnPropertyDescriptor&&KT?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,_y=KT&&Sx&&typeof Sx.get=="function"?Sx.get:null,QN=KT&&Set.prototype.forEach,xse=typeof WeakMap=="function"&&WeakMap.prototype,Vd=xse?WeakMap.prototype.has:null,wse=typeof WeakSet=="function"&&WeakSet.prototype,Hd=wse?WeakSet.prototype.has:null,Ose=typeof WeakRef=="function"&&WeakRef.prototype,JN=Ose?WeakRef.prototype.deref:null,Sse=Boolean.prototype.valueOf,Ese=Object.prototype.toString,jse=Function.prototype.toString,Tse=String.prototype.match,YT=String.prototype.slice,$a=String.prototype.replace,Cse=String.prototype.toUpperCase,eR=String.prototype.toLowerCase,$7=RegExp.prototype.test,tR=Array.prototype.concat,so=Array.prototype.join,Pse=Array.prototype.slice,nR=Math.floor,oS=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ex=Object.getOwnPropertySymbols,aS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Oc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Xn=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Oc||!0)?Symbol.toStringTag:null,F7=Object.prototype.propertyIsEnumerable,rR=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function iR(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||$7.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-nR(-e):nR(e);if(r!==e){var i=String(r),o=YT.call(t,i.length+1);return $a.call(i,n,"$&_")+"."+$a.call($a.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $a.call(t,n,"$&_")}var sS=_se,oR=sS.custom,aR=B7(oR)?oR:null,Ase=function e(t,n,r,i){var o=n||{};if(Pa(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Pa(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Pa(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Pa(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Pa(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return V7(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?iR(t,l):l}if(typeof t=="bigint"){var u=String(t)+"n";return s?iR(t,u):u}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return lS(t)?"[Array]":"[Object]";var d=Kse(o,r);if(typeof i>"u")i=[];else if(z7(i,t)>=0)return"[Circular]";function p(q,W,X){if(W&&(i=Pse.call(i),i.push(W)),X){var J={depth:o.depth};return Pa(o,"quoteStyle")&&(J.quoteStyle=o.quoteStyle),e(q,J,r+1,i)}return e(q,o,r+1,i)}if(typeof t=="function"&&!sR(t)){var v=Fse(t),g=cv(t,p);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(g.length>0?" { "+so.call(g,", ")+" }":"")}if(B7(t)){var y=Oc?$a.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):aS.call(t);return typeof t=="object"&&!Oc?ed(y):y}if(Wse(t)){for(var w="<"+eR.call(String(t.nodeName)),b=t.attributes||[],x=0;x",w}if(lS(t)){if(t.length===0)return"[]";var _=cv(t,p);return d&&!qse(_)?"["+uS(_,d)+"]":"[ "+so.call(_,", ")+" ]"}if(Rse(t)){var S=cv(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!F7.call(t,"cause")?"{ ["+String(t)+"] "+so.call(tR.call("[cause]: "+p(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+so.call(S,", ")+" }"}if(typeof t=="object"&&a){if(aR&&typeof t[aR]=="function"&&sS)return sS(t,{depth:f-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Use(t)){var j=[];return XN&&XN.call(t,function(q,W){j.push(p(W,t,!0)+" => "+p(q,t))}),lR("Map",by.call(t),j,d)}if(Vse(t)){var E=[];return QN&&QN.call(t,function(q){E.push(p(q,t))}),lR("Set",_y.call(t),E,d)}if(Bse(t))return jx("WeakMap");if(Hse(t))return jx("WeakSet");if(zse(t))return jx("WeakRef");if(Mse(t))return ed(p(Number(t)));if(Dse(t))return ed(p(oS.call(t)));if(Ise(t))return ed(Sse.call(t));if(Lse(t))return ed(p(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===bae)return"{ [object globalThis] }";if(!Nse(t)&&!sR(t)){var C=cv(t,p),N=rR?rR(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",M=!N&&Xn&&Object(t)===t&&Xn in t?YT.call(_s(t),8,-1):I?"Object":"",D=N||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",z=D+(M||I?"["+so.call(tR.call([],M||[],I||[]),": ")+"] ":"");return C.length===0?z+"{}":d?z+"{"+uS(C,d)+"}":z+"{ "+so.call(C,", ")+" }"}return String(t)};function U7(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function kse(e){return $a.call(String(e),/"/g,""")}function lS(e){return _s(e)==="[object Array]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function Nse(e){return _s(e)==="[object Date]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function sR(e){return _s(e)==="[object RegExp]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function Rse(e){return _s(e)==="[object Error]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function Lse(e){return _s(e)==="[object String]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function Mse(e){return _s(e)==="[object Number]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function Ise(e){return _s(e)==="[object Boolean]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function B7(e){if(Oc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!aS)return!1;try{return aS.call(e),!0}catch{}return!1}function Dse(e){if(!e||typeof e!="object"||!oS)return!1;try{return oS.call(e),!0}catch{}return!1}var $se=Object.prototype.hasOwnProperty||function(e){return e in this};function Pa(e,t){return $se.call(e,t)}function _s(e){return Ese.call(e)}function Fse(e){if(e.name)return e.name;var t=Tse.call(jse.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function z7(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return V7(YT.call(e,0,t.maxStringLength),t)+r}var i=$a.call($a.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Gse);return U7(i,"single",t)}function Gse(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Cse.call(t.toString(16))}function ed(e){return"Object("+e+")"}function jx(e){return e+" { ? }"}function lR(e,t,n,r){var i=r?uS(n,r):so.call(n,", ");return e+" ("+t+") {"+i+"}"}function qse(e){for(var t=0;t=0)return!1;return!0}function Kse(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=so.call(Array(e.indent+1)," ");else return null;return{base:n,prev:so.call(Array(t+1),n)}}function uS(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+so.call(e,","+n)+` `+t.prev}function cv(e,t){var n=lS(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var t=e.pop(),n=t.obj[t.prop];if(Xs(n)){for(var r=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===ule.RFC1738&&(l===40||l===41)){a+=o.charAt(s);continue}if(l<128){a=a+ro[l];continue}if(l<2048){a=a+(ro[192|l>>6]+ro[128|l&63]);continue}if(l<55296||l>=57344){a=a+(ro[224|l>>12]+ro[128|l>>6&63]+ro[128|l&63]);continue}s+=1,l=65536+((l&1023)<<10|o.charCodeAt(s)&1023),a+=ro[240|l>>18]+ro[128|l>>12&63]+ro[128|l>>6&63]+ro[128|l&63]}return a},mle=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r"u"&&(j=0)}if(typeof f=="function"?_=f(n,_):_ instanceof Date?_=v(_):r==="comma"&&ao(_)&&(_=ig.maybeMap(_,function(F){return F instanceof Date?v(F):F})),_===null){if(a)return u&&!w?u(n,dn.encoder,b,"key",g):n;_=""}if(Ole(_)||ig.isBuffer(_)){if(u){var N=w?n:u(n,dn.encoder,b,"key",g);return[y(N)+"="+y(u(_,dn.encoder,b,"value",g))]}return[y(n)+"="+y(String(_))]}var I=[];if(typeof _>"u")return I;var M;if(r==="comma"&&ao(_))w&&u&&(_=ig.maybeMap(_,u)),M=[{value:_.length>0?_.join(",")||null:void 0}];else if(ao(f))M=f;else{var D=Object.keys(_);M=d?D.sort(d):D}var z=l?n.replace(/\./g,"%2E"):n,q=i&&ao(_)&&_.length===1?z+"[]":z;if(o&&ao(_)&&_.length===0)return q+"[]";for(var W=0;W"u"?e.encodeDotInKeys===!0?!0:dn.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:dn.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:dn.allowEmptyArrays,arrayFormat:o,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:dn.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?dn.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:dn.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:dn.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:dn.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:dn.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:dn.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:dn.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:dn.strictNullHandling}},jle=function(e,t){var n=e,r=Ele(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):ao(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s=K7[r.arrayFormat],l=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var u=q7(),f=0;f0?v+p:""},Sc=G7,cS=Object.prototype.hasOwnProperty,Tle=Array.isArray,tn={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!0,decoder:Sc.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Cle=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Z7=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Ple="utf8=%26%2310003%3B",Ale="utf8=%E2%9C%93",kle=function(e,t){var n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,o=r.split(t.delimiter,i),a=-1,s,l=t.charset;if(t.charsetSentinel)for(s=0;s-1&&(v=Tle(v)?[v]:v);var g=cS.call(n,p);g&&t.duplicates==="combine"?n[p]=Sc.combine(n[p],v):(!g||t.duplicates==="last")&&(n[p]=v)}return n},Nle=function(e,t,n,r){for(var i=r?t:Z7(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if(s==="[]"&&n.parseArrays)a=n.allowEmptyArrays&&i===""?[]:[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,u=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,f=parseInt(u,10);!n.parseArrays&&u===""?a={0:i}:!isNaN(f)&&s!==u&&String(f)===u&&f>=0&&n.parseArrays&&f<=n.arrayLimit?(a=[],a[f]=i):u!=="__proto__"&&(a[u]=i)}i=a}return i},Rle=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(i),l=s?i.slice(0,s.index):i,u=[];if(l){if(!n.plainObjects&&cS.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(s=a.exec(i))!==null&&f"u"?tn.charset:e.charset,n=typeof e.duplicates>"u"?tn.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var r=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:tn.allowDots:!!e.allowDots;return{allowDots:r,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:tn.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:tn.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:tn.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:tn.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:tn.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:tn.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:tn.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:tn.decoder,delimiter:typeof e.delimiter=="string"||Sc.isRegExp(e.delimiter)?e.delimiter:tn.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:tn.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:tn.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:tn.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:tn.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:tn.strictNullHandling}},Mle=function(e,t){var n=Lle(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?kle(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;aX7.parse(e,{ignoreQueryPrefix:!0}),pb=e=>X7.stringify(e,{arrayFormat:"brackets"}),Xt=(e=!1)=>{const[t,n]=R.useState(e),r=R.useCallback(()=>n(a=>!a),[]),i=R.useCallback(()=>n(!0),[]),o=R.useCallback(()=>n(!1),[]);return[t,r,i,o]},Q7=(e=!1,t=2e3,n=window.setTimeout,r=window.clearTimeout)=>{const[i,o]=R.useState(e),a=R.useRef(e),s=R.useRef(),l=R.useCallback(()=>{o(!a.current),s.current&&r(s.current),s.current=n(()=>o(a.current),t)},[r,t,n]);return[i,l]},mb=()=>{const{current:e}=R.useRef(`dom-${yae()}`);return e},fa=()=>R.useRef(null),Gp=()=>{const{search:e}=pr();return R.useMemo(()=>QT(e),[e])},J7=({checked:e=!1,onChange:t,className:n,children:r,type:i,inline:o=!1})=>{const a=mb(),s=f=>t==null?void 0:t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},u=o?{display:"inline-block"}:{};return m.jsxs("span",{className:di("form-check",l,n),style:u,children:[m.jsx("input",{type:"checkbox",className:"form-check-input",id:a,checked:e,onChange:s}),m.jsx("label",{className:"form-check-label",htmlFor:a,children:r})]})},eF=e=>m.jsx(J7,{type:"checkbox",...e}),Pl=e=>m.jsx(J7,{type:"switch",...e}),af=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>m.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[m.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),og=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:a,labelClassName:s})=>{const l=mb();return m.jsx(af,{label:m.jsxs(m.Fragment,{children:[e,":"]}),className:a,labelClassName:s,id:l,children:m.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:u=>n(u.target.value)})})},Ule=500;let ag;const cR=()=>{ag&&clearTimeout(ag),ag=null},qp=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i="",setTimeout_:o=setTimeout})=>{const[a,s]=R.useState(i),l=(u,f=Ule)=>{s(u),cR(),ag=o(()=>{e(u),cR()},f)};return m.jsxs("div",{className:di("search-field",t),children:[m.jsx("input",{type:"text",className:di("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:a,onChange:u=>l(u.target.value)}),m.jsx(je,{icon:bX,className:"search-field__icon"}),m.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:a==="",id:"search-field__close",onClick:()=>l("",0)})]})},da=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:a=!1,minWidth:s,inline:l,size:u,...f})=>{const[d,p]=Xt(),v=di("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),g={minWidth:s&&`${s}px`};return m.jsxs(Up,{isOpen:d,toggle:p,disabled:t,className:i,children:[m.jsx(nf,{size:u,caret:!o,className:v,color:"primary",...f,children:e}),m.jsx(tf,{className:"w-100",end:a,style:g,children:r})]})},vb=({children:e,minWidth:t,label:n="Options"})=>m.jsx(da,{text:m.jsx(je,{className:"px-1",icon:uX}),"aria-label":n,size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),Gd=({children:e,...t})=>m.jsx(AT,{children:m.jsx(Y$,{className:"nav-pills__nav-link",tag:B8,...t,children:e})}),tF=({children:e,fill:t=!1,className:n=""})=>m.jsx(jr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:m.jsx(PT,{pills:!0,fill:t,children:R.Children.map(e,r=>{if(!R.isValidElement(r)||r.type!==Gd)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),gb=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",nF=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,a=n==="ASC"?-1:1;return r[t]>i[t]?o:a}),Ble=e=>e.dir?`${e.field}-${e.dir}`:void 0,zle=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function Kp({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const a=s=>()=>{const l=gb(s,t.field,t.dir);n(l?s:void 0,l)};return m.jsxs(Vp,{children:[m.jsxs(nf,{caret:!0,color:r?"primary":"link",className:di({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&m.jsx(m.Fragment,{children:"Order by"}),r&&!t.field&&m.jsx("i",{children:"Order by..."}),r&&t.field&&m.jsxs(m.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",m.jsx("small",{children:t.dir??"DESC"})]})]}),m.jsxs(tf,{end:i,className:di("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(e).map(([s,l])=>m.jsxs(ke,{active:t.field===s,onClick:a(s),children:[l,t.field===s&&m.jsx(je,{icon:t.dir==="ASC"?hX:XZ,className:"ordering-dropdown__sort-icon"})]},s)),m.jsx(ke,{divider:!0}),m.jsx(ke,{disabled:!t.field,onClick:()=>n(),children:m.jsx("i",{children:"Clear selection"})})]})]})}const Mh="#4696e5",Vle="rgba(70, 150, 229, 0.4)",fS="#f77f28",Hle="rgba(247, 127, 40, 0.4)",Wle="white",Gle="#161b22",qle=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},JT=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"},eC=(e=window.matchMedia.bind(window))=>e("(prefers-color-scheme: dark)").matches?"dark":"light";function rF(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const[i,,o]=Xt(),a=R.useCallback(()=>{o(),n()},[n,o]);return m.jsxs(j7,{className:"app-update-banner",isOpen:e,toggle:t,tag:Ot,color:"secondary",innerRef:r,children:[m.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),m.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",m.jsxs(Ye,{role:"button",disabled:i,className:"ms-2",color:"secondary",size:"sm",onClick:a,children:[!i&&m.jsxs(m.Fragment,{children:["Restart now ",m.jsx(je,{icon:EX,className:"ms-1"})]}),i&&m.jsx(m.Fragment,{children:"Restarting..."})]})]})]})}),iF=({to:e="/",children:t="Home"})=>m.jsx("div",{className:"home",children:m.jsxs(Ot,{className:"p-4",children:[m.jsx("h2",{children:"Oops! We could not find requested route."}),m.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),m.jsx("br",{}),m.jsx(jt,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})});function xi(e){return R.useRef(e).current}function wi(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}const Yle=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})},oF=({fetchServers:e,servers:t,settings:n,appUpdated:r,resetAppUpdate:i})=>{var w;const{MainHeader:o,Home:a,ShlinkWebComponentContainer:s,CreateServer:l,EditServer:u,Settings:f,ManageServers:d,ShlinkVersionsContainer:p}=xi(oF),v=pr(),g=R.useRef(t),y=v.pathname==="/";return R.useEffect(()=>{Object.keys(g.current).length===0&&e()},[e]),R.useEffect(()=>{var b;qle(((b=n.ui)==null?void 0:b.theme)??eC())},[(w=n.ui)==null?void 0:w.theme]),m.jsxs("div",{className:"container-fluid app-container",children:[m.jsx(o,{}),m.jsxs("div",{className:"app",children:[m.jsx("div",{className:sf("shlink-wrapper",{"d-flex d-md-block align-items-center":y}),children:m.jsxs(rb,{children:[m.jsx(lt,{index:!0,element:m.jsx(a,{})}),m.jsx(lt,{path:"/settings/*",element:m.jsx(f,{})}),m.jsx(lt,{path:"/manage-servers",element:m.jsx(d,{})}),m.jsx(lt,{path:"/server/create",element:m.jsx(l,{})}),m.jsx(lt,{path:"/server/:serverId/edit",element:m.jsx(u,{})}),m.jsx(lt,{path:"/server/:serverId/*",element:m.jsx(s,{})}),m.jsx(lt,{path:"*",element:m.jsx(iF,{})})]})}),m.jsx("div",{className:"shlink-footer",children:m.jsx(p,{})})]}),m.jsx(Kle,{isOpen:r,toggle:i,forceUpdate:Yle})]})},Zle=wi(oF,["MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"]);function Fn(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 Xle=typeof Symbol=="function"&&Symbol.observable||"@@observable",fR=Xle,Ax=()=>Math.random().toString(36).substring(7).split("").join("."),Qle={INIT:`@@redux/INIT${Ax()}`,REPLACE:`@@redux/REPLACE${Ax()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ax()}`},xy=Qle;function tC(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 aF(e,t,n){if(typeof e!="function")throw new Error(Fn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Fn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Fn(1));return n(aF)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,l=!1;function u(){a===o&&(a=new Map,o.forEach((w,b)=>{a.set(b,w)}))}function f(){if(l)throw new Error(Fn(3));return i}function d(w){if(typeof w!="function")throw new Error(Fn(4));if(l)throw new Error(Fn(5));let b=!0;u();const x=s++;return a.set(x,w),function(){if(b){if(l)throw new Error(Fn(6));b=!1,u(),a.delete(x),o=null}}}function p(w){if(!tC(w))throw new Error(Fn(7));if(typeof w.type>"u")throw new Error(Fn(8));if(typeof w.type!="string")throw new Error(Fn(17));if(l)throw new Error(Fn(9));try{l=!0,i=r(i,w)}finally{l=!1}return(o=a).forEach(x=>{x()}),w}function v(w){if(typeof w!="function")throw new Error(Fn(10));r=w,p({type:xy.REPLACE})}function g(){const w=d;return{subscribe(b){if(typeof b!="object"||b===null)throw new Error(Fn(11));function x(){const S=b;S.next&&S.next(f())}return x(),{unsubscribe:w(x)}},[fR](){return this}}}return p({type:xy.INIT}),{dispatch:p,subscribe:d,getState:f,replaceReducer:v,[fR]:g}}function Jle(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:xy.INIT})>"u")throw new Error(Fn(12));if(typeof n(void 0,{type:xy.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Fn(13))})}function nC(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw s&&s.type,new Error(Fn(14));u[d]=g,l=l||g!==v}return l=l||r.length!==Object.keys(a).length,l?u:a}}function wy(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function eue(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(Fn(15))};const a={getState:i.getState,dispatch:(l,...u)=>o(l,...u)},s=e.map(l=>l(a));return o=wy(...s)(i.dispatch),{...i,dispatch:o}}}function tue(e){return tC(e)&&"type"in e&&typeof e.type=="string"}var sF=Symbol.for("immer-nothing"),dR=Symbol.for("immer-draftable"),zr=Symbol.for("immer-state");function Mi(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ec=Object.getPrototypeOf;function ss(e){return!!e&&!!e[zr]}function ra(e){var t;return e?lF(e)||Array.isArray(e)||!!e[dR]||!!((t=e.constructor)!=null&&t[dR])||bb(e)||_b(e):!1}var nue=Object.prototype.constructor.toString();function lF(e){if(!e||typeof e!="object")return!1;const t=Ec(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)===nue}function Ih(e,t){yb(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function yb(e){const t=e[zr];return t?t.type_:Array.isArray(e)?1:bb(e)?2:_b(e)?3:0}function dS(e,t){return yb(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function uF(e,t,n){const r=yb(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function rue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function bb(e){return e instanceof Map}function _b(e){return e instanceof Set}function Ws(e){return e.copy_||e.base_}function hS(e,t){if(bb(e))return new Map(e);if(_b(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&lF(e))return Ec(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[zr];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=iue),Object.freeze(e),t&&Ih(e,(n,r)=>rC(r,!0))),e}function iue(){Mi(2)}function xb(e){return Object.isFrozen(e)}var oue={};function Al(e){const t=oue[e];return t||Mi(0,e),t}var Dh;function cF(){return Dh}function aue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function hR(e,t){t&&(Al("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function pS(e){mS(e),e.drafts_.forEach(sue),e.drafts_=null}function mS(e){e===Dh&&(Dh=e.parent_)}function pR(e){return Dh=aue(Dh,e)}function sue(e){const t=e[zr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function mR(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[zr].modified_&&(pS(t),Mi(4)),ra(e)&&(e=Oy(t,e),t.parent_||Sy(t,e)),t.patches_&&Al("Patches").generateReplacementPatches_(n[zr].base_,e,t.patches_,t.inversePatches_)):e=Oy(t,n,[]),pS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sF?e:void 0}function Oy(e,t,n){if(xb(t))return t;const r=t[zr];if(!r)return Ih(t,(i,o)=>vR(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Sy(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),Ih(o,(s,l)=>vR(e,r,i,s,l,n,a)),Sy(e,i,!1),n&&e.patches_&&Al("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function vR(e,t,n,r,i,o,a){if(ss(i)){const s=o&&t&&t.type_!==3&&!dS(t.assigned_,r)?o.concat(r):void 0,l=Oy(e,i,s);if(uF(n,r,l),ss(l))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(ra(i)&&!xb(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Oy(e,i),(!t||!t.scope_.parent_)&&Sy(e,i)}}function Sy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&rC(t,n)}function lue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:cF(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=iC;n&&(i=[r],o=$h);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var iC={get(e,t){if(t===zr)return e;const n=Ws(e);if(!dS(n,t))return uue(e,n,t);const r=n[t];return e.finalized_||!ra(r)?r:r===kx(e.base_,t)?(Nx(e),e.copy_[t]=gS(r,e)):r},has(e,t){return t in Ws(e)},ownKeys(e){return Reflect.ownKeys(Ws(e))},set(e,t,n){const r=fF(Ws(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=kx(Ws(e),t),o=i==null?void 0:i[zr];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(rue(n,i)&&(n!==void 0||dS(e.base_,t)))return!0;Nx(e),vS(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 kx(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Nx(e),vS(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ws(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Mi(11)},getPrototypeOf(e){return Ec(e.base_)},setPrototypeOf(){Mi(12)}},$h={};Ih(iC,(e,t)=>{$h[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$h.deleteProperty=function(e,t){return $h.set.call(this,e,t,void 0)};$h.set=function(e,t,n){return iC.set.call(this,e[0],t,n,e[0])};function kx(e,t){const n=e[zr];return(n?Ws(n):e)[t]}function uue(e,t,n){var i;const r=fF(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function fF(e,t){if(!(t in e))return;let n=Ec(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ec(n)}}function vS(e){e.modified_||(e.modified_=!0,e.parent_&&vS(e.parent_))}function Nx(e){e.copy_||(e.copy_=hS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var cue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(l=o,...u){return a.produce(l,f=>n.call(this,f,...u))}}typeof n!="function"&&Mi(6),r!==void 0&&typeof r!="function"&&Mi(7);let i;if(ra(t)){const o=pR(this),a=gS(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?pS(o):mS(o)}return hR(o,r),mR(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===sF&&(i=void 0),this.autoFreeze_&&rC(i,!0),r){const o=[],a=[];Al("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Mi(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,l=>t(l,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},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){ra(e)||Mi(8),ss(e)&&(e=dF(e));const t=pR(this),n=gS(e,void 0);return n[zr].isManual_=!0,mS(t),n}finishDraft(e,t){const n=e&&e[zr];(!n||!n.isManual_)&&Mi(9);const{scope_:r}=n;return hR(r,t),mR(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Al("Patches").applyPatches_;return ss(e)?r(e,t):this.produce(e,i=>r(i,t))}};function gS(e,t){const n=bb(e)?Al("MapSet").proxyMap_(e,t):_b(e)?Al("MapSet").proxySet_(e,t):lue(e,t);return(t?t.scope_:cF()).drafts_.push(n),n}function dF(e){return ss(e)||Mi(10,e),hF(e)}function hF(e){if(!ra(e)||xb(e))return e;const t=e[zr];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=hS(e,t.scope_.immer_.useStrictShallowCopy_)}else n=hS(e,!0);return Ih(n,(r,i)=>{uF(n,r,hF(i))}),t&&(t.finalized_=!1),n}var Vr=new cue,pF=Vr.produce;Vr.produceWithPatches.bind(Vr);Vr.setAutoFreeze.bind(Vr);Vr.setUseStrictShallowCopy.bind(Vr);Vr.applyPatches.bind(Vr);Vr.createDraft.bind(Vr);Vr.finishDraft.bind(Vr);function fue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function due(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var gR=e=>Array.isArray(e)?e:[e];function hue(e){const t=Array.isArray(e[0])?e[0]:e;return due(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function pue(e,t){const n=[],{length:r}=e;for(let i=0;i{n=hv(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function yue(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e;return(...i)=>{let o=0,a=0,s,l={},u=i.pop();typeof u=="object"&&(l=u,u=i.pop()),fue(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const f={...n,...l},{memoize:d,memoizeOptions:p=[],argsMemoize:v=mF,argsMemoizeOptions:g=[],devModeChecks:y={}}=f,w=gR(p),b=gR(g),x=hue(i),_=d(function(){return o++,u.apply(null,arguments)},...w),S=v(function(){a++;const E=pue(x,arguments);return s=_.apply(null,E),s},...b);return Object.assign(S,{resultFunc:u,memoizedResultFunc:_,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:v})}}function vF(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var bue=vF(),_ue=vF,xue=(...e)=>{const t=yue(...e),n=Object.assign((...r)=>{const i=t(...r),o=(a,...s)=>i(ss(a)?dF(a):a,...s);return Object.assign(o,i),o},{withTypes:()=>n});return n};xue(mF);var wue=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wy:wy.apply(null,arguments)},Oue=e=>e&&typeof e.match=="function";function vn(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Er(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>tue(r)&&r.type===e,n}var gF=class wd extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,wd.prototype)}static get[Symbol.species](){return wd}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new wd(...t[0].concat(this)):new wd(...t.concat(this))}};function bR(e){return ra(e)?pF(e,()=>{}):e}function _R(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error(Er(10));const r=n.insert(t,e);return e.set(t,r),r}function Sue(e){return typeof e=="boolean"}var Eue=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new gF;return n&&(Sue(n)?a.push(bue):a.push(_ue(n.extraArgument))),a},jue="RTK_autoBatch",yF=e=>t=>{setTimeout(t,e)},Tue=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:yF(10),Cue=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?Tue:e.type==="callback"?e.queueNotification:yF(e.timeout),u=()=>{a=!1,o&&(o=!1,s.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const d=()=>i&&f(),p=r.subscribe(d);return s.add(f),()=>{p(),s.delete(f)}},dispatch(f){var d;try{return i=!((d=f==null?void 0:f.meta)!=null&&d[jue]),o=!i,o&&(a||(a=!0,l(u))),r.dispatch(f)}finally{i=!0}}})},Pue=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new gF(e);return r&&i.push(Cue(typeof r=="object"?r:void 0)),i},Aue=!0;function bF(e){const t=Eue(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{};let s;if(typeof n=="function")s=n;else if(tC(n))s=nC(n);else throw new Error(Er(1));let l;typeof r=="function"?l=r(t):l=t();let u=wy;i&&(u=wue({trace:!Aue,...typeof i=="object"&&i}));const f=eue(...l),d=Pue(f);let p=typeof a=="function"?a(d):d();const v=u(...p);return aF(s,o,v)}function _F(e){const t={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(Er(28));if(s in t)throw new Error(Er(29));return t[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function kue(e){return typeof e=="function"}function Nue(e,t){let[n,r,i]=_F(t),o;if(kue(e))o=()=>bR(e());else{const s=bR(e);o=()=>s}function a(s=o(),l){let u=[n[l.type],...r.filter(({matcher:f})=>f(l)).map(({reducer:f})=>f)];return u.filter(f=>!!f).length===0&&(u=[i]),u.reduce((f,d)=>{if(d)if(ss(f)){const v=d(f,l);return v===void 0?f:v}else{if(ra(f))return pF(f,p=>d(p,l));{const p=d(f,l);if(p===void 0){if(f===null)return f;throw new Error(Er(9))}return p}}return f},s)}return a.getInitialState=o,a}var Rue="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xF=(e=21)=>{let t="",n=e;for(;n--;)t+=Rue[Math.random()*64|0];return t},Lue=(e,t)=>Oue(e)?e.match(t):e(t);function Mue(...e){return t=>e.some(n=>Lue(n,t))}var Iue=["name","message","stack","code"],Rx=class{constructor(e,t){ru(this,"_type");this.payload=e,this.meta=t}},xR=class{constructor(e,t){ru(this,"_type");this.payload=e,this.meta=t}},Due=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Iue)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},wF=(()=>{function e(t,n,r){const i=vn(t+"/fulfilled",(l,u,f,d)=>({payload:l,meta:{...d||{},arg:f,requestId:u,requestStatus:"fulfilled"}})),o=vn(t+"/pending",(l,u,f)=>({payload:void 0,meta:{...f||{},arg:u,requestId:l,requestStatus:"pending"}})),a=vn(t+"/rejected",(l,u,f,d,p)=>({payload:d,error:(r&&r.serializeError||Due)(l||"Rejected"),meta:{...p||{},arg:f,requestId:u,rejectedWithValue:!!d,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function s(l){return(u,f,d)=>{const p=r!=null&&r.idGenerator?r.idGenerator(l):xF(),v=new AbortController;let g,y;function w(x){y=x,v.abort()}const b=async function(){var S,j;let x;try{let E=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,l,{getState:f,extra:d});if(Fue(E)&&(E=await E),E===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const C=new Promise((N,I)=>{g=()=>{I({name:"AbortError",message:y||"Aborted"})},v.signal.addEventListener("abort",g)});u(o(p,l,(j=r==null?void 0:r.getPendingMeta)==null?void 0:j.call(r,{requestId:p,arg:l},{getState:f,extra:d}))),x=await Promise.race([C,Promise.resolve(n(l,{dispatch:u,getState:f,extra:d,requestId:p,signal:v.signal,abort:w,rejectWithValue:(N,I)=>new Rx(N,I),fulfillWithValue:(N,I)=>new xR(N,I)})).then(N=>{if(N instanceof Rx)throw N;return N instanceof xR?i(N.payload,p,l,N.meta):i(N,p,l)})])}catch(E){x=E instanceof Rx?a(null,p,l,E.payload,E.meta):a(E,p,l)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||u(x),x}();return Object.assign(b,{abort:w,requestId:p,arg:l,unwrap(){return b.then($ue)}})}}return Object.assign(s,{pending:o,rejected:a,fulfilled:i,settled:Mue(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function $ue(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Fue(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Uue=Symbol.for("rtk-slice-createasyncthunk");function Bue(e,t){return`${e}/${t}`}function zue({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Uue];return function(i){const{name:o,reducerPath:a=o}=i;if(!o)throw new Error(Er(11));typeof process<"u";const s=(typeof i.reducers=="function"?i.reducers(Hue()):i.reducers)||{},l=Object.keys(s),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(_,S){const j=typeof _=="string"?_:_.type;if(!j)throw new Error(Er(12));if(j in u.sliceCaseReducersByType)throw new Error(Er(13));return u.sliceCaseReducersByType[j]=S,f},addMatcher(_,S){return u.sliceMatchers.push({matcher:_,reducer:S}),f},exposeAction(_,S){return u.actionCreators[_]=S,f},exposeCaseReducer(_,S){return u.sliceCaseReducersByName[_]=S,f}};l.forEach(_=>{const S=s[_],j={reducerName:_,type:Bue(o,_),createNotation:typeof i.reducers=="function"};Gue(S)?Kue(j,S,f,t):Wue(j,S,f)});function d(){const[_={},S=[],j=void 0]=typeof i.extraReducers=="function"?_F(i.extraReducers):[i.extraReducers],E={..._,...u.sliceCaseReducersByType};return Nue(i.initialState,C=>{for(let N in E)C.addCase(N,E[N]);for(let N of u.sliceMatchers)C.addMatcher(N.matcher,N.reducer);for(let N of S)C.addMatcher(N.matcher,N.reducer);j&&C.addDefaultCase(j)})}const p=_=>_,v=new Map;let g;function y(_,S){return g||(g=d()),g(_,S)}function w(){return g||(g=d()),g.getInitialState()}function b(_,S=!1){function j(C){let N=C[_];return typeof N>"u"&&S&&(N=w()),N}function E(C=p){const N=_R(v,S,{insert:()=>new WeakMap});return _R(N,C,{insert:()=>{const I={};for(const[M,D]of Object.entries(i.selectors??{}))I[M]=Vue(D,C,w,S);return I}})}return{reducerPath:_,getSelectors:E,get selectors(){return E(j)},selectSlice:j}}const x={name:o,reducer:y,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:w,...b(a),injectInto(_,{reducerPath:S,...j}={}){const E=S??a;return _.inject({reducerPath:E,reducer:y},j),{...x,...b(E,!0)}}};return x}}function Vue(e,t,n,r){function i(o,...a){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...a)}return i.unwrapped=e,i}var rn=zue();function Hue(){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 Wue({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!que(r))throw new Error(Er(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?vn(e,a):vn(e))}function Gue(e){return e._reducerDefinitionType==="asyncThunk"}function que(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Kue({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Er(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:u,options:f}=n,d=i(e,o,f);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),u&&r.addMatcher(d.settled,u),r.exposeCaseReducer(t,{fulfilled:a||pv,pending:s||pv,rejected:l||pv,settled:u||pv})}function pv(){}var Yue=(e,t)=>{if(typeof e!="function")throw new Error(Er(32))},oC="listenerMiddleware",Zue=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=vn(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Er(21));return Yue(o),{predicate:i,type:t,effect:o}},Xue=Object.assign(e=>{const{type:t,predicate:n,effect:r}=Zue(e);return{id:xF(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Er(22))}}},{withTypes:()=>Xue}),Que=Object.assign(vn(`${oC}/add`),{withTypes:()=>Que});vn(`${oC}/removeAll`);var Jue=Object.assign(vn(`${oC}/remove`),{withTypes:()=>Jue});function Er(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{actions:ece,reducer:tce}=rn({name:"shlink/appUpdates",initialState:!1,reducers:{appUpdateAvailable:()=>!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:nce,resetAppUpdate:rce}=ece,ice=tce,oce=(e,t)=>{e.factory("App",Zle),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>nce),e.serviceFactory("resetAppUpdate",()=>rce)},wR={"Content-Type":"application/json"},OR=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...wR}}:{headers:wR}:e;class ace{constructor(t=window.fetch.bind(window)){this.fetch=t}async jsonRequest(t,n){return this.fetch(t,OR(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i})}async emptyRequest(t,n){return this.fetch(t,OR(n)).then(async r=>{if(!r.ok)throw await r.json()})}}var aC=(e=>(e.INVALID_ARGUMENT="https://shlink.io/api/error/invalid-data",e.INVALID_SHORT_URL_DELETION="https://shlink.io/api/error/invalid-short-url-deletion",e.DOMAIN_NOT_FOUND="https://shlink.io/api/error/domain-not-found",e.FORBIDDEN_OPERATION="https://shlink.io/api/error/forbidden-tag-operation",e.INVALID_SLUG="https://shlink.io/api/error/non-unique-slug",e.INVALID_SHORTCODE="https://shlink.io/api/error/short-url-not-found",e.TAG_CONFLICT="https://shlink.io/api/error/tag-conflict",e.TAG_NOT_FOUND="https://shlink.io/api/error/tag-not-found",e.MERCURE_NOT_CONFIGURED="https://shlink.io/api/error/mercure-not-configured",e.INVALID_AUTHORIZATION="https://shlink.io/api/error/missing-authentication",e.INVALID_API_KEY="https://shlink.io/api/error/invalid-api-key",e.NOT_FOUND="https://shlink.io/api/error/not-found",e.INVALID_URL="https://shlink.io/api/error/invalid-url",e))(aC||{}),sce={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 135.1c-4.2-4.5-10.1-7.1-16.3-7.1C266 128 256 138 256 150.3V208H160c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32h96v57.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.3-7.1l99.9-107.1c3.5-3.8 5.5-8.7 5.5-13.8s-2-10.1-5.5-13.8L294.6 135.1z"]},lce=sce,uce={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},OF={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z"]},cce={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},fce={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]},dce=Object.defineProperty,hce=(e,t,n)=>t in e?dce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qa=(e,t,n)=>(hce(e,typeof t!="symbol"?t+"":t,n),n),Wi,wo=".",SF="function",EF="string",jF="__global__",sC="Provider",pce=0,lC=Array.prototype.slice,mce=function(e,t){var n=e[t];if(n===void 0&&Wi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+t+"` is undefined.");return n},wb=function(e){var t;return this.nested[e]||(t=Wi.pop(),this.nested[e]=t,this.factory(e,function(){return t.container})),this.nested[e]},TF=function(e){return e.split(wo).reduce(mce,this)},vce=function(e,t,n,r){var i={configurable:!0,enumerable:!0};return e.length?i.get=function(){var o=0,a=function(s){if(s)throw s;e[o]&&e[o++](n,a)};return a(),n}:(i.value=n,i.writable=!0),Object.defineProperty(r,t,i),r[t]},gce=function(e,t){var n,r;return typeof e===SF&&(t=e,e=jF),n=e.split(wo),r=n.shift(),n.length?wb.call(this,r).middleware(n.join(wo),t):(this.middlewares[r]||(this.middlewares[r]=[]),this.middlewares[r].push(t)),this},yce=function(e,t){return t(e)},SR=function(e,t){return(e[t]||[]).concat(e.__global__||[])},bce=function(e,t){var n,r,i,o,a;return this.id,i=this.container,o=this.decorators,a=this.middlewares,n=e+sC,r=Object.create(null),r[n]={configurable:!0,enumerable:!0,get:function(){var s=new t;return delete i[n],i[n]=s,s}},r[e]={configurable:!0,enumerable:!0,get:function(){var s=i[n],l;return s&&(l=SR(o,e).reduce(yce,s.$get(i)),delete i[n],delete i[e]),l===void 0?l:vce(SR(a,e),e,l,i)}},Object.defineProperties(i,r),this},CF=function(e,t){var n,r;return n=e.split(wo),this.providerMap[e]&&n.length===1&&!this.container[e+sC]?console.error(e+" provider already instantiated."):(this.originalProviders[e]=t,this.providerMap[e]=!0,r=n.shift(),n.length?(wb.call(this,r).provider(n.join(wo),t),this):bce.call(this,r,t))},uC=function(e,t){return CF.call(this,e,function(){this.$get=t})},PF=function(e,t,n){var r=arguments.length>3?lC.call(arguments,3):[],i=this;return uC.call(this,e,function(){var o=t,a=r.map(TF,i.container);return n?new(t.bind.apply(t,[null].concat(a))):o.apply(null,a)})},_ce=function(e,t){return PF.apply(this,[e,t,!0].concat(lC.call(arguments,2)))},xce=function(e,t){return PF.apply(this,[e,t,!1].concat(lC.call(arguments,2)))},AF=function(e,t){Object.defineProperty(this,e,{configurable:!0,enumerable:!0,value:t,writable:!0})},kF=function(e,t){var n=e[t];return n||(n={},AF.call(e,t,n)),n},wce=function(e,t){var n;return n=e.split(wo),e=n.pop(),AF.call(n.reduce(kF,this.container),e,t),this},Oce=function(e,t){Object.defineProperty(this,e,{configurable:!1,enumerable:!0,value:t,writable:!1})},Sce=function(e,t){var n=e.split(wo);return e=n.pop(),Oce.call(n.reduce(kF,this.container),e,t),this},NF=function(e,t){var n,r;return typeof e===SF&&(t=e,e=jF),n=e.split(wo),r=n.shift(),n.length?wb.call(this,r).decorator(n.join(wo),t):(this.decorators[r]||(this.decorators[r]=[]),this.decorators[r].push(t)),this},Ece=function(e){return this.deferred.push(e),this},jce=function(e){return(e||[]).map(TF,this.container)},Tce=function(e,t){return uC.call(this,e,function(n){return{instance:t.bind(t,n)}})},Cce=function(e){return!/^\$(?:decorator|register|list)$|Provider$/.test(e)},cC=function(e){return Object.keys(e||this.container||{}).filter(Cce)},Ey={},Pce=function(e){var t;return typeof e===EF?(t=Ey[e],t||(Ey[e]=t=new Wi,t.constant("BOTTLE_NAME",e)),t):new Wi},Ace=function(e){typeof e===EF?delete Ey[e]:Ey={}},RF=function(e){var t=e.$value===void 0?e:e.$value;return this[e.$type||"service"].apply(this,[e.$name,t].concat(e.$inject||[]))},ER=function(e){delete this.providerMap[e],delete this.container[e],delete this.container[e+sC]},kce=function(e){var t=this.originalProviders,n=Array.isArray(e);Object.keys(this.originalProviders).forEach(function(r){if(!(n&&e.indexOf(r)===-1)){var i=r.split(wo);i.length>1&&i.forEach(ER,wb.call(this,i[0])),ER.call(this,r),this.provider(r,t[r])}},this)},Nce=function(e){return this.deferred.forEach(function(t){t(e)}),this};Wi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=pce++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:NF.bind(this),$register:RF.bind(this),$list:cC.bind(this)}};Wi.prototype={constant:Sce,decorator:NF,defer:Ece,digest:jce,factory:uC,instanceFactory:Tce,list:cC,middleware:gce,provider:CF,resetProviders:kce,register:RF,resolve:Nce,service:_ce,serviceFactory:xce,value:wce};Wi.pop=Pce;Wi.clear=Ace;Wi.list=cC;Wi.config={strict:!1};const Rce=Wi,Lce=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,a]=Xt(),{domains:s}=n,l=!t,u=R.useCallback(()=>{r(""),a()},[r,a]),f=R.useCallback(()=>{r(""),o()},[r,o]);return R.useEffect(()=>{e()},[e]),i?m.jsxs(hb,{children:[m.jsx(Kn,{value:t??"",placeholder:"Domain",onChange:d=>r(d.target.value)}),m.jsx(Ye,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:u,children:m.jsx(je,{icon:oX})}),m.jsx(Cr,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):m.jsxs(da,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[s.map(({domain:d,isDefault:p})=>m.jsxs(ke,{active:(t===d||p)&&l,onClick:()=>r(d),children:[d,p&&m.jsx("span",{className:"float-end text-muted",children:"default"})]},d)),m.jsx(ke,{divider:!0}),m.jsx(ke,{onClick:f,children:m.jsx("i",{children:"New domain"})})]})},Mce=e=>(e==null?void 0:e.type)===aC.INVALID_ARGUMENT,Ice=e=>(e==null?void 0:e.type)===aC.INVALID_SHORT_URL_DELETION,Dce=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),qr=e=>Dce(e)?e:void 0,Oo=({errorData:e,fallbackMessage:t})=>m.jsxs(m.Fragment,{children:[(e==null?void 0:e.detail)??t,Mce(e)&&m.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]});function LF(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;tm.jsx("button",{type:"button",className:De("border-0",t),style:{backgroundColor:"inherit",fontWeight:"inherit",color:"inherit",...e},...n}),MF=R.createContext(""),$ce=MF.Provider,xs=()=>R.useContext(MF),IF=R.createContext(void 0),{Provider:fC}=IF,Ob=()=>R.useContext(IF),Fce=5,dC=()=>{const[e,t]=R.useState([]),n=R.useMemo(()=>e.length>=Fce,[e.length]),r=R.useCallback(s=>!n&&t(l=>[...l,s]),[n]),i=R.useCallback(s=>!n&&e.every(l=>l.name!==s),[e,n]),o=R.useCallback(s=>t(l=>l.filter(u=>u!==s)),[]),a=R.useCallback(()=>t([]),[]);return{itemsToCompare:e,addItemToCompare:r,removeItemToCompare:o,clearItemsToCompare:a,canAddItemWithName:i}},hC=({className:e,type:t})=>{const n=xs(),r=Ob(),i=R.useMemo(()=>r?encodeURIComponent(r.itemsToCompare.map(l=>l.query).join(",")):"",[r]);if(!r||r.itemsToCompare.length===0)return null;const{itemsToCompare:o,clearItemsToCompare:a,removeItemToCompare:s}=r;return m.jsx("div",{className:De("top-sticky",e),children:m.jsxs(Ot,{bodyClassName:"d-md-flex gap-3 align-items-center",children:[m.jsx("ul",{className:"d-flex flex-wrap gap-1 flex-grow-1 p-0 m-0",children:o.map((l,u)=>{var f;return m.jsxs("li",{className:De("badge pe-1",{"bg-secondary":!((f=l.style)!=null&&f.backgroundColor)}),style:l.style,children:[l.name,m.jsx(kl,{"aria-label":`Remove ${l.name}`,className:"fw-bold fs-6",onClick:()=>s(l),children:"×"})]},`${l.name}_${u}`)})}),m.jsxs("div",{className:"d-flex mt-3 mt-md-0",children:[m.jsxs(Ye,{outline:!0,color:"primary",className:"flex-grow-1 indivisible",disabled:o.length<2,tag:jt,to:`${n}/${t}/compare-visits?${t}=${i}`,children:[m.jsx(je,{icon:ob,fixedWidth:!0,className:"me-1"}),"Compare (",o.length,"/5) »"]}),m.jsx(Ye,{"aria-label":"Close compare",outline:!0,color:"secondary",className:"ms-2 fw-bold",onClick:a,children:"×"})]})]})})},DF=(e,t)=>e.reduce((n,r)=>{const i=t(r);return n[i]=(n[i]||0)+1,n},{}),Uce=(e,t)=>e.reduce((n,r)=>{const i=t(r);return(n[i]=n[i]||[]).push(r),n},{}),Lx=e=>Object.prototype.toString.call(e)==="[object Object]",$F=(e,t)=>{const n={...e};return!Lx(e)||!Lx(t)||Object.keys(t).forEach(r=>{Lx(t[r])?n[r]=r in e&&e[r]!==void 0?$F(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},pC=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),Bce=(e,t)=>[...e].sort((n,r)=>{const i=t(n),o=t(r);return i===o?0:i{const n=[];for(let r=0;rObject.fromEntries(e.map((n,r)=>[n,t[r]])),qd=(e,t,n)=>n==null?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,zce=(e,t)=>!e.domain&&t===Eb?!0:e.domain===t,Vce=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls&&{android:e.deviceLongUrls.android??void 0,ios:e.deviceLongUrls.ios??void 0,desktop:e.deviceLongUrls.desktop??void 0},validateUrl:n}:{longUrl:"",validateUrl:n}},FF=e=>e.replaceAll("/","__"),mC=e=>e.replaceAll("__","/"),vC=({domain:e,shortCode:t})=>`${e??Eb}__${FF(t)}`,UF=e=>{const[t,n]=e.split(/__(.+)/);if(!n)throw new Error(`It was not possible to parse domain and short code from "${e}"`);return{domain:t===Eb?null:t,shortCode:mC(n)}};function Ke(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Gi(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function gC(e,t){const n=Ke(e);return isNaN(t)?Gi(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Hce(e,t){const n=Ke(e);if(isNaN(t))return Gi(e,NaN);if(!t)return n;const r=n.getDate(),i=Gi(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const o=i.getDate();return r>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function Wce(e,t){const{years:n=0,months:r=0,weeks:i=0,days:o=0,hours:a=0,minutes:s=0,seconds:l=0}=t,u=Ke(e),f=r||n?Hce(u,r+n*12):u,d=o||i?gC(f,o+i*7):f,p=s+a*60,v=(l+p*60)*1e3;return Gi(e,d.getTime()+v)}const BF=6048e5,Gce=864e5,zF=6e4,yC=36e5,mv=43200,TR=1440;let qce={};function lf(){return qce}function Fh(e,t){var n,r,i,o;const a=lf(),s=(t==null?void 0:t.weekStartsOn)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??a.weekStartsOn??((o=(i=a.locale)==null?void 0:i.options)==null?void 0:o.weekStartsOn)??0,l=Ke(e),u=l.getDay(),f=(u=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Nl(e){const t=Ke(e);return t.setHours(0,0,0,0),t}function jy(e){const t=Ke(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function HF(e,t){const n=Nl(e),r=Nl(t),i=+n-jy(n),o=+r-jy(r);return Math.round((i-o)/Gce)}function Kce(e){const t=VF(e),n=Gi(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Uh(n)}function WF(e){let t;return e.forEach(function(n){const r=Ke(n);(t===void 0||t{const r=Ke(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function sg(e,t){const n=Ke(e),r=Ke(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Zce(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Xce(e){if(!Zce(e)&&typeof e!="number")return!1;const t=Ke(e);return!isNaN(Number(t))}function Qce(e,t){const n=Ke(e),r=Ke(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function Yp(e,t){const n=Ke(e),r=Ke(t),i=CR(n,r),o=Math.abs(HF(n,r));n.setDate(n.getDate()-i*o);const a=+(CR(n,r)===-i),s=i*(o-a);return s===0?0:s}function CR(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function bC(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function GF(e,t){return+Ke(e)-+Ke(t)}function Jce(e,t,n){const r=GF(e,t)/yC;return bC(n==null?void 0:n.roundingMethod)(r)}function jc(e){const t=Ke(e);return t.setHours(23,59,59,999),t}function efe(e){const t=Ke(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function tfe(e){const t=Ke(e);return+jc(t)==+efe(t)}function Ty(e,t){const n=Ke(e),r=Ke(t),i=sg(n,r),o=Math.abs(Qce(n,r));let a;if(o<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);let s=sg(n,r)===-i;tfe(Ke(e))&&o===1&&sg(e,r)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function nfe(e,t,n){const r=GF(e,t)/1e3;return bC(n==null?void 0:n.roundingMethod)(r)}function rfe(e,t,n){const r=Yp(e,t)/7;return bC(n==null?void 0:n.roundingMethod)(r)}function ife(e){const t=Ke(e),n=Gi(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ofe(e,t){var n,r,i,o;const a=lf(),s=(t==null?void 0:t.weekStartsOn)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??a.weekStartsOn??((o=(i=a.locale)==null?void 0:i.options)==null?void 0:o.weekStartsOn)??0,l=Ke(e),u=l.getDay(),f=(u{let r;const i=sfe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Mx(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const ufe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cfe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ffe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dfe={date:Mx({formats:ufe,defaultWidth:"full"}),time:Mx({formats:cfe,defaultWidth:"full"}),dateTime:Mx({formats:ffe,defaultWidth:"full"})},hfe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},pfe=(e,t,n,r)=>hfe[e];function td(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const mfe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},vfe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gfe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},yfe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},bfe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_fe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},xfe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},wfe={ordinalNumber:xfe,era:td({values:mfe,defaultWidth:"wide"}),quarter:td({values:vfe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:td({values:gfe,defaultWidth:"wide"}),day:td({values:yfe,defaultWidth:"wide"}),dayPeriod:td({values:bfe,defaultWidth:"wide",formattingValues:_fe,defaultFormattingWidth:"wide"})};function nd(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Sfe(s,d=>d.test(a)):Ofe(s,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(a.length);return{value:u,rest:f}}}function Ofe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Sfe(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const jfe=/^(\d+)(th|st|nd|rd)?/i,Tfe=/\d+/i,Cfe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Pfe={any:[/^b/i,/^(a|c)/i]},Afe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kfe={any:[/1/i,/2/i,/3/i,/4/i]},Nfe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Rfe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Lfe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Mfe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ife={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Dfe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$fe={ordinalNumber:Efe({matchPattern:jfe,parsePattern:Tfe,valueCallback:e=>parseInt(e,10)}),era:nd({matchPatterns:Cfe,defaultMatchWidth:"wide",parsePatterns:Pfe,defaultParseWidth:"any"}),quarter:nd({matchPatterns:Afe,defaultMatchWidth:"wide",parsePatterns:kfe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:nd({matchPatterns:Nfe,defaultMatchWidth:"wide",parsePatterns:Rfe,defaultParseWidth:"any"}),day:nd({matchPatterns:Lfe,defaultMatchWidth:"wide",parsePatterns:Mfe,defaultParseWidth:"any"}),dayPeriod:nd({matchPatterns:Ife,defaultMatchWidth:"any",parsePatterns:Dfe,defaultParseWidth:"any"})},qF={code:"en-US",formatDistance:lfe,formatLong:dfe,formatRelative:pfe,localize:wfe,match:$fe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ffe(e){const t=Ke(e);return HF(t,ife(t))+1}function Ufe(e){const t=Ke(e),n=+Uh(t)-+Kce(t);return Math.round(n/BF)+1}function KF(e,t){var n,r,i,o;const a=Ke(e),s=a.getFullYear(),l=lf(),u=(t==null?void 0:t.firstWeekContainsDate)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??((o=(i=l.locale)==null?void 0:i.options)==null?void 0:o.firstWeekContainsDate)??1,f=Gi(e,0);f.setFullYear(s+1,0,u),f.setHours(0,0,0,0);const d=Fh(f,t),p=Gi(e,0);p.setFullYear(s,0,u),p.setHours(0,0,0,0);const v=Fh(p,t);return a.getTime()>=d.getTime()?s+1:a.getTime()>=v.getTime()?s:s-1}function Bfe(e,t){var n,r,i,o;const a=lf(),s=(t==null?void 0:t.firstWeekContainsDate)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??((o=(i=a.locale)==null?void 0:i.options)==null?void 0:o.firstWeekContainsDate)??1,l=KF(e,t),u=Gi(e,0);return u.setFullYear(l,0,s),u.setHours(0,0,0,0),Fh(u,t)}function zfe(e,t){const n=Ke(e),r=+Fh(n,t)-+Bfe(n,t);return Math.round(r/BF)+1}function it(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const xa={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return it(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):it(n+1,2)},d(e,t){return it(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return it(e.getHours()%12||12,t.length)},H(e,t){return it(e.getHours(),t.length)},m(e,t){return it(e.getMinutes(),t.length)},s(e,t){return it(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return it(i,t.length)}},fu={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},PR={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return xa.y(e,t)},Y:function(e,t,n,r){const i=KF(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return it(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):it(o,t.length)},R:function(e,t){const n=VF(e);return it(n,t.length)},u:function(e,t){const n=e.getFullYear();return it(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return it(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return it(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return xa.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return it(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=zfe(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):it(i,t.length)},I:function(e,t,n){const r=Ufe(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):it(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):xa.d(e,t)},D:function(e,t,n){const r=Ffe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):it(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return it(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return it(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return it(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=fu.noon:r===0?i=fu.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=fu.evening:r>=12?i=fu.afternoon:r>=4?i=fu.morning:i=fu.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return xa.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):xa.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):it(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):it(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):xa.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):xa.s(e,t)},S:function(e,t){return xa.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return kR(r);case"XXXX":case"XX":return Gs(r);case"XXXXX":case"XXX":default:return Gs(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return kR(r);case"xxxx":case"xx":return Gs(r);case"xxxxx":case"xxx":default:return Gs(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+AR(r,":");case"OOOO":default:return"GMT"+Gs(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+AR(r,":");case"zzzz":default:return"GMT"+Gs(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return it(r,t.length)},T:function(e,t,n){const r=e.getTime();return it(r,t.length)}};function AR(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+it(o,2)}function kR(e,t){return e%60===0?(e>0?"-":"+")+it(Math.abs(e)/60,2):Gs(e,t)}function Gs(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=it(Math.trunc(r/60),2),o=it(r%60,2);return n+i+t+o}const NR=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},YF=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Vfe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return NR(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",NR(r,t)).replace("{{time}}",YF(i,t))},Hfe={p:YF,P:Vfe},Wfe=/^D+$/,Gfe=/^Y+$/,qfe=["D","DD","YY","YYYY"];function Kfe(e){return Wfe.test(e)}function Yfe(e){return Gfe.test(e)}function Zfe(e,t,n){const r=Xfe(e,t,n);if(console.warn(r),qfe.includes(e))throw new RangeError(r)}function Xfe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Qfe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jfe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ede=/^'([^]*?)'?$/,tde=/''/g,nde=/[a-zA-Z]/;function Cy(e,t,n){var r,i,o,a,s,l,u,f;const d=lf(),p=(n==null?void 0:n.locale)??d.locale??qF,v=(n==null?void 0:n.firstWeekContainsDate)??((i=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??((a=(o=d.locale)==null?void 0:o.options)==null?void 0:a.firstWeekContainsDate)??1,g=(n==null?void 0:n.weekStartsOn)??((l=(s=n==null?void 0:n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??d.weekStartsOn??((f=(u=d.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,y=Ke(e);if(!Xce(y))throw new RangeError("Invalid time value");let w=t.match(Jfe).map(x=>{const _=x[0];if(_==="p"||_==="P"){const S=Hfe[_];return S(x,p.formatLong)}return x}).join("").match(Qfe).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const _=x[0];if(_==="'")return{isToken:!1,value:rde(x)};if(PR[_])return{isToken:!0,value:x};if(_.match(nde))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");return{isToken:!1,value:x}});p.localize.preprocessor&&(w=p.localize.preprocessor(y,w));const b={firstWeekContainsDate:v,weekStartsOn:g,locale:p};return w.map(x=>{if(!x.isToken)return x.value;const _=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Yfe(_)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Kfe(_))&&Zfe(_,t,String(e));const S=PR[_[0]];return S(y,_,p.localize,b)}).join("")}function rde(e){const t=e.match(ede);return t?t[1].replace(tde,"'"):e}function ide(e,t,n){const r=lf(),i=(n==null?void 0:n.locale)??r.locale??qF,o=2520,a=sg(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const s=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:a});let l,u;a>0?(l=Ke(t),u=Ke(e)):(l=Ke(e),u=Ke(t));const f=nfe(u,l),d=(jy(u)-jy(l))/1e3,p=Math.round((f-d)/60);let v;if(p<2)return n!=null&&n.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,s):f<10?i.formatDistance("lessThanXSeconds",10,s):f<20?i.formatDistance("lessThanXSeconds",20,s):f<40?i.formatDistance("halfAMinute",0,s):f<60?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",1,s):p===0?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",p,s);if(p<45)return i.formatDistance("xMinutes",p,s);if(p<90)return i.formatDistance("aboutXHours",1,s);if(pr.getTime()}function Py(e,t){const n=Ke(e),r=Ke(t);return+n<+r}function yS(e,t){const n=Ke(e),r=Ke(t);return+n==+r}function lde(e,t){const n=+Ke(e),[r,i]=[+Ke(t.start),+Ke(t.end)].sort((o,a)=>o-a);return n>=r&&n<=i}function Ay(e,t){return gC(e,-t)}function ls(e,t){const n=(t==null?void 0:t.additionalDigits)??2,r=dde(e);let i;if(r.date){const l=hde(r.date,n);i=pde(l.restDateString,l.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const o=i.getTime();let a=0,s;if(r.time&&(a=mde(r.time),isNaN(a)))return new Date(NaN);if(r.timezone){if(s=vde(r.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(o+a),u=new Date(0);return u.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),u.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),u}return new Date(o+a+s)}const vv={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ude=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,cde=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,fde=/^([+-])(\d{2})(?::?(\d{2}))?$/;function dde(e){const t={},n=e.split(vv.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],vv.timeZoneDelimiter.test(t.date)&&(t.date=e.split(vv.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=vv.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function hde(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function pde(e,t){if(t===null)return new Date(NaN);const n=e.match(ude);if(!n)return new Date(NaN);const r=!!n[4],i=rd(n[1]),o=rd(n[2])-1,a=rd(n[3]),s=rd(n[4]),l=rd(n[5])-1;if(r)return xde(t,s,l)?gde(t,s,l):new Date(NaN);{const u=new Date(0);return!bde(t,o,a)||!_de(t,i)?new Date(NaN):(u.setUTCFullYear(t,o,Math.max(i,a)),u)}}function rd(e){return e?parseInt(e):1}function mde(e){const t=e.match(cde);if(!t)return NaN;const n=Ix(t[1]),r=Ix(t[2]),i=Ix(t[3]);return wde(n,r,i)?n*yC+r*zF+i*1e3:NaN}function Ix(e){return e&&parseFloat(e.replace(",","."))||0}function vde(e){if(e==="Z")return 0;const t=e.match(fde);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Ode(r,i)?n*(r*yC+i*zF):NaN}function gde(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const yde=[31,null,31,30,31,30,31,31,30,31,30,31];function ZF(e){return e%400===0||e%4===0&&e%100!==0}function bde(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(yde[t]||(ZF(e)?29:28))}function _de(e,t){return t>=1&&t<=(ZF(e)?366:365)}function xde(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function wde(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Ode(e,t){return t>=0&&t<=59}const Sde="yyyy-MM-dd",XF="yyyy-MM-dd HH:mm",us=()=>new Date,_C=e=>typeof e!="string",xC=(e,t)=>!e||!_C(e)?e:t?Cy(e,t):ode(e),cs=e=>xC(e,void 0),Fa=e=>xC(e,Sde),Bh=e=>xC(e,XF),Dr=e=>_C(e)?e:ls(e),Zp=(e,t,n)=>{const r=Dr(e),i=t&&Dr(t),o=n&&Dr(n);if(i&&o)try{return lde(r,{start:i,end:o})}catch{return!1}return i?yS(r,i)||sde(r,i):o?yS(r,o)||Py(r,o):!0},Ls=(e,t)=>yS(e,t)||Py(e,t),Sb="all",QF={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[Sb]:void 0},JF=Object.keys(QF),Ede=e=>!e||!e.startDate&&!e.endDate,ky=e=>typeof e=="string"&&JF.includes(e),jde=JF.filter(e=>e!==Sb),RR=e=>e?Dr(e):null,eU=(e,t)=>({startDate:RR(e),endDate:RR(t)}),Tde=e=>{if(!(!e||Ede(e)))return e.startDate&&!e.endDate?`Since ${Fa(e.startDate)}`:!e.startDate&&e.endDate?`Until ${Fa(e.endDate)}`:`${Fa(e.startDate)} - ${Fa(e.endDate)}`},tU=e=>{if(!(!e||e===Sb))return ky(e)?QF[e]:Tde(e)},oi=e=>Nl(Ay(us(),e)),du=e=>({startDate:e,endDate:jc(us())}),nU=e=>{var t;return((t=[[()=>e==="today",()=>du(Nl(us()))],[()=>e==="yesterday",()=>({startDate:oi(1),endDate:jc(Ay(us(),1))})],[()=>e==="last7Days",()=>du(oi(7))],[()=>e==="last30Days",()=>du(oi(30))],[()=>e==="last90Days",()=>du(oi(90))],[()=>e==="last180Days",()=>du(oi(180))],[()=>e==="last365Days",()=>du(oi(365))]].find(([n])=>n()))==null?void 0:t[1]())??{}},Cde=e=>{var t;const n=Dr(e);return((t=[[()=>Ls(Nl(us()),n),"today"],[()=>Ls(oi(1),n),"yesterday"],[()=>Ls(oi(7),n),"last7Days"],[()=>Ls(oi(30),n),"last30Days"],[()=>Ls(oi(90),n),"last90Days"],[()=>Ls(oi(180),n),"last180Days"],[()=>Ls(oi(365),n),"last365Days"]].find(([r])=>r()))==null?void 0:t[1])??Sb},rU=e=>ky(e)?nU(e):e,iU=e=>!!(e&&e.startDate),Pde=({startDate:e,endDate:t})=>{const n=Yp(jc(t??new Date),Nl(e))+1,r=Ay(Nl(e),n),i=Ay(jc(e),1);return{startDate:r,endDate:i}},Ade=e=>{if(iU(e))return Yp(e.endDate??new Date,e.startDate)},wC=e=>e.visitedUrl!==void 0,kde=e=>e.visitedUrl!==void 0,Nde=e=>{const t=Uce(e,n=>wC(n.visit)?"orphanVisits":"nonOrphanVisits");return{orphanVisits:[],nonOrphanVisits:[],...t}},oU=(e,{shortCode:t,domain:n},{endDate:r,startDate:i}={})=>e.filter(({shortUrl:o,visit:a})=>o&&qd(o,t,n)&&Zp(a.date,i,r)),aU=(e,t,{endDate:n,startDate:r}={})=>e.filter(({shortUrl:i,visit:o})=>i&&zce(i,t)&&Zp(o.date,r,n)),sU=(e,t,{endDate:n,startDate:r}={})=>e.filter(({shortUrl:i,visit:o})=>(i==null?void 0:i.tags.includes(t))&&Zp(o.date,r,n)),gv=(e,t)=>DF(e,n=>n[t]),Rde=e=>{const t=((e==null?void 0:e.startDate)&&cs(e==null?void 0:e.startDate))??void 0,n=((e==null?void 0:e.endDate)&&cs(e==null?void 0:e.endDate))??void 0;return{startDate:t,endDate:n}},bS=({filter:e,dateRange:t})=>{const{startDate:n,endDate:r}=Rde(t),i=(e==null?void 0:e.excludeBots)||void 0;return{startDate:n,endDate:r,excludeBots:i}},Lde=e=>iU(e.dateRange),Mde=({dateRange:e,...t})=>({...t,dateRange:Pde(e)}),yn=(e,t)=>wF(e,t,{serializeError:n=>n}),LR=5e3,Ide=2,Dde=4,$de=({currentPage:e,pagesCount:t})=>e>=t,Fde=(e,t)=>t*100/e,lU=({visitsLoader:e,shouldCancel:t,progressChanged:n,batchSize:r})=>{const i=async(a,s)=>Promise.all(s.map(async l=>e({...a,page:l,itemsPerPage:LR}).then(({data:u})=>u))).then(l=>l.flat()),o=async(a,s,l=0)=>{if(t())return[];const u=await i(a,s[l]);return n(Fde(s.length,l+1)),l{const{pagination:s,data:l}=await e({...a,page:1,itemsPerPage:LR});if($de(s))return l;const u=pC(Ide,s.pagesCount+1),f=ec(u,r);return s.pagesCount-1>r&&n(0),l.concat(await o(a,f))}},Xp=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),Qp=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=vn(`${e}/progressChanged`),i=vn(`${e}/fallbackToInterval`),o=yn(e,async(a,{getState:s,dispatch:l})=>{var u;const{params:f,options:d}=a,{visitsLoader:p,lastVisitLoader:v}=t(a),g=Ade(f.dateRange),y=bS(f),w=d.loadPrevInterval&&Lde(f)?bS(Mde(f)):void 0,b=Dde/(w?2:1),x=w?{main:0,prev:0}:{main:0},_=(N,I)=>{x[N]=I;const M=Object.values(x),D=M.reduce((z,q)=>z+q,0);l(r(D/M.length))},S=lU({visitsLoader:p,shouldCancel:()=>n(s),progressChanged:N=>_("main",N),batchSize:b}),[j,E,C]=await Promise.all([S(y),v((u=f.filter)==null?void 0:u.excludeBots),w?S(w).then(N=>N.map(I=>{if(g===void 0)return I;const{date:M,...D}=I,z=gC(Dr(M),g);return{...D,date:cs(z)}})):Promise.resolve(void 0)]);return!j.length&&E&&l(i(Cde(E.date))),{...a,visits:j,prevVisits:C}});return Object.assign(o,{progressChanged:r,fallbackToInterval:i})},uf=vn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),Jp=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r,extraReducers:i})=>{const{pending:o,rejected:a,fulfilled:s,progressChanged:l,fallbackToInterval:u}=t,{reducer:f,actions:d}=rn({name:e,initialState:n,reducers:{cancelGetVisits:v=>({...v,cancelLoad:!0})},extraReducers:v=>{v.addCase(o,()=>({...n,loading:!0})),v.addCase(a,(g,{error:y})=>({...n,errorData:qr(y)??null})),v.addCase(s,(g,{payload:y})=>({...g,...y,loading:!1,progress:null,errorData:null})),v.addCase(l,(g,{payload:y})=>({...g,progress:y})),v.addCase(u,(g,{payload:y})=>({...g,fallbackInterval:y})),v.addCase(uf,(g,{payload:y})=>{const{visits:w}=g,b=r(g,y.createdVisits).map(({visit:x})=>x);return b.length?{...g,visits:[...b,...w]}:g}),i==null||i(v)}}),{cancelGetVisits:p}=d;return{reducer:f,cancelGetVisits:p}},uU="shlink/domainVisits",Eb="DEFAULT",Ude={visits:[],domain:"",loading:!1,cancelLoad:!1,errorData:null,progress:null},Bde=e=>Qp({typePrefix:`${uU}/getDomainVisits`,createLoaders:({domain:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=s=>r.getDomainVisits(t,s),a=Xp(i,s=>r.getDomainVisits(t,s));return{visitsLoader:o,lastVisitLoader:a}},shouldCancel:t=>t().domainVisits.cancelLoad}),zde=e=>Jp({name:uU,initialState:Ude,asyncThunkCreator:e,filterCreatedVisits:({domain:t,params:n},r)=>aU(r,t,n==null?void 0:n.dateRange)}),lg=({className:e="",placement:t,children:n})=>{const r=fa();return m.jsxs(m.Fragment,{children:[m.jsx("span",{className:e,ref:r,children:m.jsx(je,{icon:hT})}),m.jsx(Cr,{target:r,placement:t,children:n})]})},cU=e=>t=>{t.preventDefault(),e()},OC=(e,t,n=1)=>pC(n,e+1).map(t),Vde=e=>Array.isArray(e)&&e.length===0||typeof e=="string"&&e===""||typeof e=="object"&&Object.keys(e).length===0,Qs=e=>e!=null&&!Vde(e),Dx=e=>e||null,_S=e=>e?"true":"false",$x=e=>e===void 0?void 0:_S(e),Fx=({isLast:e,...t})=>m.jsx(og,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),Hde=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var i,o,a;const[s,l]=R.useState(((i=n.redirects)==null?void 0:i.baseUrlRedirect)??""),[u,f]=R.useState(((o=n.redirects)==null?void 0:o.regular404Redirect)??""),[d,p]=R.useState(((a=n.redirects)==null?void 0:a.invalidShortUrlRedirect)??""),v=cU(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:Dx(s),regular404Redirect:Dx(u),invalidShortUrlRedirect:Dx(d)}}).then(t));return m.jsx(To,{isOpen:e,toggle:t,centered:!0,children:m.jsxs("form",{name:"domainRedirectsModal",onSubmit:v,children:[m.jsxs(Co,{toggle:t,children:["Edit redirects for ",m.jsx("b",{children:n.domain})]}),m.jsxs(qi,{children:[m.jsxs(Fx,{value:s,onChange:l,children:[m.jsxs(lg,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",m.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),m.jsxs(Fx,{value:u,onChange:f,children:[m.jsxs(lg,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",m.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),m.jsxs(Fx,{value:d,isLast:!0,onChange:p,children:[m.jsx(lg,{className:"me-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),m.jsxs(bs,{children:[m.jsx(Ye,{color:"link",type:"button",onClick:t,children:"Cancel"}),m.jsx(Ye,{color:"primary",children:"Save"})]})]})})},Wde=({domain:e,editDomainRedirects:t})=>{const[n,r]=Xt(),i=xs(),o=Ob();return m.jsxs(vb,{children:[m.jsxs(ke,{tag:jt,to:`${i}/domain/${e.domain}${e.isDefault?`_${Eb}`:""}/visits`,children:[m.jsx(je,{icon:dT,fixedWidth:!0})," Visit stats"]}),m.jsxs(ke,{disabled:!o||!o.canAddItemWithName(e.domain),onClick:()=>o==null?void 0:o.addItemToCompare({name:e.domain,query:e.domain}),children:[m.jsx(je,{icon:ob,fixedWidth:!0})," Compare visits"]}),m.jsx(ke,{divider:!0,tag:"hr"}),m.jsxs(ke,{onClick:r,children:[m.jsx(je,{fixedWidth:!0,icon:fT})," Edit redirects"]}),m.jsx(Hde,{domain:e,isOpen:n,toggle:r,editDomainRedirects:t})]})},hi=({href:e,children:t,rel:n,...r})=>m.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),Gde="Left",qde="Right",Kde="Up",Yde="Down",Uu={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},xS={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},MR="mousemove",IR="mouseup",Zde="touchend",Xde="touchmove",Qde="touchstart";function Jde(e,t,n,r){return e>t?n>0?qde:Gde:r>0?Yde:Kde}function DR(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function ehe(e,t){const n=u=>{const f="touches"in u;f&&u.touches.length>1||e((d,p)=>{p.trackMouse&&!f&&(document.addEventListener(MR,r),document.addEventListener(IR,a));const{clientX:v,clientY:g}=f?u.touches[0]:u,y=DR([v,g],p.rotationAngle);return p.onTouchStartOrOnMouseDown&&p.onTouchStartOrOnMouseDown({event:u}),Object.assign(Object.assign(Object.assign({},d),xS),{initial:y.slice(),xy:y,start:u.timeStamp||0})})},r=u=>{e((f,d)=>{const p="touches"in u;if(p&&u.touches.length>1)return f;if(u.timeStamp-f.start>d.swipeDuration)return f.swiping?Object.assign(Object.assign({},f),{swiping:!1}):f;const{clientX:v,clientY:g}=p?u.touches[0]:u,[y,w]=DR([v,g],d.rotationAngle),b=y-f.xy[0],x=w-f.xy[1],_=Math.abs(b),S=Math.abs(x),j=(u.timeStamp||0)-f.start,E=Math.sqrt(_*_+S*S)/(j||1),C=[b/(j||1),x/(j||1)],N=Jde(_,S,b,x),I=typeof d.delta=="number"?d.delta:d.delta[N.toLowerCase()]||Uu.delta;if(_{e((f,d)=>{let p;if(f.swiping&&f.eventData){if(u.timeStamp-f.start{document.removeEventListener(MR,r),document.removeEventListener(IR,a)},a=u=>{o(),i(u)},s=(u,f)=>{let d=()=>{};if(u&&u.addEventListener){const p=Object.assign(Object.assign({},Uu.touchEventOptions),f.touchEventOptions),v=[[Qde,n,p],[Xde,r,Object.assign(Object.assign({},p),f.preventScrollOnSwipe?{passive:!1}:{})],[Zde,i,p]];v.forEach(([g,y,w])=>u.addEventListener(g,y,w)),d=()=>v.forEach(([g,y])=>u.removeEventListener(g,y))}return d},l={ref:u=>{u!==null&&e((f,d)=>{if(f.el===u)return f;const p={};return f.el&&f.el!==u&&f.cleanUpTouch&&(f.cleanUpTouch(),p.cleanUpTouch=void 0),d.trackTouch&&u&&(p.cleanUpTouch=s(u,d)),Object.assign(Object.assign(Object.assign({},f),{el:u}),p)})}};return t.trackMouse&&(l.onMouseDown=n),[l,s]}function the(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function nhe(e){const{trackMouse:t}=e,n=R.useRef(Object.assign({},xS)),r=R.useRef(Object.assign({},Uu)),i=R.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Uu),e);let o;for(o in Uu)r.current[o]===void 0&&(r.current[o]=Uu[o]);const[a,s]=R.useMemo(()=>ehe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=the(n.current,r.current,i.current,s),a}const rhe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:o})=>o==null?void 0:o.contains("visits-table"))||document.querySelector(".modal")||r()};return nhe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},ihe=(e,t)=>{const[n,r]=R.useState(t),i=R.useCallback(o=>{const{location:a,history:s}=window,l=QT(a.search);l[e]=o,s.pushState(null,"",`${a.pathname}?${pb(l)}`),r(o)},[e]);return[n,i]},SC=e=>{const t=Gp();return R.useMemo(()=>{var n;return((n=t[e])==null?void 0:n.split(",").filter(Boolean))??[]},[e,t])},ohe=()=>{const e=jo();return R.useCallback(()=>e(-1),[e])},EC=(e,t)=>{const n=R.useCallback(()=>t(`(max-width: ${e}px)`).matches,[t,e]),[r,i]=R.useState(n());return R.useEffect(()=>{const o=()=>i(n());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[n]),r},ahe=({status:e,matchMedia:t=window.matchMedia})=>{const n=fa(),r=EC(991,t);return e==="validating"?m.jsx(je,{fixedWidth:!0,icon:t$,spin:!0}):m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:n,children:e==="valid"?m.jsx(je,{fixedWidth:!0,icon:Oh,className:"text-muted"}):m.jsx(je,{fixedWidth:!0,icon:T2,className:"text-danger"})}),m.jsx(Cr,{target:n,placement:r?"right":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":m.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",m.jsx("br",{}),"Check the ",m.jsx(hi,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},Ux=({fallback:e})=>m.jsxs("span",{className:"text-muted",children:[!e&&m.jsx("small",{children:"No redirect"}),e&&m.jsxs(m.Fragment,{children:[e," ",m.jsx("small",{children:"(as fallback)"})]})]}),she=()=>m.jsxs(m.Fragment,{children:[m.jsx(je,{fixedWidth:!0,icon:UZ,className:"text-primary",id:"defaultDomainIcon"}),m.jsx(Cr,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),lhe=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:a,status:s}=e;return R.useEffect(()=>{n(e.domain)},[n,e.domain]),m.jsxs("tr",{className:"responsive-table__row",children:[m.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:o&&m.jsx(she,{})}),m.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:i}),m.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??m.jsx(Ux,{fallback:r==null?void 0:r.baseUrlRedirect})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??m.jsx(Ux,{fallback:r==null?void 0:r.regular404Redirect})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??m.jsx(Ux,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),m.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:m.jsx(ahe,{status:s})}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx(Wde,{domain:e,editDomainRedirects:t})})]})},$R=[{value:"Is default domain",isHidden:!0},{value:"Domain",isHidden:!1},{value:"Base path redirect",isHidden:!1},{value:"Regular 404 redirect",isHidden:!1},{value:"Invalid short URL redirect",isHidden:!1},{value:"Domain status",isHidden:!0},{value:"Options",isHidden:!0}],uhe=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i})=>{var o;const{filteredDomains:a,defaultRedirects:s,loading:l,error:u,errorData:f}=t,d=s??((o=a.find(({isDefault:v})=>v))==null?void 0:o.redirects),p=dC();return R.useEffect(()=>{e()},[e]),l?m.jsx(na,{loading:!0}):m.jsxs(fC,{value:p,children:[m.jsx(qp,{className:"mb-3",onChange:n}),m.jsx(hC,{type:"domains",className:"mb-3"}),u?m.jsx(ur,{type:"error",children:m.jsx(Oo,{errorData:f,fallbackMessage:"Error loading domains :("})}):m.jsx(Ot,{children:m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsx("thead",{className:"responsive-table__header",children:m.jsx("tr",{children:$R.map((v,g)=>m.jsx("th",{children:m.jsx("span",{className:v.isHidden?"sr-only":void 0,children:v.value})},g))})}),m.jsxs("tbody",{children:[a.length<1&&m.jsx("tr",{children:m.jsx("td",{colSpan:$R.length,className:"text-center",children:"No results found"})}),a.map(v=>m.jsx(lhe,{domain:v,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:d},v.domain))]})]})})]})},che="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",fhe=e=>yn(che,async({domain:t,redirects:n})=>{const r=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:r}}),yv="shlink/domainsList",bv={domains:[],filteredDomains:[],loading:!1,error:!1},FR=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},UR=(e,t)=>n=>n.domain!==e?n:{...n,status:t},dhe=(e,t)=>{const n=yn(`${yv}/listDomains`,async()=>{const{data:a,defaultRedirects:s}=await e().listDomains();return{domains:a.map(l=>({...l,status:"validating"})),defaultRedirects:s}}),r=yn(`${yv}/checkDomainHealth`,async a=>{try{const{status:s}=await e().health(a);return{domain:a,status:s==="pass"?"valid":"invalid"}}catch{return{domain:a,status:"invalid"}}}),i=vn(`${yv}/filterDomains`),{reducer:o}=rn({name:yv,initialState:bv,reducers:{},extraReducers:a=>{a.addCase(n.pending,()=>({...bv,loading:!0})),a.addCase(n.rejected,(s,{error:l})=>({...bv,error:!0,errorData:qr(l)})),a.addCase(n.fulfilled,(s,{payload:l})=>({...bv,...l,filteredDomains:l.domains})),a.addCase(r.fulfilled,({domains:s,filteredDomains:l,...u},{payload:f})=>({...u,domains:s.map(UR(f.domain,f.status)),filteredDomains:l.map(UR(f.domain,f.status))})),a.addCase(i,(s,{payload:l})=>({...s,filteredDomains:s.domains.filter(({domain:u})=>u.toLowerCase().match(l.toLowerCase()))})),a.addCase(t.fulfilled,(s,{payload:l})=>({...s,domains:s.domains.map(FR(l)),filteredDomains:s.filteredDomains.map(FR(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},hhe=(e,t)=>{e.serviceFactory("DomainSelector",()=>Lce),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>uhe),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",dhe,"apiClientFactory","editDomainRedirects"),e.serviceFactory("domainsListReducer",n=>n.reducer,"domainsListReducerCreator"),e.serviceFactory("listDomains",n=>n.listDomains,"domainsListReducerCreator"),e.serviceFactory("filterDomains",n=>n.filterDomains,"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",fhe,"apiClientFactory"),e.serviceFactory("checkDomainHealth",n=>n.checkDomainHealth,"domainsListReducerCreator")},BR="shlink/mercure",phe={loading:!0,error:!1},mhe=e=>{const t=yn(`${BR}/loadMercureInfo`,r=>{if(r&&r.realTimeUpdates&&!r.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=rn({name:BR,initialState:phe,reducers:{},extraReducers:r=>{r.addCase(t.pending,i=>({...i,loading:!0,error:!1})),r.addCase(t.rejected,i=>({...i,loading:!1,error:!0})),r.addCase(t.fulfilled,(i,{payload:o})=>({...o,loading:!1,error:!1}))}});return{loadMercureInfo:t,reducer:n}},vhe=e=>{e.serviceFactory("mercureInfoReducerCreator",mhe,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",t=>t.reducer,"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",t=>t.loadMercureInfo,"mercureInfoReducerCreator")};function $t(e){return R.useRef(e).current}function Ft(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}var Bu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wS={exports:{}};/** @license * eventsource.js * Available under MIT License (MIT) * https://github.com/Yaffle/EventSource/ */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,a=n.XDomainRequest,s=n.ActiveXObject,l=n.EventSource,u=n.document,f=n.Promise,d=n.fetch,p=n.Response,v=n.TextDecoder,g=n.TextEncoder,y=n.AbortController;if(typeof window<"u"&&typeof u<"u"&&!("readyState"in u)&&u.body==null&&(u.readyState="loading",window.addEventListener("load",function(se){u.readyState="complete"},!1)),o==null&&s!=null&&(o=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(se){function pe(){}return pe.prototype=se,new pe}),Date.now||(Date.now=function(){return new Date().getTime()}),y==null){var w=d;d=function(se,pe){var me=pe.signal;return w(se,{headers:pe.headers,credentials:pe.credentials,cache:pe.cache}).then(function(xe){var Ce=xe.body.getReader();return me._reader=Ce,me._aborted&&me._reader.cancel(),{status:xe.status,statusText:xe.statusText,headers:xe.headers,body:{getReader:function(){return Ce}}}})},y=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function b(){this.bitsNeeded=0,this.codePoint=0}b.prototype.decode=function(se){function pe(ye,ge,we){if(we===1)return ye>=128>>ge&&ye<=2048>>ge&&ye<=57344>>ge&&ye<=65536>>ge&&ye<>6>15?3:ge>31?2:1;if(ye===6*2)return ge>15?3:2;if(ye===6*3)return 3;throw new Error}for(var xe=65533,Ce="",Te=this.bitsNeeded,Pe=this.codePoint,le=0;le191||!pe(Pe<<6|ce&63,Te-6,me(Te,Pe)))&&(Te=0,Pe=xe,Ce+=String.fromCharCode(Pe)),Te===0?(ce>=0&&ce<=127?(Te=0,Pe=ce):ce>=192&&ce<=223?(Te=6*1,Pe=ce&31):ce>=224&&ce<=239?(Te=6*2,Pe=ce&15):ce>=240&&ce<=247?(Te=6*3,Pe=ce&7):(Te=0,Pe=xe),Te!==0&&!pe(Pe,Te,me(Te,Pe))&&(Te=0,Pe=xe)):(Te-=6,Pe=Pe<<6|ce&63),Te===0&&(Pe<=65535?Ce+=String.fromCharCode(Pe):(Ce+=String.fromCharCode(55296+(Pe-65535-1>>10)),Ce+=String.fromCharCode(56320+(Pe-65535-1&1023))))}return this.bitsNeeded=Te,this.codePoint=Pe,Ce};var x=function(){try{return new v().decode(new g().encode("test"),{stream:!0})==="test"}catch(se){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+se)}return!1};(v==null||g==null||!x())&&(v=b);var _=function(){};function S(se){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=_,this.onload=_,this.onerror=_,this.onreadystatechange=_,this._contentType="",this._xhr=se,this._sendTimeout=0,this._abort=_}S.prototype.open=function(se,pe){this._abort(!0);var me=this,xe=this._xhr,Ce=1,Te=0;this._abort=function(we){me._sendTimeout!==0&&(i(me._sendTimeout),me._sendTimeout=0),(Ce===1||Ce===2||Ce===3)&&(Ce=4,xe.onload=_,xe.onerror=_,xe.onabort=_,xe.onprogress=_,xe.onreadystatechange=_,xe.abort(),Te!==0&&(i(Te),Te=0),we||(me.readyState=4,me.onabort(null),me.onreadystatechange())),Ce=0};var Pe=function(){if(Ce===1){var we=0,Ae="",Ne=void 0;if("contentType"in xe)we=200,Ae="OK",Ne=xe.contentType;else try{we=xe.status,Ae=xe.statusText,Ne=xe.getResponseHeader("Content-Type")}catch{we=0,Ae="",Ne=void 0}we!==0&&(Ce=2,me.readyState=2,me.status=we,me.statusText=Ae,me._contentType=Ne,me.onreadystatechange())}},le=function(){if(Pe(),Ce===2||Ce===3){Ce=3;var we="";try{we=xe.responseText}catch{}me.readyState=3,me.responseText=we,me.onprogress()}},ce=function(we,Ae){if((Ae==null||Ae.preventDefault==null)&&(Ae={preventDefault:_}),le(),Ce===1||Ce===2||Ce===3){if(Ce=4,Te!==0&&(i(Te),Te=0),me.readyState=4,we==="load")me.onload(Ae);else if(we==="error")me.onerror(Ae);else if(we==="abort")me.onabort(Ae);else throw new TypeError;me.onreadystatechange()}},ye=function(we){xe!=null&&(xe.readyState===4?(!("onload"in xe)||!("onerror"in xe)||!("onabort"in xe))&&ce(xe.responseText===""?"error":"load",we):xe.readyState===3?"onprogress"in xe||le():xe.readyState===2&&Pe())},ge=function(){Te=r(function(){ge()},500),xe.readyState===3&&le()};"onload"in xe&&(xe.onload=function(we){ce("load",we)}),"onerror"in xe&&(xe.onerror=function(we){ce("error",we)}),"onabort"in xe&&(xe.onabort=function(we){ce("abort",we)}),"onprogress"in xe&&(xe.onprogress=le),"onreadystatechange"in xe&&(xe.onreadystatechange=function(we){ye(we)}),("contentType"in xe||!("ontimeout"in o.prototype))&&(pe+=(pe.indexOf("?")===-1?"?":"&")+"padding=true"),xe.open(se,pe,!0),"readyState"in xe&&(Te=r(function(){ge()},0))},S.prototype.abort=function(){this._abort(!1)},S.prototype.getResponseHeader=function(se){return this._contentType},S.prototype.setRequestHeader=function(se,pe){var me=this._xhr;"setRequestHeader"in me&&me.setRequestHeader(se,pe)},S.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},S.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&u!=null&&u.readyState!=null&&u.readyState!=="complete"){var se=this;se._sendTimeout=r(function(){se._sendTimeout=0,se.send()},4);return}var pe=this._xhr;"withCredentials"in pe&&(pe.withCredentials=this.withCredentials);try{pe.send(void 0)}catch(me){throw me}};function j(se){return se.replace(/[A-Z]/g,function(pe){return String.fromCharCode(pe.charCodeAt(0)+32)})}function E(se){for(var pe=Object.create(null),me=se.split(`\r `),xe=0;xe"u"?typeof window<"u"?window:typeof self<"u"?self:Bu:globalThis)})(wS,wS.exports);var ghe=wS.exports;const yhe=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:a,error:s}=e;if(a||s||!i)return;const l=({data:d})=>n(JSON.parse(d)),u=({status:d})=>d===401&&r(),f=t.map(d=>{const p=new URL(i);p.searchParams.append("topic",d);const v=new ghe.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return v.onmessage=l,v.onerror=u,v});return()=>f.forEach(d=>d.close())};function Ki(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:a}=r,s=Jc();return R.useEffect(()=>{const{interval:l}=a,u=v=>l?n.add(v):i([v]),f=t(s),d=yhe(a,f,u,o);if(!l)return d;const p=setInterval(()=>{i([...n]),n.clear()},l*1e3*60);return()=>{clearInterval(p),d==null||d()}},[i,o,a,s]),m.jsx(e,{...r})}}class cr{}Qa(cr,"visits","https://shlink.io/new-visit"),Qa(cr,"orphanVisits","https://shlink.io/new-orphan-visit"),Qa(cr,"shortUrlVisits",e=>`https://shlink.io/new-visit/${e}`);const jC="shlink/shortUrlDeletion",zR={shortCode:"",loading:!1,deleted:!1,error:!1},bhe=e=>yn(`${jC}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl(t,n),{shortCode:t,domain:n})),fU=vn(`${jC}/shortUrlDeleted`),_he=e=>{const{actions:t,reducer:n}=rn({name:jC,initialState:zR,reducers:{resetDeleteShortUrl:()=>zR},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:a})=>({...o,errorData:qr(a),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:a})=>({...o,shortCode:a.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},dU="shlink/shortUrlsList",hU=5,xhe={loading:!0,error:!1},whe=e=>yn(`${dU}/listShortUrls`,t=>e().listShortUrls(t??{})),Ohe=(e,t,n)=>rn({name:dU,initialState:xhe,reducers:{},extraReducers:r=>{r.addCase(e.pending,i=>({...i,loading:!0,error:!1})),r.addCase(e.rejected,()=>({loading:!1,error:!0})),r.addCase(e.fulfilled,(i,{payload:o})=>({loading:!1,error:!1,shortUrls:o})),r.addCase(n.fulfilled,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=[o,...i.shortUrls.data.slice(0,hU-1)],i.shortUrls.pagination.totalItems+=1)}),r.addCase(t.fulfilled,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.map(a=>{const{shortCode:s,domain:l}=o;return qd(a,s,l)?o:a}))}),r.addCase(fU,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.filter(a=>!qd(a,o.shortCode,o.domain)),i.shortUrls.pagination.totalItems-=1)}),r.addCase(uf,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.map(a=>{var s;return((s=o.createdVisits.findLast(({shortUrl:l})=>l&&qd(a,l.shortCode,l.domain)))==null?void 0:s.shortUrl)??a}))})}}),VR=10,{ceil:She}=Math,Ehe=new Intl.NumberFormat("en-US"),Zt=e=>Ehe.format(Number(e)),jhe=e=>She(e/VR)*VR,The={field:"dateCreated",dir:"DESC"},pU={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:The}},mU=R.createContext(pU),Che=mU.Provider,TC=()=>R.useContext(mU)??pU,ws=e=>TC()[e],OS=({children:e,title:t,link:n,tooltip:r})=>{const i=fa();return m.jsxs(m.Fragment,{children:[m.jsxs(jr,{innerRef:i,className:"highlight-card",body:!0,tag:jt,to:n,children:[m.jsx(je,{size:"3x",className:"highlight-card__link-icon",icon:lce}),m.jsx(y7,{className:"lh-sm fw-semibold text-uppercase fs-5 highlight-card__title",children:t}),m.jsx(g7,{className:"fs-2 fw-semibold lh-sm",children:e})]}),r&&m.jsx(Cr,{target:i,placement:"bottom",children:r})]})},HR=({loading:e,excludeBots:t,visitsSummary:n,...r})=>m.jsx(OS,{tooltip:n.bots!==void 0?m.jsxs(m.Fragment,{children:[t?"Plus":"Including"," ",m.jsx("strong",{children:Zt(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":Zt(t&&n.nonBots?n.nonBots:n.total)}),vU=Ki(({shortUrlsList:e,listShortUrls:t,tagsList:n,loadVisitsOverview:r,visitsOverview:i})=>{const{ShortUrlsTable:o,CreateShortUrl:a}=$t(vU),{loading:s,shortUrls:l}=e,{loading:u}=n,{loading:f,nonOrphanVisits:d,orphanVisits:p}=i,v=xs(),g=jo(),y=ws("visits");return R.useEffect(()=>{t({itemsPerPage:hU,orderBy:{field:"dateCreated",dir:"DESC"}}),r()},[t,r]),m.jsxs(m.Fragment,{children:[m.jsxs(ir,{children:[m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(HR,{title:"Visits",link:`${v}/non-orphan-visits`,excludeBots:(y==null?void 0:y.excludeBots)??!1,loading:f,visitsSummary:d})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(HR,{title:"Orphan visits",link:`${v}/orphan-visits`,excludeBots:(y==null?void 0:y.excludeBots)??!1,loading:f,visitsSummary:p})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(OS,{title:"Short URLs",link:`${v}/list-short-urls/1`,children:s?"Loading...":Zt((l==null?void 0:l.pagination.totalItems)??0)})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(OS,{title:"Tags",link:`${v}/manage-tags`,children:u?"Loading...":Zt(n.tags.length)})})]}),m.jsxs(jr,{className:"mb-3",children:[m.jsxs(xc,{children:[m.jsx("span",{className:"d-sm-none",children:"Create a short URL"}),m.jsx("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),m.jsx(jt,{className:"float-end",to:`${v}/create-short-url`,children:"Advanced options »"})]}),m.jsx(_c,{children:m.jsx(a,{basicMode:!0})})]}),m.jsxs(jr,{children:[m.jsxs(xc,{children:[m.jsx("span",{className:"d-sm-none",children:"Recently created URLs"}),m.jsx("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),m.jsx(jt,{className:"float-end",to:`${v}/list-short-urls/1`,children:"See all »"})]}),m.jsx(_c,{children:m.jsx(o,{shortUrlsList:e,className:"mb-0",onTagClick:w=>g(`${v}/list-short-urls/1?tags=${encodeURIComponent(w)}`)})})]})]})},()=>[cr.visits,cr.orphanVisits]),Phe=Ft(vU,["ShortUrlsTable","CreateShortUrl"]);function Ahe(e,t){e.factory("Overview",Phe),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const gU="shlink/setShortUrlRedirectRules",WR={saving:!1,saved:!1,error:!1},khe=e=>yn(`${gU}/setShortUrlRedirectRules`,({shortUrl:t,data:n})=>{const{shortCode:r,domain:i}=t;return e().setShortUrlRedirectRules(r,i,n)}),Nhe=e=>{const{reducer:t,actions:n}=rn({name:gU,initialState:WR,reducers:{resetSetRules:()=>WR},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:qr(a)})),i.addCase(e.fulfilled,()=>({saving:!1,error:!1,saved:!0}))}}),{resetSetRules:r}=n;return{reducer:t,resetSetRules:r}},yU="shlink/getShortUrlRedirectRules",Rhe={loading:!0,error:!1},Lhe=e=>yn(`${yU}/getShortUrlRedirectRules`,({shortCode:t,domain:n})=>e().getShortUrlRedirectRules(t,n)),Mhe=e=>rn({name:yU,initialState:Rhe,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({loading:!0,error:!1})),t.addCase(e.rejected,()=>({loading:!1,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({loading:!1,error:!1,...r}))}});function Ihe(e,t){var n=!1;return function(...r){n||(e.call(null,...r),n=!0,setTimeout(function(){n=!1},t))}}function bU(e){return e.split(" ").filter(t=>t)}var _U=typeof window<"u";function Rl(e,t,n=!1){if(!t)return;const r=bU(t);if(r.length&&!r.includes("longTouch"))for(const i of e){if(!em(i)||!go.has(i)){i.classList.add(...r);continue}const o=[],a=go.get(i);if(a){for(const s of r)i.classList.contains(s)?i.classList.contains(s)&&n===!1&&o.push(s):i.classList.add(s);a.privateClasses=o,go.set(i,a)}}}function Ny(e,t){if(!t)return;const n=bU(t);if(n.length)for(const r of e){if(!em(r)){r.classList.remove(...n);continue}const i=go.get(r);if(i)for(const o of n)i.privateClasses.includes(o)||r.classList.remove(o)}}function xU(e){let t=e.parentNode;for(;t!==null&&t.nodeType===1&&t instanceof HTMLElement;){const n=window.getComputedStyle(t).getPropertyValue("overflow");if(n==="scroll"||n==="auto")return t;t=t.parentNode}return document.documentElement}function Dhe(e){if(!(e.e instanceof TouchEvent))return;const t=e.e.touches[0].clientX,n=e.e.touches[0].clientY;let r=document.elementFromPoint(t,n);if(!em(r))return;let i,o=!0;for(;r&&o;){if(go.has(r)||$i.has(r)){o=!1,i=$i.has(r);break}r=r.parentNode}if(i){const a=$i.get(r);return a?{parent:{el:r,data:a}}:void 0}else{const a=go.get(r);if(!a)return;const s=$i.get(r.parentNode);return s?{node:{el:r,data:a},parent:{el:r.parentNode,data:s}}:void 0}}function em(e){return e instanceof HTMLElement&&e.parentNode instanceof HTMLElement}function wU(e,t){const n=new AbortController;for(const r in t){const i=t[r];e.addEventListener(r,i,{signal:n.signal,passive:!1})}return n}function OU(e,t,n=!1){const r=window.getComputedStyle(e),i=["position","z-index","top","left","x","pointer-events","y","transform-origin","filter","-webkit-text-fill-color"];for(const o of Array.from(r))n===!1&&o&&i.includes(o)||t.style.setProperty(o,r.getPropertyValue(o),r.getPropertyPriority(o));for(const o of Array.from(e.children)){if(!em(o))continue;const a=t.children[Array.from(e.children).indexOf(o)];OU(o,a,n)}}function zl(e){return e instanceof DragEvent?{x:e.clientX,y:e.clientY}:{x:e.touches[0].clientX,y:e.touches[0].clientY}}Array();var GR={up:[0,-1],down:[0,1],left:[-1,0],right:[1,0]},go=new WeakMap,$i=new WeakMap,qe=void 0;function $he(){qe=void 0}function SU(e){return qe={ascendingDirection:!1,incomingDirection:void 0,enterCount:0,targetIndex:0,affectedNodes:[],lastValue:void 0,activeNode:void 0,lastTargetValue:void 0,remapJustFinished:!1,preventEnter:!1,clonedDraggedEls:[],swappedNodeValue:!1,originalZIndex:void 0,...e},qe}function Fhe(e,t){return qe={...e,...t},qe}function EU(e){const{x:t,y:n}=zl(e.e);return{coordinates:{x:t,y:n},draggedNode:{el:e.targetData.node.el,data:e.targetData.node.data},draggedNodes:[{el:e.targetData.node.el,data:e.targetData.node.data}],initialIndex:e.targetData.node.data.index,initialParent:{el:e.targetData.parent.el,data:e.targetData.parent.data},lastParent:{el:e.targetData.parent.el,data:e.targetData.parent.data},scrollParent:xU(e.targetData.node.el)}}function Uhe(e,t){const n=jU(e),r=[...SS(t.targetData.parent.el,t.targetData.parent.data).filter(i=>!n.includes(i))];r.splice(t.targetData.node.data.index,0,...n),e.lastTargetValue=t.targetData.node.data.value,ES(t.targetData.parent.el,t.targetData.parent.data,[...r])}function SS(e,t){return[...t.getValues(e)]}function ES(e,t,n){t.setValues(n,e)}function jU(e){return[...e.draggedNodes.map(t=>t.data.value)]}function Bhe({parent:e,getValues:t,setValues:n,config:r={}}){var i,o;if(!_U)return;document.addEventListener("dragover",s=>{if(s.preventDefault(),qe){qe.remapJustFinished=!1,qe.lastTargetValue=void 0;const{x:l,y:u}=zl(s);qe.coordinates.y=u,qe.coordinates.x=l,jb()}}),TU(e);const a={getValues:t,setValues:n,config:{handleDragstart:Whe,handleDragoverNode:gpe,handleDragoverParent:ype,handleEnd:tpe,handleTouchstart:rpe,handleTouchmove:spe,handleTouchOverNode:Zhe,handleTouchOverParent:bpe,performSort:Uhe,performTransfer:Ope,root:document,setupNode:Xhe,setupNodeRemap:AU,reapplyDragClasses:Qhe,tearDownNode:epe,tearDownNodeRemap:Jhe,remapFinished:Hhe,scrollBehavior:{x:.8,y:.8},threshold:{horizontal:0,vertical:0},...r},enabledNodes:[],abortControllers:{}};zhe(e,a),(i=r.plugins)==null||i.forEach(s=>{var l,u;(u=(l=s(e))==null?void 0:l.tearDown)==null||u.call(l)}),(o=r.plugins)==null||o.forEach(s=>{var l,u;(u=(l=s(e))==null?void 0:l.setup)==null||u.call(l)}),CU(e,!0)}function TU(e){const t=$i.get(e);t&&t.abortControllers.mainParent&&t.abortControllers.mainParent.abort()}function zhe(e,t){new MutationObserver(Vhe).observe(e,{childList:!0}),$i.set(e,t),t.abortControllers.mainParent=wU(e,{dragover:Spe(Ihe(t.config.handleDragoverParent,10)),touchOverParent:t.config.handleTouchOverParent})}function Vhe(e){const t=e[0].target;t instanceof HTMLElement&&CU(t)}function CU(e,t){const n=$i.get(e);if(!n)return;const r=[],i=n.config;for(let s=0;sp.data.value).includes(f.value)){const p=qe.draggedNodes.find(v=>v.data.value===f.value);p&&(p.el=l)}a.push({el:l,data:f});const d={node:l,parent:e,parentData:n,nodeData:f};(t||!u)&&i.setupNode(d),AU(d)}$i.set(e,{...n,enabledNodes:a}),i.remapFinished(n)}function Hhe(){qe&&(qe.preventEnter=!1,qe.swappedNodeValue=void 0,qe.remapJustFinished=!0)}function Whe(e){e.e instanceof DragEvent&&Yhe({e:e.e,targetData:e.targetData})}function Ghe(e,t,n){Rl([e],t),setTimeout(()=>{Ny([e],t),Rl([e],n)})}function qhe(e){const t=SU(EU(e));return e.e.stopPropagation(),e.e.dataTransfer&&(e.e.dataTransfer.dropEffect="move",e.e.dataTransfer.effectAllowed="move",e.e.dataTransfer.setDragImage(e.targetData.node.el,e.e.offsetX,e.e.offsetY)),t}function PU(e){if(!(e.e instanceof DragEvent)&&!(e.e instanceof TouchEvent))return!1;const t=e.targetData.parent.data.config;if(!t.dragHandle)return!0;const n=e.targetData.node.el.querySelectorAll(t.dragHandle);if(!n)return!1;const r=zl(e.e),i=t.root.elementFromPoint(r.x,r.y);if(!i)return!1;for(const o of Array.from(n))if(i===o||o.contains(i))return!0;return!1}function Khe(e){if(!PU(e))return;const t=ipe(e);ope(e,t),ape(e,t)}function Yhe(e){if(!PU(e)){e.e.preventDefault();return}const t=e.targetData.parent.data.config,n=qhe(e),r=e.targetData.node.el.style.zIndex;n.originalZIndex=r,e.targetData.node.el.style.zIndex="9999",Ghe(n.draggedNode.el,t.draggingClass,t.dropZoneClass)}function Zhe(e){qe&&(e.detail.targetData.parent.el===qe.lastParent.el?RU(e.detail,qe):Tb(e.detail,qe))}function Xhe(e){var t;const n=e.parentData.config;e.node.draggable=!0,e.nodeData.abortControllers.mainNode=wU(e.node,{dragstart:hu(n.handleDragstart),dragover:hu(n.handleDragoverNode),dragend:hu(n.handleEnd),touchstart:hu(n.handleTouchstart),touchmove:hu(n.handleTouchmove),touchend:hu(n.handleEnd),touchOverNode:n.handleTouchOverNode}),n.reapplyDragClasses(e.node,e.parentData),(t=e.parentData.config.plugins)==null||t.forEach(r=>{var i,o;(o=(i=r(e.parent))==null?void 0:i.setupNode)==null||o.call(i,e)})}function AU(e){var t;go.set(e.node,e.nodeData),(t=e.parentData.config.plugins)==null||t.forEach(n=>{var r,i;(i=(r=n(e.parent))==null?void 0:r.setupNodeRemap)==null||i.call(r,e)})}function Qhe(e,t){if(!qe)return;const n="touchedNode"in qe?t.config.touchDropZoneClass:t.config.dropZoneClass;qe.draggedNode.el===e&&Rl([e],n,!0)}function Jhe(e){var t;(t=e.parentData.config.plugins)==null||t.forEach(n=>{var r,i;(i=(r=n(e.parent))==null?void 0:r.tearDownNodeRemap)==null||i.call(r,e)})}function epe(e){var t,n,r,i,o;(t=e.parentData.config.plugins)==null||t.forEach(a=>{var s,l;(l=(s=a(e.parent))==null?void 0:s.tearDownNode)==null||l.call(s,e)}),e.node.draggable=!1,(r=(n=e.nodeData)==null?void 0:n.abortControllers)!=null&&r.mainNode&&((o=(i=e.nodeData)==null?void 0:i.abortControllers)==null||o.mainNode.abort())}function tpe(e){qe&&(npe(e,qe),$he())}function npe(e,t){var n,r,i,o;document.removeEventListener("contextmenu",kU),"longTouchTimeout"in t&&t.longTouchTimeout&&clearTimeout(t.longTouchTimeout);const a=(n=$i.get(t.initialParent.el))==null?void 0:n.config,s="touchedNode"in t?a==null?void 0:a.touchDropZoneClass:a==null?void 0:a.dropZoneClass;t.originalZIndex!==void 0&&(t.draggedNode.el.style.zIndex=t.originalZIndex),Rl(t.draggedNodes.map(l=>l.el),s,!0),Ny(t.draggedNodes.map(l=>l.el),s),a!=null&&a.longTouchClass&&Ny(t.draggedNodes.map(l=>l.el),(i=(r=t.initialParent.data)==null?void 0:r.config)==null?void 0:i.longTouchClass),"touchedNode"in t&&((o=t.touchedNode)==null||o.remove())}function rpe(e){e.e instanceof TouchEvent&&Khe({e:e.e,targetData:e.targetData})}function ipe(e){e.e.stopPropagation();const t=e.targetData.node.el.cloneNode(!0),n=e.targetData.node.el.getBoundingClientRect();return Fhe(SU(EU(e)),{coordinates:{x:e.e.touches[0].clientX,y:e.e.touches[0].clientY},scrollParent:xU(e.targetData.node.el),touchStartLeft:e.e.touches[0].clientX-n.left,touchStartTop:e.e.touches[0].clientY-n.top,touchedNode:t,touchMoving:!1})}function kU(e){e.preventDefault()}function ope(e,t){t.touchedNodeDisplay=t.touchedNode.style.display;const n=e.targetData.node.el.getBoundingClientRect();t.touchedNode.style.cssText=` width: ${n.width}px; position: fixed; pointer-events: none; top: -9999px; z-index: 999999; display: none; `,document.body.append(t.touchedNode),OU(e.targetData.node.el,t.touchedNode),t.touchedNode.style.display="none",document.addEventListener("contextmenu",kU)}function ape(e,t){const n=e.targetData.parent.data.config;n.longTouch&&(t.longTouchTimeout=setTimeout(()=>{t&&(t.longTouch=!0,n.longTouchClass&&e.e.cancelable&&Rl(t.draggedNodes.map(r=>r.el),n.longTouchClass),e.e.preventDefault())},n.longTouchTimeout||200))}function spe(e){!qe||!("touchedNode"in qe)||vpe(e,qe)}function lpe(e,t){t.longTouchClass&&Ny(e.draggedNodes.map(n=>n.el),t==null?void 0:t.longTouchClass),t.touchDraggingClass&&Rl([e.touchedNode],t.touchDraggingClass),t.touchDropZoneClass&&Rl(e.draggedNodes.map(n=>n.el),t.touchDropZoneClass)}function upe(e){if(!e||!e.scrollParent)return;const{x:t,y:n,width:r,height:i}=e.scrollParent.getBoundingClientRect(),{x:o,y:a,scrollOutside:s}=e.lastParent.data.config.scrollBehavior;return{state:e,xThresh:o,yThresh:a,scrollOutside:s,scrollParent:e.scrollParent,x:t,y:n,width:r,height:i}}function cpe(e){const t=upe(qe);if(t)switch(e){case"down":return ppe(t.state,t);case"up":return hpe(t.state,t);case"right":return fpe(t.state,t);case"left":return dpe(t.state,t)}}function fpe(e,t){const n=t.scrollParent.clientWidth+t.x-e.coordinates.x;if(!(!t.scrollOutside&&n<0)&&n<(1-t.xThresh)*t.scrollParent.clientWidth&&!(t.scrollParent.scrollLeft+t.scrollParent.clientWidth>=t.scrollParent.scrollWidth))return e}function dpe(e,t){const n=t.scrollParent.clientWidth+t.x-e.coordinates.x;if(!(!t.scrollOutside&&n>t.scrollParent.clientWidth)&&n>t.xThresh*t.scrollParent.clientWidth&&t.scrollParent.scrollLeft!==0)return e}function hpe(e,t){const n=t.scrollParent.clientHeight+t.y-e.coordinates.y;if(!(!t.scrollOutside&&n>t.scrollParent.clientHeight)&&n>t.yThresh*t.scrollParent.clientHeight&&t.scrollParent.scrollTop!==0)return e}function ppe(e,t){const n=t.scrollParent.clientHeight+t.y-e.coordinates.y;if(!(!t.scrollOutside&&n<0)&&n<(1-t.yThresh)*t.scrollParent.clientHeight&&!(t.scrollParent.scrollTop+t.scrollParent.clientHeight>=t.scrollParent.scrollHeight))return e}function mpe(e,t){t.touchMoving=!0,t.touchedNode.style.display=t.touchedNodeDisplay||"";const{x:n,y:r}=zl(e.e);t.coordinates.y=r,t.coordinates.x=n;const i=t.touchStartLeft??0,o=t.touchStartTop??0;t.touchedNode.style.left=`${n-i}px`,t.touchedNode.style.top=`${r-o}px`,lpe(t,e.targetData.parent.data.config)}function vpe(e,t){if(e.targetData.parent.data.config.longTouch&&!t.longTouch){clearTimeout(t.longTouchTimeout);return}e.e.cancelable&&e.e.preventDefault(),mpe(e,t),jb();const n=Dhe(e);if(!n)return;const r={e:e.e,targetData:n};"node"in n?n.node.el.dispatchEvent(new CustomEvent("touchOverNode",{detail:r})):n.parent.el.dispatchEvent(new CustomEvent("touchOverParent",{detail:r}))}function jb(){for(const e of Object.keys(GR)){const[t,n]=GR[e];NU(e,t,n)}}function NU(e,t,n){const r=cpe(e);r&&(r.scrollParent.scrollBy(t,n),setTimeout(()=>{NU(e,t,n)},"touchedNode"in r?10:100))}function gpe(e){if(!qe)return;const{x:t,y:n}=zl(e.e);qe.coordinates.y=n,qe.coordinates.x=t,jb(),xpe(e,qe)}function ype(e){if(!qe)return;const{x:t,y:n}=zl(e.e);qe.coordinates.y=n,qe.coordinates.x=t,jb(),Tb(e,qe)}function bpe(e){qe&&Tb(e.detail,qe)}function _pe(e,t){if(e.targetData.parent.el===t.lastParent.el)return!1;const n=e.targetData.parent.data.config;if(n.dropZone===!1)return!1;const r=t.initialParent.data.config;return n.accepts?n.accepts(e.targetData.parent,t.initialParent,t.lastParent,t):!(!n.group||n.group!==r.group)}function xpe(e,t){var n;e.e.preventDefault(),e.e.stopPropagation(),e.targetData.parent.el===((n=t.lastParent)==null?void 0:n.el)?RU(e,t):Tb(e,t)}function wpe(e,t,n,r){var i;if(t.remapJustFinished)return t.remapJustFinished=!1,t.lastTargetValue=e.targetData.node.data.value,!1;if(t.lastTargetValue===e.targetData.node.data.value||t.draggedNodes.map(p=>p.el).includes(e.targetData.node.el)||t.preventEnter||t.swappedNodeValue===e.targetData.node.data.value||e.targetData.parent.el!==((i=t.lastParent)==null?void 0:i.el)||e.targetData.parent.data.config.sortable===!1)return!1;const o=e.targetData.node.el.getBoundingClientRect(),a=t.draggedNode.el.getBoundingClientRect(),s=o.y-a.y,l=o.x-a.x;let u;const f=t.draggedNode.data.index>e.targetData.node.data.index?[e.targetData.node.data.index,t.draggedNode.data.index]:[t.draggedNode.data.index,e.targetData.node.data.index];t.targetIndex=e.targetData.node.data.index,t.affectedNodes=e.targetData.parent.data.enabledNodes.filter(p=>f[0]<=p.data.index&&p.data.index<=f[1]&&p.el!==t.draggedNode.el),Math.abs(s)>Math.abs(l)?u=s>0?"above":"below":u=l>0?"left":"right";const d=t.lastParent.data.config.threshold;switch(u){case"left":if(n>o.x+o.width*d.horizontal)return t.incomingDirection="left",!0;break;case"right":if(no.y+o.height*d.vertical)return t.incomingDirection="above",!0;break;case"below":if(r{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r})}}function Ope(e,t){const n=jU(e),r=SS(e.lastParent.el,e.lastParent.data).filter(s=>!n.includes(s)),i=SS(t.targetData.parent.el,t.targetData.parent.data),o=e.initialParent.el===t.targetData.parent.el&&t.targetData.parent.data.config.sortable===!1;let a;"node"in t.targetData?(o?a=e.initialIndex:t.targetData.parent.data.config.sortable===!1?a=t.targetData.parent.data.enabledNodes.length:a=t.targetData.node.data.index,i.splice(a,0,...n)):(a=o?e.initialIndex:t.targetData.parent.data.enabledNodes.length,i.splice(a,0,...n)),ES(e.lastParent.el,e.lastParent.data,r),ES(t.targetData.parent.el,t.targetData.parent.data,i)}function Tb(e,t){_pe(e,t)&&(e.targetData.parent.data.config.performTransfer(t,e),t.lastParent=e.targetData.parent)}function Spe(e){function t(n){const r=$i.get(n);if(r)return{parent:{el:n,data:r}}}return n=>{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r})}}function Epe(e){if(e instanceof HTMLElement)return e;if("current"in e&&e.current instanceof HTMLElement)return e.current;console.warn("Invalid parent element",e)}function jpe(e,t){const n=Epe(e);n&&t(n)}var Ry=new WeakMap;function Tpe(e){const t=Ry.get(e);return t?t[0]:(console.warn("No values found for parent element"),[])}function Cpe(e,t){const n=Ry.get(t);n&&n[1](e),Ry.set(t,[e,n[1]])}function Ppe(e,t){return n=>{Ry.set(n,t),Bhe({parent:n,getValues:Tpe,setValues:Cpe,config:e})}}function qR(e){_U&&(Array.isArray(e)||(e=[e]),e.forEach(t=>{const{parent:n,state:r,...i}=t;jpe(n,Ppe(i,r))}))}function Ape(e,t={}){const n=R.useRef(null),[r,i]=R.useState(e);function o(a={}){qR({parent:n,state:[r,i],...a})}return R.useEffect(()=>{qR({parent:n,state:[r,i],...t})},[r]),R.useEffect(()=>()=>{n.current&&TU(n.current)},[]),[n,r,i,o]}const Cb=()=>{const e=jo(),t=xs(),n=Gp(),r=R.useMemo(()=>{const{orderBy:o,tags:a,excludeBots:s,excludeMaxVisitsReached:l,excludePastValidUntil:u,...f}=n,d=o?zle(o):void 0,p=(a==null?void 0:a.split(","))??[];return{...f,orderBy:d,tags:p,excludeBots:s!==void 0?s==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:u!==void 0?u==="true":void 0}},[n]),i=R.useCallback(o=>{const a={...r,...o},{orderBy:s,tags:l,excludeBots:u,excludeMaxVisitsReached:f,excludePastValidUntil:d,...p}=a,v={...p,orderBy:s&&Ble(s),tags:l.length>0?l.join(","):void 0,excludeBots:$x(u),excludeMaxVisitsReached:$x(f),excludePastValidUntil:$x(d)},g=pb(v),y=g?`?${g}`:"";e(`${t}/list-short-urls/1${y}`)},[r,e,t]);return[r,i]},CC=()=>{const{domain:e}=Gp(),{shortCode:t=""}=Jc();return R.useMemo(()=>({shortCode:mC(t),domain:e}),[e,t])},Pb=()=>{const e=ohe();return m.jsx(Ye,{color:"link",size:"lg",className:"p-0 me-3",onClick:e,"aria-label":"Go back",children:m.jsx(je,{icon:JZ})})},kpe={android:"Android",ios:"iOS",desktop:"Desktop"},Npe=({deviceType:e,onDeviceTypeChange:t})=>{const n=R.useId();return m.jsxs("div",{children:[m.jsx("label",{htmlFor:n,children:"Device type:"}),m.jsxs("select",{id:n,className:"form-select",value:e,onChange:r=>t(r.target.value),required:!0,children:[!e&&m.jsx("option",{value:"",children:"- Select type -"}),Object.entries(kpe).map(([r,i])=>m.jsx("option",{value:r,children:i},r))]})]})},Rpe=({language:e,onLanguageChange:t})=>{const n=R.useId();return m.jsxs("div",{children:[m.jsx("label",{htmlFor:n,children:"Language:"}),m.jsx(Kn,{id:n,value:e??"",onChange:r=>t(r.target.value),placeholder:"en-US / en",required:!0})]})},Lpe=({name:e,value:t,onNameChange:n,onValueChange:r})=>{const i=R.useId(),o=R.useId();return m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:i,children:"Param name:"}),m.jsx(Kn,{id:i,value:e??"",onChange:a=>n(a.target.value),placeholder:"hello",required:!0})]}),m.jsxs("div",{children:[m.jsx("label",{htmlFor:o,children:"Param value:"}),m.jsx(Kn,{id:o,value:t??"",onChange:a=>r(a.target.value),placeholder:"world",required:!0})]})]})},Mpe={device:"Device type",language:"Language","query-param":"Query param"},Ipe=({condition:e,onConditionChange:t,onDelete:n})=>{const r=R.useId(),i=R.useCallback(s=>t({type:s,matchValue:"",matchKey:null}),[t]),o=R.useCallback(s=>t({...e,matchValue:s}),[e,t]),a=R.useCallback(s=>t({...e,matchKey:s}),[e,t]);return m.jsxs("div",{className:"redirect-rule-modal__condition rounded p-3 h-100 d-flex flex-column gap-2",children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:r,children:"Type:"}),m.jsxs("div",{className:"d-flex gap-2",children:[m.jsx("select",{id:r,className:"form-select flex-grow-1",value:e.type,onChange:s=>i(s.target.value),children:Object.entries(Mpe).map(([s,l])=>m.jsx("option",{value:s,children:l},s))}),m.jsx(Ye,{outline:!0,color:"danger",type:"button","aria-label":"Delete condition",onClick:n,children:m.jsx(je,{icon:J8})})]})]}),e.type==="device"&&m.jsx(Npe,{deviceType:e.matchValue,onDeviceTypeChange:o}),e.type==="language"&&m.jsx(Rpe,{language:e.matchValue,onLanguageChange:o}),e.type==="query-param"&&m.jsx(Lpe,{value:e.matchValue,name:e.matchKey??"",onNameChange:a,onValueChange:o})]})},LU=({isOpen:e,toggle:t,onSave:n,initialData:r})=>{const[i,o]=R.useState(r??{longUrl:"",conditions:[]}),a=R.useCallback(v=>{v.preventDefault(),v.stopPropagation(),i&&n(i),t()},[n,i,t]),s=R.useCallback(()=>o(({longUrl:v,conditions:g})=>({longUrl:v,conditions:[...g,{type:"device",matchValue:"",matchKey:null}]})),[]),l=R.useCallback((v,g)=>o(({longUrl:y,conditions:w})=>{const b=[...w];return b[v]=g,{longUrl:y,conditions:b}}),[]),u=R.useCallback(v=>o(({longUrl:g,conditions:y})=>{const w=[...y];return w.splice(v,1),{longUrl:g,conditions:w}}),[]),f=fa(),d=R.useCallback(()=>{var v;return(v=f==null?void 0:f.current)==null?void 0:v.focus()},[f]),p=R.useCallback(()=>o(r??{longUrl:"",conditions:[]}),[r]);return m.jsx(To,{size:"xl",isOpen:e,toggle:t,centered:!0,onOpened:d,onClosed:p,children:m.jsxs("form",{onSubmit:a,children:[m.jsx(Co,{toggle:t,className:"sticky-top redirect-rule-modal__header",children:"Redirect rule"}),m.jsxs(qi,{children:[m.jsx("label",{htmlFor:"longUrl",className:"fw-bold",children:"Long URL:"}),m.jsx(Kn,{id:"longUrl",type:"url",placeholder:"https://www.example.com",value:i.longUrl,onChange:v=>o(g=>({...g,longUrl:v.target.value})),required:!0,innerRef:f}),m.jsx("hr",{}),m.jsxs("div",{className:"d-flex justify-content-between",children:[m.jsx("b",{children:"Conditions:"}),m.jsx(Ye,{outline:!0,size:"sm",type:"button","aria-label":"Add condition",onClick:s,children:m.jsx(je,{icon:Lp})})]}),i.conditions.length===0&&m.jsx("div",{className:"text-center",children:m.jsx("i",{children:"Add conditions..."})}),i.conditions.length>0&&m.jsx(ir,{children:i.conditions.map((v,g)=>m.jsx("div",{className:"col-lg-6 col-xl-4 mt-3",children:m.jsx(Ipe,{condition:v,onConditionChange:y=>l(g,y),onDelete:()=>u(g)})},`${g}_${v.type}`))})]}),m.jsxs(bs,{className:"sticky-bottom redirect-rule-modal__footer",children:[m.jsx(Ye,{type:"button",color:"link",onClick:t,children:"Cancel"}),m.jsx(Ye,{color:"primary",disabled:i.conditions.length===0,children:"Confirm"})]})]})})},Dpe=({priority:e,isLast:t,redirectRule:n,onDelete:r,onMoveUp:i,onMoveDown:o,onUpdate:a})=>{const[s,l]=Xt();return m.jsxs(Ot,{children:[m.jsxs("div",{className:"d-flex align-content-center gap-3",children:[m.jsx("div",{className:"d-flex flex-column my-auto drag-n-drop-handler d-none d-md-block",style:{cursor:"grab"},children:m.jsx(je,{icon:aX})}),m.jsxs("div",{className:"d-flex flex-column my-auto",children:[m.jsx(Ye,{outline:!0,color:"secondary",size:"sm","aria-label":`Move rule with priority ${e} up`,disabled:e===1,onClick:i,className:"rounded-0 rounded-top",style:{marginBottom:"-1px"},children:m.jsx(je,{icon:xX})}),m.jsx(Ye,{outline:!0,color:"secondary",size:"sm","aria-label":`Move rule with priority ${e} down`,disabled:t,onClick:o,className:"rounded-0 rounded-bottom",children:m.jsx(je,{icon:vX})})]}),m.jsxs("div",{className:"flex-grow-1",children:[m.jsxs("div",{className:"mb-2",children:[m.jsx("b",{children:"Long URL:"})," ",m.jsx(hi,{href:n.longUrl,"data-testid":"rule-long-url"})]}),m.jsxs("div",{className:"d-flex flex-column flex-lg-row gap-2",children:[m.jsx("b",{children:"Conditions:"}),n.conditions.map((u,f)=>m.jsxs("div",{className:"badge bg-secondary",children:[u.type==="device"&&m.jsxs(m.Fragment,{children:["Device is ",u.matchValue]}),u.type==="language"&&m.jsxs(m.Fragment,{children:[u.matchValue," language is accepted"]}),u.type==="query-param"&&m.jsxs(m.Fragment,{children:["Query string contains ",u.matchKey,"=",u.matchValue]})]},`${u.type}_${f}`))]})]}),m.jsxs("div",{className:"d-flex flex-column flex-sm-row gap-1 my-auto",children:[m.jsx(Ye,{outline:!0,color:"secondary",size:"sm","aria-label":`Edit rule with priority ${e}`,onClick:l,children:m.jsx(je,{icon:e$})}),m.jsx(Ye,{outline:!0,color:"danger",size:"sm","aria-label":`Delete rule with priority ${e}`,onClick:r,children:m.jsx(je,{icon:J8})})]})]}),m.jsx(LU,{onSave:a,isOpen:s,toggle:l,initialData:n})]})},$pe=({shortUrlRedirectRules:e,getShortUrlRedirectRules:t,getShortUrlsDetails:n,shortUrlsDetails:r,setShortUrlRedirectRules:i,shortUrlRedirectRulesSaving:o,resetSetRules:a})=>{const s=CC(),{shortUrls:l}=r,u=s&&(l==null?void 0:l.get(s)),[f,d,p]=Ape([],{dragHandle:".drag-n-drop-handler",dropZoneClass:"opacity-25"}),{saving:v,saved:g,errorData:y}=o,[w,b]=Xt(),x=R.useCallback(I=>p((M=[])=>[...M,I]),[p]),_=R.useCallback(I=>p((M=[])=>{const D=[...M];return D.splice(I,1),D}),[p]),S=R.useCallback((I,M)=>p((D=[])=>{const z=[...D];return z[I]=M,z}),[p]),j=R.useCallback((I,M)=>p((D=[])=>{if(!D[M])return D;const z=[...D],q=z[M];return z[M]=z[I],z[I]=q,z}),[p]),E=R.useCallback(I=>j(I,I-1),[j]),C=R.useCallback(I=>j(I,I+1),[j]),N=R.useCallback(I=>{I.preventDefault(),d&&i({shortUrl:s,data:{redirectRules:d}})},[s,d,i]);return R.useEffect(()=>(t(s),n([s]),a),[t,n,s,a]),R.useEffect(()=>{e.redirectRules&&p(e.redirectRules)},[p,e.redirectRules]),m.jsxs("div",{className:"d-flex flex-column gap-3",children:[m.jsx("header",{children:m.jsxs(jr,{body:!0,children:[m.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[m.jsx(Pb,{}),m.jsxs("div",{className:"text-center flex-grow-1",children:[r.loading&&m.jsx(m.Fragment,{children:"Loading..."}),!r.loading&&m.jsxs("small",{children:["Redirect rules for ",m.jsx(hi,{href:(u==null?void 0:u.shortUrl)??""})]})]})]}),m.jsx("hr",{}),m.jsxs("div",{children:[m.jsx("p",{className:"mb-2",children:"Configure dynamic conditions that will be checked at runtime."}),"If no conditions match, visitors will be redirected to: ",m.jsx(hi,{href:e.defaultLongUrl??""})]})]})}),m.jsx("div",{children:m.jsxs(Ye,{outline:!0,color:"primary",onClick:b,children:[m.jsx(je,{icon:Lp,className:"me-1"})," Add rule"]})}),m.jsxs("form",{onSubmit:N,children:[e.loading&&m.jsx(na,{loading:!0}),d.length===0&&!e.loading&&m.jsx(Ot,{className:"text-center",children:m.jsx("i",{children:"This short URL has no dynamic redirect rules"})}),m.jsx("div",{className:"d-flex flex-column gap-2",ref:f,children:d.map((I,M)=>m.jsx(Dpe,{redirectRule:I,priority:M+1,isLast:M===d.length-1,onDelete:()=>_(M),onMoveUp:()=>E(M),onMoveDown:()=>C(M),onUpdate:D=>S(M,D)},`${I.longUrl}_${M}`))}),m.jsx("div",{className:"text-center mt-3",children:m.jsx(Ye,{outline:!0,color:"primary",className:"btn-sm-block",disabled:v,"data-testid":"save-button",children:v?"Saving...":"Save rules"})})]}),y&&m.jsx(ur,{type:"error",children:m.jsx(Oo,{errorData:y,fallbackMessage:"An error occurred while saving short URL redirect rules :("})}),g&&m.jsx(ur,{type:"success",children:"Redirect rules properly saved."}),m.jsx(LU,{isOpen:w,toggle:b,onSave:x})]})},Fpe=(e,t)=>{e.serviceFactory("ShortUrlRedirectRules",()=>$pe),e.decorator("ShortUrlRedirectRules",t(["shortUrlRedirectRules","shortUrlsDetails","shortUrlRedirectRulesSaving"],["getShortUrlRedirectRules","getShortUrlsDetails","setShortUrlRedirectRules","resetSetRules"])),e.serviceFactory("getShortUrlRedirectRules",Lhe,"apiClientFactory"),e.serviceFactory("setShortUrlRedirectRules",khe,"apiClientFactory"),e.serviceFactory("resetSetRules",n=>n.resetSetRules,"setShortUrlRedirectRulesReducerCreator"),e.serviceFactory("shortUrlRedirectRulesReducerCreator",Mhe,"getShortUrlRedirectRules"),e.serviceFactory("shortUrlRedirectRulesReducer",n=>n.reducer,"shortUrlRedirectRulesReducerCreator"),e.serviceFactory("setShortUrlRedirectRulesReducerCreator",Nhe,"setShortUrlRedirectRules"),e.serviceFactory("setShortUrlRedirectRulesReducer",n=>n.reducer,"setShortUrlRedirectRulesReducerCreator")},Upe=e=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:(e==null?void 0:e.validateUrls)??!1,forwardQuery:(e==null?void 0:e.forwardQuery)??!0}),MU=({createShortUrl:e,shortUrlCreation:t,resetCreateShortUrl:n,basicMode:r=!1})=>{const{ShortUrlForm:i,CreateShortUrlResult:o}=$t(MU),a=ws("shortUrlCreation"),s=R.useMemo(()=>Upe(a),[a]);return m.jsxs(m.Fragment,{children:[m.jsx(i,{initialState:s,saving:t.saving,basicMode:r,onSave:async l=>(n(),e(l))}),m.jsx(o,{creation:t,resetCreateShortUrl:n,canBeClosed:r})]})},Bpe=Ft(MU,["ShortUrlForm","CreateShortUrlResult"]),IU=({shortUrlsDetails:e,getShortUrlsDetails:t,shortUrlEdition:n,editShortUrl:r})=>{const{ShortUrlForm:i}=$t(IU),o=CC(),{loading:a,error:s,errorData:l,shortUrls:u}=e,f=o&&(u==null?void 0:u.get(o)),{saving:d,saved:p,error:v,errorData:g}=n,y=ws("shortUrlCreation"),w=R.useMemo(()=>Vce(f,y),[f,y]);return R.useEffect(()=>{o&&t([o])},[t,o]),a?m.jsx(na,{loading:!0}):s?m.jsx(ur,{type:"error",children:m.jsx(Oo,{errorData:l,fallbackMessage:"An error occurred while loading short URL detail :("})}):m.jsxs(m.Fragment,{children:[m.jsx("header",{className:"mb-3",children:m.jsx(jr,{body:!0,children:m.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[m.jsx(Pb,{}),m.jsx("div",{className:"text-center flex-grow-1",children:m.jsxs("small",{children:["Edit ",m.jsx(hi,{href:(f==null?void 0:f.shortUrl)??""})]})})]})})}),m.jsx(i,{initialState:w,saving:d,onSave:async b=>{f&&r({...f,data:b})}}),p&&v&&m.jsx(ur,{type:"error",className:"mt-3",children:m.jsx(Oo,{errorData:g,fallbackMessage:"An error occurred while updating short URL :("})}),p&&!v&&m.jsx(ur,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})},zpe=Ft(IU,["ShortUrlForm"]),DU=({text:e,onCopy:t},n=navigator)=>{var r;return(r=n.clipboard)==null?void 0:r.writeText(e).then(()=>t==null?void 0:t(e,!0)).catch(()=>t==null?void 0:t(e,!1))},$U=({creation:e,resetCreateShortUrl:t,canBeClosed:n=!1})=>{const{useTimeoutToggle:r}=$t($U),[i,o]=r(),{error:a,saved:s}=e;if(R.useEffect(()=>{t()},[t]),a)return m.jsxs(ur,{type:"error",className:"mt-3",children:[n&&m.jsx(je,{"data-testid":"error-close-button",icon:T2,className:"float-end pointer",onClick:t}),m.jsx(Oo,{errorData:e.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!s)return null;const{shortUrl:l}=e.result;return m.jsxs(ur,{type:"success",className:"mt-3",children:[n&&m.jsx(je,{"data-testid":"success-close-button",icon:T2,className:"float-end pointer",onClick:t}),m.jsxs("span",{children:[m.jsx("b",{children:"Great!"})," The short URL is ",m.jsx("b",{children:l})]}),m.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",onClick:()=>DU({text:l,onCopy:o}),children:[m.jsx(je,{icon:OF})," Copy ",m.jsxs("span",{className:"sr-only",children:[l," to clipboard"]})]}),m.jsx(zp,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},Vpe=Ft($U,["useTimeoutToggle"]),Bx="delete",Hpe=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:a})=>{const[s,l]=R.useState("");R.useEffect(()=>i,[i]);const{loading:u,error:f,deleted:d,errorData:p}=r,v=R.useCallback(()=>{i(),t()},[i,t]),g=R.useCallback(y=>(y.preventDefault(),o(e).then(t)),[o,e,t]);return m.jsx(To,{isOpen:n,toggle:v,centered:!0,onClosed:()=>d&&a(e),children:m.jsxs("form",{onSubmit:g,children:[m.jsx(Co,{toggle:v,children:m.jsx("span",{className:"text-danger",children:"Delete short URL"})}),m.jsxs(qi,{children:[m.jsxs("p",{children:[m.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),m.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),m.jsxs("p",{children:["Write ",m.jsx("b",{children:Bx})," to confirm deletion."]}),m.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${Bx}`,value:s,onChange:y=>l(y.target.value)}),f&&m.jsx(ur,{type:Ice(p)?"warning":"error",small:!0,className:"mt-2",children:m.jsx(Oo,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),m.jsxs(bs,{children:[m.jsx("button",{type:"button",className:"btn btn-link",onClick:v,children:"Cancel"}),m.jsx("button",{type:"submit",className:"btn btn-danger",disabled:s!==Bx||u,children:u?"Deleting...":"Delete"})]})]})})},FU=({amount:e=0,loading:t=!1,...n})=>m.jsxs(Ye,{...n,outline:!0,color:"primary",disabled:t,children:[m.jsx(je,{icon:IZ})," ",t?"Exporting...":m.jsxs(m.Fragment,{children:["Export (",Zt(e),")"]})]}),KR=20,UU=({amount:e=0})=>{const{apiClientFactory:t,ReportExporter:n}=$t(UU),[{tags:r,search:i,startDate:o,endDate:a,orderBy:s,tagsMode:l}]=Cb(),[u,,f,d]=Xt(),p=R.useCallback(async()=>{const v=e/KR,g=async(w=1)=>{const{data:b}=await t().listShortUrls({page:`${w}`,tags:r,searchTerm:i,startDate:o,endDate:a,orderBy:s,tagsMode:l,itemsPerPage:KR});return w>=v?b:b.concat(await g(w+1))};f();const y=await g();n.exportShortUrls(y.map(w=>{var b;const{hostname:x,pathname:_}=new URL(w.shortUrl),S=_.substring(1);return{createdAt:w.dateCreated,domain:x,shortCode:S,shortUrl:w.shortUrl,longUrl:w.longUrl,title:w.title??"",tags:w.tags.join("|"),visits:((b=w==null?void 0:w.visitsSummary)==null?void 0:b.total)??w.visitsCount??0}})),d()},[e,t,a,s,n,i,o,f,d,r,l]);return m.jsx(FU,{loading:u,className:"btn-md-block",amount:e,onClick:p})},Wpe=Ft(UU,["apiClientFactory","ReportExporter"]),BU=({text:e,onCopy:t,copyToClipboard:n=DU})=>m.jsx(kl,{className:"ms-2 p-0","aria-label":`Copy ${e} to clipboard`,onClick:()=>n({text:e,onCopy:t}),children:m.jsx(je,{icon:OF,className:"fs-5"})}),Gpe=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=pb({...n,margin:t>0?t:void 0});return`${r}${i?`?${i}`:""}`},qpe=({errorCorrection:e,setErrorCorrection:t})=>m.jsxs(da,{text:`Error correction (${e})`,children:[m.jsxs(ke,{active:e==="L",onClick:()=>t("L"),children:[m.jsx("b",{children:"L"}),"ow"]}),m.jsxs(ke,{active:e==="M",onClick:()=>t("M"),children:[m.jsx("b",{children:"M"}),"edium"]}),m.jsxs(ke,{active:e==="Q",onClick:()=>t("Q"),children:[m.jsx("b",{children:"Q"}),"uartile"]}),m.jsxs(ke,{active:e==="H",onClick:()=>t("H"),children:[m.jsx("b",{children:"H"}),"igh"]})]}),Kpe=({format:e,setFormat:t})=>m.jsxs(da,{text:`Format (${e})`,children:[m.jsx(ke,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),m.jsx(ke,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]}),zU=({shortUrl:{shortUrl:e,shortCode:t},toggle:n,isOpen:r})=>{const{ImageDownloader:i}=$t(zU),[o,a]=R.useState(300),[s,l]=R.useState(0),[u,f]=R.useState("png"),[d,p]=R.useState("L"),v=R.useMemo(()=>Gpe(e,{size:o,format:u,margin:s,errorCorrection:d}),[e,o,u,s,d]),g=R.useMemo(()=>o+s,[o,s]),y=R.useMemo(()=>{if(!(g<500))return g<800?"lg":"xl"},[g]);return m.jsxs(To,{isOpen:r,toggle:n,centered:!0,size:y,children:[m.jsxs(Co,{toggle:n,children:["QR code for ",m.jsx(hi,{href:e,children:e})]}),m.jsxs(qi,{children:[m.jsxs(ir,{children:[m.jsxs(co,{className:"d-grid col-md-6",children:[m.jsxs("label",{htmlFor:"sizeControl",children:["Size: ",o,"px"]}),m.jsx("input",{id:"sizeControl",type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:w=>a(Number(w.target.value))})]}),m.jsxs(co,{className:"d-grid col-md-6",children:[m.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",s,"px"]}),m.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:s,step:1,min:0,max:100,onChange:w=>l(Number(w.target.value))})]}),m.jsx(co,{className:"d-grid col-md-6",children:m.jsx(Kpe,{format:u,setFormat:f})}),m.jsx(co,{className:"col-md-6",children:m.jsx(qpe,{errorCorrection:d,setErrorCorrection:p})})]}),m.jsxs("div",{className:"text-center",children:[m.jsxs("div",{className:"mb-3",children:[m.jsx(hi,{href:v}),m.jsx(BU,{text:v})]}),m.jsx("img",{src:v,className:"qr-code-modal__img",alt:"QR code"}),m.jsx("div",{className:"mt-3",children:m.jsxs(Ye,{block:!0,color:"primary",onClick:()=>{i.saveImage(v,`${t}-qr-code.${u}`).catch(()=>{})},children:["Download ",m.jsx(je,{icon:i$,className:"ms-1"})]})})]})]})]})},Ype=Ft(zU,["ImageDownloader"]),Ly=({date:e,format:t=XF,relative:n=!1})=>{const r=_C(e)?e:ls(e);return m.jsx("time",{dateTime:`${ade(r)}000`,children:n?`${ide(us(),r)} ago`:Cy(r,t)})},Zpe=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:a}=t,s=(r==null?void 0:r.total)??n??0;return i&&s>=i?{icon:PX,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",m.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:a&&Py(Dr(a),us())?{icon:x3,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be visited since ",m.jsx("b",{className:"indivisible",children:Bh(Dr(a))}),"."]})}:o&&Py(us(),Dr(o))?{icon:x3,className:"text-warning",description:m.jsxs(m.Fragment,{children:["This short URL will start working on ",m.jsx("b",{className:"indivisible",children:Bh(Dr(o))}),"."]})}:{icon:Oh,className:"text-primary",description:"This short URL can be visited normally."}},Xpe=({shortUrl:e})=>{const t=fa(),{icon:n,className:r,description:i}=Zpe(e);return m.jsxs(m.Fragment,{children:[m.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:m.jsx(je,{icon:n,className:r})}),m.jsx(Cr,{target:t,placement:"bottom",children:i})]})},Qpe=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${FF(t)}/${r}${i}`},ug=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=xs();return!n||!e?m.jsx("span",{...i,children:r}):m.jsx(jt,{to:Qpe(o,e,t),...i,children:r})},VU=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const i=fa(),{maxVisits:o,validSince:a,validUntil:s}=(t==null?void 0:t.meta)??{},l=!!o||!!a||!!s,u=m.jsx(ug,{shortUrl:t,suffix:"visits",asLink:r,children:m.jsx("strong",{className:De("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:Zt(e)})});return l?m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"indivisible",children:[u,m.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:i,children:[o&&m.jsxs(m.Fragment,{children:[" / ",Zt(o)]}),m.jsx("sup",{className:"ms-1",children:m.jsx(je,{icon:hT})})]})]}),m.jsx(Cr,{target:i,placement:"bottom",children:m.jsxs("ul",{className:"list-unstyled mb-0",children:[o&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",m.jsx("b",{children:Zt(o)})," visit",o===1?"":"s","."]}),a&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",m.jsx("b",{className:"indivisible",children:Bh(Dr(a))}),"."]}),s&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",m.jsx("b",{className:"indivisible",children:Bh(Dr(s))}),"."]})]})})]}):u},Jpe=e=>!!e.onClose,eme=e=>!!e.onClick,Ab=e=>{const{text:t,children:n,className:r,colorGenerator:i}=e,o=eme(e),a=o?kl:"span",s=R.useMemo(()=>i.stylesForKey(t),[t,i]);return m.jsxs(a,{className:De("badge tag fw-bold",r,{pointer:o}),style:s,onClick:o?e.onClick:void 0,children:[n??t,Jpe(e)&&m.jsx(kl,{"aria-label":`Remove ${t}`,className:"bg-transparent ms-1 opacity-100 p-0 fw-bold tag__close",onClick:e.onClose,children:"×"})]})},tme=({tags:e,onTagClick:t,colorGenerator:n})=>e.length===0?m.jsx("i",{className:"indivisible",children:m.jsx("small",{children:"No tags"})}):m.jsx(m.Fragment,{children:e.map(r=>m.jsx(Ab,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))}),HU=({shortUrl:e,onTagClick:t})=>{var n,r,i,o;const{ShortUrlsRowMenu:a,ColorGenerator:s,useTimeoutToggle:l}=$t(HU),[u,f]=l(),[d,p]=l(!1,500),v=R.useRef(!0),[{excludeBots:g}]=Cb(),y=ws("visits"),w=g??(y==null?void 0:y.excludeBots);return R.useEffect(()=>{!v.current&&p(),v.current=!1},[(n=e.visitsSummary)==null?void 0:n.total,(r=e.visitsSummary)==null?void 0:r.nonBots,e.visitsCount,p]),m.jsxs("tr",{className:"responsive-table__row",children:[m.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:m.jsx(Ly,{date:e.dateCreated})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:m.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[m.jsx("span",{className:"short-urls-row__short-url-wrapper",children:m.jsx(hi,{href:e.shortUrl})}),m.jsx(BU,{text:e.shortUrl,onCopy:f}),m.jsx("span",{role:"status",className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!u,children:"Copied short URL!"})]})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${e.title?"Title":"Long URL"}`,children:m.jsx(hi,{href:e.longUrl,children:e.title??e.longUrl})}),e.title&&m.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:m.jsx(hi,{href:e.longUrl})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:m.jsx(tme,{tags:e.tags,colorGenerator:s,onTagClick:t})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:m.jsx(VU,{visitsCount:(w?(i=e.visitsSummary)==null?void 0:i.nonBots:(o=e.visitsSummary)==null?void 0:o.total)??e.visitsCount??0,shortUrl:e,active:d,asLink:!0})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:m.jsx(Xpe,{shortUrl:e})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:m.jsx(a,{shortUrl:e})})]})},nme=Ft(HU,["ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"]),rme=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,YR=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(rme);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},ZR=e=>e==="*"||e==="x"||e==="X",XR=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},ime=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],ome=(e,t)=>{if(ZR(e)||ZR(t))return 0;const[n,r]=ime(XR(e),XR(t));return n>r?1:n{for(let n=0;n{const n=YR(e),r=YR(t),i=n.pop(),o=r.pop(),a=QR(n,r);return a!==0?a:i&&o?QR(i.split("."),o.split(".")):i||o?i?-1:1:0},JR=(e,t,n)=>{sme(n);const r=ame(e,t);return WU[n].includes(r)},WU={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},eL=Object.keys(WU),sme=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(eL.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${eL.join("|")}`)},lme=(e,{maxVersion:t,minVersion:n})=>{const r=!n||JR(e,n,">=");return(!t||JR(e,t,"<="))&&r},GU={excludeBotsOnShortUrls:{minVersion:"3.4.0"},filterDisabledUrls:{minVersion:"3.4.0"},deviceLongUrls:{minVersion:"3.5.0",maxVersion:"3.*.*"},shortUrlVisitsDeletion:{minVersion:"3.6.0"},orphanVisitsDeletion:{minVersion:"3.7.0"},shortUrlRedirectRules:{minVersion:"4.0.0"},urlValidation:{maxVersion:"3.*.*"}};Object.freeze(GU);const Ms=(e,t)=>t==="latest"||lme(t,GU[e]),qU=e=>({excludeBotsOnShortUrls:Ms("excludeBotsOnShortUrls",e),filterDisabledUrls:Ms("filterDisabledUrls",e),deviceLongUrls:Ms("deviceLongUrls",e),shortUrlVisitsDeletion:Ms("shortUrlVisitsDeletion",e),orphanVisitsDeletion:Ms("orphanVisitsDeletion",e),shortUrlRedirectRules:Ms("shortUrlRedirectRules",e),urlValidation:Ms("urlValidation",e)}),KU=R.createContext(qU("0.0.0")),ume=KU.Provider,cme=e=>R.useMemo(()=>qU(e),[e]),fs=e=>R.useContext(KU)[e],YU=({shortUrl:e})=>{const{DeleteShortUrlModal:t,QrCodeModal:n}=$t(YU),[r,,i,o]=Xt(),[a,,s,l]=Xt(),u=Ob(),f=fs("shortUrlRedirectRules");return m.jsxs(vb,{minWidth:f?220:190,children:[m.jsxs(ke,{tag:ug,shortUrl:e,suffix:"visits",asLink:!0,children:[m.jsx(je,{icon:dT,fixedWidth:!0})," Visit stats"]}),u&&m.jsxs(m.Fragment,{children:[m.jsxs(ke,{disabled:!u.canAddItemWithName(e.shortUrl),onClick:()=>u.addItemToCompare({name:e.shortUrl,query:vC(e)}),children:[m.jsx(je,{icon:ob,fixedWidth:!0})," Compare visits"]}),m.jsx(ke,{divider:!0,tag:"hr"})]}),m.jsxs(ke,{tag:ug,shortUrl:e,suffix:"edit",asLink:!0,children:[m.jsx(je,{icon:fT,fixedWidth:!0})," Edit short URL"]}),f&&m.jsxs(ke,{tag:ug,shortUrl:e,suffix:"redirect-rules",asLink:!0,children:[m.jsx(je,{icon:kX,fixedWidth:!0})," Manage redirect rules"]}),m.jsxs(ke,{onClick:i,children:[m.jsx(je,{icon:TX,fixedWidth:!0})," QR code"]}),m.jsx(n,{shortUrl:e,isOpen:r,toggle:o}),m.jsx(ke,{divider:!0,tag:"hr"}),m.jsxs(ke,{className:"dropdown-item--danger",onClick:s,children:[m.jsx(je,{icon:cT,fixedWidth:!0})," Delete short URL"]}),m.jsx(t,{shortUrl:e,isOpen:a,toggle:l})]})},fme=Ft(YU,["DeleteShortUrlModal","QrCodeModal"]),ZU="shlink/shortUrlCreation",tL={saving:!1,saved:!1,error:!1},dme=e=>yn(`${ZU}/createShortUrl`,t=>e().createShortUrl(t)),hme=e=>{const{reducer:t,actions:n}=rn({name:ZU,initialState:tL,reducers:{resetCreateShortUrl:()=>tL},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:qr(a)})),i.addCase(e.fulfilled,(o,{payload:a})=>({result:a,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},XU="shlink/shortUrlEdition",pme={saving:!1,saved:!1,error:!1},mme=e=>yn(`${XU}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),vme=e=>rn({name:XU,initialState:pme,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,saving:!0,error:!1,saved:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,saving:!1,error:!0,saved:!1,errorData:qr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}}),nL="shlink/shortUrlsDetails",rL={loading:!1,error:!1},gme=e=>{const t=yn(`${nL}/getShortUrlsDetails`,async(r,{getState:i})=>{const{shortUrlsList:o}=i(),a=await Promise.all(r.map(async s=>{var l;const{shortCode:u,domain:f}=s,d=(l=o==null?void 0:o.shortUrls)==null?void 0:l.data.find(p=>qd(p,u,f));return[s,d??await e().getShortUrl(u,f)]}));return new Map(a)}),{reducer:n}=rn({name:nL,initialState:rL,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:qr(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...rL,shortUrls:o}))}});return{reducer:n,getShortUrlsDetails:t}},zx=({icon:e,className:t,...n})=>{const r=fa();return m.jsxs("div",{className:"icon-input-container",children:[m.jsx(Kn,{className:De("icon-input-container__input",t),innerRef:r,...n}),m.jsx(je,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var i;return(i=r.current)==null?void 0:i.focus()}})]})},yme=({minDate:e,maxDate:t,value:n,onChange:r,withTime:i=!1,...o})=>{const a=R.useCallback(({target:l})=>{if(!l.value){r==null||r(null);return}r==null||r(Dr(l.value))},[r]),s=R.useMemo(()=>i?Bh:Fa,[i]);return m.jsx(Kn,{...o,type:i?"datetime-local":"date",value:s(n)??"",max:s(t)??void 0,min:s(e)??void 0,onChange:a})},My=({label:e,id:t,...n})=>{const r=R.useId();return m.jsxs(m.Fragment,{children:[m.jsxs("label",{htmlFor:t??r,className:"mb-1",children:[e,":"]}),m.jsx(yme,{id:t??r,...n})]})},Vx=({children:e,infoTooltip:t,checked:n,onChange:r})=>m.jsxs("p",{children:[m.jsx(eF,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&m.jsx(lg,{placement:"right",children:t})]}),bme=({isOpen:e,toggle:t})=>m.jsxs(To,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[m.jsx(Co,{toggle:t,children:"Info"}),m.jsxs(qi,{children:[m.jsxs("p",{children:["When the ",m.jsx("b",{children:m.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),m.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),m.jsxs("ul",{children:[m.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),m.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",m.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),m.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]}),_me=()=>{const[e,t]=Xt();return m.jsxs(m.Fragment,{children:[m.jsx(kl,{className:"p-0",title:"What does this mean?",onClick:t,children:m.jsx(je,{icon:hT})}),m.jsx(bme,{isOpen:e,toggle:t})]})},_v=e=>typeof e=="string"?ls(e):e,xme=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,wme=e=>"error"in e,QU=({basicMode:e=!1,saving:t,onSave:n,initialState:r,tagsList:i})=>{var o,a,s;const{TagsSelector:l,DomainSelector:u}=$t(QU),[f,d]=R.useState(r),p=xme(f),v=fs("deviceLongUrls"),g=fs("urlValidation"),y=g||p,w=R.useCallback(()=>d(r),[r]),b=R.useCallback((E,C)=>Qs(E)?E:Qs(C)?null:void 0,[]),x=R.useCallback((E,C)=>d(({deviceLongUrls:N={},...I})=>{var M;return{...I,deviceLongUrls:{...N,[E]:b(C,(M=r.deviceLongUrls)==null?void 0:M[E])}}}),[r.deviceLongUrls,b]),_=R.useCallback(E=>d(C=>({...C,tags:E})),[]),S=R.useCallback(async E=>(E.preventDefault(),n(f).then(C=>p&&!wme(C)&&w()).catch(()=>{})),[p,n,w,f]),j=R.useMemo(()=>m.jsxs("div",{className:"d-flex flex-column gap-3",children:[m.jsx(Kn,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:f.longUrl,onChange:E=>d(C=>({...C,longUrl:E.target.value}))}),m.jsxs("div",{className:De("d-flex flex-column flex-lg-row gap-3",{"mb-3":e}),children:[e&&p&&m.jsx("div",{className:"w-100 w-lg-50",children:m.jsx(Kn,{bsSize:"lg",placeholder:"Custom slug",value:f.customSlug??"",onChange:E=>d(C=>({...C,customSlug:E.target.value}))})}),m.jsx("div",{className:De("w-100",{"w-lg-50":e}),children:m.jsx(l,{tags:i.tags,selectedTags:f.tags??[],onChange:_})})]})]}),[l,e,_,p,f,i.tags]);return m.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:S,children:[e&&j,!e&&m.jsxs(m.Fragment,{children:[m.jsxs(ir,{children:[m.jsx("div",{className:De("mb-3",{"col-sm-6":v,"col-12":!v}),children:m.jsx(Ot,{title:"Main options",children:j})}),v&&m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(Ot,{title:"Device-specific long URLs",bodyClassName:"d-flex flex-column gap-3",children:[m.jsx(zx,{type:"url",icon:fce,placeholder:"Android-specific redirection",value:((o=f.deviceLongUrls)==null?void 0:o.android)??"",onChange:({target:E})=>x("android",E.value)}),m.jsx(zx,{type:"url",icon:cce,placeholder:"iOS-specific redirection",value:((a=f.deviceLongUrls)==null?void 0:a.ios)??"",onChange:({target:E})=>x("ios",E.value)}),m.jsx(zx,{type:"url",icon:AX,placeholder:"Desktop-specific redirection",value:((s=f.deviceLongUrls)==null?void 0:s.desktop)??"",onChange:({target:E})=>x("desktop",E.value)})]})})]}),m.jsxs(ir,{children:[m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(Ot,{title:"Customize the short URL",bodyClassName:"d-flex flex-column gap-3",children:[m.jsx(Kn,{placeholder:"Title",value:f.title??"",onChange:({target:E})=>d(C=>({...C,title:b(E.value,r.title)}))}),p&&m.jsxs(m.Fragment,{children:[m.jsxs(ir,{children:[m.jsx("div",{className:"col-lg-6 mb-3 mb-lg-0",children:m.jsx(Kn,{placeholder:"Custom slug",value:f.customSlug??"",onChange:E=>d(C=>({...C,customSlug:E.target.value})),disabled:Qs(f.shortCodeLength)})}),m.jsx("div",{className:"col-lg-6",children:m.jsx(Kn,{type:"number",placeholder:"Short code length",value:f.shortCodeLength??"",onChange:E=>d(C=>({...C,shortCodeLength:E.target.value})),min:4,disabled:Qs(f.customSlug)})})]}),m.jsx(u,{value:f.domain,onChange:E=>d(C=>({...C,domain:E}))})]})]})}),m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(Ot,{title:"Limit access to the short URL",children:[m.jsxs("div",{className:"row mb-3",children:[m.jsx("div",{className:"col-lg-6",children:m.jsx(My,{label:"Enabled since",withTime:!0,maxDate:f.validUntil?_v(f.validUntil):void 0,value:f.validSince?_v(f.validSince):null,onChange:E=>d(C=>({...C,validSince:cs(E)}))})}),m.jsx("div",{className:"col-lg-6 mt-3 mt-lg-0",children:m.jsx(My,{label:"Enabled until",withTime:!0,minDate:f.validSince?_v(f.validSince):void 0,value:f.validUntil?_v(f.validUntil):null,onChange:E=>d(C=>({...C,validUntil:cs(E)}))})})]}),m.jsxs("div",{children:[m.jsx("label",{htmlFor:"maxVisits",className:"mb-1",children:"Maximum visits allowed:"}),m.jsx(Kn,{id:"maxVisits",type:"number",min:1,placeholder:"25...",value:f.maxVisits??"",onChange:E=>d(C=>({...C,maxVisits:Qs(E.target.value)?Number(E.target.value):null}))})]})]})})]}),m.jsxs(ir,{children:[y&&m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(Ot,{title:"Extra checks",children:[g&&m.jsx(Vx,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:f.validateUrl,onChange:E=>d(C=>({...C,validateUrl:E})),children:"Validate URL"}),p&&m.jsxs("p",{children:[m.jsx(eF,{inline:!0,className:"me-2",checked:f.findIfExists,onChange:E=>d(C=>({...C,findIfExists:E})),children:"Use existing URL if found"}),m.jsx(_me,{})]})]})}),m.jsx("div",{className:De("mb-3",{"col-sm-6":y}),children:m.jsxs(Ot,{title:"Configure behavior",children:[m.jsx(Vx,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:f.crawlable,onChange:E=>d(C=>({...C,crawlable:E})),children:"Make it crawlable"}),m.jsx(Vx,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:f.forwardQuery,onChange:E=>d(C=>({...C,forwardQuery:E})),children:"Forward query params on redirect"})]})})]})]}),m.jsx("div",{className:"text-center",children:m.jsx(Ye,{outline:!0,color:"primary",disabled:t||!f.longUrl,className:"btn-xs-block",children:t?"Saving...":"Save"})})]})},Ome=Ft(QU,["TagsSelector","DomainSelector"]),Sme=({active:e,allText:t,onChange:n})=>m.jsxs(m.Fragment,{children:[m.jsx(ke,{active:e==="all",onClick:()=>n("all"),children:t}),m.jsx(ke,{divider:!0,tag:"hr"}),jde.map(r=>m.jsx(ke,{active:e===r,onClick:()=>n(r),children:tU(r)},r))]}),Eme=({startDate:e,endDate:t,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(My,{label:"Since",value:e,maxDate:t??void 0,disabled:n,onChange:r})}),m.jsx("div",{className:"col-md-6 mt-3 mt-md-0",children:m.jsx(My,{label:"Until",value:t,minDate:e??void 0,disabled:n,onChange:o=>i(o&&jc(o))})})]}),PC=({onDatesChange:e,dateRangeOrInterval:t,defaultText:n,disabled:r})=>{const i=R.useMemo(()=>tU(t)??n,[t,n]),[o,a]=R.useMemo(()=>ky(t)?[void 0,t]:[t,void 0],[t]),s=R.useCallback(l=>{ky(l)?e(nU(l),l):e(l)},[e]);return m.jsxs(da,{disabled:r,text:i,children:[m.jsx(Sme,{allText:n,active:a,onChange:s}),m.jsx(ke,{divider:!0,tag:"hr"}),m.jsx("div",{className:"px-3 py-1",children:m.jsx(Eme,{...o,onStartDateChange:l=>s({...o,startDate:l}),onEndDateChange:l=>s({...o,endDate:l})})})]})},jme={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Tme=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:a=!1}=t,s=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return m.jsxs(da,{text:"Filters",dropdownClassName:n,end:!0,minWidth:250,children:[m.jsx(ke,{header:!0,"aria-hidden":!0,children:"Visits:"}),m.jsx(ke,{active:i,onClick:s("excludeBots"),children:"Ignore visits from bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(ke,{divider:!0,tag:"hr"}),m.jsx(ke,{header:!0,"aria-hidden":!0,children:"Short URLs:"}),m.jsx(ke,{active:o,onClick:s("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),m.jsx(ke,{active:a,onClick:s("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),m.jsx(ke,{divider:!0,tag:"hr"}),m.jsx(ke,{disabled:t.excludeBots===void 0&&t.excludeMaxVisitsReached===void 0&&t.excludePastValidUntil===void 0,onClick:()=>e({excludeBots:void 0,excludeMaxVisitsReached:void 0,excludePastValidUntil:void 0}),children:m.jsx("i",{children:"Reset to defaults"})})]})},JU=({className:e,shortUrlsAmount:t,order:n,handleOrderBy:r,tagsList:i})=>{const{ExportShortUrlsBtn:o,TagsSelector:a}=$t(JU),[{search:s,tags:l,startDate:u,endDate:f,excludeBots:d,excludeMaxVisitsReached:p,excludePastValidUntil:v,tagsMode:g="any"},y]=Cb(),w=fs("filterDisabledUrls"),b=ws("visits"),[x,_]=R.useState(),S=R.useCallback(({startDate:N,endDate:I},M)=>{y({startDate:cs(N)??void 0,endDate:cs(I)??void 0}),_(M)},[y]),j=R.useCallback(N=>y({search:N||void 0}),[y]),E=R.useCallback(N=>y({tags:N}),[y]),C=R.useCallback(()=>y({tagsMode:g==="any"?"all":"any"}),[g,y]);return m.jsxs("div",{className:De("short-urls-filtering-bar-container",e),children:[m.jsx(qp,{initialValue:s,onChange:j}),m.jsxs(hb,{className:"mt-3",children:[m.jsx(a,{immutable:!0,placeholder:"With tags...",tags:i.tags,selectedTags:l,onChange:E}),l.length>1&&m.jsxs(m.Fragment,{children:[m.jsx(Ye,{outline:!0,color:"secondary",onClick:C,id:"tagsModeBtn","aria-label":"Change tags mode",children:m.jsx(je,{className:"short-urls-filtering-bar__tags-icon",icon:g==="all"?r$:nX})}),m.jsx(Cr,{target:"tagsModeBtn",placement:"left",children:g==="all"?"With all the tags.":"With any of the tags."})]})]}),m.jsxs(ir,{className:"flex-lg-row-reverse",children:[m.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(PC,{defaultText:"All short URLs",dateRangeOrInterval:x??eU(u,f),onDatesChange:S})}),m.jsx(Tme,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:d??(b==null?void 0:b.excludeBots),excludeMaxVisitsReached:p,excludePastValidUntil:v},onChange:y,supportsDisabledFiltering:w})]})}),m.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:m.jsx(o,{amount:t})}),m.jsx("div",{className:"col-6 d-lg-none mt-3",children:m.jsx(Kp,{prefixed:!1,items:jme,order:n,onChange:r})})]})]})},Cme=Ft(JU,["ExportShortUrlsBtn","TagsSelector"]);function Kd({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:m.jsx(je,{icon:e.dir==="ASC"?KZ:sX,className:n})}const pu=2,jS="...",e9=(e,t)=>{const n=pC(Math.max(pu,e-pu),Math.min(t-1,e+pu)+1);return e-pu>pu&&n.unshift(jS),e+pue===jS,t9=e=>zh(e)?e:Zt(e),n9=(e,t)=>zh(e)?`${e}_${t}`:`${e}`,Pme=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=xs(),o=s=>`${i}/list-short-urls/${s}${t}`;if(r<=1)return m.jsx("div",{className:"pb-3"});const a=()=>e9(n,r).map((s,l)=>m.jsx(pl,{disabled:zh(s),active:n===s,children:m.jsx(ml,{tag:jt,to:o(s),children:t9(s)})},n9(s,l)));return m.jsxs(HT,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[m.jsx(pl,{disabled:n===1,children:m.jsx(ml,{previous:!0,tag:jt,to:o(n-1)})}),a(),m.jsx(pl,{disabled:n>=r,children:m.jsx(ml,{next:!0,tag:jt,to:o(n+1)})})]})},Ame={field:"dateCreated",dir:"DESC"},r9=Ki(({listShortUrls:e,shortUrlsList:t})=>{var n,r,i;const{ShortUrlsTable:o,ShortUrlsFilteringBar:a}=$t(r9),{page:s}=Jc(),l=pr(),[{tags:u,search:f,startDate:d,endDate:p,orderBy:v,tagsMode:g,excludeBots:y,excludePastValidUntil:w,excludeMaxVisitsReached:b},x]=Cb(),_=TC(),[S,j]=R.useState(v??((n=_.shortUrlsList)==null?void 0:n.defaultOrdering)??Ame),{pagination:E}=(t==null?void 0:t.shortUrls)??{},C=R.useMemo(()=>{var X;return y??((X=_.visits)==null?void 0:X.excludeBots)},[y,(r=_.visits)==null?void 0:r.excludeBots]),N=fs("excludeBotsOnShortUrls"),I=R.useCallback((X,J)=>{x({orderBy:{field:X,dir:J}}),j({field:X,dir:J})},[x]),M=X=>()=>I(X,gb(X,S.field,S.dir)),D=X=>m.jsx(Kd,{currentOrder:S,field:X}),z=R.useCallback(X=>x({tags:[...new Set([...u,X])]}),[u,x]),q=R.useCallback(({field:X,dir:J})=>N&&C&&X==="visits"?{field:"nonBotVisits",dir:J}:{field:X,dir:J},[C,N]),W=dC();return R.useEffect(()=>{e({page:s,searchTerm:f,tags:u,startDate:d,endDate:p,orderBy:q(S),tagsMode:g,excludePastValidUntil:w,excludeMaxVisitsReached:b})},[e,q,s,f,u,d,p,S,g,w,b]),m.jsxs(fC,{value:W,children:[m.jsx(a,{shortUrlsAmount:(i=t.shortUrls)==null?void 0:i.pagination.totalItems,order:S,handleOrderBy:I,className:"mb-3"}),m.jsx(hC,{type:"short-urls",className:"mb-3"}),m.jsxs(jr,{body:!0,className:De({"pb-0":!t.loading}),children:[m.jsx(o,{shortUrlsList:t,orderByColumn:M,renderOrderIcon:D,onTagClick:z}),!t.loading&&m.jsx(Pme,{paginator:E,currentQueryString:l.search})]})]})},()=>[cr.visits]),kme=Ft(r9,["ShortUrlsTable","ShortUrlsFilteringBar"]),i9=({orderByColumn:e,renderOrderIcon:t,shortUrlsList:n,onTagClick:r,className:i})=>{const{ShortUrlsRow:o}=$t(i9),{error:a,loading:s,shortUrls:l}=n,u=De({"short-urls-table__header-cell--with-action":!!e}),f=De("short-urls-table__header-cell",u),d=De("table table-hover responsive-table short-urls-table",i),p=()=>a?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):s?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!s&&(!l||l.data.length===0)?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):l==null?void 0:l.data.map(v=>m.jsx(o,{shortUrl:v,onTagClick:r},v.shortUrl));return m.jsxs("table",{className:d,children:[m.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:m.jsxs("tr",{children:[m.jsxs("th",{className:f,onClick:e==null?void 0:e("dateCreated"),children:["Created at ",t==null?void 0:t("dateCreated")]}),m.jsxs("th",{className:f,onClick:e==null?void 0:e("shortCode"),children:["Short URL ",t==null?void 0:t("shortCode")]}),m.jsxs("th",{className:"short-urls-table__header-cell",children:[m.jsxs(kl,{className:De("p-0",u),onClick:e==null?void 0:e("title"),children:["Title ",t==null?void 0:t("title")]}),"  /  ",m.jsxs(kl,{className:De("p-0",u),onClick:e==null?void 0:e("longUrl"),children:[m.jsx("span",{className:"indivisible",children:"Long URL"})," ",t==null?void 0:t("longUrl")]})]}),m.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),m.jsx("th",{className:f,onClick:e==null?void 0:e("visits"),children:m.jsxs("span",{className:"indivisible",children:["Visits ",t==null?void 0:t("visits")]})}),m.jsx("th",{className:"short-urls-table__header-cell",colSpan:2,"aria-hidden":!0})]})}),m.jsx("tbody",{children:p()})]})},Nme=Ft(i9,["ShortUrlsRow"]),Rme=(e,t)=>{e.factory("ShortUrlsList",kme),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.factory("ShortUrlsTable",Nme),e.factory("ShortUrlsRow",nme),e.factory("ShortUrlsRowMenu",fme),e.factory("CreateShortUrlResult",Vpe),e.factory("ShortUrlForm",Ome),e.decorator("ShortUrlForm",t(["tagsList"])),e.factory("CreateShortUrl",Bpe),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.factory("EditShortUrl",zpe),e.decorator("EditShortUrl",t(["shortUrlsDetails","shortUrlEdition"],["getShortUrlsDetails","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>Hpe),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.factory("QrCodeModal",Ype),e.factory("ExportShortUrlsBtn",Wpe),e.factory("ShortUrlsFilteringBar",Cme),e.decorator("ShortUrlsFilteringBar",t(["tagsList"])),e.serviceFactory("shortUrlsListReducerCreator",Ohe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",n=>n.reducer,"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",hme,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",n=>n.reducer,"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",vme,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",n=>n.reducer,"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",_he,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",n=>n.reducer,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlsDetailsReducerCreator",gme,"apiClientFactory"),e.serviceFactory("shortUrlsDetailsReducer",n=>n.reducer,"shortUrlsDetailsReducerCreator"),e.serviceFactory("listShortUrls",whe,"apiClientFactory"),e.serviceFactory("createShortUrl",dme,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",n=>n.resetCreateShortUrl,"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",bhe,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",n=>n.resetDeleteShortUrl,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>fU),e.serviceFactory("getShortUrlsDetails",n=>n.getShortUrlsDetails,"shortUrlsDetailsReducerCreator"),e.serviceFactory("editShortUrl",mme,"apiClientFactory")},Lme=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:a,error:s,deleted:l,errorData:u}=i;return m.jsxs(To,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[m.jsx(Co,{toggle:t,className:"text-danger",children:"Delete tag"}),m.jsxs(qi,{children:["Are you sure you want to delete tag ",m.jsx("b",{children:e}),"?",s&&m.jsx(ur,{type:"error",small:!0,className:"mt-2",children:m.jsx(Oo,{errorData:u,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),m.jsxs(bs,{children:[m.jsx(Ye,{color:"link",onClick:t,children:"Cancel"}),m.jsx(Ye,{color:"danger",disabled:a,onClick:async()=>{await r(e),t()},children:a?"Deleting tag...":"Delete tag"})]})]})},o9=({tag:e,editTag:t,toggle:n,tagEdited:r,isOpen:i,tagEdit:o})=>{const{ColorGenerator:a}=$t(o9),[s,l]=R.useState(e),[u,f]=R.useState(a.getColorForKey(e)),{editing:d,error:p,edited:v,errorData:g}=o,y=cU(async()=>{await t({oldName:e,newName:s,color:u}),n()}),w=R.useCallback(()=>v&&r({oldName:e,newName:s,color:u}),[u,v,s,e,r]);return m.jsx(To,{isOpen:i,toggle:n,centered:!0,onClosed:w,children:m.jsxs("form",{name:"editTag",onSubmit:y,children:[m.jsx(Co,{toggle:n,children:"Edit tag"}),m.jsxs(qi,{children:[m.jsxs(hb,{children:[m.jsxs("div",{className:"input-group-text p-0 position-relative",style:{backgroundColor:u,borderColor:u},children:[m.jsx(je,{icon:YZ,className:"position-absolute top-50 start-50 translate-middle text-white"}),m.jsx(Kn,{className:"form-control-color opacity-0",type:"color",value:u,onChange:b=>f(b.target.value)})]}),m.jsx(Kn,{value:s,placeholder:"Tag",required:!0,onChange:({target:b})=>l(b.value)})]}),p&&m.jsx(ur,{type:"error",small:!0,className:"mt-2",children:m.jsx(Oo,{errorData:g,fallbackMessage:"Something went wrong while editing the tag :("})})]}),m.jsxs(bs,{children:[m.jsx(Ye,{type:"button",color:"link",onClick:n,children:"Cancel"}),m.jsx(Ye,{color:"primary",disabled:d,children:d?"Saving...":"Save"})]})]})})},Mme=Ft(o9,["ColorGenerator"]),qs={Enter:"Enter",Escape:"Escape",Tab:"Tab",Backspace:"Backspace",UpArrow:"ArrowUp",UpArrowCompat:"Up",DownArrow:"ArrowDown",DownArrowCompat:"Down",PageDown:"PageDown",PageUp:"PageUp"},AC=Symbol("Create new tag"),a9=Symbol("No options"),wu=()=>{},An=V.createContext(void 0);function iL(e,t){return e===t?[]:e.filter(n=>!t.includes(n))}function Ime(e){return e.selectionStart===0&&e.selectionEnd===0}function Dme(e){const t=e.value.length;return e.selectionStart===t&&e.selectionEnd===t}function kb(e){return`${e}-label`}function $me(e){return`${e}-combobox`}function Fme(e){return`${e}-input`}function s9(e){return`${e}-listbox`}function l9(e,t){return`${e}-option-${Gme(t)}`}function Ume(e,t){if((e==null?void 0:e.value)===AC&&e.disabled===!1)return{value:t,label:t}}function Bme(e){const t=Ume(e.activeOption,e.value)||e.activeOption||Zme(e.value,e.options);return t&&!t.disabled?t:void 0}function zme(e,t,n){const r=t-1;return e>r?n:en===e.value)}const qme=/[-\\^$*+?.()|[\]{}]/g;function u9(e){return e.replace(qme,"\\$&")}function c9(e){return new RegExp(u9(e),"i")}function Kme(e){return new RegExp(`^${u9(e)}$`,"i")}function Yme(e,t){if(e){const n=c9(e);return t.filter(r=>n.test(r.label))}else return[].concat(t)}function Zme(e,t){const n=Kme(e);return t.find(r=>n.test(r.label))||null}const Xme={autoComplete:"off",autoCorrect:"off","data-form-type":"other",spellCheck:!1};function Qme({allowBackspace:e,ariaDescribedBy:t,ariaErrorMessage:n,delimiterKeys:r}){const{id:i,comboBoxRef:o,inputRef:a,isDisabled:s,isInvalid:l,managerRef:u}=R.useContext(An),f=R.useMemo(()=>{const g=I=>{const M=I.currentTarget.value;u.current.updateInputValue(M),document.activeElement===a.current&&u.current.listBoxExpand(M)},y=()=>{u.current.listBoxExpand()},w=I=>{var M;((M=o.current)==null?void 0:M.contains(I.relatedTarget))===!1&&u.current.listBoxCollapse()},b=()=>{u.current.listBoxExpand()},x=I=>{const{activeIndex:M,isExpanded:D}=u.current.state;D?(I.preventDefault(),u.current.updateActiveIndex(M+1)):(Dme(I.currentTarget)||I.altKey)&&(I.preventDefault(),u.current.listBoxExpand())},_=I=>{const{activeIndex:M,isExpanded:D}=u.current.state;D?(I.preventDefault(),u.current.updateActiveIndex(M-1)):Ime(I.currentTarget)&&(I.preventDefault(),u.current.listBoxExpand())},S=I=>{const{isExpanded:M,options:D}=u.current.state;M&&(I.preventDefault(),u.current.updateActiveIndex(D.length-1))},j=I=>{u.current.state.isExpanded&&(I.preventDefault(),u.current.updateActiveIndex(0))},E=()=>{u.current.state.isExpanded?u.current.listBoxCollapse():u.current.updateInputValue("")},C=()=>{if(e){const{value:I,selected:M}=u.current.state,D=M[M.length-1];I===""&&D&&u.current.selectTag(D)}},N=I=>{u.current.state.isExpanded&&(I.preventDefault(),u.current.selectTag())};return{onBlur:w,onChange:g,onClick:b,onFocus:y,onKeyDown:I=>{if(I.key===qs.UpArrow)return _(I);if(I.key===qs.DownArrow)return x(I);if(I.key===qs.PageUp)return j(I);if(I.key===qs.PageDown)return S(I);if(I.key===qs.Escape)return E();if(I.key===qs.Backspace)return C();if(r.includes(I.key))return N(I)}}},[e,o,r,a,u]),{activeOption:d,isExpanded:p,value:v}=u.current.state;return{...Xme,"aria-autocomplete":"list","aria-activedescendant":d?l9(i,d):void 0,"aria-controls":s9(i),"aria-describedby":t||void 0,"aria-disabled":s,"aria-errormessage":l&&n||void 0,"aria-invalid":l,"aria-labelledby":kb(i),"aria-expanded":p,id:Fme(i),onBlur:s?wu:f.onBlur,onChange:s?wu:f.onChange,onClick:s?wu:f.onClick,onFocus:s?wu:f.onFocus,onKeyDown:s?wu:f.onKeyDown,ref:a,role:"combobox",type:"text",value:v}}const Jme={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},eve=["font-family","font-size","font-style","font-weight","letter-spacing","text-transform"];function tve({allowResize:e=!0,text:t}){const n=R.useRef(null),{inputRef:r}=R.useContext(An),[i,o]=R.useState(null);return R.useLayoutEffect(()=>{if(e&&r.current&&n.current&&window.getComputedStyle){const a=window.getComputedStyle(r.current);eve.forEach(s=>{const l=a.getPropertyValue(s);n.current.style.setProperty(s,l)})}},[e,r,n]),R.useLayoutEffect(()=>{var a;if(e){const s=Math.ceil(((a=n.current)==null?void 0:a.scrollWidth)??0)+2;i!==s&&o(s)}},[e,t,i]),{width:i,sizerProps:{ref:n,style:Jme}}}function nve(){const{id:e,inputRef:t,listBoxRef:n,managerRef:r}=R.useContext(An),i=r.current.state.activeIndex===-1,o=R.useCallback(a=>{var s;a.target!==t.current&&((s=t.current)==null||s.focus({preventScroll:!0}))},[t]);return R.useEffect(()=>{var a;i&&((a=n.current)==null||a.scrollTo({top:0}))},[n,i]),{"aria-labelledby":kb(e),id:s9(e),onFocus:o,ref:n,role:"listbox",tabIndex:-1}}function rve({activateFirstOption:e,allowNew:t,collapseOnSelect:n,newOptionText:r,noOptionsText:i,onAdd:o,onDelete:a,onCollapse:s,onExpand:l,onInput:u,onShouldCollapse:f,onShouldExpand:d,onValidate:p,selected:v,suggestions:g,suggestionsTransform:y}){const w=R.useRef(),[b,x]=R.useState(null),[_,S]=R.useState(!1),[j,E]=R.useState(""),C=R.useMemo(()=>{const W=y(j,g);return j&&(t&&W.push({disabled:p?!p(j):!1,label:r,value:AC}),W.length===0&&W.push({disabled:!0,label:i,value:a9})),W},[t,r,i,p,g,y,j]),N=b?CS(b,C):-1,I=e?Math.max(N,0):N,M=C[I],D={activeIndex:I,activeOption:M,isExpanded:_,options:C,selected:v,value:j},z={tagsAdded:w.current?iL(v,w.current.state.selected):[],tagsDeleted:w.current?iL(w.current.state.selected,v):[]},q={listBoxCollapse(W){_&&(!f||f(W??D.value))&&(S(!1),x(null),s==null||s())},listBoxExpand(W){_||(!d||d(W??D.value))&&(S(!0),x(C[I]),l==null||l())},updateActiveIndex(W){const X=zme(W,C.length,e?0:-1);x(C[X])},updateInputValue(W){j!==W&&(E(W),u==null||u(W))},selectTag(W){if(W??(W=Bme(D)),W){const X=CS(W,D.selected);X>-1?a(X):o(W),n&&this.listBoxCollapse(),this.updateInputValue("")}}};return w.current={...q,flags:z,state:D},w}function ive(e){const{id:t,inputRef:n,listBoxRef:r,managerRef:i}=R.useContext(An),o=R.useRef(null),a=i.current.state.options[e],s=e===i.current.state.activeIndex,l=a.disabled??!1,u=CS(a,i.current.state.selected)>-1,f=R.useCallback(()=>{var p;i.current.selectTag(),(p=n.current)==null||p.focus()},[n,i]),d=R.useCallback(()=>{e!==i.current.state.activeIndex&&i.current.updateActiveIndex(e)},[e,i]);return sve(o,r,s),{option:{...a,active:s,disabled:l,index:e,selected:u},optionProps:{"aria-disabled":l,"aria-posinset":e+1,"aria-selected":l?void 0:u,"aria-setsize":i.current.state.options.length,id:l9(t,a),onClick:f,onMouseDown:d,ref:o,role:"option",tabIndex:-1}}}function ove({inputRef:e,managerRef:t}){return R.useRef({input:{blur(){var n;(n=e.current)==null||n.blur()},focus(){var n;(n=e.current)==null||n.focus()},get value(){return t.current.state.value},set value(n){typeof n!="string"&&(n=String(n)),t.current.updateInputValue(n)}},listBox:{collapse(){t.current.listBoxCollapse()},expand(){t.current.listBoxExpand()},get activeOption(){return t.current.state.activeOption},get isExpanded(){return t.current.state.isExpanded}},select(n){t.current.selectTag(n)}}).current}function ave({onBlur:e,onFocus:t}){const[n,r]=R.useState(!1),{id:i,inputRef:o,rootRef:a}=R.useContext(An),s=R.useMemo(()=>({"aria-describedby":kb(i),id:i,onFocus(){r(!0),t==null||t()},onBlur(){var l;(l=a.current)!=null&&l.contains(document.activeElement)||(r(!1),e==null||e())},onClick(){var l;document.activeElement===a.current&&((l=o.current)==null||l.focus())},ref:a,tabIndex:-1}),[o,i,e,t,a]);return{isActive:n,rootProps:s}}function sve(e,t,n){R.useEffect(()=>{var r,i,o,a;if(n){const s=(r=e.current)==null?void 0:r.offsetHeight,l=(i=e.current)==null?void 0:i.offsetTop,u=(o=t.current)==null?void 0:o.offsetHeight,f=(a=t.current)==null?void 0:a.scrollTop;lf+u&&t.current.scrollTo(0,l+s-u)}},[n,t,e])}function lve(e,t){const{isDisabled:n,managerRef:r}=R.useContext(An),i=r.current.state.selected[e],o=R.useCallback(()=>r.current.selectTag(i),[r,i]);return{tag:i,tagProps:{"aria-disabled":n,title:Iy(t,i.label),onClick:n?wu:o}}}function uve(){var e;const{rootRef:t,managerRef:n}=R.useContext(An),r=R.useRef(),i=n.current.flags.tagsDeleted[0],o=(e=r.current)==null?void 0:e.contains(document.activeElement);return R.useLayoutEffect(()=>{var a,s;if(i){const l=(a=r.current)==null?void 0:a.contains(document.activeElement);o&&!l&&((s=t.current)==null||s.focus({preventScroll:!0}))}},[o,r,t,i]),{listRef:r}}const cve={position:"absolute",width:1,height:1,left:-9999,overflow:"hidden",clip:"rect(0 0 0 0)"};function fve({ariaAddedText:e,ariaDeletedText:t}){const{managerRef:n}=R.useContext(An),r=R.useRef([]);return n.current.flags.tagsAdded.forEach(i=>{r.current.push(Iy(e,i.label))}),n.current.flags.tagsDeleted.forEach(i=>{r.current.push(Iy(t,i.label))}),V.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"status",style:cve},r.current.join(` `))}function dve({children:e}){const{classNames:t,comboBoxRef:n,id:r}=R.useContext(An);return V.createElement("div",{className:t.comboBox,id:$me(r),ref:n},e)}const hve=({classNames:e,text:t})=>V.createElement("mark",{className:e.highlight},t);function pve({option:e,query:t,render:n=hve}){const{classNames:r}=R.useContext(An);if(e.value===AC||e.value===a9)return V.createElement(V.Fragment,null,Iy(e.label,t));if(t){const i=Hme(e.label,t);if(i){const o=n({text:i[1],classNames:r});return V.createElement(V.Fragment,null,i[0],o,i[2])}}return V.createElement(V.Fragment,null,e.label)}const mve=V.memo(pve),vve=({classNames:e,inputWidth:t,...n})=>V.createElement("input",{className:e.input,style:{width:t},...n});function gve({allowBackspace:e=!0,allowResize:t=!0,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i,placeholderText:o,render:a=vve}){const{classNames:s}=R.useContext(An),{value:l,...u}=Qme({allowBackspace:e,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i}),f=l.lengthV.createElement("div",{className:t.label,id:n},e);function bve({children:e,render:t=yve}){const{classNames:n,id:r}=R.useContext(An);return t({children:e,classNames:n,id:kb(r)})}const _ve=({children:e,classNames:t,...n})=>V.createElement("div",{className:t.listBox,...n},e);function xve({children:e,render:t=_ve}){const{classNames:n,managerRef:r}=R.useContext(An),i=nve();return!r.current.state.isExpanded||V.Children.count(e)===0?null:t({children:e,classNames:n,...i})}const wve=({children:e,classNames:t,option:n,...r})=>{const i=[t.option];return n.active&&i.push(t.optionIsActive),V.createElement("div",{className:i.join(" "),...r},e)};function Ove({children:e,index:t,render:n=wve}){const{classNames:r}=R.useContext(An),{option:i,optionProps:o}=ive(t);return n({classNames:r,children:e,option:i,...o})}const Sve=({children:e,classNames:t,isActive:n,isDisabled:r,isInvalid:i,...o})=>{const a=[t.root];return n&&a.push(t.rootIsActive),r&&a.push(t.rootIsDisabled),i&&a.push(t.rootIsInvalid),V.createElement("div",{className:a.join(" "),...o},e)};function Eve({children:e,onBlur:t,onFocus:n,render:r=Sve}){const{classNames:i,isDisabled:o,isInvalid:a}=R.useContext(An),{isActive:s,rootProps:l}=ave({onBlur:t,onFocus:n});return r({children:e,classNames:i,isActive:s,isDisabled:o,isInvalid:a,...l})}const jve=({classNames:e,tag:t,...n})=>V.createElement("button",{type:"button",className:e.tag,...n},V.createElement("span",{className:e.tagName},t.label));function Tve({render:e=jve,index:t,title:n}){const{classNames:r}=R.useContext(An),{tag:i,tagProps:o}=lve(t,n);return e({classNames:r,tag:i,...o})}function Cve({children:e,label:t}){const{classNames:n}=R.useContext(An),{listRef:r}=uve();return V.createElement("ul",{className:n.tagList,"aria-label":t,ref:r,role:"list"},e.map(i=>V.createElement("li",{className:n.tagListItem,key:i.key,role:"listitem"},i)))}const Pve={root:"react-tags",rootIsActive:"is-active",rootIsDisabled:"is-disabled",rootIsInvalid:"is-invalid",label:"react-tags__label",tagList:"react-tags__list",tagListItem:"react-tags__list-item",tag:"react-tags__tag",tagName:"react-tags__tag-name",comboBox:"react-tags__combobox",input:"react-tags__combobox-input",listBox:"react-tags__listbox",option:"react-tags__listbox-option",optionIsActive:"is-active",highlight:"react-tags__listbox-option-highlight"},Ave=[qs.Enter];function kve({activateFirstOption:e=!1,allowBackspace:t=!0,allowNew:n=!1,allowResize:r=!0,ariaAddedText:i="Added tag %value%",ariaDescribedBy:o,ariaErrorMessage:a,ariaDeletedText:s="Removed tag %value%",classNames:l=Pve,collapseOnSelect:u=!1,deleteButtonText:f="Remove %value% from the list",delimiterKeys:d=Ave,id:p="react-tags",isDisabled:v=!1,isInvalid:g=!1,labelText:y="Select tags",newOptionText:w="Add %value%",noOptionsText:b="No options found for %value%",onAdd:x,onBlur:_,onCollapse:S,onDelete:j,onExpand:E,onFocus:C,onInput:N,onShouldCollapse:I,onShouldExpand:M,onValidate:D,placeholderText:z="Add a tag",renderHighlight:q,renderInput:W,renderLabel:X,renderListBox:J,renderOption:te,renderRoot:Z,renderTag:B,selected:F=[],suggestions:H=[],suggestionsTransform:ne=Yme,tagListLabelText:Y="Selected tags"},ee){const ae=R.useRef(null),oe=R.useRef(null),fe=R.useRef(null),P=R.useRef(null),A=rve({activateFirstOption:e,allowNew:n,collapseOnSelect:u,newOptionText:w,noOptionsText:b,onAdd:x,onDelete:j,onCollapse:S,onExpand:E,onInput:N,onShouldCollapse:I,onShouldExpand:M,onValidate:D,selected:F,suggestions:H,suggestionsTransform:ne}),U=ove({inputRef:oe,managerRef:A});return ee&&(typeof ee=="function"?ee(U):ee.current=U),V.createElement(An.Provider,{value:{classNames:l,comboBoxRef:ae,id:p,inputRef:oe,isDisabled:v,isInvalid:g,listBoxRef:fe,managerRef:A,rootRef:P}},V.createElement(Eve,{onBlur:_,onFocus:C,render:Z},V.createElement(bve,{render:X},y),V.createElement(Cve,{label:Y},A.current.state.selected.map((Q,K)=>V.createElement(Tve,{key:TS(Q),index:K,render:B,title:f}))),V.createElement(dve,null,V.createElement(gve,{allowBackspace:t,allowResize:r,ariaDescribedBy:o,ariaErrorMessage:a,delimiterKeys:d,placeholderText:z,render:W}),V.createElement(xve,{render:J},A.current.state.options.map((Q,K)=>V.createElement(Ove,{key:TS(Q),index:K,render:te},V.createElement(mve,{option:Q,query:A.current.state.value,render:q}))))),V.createElement(fve,{ariaAddedText:i,ariaDeletedText:s})))}const Nve=V.forwardRef(kve),Rve=/\s+/g,f9=e=>e.trim().toLowerCase().replace(Rve,"-"),d9=({color:e})=>m.jsx("div",{style:{backgroundColor:e},className:"color-bullet"}),h9=({tag:e,colorGenerator:t})=>m.jsx(d9,{color:t.getColorForKey(e)});let oL=1;const p9="Tag not found",m9="Add tag",Lve=e=>e!==p9,Mve=e=>e===m9,aL=e=>(oL+=1,{label:e,value:`${e}${oL}`}),Ive=e=>({tag:t,onClick:n})=>m.jsx(Ab,{colorGenerator:e,text:t.label,className:"react-tags__tag",onClose:n}),Dve=(e,t)=>({option:n,classNames:r,...i})=>{var o;const a=Lve(n.label),s=Mve(n.label);return m.jsx("div",{className:De(r.option,{[r.optionIsActive]:a&&n.active,"react-tags__listbox-option--not-selectable":!a}),...i,children:a?m.jsxs(m.Fragment,{children:[!s&&m.jsx(h9,{tag:`${n.label}`,colorGenerator:e}),s?m.jsxs("i",{children:['Add "',f9(((o=t.current)==null?void 0:o.input.value)??""),'"']}):n.label]}):m.jsx("i",{children:n.label})})},v9=({selectedTags:e,onChange:t,placeholder:n,tags:r,immutable:i=!1})=>{const{ColorGenerator:o}=$t(v9),a=ws("shortUrlCreation"),s=(a==null?void 0:a.tagFilteringMode)??"startsWith",l=fa();return m.jsx(Nve,{ref:l,selected:e.map(aL),suggestions:r.filter(u=>!e.includes(u)).map(aL),renderTag:Ive(o),renderOption:Dve(o,l),activateFirstOption:!0,allowNew:!i,newOptionText:m9,noOptionsText:p9,placeholderText:n??"Add tags to the URL",delimiterKeys:["Enter",","],suggestionsTransform:(u,f)=>{const d=u.toLowerCase().trim();return d.length<1?[]:[...f.filter(({label:p})=>s==="includes"?p.includes(d):p.startsWith(d))].slice(0,5)},onDelete:u=>{const f=[...e];f.splice(u,1),t(f)},onAdd:({label:u})=>t([...new Set([...e,...u.split(",").map(f9)])])})},$ve=Ft(v9,["ColorGenerator"]),PS="shlink/tagDelete",Fve={deleting:!1,deleted:!1,error:!1},g9=vn(`${PS}/tagDeleted`),Uve=e=>{const t=yn(`${PS}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=rn({name:PS,initialState:Fve,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({deleting:!0,deleted:!1,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({deleting:!1,deleted:!1,error:!0,errorData:qr(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},kC="shlink/tagEdit",Bve={editing:!1,edited:!1,error:!1},y9=vn(`${kC}/tagEdited`),zve=(e,t)=>yn(`${kC}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),Vve=e=>rn({name:kC,initialState:Bve,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({editing:!0,edited:!1,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({editing:!1,edited:!1,error:!0,errorData:qr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{oldName:i,newName:o}=r;return{oldName:i,newName:o,editing:!1,edited:!0,error:!1}})}}),NC="shlink/tagsList",Hx={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},sL=(e,t)=>n=>n===e?t:n,lL=(e,t)=>e.filter(n=>n!==t),Hve=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:a}=i,s=n[r];return{...n,[r]:{...s,visitsSummary:s.visitsSummary&&{total:s.visitsSummary.total+o+a,bots:s.visitsSummary.bots+o,nonBots:s.visitsSummary.nonBots+a},visitsCount:(s.visitsCount??0)+o+a}}},{...t}),Wve=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),Gve=e=>yn(`${NC}/listTags`,async()=>{const{data:t}=await e().tagsStats(),n=t.reduce((r,{tag:i,...o})=>(r[i]=o,r),{});return{tags:Object.keys(n),stats:n}}),b9=vn(`${NC}/filterTags`),qve=(e,t)=>rn({name:NC,initialState:Hx,reducers:{},extraReducers:n=>{n.addCase(b9,(r,{payload:i})=>({...r,filteredTags:r.tags.filter(o=>o.toLowerCase().match(i.toLowerCase()))})),n.addCase(e.pending,r=>({...r,loading:!0,error:!1})),n.addCase(e.rejected,(r,{error:i})=>({...Hx,error:!0,errorData:qr(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...Hx,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(g9,({tags:r,filteredTags:i,...o},{payload:a})=>({...o,tags:lL(r,a),filteredTags:lL(i,a)})),n.addCase(y9,({tags:r,filteredTags:i,stats:o,...a},{payload:s})=>({...a,stats:{...o,[s.newName]:o[s.oldName]},tags:r.map(sL(s.oldName,s.newName)).sort(),filteredTags:i.map(sL(s.oldName,s.newName)).sort()})),n.addCase(uf,(r,{payload:i})=>({...r,stats:Hve(Wve(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(a=>!r.includes(a)))}))}}),Kve={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},_9=Ki(({filterTags:e,tagsList:t})=>{var n,r;const{TagsTable:i}=$t(_9),o=TC(),[a,s]=R.useState(((n=o.tags)==null?void 0:n.defaultOrdering)??{}),l=R.useMemo(()=>{const f=t.filteredTags.map(d=>{var p,v,g;const y=t.stats[d],w=((p=o.visits)!=null&&p.excludeBots?(v=y==null?void 0:y.visitsSummary)==null?void 0:v.nonBots:(g=y==null?void 0:y.visitsSummary)==null?void 0:g.total)??(y==null?void 0:y.visitsCount)??0;return{tag:d,visits:w,shortUrls:(y==null?void 0:y.shortUrlsCount)??0}});return nF(f,a)},[a,(r=o.visits)==null?void 0:r.excludeBots,t.filteredTags,t.stats]),u=dC();return t.loading?m.jsx(na,{loading:!0}):t.error?m.jsx(ur,{type:"error",children:m.jsx(Oo,{errorData:t.errorData,fallbackMessage:"Error loading tags :("})}):m.jsxs(fC,{value:u,children:[m.jsx(qp,{className:"mb-3",onChange:e}),m.jsx(ir,{className:"mb-3",children:m.jsx("div",{className:"col-lg-6 offset-lg-6",children:m.jsx(Kp,{items:Kve,order:a,onChange:(f,d)=>s({field:f,dir:d})})})}),m.jsx(hC,{type:"tags",className:"mb-3"}),m.jsx(i,{sortedTags:l,currentOrder:a,orderByColumn:f=>()=>{const d=gb(f,a.field,a.dir);s({field:d?f:void 0,dir:d})}})]})},()=>[cr.visits]),Yve=Ft(_9,["TagsTable"]),RC=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!zh(o)&&n(o);return m.jsxs(HT,{listClassName:De("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[m.jsx(pl,{disabled:t<=1,children:m.jsx(ml,{previous:!0,tag:"span",onClick:i(t-1)})}),e9(t,e).map((o,a)=>m.jsx(pl,{disabled:zh(o),active:t===o,children:m.jsx(ml,{role:"link",tag:"span",onClick:i(o),children:t9(o)})},n9(o,a))),m.jsx(pl,{disabled:t>=e,children:m.jsx(ml,{next:!0,tag:"span",onClick:i(t+1)})})]})},Zve=20,x9=({sortedTags:e,orderByColumn:t,currentOrder:n})=>{const{TagsTableRow:r}=$t(x9),i=R.useRef(!0),{page:o=1}=Gp(),[a,s]=ihe("page",Number(o)),l=ec(e,Zve),u=l.length>1,f=l[a-1]??[];return R.useEffect(()=>{!i.current&&s(1),i.current=!1},[s,e]),R.useEffect(()=>{scrollTo(0,0)},[a]),m.jsxs(Ot,{bodyClassName:u?"pb-1":"",children:[m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsxs("thead",{className:"responsive-table__header",children:[m.jsxs("tr",{children:[m.jsxs("th",{className:"tags-table__header-cell",onClick:t("tag"),children:["Tag ",m.jsx(Kd,{currentOrder:n,field:"tag"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("shortUrls"),children:["Short URLs ",m.jsx(Kd,{currentOrder:n,field:"shortUrls"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("visits"),children:["Visits ",m.jsx(Kd,{currentOrder:n,field:"visits"})]}),m.jsx("th",{className:"tags-table__header-cell",children:m.jsx("span",{className:"sr-only",children:"Options"})})]}),m.jsx("tr",{children:m.jsx("th",{"aria-hidden":!0,colSpan:4,className:"p-0 border-top-0"})})]}),m.jsxs("tbody",{children:[f.length===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:4,className:"text-center",children:"No tags found"})}),f.map(d=>m.jsx(r,{tag:d},d.tag))]})]}),u&&m.jsx("div",{className:"sticky-card-paginator",children:m.jsx(RC,{pagesCount:l.length,currentPage:a,setCurrentPage:s})})]},a)},Xve=Ft(x9,["TagsTableRow"]),w9=({tag:e})=>{const{DeleteTagConfirmModal:t,EditTagModal:n,ColorGenerator:r}=$t(w9),[i,o]=Xt(),[a,s]=Xt(),l=xs(),u=Ob();return m.jsxs("tr",{className:"responsive-table__row",children:[m.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[m.jsx(h9,{tag:e.tag,colorGenerator:r})," ",e.tag]}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:m.jsx(jt,{to:`${l}/list-short-urls/1?tags=${encodeURIComponent(e.tag)}`,children:Zt(e.shortUrls)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:m.jsx(jt,{to:`${l}/tag/${e.tag}/visits`,children:Zt(e.visits)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end",children:m.jsxs(vb,{children:[m.jsxs(ke,{onClick:s,children:[m.jsx(je,{icon:e$,fixedWidth:!0,className:"me-1"})," Edit"]}),m.jsxs(ke,{disabled:!u||!u.canAddItemWithName(e.tag),onClick:()=>u==null?void 0:u.addItemToCompare({name:e.tag,query:e.tag,style:r.stylesForKey(e.tag)}),children:[m.jsx(je,{icon:ob,fixedWidth:!0})," Compare visits"]}),m.jsx(ke,{divider:!0,tag:"hr"}),m.jsxs(ke,{className:"dropdown-item--danger",onClick:o,children:[m.jsx(je,{icon:QZ,fixedWidth:!0,className:"me-1"})," Delete tag"]})]})}),m.jsx(n,{tag:e.tag,toggle:s,isOpen:a}),m.jsx(t,{tag:e.tag,toggle:o,isOpen:i})]})},Qve=Ft(w9,["DeleteTagConfirmModal","EditTagModal","ColorGenerator"]),Jve=(e,t)=>{e.factory("TagsSelector",$ve),e.serviceFactory("DeleteTagConfirmModal",()=>Lme),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.factory("EditTagModal",Mme),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.factory("TagsTableRow",Qve),e.factory("TagsTable",Xve),e.factory("TagsList",Yve),e.decorator("TagsList",t(["tagsList","mercureInfo"],["filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",Vve,"editTag"),e.serviceFactory("tagEditReducer",n=>n.reducer,"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",Uve,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",n=>n.reducer,"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",qve,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",n=>n.reducer,"tagsListReducerCreator"),e.serviceFactory("listTags",Gve,"apiClientFactory"),e.serviceFactory("filterTags",()=>b9),e.serviceFactory("deleteTag",n=>n.deleteTag,"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>g9),e.serviceFactory("editTag",zve,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>y9)};function Wx(e){return e==null?"":`${e}`}function ege(e={}){const{separator:t,decimals:n}=e;return t?n?r=>r.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function LC(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;if(!t||t===n)return i=>i;const r=new RegExp(t,"g");return i=>(i.includes(t)&&(i=i.replace(r,n)),`${t}${i}${t}`)}function tge(e={stringFormatter:LC()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function nge(e={stringFormatter:LC()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}const rge=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g");function ige(e){var t,n,r;const i=[];let o;for(;o=rge.exec(e);)i.push((r=(t=o[3])!==null&&t!==void 0?t:(n=o[1])===null||n===void 0?void 0:n.trim())!==null&&r!==void 0?r:o[0]);return i}function uL(e,t,n){if(t in e){const o=e[t];return o===void 0?n:o}const r=Array.isArray(t)?t:ige(t);let i=e;for(const o of r)if(i=i==null?void 0:i[o],i===void 0)return n;return i}function O9(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function AS(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var cL;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(cL||(cL={}));class oge{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||LC(),i=nge({stringFormatter:r}),o={header:r,undefined:Wx,boolean:Wx,number:ege(),bigint:Wx,string:r,symbol:tge({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` `,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:i=>uL(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:a=>uL(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const u=s(l,a);return u===void 0?i:u}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return AS(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(O9,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return AS(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class age extends oge{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((o,a)=>(Object.keys(a).forEach(s=>{o.includes(s)||o.push(s)}),o),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(O9,[])}processData(t){return AS(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var wn;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(wn||(wn={}));wn.QUOTATION_MARK+"",wn.QUOTATION_MARK,wn.REVERSE_SOLIDUS+"",wn.REVERSE_SOLIDUS,wn.SOLIDUS+"",wn.SOLIDUS,wn.LATIN_SMALL_LETTER_B+"",wn.BACKSPACE,wn.LATIN_SMALL_LETTER_F+"",wn.FORM_FEED,wn.LATIN_SMALL_LETTER_N+"",wn.NEWLINE,wn.LATIN_SMALL_LETTER_R+"",wn.CARRIAGE_RETURN,wn.LATIN_SMALL_LETTER_T+"",wn.TAB;var fL;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(fL||(fL={}));var dL;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR",e[e.BOM_OR_START=29]="BOM_OR_START",e[e.BOM=30]="BOM"})(dL||(dL={}));var hL;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(hL||(hL={}));var pL;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(pL||(pL={}));const sge=new age,lge=e=>sge.parse(e),uge=6,mL="0123456789ABCDEF",cge=128,{floor:fge,random:dge,sqrt:hge,round:pge}=Math,mge=()=>`#${OC(uge,()=>mL[fge(dge()*mL.length)]).join("")}`,vL=e=>e.toLowerCase().trim(),vge=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),gge=(e=0,t=0,n=0)=>pge(hge(.299*e**2+.587*t**2+.114*n**2));class yge{constructor(t){Qa(this,"colors"),Qa(this,"lights");var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}getColorForKey(t){const n=vL(t);return this.colors[n]||this.setColorForKey(n,mge())}setColorForKey(t,n){var r;const i=vL(t);return this.colors[i]=n,(r=this.storage)==null||r.storeTagColors(this.colors),n}stylesForKey(t){const n=this.getColorForKey(t);return{backgroundColor:n,color:this.isLightColor(n)?"#222":"#fff"}}isLightColor(t){const n=t.substring(1);if(this.lights[n]===void 0){const r=vge(n);this.lights[n]=gge(...r)>=cge}return this.lights[n]}}const S9=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},bge=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);S9(e,i,n)};class _ge{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(o=>o.blob()),i=URL.createObjectURL(r);S9(this.window,i,n)}}class xge{constructor(t,n){Qa(this,"exportVisits",(r,i)=>{i.length&&this.exportCsv(r,i)}),Qa(this,"exportShortUrls",r=>{r.length&&this.exportCsv("short_urls.csv",r)}),Qa(this,"exportCsv",(r,i)=>{const o=this.jsonToCsv(i);bge(this.window,o,r)}),this.window=t,this.jsonToCsv=n}}function wge(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",_ge,"fetch","window"),e.service("ColorGenerator",yge,"TagColorsStorage"),e.constant("jsonToCsv",lge),e.service("ReportExporter",xge,"window","jsonToCsv"),e.serviceFactory("useTimeoutToggle",()=>Q7)}const tm=({visits:e,shortUrl:t,children:n,title:r})=>m.jsx("header",{children:m.jsxs(jr,{body:!0,children:[m.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[m.jsx(Pb,{}),m.jsx("span",{className:"text-center d-none d-sm-block",children:m.jsx("small",{children:r})}),m.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",m.jsx(VU,{visitsCount:e.length,shortUrl:t})]})]}),m.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:m.jsx("small",{children:r})}),n&&m.jsx("div",{className:"mt-md-2",children:n})]})}),E9=({title:e,footer:t,children:n})=>m.jsxs(jr,{role:"document",children:[m.jsx(xc,{className:"chart-card__header",children:e}),m.jsx(_c,{children:n}),t&&m.jsx(v7,{className:"chart-card__footer--sticky",children:t})]});var Oge=Array.isArray,Pr=Oge,Sge=typeof Bu=="object"&&Bu&&Bu.Object===Object&&Bu,j9=Sge,Ege=j9,jge=typeof self=="object"&&self&&self.Object===Object&&self,Tge=Ege||jge||Function("return this")(),Po=Tge,Cge=Po,Pge=Cge.Symbol,nm=Pge,gL=nm,T9=Object.prototype,Age=T9.hasOwnProperty,kge=T9.toString,id=gL?gL.toStringTag:void 0;function Nge(e){var t=Age.call(e,id),n=e[id];try{e[id]=void 0;var r=!0}catch{}var i=kge.call(e);return r&&(t?e[id]=n:delete e[id]),i}var Rge=Nge,Lge=Object.prototype,Mge=Lge.toString;function Ige(e){return Mge.call(e)}var Dge=Ige,yL=nm,$ge=Rge,Fge=Dge,Uge="[object Null]",Bge="[object Undefined]",bL=yL?yL.toStringTag:void 0;function zge(e){return e==null?e===void 0?Bge:Uge:bL&&bL in Object(e)?$ge(e):Fge(e)}var ha=zge;function Vge(e){return e!=null&&typeof e=="object"}var pa=Vge,Hge=ha,Wge=pa,Gge="[object Symbol]";function qge(e){return typeof e=="symbol"||Wge(e)&&Hge(e)==Gge}var cf=qge,Kge=Pr,Yge=cf,Zge=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xge=/^\w*$/;function Qge(e,t){if(Kge(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Yge(e)?!0:Xge.test(e)||!Zge.test(e)||t!=null&&e in Object(t)}var MC=Qge;function Jge(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Os=Jge;const ff=yt(Os);var eye=ha,tye=Os,nye="[object AsyncFunction]",rye="[object Function]",iye="[object GeneratorFunction]",oye="[object Proxy]";function aye(e){if(!tye(e))return!1;var t=eye(e);return t==rye||t==iye||t==nye||t==oye}var IC=aye;const Ge=yt(IC);var sye=Po,lye=sye["__core-js_shared__"],uye=lye,Gx=uye,_L=function(){var e=/[^.]+$/.exec(Gx&&Gx.keys&&Gx.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function cye(e){return!!_L&&_L in e}var fye=cye,dye=Function.prototype,hye=dye.toString;function pye(e){if(e!=null){try{return hye.call(e)}catch{}try{return e+""}catch{}}return""}var C9=pye,mye=IC,vye=fye,gye=Os,yye=C9,bye=/[\\^$.*+?()[\]{}|]/g,_ye=/^\[object .+?Constructor\]$/,xye=Function.prototype,wye=Object.prototype,Oye=xye.toString,Sye=wye.hasOwnProperty,Eye=RegExp("^"+Oye.call(Sye).replace(bye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jye(e){if(!gye(e)||vye(e))return!1;var t=mye(e)?Eye:_ye;return t.test(yye(e))}var Tye=jye;function Cye(e,t){return e==null?void 0:e[t]}var Pye=Cye,Aye=Tye,kye=Pye;function Nye(e,t){var n=kye(e,t);return Aye(n)?n:void 0}var Vl=Nye,Rye=Vl,Lye=Rye(Object,"create"),Nb=Lye,xL=Nb;function Mye(){this.__data__=xL?xL(null):{},this.size=0}var Iye=Mye;function Dye(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var $ye=Dye,Fye=Nb,Uye="__lodash_hash_undefined__",Bye=Object.prototype,zye=Bye.hasOwnProperty;function Vye(e){var t=this.__data__;if(Fye){var n=t[e];return n===Uye?void 0:n}return zye.call(t,e)?t[e]:void 0}var Hye=Vye,Wye=Nb,Gye=Object.prototype,qye=Gye.hasOwnProperty;function Kye(e){var t=this.__data__;return Wye?t[e]!==void 0:qye.call(t,e)}var Yye=Kye,Zye=Nb,Xye="__lodash_hash_undefined__";function Qye(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Zye&&t===void 0?Xye:t,this}var Jye=Qye,e0e=Iye,t0e=$ye,n0e=Hye,r0e=Yye,i0e=Jye;function df(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var x0e=_0e,w0e=Rb;function O0e(e,t){var n=this.__data__,r=w0e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var S0e=O0e,E0e=s0e,j0e=m0e,T0e=y0e,C0e=x0e,P0e=S0e;function hf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},al=function(e){return rm(e)&&e.indexOf("%")===e.length-1},Ee=function(e){return Ybe(e)&&!mf(e)},mn=function(e){return Ee(e)||rm(e)},Jbe=0,Ss=function(e){var t=++Jbe;return"".concat(e||"").concat(t)},yr=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ee(e)&&!rm(e))return n;var i;if(al(e)){var o=e.indexOf("%");i=t*parseFloat(e.slice(0,o))/100}else i=+e;return mf(i)&&(i=n),r&&i>t&&(i=t),i},Ra=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},e_e=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function s_e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function RS(e){"@babel/helpers - typeof";return RS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RS(e)}var AL={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},Wo=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},kL=null,qx=null,HC=function e(t){if(t===kL&&Array.isArray(qx))return qx;var n=[];return R.Children.forEach(t,function(r){ze(r)||(kS.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),qx=n,kL=t,n};function fr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Wo(i)}):r=[Wo(t)],HC(e).forEach(function(i){var o=Fr(i,"type.displayName")||Fr(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Lr(e,t){var n=fr(e,t);return n&&n[0]}var NL=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!Ee(n)||n<=0||!Ee(r)||r<=0)},l_e=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],u_e=function(e){return e&&e.type&&rm(e.type)&&l_e.indexOf(e.type)>=0},D9=function(e){return e&&RS(e)==="object"&&"cx"in e&&"cy"in e&&"r"in e},c_e=function(e,t,n,r){var i,o=(i=CL==null?void 0:CL[r])!==null&&i!==void 0?i:[];return!Ge(e)&&(r&&o.includes(t)||r_e.includes(t))||n&&VC.includes(t)},$e=function(e,t,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(R.isValidElement(e)&&(r=e.props),!ff(r))return null;var i={};return Object.keys(r).forEach(function(o){var a;c_e((a=r)===null||a===void 0?void 0:a[o],o,t,n)&&(i[o]=r[o])}),i},LS=function e(t,n){if(t===n)return!0;var r=R.Children.count(t);if(r!==R.Children.count(n))return!1;if(r===0)return!0;if(r===1)return RL(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function m_e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function IS(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,u=p_e(e,h_e),f=i||{width:n,height:r,x:0,y:0},d=De("recharts-surface",o);return V.createElement("svg",MS({},$e(u,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),V.createElement("title",null,s),V.createElement("desc",null,l),t)}var v_e=["children","className"];function DS(){return DS=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function y_e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Qe=V.forwardRef(function(e,t){var n=e.children,r=e.className,i=g_e(e,v_e),o=De("recharts-layer",r);return V.createElement("g",DS({className:o},$e(i,!0),{ref:t}),n)}),Bi=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;ii?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:x_e(e,t,n)}var O_e=w_e,S_e="\\ud800-\\udfff",E_e="\\u0300-\\u036f",j_e="\\ufe20-\\ufe2f",T_e="\\u20d0-\\u20ff",C_e=E_e+j_e+T_e,P_e="\\ufe0e\\ufe0f",A_e="\\u200d",k_e=RegExp("["+A_e+S_e+C_e+P_e+"]");function N_e(e){return k_e.test(e)}var $9=N_e;function R_e(e){return e.split("")}var L_e=R_e,F9="\\ud800-\\udfff",M_e="\\u0300-\\u036f",I_e="\\ufe20-\\ufe2f",D_e="\\u20d0-\\u20ff",$_e=M_e+I_e+D_e,F_e="\\ufe0e\\ufe0f",U_e="["+F9+"]",$S="["+$_e+"]",FS="\\ud83c[\\udffb-\\udfff]",B_e="(?:"+$S+"|"+FS+")",U9="[^"+F9+"]",B9="(?:\\ud83c[\\udde6-\\uddff]){2}",z9="[\\ud800-\\udbff][\\udc00-\\udfff]",z_e="\\u200d",V9=B_e+"?",H9="["+F_e+"]?",V_e="(?:"+z_e+"(?:"+[U9,B9,z9].join("|")+")"+H9+V9+")*",H_e=H9+V9+V_e,W_e="(?:"+[U9+$S+"?",$S,B9,z9,U_e].join("|")+")",G_e=RegExp(FS+"(?="+FS+")|"+W_e+H_e,"g");function q_e(e){return e.match(G_e)||[]}var K_e=q_e,Y_e=L_e,Z_e=$9,X_e=K_e;function Q_e(e){return Z_e(e)?X_e(e):Y_e(e)}var J_e=Q_e,exe=O_e,txe=$9,nxe=J_e,rxe=N9;function ixe(e){return function(t){t=rxe(t);var n=txe(t)?nxe(t):void 0,r=n?n[0]:t.charAt(0),i=n?exe(n,1).join(""):t.slice(1);return r[e]()+i}}var oxe=ixe,axe=oxe,sxe=axe("toUpperCase"),lxe=sxe;const Db=yt(lxe);function Pt(e){return function(){return e}}const W9=Math.cos,Fy=Math.sin,Yi=Math.sqrt,Uy=Math.PI,$b=2*Uy,US=Math.PI,BS=2*US,Ks=1e-6,uxe=BS-Ks;function G9(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return G9;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iKs)if(!(Math.abs(d*l-u*f)>Ks)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-a,g=i-s,y=l*l+u*u,w=v*v+g*g,b=Math.sqrt(y),x=Math.sqrt(p),_=o*Math.tan((US-Math.acos((y+p-w)/(2*b*x)))/2),S=_/x,j=_/b;Math.abs(S-1)>Ks&&this._append`L${t+S*f},${n+S*d}`,this._append`A${o},${o},0,0,${+(d*v>f*g)},${this._x1=t+j*l},${this._y1=n+j*u}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,f=n+l,d=1^a,p=a?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Ks||Math.abs(this._y1-f)>Ks)&&this._append`L${u},${f}`,r&&(p<0&&(p=p%BS+BS),p>uxe?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:p>Ks&&this._append`A${r},${r},0,${+(p>=US)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function WC(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new fxe(t)}function GC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function q9(e){this._context=e}q9.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Fb(e){return new q9(e)}function K9(e){return e[0]}function Y9(e){return e[1]}function Z9(e,t){var n=Pt(!0),r=null,i=Fb,o=null,a=WC(s);e=typeof e=="function"?e:e===void 0?K9:Pt(e),t=typeof t=="function"?t:t===void 0?Y9:Pt(t);function s(l){var u,f=(l=GC(l)).length,d,p=!1,v;for(r==null&&(o=i(v=a())),u=0;u<=f;++u)!(u=v;--g)s.point(_[g],S[g]);s.lineEnd(),s.areaEnd()}b&&(_[p]=+e(w,p,d),S[p]=+t(w,p,d),s.point(r?+r(w,p,d):_[p],n?+n(w,p,d):S[p]))}if(x)return s=null,x+""||null}function f(){return Z9().defined(i).curve(a).context(o)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:Pt(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Pt(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Pt(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:Pt(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Pt(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Pt(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Pt(!!d),u):i},u.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),u):a},u.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),u):o},u}class X9{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function dxe(e){return new X9(e,!0)}function hxe(e){return new X9(e,!1)}const qC={draw(e,t){const n=Yi(t/Uy);e.moveTo(n,0),e.arc(0,0,n,0,$b)}},pxe={draw(e,t){const n=Yi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Q9=Yi(1/3),mxe=Q9*2,vxe={draw(e,t){const n=Yi(t/mxe),r=n*Q9;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},gxe={draw(e,t){const n=Yi(t),r=-n/2;e.rect(r,r,n,n)}},yxe=.8908130915292852,J9=Fy(Uy/10)/Fy(7*Uy/10),bxe=Fy($b/10)*J9,_xe=-W9($b/10)*J9,xxe={draw(e,t){const n=Yi(t*yxe),r=bxe*n,i=_xe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=$b*o/5,s=W9(a),l=Fy(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},Kx=Yi(3),wxe={draw(e,t){const n=-Yi(t/(Kx*3));e.moveTo(0,n*2),e.lineTo(-Kx*n,-n),e.lineTo(Kx*n,-n),e.closePath()}},Xr=-.5,Qr=Yi(3)/2,zS=1/Yi(12),Oxe=(zS/2+1)*3,Sxe={draw(e,t){const n=Yi(t/Oxe),r=n/2,i=n*zS,o=r,a=n*zS+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Xr*r-Qr*i,Qr*r+Xr*i),e.lineTo(Xr*o-Qr*a,Qr*o+Xr*a),e.lineTo(Xr*s-Qr*l,Qr*s+Xr*l),e.lineTo(Xr*r+Qr*i,Xr*i-Qr*r),e.lineTo(Xr*o+Qr*a,Xr*a-Qr*o),e.lineTo(Xr*s+Qr*l,Xr*l-Qr*s),e.closePath()}};function Exe(e,t){let n=null,r=WC(i);e=typeof e=="function"?e:Pt(e||qC),t=typeof t=="function"?t:Pt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Pt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Pt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function By(){}function zy(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function eB(e){this._context=e}eB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:zy(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:zy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jxe(e){return new eB(e)}function tB(e){this._context=e}tB.prototype={areaStart:By,areaEnd:By,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:zy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Txe(e){return new tB(e)}function nB(e){this._context=e}nB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:zy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Cxe(e){return new nB(e)}function rB(e){this._context=e}rB.prototype={areaStart:By,areaEnd:By,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Pxe(e){return new rB(e)}function ML(e){return e<0?-1:1}function IL(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(ML(o)+ML(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function DL(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Yx(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Vy(e){this._context=e}Vy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Yx(this,this._t0,DL(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Yx(this,DL(this,n=IL(this,e,t)),n);break;default:Yx(this,this._t0,n=IL(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function iB(e){this._context=new oB(e)}(iB.prototype=Object.create(Vy.prototype)).point=function(e,t){Vy.prototype.point.call(this,t,e)};function oB(e){this._context=e}oB.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function Axe(e){return new Vy(e)}function kxe(e){return new iB(e)}function aB(e){this._context=e}aB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=$L(e),i=$L(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Rxe(e){return new Ub(e,.5)}function Lxe(e){return new Ub(e,0)}function Mxe(e){return new Ub(e,1)}function Tc(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function Ixe(e,t){return e[t]}function Dxe(e){const t=[];return t.key=e,t}function $xe(){var e=Pt([]),t=VS,n=Tc,r=Ixe;function i(o){var a=Array.from(e.apply(this,arguments),Dxe),s,l=a.length,u=-1,f;for(const d of o)for(s=0,++u;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qxe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var sB={symbolCircle:qC,symbolCross:pxe,symbolDiamond:vxe,symbolSquare:gxe,symbolStar:xxe,symbolTriangle:wxe,symbolWye:Sxe},Kxe=Math.PI/180,Yxe=function(e){var t="symbol".concat(Db(e));return sB[t]||qC},Zxe=function(e,t,n){if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*Kxe;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.pow(Math.tan(r),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Xxe=function(e,t){sB["symbol".concat(Db(e))]=t},Bb=function(e){var t=e.type,n=t===void 0?"circle":t,r=e.size,i=r===void 0?64:r,o=e.sizeType,a=o===void 0?"area":o,s=Gxe(e,zxe),l=UL(UL({},s),{},{type:n,size:i,sizeType:a}),u=function(){var g=Yxe(n),y=Exe().type(g).size(Zxe(i,a,n));return y()},f=l.className,d=l.cx,p=l.cy,v=$e(l,!0);return d===+d&&p===+p&&i===+i?V.createElement("path",HS({},v,{className:De("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(p,")"),d:u()})):null};Bb.registerSymbol=Xxe;function Cc(e){"@babel/helpers - typeof";return Cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(e)}function WS(){return WS=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=p.inactive?l:p.color;return V.createElement("li",WS({className:y,style:f,key:"legend-item-".concat(v)},ds(n.props,p,v)),V.createElement(IS,{width:o,height:o,viewBox:u,style:d},n.renderIcon(p)),V.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},g?g(w,p,v):w))})}},{key:"render",value:function(){var n=this.props,r=n.payload,i=n.layout,o=n.align;if(!r||!r.length)return null;var a={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return V.createElement("ul",{className:"recharts-default-legend",style:a},this.renderItems())}}]),t}(R.PureComponent);Hh(KC,"displayName","Legend");Hh(KC,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var awe=Lb;function swe(){this.__data__=new awe,this.size=0}var lwe=swe;function uwe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var cwe=uwe;function fwe(e){return this.__data__.get(e)}var dwe=fwe;function hwe(e){return this.__data__.has(e)}var pwe=hwe,mwe=Lb,vwe=$C,gwe=FC,ywe=200;function bwe(e,t){var n=this.__data__;if(n instanceof mwe){var r=n.__data__;if(!vwe||r.lengths))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var d=-1,p=!0,v=n&Bwe?new Dwe:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=W2e}var QC=G2e,q2e=ha,K2e=QC,Y2e=pa,Z2e="[object Arguments]",X2e="[object Array]",Q2e="[object Boolean]",J2e="[object Date]",eOe="[object Error]",tOe="[object Function]",nOe="[object Map]",rOe="[object Number]",iOe="[object Object]",oOe="[object RegExp]",aOe="[object Set]",sOe="[object String]",lOe="[object WeakMap]",uOe="[object ArrayBuffer]",cOe="[object DataView]",fOe="[object Float32Array]",dOe="[object Float64Array]",hOe="[object Int8Array]",pOe="[object Int16Array]",mOe="[object Int32Array]",vOe="[object Uint8Array]",gOe="[object Uint8ClampedArray]",yOe="[object Uint16Array]",bOe="[object Uint32Array]",Ct={};Ct[fOe]=Ct[dOe]=Ct[hOe]=Ct[pOe]=Ct[mOe]=Ct[vOe]=Ct[gOe]=Ct[yOe]=Ct[bOe]=!0;Ct[Z2e]=Ct[X2e]=Ct[uOe]=Ct[Q2e]=Ct[cOe]=Ct[J2e]=Ct[eOe]=Ct[tOe]=Ct[nOe]=Ct[rOe]=Ct[iOe]=Ct[oOe]=Ct[aOe]=Ct[sOe]=Ct[lOe]=!1;function _Oe(e){return Y2e(e)&&K2e(e.length)&&!!Ct[q2e(e)]}var xOe=_Oe;function wOe(e){return function(t){return e(t)}}var yB=wOe,qy={exports:{}};qy.exports;(function(e,t){var n=j9,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(qy,qy.exports);var OOe=qy.exports,SOe=xOe,EOe=yB,KL=OOe,YL=KL&&KL.isTypedArray,jOe=YL?EOe(YL):SOe,bB=jOe,TOe=A2e,COe=ZC,POe=Pr,AOe=gB,kOe=XC,NOe=bB,ROe=Object.prototype,LOe=ROe.hasOwnProperty;function MOe(e,t){var n=POe(e),r=!n&&COe(e),i=!n&&!r&&AOe(e),o=!n&&!r&&!i&&NOe(e),a=n||r||i||o,s=a?TOe(e.length,String):[],l=s.length;for(var u in e)(t||LOe.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||kOe(u,l)))&&s.push(u);return s}var IOe=MOe,DOe=Object.prototype;function $Oe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||DOe;return e===n}var FOe=$Oe;function UOe(e,t){return function(n){return e(t(n))}}var _B=UOe,BOe=_B,zOe=BOe(Object.keys,Object),VOe=zOe,HOe=FOe,WOe=VOe,GOe=Object.prototype,qOe=GOe.hasOwnProperty;function KOe(e){if(!HOe(e))return WOe(e);var t=[];for(var n in Object(e))qOe.call(e,n)&&n!="constructor"&&t.push(n);return t}var YOe=KOe,ZOe=IC,XOe=QC;function QOe(e){return e!=null&&XOe(e.length)&&!ZOe(e)}var im=QOe,JOe=IOe,eSe=YOe,tSe=im;function nSe(e){return tSe(e)?JOe(e):eSe(e)}var zb=nSe,rSe=y2e,iSe=C2e,oSe=zb;function aSe(e){return rSe(e,oSe,iSe)}var sSe=aSe,ZL=sSe,lSe=1,uSe=Object.prototype,cSe=uSe.hasOwnProperty;function fSe(e,t,n,r,i,o){var a=n&lSe,s=ZL(e),l=s.length,u=ZL(t),f=u.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var p=s[d];if(!(a?p in t:cSe.call(t,p)))return!1}var v=o.get(e),g=o.get(t);if(v&&g)return v==t&&g==e;var y=!0;o.set(e,t),o.set(t,e);for(var w=a;++d-1}var uje=lje;function cje(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=Eje){var u=t?null:Oje(e);if(u)return Sje(u);a=!1,i=wje,l=new bje}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Uje(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Bje(e){return e.value}function zje(e,t){if(V.isValidElement(e))return V.cloneElement(e,t);if(typeof e=="function")return V.createElement(e,t);t.ref;var n=Fje(t,Nje);return V.createElement(KC,n)}var dM=1,Wh=function(e){Dje(t,e);function t(){var n;Rje(this,t);for(var r=arguments.length,i=new Array(r),o=0;odM||Math.abs(r.height-this.lastBoundingBox.height)>dM)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height,n&&n(r)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Is({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var r=this.props,i=r.layout,o=r.align,a=r.verticalAlign,s=r.margin,l=r.chartWidth,u=r.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();f={left:((l||0)-p.width)/2}}else f=o==="right"?{right:s&&s.right||0}:{left:s&&s.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(a==="middle"){var v=this.getBBoxSnapshot();d={top:((u||0)-v.height)/2}}else d=a==="bottom"?{bottom:s&&s.bottom||0}:{top:s&&s.top||0};return Is(Is({},f),d)}},{key:"render",value:function(){var n=this,r=this.props,i=r.content,o=r.width,a=r.height,s=r.wrapperStyle,l=r.payloadUniqBy,u=r.payload,f=Is(Is({position:"absolute",width:o||"auto",height:a||"auto"},this.getDefaultPosition(s)),s);return V.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(d){n.wrapperNode=d}},zje(i,Is(Is({},this.props),{},{payload:TB(u,l,Bje)})))}}],[{key:"getWithHeight",value:function(n,r){var i=n.props.layout;return i==="vertical"&&Ee(n.props.height)?{height:n.props.height}:i==="horizontal"?{width:n.props.width||r}:null}}]),t}(R.PureComponent);Vb(Wh,"displayName","Legend");Vb(Wh,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var hM=nm,Vje=ZC,Hje=Pr,pM=hM?hM.isConcatSpreadable:void 0;function Wje(e){return Hje(e)||Vje(e)||!!(pM&&e&&e[pM])}var Gje=Wje,qje=mB,Kje=Gje;function kB(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=Kje),i||(i=[]);++o0&&n(s)?t>1?kB(s,t-1,n,r,i):qje(i,s):r||(i[i.length]=s)}return i}var NB=kB;function Yje(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(n(o[l],l,o)===!1)break}return t}}var Zje=Yje,Xje=Zje,Qje=Xje(),Jje=Qje,eTe=Jje,tTe=zb;function nTe(e,t){return e&&eTe(e,t,tTe)}var RB=nTe,rTe=im;function iTe(e,t){return function(n,r){if(n==null)return n;if(!rTe(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var yTe=gTe,Jx=BC,bTe=zC,_Te=Ao,xTe=LB,wTe=hTe,OTe=yB,STe=yTe,ETe=yf,jTe=Pr;function TTe(e,t,n){t.length?t=Jx(t,function(o){return jTe(o)?function(a){return bTe(a,o.length===1?o[0]:o)}:o}):t=[ETe];var r=-1;t=Jx(t,OTe(_Te));var i=xTe(e,function(o,a,s){var l=Jx(t,function(u){return u(o)});return{criteria:l,index:++r,value:o}});return wTe(i,function(o,a){return STe(o,a,n)})}var CTe=TTe;function PTe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var ATe=PTe,kTe=ATe,vM=Math.max;function NTe(e,t,n){return t=vM(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=vM(r.length-t,0),a=Array(o);++i0){if(++t>=zTe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var GTe=WTe,qTe=BTe,KTe=GTe,YTe=KTe(qTe),ZTe=YTe,XTe=yf,QTe=RTe,JTe=ZTe;function eCe(e,t){return JTe(QTe(e,t,XTe),e+"")}var tCe=eCe,nCe=DC,rCe=im,iCe=XC,oCe=Os;function aCe(e,t,n){if(!oCe(n))return!1;var r=typeof t;return(r=="number"?rCe(n)&&iCe(t,n.length):r=="string"&&t in n)?nCe(n[t],e):!1}var Hb=aCe,sCe=NB,lCe=CTe,uCe=tCe,yM=Hb,cCe=uCe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&yM(e,t[0],t[1])?t=[]:n>2&&yM(t[0],t[1],t[2])&&(t=[t[0]]),lCe(e,sCe(t,1),[])}),fCe=cCe;const tP=yt(fCe);function Gh(e){"@babel/helpers - typeof";return Gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(e)}function JS(){return JS=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(od,"-left"),Ee(n)&&t&&Ee(t.x)&&n=t.y),"".concat(od,"-top"),Ee(r)&&t&&Ee(t.y)&&ry?Math.max(f,l[r]):Math.max(d,l[r])}function jCe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function TCe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,d;return a.height>0&&a.width>0&&n?(f=xM({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=xM({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),u=jCe({translateX:f,translateY:d,useTranslate3d:s})):u=SCe,{cssProperties:u,cssClasses:ECe({translateX:f,translateY:d,coordinate:n})}}function Ac(e){"@babel/helpers - typeof";return Ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ac(e)}function wM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function OM(e){for(var t=1;tEM||Math.abs(n.height-this.lastBoundingBox.height)>EM)&&(this.lastBoundingBox.width=n.width,this.lastBoundingBox.height=n.height)}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,r=this.props,i=r.active,o=r.allowEscapeViewBox,a=r.animationDuration,s=r.animationEasing,l=r.children,u=r.coordinate,f=r.hasPayload,d=r.isAnimationActive,p=r.offset,v=r.position,g=r.reverseDirection,y=r.useTranslate3d,w=r.viewBox,b=r.wrapperStyle,x=TCe({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:p,position:v,reverseDirection:g,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:y,viewBox:w}),_=x.cssClasses,S=x.cssProperties,j=OM(OM({transition:d&&i?"transform ".concat(a,"ms ").concat(s):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return V.createElement("div",{tabIndex:-1,className:_,style:j,ref:function(E){n.wrapperNode=E}},l)}}]),t}(R.PureComponent),MCe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},pi={isSsr:MCe(),get:function(e){return pi[e]},set:function(e,t){if(typeof e=="string")pi[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(r){pi[r]=e[r]})}}};function kc(e){"@babel/helpers - typeof";return kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kc(e)}function jM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function TM(e){for(var t=1;t0;return V.createElement(LCe,{allowEscapeViewBox:o,animationDuration:a,animationEasing:s,isAnimationActive:d,active:i,coordinate:u,hasPayload:j,offset:p,position:y,reverseDirection:w,useTranslate3d:b,viewBox:x,wrapperStyle:_},HCe(l,TM(TM({},this.props),{},{payload:S})))}}]),t}(R.PureComponent);nP(ni,"displayName","Tooltip");nP(ni,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!pi.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var WCe=Po,GCe=function(){return WCe.Date.now()},qCe=GCe,KCe=/\s/;function YCe(e){for(var t=e.length;t--&&KCe.test(e.charAt(t)););return t}var ZCe=YCe,XCe=ZCe,QCe=/^\s+/;function JCe(e){return e&&e.slice(0,XCe(e)+1).replace(QCe,"")}var ePe=JCe,tPe=ePe,PM=Os,nPe=cf,AM=NaN,rPe=/^[-+]0x[0-9a-f]+$/i,iPe=/^0b[01]+$/i,oPe=/^0o[0-7]+$/i,aPe=parseInt;function sPe(e){if(typeof e=="number")return e;if(nPe(e))return AM;if(PM(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=PM(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=tPe(e);var n=iPe.test(e);return n||oPe.test(e)?aPe(e.slice(2),n?2:8):rPe.test(e)?AM:+e}var UB=sPe,lPe=Os,tw=qCe,kM=UB,uPe="Expected a function",cPe=Math.max,fPe=Math.min;function dPe(e,t,n){var r,i,o,a,s,l,u=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(uPe);t=kM(t)||0,lPe(n)&&(f=!!n.leading,d="maxWait"in n,o=d?cPe(kM(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p);function v(E){var C=r,N=i;return r=i=void 0,u=E,a=e.apply(N,C),a}function g(E){return u=E,s=setTimeout(b,t),f?v(E):a}function y(E){var C=E-l,N=E-u,I=t-C;return d?fPe(I,o-N):I}function w(E){var C=E-l,N=E-u;return l===void 0||C>=t||C<0||d&&N>=o}function b(){var E=tw();if(w(E))return x(E);s=setTimeout(b,y(E))}function x(E){return s=void 0,p&&r?v(E):(r=i=void 0,a)}function _(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function S(){return s===void 0?a:x(tw())}function j(){var E=tw(),C=w(E);if(r=arguments,i=this,l=E,C){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(b,t),v(l)}return s===void 0&&(s=setTimeout(b,t)),a}return j.cancel=_,j.flush=S,j}var hPe=dPe,pPe=hPe,mPe=Os,vPe="Expected a function";function gPe(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(vPe);return mPe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),pPe(e,t,{leading:r,maxWait:t,trailing:i})}var yPe=gPe;const BB=yt(yPe);function Kh(e){"@babel/helpers - typeof";return Kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kh(e)}function NM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sv(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(q=BB(q,y,{trailing:!0,leading:!1}));var W=new ResizeObserver(q),X=j.current.getBoundingClientRect(),J=X.width,te=X.height;return D(J,te),W.observe(j.current),function(){W.disconnect()}},[D,y]);var z=R.useMemo(function(){var q=I.containerWidth,W=I.containerHeight;if(q<0||W<0)return null;Bi(al(a)||al(l),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,a,l),Bi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var X=al(a)?q:a,J=al(l)?W:l;n&&n>0&&(X?J=X/n:J&&(X=J*n),p&&J>p&&(J=p)),Bi(X>0||J>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the height and width.`,X,J,a,l,f,d,n);var te=!Array.isArray(v)&&kS.isElement(v)&&Wo(v.type).endsWith("Chart");return V.Children.map(v,function(Z){return kS.isElement(Z)?R.cloneElement(Z,Sv({width:X,height:J},te?{style:Sv({height:"100%",width:"100%",maxHeight:J,maxWidth:X},Z.props.style)}:{})):Z})},[n,v,l,p,d,f,I,a]);return V.createElement("div",{id:w?"".concat(w):void 0,className:De("recharts-responsive-container",b),style:Sv(Sv({},S),{},{width:a,height:l,minWidth:f,minHeight:d,maxHeight:p}),ref:j},z)}),Ja=function(e){return null};Ja.displayName="Cell";function Yh(e){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yh(e)}function LM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nE(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||pi.isSsr)return{width:0,height:0};var n=NPe(t),r=JSON.stringify({text:e,copyStyle:n});if(mu.widthCache[r])return mu.widthCache[r];try{var i=document.getElementById(MM);i||(i=document.createElement("span"),i.setAttribute("id",MM),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=nE(nE({},kPe),n);Object.assign(i.style,o),i.textContent="".concat(e);var a=i.getBoundingClientRect(),s={width:a.width,height:a.height};return mu.widthCache[r]=s,++mu.cacheCount>APe&&(mu.cacheCount=0,mu.widthCache={}),s}catch{return{width:0,height:0}}},RPe=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function Zh(e){"@babel/helpers - typeof";return Zh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zh(e)}function Xy(e,t){return DPe(e)||IPe(e,t)||MPe(e,t)||LPe()}function LPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MPe(e,t){if(e){if(typeof e=="string")return IM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IM(e,t)}}function IM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function zM(e,t){return tAe(e)||eAe(e,t)||JPe(e,t)||QPe()}function QPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JPe(e,t){if(e){if(typeof e=="string")return VM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VM(e,t)}}function VM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return q.reduce(function(W,X){var J=X.word,te=X.width,Z=W[W.length-1];if(Z&&(r==null||i||Z.width+te+nX.width?W:X})};if(!u)return p;for(var g="…",y=function(q){var W=f.slice(0,q),X=WB({breakAll:l,style:s,children:W+g}).wordsWithComputedWidth,J=d(X),te=J.length>o||v(J).width>Number(r);return[te,J]},w=0,b=f.length-1,x=0,_;w<=b&&x<=f.length-1;){var S=Math.floor((w+b)/2),j=S-1,E=y(j),C=zM(E,2),N=C[0],I=C[1],M=y(S),D=zM(M,1),z=D[0];if(!N&&!z&&(w=S+1),N&&z&&(b=S-1),!N&&z){_=I;break}x++}return _||p},HM=function(e){var t=ze(e)?[]:e.toString().split(HB);return[{words:t}]},rAe=function(e){var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,o=e.breakAll,a=e.maxLines;if((t||n)&&!pi.isSsr){var s,l,u=WB({breakAll:o,children:r,style:i});if(u){var f=u.wordsWithComputedWidth,d=u.spaceWidth;s=f,l=d}else return HM(r);return nAe({breakAll:o,children:r,maxLines:a,style:i},s,l,t,n)}return HM(r)},WM="#808080",Ll=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,o=e.lineHeight,a=o===void 0?"1em":o,s=e.capHeight,l=s===void 0?"0.71em":s,u=e.scaleToFit,f=u===void 0?!1:u,d=e.textAnchor,p=d===void 0?"start":d,v=e.verticalAnchor,g=v===void 0?"end":v,y=e.fill,w=y===void 0?WM:y,b=BM(e,YPe),x=R.useMemo(function(){return rAe({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),_=b.dx,S=b.dy,j=b.angle,E=b.className,C=b.breakAll,N=BM(b,ZPe);if(!mn(n)||!mn(i))return null;var I=n+(Ee(_)?_:0),M=i+(Ee(S)?S:0),D;switch(g){case"start":D=nw("calc(".concat(l,")"));break;case"middle":D=nw("calc(".concat((x.length-1)/2," * -").concat(a," + (").concat(l," / 2))"));break;default:D=nw("calc(".concat(x.length-1," * -").concat(a,")"));break}var z=[];if(f){var q=x[0].width,W=b.width;z.push("scale(".concat((Ee(W)?W/q:1)/q,")"))}return j&&z.push("rotate(".concat(j,", ").concat(I,", ").concat(M,")")),z.length&&(N.transform=z.join(" ")),V.createElement("text",rE({},$e(N,!0),{x:I,y:M,className:De("recharts-text",E),textAnchor:p,fill:w.includes("url")?WM:w}),x.map(function(X,J){var te=X.words.join(C?"":" ");return V.createElement("tspan",{x:I,dy:J===0?D:a,key:te},te)}))};function es(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function iAe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function iP(e){let t,n,r;e.length!==2?(t=es,n=(s,l)=>es(e(s),l),r=(s,l)=>e(s)-l):(t=e===es||e===iAe?e:oAe,n=e,r=e);function i(s,l,u=0,f=s.length){if(u>>1;n(s[d],l)<0?u=d+1:f=d}while(u>>1;n(s[d],l)<=0?u=d+1:f=d}while(uu&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function oAe(){return 0}function GB(e){return e===null?NaN:+e}function*aAe(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const sAe=iP(es),om=sAe.right;iP(GB).center;class GM extends Map{constructor(t,n=cAe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(qM(this,t))}has(t){return super.has(qM(this,t))}set(t,n){return super.set(lAe(this,t),n)}delete(t){return super.delete(uAe(this,t))}}function qM({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function lAe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function uAe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function cAe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function fAe(e=es){if(e===es)return qB;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function qB(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const dAe=Math.sqrt(50),hAe=Math.sqrt(10),pAe=Math.sqrt(2);function Qy(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=dAe?10:o>=hAe?5:o>=pAe?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function YM(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function KB(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?qB:fAe(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(l-d)/l)*(u-l/2<0?-1:1),v=Math.max(n,Math.floor(t-u*d/l+p)),g=Math.min(r,Math.floor(t+(l-u)*d/l+p));KB(e,t,v,g,i)}const o=e[t];let a=n,s=r;for(ad(e,n,t),i(e[r],o)>0&&ad(e,n,r);a0;)--s}i(e[n],o)===0?ad(e,n,s):(++s,ad(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function ad(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function mAe(e,t,n){if(e=Float64Array.from(aAe(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return YM(e);if(t>=1)return KM(e);var r,i=(r-1)*t,o=Math.floor(i),a=KM(KB(e,o).subarray(0,o+1)),s=YM(e.subarray(o+1));return a+(s-a)*(i-o)}}function vAe(e,t,n=GB){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function gAe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?jv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?jv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=bAe.exec(e))?new br(t[1],t[2],t[3],1):(t=_Ae.exec(e))?new br(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=xAe.exec(e))?jv(t[1],t[2],t[3],t[4]):(t=wAe.exec(e))?jv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=OAe.exec(e))?n4(t[1],t[2]/100,t[3]/100,1):(t=SAe.exec(e))?n4(t[1],t[2]/100,t[3]/100,t[4]):ZM.hasOwnProperty(e)?JM(ZM[e]):e==="transparent"?new br(NaN,NaN,NaN,0):null}function JM(e){return new br(e>>16&255,e>>8&255,e&255,1)}function jv(e,t,n,r){return r<=0&&(e=t=n=NaN),new br(e,t,n,r)}function TAe(e){return e instanceof am||(e=ep(e)),e?(e=e.rgb(),new br(e.r,e.g,e.b,e.opacity)):new br}function lE(e,t,n,r){return arguments.length===1?TAe(e):new br(e,t,n,r??1)}function br(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}aP(br,lE,ZB(am,{brighter(e){return e=e==null?Jy:Math.pow(Jy,e),new br(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Qh:Math.pow(Qh,e),new br(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new br(yl(this.r),yl(this.g),yl(this.b),e0(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:e4,formatHex:e4,formatHex8:CAe,formatRgb:t4,toString:t4}));function e4(){return`#${sl(this.r)}${sl(this.g)}${sl(this.b)}`}function CAe(){return`#${sl(this.r)}${sl(this.g)}${sl(this.b)}${sl((isNaN(this.opacity)?1:this.opacity)*255)}`}function t4(){const e=e0(this.opacity);return`${e===1?"rgb(":"rgba("}${yl(this.r)}, ${yl(this.g)}, ${yl(this.b)}${e===1?")":`, ${e})`}`}function e0(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function yl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sl(e){return e=yl(e),(e<16?"0":"")+e.toString(16)}function n4(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ii(e,t,n,r)}function XB(e){if(e instanceof Ii)return new Ii(e.h,e.s,e.l,e.opacity);if(e instanceof am||(e=ep(e)),!e)return new Ii;if(e instanceof Ii)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&l<1?0:a,new Ii(a,s,l,e.opacity)}function PAe(e,t,n,r){return arguments.length===1?XB(e):new Ii(e,t,n,r??1)}function Ii(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}aP(Ii,PAe,ZB(am,{brighter(e){return e=e==null?Jy:Math.pow(Jy,e),new Ii(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Qh:Math.pow(Qh,e),new Ii(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new br(rw(e>=240?e-240:e+120,i,r),rw(e,i,r),rw(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ii(r4(this.h),Tv(this.s),Tv(this.l),e0(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=e0(this.opacity);return`${e===1?"hsl(":"hsla("}${r4(this.h)}, ${Tv(this.s)*100}%, ${Tv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function r4(e){return e=(e||0)%360,e<0?e+360:e}function Tv(e){return Math.max(0,Math.min(1,e||0))}function rw(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const sP=e=>()=>e;function AAe(e,t){return function(n){return e+n*t}}function kAe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function NAe(e){return(e=+e)==1?QB:function(t,n){return n-t?kAe(t,n,e):sP(isNaN(t)?n:t)}}function QB(e,t){var n=t-e;return n?AAe(e,n):sP(isNaN(e)?t:e)}const i4=function e(t){var n=NAe(t);function r(i,o){var a=n((i=lE(i)).r,(o=lE(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=QB(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return r.gamma=e,r}(1);function RAe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:t0(r,i)})),n=iw.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function HAe(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?WAe:HAe,l=u=null,d}function d(p){return p==null||isNaN(p=+p)?o:(l||(l=s(e.map(r),t,n)))(r(a(p)))}return d.invert=function(p){return a(i((u||(u=s(t,e.map(r),t0)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,n0),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=lP,f()},d.clamp=function(p){return arguments.length?(a=p?!0:sr,f()):a!==sr},d.interpolate=function(p){return arguments.length?(n=p,f()):n},d.unknown=function(p){return arguments.length?(o=p,d):o},function(p,v){return r=p,i=v,f()}}function uP(){return Wb()(sr,sr)}function GAe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function r0(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Nc(e){return e=r0(Math.abs(e)),e?e[1]:NaN}function qAe(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function KAe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var YAe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tp(e){if(!(t=YAe.exec(e)))throw new Error("invalid format: "+e);var t;return new cP({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}tp.prototype=cP.prototype;function cP(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}cP.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ZAe(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var JB;function XAe(e,t){var n=r0(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(JB=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+r0(e,Math.max(0,t+o-1))[0]}function a4(e,t){var n=r0(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const s4={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:GAe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>a4(e*100,t),r:a4,s:XAe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function l4(e){return e}var u4=Array.prototype.map,c4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function QAe(e){var t=e.grouping===void 0||e.thousands===void 0?l4:qAe(u4.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?l4:KAe(u4.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=tp(d);var p=d.fill,v=d.align,g=d.sign,y=d.symbol,w=d.zero,b=d.width,x=d.comma,_=d.precision,S=d.trim,j=d.type;j==="n"?(x=!0,j="g"):s4[j]||(_===void 0&&(_=12),S=!0,j="g"),(w||p==="0"&&v==="=")&&(w=!0,p="0",v="=");var E=y==="$"?n:y==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():"",C=y==="$"?r:/[%p]/.test(j)?a:"",N=s4[j],I=/[defgprs%]/.test(j);_=_===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function M(D){var z=E,q=C,W,X,J;if(j==="c")q=N(D)+q,D="";else{D=+D;var te=D<0||1/D<0;if(D=isNaN(D)?l:N(Math.abs(D),_),S&&(D=ZAe(D)),te&&+D==0&&g!=="+"&&(te=!1),z=(te?g==="("?g:s:g==="-"||g==="("?"":g)+z,q=(j==="s"?c4[8+JB/3]:"")+q+(te&&g==="("?")":""),I){for(W=-1,X=D.length;++WJ||J>57){q=(J===46?i+D.slice(W+1):D.slice(W))+q,D=D.slice(0,W);break}}}x&&!w&&(D=t(D,1/0));var Z=z.length+D.length+q.length,B=Z>1)+z+D+q+B.slice(Z);break;default:D=B+z+D+q;break}return o(D)}return M.toString=function(){return d+""},M}function f(d,p){var v=u((d=tp(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Nc(p)/3)))*3,y=Math.pow(10,-g),w=c4[8+g/3];return function(b){return v(y*b)+w}}return{format:u,formatPrefix:f}}var Cv,fP,e1;JAe({thousands:",",grouping:[3],currency:["$",""]});function JAe(e){return Cv=QAe(e),fP=Cv.format,e1=Cv.formatPrefix,Cv}function eke(e){return Math.max(0,-Nc(Math.abs(e)))}function tke(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Nc(t)/3)))*3-Nc(Math.abs(e)))}function nke(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Nc(t)-Nc(e))+1}function t1(e,t,n,r){var i=aE(e,t,n),o;switch(r=tp(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=tke(i,a))&&(r.precision=o),e1(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=nke(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=eke(i))&&(r.precision=o-(r.type==="%")*2);break}}return fP(r)}function Es(e){var t=e.domain;return e.ticks=function(n){var r=t();return iE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return t1(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,f=10;for(s0;){if(u=oE(a,s,n),u===l)return r[i]=a,r[o]=s,t(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function i0(){var e=uP();return e.copy=function(){return sm(e,i0())},Oi.apply(e,arguments),Es(e)}function n1(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,n0),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return n1(e).unknown(t)},e=arguments.length?Array.from(e,n0):[0,1],Es(n)}function r1(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function ske(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function h4(e){return(t,n)=>-e(-t,n)}function dP(e){const t=e(f4,d4),n=t.domain;let r=10,i,o;function a(){return i=ske(r),o=ake(r),n()[0]<0?(i=h4(i),o=h4(o),e(rke,ike)):e(f4,d4),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let u=l[0],f=l[l.length-1];const d=f0){for(;p<=v;++p)for(g=1;gf)break;b.push(y)}}else for(;p<=v;++p)for(g=r-1;g>=1;--g)if(y=p>0?g/o(-p):g*o(p),!(yf)break;b.push(y)}b.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=tp(l)).precision==null&&(l.trim=!0),l=fP(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*rn(r1(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function i1(){const e=dP(Wb()).domain([1,10]);return e.copy=()=>sm(e,i1()).base(e.base()),Oi.apply(e,arguments),e}function p4(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function m4(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function hP(e){var t=1,n=e(p4(t),m4(t));return n.constant=function(r){return arguments.length?e(p4(t=+r),m4(t)):t},Es(n)}function o1(){var e=hP(Wb());return e.copy=function(){return sm(e,o1()).constant(e.constant())},Oi.apply(e,arguments)}function v4(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function lke(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function uke(e){return e<0?-e*e:e*e}function pP(e){var t=e(sr,sr),n=1;function r(){return n===1?e(sr,sr):n===.5?e(lke,uke):e(v4(n),v4(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Es(t)}function mP(){var e=pP(Wb());return e.copy=function(){return sm(e,mP()).exponent(e.exponent())},Oi.apply(e,arguments),e}function cke(){return mP.apply(null,arguments).exponent(.5)}function g4(e){return Math.sign(e)*e*e}function fke(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function a1(){var e=uP(),t=[0,1],n=!1,r;function i(o){var a=fke(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(g4(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,n0)).map(g4)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return a1(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Oi.apply(i,arguments),Es(i)}function s1(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return l1().domain([e,t]).range(i).unknown(o)},Oi.apply(Es(a),arguments)}function u1(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[om(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return u1().domain(e).range(t).unknown(n)},Oi.apply(i,arguments)}const ow=new Date,aw=new Date;function bn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return l;let u;do l.push(u=new Date(+o)),t(o,s),e(o);while(ubn(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(ow.setTime(+o),aw.setTime(+a),e(ow),e(aw),Math.floor(n(ow,aw))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const o0=bn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);o0.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?bn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):o0);o0.range;const Bo=1e3,ui=Bo*60,zo=ui*60,ia=zo*24,vP=ia*7,y4=ia*30,sw=ia*365,ll=bn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Bo)},(e,t)=>(t-e)/Bo,e=>e.getUTCSeconds());ll.range;const gP=bn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bo)},(e,t)=>{e.setTime(+e+t*ui)},(e,t)=>(t-e)/ui,e=>e.getMinutes());gP.range;const yP=bn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ui)},(e,t)=>(t-e)/ui,e=>e.getUTCMinutes());yP.range;const bP=bn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bo-e.getMinutes()*ui)},(e,t)=>{e.setTime(+e+t*zo)},(e,t)=>(t-e)/zo,e=>e.getHours());bP.range;const _P=bn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*zo)},(e,t)=>(t-e)/zo,e=>e.getUTCHours());_P.range;const lm=bn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ui)/ia,e=>e.getDate()-1);lm.range;const Gb=bn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ia,e=>e.getUTCDate()-1);Gb.range;const c1=bn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ia,e=>Math.floor(e/ia));c1.range;function Hl(e){return bn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ui)/vP)}const qb=Hl(0),a0=Hl(1),dke=Hl(2),hke=Hl(3),Rc=Hl(4),pke=Hl(5),mke=Hl(6);qb.range;a0.range;dke.range;hke.range;Rc.range;pke.range;mke.range;function Wl(e){return bn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/vP)}const Kb=Wl(0),s0=Wl(1),vke=Wl(2),gke=Wl(3),Lc=Wl(4),yke=Wl(5),bke=Wl(6);Kb.range;s0.range;vke.range;gke.range;Lc.range;yke.range;bke.range;const xP=bn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());xP.range;const wP=bn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());wP.range;const oa=bn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());oa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:bn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});oa.range;const aa=bn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());aa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:bn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});aa.range;function f1(e,t,n,r,i,o){const a=[[ll,1,Bo],[ll,5,5*Bo],[ll,15,15*Bo],[ll,30,30*Bo],[o,1,ui],[o,5,5*ui],[o,15,15*ui],[o,30,30*ui],[i,1,zo],[i,3,3*zo],[i,6,6*zo],[i,12,12*zo],[r,1,ia],[r,2,2*ia],[n,1,vP],[t,1,y4],[t,3,3*y4],[e,1,sw]];function s(u,f,d){const p=fw).right(a,p);if(v===a.length)return e.every(aE(u/sw,f/sw,d));if(v===0)return o0.every(Math.max(aE(u,f,d),1));const[g,y]=a[p/a[v-1][2]53)return null;"w"in K||(K.w=1),"Z"in K?(he=uw(sd(K.y,0,1)),Se=he.getUTCDay(),he=Se>4||Se===0?s0.ceil(he):s0(he),he=Gb.offset(he,(K.V-1)*7),K.y=he.getUTCFullYear(),K.m=he.getUTCMonth(),K.d=he.getUTCDate()+(K.w+6)%7):(he=lw(sd(K.y,0,1)),Se=he.getDay(),he=Se>4||Se===0?a0.ceil(he):a0(he),he=lm.offset(he,(K.V-1)*7),K.y=he.getFullYear(),K.m=he.getMonth(),K.d=he.getDate()+(K.w+6)%7)}else("W"in K||"U"in K)&&("w"in K||(K.w="u"in K?K.u%7:"W"in K?1:0),Se="Z"in K?uw(sd(K.y,0,1)).getUTCDay():lw(sd(K.y,0,1)).getDay(),K.m=0,K.d="W"in K?(K.w+6)%7+K.W*7-(Se+5)%7:K.w+K.U*7-(Se+6)%7);return"Z"in K?(K.H+=K.Z/100|0,K.M+=K.Z%100,uw(K)):lw(K)}}function N(A,U,Q,K){for(var ie=0,he=U.length,Se=Q.length,se,pe;ie=Se)return-1;if(se=U.charCodeAt(ie++),se===37){if(se=U.charAt(ie++),pe=j[se in b4?U.charAt(ie++):se],!pe||(K=pe(A,Q,K))<0)return-1}else if(se!=Q.charCodeAt(K++))return-1}return K}function I(A,U,Q){var K=u.exec(U.slice(Q));return K?(A.p=f.get(K[0].toLowerCase()),Q+K[0].length):-1}function M(A,U,Q){var K=v.exec(U.slice(Q));return K?(A.w=g.get(K[0].toLowerCase()),Q+K[0].length):-1}function D(A,U,Q){var K=d.exec(U.slice(Q));return K?(A.w=p.get(K[0].toLowerCase()),Q+K[0].length):-1}function z(A,U,Q){var K=b.exec(U.slice(Q));return K?(A.m=x.get(K[0].toLowerCase()),Q+K[0].length):-1}function q(A,U,Q){var K=y.exec(U.slice(Q));return K?(A.m=w.get(K[0].toLowerCase()),Q+K[0].length):-1}function W(A,U,Q){return N(A,t,U,Q)}function X(A,U,Q){return N(A,n,U,Q)}function J(A,U,Q){return N(A,r,U,Q)}function te(A){return a[A.getDay()]}function Z(A){return o[A.getDay()]}function B(A){return l[A.getMonth()]}function F(A){return s[A.getMonth()]}function H(A){return i[+(A.getHours()>=12)]}function ne(A){return 1+~~(A.getMonth()/3)}function Y(A){return a[A.getUTCDay()]}function ee(A){return o[A.getUTCDay()]}function ae(A){return l[A.getUTCMonth()]}function oe(A){return s[A.getUTCMonth()]}function fe(A){return i[+(A.getUTCHours()>=12)]}function P(A){return 1+~~(A.getUTCMonth()/3)}return{format:function(A){var U=E(A+="",_);return U.toString=function(){return A},U},parse:function(A){var U=C(A+="",!1);return U.toString=function(){return A},U},utcFormat:function(A){var U=E(A+="",S);return U.toString=function(){return A},U},utcParse:function(A){var U=C(A+="",!0);return U.toString=function(){return A},U}}}var b4={"-":"",_:" ",0:"0"},kn=/^\s*\d+/,Eke=/^%/,jke=/[\\^$*+?|[\]().{}]/g;function ht(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function Cke(e,t,n){var r=kn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Pke(e,t,n){var r=kn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ake(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function kke(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Nke(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function _4(e,t,n){var r=kn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function x4(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Rke(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Lke(e,t,n){var r=kn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Mke(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function w4(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ike(e,t,n){var r=kn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function O4(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Dke(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function $ke(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Fke(e,t,n){var r=kn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Uke(e,t,n){var r=kn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Bke(e,t,n){var r=Eke.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function zke(e,t,n){var r=kn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Vke(e,t,n){var r=kn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function S4(e,t){return ht(e.getDate(),t,2)}function Hke(e,t){return ht(e.getHours(),t,2)}function Wke(e,t){return ht(e.getHours()%12||12,t,2)}function Gke(e,t){return ht(1+lm.count(oa(e),e),t,3)}function d1(e,t){return ht(e.getMilliseconds(),t,3)}function qke(e,t){return d1(e,t)+"000"}function Kke(e,t){return ht(e.getMonth()+1,t,2)}function Yke(e,t){return ht(e.getMinutes(),t,2)}function Zke(e,t){return ht(e.getSeconds(),t,2)}function Xke(e){var t=e.getDay();return t===0?7:t}function Qke(e,t){return ht(qb.count(oa(e)-1,e),t,2)}function h1(e){var t=e.getDay();return t>=4||t===0?Rc(e):Rc.ceil(e)}function Jke(e,t){return e=h1(e),ht(Rc.count(oa(e),e)+(oa(e).getDay()===4),t,2)}function e3e(e){return e.getDay()}function t3e(e,t){return ht(a0.count(oa(e)-1,e),t,2)}function n3e(e,t){return ht(e.getFullYear()%100,t,2)}function r3e(e,t){return e=h1(e),ht(e.getFullYear()%100,t,2)}function i3e(e,t){return ht(e.getFullYear()%1e4,t,4)}function o3e(e,t){var n=e.getDay();return e=n>=4||n===0?Rc(e):Rc.ceil(e),ht(e.getFullYear()%1e4,t,4)}function a3e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ht(t/60|0,"0",2)+ht(t%60,"0",2)}function E4(e,t){return ht(e.getUTCDate(),t,2)}function s3e(e,t){return ht(e.getUTCHours(),t,2)}function l3e(e,t){return ht(e.getUTCHours()%12||12,t,2)}function u3e(e,t){return ht(1+Gb.count(aa(e),e),t,3)}function p1(e,t){return ht(e.getUTCMilliseconds(),t,3)}function c3e(e,t){return p1(e,t)+"000"}function f3e(e,t){return ht(e.getUTCMonth()+1,t,2)}function d3e(e,t){return ht(e.getUTCMinutes(),t,2)}function h3e(e,t){return ht(e.getUTCSeconds(),t,2)}function p3e(e){var t=e.getUTCDay();return t===0?7:t}function m3e(e,t){return ht(Kb.count(aa(e)-1,e),t,2)}function m1(e){var t=e.getUTCDay();return t>=4||t===0?Lc(e):Lc.ceil(e)}function v3e(e,t){return e=m1(e),ht(Lc.count(aa(e),e)+(aa(e).getUTCDay()===4),t,2)}function g3e(e){return e.getUTCDay()}function y3e(e,t){return ht(s0.count(aa(e)-1,e),t,2)}function b3e(e,t){return ht(e.getUTCFullYear()%100,t,2)}function _3e(e,t){return e=m1(e),ht(e.getUTCFullYear()%100,t,2)}function x3e(e,t){return ht(e.getUTCFullYear()%1e4,t,4)}function w3e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Lc(e):Lc.ceil(e),ht(e.getUTCFullYear()%1e4,t,4)}function O3e(){return"+0000"}function j4(){return"%"}function T4(e){return+e}function C4(e){return Math.floor(+e/1e3)}var vu,v1,g1;S3e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function S3e(e){return vu=Ske(e),v1=vu.format,vu.parse,g1=vu.utcFormat,vu.utcParse,vu}function E3e(e){return new Date(e)}function j3e(e){return e instanceof Date?+e:+new Date(+e)}function OP(e,t,n,r,i,o,a,s,l,u){var f=uP(),d=f.invert,p=f.domain,v=u(".%L"),g=u(":%S"),y=u("%I:%M"),w=u("%I %p"),b=u("%a %d"),x=u("%b %d"),_=u("%B"),S=u("%Y");function j(E){return(l(E)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>mAe(e,o/r))},n.copy=function(){return x1(t).domain(e)},ma.apply(n,arguments)}function Zb(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,u=sr,f,d=!1,p;function v(y){return isNaN(y=+y)?p:(y=.5+((y=+f(y))-o)*(r*yt}var E1=R3e,L3e=Xb,M3e=E1,I3e=yf;function D3e(e){return e&&e.length?L3e(e,I3e,M3e):void 0}var $3e=D3e;const Ua=yt($3e);function F3e(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};Ie.decimalPlaces=Ie.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*At;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Ie.dividedBy=Ie.div=function(e){return Go(this,new this.constructor(e))};Ie.dividedToIntegerBy=Ie.idiv=function(e){var t=this,n=t.constructor;return xt(Go(t,new n(e),0,1),n.precision)};Ie.equals=Ie.eq=function(e){return!this.cmp(e)};Ie.exponent=function(){return un(this)};Ie.greaterThan=Ie.gt=function(e){return this.cmp(e)>0};Ie.greaterThanOrEqualTo=Ie.gte=function(e){return this.cmp(e)>=0};Ie.isInteger=Ie.isint=function(){return this.e>this.d.length-2};Ie.isNegative=Ie.isneg=function(){return this.s<0};Ie.isPositive=Ie.ispos=function(){return this.s>0};Ie.isZero=function(){return this.s===0};Ie.lessThan=Ie.lt=function(e){return this.cmp(e)<0};Ie.lessThanOrEqualTo=Ie.lte=function(e){return this.cmp(e)<1};Ie.logarithm=Ie.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Mr))throw Error(bi+"NaN");if(n.s<1)throw Error(bi+(n.s?"NaN":"-Infinity"));return n.eq(Mr)?new r(0):(Dt=!1,t=Go(np(n,o),np(e,o),o),Dt=!0,xt(t,i))};Ie.minus=Ie.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?A1(t,e):C1(t,(e.s=-e.s,e))};Ie.modulo=Ie.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(bi+"NaN");return n.s?(Dt=!1,t=Go(n,e,0,1).times(e),Dt=!0,n.minus(t)):xt(new r(n),i)};Ie.naturalExponential=Ie.exp=function(){return P1(this)};Ie.naturalLogarithm=Ie.ln=function(){return np(this)};Ie.negated=Ie.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ie.plus=Ie.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?C1(t,e):A1(t,(e.s=-e.s,e))};Ie.precision=Ie.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(bl+e);if(t=un(i)+1,r=i.d.length-1,n=r*At+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Ie.squareRoot=Ie.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(bi+"NaN")}for(e=un(s),Dt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=fo(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=xf((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(Go(s,o,a+2)).times(.5),fo(o.d).slice(0,a)===(t=fo(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(xt(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return Dt=!0,xt(r,n)};Ie.times=Ie.mul=function(e){var t,n,r,i,o,a,s,l,u,f=this,d=f.constructor,p=f.d,v=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=p.length,u=v.length,l=0;){for(t=0,i=l+r;i>r;)s=o[i]+v[r]*p[i-r-1]+t,o[i--]=s%jn|0,t=s/jn|0;o[i]=(o[i]+t)%jn|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Dt?xt(e,d.precision):e};Ie.toDecimalPlaces=Ie.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(So(e,0,_f),t===void 0?t=r.rounding:So(t,0,8),xt(n,e+un(n)+1,t))};Ie.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Ml(r,!0):(So(e,0,_f),t===void 0?t=i.rounding:So(t,0,8),r=xt(new i(r),e+1,t),n=Ml(r,!0,e+1)),n};Ie.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Ml(i):(So(e,0,_f),t===void 0?t=o.rounding:So(t,0,8),r=xt(new o(i),e+un(i)+1,t),n=Ml(r.abs(),!1,e+un(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Ie.toInteger=Ie.toint=function(){var e=this,t=e.constructor;return xt(new t(e),un(e)+1,t.rounding)};Ie.toNumber=function(){return+this};Ie.toPower=Ie.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l(Mr);if(s=new l(s),!s.s){if(e.s<1)throw Error(bi+"Infinity");return s}if(s.eq(Mr))return s;if(r=l.precision,e.eq(Mr))return xt(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=f<0?-f:f)<=T1){for(i=new l(Mr),t=Math.ceil(r/At+4),Dt=!1;n%2&&(i=i.times(s),k4(i.d,t)),n=xf(n/2),n!==0;)s=s.times(s),k4(s.d,t);return Dt=!0,e.s<0?new l(Mr).div(i):xt(i,r)}}else if(o<0)throw Error(bi+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Dt=!1,i=e.times(np(s,r+u)),Dt=!0,i=P1(i),i.s=o,i};Ie.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=un(i),r=Ml(i,n<=o.toExpNeg||n>=o.toExpPos)):(So(e,1,_f),t===void 0?t=o.rounding:So(t,0,8),i=xt(new o(i),e,t),n=un(i),r=Ml(i,e<=n||n<=o.toExpNeg,e)),r};Ie.toSignificantDigits=Ie.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(So(e,1,_f),t===void 0?t=r.rounding:So(t,0,8)),xt(new r(n),e,t)};Ie.toString=Ie.valueOf=Ie.val=Ie.toJSON=Ie[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=un(e),n=e.constructor;return Ml(e,t<=n.toExpNeg||t>=n.toExpPos)};function C1(e,t){var n,r,i,o,a,s,l,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Dt?xt(t,d):t;if(l=e.d,u=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=u.length):(r=u,i=a,s=l.length),a=Math.ceil(d/At),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=u.length,s-o<0&&(o=s,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/jn|0,l[o]%=jn;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Dt?xt(t,d):t}function So(e,t,n){if(e!==~~e||en)throw Error(bl+e)}function fo(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var s,l,u,f,d,p,v,g,y,w,b,x,_,S,j,E,C,N,I=r.constructor,M=r.s==i.s?1:-1,D=r.d,z=i.d;if(!r.s)return new I(r);if(!i.s)throw Error(bi+"Division by zero");for(l=r.e-i.e,C=z.length,j=D.length,v=new I(M),g=v.d=[],u=0;z[u]==(D[u]||0);)++u;if(z[u]>(D[u]||0)&&--l,o==null?x=o=I.precision:a?x=o+(un(r)-un(i))+1:x=o,x<0)return new I(0);if(x=x/At+2|0,u=0,C==1)for(f=0,z=z[0],x++;(u1&&(z=e(z,f),D=e(D,f),C=z.length,j=D.length),S=C,y=D.slice(0,C),w=y.length;w=jn/2&&++E;do f=0,s=t(z,y,C,w),s<0?(b=y[0],C!=w&&(b=b*jn+(y[1]||0)),f=b/E|0,f>1?(f>=jn&&(f=jn-1),d=e(z,f),p=d.length,w=y.length,s=t(d,y,p,w),s==1&&(f--,n(d,C16)throw Error(jP+un(e));if(!e.s)return new f(Mr);for(t==null?(Dt=!1,s=d):s=t,a=new f(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(r=Math.log(Zs(2,u))/Math.LN10*2+5|0,s+=r,n=i=o=new f(Mr),f.precision=s;;){if(i=xt(i.times(e),s),n=n.times(++l),a=o.plus(Go(i,n,s)),fo(a.d).slice(0,s)===fo(o.d).slice(0,s)){for(;u--;)o=xt(o.times(o),s);return f.precision=d,t==null?(Dt=!0,xt(o,d)):o}o=a}}function un(e){for(var t=e.e*At,n=e.d[0];n>=10;n/=10)t++;return t}function cw(e,t,n){if(t>e.LN10.sd())throw Dt=!0,n&&(e.precision=n),Error(bi+"LN10 precision limit exceeded");return xt(new e(e.LN10),t)}function Aa(e){for(var t="";e--;)t+="0";return t}function np(e,t){var n,r,i,o,a,s,l,u,f,d=1,p=10,v=e,g=v.d,y=v.constructor,w=y.precision;if(v.s<1)throw Error(bi+(v.s?"NaN":"-Infinity"));if(v.eq(Mr))return new y(0);if(t==null?(Dt=!1,u=w):u=t,v.eq(10))return t==null&&(Dt=!0),cw(y,u);if(u+=p,y.precision=u,n=fo(g),r=n.charAt(0),o=un(v),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=fo(v.d),r=n.charAt(0),d++;o=un(v),r>1?(v=new y("0."+n),o++):v=new y(r+"."+n.slice(1))}else return l=cw(y,u+2,w).times(o+""),v=np(new y(r+"."+n.slice(1)),u-p).plus(l),y.precision=w,t==null?(Dt=!0,xt(v,w)):v;for(s=a=v=Go(v.minus(Mr),v.plus(Mr),u),f=xt(v.times(v),u),i=3;;){if(a=xt(a.times(f),u),l=s.plus(Go(a,new y(i),u)),fo(l.d).slice(0,u)===fo(s.d).slice(0,u))return s=s.times(2),o!==0&&(s=s.plus(cw(y,u+2,w).times(o+""))),s=Go(s,new y(d),u),y.precision=w,t==null?(Dt=!0,xt(s,w)):s;s=l,i+=2}}function A4(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=xf(n/At),e.d=[],r=(n+1)%At,n<0&&(r+=At),rl0||e.e<-l0))throw Error(jP+n)}else e.s=0,e.e=0,e.d=[0];return e}function xt(e,t,n){var r,i,o,a,s,l,u,f,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=At,i=t,u=d[f=0];else{if(f=Math.ceil((r+1)/At),o=d.length,f>=o)return e;for(u=o=d[f],a=1;o>=10;o/=10)a++;r%=At,i=r-At+a}if(n!==void 0&&(o=Zs(10,a-i-1),s=u/o%10|0,l=t<0||d[f+1]!==void 0||u%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?u/Zs(10,a-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=un(e),d.length=1,t=t-o-1,d[0]=Zs(10,(At-t%At)%At),e.e=xf(-t/At)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,o=1,f--):(d.length=f+1,o=Zs(10,At-r),d[f]=i>0?(u/Zs(10,a-i)%Zs(10,i)|0)*o:0),l)for(;;)if(f==0){(d[0]+=o)==jn&&(d[0]=1,++e.e);break}else{if(d[f]+=o,d[f]!=jn)break;d[f--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(Dt&&(e.e>l0||e.e<-l0))throw Error(jP+un(e));return e}function A1(e,t){var n,r,i,o,a,s,l,u,f,d,p=e.constructor,v=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Dt?xt(t,v):t;if(l=e.d,d=t.d,r=t.e,u=e.e,l=l.slice(),a=u-r,a){for(f=a<0,f?(n=l,a=-a,s=d.length):(n=d,r=u,s=l.length),i=Math.max(Math.ceil(v/At),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,f=i0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]0?o=o.charAt(0)+"."+o.slice(1)+Aa(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Aa(-i-1)+o,n&&(r=n-a)>0&&(o+=Aa(r))):i>=a?(o+=Aa(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Aa(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=Aa(r))),e.s<0?"-"+o:o}function k4(e,t){if(e.length>t)return e.length=t,!0}function k1(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(bl+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return A4(a,o.toString())}else if(typeof o!="string")throw Error(bl+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,aNe.test(o))A4(a,o);else throw Error(bl+o)}if(i.prototype=Ie,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=k1,i.config=i.set=sNe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(bl+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(bl+n+": "+r);return this}var TP=k1(oNe);Mr=new TP(1);const bt=TP;function lNe(e){return dNe(e)||fNe(e)||cNe(e)||uNe()}function uNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cNe(e,t){if(e){if(typeof e=="string")return fE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fE(e,t)}}function fNe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function dNe(e){if(Array.isArray(e))return fE(e)}function fE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,N4(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function TNe(e){if(Array.isArray(e))return e}function I1(e){var t=rp(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function D1(e,t,n){if(e.lte(0))return new bt(0);var r=e_.getDigitCount(e.toNumber()),i=new bt(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new bt(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?l:new bt(Math.ceil(l))}function CNe(e,t,n){var r=1,i=new bt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new bt(10).pow(e_.getDigitCount(e)-1),i=new bt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new bt(Math.floor(e)))}else e===0?i=new bt(Math.floor((t-1)/2)):n||(i=new bt(Math.floor(e)));var a=Math.floor((t-1)/2),s=vNe(mNe(function(l){return i.add(new bt(l-a).mul(r)).toNumber()}),dE);return s(0,t)}function $1(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new bt(0),tickMin:new bt(0),tickMax:new bt(0)};var o=D1(new bt(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new bt(0):(a=new bt(e).add(t).div(2),a=a.sub(new bt(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),l=Math.ceil(new bt(t).sub(a).div(o).toNumber()),u=s+l+1;return u>n?$1(e,t,n,r,i+1):(u0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:o,tickMin:a.sub(new bt(s).mul(o)),tickMax:a.add(new bt(l).mul(o))})}function PNe(e){var t=rp(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=I1([n,r]),l=rp(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(pE(dE(0,i-1).map(function(){return 1/0}))):[].concat(pE(dE(0,i-1).map(function(){return-1/0})),[f]);return n>r?hE(d):d}if(u===f)return CNe(u,i,o);var p=$1(u,f,a,o),v=p.step,g=p.tickMin,y=p.tickMax,w=e_.rangeStep(g,y.add(new bt(.1).mul(v)),v);return n>r?hE(w):w}function ANe(e,t){var n=rp(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=I1([r,i]),s=rp(a,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,i];if(l===u)return[l];var f=Math.max(t,2),d=D1(new bt(u).sub(l).div(f-1),o,0),p=[].concat(pE(e_.rangeStep(new bt(l),new bt(u).sub(new bt(.99).mul(d)),d)),[u]);return r>i?hE(p):p}var kNe=L1(PNe),NNe=L1(ANe),RNe="Invariant failed";function Il(e,t){if(!e)throw new Error(RNe)}var LNe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function u0(){return u0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BNe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function wf(e){var t=e.offset,n=e.layout,r=e.width,i=e.dataKey,o=e.data,a=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,u=UNe(e,LNe),f=$e(u,!1);e.direction==="x"&&s.type!=="number"&&Il(!1);var d=o.map(function(p){var v=a(p,i),g=v.x,y=v.y,w=v.value,b=v.errorVal;if(!b)return null;var x=[],_,S;if(Array.isArray(b)){var j=MNe(b,2);_=j[0],S=j[1]}else _=S=b;if(n==="vertical"){var E=s.scale,C=y+t,N=C+r,I=C-r,M=E(w-_),D=E(w+S);x.push({x1:D,y1:N,x2:D,y2:I}),x.push({x1:M,y1:C,x2:D,y2:C}),x.push({x1:M,y1:N,x2:M,y2:I})}else if(n==="horizontal"){var z=l.scale,q=g+t,W=q-r,X=q+r,J=z(w-_),te=z(w+S);x.push({x1:W,y1:te,x2:X,y2:te}),x.push({x1:q,y1:J,x2:q,y2:te}),x.push({x1:W,y1:J,x2:X,y2:J})}return V.createElement(Qe,u0({className:"recharts-errorBar",key:"bar-".concat(x.map(function(Z){return"".concat(Z.x1,"-").concat(Z.x2,"-").concat(Z.y1,"-").concat(Z.y2)}))},f),x.map(function(Z){return V.createElement("line",u0({},Z,{key:"line-".concat(Z.x1,"-").concat(Z.x2,"-").concat(Z.y1,"-").concat(Z.y2)}))}))});return V.createElement(Qe,{className:"recharts-errorBars"},d)}wf.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"};wf.displayName="ErrorBar";function ip(e){"@babel/helpers - typeof";return ip=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ip(e)}function L4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fw(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,a=(t=n==null?void 0:n.length)!==null&&t!==void 0?t:0;if(a<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var s=i.range,l=0;l0?r[l-1].coordinate:r[a-1].coordinate,f=r[l].coordinate,d=l>=a-1?r[0].coordinate:r[l+1].coordinate,p=void 0;if(ar(f-u)!==ar(d-f)){var v=[];if(ar(d-f)===ar(s[1]-s[0])){p=d;var g=f+s[1]-s[0];v[0]=Math.min(g,(g+u)/2),v[1]=Math.max(g,(g+u)/2)}else{p=u;var y=d+s[1]-s[0];v[0]=Math.min(f,(y+f)/2),v[1]=Math.max(f,(y+f)/2)}var w=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(e>w[0]&&e<=w[1]||e>=v[0]&&e<=v[1]){o=r[l].index;break}}else{var b=Math.min(u,d),x=Math.max(u,d);if(e>(b+f)/2&&e<=(x+f)/2){o=r[l].index;break}}}else for(var _=0;_0&&_(n[_].coordinate+n[_-1].coordinate)/2&&e<=(n[_].coordinate+n[_+1].coordinate)/2||_===a-1&&e>(n[_].coordinate+n[_-1].coordinate)/2){o=n[_].index;break}return o},CP=function(e){var t=e,n=t.type.displayName,r=e.props,i=r.stroke,o=r.fill,a;switch(n){case"Line":a=i;break;case"Area":case"Radar":a=i&&i!=="none"?i:o;break;default:a=o;break}return a},QNe=function(e){var t=e.barSize,n=e.stackGroups,r=n===void 0?{}:n;if(!r)return{};for(var i={},o=Object.keys(r),a=0,s=o.length;a=0});if(y&&y.length){var w=y[0].props.barSize,b=y[0].props[g];i[b]||(i[b]=[]),i[b].push({item:y[0],stackList:y.slice(1),barSize:ze(w)?t:w})}}return i},JNe=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,i=e.sizeList,o=i===void 0?[]:i,a=e.maxBarSize,s=o.length;if(s<1)return null;var l=yr(t,r,0,!0),u,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,p=r/s,v=o.reduce(function(_,S){return _+S.barSize||0},0);v+=(s-1)*l,v>=r&&(v-=(s-1)*l,l=0),v>=r&&p>0&&(d=!0,p*=.9,v=s*p);var g=(r-v)/2>>0,y={offset:g-l,size:0};u=o.reduce(function(_,S){var j={item:S.item,position:{offset:y.offset+y.size+l,size:d?p:S.barSize}},E=[].concat(I4(_),[j]);return y=E[E.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(C){E.push({item:C,position:y})}),E},f)}else{var w=yr(n,r,0,!0);r-2*w-(s-1)*l<=0&&(l=0);var b=(r-2*w-(s-1)*l)/s;b>1&&(b>>=0);var x=a===+a?Math.min(b,a):b;u=o.reduce(function(_,S,j){var E=[].concat(I4(_),[{item:S.item,position:{offset:w+(b+l)*j+(b-x)/2,size:x}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(C){E.push({item:C,position:E[E.length-1].position})}),E},f)}return u},eRe=function(e,t,n,r){var i=n.children,o=n.width,a=n.margin,s=o-(a.left||0)-(a.right||0),l=F1({children:i,legendWidth:s});if(l){var u=r||{},f=u.width,d=u.height,p=l.align,v=l.verticalAlign,g=l.layout;if((g==="vertical"||g==="horizontal"&&v==="middle")&&p!=="center"&&Ee(e[p]))return ai(ai({},e),{},rc({},p,e[p]+(f||0)));if((g==="horizontal"||g==="vertical"&&p==="center")&&v!=="middle"&&Ee(e[v]))return ai(ai({},e),{},rc({},v,e[v]+(d||0)))}return e},tRe=function(e,t,n){return ze(t)?!0:e==="horizontal"?t==="yAxis":e==="vertical"||n==="x"?t==="xAxis":n==="y"?t==="yAxis":!0},U1=function(e,t,n,r,i){var o=t.props.children,a=fr(o,wf).filter(function(l){return tRe(r,i,l.props.direction)});if(a&&a.length){var s=a.map(function(l){return l.props.dataKey});return e.reduce(function(l,u){var f=Nt(u,n);if(ze(f))return l;var d=Array.isArray(f)?[Qb(f),Ua(f)]:[f,f],p=s.reduce(function(v,g){var y=Nt(u,g,0),w=d[0]-Math.abs(Array.isArray(y)?y[0]:y),b=d[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(w,v[0]),Math.max(b,v[1])]},[1/0,-1/0]);return[Math.min(p[0],l[0]),Math.max(p[1],l[1])]},[1/0,-1/0])}return null},nRe=function(e,t,n,r,i){var o=t.map(function(a){return U1(e,a,n,i,r)}).filter(function(a){return!ze(a)});return o&&o.length?o.reduce(function(a,s){return[Math.min(a[0],s[0]),Math.max(a[1],s[1])]},[1/0,-1/0]):null},B1=function(e,t,n,r,i){var o=t.map(function(s){var l=s.props.dataKey;return n==="number"&&l&&U1(e,s,l,r)||dg(e,l,n,i)});if(n==="number")return o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]);var a={};return o.reduce(function(s,l){for(var u=0,f=l.length;u=2?ar(a[0]-a[1])*2*l:l,t&&(e.ticks||e.niceTicks)){var u=(e.ticks||e.niceTicks).map(function(f){var d=i?i.indexOf(f):f;return{coordinate:r(d)+l,value:f,offset:l}});return u.filter(function(f){return!mf(f.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(f,d){return{coordinate:r(f)+l,value:f,index:d,offset:l}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(f){return{coordinate:r(f)+l,value:f,offset:l}}):r.domain().map(function(f,d){return{coordinate:r(f)+l,value:i?i[f]:f,index:d,offset:l}})},dw=new WeakMap,Pv=function(e,t){if(typeof t!="function")return e;dw.has(e)||dw.set(e,new WeakMap);var n=dw.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},H1=function(e,t,n){var r=e.scale,i=e.type,o=e.layout,a=e.axisType;if(r==="auto")return o==="radial"&&a==="radiusAxis"?{scale:Xh(),realScaleType:"band"}:o==="radial"&&a==="angleAxis"?{scale:i0(),realScaleType:"linear"}:i==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!n)?{scale:Zd(),realScaleType:"point"}:i==="category"?{scale:Xh(),realScaleType:"band"}:{scale:i0(),realScaleType:"linear"};if(rm(r)){var s="scale".concat(Db(r));return{scale:(P4[s]||Zd)(),realScaleType:P4[s]?s:"point"}}return Ge(r)?{scale:r}:{scale:Zd(),realScaleType:"point"}},D4=1e-4,W1=function(e){var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-D4,o=Math.max(r[0],r[1])+D4,a=e(t[0]),s=e(t[n-1]);(ao||so)&&e.domain([t[0],t[n-1]])}},rRe=function(e,t){if(!e)return null;for(var n=0,r=e.length;nr)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]=0?(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1]):(e[a][n][0]=o,e[a][n][1]=o+s,o=e[a][n][1])}},aRe=function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n=0?(e[o][n][0]=i,e[o][n][1]=i+a,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},sRe={sign:oRe,expand:Fxe,none:Tc,silhouette:Uxe,wiggle:Bxe,positive:aRe},lRe=function(e,t,n){var r=t.map(function(a){return a.props.dataKey}),i=sRe[n],o=$xe().keys(r).value(function(a,s){return+Nt(a,s,0)}).order(VS).offset(i);return o(e)},uRe=function(e,t,n,r,i,o){if(!e)return null;var a=o?t.reverse():t,s={},l=a.reduce(function(f,d){var p=d.props,v=p.stackId,g=p.hide;if(g)return f;var y=d.props[n],w=f[y]||{hasStack:!1,stackGroups:{}};if(mn(v)){var b=w.stackGroups[v]||{numericAxisId:n,cateAxisId:r,items:[]};b.items.push(d),w.hasStack=!0,w.stackGroups[v]=b}else w.stackGroups[Ss("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[d]};return ai(ai({},f),{},rc({},y,w))},s),u={};return Object.keys(l).reduce(function(f,d){var p=l[d];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(g,y){var w=p.stackGroups[y];return ai(ai({},g),{},rc({},y,{numericAxisId:n,cateAxisId:r,items:w.items,stackedData:lRe(e,w.items,i)}))},v)}return ai(ai({},f),{},rc({},d,p))},u)},G1=function(e,t){var n=t.realScaleType,r=t.type,i=t.tickCount,o=t.originalDomain,a=t.allowDecimals,s=n||t.scale;if(s!=="auto"&&s!=="linear")return null;if(i&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var l=e.domain();if(!l.length)return null;var u=kNe(l,i,a);return e.domain([Qb(u),Ua(u)]),{niceTicks:u}}if(i&&r==="number"){var f=e.domain(),d=NNe(f,i,a);return{niceTicks:d}}return null};function Mc(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ze(i[t.dataKey])){var s=Dy(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=Nt(i,ze(a)?t.dataKey:a);return ze(l)?null:t.scale(l)}var $4=function(e){var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,o=e.entry,a=e.index;if(t.type==="category")return n[a]?n[a].coordinate+r:null;var s=Nt(o,t.dataKey,t.domain[a]);return ze(s)?null:t.scale(s)-i/2+r},cRe=function(e){var t=e.numericAxis,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},fRe=function(e,t){var n=e.props.stackId;if(mn(n)){var r=t[n];if(r){var i=r.items.indexOf(e);return i>=0?r.stackedData[i]:null}}return null},dRe=function(e){return e.reduce(function(t,n){return[Qb(n.concat([t[0]]).filter(Ee)),Ua(n.concat([t[1]]).filter(Ee))]},[1/0,-1/0])},q1=function(e,t,n){return Object.keys(e).reduce(function(r,i){var o=e[i],a=o.stackedData,s=a.reduce(function(l,u){var f=dRe(u.slice(t,n+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},F4=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,U4=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,gE=function(e,t,n){if(Ge(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(Ee(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(F4.test(e[0])){var i=+F4.exec(e[0])[1];r[0]=t[0]-i}else Ge(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(Ee(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(U4.test(e[1])){var o=+U4.exec(e[1])[1];r[1]=t[1]+o}else Ge(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},c0=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=tP(t,function(f){return f.coordinate}),o=1/0,a=1,s=i.length;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},xRe=function(e,t,n,r,i){var o=e.width,a=e.height,s=e.startAngle,l=e.endAngle,u=yr(e.cx,o,o/2),f=yr(e.cy,a,a/2),d=Z1(o,a,n),p=yr(e.innerRadius,d,0),v=yr(e.outerRadius,d,d*.8),g=Object.keys(t);return g.reduce(function(y,w){var b=t[w],x=b.domain,_=b.reversed,S;if(ze(b.range))r==="angleAxis"?S=[s,l]:r==="radiusAxis"&&(S=[p,v]),_&&(S=[S[1],S[0]]);else{S=b.range;var j=S,E=mRe(j,2);s=E[0],l=E[1]}var C=H1(b,i),N=C.realScaleType,I=C.scale;I.domain(x).range(S),W1(I);var M=G1(I,Do(Do({},b),{},{realScaleType:N})),D=Do(Do(Do({},b),M),{},{range:S,radius:v,realScaleType:N,scale:I,cx:u,cy:f,innerRadius:p,outerRadius:v,startAngle:s,endAngle:l});return Do(Do({},y),{},Y1({},w,D))},{})},wRe=function(e,t){var n=e.x,r=e.y,i=t.x,o=t.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(r-o,2))},ORe=function(e,t){var n=e.x,r=e.y,i=t.cx,o=t.cy,a=wRe({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:_Re(l),angleInRadian:l}},SRe=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-o*360,endAngle:n-o*360}},ERe=function(e,t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return e+a*360},H4=function(e,t){var n=e.x,r=e.y,i=ORe({x:n,y:r},t),o=i.radius,a=i.angle,s=t.innerRadius,l=t.outerRadius;if(ol)return!1;if(o===0)return!0;var u=SRe(t),f=u.startAngle,d=u.endAngle,p=a,v;if(f<=d){for(;p>d;)p-=360;for(;p=f&&p<=d}else{for(;p>f;)p-=360;for(;p=d&&p<=f}return v?Do(Do({},t),{},{radius:o,angle:ERe(p,t)}):null};function sp(e){"@babel/helpers - typeof";return sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sp(e)}var jRe=["offset"];function TRe(e){return kRe(e)||ARe(e)||PRe(e)||CRe()}function CRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PRe(e,t){if(e){if(typeof e=="string")return yE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yE(e,t)}}function ARe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kRe(e){if(Array.isArray(e))return yE(e)}function yE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RRe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function W4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fn(e){for(var t=1;t=0?1:-1,x,_;r==="insideStart"?(x=p+b*o,_=g):r==="insideEnd"?(x=v-b*o,_=!g):r==="end"&&(x=v+b*o,_=g),_=w<=0?_:!_;var S=Et(l,u,y,x),j=Et(l,u,y,x+(_?1:-1)*359),E="M".concat(S.x,",").concat(S.y,` A`).concat(y,",").concat(y,",0,1,").concat(_?0:1,`, `).concat(j.x,",").concat(j.y),C=ze(e.id)?Ss("recharts-radial-line-"):e.id;return V.createElement("text",lp({},n,{dominantBaseline:"central",className:De("recharts-radial-bar-label",a)}),V.createElement("defs",null,V.createElement("path",{id:C,d:E})),V.createElement("textPath",{xlinkHref:"#".concat(C)},t))},URe=function(e){var t=e.viewBox,n=e.offset,r=e.position,i=t,o=i.cx,a=i.cy,s=i.innerRadius,l=i.outerRadius,u=i.startAngle,f=i.endAngle,d=(u+f)/2;if(r==="outside"){var p=Et(o,a,l+n,d),v=p.x,g=p.y;return{x:v,y:g,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:o,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:o,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:o,y:a,textAnchor:"middle",verticalAnchor:"end"};var y=(s+l)/2,w=Et(o,a,y,d),b=w.x,x=w.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},BRe=function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,i=e.position,o=t,a=o.x,s=o.y,l=o.width,u=o.height,f=u>=0?1:-1,d=f*r,p=f>0?"end":"start",v=f>0?"start":"end",g=l>=0?1:-1,y=g*r,w=g>0?"end":"start",b=g>0?"start":"end";if(i==="top"){var x={x:a+l/2,y:s-f*r,textAnchor:"middle",verticalAnchor:p};return fn(fn({},x),n?{height:Math.max(s-n.y,0),width:l}:{})}if(i==="bottom"){var _={x:a+l/2,y:s+u+d,textAnchor:"middle",verticalAnchor:v};return fn(fn({},_),n?{height:Math.max(n.y+n.height-(s+u),0),width:l}:{})}if(i==="left"){var S={x:a-y,y:s+u/2,textAnchor:w,verticalAnchor:"middle"};return fn(fn({},S),n?{width:Math.max(S.x-n.x,0),height:u}:{})}if(i==="right"){var j={x:a+l+y,y:s+u/2,textAnchor:b,verticalAnchor:"middle"};return fn(fn({},j),n?{width:Math.max(n.x+n.width-j.x,0),height:u}:{})}var E=n?{width:l,height:u}:{};return i==="insideLeft"?fn({x:a+y,y:s+u/2,textAnchor:b,verticalAnchor:"middle"},E):i==="insideRight"?fn({x:a+l-y,y:s+u/2,textAnchor:w,verticalAnchor:"middle"},E):i==="insideTop"?fn({x:a+l/2,y:s+d,textAnchor:"middle",verticalAnchor:v},E):i==="insideBottom"?fn({x:a+l/2,y:s+u-d,textAnchor:"middle",verticalAnchor:p},E):i==="insideTopLeft"?fn({x:a+y,y:s+d,textAnchor:b,verticalAnchor:v},E):i==="insideTopRight"?fn({x:a+l-y,y:s+d,textAnchor:w,verticalAnchor:v},E):i==="insideBottomLeft"?fn({x:a+y,y:s+u-d,textAnchor:b,verticalAnchor:p},E):i==="insideBottomRight"?fn({x:a+l-y,y:s+u-d,textAnchor:w,verticalAnchor:p},E):ff(i)&&(Ee(i.x)||al(i.x))&&(Ee(i.y)||al(i.y))?fn({x:a+yr(i.x,l),y:s+yr(i.y,u),textAnchor:"end",verticalAnchor:"end"},E):fn({x:a+l/2,y:s+u/2,textAnchor:"middle",verticalAnchor:"middle"},E)},zRe=function(e){return"cx"in e&&Ee(e.cx)};function Cn(e){var t=e.offset,n=t===void 0?5:t,r=NRe(e,jRe),i=fn({offset:n},r),o=i.viewBox,a=i.position,s=i.value,l=i.children,u=i.content,f=i.className,d=f===void 0?"":f,p=i.textBreakAll;if(!o||ze(s)&&ze(l)&&!R.isValidElement(u)&&!Ge(u))return null;if(R.isValidElement(u))return R.cloneElement(u,i);var v;if(Ge(u)){if(v=R.createElement(u,i),R.isValidElement(v))return v}else v=DRe(i);var g=zRe(o),y=$e(i,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return FRe(i,v,y);var w=g?URe(i):BRe(i);return V.createElement(Ll,lp({className:De("recharts-label",d)},y,w,{breakAll:p}),v)}Cn.displayName="Label";var X1=function(e){var t=e.cx,n=e.cy,r=e.angle,i=e.startAngle,o=e.endAngle,a=e.r,s=e.radius,l=e.innerRadius,u=e.outerRadius,f=e.x,d=e.y,p=e.top,v=e.left,g=e.width,y=e.height,w=e.clockWise,b=e.labelViewBox;if(b)return b;if(Ee(g)&&Ee(y)){if(Ee(f)&&Ee(d))return{x:f,y:d,width:g,height:y};if(Ee(p)&&Ee(v))return{x:p,y:v,width:g,height:y}}return Ee(f)&&Ee(d)?{x:f,y:d,width:0,height:0}:Ee(t)&&Ee(n)?{cx:t,cy:n,startAngle:i||r||0,endAngle:o||r||0,innerRadius:l||0,outerRadius:u||s||a||0,clockWise:w}:e.viewBox?e.viewBox:{}},VRe=function(e,t){return e?e===!0?V.createElement(Cn,{key:"label-implicit",viewBox:t}):mn(e)?V.createElement(Cn,{key:"label-implicit",viewBox:t,value:e}):R.isValidElement(e)?e.type===Cn?R.cloneElement(e,{key:"label-implicit",viewBox:t}):V.createElement(Cn,{key:"label-implicit",content:e,viewBox:t}):Ge(e)?V.createElement(Cn,{key:"label-implicit",content:e,viewBox:t}):ff(e)?V.createElement(Cn,lp({viewBox:t},e,{key:"label-implicit"})):null:null},HRe=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=X1(e),o=fr(r,Cn).map(function(s,l){return R.cloneElement(s,{viewBox:t||i,key:"label-".concat(l)})});if(!n)return o;var a=VRe(e.label,t||i);return[a].concat(TRe(o))};Cn.parseViewBox=X1;Cn.renderCallByParent=HRe;function WRe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var GRe=WRe;const qRe=yt(GRe);function up(e){"@babel/helpers - typeof";return up=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},up(e)}var KRe=["valueAccessor"],YRe=["data","dataKey","clockWise","id","textBreakAll"];function ZRe(e){return eLe(e)||JRe(e)||QRe(e)||XRe()}function XRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QRe(e,t){if(e){if(typeof e=="string")return bE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bE(e,t)}}function JRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eLe(e){if(Array.isArray(e))return bE(e)}function bE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iLe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var oLe=function(e){return Array.isArray(e.value)?qRe(e.value):e.value};function zi(e){var t=e.valueAccessor,n=t===void 0?oLe:t,r=K4(e,KRe),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,u=K4(r,YRe);return!i||!i.length?null:V.createElement(Qe,{className:"recharts-label-list"},i.map(function(f,d){var p=ze(o)?n(f,d):Nt(f&&f.payload,o),v=ze(s)?{}:{id:"".concat(s,"-").concat(d)};return V.createElement(Cn,d0({},$e(f,!0),u,v,{parentViewBox:f.parentViewBox,value:p,textBreakAll:l,viewBox:Cn.parseViewBox(ze(a)?f:q4(q4({},f),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}zi.displayName="LabelList";function aLe(e,t){return e?e===!0?V.createElement(zi,{key:"labelList-implicit",data:t}):V.isValidElement(e)||Ge(e)?V.createElement(zi,{key:"labelList-implicit",data:t,content:e}):ff(e)?V.createElement(zi,d0({data:t},e,{key:"labelList-implicit"})):null:null}function sLe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=fr(r,zi).map(function(a,s){return R.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=aLe(e.label,t);return[o].concat(ZRe(i))}zi.renderCallByParent=sLe;function cp(e){"@babel/helpers - typeof";return cp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cp(e)}function _E(){return _E=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>l),`, `).concat(f.x,",").concat(f.y,` `);if(r>0){var p=Et(t,n,r,o),v=Et(t,n,r,l);d+="L ".concat(v.x,",").concat(v.y,` A `).concat(r,",").concat(r,`,0, `).concat(+(Math.abs(s)>180),",").concat(+(o<=l),`, `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(t,",").concat(n," Z");return d},dLe=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,a=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,u=e.endAngle,f=ar(u-l),d=Av({cx:t,cy:n,radius:i,angle:l,sign:f,cornerRadius:o,cornerIsExternal:s}),p=d.circleTangency,v=d.lineTangency,g=d.theta,y=Av({cx:t,cy:n,radius:i,angle:u,sign:-f,cornerRadius:o,cornerIsExternal:s}),w=y.circleTangency,b=y.lineTangency,x=y.theta,_=s?Math.abs(l-u):Math.abs(l-u)-g-x;if(_<0)return a?"M ".concat(v.x,",").concat(v.y,` a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 `):Q1({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:u});var S="M ".concat(v.x,",").concat(v.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` A`).concat(i,",").concat(i,",0,").concat(+(_>180),",").concat(+(f<0),",").concat(w.x,",").concat(w.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,` `);if(r>0){var j=Av({cx:t,cy:n,radius:r,angle:l,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),E=j.circleTangency,C=j.lineTangency,N=j.theta,I=Av({cx:t,cy:n,radius:r,angle:u,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),M=I.circleTangency,D=I.lineTangency,z=I.theta,q=s?Math.abs(l-u):Math.abs(l-u)-N-z;if(q<0&&o===0)return"".concat(S,"L").concat(t,",").concat(n,"Z");S+="L".concat(D.x,",").concat(D.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(M.x,",").concat(M.y,` A`).concat(r,",").concat(r,",0,").concat(+(q>180),",").concat(+(f>0),",").concat(E.x,",").concat(E.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(C.x,",").concat(C.y,"Z")}else S+="L".concat(t,",").concat(n,"Z");return S},hLe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},J1=function(e){var t=Z4(Z4({},hLe),e),n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=t.className;if(o0&&Math.abs(u-f)<360?y=dLe({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(g,v/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:u,endAngle:f}):y=Q1({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f}),V.createElement("path",_E({},$e(t,!0),{className:p,d:y,role:"img"}))};function fp(e){"@babel/helpers - typeof";return fp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fp(e)}function xE(){return xE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function jLe(e,t){return Of(e.getTime(),t.getTime())}function a6(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,s;(a=i.next())&&!a.done;){for(var l=t.entries(),u=!1,f=0;(s=l.next())&&!s.done;){var d=a.value,p=d[0],v=d[1],g=s.value,y=g[0],w=g[1];!u&&!r[f]&&(u=n.equals(p,y,o,f,e,t,n)&&n.equals(v,w,p,y,e,t,n))&&(r[f]=!0),f++}if(!u)return!1;o++}return!0}function TLe(e,t,n){var r=o6(e),i=r.length;if(o6(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===nz&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!tz(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function dd(e,t,n){var r=r6(e),i=r.length;if(r6(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===nz&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!tz(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=i6(e,o),s=i6(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function CLe(e,t){return Of(e.valueOf(),t.valueOf())}function PLe(e,t){return e.source===t.source&&e.flags===t.flags}function s6(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var s=t.values(),l=!1,u=0;(a=s.next())&&!a.done;)!l&&!r[u]&&(l=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[u]=!0),u++;if(!l)return!1}return!0}function ALe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var kLe="[object Arguments]",NLe="[object Boolean]",RLe="[object Date]",LLe="[object Map]",MLe="[object Number]",ILe="[object Object]",DLe="[object RegExp]",$Le="[object Set]",FLe="[object String]",ULe=Array.isArray,l6=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,u6=Object.assign,BLe=Object.prototype.toString.call.bind(Object.prototype.toString);function zLe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(u,f,d){if(u===f)return!0;if(u==null||f==null||typeof u!="object"||typeof f!="object")return u!==u&&f!==f;var p=u.constructor;if(p!==f.constructor)return!1;if(p===Object)return i(u,f,d);if(ULe(u))return t(u,f,d);if(l6!=null&&l6(u))return l(u,f,d);if(p===Date)return n(u,f,d);if(p===RegExp)return a(u,f,d);if(p===Map)return r(u,f,d);if(p===Set)return s(u,f,d);var v=BLe(u);return v===RLe?n(u,f,d):v===DLe?a(u,f,d):v===LLe?r(u,f,d):v===$Le?s(u,f,d):v===ILe?typeof u.then!="function"&&typeof f.then!="function"&&i(u,f,d):v===kLe?i(u,f,d):v===NLe||v===MLe||v===FLe?o(u,f,d):!1}}function VLe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?dd:ELe,areDatesEqual:jLe,areMapsEqual:r?n6(a6,dd):a6,areObjectsEqual:r?dd:TLe,arePrimitiveWrappersEqual:CLe,areRegExpsEqual:PLe,areSetsEqual:r?n6(s6,dd):s6,areTypedArraysEqual:r?dd:ALe};if(n&&(i=u6({},i,n(i))),t){var o=Nv(i.areArraysEqual),a=Nv(i.areMapsEqual),s=Nv(i.areObjectsEqual),l=Nv(i.areSetsEqual);i=u6({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return i}function HLe(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function WLe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(s,l){var u=r(),f=u.cache,d=f===void 0?t?new WeakMap:void 0:f,p=u.meta;return n(s,l,{cache:d,equals:i,meta:p,strict:o})};if(t)return function(s,l){return n(s,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(s,l){return n(s,l,a)}}var GLe=Ts();Ts({strict:!0});Ts({circular:!0});Ts({circular:!0,strict:!0});Ts({createInternalComparator:function(){return Of}});Ts({strict:!0,createInternalComparator:function(){return Of}});Ts({circular:!0,createInternalComparator:function(){return Of}});Ts({circular:!0,createInternalComparator:function(){return Of},strict:!0});function Ts(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=VLe(e),l=zLe(s),u=r?r(l):HLe(l);return WLe({circular:n,comparator:l,createState:i,equals:u,strict:a})}function qLe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function c6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):qLe(i)};requestAnimationFrame(r)}function wE(e){"@babel/helpers - typeof";return wE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wE(e)}function KLe(e){return QLe(e)||XLe(e)||ZLe(e)||YLe()}function YLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZLe(e,t){if(e){if(typeof e=="string")return f6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f6(e,t)}}function f6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:y<0?0:y},g=function(y){for(var w=y>1?1:y,b=w,x=0;x<8;++x){var _=f(b)-w,S=p(b);if(Math.abs(_-w)0&&arguments[0]!==void 0?arguments[0]:{},t=e.stiff,n=t===void 0?100:t,r=e.damping,i=r===void 0?8:r,o=e.dt,a=o===void 0?17:o,s=function(l,u,f){var d=-(l-u)*n,p=f*i,v=f+(d-p)*a/1e3,g=f*a/1e3+l;return Math.abs(g-u)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PMe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function mw(e){return RMe(e)||NMe(e)||kMe(e)||AMe()}function AMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kMe(e,t){if(e){if(typeof e=="string")return TE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TE(e,t)}}function NMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function RMe(e){if(Array.isArray(e))return TE(e)}function TE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function m0(e){return m0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m0(e)}var _i=function(e){DMe(n,e);var t=$Me(n);function n(r,i){var o;LMe(this,n),o=t.call(this,r,i);var a=o.props,s=a.isActive,l=a.attributeName,u=a.from,f=a.to,d=a.steps,p=a.children,v=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(AE(o)),o.changeStyle=o.changeStyle.bind(AE(o)),!s||v<=0)return o.state={style:{}},typeof p=="function"&&(o.state={style:f}),PE(o);if(d&&d.length)o.state={style:d[0].style};else if(u){if(typeof p=="function")return o.state={style:u},PE(o);o.state={style:l?Od({},l,u):u}}else o.state={style:{}};return o}return MMe(n,[{key:"componentDidMount",value:function(){var r=this.props,i=r.isActive,o=r.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var i=this.props,o=i.isActive,a=i.canBegin,s=i.attributeName,l=i.shouldReAnimate,u=i.to,f=i.from,d=this.state.style;if(a){if(!o){var p={style:s?Od({},s,u):u};this.state&&d&&(s&&d[s]!==u||!s&&d!==u)&&this.setState(p);return}if(!(GLe(r.to,u)&&r.canBegin&&r.isActive)){var v=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=v||l?f:r.to;if(this.state&&d){var y={style:s?Od({},s,g):g};(s&&[s]!==g||!s&&d!==g)&&this.setState(y)}this.runAnimation(Pi(Pi({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var i=this,o=r.from,a=r.to,s=r.duration,l=r.easing,u=r.begin,f=r.onAnimationEnd,d=r.onAnimationStart,p=jMe(o,a,mMe(l),s,this.changeStyle),v=function(){i.stopJSAnimation=p()};this.manager.start([d,u,v,s,f])}},{key:"runStepAnimation",value:function(r){var i=this,o=r.steps,a=r.begin,s=r.onAnimationStart,l=o[0],u=l.style,f=l.duration,d=f===void 0?0:f,p=function(v,g,y){if(y===0)return v;var w=g.duration,b=g.easing,x=b===void 0?"ease":b,_=g.style,S=g.properties,j=g.onAnimationEnd,E=y>0?o[y-1]:g,C=S||Object.keys(_);if(typeof x=="function"||x==="spring")return[].concat(mw(v),[i.runJSAnimation.bind(i,{from:E.style,to:_,duration:w,easing:x}),w]);var N=p6(C,w,x),I=Pi(Pi(Pi({},E.style),_),{},{transition:N});return[].concat(mw(v),[I,w,j]).filter(rMe)};return this.manager.start([s].concat(mw(o.reduce(p,[u,Math.max(d,a)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=JLe());var i=r.begin,o=r.duration,a=r.attributeName,s=r.to,l=r.easing,u=r.onAnimationStart,f=r.onAnimationEnd,d=r.steps,p=r.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof l=="function"||typeof p=="function"||l==="spring"){this.runJSAnimation(r);return}if(d.length>1){this.runStepAnimation(r);return}var g=a?Od({},a,s):s,y=p6(Object.keys(g),o,l);v.start([u,i,Pi(Pi({},g),{},{transition:y}),o,f])}},{key:"render",value:function(){var r=this.props,i=r.children;r.begin;var o=r.duration;r.attributeName,r.easing;var a=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var s=CMe(r,TMe),l=R.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!a||l===0||o<=0)return i;var f=function(d){var p=d.props,v=p.style,g=v===void 0?{}:v,y=p.className,w=R.cloneElement(d,Pi(Pi({},s),{},{style:Pi(Pi({},g),u),className:y}));return w};return l===1?f(R.Children.only(i)):V.createElement("div",null,R.Children.map(i,function(d){return f(d)}))}}]),n}(R.PureComponent);_i.displayName="Animate";_i.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};_i.propTypes={from:Je.oneOfType([Je.object,Je.string]),to:Je.oneOfType([Je.object,Je.string]),attributeName:Je.string,duration:Je.number,begin:Je.number,easing:Je.oneOfType([Je.string,Je.func]),steps:Je.arrayOf(Je.shape({duration:Je.number.isRequired,style:Je.object.isRequired,easing:Je.oneOfType([Je.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Je.func]),properties:Je.arrayOf("string"),onAnimationEnd:Je.func})),children:Je.oneOfType([Je.node,Je.func]),isActive:Je.bool,canBegin:Je.bool,onAnimationEnd:Je.func,shouldReAnimate:Je.bool,onAnimationStart:Je.func,onAnimationReStart:Je.func};Je.object,Je.object,Je.object,Je.element;Je.object,Je.object,Je.object,Je.oneOfType([Je.array,Je.element]),Je.any;function pp(e){"@babel/helpers - typeof";return pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pp(e)}function v0(){return v0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,s=n>=0?1:-1,l=r>=0&&n>=0||r<0&&n<0?1:0,u;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],d=0,p=4;do?o:i[d];u="M".concat(e,",").concat(t+a*f[0]),f[0]>0&&(u+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(l,",").concat(e+s*f[0],",").concat(t)),u+="L ".concat(e+n-s*f[1],",").concat(t),f[1]>0&&(u+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(l,`, `).concat(e+n,",").concat(t+a*f[1])),u+="L ".concat(e+n,",").concat(t+r-a*f[2]),f[2]>0&&(u+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(l,`, `).concat(e+n-s*f[2],",").concat(t+r)),u+="L ".concat(e+s*f[3],",").concat(t+r),f[3]>0&&(u+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(l,`, `).concat(e,",").concat(t+r-a*f[3])),u+="Z"}else if(o>0&&i===+i&&i>0){var v=Math.min(o,i);u="M ".concat(e,",").concat(t+a*v,` A `).concat(v,",").concat(v,",0,0,").concat(l,",").concat(e+s*v,",").concat(t,` L `).concat(e+n-s*v,",").concat(t,` A `).concat(v,",").concat(v,",0,0,").concat(l,",").concat(e+n,",").concat(t+a*v,` L `).concat(e+n,",").concat(t+r-a*v,` A `).concat(v,",").concat(v,",0,0,").concat(l,",").concat(e+n-s*v,",").concat(t+r,` L `).concat(e+s*v,",").concat(t+r,` A `).concat(v,",").concat(v,",0,0,").concat(l,",").concat(e,",").concat(t+r-a*v," Z")}else u="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return u},KMe=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,i=t.x,o=t.y,a=t.width,s=t.height;if(Math.abs(a)>0&&Math.abs(s)>0){var l=Math.min(i,i+a),u=Math.max(i,i+a),f=Math.min(o,o+s),d=Math.max(o,o+s);return n>=l&&n<=u&&r>=f&&r<=d}return!1},YMe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},PP=function(e){var t=O6(O6({},YMe),e),n=R.useRef(),r=R.useState(-1),i=UMe(r,2),o=i[0],a=i[1];R.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var _=n.current.getTotalLength();_&&a(_)}catch{}},[]);var s=t.x,l=t.y,u=t.width,f=t.height,d=t.radius,p=t.className,v=t.animationEasing,g=t.animationDuration,y=t.animationBegin,w=t.isAnimationActive,b=t.isUpdateAnimationActive;if(s!==+s||l!==+l||u!==+u||f!==+f||u===0||f===0)return null;var x=De("recharts-rectangle",p);return b?V.createElement(_i,{canBegin:o>0,from:{width:u,height:f,x:s,y:l},to:{width:u,height:f,x:s,y:l},duration:g,animationEasing:v,isActive:b},function(_){var S=_.width,j=_.height,E=_.x,C=_.y;return V.createElement(_i,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,isActive:w,easing:v},V.createElement("path",v0({},$e(t,!0),{className:x,d:S6(E,C,S,j,d),ref:n})))}):V.createElement("path",v0({},$e(t,!0),{className:x,d:S6(s,l,u,f,d)}))},ZMe=["points","className","baseLinePoints","connectNulls"];function Vu(){return Vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QMe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function E6(e){return n4e(e)||t4e(e)||e4e(e)||JMe()}function JMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e4e(e,t){if(e){if(typeof e=="string")return kE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kE(e,t)}}function t4e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function n4e(e){if(Array.isArray(e))return kE(e)}function kE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],t=[[]];return e.forEach(function(n){j6(n)?t[t.length-1].push(n):t[t.length-1].length>0&&t.push([])}),j6(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t},Qd=function(e,t){var n=r4e(e);t&&(n=[n.reduce(function(i,o){return[].concat(E6(i),E6(o))},[])]);var r=n.map(function(i){return i.reduce(function(o,a,s){return"".concat(o).concat(s===0?"M":"L").concat(a.x,",").concat(a.y)},"")}).join("");return n.length===1?"".concat(r,"Z"):r},i4e=function(e,t,n){var r=Qd(e,n);return"".concat(r.slice(-1)==="Z"?r.slice(0,-1):r,"L").concat(Qd(t.reverse(),n).slice(1))},o4e=function(e){var t=e.points,n=e.className,r=e.baseLinePoints,i=e.connectNulls,o=XMe(e,ZMe);if(!t||!t.length)return null;var a=De("recharts-polygon",n);if(r&&r.length){var s=o.stroke&&o.stroke!=="none",l=i4e(t,r,i);return V.createElement("g",{className:a},V.createElement("path",Vu({},$e(o,!0),{fill:l.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:l})),s?V.createElement("path",Vu({},$e(o,!0),{fill:"none",d:Qd(t,i)})):null,s?V.createElement("path",Vu({},$e(o,!0),{fill:"none",d:Qd(r,i)})):null)}var u=Qd(t,i);return V.createElement("path",Vu({},$e(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",className:a,d:u}))};function NE(){return NE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function d4e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var h4e=function(e,t,n,r,i,o){return"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n)},p4e=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,o=e.top,a=o===void 0?0:o,s=e.left,l=s===void 0?0:s,u=e.width,f=u===void 0?0:u,d=e.height,p=d===void 0?0:d,v=e.className,g=f4e(e,a4e),y=s4e({x:n,y:i,top:a,left:l,width:f,height:p},g);return!Ee(n)||!Ee(i)||!Ee(f)||!Ee(p)||!Ee(a)||!Ee(l)?null:V.createElement("path",RE({},$e(y,!0),{className:De("recharts-cross",v),d:h4e(n,i,f,p,a,l)}))},m4e=Xb,v4e=E1,g4e=Ao;function y4e(e,t){return e&&e.length?m4e(e,g4e(t),v4e):void 0}var b4e=y4e;const _4e=yt(b4e);var x4e=Xb,w4e=Ao,O4e=j1;function S4e(e,t){return e&&e.length?x4e(e,w4e(t),O4e):void 0}var E4e=S4e;const j4e=yt(E4e);var T4e=["cx","cy","angle","ticks","axisLine"],C4e=["ticks","tick","angle","tickFormatter","stroke"];function Dc(e){"@babel/helpers - typeof";return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}function Jd(){return Jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function P4e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function A4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A6(e,t){for(var n=0;nR6?o=r==="outer"?"start":"end":i<-R6?o=r==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,r=n.cx,i=n.cy,o=n.radius,a=n.axisLine,s=n.axisLineType,l=$s($s({},$e(this.props,!1)),{},{fill:"none"},$e(a,!1));if(s==="circle")return V.createElement(um,Js({className:"recharts-polar-angle-axis-line"},l,{cx:r,cy:i,r:o}));var u=this.props.ticks,f=u.map(function(d){return Et(r,i,o,d.coordinate)});return V.createElement(o4e,Js({className:"recharts-polar-angle-axis-line"},l,{points:f}))}},{key:"renderTicks",value:function(){var n=this,r=this.props,i=r.ticks,o=r.tick,a=r.tickLine,s=r.tickFormatter,l=r.stroke,u=$e(this.props,!1),f=$e(o,!1),d=$s($s({},u),{},{fill:"none"},$e(a,!1)),p=i.map(function(v,g){var y=n.getTickLineCoord(v),w=n.getTickTextAnchor(v),b=$s($s($s({textAnchor:w},u),{},{stroke:"none",fill:l},f),{},{index:g,payload:v,x:y.x2,y:y.y2});return V.createElement(Qe,Js({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(v.coordinate)},ds(n.props,v,g)),a&&V.createElement("line",Js({className:"recharts-polar-angle-axis-tick-line"},d,y)),o&&t.renderTickItem(o,b,s?s(v.value,g):v.value))});return V.createElement(Qe,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,r=n.ticks,i=n.radius,o=n.axisLine;return i<=0||!r||!r.length?null:V.createElement(Qe,{className:"recharts-polar-angle-axis"},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,r,i){var o;return V.isValidElement(n)?o=V.cloneElement(n,r):Ge(n)?o=n(r):o=V.createElement(Ll,Js({},r,{className:"recharts-polar-angle-axis-tick-value"}),i),o}}]),t}(R.PureComponent);r_(i_,"displayName","PolarAngleAxis");r_(i_,"axisType","angleAxis");r_(i_,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var W4e=_B,G4e=W4e(Object.getPrototypeOf,Object),q4e=G4e,K4e=ha,Y4e=q4e,Z4e=pa,X4e="[object Object]",Q4e=Function.prototype,J4e=Object.prototype,hz=Q4e.toString,e6e=J4e.hasOwnProperty,t6e=hz.call(Object);function n6e(e){if(!Z4e(e)||K4e(e)!=X4e)return!1;var t=Y4e(e);if(t===null)return!0;var n=e6e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&hz.call(n)==t6e}var r6e=n6e;const i6e=yt(r6e);var o6e=ha,a6e=pa,s6e="[object Boolean]";function l6e(e){return e===!0||e===!1||a6e(e)&&o6e(e)==s6e}var u6e=l6e;const c6e=yt(u6e);function vp(e){"@babel/helpers - typeof";return vp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vp(e)}function b0(){return b0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:d,x:s,y:l},to:{upperWidth:u,lowerWidth:f,height:d,x:s,y:l},duration:g,animationEasing:v,isActive:w},function(x){var _=x.upperWidth,S=x.lowerWidth,j=x.height,E=x.x,C=x.y;return V.createElement(_i,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,easing:v},V.createElement("path",b0({},$e(t,!0),{className:b,d:D6(E,C,_,S,j),ref:n})))}):V.createElement("g",null,V.createElement("path",b0({},$e(t,!0),{className:b,d:D6(s,l,u,f,d)})))},x6e=["option","shapeType","propTransformer","activeClassName","isActive"];function gp(e){"@babel/helpers - typeof";return gp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gp(e)}function w6e(e,t){if(e==null)return{};var n=O6e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function O6e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function $6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _0(e){for(var t=1;t0?Fr(x,"paddingAngle",0):0;if(S){var E=Vt(S.endAngle-S.startAngle,x.endAngle-x.startAngle),C=Mt(Mt({},x),{},{startAngle:b+j,endAngle:b+E(g)+j});y.push(C),b=C.endAngle}else{var N=x.endAngle,I=x.startAngle,M=Vt(0,N-I),D=M(g),z=Mt(Mt({},x),{},{startAngle:b+j,endAngle:b+D+j});y.push(z),b=z.endAngle}}),V.createElement(Qe,null,n.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(n){var r=this;n.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var o=++r.state.sectorToFocus%r.sectorRefs.length;r.sectorRefs[o].focus(),r.setState({sectorToFocus:o});break}case"ArrowRight":{var a=--r.state.sectorToFocus<0?r.sectorRefs.length-1:r.state.sectorToFocus%r.sectorRefs.length;r.sectorRefs[a].focus(),r.setState({sectorToFocus:a});break}case"Escape":{r.sectorRefs[r.state.sectorToFocus].blur(),r.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,r=n.sectors,i=n.isAnimationActive,o=this.state.prevSectors;return i&&r&&r.length&&(!o||!hs(o,r))?this.renderSectorsWithAnimation():this.renderSectorsStatically(r)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,r=this.props,i=r.hide,o=r.sectors,a=r.className,s=r.label,l=r.cx,u=r.cy,f=r.innerRadius,d=r.outerRadius,p=r.isAnimationActive,v=this.state.isAnimationFinished;if(i||!o||!o.length||!Ee(l)||!Ee(u)||!Ee(f)||!Ee(d))return null;var g=De("recharts-pie",a);return V.createElement(Qe,{tabIndex:this.props.rootTabIndex,className:g,ref:function(y){n.pieRef=y}},this.renderSectors(),s&&this.renderLabels(o),Cn.renderCallByParent(this.props,null,!1),(!p||v)&&zi.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,r){return r.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==r.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:r.curSectors,isAnimationFinished:!0}:n.sectors!==r.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,r){return n>r?"start":n=360?x:x-1)*l,S=w-x*v-_,j=r.reduce(function(N,I){var M=Nt(I,b,0);return N+(Ee(M)?M:0)},0),E;if(j>0){var C;E=r.map(function(N,I){var M=Nt(N,b,0),D=Nt(N,f,I),z=(Ee(M)?M:0)/j,q;I?q=C.endAngle+ar(y)*l*(M!==0?1:0):q=a;var W=q+ar(y)*((M!==0?v:0)+z*S),X=(q+W)/2,J=(g.innerRadius+g.outerRadius)/2,te=[{name:D,value:M,payload:N,dataKey:b,type:p}],Z=Et(g.cx,g.cy,J,X);return C=Mt(Mt(Mt({percent:z,cornerRadius:o,name:D,tooltipPayload:te,midAngle:X,middleRadius:J,tooltipPosition:Z},N),g),{},{value:Nt(N,b),startAngle:q,endAngle:W,payload:N,paddingAngle:ar(y)*l}),C})}return Mt(Mt({},g),{},{sectors:E,data:r})});var V6e=Math.ceil,H6e=Math.max;function W6e(e,t,n,r){for(var i=-1,o=H6e(V6e((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}var G6e=W6e,q6e=UB,z6=1/0,K6e=17976931348623157e292;function Y6e(e){if(!e)return e===0?e:0;if(e=q6e(e),e===z6||e===-z6){var t=e<0?-1:1;return t*K6e}return e===e?e:0}var vz=Y6e,Z6e=G6e,X6e=Hb,vw=vz;function Q6e(e){return function(t,n,r){return r&&typeof r!="number"&&X6e(t,n,r)&&(n=r=void 0),t=vw(t),n===void 0?(n=t,t=0):n=vw(n),r=r===void 0?t0&&r.handleDrag(i.changedTouches[0])}),Nr(io(r),"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a==null||a({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Nr(io(r),"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Nr(io(r),"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Nr(io(r),"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Nr(io(r),"handleSlideDragStart",function(i){var o=q6(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(io(r),"startX"),endX:r.handleTravellerDragStart.bind(io(r),"endX")},r.state={},r}return lIe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var r=n.startX,i=n.endX,o=this.state.scaleValues,a=this.props,s=a.gap,l=a.data,u=l.length-1,f=Math.min(r,i),d=Math.max(r,i),p=t.getIndexInRange(o,f),v=t.getIndexInRange(o,d);return{startIndex:p-p%s,endIndex:v===u?u:v-v%s}}},{key:"getTextOfTick",value:function(n){var r=this.props,i=r.data,o=r.tickFormatter,a=r.dataKey,s=Nt(i[n],a,n);return Ge(o)?o(s,n):s}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var r=this.state,i=r.slideMoveStartX,o=r.startX,a=r.endX,s=this.props,l=s.x,u=s.width,f=s.travellerWidth,d=s.startIndex,p=s.endIndex,v=s.onChange,g=n.pageX-i;g>0?g=Math.min(g,l+u-f-a,l+u-f-o):g<0&&(g=Math.max(g,l-o,l-a));var y=this.getIndex({startX:o+g,endX:a+g});(y.startIndex!==d||y.endIndex!==p)&&v&&v(y),this.setState({startX:o+g,endX:a+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,r){var i=q6(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var r=this.state,i=r.brushMoveStartX,o=r.movingTravellerId,a=r.endX,s=r.startX,l=this.state[o],u=this.props,f=u.x,d=u.width,p=u.travellerWidth,v=u.onChange,g=u.gap,y=u.data,w={startX:this.state.startX,endX:this.state.endX},b=n.pageX-i;b>0?b=Math.min(b,f+d-p-l):b<0&&(b=Math.max(b,f-l)),w[o]=l+b;var x=this.getIndex(w),_=x.startIndex,S=x.endIndex,j=function(){var E=y.length-1;return o==="startX"&&(a>s?_%g===0:S%g===0)||as?S%g===0:_%g===0)||a>s&&S===E};this.setState(Nr(Nr({},o,l+b),"brushMoveStartX",n.pageX),function(){v&&j()&&v(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,r){var i=this,o=this.state,a=o.scaleValues,s=o.startX,l=o.endX,u=this.state[r],f=a.indexOf(u);if(f!==-1){var d=f+n;if(!(d===-1||d>=a.length)){var p=a[d];r==="startX"&&p>=l||r==="endX"&&p<=s||this.setState(Nr({},r,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,r=n.x,i=n.y,o=n.width,a=n.height,s=n.fill,l=n.stroke;return V.createElement("rect",{stroke:l,fill:s,x:r,y:i,width:o,height:a})}},{key:"renderPanorama",value:function(){var n=this.props,r=n.x,i=n.y,o=n.width,a=n.height,s=n.data,l=n.children,u=n.padding,f=R.Children.only(l);return f?V.cloneElement(f,{x:r,y:i,width:o,height:a,margin:u,compact:!0,data:s}):null}},{key:"renderTravellerLayer",value:function(n,r){var i=this,o=this.props,a=o.y,s=o.travellerWidth,l=o.height,u=o.traveller,f=o.ariaLabel,d=o.data,p=o.startIndex,v=o.endIndex,g=Math.max(n,this.props.x),y=gw(gw({},$e(this.props,!1)),{},{x:g,y:a,width:s,height:l}),w=f||"Min value: ".concat(d[p].name,", Max value: ").concat(d[v].name);return V.createElement(Qe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(b){["ArrowLeft","ArrowRight"].includes(b.key)&&(b.preventDefault(),b.stopPropagation(),i.handleTravellerMoveKeyboard(b.key==="ArrowRight"?1:-1,r))},onFocus:function(){i.setState({isTravellerFocused:!0})},onBlur:function(){i.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(u,y))}},{key:"renderSlide",value:function(n,r){var i=this.props,o=i.y,a=i.height,s=i.stroke,l=i.travellerWidth,u=Math.min(n,r)+l,f=Math.max(Math.abs(r-n)-l,0);return V.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:s,fillOpacity:.2,x:u,y:o,width:f,height:a})}},{key:"renderText",value:function(){var n=this.props,r=n.startIndex,i=n.endIndex,o=n.y,a=n.height,s=n.travellerWidth,l=n.stroke,u=this.state,f=u.startX,d=u.endX,p=5,v={pointerEvents:"none",fill:l};return V.createElement(Qe,{className:"recharts-brush-texts"},V.createElement(Ll,S0({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-p,y:o+a/2},v),this.getTextOfTick(r)),V.createElement(Ll,S0({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+s+p,y:o+a/2},v),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,r=n.data,i=n.className,o=n.children,a=n.x,s=n.y,l=n.width,u=n.height,f=n.alwaysShowText,d=this.state,p=d.startX,v=d.endX,g=d.isTextActive,y=d.isSlideMoving,w=d.isTravellerMoving,b=d.isTravellerFocused;if(!r||!r.length||!Ee(a)||!Ee(s)||!Ee(l)||!Ee(u)||l<=0||u<=0)return null;var x=De("recharts-brush",i),_=V.Children.count(o)===1,S=aIe("userSelect","none");return V.createElement(Qe,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(g||y||w||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var r=n.x,i=n.y,o=n.width,a=n.height,s=n.stroke,l=Math.floor(i+a/2)-1;return V.createElement(V.Fragment,null,V.createElement("rect",{x:r,y:i,width:o,height:a,fill:s,stroke:"none"}),V.createElement("line",{x1:r+1,y1:l,x2:r+o-1,y2:l,fill:"none",stroke:"#fff"}),V.createElement("line",{x1:r+1,y1:l+2,x2:r+o-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,r){var i;return V.isValidElement(n)?i=V.cloneElement(n,r):Ge(n)?i=n(r):i=t.renderDefaultTraveller(r),i}},{key:"getDerivedStateFromProps",value:function(n,r){var i=n.data,o=n.width,a=n.x,s=n.travellerWidth,l=n.updateId,u=n.startIndex,f=n.endIndex;if(i!==r.prevData||l!==r.prevUpdateId)return gw({prevData:i,prevTravellerWidth:s,prevUpdateId:l,prevX:a,prevWidth:o},i&&i.length?hIe({data:i,width:o,x:a,travellerWidth:s,startIndex:u,endIndex:f}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||a!==r.prevX||s!==r.prevTravellerWidth)){r.scale.range([a,a+o-s]);var d=r.scale.domain().map(function(p){return r.scale(p)});return{prevData:i,prevTravellerWidth:s,prevUpdateId:l,prevX:a,prevWidth:o,startX:r.scale(n.startIndex),endX:r.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,r){for(var i=n.length,o=0,a=i-1;a-o>1;){var s=Math.floor((o+a)/2);n[s]>r?a=s:o=s}return r>=n[a]?a:o}}]),t}(R.PureComponent);Nr(Bc,"displayName","Brush");Nr(Bc,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var pIe=eP;function mIe(e,t){var n;return pIe(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var vIe=mIe,gIe=dB,yIe=Ao,bIe=vIe,_Ie=Pr,xIe=Hb;function wIe(e,t,n){var r=_Ie(e)?gIe:bIe;return n&&xIe(e,t,n)&&(t=void 0),r(e,yIe(t))}var OIe=wIe;const SIe=yt(OIe);var bo=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},K6=MB;function EIe(e,t,n){t=="__proto__"&&K6?K6(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var jIe=EIe,TIe=jIe,CIe=RB,PIe=Ao;function AIe(e,t){var n={};return t=PIe(t),CIe(e,function(r,i,o){TIe(n,i,t(r,i,o))}),n}var kIe=AIe;const NIe=yt(kIe);function RIe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZIe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function XIe(e,t){var n=e.x,r=e.y,i=YIe(e,WIe),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),p=parseInt(d,10);return hd(hd(hd(hd(hd({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function Z6(e){return V.createElement(x0,$E({shapeType:"rectangle",propTransformer:XIe,activeClassName:"recharts-active-bar"},e))}var QIe=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,r){if(typeof e=="number")return e;var i=typeof n=="number";return i?e(n,r):(i||Il(!1),t)}},JIe=["value","background"],xz;function zc(e){"@babel/helpers - typeof";return zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(e)}function e5e(e,t){if(e==null)return{};var n=t5e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function t5e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(W)0&&Math.abs(q)0&&(z=Math.min((Y||0)-(q[ee-1]||0),z))});var W=z/D,X=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(E=W*X/2),g.padding==="no-gap"){var J=yr(e.barCategoryGap,W*X),te=W*X/2;E=te-J-(te-J)/X*J}}r==="xAxis"?C=[n.left+(x.left||0)+(E||0),n.left+n.width-(x.right||0)-(E||0)]:r==="yAxis"?C=s==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(E||0),n.top+n.height-(x.bottom||0)-(E||0)]:C=g.range,S&&(C=[C[1],C[0]]);var Z=H1(g,i,d),B=Z.scale,F=Z.realScaleType;B.domain(w).range(C),W1(B);var H=G1(B,Ni(Ni({},g),{},{realScaleType:F}));r==="xAxis"?(M=y==="top"&&!_||y==="bottom"&&_,N=n.left,I=f[j]-M*g.height):r==="yAxis"&&(M=y==="left"&&!_||y==="right"&&_,N=f[j]-M*g.width,I=n.top);var ne=Ni(Ni(Ni({},g),H),{},{realScaleType:F,x:N,y:I,scale:B,width:r==="xAxis"?n.width:g.width,height:r==="yAxis"?n.height:g.height});return ne.bandSize=c0(ne,H),!g.hide&&r==="xAxis"?f[j]+=(M?-1:1)*ne.height:g.hide||(f[j]+=(M?-1:1)*ne.width),Ni(Ni({},p),{},s_({},v,ne))},{})},jz=function(e,t){var n=e.x,r=e.y,i=t.x,o=t.y;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}},f5e=function(e){var t=e.x1,n=e.y1,r=e.x2,i=e.y2;return jz({x:t,y:n},{x:r,y:i})},Tz=function(){function e(t){l5e(this,e),this.scale=t}return u5e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.bandAware,i=n.position;if(t!==void 0){if(i)switch(i){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(t)+a}default:return this.scale(t)}if(r){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+s}return this.scale(t)}}},{key:"isInRange",value:function(t){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?t>=r&&t<=i:t>=i&&t<=r}}],[{key:"create",value:function(t){return new e(t)}}]),e}();s_(Tz,"EPS",1e-4);var AP=function(e){var t=Object.keys(e).reduce(function(n,r){return Ni(Ni({},n),{},s_({},r,Tz.create(e[r])))},{});return Ni(Ni({},t),{},{apply:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;return NIe(n,function(a,s){return t[s].apply(a,{bandAware:i,position:o})})},isInRange:function(n){return _z(n,function(r,i){return t[i].isInRange(r)})}})};function d5e(e){return(e%180+180)%180}var h5e=function(e){var t=e.width,n=e.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=d5e(r),o=i*Math.PI/180,a=Math.atan(n/t),s=o>a&&o-1?i[o?t[a]:a]:void 0}}var y5e=g5e,b5e=vz;function _5e(e){var t=b5e(e),n=t%1;return t===t?n?t-n:t:0}var x5e=_5e,w5e=jB,O5e=Ao,S5e=x5e,E5e=Math.max;function j5e(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:S5e(n);return i<0&&(i=E5e(r+i,0)),w5e(e,O5e(t),i)}var T5e=j5e,C5e=y5e,P5e=T5e,A5e=C5e(P5e),k5e=A5e;const N5e=yt(k5e);var R5e=obe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),kP=R.createContext(void 0),NP=R.createContext(void 0),Cz=R.createContext(void 0),Pz=R.createContext({}),Az=R.createContext(void 0),kz=R.createContext(0),Nz=R.createContext(0),tI=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,i=t.offset,o=e.clipPathId,a=e.children,s=e.width,l=e.height,u=R5e(i);return V.createElement(kP.Provider,{value:n},V.createElement(NP.Provider,{value:r},V.createElement(Pz.Provider,{value:i},V.createElement(Cz.Provider,{value:u},V.createElement(Az.Provider,{value:o},V.createElement(kz.Provider,{value:l},V.createElement(Nz.Provider,{value:s},a)))))))},L5e=function(){return R.useContext(Az)},Rz=function(e){var t=R.useContext(kP);t==null&&Il(!1);var n=t[e];return n==null&&Il(!1),n},M5e=function(){var e=R.useContext(kP);return Ra(e)},I5e=function(){var e=R.useContext(NP),t=N5e(e,function(n){return _z(n.domain,Number.isFinite)});return t||Ra(e)},Lz=function(e){var t=R.useContext(NP);t==null&&Il(!1);var n=t[e];return n==null&&Il(!1),n},D5e=function(){var e=R.useContext(Cz);return e},$5e=function(){return R.useContext(Pz)},RP=function(){return R.useContext(Nz)},LP=function(){return R.useContext(kz)};function wp(e){"@babel/helpers - typeof";return wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wp(e)}function nI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rI(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function oDe(e,t){return Mz(e,t+1)}function aDe(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,l=0,u=1,f=a,d=function(){var v=r==null?void 0:r[l];if(v===void 0)return{v:Mz(r,u)};var g=l,y,w=function(){return y===void 0&&(y=n(v,g)),y},b=v.coordinate,x=l===0||C0(e,b,w,f,s);x||(l=0,f=a,u+=1),x&&(f=b+e*(w()/2+i),l+=u)},p;u<=o.length;)if(p=d(),p)return p.v;return[]}function Ep(e){"@babel/helpers - typeof";return Ep=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ep(e)}function uI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t0?p.coordinate-y*e:p.coordinate})}else o[d]=p=Gn(Gn({},p),{},{tickCoord:p.coordinate});var w=C0(e,p.tickCoord,g,s,l);w&&(l=p.tickCoord-e*(g()/2+i),o[d]=Gn(Gn({},p),{},{isShow:!0}))},f=a-1;f>=0;f--)u(f);return o}function fDe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,l=t.start,u=t.end;if(o){var f=r[s-1],d=n(f,s-1),p=e*(f.coordinate+e*d/2-u);a[s-1]=f=Gn(Gn({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var v=C0(e,f.tickCoord,function(){return d},l,u);v&&(u=f.tickCoord-e*(d/2+i),a[s-1]=Gn(Gn({},f),{},{isShow:!0}))}for(var g=o?s-1:s,y=function(b){var x=a[b],_,S=function(){return _===void 0&&(_=n(x,b)),_};if(b===0){var j=e*(x.coordinate-e*S()/2-l);a[b]=x=Gn(Gn({},x),{},{tickCoord:j<0?x.coordinate-j*e:x.coordinate})}else a[b]=x=Gn(Gn({},x),{},{tickCoord:x.coordinate});var E=C0(e,x.tickCoord,S,l,u);E&&(l=x.tickCoord+e*(S()/2+i),a[b]=Gn(Gn({},x),{},{isShow:!0}))},w=0;w=2?ar(i[1].coordinate-i[0].coordinate):1,b=iDe(o,w,v);return l==="equidistantPreserveStart"?aDe(w,b,y,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=fDe(w,b,y,i,a,l==="preserveStartEnd"):p=cDe(w,b,y,i,a),p.filter(function(x){return x.isShow}))}var dDe=["viewBox"],hDe=["viewBox"],pDe=["ticks"];function Vc(e){"@babel/helpers - typeof";return Vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vc(e)}function Wu(){return Wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mDe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function vDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fI(e,t){for(var n=0;n0?s(this.props):s(p)),o<=0||a<=0||!v||!v.length?null:V.createElement(Qe,{className:De("recharts-cartesian-axis",l),ref:function(g){n.layerReference=g}},i&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),Cn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,r,i){var o;return V.isValidElement(n)?o=V.cloneElement(n,r):Ge(n)?o=n(r):o=V.createElement(Ll,Wu({},r,{className:"recharts-cartesian-axis-tick-value"}),i),o}}]),t}(R.Component);DP(Sf,"displayName","CartesianAxis");DP(Sf,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var ODe=["x1","y1","x2","y2","key"],SDe=["offset"];function Dl(e){"@babel/helpers - typeof";return Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dl(e)}function dI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CDe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var PDe=function(e){var t=e.fill;if(!t||t==="none")return null;var n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height;return V.createElement("rect",{x:r,y:i,width:o,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function $z(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(Ge(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=hI(t,ODe),u=$e(l,!1);u.offset;var f=hI(u,SDe);n=V.createElement("line",ul({},f,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function ADe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var u=Yn(Yn({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return $z(i,u)});return V.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function kDe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var u=Yn(Yn({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return $z(i,u)});return V.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function NDe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var f=s.map(function(p){return Math.round(p+i-i)}).sort(function(p,v){return p-v});i!==f[0]&&f.unshift(0);var d=f.map(function(p,v){var g=!f[v+1],y=g?i+a-p:f[v+1]-p;if(y<=0)return null;var w=v%t.length;return V.createElement("rect",{key:"react-".concat(v),y:p,x:r,height:y,width:o,stroke:"none",fill:t[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function RDe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var f=u.map(function(p){return Math.round(p+o-o)}).sort(function(p,v){return p-v});o!==f[0]&&f.unshift(0);var d=f.map(function(p,v){var g=!f[v+1],y=g?o+s-p:f[v+1]-p;if(y<=0)return null;var w=v%r.length;return V.createElement("rect",{key:"react-".concat(v),x:p,y:a,width:y,height:l,stroke:"none",fill:r[w],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var LDe=function(e,t){var n=e.xAxis,r=e.width,i=e.height,o=e.offset;return V1(IP(Yn(Yn(Yn({},Sf.defaultProps),n),{},{ticks:Vo(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},MDe=function(e,t){var n=e.yAxis,r=e.width,i=e.height,o=e.offset;return V1(IP(Yn(Yn(Yn({},Sf.defaultProps),n),{},{ticks:Vo(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},gu={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function $P(e){var t,n,r,i,o,a,s=RP(),l=LP(),u=$5e(),f=Yn(Yn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:gu.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:gu.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:gu.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:gu.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:gu.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:gu.verticalFill,x:Ee(e.x)?e.x:u.left,y:Ee(e.y)?e.y:u.top,width:Ee(e.width)?e.width:u.width,height:Ee(e.height)?e.height:u.height}),d=f.x,p=f.y,v=f.width,g=f.height,y=f.syncWithTicks,w=f.horizontalValues,b=f.verticalValues,x=M5e(),_=I5e();if(!Ee(v)||v<=0||!Ee(g)||g<=0||!Ee(d)||d!==+d||!Ee(p)||p!==+p)return null;var S=f.verticalCoordinatesGenerator||LDe,j=f.horizontalCoordinatesGenerator||MDe,E=f.horizontalPoints,C=f.verticalPoints;if((!E||!E.length)&&Ge(j)){var N=w&&w.length,I=j({yAxis:_?Yn(Yn({},_),{},{ticks:N?w:_.ticks}):void 0,width:s,height:l,offset:u},N?!0:y);Bi(Array.isArray(I),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Dl(I),"]")),Array.isArray(I)&&(E=I)}if((!C||!C.length)&&Ge(S)){var M=b&&b.length,D=S({xAxis:x?Yn(Yn({},x),{},{ticks:M?b:x.ticks}):void 0,width:s,height:l,offset:u},M?!0:y);Bi(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Dl(D),"]")),Array.isArray(D)&&(C=D)}return V.createElement("g",{className:"recharts-cartesian-grid"},V.createElement(PDe,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height}),V.createElement(ADe,ul({},f,{offset:u,horizontalPoints:E,xAxis:x,yAxis:_})),V.createElement(kDe,ul({},f,{offset:u,verticalPoints:C,xAxis:x,yAxis:_})),V.createElement(NDe,ul({},f,{horizontalPoints:E})),V.createElement(RDe,ul({},f,{verticalPoints:C})))}$P.displayName="CartesianGrid";var IDe=["type","layout","connectNulls","ref"];function Hc(e){"@babel/helpers - typeof";return Hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hc(e)}function DDe(e,t){if(e==null)return{};var n=$De(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $De(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function eh(){return eh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){v=[].concat(yu(l.slice(0,g)),[d-y]);break}var w=v.length%2===0?[0,p]:[p];return[].concat(yu(t.repeat(l,f)),yu(v),w).map(function(b){return"".concat(b,"px")}).join(", ")}),Ri(Oa(n),"id",Ss("recharts-line-")),Ri(Oa(n),"pathRef",function(a){n.mainCurve=a}),Ri(Oa(n),"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Ri(Oa(n),"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return HDe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,a=i.xAxis,s=i.yAxis,l=i.layout,u=i.children,f=fr(u,wf);if(!f)return null;var d=function(v,g){return{x:v.x,y:v.y,value:v.value,errorVal:Nt(v.payload,g)}},p={clipPath:n?"url(#clipPath-".concat(r,")"):null};return V.createElement(Qe,p,f.map(function(v){return V.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:a,yAxis:s,layout:l,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,r,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.dot,l=a.points,u=a.dataKey,f=$e(this.props,!1),d=$e(s,!0),p=l.map(function(g,y){var w=kr(kr(kr({key:"dot-".concat(y),r:3},f),d),{},{value:g.value,dataKey:u,cx:g.x,cy:g.y,index:y,payload:g.payload});return t.renderDotItem(s,w)}),v={clipPath:n?"url(#clipPath-".concat(r?"":"dots-").concat(i,")"):null};return V.createElement(Qe,eh({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(n,r,i,o){var a=this.props,s=a.type,l=a.layout,u=a.connectNulls;a.ref;var f=DDe(a,IDe),d=kr(kr(kr({},$e(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:s,layout:l,connectNulls:u});return V.createElement(ts,eh({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,r){var i=this,o=this.props,a=o.points,s=o.strokeDasharray,l=o.isAnimationActive,u=o.animationBegin,f=o.animationDuration,d=o.animationEasing,p=o.animationId,v=o.animateNewValues,g=o.width,y=o.height,w=this.state,b=w.prevPoints,x=w.totalLength;return V.createElement(_i,{begin:u,duration:f,isActive:l,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(_){var S=_.t;if(b){var j=b.length/a.length,E=a.map(function(D,z){var q=Math.floor(z*j);if(b[q]){var W=b[q],X=Vt(W.x,D.x),J=Vt(W.y,D.y);return kr(kr({},D),{},{x:X(S),y:J(S)})}if(v){var te=Vt(g*2,D.x),Z=Vt(y/2,D.y);return kr(kr({},D),{},{x:te(S),y:Z(S)})}return kr(kr({},D),{},{x:D.x,y:D.y})});return i.renderCurveStatically(E,n,r)}var C=Vt(0,x),N=C(S),I;if(s){var M="".concat(s).split(/[,\s]+/gim).map(function(D){return parseFloat(D)});I=i.getStrokeDasharray(N,x,M)}else I=i.generateSimpleStrokeDasharray(x,N);return i.renderCurveStatically(a,n,r,{strokeDasharray:I})})}},{key:"renderCurve",value:function(n,r){var i=this.props,o=i.points,a=i.isAnimationActive,s=this.state,l=s.prevPoints,u=s.totalLength;return a&&o&&o.length&&(!l&&u>0||!hs(l,o))?this.renderCurveWithAnimation(n,r):this.renderCurveStatically(o,n,r)}},{key:"render",value:function(){var n,r=this.props,i=r.hide,o=r.dot,a=r.points,s=r.className,l=r.xAxis,u=r.yAxis,f=r.top,d=r.left,p=r.width,v=r.height,g=r.isAnimationActive,y=r.id;if(i||!a||!a.length)return null;var w=this.state.isAnimationFinished,b=a.length===1,x=De("recharts-line",s),_=l&&l.allowDataOverflow,S=u&&u.allowDataOverflow,j=_||S,E=ze(y)?this.id:y,C=(n=$e(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},N=C.r,I=N===void 0?3:N,M=C.strokeWidth,D=M===void 0?2:M,z=D9(o)?o:{},q=z.clipDot,W=q===void 0?!0:q,X=I*2+D;return V.createElement(Qe,{className:x},_||S?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(E)},V.createElement("rect",{x:_?d:d-p/2,y:S?f:f-v/2,width:_?p:p*2,height:S?v:v*2})),!W&&V.createElement("clipPath",{id:"clipPath-dots-".concat(E)},V.createElement("rect",{x:d-X/2,y:f-X/2,width:p+X,height:v+X}))):null,!b&&this.renderCurve(j,E),this.renderErrorBar(j,E),(b||o)&&this.renderDots(j,W,E),(!g||w)&&zi.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,r){return n.animationId!==r.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:r.curPoints}:n.points!==r.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,r){for(var i=n.length%2!==0?[].concat(yu(n),[0]):n,o=[],a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XDe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!hs(u,o)||!hs(f,a))?this.renderAreaWithAnimation(n,r):this.renderAreaStatically(o,a,n,r)}},{key:"render",value:function(){var n,r=this.props,i=r.hide,o=r.dot,a=r.points,s=r.className,l=r.top,u=r.left,f=r.xAxis,d=r.yAxis,p=r.width,v=r.height,g=r.isAnimationActive,y=r.id;if(i||!a||!a.length)return null;var w=this.state.isAnimationFinished,b=a.length===1,x=De("recharts-area",s),_=f&&f.allowDataOverflow,S=d&&d.allowDataOverflow,j=_||S,E=ze(y)?this.id:y,C=(n=$e(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},N=C.r,I=N===void 0?3:N,M=C.strokeWidth,D=M===void 0?2:M,z=D9(o)?o:{},q=z.clipDot,W=q===void 0?!0:q,X=I*2+D;return V.createElement(Qe,{className:x},_||S?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(E)},V.createElement("rect",{x:_?u:u-p/2,y:S?l:l-v/2,width:_?p:p*2,height:S?v:v*2})),!W&&V.createElement("clipPath",{id:"clipPath-dots-".concat(E)},V.createElement("rect",{x:u-X/2,y:l-X/2,width:p+X,height:v+X}))):null,b?null:this.renderArea(j,E),(o||b)&&this.renderDots(j,W,E),(!g||w)&&zi.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,r){return n.animationId!==r.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:n.points!==r.curPoints||n.baseLine!==r.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}]),t}(R.PureComponent);Bz=Gl;ho(Gl,"displayName","Area");ho(Gl,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!pi.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ho(Gl,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(Ee(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,u=l.scale.domain();if(l.type==="number"){var f=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});ho(Gl,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,v=t.layout,g=u&&u.length,y=Bz.getBaseValue(t,n,r,i),w=v==="horizontal",b=!1,x=d.map(function(S,j){var E;g?E=u[f+j]:(E=Nt(S,l),Array.isArray(E)?b=!0:E=[y,E]);var C=E[1]==null||g&&Nt(S,l)==null;return w?{x:Mc({axis:r,ticks:o,bandSize:s,entry:S,index:j}),y:C?null:i.scale(E[1]),value:E,payload:S}:{x:C?null:r.scale(E[1]),y:Mc({axis:i,ticks:a,bandSize:s,entry:S,index:j}),value:E,payload:S}}),_;return g||b?_=x.map(function(S){var j=Array.isArray(S.value)?S.value[0]:null;return w?{x:S.x,y:j!=null&&S.y!=null?i.scale(j):null}:{x:j!=null?r.scale(j):null,y:S.y}}):_=w?i.scale(y):r.scale(y),Sa({points:x,baseLine:_,layout:v,isRange:b},p)});ho(Gl,"renderDotItem",function(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(Ge(e))n=e(t);else{var r=De("recharts-area-dot",typeof e!="boolean"?e.className:"");n=V.createElement(um,cl({},t,{className:r}))}return n});var l_=function(){return null};l_.displayName="ZAxis";l_.defaultProps={zAxisId:0,range:[64,64],scale:"auto",type:"number"};var i8e=["option","isActive"];function th(){return th=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function a8e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function s8e(e){var t=e.option,n=e.isActive,r=o8e(e,i8e);return typeof t=="string"?V.createElement(x0,th({option:V.createElement(Bb,th({type:t},r)),isActive:n,shapeType:"symbols"},r)):V.createElement(x0,th({option:t,isActive:n,shapeType:"symbols"},r))}function Gc(e){"@babel/helpers - typeof";return Gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gc(e)}function nh(){return nh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function I8e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function D8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EI(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?o:e&&e.length&&Ee(r)&&Ee(i)?e.slice(r,i+1):[]};function Jz(e){return e==="number"?[0,"auto"]:void 0}var ej=function(e,t,n,r){var i=e.graphicalItems,o=e.tooltipAxis,a=c_(t,e);return n<0||!i||!i.length||n>=a.length?null:i.reduce(function(s,l){var u,f=(u=l.props.data)!==null&&u!==void 0?u:t;f&&e.dataStartIndex+e.dataEndIndex!==0&&(f=f.slice(e.dataStartIndex,e.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?a:f;d=Dy(p,o.dataKey,r)}else d=f&&f[n]||a[n];return d?[].concat(Kc(s),[K1(l,d)]):s},[])},TI=function(e,t,n,r){var i=r||{x:e.chartX,y:e.chartY},o=K8e(i,n),a=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,u=XNe(o,a,l,s);if(u>=0&&l){var f=l[u]&&l[u].value,d=ej(e,t,u,f),p=Y8e(n,a,u,i);return{activeTooltipIndex:u,activeLabel:f,activePayload:d,activeCoordinate:p}}return null},Z8e=function(e,t){var n=t.axes,r=t.graphicalItems,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,u=e.layout,f=e.children,d=e.stackOffset,p=z1(u,i);return n.reduce(function(v,g){var y,w=g.props,b=w.type,x=w.dataKey,_=w.allowDataOverflow,S=w.allowDuplicatedCategory,j=w.scale,E=w.ticks,C=w.includeHidden,N=g.props[o];if(v[N])return v;var I=c_(e.data,{graphicalItems:r.filter(function(H){return H.props[o]===N}),dataStartIndex:s,dataEndIndex:l}),M=I.length,D,z,q;S8e(g.props.domain,_,b)&&(D=gE(g.props.domain,null,_),p&&(b==="number"||j!=="auto")&&(q=dg(I,x,"category")));var W=Jz(b);if(!D||D.length===0){var X,J=(X=g.props.domain)!==null&&X!==void 0?X:W;if(x){if(D=dg(I,x,b),b==="category"&&p){var te=e_e(D);S&&te?(z=D,D=O0(0,M)):S||(D=B4(J,D,g).reduce(function(H,ne){return H.indexOf(ne)>=0?H:[].concat(Kc(H),[ne])},[]))}else if(b==="category")S?D=D.filter(function(H){return H!==""&&!ze(H)}):D=B4(J,D,g).reduce(function(H,ne){return H.indexOf(ne)>=0||ne===""||ze(ne)?H:[].concat(Kc(H),[ne])},[]);else if(b==="number"){var Z=nRe(I,r.filter(function(H){return H.props[o]===N&&(C||!H.props.hide)}),x,i,u);Z&&(D=Z)}p&&(b==="number"||j!=="auto")&&(q=dg(I,x,"category"))}else p?D=O0(0,M):a&&a[N]&&a[N].hasStack&&b==="number"?D=d==="expand"?[0,1]:q1(a[N].stackGroups,s,l):D=B1(I,r.filter(function(H){return H.props[o]===N&&(C||!H.props.hide)}),b,u,!0);if(b==="number")D=XE(f,D,N,i,E),J&&(D=gE(J,D,_));else if(b==="category"&&J){var B=J,F=D.every(function(H){return B.indexOf(H)>=0});F&&(D=B)}}return ve(ve({},v),{},He({},N,ve(ve({},g.props),{},{axisType:i,domain:D,categoricalDomain:q,duplicateDomain:z,originalDomain:(y=g.props.domain)!==null&&y!==void 0?y:W,isCategorical:p,layout:u})))},{})},X8e=function(e,t){var n=t.graphicalItems,r=t.Axis,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,u=e.layout,f=e.children,d=c_(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),p=d.length,v=z1(u,i),g=-1;return n.reduce(function(y,w){var b=w.props[o],x=Jz("number");if(!y[b]){g++;var _;return v?_=O0(0,p):a&&a[b]&&a[b].hasStack?(_=q1(a[b].stackGroups,s,l),_=XE(f,_,b,i)):(_=gE(x,B1(d,n.filter(function(S){return S.props[o]===b&&!S.props.hide}),"number",u),r.defaultProps.allowDataOverflow),_=XE(f,_,b,i)),ve(ve({},y),{},He({},b,ve(ve({axisType:i},r.defaultProps),{},{hide:!0,orientation:Fr(G8e,"".concat(i,".").concat(g%2),null),domain:_,originalDomain:x,isCategorical:v,layout:u})))}return y},{})},Q8e=function(e,t){var n=t.axisType,r=n===void 0?"xAxis":n,i=t.AxisComp,o=t.graphicalItems,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,u=e.children,f="".concat(r,"Id"),d=fr(u,i),p={};return d&&d.length?p=Z8e(e,{axes:d,graphicalItems:o,axisType:r,axisIdKey:f,stackGroups:a,dataStartIndex:s,dataEndIndex:l}):o&&o.length&&(p=X8e(e,{Axis:i,graphicalItems:o,axisType:r,axisIdKey:f,stackGroups:a,dataStartIndex:s,dataEndIndex:l})),p},J8e=function(e){var t=Ra(e),n=Vo(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:tP(n,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:c0(t,n)}},CI=function(e){var t=e.children,n=e.defaultShowTooltip,r=Lr(t,Bc),i=0,o=0;return e.data&&e.data.length!==0&&(o=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(i=r.props.startIndex),r.props.endIndex>=0&&(o=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},e$e=function(e){return!e||!e.length?!1:e.some(function(t){var n=Wo(t&&t.type);return n&&n.indexOf("Bar")>=0})},PI=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},t$e=function(e,t){var n=e.props,r=e.graphicalItems,i=e.xAxisMap,o=i===void 0?{}:i,a=e.yAxisMap,s=a===void 0?{}:a,l=n.width,u=n.height,f=n.children,d=n.margin||{},p=Lr(f,Bc),v=Lr(f,Wh),g=Object.keys(s).reduce(function(S,j){var E=s[j],C=E.orientation;return!E.mirror&&!E.hide?ve(ve({},S),{},He({},C,S[C]+E.width)):S},{left:d.left||0,right:d.right||0}),y=Object.keys(o).reduce(function(S,j){var E=o[j],C=E.orientation;return!E.mirror&&!E.hide?ve(ve({},S),{},He({},C,Fr(S,"".concat(C))+E.height)):S},{top:d.top||0,bottom:d.bottom||0}),w=ve(ve({},y),g),b=w.bottom;p&&(w.bottom+=p.props.height||Bc.defaultProps.height),v&&t&&(w=eRe(w,r,n,t));var x=l-w.left-w.right,_=u-w.top-w.bottom;return ve(ve({brushBottom:b},w),{},{width:Math.max(x,0),height:Math.max(_,0)})},FP=function(e){var t,n=e.chartName,r=e.GraphicalChild,i=e.defaultTooltipEventType,o=i===void 0?"axis":i,a=e.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=e.axisComponents,u=e.legendContent,f=e.formatAxisMap,d=e.defaultProps,p=function(g,y){var w=y.graphicalItems,b=y.stackGroups,x=y.offset,_=y.updateId,S=y.dataStartIndex,j=y.dataEndIndex,E=g.barSize,C=g.layout,N=g.barGap,I=g.barCategoryGap,M=g.maxBarSize,D=PI(C),z=D.numericAxisName,q=D.cateAxisName,W=e$e(w),X=W&&QNe({barSize:E,stackGroups:b}),J=[];return w.forEach(function(te,Z){var B=c_(g.data,{graphicalItems:[te],dataStartIndex:S,dataEndIndex:j}),F=te.props,H=F.dataKey,ne=F.maxBarSize,Y=te.props["".concat(z,"Id")],ee=te.props["".concat(q,"Id")],ae={},oe=l.reduce(function(me,xe){var Ce=y["".concat(xe.axisType,"Map")],Te=te.props["".concat(xe.axisType,"Id")];Ce&&Ce[Te]||xe.axisType==="zAxis"||Il(!1);var Pe=Ce[Te];return ve(ve({},me),{},He(He({},xe.axisType,Pe),"".concat(xe.axisType,"Ticks"),Vo(Pe)))},ae),fe=oe[q],P=oe["".concat(q,"Ticks")],A=b&&b[Y]&&b[Y].hasStack&&fRe(te,b[Y].stackGroups),U=Wo(te.type).indexOf("Bar")>=0,Q=c0(fe,P),K=[];if(U){var ie,he,Se=ze(ne)?M:ne,se=(ie=(he=c0(fe,P,!0))!==null&&he!==void 0?he:Se)!==null&&ie!==void 0?ie:0;K=JNe({barGap:N,barCategoryGap:I,bandSize:se!==Q?se:Q,sizeList:X[ee],maxBarSize:Se}),se!==Q&&(K=K.map(function(me){return ve(ve({},me),{},{position:ve(ve({},me.position),{},{offset:me.position.offset-se/2})})}))}var pe=te&&te.type&&te.type.getComposedData;pe&&J.push({props:ve(ve({},pe(ve(ve({},oe),{},{displayedData:B,props:g,dataKey:H,item:te,bandSize:Q,barPosition:K,offset:x,stackedData:A,layout:C,dataStartIndex:S,dataEndIndex:j}))),{},He(He(He({key:te.key||"item-".concat(Z)},z,oe[z]),q,oe[q]),"animationId",_)),childIndex:d_e(te,g.children),item:te})}),J},v=function(g,y){var w=g.props,b=g.dataStartIndex,x=g.dataEndIndex,_=g.updateId;if(!NL({props:w}))return null;var S=w.children,j=w.layout,E=w.stackOffset,C=w.data,N=w.reverseStackOrder,I=PI(j),M=I.numericAxisName,D=I.cateAxisName,z=fr(S,r),q=uRe(C,z,"".concat(M,"Id"),"".concat(D,"Id"),E,N),W=l.reduce(function(B,F){var H="".concat(F.axisType,"Map");return ve(ve({},B),{},He({},H,Q8e(w,ve(ve({},F),{},{graphicalItems:z,stackGroups:F.axisType===M&&q,dataStartIndex:b,dataEndIndex:x}))))},{}),X=t$e(ve(ve({},W),{},{props:w,graphicalItems:z}),y==null?void 0:y.legendBBox);Object.keys(W).forEach(function(B){W[B]=f(w,W[B],X,B.replace("Map",""),n)});var J=W["".concat(D,"Map")],te=J8e(J),Z=p(w,ve(ve({},W),{},{dataStartIndex:b,dataEndIndex:x,updateId:_,graphicalItems:z,stackGroups:q,offset:X}));return ve(ve({formattedGraphicalItems:Z,graphicalItems:z,offset:X,stackGroups:q},te),W)};return t=function(g){B8e(y,g);function y(w){var b,x,_;return D8e(this,y),_=F8e(this,y,[w]),He(ct(_),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),He(ct(_),"accessibilityManager",new O8e),He(ct(_),"handleLegendBBoxUpdate",function(S){if(S){var j=_.state,E=j.dataStartIndex,C=j.dataEndIndex,N=j.updateId;_.setState(ve({legendBBox:S},v({props:_.props,dataStartIndex:E,dataEndIndex:C,updateId:N},ve(ve({},_.state),{},{legendBBox:S}))))}}),He(ct(_),"handleReceiveSyncEvent",function(S,j,E){if(_.props.syncId===S){if(E===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(j)}}),He(ct(_),"handleBrushChange",function(S){var j=S.startIndex,E=S.endIndex;if(j!==_.state.dataStartIndex||E!==_.state.dataEndIndex){var C=_.state.updateId;_.setState(function(){return ve({dataStartIndex:j,dataEndIndex:E},v({props:_.props,dataStartIndex:j,dataEndIndex:E,updateId:C},_.state))}),_.triggerSyncEvent({dataStartIndex:j,dataEndIndex:E})}}),He(ct(_),"handleMouseEnter",function(S){var j=_.getMouseInfo(S);if(j){var E=ve(ve({},j),{},{isTooltipActive:!0});_.setState(E),_.triggerSyncEvent(E);var C=_.props.onMouseEnter;Ge(C)&&C(E,S)}}),He(ct(_),"triggeredAfterMouseMove",function(S){var j=_.getMouseInfo(S),E=j?ve(ve({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(E),_.triggerSyncEvent(E);var C=_.props.onMouseMove;Ge(C)&&C(E,S)}),He(ct(_),"handleItemMouseEnter",function(S){_.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),He(ct(_),"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),He(ct(_),"handleMouseMove",function(S){S.persist(),_.throttleTriggeredAfterMouseMove(S)}),He(ct(_),"handleMouseLeave",function(S){_.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};_.setState(j),_.triggerSyncEvent(j);var E=_.props.onMouseLeave;Ge(E)&&E(j,S)}),He(ct(_),"handleOuterEvent",function(S){var j=f_e(S),E=Fr(_.props,"".concat(j));if(j&&Ge(E)){var C,N;/.*touch.*/i.test(j)?N=_.getMouseInfo(S.changedTouches[0]):N=_.getMouseInfo(S),E((C=N)!==null&&C!==void 0?C:{},S)}}),He(ct(_),"handleClick",function(S){var j=_.getMouseInfo(S);if(j){var E=ve(ve({},j),{},{isTooltipActive:!0});_.setState(E),_.triggerSyncEvent(E);var C=_.props.onClick;Ge(C)&&C(E,S)}}),He(ct(_),"handleMouseDown",function(S){var j=_.props.onMouseDown;if(Ge(j)){var E=_.getMouseInfo(S);j(E,S)}}),He(ct(_),"handleMouseUp",function(S){var j=_.props.onMouseUp;if(Ge(j)){var E=_.getMouseInfo(S);j(E,S)}}),He(ct(_),"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),He(ct(_),"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&_.handleMouseDown(S.changedTouches[0])}),He(ct(_),"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&_.handleMouseUp(S.changedTouches[0])}),He(ct(_),"triggerSyncEvent",function(S){_.props.syncId!==void 0&&bw.emit(_w,_.props.syncId,S,_.eventEmitterSymbol)}),He(ct(_),"applySyncEvent",function(S){var j=_.props,E=j.layout,C=j.syncMethod,N=_.state.updateId,I=S.dataStartIndex,M=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)_.setState(ve({dataStartIndex:I,dataEndIndex:M},v({props:_.props,dataStartIndex:I,dataEndIndex:M,updateId:N},_.state)));else if(S.activeTooltipIndex!==void 0){var D=S.chartX,z=S.chartY,q=S.activeTooltipIndex,W=_.state,X=W.offset,J=W.tooltipTicks;if(!X)return;if(typeof C=="function")q=C(J,S);else if(C==="value"){q=-1;for(var te=0;te=0){var A,U;if(D.dataKey&&!D.allowDuplicatedCategory){var Q=typeof D.dataKey=="function"?P:"payload.".concat(D.dataKey.toString());A=Dy(te,Q,q),U=Z&&B&&Dy(B,Q,q)}else A=te==null?void 0:te[z],U=Z&&B&&B[z];if(ee||Y){var K=S.props.activeIndex!==void 0?S.props.activeIndex:z;return[R.cloneElement(S,ve(ve(ve({},C.props),oe),{},{activeIndex:K})),null,null]}if(!ze(A))return[fe].concat(Kc(_.renderActivePoints({item:C,activePoint:A,basePoint:U,childIndex:z,isRange:Z})))}else{var ie,he=(ie=_.getItemByXY(_.state.activeCoordinate))!==null&&ie!==void 0?ie:{graphicalItem:fe},Se=he.graphicalItem,se=Se.item,pe=se===void 0?S:se,me=Se.childIndex,xe=ve(ve(ve({},C.props),oe),{},{activeIndex:me});return[R.cloneElement(pe,xe),null,null]}return Z?[fe,null,null]:[fe,null]}),He(ct(_),"renderCustomized",function(S,j,E){return R.cloneElement(S,ve(ve({key:"recharts-customized-".concat(E)},_.props),_.state))}),He(ct(_),"renderMap",{CartesianGrid:{handler:Lv,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:Lv},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:Lv},YAxis:{handler:Lv},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((b=w.id)!==null&&b!==void 0?b:Ss("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=BB(_.triggeredAfterMouseMove,(x=w.throttleDelay)!==null&&x!==void 0?x:1e3/60),_.state={},_}return $8e(y,[{key:"componentDidMount",value:function(){var w,b;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(b=this.props.margin.top)!==null&&b!==void 0?b:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,b=w.children,x=w.data,_=w.height,S=w.layout,j=Lr(b,ni);if(j){var E=j.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length)){var C=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,N=ej(this.state,x,E,C),I=this.state.tooltipTicks[E].coordinate,M=(this.state.offset.top+_)/2,D=S==="horizontal",z=D?{x:I,y:M}:{y:I,x:M},q=this.state.formattedGraphicalItems.find(function(X){var J=X.item;return J.type.name==="Scatter"});q&&(z=ve(ve({},z),q.props.points[E].tooltipPosition),N=q.props.points[E].tooltipPayload);var W={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:C,activePayload:N,activeCoordinate:z};this.setState(W),this.renderCursor(j),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,b){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==b.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var x,_;this.accessibilityManager.setDetails({offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0}})}return null}},{key:"componentDidUpdate",value:function(w){LS([Lr(w.children,ni)],[Lr(this.props.children,ni)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=Lr(this.props.children,ni);if(w&&typeof w.props.shared=="boolean"){var b=w.props.shared?"axis":"item";return s.indexOf(b)>=0?b:o}return o}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var b=this.container,x=b.getBoundingClientRect(),_=RPe(x),S={chartX:Math.round(w.pageX-_.left),chartY:Math.round(w.pageY-_.top)},j=x.width/b.offsetWidth||1,E=this.inRange(S.chartX,S.chartY,j);if(!E)return null;var C=this.state,N=C.xAxisMap,I=C.yAxisMap,M=this.getTooltipEventType();if(M!=="axis"&&N&&I){var D=Ra(N).scale,z=Ra(I).scale,q=D&&D.invert?D.invert(S.chartX):null,W=z&&z.invert?z.invert(S.chartY):null;return ve(ve({},S),{},{xValue:q,yValue:W})}var X=TI(this.state,this.props.data,this.props.layout,E);return X?ve(ve({},S),X):null}},{key:"inRange",value:function(w,b){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=this.props.layout,S=w/x,j=b/x;if(_==="horizontal"||_==="vertical"){var E=this.state.offset,C=S>=E.left&&S<=E.left+E.width&&j>=E.top&&j<=E.top+E.height;return C?{x:S,y:j}:null}var N=this.state,I=N.angleAxisMap,M=N.radiusAxisMap;if(I&&M){var D=Ra(I);return H4({x:S,y:j},D)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,b=this.getTooltipEventType(),x=Lr(w,ni),_={};x&&b==="axis"&&(x.props.trigger==="click"?_={onClick:this.handleClick}:_={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var S=$y(this.props,this.handleOuterEvent);return ve(ve({},S),_)}},{key:"addListener",value:function(){bw.on(_w,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){bw.removeListener(_w,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,b,x){for(var _=this.state.formattedGraphicalItems,S=0,j=_.length;SAI[e%AI.length],L0="#46e587",a$e="rgba(70, 229, 135, 0.4)",s$e=({chartData:e,showNumbers:t})=>m.jsx("ul",{className:"doughnut-chart-legend",children:e.map(({name:n,color:r,value:i})=>m.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[m.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:r}}),m.jsxs("small",{className:"doughnut-chart-legend__item-text flex-fill",children:[n,t&&m.jsxs("b",{children:[" (",Zt(i),")"]})]})]},n))}),kI=e=>R.useMemo(()=>Object.entries(e).map(([t,n],r)=>({name:t,value:n,color:nV(r)})),[e]),l$e=({stats:e,prevStats:t,showNumbersInLegend:n,dimensions:r})=>{const i=kI(e),o=kI(t),a=o.length>0,s=JT()?Gle:Wle;return m.jsxs("div",{className:"row align-items-center",children:[m.jsx("div",{className:"col-sm-12 col-md-7",children:m.jsx("div",{style:r??{width:"100%",height:300},children:m.jsx(r?R.Fragment:rP,{children:m.jsxs(r$e,{...r,children:[m.jsx(ni,{formatter:Zt,contentStyle:eV,itemStyle:{color:"white"}}),m.jsx(Eo,{data:i,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"100%",innerRadius:a?"65%":"50%",animationBegin:0,children:i.map((l,u)=>m.jsx(Ja,{fill:l.color,stroke:s},`${l.name}-${u}`))}),a&&m.jsx(Eo,{data:o,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"55%",innerRadius:"20%",animationBegin:0,stroke:s,fill:L0})]})})})}),m.jsx("div",{className:"col-sm-12 col-md-5",children:m.jsx(s$e,{chartData:i,showNumbers:n})})]})},NI=({title:e,...t})=>{const[n,r]=Xt(!1);return m.jsx(E9,{title:m.jsxs(m.Fragment,{children:[e,m.jsx("div",{className:"float-end",children:m.jsx(Pl,{checked:n,onChange:r,children:"Show numbers"})})]}),children:m.jsx(l$e,{...t,showNumbersInLegend:n})})},u$e=({visitsGroups:e})=>{const t=R.useMemo(()=>Object.entries(e),[e]);return t.length===0?null:m.jsx("ul",{className:"list-unstyled mb-0 mt-2 d-flex flex-wrap justify-content-center gap-3",children:t.map(([n,r],i)=>m.jsxs("li",{className:"d-inline",children:[m.jsx(d9,{color:rV(r)}),m.jsxs("strong",{children:[n," (",Zt(r.length),")"]})]},`${n}${i}`))})},c$e={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},f$e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},d$e={hourly:Jce,daily:Yp,weekly:rfe,monthly:Ty},UP={hourly:e=>Cy(e,"yyyy-MM-dd HH:00"),daily:e=>Fa(e),weekly(e){const t=Fa(Uh(e)),n=Fa(afe(e));return`${t} - ${n}`},monthly:e=>Cy(e,"yyyy-MM")},h$e=e=>{var t;const n=Object.values(e).filter(a=>a.length>0);if(n.length===0)return"monthly";const r=new Date,i=n.map(a=>ls(a[a.length-1].date)),o=WF(i);return((t=[[()=>Yp(r,o)<=2,"hourly"],[()=>Ty(r,o)<=1,"daily"],[()=>Ty(r,o)<=6,"weekly"]].find(([a])=>a()))==null?void 0:t[1])??"monthly"},p$e=(e,t)=>Object.keys(t).reduce((n,r)=>(n[r]=DF(t[r],i=>UP[e](ls(i.date))),n),{}),m$e=(e,t)=>t.reduce((n,r)=>{const i=UP[e](ls(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),v$e=(e,t)=>{const n=Object.values(t).filter(d=>d.length>0).map(d=>[...d].reverse());if(n.length===0)return[];const r=d$e[e],i=UP[e],o=f$e[e],a=n.map(d=>ls(d[0].date)),s=n.map(d=>ls(d[d.length-1].date)),l=WF(s),u=Yce(a),f=r(l,u)+1;return[i(u),...OC(f,d=>i(Wce(u,o(d))))]},rV=e=>{if(e.color)return e.color;const t={main:Mh,highlighted:fS,previous:L0};return e.type?t[e.type]:Mh},RI=(e,t)=>R.useMemo(()=>Object.values(e).find(n=>n.type===t)??[],[e,t]),g$e=(e,t,n)=>{const r=RI(e,"main"),i=RI(e,"highlighted"),o=R.useMemo(()=>n?m$e(t,r):{},[n,t,r]),a=R.useCallback((s,{payload:l})=>{const u=o[l.date]??[];n==null||n(u===i?[]:u)},[o,i,n]);return n&&{cursor:"pointer",onClick:a}},iV=({visitsGroups:e,setSelectedVisits:t,dimensions:n,matchMedia:r})=>{const[i,o]=R.useState(h$e(e)),a=EC(767,r??window.matchMedia),s=R.useMemo(()=>{const d=p$e(i,e),p=Object.keys(d);return v$e(i,e).map(v=>({date:v,...p.reduce((g,y)=>(g[y]=d[y][v]??0,g),{})}))},[i,e]),l=g$e(e,i,t),u=n?R.Fragment:rP,f=R.useMemo(()=>n?{}:{width:"100%",height:a?300:400},[n,a]);return m.jsxs(jr,{children:[m.jsxs(xc,{role:"heading","aria-level":4,children:["Visits over time",m.jsx("div",{className:"float-end",children:m.jsxs(Vp,{children:[m.jsx(nf,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),m.jsx(tf,{end:!0,children:Object.entries(c$e).map(([d,p])=>m.jsx(ke,{active:i===d,onClick:()=>o(d),children:p},d))})]})})]}),m.jsxs(_c,{children:[m.jsx(u,{...f,children:m.jsxs(n$e,{data:s,...n,children:[m.jsx(jf,{dataKey:"date"}),m.jsx(Tf,{tickFormatter:Zt}),m.jsx(ni,{formatter:Zt,...tV}),m.jsx($P,{strokeOpacity:JT()?.1:.9}),Object.entries(e).map(([d,p])=>p.length>0&&m.jsx(Ef,{dataKey:d,type:"monotone",stroke:rV(p),strokeWidth:2,activeDot:p.type==="previous"?void 0:l,strokeDasharray:p.type==="previous"?"8 3":void 0},d))]})}),m.jsx(u$e,{visitsGroups:e})]})]})},y$e=({toggleClassName:e,ranges:t,value:n,setValue:r})=>m.jsxs(Vp,{children:[m.jsx(nf,{caret:!0,color:"link",className:e,children:"Paginate"}),m.jsxs(tf,{end:!0,children:[t.map(i=>m.jsxs(ke,{active:i===n,onClick:()=>r(i),children:[m.jsx("b",{children:i})," items per page"]},i)),m.jsx(ke,{divider:!0,tag:"hr"}),m.jsx(ke,{disabled:n===1/0,onClick:()=>r(1/0),children:m.jsx("i",{children:"Clear pagination"})})]})]}),LI=e=>e.startsWith("hidden_"),b$e=({stats:e,prevStats:t,highlightedStats:n,highlightedLabel:r,max:i,onClick:o,dimensions:a})=>{const s=R.useMemo(()=>Object.entries(e).map(([d,p])=>{const v=(n==null?void 0:n[d])??0,g=(t==null?void 0:t[d])??0,y=LI(d);return{name:d,amount:Math.max(p,g),nonHighlightedAmount:y?null:p-v,highlightedAmount:y?null:v,prevAmount:y?null:g}}),[e,t,n]),l=R.useMemo(()=>{const d=s.reduce((p,{name:v})=>p>v.length?p:v.length,0);return Math.min(150,d*7)},[s]),u=a?R.Fragment:rP,f=R.useMemo(()=>a?{}:{width:"100%",height:Math.max(300,s.length*(t?44:22))},[a,s.length,t]);return m.jsx(u,{...f,children:m.jsxs(i$e,{layout:"vertical",data:s,barCategoryGap:3,...a,children:[m.jsx(jf,{type:"number",dataKey:"amount",tickFormatter:Zt,domain:i?[0,i]:void 0}),m.jsx(Tf,{type:"category",dataKey:"name",width:l,interval:0,style:{fontSize:".8rem"},tickFormatter:d=>LI(d)?"":d}),m.jsx($P,{strokeOpacity:JT()?.05:.9}),m.jsx(ni,{filterNull:!0,...tV,formatter:(d,p)=>[Zt(d),p==="highlightedAmount"?r:p==="prevAmount"?"Previous period":n?"Non-selected":"Visits"]}),m.jsx(qo,{dataKey:"nonHighlightedAmount",stackId:"main",cursor:"pointer",fill:Mh,onClick:({name:d})=>o==null?void 0:o(d),children:s.map(d=>m.jsx(Ja,{fill:Vle,stroke:Mh,strokeWidth:2},d.name))}),n&&m.jsx(qo,{dataKey:"highlightedAmount",stackId:"main",cursor:"pointer",fill:fS,onClick:({name:d})=>o==null?void 0:o(d),children:s.map(d=>m.jsx(Ja,{fill:Hle,stroke:fS,strokeWidth:2},d.name))}),t&&m.jsx(qo,{dataKey:"prevAmount",fill:L0,children:s.map(d=>m.jsx(Ja,{fill:a$e,stroke:L0,strokeWidth:2},d.name))})]})})},_$e=e=>typeof e=="string"?e.toLowerCase():e,x$e=([e])=>e,w$e=([,e])=>e,Mv=({stats:e,prevStats:t,highlightedStats:n,title:r,sortingItems:i,extraHeaderContent:o,withPagination:a=!0,...s})=>{const[l,u]=R.useState({}),[f,d]=R.useState(1),[p,v]=R.useState(50),g=R.useCallback((N,I)=>{const M=Object.entries(N),D=l.field?Bce(M,([z,q])=>_$e(l.field===Object.keys(I)[0]?z:q)):M;return!l.dir||l.dir==="ASC"?D:[...D].reverse()},[l.dir,l.field]),y=R.useCallback(N=>{const I=N[f-1];if(f[`hidden_${D}`,0])]},[f]),w=R.useCallback(N=>m.jsx(RC,{currentPage:f,pagesCount:N,setCurrentPage:d}),[f]),b=R.useCallback((N,I,M,D)=>{const z=g(N,I),q=z.map(x$e),W=M&&Object.entries({...jR(q,q.map(()=>0)),...M}),X=D&&Object.entries({...jR(q,q.map(()=>0)),...D});if(z.length<=p)return{currentPageStats:Object.fromEntries(z),currentPageHighlightedStats:W&&Object.fromEntries(W),currentPagePrevStats:X&&Object.fromEntries(X)};const J=ec(z,p),te=W&&ec(W,p),Z=X&&ec(X,p);return{currentPageStats:Object.fromEntries(y(J)),currentPageHighlightedStats:te&&Object.fromEntries(y(te)),currentPagePrevStats:Z&&Object.fromEntries(y(Z)),pagination:w(J.length),max:jhe(Math.max(...z.map(w$e)))}},[y,g,p,w]),{currentPageStats:x,currentPagePrevStats:_,currentPageHighlightedStats:S,pagination:j,max:E}=R.useMemo(()=>b(e,i,n&&Object.keys(n).length>0?n:void 0,t&&Object.keys(t).length>0?t:void 0),[b,n,t,i,e]),C=R.useMemo(()=>Object.keys(x),[x]);return m.jsx(E9,{title:m.jsxs(m.Fragment,{children:[r,m.jsx("div",{className:"float-end",children:m.jsx(Kp,{isButton:!1,right:!0,items:i,order:l,onChange:(N,I)=>{u({field:N,dir:I}),d(1)}})}),a&&Object.keys(e).length>50&&m.jsx("div",{className:"float-end",children:m.jsx(y$e,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:p,setValue:N=>{v(N),d(1)}})}),o&&m.jsx("div",{className:"float-end",children:o(j?C:void 0)})]}),footer:j,children:m.jsx(b$e,{stats:x,prevStats:_,highlightedStats:S,max:E,...s})})},MI=(e,t)=>{if(!(!t||!(e in t)))return t[e]&&cs(t[e])||""},oV=()=>{const e=jo(),t=Gp(),{startDate:n,endDate:r,orphanVisitsType:i,excludeBots:o,loadPrevInterval:a,...s}=t,l=R.useMemo(()=>({dateRange:n!=null||r!=null?eU(n,r):void 0,visitsFilter:{orphanVisitsType:i,excludeBots:o!==void 0?o==="true":void 0},loadPrevInterval:a!==void 0?a==="true":void 0}),[r,o,a,i,n]),u=R.useCallback(f=>{const{dateRange:d,visitsFilter:p={},loadPrevInterval:v}=$F(l,f),{excludeBots:g,orphanVisitsType:y}=p,w={...s,startDate:MI("startDate",d),endDate:MI("endDate",d),excludeBots:g===void 0?void 0:_S(g),orphanVisitsType:y,loadPrevInterval:v===void 0?void 0:_S(v)},b=pb(w),x=b?`?${b}`:"";e(x,{replace:!0,relative:"route"})},[l,e,s]);return[l,u]};function aV(e,t){const n=R.useRef(t);R.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const O$e=1;function S$e(e){return Object.freeze({__version:O$e,map:e})}function E$e(e,t){return Object.freeze({...e,...t})}const sV=R.createContext(null),lV=sV.Provider;function uV(){const e=R.useContext(sV);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function j$e(e){function t(n,r){const{instance:i,context:o}=e(n).current;return R.useImperativeHandle(r,()=>i),n.children==null?null:V.createElement(lV,{value:o},n.children)}return R.forwardRef(t)}function T$e(e){function t(n,r){const[i,o]=R.useState(!1),{instance:a}=e(n,o).current;R.useImperativeHandle(r,()=>a),R.useEffect(function(){i&&a.update()},[a,i,n.children]);const s=a._contentNode;return s?J0.createPortal(n.children,s):null}return R.forwardRef(t)}function C$e(e){function t(n,r){const{instance:i}=e(n).current;return R.useImperativeHandle(r,()=>i),null}return R.forwardRef(t)}function cV(e,t){const n=R.useRef();R.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function BP(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function P$e(e,t){return function(n,r){const i=uV(),o=e(BP(n,i),i);return aV(i.map,n.attribution),cV(o.current,n.eventHandlers),t(o.current,i,n,r),o}}var tj={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade */(function(e,t){(function(n,r){r(t)})(Bu,function(n){var r="1.9.4";function i(c){var h,O,T,k;for(O=1,T=arguments.length;O"u"||!L||!L.Mixin)){c=_(c)?c:[c];for(var h=0;h0?Math.floor(c):Math.ceil(c)};Z.prototype={clone:function(){return new Z(this.x,this.y)},add:function(c){return this.clone()._add(F(c))},_add:function(c){return this.x+=c.x,this.y+=c.y,this},subtract:function(c){return this.clone()._subtract(F(c))},_subtract:function(c){return this.x-=c.x,this.y-=c.y,this},divideBy:function(c){return this.clone()._divideBy(c)},_divideBy:function(c){return this.x/=c,this.y/=c,this},multiplyBy:function(c){return this.clone()._multiplyBy(c)},_multiplyBy:function(c){return this.x*=c,this.y*=c,this},scaleBy:function(c){return new Z(this.x*c.x,this.y*c.y)},unscaleBy:function(c){return new Z(this.x/c.x,this.y/c.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=B(this.x),this.y=B(this.y),this},distanceTo:function(c){c=F(c);var h=c.x-this.x,O=c.y-this.y;return Math.sqrt(h*h+O*O)},equals:function(c){return c=F(c),c.x===this.x&&c.y===this.y},contains:function(c){return c=F(c),Math.abs(c.x)<=Math.abs(this.x)&&Math.abs(c.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function F(c,h,O){return c instanceof Z?c:_(c)?new Z(c[0],c[1]):c==null?c:typeof c=="object"&&"x"in c&&"y"in c?new Z(c.x,c.y):new Z(c,h,O)}function H(c,h){if(c)for(var O=h?[c,h]:c,T=0,k=O.length;T=this.min.x&&O.x<=this.max.x&&h.y>=this.min.y&&O.y<=this.max.y},intersects:function(c){c=ne(c);var h=this.min,O=this.max,T=c.min,k=c.max,G=k.x>=h.x&&T.x<=O.x,re=k.y>=h.y&&T.y<=O.y;return G&&re},overlaps:function(c){c=ne(c);var h=this.min,O=this.max,T=c.min,k=c.max,G=k.x>h.x&&T.xh.y&&T.y=h.lat&&k.lat<=O.lat&&T.lng>=h.lng&&k.lng<=O.lng},intersects:function(c){c=ee(c);var h=this._southWest,O=this._northEast,T=c.getSouthWest(),k=c.getNorthEast(),G=k.lat>=h.lat&&T.lat<=O.lat,re=k.lng>=h.lng&&T.lng<=O.lng;return G&&re},overlaps:function(c){c=ee(c);var h=this._southWest,O=this._northEast,T=c.getSouthWest(),k=c.getNorthEast(),G=k.lat>h.lat&&T.lath.lng&&T.lng1,Qt=function(){var c=!1;try{var h=Object.defineProperty({},"passive",{get:function(){c=!0}});window.addEventListener("testPassiveEventSupport",d,h),window.removeEventListener("testPassiveEventSupport",d,h)}catch{}return c}(),Jn=function(){return!!document.createElement("canvas").getContext}(),Rn=!!(document.createElementNS&&Se("svg").createSVGRect),Ln=!!Rn&&function(){var c=document.createElement("div");return c.innerHTML="",(c.firstChild&&c.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),cn=!Rn&&function(){try{var c=document.createElement("div");c.innerHTML='';var h=c.firstChild;return h.style.behavior="url(#default#VML)",h&&typeof h.adj=="object"}catch{return!1}}(),Si=navigator.platform.indexOf("Mac")===0,Ei=navigator.platform.indexOf("Linux")===0;function Mn(c){return navigator.userAgent.toLowerCase().indexOf(c)>=0}var Ue={ie:me,ielt9:xe,edge:Ce,webkit:Te,android:Pe,android23:le,androidStock:ye,opera:ge,chrome:we,gecko:Ae,safari:Ne,phantom:tt,opera12:rt,win:Ze,ie3d:qt,webkit3d:Ut,gecko3d:_n,any3d:Qn,mobile:Xi,mobileWebkit:Nn,mobileWebkit3d:Af,msPointer:Qi,pointer:pm,touch:vm,touchNative:mm,mobileOpera:kf,mobileGecko:Cs,retina:on,passiveEvents:Qt,canvas:Jn,svg:Rn,vml:cn,inlineSvg:Ln,mac:Si,linux:Ei},QP=Ue.msPointer?"MSPointerDown":"pointerdown",JP=Ue.msPointer?"MSPointerMove":"pointermove",eA=Ue.msPointer?"MSPointerUp":"pointerup",tA=Ue.msPointer?"MSPointerCancel":"pointercancel",d_={touchstart:QP,touchmove:JP,touchend:eA,touchcancel:tA},nA={touchstart:yH,touchmove:gm,touchend:gm,touchcancel:gm},Kl={},rA=!1;function hH(c,h,O){return h==="touchstart"&&gH(),nA[h]?(O=nA[h].bind(this,O),c.addEventListener(d_[h],O,!1),O):(console.warn("wrong event specified:",h),d)}function pH(c,h,O){if(!d_[h]){console.warn("wrong event specified:",h);return}c.removeEventListener(d_[h],O,!1)}function mH(c){Kl[c.pointerId]=c}function vH(c){Kl[c.pointerId]&&(Kl[c.pointerId]=c)}function iA(c){delete Kl[c.pointerId]}function gH(){rA||(document.addEventListener(QP,mH,!0),document.addEventListener(JP,vH,!0),document.addEventListener(eA,iA,!0),document.addEventListener(tA,iA,!0),rA=!0)}function gm(c,h){if(h.pointerType!==(h.MSPOINTER_TYPE_MOUSE||"mouse")){h.touches=[];for(var O in Kl)h.touches.push(Kl[O]);h.changedTouches=[h],c(h)}}function yH(c,h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&In(h),gm(c,h)}function bH(c){var h={},O,T;for(T in c)O=c[T],h[T]=O&&O.bind?O.bind(c):O;return c=h,h.type="dblclick",h.detail=2,h.isTrusted=!1,h._simulated=!0,h}var _H=200;function xH(c,h){c.addEventListener("dblclick",h);var O=0,T;function k(G){if(G.detail!==1){T=G.detail;return}if(!(G.pointerType==="mouse"||G.sourceCapabilities&&!G.sourceCapabilities.firesTouchEvents)){var re=uA(G);if(!(re.some(function(de){return de instanceof HTMLLabelElement&&de.attributes.for})&&!re.some(function(de){return de instanceof HTMLInputElement||de instanceof HTMLSelectElement}))){var ue=Date.now();ue-O<=_H?(T++,T===2&&h(bH(G))):T=1,O=ue}}}return c.addEventListener("click",k),{dblclick:h,simDblclick:k}}function wH(c,h){c.removeEventListener("dblclick",h.dblclick),c.removeEventListener("click",h.simDblclick)}var h_=_m(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Nf=_m(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),oA=Nf==="webkitTransition"||Nf==="OTransition"?Nf+"End":"transitionend";function aA(c){return typeof c=="string"?document.getElementById(c):c}function Rf(c,h){var O=c.style[h]||c.currentStyle&&c.currentStyle[h];if((!O||O==="auto")&&document.defaultView){var T=document.defaultView.getComputedStyle(c,null);O=T?T[h]:null}return O==="auto"?null:O}function dt(c,h,O){var T=document.createElement(c);return T.className=h||"",O&&O.appendChild(T),T}function Bt(c){var h=c.parentNode;h&&h.removeChild(c)}function ym(c){for(;c.firstChild;)c.removeChild(c.firstChild)}function Yl(c){var h=c.parentNode;h&&h.lastChild!==c&&h.appendChild(c)}function Zl(c){var h=c.parentNode;h&&h.firstChild!==c&&h.insertBefore(c,h.firstChild)}function p_(c,h){if(c.classList!==void 0)return c.classList.contains(h);var O=bm(c);return O.length>0&&new RegExp("(^|\\s)"+h+"(\\s|$)").test(O)}function et(c,h){if(c.classList!==void 0)for(var O=g(h),T=0,k=O.length;T0?2*window.devicePixelRatio:1;function fA(c){return Ue.edge?c.wheelDeltaY/2:c.deltaY&&c.deltaMode===0?-c.deltaY/EH:c.deltaY&&c.deltaMode===1?-c.deltaY*20:c.deltaY&&c.deltaMode===2?-c.deltaY*60:c.deltaX||c.deltaZ?0:c.wheelDelta?(c.wheelDeltaY||c.wheelDelta)/2:c.detail&&Math.abs(c.detail)<32765?-c.detail*20:c.detail?c.detail/-32765*60:0}function j_(c,h){var O=h.relatedTarget;if(!O)return!0;try{for(;O&&O!==c;)O=O.parentNode}catch{return!1}return O!==c}var jH={__proto__:null,on:Xe,off:wt,stopPropagation:ks,disableScrollPropagation:E_,disableClickPropagation:Df,preventDefault:In,stop:Ns,getPropagationPath:uA,getMousePosition:cA,getWheelDelta:fA,isExternalTarget:j_,addListener:Xe,removeListener:wt},dA=te.extend({run:function(c,h,O,T){this.stop(),this._el=c,this._inProgress=!0,this._duration=O||.25,this._easeOutPower=1/Math.max(T||.5,.2),this._startPos=As(c),this._offset=h.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=D(this._animate,this),this._step()},_step:function(c){var h=+new Date-this._startTime,O=this._duration*1e3;hthis.options.maxZoom)?this.setZoom(c):this},panInsideBounds:function(c,h){this._enforcingBounds=!0;var O=this.getCenter(),T=this._limitCenter(O,this._zoom,ee(c));return O.equals(T)||this.panTo(T,h),this._enforcingBounds=!1,this},panInside:function(c,h){h=h||{};var O=F(h.paddingTopLeft||h.padding||[0,0]),T=F(h.paddingBottomRight||h.padding||[0,0]),k=this.project(this.getCenter()),G=this.project(c),re=this.getPixelBounds(),ue=ne([re.min.add(O),re.max.subtract(T)]),de=ue.getSize();if(!ue.contains(G)){this._enforcingBounds=!0;var _e=G.subtract(ue.getCenter()),Re=ue.extend(G).getSize().subtract(de);k.x+=_e.x<0?-Re.x:Re.x,k.y+=_e.y<0?-Re.y:Re.y,this.panTo(this.unproject(k),h),this._enforcingBounds=!1}return this},invalidateSize:function(c){if(!this._loaded)return this;c=i({animate:!1,pan:!0},c===!0?{animate:!0}:c);var h=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var O=this.getSize(),T=h.divideBy(2).round(),k=O.divideBy(2).round(),G=T.subtract(k);return!G.x&&!G.y?this:(c.animate&&c.pan?this.panBy(G):(c.pan&&this._rawPanBy(G),this.fire("move"),c.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:h,newSize:O}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(c){if(c=this._locateOptions=i({timeout:1e4,watch:!1},c),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var h=a(this._handleGeolocationResponse,this),O=a(this._handleGeolocationError,this);return c.watch?this._locationWatchId=navigator.geolocation.watchPosition(h,O,c):navigator.geolocation.getCurrentPosition(h,O,c),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(c){if(this._container._leaflet_id){var h=c.code,O=c.message||(h===1?"permission denied":h===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:h,message:"Geolocation error: "+O+"."})}},_handleGeolocationResponse:function(c){if(this._container._leaflet_id){var h=c.coords.latitude,O=c.coords.longitude,T=new ae(h,O),k=T.toBounds(c.coords.accuracy*2),G=this._locateOptions;if(G.setView){var re=this.getBoundsZoom(k);this.setView(T,G.maxZoom?Math.min(re,G.maxZoom):re)}var ue={latlng:T,bounds:k,timestamp:c.timestamp};for(var de in c.coords)typeof c.coords[de]=="number"&&(ue[de]=c.coords[de]);this.fire("locationfound",ue)}},addHandler:function(c,h){if(!h)return this;var O=this[c]=new h(this);return this._handlers.push(O),this.options[c]&&O.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Bt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var c;for(c in this._layers)this._layers[c].remove();for(c in this._panes)Bt(this._panes[c]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(c,h){var O="leaflet-pane"+(c?" leaflet-"+c.replace("Pane","")+"-pane":""),T=dt("div",O,h||this._mapPane);return c&&(this._panes[c]=T),T},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var c=this.getPixelBounds(),h=this.unproject(c.getBottomLeft()),O=this.unproject(c.getTopRight());return new Y(h,O)},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(c,h,O){c=ee(c),O=F(O||[0,0]);var T=this.getZoom()||0,k=this.getMinZoom(),G=this.getMaxZoom(),re=c.getNorthWest(),ue=c.getSouthEast(),de=this.getSize().subtract(O),_e=ne(this.project(ue,T),this.project(re,T)).getSize(),Re=Ue.any3d?this.options.zoomSnap:1,Ve=de.x/_e.x,nt=de.y/_e.y,er=h?Math.max(Ve,nt):Math.min(Ve,nt);return T=this.getScaleZoom(er,T),Re&&(T=Math.round(T/(Re/100))*(Re/100),T=h?Math.ceil(T/Re)*Re:Math.floor(T/Re)*Re),Math.max(k,Math.min(G,T))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(c,h){var O=this._getTopLeftPoint(c,h);return new H(O,O.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(c){return this.options.crs.getProjectedBounds(c===void 0?this.getZoom():c)},getPane:function(c){return typeof c=="string"?this._panes[c]:c},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(c,h){var O=this.options.crs;return h=h===void 0?this._zoom:h,O.scale(c)/O.scale(h)},getScaleZoom:function(c,h){var O=this.options.crs;h=h===void 0?this._zoom:h;var T=O.zoom(c*O.scale(h));return isNaN(T)?1/0:T},project:function(c,h){return h=h===void 0?this._zoom:h,this.options.crs.latLngToPoint(oe(c),h)},unproject:function(c,h){return h=h===void 0?this._zoom:h,this.options.crs.pointToLatLng(F(c),h)},layerPointToLatLng:function(c){var h=F(c).add(this.getPixelOrigin());return this.unproject(h)},latLngToLayerPoint:function(c){var h=this.project(oe(c))._round();return h._subtract(this.getPixelOrigin())},wrapLatLng:function(c){return this.options.crs.wrapLatLng(oe(c))},wrapLatLngBounds:function(c){return this.options.crs.wrapLatLngBounds(ee(c))},distance:function(c,h){return this.options.crs.distance(oe(c),oe(h))},containerPointToLayerPoint:function(c){return F(c).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(c){return F(c).add(this._getMapPanePos())},containerPointToLatLng:function(c){var h=this.containerPointToLayerPoint(F(c));return this.layerPointToLatLng(h)},latLngToContainerPoint:function(c){return this.layerPointToContainerPoint(this.latLngToLayerPoint(oe(c)))},mouseEventToContainerPoint:function(c){return cA(c,this._container)},mouseEventToLayerPoint:function(c){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(c))},mouseEventToLatLng:function(c){return this.layerPointToLatLng(this.mouseEventToLayerPoint(c))},_initContainer:function(c){var h=this._container=aA(c);if(h){if(h._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Xe(h,"scroll",this._onScroll,this),this._containerId=l(h)},_initLayout:function(){var c=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ue.any3d,et(c,"leaflet-container"+(Ue.touch?" leaflet-touch":"")+(Ue.retina?" leaflet-retina":"")+(Ue.ielt9?" leaflet-oldie":"")+(Ue.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var h=Rf(c,"position");h!=="absolute"&&h!=="relative"&&h!=="fixed"&&h!=="sticky"&&(c.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var c=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),an(this._mapPane,new Z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(et(c.markerPane,"leaflet-zoom-hide"),et(c.shadowPane,"leaflet-zoom-hide"))},_resetView:function(c,h,O){an(this._mapPane,new Z(0,0));var T=!this._loaded;this._loaded=!0,h=this._limitZoom(h),this.fire("viewprereset");var k=this._zoom!==h;this._moveStart(k,O)._move(c,h)._moveEnd(k),this.fire("viewreset"),T&&this.fire("load")},_moveStart:function(c,h){return c&&this.fire("zoomstart"),h||this.fire("movestart"),this},_move:function(c,h,O,T){h===void 0&&(h=this._zoom);var k=this._zoom!==h;return this._zoom=h,this._lastCenter=c,this._pixelOrigin=this._getNewPixelOrigin(c),T?O&&O.pinch&&this.fire("zoom",O):((k||O&&O.pinch)&&this.fire("zoom",O),this.fire("move",O)),this},_moveEnd:function(c){return c&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(c){an(this._mapPane,this._getMapPanePos().subtract(c))},_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(c){this._targets={},this._targets[l(this._container)]=this;var h=c?wt:Xe;h(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&h(window,"resize",this._onResize,this),Ue.any3d&&this.options.transform3DLimit&&(c?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=D(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var c=this._getMapPanePos();Math.max(Math.abs(c.x),Math.abs(c.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(c,h){for(var O=[],T,k=h==="mouseout"||h==="mouseover",G=c.target||c.srcElement,re=!1;G;){if(T=this._targets[l(G)],T&&(h==="click"||h==="preclick")&&this._draggableMoved(T)){re=!0;break}if(T&&T.listens(h,!0)&&(k&&!j_(G,c)||(O.push(T),k))||G===this._container)break;G=G.parentNode}return!O.length&&!re&&!k&&this.listens(h,!0)&&(O=[this]),O},_isClickDisabled:function(c){for(;c&&c!==this._container;){if(c._leaflet_disable_click)return!0;c=c.parentNode}},_handleDOMEvent:function(c){var h=c.target||c.srcElement;if(!(!this._loaded||h._leaflet_disable_events||c.type==="click"&&this._isClickDisabled(h))){var O=c.type;O==="mousedown"&&__(h),this._fireDOMEvent(c,O)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(c,h,O){if(c.type==="click"){var T=i({},c);T.type="preclick",this._fireDOMEvent(T,T.type,O)}var k=this._findEventTargets(c,h);if(O){for(var G=[],re=0;re0?Math.round(c-h)/2:Math.max(0,Math.ceil(c))-Math.max(0,Math.floor(h))},_limitZoom:function(c){var h=this.getMinZoom(),O=this.getMaxZoom(),T=Ue.any3d?this.options.zoomSnap:1;return T&&(c=Math.round(c/T)*T),Math.max(h,Math.min(O,c))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Jt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(c,h){var O=this._getCenterOffset(c)._trunc();return(h&&h.animate)!==!0&&!this.getSize().contains(O)?!1:(this.panBy(O,h),!0)},_createAnimProxy:function(){var c=this._proxy=dt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(c),this.on("zoomanim",function(h){var O=h_,T=this._proxy.style[O];Ps(this._proxy,this.project(h.center,h.zoom),this.getZoomScale(h.zoom,1)),T===this._proxy.style[O]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Bt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var c=this.getCenter(),h=this.getZoom();Ps(this._proxy,this.project(c,h),this.getZoomScale(h,1))},_catchTransitionEnd:function(c){this._animatingZoom&&c.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(c,h,O){if(this._animatingZoom)return!0;if(O=O||{},!this._zoomAnimated||O.animate===!1||this._nothingToAnimate()||Math.abs(h-this._zoom)>this.options.zoomAnimationThreshold)return!1;var T=this.getZoomScale(h),k=this._getCenterOffset(c)._divideBy(1-1/T);return O.animate!==!0&&!this.getSize().contains(k)?!1:(D(function(){this._moveStart(!0,O.noMoveStart||!1)._animateZoom(c,h,!0)},this),!0)},_animateZoom:function(c,h,O,T){this._mapPane&&(O&&(this._animatingZoom=!0,this._animateToCenter=c,this._animateToZoom=h,et(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:c,zoom:h,noUpdate:T}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Jt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function TH(c,h){return new ut(c,h)}var ji=W.extend({options:{position:"topright"},initialize:function(c){y(this,c)},getPosition:function(){return this.options.position},setPosition:function(c){var h=this._map;return h&&h.removeControl(this),this.options.position=c,h&&h.addControl(this),this},getContainer:function(){return this._container},addTo:function(c){this.remove(),this._map=c;var h=this._container=this.onAdd(c),O=this.getPosition(),T=c._controlCorners[O];return et(h,"leaflet-control"),O.indexOf("bottom")!==-1?T.insertBefore(h,T.firstChild):T.appendChild(h),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Bt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(c){this._map&&c&&c.screenX>0&&c.screenY>0&&this._map.getContainer().focus()}}),$f=function(c){return new ji(c)};ut.include({addControl:function(c){return c.addTo(this),this},removeControl:function(c){return c.remove(),this},_initControlPos:function(){var c=this._controlCorners={},h="leaflet-",O=this._controlContainer=dt("div",h+"control-container",this._container);function T(k,G){var re=h+k+" "+h+G;c[k+G]=dt("div",re,O)}T("top","left"),T("top","right"),T("bottom","left"),T("bottom","right")},_clearControlPos:function(){for(var c in this._controlCorners)Bt(this._controlCorners[c]);Bt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var hA=ji.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(c,h,O,T){return O1,this._baseLayersList.style.display=c?"":"none"),this._separator.style.display=h&&c?"":"none",this},_onLayerChange:function(c){this._handlingClick||this._update();var h=this._getLayer(l(c.target)),O=h.overlay?c.type==="add"?"overlayadd":"overlayremove":c.type==="add"?"baselayerchange":null;O&&this._map.fire(O,h)},_createRadioElement:function(c,h){var O='",T=document.createElement("div");return T.innerHTML=O,T.firstChild},_addItem:function(c){var h=document.createElement("label"),O=this._map.hasLayer(c.layer),T;c.overlay?(T=document.createElement("input"),T.type="checkbox",T.className="leaflet-control-layers-selector",T.defaultChecked=O):T=this._createRadioElement("leaflet-base-layers_"+l(this),O),this._layerControlInputs.push(T),T.layerId=l(c.layer),Xe(T,"click",this._onInputClick,this);var k=document.createElement("span");k.innerHTML=" "+c.name;var G=document.createElement("span");h.appendChild(G),G.appendChild(T),G.appendChild(k);var re=c.overlay?this._overlaysList:this._baseLayersList;return re.appendChild(h),this._checkDisabledLayers(),h},_onInputClick:function(){if(!this._preventClick){var c=this._layerControlInputs,h,O,T=[],k=[];this._handlingClick=!0;for(var G=c.length-1;G>=0;G--)h=c[G],O=this._getLayer(h.layerId).layer,h.checked?T.push(O):h.checked||k.push(O);for(G=0;G=0;k--)h=c[k],O=this._getLayer(h.layerId).layer,h.disabled=O.options.minZoom!==void 0&&TO.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var c=this._section;this._preventClick=!0,Xe(c,"click",In),this.expand();var h=this;setTimeout(function(){wt(c,"click",In),h._preventClick=!1})}}),CH=function(c,h,O){return new hA(c,h,O)},T_=ji.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(c){var h="leaflet-control-zoom",O=dt("div",h+" leaflet-bar"),T=this.options;return this._zoomInButton=this._createButton(T.zoomInText,T.zoomInTitle,h+"-in",O,this._zoomIn),this._zoomOutButton=this._createButton(T.zoomOutText,T.zoomOutTitle,h+"-out",O,this._zoomOut),this._updateDisabled(),c.on("zoomend zoomlevelschange",this._updateDisabled,this),O},onRemove:function(c){c.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(c){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(c.shiftKey?3:1))},_createButton:function(c,h,O,T,k){var G=dt("a",O,T);return G.innerHTML=c,G.href="#",G.title=h,G.setAttribute("role","button"),G.setAttribute("aria-label",h),Df(G),Xe(G,"click",Ns),Xe(G,"click",k,this),Xe(G,"click",this._refocusOnMap,this),G},_updateDisabled:function(){var c=this._map,h="leaflet-disabled";Jt(this._zoomInButton,h),Jt(this._zoomOutButton,h),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||c._zoom===c.getMinZoom())&&(et(this._zoomOutButton,h),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||c._zoom===c.getMaxZoom())&&(et(this._zoomInButton,h),this._zoomInButton.setAttribute("aria-disabled","true"))}});ut.mergeOptions({zoomControl:!0}),ut.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new T_,this.addControl(this.zoomControl))});var PH=function(c){return new T_(c)},pA=ji.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(c){var h="leaflet-control-scale",O=dt("div",h),T=this.options;return this._addScales(T,h+"-line",O),c.on(T.updateWhenIdle?"moveend":"move",this._update,this),c.whenReady(this._update,this),O},onRemove:function(c){c.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(c,h,O){c.metric&&(this._mScale=dt("div",h,O)),c.imperial&&(this._iScale=dt("div",h,O))},_update:function(){var c=this._map,h=c.getSize().y/2,O=c.distance(c.containerPointToLatLng([0,h]),c.containerPointToLatLng([this.options.maxWidth,h]));this._updateScales(O)},_updateScales:function(c){this.options.metric&&c&&this._updateMetric(c),this.options.imperial&&c&&this._updateImperial(c)},_updateMetric:function(c){var h=this._getRoundNum(c),O=h<1e3?h+" m":h/1e3+" km";this._updateScale(this._mScale,O,h/c)},_updateImperial:function(c){var h=c*3.2808399,O,T,k;h>5280?(O=h/5280,T=this._getRoundNum(O),this._updateScale(this._iScale,T+" mi",T/O)):(k=this._getRoundNum(h),this._updateScale(this._iScale,k+" ft",k/h))},_updateScale:function(c,h,O){c.style.width=Math.round(this.options.maxWidth*O)+"px",c.innerHTML=h},_getRoundNum:function(c){var h=Math.pow(10,(Math.floor(c)+"").length-1),O=c/h;return O=O>=10?10:O>=5?5:O>=3?3:O>=2?2:1,h*O}}),AH=function(c){return new pA(c)},kH='',C_=ji.extend({options:{position:"bottomright",prefix:''+(Ue.inlineSvg?kH+" ":"")+"Leaflet"},initialize:function(c){y(this,c),this._attributions={}},onAdd:function(c){c.attributionControl=this,this._container=dt("div","leaflet-control-attribution"),Df(this._container);for(var h in c._layers)c._layers[h].getAttribution&&this.addAttribution(c._layers[h].getAttribution());return this._update(),c.on("layeradd",this._addAttribution,this),this._container},onRemove:function(c){c.off("layeradd",this._addAttribution,this)},_addAttribution:function(c){c.layer.getAttribution&&(this.addAttribution(c.layer.getAttribution()),c.layer.once("remove",function(){this.removeAttribution(c.layer.getAttribution())},this))},setPrefix:function(c){return this.options.prefix=c,this._update(),this},addAttribution:function(c){return c?(this._attributions[c]||(this._attributions[c]=0),this._attributions[c]++,this._update(),this):this},removeAttribution:function(c){return c?(this._attributions[c]&&(this._attributions[c]--,this._update()),this):this},_update:function(){if(this._map){var c=[];for(var h in this._attributions)this._attributions[h]&&c.push(h);var O=[];this.options.prefix&&O.push(this.options.prefix),c.length&&O.push(c.join(", ")),this._container.innerHTML=O.join(' ')}}});ut.mergeOptions({attributionControl:!0}),ut.addInitHook(function(){this.options.attributionControl&&new C_().addTo(this)});var NH=function(c){return new C_(c)};ji.Layers=hA,ji.Zoom=T_,ji.Scale=pA,ji.Attribution=C_,$f.layers=CH,$f.zoom=PH,$f.scale=AH,$f.attribution=NH;var eo=W.extend({initialize:function(c){this._map=c},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}});eo.addTo=function(c,h){return c.addHandler(h,this),this};var RH={Events:J},mA=Ue.touch?"touchstart mousedown":"mousedown",va=te.extend({options:{clickTolerance:3},initialize:function(c,h,O,T){y(this,T),this._element=c,this._dragStartTarget=h||c,this._preventOutline=O},enable:function(){this._enabled||(Xe(this._dragStartTarget,mA,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(va._dragging===this&&this.finishDrag(!0),wt(this._dragStartTarget,mA,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(c){if(this._enabled&&(this._moved=!1,!p_(this._element,"leaflet-zoom-anim"))){if(c.touches&&c.touches.length!==1){va._dragging===this&&this.finishDrag();return}if(!(va._dragging||c.shiftKey||c.which!==1&&c.button!==1&&!c.touches)&&(va._dragging=this,this._preventOutline&&__(this._element),g_(),Lf(),!this._moving)){this.fire("down");var h=c.touches?c.touches[0]:c,O=sA(this._element);this._startPoint=new Z(h.clientX,h.clientY),this._startPos=As(this._element),this._parentScale=x_(O);var T=c.type==="mousedown";Xe(document,T?"mousemove":"touchmove",this._onMove,this),Xe(document,T?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(c){if(this._enabled){if(c.touches&&c.touches.length>1){this._moved=!0;return}var h=c.touches&&c.touches.length===1?c.touches[0]:c,O=new Z(h.clientX,h.clientY)._subtract(this._startPoint);!O.x&&!O.y||Math.abs(O.x)+Math.abs(O.y)G&&(re=ue,G=de);G>O&&(h[re]=1,A_(c,h,O,T,re),A_(c,h,O,re,k))}function DH(c,h){for(var O=[c[0]],T=1,k=0,G=c.length;Th&&(O.push(c[T]),k=T);return kh.max.x&&(O|=2),c.yh.max.y&&(O|=8),O}function $H(c,h){var O=h.x-c.x,T=h.y-c.y;return O*O+T*T}function Ff(c,h,O,T){var k=h.x,G=h.y,re=O.x-k,ue=O.y-G,de=re*re+ue*ue,_e;return de>0&&(_e=((c.x-k)*re+(c.y-G)*ue)/de,_e>1?(k=O.x,G=O.y):_e>0&&(k+=re*_e,G+=ue*_e)),re=c.x-k,ue=c.y-G,T?re*re+ue*ue:new Z(k,G)}function Yr(c){return!_(c[0])||typeof c[0][0]!="object"&&typeof c[0][0]<"u"}function wA(c){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Yr(c)}function OA(c,h){var O,T,k,G,re,ue,de,_e;if(!c||c.length===0)throw new Error("latlngs not passed");Yr(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var Re=oe([0,0]),Ve=ee(c),nt=Ve.getNorthWest().distanceTo(Ve.getSouthWest())*Ve.getNorthEast().distanceTo(Ve.getNorthWest());nt<1700&&(Re=P_(c));var er=c.length,xn=[];for(O=0;OT){de=(G-T)/k,_e=[ue.x-de*(ue.x-re.x),ue.y-de*(ue.y-re.y)];break}var mr=h.unproject(F(_e));return oe([mr.lat+Re.lat,mr.lng+Re.lng])}var FH={__proto__:null,simplify:yA,pointToSegmentDistance:bA,closestPointOnSegment:MH,clipSegment:xA,_getEdgeIntersection:Om,_getBitCode:Rs,_sqClosestPointOnSegment:Ff,isFlat:Yr,_flat:wA,polylineCenter:OA},k_={project:function(c){return new Z(c.lng,c.lat)},unproject:function(c){return new ae(c.y,c.x)},bounds:new H([-180,-90],[180,90])},N_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new H([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(c){var h=Math.PI/180,O=this.R,T=c.lat*h,k=this.R_MINOR/O,G=Math.sqrt(1-k*k),re=G*Math.sin(T),ue=Math.tan(Math.PI/4-T/2)/Math.pow((1-re)/(1+re),G/2);return T=-O*Math.log(Math.max(ue,1e-10)),new Z(c.lng*h*O,T)},unproject:function(c){for(var h=180/Math.PI,O=this.R,T=this.R_MINOR/O,k=Math.sqrt(1-T*T),G=Math.exp(-c.y/O),re=Math.PI/2-2*Math.atan(G),ue=0,de=.1,_e;ue<15&&Math.abs(de)>1e-7;ue++)_e=k*Math.sin(re),_e=Math.pow((1-_e)/(1+_e),k/2),de=Math.PI/2-2*Math.atan(G*_e)-re,re+=de;return new ae(re*h,c.x*h/O)}},UH={__proto__:null,LonLat:k_,Mercator:N_,SphericalMercator:U},BH=i({},P,{code:"EPSG:3395",projection:N_,transformation:function(){var c=.5/(Math.PI*N_.R);return K(c,.5,-c,.5)}()}),SA=i({},P,{code:"EPSG:4326",projection:k_,transformation:K(1/180,1,-1/180,.5)}),zH=i({},fe,{projection:k_,transformation:K(1,0,-1,0),scale:function(c){return Math.pow(2,c)},zoom:function(c){return Math.log(c)/Math.LN2},distance:function(c,h){var O=h.lng-c.lng,T=h.lat-c.lat;return Math.sqrt(O*O+T*T)},infinite:!0});fe.Earth=P,fe.EPSG3395=BH,fe.EPSG3857=ie,fe.EPSG900913=he,fe.EPSG4326=SA,fe.Simple=zH;var Ti=te.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(c){return c.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(c){return c&&c.removeLayer(this),this},getPane:function(c){return this._map.getPane(c?this.options[c]||c:this.options.pane)},addInteractiveTarget:function(c){return this._map._targets[l(c)]=this,this},removeInteractiveTarget:function(c){return delete this._map._targets[l(c)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(c){var h=c.target;if(h.hasLayer(this)){if(this._map=h,this._zoomAnimated=h._zoomAnimated,this.getEvents){var O=this.getEvents();h.on(O,this),this.once("remove",function(){h.off(O,this)},this)}this.onAdd(h),this.fire("add"),h.fire("layeradd",{layer:this})}}});ut.include({addLayer:function(c){if(!c._layerAdd)throw new Error("The provided object is not a Layer.");var h=l(c);return this._layers[h]?this:(this._layers[h]=c,c._mapToAdd=this,c.beforeAdd&&c.beforeAdd(this),this.whenReady(c._layerAdd,c),this)},removeLayer:function(c){var h=l(c);return this._layers[h]?(this._loaded&&c.onRemove(this),delete this._layers[h],this._loaded&&(this.fire("layerremove",{layer:c}),c.fire("remove")),c._map=c._mapToAdd=null,this):this},hasLayer:function(c){return l(c)in this._layers},eachLayer:function(c,h){for(var O in this._layers)c.call(h,this._layers[O]);return this},_addLayers:function(c){c=c?_(c)?c:[c]:[];for(var h=0,O=c.length;hthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&h[0]instanceof ae&&h[0].equals(h[O-1])&&h.pop(),h},_setLatLngs:function(c){No.prototype._setLatLngs.call(this,c),Yr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Yr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var c=this._renderer._bounds,h=this.options.weight,O=new Z(h,h);if(c=new H(c.min.subtract(O),c.max.add(O)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(c))){if(this.options.noClip){this._parts=this._rings;return}for(var T=0,k=this._rings.length,G;Tc.y!=k.y>c.y&&c.x<(k.x-T.x)*(c.y-T.y)/(k.y-T.y)+T.x&&(h=!h);return h||No.prototype._containsPoint.call(this,c,!0)}});function ZH(c,h){return new Jl(c,h)}var Ro=ko.extend({initialize:function(c,h){y(this,h),this._layers={},c&&this.addData(c)},addData:function(c){var h=_(c)?c:c.features,O,T,k;if(h){for(O=0,T=h.length;O0&&k.push(k[0].slice()),k}function eu(c,h){return c.feature?i({},c.feature,{geometry:h}):Pm(h)}function Pm(c){return c.type==="Feature"||c.type==="FeatureCollection"?c:{type:"Feature",properties:{},geometry:c}}var I_={toGeoJSON:function(c){return eu(this,{type:"Point",coordinates:M_(this.getLatLng(),c)})}};Sm.include(I_),R_.include(I_),Em.include(I_),No.include({toGeoJSON:function(c){var h=!Yr(this._latlngs),O=Cm(this._latlngs,h?1:0,!1,c);return eu(this,{type:(h?"Multi":"")+"LineString",coordinates:O})}}),Jl.include({toGeoJSON:function(c){var h=!Yr(this._latlngs),O=h&&!Yr(this._latlngs[0]),T=Cm(this._latlngs,O?2:h?1:0,!0,c);return h||(T=[T]),eu(this,{type:(O?"Multi":"")+"Polygon",coordinates:T})}}),Xl.include({toMultiPoint:function(c){var h=[];return this.eachLayer(function(O){h.push(O.toGeoJSON(c).geometry.coordinates)}),eu(this,{type:"MultiPoint",coordinates:h})},toGeoJSON:function(c){var h=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(h==="MultiPoint")return this.toMultiPoint(c);var O=h==="GeometryCollection",T=[];return this.eachLayer(function(k){if(k.toGeoJSON){var G=k.toGeoJSON(c);if(O)T.push(G.geometry);else{var re=Pm(G);re.type==="FeatureCollection"?T.push.apply(T,re.features):T.push(re)}}}),O?eu(this,{geometries:T,type:"GeometryCollection"}):{type:"FeatureCollection",features:T}}});function TA(c,h){return new Ro(c,h)}var XH=TA,Am=Ti.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(c,h,O){this._url=c,this._bounds=ee(h),y(this,O)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(et(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Bt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(c){return this.options.opacity=c,this._image&&this._updateOpacity(),this},setStyle:function(c){return c.opacity&&this.setOpacity(c.opacity),this},bringToFront:function(){return this._map&&Yl(this._image),this},bringToBack:function(){return this._map&&Zl(this._image),this},setUrl:function(c){return this._url=c,this._image&&(this._image.src=c),this},setBounds:function(c){return this._bounds=ee(c),this._map&&this._reset(),this},getEvents:function(){var c={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var c=this._url.tagName==="IMG",h=this._image=c?this._url:dt("img");if(et(h,"leaflet-image-layer"),this._zoomAnimated&&et(h,"leaflet-zoom-animated"),this.options.className&&et(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onload=a(this.fire,this,"load"),h.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),c){this._url=h.src;return}h.src=this._url,h.alt=this.options.alt},_animateZoom:function(c){var h=this._map.getZoomScale(c.zoom),O=this._map._latLngBoundsToNewLayerBounds(this._bounds,c.zoom,c.center).min;Ps(this._image,O,h)},_reset:function(){var c=this._image,h=new H(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),O=h.getSize();an(c,h.min),c.style.width=O.x+"px",c.style.height=O.y+"px"},_updateOpacity:function(){Kr(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var c=this.options.errorOverlayUrl;c&&this._url!==c&&(this._url=c,this._image.src=c)},getCenter:function(){return this._bounds.getCenter()}}),QH=function(c,h,O){return new Am(c,h,O)},CA=Am.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var c=this._url.tagName==="VIDEO",h=this._image=c?this._url:dt("video");if(et(h,"leaflet-image-layer"),this._zoomAnimated&&et(h,"leaflet-zoom-animated"),this.options.className&&et(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onloadeddata=a(this.fire,this,"load"),c){for(var O=h.getElementsByTagName("source"),T=[],k=0;k0?T:[h.src];return}_(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(h.style,"objectFit")&&(h.style.objectFit="fill"),h.autoplay=!!this.options.autoplay,h.loop=!!this.options.loop,h.muted=!!this.options.muted,h.playsInline=!!this.options.playsInline;for(var G=0;Gk?(h.height=k+"px",et(c,G)):Jt(c,G),this._containerWidth=this._container.offsetWidth},_animateZoom:function(c){var h=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center),O=this._getAnchor();an(this._container,h.add(O))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var c=this._map,h=parseInt(Rf(this._container,"marginBottom"),10)||0,O=this._container.offsetHeight+h,T=this._containerWidth,k=new Z(this._containerLeft,-O-this._containerBottom);k._add(As(this._container));var G=c.layerPointToContainerPoint(k),re=F(this.options.autoPanPadding),ue=F(this.options.autoPanPaddingTopLeft||re),de=F(this.options.autoPanPaddingBottomRight||re),_e=c.getSize(),Re=0,Ve=0;G.x+T+de.x>_e.x&&(Re=G.x+T-_e.x+de.x),G.x-Re-ue.x<0&&(Re=G.x-ue.x),G.y+O+de.y>_e.y&&(Ve=G.y+O-_e.y+de.y),G.y-Ve-ue.y<0&&(Ve=G.y-ue.y),(Re||Ve)&&(this.options.keepInView&&(this._autopanning=!0),c.fire("autopanstart").panBy([Re,Ve]))}},_getAnchor:function(){return F(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),tW=function(c,h){return new km(c,h)};ut.mergeOptions({closePopupOnClick:!0}),ut.include({openPopup:function(c,h,O){return this._initOverlay(km,c,h,O).openOn(this),this},closePopup:function(c){return c=arguments.length?c:this._popup,c&&c.close(),this}}),Ti.include({bindPopup:function(c,h){return this._popup=this._initOverlay(km,this._popup,c,h),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(c){return this._popup&&(this instanceof ko||(this._popup._source=this),this._popup._prepareOpen(c||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(c){return this._popup&&this._popup.setContent(c),this},getPopup:function(){return this._popup},_openPopup:function(c){if(!(!this._popup||!this._map)){Ns(c);var h=c.layer||c.target;if(this._popup._source===h&&!(h instanceof ga)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(c.latlng);return}this._popup._source=h,this.openPopup(c.latlng)}},_movePopup:function(c){this._popup.setLatLng(c.latlng)},_onKeyPress:function(c){c.originalEvent.keyCode===13&&this._openPopup(c)}});var Nm=to.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(c){to.prototype.onAdd.call(this,c),this.setOpacity(this.options.opacity),c.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(c){to.prototype.onRemove.call(this,c),c.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var c=to.prototype.getEvents.call(this);return this.options.permanent||(c.preclick=this.close),c},_initLayout:function(){var c="leaflet-tooltip",h=c+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=dt("div",h),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(c){var h,O,T=this._map,k=this._container,G=T.latLngToContainerPoint(T.getCenter()),re=T.layerPointToContainerPoint(c),ue=this.options.direction,de=k.offsetWidth,_e=k.offsetHeight,Re=F(this.options.offset),Ve=this._getAnchor();ue==="top"?(h=de/2,O=_e):ue==="bottom"?(h=de/2,O=0):ue==="center"?(h=de/2,O=_e/2):ue==="right"?(h=0,O=_e/2):ue==="left"?(h=de,O=_e/2):re.xthis.options.maxZoom||OT?this._retainParent(k,G,re,T):!1)},_retainChildren:function(c,h,O,T){for(var k=2*c;k<2*c+2;k++)for(var G=2*h;G<2*h+2;G++){var re=new Z(k,G);re.z=O+1;var ue=this._tileCoordsToKey(re),de=this._tiles[ue];if(de&&de.active){de.retain=!0;continue}else de&&de.loaded&&(de.retain=!0);O+1this.options.maxZoom||this.options.minZoom!==void 0&&k1){this._setView(c,O);return}for(var Ve=k.min.y;Ve<=k.max.y;Ve++)for(var nt=k.min.x;nt<=k.max.x;nt++){var er=new Z(nt,Ve);if(er.z=this._tileZoom,!!this._isValidTile(er)){var xn=this._tiles[this._tileCoordsToKey(er)];xn?xn.current=!0:re.push(er)}}if(re.sort(function(mr,nu){return mr.distanceTo(G)-nu.distanceTo(G)}),re.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Zr=document.createDocumentFragment();for(nt=0;ntO.max.x)||!h.wrapLat&&(c.yO.max.y))return!1}if(!this.options.bounds)return!0;var T=this._tileCoordsToBounds(c);return ee(this.options.bounds).overlaps(T)},_keyToBounds:function(c){return this._tileCoordsToBounds(this._keyToTileCoords(c))},_tileCoordsToNwSe:function(c){var h=this._map,O=this.getTileSize(),T=c.scaleBy(O),k=T.add(O),G=h.unproject(T,c.z),re=h.unproject(k,c.z);return[G,re]},_tileCoordsToBounds:function(c){var h=this._tileCoordsToNwSe(c),O=new Y(h[0],h[1]);return this.options.noWrap||(O=this._map.wrapLatLngBounds(O)),O},_tileCoordsToKey:function(c){return c.x+":"+c.y+":"+c.z},_keyToTileCoords:function(c){var h=c.split(":"),O=new Z(+h[0],+h[1]);return O.z=+h[2],O},_removeTile:function(c){var h=this._tiles[c];h&&(Bt(h.el),delete this._tiles[c],this.fire("tileunload",{tile:h.el,coords:this._keyToTileCoords(c)}))},_initTile:function(c){et(c,"leaflet-tile");var h=this.getTileSize();c.style.width=h.x+"px",c.style.height=h.y+"px",c.onselectstart=d,c.onmousemove=d,Ue.ielt9&&this.options.opacity<1&&Kr(c,this.options.opacity)},_addTile:function(c,h){var O=this._getTilePos(c),T=this._tileCoordsToKey(c),k=this.createTile(this._wrapCoords(c),a(this._tileReady,this,c));this._initTile(k),this.createTile.length<2&&D(a(this._tileReady,this,c,null,k)),an(k,O),this._tiles[T]={el:k,coords:c,current:!0},h.appendChild(k),this.fire("tileloadstart",{tile:k,coords:c})},_tileReady:function(c,h,O){h&&this.fire("tileerror",{error:h,tile:O,coords:c});var T=this._tileCoordsToKey(c);O=this._tiles[T],O&&(O.loaded=+new Date,this._map._fadeAnimated?(Kr(O.el,0),z(this._fadeFrame),this._fadeFrame=D(this._updateOpacity,this)):(O.active=!0,this._pruneTiles()),h||(et(O.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:O.el,coords:c})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ue.ielt9||!this._map._fadeAnimated?D(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(c){return c.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(c){var h=new Z(this._wrapX?f(c.x,this._wrapX):c.x,this._wrapY?f(c.y,this._wrapY):c.y);return h.z=c.z,h},_pxBoundsToTileRange:function(c){var h=this.getTileSize();return new H(c.min.unscaleBy(h).floor(),c.max.unscaleBy(h).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var c in this._tiles)if(!this._tiles[c].loaded)return!1;return!0}});function iW(c){return new Bf(c)}var tu=Bf.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(c,h){this._url=c,h=y(this,h),h.detectRetina&&Ue.retina&&h.maxZoom>0?(h.tileSize=Math.floor(h.tileSize/2),h.zoomReverse?(h.zoomOffset--,h.minZoom=Math.min(h.maxZoom,h.minZoom+1)):(h.zoomOffset++,h.maxZoom=Math.max(h.minZoom,h.maxZoom-1)),h.minZoom=Math.max(0,h.minZoom)):h.zoomReverse?h.minZoom=Math.min(h.maxZoom,h.minZoom):h.maxZoom=Math.max(h.minZoom,h.maxZoom),typeof h.subdomains=="string"&&(h.subdomains=h.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(c,h){return this._url===c&&h===void 0&&(h=!0),this._url=c,h||this.redraw(),this},createTile:function(c,h){var O=document.createElement("img");return Xe(O,"load",a(this._tileOnLoad,this,h,O)),Xe(O,"error",a(this._tileOnError,this,h,O)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(O.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(O.referrerPolicy=this.options.referrerPolicy),O.alt="",O.src=this.getTileUrl(c),O},getTileUrl:function(c){var h={r:Ue.retina?"@2x":"",s:this._getSubdomain(c),x:c.x,y:c.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var O=this._globalTileRange.max.y-c.y;this.options.tms&&(h.y=O),h["-y"]=O}return x(this._url,i(h,this.options))},_tileOnLoad:function(c,h){Ue.ielt9?setTimeout(a(c,this,null,h),0):c(null,h)},_tileOnError:function(c,h,O){var T=this.options.errorTileUrl;T&&h.getAttribute("src")!==T&&(h.src=T),c(O,h)},_onTileRemove:function(c){c.tile.onload=null},_getZoomForUrl:function(){var c=this._tileZoom,h=this.options.maxZoom,O=this.options.zoomReverse,T=this.options.zoomOffset;return O&&(c=h-c),c+T},_getSubdomain:function(c){var h=Math.abs(c.x+c.y)%this.options.subdomains.length;return this.options.subdomains[h]},_abortLoading:function(){var c,h;for(c in this._tiles)if(this._tiles[c].coords.z!==this._tileZoom&&(h=this._tiles[c].el,h.onload=d,h.onerror=d,!h.complete)){h.src=j;var O=this._tiles[c].coords;Bt(h),delete this._tiles[c],this.fire("tileabort",{tile:h,coords:O})}},_removeTile:function(c){var h=this._tiles[c];if(h)return h.el.setAttribute("src",j),Bf.prototype._removeTile.call(this,c)},_tileReady:function(c,h,O){if(!(!this._map||O&&O.getAttribute("src")===j))return Bf.prototype._tileReady.call(this,c,h,O)}});function kA(c,h){return new tu(c,h)}var NA=tu.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(c,h){this._url=c;var O=i({},this.defaultWmsParams);for(var T in h)T in this.options||(O[T]=h[T]);h=y(this,h);var k=h.detectRetina&&Ue.retina?2:1,G=this.getTileSize();O.width=G.x*k,O.height=G.y*k,this.wmsParams=O},onAdd:function(c){this._crs=this.options.crs||c.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var h=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[h]=this._crs.code,tu.prototype.onAdd.call(this,c)},getTileUrl:function(c){var h=this._tileCoordsToNwSe(c),O=this._crs,T=ne(O.project(h[0]),O.project(h[1])),k=T.min,G=T.max,re=(this._wmsVersion>=1.3&&this._crs===SA?[k.y,k.x,G.y,G.x]:[k.x,k.y,G.x,G.y]).join(","),ue=tu.prototype.getTileUrl.call(this,c);return ue+w(this.wmsParams,ue,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+re},setParams:function(c,h){return i(this.wmsParams,c),h||this.redraw(),this}});function oW(c,h){return new NA(c,h)}tu.WMS=NA,kA.wms=oW;var Lo=Ti.extend({options:{padding:.1},initialize:function(c){y(this,c),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),et(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 c={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(c.zoomanim=this._onAnimZoom),c},_onAnimZoom:function(c){this._updateTransform(c.center,c.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(c,h){var O=this._map.getZoomScale(h,this._zoom),T=this._map.getSize().multiplyBy(.5+this.options.padding),k=this._map.project(this._center,h),G=T.multiplyBy(-O).add(k).subtract(this._map._getNewPixelOrigin(c,h));Ue.any3d?Ps(this._container,G,O):an(this._container,G)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var c in this._layers)this._layers[c]._reset()},_onZoomEnd:function(){for(var c in this._layers)this._layers[c]._project()},_updatePaths:function(){for(var c in this._layers)this._layers[c]._update()},_update:function(){var c=this.options.padding,h=this._map.getSize(),O=this._map.containerPointToLayerPoint(h.multiplyBy(-c)).round();this._bounds=new H(O,O.add(h.multiplyBy(1+c*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),RA=Lo.extend({options:{tolerance:0},getEvents:function(){var c=Lo.prototype.getEvents.call(this);return c.viewprereset=this._onViewPreReset,c},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Lo.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var c=this._container=document.createElement("canvas");Xe(c,"mousemove",this._onMouseMove,this),Xe(c,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Xe(c,"mouseout",this._handleMouseOut,this),c._leaflet_disable_events=!0,this._ctx=c.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,Bt(this._container),wt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var c;this._redrawBounds=null;for(var h in this._layers)c=this._layers[h],c._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Lo.prototype._update.call(this);var c=this._bounds,h=this._container,O=c.getSize(),T=Ue.retina?2:1;an(h,c.min),h.width=T*O.x,h.height=T*O.y,h.style.width=O.x+"px",h.style.height=O.y+"px",Ue.retina&&this._ctx.scale(2,2),this._ctx.translate(-c.min.x,-c.min.y),this.fire("update")}},_reset:function(){Lo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(c){this._updateDashArray(c),this._layers[l(c)]=c;var h=c._order={layer:c,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=h),this._drawLast=h,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(c){this._requestRedraw(c)},_removePath:function(c){var h=c._order,O=h.next,T=h.prev;O?O.prev=T:this._drawLast=T,T?T.next=O:this._drawFirst=O,delete c._order,delete this._layers[l(c)],this._requestRedraw(c)},_updatePath:function(c){this._extendRedrawBounds(c),c._project(),c._update(),this._requestRedraw(c)},_updateStyle:function(c){this._updateDashArray(c),this._requestRedraw(c)},_updateDashArray:function(c){if(typeof c.options.dashArray=="string"){var h=c.options.dashArray.split(/[, ]+/),O=[],T,k;for(k=0;k')}}catch{}return function(c){return document.createElement("<"+c+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),aW={_initContainer:function(){this._container=dt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Lo.prototype._update.call(this),this.fire("update"))},_initPath:function(c){var h=c._container=zf("shape");et(h,"leaflet-vml-shape "+(this.options.className||"")),h.coordsize="1 1",c._path=zf("path"),h.appendChild(c._path),this._updateStyle(c),this._layers[l(c)]=c},_addPath:function(c){var h=c._container;this._container.appendChild(h),c.options.interactive&&c.addInteractiveTarget(h)},_removePath:function(c){var h=c._container;Bt(h),c.removeInteractiveTarget(h),delete this._layers[l(c)]},_updateStyle:function(c){var h=c._stroke,O=c._fill,T=c.options,k=c._container;k.stroked=!!T.stroke,k.filled=!!T.fill,T.stroke?(h||(h=c._stroke=zf("stroke")),k.appendChild(h),h.weight=T.weight+"px",h.color=T.color,h.opacity=T.opacity,T.dashArray?h.dashStyle=_(T.dashArray)?T.dashArray.join(" "):T.dashArray.replace(/( *, *)/g," "):h.dashStyle="",h.endcap=T.lineCap.replace("butt","flat"),h.joinstyle=T.lineJoin):h&&(k.removeChild(h),c._stroke=null),T.fill?(O||(O=c._fill=zf("fill")),k.appendChild(O),O.color=T.fillColor||T.color,O.opacity=T.fillOpacity):O&&(k.removeChild(O),c._fill=null)},_updateCircle:function(c){var h=c._point.round(),O=Math.round(c._radius),T=Math.round(c._radiusY||O);this._setPath(c,c._empty()?"M0 0":"AL "+h.x+","+h.y+" "+O+","+T+" 0,"+65535*360)},_setPath:function(c,h){c._path.v=h},_bringToFront:function(c){Yl(c._container)},_bringToBack:function(c){Zl(c._container)}},Rm=Ue.vml?zf:Se,Vf=Lo.extend({_initContainer:function(){this._container=Rm("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Rm("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Bt(this._container),wt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Lo.prototype._update.call(this);var c=this._bounds,h=c.getSize(),O=this._container;(!this._svgSize||!this._svgSize.equals(h))&&(this._svgSize=h,O.setAttribute("width",h.x),O.setAttribute("height",h.y)),an(O,c.min),O.setAttribute("viewBox",[c.min.x,c.min.y,h.x,h.y].join(" ")),this.fire("update")}},_initPath:function(c){var h=c._path=Rm("path");c.options.className&&et(h,c.options.className),c.options.interactive&&et(h,"leaflet-interactive"),this._updateStyle(c),this._layers[l(c)]=c},_addPath:function(c){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(c._path),c.addInteractiveTarget(c._path)},_removePath:function(c){Bt(c._path),c.removeInteractiveTarget(c._path),delete this._layers[l(c)]},_updatePath:function(c){c._project(),c._update()},_updateStyle:function(c){var h=c._path,O=c.options;h&&(O.stroke?(h.setAttribute("stroke",O.color),h.setAttribute("stroke-opacity",O.opacity),h.setAttribute("stroke-width",O.weight),h.setAttribute("stroke-linecap",O.lineCap),h.setAttribute("stroke-linejoin",O.lineJoin),O.dashArray?h.setAttribute("stroke-dasharray",O.dashArray):h.removeAttribute("stroke-dasharray"),O.dashOffset?h.setAttribute("stroke-dashoffset",O.dashOffset):h.removeAttribute("stroke-dashoffset")):h.setAttribute("stroke","none"),O.fill?(h.setAttribute("fill",O.fillColor||O.color),h.setAttribute("fill-opacity",O.fillOpacity),h.setAttribute("fill-rule",O.fillRule||"evenodd")):h.setAttribute("fill","none"))},_updatePoly:function(c,h){this._setPath(c,se(c._parts,h))},_updateCircle:function(c){var h=c._point,O=Math.max(Math.round(c._radius),1),T=Math.max(Math.round(c._radiusY),1)||O,k="a"+O+","+T+" 0 1,0 ",G=c._empty()?"M0 0":"M"+(h.x-O)+","+h.y+k+O*2+",0 "+k+-O*2+",0 ";this._setPath(c,G)},_setPath:function(c,h){c._path.setAttribute("d",h)},_bringToFront:function(c){Yl(c._path)},_bringToBack:function(c){Zl(c._path)}});Ue.vml&&Vf.include(aW);function MA(c){return Ue.svg||Ue.vml?new Vf(c):null}ut.include({getRenderer:function(c){var h=c.options.renderer||this._getPaneRenderer(c.options.pane)||this.options.renderer||this._renderer;return h||(h=this._renderer=this._createRenderer()),this.hasLayer(h)||this.addLayer(h),h},_getPaneRenderer:function(c){if(c==="overlayPane"||c===void 0)return!1;var h=this._paneRenderers[c];return h===void 0&&(h=this._createRenderer({pane:c}),this._paneRenderers[c]=h),h},_createRenderer:function(c){return this.options.preferCanvas&&LA(c)||MA(c)}});var IA=Jl.extend({initialize:function(c,h){Jl.prototype.initialize.call(this,this._boundsToLatLngs(c),h)},setBounds:function(c){return this.setLatLngs(this._boundsToLatLngs(c))},_boundsToLatLngs:function(c){return c=ee(c),[c.getSouthWest(),c.getNorthWest(),c.getNorthEast(),c.getSouthEast()]}});function sW(c,h){return new IA(c,h)}Vf.create=Rm,Vf.pointsToPath=se,Ro.geometryToLayer=jm,Ro.coordsToLatLng=L_,Ro.coordsToLatLngs=Tm,Ro.latLngToCoords=M_,Ro.latLngsToCoords=Cm,Ro.getFeature=eu,Ro.asFeature=Pm,ut.mergeOptions({boxZoom:!0});var DA=eo.extend({initialize:function(c){this._map=c,this._container=c._container,this._pane=c._panes.overlayPane,this._resetStateTimeout=0,c.on("unload",this._destroy,this)},addHooks:function(){Xe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){wt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Bt(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(c){if(!c.shiftKey||c.which!==1&&c.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Lf(),g_(),this._startPoint=this._map.mouseEventToContainerPoint(c),Xe(document,{contextmenu:Ns,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(c){this._moved||(this._moved=!0,this._box=dt("div","leaflet-zoom-box",this._container),et(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(c);var h=new H(this._point,this._startPoint),O=h.getSize();an(this._box,h.min),this._box.style.width=O.x+"px",this._box.style.height=O.y+"px"},_finish:function(){this._moved&&(Bt(this._box),Jt(this._container,"leaflet-crosshair")),Mf(),y_(),wt(document,{contextmenu:Ns,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(c){if(!(c.which!==1&&c.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var h=new Y(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(h).fire("boxzoomend",{boxZoomBounds:h})}},_onKeyDown:function(c){c.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ut.addInitHook("addHandler","boxZoom",DA),ut.mergeOptions({doubleClickZoom:!0});var $A=eo.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(c){var h=this._map,O=h.getZoom(),T=h.options.zoomDelta,k=c.originalEvent.shiftKey?O-T:O+T;h.options.doubleClickZoom==="center"?h.setZoom(k):h.setZoomAround(c.containerPoint,k)}});ut.addInitHook("addHandler","doubleClickZoom",$A),ut.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var FA=eo.extend({addHooks:function(){if(!this._draggable){var c=this._map;this._draggable=new va(c._mapPane,c._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),c.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),c.on("zoomend",this._onZoomEnd,this),c.whenReady(this._onZoomEnd,this))}et(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Jt(this._map._container,"leaflet-grab"),Jt(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 c=this._map;if(c._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var h=ee(this._map.options.maxBounds);this._offsetLimit=ne(this._map.latLngToContainerPoint(h.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(h.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;c.fire("movestart").fire("dragstart"),c.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(c){if(this._map.options.inertia){var h=this._lastTime=+new Date,O=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(O),this._times.push(h),this._prunePositions(h)}this._map.fire("move",c).fire("drag",c)},_prunePositions:function(c){for(;this._positions.length>1&&c-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var c=this._map.getSize().divideBy(2),h=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=h.subtract(c).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(c,h){return c-(c-h)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var c=this._draggable._newPos.subtract(this._draggable._startPos),h=this._offsetLimit;c.xh.max.x&&(c.x=this._viscousLimit(c.x,h.max.x)),c.y>h.max.y&&(c.y=this._viscousLimit(c.y,h.max.y)),this._draggable._newPos=this._draggable._startPos.add(c)}},_onPreDragWrap:function(){var c=this._worldWidth,h=Math.round(c/2),O=this._initialWorldOffset,T=this._draggable._newPos.x,k=(T-h+O)%c+h-O,G=(T+h+O)%c-h-O,re=Math.abs(k+O)0?G:-G))-h;this._delta=0,this._startTime=null,re&&(c.options.scrollWheelZoom==="center"?c.setZoom(h+re):c.setZoomAround(this._lastMousePos,h+re))}});ut.addInitHook("addHandler","scrollWheelZoom",BA);var lW=600;ut.mergeOptions({tapHold:Ue.touchNative&&Ue.safari&&Ue.mobile,tapTolerance:15});var zA=eo.extend({addHooks:function(){Xe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){wt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(c){if(clearTimeout(this._holdTimeout),c.touches.length===1){var h=c.touches[0];this._startPos=this._newPos=new Z(h.clientX,h.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Xe(document,"touchend",In),Xe(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",h))},this),lW),Xe(document,"touchend touchcancel contextmenu",this._cancel,this),Xe(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function c(){wt(document,"touchend",In),wt(document,"touchend touchcancel",c)},_cancel:function(){clearTimeout(this._holdTimeout),wt(document,"touchend touchcancel contextmenu",this._cancel,this),wt(document,"touchmove",this._onMove,this)},_onMove:function(c){var h=c.touches[0];this._newPos=new Z(h.clientX,h.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(c,h){var O=new MouseEvent(c,{bubbles:!0,cancelable:!0,view:window,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY});O._simulated=!0,h.target.dispatchEvent(O)}});ut.addInitHook("addHandler","tapHold",zA),ut.mergeOptions({touchZoom:Ue.touch,bounceAtZoomLimits:!0});var VA=eo.extend({addHooks:function(){et(this._map._container,"leaflet-touch-zoom"),Xe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Jt(this._map._container,"leaflet-touch-zoom"),wt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(c){var h=this._map;if(!(!c.touches||c.touches.length!==2||h._animatingZoom||this._zooming)){var O=h.mouseEventToContainerPoint(c.touches[0]),T=h.mouseEventToContainerPoint(c.touches[1]);this._centerPoint=h.getSize()._divideBy(2),this._startLatLng=h.containerPointToLatLng(this._centerPoint),h.options.touchZoom!=="center"&&(this._pinchStartLatLng=h.containerPointToLatLng(O.add(T)._divideBy(2))),this._startDist=O.distanceTo(T),this._startZoom=h.getZoom(),this._moved=!1,this._zooming=!0,h._stop(),Xe(document,"touchmove",this._onTouchMove,this),Xe(document,"touchend touchcancel",this._onTouchEnd,this),In(c)}},_onTouchMove:function(c){if(!(!c.touches||c.touches.length!==2||!this._zooming)){var h=this._map,O=h.mouseEventToContainerPoint(c.touches[0]),T=h.mouseEventToContainerPoint(c.touches[1]),k=O.distanceTo(T)/this._startDist;if(this._zoom=h.getScaleZoom(k,this._startZoom),!h.options.bounceAtZoomLimits&&(this._zoomh.getMaxZoom()&&k>1)&&(this._zoom=h._limitZoom(this._zoom)),h.options.touchZoom==="center"){if(this._center=this._startLatLng,k===1)return}else{var G=O._add(T)._divideBy(2)._subtract(this._centerPoint);if(k===1&&G.x===0&&G.y===0)return;this._center=h.unproject(h.project(this._pinchStartLatLng,this._zoom).subtract(G),this._zoom)}this._moved||(h._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var re=a(h._move,h,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=D(re,this,!0),In(c)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,z(this._animRequest),wt(document,"touchmove",this._onTouchMove,this),wt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ut.addInitHook("addHandler","touchZoom",VA),ut.BoxZoom=DA,ut.DoubleClickZoom=$A,ut.Drag=FA,ut.Keyboard=UA,ut.ScrollWheelZoom=BA,ut.TapHold=zA,ut.TouchZoom=VA,n.Bounds=H,n.Browser=Ue,n.CRS=fe,n.Canvas=RA,n.Circle=R_,n.CircleMarker=Em,n.Class=W,n.Control=ji,n.DivIcon=AA,n.DivOverlay=to,n.DomEvent=jH,n.DomUtil=SH,n.Draggable=va,n.Evented=te,n.FeatureGroup=ko,n.GeoJSON=Ro,n.GridLayer=Bf,n.Handler=eo,n.Icon=Ql,n.ImageOverlay=Am,n.LatLng=ae,n.LatLngBounds=Y,n.Layer=Ti,n.LayerGroup=Xl,n.LineUtil=FH,n.Map=ut,n.Marker=Sm,n.Mixin=RH,n.Path=ga,n.Point=Z,n.PolyUtil=LH,n.Polygon=Jl,n.Polyline=No,n.Popup=km,n.PosAnimation=dA,n.Projection=UH,n.Rectangle=IA,n.Renderer=Lo,n.SVG=Vf,n.SVGOverlay=PA,n.TileLayer=tu,n.Tooltip=Nm,n.Transformation=Q,n.Util=q,n.VideoOverlay=CA,n.bind=a,n.bounds=ne,n.canvas=LA,n.circle=KH,n.circleMarker=qH,n.control=$f,n.divIcon=rW,n.extend=i,n.featureGroup=HH,n.geoJSON=TA,n.geoJson=XH,n.gridLayer=iW,n.icon=WH,n.imageOverlay=QH,n.latLng=oe,n.latLngBounds=ee,n.layerGroup=VH,n.map=TH,n.marker=GH,n.point=F,n.polygon=ZH,n.polyline=YH,n.popup=tW,n.rectangle=sW,n.setOptions=y,n.stamp=l,n.svg=MA,n.svgOverlay=eW,n.tileLayer=kA,n.tooltip=nW,n.transformation=K,n.version=r,n.videoOverlay=JH;var uW=window.L;n.noConflict=function(){return window.L=uW,this},window.L=n})})(tj,tj.exports);var dm=tj.exports;const II=yt(dm);function zP(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function VP(e,t){return t==null?function(n,r){const i=R.useRef();return i.current||(i.current=e(n,r)),i}:function(n,r){const i=R.useRef();i.current||(i.current=e(n,r));const o=R.useRef(n),{instance:a}=i.current;return R.useEffect(function(){o.current!==n&&(t(a,n,o.current),o.current=n)},[a,n,r]),i}}function A$e(e,t){R.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var n;(n=t.layerContainer)==null||n.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function fV(e){return function(t){const n=uV(),r=e(BP(t,n),n);return aV(n.map,t.attribution),cV(r.current,t.eventHandlers),A$e(r.current,n),r}}function k$e(e,t){const n=VP(e,t),r=fV(n);return j$e(r)}function N$e(e,t){const n=VP(e),r=P$e(n,t);return T$e(r)}function R$e(e,t){const n=VP(e,t),r=fV(n);return C$e(r)}function L$e(e,t,n){const{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function nj(){return nj=Object.assign||function(e){for(var t=1;t(v==null?void 0:v.map)??null,[v]);const y=R.useCallback(b=>{if(b!==null&&v===null){const x=new dm.Map(b,f);n!=null&&u!=null?x.setView(n,u):e!=null&&x.fitBounds(e,t),l!=null&&x.whenReady(l),g(S$e(x))}},[]);R.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const w=v?V.createElement(lV,{value:v},r):a??null;return V.createElement("div",nj({},p,{ref:y}),w)}const I$e=R.forwardRef(M$e),D$e=k$e(function({position:e,...t},n){const r=new dm.Marker(e,t);return zP(r,E$e(n,{overlayContainer:r}))},function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),t.icon!=null&&t.icon!==n.icon&&e.setIcon(t.icon),t.zIndexOffset!=null&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),t.opacity!=null&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),e.dragging!=null&&t.draggable!==n.draggable&&(t.draggable===!0?e.dragging.enable():e.dragging.disable())}),$$e=N$e(function(e,t){const n=new dm.Popup(e,t.overlayContainer);return zP(n,t)},function(e,t,{position:n},r){R.useEffect(function(){const{instance:i}=e;function o(s){s.popup===i&&(i.update(),r(!0))}function a(s){s.popup===i&&r(!1)}return t.map.on({popupopen:o,popupclose:a}),t.overlayContainer==null?(n!=null&&i.setLatLng(n),i.openOn(t.map)):t.overlayContainer.bindPopup(i),function(){var s;t.map.off({popupopen:o,popupclose:a}),(s=t.overlayContainer)==null||s.unbindPopup(),t.map.removeLayer(i)}},[e,t,r,n])}),F$e=R$e(function({url:e,...t},n){const r=new dm.TileLayer(e,BP(t,n));return zP(r,n)},function(e,t,n){L$e(e,t,n);const{url:r}=t;r!=null&&r!==n.url&&e.setUrl(r)}),U$e=()=>m.jsx(F$e,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),B$e=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(({latLong:n})=>n)};const[{latLong:t}]=e;return{zoom:10,center:t}},dV=({toggle:e,isOpen:t,title:n,locations:r=[]})=>m.jsx(To,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:m.jsxs(qi,{className:"map-modal__modal-body",children:[m.jsxs("h3",{className:"map-modal__modal-title",children:[n,m.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),m.jsxs(I$e,{...B$e(r),children:[m.jsx(U$e,{}),r.map(({cityName:i,latLong:o,count:a},s)=>m.jsx(D$e,{position:o,children:m.jsxs($$e,{children:[m.jsx("b",{children:a})," visit",a>1?"s":""," from ",m.jsx("b",{children:i})]})},s))]})]})}),z$e=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=Xt(),[a,s]=Xt(),[l,u]=R.useState([]),f=mb(),d=R.useCallback(p=>{u(p?n.filter(p):n),i()},[n,i]);return m.jsxs(m.Fragment,{children:[!t&&m.jsx(Ye,{color:"link",className:"open-map-modal-btn__btn",id:f,onClick:()=>d(),"aria-label":"Show in map",children:m.jsx(je,{icon:j2})}),t&&m.jsxs(Up,{isOpen:a,toggle:s,children:[m.jsx(nf,{color:"link",className:"open-map-modal-btn__btn",id:f,children:m.jsx(je,{icon:j2})}),m.jsxs(tf,{end:!0,children:[m.jsx(ke,{onClick:()=>d(),children:"Show all locations"}),m.jsx(ke,{onClick:()=>d(({cityName:p})=>t.includes(p)),children:"Show locations in current page"})]})]}),m.jsx(Cr,{placement:"left",target:f,children:"Show in map"}),m.jsx(dV,{toggle:o,isOpen:r,title:e,locations:l})]})},hV=({onChange:e,selected:t={},className:n,isOrphanVisits:r=!1,withPrevInterval:i=!1,disabled:o})=>{const{orphanVisitsType:a,excludeBots:s=!1,loadPrevInterval:l=!1}=t,u=p=>({active:a===p,onClick:()=>e({...t,orphanVisitsType:p===a?void 0:p})}),f=R.useCallback(()=>e({...t,excludeBots:!s}),[s,e,t]),d=R.useCallback(()=>e({...t,loadPrevInterval:!l}),[l,e,t]);return m.jsxs(da,{disabled:o,text:"More",dropdownClassName:n,end:!0,minWidth:250,children:[i&&m.jsxs(m.Fragment,{children:[m.jsx(ke,{active:l,onClick:d,children:"Compare with previous period"}),m.jsx(ke,{divider:!0,tag:"hr"})]}),m.jsx(ke,{header:!0,"aria-hidden":!0,children:"Bots:"}),m.jsx(ke,{active:s,onClick:f,children:"Exclude potential bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(ke,{divider:!0,tag:"hr"}),m.jsx(ke,{header:!0,"aria-hidden":!0,children:"Orphan visits type:"}),m.jsx(ke,{...u("base_url"),children:"Base URL"}),m.jsx(ke,{...u("invalid_short_url"),children:"Invalid short URL"}),m.jsx(ke,{...u("regular_404"),children:"Regular 404"})]}),m.jsx(ke,{divider:!0,tag:"hr"}),m.jsx(ke,{disabled:t.excludeBots===void 0&&t.loadPrevInterval===void 0&&t.orphanVisitsType===void 0,onClick:()=>e({excludeBots:void 0,loadPrevInterval:void 0,orphanVisitsType:void 0}),children:m.jsx("i",{children:"Reset to defaults"})})]})},pV=({info:e})=>{const{loading:t,errorData:n,progress:r}=e;return m.jsxs(m.Fragment,{children:[t&&r===null&&m.jsx(na,{loading:!0}),t&&r!==null&&m.jsxs(na,{loading:!0,children:["This is going to take a while... :S",m.jsx(x7,{value:r,striped:r>=100,className:"mt-3"})]}),n&&m.jsx(ur,{type:"error",children:m.jsx(Oo,{errorData:n,fallbackMessage:"An error occurred while loading visits :("})})]})},pg=({children:e,showFallback:t})=>m.jsxs(m.Fragment,{children:[t&&m.jsx(na,{className:"mt-3",children:"There are no visits matching current filter"}),!t&&m.jsx(m.Fragment,{children:e})]}),V$e=({visitsDeletion:e,deleteVisits:t})=>{const{deleting:n}=e,[r,,i]=Xt();return m.jsx(Ot,{title:m.jsx("span",{className:"text-danger fw-bold",children:"Danger zone"}),children:m.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[m.jsxs("dl",{className:"m-0 me-3",children:[m.jsx("dt",{children:"Delete visits."}),m.jsxs("dd",{className:"m-0",children:["This will delete ",m.jsx("b",{children:"all"})," visits, not only the ones matching current filter."]})]}),!r&&m.jsx(Ye,{color:"danger",className:"indivisible",onClick:i,children:"Delete visits"}),r&&m.jsxs(Ye,{color:"danger",disabled:n,className:"indivisible",onClick:t,innerRef:o=>{o==null||o.focus()},children:[!n&&m.jsx(m.Fragment,{children:"Click again to confirm"}),n&&m.jsx(m.Fragment,{children:"Deleting..."})]})]})})},H$e={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},mV={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},en={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},nr={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Ea={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class be{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=be.getVersionPrecision(t),o=be.getVersionPrecision(n);let a=Math.max(i,o),s=0;const l=be.map([t,n],u=>{const f=a-be.getVersionPrecision(u),d=u+new Array(f+1).join(".0");return be.map(d.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(l[0][a]>l[1][a])return 1;if(l[0][a]===l[1][a]){if(a===s)return 0;a-=1}else if(l[0][a]{r[s]=a[s]})}return t}static getBrowserAlias(t){return H$e[t]}static getBrowserTypeByAlias(t){return mV[t]||""}}const _t=/version\/(\d+(\.?_?\d+)+)/i,W$e=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=be.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=be.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=be.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=be.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=be.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=be.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=be.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=be.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=be.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=be.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=be.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=be.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=be.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=be.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=be.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=be.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=be.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=be.getFirstMatch(_t,e)||be.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=be.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=be.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=be.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=be.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=be.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=be.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=be.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=be.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=be.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=be.getFirstMatch(_t,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:be.getFirstMatch(r,e),version:be.getSecondMatch(r,e)}}}],G$e=[{test:[/Roku\/DVP/],describe(e){const t=be.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:nr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=be.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:nr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=be.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=be.getWindowsVersionName(t);return{name:nr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:nr.iOS},n=be.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=be.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=be.getMacOSVersionName(t),r={name:nr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=be.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:nr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=be.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=be.getAndroidVersionName(t),r={name:nr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=be.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:nr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=be.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||be.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||be.getFirstMatch(/\bbb(\d+)/i,e);return{name:nr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=be.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:nr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=be.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:nr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:nr.Linux}}},{test:[/CrOS/],describe(){return{name:nr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=be.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:nr.PlayStation4,version:t}}}],q$e=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=be.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:en.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:en.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:en.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:en.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:en.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:en.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:en.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=be.getFirstMatch(/(ipod|iphone)/i,e);return{type:en.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:en.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:en.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:en.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:en.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:en.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:en.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:en.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:en.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:en.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:en.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:en.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:en.tv}}}],K$e=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Ea.Blink};const t=be.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Ea.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:Ea.Trident},n=be.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Ea.Presto},n=be.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Ea.Gecko},n=be.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Ea.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Ea.WebKit},n=be.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class DI{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=be.find(W$e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=be.find(G$e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=be.find(q$e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=be.find(K$e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return be.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const s=t[a];typeof s=="string"?(i[a]=s,o+=1):typeof s=="object"&&(n[a]=s,r+=1)}),r>0){const a=Object.keys(n),s=be.find(a,u=>this.isOS(u));if(s){const u=this.satisfies(n[s]);if(u!==void 0)return u}const l=be.find(a,u=>this.isPlatform(u));if(l){const u=this.satisfies(n[l]);if(u!==void 0)return u}}if(o>0){const a=Object.keys(i),s=be.find(a,l=>this.isBrowser(l,!0));if(s!==void 0)return this.compareVersion(i[s])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=be.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(be.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 */class Y$e{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new DI(t,n)}static parse(t){return new DI(t).getResult()}static get BROWSER_MAP(){return mV}static get ENGINE_MAP(){return Ea}static get OS_MAP(){return nr}static get PLATFORMS_MAP(){return en}}const Iv="Others",Z$e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],X$e=e=>{if(!Qs(e))return{browser:Iv,os:Iv};const{browser:{name:t},os:{name:n}}=Y$e.parse(e);return{os:n??Iv,browser:t&&Z$e.includes(t)?t:Iv}},Q$e=e=>{var t;return Qs(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},vV=(e,t)=>e[t]!==void 0,$I=e=>typeof e=="number"?e:e?parseFloat(e):0,J$e=(e,{os:t})=>{e[t]=(e[t]||0)+1},e7e=(e,{browser:t})=>{e[t]=(e[t]||0)+1},t7e=(e,{referer:t})=>{e[t]=(e[t]||0)+1},gV=e=>(t,n)=>{const r=vV(n,e)?n[e]:"Unknown";t[r]=(t[r]||0)+1},n7e=gV("country"),r7e=gV("city"),i7e=(e,t)=>{if(!vV(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[$I(r),$I(i)]};o.count+=1,e[n]=o},o7e=(e,t)=>{if(!kde(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},rj=e=>e.reduce((t,n)=>(J$e(t.os,n),e7e(t.browsers,n),t7e(t.referrers,n),n7e(t.countries,n),r7e(t.cities,n),i7e(t.citiesForMap,n),o7e(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),M0=e=>e.map(t=>{const{userAgent:n,date:r,referer:i,visitLocation:o,potentialBot:a}=t,s={date:r,potentialBot:a,...X$e(n),referer:Q$e(i),country:(o==null?void 0:o.countryName)||"Unknown",city:(o==null?void 0:o.cityName)||"Unknown",latitude:o==null?void 0:o.latitude,longitude:o==null?void 0:o.longitude};return wC(t)?{...s,type:t.type,visitedUrl:t.visitedUrl}:s}),a7e=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:M0,processStatsFromVisits:rj},Symbol.toStringTag,{value:"Module"})),Td=20,s7e=({browser:e,os:t,referer:n,country:r,city:i,...o},a)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(a.toLowerCase()),l7e=(e,t)=>t.filter(n=>s7e(n,e)),u7e=(e,t)=>nF(t,e),c7e=(e,t,n)=>{const r=t?l7e(t,e):[...e],i=u7e(n,r),o=i.length;return{visitsGroups:ec(i,Td),total:o}},Mo="visits-table__header-cell visits-table__sticky",f7e=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var o;const a=EC(767,r),[s,l]=R.useState(void 0),u=R.useRef(s),[f,d]=R.useState({}),p=R.useMemo(()=>c7e(e,s,f),[e,s,f]),[v,g]=R.useState(1),y=v*Td,w=y-Td,b=8+Number(i),x=S=>()=>d({field:S,dir:gb(S,f.field,f.dir)}),_=S=>m.jsx(Kd,{currentOrder:f,field:S,className:"visits-table__header-icon"});return R.useEffect(()=>{u.current!==s&&(g(1),n([])),u.current=s},[s,n]),m.jsx("div",{className:"table-responsive-md",children:m.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[m.jsxs("thead",{className:"visits-table__header",children:[m.jsxs("tr",{children:[m.jsxs("th",{className:`${Mo} text-center`,onClick:()=>n(t.length0})})]}),m.jsxs("th",{className:`${Mo} text-center`,onClick:x("potentialBot"),children:[m.jsx("span",{className:"sr-only",children:"Is bot"}),m.jsx(je,{icon:w3}),_("potentialBot")]}),m.jsxs("th",{className:Mo,onClick:x("date"),children:["Date",_("date")]}),m.jsxs("th",{className:Mo,onClick:x("country"),children:["Country",_("country")]}),m.jsxs("th",{className:Mo,onClick:x("city"),children:["City",_("city")]}),m.jsxs("th",{className:Mo,onClick:x("browser"),children:["Browser",_("browser")]}),m.jsxs("th",{className:Mo,onClick:x("os"),children:["OS",_("os")]}),m.jsxs("th",{className:Mo,onClick:x("referer"),children:["Referrer",_("referer")]}),i&&m.jsxs("th",{className:Mo,onClick:x("visitedUrl"),children:["Visited URL",_("visitedUrl")]})]}),m.jsx("tr",{children:m.jsx("td",{colSpan:b,className:"p-0",children:m.jsx(qp,{noBorder:!0,large:!1,onChange:l})})})]}),m.jsxs("tbody",{children:[p.total===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:b,className:"text-center",children:"There are no visits matching current filter"})}),(o=p.visitsGroups[v-1])==null?void 0:o.map((S,j)=>{const E=t.includes(S);return m.jsxs("tr",{style:{cursor:"pointer"},className:De({"table-active":E}),onClick:()=>n(E?t.filter(C=>C!==S):[...t,S]),children:[m.jsx("td",{className:"text-center",children:E&&m.jsx(je,{icon:Oh,className:"text-primary"})}),m.jsx("td",{className:"text-center",children:S.potentialBot&&m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:w3,id:`botIcon${j}`}),m.jsx(Cr,{placement:"right",target:`botIcon${j}`,children:"Potentially a visit from a bot or crawler"})]})}),m.jsx("td",{children:m.jsx(Ly,{date:S.date})}),m.jsx("td",{children:S.country}),m.jsx("td",{children:S.city}),m.jsx("td",{children:S.browser}),m.jsx("td",{children:S.os}),m.jsx("td",{children:S.referer}),i&&m.jsx("td",{children:S.visitedUrl})]},j)})]}),p.total>Td&&m.jsx("tfoot",{children:m.jsx("tr",{children:m.jsx("td",{colSpan:b,className:"visits-table__footer-cell visits-table__sticky",children:m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(RC,{pagesCount:Math.ceil(p.total/Td),currentPage:v,setCurrentPage:g,centered:a})}),m.jsx("div",{className:De("col-md-6",{"d-flex align-items-center flex-row-reverse":!a,"text-center mt-3":a}),children:m.jsxs("div",{children:["Visits ",m.jsx("b",{children:Zt(w+1)})," to"," ",m.jsx("b",{children:Zt(Math.min(y,p.total))})," of"," ",m.jsx("b",{children:Zt(p.total)})]})})]})})})})]})})},ja={byTime:{title:"By time",subPath:"by-time",icon:LZ},byContext:{title:"By context",subPath:"by-context",icon:dT},byLocation:{title:"By location",subPath:"by-location",icon:j2},list:{title:"List",subPath:"list",icon:n$},options:{title:"Options",subPath:"options",icon:o$,shouldRender:({deletion:e})=>!!e}};Object.freeze(ja);const ww=({display:e})=>e&&m.jsx("div",{className:"mt-3 mx-auto w-75",children:m.jsx(Ot,{children:m.jsxs("div",{className:"d-flex gap-2",children:[m.jsx(je,{icon:RX,className:"mt-1"}),m.jsx("i",{children:"Could not calculate previous period because selected one does not have a strictly defined start date."})]})})});let Dv;const hm=e=>{const{children:t,visitsInfo:n,getVisits:r,cancelGetVisits:i,deletion:o,exportCsv:a,isOrphanVisits:s=!1}=e,{visits:l,prevVisits:u,loading:f,errorData:d,fallbackInterval:p}=n,[{dateRange:v,visitsFilter:g,loadPrevInterval:y},w]=oV(),b=ws("visits"),[x,_]=R.useState(),S=R.useCallback(({startDate:P,endDate:A},U)=>{w({dateRange:{startDate:P??void 0,endDate:A??void 0}}),_(U)},[w]),j=R.useRef(v??p??(b==null?void 0:b.defaultInterval)??"last30Days"),[E,C]=R.useState([]),[N,I]=R.useState(),M=R.useRef(!0),{search:D}=pr(),z=R.useCallback(P=>P?`${P}${D}`:D,[D]),q=R.useMemo(()=>M0(l),[l]),W=R.useMemo(()=>u&&M0(u),[u]),{os:X,browsers:J,referrers:te,countries:Z,cities:B,citiesForMap:F,visitedUrls:H}=R.useMemo(()=>rj(q),[q]),ne=R.useMemo(()=>rj(W??[]),[W]),Y=R.useMemo(()=>Object.fromEntries([["Visits",Object.assign(q,{type:"main"})],W&&["Previous period",Object.assign(W,{type:"previous"})],E.length>0&&[N??"Selected",Object.assign(E,{type:"highlighted"})]].filter(Boolean)),[N,E,W,q]),ee=R.useMemo(()=>({...g,excludeBots:g.excludeBots??(b==null?void 0:b.excludeBots),loadPrevInterval:y??(b==null?void 0:b.loadPrevInterval)}),[y,g,b==null?void 0:b.excludeBots,b==null?void 0:b.loadPrevInterval]),ae=R.useMemo(()=>Object.values(F),[F]),oe=R.useCallback(P=>{Dv=void 0,C(P)},[]),fe=R.useCallback((P,A)=>{const U=`${P}_${A}`;Dv===U?(C([]),I(void 0),Dv=void 0):(C(q.filter(Q=>Q[P]===A)),I(A),Dv=U)},[q]);return R.useEffect(()=>i,[i]),R.useEffect(()=>{const P=v??rU(j.current),{loadPrevInterval:A,...U}=ee,Q={doIntervalFallback:M.current,loadPrevInterval:A};r({dateRange:P,filter:U},Q),oe([]),M.current=!1},[v,g,r,ee,oe]),R.useEffect(()=>{p&&j.current===((b==null?void 0:b.defaultInterval)??"last30Days")&&(j.current=p)},[p,b==null?void 0:b.defaultInterval]),m.jsxs(m.Fragment,{children:[t,m.jsx("section",{className:"mt-3",children:m.jsxs("div",{className:"row flex-md-row-reverse",children:[m.jsx("div",{className:"col-lg-7 col-xl-6",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(PC,{disabled:f,dateRangeOrInterval:x??v??j.current,defaultText:"All visits",onDatesChange:S})}),m.jsx(hV,{disabled:f,className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:s,withPrevInterval:!0,selected:ee,onChange:({loadPrevInterval:P,...A})=>w({visitsFilter:A,loadPrevInterval:P})})]})}),l.length>0&&m.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:m.jsxs("div",{className:"d-flex",children:[m.jsx(FU,{className:"btn-md-block",amount:q.length,onClick:()=>a(q)}),m.jsxs(Ye,{outline:!0,disabled:E.length===0,className:"btn-md-block ms-2",onClick:()=>oe([]),children:["Clear selection ",E.length>0&&m.jsxs(m.Fragment,{children:["(",Zt(E.length),")"]})]})]})})]})}),m.jsxs("section",{className:"mt-3",children:[m.jsx(pV,{info:n}),!f&&!d&&m.jsxs(m.Fragment,{children:[m.jsx(tF,{fill:!0,children:Object.values(ja).map(({title:P,icon:A,subPath:U,shouldRender:Q},K)=>!Q||Q(e)?m.jsxs(Gd,{to:z(U),replace:!0,children:[m.jsx(je,{icon:A}),m.jsx("span",{className:"ms-2 d-none d-lg-inline",children:P})]},K):void 0).filter(Boolean)}),m.jsx(ir,{children:m.jsxs(rb,{children:[m.jsx(lt,{path:ja.byTime.subPath,element:m.jsxs(pg,{showFallback:l.length===0,children:[m.jsx("div",{className:"col-12 mt-3","data-testid":"line-chart-container",children:m.jsx(iV,{visitsGroups:Y,setSelectedVisits:oe})}),m.jsx(ww,{display:!!ee.loadPrevInterval&&!u})]})}),m.jsx(lt,{path:ja.byContext.subPath,element:m.jsxs(pg,{showFallback:l.length===0,children:[m.jsx("div",{className:De("mt-3 col-lg-6",{"col-xl-4":!s}),children:m.jsx(NI,{title:"Operating systems",stats:X,prevStats:ne.os})}),m.jsx("div",{className:De("mt-3 col-lg-6",{"col-xl-4":!s}),children:m.jsx(NI,{title:"Browsers",stats:J,prevStats:ne.browsers})}),m.jsx("div",{className:De("mt-3",{"col-xl-4":!s,"col-lg-6":s}),children:m.jsx(Mv,{title:"Referrers",withPagination:!1,stats:te,prevStats:ne.referrers,highlightedStats:gv(E,"referer"),highlightedLabel:N,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:P=>fe("referer",P)})}),s&&m.jsx("div",{className:"mt-3 col-lg-6",children:m.jsx(Mv,{title:"Visited URLs",stats:H,prevStats:ne.visitedUrls,highlightedStats:gv(E,"visitedUrl"),highlightedLabel:N,sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:P=>fe("visitedUrl",P)})}),m.jsx("div",{className:"col-12",children:m.jsx(ww,{display:!!ee.loadPrevInterval&&!u})})]})}),m.jsx(lt,{path:ja.byLocation.subPath,element:m.jsxs(pg,{showFallback:l.length===0,children:[m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(Mv,{title:"Countries",stats:Z,prevStats:ne.countries,highlightedStats:gv(E,"country"),highlightedLabel:N,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:P=>fe("country",P)})}),m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(Mv,{title:"Cities",stats:B,prevStats:ne.cities,highlightedStats:gv(E,"city"),highlightedLabel:N,extraHeaderContent:P=>ae.length>0&&m.jsx(z$e,{modalTitle:"Cities",locations:ae,activeCities:P}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:P=>fe("city",P)})}),m.jsx("div",{className:"col-12",children:m.jsx(ww,{display:!!ee.loadPrevInterval&&!u})})]})}),m.jsx(lt,{path:ja.list.subPath,element:m.jsx("div",{className:"col-12",children:m.jsx(f7e,{visits:q,selectedVisits:E,setSelectedVisits:oe,isOrphanVisits:s})})}),o&&m.jsx(lt,{path:ja.options.subPath,element:m.jsx("div",{className:"col-12 mt-3",children:m.jsx(V$e,{...o})})}),m.jsx(lt,{path:"*",element:m.jsx(iT,{replace:!0,to:z(ja.byTime.subPath)})})]})})]})]})]})},yV=Ki(({getDomainVisits:e,domainVisits:t,cancelGetDomainVisits:n})=>{const{ReportExporter:r}=$t(yV),{domain:i=""}=Jc(),[o,a=o]=i.split("_"),s=R.useCallback((u,f)=>e({domain:a,options:f,params:u}),[a,e]),l=R.useCallback(u=>r.exportVisits(`domain_${o}_visits.csv`,u),[o,r]);return m.jsx(hm,{getVisits:s,cancelGetVisits:n,visitsInfo:t,exportCsv:l,children:m.jsx(tm,{visits:t.visits,title:`"${o}" visits`})})},()=>[cr.visits]),d7e=Ft(yV,["ReportExporter"]),bV=Ki(({getNonOrphanVisits:e,nonOrphanVisits:t,cancelGetNonOrphanVisits:n})=>{const{ReportExporter:r}=$t(bV),i=R.useCallback(a=>r.exportVisits("non_orphan_visits.csv",a),[r]),o=R.useCallback((a,s)=>e({options:s,params:a}),[e]);return m.jsx(hm,{getVisits:o,cancelGetVisits:n,visitsInfo:t,exportCsv:i,children:m.jsx(tm,{title:"Non-orphan visits",visits:t.visits})})},()=>[cr.visits]),h7e=Ft(bV,["ReportExporter"]),_V=Ki(({getOrphanVisits:e,orphanVisits:t,cancelGetOrphanVisits:n,deleteOrphanVisits:r,orphanVisitsDeletion:i})=>{const o=fs("orphanVisitsDeletion"),{ReportExporter:a}=$t(_V),s=R.useCallback(f=>a.exportVisits("orphan_visits.csv",f),[a]),l=R.useCallback((f,d)=>{var p;return e({options:d,params:f,orphanVisitsType:(p=f.filter)==null?void 0:p.orphanVisitsType})},[e]),u=R.useMemo(()=>o?{deleteVisits:r,visitsDeletion:i}:void 0,[r,i,o]);return m.jsx(hm,{getVisits:l,cancelGetVisits:n,visitsInfo:t,exportCsv:s,deletion:u,isOrphanVisits:!0,children:m.jsx(tm,{title:"Orphan visits",visits:t.visits})})},()=>[cr.orphanVisits]),p7e=Ft(_V,["ReportExporter"]),xV="shlink/orphanVisits",m7e={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},v7e=e=>Qp({typePrefix:`${xV}/getNonOrphanVisits`,createLoaders:({options:t})=>{const n=e(),{doIntervalFallback:r=!1}=t,i=async a=>n.getNonOrphanVisits(a),o=Xp(r,a=>n.getNonOrphanVisits(a));return{visitsLoader:i,lastVisitLoader:o}},shouldCancel:t=>t().orphanVisits.cancelLoad}),g7e=e=>Jp({name:xV,initialState:m7e,asyncThunkCreator:e,filterCreatedVisits:({params:t},n)=>{const{startDate:r,endDate:i}=(t==null?void 0:t.dateRange)??{};return n.filter(({visit:o})=>Zp(o.date,r,i))}}),wV="shlink/orphanVisits",y7e={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},b7e=(e,t)=>!t||t===e.type,_7e=({data:e,...t},n)=>{const r=e.filter(i=>wC(i)&&b7e(i,n));return{...t,data:r}},x7e=e=>Qp({typePrefix:`${wV}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=async s=>r.getOrphanVisits(s).then(l=>_7e(l,t)),a=Xp(i,s=>r.getOrphanVisits(s));return{visitsLoader:o,lastVisitLoader:a}},shouldCancel:t=>t().orphanVisits.cancelLoad}),w7e=(e,t)=>Jp({name:wV,initialState:y7e,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,r=>({...r,visits:[]}))},filterCreatedVisits:({params:n},r)=>{const{startDate:i,endDate:o}=(n==null?void 0:n.dateRange)??{};return r.filter(({visit:a,shortUrl:s})=>!s&&Zp(a.date,i,o))}}),OV="shlink/orphanVisitsDeletion",FI={deletedVisits:0,deleting:!1,error:!1},O7e=e=>yn(`${OV}/deleteOrphanVisits`,()=>e().deleteOrphanVisits()),S7e=e=>rn({name:OV,initialState:FI,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,deleting:!0,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,deleting:!1,error:!0,errorData:qr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{deletedVisits:i}=r;return{...FI,deletedVisits:i}})}}),SV="shlink/shortUrlVisits",E7e={visits:[],shortCode:"",loading:!1,errorData:null,cancelLoad:!1,progress:null},j7e=e=>Qp({typePrefix:`${SV}/getShortUrlVisits`,createLoaders:({shortCode:t,domain:n,options:r})=>{const i=e(),{doIntervalFallback:o=!1}=r,a=l=>i.getShortUrlVisits(t,{...l,domain:n}),s=Xp(o,l=>i.getShortUrlVisits(t,{...l,domain:n}));return{visitsLoader:a,lastVisitLoader:s}},shouldCancel:t=>t().shortUrlVisits.cancelLoad}),T7e=(e,t)=>Jp({name:SV,initialState:E7e,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,(r,{payload:i})=>r.shortCode===i.shortCode&&r.domain===i.domain?{...r,visits:[]}:r)},filterCreatedVisits:({shortCode:n,domain:r,params:i},o)=>oU(o,{shortCode:n,domain:r},i==null?void 0:i.dateRange)}),EV="shlink/shortUrlVisitsDeletion",UI={shortCode:"",deletedVisits:0,deleting:!1,error:!1},C7e=e=>yn(`${EV}/deleteShortUrlVisits`,async({shortCode:t,domain:n})=>({...await e().deleteShortUrlVisits(t,n),shortCode:t,domain:n})),P7e=e=>rn({name:EV,initialState:UI,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,deleting:!0,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,deleting:!1,error:!0,errorData:qr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{shortCode:i,domain:o,deletedVisits:a}=r;return{...UI,shortCode:i,domain:o,deletedVisits:a}})}}),jV="shlink/tagVisits",A7e={visits:[],tag:"",loading:!1,cancelLoad:!1,errorData:null,progress:null},k7e=e=>Qp({typePrefix:`${jV}/getTagVisits`,createLoaders:({tag:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=s=>r.getTagVisits(t,s),a=Xp(i,async s=>r.getTagVisits(t,s));return{visitsLoader:o,lastVisitLoader:a}},shouldCancel:t=>t().tagVisits.cancelLoad}),N7e=e=>Jp({name:jV,initialState:A7e,asyncThunkCreator:e,filterCreatedVisits:({tag:t,params:n},r)=>sU(r,t,n==null?void 0:n.dateRange)}),TV="shlink/visitsOverview",$v={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},BI=e=>e.filter(({visit:t})=>t.potentialBot).length,R7e=e=>yn(`${TV}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n=0,orphanVisits:r,orphanVisitsCount:i=0})=>({nonOrphanVisits:{total:(t==null?void 0:t.total)??n,nonBots:t==null?void 0:t.nonBots,bots:t==null?void 0:t.bots},orphanVisits:{total:(r==null?void 0:r.total)??i,nonBots:r==null?void 0:r.nonBots,bots:r==null?void 0:r.bots}}))),L7e=e=>rn({name:TV,initialState:$v,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...$v,loading:!0})),t.addCase(e.rejected,()=>({...$v,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...$v,...r})),t.addCase(uf,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:a,orphanVisits:s}=Nde(o.createdVisits),l=a.length,u=BI(a),f=l-u,d=s.length,p=BI(s),v=d-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+u,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+d,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+v}}})}}),M7e=({shortUrl:e,loading:t,shortUrlVisits:n})=>{const{visits:r}=n,i=(e==null?void 0:e.shortUrl)??"",o=(e==null?void 0:e.longUrl)??"",a=e==null?void 0:e.title;return m.jsxs(tm,{title:m.jsxs(m.Fragment,{children:["Visits for ",m.jsx(hi,{href:i})]}),visits:r,shortUrl:e,children:[m.jsx("hr",{}),m.jsxs("div",{children:["Created: ",e?m.jsxs("span",{children:[m.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:m.jsx(Ly,{date:e.dateCreated,relative:!0})}),m.jsx(Cr,{placement:"bottom",target:"created",children:m.jsx(Ly,{date:e.dateCreated})})]}):m.jsx("small",{children:"Loading..."})]}),m.jsxs("div",{className:"long-url-container",children:[`${a?"Title":"Long URL"}: `,t&&m.jsx("small",{children:"Loading..."}),!t&&m.jsx(hi,{href:o,children:a??o})]})]})},CV=Ki(({shortUrlVisits:e,shortUrlVisitsDeletion:t,shortUrlsDetails:n,getShortUrlVisits:r,getShortUrlsDetails:i,deleteShortUrlVisits:o,cancelGetShortUrlVisits:a})=>{const s=fs("shortUrlVisitsDeletion"),{ReportExporter:l}=$t(CV),u=CC(),f=R.useMemo(()=>{var g;return(g=n.shortUrls)==null?void 0:g.get(u)},[u,n.shortUrls]),d=R.useCallback((g,y)=>r({...u,options:y,params:g}),[r,u]),p=R.useCallback(g=>l.exportVisits(`short-url_${f==null?void 0:f.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,g),[l,f==null?void 0:f.shortUrl]),v=R.useMemo(()=>s?{deleteVisits:()=>o(u),visitsDeletion:t}:void 0,[o,u,t,s]);return R.useEffect(()=>{i([u])},[u,i]),m.jsx(hm,{getVisits:d,cancelGetVisits:a,visitsInfo:e,exportCsv:p,deletion:v,children:m.jsx(M7e,{shortUrl:f,loading:n.loading,shortUrlVisits:e})})},e=>e.shortCode?[cr.shortUrlVisits(mC(e.shortCode))]:[]),I7e=Ft(CV,["ReportExporter"]),D7e=({tagVisits:e,colorGenerator:t})=>{const{visits:n,tag:r}=e;return m.jsx(tm,{title:m.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[m.jsx("span",{className:"me-2",children:"Visits for"}),m.jsx(Ab,{text:r,colorGenerator:t})]}),visits:n})},PV=Ki(({getTagVisits:e,tagVisits:t,cancelGetTagVisits:n})=>{const{ColorGenerator:r,ReportExporter:i}=$t(PV),{tag:o=""}=Jc(),a=R.useCallback((l,u)=>e({tag:o,params:l,options:u}),[e,o]),s=R.useCallback(l=>i.exportVisits(`tag_${o}_visits.csv`,l),[i,o]);return m.jsx(hm,{getVisits:a,cancelGetVisits:n,visitsInfo:t,exportCsv:s,children:m.jsx(D7e,{tagVisits:t,colorGenerator:r})})},()=>[cr.visits]),$7e=Ft(PV,["ColorGenerator","ReportExporter"]),HP=({title:e,colors:t,getVisitsForComparison:n,visitsComparisonInfo:r,cancelGetVisitsComparison:i})=>{const{loading:o,visitsGroups:a}=r,s=ws("visits"),l=R.useMemo(()=>Object.keys(a).reduce((x,_,S)=>(x[_]=Object.assign(M0(a[_]),{color:(t==null?void 0:t[_])??nV(S)}),x),{}),[t,a]),u=R.useMemo(()=>Object.values(a).every(x=>x.length===0),[a]),[{dateRange:f,visitsFilter:d},p]=oV(),[v,g]=R.useState(),y=R.useCallback(({startDate:x,endDate:_},S)=>{p({dateRange:{startDate:x??void 0,endDate:_??void 0}}),g(S)},[p]),w=R.useRef(f??(s==null?void 0:s.defaultInterval)??"last30Days"),b=R.useMemo(()=>({...d,excludeBots:d.excludeBots??(s==null?void 0:s.excludeBots)}),[d,s==null?void 0:s.excludeBots]);return R.useEffect(()=>{const x=f??rU(w.current);return n({params:{dateRange:x,filter:b}}),i},[i,f,n,b]),m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"mb-3",children:m.jsxs(Ot,{bodyClassName:"d-flex",children:[m.jsx(Pb,{}),m.jsx("h3",{className:"mb-0 flex-grow-1 text-center",children:e})]})}),m.jsx("div",{className:"col-lg-7 col-xl-6 offset-lg-5 offset-xl-6 mb-3",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(PC,{disabled:o,defaultText:"All visits",dateRangeOrInterval:v??w.current,onDatesChange:y})}),m.jsx(hV,{disabled:o,className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:b,onChange:({orphanVisitsType:x,excludeBots:_})=>p({visitsFilter:{orphanVisitsType:x,excludeBots:_}})})]})}),m.jsx(pV,{info:r}),!o&&m.jsx(pg,{showFallback:u,children:m.jsx(iV,{visitsGroups:l})})]})},F7e=Ki(({getDomainVisitsForComparison:e,domainVisitsComparison:t,cancelGetDomainVisitsComparison:n})=>{const r=SC("domains"),i=R.useCallback(o=>e({...o,domains:r}),[r,e]);return m.jsx(HP,{title:`Comparing "${r.join('", "')}"`,getVisitsForComparison:i,visitsComparisonInfo:t,cancelGetVisitsComparison:n})},()=>[cr.visits]),U7e=({visitsLoaders:e,shouldCancel:t,progressChanged:n})=>{const r=Object.keys(e),i=Math.max(1,Math.round(4/r.length)),o=Object.fromEntries(r.map(l=>[l,0])),a=(l,u)=>{o[l]=u;const f=Object.values(o),d=f.reduce((p,v)=>p+v,0);n(d/f.length)},s=Object.entries(e).map(([l,u])=>[l,lU({visitsLoader:u,batchSize:i,shouldCancel:t,progressChanged:f=>a(l,f)})]);return async l=>{const u=await Promise.all(s.map(async([f,d])=>{const p=await d(l);return[f,p]}));return Object.fromEntries(u)}},WP=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=vn(`${e}/progressChanged`),i=yn(e,async(o,{getState:a,dispatch:s})=>{const l=t(o),u=await U7e({visitsLoaders:l,shouldCancel:()=>n(a),progressChanged:f=>s(r(f))})(bS(o.params));return{...o,visitsGroups:u}});return Object.assign(i,{progressChanged:r})},GP=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisitsForGroup:r})=>{const{pending:i,rejected:o,fulfilled:a,progressChanged:s}=t,{reducer:l,actions:u}=rn({name:e,initialState:n,reducers:{cancelGetVisits:d=>({...d,cancelLoad:!0})},extraReducers:d=>{d.addCase(i,()=>({...n,loading:!0})),d.addCase(o,(p,{error:v})=>({...n,errorData:qr(v)??null})),d.addCase(a,(p,{payload:v})=>({...p,...v,loading:!1,progress:null,errorData:null})),d.addCase(s,(p,{payload:v})=>({...p,progress:v})),d.addCase(uf,(p,{payload:v})=>{const{visitsGroups:g,...y}=p,w=Object.keys(g).map(x=>{const _=r({...y,groupKey:x},v.createdVisits).map(({visit:S})=>S);return[x,[..._,...g[x]]]}),b=Object.fromEntries(w);return{...y,visitsGroups:b}})}}),{cancelGetVisits:f}=u;return{reducer:l,cancelGetVisits:f}},AV="shlink/domainVisitsComparison",B7e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},z7e=e=>WP({typePrefix:`${AV}/getDomainVisitsForComparison`,createLoaders:({domains:t})=>{const n=e(),r=t.map(i=>[i,o=>n.getDomainVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:t=>t().domainVisitsComparison.cancelLoad}),V7e=e=>GP({name:AV,initialState:B7e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>aU(r,t,n==null?void 0:n.dateRange)}),kV="shlink/shortUrlVisitsComparison",H7e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},W7e=e=>WP({typePrefix:`${kV}/getShortUrlVisitsForComparison`,createLoaders:({shortUrls:t})=>{const n=e(),r=t.map(i=>[vC(i),o=>n.getShortUrlVisits(i.shortCode,{...o,domain:i.domain})]);return Object.fromEntries(r)},shouldCancel:t=>t().shortUrlVisitsComparison.cancelLoad}),G7e=e=>GP({name:kV,initialState:H7e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>oU(r,UF(t),n==null?void 0:n.dateRange)}),NV="shlink/tagVisitsComparison",q7e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},K7e=e=>WP({typePrefix:`${NV}/getTagVisitsForComparison`,createLoaders:({tags:t})=>{const n=e(),r=t.map(i=>[i,o=>n.getTagVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:t=>t().tagVisitsComparison.cancelLoad}),Y7e=e=>GP({name:NV,initialState:q7e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>sU(r,t,n==null?void 0:n.dateRange)}),Z7e=Ki(({getShortUrlVisitsForComparison:e,shortUrlVisitsComparison:t,cancelGetShortUrlVisitsComparison:n,shortUrlsDetails:r,getShortUrlsDetails:i})=>{const o=SC("short-urls"),a=R.useMemo(()=>o.map(UF),[o]),s=R.useCallback(f=>e({...f,shortUrls:a}),[e,a]),l=R.useMemo(()=>{var f;return[...((f=r.shortUrls)==null?void 0:f.values())??[]]},[r.shortUrls]),u=R.useMemo(()=>{const{visitsGroups:f,loading:d,...p}=t,v=l.reduce((g,y)=>(g[y.shortUrl]=f[vC(y)]??[],g),{});return{...p,visitsGroups:v,loading:d||r.loading}},[t,r.loading,l]);return R.useEffect(()=>{a.length>0&&i(a)},[i,a]),m.jsx(HP,{title:m.jsx("span",{"data-testid":"title",children:r.loading?"Loading...":`Comparing ${l.length} short URLs`}),getVisitsForComparison:s,visitsComparisonInfo:u,cancelGetVisitsComparison:n})},()=>[cr.visits]),RV=Ki(({getTagVisitsForComparison:e,tagVisitsComparison:t,cancelGetTagVisitsComparison:n})=>{const{ColorGenerator:r}=$t(RV),i=SC("tags"),o=R.useCallback(l=>e({...l,tags:i}),[e,i]),{visitsGroups:a}=t,s=R.useMemo(()=>Object.keys(a).reduce((l,u)=>(l[u]=r.getColorForKey(u),l),{}),[r,a]);return m.jsx(HP,{title:m.jsxs(m.Fragment,{children:["Comparing ",i.map(l=>m.jsx(Ab,{colorGenerator:r,text:l},l))]}),getVisitsForComparison:o,visitsComparisonInfo:t,cancelGetVisitsComparison:n,colors:s})},()=>[cr.visits]),X7e=Ft(RV,["ColorGenerator"]),Q7e=(e,t)=>{const n=(r,i)=>t([...r,"mercureInfo"],[...i,"createNewVisits","loadMercureInfo"]);e.serviceFactory("MapModal",()=>dV),e.factory("ShortUrlVisits",I7e),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlVisitsDeletion","shortUrlsDetails","mercureInfo"],["getShortUrlVisits","deleteShortUrlVisits","getShortUrlsDetails","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.factory("TagVisits",$7e),e.decorator("TagVisits",n(["tagVisits"],["getTagVisits","cancelGetTagVisits"])),e.factory("TagVisitsComparison",X7e),e.decorator("TagVisitsComparison",n(["tagVisitsComparison"],["getTagVisitsForComparison","cancelGetTagVisitsForComparison"])),e.serviceFactory("DomainVisitsComparison",()=>F7e),e.decorator("DomainVisitsComparison",n(["domainVisitsComparison"],["getDomainVisitsForComparison","cancelGetDomainVisitsForComparison"])),e.serviceFactory("ShortUrlVisitsComparison",()=>Z7e),e.decorator("ShortUrlVisitsComparison",n(["shortUrlVisitsComparison","shortUrlsDetails"],["getShortUrlVisitsForComparison","cancelGetShortUrlVisitsForComparison","getShortUrlsDetails"])),e.factory("DomainVisits",d7e),e.decorator("DomainVisits",n(["domainVisits"],["getDomainVisits","cancelGetDomainVisits"])),e.factory("OrphanVisits",p7e),e.decorator("OrphanVisits",n(["orphanVisits","orphanVisitsDeletion"],["getOrphanVisits","cancelGetOrphanVisits","deleteOrphanVisits"])),e.factory("NonOrphanVisits",h7e),e.decorator("NonOrphanVisits",n(["nonOrphanVisits"],["getNonOrphanVisits","cancelGetNonOrphanVisits"])),e.serviceFactory("VisitsParser",()=>a7e),e.serviceFactory("getShortUrlVisits",j7e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",r=>r.cancelGetVisits,"shortUrlVisitsReducerCreator"),e.serviceFactory("getShortUrlVisitsForComparison",W7e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisitsForComparison",r=>r.cancelGetVisits,"shortUrlVisitsComparisonReducerCreator"),e.serviceFactory("deleteShortUrlVisits",C7e,"apiClientFactory"),e.serviceFactory("getTagVisits",k7e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",r=>r.cancelGetVisits,"tagVisitsReducerCreator"),e.serviceFactory("getTagVisitsForComparison",K7e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisitsForComparison",r=>r.cancelGetVisits,"tagVisitsComparisonReducerCreator"),e.serviceFactory("getDomainVisits",Bde,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",r=>r.cancelGetVisits,"domainVisitsReducerCreator"),e.serviceFactory("getDomainVisitsForComparison",z7e,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisitsForComparison",r=>r.cancelGetVisits,"domainVisitsComparisonReducerCreator"),e.serviceFactory("getOrphanVisits",x7e,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",r=>r.cancelGetVisits,"orphanVisitsReducerCreator"),e.serviceFactory("deleteOrphanVisits",O7e,"apiClientFactory"),e.serviceFactory("getNonOrphanVisits",v7e,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",r=>r.cancelGetVisits,"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>uf),e.serviceFactory("loadVisitsOverview",R7e,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",L7e,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",r=>r.reducer,"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",zde,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",r=>r.reducer,"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",g7e,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",r=>r.reducer,"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",w7e,"getOrphanVisits","deleteOrphanVisits"),e.serviceFactory("orphanVisitsReducer",r=>r.reducer,"orphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsDeletionReducerCreator",S7e,"deleteOrphanVisits"),e.serviceFactory("orphanVisitsDeletionReducer",r=>r.reducer,"orphanVisitsDeletionReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",T7e,"getShortUrlVisits","deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",r=>r.reducer,"shortUrlVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsDeletionReducerCreator",P7e,"deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsDeletionReducer",r=>r.reducer,"shortUrlVisitsDeletionReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",N7e,"getTagVisits"),e.serviceFactory("tagVisitsReducer",r=>r.reducer,"tagVisitsReducerCreator"),e.serviceFactory("tagVisitsComparisonReducerCreator",Y7e,"getTagVisitsForComparison"),e.serviceFactory("tagVisitsComparisonReducer",r=>r.reducer,"tagVisitsComparisonReducerCreator"),e.serviceFactory("domainVisitsComparisonReducerCreator",V7e,"getDomainVisitsForComparison"),e.serviceFactory("domainVisitsComparisonReducer",r=>r.reducer,"domainVisitsComparisonReducerCreator"),e.serviceFactory("shortUrlVisitsComparisonReducerCreator",G7e,"getShortUrlVisitsForComparison"),e.serviceFactory("shortUrlVisitsComparisonReducer",r=>r.reducer,"shortUrlVisitsComparisonReducerCreator")},pd=({children:e,to:t,className:n,...r})=>m.jsx(B8,{className:({isActive:i})=>De("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),J7e=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=pr(),r=De("aside-menu",{"aside-menu--hidden":!t}),i=o=>`${e}${o}`;return m.jsx("aside",{className:r,children:m.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[m.jsxs(pd,{to:i("/overview"),children:[m.jsx(je,{fixedWidth:!0,icon:fX}),m.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),m.jsxs(pd,{to:i("/list-short-urls/1"),className:De({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[m.jsx(je,{fixedWidth:!0,icon:n$}),m.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),m.jsxs(pd,{to:i("/create-short-url"),children:[m.jsx(je,{fixedWidth:!0,icon:gX,flip:"horizontal"}),m.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),m.jsxs(pd,{to:i("/manage-tags"),children:[m.jsx(je,{fixedWidth:!0,icon:r$}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),m.jsxs(pd,{to:i("/manage-domains"),children:[m.jsx(je,{fixedWidth:!0,icon:VZ}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})},LV=({createNotFound:e})=>{const{TagsList:t,ShortUrlsList:n,CreateShortUrl:r,ShortUrlVisits:i,TagVisits:o,DomainVisits:a,OrphanVisits:s,NonOrphanVisits:l,Overview:u,EditShortUrl:f,ManageDomains:d,TagVisitsComparison:p,DomainVisitsComparison:v,ShortUrlVisitsComparison:g,ShortUrlRedirectRules:y}=$t(LV),w=pr(),b=xs(),[x,_,S,j]=Xt();R.useEffect(()=>j(),[w,j]);const E=De("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":x}),C=rhe(S,j),N=fs("shortUrlRedirectRules");return m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:$Z,className:E,onClick:_}),m.jsx("div",{...C,className:"shlink-layout__swipeable",children:m.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[m.jsx(J7e,{routePrefix:b,showOnMobile:x}),m.jsx("div",{className:"shlink-layout__container",onPointerDown:()=>j(),children:m.jsx("div",{className:"container-xl",children:m.jsxs(rb,{children:[m.jsx(lt,{index:!0,element:m.jsx(iT,{replace:!0,to:"overview"})}),m.jsx(lt,{path:"/overview",element:m.jsx(u,{})}),m.jsx(lt,{path:"/list-short-urls/:page",element:m.jsx(n,{})}),m.jsx(lt,{path:"/create-short-url",element:m.jsx(r,{})}),m.jsx(lt,{path:"/short-code/:shortCode/visits/*",element:m.jsx(i,{})}),m.jsx(lt,{path:"/short-code/:shortCode/edit",element:m.jsx(f,{})}),N&&m.jsx(lt,{path:"/short-code/:shortCode/redirect-rules",element:m.jsx(y,{})}),m.jsx(lt,{path:"/short-urls/compare-visits",element:m.jsx(g,{})}),m.jsx(lt,{path:"/tag/:tag/visits/*",element:m.jsx(o,{})}),m.jsx(lt,{path:"/tags/compare-visits",element:m.jsx(p,{})}),m.jsx(lt,{path:"/domain/:domain/visits/*",element:m.jsx(a,{})}),m.jsx(lt,{path:"/orphan-visits/*",element:m.jsx(s,{})}),m.jsx(lt,{path:"/non-orphan-visits/*",element:m.jsx(l,{})}),m.jsx(lt,{path:"/manage-tags",element:m.jsx(t,{})}),m.jsx(lt,{path:"/manage-domains",element:m.jsx(d,{})}),m.jsx(lt,{path:"/domains/compare-visits",element:m.jsx(v,{})}),e&&m.jsx(lt,{path:"*",element:e("/list-short-urls/1")})]})})})]})})]})},eFe=Ft(LV,["TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains","TagVisitsComparison","DomainVisitsComparison","ShortUrlVisitsComparison","ShortUrlRedirectRules"]),tFe=!0,nFe=e=>bF({devTools:!tFe,reducer:nC({mercureInfo:e.mercureInfoReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlsDetails:e.shortUrlsDetailsReducer,shortUrlVisits:e.shortUrlVisitsReducer,shortUrlVisitsDeletion:e.shortUrlVisitsDeletionReducer,shortUrlVisitsComparison:e.shortUrlVisitsComparisonReducer,tagVisits:e.tagVisitsReducer,tagVisitsComparison:e.tagVisitsComparisonReducer,domainVisits:e.domainVisitsReducer,domainVisitsComparison:e.domainVisitsComparisonReducer,orphanVisits:e.orphanVisitsReducer,orphanVisitsDeletion:e.orphanVisitsDeletionReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer,shortUrlRedirectRules:e.shortUrlRedirectRulesReducer,shortUrlRedirectRulesSaving:e.setShortUrlRedirectRulesReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),rFe=e=>{e.factory("Main",eFe),e.factory("store",nFe)},Zi=new Rce,{container:iFe}=Zi,oFe=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),aFe=(e,t)=>(...n)=>e[t](...n),sFe=(e,t)=>({...e,[t]:aFe(iFe,t)}),Cf=(e,t=[])=>C8(e?oFe(e):null,t.reduce(sFe,{}));rFe(Zi);Rme(Zi,Cf);Jve(Zi,Cf);Q7e(Zi,Cf);vhe(Zi);hhe(Zi,Cf);Ahe(Zi,Cf);wge(Zi);Fpe(Zi,Cf);let zI;const lFe=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:a})=>{const s=cme(t),l=R.useRef(),[u,f]=R.useState(),d=Bl(),p=R.useMemo(()=>d?R.Fragment:U8,[d]);return R.useEffect(()=>{zI=n,e.value("apiClientFactory",()=>zI),a&&e.value("TagColorsStorage",a);const{container:v}=e,{Main:g,store:y,loadMercureInfo:w,listTags:b}=v;l.current=m.jsx(g,{createNotFound:o}),f(y),y.dispatch(w(r)),y.dispatch(b())},[n,o,r,a]),u?m.jsx(P8,{store:u,children:m.jsx(Che,{value:r,children:m.jsx(ume,{value:s,children:m.jsx($ce,{value:i,children:m.jsx(p,{children:l.current})})})})}):m.jsx(m.Fragment,{})},uFe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",cFe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",fFe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",dFe=()=>{delete II.Icon.Default.prototype._getIconUrl,II.Icon.Default.mergeOptions({iconRetinaUrl:cFe,iconUrl:uFe,shadowUrl:fFe})};dFe();const hFe=lFe(Zi);function I0(e){return t=>{const{resetSelectedServer:n}=t;return R.useEffect(()=>{n()},[n]),m.jsx(e,{...t})}}let pFe=class extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){const{console:n=globalThis.console}=this.props;n.error(t)}render(){const{hasError:t}=this.state,{location:n=globalThis.location}=this.props;if(t)return m.jsx("div",{className:"home",children:m.jsxs(Ot,{className:"p-4",children:[m.jsx("h1",{children:"Oops! This is awkward :S"}),m.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),m.jsx("br",{}),m.jsx(Ye,{outline:!0,color:"primary",onClick:()=>n.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};const MV=({href:e,children:t,rel:n,...r})=>m.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),mFe=({id:e,name:t})=>m.jsxs(T7,{tag:jt,to:`/server/${e}`,className:"servers-list__server-item",children:[t,m.jsx(je,{icon:OX,className:"servers-list__server-item-icon"})]}),IV=({servers:e,children:t,embedded:n=!1})=>m.jsxs(m.Fragment,{children:[t&&m.jsx("div",{"data-testid":"title",className:"mb-0 fs-5 fw-normal lh-sm",children:t}),e.length>0&&m.jsx(S7,{"data-testid":"list",tag:"div",className:sf("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>m.jsx(mFe,{id:r,name:i},r))})]}),DV=({color:e=Mh,className:t})=>m.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:m.jsxs("g",{fill:e,children:[m.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),m.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),m.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),m.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})}),vFe=({servers:e})=>{const t=jo(),n=Object.values(e),r=n.length>0;return R.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[n,t]),m.jsx("div",{className:"home",children:m.jsx(jr,{className:"home__main-card",children:m.jsxs(ir,{className:"g-0",children:[m.jsx("div",{className:"col-md-5 d-none d-md-block",children:m.jsx("div",{className:"home__logo-wrapper",children:m.jsx("div",{className:"home__logo",children:m.jsx(DV,{})})})}),m.jsxs("div",{className:"col-md-7 home__servers-container",children:[m.jsx("div",{className:"home__title-wrapper",children:m.jsx("h1",{className:"home__title",children:"Welcome!"})}),m.jsx(IV,{embedded:!0,servers:n,children:!r&&m.jsxs("div",{className:"p-4 text-center",children:[m.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),m.jsx("p",{children:m.jsxs(jt,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[m.jsx(je,{icon:Lp})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]})}),m.jsx("p",{className:"mb-0 mt-5",children:m.jsx(MV,{href:"https://shlink.io/documentation",children:m.jsxs("small",{children:[m.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",m.jsx(je,{icon:tX})]})})})]})})]})]})})})},$V=()=>{const{ServersDropdown:e}=xi($V),[t,n,,r]=Xt(),i=pr(),{pathname:o}=i;R.useEffect(r,[i,r]);const a="/settings",s=sf("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return m.jsxs(H$,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[m.jsxs(W$,{tag:jt,to:"/",children:[m.jsx(DV,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),m.jsx(G$,{onClick:n,children:m.jsx(je,{icon:_X,className:s})}),m.jsx(Sre,{navbar:!0,isOpen:t,children:m.jsxs(PT,{navbar:!0,className:"ms-auto",children:[m.jsx(AT,{children:m.jsxs(Y$,{tag:jt,to:a,active:o.startsWith(a),children:[m.jsx(je,{icon:jX}),"  Settings"]})}),m.jsx(e,{})]})})]})},gFe=wi($V,["ServersDropdown"]),yFe=({children:e})=>{const t=pr();return R.useEffect(()=>{scrollTo(0,0)},[t]),m.jsx(m.Fragment,{children:e})},Ow=e=>Object.prototype.toString.call(e)==="[object Object]",FV=(e,t)=>{const n={};return(...r)=>{const i=e(...r);if(n[i])return n[i];const o=t(...r);return n[i]=o,o}},UV=(e,t)=>{const n={...e};return!Ow(e)||!Ow(t)||Object.keys(t).forEach(r=>{Ow(t[r])?n[r]=r in e&&e[r]!==void 0?UV(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},bFe=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,VI=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(bFe);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},HI=e=>e==="*"||e==="x"||e==="X",WI=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},_Fe=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],xFe=(e,t)=>{if(HI(e)||HI(t))return 0;const[n,r]=_Fe(WI(e),WI(t));return n>r?1:n{for(let n=0;n{const n=VI(e),r=VI(t),i=n.pop(),o=r.pop(),a=GI(n,r);return a!==0?a:i&&o?GI(i.split("."),o.split(".")):i||o?i?-1:1:0},OFe=(e,t,n)=>{SFe(n);const r=wFe(e,t);return BV[n].includes(r)},BV={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},qI=Object.keys(BV),SFe=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(qI.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${qI.join("|")}`)},zV=FV(e=>e,e=>{try{return OFe(e,e,"=")}catch{return!1}}),VV=e=>zV(e)?`v${e}`:e,HV=(e,t="latest")=>zV(e)?e:t,EFe="%_VERSION_%",jFe=e=>VV(HV(e)),KI=({project:e,version:t})=>m.jsx(MV,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:m.jsx("b",{children:t})}),TFe=({selectedServer:e,clientVersion:t=EFe})=>{const n=jFe(t);return m.jsxs("small",{className:"text-muted",children:[uT(e)&&m.jsxs(m.Fragment,{children:["Server: ",m.jsx(KI,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",m.jsx(KI,{project:"shlink-web-client",version:n})]})},CFe=({selectedServer:e})=>m.jsx("div",{className:sf("text-center",{"shlink-versions-container--with-sidebar":uT(e)}),children:m.jsx(TFe,{selectedServer:e})}),Pf=({children:e})=>m.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function WV(e){const t=n=>{const{ServerError:r}=xi(t),i=Jc(),{selectServer:o,selectedServer:a}=n;return R.useEffect(()=>{i.serverId&&o(i.serverId)},[i.serverId,o]),a?jZ(a)?m.jsx(r,{}):m.jsx(e,{...n}):m.jsx(Pf,{children:m.jsx(na,{loading:!0})})};return t}const GV=WV(R.memo(({selectedServer:e,settings:t})=>{const{buildShlinkApiClient:n,TagColorsStorage:r,ShlinkWebComponent:i,ServerError:o}=xi(GV);if(!uT(e))return m.jsx(o,{});const a=`/server/${e.id}`;return m.jsx(i,{serverVersion:e.version,apiClient:n(e),settings:t,routesPrefix:a,tagColorsStorage:r,createNotFound:s=>m.jsx(iF,{to:`${a}${s}`,children:"List short URLs"})})})),PFe=wi(GV,["buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"]),AFe=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",ace,"fetch"),e.serviceFactory("ScrollToTop",()=>yFe),e.factory("MainHeader",gFe),e.serviceFactory("Home",()=>vFe),e.decorator("Home",I0),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>hFe),e.factory("ShlinkWebComponentContainer",PFe),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>CFe),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",()=>pFe)};let Fv;const kFe=new Uint8Array(16);function NFe(){if(!Fv&&(Fv=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fv))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fv(kFe)}const $n=[];for(let e=0;e<256;++e)$n.push((e+256).toString(16).slice(1));function RFe(e,t=0){return $n[e[t+0]]+$n[e[t+1]]+$n[e[t+2]]+$n[e[t+3]]+"-"+$n[e[t+4]]+$n[e[t+5]]+"-"+$n[e[t+6]]+$n[e[t+7]]+"-"+$n[e[t+8]]+$n[e[t+9]]+"-"+$n[e[t+10]]+$n[e[t+11]]+$n[e[t+12]]+$n[e[t+13]]+$n[e[t+14]]+$n[e[t+15]]}const LFe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),YI={randomUUID:LFe};function qV(e,t,n){if(YI.randomUUID&&!t&&!e)return YI.randomUUID();e=e||{};const r=e.random||(e.rng||NFe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return RFe(r)}const KV=()=>{const e=jo();return R.useCallback(()=>e(-1),[e])},MFe=()=>{const{search:e}=pr();return R.useMemo(()=>QT(e),[e])},YV=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return m.jsxs(To,{centered:!0,isOpen:e,children:[m.jsxs(Co,{children:["Duplicated server",i&&"s"]}),m.jsxs(qi,{children:[m.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),m.jsx("ul",{children:t.map(({url:o,apiKey:a},s)=>i?m.jsxs("li",{children:[m.jsx("b",{children:o})," - ",m.jsx("b",{children:a})]},s):m.jsxs(R.Fragment,{children:[m.jsxs("li",{children:["URL: ",m.jsx("b",{children:o})]}),m.jsxs("li",{children:["API key: ",m.jsx("b",{children:a})]})]},s))}),m.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),m.jsxs(bs,{children:[m.jsx(Ye,{color:"link",onClick:n,children:i?"Ignore duplicates":"Discard"}),m.jsx(Ye,{color:"primary",onClick:r,children:"Save anyway"})]})]})},IFe=e=>t=>{t.preventDefault(),e()},ZV=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=R.useState(""),[a,s]=R.useState(""),[l,u]=R.useState(""),f=IFe(()=>e({name:i,url:a,apiKey:l}));return R.useEffect(()=>{t&&o(t.name),t&&s(t.url),t&&u(t.apiKey)},[t]),m.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[m.jsxs(Ot,{className:"mb-3",title:r,children:[m.jsx(og,{value:i,onChange:o,children:"Name"}),m.jsx(og,{type:"url",value:a,onChange:s,children:"URL"}),m.jsx(og,{value:l,onChange:u,children:"API key"})]}),m.jsx("div",{className:"text-end",children:n})]})},ZI=4e3,XI=({type:e})=>m.jsx("div",{className:"mt-3",children:m.jsxs(ur,{type:e,children:[e==="success"&&"Servers properly imported. You can now select one from the list :)",e==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),XV=({servers:e,createServers:t})=>{const{ImportServersBtn:n,useTimeoutToggle:r}=xi(XV),i=jo(),o=KV(),a=!!Object.keys(e).length,[s,l]=r(!1,ZI),[u,f]=r(!1,ZI),[d,p]=Xt(),[v,g]=R.useState(),y=R.useCallback(w=>{const b=qV();t([{...w,id:b}]),i(`/server/${b}`)},[t,i]);return R.useEffect(()=>{if(!v)return;Object.values(e).some(({url:b,apiKey:x})=>(v==null?void 0:v.url)===b&&(v==null?void 0:v.apiKey)===x)?p():y(v)},[y,v,e,p]),m.jsxs(Pf,{children:[m.jsxs(ZV,{title:m.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:g,children:[!a&&m.jsx(n,{tooltipPlacement:"top",onImport:l,onImportError:f}),a&&m.jsx(Ye,{outline:!0,onClick:o,children:"Cancel"}),m.jsx(Ye,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),s&&m.jsx(XI,{type:"success"}),u&&m.jsx(XI,{type:"error"}),m.jsx(YV,{isOpen:d,duplicatedServers:v?[v]:[],onDiscard:o,onSave:()=>v&&y(v)})]})},DFe=wi(XV,["ImportServersBtn","useTimeoutToggle"]),QV=({server:e,className:t,children:n,textClassName:r})=>{const{DeleteServerModal:i}=xi(QV),[o,,a,s]=Xt();return m.jsxs(m.Fragment,{children:[m.jsxs("button",{type:"button",className:sf(t,"p-0 bg-transparent border-0"),onClick:a,children:[!n&&m.jsx(je,{fixedWidth:!0,icon:cT}),m.jsx("span",{className:r,children:n??"Remove this server"})]}),m.jsx(i,{server:e,isOpen:o,toggle:s})]})},$Fe=wi(QV,["DeleteServerModal"]),FFe=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=jo(),a=R.useRef(!1),s=()=>{a.current=!0,t()},l=()=>{a.current&&(r(e),i&&o("/"))};return m.jsxs(To,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[m.jsx(Co,{toggle:t,className:"text-danger",children:"Remove server"}),m.jsxs(qi,{children:[m.jsxs("p",{children:["Are you sure you want to remove ",m.jsx("b",{children:e?e.name:""}),"?"]}),m.jsx("p",{children:m.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),m.jsxs(bs,{children:[m.jsx(Ye,{color:"link",onClick:t,children:"Cancel"}),m.jsx(Ye,{color:"danger",onClick:s,children:"Delete"})]})]})},UFe=WV(({editServer:e,selectedServer:t,selectServer:n})=>{const r=KV(),{reconnect:i}=MFe();if(!Dd(t))return null;const o=a=>{e(t.id,a),i==="true"&&n(t.id),r()};return m.jsx(Pf,{children:m.jsxs(ZV,{title:m.jsxs("h5",{className:"mb-0",children:['Edit "',t.name,'"']}),initialValues:t,onSubmit:o,children:[m.jsx(Ye,{outline:!0,className:"me-2",onClick:r,children:"Cancel"}),m.jsx(Ye,{outline:!0,color:"primary",children:"Save"})]})})}),BFe=wi(UFe,["ServerError"]),QI=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),JV=({createServers:e,servers:t,children:n,onImport:r=()=>{},onImportError:i=()=>{},tooltipPlacement:o="bottom",className:a=""})=>{const{ServersImporter:s}=xi(JV),l=fa(),[u,f]=R.useState([]),[d,,p,v]=Xt(),g=R.useRef([]),y=R.useCallback(_=>{e(_),r()},[e,r]),w=R.useCallback(async({target:_})=>{var S;return s.importServersFromFile((S=_.files)==null?void 0:S[0]).then(j=>{g.current=j;const E=Object.values(t),C=j.filter(I=>QI(E,I)),N=!!C.length;N?f(C):y(j),N&&p()}).then(()=>{_.value=null}).catch(i)},[y,i,t,s,p]),b=R.useCallback(()=>{y(g.current),v()},[y,v,g]),x=R.useCallback(()=>{y(g.current.filter(_=>!QI(u,_))),v()},[y,u,v]);return m.jsxs(m.Fragment,{children:[m.jsxs(Ye,{outline:!0,id:"importBtn",className:a,onClick:()=>{var _;return(_=l.current)==null?void 0:_.click()},children:[m.jsx(je,{icon:GZ,fixedWidth:!0})," ",n??"Import from file"]}),m.jsxs(Cr,{placement:o,target:"importBtn",children:["You can create servers by importing a CSV file with ",m.jsx("b",{children:"name"}),", ",m.jsx("b",{children:"apiKey"})," and ",m.jsx("b",{children:"url"})," columns."]}),m.jsx("input",{type:"file",accept:".csv",className:"d-none",ref:l,onChange:w,"aria-hidden":!0}),m.jsx(YV,{isOpen:d,duplicatedServers:u,onDiscard:x,onSave:b})]})},zFe=wi(JV,["ServersImporter"]),eH=({servers:e,selectedServer:t})=>{const{DeleteServerButton:n}=xi(eH);return m.jsx(Pf,{children:m.jsxs("div",{className:"server-error__container flex-column",children:[m.jsxs(na,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Dd(t)&&"Could not find this Shlink server.",Dd(t)&&m.jsxs(m.Fragment,{children:[m.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),m.jsx(IV,{servers:Object.values(e),children:m.jsxs("p",{className:"mb-md-3",children:["These are the Shlink servers currently configured. Choose one of them or ",m.jsx(jt,{to:"/server/create",children:"add a new one"}),"."]})}),Dd(t)&&m.jsx("div",{className:"container mt-3 mt-md-5",children:m.jsxs("p",{className:"fs-5 fw-normal lh-sm",children:["Alternatively, if you think you may have miss-configured this server, you can ",m.jsx(n,{server:t,className:"server-error__delete-btn",children:"remove it"})," or ",m.jsx(jt,{to:`/server/${t.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})})},VFe=wi(eH,["DeleteServerButton"]),HFe=4e3,tH=({servers:e})=>{const{ServersExporter:t,ImportServersBtn:n,useTimeoutToggle:r,ManageServersRow:i}=xi(tH),o=Object.values(e),[a,s]=R.useState(o),l=p=>s(o.filter(({name:v,url:g})=>`${v} ${g}`.toLowerCase().match(p.toLowerCase()))),u=a.some(({autoConnect:p})=>!!p),[f,d]=r(!1,HFe);return R.useEffect(()=>{s(Object.values(e))},[e]),m.jsxs(Pf,{children:[m.jsx(qp,{className:"mb-3",onChange:l}),m.jsxs(ir,{className:"mb-3",children:[m.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[m.jsx(n,{className:"flex-fill",onImportError:d,children:"Import servers"}),o.length>0&&m.jsxs(Ye,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>t.exportServers(),children:[m.jsx(je,{icon:i$,fixedWidth:!0})," Export servers"]})]}),m.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:m.jsxs(Ye,{outline:!0,color:"primary",className:"flex-fill",tag:jt,to:"/server/create",children:[m.jsx(je,{icon:Lp,fixedWidth:!0})," Add a server"]})})]}),m.jsx(Ot,{children:m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsx("thead",{className:"responsive-table__header",children:m.jsxs("tr",{children:[u&&m.jsx("th",{style:{width:"50px"},children:m.jsx("span",{className:"sr-only",children:"Auto-connect"})}),m.jsx("th",{children:"Name"}),m.jsx("th",{children:"Base URL"}),m.jsx("th",{children:m.jsx("span",{className:"sr-only",children:"Options"})})]})}),m.jsxs("tbody",{children:[!a.length&&m.jsx("tr",{className:"text-center",children:m.jsx("td",{colSpan:4,children:"No servers found."})}),a.map(p=>m.jsx(i,{server:p,hasAutoConnect:u},p.id))]})]})}),f&&m.jsx("div",{className:"mt-3",children:m.jsx(ur,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},WFe=wi(tH,["ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"]),nH=({server:e,hasAutoConnect:t})=>{const{ManageServersRowDropdown:n}=xi(nH);return m.jsxs("tr",{className:"responsive-table__row",children:[t&&m.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:e.autoConnect&&m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:Oh,className:"text-primary",id:"autoConnectIcon"}),m.jsx(Cr,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),m.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:m.jsx(jt,{to:`/server/${e.id}`,children:e.name})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:e.url}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx(n,{server:e})})]})},GFe=wi(nH,["ManageServersRowDropdown"]),rH=({server:e,setAutoConnect:t})=>{const{DeleteServerModal:n}=xi(rH),[r,,i,o]=Xt(),a=`/server/${e.id}`,{autoConnect:s}=e,l=s?HZ:uce;return m.jsxs(vb,{minWidth:s?210:170,children:[m.jsxs(ke,{tag:jt,to:a,children:[m.jsx(je,{icon:zZ,fixedWidth:!0})," Connect"]}),m.jsxs(ke,{tag:jt,to:`${a}/edit`,children:[m.jsx(je,{icon:fT,fixedWidth:!0})," Edit server"]}),m.jsxs(ke,{onClick:()=>t(e,!s),children:[m.jsx(je,{icon:l,fixedWidth:!0})," ",s?"Do not a":"A","uto-connect"]}),m.jsx(ke,{divider:!0,tag:"hr"}),m.jsxs(ke,{className:"dropdown-item--danger",onClick:i,children:[m.jsx(je,{icon:cT,fixedWidth:!0})," Remove server"]}),m.jsx(n,{redirectHome:!1,server:e,isOpen:r,toggle:o})]})},qFe=wi(rH,["DeleteServerModal"]),iH=(e,t)=>wF(e,t,{serializeError:n=>n}),KFe={},YFe=e=>"id"in e?e:{...e,id:qV()},ZFe=e=>e.reduce((t,n)=>({...t,[n.id]:n}),{}),{actions:XFe,reducer:QFe}=rn({name:"shlink/servers",initialState:KFe,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?{...e,[n]:{...e[n],...r}}:e}},deleteServer:(e,{payload:t})=>{const{[t.id]:n,...r}=e;return r},setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Object.fromEntries(Object.entries(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:ZFe(e.map(YFe))}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:JFe,deleteServer:eUe,setAutoConnect:tUe,createServers:oH}=XFe,nUe=QFe,rUe=e=>Array.isArray(e)?e.filter(Q8):[],iUe=e=>iH("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.jsonRequest(`${Vg.homepage}/servers.json`),i=rUe(r);n(oH(i))}),qP="shlink/selectedServer",oUe="1.0.0",aUe="999.999.999",sUe="latest",lUe=e=>HV(e===sUe?aUe:e,oUe),uUe=FV(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:lUe(n),printableVersion:VV(n)}))),JI=null,KP=vn(`${qP}/resetSelectedServer`),cUe=e=>iH(`${qP}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(KP());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const a=e(o),{version:s,printableVersion:l}=await uUe(o,()=>a.health());return{...o,version:s,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),fUe=e=>rn({name:qP,initialState:JI,reducers:{},extraReducers:t=>{t.addCase(KP,()=>JI),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),dUe=({servers:e,selectedServer:t})=>{const n=Object.values(e),r=()=>n.length===0?m.jsxs(ke,{tag:jt,to:"/server/create",children:[m.jsx(je,{icon:Lp})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]}):m.jsxs(m.Fragment,{children:[n.map(({name:i,id:o})=>m.jsx(ke,{tag:jt,to:`/server/${o}`,active:TZ(t)===o,children:i},o)),m.jsx(ke,{divider:!0,tag:"hr"}),m.jsxs(ke,{tag:jt,to:"/manage-servers",children:[m.jsx(je,{icon:_3})," ",m.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return m.jsxs(Vp,{nav:!0,inNavbar:!0,children:[m.jsxs(nf,{nav:!0,caret:!0,children:[m.jsx(je,{icon:_3})," ",m.jsx("span",{className:"ms-1",children:"Servers"})]}),m.jsx(tf,{end:!0,style:{right:0},children:r()})]})},hUe=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},pUe=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);hUe(e,i,n)},mUe="shlink-servers.csv";class vUe{constructor(t,n,r){ru(this,"exportServers",async()=>{const t=Object.values(this.storage.get("servers")??{}).map(CZ);try{const n=this.jsonToCsv(t);pUe(this.window,n,mUe)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const gUe=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",yUe=e=>Array.isArray(e)&&e.every(gUe);class bUe{constructor(t){this.csvToJson=t}async importServersFromFile(t){if(!t)throw new Error("No file provided");const n=await t.text(),r=await this.csvToJson(n);if(!yUe(r))throw new Error("Provided file does not have the right format.");return r}}const _Ue=(e,t)=>{e.factory("ManageServers",WFe),e.decorator("ManageServers",I0),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.factory("ManageServersRow",GFe),e.factory("ManageServersRowDropdown",qFe),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.factory("CreateServer",DFe),e.decorator("CreateServer",I0),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.factory("EditServer",BFe),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>dUe),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>FFe),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.factory("DeleteServerButton",$Fe),e.factory("ImportServersBtn",zFe),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.factory("ServerError",VFe),e.decorator("ServerError",t(["servers","selectedServer"])),e.service("ServersImporter",bUe,"csvToJson"),e.service("ServersExporter",vUe,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",cUe,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>oH),e.serviceFactory("deleteServer",()=>eUe),e.serviceFactory("editServer",()=>JFe),e.serviceFactory("setAutoConnect",()=>tUe),e.serviceFactory("fetchServers",iUe,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>KP),e.serviceFactory("selectedServerReducerCreator",fUe,"selectServer"),e.serviceFactory("selectedServerReducer",n=>n.reducer,"selectedServerReducerCreator")},_l=({children:e})=>m.jsx("small",{className:"form-text text-muted d-block",children:e}),xUe=e=>e?`${e}`:"",wUe=({settings:e,toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const{realTimeUpdates:r={enabled:!0}}=e,i=mb();return m.jsxs(Ot,{title:"Real-time updates",className:"h-100",children:[m.jsx(co,{children:m.jsxs(Pl,{checked:r.enabled,onChange:t,children:["Enable or disable real-time updates.",m.jsxs(_l,{children:["Real-time updates are currently being ",m.jsx("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),m.jsxs(af,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:sf("form-label",{"text-muted":!r.enabled}),id:i,children:[m.jsx(Kn,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:xUe(r.interval),id:i,onChange:({target:o})=>n(Number(o.value))}),r.enabled&&m.jsxs(_l,{children:[r.interval!==void 0&&r.interval>0&&m.jsxs("span",{children:["Updates will be reflected in the UI every ",m.jsx("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},aH={field:"dateCreated",dir:"DESC"},OUe={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:eC()},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:aH}},SUe=(e,{payload:t})=>UV(e,t),Fs=e=>({reducer:SUe,prepare:e}),Us=e=>({payload:e}),{reducer:EUe,actions:jUe}=rn({name:"shlink/settings",initialState:OUe,reducers:{toggleRealTimeUpdates:Fs(e=>Us({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:Fs(e=>Us({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:Fs(e=>Us({shortUrlCreation:e})),setShortUrlsListSettings:Fs(e=>Us({shortUrlsList:e})),setUiSettings:Fs(e=>Us({ui:e})),setVisitsSettings:Fs(e=>Us({visits:e})),setTagsSettings:Fs(e=>Us({tags:e}))}}),{toggleRealTimeUpdates:TUe,setRealTimeUpdatesInterval:CUe,setShortUrlCreationSettings:PUe,setShortUrlsListSettings:AUe,setUiSettings:kUe,setVisitsSettings:NUe,setTagsSettings:RUe}=jUe,LUe=EUe,Sw=({items:e})=>m.jsx(m.Fragment,{children:e.map((t,n)=>m.jsx("div",{className:"mb-3",children:t},n))}),sH=()=>{const{RealTimeUpdatesSettings:e,ShortUrlCreationSettings:t,ShortUrlsListSettings:n,UserInterfaceSettings:r,VisitsSettings:i,TagsSettings:o}=xi(sH);return m.jsxs(Pf,{children:[m.jsxs(tF,{className:"mb-3",children:[m.jsx(Gd,{to:"general",children:"General"}),m.jsx(Gd,{to:"short-urls",children:"Short URLs"}),m.jsx(Gd,{to:"other-items",children:"Other items"})]}),m.jsxs(rb,{children:[m.jsx(lt,{path:"general",element:m.jsx(Sw,{items:[m.jsx(r,{}),m.jsx(e,{})]})}),m.jsx(lt,{path:"short-urls",element:m.jsx(Sw,{items:[m.jsx(t,{}),m.jsx(n,{})]})}),m.jsx(lt,{path:"other-items",element:m.jsx(Sw,{items:[m.jsx(o,{}),m.jsx(i,{})]})}),m.jsx(lt,{path:"*",element:m.jsx(iT,{replace:!0,to:"general"})})]})]})},MUe=wi(sH,["RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"]),Ew=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",IUe=e=>e==="includes"?m.jsxs(m.Fragment,{children:["The list of suggested tags will contain those ",m.jsx("b",{children:"including"})," provided input."]}):m.jsxs(m.Fragment,{children:["The list of suggested tags will contain those ",m.jsx("b",{children:"starting with"})," provided input."]}),DUe=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return m.jsxs(Ot,{title:"Short URLs form",className:"h-100",children:[m.jsx(co,{children:m.jsxs(Pl,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs."," ",m.jsxs("b",{children:["This option is ignored by Shlink ",">=","4.0.0"]}),m.jsxs(_l,{children:["The initial state of the ",m.jsx("b",{children:"Validate URL"})," checkbox will be ",m.jsx("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),m.jsx(co,{children:m.jsxs(Pl,{checked:n.forwardQuery??!0,onChange:i=>t({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",m.jsxs(_l,{children:["The initial state of the ",m.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",m.jsx("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),m.jsxs(af,{noMargin:!0,label:"Tag suggestions search mode:",children:[m.jsxs(da,{text:Ew(n.tagFilteringMode),children:[m.jsx(ke,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:Ew("startsWith")}),m.jsx(ke,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:Ew("includes")})]}),m.jsx(_l,{children:IUe(n.tagFilteringMode)})]})]})},$Ue={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},FUe=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>m.jsx(Ot,{title:"Short URLs list",className:"h-100",children:m.jsx(af,{noMargin:!0,label:"Default ordering for short URLs list:",children:m.jsx(Kp,{items:$Ue,order:(e==null?void 0:e.defaultOrdering)??aH,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),UUe={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},BUe=({settings:{tags:e},setTagsSettings:t})=>m.jsx(Ot,{title:"Tags",className:"h-100",children:m.jsx(af,{noMargin:!0,label:"Default ordering for tags list:",children:m.jsx(Kp,{items:UUe,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})}),zUe=({settings:{ui:e},setUiSettings:t,_matchMedia:n})=>{const r=R.useMemo(()=>(e==null?void 0:e.theme)??eC(n),[e==null?void 0:e.theme,n]);return m.jsxs(Ot,{title:"User interface",className:"h-100",children:[m.jsx(je,{icon:r==="dark"?CX:mX,className:"user-interface__theme-icon"}),m.jsx(Pl,{checked:r==="dark",onChange:i=>{t({...e,theme:i?"dark":"light"})},children:"Use dark theme."})]})},lH={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},VUe=(e,t)=>!e||e==="all"?t:lH[e],HUe=({onChange:e,active:t,allText:n})=>m.jsxs(da,{text:VUe(t,n),children:[m.jsx(ke,{active:t==="all",onClick:()=>e("all"),children:n}),m.jsx(ke,{divider:!0}),Object.entries(lH).map(([r,i])=>m.jsx(ke,{active:t===r,onClick:()=>e(r),children:i},r))]}),e5=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},WUe=({settings:e,setVisitsSettings:t})=>{var r,i,o,a;const n=R.useCallback(({defaultInterval:s,...l})=>t({defaultInterval:s??e5(e),...l}),[t,e]);return m.jsxs(Ot,{title:"Visits",className:"h-100",children:[m.jsx(co,{children:m.jsxs(Pl,{checked:!!((r=e.visits)!=null&&r.excludeBots),onChange:s=>n({excludeBots:s}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",m.jsxs(_l,{children:["The visits coming from potential bots will be ",m.jsx("b",{children:(i=e.visits)!=null&&i.excludeBots?"excluded":"included"}),"."]})]})}),m.jsx(co,{children:m.jsxs(Pl,{checked:!!((o=e.visits)!=null&&o.loadPrevInterval),onChange:s=>n({loadPrevInterval:s}),children:["Compare visits with previous period.",m.jsxs(_l,{children:["When loading visits, previous period ",m.jsx("b",{children:(a=e.visits)!=null&&a.loadPrevInterval?"will":"won't"})," be loaded by default."]})]})}),m.jsx(af,{noMargin:!0,label:"Default interval to load on visits sections:",children:m.jsx(HUe,{allText:"All visits",active:e5(e),onChange:s=>n({defaultInterval:s})})})]})},GUe=(e,t)=>{e.factory("Settings",MUe),e.decorator("Settings",I0),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>wUe),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>DUe),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>zUe),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>WUe),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>BUe),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>FUe),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>TUe),e.serviceFactory("setRealTimeUpdatesInterval",()=>CUe),e.serviceFactory("setShortUrlCreationSettings",()=>PUe),e.serviceFactory("setShortUrlsListSettings",()=>AUe),e.serviceFactory("setUiSettings",()=>kUe),e.serviceFactory("setVisitsSettings",()=>NUe),e.serviceFactory("setTagsSettings",()=>RUe)};function jw(e){return e==null?"":`${e}`}function qUe(e={}){const{separator:t,decimals:n}=e;return t?n?r=>r.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function YP(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;if(!t||t===n)return i=>i;const r=new RegExp(t,"g");return i=>(i.includes(t)&&(i=i.replace(r,n)),`${t}${i}${t}`)}function KUe(e={stringFormatter:YP()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function YUe(e={stringFormatter:YP()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}const ZUe=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g");function XUe(e){var t,n,r;const i=[];let o;for(;o=ZUe.exec(e);)i.push((r=(t=o[3])!==null&&t!==void 0?t:(n=o[1])===null||n===void 0?void 0:n.trim())!==null&&r!==void 0?r:o[0]);return i}function t5(e,t,n){if(t in e){const o=e[t];return o===void 0?n:o}const r=Array.isArray(t)?t:XUe(t);let i=e;for(const o of r)if(i=i==null?void 0:i[o],i===void 0)return n;return i}function uH(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function ij(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var n5;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(n5||(n5={}));class QUe{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||YP(),i=YUe({stringFormatter:r}),o={header:r,undefined:jw,boolean:jw,number:qUe(),bigint:jw,string:r,symbol:KUe({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` `,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:i=>t5(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:a=>t5(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const u=s(l,a);return u===void 0?i:u}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return ij(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(uH,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return ij(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class JUe extends QUe{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,s)=>(Object.keys(s).forEach(l=>{a.includes(l)||a.push(l)}),a),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(uH,[])}processData(t){return ij(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var On;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(On||(On={}));On.QUOTATION_MARK+"",On.QUOTATION_MARK,On.REVERSE_SOLIDUS+"",On.REVERSE_SOLIDUS,On.SOLIDUS+"",On.SOLIDUS,On.LATIN_SMALL_LETTER_B+"",On.BACKSPACE,On.LATIN_SMALL_LETTER_F+"",On.FORM_FEED,On.LATIN_SMALL_LETTER_N+"",On.NEWLINE,On.LATIN_SMALL_LETTER_R+"",On.CARRIAGE_RETURN,On.LATIN_SMALL_LETTER_T+"",On.TAB;var r5;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(r5||(r5={}));var i5;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR",e[e.BOM_OR_START=29]="BOM_OR_START",e[e.BOM=30]="BOM"})(i5||(i5={}));var o5;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(o5||(o5={}));var a5;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(a5||(a5={}));var e9e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)n.d(o,a,(function(s){return r[s]}).bind(null,a));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(g){var y=[];for(var w in g)y.push(w);return y};e.exports=d;var o=n(5);o.inherits=n(2);var a=n(23),s=n(14);o.inherits(d,a);for(var l=i(s.prototype),u=0;u * @license MIT */var i=n(38),o=n(39),a=n(40);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(P,A){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|P}function y(P,A){if(u.isBuffer(P))return P.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(P)||P instanceof ArrayBuffer))return P.byteLength;typeof P!="string"&&(P=""+P);var U=P.length;if(U===0)return 0;for(var Q=!1;;)switch(A){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":case void 0:return ae(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*U;case"hex":return U>>>1;case"base64":return oe(P).length;default:if(Q)return ae(P).length;A=(""+A).toLowerCase(),Q=!0}}function w(P,A,U){var Q=P[A];P[A]=P[U],P[U]=Q}function b(P,A,U,Q,K){if(P.length===0)return-1;if(typeof U=="string"?(Q=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),U=+U,isNaN(U)&&(U=K?0:P.length-1),U<0&&(U=P.length+U),U>=P.length){if(K)return-1;U=P.length-1}else if(U<0){if(!K)return-1;U=0}if(typeof A=="string"&&(A=u.from(A,Q)),u.isBuffer(A))return A.length===0?-1:x(P,A,U,Q,K);if(typeof A=="number")return A&=255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(P,A,U):Uint8Array.prototype.lastIndexOf.call(P,A,U):x(P,[A],U,Q,K);throw new TypeError("val must be string, number or Buffer")}function x(P,A,U,Q,K){var ie,he=1,Se=P.length,se=A.length;if(Q!==void 0&&((Q=String(Q).toLowerCase())==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(P.length<2||A.length<2)return-1;he=2,Se/=2,se/=2,U/=2}function pe(Te,Pe){return he===1?Te[Pe]:Te.readUInt16BE(Pe*he)}if(K){var me=-1;for(ie=U;ieSe&&(U=Se-se),ie=U;ie>=0;ie--){for(var xe=!0,Ce=0;CeK&&(Q=K):Q=K;var ie=A.length;if(ie%2!=0)throw new TypeError("Invalid hex string");Q>ie/2&&(Q=ie/2);for(var he=0;he>8,se=he%256,pe.push(se),pe.push(Se);return pe}(A,P.length-U),P,U,Q)}function I(P,A,U){return A===0&&U===P.length?i.fromByteArray(P):i.fromByteArray(P.slice(A,U))}function M(P,A,U){U=Math.min(P.length,U);for(var Q=[],K=A;K239?4:pe>223?3:pe>191?2:1;if(K+xe<=U)switch(xe){case 1:pe<128&&(me=pe);break;case 2:(192&(ie=P[K+1]))==128&&(se=(31&pe)<<6|63&ie)>127&&(me=se);break;case 3:ie=P[K+1],he=P[K+2],(192&ie)==128&&(192&he)==128&&(se=(15&pe)<<12|(63&ie)<<6|63&he)>2047&&(se<55296||se>57343)&&(me=se);break;case 4:ie=P[K+1],he=P[K+2],Se=P[K+3],(192&ie)==128&&(192&he)==128&&(192&Se)==128&&(se=(15&pe)<<18|(63&ie)<<12|(63&he)<<6|63&Se)>65535&&se<1114112&&(me=se)}me===null?(me=65533,xe=1):me>65535&&(me-=65536,Q.push(me>>>10&1023|55296),me=56320|1023&me),Q.push(me),K+=xe}return function(Ce){var Te=Ce.length;if(Te<=D)return String.fromCharCode.apply(String,Ce);for(var Pe="",le=0;lethis.length||((Q===void 0||Q>this.length)&&(Q=this.length),Q<=0)||(Q>>>=0)<=(U>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return W(this,U,Q);case"utf8":case"utf-8":return M(this,U,Q);case"ascii":return z(this,U,Q);case"latin1":case"binary":return q(this,U,Q);case"base64":return I(this,U,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,U,Q);default:if(K)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),K=!0}}).apply(this,arguments)},u.prototype.equals=function(P){if(!u.isBuffer(P))throw new TypeError("Argument must be a Buffer");return this===P||u.compare(this,P)===0},u.prototype.inspect=function(){var P="",A=t.INSPECT_MAX_BYTES;return this.length>0&&(P=this.toString("hex",0,A).match(/.{2}/g).join(" "),this.length>A&&(P+=" ... ")),""},u.prototype.compare=function(P,A,U,Q,K){if(!u.isBuffer(P))throw new TypeError("Argument must be a Buffer");if(A===void 0&&(A=0),U===void 0&&(U=P?P.length:0),Q===void 0&&(Q=0),K===void 0&&(K=this.length),A<0||U>P.length||Q<0||K>this.length)throw new RangeError("out of range index");if(Q>=K&&A>=U)return 0;if(Q>=K)return-1;if(A>=U)return 1;if(A>>>=0,U>>>=0,Q>>>=0,K>>>=0,this===P)return 0;for(var ie=K-Q,he=U-A,Se=Math.min(ie,he),se=this.slice(Q,K),pe=P.slice(A,U),me=0;meK)&&(U=K),P.length>0&&(U<0||A<0)||A>this.length)throw new RangeError("Attempt to write outside buffer bounds");Q||(Q="utf8");for(var ie=!1;;)switch(Q){case"hex":return _(this,P,A,U);case"utf8":case"utf-8":return S(this,P,A,U);case"ascii":return j(this,P,A,U);case"latin1":case"binary":return E(this,P,A,U);case"base64":return C(this,P,A,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,P,A,U);default:if(ie)throw new TypeError("Unknown encoding: "+Q);Q=(""+Q).toLowerCase(),ie=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function z(P,A,U){var Q="";U=Math.min(P.length,U);for(var K=A;KQ)&&(U=Q);for(var K="",ie=A;ieU)throw new RangeError("Trying to access beyond buffer length")}function te(P,A,U,Q,K,ie){if(!u.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>K||AP.length)throw new RangeError("Index out of range")}function Z(P,A,U,Q){A<0&&(A=65535+A+1);for(var K=0,ie=Math.min(P.length-U,2);K>>8*(Q?K:1-K)}function B(P,A,U,Q){A<0&&(A=4294967295+A+1);for(var K=0,ie=Math.min(P.length-U,4);K>>8*(Q?K:3-K)&255}function F(P,A,U,Q,K,ie){if(U+Q>P.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function H(P,A,U,Q,K){return K||F(P,0,U,4),o.write(P,A,U,Q,23,4),U+4}function ne(P,A,U,Q,K){return K||F(P,0,U,8),o.write(P,A,U,Q,52,8),U+8}u.prototype.slice=function(P,A){var U,Q=this.length;if(P=~~P,A=A===void 0?Q:~~A,P<0?(P+=Q)<0&&(P=0):P>Q&&(P=Q),A<0?(A+=Q)<0&&(A=0):A>Q&&(A=Q),A0&&(K*=256);)Q+=this[P+--A]*K;return Q},u.prototype.readUInt8=function(P,A){return A||J(P,1,this.length),this[P]},u.prototype.readUInt16LE=function(P,A){return A||J(P,2,this.length),this[P]|this[P+1]<<8},u.prototype.readUInt16BE=function(P,A){return A||J(P,2,this.length),this[P]<<8|this[P+1]},u.prototype.readUInt32LE=function(P,A){return A||J(P,4,this.length),(this[P]|this[P+1]<<8|this[P+2]<<16)+16777216*this[P+3]},u.prototype.readUInt32BE=function(P,A){return A||J(P,4,this.length),16777216*this[P]+(this[P+1]<<16|this[P+2]<<8|this[P+3])},u.prototype.readIntLE=function(P,A,U){P|=0,A|=0,U||J(P,A,this.length);for(var Q=this[P],K=1,ie=0;++ie=(K*=128)&&(Q-=Math.pow(2,8*A)),Q},u.prototype.readIntBE=function(P,A,U){P|=0,A|=0,U||J(P,A,this.length);for(var Q=A,K=1,ie=this[P+--Q];Q>0&&(K*=256);)ie+=this[P+--Q]*K;return ie>=(K*=128)&&(ie-=Math.pow(2,8*A)),ie},u.prototype.readInt8=function(P,A){return A||J(P,1,this.length),128&this[P]?-1*(255-this[P]+1):this[P]},u.prototype.readInt16LE=function(P,A){A||J(P,2,this.length);var U=this[P]|this[P+1]<<8;return 32768&U?4294901760|U:U},u.prototype.readInt16BE=function(P,A){A||J(P,2,this.length);var U=this[P+1]|this[P]<<8;return 32768&U?4294901760|U:U},u.prototype.readInt32LE=function(P,A){return A||J(P,4,this.length),this[P]|this[P+1]<<8|this[P+2]<<16|this[P+3]<<24},u.prototype.readInt32BE=function(P,A){return A||J(P,4,this.length),this[P]<<24|this[P+1]<<16|this[P+2]<<8|this[P+3]},u.prototype.readFloatLE=function(P,A){return A||J(P,4,this.length),o.read(this,P,!0,23,4)},u.prototype.readFloatBE=function(P,A){return A||J(P,4,this.length),o.read(this,P,!1,23,4)},u.prototype.readDoubleLE=function(P,A){return A||J(P,8,this.length),o.read(this,P,!0,52,8)},u.prototype.readDoubleBE=function(P,A){return A||J(P,8,this.length),o.read(this,P,!1,52,8)},u.prototype.writeUIntLE=function(P,A,U,Q){P=+P,A|=0,U|=0,Q||te(this,P,A,U,Math.pow(2,8*U)-1,0);var K=1,ie=0;for(this[A]=255&P;++ie=0&&(ie*=256);)this[A+K]=P/ie&255;return A+U},u.prototype.writeUInt8=function(P,A,U){return P=+P,A|=0,U||te(this,P,A,1,255,0),u.TYPED_ARRAY_SUPPORT||(P=Math.floor(P)),this[A]=255&P,A+1},u.prototype.writeUInt16LE=function(P,A,U){return P=+P,A|=0,U||te(this,P,A,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[A]=255&P,this[A+1]=P>>>8):Z(this,P,A,!0),A+2},u.prototype.writeUInt16BE=function(P,A,U){return P=+P,A|=0,U||te(this,P,A,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[A]=P>>>8,this[A+1]=255&P):Z(this,P,A,!1),A+2},u.prototype.writeUInt32LE=function(P,A,U){return P=+P,A|=0,U||te(this,P,A,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[A+3]=P>>>24,this[A+2]=P>>>16,this[A+1]=P>>>8,this[A]=255&P):B(this,P,A,!0),A+4},u.prototype.writeUInt32BE=function(P,A,U){return P=+P,A|=0,U||te(this,P,A,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[A]=P>>>24,this[A+1]=P>>>16,this[A+2]=P>>>8,this[A+3]=255&P):B(this,P,A,!1),A+4},u.prototype.writeIntLE=function(P,A,U,Q){if(P=+P,A|=0,!Q){var K=Math.pow(2,8*U-1);te(this,P,A,U,K-1,-K)}var ie=0,he=1,Se=0;for(this[A]=255&P;++ie>0)-Se&255;return A+U},u.prototype.writeIntBE=function(P,A,U,Q){if(P=+P,A|=0,!Q){var K=Math.pow(2,8*U-1);te(this,P,A,U,K-1,-K)}var ie=U-1,he=1,Se=0;for(this[A+ie]=255&P;--ie>=0&&(he*=256);)P<0&&Se===0&&this[A+ie+1]!==0&&(Se=1),this[A+ie]=(P/he>>0)-Se&255;return A+U},u.prototype.writeInt8=function(P,A,U){return P=+P,A|=0,U||te(this,P,A,1,127,-128),u.TYPED_ARRAY_SUPPORT||(P=Math.floor(P)),P<0&&(P=255+P+1),this[A]=255&P,A+1},u.prototype.writeInt16LE=function(P,A,U){return P=+P,A|=0,U||te(this,P,A,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[A]=255&P,this[A+1]=P>>>8):Z(this,P,A,!0),A+2},u.prototype.writeInt16BE=function(P,A,U){return P=+P,A|=0,U||te(this,P,A,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[A]=P>>>8,this[A+1]=255&P):Z(this,P,A,!1),A+2},u.prototype.writeInt32LE=function(P,A,U){return P=+P,A|=0,U||te(this,P,A,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[A]=255&P,this[A+1]=P>>>8,this[A+2]=P>>>16,this[A+3]=P>>>24):B(this,P,A,!0),A+4},u.prototype.writeInt32BE=function(P,A,U){return P=+P,A|=0,U||te(this,P,A,4,2147483647,-2147483648),P<0&&(P=4294967295+P+1),u.TYPED_ARRAY_SUPPORT?(this[A]=P>>>24,this[A+1]=P>>>16,this[A+2]=P>>>8,this[A+3]=255&P):B(this,P,A,!1),A+4},u.prototype.writeFloatLE=function(P,A,U){return H(this,P,A,!0,U)},u.prototype.writeFloatBE=function(P,A,U){return H(this,P,A,!1,U)},u.prototype.writeDoubleLE=function(P,A,U){return ne(this,P,A,!0,U)},u.prototype.writeDoubleBE=function(P,A,U){return ne(this,P,A,!1,U)},u.prototype.copy=function(P,A,U,Q){if(U||(U=0),Q||Q===0||(Q=this.length),A>=P.length&&(A=P.length),A||(A=0),Q>0&&Q=this.length)throw new RangeError("sourceStart out of bounds");if(Q<0)throw new RangeError("sourceEnd out of bounds");Q>this.length&&(Q=this.length),P.length-A=0;--K)P[K+A]=this[K+U];else if(ie<1e3||!u.TYPED_ARRAY_SUPPORT)for(K=0;K>>=0,U=U===void 0?this.length:U>>>0,P||(P=0),typeof P=="number")for(ie=A;ie55295&&U<57344){if(!K){if(U>56319){(A-=3)>-1&&ie.push(239,191,189);continue}if(he+1===Q){(A-=3)>-1&&ie.push(239,191,189);continue}K=U;continue}if(U<56320){(A-=3)>-1&&ie.push(239,191,189),K=U;continue}U=65536+(K-55296<<10|U-56320)}else K&&(A-=3)>-1&&ie.push(239,191,189);if(K=null,U<128){if((A-=1)<0)break;ie.push(U)}else if(U<2048){if((A-=2)<0)break;ie.push(U>>6|192,63&U|128)}else if(U<65536){if((A-=3)<0)break;ie.push(U>>12|224,U>>6&63|128,63&U|128)}else{if(!(U<1114112))throw new Error("Invalid code point");if((A-=4)<0)break;ie.push(U>>18|240,U>>12&63|128,U>>6&63|128,63&U|128)}}return ie}function oe(P){return i.toByteArray(function(A){if((A=function(U){return U.trim?U.trim():U.replace(/^\s+|\s+$/g,"")}(A).replace(Y,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A}(P))}function fe(P,A,U,Q){for(var K=0;K=A.length||K>=P.length);++K)A[K+U]=P[K];return K}}).call(this,n(0))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(w){if(n===setTimeout)return setTimeout(w,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(w,0);try{return n(w,0)}catch{try{return n.call(null,w,0)}catch{return n.call(this,w,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch{n=o}try{r=typeof clearTimeout=="function"?clearTimeout:a}catch{r=a}})();var l,u=[],f=!1,d=-1;function p(){f&&l&&(f=!1,l.length?u=l.concat(u):d=-1,u.length&&v())}function v(){if(!f){var w=s(p);f=!0;for(var b=u.length;b;){for(l=u,u=[];++d1)for(var x=1;x=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},l))},n(35),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(a){return typeof a=="function"}function i(a){return typeof a=="object"&&a!==null}function o(a){return a===void 0}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(a){if(!function(s){return typeof s=="number"}(a)||a<0||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},n.prototype.emit=function(a){var s,l,u,f,d,p;if(this._events||(this._events={}),a==="error"&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((s=arguments[1])instanceof Error)throw s;var v=new Error('Uncaught, unspecified "error" event. ('+s+")");throw v.context=s,v}if(o(l=this._events[a]))return!1;if(r(l))switch(arguments.length){case 1:l.call(this);break;case 2:l.call(this,arguments[1]);break;case 3:l.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),l.apply(this,f)}else if(i(l))for(f=Array.prototype.slice.call(arguments,1),u=(p=l.slice()).length,d=0;d0&&this._events[a].length>l&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),typeof console.trace=="function"&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(a,s){if(!r(s))throw TypeError("listener must be a function");var l=!1;function u(){this.removeListener(a,u),l||(l=!0,s.apply(this,arguments))}return u.listener=s,this.on(a,u),this},n.prototype.removeListener=function(a,s){var l,u,f,d;if(!r(s))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(f=(l=this._events[a]).length,u=-1,l===s||r(l.listener)&&l.listener===s)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,s);else if(i(l)){for(d=f;d-- >0;)if(l[d]===s||l[d].listener&&l[d].listener===s){u=d;break}if(u<0)return this;l.length===1?(l.length=0,delete this._events[a]):l.splice(u,1),this._events.removeListener&&this.emit("removeListener",a,s)}return this},n.prototype.removeAllListeners=function(a){var s,l;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[a]&&delete this._events[a],this;if(arguments.length===0){for(s in this._events)s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events={},this}if(r(l=this._events[a]))this.removeListener(a,l);else if(l)for(;l.length;)this.removeListener(a,l[l.length-1]);return delete this._events[a],this},n.prototype.listeners=function(a){return this._events&&this._events[a]?r(this._events[a])?[this._events[a]]:this._events[a].slice():[]},n.prototype.listenerCount=function(a){if(this._events){var s=this._events[a];if(r(s))return 1;if(s)return s.length}return 0},n.listenerCount=function(a,s){return a.listenerCount(s)}},function(e,t,n){(t=e.exports=n(23)).Stream=t,t.Readable=t,t.Writable=n(14),t.Duplex=n(1),t.Transform=n(27),t.PassThrough=n(45)},function(e,t,n){(function(r,i,o){var a=n(6);function s(M){var D=this;this.next=null,this.entry=null,this.finish=function(){(function(z,q,W){var X=z.entry;for(z.entry=null;X;){var J=X.callback;q.pendingcb--,J(void 0),X=X.next}q.corkedRequestsFree?q.corkedRequestsFree.next=z:q.corkedRequestsFree=z})(D,M)}}e.exports=_;var l,u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:a.nextTick;_.WritableState=x;var f=n(5);f.inherits=n(2);var d,p={deprecate:n(44)},v=n(24),g=n(7).Buffer,y=o.Uint8Array||function(){},w=n(25);function b(){}function x(M,D){l=l||n(1),M=M||{};var z=D instanceof l;this.objectMode=!!M.objectMode,z&&(this.objectMode=this.objectMode||!!M.writableObjectMode);var q=M.highWaterMark,W=M.writableHighWaterMark,X=this.objectMode?16:16384;this.highWaterMark=q||q===0?q:z&&(W||W===0)?W:X,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var J=M.decodeStrings===!1;this.decodeStrings=!J,this.defaultEncoding=M.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(te){(function(Z,B){var F=Z._writableState,H=F.sync,ne=F.writecb;if(function(ee){ee.writing=!1,ee.writecb=null,ee.length-=ee.writelen,ee.writelen=0}(F),B)(function(ee,ae,oe,fe,P){--ae.pendingcb,oe?(a.nextTick(P,fe),a.nextTick(I,ee,ae),ee._writableState.errorEmitted=!0,ee.emit("error",fe)):(P(fe),ee._writableState.errorEmitted=!0,ee.emit("error",fe),I(ee,ae))})(Z,F,H,B,ne);else{var Y=C(F);Y||F.corked||F.bufferProcessing||!F.bufferedRequest||E(Z,F),H?u(j,Z,F,Y,ne):j(Z,F,Y,ne)}})(D,te)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function _(M){if(l=l||n(1),!(d.call(_,this)||this instanceof l))return new _(M);this._writableState=new x(M,this),this.writable=!0,M&&(typeof M.write=="function"&&(this._write=M.write),typeof M.writev=="function"&&(this._writev=M.writev),typeof M.destroy=="function"&&(this._destroy=M.destroy),typeof M.final=="function"&&(this._final=M.final)),v.call(this)}function S(M,D,z,q,W,X,J){D.writelen=q,D.writecb=J,D.writing=!0,D.sync=!0,z?M._writev(W,D.onwrite):M._write(W,X,D.onwrite),D.sync=!1}function j(M,D,z,q){z||function(W,X){X.length===0&&X.needDrain&&(X.needDrain=!1,W.emit("drain"))}(M,D),D.pendingcb--,q(),I(M,D)}function E(M,D){D.bufferProcessing=!0;var z=D.bufferedRequest;if(M._writev&&z&&z.next){var q=D.bufferedRequestCount,W=new Array(q),X=D.corkedRequestsFree;X.entry=z;for(var J=0,te=!0;z;)W[J]=z,z.isBuf||(te=!1),z=z.next,J+=1;W.allBuffers=te,S(M,D,!0,D.length,W,"",X.finish),D.pendingcb++,D.lastBufferedRequest=null,X.next?(D.corkedRequestsFree=X.next,X.next=null):D.corkedRequestsFree=new s(D),D.bufferedRequestCount=0}else{for(;z;){var Z=z.chunk,B=z.encoding,F=z.callback;if(S(M,D,!1,D.objectMode?1:Z.length,Z,B,F),z=z.next,D.bufferedRequestCount--,D.writing)break}z===null&&(D.lastBufferedRequest=null)}D.bufferedRequest=z,D.bufferProcessing=!1}function C(M){return M.ending&&M.length===0&&M.bufferedRequest===null&&!M.finished&&!M.writing}function N(M,D){M._final(function(z){D.pendingcb--,z&&M.emit("error",z),D.prefinished=!0,M.emit("prefinish"),I(M,D)})}function I(M,D){var z=C(D);return z&&(function(q,W){W.prefinished||W.finalCalled||(typeof q._final=="function"?(W.pendingcb++,W.finalCalled=!0,a.nextTick(N,q,W)):(W.prefinished=!0,q.emit("prefinish")))}(M,D),D.pendingcb===0&&(D.finished=!0,M.emit("finish"))),z}f.inherits(_,v),x.prototype.getBuffer=function(){for(var M=this.bufferedRequest,D=[];M;)D.push(M),M=M.next;return D},function(){try{Object.defineProperty(x.prototype,"buffer",{get:p.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(M){return!!d.call(this,M)||this===_&&M&&M._writableState instanceof x}})):d=function(M){return M instanceof this},_.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},_.prototype.write=function(M,D,z){var q=this._writableState,W=!1,X=!q.objectMode&&function(J){return g.isBuffer(J)||J instanceof y}(M);return X&&!g.isBuffer(M)&&(M=function(J){return g.from(J)}(M)),typeof D=="function"&&(z=D,D=null),X?D="buffer":D||(D=q.defaultEncoding),typeof z!="function"&&(z=b),q.ended?function(J,te){var Z=new Error("write after end");J.emit("error",Z),a.nextTick(te,Z)}(this,z):(X||function(J,te,Z,B){var F=!0,H=!1;return Z===null?H=new TypeError("May not write null values to stream"):typeof Z=="string"||Z===void 0||te.objectMode||(H=new TypeError("Invalid non-string/buffer chunk")),H&&(J.emit("error",H),a.nextTick(B,H),F=!1),F}(this,q,M,z))&&(q.pendingcb++,W=function(J,te,Z,B,F,H){if(!Z){var ne=function(oe,fe,P){return oe.objectMode||oe.decodeStrings===!1||typeof fe!="string"||(fe=g.from(fe,P)),fe}(te,B,F);B!==ne&&(Z=!0,F="buffer",B=ne)}var Y=te.objectMode?1:B.length;te.length+=Y;var ee=te.length-1))throw new TypeError("Unknown encoding: "+M);return this._writableState.defaultEncoding=M,this},Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(M,D,z){z(new Error("_write() is not implemented"))},_.prototype._writev=null,_.prototype.end=function(M,D,z){var q=this._writableState;typeof M=="function"?(z=M,M=null,D=null):typeof D=="function"&&(z=D,D=null),M!=null&&this.write(M,D),q.corked&&(q.corked=1,this.uncork()),q.ending||q.finished||function(W,X,J){X.ending=!0,I(W,X),J&&(X.finished?a.nextTick(J):W.once("finish",J)),X.ended=!0,W.writable=!1}(this,q,z)},Object.defineProperty(_.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(M){this._writableState&&(this._writableState.destroyed=M)}}),_.prototype.destroy=w.destroy,_.prototype._undestroy=w.undestroy,_.prototype._destroy=function(M,D){this.end(),D(M)}}).call(this,n(4),n(11).setImmediate,n(0))},function(e,t,n){(function(r,i,o){e.exports=function a(s,l,u){function f(v,g){if(!l[v]){if(!s[v]){var y=typeof _dereq_=="function"&&_dereq_;if(!g&&y)return y(v,!0);if(d)return d(v,!0);var w=new Error("Cannot find module '"+v+"'");throw w.code="MODULE_NOT_FOUND",w}var b=l[v]={exports:{}};s[v][0].call(b.exports,function(x){return f(s[v][1][x]||x)},b,b.exports,a,s,l,u)}return l[v].exports}for(var d=typeof _dereq_=="function"&&_dereq_,p=0;p0;){var x=b.shift();if(typeof x=="function"){var _=b.shift(),S=b.shift();x.call(_,S)}else x._settlePromises()}},v.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},v.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},v.prototype._reset=function(){this._isTickUsed=!1},s.exports=v,s.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(a,s,l){s.exports=function(u,f,d,p){var v=!1,g=function(x,_){this._reject(_)},y=function(x,_){_.promiseRejectionQueued=!0,_.bindingPromise._then(g,g,null,this,x)},w=function(x,_){!(50397184&this._bitField)&&this._resolveCallback(_.target)},b=function(x,_){_.promiseRejectionQueued||this._reject(x)};u.prototype.bind=function(x){v||(v=!0,u.prototype._propagateFrom=p.propagateFromFunction(),u.prototype._boundValue=p.boundValueFunction());var _=d(x),S=new u(f);S._propagateFrom(this,1);var j=this._target();if(S._setBoundTo(_),_ instanceof u){var E={promiseRejectionQueued:!1,promise:S,target:j,bindingPromise:_};j._then(f,y,void 0,S,E),_._then(w,b,void 0,S,E),S._setOnCancel(_)}else S._resolveCallback(j);return S},u.prototype._setBoundTo=function(x){x!==void 0?(this._bitField=2097152|this._bitField,this._boundTo=x):this._bitField=-2097153&this._bitField},u.prototype._isBound=function(){return(2097152&this._bitField)==2097152},u.bind=function(x,_){return u.resolve(_).bind(x)}}},{}],4:[function(a,s,l){var u;typeof Promise<"u"&&(u=Promise);var f=a("./promise")();f.noConflict=function(){try{Promise===f&&(Promise=u)}catch{}return f},s.exports=f},{"./promise":22}],5:[function(a,s,l){var u=Object.create;if(u){var f=u(null),d=u(null);f[" size"]=d[" size"]=0}s.exports=function(p){var v=a("./util"),g=v.canEvaluate;function y(x){return function(_,S){var j;if(_!=null&&(j=_[S]),typeof j!="function"){var E="Object "+v.classString(_)+" has no method '"+v.toString(S)+"'";throw new p.TypeError(E)}return j}(x,this.pop()).apply(x,this)}function w(x){return x[this]}function b(x){var _=+this;return _<0&&(_=Math.max(0,_+x.length)),x[_]}v.isIdentifier,p.prototype.call=function(x){var _=[].slice.call(arguments,1);return _.push(x),this._then(y,void 0,void 0,_,void 0)},p.prototype.get=function(x){var _;if(typeof x=="number")_=b;else if(g){var S=(void 0)(x);_=S!==null?S:w}else _=w;return this._then(_,void 0,void 0,x,void 0)}}},{"./util":36}],6:[function(a,s,l){s.exports=function(u,f,d,p){var v=a("./util"),g=v.tryCatch,y=v.errorObj,w=u._async;u.prototype.break=u.prototype.cancel=function(){if(!p.cancellation())return this._warn("cancellation is disabled");for(var b=this,x=b;b._isCancellable();){if(!b._cancelBy(x)){x._isFollowing()?x._followee().cancel():x._cancelBranched();break}var _=b._cancellationParent;if(_==null||!_._isCancellable()){b._isFollowing()?b._followee().cancel():b._cancelBranched();break}b._isFollowing()&&b._followee().cancel(),b._setWillBeCancelled(),x=b,b=_}},u.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},u.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},u.prototype._cancelBy=function(b){return b===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},u.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},u.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),w.invoke(this._cancelPromises,this,void 0))},u.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},u.prototype._unsetOnCancel=function(){this._onCancelField=void 0},u.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},u.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},u.prototype._doInvokeOnCancel=function(b,x){if(v.isArray(b))for(var _=0;_=0)return d[g]}return u.prototype._promiseCreated=function(){},u.prototype._pushContext=function(){},u.prototype._popContext=function(){return null},u._peekContext=u.prototype._peekContext=function(){},p.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,d.push(this._trace))},p.prototype._popContext=function(){if(this._trace!==void 0){var g=d.pop(),y=g._promiseCreated;return g._promiseCreated=null,y}return null},p.CapturedTrace=null,p.create=function(){if(f)return new p},p.deactivateLongStackTraces=function(){},p.activateLongStackTraces=function(){var g=u.prototype._pushContext,y=u.prototype._popContext,w=u._peekContext,b=u.prototype._peekContext,x=u.prototype._promiseCreated;p.deactivateLongStackTraces=function(){u.prototype._pushContext=g,u.prototype._popContext=y,u._peekContext=w,u.prototype._peekContext=b,u.prototype._promiseCreated=x,f=!1},f=!0,u.prototype._pushContext=p.prototype._pushContext,u.prototype._popContext=p.prototype._popContext,u._peekContext=u.prototype._peekContext=v,u.prototype._promiseCreated=function(){var _=this._peekContext();_&&_._promiseCreated==null&&(_._promiseCreated=this)}},p}},{}],9:[function(a,s,l){s.exports=function(u,f){var d,p,v,g=u._getDomain,y=u._async,w=a("./errors").Warning,b=a("./util"),x=b.canAttachTrace,_=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,S=/\((?:timers\.js):\d+:\d+\)/,j=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,E=null,C=null,N=!1,I=b.env("BLUEBIRD_DEBUG")!=0,M=!(b.env("BLUEBIRD_WARNINGS")==0||!I&&!b.env("BLUEBIRD_WARNINGS")),D=!(b.env("BLUEBIRD_LONG_STACK_TRACES")==0||!I&&!b.env("BLUEBIRD_LONG_STACK_TRACES")),z=b.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(M||!!b.env("BLUEBIRD_W_FORGOTTEN_RETURN"));u.prototype.suppressUnhandledRejections=function(){var le=this._target();le._bitField=-1048577&le._bitField|524288},u.prototype._ensurePossibleRejectionHandled=function(){if(!(524288&this._bitField)){this._setRejectionIsUnhandled();var le=this;setTimeout(function(){le._notifyUnhandledRejection()},1)}},u.prototype._notifyUnhandledRejectionIsHandled=function(){he("rejectionHandled",d,void 0,this)},u.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},u.prototype._returnedNonUndefined=function(){return(268435456&this._bitField)!=0},u.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var le=this._settledValue();this._setUnhandledRejectionIsNotified(),he("unhandledRejection",p,le,this)}},u.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},u.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},u.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},u.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},u.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},u.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},u.prototype._warn=function(le,ce,ye){return U(le,ce,ye||this)},u.onPossiblyUnhandledRejection=function(le){var ce=g();p=typeof le=="function"?ce===null?le:b.domainBind(ce,le):void 0},u.onUnhandledRejectionHandled=function(le){var ce=g();d=typeof le=="function"?ce===null?le:b.domainBind(ce,le):void 0};var q=function(){};u.longStackTraces=function(){if(y.haveItemsQueued()&&!Pe.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);if(!Pe.longStackTraces&&se()){var le=u.prototype._captureStackTrace,ce=u.prototype._attachExtraTrace;Pe.longStackTraces=!0,q=function(){if(y.haveItemsQueued()&&!Pe.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);u.prototype._captureStackTrace=le,u.prototype._attachExtraTrace=ce,f.deactivateLongStackTraces(),y.enableTrampoline(),Pe.longStackTraces=!1},u.prototype._captureStackTrace=P,u.prototype._attachExtraTrace=A,f.activateLongStackTraces(),y.disableTrampolineIfNecessary()}},u.hasLongStackTraces=function(){return Pe.longStackTraces&&se()};var W=function(){try{if(typeof CustomEvent=="function"){var le=new CustomEvent("CustomEvent");return b.global.dispatchEvent(le),function(ce,ye){var ge=new CustomEvent(ce.toLowerCase(),{detail:ye,cancelable:!0});return!b.global.dispatchEvent(ge)}}return typeof Event=="function"?(le=new Event("CustomEvent"),b.global.dispatchEvent(le),function(ce,ye){var ge=new Event(ce.toLowerCase(),{cancelable:!0});return ge.detail=ye,!b.global.dispatchEvent(ge)}):((le=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),b.global.dispatchEvent(le),function(ce,ye){var ge=document.createEvent("CustomEvent");return ge.initCustomEvent(ce.toLowerCase(),!1,!0,ye),!b.global.dispatchEvent(ge)})}catch{}return function(){return!1}}(),X=b.isNode?function(){return r.emit.apply(r,arguments)}:b.global?function(le){var ce="on"+le.toLowerCase(),ye=b.global[ce];return!!ye&&(ye.apply(b.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function J(le,ce){return{promise:ce}}var te={promiseCreated:J,promiseFulfilled:J,promiseRejected:J,promiseResolved:J,promiseCancelled:J,promiseChained:function(le,ce,ye){return{promise:ce,child:ye}},warning:function(le,ce){return{warning:ce}},unhandledRejection:function(le,ce,ye){return{reason:ce,promise:ye}},rejectionHandled:J},Z=function(le){var ce=!1;try{ce=X.apply(null,arguments)}catch(ge){y.throwLater(ge),ce=!0}var ye=!1;try{ye=W(le,te[le].apply(null,arguments))}catch(ge){y.throwLater(ge),ye=!0}return ye||ce};function B(){return!1}function F(le,ce,ye){var ge=this;try{le(ce,ye,function(we){if(typeof we!="function")throw new TypeError("onCancel must be a function, got: "+b.toString(we));ge._attachCancellationCallback(we)})}catch(we){return we}}function H(le){if(!this._isCancellable())return this;var ce=this._onCancel();ce!==void 0?b.isArray(ce)?ce.push(le):this._setOnCancel([ce,le]):this._setOnCancel(le)}function ne(){return this._onCancelField}function Y(le){this._onCancelField=le}function ee(){this._cancellationParent=void 0,this._onCancelField=void 0}function ae(le,ce){if(1&ce){this._cancellationParent=le;var ye=le._branchesRemainingToCancel;ye===void 0&&(ye=0),le._branchesRemainingToCancel=ye+1}2&ce&&le._isBound()&&this._setBoundTo(le._boundTo)}u.config=function(le){if("longStackTraces"in(le=Object(le))&&(le.longStackTraces?u.longStackTraces():!le.longStackTraces&&u.hasLongStackTraces()&&q()),"warnings"in le){var ce=le.warnings;Pe.warnings=!!ce,z=Pe.warnings,b.isObject(ce)&&"wForgottenReturn"in ce&&(z=!!ce.wForgottenReturn)}if("cancellation"in le&&le.cancellation&&!Pe.cancellation){if(y.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");u.prototype._clearCancellationData=ee,u.prototype._propagateFrom=ae,u.prototype._onCancel=ne,u.prototype._setOnCancel=Y,u.prototype._attachCancellationCallback=H,u.prototype._execute=F,oe=ae,Pe.cancellation=!0}return"monitoring"in le&&(le.monitoring&&!Pe.monitoring?(Pe.monitoring=!0,u.prototype._fireEvent=Z):!le.monitoring&&Pe.monitoring&&(Pe.monitoring=!1,u.prototype._fireEvent=B)),u},u.prototype._fireEvent=B,u.prototype._execute=function(le,ce,ye){try{le(ce,ye)}catch(ge){return ge}},u.prototype._onCancel=function(){},u.prototype._setOnCancel=function(le){},u.prototype._attachCancellationCallback=function(le){},u.prototype._captureStackTrace=function(){},u.prototype._attachExtraTrace=function(){},u.prototype._clearCancellationData=function(){},u.prototype._propagateFrom=function(le,ce){};var oe=function(le,ce){2&ce&&le._isBound()&&this._setBoundTo(le._boundTo)};function fe(){var le=this._boundTo;return le!==void 0&&le instanceof u?le.isFulfilled()?le.value():void 0:le}function P(){this._trace=new Ce(this._peekContext())}function A(le,ce){if(x(le)){var ye=this._trace;if(ye!==void 0&&ce&&(ye=ye._parent),ye!==void 0)ye.attachExtraTrace(le);else if(!le.__stackCleaned__){var ge=K(le);b.notEnumerableProp(le,"stack",ge.message+` `+ge.stack.join(` `)),b.notEnumerableProp(le,"__stackCleaned__",!0)}}}function U(le,ce,ye){if(Pe.warnings){var ge,we=new w(le);if(ce)ye._attachExtraTrace(we);else if(Pe.longStackTraces&&(ge=u._peekContext()))ge.attachExtraTrace(we);else{var Ae=K(we);we.stack=Ae.message+` `+Ae.stack.join(` `)}Z("warning",we)||ie(we,"",!0)}}function Q(le){for(var ce=[],ye=0;ye0?function(ge){for(var we=ge.stack.replace(/\s+$/g,"").split(` `),Ae=0;Ae0&&ge.name!="SyntaxError"&&(we=we.slice(Ae)),we}(le):[" (No stack trace)"],{message:ye,stack:le.name=="SyntaxError"?ce:Q(ce)}}function ie(le,ce,ye){if(typeof console<"u"){var ge;if(b.isObject(le)){var we=le.stack;ge=ce+C(we,le)}else ge=ce+String(le);typeof v=="function"?v(ge,ye):typeof console.log!="function"&&typeof console.log!="object"||console.log(ge)}}function he(le,ce,ye,ge){var we=!1;try{typeof ce=="function"&&(we=!0,le==="rejectionHandled"?ce(ge):ce(ye,ge))}catch(Ae){y.throwLater(Ae)}le==="unhandledRejection"?Z(le,ye,ge)||we||ie(ye,"Unhandled rejection "):Z(le,ge)}function Se(le){var ce;if(typeof le=="function")ce="[function "+(le.name||"anonymous")+"]";else{if(ce=le&&typeof le.toString=="function"?le.toString():b.toString(le),/\[object [a-zA-Z0-9$_]+\]/.test(ce))try{ce=JSON.stringify(le)}catch{}ce.length===0&&(ce="(empty array)")}return"(<"+function(ye){return ye.length<41?ye:ye.substr(0,38)+"..."}(ce)+">, no stack trace)"}function se(){return typeof Te=="function"}var pe=function(){return!1},me=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function xe(le){var ce=le.match(me);if(ce)return{fileName:ce[1],line:parseInt(ce[2],10)}}function Ce(le){this._parent=le,this._promisesCreated=0;var ce=this._length=1+(le===void 0?0:le._length);Te(this,Ce),ce>32&&this.uncycle()}b.inherits(Ce,Error),f.CapturedTrace=Ce,Ce.prototype.uncycle=function(){var le=this._length;if(!(le<2)){for(var ce=[],ye={},ge=0,we=this;we!==void 0;++ge)ce.push(we),we=we._parent;for(ge=(le=this._length=ge)-1;ge>=0;--ge){var Ae=ce[ge].stack;ye[Ae]===void 0&&(ye[Ae]=ge)}for(ge=0;ge0&&(ce[Ne-1]._parent=void 0,ce[Ne-1]._length=1),ce[ge]._parent=void 0,ce[ge]._length=1;var tt=ge>0?ce[ge-1]:this;Ne=0;--Ze)ce[Ze]._length=rt,rt++;return}}}},Ce.prototype.attachExtraTrace=function(le){if(!le.__stackCleaned__){this.uncycle();for(var ce=K(le),ye=ce.message,ge=[ce.stack],we=this;we!==void 0;)ge.push(Q(we.stack.split(` `))),we=we._parent;(function(Ae){for(var Ne=Ae[0],tt=1;tt=0;--_n)if(rt[_n]===qt){Ut=_n;break}for(_n=Ut;_n>=0;--_n){var Qn=rt[_n];if(Ne[Ze]!==Qn)break;Ne.pop(),Ze--}Ne=rt}})(ge),function(Ae){for(var Ne=0;Ne=0)return E=/@/,C=ce,N=!0,function(Ae){Ae.stack=new Error().stack};try{throw new Error}catch(Ae){ge="stack"in Ae}return"stack"in we||!ge||typeof Error.stackTraceLimit!="number"?(C=function(Ae,Ne){return typeof Ae=="string"?Ae:typeof Ne!="object"&&typeof Ne!="function"||Ne.name===void 0||Ne.message===void 0?Se(Ne):Ne.toString()},null):(E=le,C=ce,function(Ae){Error.stackTraceLimit+=6;try{throw new Error}catch(Ne){Ae.stack=Ne.stack}Error.stackTraceLimit-=6})}();typeof console<"u"&&console.warn!==void 0&&(v=function(le){console.warn(le)},b.isNode&&r.stderr.isTTY?v=function(le,ce){var ye=ce?"\x1B[33m":"\x1B[31m";console.warn(ye+le+`\x1B[0m `)}:b.isNode||typeof new Error().stack!="string"||(v=function(le,ce){console.warn("%c"+le,ce?"color: darkorange":"color: red")}));var Pe={warnings:M,longStackTraces:!1,cancellation:!1,monitoring:!1};return D&&u.longStackTraces(),{longStackTraces:function(){return Pe.longStackTraces},warnings:function(){return Pe.warnings},cancellation:function(){return Pe.cancellation},monitoring:function(){return Pe.monitoring},propagateFromFunction:function(){return oe},boundValueFunction:function(){return fe},checkForgottenReturns:function(le,ce,ye,ge,we){if(le===void 0&&ce!==null&&z){if(we!==void 0&&we._returnedNonUndefined()||!(65535&ge._bitField))return;ye&&(ye+=" ");var Ae="",Ne="";if(ce._trace){for(var tt=ce._trace.stack.split(` `),rt=Q(tt),Ze=rt.length-1;Ze>=0;--Ze){var qt=rt[Ze];if(!S.test(qt)){var Ut=qt.match(j);Ut&&(Ae="at "+Ut[1]+":"+Ut[2]+":"+Ut[3]+" ");break}}if(rt.length>0){var _n=rt[0];for(Ze=0;Ze0&&(Ne=` `+tt[Ze-1]);break}}}var Qn="a promise was created in a "+ye+"handler "+Ae+"but was not returned from it, see http://goo.gl/rRqMUw"+Ne;ge._warn(Qn,!0,ce)}},setBounds:function(le,ce){if(se()){for(var ye,ge,we=le.stack.split(` `),Ae=ce.stack.split(` `),Ne=-1,tt=-1,rt=0;rt=tt||(pe=function(qt){if(_.test(qt))return!0;var Ut=xe(qt);return!!(Ut&&Ut.fileName===ye&&Ne<=Ut.line&&Ut.line<=tt)})}},warn:U,deprecated:function(le,ce){var ye=le+" is deprecated and will be removed in a future version.";return ce&&(ye+=" Use "+ce+" instead."),U(ye)},CapturedTrace:Ce,fireDomEvent:W,fireGlobalEvent:X}}},{"./errors":12,"./util":36}],10:[function(a,s,l){s.exports=function(u){function f(){return this.value}function d(){throw this.reason}u.prototype.return=u.prototype.thenReturn=function(p){return p instanceof u&&p.suppressUnhandledRejections(),this._then(f,void 0,void 0,{value:p},void 0)},u.prototype.throw=u.prototype.thenThrow=function(p){return this._then(d,void 0,void 0,{reason:p},void 0)},u.prototype.catchThrow=function(p){if(arguments.length<=1)return this._then(void 0,d,void 0,{reason:p},void 0);var v=arguments[1];return this.caught(p,function(){throw v})},u.prototype.catchReturn=function(p){if(arguments.length<=1)return p instanceof u&&p.suppressUnhandledRejections(),this._then(void 0,f,void 0,{value:p},void 0);var v=arguments[1];return v instanceof u&&v.suppressUnhandledRejections(),this.caught(p,function(){return v})}}},{}],11:[function(a,s,l){s.exports=function(u,f){var d=u.reduce,p=u.all;function v(){return p(this)}u.prototype.each=function(g){return d(this,g,f,0)._then(v,void 0,void 0,this,void 0)},u.prototype.mapSeries=function(g){return d(this,g,f,f)},u.each=function(g,y){return d(g,y,f,0)._then(v,void 0,void 0,g,void 0)},u.mapSeries=function(g,y){return d(g,y,f,f)}}},{}],12:[function(a,s,l){var u,f,d=a("./es5"),p=d.freeze,v=a("./util"),g=v.inherits,y=v.notEnumerableProp;function w(M,D){function z(q){if(!(this instanceof z))return new z(q);y(this,"message",typeof q=="string"?q:D),y(this,"name",M),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return g(z,Error),z}var b=w("Warning","warning"),x=w("CancellationError","cancellation error"),_=w("TimeoutError","timeout error"),S=w("AggregateError","aggregate error");try{u=TypeError,f=RangeError}catch{u=w("TypeError","type error"),f=w("RangeError","range error")}for(var j="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),E=0;E1?E.cancelPromise._reject(C):E.cancelPromise._cancel(),E.cancelPromise=null,!0)}function _(){return j.call(this,this.promise._target()._settledValue())}function S(E){if(!x(this,E))return g.e=E,g}function j(E){var C=this.promise,N=this.handler;if(!this.called){this.called=!0;var I=this.isFinallyHandler()?N.call(C._boundValue()):N.call(C._boundValue(),E);if(I===d)return I;if(I!==void 0){C._setReturnedNonUndefined();var M=f(I,C);if(M instanceof u){if(this.cancelPromise!=null){if(M._isCancelled()){var D=new v("late cancellation observer");return C._attachExtraTrace(D),g.e=D,g}M.isPending()&&M._attachCancellationCallback(new b(this))}return M._then(_,S,void 0,this,void 0)}}}return C.isRejected()?(x(this),g.e=E,g):(x(this),E)}return w.prototype.isFinallyHandler=function(){return this.type===0},b.prototype._resultCancelled=function(){x(this.finallyHandler)},u.prototype._passThrough=function(E,C,N,I){return typeof E!="function"?this.then():this._then(N,I,void 0,new w(this,C,E),void 0)},u.prototype.lastly=u.prototype.finally=function(E){return this._passThrough(E,0,j,j)},u.prototype.tap=function(E){return this._passThrough(E,1,j)},u.prototype.tapCatch=function(E){var C=arguments.length;if(C===1)return this._passThrough(E,1,void 0,j);var N,I=new Array(C-1),M=0;for(N=0;N0&&typeof arguments[b]=="function"&&(w=arguments[b]);var x=[].slice.call(arguments);w&&x.pop();var _=new f(x).promise();return w!==void 0?_.spread(w):_}}},{"./util":36}],18:[function(a,s,l){s.exports=function(u,f,d,p,v,g){var y=u._getDomain,w=a("./util"),b=w.tryCatch,x=w.errorObj,_=u._async;function S(E,C,N,I){this.constructor$(E),this._promise._captureStackTrace();var M=y();this._callback=M===null?C:w.domainBind(M,C),this._preservedValues=I===v?new Array(this.length()):null,this._limit=N,this._inFlight=0,this._queue=[],_.invoke(this._asyncInit,this,void 0)}function j(E,C,N,I){if(typeof C!="function")return d("expecting a function but got "+w.classString(C));var M=0;if(N!==void 0){if(typeof N!="object"||N===null)return u.reject(new TypeError("options argument must be an object but it is "+w.classString(N)));if(typeof N.concurrency!="number")return u.reject(new TypeError("'concurrency' must be a number but it is "+w.classString(N.concurrency)));M=N.concurrency}return new S(E,C,M=typeof M=="number"&&isFinite(M)&&M>=1?M:0,I).promise()}w.inherits(S,f),S.prototype._asyncInit=function(){this._init$(void 0,-2)},S.prototype._init=function(){},S.prototype._promiseFulfilled=function(E,C){var N=this._values,I=this.length(),M=this._preservedValues,D=this._limit;if(C<0){if(N[C=-1*C-1]=E,D>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(D>=1&&this._inFlight>=D)return N[C]=E,this._queue.push(C),!1;M!==null&&(M[C]=E);var z=this._promise,q=this._callback,W=z._boundValue();z._pushContext();var X=b(q).call(W,E,C,I),J=z._popContext();if(g.checkForgottenReturns(X,J,M!==null?"Promise.filter":"Promise.map",z),X===x)return this._reject(X.e),!0;var te=p(X,this._promise);if(te instanceof u){var Z=(te=te._target())._bitField;if(!(50397184&Z))return D>=1&&this._inFlight++,N[C]=te,te._proxy(this,-1*(C+1)),!1;if(!(33554432&Z))return 16777216&Z?(this._reject(te._reason()),!0):(this._cancel(),!0);X=te._value()}N[C]=X}return++this._totalResolved>=I&&(M!==null?this._filter(N,M):this._resolve(N),!0)},S.prototype._drainQueue=function(){for(var E=this._queue,C=this._limit,N=this._values;E.length>0&&this._inFlight1){v.deprecated("calling Promise.try with more than 1 argument");var _=arguments[1],S=arguments[2];b=g.isArray(_)?y(w).apply(S,_):y(w).call(S,_)}else b=y(w)();var j=x._popContext();return v.checkForgottenReturns(b,j,"Promise.try",x),x._resolveFromSyncValue(b),x},u.prototype._resolveFromSyncValue=function(w){w===g.errorObj?this._rejectCallback(w.e,!1):this._resolveCallback(w,!0)}}},{"./util":36}],20:[function(a,s,l){var u=a("./util"),f=u.maybeWrapAsError,d=a("./errors").OperationalError,p=a("./es5"),v=/^(?:name|message|stack|cause)$/;function g(y){var w;if(function(S){return S instanceof Error&&p.getPrototypeOf(S)===Error.prototype}(y)){(w=new d(y)).name=y.name,w.message=y.message,w.stack=y.stack;for(var b=p.keys(y),x=0;x1){var ae,oe=new Array(ee-1),fe=0;for(ae=0;ae0&&typeof Y!="function"&&typeof ee!="function"){var ae=".then() only accepts functions but was passed: "+y.classString(Y);arguments.length>1&&(ae+=", "+y.classString(ee)),this._warn(ae)}return this._then(Y,ee,void 0,void 0,void 0)},B.prototype.done=function(Y,ee){this._then(Y,ee,void 0,void 0,void 0)._setIsFinal()},B.prototype.spread=function(Y){return typeof Y!="function"?d("expecting a function but got "+y.classString(Y)):this.all()._then(Y,void 0,void 0,C,void 0)},B.prototype.toJSON=function(){var Y={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(Y.fulfillmentValue=this.value(),Y.isFulfilled=!0):this.isRejected()&&(Y.rejectionReason=this.reason(),Y.isRejected=!0),Y},B.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new M(this).promise()},B.prototype.error=function(Y){return this.caught(y.originatesFromRejection,Y)},B.getNewLibraryCopy=s.exports,B.is=function(Y){return Y instanceof B},B.fromNode=B.fromCallback=function(Y){var ee=new B(E);ee._captureStackTrace();var ae=arguments.length>1&&!!Object(arguments[1]).multiArgs,oe=Z(Y)(J(ee,ae));return oe===te&&ee._rejectCallback(oe.e,!0),ee._isFateSealed()||ee._setAsyncGuaranteed(),ee},B.all=function(Y){return new M(Y).promise()},B.cast=function(Y){var ee=I(Y);return ee instanceof B||((ee=new B(E))._captureStackTrace(),ee._setFulfilled(),ee._rejectionHandler0=Y),ee},B.resolve=B.fulfilled=B.cast,B.reject=B.rejected=function(Y){var ee=new B(E);return ee._captureStackTrace(),ee._rejectCallback(Y,!0),ee},B.setScheduler=function(Y){if(typeof Y!="function")throw new S("expecting a function but got "+y.classString(Y));return x.setScheduler(Y)},B.prototype._then=function(Y,ee,ae,oe,fe){var P=fe!==void 0,A=P?fe:new B(E),U=this._target(),Q=U._bitField;P||(A._propagateFrom(this,3),A._captureStackTrace(),oe===void 0&&2097152&this._bitField&&(oe=50397184&Q?this._boundValue():U===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,A));var K=v();if(50397184&Q){var ie,he,Se=U._settlePromiseCtx;33554432&Q?(he=U._rejectionHandler0,ie=Y):16777216&Q?(he=U._fulfillmentHandler0,ie=ee,U._unsetRejectionIsUnhandled()):(Se=U._settlePromiseLateCancellationObserver,he=new j("late cancellation observer"),U._attachExtraTrace(he),ie=ee),x.invoke(Se,U,{handler:K===null?ie:typeof ie=="function"&&y.domainBind(K,ie),promise:A,receiver:oe,value:he})}else U._addCallbacks(Y,ee,A,oe,K);return A},B.prototype._length=function(){return 65535&this._bitField},B.prototype._isFateSealed=function(){return(117506048&this._bitField)!=0},B.prototype._isFollowing=function(){return(67108864&this._bitField)==67108864},B.prototype._setLength=function(Y){this._bitField=-65536&this._bitField|65535&Y},B.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},B.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},B.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},B.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},B.prototype._isFinal=function(){return(4194304&this._bitField)>0},B.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},B.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},B.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},B.prototype._setAsyncGuaranteed=function(){x.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},B.prototype._receiverAt=function(Y){var ee=Y===0?this._receiver0:this[4*Y-4+3];if(ee!==g)return ee===void 0&&this._isBound()?this._boundValue():ee},B.prototype._promiseAt=function(Y){return this[4*Y-4+2]},B.prototype._fulfillmentHandlerAt=function(Y){return this[4*Y-4+0]},B.prototype._rejectionHandlerAt=function(Y){return this[4*Y-4+1]},B.prototype._boundValue=function(){},B.prototype._migrateCallback0=function(Y){Y._bitField;var ee=Y._fulfillmentHandler0,ae=Y._rejectionHandler0,oe=Y._promise0,fe=Y._receiverAt(0);fe===void 0&&(fe=g),this._addCallbacks(ee,ae,oe,fe,null)},B.prototype._migrateCallbackAt=function(Y,ee){var ae=Y._fulfillmentHandlerAt(ee),oe=Y._rejectionHandlerAt(ee),fe=Y._promiseAt(ee),P=Y._receiverAt(ee);P===void 0&&(P=g),this._addCallbacks(ae,oe,fe,P,null)},B.prototype._addCallbacks=function(Y,ee,ae,oe,fe){var P=this._length();if(P>=65531&&(P=0,this._setLength(0)),P===0)this._promise0=ae,this._receiver0=oe,typeof Y=="function"&&(this._fulfillmentHandler0=fe===null?Y:y.domainBind(fe,Y)),typeof ee=="function"&&(this._rejectionHandler0=fe===null?ee:y.domainBind(fe,ee));else{var A=4*P-4;this[A+2]=ae,this[A+3]=oe,typeof Y=="function"&&(this[A+0]=fe===null?Y:y.domainBind(fe,Y)),typeof ee=="function"&&(this[A+1]=fe===null?ee:y.domainBind(fe,ee))}return this._setLength(P+1),P},B.prototype._proxy=function(Y,ee){this._addCallbacks(void 0,void 0,ee,Y,null)},B.prototype._resolveCallback=function(Y,ee){if(!(117506048&this._bitField)){if(Y===this)return this._rejectCallback(u(),!1);var ae=I(Y,this);if(!(ae instanceof B))return this._fulfill(Y);ee&&this._propagateFrom(ae,2);var oe=ae._target();if(oe!==this){var fe=oe._bitField;if(50397184&fe)if(33554432&fe)this._fulfill(oe._value());else if(16777216&fe)this._reject(oe._reason());else{var U=new j("late cancellation observer");oe._attachExtraTrace(U),this._reject(U)}else{var P=this._length();P>0&&oe._migrateCallback0(this);for(var A=1;A>>16)){if(Y===this){var ae=u();return this._attachExtraTrace(ae),this._reject(ae)}this._setFulfilled(),this._rejectionHandler0=Y,(65535&ee)>0&&(134217728&ee?this._settlePromises():x.settlePromises(this))}},B.prototype._reject=function(Y){var ee=this._bitField;if(!((117506048&ee)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=Y,this._isFinal())return x.fatalError(Y,y.isNode);(65535&ee)>0?x.settlePromises(this):this._ensurePossibleRejectionHandled()}},B.prototype._fulfillPromises=function(Y,ee){for(var ae=1;ae0){if(16842752&Y){var ae=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,ae,Y),this._rejectPromises(ee,ae)}else{var oe=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,oe,Y),this._fulfillPromises(ee,oe)}this._setLength(0)}this._clearCancellationData()},B.prototype._settledValue=function(){var Y=this._bitField;return 33554432&Y?this._rejectionHandler0:16777216&Y?this._fulfillmentHandler0:void 0},B.defer=B.pending=function(){return q.deprecated("Promise.defer","new Promise"),{promise:new B(E),resolve:F,reject:H}},y.notEnumerableProp(B,"_makeSelfResolutionError",u),a("./method")(B,E,I,d,q),a("./bind")(B,E,I,q),a("./cancel")(B,M,d,q),a("./direct_resolve")(B),a("./synchronous_inspection")(B),a("./join")(B,M,I,E,x,v),B.Promise=B,B.version="3.5.1",a("./map.js")(B,M,d,I,E,q),a("./call_get.js")(B),a("./using.js")(B,d,I,z,E,q),a("./timers.js")(B,E,q),a("./generators.js")(B,d,E,I,p,q),a("./nodeify.js")(B),a("./promisify.js")(B,E),a("./props.js")(B,M,I,d),a("./race.js")(B,E,I,d),a("./reduce.js")(B,M,d,I,E,q),a("./settle.js")(B,M,q),a("./some.js")(B,M,d),a("./filter.js")(B,E),a("./each.js")(B,E),a("./any.js")(B),y.toFastProperties(B),y.toFastProperties(B.prototype),ne({a:1}),ne({b:2}),ne({c:3}),ne(1),ne(function(){}),ne(void 0),ne(!1),ne(new B(E)),q.setBounds(b.firstLineError,y.lastLineError),B}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(a,s,l){s.exports=function(u,f,d,p,v){var g=a("./util");function y(w){var b=this._promise=new u(f);w instanceof u&&b._propagateFrom(w,3),b._setOnCancel(this),this._values=w,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return g.isArray,g.inherits(y,v),y.prototype.length=function(){return this._length},y.prototype.promise=function(){return this._promise},y.prototype._init=function w(b,x){var _=d(this._values,this._promise);if(_ instanceof u){var S=(_=_._target())._bitField;if(this._values=_,(50397184&S)==0)return this._promise._setAsyncGuaranteed(),_._then(w,this._reject,void 0,this,x);if(!(33554432&S))return 16777216&S?this._reject(_._reason()):this._cancel();_=_._value()}if((_=g.asArray(_))!==null)_.length!==0?this._iterate(_):x===-5?this._resolveEmptyArray():this._resolve(function(E){switch(x){case-2:return[];case-3:return{};case-6:return new Map}}());else{var j=p("expecting an array or an iterable object but got "+g.classString(_)).reason();this._promise._rejectCallback(j,!1)}},y.prototype._iterate=function(w){var b=this.getActualLength(w.length);this._length=b,this._values=this.shouldCopyValues()?new Array(b):this._values;for(var x=this._promise,_=!1,S=null,j=0;j=this._length&&(this._resolve(this._values),!0)},y.prototype._promiseCancelled=function(){return this._cancel(),!0},y.prototype._promiseRejected=function(w){return this._totalResolved++,this._reject(w),!0},y.prototype._resultCancelled=function(){if(!this._isResolved()){var w=this._values;if(this._cancel(),w instanceof u)w.cancel();else for(var b=0;b=this._length){var E;if(this._isMap)E=function(M){for(var D=new v,z=M.length/2|0,q=0;q>1},u.prototype.props=function(){return _(this)},u.props=function(S){return _(S)}}},{"./es5":13,"./util":36}],26:[function(a,s,l){function u(f){this._capacity=f,this._length=0,this._front=0}u.prototype._willBeOverCapacity=function(f){return this._capacity"u"){var p=i.setImmediate,v=r.nextTick;u=f.isRecentNode?function(y){p.call(i,y)}:function(y){v.call(r,y)}}else if(typeof d=="function"&&typeof d.resolve=="function"){var g=d.resolve();u=function(y){g.then(y)}}else u=typeof MutationObserver>"u"||typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)?o!==void 0?function(y){o(y)}:typeof setTimeout<"u"?function(y){setTimeout(y,0)}:function(){throw new Error(`No async scheduler available See http://goo.gl/MqrFmX `)}:function(){var y=document.createElement("div"),w={attributes:!0},b=!1,x=document.createElement("div");return new MutationObserver(function(){y.classList.toggle("foo"),b=!1}).observe(x,w),function(_){var S=new MutationObserver(function(){S.disconnect(),_()});S.observe(y,w),b||(b=!0,x.classList.toggle("foo"))}}();s.exports=u},{"./util":36}],30:[function(a,s,l){s.exports=function(u,f,d){var p=u.PromiseInspection;function v(g){this.constructor$(g)}a("./util").inherits(v,f),v.prototype._promiseResolved=function(g,y){return this._values[g]=y,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},v.prototype._promiseFulfilled=function(g,y){var w=new p;return w._bitField=33554432,w._settledValueField=g,this._promiseResolved(y,w)},v.prototype._promiseRejected=function(g,y){var w=new p;return w._bitField=16777216,w._settledValueField=g,this._promiseResolved(y,w)},u.settle=function(g){return d.deprecated(".settle()",".reflect()"),new v(g).promise()},u.prototype.settle=function(){return u.settle(this)}}},{"./util":36}],31:[function(a,s,l){s.exports=function(u,f,d){var p=a("./util"),v=a("./errors").RangeError,g=a("./errors").AggregateError,y=p.isArray,w={};function b(_){this.constructor$(_),this._howMany=0,this._unwrap=!1,this._initialized=!1}function x(_,S){if((0|S)!==S||S<0)return d(`expecting a positive integer See http://goo.gl/MqrFmX `);var j=new b(_),E=j.promise();return j.setHowMany(S),j.init(),E}p.inherits(b,f),b.prototype._init=function(){if(this._initialized)if(this._howMany!==0){this._init$(void 0,-5);var _=y(this._values);!this._isResolved()&&_&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},b.prototype.init=function(){this._initialized=!0,this._init()},b.prototype.setUnwrap=function(){this._unwrap=!0},b.prototype.howMany=function(){return this._howMany},b.prototype.setHowMany=function(_){this._howMany=_},b.prototype._promiseFulfilled=function(_){return this._addFulfilled(_),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},b.prototype._promiseRejected=function(_){return this._addRejected(_),this._checkOutcome()},b.prototype._promiseCancelled=function(){return this._values instanceof u||this._values==null?this._cancel():(this._addRejected(w),this._checkOutcome())},b.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var _=new g,S=this.length();S0?this._reject(_):this._cancel(),!0}return!1},b.prototype._fulfilled=function(){return this._totalResolved},b.prototype._rejected=function(){return this._values.length-this.length()},b.prototype._addRejected=function(_){this._values.push(_)},b.prototype._addFulfilled=function(_){this._values[this._totalResolved++]=_},b.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},b.prototype._getRangeError=function(_){var S="Input array must contain at least "+this._howMany+" items but contains only "+_+" items";return new v(S)},b.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},u.some=function(_,S){return x(_,S)},u.prototype.some=function(_){return x(this,_)},u._SomePromiseArray=b}},{"./errors":12,"./util":36}],32:[function(a,s,l){s.exports=function(u){function f(b){b!==void 0?(b=b._target(),this._bitField=b._bitField,this._settledValueField=b._isFateSealed()?b._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}f.prototype._settledValue=function(){return this._settledValueField};var d=f.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(`cannot get fulfillment value of a non-fulfilled promise See http://goo.gl/MqrFmX `);return this._settledValue()},p=f.prototype.error=f.prototype.reason=function(){if(!this.isRejected())throw new TypeError(`cannot get rejection reason of a non-rejected promise See http://goo.gl/MqrFmX `);return this._settledValue()},v=f.prototype.isFulfilled=function(){return(33554432&this._bitField)!=0},g=f.prototype.isRejected=function(){return(16777216&this._bitField)!=0},y=f.prototype.isPending=function(){return(50397184&this._bitField)==0},w=f.prototype.isResolved=function(){return(50331648&this._bitField)!=0};f.prototype.isCancelled=function(){return(8454144&this._bitField)!=0},u.prototype.__isCancelled=function(){return(65536&this._bitField)==65536},u.prototype._isCancelled=function(){return this._target().__isCancelled()},u.prototype.isCancelled=function(){return(8454144&this._target()._bitField)!=0},u.prototype.isPending=function(){return y.call(this._target())},u.prototype.isRejected=function(){return g.call(this._target())},u.prototype.isFulfilled=function(){return v.call(this._target())},u.prototype.isResolved=function(){return w.call(this._target())},u.prototype.value=function(){return d.call(this._target())},u.prototype.reason=function(){var b=this._target();return b._unsetRejectionIsUnhandled(),p.call(b)},u.prototype._value=function(){return this._settledValue()},u.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},u.PromiseInspection=f}},{}],33:[function(a,s,l){s.exports=function(u,f){var d=a("./util"),p=d.errorObj,v=d.isObject,g={}.hasOwnProperty;return function(y,w){if(v(y)){if(y instanceof u)return y;var b=function(_){try{return function(S){return S.then}(_)}catch(S){return p.e=S,p}}(y);if(b===p){w&&w._pushContext();var x=u.reject(b.e);return w&&w._popContext(),x}if(typeof b=="function")return function(_){try{return g.call(_,"_promise0")}catch{return!1}}(y)?(x=new u(f),y._then(x._fulfill,x._reject,void 0,x,null),x):function(_,S,j){var E=new u(f),C=E;j&&j._pushContext(),E._captureStackTrace(),j&&j._popContext();var N=!0,I=d.tryCatch(S).call(_,function(M){E&&(E._resolveCallback(M),E=null)},function(M){E&&(E._rejectCallback(M,N,!0),E=null)});return N=!1,E&&I===p&&(E._rejectCallback(I.e,!0,!0),E=null),C}(y,b,w)}return y}}},{"./util":36}],34:[function(a,s,l){s.exports=function(u,f,d){var p=a("./util"),v=u.TimeoutError;function g(_){this.handle=_}g.prototype._resultCancelled=function(){clearTimeout(this.handle)};var y=function(_){return w(+this).thenReturn(_)},w=u.delay=function(_,S){var j,E;return S!==void 0?(j=u.resolve(S)._then(y,null,null,_,void 0),d.cancellation()&&S instanceof u&&j._setOnCancel(S)):(j=new u(f),E=setTimeout(function(){j._fulfill()},+_),d.cancellation()&&j._setOnCancel(new g(E)),j._captureStackTrace()),j._setAsyncGuaranteed(),j};function b(_){return clearTimeout(this.handle),_}function x(_){throw clearTimeout(this.handle),_}u.prototype.delay=function(_){return w(_,this)},u.prototype.timeout=function(_,S){var j,E;_=+_;var C=new g(setTimeout(function(){j.isPending()&&function(N,I,M){var D;D=typeof I!="string"?I instanceof Error?I:new v("operation timed out"):new v(I),p.markAsOriginatingFromRejection(D),N._attachExtraTrace(D),N._reject(D),M!=null&&M.cancel()}(j,S,E)},_));return d.cancellation()?(E=this.then(),(j=E._then(b,x,void 0,C,void 0))._setOnCancel(C)):j=this._then(b,x,void 0,C,void 0),j}}},{"./util":36}],35:[function(a,s,l){s.exports=function(u,f,d,p,v,g){var y=a("./util"),w=a("./errors").TypeError,b=a("./util").inherits,x=y.errorObj,_=y.tryCatch,S={};function j(D){setTimeout(function(){throw D},0)}function E(D,z){var q=0,W=D.length,X=new u(v);return function J(){if(q>=W)return X._fulfill();var te=function(Z){var B=d(Z);return B!==Z&&typeof Z._isDisposable=="function"&&typeof Z._getDisposer=="function"&&Z._isDisposable()&&B._setDisposable(Z._getDisposer()),B}(D[q++]);if(te instanceof u&&te._isDisposable()){try{te=d(te._getDisposer().tryDispose(z),D.promise)}catch(Z){return j(Z)}if(te instanceof u)return te._then(J,j,null,null,null)}J()}(),X}function C(D,z,q){this._data=D,this._promise=z,this._context=q}function N(D,z,q){this.constructor$(D,z,q)}function I(D){return C.isDisposer(D)?(this.resources[this.index]._setDisposable(D),D.promise()):D}function M(D){this.length=D,this.promise=null,this[D-1]=null}C.prototype.data=function(){return this._data},C.prototype.promise=function(){return this._promise},C.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():S},C.prototype.tryDispose=function(D){var z=this.resource(),q=this._context;q!==void 0&&q._pushContext();var W=z!==S?this.doDispose(z,D):null;return q!==void 0&&q._popContext(),this._promise._unsetDisposable(),this._data=null,W},C.isDisposer=function(D){return D!=null&&typeof D.resource=="function"&&typeof D.tryDispose=="function"},b(N,C),N.prototype.doDispose=function(D,z){return this.data().call(D,D,z)},M.prototype._resultCancelled=function(){for(var D=this.length,z=0;z0},u.prototype._getDisposer=function(){return this._disposer},u.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},u.prototype.disposer=function(D){if(typeof D=="function")return new N(D,this,p());throw new w}}},{"./errors":12,"./util":36}],36:[function(a,s,l){var u,f=a("./es5"),d=typeof navigator>"u",p={e:{}},v=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:this!==void 0?this:null;function g(){try{var W=u;return u=null,W.apply(this,arguments)}catch(X){return p.e=X,p}}function y(W){return W==null||W===!0||W===!1||typeof W=="string"||typeof W=="number"}function w(W,X,J){if(y(W))return W;var te={value:J,configurable:!0,enumerable:!1,writable:!0};return f.defineProperty(W,X,te),W}var b=function(){var W=[Array.prototype,Object.prototype,Function.prototype],X=function(Z){for(var B=0;B1,te=X.length>0&&!(X.length===1&&X[0]==="constructor"),Z=x.test(W+"")&&f.names(W).length>0;if(J||te||Z)return!0}return!1}catch{return!1}},isIdentifier:function(W){return _.test(W)},inheritedDataKeys:b,getDataPropertyOrDefault:function(W,X,J){if(!f.isES5)return{}.hasOwnProperty.call(W,X)?W[X]:void 0;var te=Object.getOwnPropertyDescriptor(W,X);return te!=null?te.get==null&&te.set==null?te.value:J:void 0},thrower:function(W){throw W},isArray:f.isArray,asArray:I,notEnumerableProp:w,isPrimitive:y,isObject:function(W){return typeof W=="function"||typeof W=="object"&&W!==null},isError:j,canEvaluate:d,errorObj:p,tryCatch:function(W){return u=W,g},inherits:function(W,X){var J={}.hasOwnProperty;function te(){for(var Z in this.constructor=W,this.constructor$=X,X.prototype)J.call(X.prototype,Z)&&Z.charAt(Z.length-1)!=="$"&&(this[Z+"$"]=X.prototype[Z])}return te.prototype=X.prototype,W.prototype=new te,W.prototype},withAppended:function(W,X){var J,te=W.length,Z=new Array(te+1);for(J=0;J10||W[0]>0}(),q.isNode&&q.toFastProperties(r);try{throw new Error}catch(W){q.lastLineError=W}s.exports=q},{"./es5":13}]},{},[4])(4),typeof window<"u"&&window!==null?window.P=window.Promise:typeof self<"u"&&self!==null&&(self.P=self.Promise)}).call(this,n(4),n(0),n(11).setImmediate)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r,i){if(!i.eol&&r){for(var o=0,a=r.length;o0?(typeof H=="string"||oe.objectMode||Object.getPrototypeOf(H)===f.prototype||(H=function(fe){return f.from(fe)}(H)),Y?oe.endEmitted?F.emit("error",new Error("stream.unshift() after end event")):E(F,oe,H,!0):oe.ended?F.emit("error",new Error("stream.push() after EOF")):(oe.reading=!1,oe.decoder&&!ne?(H=oe.decoder.write(H),oe.objectMode||H.length!==0?E(F,oe,H,!1):D(F,oe)):E(F,oe,H,!1))):Y||(oe.reading=!1)),function(fe){return!fe.ended&&(fe.needReadable||fe.lengthH.highWaterMark&&(H.highWaterMark=function(ne){return ne>=C?ne=C:(ne--,ne|=ne>>>1,ne|=ne>>>2,ne|=ne>>>4,ne|=ne>>>8,ne|=ne>>>16,ne++),ne}(F)),F<=H.length?F:H.ended?H.length:(H.needReadable=!0,0))}function I(F){var H=F._readableState;H.needReadable=!1,H.emittedReadable||(g("emitReadable",H.flowing),H.emittedReadable=!0,H.sync?o.nextTick(M,F):M(F))}function M(F){g("emit readable"),F.emit("readable"),X(F)}function D(F,H){H.readingMore||(H.readingMore=!0,o.nextTick(z,F,H))}function z(F,H){for(var ne=H.length;!H.reading&&!H.flowing&&!H.ended&&H.length=H.length?(ne=H.decoder?H.buffer.join(""):H.buffer.length===1?H.buffer.head.data:H.buffer.concat(H.length),H.buffer.clear()):ne=function(Y,ee,ae){var oe;return YK.length?K.length:fe;if(ie===K.length?Q+=K:Q+=K.slice(0,fe),(fe-=ie)==0){ie===K.length?(++U,A.next?P.head=A.next:P.head=P.tail=null):(P.head=A,A.data=K.slice(ie));break}++U}return P.length-=U,Q}(Y,ee):function(fe,P){var A=f.allocUnsafe(fe),U=P.head,Q=1;for(U.data.copy(A),fe-=U.data.length;U=U.next;){var K=U.data,ie=fe>K.length?K.length:fe;if(K.copy(A,A.length-fe,0,ie),(fe-=ie)==0){ie===K.length?(++Q,U.next?P.head=U.next:P.head=P.tail=null):(P.head=U,U.data=K.slice(ie));break}++Q}return P.length-=Q,A}(Y,ee),oe}(F,H.buffer,H.decoder),ne);var ne}function te(F){var H=F._readableState;if(H.length>0)throw new Error('"endReadable()" called on non-empty stream');H.endEmitted||(H.ended=!0,o.nextTick(Z,H,F))}function Z(F,H){F.endEmitted||F.length!==0||(F.endEmitted=!0,H.readable=!1,H.emit("end"))}function B(F,H){for(var ne=0,Y=F.length;ne=H.highWaterMark||H.ended))return g("read: emitReadable",H.length,H.ended),H.length===0&&H.ended?te(this):I(this),null;if((F=N(F,H))===0&&H.ended)return H.length===0&&te(this),null;var Y,ee=H.needReadable;return g("need readable",ee),(H.length===0||H.length-F0?J(F,H):null)===null?(H.needReadable=!0,F=0):H.length-=F,H.length===0&&(H.ended||(H.needReadable=!0),ne!==F&&H.ended&&te(this)),Y!==null&&this.emit("data",Y),Y},S.prototype._read=function(F){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(F,H){var ne=this,Y=this._readableState;switch(Y.pipesCount){case 0:Y.pipes=F;break;case 1:Y.pipes=[Y.pipes,F];break;default:Y.pipes.push(F)}Y.pipesCount+=1,g("pipe count=%d opts=%j",Y.pipesCount,H);var ee=H&&H.end===!1||F===i.stdout||F===i.stderr?ie:ae;function ae(){g("onend"),F.end()}Y.endEmitted?o.nextTick(ee):ne.once("end",ee),F.on("unpipe",function he(Se,se){g("onunpipe"),Se===ne&&se&&se.hasUnpiped===!1&&(se.hasUnpiped=!0,g("cleanup"),F.removeListener("close",Q),F.removeListener("finish",K),F.removeListener("drain",oe),F.removeListener("error",U),F.removeListener("unpipe",he),ne.removeListener("end",ae),ne.removeListener("end",ie),ne.removeListener("data",A),fe=!0,!Y.awaitDrain||F._writableState&&!F._writableState.needDrain||oe())});var oe=function(he){return function(){var Se=he._readableState;g("pipeOnDrain",Se.awaitDrain),Se.awaitDrain&&Se.awaitDrain--,Se.awaitDrain===0&&l(he,"data")&&(Se.flowing=!0,X(he))}}(ne);F.on("drain",oe);var fe=!1,P=!1;function A(he){g("ondata"),P=!1,F.write(he)!==!1||P||((Y.pipesCount===1&&Y.pipes===F||Y.pipesCount>1&&B(Y.pipes,F)!==-1)&&!fe&&(g("false write response, pause",ne._readableState.awaitDrain),ne._readableState.awaitDrain++,P=!0),ne.pause())}function U(he){g("onerror",he),ie(),F.removeListener("error",U),l(F,"error")===0&&F.emit("error",he)}function Q(){F.removeListener("finish",K),ie()}function K(){g("onfinish"),F.removeListener("close",Q),ie()}function ie(){g("unpipe"),ne.unpipe(F)}return ne.on("data",A),function(he,Se,se){if(typeof he.prependListener=="function")return he.prependListener(Se,se);he._events&&he._events[Se]?s(he._events[Se])?he._events[Se].unshift(se):he._events[Se]=[se,he._events[Se]]:he.on(Se,se)}(F,"error",U),F.once("close",Q),F.once("finish",K),F.emit("pipe",ne),Y.flowing||(g("pipe resume"),ne.resume()),F},S.prototype.unpipe=function(F){var H=this._readableState,ne={hasUnpiped:!1};if(H.pipesCount===0)return this;if(H.pipesCount===1)return F&&F!==H.pipes?this:(F||(F=H.pipes),H.pipes=null,H.pipesCount=0,H.flowing=!1,F&&F.emit("unpipe",this,ne),this);if(!F){var Y=H.pipes,ee=H.pipesCount;H.pipes=null,H.pipesCount=0,H.flowing=!1;for(var ae=0;ae>5==6?2:g>>4==14?3:g>>3==30?4:g>>6==2?-1:-2}function s(g){var y=this.lastTotal-this.lastNeed,w=function(b,x,_){if((192&x[0])!=128)return b.lastNeed=0,"�";if(b.lastNeed>1&&x.length>1){if((192&x[1])!=128)return b.lastNeed=1,"�";if(b.lastNeed>2&&x.length>2&&(192&x[2])!=128)return b.lastNeed=2,"�"}}(this,g);return w!==void 0?w:this.lastNeed<=g.length?(g.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(g.copy(this.lastChar,y,0,g.length),void(this.lastNeed-=g.length))}function l(g,y){if((g.length-y)%2==0){var w=g.toString("utf16le",y);if(w){var b=w.charCodeAt(w.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",y,g.length-1)}function u(g){var y=g&&g.length?this.write(g):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,w)}return y}function f(g,y){var w=(g.length-y)%3;return w===0?g.toString("base64",y):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",y,g.length-w))}function d(g){var y=g&&g.length?this.write(g):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function p(g){return g.toString(this.encoding)}function v(g){return g&&g.length?this.write(g):""}t.StringDecoder=o,o.prototype.write=function(g){if(g.length===0)return"";var y,w;if(this.lastNeed){if((y=this.fillLast(g))===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w=0?(E>0&&(x.lastNeed=E-1),E):--j=0?(E>0&&(x.lastNeed=E-2),E):--j=0?(E>0&&(E===2?E=0:x.lastNeed=E-3),E):0}(this,g,y);if(!this.lastNeed)return g.toString("utf8",y);this.lastTotal=w;var b=g.length-(w-this.lastNeed);return g.copy(this.lastChar,0,b),g.toString("utf8",y,b)},o.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length}},function(e,t,n){e.exports=o;var r=n(1),i=n(5);function o(l){if(!(this instanceof o))return new o(l);r.call(this,l),this._transformState={afterTransform:(function(u,f){var d=this._transformState;d.transforming=!1;var p=d.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,f!=null&&this.push(f),p(u);var v=this._readableState;v.reading=!1,(v.needReadable||v.length-1&&a.push(i[s]);return a},t.trimLeft=String.prototype.trimLeft?function(i){return i.trimLeft()}:function(i){return i.replace(/^\s+/,"")},t.trimRight=String.prototype.trimRight?function(i){return i.trimRight()}:function(i){return i.replace(/\s+$/,"")}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)s.hasOwnProperty(l)&&(a[l]=s[l])};return function(a,s){function l(){this.constructor=a}o(a,s),a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function a(s,l,u){var f=o.call(this,"Error: "+s+". JSON Line number: "+l+(u?" near: "+u:""))||this;return f.err=s,f.line=l,f.extra=u,f.name="CSV Parse Error",f}return r(a,o),a.column_mismatched=function(s,l){return new a("column_mismatched",s,l)},a.unclosed_quote=function(s,l){return new a("unclosed_quote",s,l)},a.fromJSON=function(s){return new a(s.err,s.line,s.extra)},a.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},a}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),o=n(69),a=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":a&&a in Object(s)?i(s):o(s)}},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){e.exports=n(33)},function(e,t,n){var r=n(34),i=function(o,a){return new r.Converter(o,a)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var w in y)y.hasOwnProperty(w)&&(g[w]=y[w])};return function(g,y){function w(){this.constructor=g}v(g,y),g.prototype=y===null?Object.create(y):(w.prototype=y.prototype,new w)}}(),o=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(36),s=n(50),l=n(51),u=o(n(15)),f=n(52),d=n(105),p=function(v){function g(y,w){w===void 0&&(w={});var b=v.call(this,w)||this;return b.options=w,b.params=s.mergeParams(y),b.runtime=l.initParseRuntime(b),b.result=new d.Result(b),b.processor=new f.ProcessorLocal(b),b.once("error",function(x){r(function(){b.result.processError(x),b.emit("done",x)})}),b.once("done",function(){b.processor.destroy()}),b}return i(g,v),g.prototype.preRawData=function(y){return this.runtime.preRawDataHook=y,this},g.prototype.preFileLine=function(y){return this.runtime.preFileLineHook=y,this},g.prototype.subscribe=function(y,w,b){return this.parseRuntime.subscribe={onNext:y,onError:w,onCompleted:b},this},g.prototype.fromFile=function(y,w){var b=this,x=n(!function(){var _=new Error("Cannot find module 'fs'");throw _.code="MODULE_NOT_FOUND",_}());return x.exists(y,function(_){_?x.createReadStream(y,w).pipe(b):b.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},g.prototype.fromStream=function(y){return y.pipe(this),this},g.prototype.fromString=function(y){y.toString();var w=new a.Readable,b=0;return w._read=function(x){if(b>=y.length)this.push(null);else{var _=y.substr(b,x);this.push(_),b+=x}},this.fromStream(w)},g.prototype.then=function(y,w){var b=this;return new u.default(function(x,_){b.parseRuntime.then={onfulfilled:function(S){x(y?y(S):S)},onrejected:function(S){w?x(w(S)):_(S)}}})},Object.defineProperty(g.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),g.prototype._transform=function(y,w,b){var x=this;this.processor.process(y).then(function(_){if(_.length>0)return x.runtime.started=!0,x.result.processResult(_)}).then(function(){x.emit("drained"),b()},function(_){x.runtime.hasError=!0,x.runtime.error=_,x.emit("error",_),b()})},g.prototype._flush=function(y){var w=this;this.processor.flush().then(function(b){if(b.length>0)return w.result.processResult(b)}).then(function(){w.processEnd(y)},function(b){w.emit("error",b),y()})},g.prototype.processEnd=function(y){this.result.endProcess(),this.emit("done"),y()},Object.defineProperty(g.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),g}(a.Transform);t.Converter=p}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(o,a){if(!o.setImmediate){var s,l=1,u={},f=!1,d=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,{}.toString.call(o.process)==="[object process]"?s=function(y){i.nextTick(function(){g(y)})}:function(){if(o.postMessage&&!o.importScripts){var y=!0,w=o.onmessage;return o.onmessage=function(){y=!1},o.postMessage("","*"),o.onmessage=w,y}}()?function(){var y="setImmediate$"+Math.random()+"$",w=function(b){b.source===o&&typeof b.data=="string"&&b.data.indexOf(y)===0&&g(+b.data.slice(y.length))};o.addEventListener?o.addEventListener("message",w,!1):o.attachEvent("onmessage",w),s=function(b){o.postMessage(y+b,"*")}}():o.MessageChannel?function(){var y=new MessageChannel;y.port1.onmessage=function(w){g(w.data)},s=function(w){y.port2.postMessage(w)}}():d&&"onreadystatechange"in d.createElement("script")?function(){var y=d.documentElement;s=function(w){var b=d.createElement("script");b.onreadystatechange=function(){g(w),b.onreadystatechange=null,y.removeChild(b),b=null},y.appendChild(b)}}():s=function(y){setTimeout(g,0,y)},p.setImmediate=function(y){typeof y!="function"&&(y=new Function(""+y));for(var w=new Array(arguments.length-1),b=0;b"u"?r===void 0?this:r:self)}).call(this,n(0),n(4))},function(e,t,n){e.exports=i;var r=n(12).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(13),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(o,a){var s=this;function l(y){o.writable&&o.write(y)===!1&&s.pause&&s.pause()}function u(){s.readable&&s.resume&&s.resume()}s.on("data",l),o.on("drain",u),o._isStdio||a&&a.end===!1||(s.on("end",d),s.on("close",p));var f=!1;function d(){f||(f=!0,o.end())}function p(){f||(f=!0,typeof o.destroy=="function"&&o.destroy())}function v(y){if(g(),r.listenerCount(this,"error")===0)throw y}function g(){s.removeListener("data",l),o.removeListener("drain",u),s.removeListener("end",d),s.removeListener("close",p),s.removeListener("error",v),o.removeListener("error",v),s.removeListener("end",g),s.removeListener("close",g),o.removeListener("close",g)}return s.on("error",v),o.on("error",v),s.on("end",g),s.on("close",g),o.on("close",g),o.emit("pipe",s),o}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){t.byteLength=function(p){var v=u(p),g=v[0],y=v[1];return 3*(g+y)/4-y},t.toByteArray=function(p){for(var v,g=u(p),y=g[0],w=g[1],b=new o(3*(y+w)/4-w),x=0,_=w>0?y-4:y,S=0;S<_;S+=4)v=i[p.charCodeAt(S)]<<18|i[p.charCodeAt(S+1)]<<12|i[p.charCodeAt(S+2)]<<6|i[p.charCodeAt(S+3)],b[x++]=v>>16&255,b[x++]=v>>8&255,b[x++]=255&v;return w===2&&(v=i[p.charCodeAt(S)]<<2|i[p.charCodeAt(S+1)]>>4,b[x++]=255&v),w===1&&(v=i[p.charCodeAt(S)]<<10|i[p.charCodeAt(S+1)]<<4|i[p.charCodeAt(S+2)]>>2,b[x++]=v>>8&255,b[x++]=255&v),b},t.fromByteArray=function(p){for(var v,g=p.length,y=g%3,w=[],b=0,x=g-y;bx?x:b+16383));return y===1?(v=p[g-1],w.push(r[v>>2]+r[v<<4&63]+"==")):y===2&&(v=(p[g-2]<<8)+p[g-1],w.push(r[v>>10]+r[v>>4&63]+r[v<<2&63]+"=")),w.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var g=p.indexOf("=");return g===-1&&(g=v),[g,g===v?0:4-g%4]}function f(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[63&p]}function d(p,v,g){for(var y,w=[],b=v;b>1,p=-7,v=i?a-1:0,g=i?-1:1,y=n[r+v];for(v+=g,s=y&(1<<-p)-1,y>>=-p,p+=u;p>0;s=256*s+n[r+v],v+=g,p-=8);for(l=s&(1<<-p)-1,s>>=-p,p+=o;p>0;l=256*l+n[r+v],v+=g,p-=8);if(s===0)s=1-d;else{if(s===f)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,o),s-=d}return(y?-1:1)*l*Math.pow(2,s-o)},t.write=function(n,r,i,o,a,s){var l,u,f,d=8*s-a-1,p=(1<>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:s-1,w=o?1:-1,b=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,l=p):(l=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-l))<1&&(l--,f*=2),(r+=l+v>=1?g/f:g*Math.pow(2,1-v))*f>=2&&(l++,f/=2),l+v>=p?(u=0,l=p):l+v>=1?(u=(r*f-1)*Math.pow(2,a),l+=v):(u=r*Math.pow(2,v-1)*Math.pow(2,a),l=0));a>=8;n[i+y]=255&u,y+=w,u/=256,a-=8);for(l=l<0;n[i+y]=255&l,y+=w,l/=256,d-=8);n[i+y-w]|=128*b}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t){},function(e,t,n){var r=n(7).Buffer,i=n(43);function o(a,s,l){a.copy(s,l)}e.exports=function(){function a(){(function(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")})(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(s){var l={data:s,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},a.prototype.unshift=function(s){var l={data:s,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},a.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(s){if(this.length===0)return"";for(var l=this.head,u=""+l.data;l=l.next;)u+=s+l.data;return u},a.prototype.concat=function(s){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var l=r.allocUnsafe(s>>>0),u=this.head,f=0;u;)o(u.data,l,f),f+=u.data.length,u=u.next;return l},a}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var a=i.inspect({length:this.length});return this.constructor.name+" "+a})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var a=r.localStorage[o];return a!=null&&String(a).toLowerCase()==="true"}e.exports=function(o,a){if(i("noDeprecation"))return o;var s=!1;return function(){if(!s){if(i("throwDeprecation"))throw new Error(a);i("traceDeprecation")?console.trace(a):console.warn(a),s=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){e.exports=o;var r=n(27),i=n(5);function o(a){if(!(this instanceof o))return new o(a);r.call(this,a)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(a,s,l){l(null,a)}},function(e,t,n){e.exports=n(14)},function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports=n(13).Transform},function(e,t,n){e.exports=n(13).PassThrough},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=function(r){var i={delimiter:",",ignoreColumns:void 0,includeColumns:void 0,quote:'"',trim:!0,checkType:!1,ignoreEmpty:!1,noheader:!1,headers:void 0,flatKeys:!1,maxRowLength:0,checkColumn:!1,escape:'"',colParser:{},eol:void 0,alwaysSplitAtEOL:!1,output:"json",nullObject:!1,downstreamFormat:"line",needEmitAll:!0};for(var o in r||(r={}),r)r.hasOwnProperty(o)&&(Array.isArray(r[o])?i[o]=[].concat(r[o]):i[o]=r[o]);return i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,o={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:r.parseParam.delimiter,eol:r.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return i.ignoreColumns&&(o.needProcessIgnoreColumn=!0),i.includeColumns&&(o.needProcessIncludeColumn=!0),o}},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var _ in x)x.hasOwnProperty(_)&&(b[_]=x[_])};return function(b,x){function _(){this.constructor=b}w(b,x),b.prototype=x===null?Object.create(x):(_.prototype=x.prototype,new _)}}(),o=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(53),s=o(n(15)),l=n(54),u=o(n(16)),f=n(57),d=n(28),p=n(58),v=o(n(59)),g=o(n(29)),y=function(w){function b(){var x=w!==null&&w.apply(this,arguments)||this;return x.rowSplit=new p.RowSplit(x.converter),x.eolEmitted=!1,x._needEmitEol=void 0,x.headEmitted=!1,x._needEmitHead=void 0,x}return i(b,w),b.prototype.flush=function(){var x=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var _=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(_,!0).then(function(S){return x.runtime.csvLineBuffer&&x.runtime.csvLineBuffer.length>0?s.default.reject(g.default.unclosed_quote(x.runtime.parsedLineNumber,x.runtime.csvLineBuffer.toString())):s.default.resolve(S)})}return s.default.resolve([])},b.prototype.destroy=function(){return s.default.resolve()},Object.defineProperty(b.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),b.prototype.process=function(x,_){var S,j=this;return _===void 0&&(_=!1),S=_?x.toString():l.prepareData(x,this.converter.parseRuntime),s.default.resolve().then(function(){return j.runtime.preRawDataHook?j.runtime.preRawDataHook(S):S}).then(function(E){return E&&E.length>0?j.processCSV(E,_):s.default.resolve([])})},b.prototype.processCSV=function(x,_){var S=this,j=this.params,E=this.runtime;E.eol||u.default(x,E),this.needEmitEol&&!this.eolEmitted&&E.eol&&(this.converter.emit("eol",E.eol),this.eolEmitted=!0),j.ignoreEmpty&&!E.started&&(x=d.trimLeft(x));var C=f.stringToLines(x,E);return _?(C.lines.push(C.partial),C.partial=""):this.prependLeftBuf(d.bufFromString(C.partial)),C.lines.length>0?(E.preFileLineHook?this.runPreLineHook(C.lines):s.default.resolve(C.lines)).then(function(N){return E.started||S.runtime.headers?S.processCSVBody(N):S.processDataWithHead(N)}):s.default.resolve([])},b.prototype.processDataWithHead=function(x){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var _="",S=[];x.length;){var j=_+x.shift(),E=this.rowSplit.parse(j);if(E.closed){S=E.cells,_="";break}_=j+u.default(j,this.runtime)}if(this.prependLeftBuf(d.bufFromString(_)),S.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=S}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(x)},b.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var x=this.runtime.headers,_=0;_=C.length)M();else if(N.preFileLineHook){var D=C[I],z=N.preFileLineHook(D,N.parsedLineNumber+I);if(I++,z&&z.then)z.then(function(q){C[I-1]=q,E(C,N,I,M)});else{for(C[I-1]=z;I0?r.concat([d.csvLineBuffer,f]):f}(a,s);s.csvLineBuffer=void 0;var u=function(f,d){var p=f.length-1;if(128&f[p]){for(;(192&f[p])==128;)p--;p--}return p!=f.length-1?(d.csvLineBuffer=f.slice(p+1),f.slice(0,p+1)):f}(l,s).toString("utf8");return s.started===!1?o.default(u):u}}).call(this,n(3).Buffer)},function(e,t,n){(function(r){var i=n(56);e.exports=function(o){return typeof o=="string"&&o.charCodeAt(0)===65279?o.slice(1):r.isBuffer(o)&&i(o)&&o[0]===239&&o[1]===187&&o[2]===191?o.slice(3):o}}).call(this,n(3).Buffer)},function(e,t){e.exports=function(n){for(var r=0;r0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),l.prototype.parse=function(u){if(u.length===0||this.conv.parseParam.ignoreEmpty&&u.trim().length===0)return{cells:[],closed:!0};var f=this.quote,d=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(u)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var p=this.conv.parseRuntime.delimiter,v=u.split(p);if(f==="off"){if(d)for(var g=0;gd&&(p=v,d=g)}),p},l.prototype.isQuoteOpen=function(u){var f=this.quote,d=this.escape;return u[0]===f&&(u[1]!==f||u[1]===d&&(u[2]===f||u.length===2))},l.prototype.isQuoteClose=function(u){var f=this.quote,d=this.escape;this.conv.parseParam.trim&&(u=o.trimRight(u));for(var p=0,v=u.length-1;u[v]===f||u[v]===d;)v--,p++;return p%2!=0},l.prototype.escapeQuote=function(u){var f="es|"+this.quote+"|"+this.escape;this.cachedRegExp[f]===void 0&&(this.cachedRegExp[f]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var d=this.cachedRegExp[f];return u.replace(d,this.quote)},l.prototype.parseMultiLines=function(u){for(var f=[],d="";u.length;){var p=d+u.shift(),v=this.parse(p);v.cells.length===0&&this.conv.parseParam.ignoreEmpty||(v.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?f.push(o.filterArray(v.cells,this.conv.parseRuntime.selectedColumns)):f.push(v.cells),d=""):d=p+(i.default(p,this.conv.parseRuntime)||` `))}return{rowsCells:f,partial:d}},l}();t.RowSplit=s},function(e,t,n){var r=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(29)),o=r(n(60)),a=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function s(b,x,_){if(x.parseParam.checkColumn&&x.parseRuntime.headers&&b.length!==x.parseRuntime.headers.length)throw i.default.column_mismatched(x.parseRuntime.parsedLineNumber+_);return function(S,j,E){for(var C=!1,N={},I=0,M=S.length;I-1){for(var E=x.split("."),C=!0;E.length>0;)if(E.shift().length===0){C=!1;break}!C||S.parseParam.colParser[x]&&S.parseParam.colParser[x].flat?S.parseRuntime.columnValueSetter[j]=d:S.parseRuntime.columnValueSetter[j]=p}else S.parseRuntime.columnValueSetter[j]=d;S.parseParam.nullObject===!0&&_==="null"&&(_=null),S.parseRuntime.columnValueSetter[j](b,x,_)}function d(b,x,_){b[x]=_}function p(b,x,_){o.default(b,x,_)}function v(b,x,_,S){return S.parseRuntime.headerType[_]?S.parseRuntime.headerType[_]:x.indexOf("number#!")>-1?S.parseRuntime.headerType[_]=g:x.indexOf("string#!")>-1?S.parseRuntime.headerType[_]=y:S.parseParam.checkType?S.parseRuntime.headerType[_]=w:S.parseRuntime.headerType[_]=y}function g(b){var x=parseFloat(b);return isNaN(x)?b:x}function y(b){return b.toString()}function w(b){var x=b.trim();return x===""?y(b):a.test(x)?g(b):x.length===5&&x.toLowerCase()==="false"||x.length===4&&x.toLowerCase()==="true"?function(_){var S=_.trim();return S.length!==5||S.toLowerCase()!=="false"}(b):x[0]==="{"&&x[x.length-1]==="}"||x[0]==="["&&x[x.length-1]==="]"?function(_){try{return JSON.parse(_)}catch{return _}}(b):y(b)}},function(e,t,n){var r=n(61);e.exports=function(i,o,a){return i==null?i:r(i,o,a)}},function(e,t,n){var r=n(62),i=n(74),o=n(103),a=n(20),s=n(104);e.exports=function(l,u,f,d){if(!a(l))return l;for(var p=-1,v=(u=i(u,l)).length,g=v-1,y=l;y!=null&&++p-1}},function(e,t,n){var r=n(9);e.exports=function(i,o){var a=this.__data__,s=r(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}},function(e,t,n){var r=n(17)(n(19),"Map");e.exports=r},function(e,t,n){var r=n(10);e.exports=function(i){var o=r(this,i).delete(i);return this.size-=o?1:0,o}},function(e,t){e.exports=function(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).get(i)}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).has(i)}},function(e,t,n){var r=n(10);e.exports=function(i,o){var a=r(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}},function(e,t,n){var r=n(101);e.exports=function(i){return i==null?"":r(i)}},function(e,t,n){var r=n(18),i=n(102),o=n(21),a=n(22),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function u(f){if(typeof f=="string")return f;if(o(f))return i(f,u)+"";if(a(f))return l?l.call(f):"";var d=f+"";return d=="0"&&1/f==-1/0?"-0":d}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,a=Array(o);++i-1&&r%1==0&&r0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!0,configurable:!0}),l.prototype.processResult=function(u){var f=this,d=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&d===0&&s(this.converter,"["+o.EOL),new i.default(function(p,v){f.needEmitLine?function g(y,w,b,x,_){if(b>=y.length)_();else if(w.parseRuntime.subscribe&&w.parseRuntime.subscribe.onNext){var S=w.parseRuntime.subscribe.onNext,j=y[b],E=S(j,w.parseRuntime.parsedLineNumber+b);if(b++,E&&E.then)E.then(function(){(function(N,I,M,D,z,q,W){z&&s(M,W),g(N,M,D,z,q)})(y,0,w,b,x,_,j)},_);else{for(x&&s(w,j);bnew Promise(t=>{t9e().fromString(e).then(t)}),r9e=new JUe,i9e=e=>r9e.parse(e),o9e="shlink",s5=e=>`${o9e}.${e}`;class a9e{constructor(t){ru(this,"get",t=>{const n=this.localStorage.getItem(s5(t));return n?JSON.parse(n):void 0});ru(this,"set",(t,n)=>this.localStorage.setItem(s5(t),JSON.stringify(n)));this.localStorage=t}}class s9e{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const l9e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",a9e,"localStorage"),e.service("TagColorsStorage",s9e,"Storage"),e.constant("csvToJson",n9e),e.constant("jsonToCsv",i9e),e.serviceFactory("useTimeoutToggle",()=>Q7)},ql=new vZ,{container:ZP}=ql,u9e=(e,t)=>(...n)=>e[t](...n),c9e=(e,t)=>({...e,[t]:u9e(ZP,t)}),f9e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),f_=(e,t=[])=>C8(e?f9e(e):null,t.reduce(c9e,{}));oce(ql,f_);AFe(ql,f_);NZ(ql);_Ue(ql,f_);l9e(ql);GUe(ql,f_);var XP={},oj={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var u=[],f=0;fB.length)&&(F=B.length);for(var H=0,ne=Array(F);HnC({appUpdated:ice,servers:nUe,selectedServer:e.selectedServerReducer,settings:LUe}),p9e=e=>{var t;return e.settings&&((t=e.settings.visits)==null?void 0:t.defaultInterval)==="last180days"&&e.settings.visits&&(e.settings.visits.defaultInterval="last180Days"),e},m9e=!0,cH={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},v9e=p9e(XP.load(cH)),g9e=e=>bF({devTools:!m9e,reducer:h9e(e),preloadedState:v9e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(XP.save(cH))}),y9e=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function b9e(e){if("serviceWorker"in navigator){if(new URL(Vg.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Vg.homepage}/service-worker.js`;y9e?(_9e(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):fH(n,e)})}}function fH(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function _9e(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(i=>{i.unregister().then(()=>{window.location.reload()})}):fH(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const dH=g9e(ZP),{App:x9e,ScrollToTop:w9e,ErrorHandler:O9e,appUpdateAvailable:S9e}=ZP;x8(document.getElementById("root")).render(m.jsx(P8,{store:dH,children:m.jsx(U8,{basename:Vg.homepage,children:m.jsx(O9e,{children:m.jsx(w9e,{children:m.jsx(x9e,{})})})})}));b9e({onUpdate(){dH.dispatch(S9e())}});